summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-portal-BE')
-rw-r--r--ecomp-portal-BE/.gitignore6
-rw-r--r--ecomp-portal-BE/README.md7
-rw-r--r--ecomp-portal-BE/distribution.xml26
-rw-r--r--ecomp-portal-BE/ecomp-portal-resources/sql scripts/Apps_Users_OnBoarding_Script.sql320
-rw-r--r--ecomp-portal-BE/ecomp-portal-resources/sql scripts/EcompPortalDDLMySql_1610_Complete_OS.sql1499
-rw-r--r--ecomp-portal-BE/ecomp-portal-resources/sql scripts/EcompPortalDMLMySql_1610_Complete_OS.sql225
-rw-r--r--ecomp-portal-BE/pom.xml631
-rw-r--r--ecomp-portal-BE/resources/META-INF/MANIFEST.MF2
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/authentication/LoginStrategy.java27
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/authentication/OpenIdConnectLoginStrategy.java91
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/authentication/SimpleLoginStrategy.java101
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/command/EPLoginBean.java186
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/command/PostSearchBean.java373
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/conf/ExternalAppConfig.java311
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/conf/ExternalAppInitializer.java60
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/conf/HibernateMappingLocations.java38
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/ECOMPLogoutController.java112
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/EPFusionBaseController.java106
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/EPRestrictedBaseController.java52
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/EPRestrictedRESTfulBaseController.java54
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/EPUnRestrictedBaseController.java42
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/LoginController.java356
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/LoginService.java36
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/OpenCollaborationController.java48
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/PeerBroadcastSocket.java106
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/UserProfileController.java77
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/WelcomeController.java89
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/sessionmgt/SessionCommunicationController.java64
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/controller/KpiDashboardController.java268
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpiApiStats.java74
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpiServiceSupported.java60
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpiUserStoryStats.java107
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpidashProperties.java33
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/service/KpiDashboardService.java56
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/service/KpiDashboardServiceImpl.java180
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/model/Result.java37
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/AppCatalogController.java124
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/AppContactUsController.java224
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/AppsController.java470
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/DashboardController.java361
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/DashboardSearchResultController.java243
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/ExternalAppsRestfulController.java128
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/FunctionalMenuController.java436
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/GetAccessController.java70
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/HealthCheckController.java234
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/ManifestController.java93
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/PortalAdminController.java117
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/SharedContextRestController.java335
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/UserRolesController.java336
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/WidgetsController.java134
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/AdminUserApp.java88
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/AdminUserApplications.java96
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/AppContactUs.java86
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/AppContactUsTransportModel.java84
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/AppIdAndNameTransportModel.java63
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/AppsResponse.java76
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/EPApp.java319
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/EPRole.java204
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/EPUser.java602
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/EPUserApp.java119
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/EcompApp.java143
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/GetAccessResult.java70
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/GetAccessResultId.java64
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/PersUserAppSelection.java79
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/SharedContext.java161
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/UserIdRoleId.java77
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/UserRole.java91
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/UserRoles.java111
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/Widget.java104
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/AppCatalogItem.java159
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/AppCategoryFunctionsItem.java84
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/AppContactUsItem.java104
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/CommonWidgetsEnum.java36
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/PortalRestResponse.java60
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/PortalRestStatusEnum.java35
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/SearchResultItem.java92
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/interceptor/PortalResourceInterceptor.java95
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/interceptor/SessionTimeoutInterceptor.java97
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/listener/HealthMonitor.java393
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/listener/UserContextListener.java49
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/listener/UserSessionListener.java125
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/aop/EPAuditLog.java31
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/aop/EPEELFLoggerAdvice.java341
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/aop/EPEELFLoggerAspect.java204
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/aop/EPMetricsLog.java31
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/format/ApplicationCodes.properties141
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/format/EPAppMessagesEnum.java260
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/format/EPErrorCodesEnum.java95
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/logic/EPLogUtil.java76
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/AdminRolesService.java52
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/AdminRolesServiceImpl.java318
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/AppContactUsService.java55
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/AppContactUsServiceImpl.java178
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/ApplicationsRestClientService.java28
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/ApplicationsRestClientServiceImpl.java267
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/AppsCacheService.java40
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/AppsCacheServiceImple.java104
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/DashboardSearchService.java38
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/DashboardSearchServiceImpl.java238
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPAppService.java164
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPAppServiceImpl.java1218
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPAuditService.java26
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPAuditServiceImpl.java74
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPLdapService.java31
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPLdapServiceImpl.java287
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPLoginService.java42
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPLoginServiceImpl.java235
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPRoleService.java32
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPRoleServiceImpl.java149
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/FunctionalMenuService.java50
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/FunctionalMenuServiceImpl.java862
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/GetAccessService.java32
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/GetAccessServiceImpl.java50
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/ManifestService.java34
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/ManifestServiceImpl.java65
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/PersUserAppService.java24
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/PersUserAppServiceImpl.java117
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/PortalAdminService.java31
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/PortalAdminServiceImpl.java179
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/SearchService.java38
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/SearchServiceImpl.java188
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/SharedContextService.java98
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/SharedContextServiceImpl.java173
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/UserRolesService.java58
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/UserRolesServiceImpl.java656
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/UserService.java34
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/UserServiceImpl.java260
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/WidgetService.java36
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/WidgetServiceImpl.java275
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/AllAppsWithRolesForUser.java40
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/AppCatalogPersonalization.java38
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/AppNameIdIsAdmin.java31
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/AppWithRolesForUser.java34
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/AppsListWithAdminRole.java34
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/CommonWidget.java140
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/CommonWidgetMeta.java50
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/EventWidget.java139
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/EventWidgetMeta.java52
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/FavoritesFunctionalMenuItem.java45
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/FavoritesFunctionalMenuItemJson.java57
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/FieldsValidator.java49
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/FunctionalMenuItem.java90
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/FunctionalMenuItemJson.java52
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/FunctionalMenuRole.java49
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/LocalRole.java42
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/OnboardingApp.java83
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/OnboardingWidget.java65
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/PortalAdmin.java53
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/PortalAdminUserRole.java48
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/RemoteRole.java28
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/RemoteUserWithRoles.java63
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/RoleInAppForUser.java39
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/RolesInAppForUser.java33
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/UserApplicationRoles.java41
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/UserWithNameSurnameTitle.java39
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ueb/EPUebHelper.java218
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ueb/EPUebMsgTypes.java27
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/utils/CustomLoggingFilter.java60
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/utils/EPSystemProperties.java77
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/utils/EcompPortalUtils.java248
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/utils/EcompVersion.java33
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/utils/HashMapFromList.java100
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/utils/ParallelExecutor.java83
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/scheduler/LogJob.java45
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/scheduler/LogRegistry.java57
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/scheduler/Register.java86
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/scheduler/RegistryAdapter.java100
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/scheduler/SessionMgtRegistry.java89
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/AdminAuthExtension.java35
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/EPProfileService.java36
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/EPProfileServiceImpl.java76
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/sessionmgt/CoreTimeoutHandler.java166
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/sessionmgt/ManageService.java101
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/sessionmgt/RemoteWebServiceCallService.java44
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/sessionmgt/RemoteWebServiceCallServiceImpl.java83
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/sessionmgt/SessionCommunication.java274
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/sessionmgt/TimeoutHandler.java252
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/uebhandler/FunctionalMenuHandler.java126
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/uebhandler/InitUebHandler.java75
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/uebhandler/MainUebHandler.java115
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/uebhandler/WidgetNotificationHandler.java93
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/util/EPUserUtils.java308
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/util/SessionCookieUtil.java129
-rw-r--r--ecomp-portal-BE/src/main/resources/cache.ccf30
-rw-r--r--ecomp-portal-BE/src/main/resources/logback.xml285
-rw-r--r--ecomp-portal-BE/src/main/resources/openid-connect.properties22
-rw-r--r--ecomp-portal-BE/src/main/resources/openid-keystore.jwks12
-rw-r--r--ecomp-portal-BE/src/main/resources/portal.properties44
-rw-r--r--ecomp-portal-BE/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextRestClient.java262
-rw-r--r--ecomp-portal-BE/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextRestControllerTest.java107
-rw-r--r--ecomp-portal-BE/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextTestProperties.java62
-rw-r--r--ecomp-portal-BE/src/test/java/org/openecomp/portalapp/portal/controller/shared-context-test.properties9
-rw-r--r--ecomp-portal-BE/src/test/java/org/openecomp/portalapp/portal/listener/HealthMonitorTest.java17
-rw-r--r--ecomp-portal-BE/src/test/java/org/openecomp/portalapp/portal/utils/EcompPortalUtilsTest.java14
-rw-r--r--ecomp-portal-BE/war/META-INF/MANIFEST.MF3
-rw-r--r--ecomp-portal-BE/war/WEB-INF/conf/cache.ccf30
-rw-r--r--ecomp-portal-BE/war/WEB-INF/conf/kpidash.properties22
-rw-r--r--ecomp-portal-BE/war/WEB-INF/conf/quartz.properties55
-rw-r--r--ecomp-portal-BE/war/WEB-INF/conf/raptor.properties185
-rw-r--r--ecomp-portal-BE/war/WEB-INF/conf/raptor_app_fusion.properties36
-rw-r--r--ecomp-portal-BE/war/WEB-INF/conf/raptor_db_fusion.properties19
-rw-r--r--ecomp-portal-BE/war/WEB-INF/conf/raptor_pdf.properties49
-rw-r--r--ecomp-portal-BE/war/WEB-INF/conf/sql.properties295
-rw-r--r--ecomp-portal-BE/war/WEB-INF/conf/system.properties102
-rw-r--r--ecomp-portal-BE/war/WEB-INF/defs/definitions.xml38
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/.DS_Storebin6148 -> 0 bytes
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/conf/fusion.properties82
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/defs/definitions.xml120
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/jsp/.gitignore0
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/jsp/collaborateList.jsp101
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/jsp/ebz/ebz_footer.jsp63
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/jsp/ebz/ebz_header.jsp303
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/jsp/ebz_template.jsp44
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/jsp/ebz_template_noheader_nofooter.jsp35
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/jsp/include.jsp30
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/jsp/jcs_admin.jsp149
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/jsp/meta.jsp35
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/jsp/popup_modal.html311
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/jsp/popup_modal_role.html257
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/jsp/popup_modal_rolefunction.html87
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/jsp/post_search.jsp370
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/jsp/profile.jsp442
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/jsp/profile_search.jsp100
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/jsp/role.jsp298
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/jsp/role_function_list.jsp225
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/jsp/role_list.jsp147
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/jsp/usage_list.jsp99
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/jsp/webrtc/collaboration.jsp529
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/orm/EP.hbm.xml558
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/orm/Fusion.hbm.xml372
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/orm/Workflow.hbm.xml48
-rw-r--r--ecomp-portal-BE/war/WEB-INF/fusion/raptor/report_search.jsp20
-rw-r--r--ecomp-portal-BE/war/WEB-INF/jsp/error.jsp20
-rw-r--r--ecomp-portal-BE/war/WEB-INF/jsp/index.jsp21
-rw-r--r--ecomp-portal-BE/war/WEB-INF/jsp/login.jsp152
-rw-r--r--ecomp-portal-BE/war/WEB-INF/jsp/oid-admin.jsp72
-rw-r--r--ecomp-portal-BE/war/WEB-INF/jsp/oid-home.jsp102
-rw-r--r--ecomp-portal-BE/war/WEB-INF/jsp/oid-login.jsp76
-rw-r--r--ecomp-portal-BE/war/WEB-INF/jsp/oid-user.jsp139
-rw-r--r--ecomp-portal-BE/war/WEB-INF/jsp/welcome.jsp695
-rw-r--r--ecomp-portal-BE/war/WEB-INF/oid-context.xml455
-rw-r--r--ecomp-portal-BE/war/WEB-INF/tags/copyright.tag1
-rw-r--r--ecomp-portal-BE/war/WEB-INF/tags/footer.tag12
-rw-r--r--ecomp-portal-BE/war/WEB-INF/tags/header.tag59
-rw-r--r--ecomp-portal-BE/war/WEB-INF/tags/topbar.tag96
-rw-r--r--ecomp-portal-BE/war/WEB-INF/web.xml87
-rw-r--r--ecomp-portal-BE/war/images/cache/README.txt1
-rw-r--r--ecomp-portal-BE/war/index.jsp22
-rw-r--r--ecomp-portal-BE/war/static/ebz/angular_js/angular-sanitize.js647
-rw-r--r--ecomp-portal-BE/war/static/ebz/angular_js/angular.js22024
-rw-r--r--ecomp-portal-BE/war/static/ebz/angular_js/app.js3
-rw-r--r--ecomp-portal-BE/war/static/ebz/angular_js/att-abs-tpls-1.2.51.js17587
-rw-r--r--ecomp-portal-BE/war/static/ebz/angular_js/attHeaderSnippet.js210
-rw-r--r--ecomp-portal-BE/war/static/ebz/angular_js/att_abs_tpls.js18514
-rw-r--r--ecomp-portal-BE/war/static/ebz/angular_js/checklist-model.js99
-rw-r--r--ecomp-portal-BE/war/static/ebz/angular_js/checklist-model.min.js1
-rw-r--r--ecomp-portal-BE/war/static/ebz/angular_js/d7100892.modernizr.js1
-rw-r--r--ecomp-portal-BE/war/static/ebz/angular_js/ebiz_keepalive.js8
-rw-r--r--ecomp-portal-BE/war/static/ebz/angular_js/footer.js110
-rw-r--r--ecomp-portal-BE/war/static/ebz/angular_js/footer_new.js102
-rw-r--r--ecomp-portal-BE/war/static/ebz/angular_js/gestures.js1495
-rw-r--r--ecomp-portal-BE/war/static/ebz/angular_js/ng_base.js4
-rw-r--r--ecomp-portal-BE/war/static/ebz/angular_js/ui-charts-tpls.js3909
-rw-r--r--ecomp-portal-BE/war/static/ebz/attSessionTimeoutModal.css1562
-rw-r--r--ecomp-portal-BE/war/static/ebz/dashboardBase.css5798
-rw-r--r--ecomp-portal-BE/war/static/ebz/dashboardBase_changed.css5803
-rw-r--r--ecomp-portal-BE/war/static/ebz/ebz_header.css607
-rw-r--r--ecomp-portal-BE/war/static/ebz/fn-ebz.css1344
-rw-r--r--ecomp-portal-BE/war/static/ebz/footer_new.css310
-rw-r--r--ecomp-portal-BE/war/static/ebz/globalFonts.cssbin6347 -> 0 bytes
-rw-r--r--ecomp-portal-BE/war/static/ebz/header_new.css1781
-rw-r--r--ecomp-portal-BE/war/static/ebz/js/attHeaderSnippet.js210
-rw-r--r--ecomp-portal-BE/war/static/ebz/js/footer.js110
-rw-r--r--ecomp-portal-BE/war/static/ebz/sandbox/att-abs-tpls.js20451
-rw-r--r--ecomp-portal-BE/war/static/ebz/sandbox/att-abs-tpls.min.js22
-rw-r--r--ecomp-portal-BE/war/static/ebz/sandbox/styles/base.css1
-rw-r--r--ecomp-portal-BE/war/static/ebz/sandbox/styles/btn.css1
-rw-r--r--ecomp-portal-BE/war/static/ebz/sandbox/styles/demo.css2
-rw-r--r--ecomp-portal-BE/war/static/ebz/sandbox/styles/dtpk.css9
-rw-r--r--ecomp-portal-BE/war/static/ebz/sandbox/styles/frms.css1
-rw-r--r--ecomp-portal-BE/war/static/ebz/sandbox/styles/ie/backgroundsize.min.htc12
-rw-r--r--ecomp-portal-BE/war/static/ebz/sandbox/styles/pages/iconography.css2
-rw-r--r--ecomp-portal-BE/war/static/ebz/sandbox/styles/sldr.css1
-rw-r--r--ecomp-portal-BE/war/static/ebz/sandbox/styles/style.css1
-rw-r--r--ecomp-portal-BE/war/static/ebz/sandbox/styles/tbs.css1
-rw-r--r--ecomp-portal-BE/war/static/fusion/css/att_angular_gridster/sandbox-gridster.css173
-rw-r--r--ecomp-portal-BE/war/static/fusion/css/att_angular_gridster/ui-gridster.css116
-rw-r--r--ecomp-portal-BE/war/static/fusion/css/fusion-sunny.css362
-rw-r--r--ecomp-portal-BE/war/static/fusion/css/jquery-ui.css1225
-rw-r--r--ecomp-portal-BE/war/static/fusion/css/layout/layout-default-latest.css224
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/css/nv.d3.css656
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/cie.js155
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/colorbrewer.js302
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/core.js122
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/crossfilter.js1180
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/crossfilter.min.js1
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/d3.geom.js816
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/d3.js5
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/d3.layout.cloud.js433
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/d3.layout.js908
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/d3.v2.js7037
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/d3.v2.min.js4
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/d3.v3.min.js1
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/fisheye.js86
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/hive.js80
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/horizon.js192
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/interactiveLayer.js251
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/intro.js1
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/axis-min.js1
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/axis.js470
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/axis.min.js1
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/backup/bullet.js250
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/backup/bulletChart.js349
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/boilerplate.js104
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/bullet.js385
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/bulletChart.js343
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/cumulativeLineChart.js782
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/discreteBar.js349
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/discreteBarChart.js333
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/distribution.js148
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/historicalBar.js331
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/historicalBarChart.js419
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/indentedTree.js337
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/legend.js270
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/line.js284
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/lineChart.js465
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/linePlusBarChart.js433
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/linePlusBarWithFocusChart.js658
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/lineWithFisheye.js200
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/lineWithFisheyeChart.js297
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/lineWithFocusChart.js574
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/multiBar.js461
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/multiBarChart.js524
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/multiBarHorizontal.js424
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/multiBarHorizontalChart.js434
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/multiBarTimeSeries.js384
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/multiBarTimeSeriesChart.js405
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/multiChart.js452
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/ohlcBar.js380
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/parallelCoordinates.js239
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/pie.js400
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/pieChart.js292
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/scatter.js674
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/scatterChart.js628
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/scatterPlusLineChart.js620
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/sparkline.js194
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/sparklinePlus.js295
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/stackedArea.js368
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/models/stackedAreaChart.js629
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/nv.d3.js13097
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/nv.d3.min.js1
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/outro.js1
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/sankey.js292
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/tooltip.js490
-rw-r--r--ecomp-portal-BE/war/static/fusion/d3/js/utils.js152
-rw-r--r--ecomp-portal-BE/war/static/fusion/images/att_angular_gridster/grips.pngbin951 -> 0 bytes
-rw-r--r--ecomp-portal-BE/war/static/fusion/images/ecomp-login.jpgbin66384 -> 0 bytes
-rw-r--r--ecomp-portal-BE/war/static/fusion/images/ecomp_trans.pngbin109926 -> 0 bytes
-rw-r--r--ecomp-portal-BE/war/static/fusion/images/login_button.gifbin1222 -> 0 bytes
-rw-r--r--ecomp-portal-BE/war/static/fusion/js/att_angular_gridster/angular-gridster.js2244
-rw-r--r--ecomp-portal-BE/war/static/fusion/js/att_angular_gridster/ui-gridster-tpls.js168
-rw-r--r--ecomp-portal-BE/war/static/fusion/js/jquery.resize.js139
-rw-r--r--ecomp-portal-BE/war/static/fusion/js/layout/debug.js329
-rw-r--r--ecomp-portal-BE/war/static/fusion/js/layout/jquery-latest.js9555
-rw-r--r--ecomp-portal-BE/war/static/fusion/js/layout/jquery-ui-latest.js14879
-rw-r--r--ecomp-portal-BE/war/static/fusion/js/layout/jquery.layout-latest.js6086
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/css/images/blank.gifbin49 -> 0 bytes
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/css/scribble.css32
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/css/slider.css142
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/css/spacegallery.css18
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/html/area_chart.html49
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/html/bar_chart.html95
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/html/d3_gauges_demo.html39
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/html/data/speedometer2.csv16
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/html/data/speedometer3.csv2
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/html/data/worddata.csv22
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/html/donut_d3.html43
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/html/js/area_chart.min.js1
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/html/js/donut.min.js1
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/html/js/gauges.min.js1
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/html/js/line_chart.min.js1
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/html/js/pie_chart.min.js1
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/html/js/worddata.min.js1
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/html/line_chart.html49
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/html/pie_chart.html38
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/html/wordcloud.html37
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/js/FusionCharts.js361
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/js/charts.js132
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/js/eye.js34
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/js/scribble.js19
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/js/slides.min.jquery.js20
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/js/spacegallery.js235
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/js/utils.js252
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/org_chart/css/bootstrap.min.css351
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/org_chart/css/custom.css97
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/org_chart/css/jquery.jOrgChart.css51
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/org_chart/css/prettify.css1
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/org_chart/example.html85
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/org_chart/example_vsp.html88
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/org_chart/jquery.jOrgChart.js267
-rw-r--r--ecomp-portal-BE/war/static/fusion/sample/org_chart/prettify.js28
-rw-r--r--ecomp-portal-BE/war/static/fusion/webrtc/getSourceId.html78
-rw-r--r--ecomp-portal-BE/war/static/fusion/webrtc/js/RTCMultiConnection.js6777
-rw-r--r--ecomp-portal-BE/war/static/fusion/webrtc/js/peerBroadcast.js113
-rw-r--r--ecomp-portal-BE/war/static/js/jquery-1.10.2.js9789
-rw-r--r--ecomp-portal-BE/war/static/js/jquery-ui.js16617
-rw-r--r--ecomp-portal-BE/war/static/js/jquery.mask.min.js12
-rw-r--r--ecomp-portal-BE/war/static/js/modalService.js144
-rw-r--r--ecomp-portal-BE/war/static/oid-connect/bootstrap2/css/bootstrap-responsive.css1109
-rw-r--r--ecomp-portal-BE/war/static/oid-connect/bootstrap2/css/bootstrap-responsive.min.css9
-rw-r--r--ecomp-portal-BE/war/static/oid-connect/bootstrap2/css/bootstrap.css6167
-rw-r--r--ecomp-portal-BE/war/static/oid-connect/bootstrap2/css/bootstrap.min.css9
-rw-r--r--ecomp-portal-BE/war/static/oid-connect/bootstrap2/js/bootstrap.js2280
-rw-r--r--ecomp-portal-BE/war/static/oid-connect/bootstrap2/js/bootstrap.min.js6
-rw-r--r--ecomp-portal-BE/war/static/oid-connect/js/lib/jquery.js9404
-rw-r--r--ecomp-portal-BE/war/static/oid-connect/js/lib/jwt.js244
-rw-r--r--ecomp-portal-BE/war/static/oid-connect/js/lib/underscore.js1221
417 files changed, 0 insertions, 270929 deletions
diff --git a/ecomp-portal-BE/.gitignore b/ecomp-portal-BE/.gitignore
deleted file mode 100644
index f3fcea6a..00000000
--- a/ecomp-portal-BE/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-/catalina.base_IS_UNDEFINED/
-/target/
-.classpath
-.project
-.settings/
-/bin/
diff --git a/ecomp-portal-BE/README.md b/ecomp-portal-BE/README.md
deleted file mode 100644
index 35ec4e09..00000000
--- a/ecomp-portal-BE/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-Quantum
-=======
-
-Framework for Java Application using Spring and Hibernate with Analytical Engine and Workflow
-
-build using maven command:
-mvn -U clean install
diff --git a/ecomp-portal-BE/distribution.xml b/ecomp-portal-BE/distribution.xml
deleted file mode 100644
index 6cef2812..00000000
--- a/ecomp-portal-BE/distribution.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
- <id>distribution</id>
- <formats>
- <format>zip</format>
- </formats>
- <includeBaseDirectory>false</includeBaseDirectory>
- <fileSets>
- <fileSet>
- <directory>${basedir}</directory>
- <outputDirectory/>
- <excludes>
- <exclude>**/src/org/openecomp/fusion/**</exclude>
- <exclude>**/src/openecomp/raptor/**</exclude>
- <exclude>**/.settings/**</exclude>
- <exclude>**/target/**</exclude>
- </excludes>
- <!--
- <includes>
- <include>**/*</include>
- </includes>
- -->
- </fileSet>
- </fileSets>
-</assembly> \ No newline at end of file
diff --git a/ecomp-portal-BE/ecomp-portal-resources/sql scripts/Apps_Users_OnBoarding_Script.sql b/ecomp-portal-BE/ecomp-portal-resources/sql scripts/Apps_Users_OnBoarding_Script.sql
deleted file mode 100644
index e9fa6227..00000000
--- a/ecomp-portal-BE/ecomp-portal-resources/sql scripts/Apps_Users_OnBoarding_Script.sql
+++ /dev/null
@@ -1,320 +0,0 @@
-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);
-
--- ASDC users
-
-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);
-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 (4,NULL,NULL,'Joni',NULL,'Mitchell',NULL,NULL,NULL,'tester@openecomp.org',NULL,NULL,NULL,'jm0007',NULL,'jm0007','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 (5,NULL,NULL,'Steve',NULL,'Regev',NULL,NULL,NULL,'ops@openecomp.org',NULL,NULL,NULL,'op0001',NULL,'op0001','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 (6,NULL,NULL,'David',NULL,'Shadmi',NULL,NULL,NULL,'governor@openecomp.org',NULL,NULL,NULL,'gv0001',NULL,'gv0001','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 (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 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 (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);
-Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (5,16,null,4);
-Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (6,16,null,4);
-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 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 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 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
-insert into fn_role values(1003,'Standard User','Y',1,3,16); -- DMaap
-insert into fn_role values(1004,'System Administrator','Y',1,4,999); -- SDC
-insert into fn_role values(1005,'Standard User','Y',1,4,16); -- SDC
-insert into fn_role values(1006,'Policy Super Admin','Y',1,5,999); -- Policy
-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_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);
-
--- new 1610.2
--- Ignore errors if the application is not onboarded in this environment
-
-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 "%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 (
- (select min(app_id) from fn_app where app_name like "%Policy%"),
- "Policy Team","policy@lists.openecomp.org","",NULL,
- "Policy.");
-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 "%DMaaP Bus%"),
- "DBC Team","portal@lists.openecomp.org","",NULL,
- "DBC.");
-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 "%Virtual Infrastructure%"),
- "Portal Team","portal@lists.openecomp.org","",NULL,
- "Virtual Infrastructure Design.");
-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 "%Demo%"),
- "Portal Team","portal@lists.openecomp.org","",NULL,
- "Demo Application");
--- end new 1610.2
-
---
--- Data for table fn_menu_functional
---
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (175,1,'Manage',NULL,'','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (1,2,'Design',175,'','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (316,11,'Administration',1,'','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (2,8,'ECOMP Platform Management',175,'','N',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (3,5,'Technology Insertion',175,'','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (5,7,'Performance Management',175,'','N',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (6,6,'Technology Management',175,'','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (7,4,'Capacity Planning',175,'','N',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (8,3,'Operations Planning',175,'','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (11,1,'Product Design',1,'','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (12,2,'Resource/Service Design & Onboarding',1,'','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (13,3,'Orchestration (recipe/Process) Design',1,'','N',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (14,4,'Service Graph visualizer',1,'','N',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (15,5,'Distribution',1,'','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (16,6,'Testing',1,'','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (17,7,'Simulation',1,'','N',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (18,8,'Certification',1,'','N',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (19,9,'Policy Creation/Management',1,'http://policy.api.simpledemo.openecomp.org:8443/ecomp/policy#/Editor','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (20,10,'Catalog Browser',1,'','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (24,5,'Create/Manage Policy',12,'http://policy.api.simpledemo.openecomp.org:8443/ecomp/policy#/Editor','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (56,1,'Policy Engineering',8,'http://policy.api.simpledemo.openecomp.org:8443/ecomp/policy#/Editor','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (115,1,'Test/Approve a Resource or Service',16,'http://sdc.api.simpledemo.openecomp.org:8181/sdc1/portal#/dashboard','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (130,1,'Favorites',175,'','y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (139,2,'Approve a Service for distribution',12,'http://sdc.api.simpledemo.openecomp.org:8181/sdc1/portal#/dashboard','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (142,3,'Create a License model',12,'http://sdc.api.simpledemo.openecomp.org:8181/sdc1/portal#/onboardVendor','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (145,1,'Distribute a Service',15,'http://sdc.api.simpledemo.openecomp.org:8181/sdc1/portal#/dashboard','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (148,1,'User Management / Category Management',316,'http://sdc.api.simpledemo.openecomp.org:8181/sdc1/portal#/adminDashboard','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (178,2,'Support',NULL,'','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (181,1,'Contact Us',178,'','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (184,2,'Get Access',178,'','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (301,1,'Create a Product',11,'http://sdc.api.simpledemo.openecomp.org:8181/sdc1/portal#/dashboard','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (304,2,'Create a Vendor Software Product',11,'http://sdc.api.simpledemo.openecomp.org:8181/sdc1/portal#/onboardVendor','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (307,1,'Manage a Resource/Service',20,'http://sdc.api.simpledemo.openecomp.org:8181/sdc1/portal#/catalog','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (310,2,'Manage a Product',20,'http://sdc.api.simpledemo.openecomp.org:8181/sdc1/portal#/catalog','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (313,3,'View a Resource/Service/Product',20,'http://sdc.api.simpledemo.openecomp.org:8181/sdc1/portal#/catalog','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (317,1,'Message Bus Management',6,'http://portal.api.simpledemo.openecomp.org:8989/ECOMPDBCAPP/dbc#/dmaap','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (318,1,'Infrastructure Provisioning',3,'','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (319,1,'Infrastructure VNF Provisioning',318,'http://vid.api.simpledemo.openecomp.org:8080/vid/vidhome.htm','Y',NULL);
---
--- Data for table fn_menu_functional_ancestors
---
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (1,175,175,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (2,178,178,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (3,11,11,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (4,12,12,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (5,13,13,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (6,14,14,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (7,15,15,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (8,16,16,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (9,17,17,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (10,18,18,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (11,19,19,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (12,20,20,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (13,316,316,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (14,318,318,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (15,317,317,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (16,56,56,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (17,301,301,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (18,304,304,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (19,24,24,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (20,139,139,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (21,142,142,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (22,145,145,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (23,115,115,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (24,307,307,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (25,310,310,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (26,313,313,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (27,1,1,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (28,2,2,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (29,3,3,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (30,5,5,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (31,6,6,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (32,7,7,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (33,8,8,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (34,130,130,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (35,181,181,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (36,184,184,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (37,148,148,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (38,319,319,0);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (64,11,1,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (65,12,1,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (66,13,1,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (67,14,1,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (68,15,1,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (69,16,1,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (70,17,1,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (71,18,1,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (72,19,1,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (73,20,1,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (74,316,1,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (75,318,3,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (76,317,6,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (77,56,8,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (78,301,11,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (79,304,11,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (80,24,12,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (81,139,12,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (82,142,12,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (83,145,15,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (84,115,16,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (85,307,20,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (86,310,20,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (87,313,20,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (88,1,175,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (89,2,175,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (90,3,175,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (91,5,175,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (92,6,175,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (93,7,175,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (94,8,175,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (95,130,175,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (96,181,178,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (97,184,178,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (98,148,316,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (99,319,318,1);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (127,301,1,2);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (128,304,1,2);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (129,24,1,2);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (130,139,1,2);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (131,142,1,2);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (132,145,1,2);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (133,115,1,2);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (134,307,1,2);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (135,310,1,2);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (136,313,1,2);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (137,148,1,2);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (138,319,3,2);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (139,11,175,2);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (140,12,175,2);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (141,13,175,2);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (142,14,175,2);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (143,15,175,2);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (144,16,175,2);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (145,17,175,2);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (146,18,175,2);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (147,19,175,2);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (148,20,175,2);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (149,316,175,2);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (150,318,175,2);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (151,317,175,2);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (152,56,175,2);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (158,301,175,3);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (159,304,175,3);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (160,24,175,3);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (161,139,175,3);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (162,142,175,3);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (163,145,175,3);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (164,115,175,3);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (165,307,175,3);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (166,310,175,3);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (167,313,175,3);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (168,148,175,3);
-INSERT INTO `fn_menu_functional_ancestors` (`id`,`menu_id`,`ancestor_menu_id`,`depth`) VALUES (169,319,175,3);
-
--- new 1610.2 which one? add-on 3rd script
-insert IGNORE into fn_menu_functional_roles (menu_id, app_id, role_id)
-(
-select a.menu_id, b.app_id, b.role_id from
-(
-select a.menu_id from fn_menu_functional a where upper(text) like '%POLICY%'
-) a,
-(
-select * from fn_role where app_id = (select app_id from fn_app where app_name = 'Policy')
-) b
-);
-
-
-insert IGNORE into fn_menu_functional_roles (menu_id, app_id, role_id)
-(
-select a.menu_id, b.app_id, b.role_id from
-(
-select a.menu_id from fn_menu_functional a where url like '%sdc1%'
-) a,
-(
-select * from fn_role where app_id = (select app_id from fn_app where app_name = 'SDC')
-) b
-);
-
-insert IGNORE into fn_menu_functional_roles (menu_id, app_id, role_id)
-(
-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')
-) b
-);
-
-insert IGNORE into fn_menu_functional_roles (menu_id, app_id, role_id)
-(
-select a.menu_id, b.app_id, b.role_id from
-(
-select a.menu_id from fn_menu_functional a where url like '%DBC%'
-) a,
-(
-select * from fn_role where app_id = (select app_id from fn_app where app_name = 'DMaaP Bus Ctrl')
-) b
-);
-
-insert IGNORE into fn_menu_functional_roles (menu_id, app_id, role_id)
-(
-select a.menu_id, b.app_id, b.role_id from
-(
-select a.menu_id from fn_menu_functional a where url like '%SDK%'
-) a,
-(
-select * from fn_role where app_id = (select app_id from fn_app where app_name = 'xDemo App')
-) 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);
-
diff --git a/ecomp-portal-BE/ecomp-portal-resources/sql scripts/EcompPortalDDLMySql_1610_Complete_OS.sql b/ecomp-portal-BE/ecomp-portal-resources/sql scripts/EcompPortalDDLMySql_1610_Complete_OS.sql
deleted file mode 100644
index cf3d80be..00000000
--- a/ecomp-portal-BE/ecomp-portal-resources/sql scripts/EcompPortalDDLMySql_1610_Complete_OS.sql
+++ /dev/null
@@ -1,1499 +0,0 @@
--- ---------------------------------------------------------------------------------------------------------------
--- This is the 1610.2 Open Source Version of Ecomp Portal database called portal
-
--- note to : database admin, set the mysql system variable called lower_case_table_names
-
--- it can be set 3 different ways:
--- command-line options (cmd-line),
--- options valid in configuration files (option file), or
--- server system variables (system var).
-
--- it needs to be set to 1, then table names are stored in lowercase on disk and comparisons are not case sensitive.
--- MySql/MariaDB Version compatibility information
--- bash-4.2$ mysql --version – cluster version
--- mysql Ver 15.1 Distrib 10.1.17-MariaDB, for Linux (x86_64) using readline 5.1
-
--- All versions newer or older than these DO NOT necessarily mean they are compatible.
--- -----------------------------------------------------------------------------------------------------------------
-
-
-set foreign_key_checks=1;
-
-create database portal;
-
-use portal;
--- ------------------ create table section
---
--- name: cr_favorite_reports; type: table
---
-create table cr_favorite_reports (
- user_id integer not null,
- rep_id integer not null
-);
---
--- name: cr_filehist_log; type: table
---
-create table cr_filehist_log (
- schedule_id numeric(11,0) not null,
- url character varying(4000),
- notes character varying(3500),
- run_time timestamp
--- run_time timestamp without time zone
-);
---
--- name: cr_folder; type: table
---
-create table cr_folder (
- folder_id integer not null,
- folder_name character varying(50) not null,
- descr character varying(500),
- create_id integer not null,
- create_date timestamp not null,
--- create_date timestamp without time zone not null,
- parent_folder_id integer,
- public_yn character varying(1) default 'n' not null
--- public_yn character varying(1) default 'n'::character varying not null
-);
---
--- name: cr_folder_access; type: table
---
-create table cr_folder_access (
- folder_access_id numeric(11,0) not null,
- folder_id numeric(11,0) not null,
- order_no numeric(11,0) not null,
- role_id numeric(11,0),
- user_id numeric(11,0),
- read_only_yn character varying(1) default 'n' not null
--- read_only_yn character varying(1) default 'n'::character varying not null
-);
---
--- name: cr_hist_user_map; type: table
---
-create table cr_hist_user_map (
- hist_id int(11) not null,
- user_id int(11) not null
-);
---
--- name: cr_lu_file_type; type: table
---
-create table cr_lu_file_type (
- lookup_id numeric(2,0) not null,
- lookup_descr character varying(255) not null,
- active_yn character(1) default 'y',
--- active_yn character(1) default 'y'::bpchar,
- error_code numeric(11,0)
-);
---
--- name: cr_raptor_action_img; type: table
---
-create table cr_raptor_action_img (
- image_id character varying(100) not null,
- image_loc character varying(400)
-);
---
--- name: cr_raptor_pdf_img; type: table
---
-create table cr_raptor_pdf_img (
- image_id character varying(100) not null,
- image_loc character varying(400)
-);
---
--- name: cr_remote_schema_info; type: table
---
-create table cr_remote_schema_info (
- schema_prefix character varying(5) not null,
- schema_desc character varying(75) not null,
- datasource_type character varying(100)
-);
---
--- name: cr_report; type: table
---
-create table cr_report (
- rep_id numeric(11,0) not null,
- title character varying(100) not null,
- descr character varying(255),
- public_yn character varying(1) default 'n' not null,
--- public_yn character varying(1) default 'n'::character varying not null,
- report_xml text,
- create_id numeric(11,0),
- create_date timestamp default now(),
--- create_date timestamp without time zone,
- maint_id numeric(11,0),
- maint_date timestamp default now(),
--- maint_date timestamp without time zone,
- menu_id character varying(500),
- menu_approved_yn character varying(1) default 'n' not null,
--- menu_approved_yn character varying(1) default 'n'::character varying not null,
- owner_id numeric(11,0),
- folder_id integer default 0,
- dashboard_type_yn character varying(1) default 'n',
--- dashboard_type_yn character varying(1) default 'n'::character varying,
- dashboard_yn character varying(1) default 'n'
--- dashboard_yn character varying(1) default 'n'::character varying
-);
---
--- name: cr_report_access; type: table
---
-create table cr_report_access (
- rep_id numeric(11,0) not null,
- order_no numeric(11,0) not null,
- role_id numeric(11,0),
- user_id numeric(11,0),
- read_only_yn character varying(1) default 'n' not null
--- read_only_yn character varying(1) default 'n'::character varying not null
-);
---
--- name: cr_report_dwnld_log; type: table
---
-create table cr_report_dwnld_log (
- user_id numeric(11,0) not null,
- rep_id integer not null,
- file_name character varying(100) not null,
- dwnld_start_time timestamp default now() not null,
--- dwnld_start_time timestamp without time zone not null,
- record_ready_time timestamp default now(),
--- record_ready_time timestamp without time zone,
- filter_params character varying(2000)
-);
---
--- name: cr_report_email_sent_log; type: table
---
-create table cr_report_email_sent_log (
- log_id integer not null,
- schedule_id numeric(11,0),
- gen_key character varying(25) not null,
- rep_id numeric(11,0) not null,
- user_id numeric(11,0),
- sent_date timestamp default now(),
--- sent_date timestamp without time zone default now(),
- access_flag character varying(1) default 'y' not null,
--- access_flag character varying(1) default 'y'::character varying not null,
- touch_date timestamp default now()
--- touch_date timestamp without time zone
-);
---
--- name: cr_report_file_history; type: table
---
-create table cr_report_file_history (
- hist_id int(11) not null,
- sched_user_id numeric(11,0) not null,
- schedule_id numeric(11,0) not null,
- user_id numeric(11,0) not null,
- rep_id numeric(11,0),
- run_date timestamp,
--- run_date timestamp without time zone,
- recurrence character varying(50),
- file_type_id numeric(2,0),
- file_name character varying(80),
- file_blob blob,
- file_size numeric(11,0),
- raptor_url character varying(4000),
- error_yn character(1) default 'n',
--- error_yn character(1) default 'n'::bpchar,
- error_code numeric(11,0),
- deleted_yn character(1) default 'n',
--- deleted_yn character(1) default 'n'::bpchar,
- deleted_by numeric(38,0)
-);
---
--- name: cr_report_log; type: table
---
-create table cr_report_log (
- rep_id numeric(11,0) not null,
- log_time timestamp not null,
--- log_time timestamp without time zone not null,
- user_id numeric(11,0) not null,
- action character varying(2000) not null,
- action_value character varying(50),
- form_fields character varying(4000)
-);
---
--- name: cr_report_schedule; type: table
---
-create table cr_report_schedule (
- schedule_id numeric(11,0) not null,
- sched_user_id numeric(11,0) not null,
- rep_id numeric(11,0) not null,
- enabled_yn character varying(1) not null,
- start_date timestamp default now(),
--- start_date timestamp without time zone,
- end_date timestamp default now(),
--- end_date timestamp without time zone,
- run_date timestamp default now(),
--- run_date timestamp without time zone,
- recurrence character varying(50),
- conditional_yn character varying(1) not null,
- condition_sql character varying(4000),
- notify_type integer default 0,
- max_row integer default 1000,
- initial_formfields character varying(3500),
- processed_formfields character varying(3500),
- formfields character varying(3500),
- condition_large_sql text,
- encrypt_yn character(1) default 'n',
--- encrypt_yn character(1) default 'n'::bpchar,
- attachment_yn character(1) default 'y'
--- attachment_yn character(1) default 'y'::bpchar
-);
---
--- name: cr_report_schedule_users; type: table
---
-create table cr_report_schedule_users (
- schedule_id numeric(11,0) not null,
- rep_id numeric(11,0) not null,
- user_id numeric(11,0) not null,
- role_id numeric(11,0),
- order_no numeric(11,0) not null
-);
---
--- name: cr_report_template_map; type: table
---
-create table cr_report_template_map (
- report_id integer not null,
- template_file character varying(200)
-);
---
--- name: cr_schedule_activity_log; type: table
---
-create table cr_schedule_activity_log (
- schedule_id numeric(11,0) not null,
- url character varying(4000),
- notes character varying(2000),
- run_time timestamp
--- run_time timestamp without time zone
-);
---
--- name: cr_table_join; type: table
---
-create table cr_table_join (
- src_table_name character varying(30) not null,
- dest_table_name character varying(30) not null,
- join_expr character varying(500) not null
-);
---
--- name: cr_table_role; type: table
---
-create table cr_table_role (
- table_name character varying(30) not null,
- role_id numeric(11,0) not null
-);
---
--- name: cr_table_source; type: table
---
-create table cr_table_source (
- table_name character varying(30) not null,
- display_name character varying(30) not null,
- pk_fields character varying(200),
- web_view_action character varying(50),
- large_data_source_yn character varying(1) default 'n' not null,
--- large_data_source_yn character varying(1) default 'n'::character varying not null,
- filter_sql character varying(4000),
- source_db character varying(50)
-);
---
--- name: fn_lu_timezone; type: table
---
-create table fn_lu_timezone (
- timezone_id int(11) not null,
- timezone_name character varying(100) not null,
- timezone_value character varying(100) not null
-);
-
-create table fn_user (
- user_id int(11) not null primary key auto_increment,
- org_id int(11),
- manager_id int(11),
- first_name character varying(25),
- middle_name character varying(25),
- last_name character varying(25),
- phone character varying(25),
- fax character varying(25),
- cellular character varying(25),
- email character varying(50),
- address_id numeric(11,0),
- alert_method_cd character varying(10),
- hrid character varying(20),
- org_user_id CHARACTER VARYING(20),
- org_code character varying(30),
- login_id character varying(25),
- login_pwd character varying(100),
- last_login_date timestamp,
--- last_login_date timestamp without time zone,
- active_yn character varying(1) default 'y' not null,
--- active_yn character varying(1) default 'y'::character varying not null,
- created_id int(11),
- created_date timestamp default now(),
--- created_date timestamp without time zone default now(),
- modified_id int(11),
- modified_date timestamp default now(),
--- modified_date timestamp without time zone default now(),
- is_internal_yn character(1) default 'n' not null,
--- is_internal_yn character(1) default 'n'::bpchar not null,
- address_line_1 character varying(100),
- address_line_2 character varying(100),
- city character varying(50),
- state_cd character varying(3),
- zip_code character varying(11),
- country_cd character varying(3),
- location_clli character varying(8),
- org_manager_userid CHARACTER VARYING(20),
- company character varying(100),
- department_name character varying(100),
- job_title character varying(100),
- timezone int(11),
- department character varying(25),
- business_unit character varying(25),
- business_unit_name character varying(100),
- cost_center character varying(25),
- fin_loc_code character varying(10),
- silo_status character varying(10)
-);
---
--- name: fn_role; type: table
---
-create table fn_role (
- role_id int(11) not null primary key auto_increment,
- role_name character varying(50) not null,
- active_yn character varying(1) default 'y' not null,
--- active_yn character varying(1) default 'y'::character varying not null,
- priority numeric(4,0),
- app_id int(11) default null,
- app_role_id int(11) default null
-
-);
---
--- name: fn_audit_action; type: table
---
-create table fn_audit_action (
- audit_action_id integer not null,
- class_name character varying(500) not null,
- method_name character varying(50) not null,
- audit_action_cd character varying(20) not null,
- audit_action_desc character varying(200),
- active_yn character varying(1)
-);
---
--- name: fn_audit_action_log; type: table
---
-create table fn_audit_action_log (
- audit_log_id integer not null primary key auto_increment,
- audit_action_cd character varying(200),
- action_time timestamp,
--- action_time timestamp without time zone,
- user_id numeric(11,0),
- class_name character varying(100),
- method_name character varying(50),
- success_msg character varying(20),
- error_msg character varying(500)
-);
---
--- name: fn_lu_activity; type: table
---
-create table fn_lu_activity (
- activity_cd character varying(50) not null primary key,
- activity character varying(50) not null
-);
---
--- name: fn_audit_log; type: table
---
-create table fn_audit_log (
- log_id int(11) not null primary key auto_increment,
- user_id int(11) not null,
- activity_cd character varying(50) not null,
- audit_date timestamp default now() not null,
--- audit_date timestamp without time zone default now() not null,
- comments character varying(1000),
- affected_record_id_bk character varying(500),
- affected_record_id character varying(4000),
- constraint fk_fn_audit_ref_209_fn_user foreign key (user_id) references fn_user(user_id)
-);
---
--- name: fn_broadcast_message; type: table
---
-create table fn_broadcast_message (
- message_id int(11) not null primary key auto_increment,
- message_text character varying(1000) not null,
- message_location_id numeric(11,0) not null,
- broadcast_start_date timestamp not null default now(),
--- broadcast_start_date timestamp without time zone not null,
- broadcast_end_date timestamp not null default now(),
--- broadcast_end_date timestamp without time zone not null,
- active_yn character(1) default 'y' not null,
--- active_yn character(1) default 'y'::bpchar not null,
- sort_order numeric(4,0) not null,
- broadcast_site_cd character varying(50)
-);
---
--- name: fn_chat_logs; type: table
---
-create table fn_chat_logs (
- chat_log_id integer not null,
- chat_room_id integer,
- user_id integer,
- message character varying(1000),
- message_date_time timestamp
--- message_date_time timestamp without time zone
-);
---
--- name: fn_chat_room; type: table
---
-create table fn_chat_room (
- chat_room_id integer not null,
- name character varying(50) not null,
- description character varying(500),
- owner_id integer,
- created_date timestamp default now(),
--- created_date timestamp without time zone,
- updated_date timestamp default now()
--- updated_date timestamp without time zone
-);
---
--- name: fn_chat_users; type: table
---
-create table fn_chat_users (
- chat_room_id integer,
- user_id integer,
- last_activity_date_time timestamp,
--- last_activity_date_time timestamp without time zone,
- chat_status character varying(20),
- id integer not null
-);
---
--- name: fn_datasource; type: table
---
-create table fn_datasource (
- id integer not null primary key auto_increment,
- name character varying(50),
- driver_name character varying(256),
- server character varying(256),
- port integer,
- user_name character varying(256),
- password character varying(256),
- url character varying(256),
- min_pool_size integer,
- max_pool_size integer,
- adapter_id integer,
- ds_type character varying(20)
-);
---
--- name: fn_function; type: table
---
-create table fn_function (
- function_cd character varying(30) not null primary key,
- function_name character varying(50) not null
-);
---
--- name: fn_lu_alert_method; type: table
---
-create table fn_lu_alert_method (
- alert_method_cd character varying(10) not null,
- alert_method character varying(50) not null
-);
---
--- name: fn_lu_broadcast_site; type: table
---
-create table fn_lu_broadcast_site (
- broadcast_site_cd character varying(50) not null,
- broadcast_site_descr character varying(100)
-);
---
--- name: fn_lu_menu_set; type: table
---
-create table fn_lu_menu_set (
- menu_set_cd character varying(10) not null primary key,
- menu_set_name character varying(50) not null
-);
---
--- name: fn_lu_priority; type: table
---
-create table fn_lu_priority (
- priority_id numeric(11,0) not null,
- priority character varying(50) not null,
- active_yn character(1) not null,
- sort_order numeric(5,0)
-);
---
--- name: fn_lu_role_type; type: table
---
-create table fn_lu_role_type (
- role_type_id numeric(11,0) not null,
- role_type character varying(50) not null
-);
---
--- name: fn_lu_tab_set; type: table
---
-create table fn_lu_tab_set (
- tab_set_cd character varying(30) not null,
- tab_set_name character varying(50) not null
-);
---
--- name: fn_menu; type: table
---
-create table fn_menu (
- menu_id int(11) not null primary key auto_increment,
- label character varying(100),
- parent_id int(11),
- sort_order numeric(4,0),
- action character varying(200),
- function_cd character varying(30),
- active_yn character varying(1) default 'y' not null,
--- active_yn character varying(1) default 'y'::character varying not null,
- servlet character varying(50),
- query_string character varying(200),
- external_url character varying(200),
- target character varying(25),
- menu_set_cd character varying(10) default 'app',
--- menu_set_cd character varying(10) default 'app'::character varying,
- separator_yn character(1) default 'n',
--- separator_yn character(1) default 'n'::bpchar,
- image_src character varying(100),
- constraint fk_fn_menu_ref_196_fn_menu foreign key (parent_id) references fn_menu(menu_id),
- constraint fk_fn_menu_menu_set_cd foreign key (menu_set_cd) references fn_lu_menu_set(menu_set_cd),
- constraint fk_fn_menu_ref_223_fn_funct foreign key (function_cd) references fn_function(function_cd)
-);
---
--- name: fn_org; type: table
---
-create table fn_org (
- org_id int(11) not null,
- org_name character varying(50) not null,
- access_cd character varying(10)
-);
---
--- name: fn_restricted_url; type: table
---
-create table fn_restricted_url (
- restricted_url character varying(250) not null,
- function_cd character varying(30) not null
-);
---
--- name: fn_role_composite; type: table
---
-create table fn_role_composite (
- parent_role_id int(11) not null,
- child_role_id int(11) not null,
- constraint fk_fn_role_composite_child foreign key (child_role_id) references fn_role(role_id),
- constraint fk_fn_role_composite_parent foreign key (parent_role_id) references fn_role(role_id)
-);
---
--- name: fn_role_function; type: table
---
-create table fn_role_function (
- role_id int(11) not null,
- function_cd character varying(30) not null,
- constraint fk_fn_role__ref_198_fn_role foreign key (role_id) references fn_role(role_id)
-);
---
--- name: fn_tab; type: table
---
-create table fn_tab (
- tab_cd character varying(30) not null,
- tab_name character varying(50) not null,
- tab_descr character varying(100),
- action character varying(100) not null,
- function_cd character varying(30) not null,
- active_yn character(1) not null,
- sort_order numeric(11,0) not null,
- parent_tab_cd character varying(30),
- tab_set_cd character varying(30)
-);
---
--- name: fn_tab_selected; type: table
---
-create table fn_tab_selected (
- selected_tab_cd character varying(30) not null,
- tab_uri character varying(40) not null
-);
---
--- name: fn_user_pseudo_role; type: table
---
-create table fn_user_pseudo_role (
- pseudo_role_id int(11) not null,
- user_id int(11) not null
-);
---
--- name: fn_user_role; type: table
---
-create table fn_user_role (
- user_id int(10) not null,
- role_id int(10) not null,
- priority numeric(4,0),
- app_id int(11) default 2,
- constraint fk_fn_user__ref_172_fn_user foreign key (user_id) references fn_user(user_id),
- constraint fk_fn_user__ref_175_fn_role foreign key (role_id) references fn_role(role_id)
-);
---
--- name: schema_info; type: table
---
-create table schema_info (
- SCHEMA_ID CHARACTER VARYING(25) NOT NULL,
- SCHEMA_DESC CHARACTER VARYING(75) NOT NULL,
- DATASOURCE_TYPE CHARACTER VARYING(100),
- CONNECTION_URL VARCHAR(200) NOT NULL,
- USER_NAME VARCHAR(45) NOT NULL,
- PASSWORD VARCHAR(45) NULL DEFAULT NULL,
- DRIVER_CLASS VARCHAR(100) NOT NULL,
- MIN_POOL_SIZE INT NOT NULL,
- MAX_POOL_SIZE INT NOT NULL,
- IDLE_CONNECTION_TEST_PERIOD INT NOT NULL
-
-);
--- ----------------------------------------------------------
--- name: fn_app; type: table
--- ----------------------------------------------------------
-create table fn_app (
- app_id int(11) primary key not null auto_increment,
- app_name varchar(100) not null default '?',
- app_image_url varchar(256) default null,
- app_description varchar(512) default null,
- app_notes varchar(4096) default null,
- app_url varchar(256) default null,
- app_alternate_url varchar(256) default null,
- app_rest_endpoint varchar(2000) default null,
- ml_app_name varchar(50) not null default '?',
- ml_app_admin_id varchar(7) not null default '?',
- mots_id int(11) default null,
- app_password varchar(256) not null default '?',
- open char(1) default 'n',
- enabled char(1) default 'y',
- thumbnail mediumblob null default null,
- app_username varchar(50),
- ueb_key varchar(256) default null,
- ueb_secret varchar(256) default null,
- ueb_topic_name varchar(256) default null,
- app_type int(11) not null default 1
-);
-
-create table fn_widget (
- widget_id int(11) primary key not null auto_increment,
- wdg_name varchar(100) not null default '?',
- app_id int(11) not null,
- wdg_width int(4) not null default '0',
- wdg_height int(4) not null default '0',
- wdg_url varchar(256) not null default '?',
- key fk_fn_user__ref_201_fn_app_idx (app_id),
- constraint fk_fn_user__ref_202_fn_app foreign key (app_id) references fn_app (app_id)
-);
--- ------------------ functional menu tables -------------------
---
--- table structure for table fn_menu_functional
---
-create table fn_menu_functional (
- menu_id int(11) not null auto_increment,
- column_num int(2) not null,
- text varchar(100) not null,
- parent_menu_id int(11) default null,
- url varchar(128) not null default '',
- active_yn varchar(1) not null default 'y',
- image_src varchar(100) default null,
- primary key (menu_id),
- key fk_fn_menu_func_parent_menu_id_idx (parent_menu_id),
- constraint fk_fn_menu_func_parent_menu_id foreign key (parent_menu_id) references fn_menu_functional (menu_id) on delete no action on update no action
-);
---
--- table structure for table fn_menu_functional_ancestors
---
-
-create table fn_menu_functional_ancestors (
- id int(11) not null auto_increment,
- menu_id int(11) not null,
- ancestor_menu_id int(11) not null,
- depth int(2) not null,
- primary key (id),
- key fk_fn_menu_func_anc_menu_id_idx (menu_id),
- key fk_fn_menu_func_anc_anc_menu_id_idx (ancestor_menu_id),
- constraint fk_fn_menu_func_anc_anc_menu_id foreign key (ancestor_menu_id) references fn_menu_functional (menu_id) on delete no action on update no action,
- constraint fk_fn_menu_func_anc_menu_id foreign key (menu_id) references fn_menu_functional (menu_id) on delete no action on update no action
-);
---
--- table structure for table fn_menu_functional_roles
---
-create table fn_menu_functional_roles (
- id int(11) not null auto_increment,
- menu_id int(11) not null,
- app_id int(11) not null,
- role_id int(10) not null,
- primary key (id),
- key fk_fn_menu_func_roles_menu_id_idx (menu_id),
- key fk_fn_menu_func_roles_app_id_idx (app_id),
- key fk_fn_menu_func_roles_role_id_idx (role_id),
- constraint fk_fn_menu_func_roles_app_id foreign key (app_id) references fn_app (app_id) on delete no action on update no action,
- constraint fk_fn_menu_func_roles_menu_id foreign key (menu_id) references fn_menu_functional (menu_id) on delete no action on update no action,
- constraint fk_fn_menu_func_roles_role_id foreign key (role_id) references fn_role (role_id) on delete no action on update no action
-);
--- ----------------------------------------------------------
--- NAME: FN_WORKFLOW; TYPE: TABLE
--- ----------------------------------------------------------
-create table fn_workflow (
- id mediumint(9) NOT NULL AUTO_INCREMENT,
- name varchar(20) NOT NULL,
- description varchar(500) DEFAULT NULL,
- run_link varchar(300) DEFAULT NULL,
- suspend_link varchar(300) DEFAULT NULL,
- modified_link varchar(300) DEFAULT NULL,
- active_yn varchar(300) DEFAULT NULL,
- created varchar(300) DEFAULT NULL,
- created_by int(11) DEFAULT NULL,
- modified varchar(300) DEFAULT NULL,
- modified_by int(11) DEFAULT NULL,
- workflow_key varchar(50) DEFAULT NULL,
- PRIMARY KEY (id),
- UNIQUE KEY name (name)
-);
-
-
--- ----------------------------------------------------------
--- NAME: FN_SCHEDULE_WORKFLOWS; TYPE: TABLE
--- ----------------------------------------------------------
-create table fn_schedule_workflows (
- id_schedule_workflows bigint(25) PRIMARY KEY NOT NULL AUTO_INCREMENT,
- workflow_server_url varchar(45) DEFAULT NULL,
- workflow_key varchar(45) NOT NULL,
- workflow_arguments varchar(45) DEFAULT NULL,
- startDateTimeCron varchar(45) DEFAULT NULL,
- endDateTime TIMESTAMP DEFAULT NOW(),
- start_date_time TIMESTAMP DEFAULT NOW(),
- recurrence varchar(45) DEFAULT NULL
- );
-
-
--- ----------------------------------------------------------
--- NAME: FN_SHARED_CONTEXT; TYPE: TABLE
--- ----------------------------------------------------------
-create table fn_shared_context (
- id int(11) not null auto_increment,
- create_time timestamp not null,
- context_id character varying(64) not null,
- ckey character varying(128) not null,
- cvalue character varying(1024),
- primary key (id),
- UNIQUE KEY session_key (context_id, ckey) );
-
-
--- ----------------------------------------------------------
--- NAME: FN_QZ_JOB_DETAILS; TYPE: TABLE
--- ----------------------------------------------------------
-create table fn_qz_job_details (
-SCHED_NAME VARCHAR(120) NOT NULL,
-JOB_NAME VARCHAR(200) NOT NULL,
-JOB_GROUP VARCHAR(200) NOT NULL,
-DESCRIPTION VARCHAR(250) NULL,
-JOB_CLASS_NAME VARCHAR(250) NOT NULL,
-IS_DURABLE VARCHAR(1) NOT NULL,
-IS_NONCONCURRENT VARCHAR(1) NOT NULL,
-IS_UPDATE_DATA VARCHAR(1) NOT NULL,
-REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
-JOB_DATA BLOB NULL,
-PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
--- ----------------------------------------------------------
--- NAME: FN_QZ_TRIGGERS; TYPE: TABLE
--- ----------------------------------------------------------
-create table fn_qz_triggers (
-SCHED_NAME VARCHAR(120) NOT NULL,
-TRIGGER_NAME VARCHAR(200) NOT NULL,
-TRIGGER_GROUP VARCHAR(200) NOT NULL,
-JOB_NAME VARCHAR(200) NOT NULL,
-JOB_GROUP VARCHAR(200) NOT NULL,
-DESCRIPTION VARCHAR(250) NULL,
-NEXT_FIRE_TIME BIGINT(13) NULL,
-PREV_FIRE_TIME BIGINT(13) NULL,
-PRIORITY INTEGER NULL,
-TRIGGER_STATE VARCHAR(16) NOT NULL,
-TRIGGER_TYPE VARCHAR(8) NOT NULL,
-START_TIME BIGINT(13) NOT NULL,
-END_TIME BIGINT(13) NULL,
-CALENDAR_NAME VARCHAR(200) NULL,
-MISFIRE_INSTR SMALLINT(2) NULL,
-JOB_DATA BLOB NULL,
-PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
-FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-REFERENCES FN_QZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
--- ----------------------------------------------------------
--- NAME: FN_QZ_SIMPLE_TRIGGERS; TYPE: TABLE
--- ----------------------------------------------------------
-create table fn_qz_simple_triggers (
-SCHED_NAME VARCHAR(120) NOT NULL,
-TRIGGER_NAME VARCHAR(200) NOT NULL,
-TRIGGER_GROUP VARCHAR(200) NOT NULL,
-REPEAT_COUNT BIGINT(7) NOT NULL,
-REPEAT_INTERVAL BIGINT(12) NOT NULL,
-TIMES_TRIGGERED BIGINT(10) NOT NULL,
-PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
-FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-REFERENCES FN_QZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
--- ----------------------------------------------------------
--- NAME: FN_QZ_CRON_TRIGGERS; TYPE: TABLE
--- ----------------------------------------------------------
-create table fn_qz_cron_triggers (
-SCHED_NAME VARCHAR(120) NOT NULL,
-TRIGGER_NAME VARCHAR(200) NOT NULL,
-TRIGGER_GROUP VARCHAR(200) NOT NULL,
-CRON_EXPRESSION VARCHAR(120) NOT NULL,
-TIME_ZONE_ID VARCHAR(80),
-PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
-FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-REFERENCES FN_QZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
--- ----------------------------------------------------------
--- NAME: FN_QZ_SIMPROP_TRIGGERS; TYPE: TABLE
--- ----------------------------------------------------------
-create table fn_qz_simprop_triggers (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES FN_QZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
--- ----------------------------------------------------------
--- NAME: FN_QZ_BLOB_TRIGGERS; TYPE: TABLE
--- ----------------------------------------------------------
-create table fn_qz_blob_triggers (
-SCHED_NAME VARCHAR(120) NOT NULL,
-TRIGGER_NAME VARCHAR(200) NOT NULL,
-TRIGGER_GROUP VARCHAR(200) NOT NULL,
-BLOB_DATA BLOB NULL,
-PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
-INDEX (SCHED_NAME,TRIGGER_NAME, TRIGGER_GROUP),
-FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-REFERENCES FN_QZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
--- ----------------------------------------------------------
--- NAME: FN_QZ_CALENDARS; TYPE: TABLE
--- ----------------------------------------------------------
-create table fn_qz_calendars (
-SCHED_NAME VARCHAR(120) NOT NULL,
-CALENDAR_NAME VARCHAR(200) NOT NULL,
-CALENDAR BLOB NOT NULL,
-PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-
--- ----------------------------------------------------------
--- NAME: FN_QZ_PAUSED_TRIGGER_GRPS; TYPE: TABLE
--- ----------------------------------------------------------
-create table fn_qz_paused_trigger_grps (
-SCHED_NAME VARCHAR(120) NOT NULL,
-TRIGGER_GROUP VARCHAR(200) NOT NULL,
-PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
--- ----------------------------------------------------------
--- NAME: FN_QZ_FIRED_TRIGGERS; TYPE: TABLE
--- ----------------------------------------------------------
-create table fn_qz_fired_triggers (
-SCHED_NAME VARCHAR(120) NOT NULL,
-ENTRY_ID VARCHAR(95) NOT NULL,
-TRIGGER_NAME VARCHAR(200) NOT NULL,
-TRIGGER_GROUP VARCHAR(200) NOT NULL,
-INSTANCE_NAME VARCHAR(200) NOT NULL,
-FIRED_TIME BIGINT(13) NOT NULL,
-SCHED_TIME BIGINT(13) NOT NULL,
-PRIORITY INTEGER NOT NULL,
-STATE VARCHAR(16) NOT NULL,
-JOB_NAME VARCHAR(200) NULL,
-JOB_GROUP VARCHAR(200) NULL,
-IS_NONCONCURRENT VARCHAR(1) NULL,
-REQUESTS_RECOVERY VARCHAR(1) NULL,
-PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
--- ----------------------------------------------------------
--- NAME: FN_QZ_SCHEDULER_STATE; TYPE: TABLE
--- ----------------------------------------------------------
-create table fn_qz_scheduler_state (
-SCHED_NAME VARCHAR(120) NOT NULL,
-INSTANCE_NAME VARCHAR(200) NOT NULL,
-LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
-CHECKIN_INTERVAL BIGINT(13) NOT NULL,
-PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
--- ----------------------------------------------------------
--- NAME: FN_QZ_LOCKS; TYPE: TABLE
--- ----------------------------------------------------------
-create table fn_qz_locks (
-SCHED_NAME VARCHAR(120) NOT NULL,
-LOCK_NAME VARCHAR(40) NOT NULL,
-PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
--- ----------------------------------------------------------
--- NAME: FN_MENU_FAVORITES; TYPE: TABLE
--- ----------------------------------------------------------
-
-create table fn_menu_favorites (
- user_id int(11) NOT NULL,
- menu_id int(11) NOT NULL,
- PRIMARY KEY (user_id,menu_id)
-);
-
---
--- NAME: KPI_API_STATS; TYPE: TABLE
---
-create table kpi_api_stats (
- api_type varchar(64),
- total_api int(11),
- comment varchar(256)
-);
-
---
--- NAME: KPI_SERVICE_SUPPORTED; TYPE: TABLE
---
-create table kpi_service_supported (
- service_type varchar(100),
- total_count int(11)
-);
-
---
--- NAME: KPI_USER_STORY_STATS1; TYPE: TABLE
---
-create table kpi_user_story_stats1 (
- release_key varchar(50),
- delivered int(11),
- in_progress int(11),
- IST_progress_readiness varchar(50),
- E2E_progress_readiness varchar(50),
- Key_Highlights varchar(200)
-);
-
---
--- NAME: KPI_DRVOLUMES; TYPE: TABLE
---
-create table kpi_drvolumes (
- day date,
- feedid int(11),
- filespublished int(11),
- bytespublished bigint(20),
- filesdelivered int(11),
- bytesdelivered bigint(20),
- filesexpired int(11),
- bytesexpired bigint(20),
- PRIMARY KEY (day, feedid)
-);
-
---
--- NAME: KPI_DRSUMM; TYPE: TABLE
---
-create table kpi_drsumm (
- day date PRIMARY KEY,
- totalfeeds int(11),
- activefeeds int(11),
- activesubs int(11)
-);
-
---
--- NAME: DEMO_KPI_SOURCECODE_STATS; TYPE: TABLE
---
-create table demo_kpi_sourcecode_stats (
- day date,
- repo_name varchar(75),
- category varchar(32),
- total_lines int(11),
- inserts int(11),
- deletes int(11),
- since date,
- category1 varchar(50)
-);
-
--- FACELIFT - Table for Events, News and Resources
-
-create table fn_common_widget_data(
- id int auto_increment,
- CATEGORY varchar(100),
- HREF varchar(500),
- TITLE varchar(200),
- content varchar(10000),
- event_date varchar(200),
- SORT_ORDER int,
- PRIMARY KEY (id)
-);
-
-create table fn_app_contact_us (
- app_id int(11) NOT NULL,
- contact_name varchar(128) DEFAULT NULL,
- contact_email varchar(128) DEFAULT NULL,
- url varchar(256) DEFAULT NULL,
- active_yn varchar(2) DEFAULT NULL,
- description varchar(1024) DEFAULT NULL,
- PRIMARY KEY (app_id),
- constraint fk_fn_a_con__ref_202_fn_app foreign key (app_id) references fn_app (app_id)
-);
-
--- new 1610.2
-create table if not exists fn_pers_user_app_sel (
- id int(11) NOT NULL auto_increment,
- user_id int(11) NOT NULL,
- app_id int(11) NOT NULL,
- status_cd char(1) NOT NULL,
- primary key(id),
- unique key uk_1_fn_pers_user_app_sel_user_app (user_id, app_id),
- constraint fk_1_fn_pers_user_app_sel_fn_user foreign key (user_id) references fn_user (user_id),
- constraint fk_2_fn_pers_user_app_sel_fn_app foreign key (app_id) references fn_app (app_id)
-);
-
--- end new 1610.2
-
--- ----------------------------------------------------------
--- NAME: QUARTZ TYPE: INDEXES
--- ----------------------------------------------------------
-create index idx_fn_qz_j_req_recovery on fn_qz_job_details(sched_name,requests_recovery);
-create index idx_fn_qz_j_grp on fn_qz_job_details(sched_name,job_group);
-create index idx_fn_qz_t_j on fn_qz_triggers(sched_name,job_name,job_group);
-create index idx_fn_qz_t_jg on fn_qz_triggers(sched_name,job_group);
-create index idx_fn_qz_t_c on fn_qz_triggers(sched_name,calendar_name);
-create index idx_fn_qz_t_g on fn_qz_triggers(sched_name,trigger_group);
-create index idx_fn_qz_t_state on fn_qz_triggers(sched_name,trigger_state);
-create index idx_fn_qz_t_n_state on fn_qz_triggers(sched_name,trigger_name,trigger_group,trigger_state);
-create index idx_fn_qz_t_n_g_state on fn_qz_triggers(sched_name,trigger_group,trigger_state);
-create index idx_fn_qz_t_next_fire_time on fn_qz_triggers(sched_name,next_fire_time);
-create index idx_fn_qz_t_nft_st on fn_qz_triggers(sched_name,trigger_state,next_fire_time);
-create index idx_fn_qz_t_nft_misfire on fn_qz_triggers(sched_name,misfire_instr,next_fire_time);
-create index idx_fn_qz_t_nft_st_misfire on fn_qz_triggers(sched_name,misfire_instr,next_fire_time,trigger_state);
-create index idx_fn_qz_t_nft_st_misfire_grp on fn_qz_triggers(sched_name,misfire_instr,next_fire_time,trigger_group,trigger_state);
-create index idx_fn_qz_ft_trig_inst_name on fn_qz_fired_triggers(sched_name,instance_name);
-create index idx_fn_qz_ft_inst_job_req_rcvry on fn_qz_fired_triggers(sched_name,instance_name,requests_recovery);
-create index idx_fn_qz_ft_j_g on fn_qz_fired_triggers(sched_name,job_name,job_group);
-create index idx_fn_qz_ft_jg on fn_qz_fired_triggers(sched_name,job_group);
-create index idx_fn_qz_ft_t_g on fn_qz_fired_triggers(sched_name,trigger_name,trigger_group);
-create index idx_fn_qz_ft_tg on fn_qz_fired_triggers(sched_name,trigger_group);
-
-
--- ------------------ create view section
---
--- name: v_url_access; type: view
---
-create view v_url_access as
- select distinct m.action as url,
- m.function_cd
- from fn_menu m
- where (m.action is not null)
-union
- select distinct t.action as url,
- t.function_cd
- from fn_tab t
- where (t.action is not null)
-union
- select r.restricted_url as url,
- r.function_cd
- from fn_restricted_url r;
--- ------------------ alter table add constraint primary key section
---
--- name: cr_favorite_reports_user_idrep_id; type: constraint
---
-alter table cr_favorite_reports
- add constraint cr_favorite_reports_user_idrep_id primary key (user_id, rep_id);
---
--- name: cr_folder_folder_id; type: constraint
---
-alter table cr_folder
- add constraint cr_folder_folder_id primary key (folder_id);
---
--- name: cr_folder_access_folder_access_id; type: constraint
---
-alter table cr_folder_access
- add constraint cr_folder_access_folder_access_id primary key (folder_access_id);
---
--- name: cr_hist_user_map_hist_iduser_id; type: constraint
---
-alter table cr_hist_user_map
- add constraint cr_hist_user_map_hist_iduser_id primary key (hist_id, user_id);
---
--- name: cr_lu_file_type_lookup_id; type: constraint
---
-alter table cr_lu_file_type
- add constraint cr_lu_file_type_lookup_id primary key (lookup_id);
---
--- name: cr_raptor_action_img_image_id; type: constraint
---
-alter table cr_raptor_action_img
- add constraint cr_raptor_action_img_image_id primary key (image_id);
---
--- name: cr_raptor_pdf_img_image_id; type: constraint
---
-alter table cr_raptor_pdf_img
- add constraint cr_raptor_pdf_img_image_id primary key (image_id);
---
--- name: cr_remote_schema_info_schema_prefix; type: constraint
---
-alter table cr_remote_schema_info
- add constraint cr_remote_schema_info_schema_prefix primary key (schema_prefix);
---
--- name: cr_report_rep_id; type: constraint
---
-alter table cr_report
- add constraint cr_report_rep_id primary key (rep_id);
---
--- name: cr_report_access_rep_idorder_no; type: constraint
---
-alter table cr_report_access
- add constraint cr_report_access_rep_idorder_no primary key (rep_id, order_no);
---
--- name: cr_report_email_sent_log_log_id; type: constraint
---
-alter table cr_report_email_sent_log
- add constraint cr_report_email_sent_log_log_id primary key (log_id);
---
--- name: cr_report_file_history_hist_id; type: constraint
---
-alter table cr_report_file_history
- add constraint cr_report_file_history_hist_id primary key (hist_id);
---
--- name: cr_report_schedule_schedule_id; type: constraint
---
-alter table cr_report_schedule
- add constraint cr_report_schedule_schedule_id primary key (schedule_id);
---
--- name: cr_report_schedule_users_schedule_idrep_iduser_idorder_no; type: constraint
---
-alter table cr_report_schedule_users
- add constraint cr_report_schedule_users_schedule_idrep_iduser_idorder_no primary key (schedule_id, rep_id, user_id, order_no);
---
--- name: cr_report_template_map_report_id; type: constraint
---
-alter table cr_report_template_map
- add constraint cr_report_template_map_report_id primary key (report_id);
---
--- name: cr_table_role_table_namerole_id; type: constraint
---
-alter table cr_table_role
- add constraint cr_table_role_table_namerole_id primary key (table_name, role_id);
---
--- name: cr_table_source_table_name; type: constraint
---
-alter table cr_table_source
- add constraint cr_table_source_table_name primary key (table_name);
---
--- name: fn_audit_action_audit_action_id; type: constraint
---
-alter table fn_audit_action
- add constraint fn_audit_action_audit_action_id primary key (audit_action_id);
---
---
--- name: fk_fn_audit_ref_205_fn_lu_ac; type: constraint
---
-alter table fn_audit_log
- add constraint fk_fn_audit_ref_205_fn_lu_ac foreign key (activity_cd) references fn_lu_activity(activity_cd);
---
--- name: fk_fn_role__ref_201_fn_funct; type: constraint
---
-alter table fn_role_function
- add constraint fk_fn_role__ref_201_fn_funct foreign key (function_cd) references fn_function(function_cd);
---
--- name: fn_chat_logs_chat_log_id; type: constraint
---
-alter table fn_chat_logs
- add constraint fn_chat_logs_chat_log_id primary key (chat_log_id);
---
--- name: fn_chat_room_chat_room_id; type: constraint
---
-alter table fn_chat_room
- add constraint fn_chat_room_chat_room_id primary key (chat_room_id);
---
--- name: fn_chat_users_id; type: constraint
---
-alter table fn_chat_users
- add constraint fn_chat_users_id primary key (id);
---
--- name: fn_lu_alert_method_alert_method_cd; type: constraint
---
-alter table fn_lu_alert_method
- add constraint fn_lu_alert_method_alert_method_cd primary key (alert_method_cd);
---
--- name: fn_lu_broadcast_site_broadcast_site_cd; type: constraint
---
-alter table fn_lu_broadcast_site
- add constraint fn_lu_broadcast_site_broadcast_site_cd primary key (broadcast_site_cd);
---
--- name: fn_lu_priority_priority_id; type: constraint
---
-alter table fn_lu_priority
- add constraint fn_lu_priority_priority_id primary key (priority_id);
---
--- name: fn_lu_role_type_role_type_id; type: constraint
---
-alter table fn_lu_role_type
- add constraint fn_lu_role_type_role_type_id primary key (role_type_id);
---
--- name: fn_lu_tab_set_tab_set_cd; type: constraint
---
-alter table fn_lu_tab_set
- add constraint fn_lu_tab_set_tab_set_cd primary key (tab_set_cd);
---
--- name: fn_lu_timezone_timezone_id; type: constraint
---
-alter table fn_lu_timezone
- add constraint fn_lu_timezone_timezone_id primary key (timezone_id);
---
--- name: fn_org_org_id; type: constraint
---
-alter table fn_org
- add constraint fn_org_org_id primary key (org_id);
---
--- name: fn_restricted_url_restricted_urlfunction_cd; type: constraint
---
-alter table fn_restricted_url
- add constraint fn_restricted_url_restricted_urlfunction_cd primary key (restricted_url, function_cd);
---
--- name: fn_role_composite_parent_role_idchild_role_id; type: constraint
---
-alter table fn_role_composite
- add constraint fn_role_composite_parent_role_idchild_role_id primary key (parent_role_id, child_role_id);
---
--- name: fn_role_function_role_idfunction_cd; type: constraint
---
-alter table fn_role_function
- add constraint fn_role_function_role_idfunction_cd primary key (role_id, function_cd);
---
--- name: fn_tab_tab_cd; type: constraint
---
-alter table fn_tab
- add constraint fn_tab_tab_cd primary key (tab_cd);
---
--- name: fn_tab_selected_selected_tab_cdtab_uri; type: constraint
---
-alter table fn_tab_selected
- add constraint fn_tab_selected_selected_tab_cdtab_uri primary key (selected_tab_cd, tab_uri);
---
--- name: fn_user_pseudo_role_pseudo_role_iduser_id; type: constraint
---
-alter table fn_user_pseudo_role
- add constraint fn_user_pseudo_role_pseudo_role_iduser_id primary key (pseudo_role_id, user_id);
---
--- name: fn_user_role_user_idrole_id; type: constraint
---
-alter table fn_user_role
- add constraint fn_user_role_user_idrole_id primary key (user_id, role_id, app_id);
--- ------------------ create index section
---
--- name: cr_report_create_idpublic_yntitle; type: index
---
-create index cr_report_create_idpublic_yntitle using btree on cr_report (create_id, public_yn, title);
---
--- name: cr_table_join_dest_table_name; type: index
---
-create index cr_table_join_dest_table_name using btree on cr_table_join (dest_table_name);
---
--- name: cr_table_join_src_table_name; type: index
---
-create index cr_table_join_src_table_name using btree on cr_table_join (src_table_name);
---
--- name: fn_audit_log_activity_cd; type: index
---
-create index fn_audit_log_activity_cd using btree on fn_audit_log (activity_cd);
---
--- name: fn_audit_log_user_id; type: index
---
-create index fn_audit_log_user_id using btree on fn_audit_log (user_id);
---
--- name: fn_menu_function_cd; type: index
---
-create index fn_menu_function_cd using btree on fn_menu (function_cd);
---
--- name: fn_org_access_cd; type: index
---
-create index fn_org_access_cd using btree on fn_org (access_cd);
---
--- name: fn_role_function_function_cd; type: index
---
-create index fn_role_function_function_cd using btree on fn_role_function (function_cd);
---
--- name: fn_role_function_role_id; type: index
---
-create index fn_role_function_role_id using btree on fn_role_function (role_id);
---
--- name: fn_user_address_id; type: index
---
-create index fn_user_address_id using btree on fn_user (address_id);
---
--- name: fn_user_alert_method_cd; type: index
---
-create index fn_user_alert_method_cd using btree on fn_user (alert_method_cd);
---
--- name: fn_user_hrid; type: index
---
-create unique index fn_user_hrid using btree on fn_user (hrid);
---
--- name: fn_user_login_id; type: index
---
-create unique index fn_user_login_id using btree on fn_user (login_id);
---
--- name: fn_user_org_id; type: index
---
-create index fn_user_org_id using btree on fn_user (org_id);
---
--- name: fn_user_role_role_id; type: index
---
-create index fn_user_role_role_id using btree on fn_user_role (role_id);
---
--- name: fn_user_role_user_id; type: index
---
-create index fn_user_role_user_id using btree on fn_user_role (user_id);
---
--- name: fk_fn_user__ref_178_fn_app_idx; type: index
---
-create index fk_fn_user__ref_178_fn_app_idx on fn_user_role (app_id);
--- ------------------ alter table add constraint foreign key section
---
--- name: fk_fn_user__ref_178_fn_app; type: fk constraint
---
-alter table fn_user_role
- add constraint fk_fn_user__ref_178_fn_app foreign key (app_id) references fn_app(app_id);
---
--- name: fk_cr_repor_ref_14707_cr_repor; type: fk constraint
---
-alter table cr_report_schedule
- add constraint fk_cr_repor_ref_14707_cr_repor foreign key (rep_id) references cr_report(rep_id);
---
--- name: fk_cr_repor_ref_14716_cr_repor; type: fk constraint
---
-alter table cr_report_schedule_users
- add constraint fk_cr_repor_ref_14716_cr_repor foreign key (schedule_id) references cr_report_schedule(schedule_id);
---
--- name: fk_cr_repor_ref_17645_cr_repor; type: fk constraint
---
-alter table cr_report_log
- add constraint fk_cr_repor_ref_17645_cr_repor foreign key (rep_id) references cr_report(rep_id);
---
--- name: fk_cr_repor_ref_8550_cr_repor; type: fk constraint
---
-alter table cr_report_access
- add constraint fk_cr_repor_ref_8550_cr_repor foreign key (rep_id) references cr_report(rep_id);
---
--- name: fk_cr_report_rep_id; type: fk constraint
---
-alter table cr_report_email_sent_log
- add constraint fk_cr_report_rep_id foreign key (rep_id) references cr_report(rep_id);
---
--- name: fk_cr_table_ref_311_cr_tab; type: fk constraint
---
-alter table cr_table_join
- add constraint fk_cr_table_ref_311_cr_tab foreign key (src_table_name) references cr_table_source(table_name);
---
--- name: fk_cr_table_ref_315_cr_tab; type: fk constraint
---
-alter table cr_table_join
- add constraint fk_cr_table_ref_315_cr_tab foreign key (dest_table_name) references cr_table_source(table_name);
---
--- name: fk_cr_table_ref_32384_cr_table; type: fk constraint
---
-alter table cr_table_role
- add constraint fk_cr_table_ref_32384_cr_table foreign key (table_name) references cr_table_source(table_name);
---
--- name: fk_fn_tab_function_cd; type: fk constraint
---
-alter table fn_tab
- add constraint fk_fn_tab_function_cd foreign key (function_cd) references fn_function(function_cd);
---
--- name: fk_fn_tab_selected_tab_cd; type: fk constraint
---
-alter table fn_tab_selected
- add constraint fk_fn_tab_selected_tab_cd foreign key (selected_tab_cd) references fn_tab(tab_cd);
---
--- name: fk_fn_tab_set_cd; type: fk constraint
---
-alter table fn_tab
- add constraint fk_fn_tab_set_cd foreign key (tab_set_cd) references fn_lu_tab_set(tab_set_cd);
---
--- name: fk_fn_user_ref_110_fn_org; type: fk constraint
---
-alter table fn_user
- add constraint fk_fn_user_ref_110_fn_org foreign key (org_id) references fn_org(org_id);
---
--- name: fk_fn_user_ref_123_fn_lu_al; type: fk constraint
---
-alter table fn_user
- add constraint fk_fn_user_ref_123_fn_lu_al foreign key (alert_method_cd) references fn_lu_alert_method(alert_method_cd);
---
--- name: fk_fn_user_ref_197_fn_user; type: fk constraint
---
- alter table fn_user
- add constraint fk_fn_user_ref_197_fn_user foreign key (manager_id) references fn_user(user_id);
---
--- name: fk_fn_user_ref_198_fn_user; type: fk constraint
---
-alter table fn_user
- add constraint fk_fn_user_ref_198_fn_user foreign key (created_id) references fn_user(user_id);
---
--- name: fk_fn_user_ref_199_fn_user; type: fk constraint
---
-alter table fn_user
- add constraint fk_fn_user_ref_199_fn_user foreign key (modified_id) references fn_user(user_id);
---
--- name: fk_parent_key_cr_folder; type: fk constraint
---
-alter table cr_folder
- add constraint fk_parent_key_cr_folder foreign key (parent_folder_id) references cr_folder(folder_id);
---
--- name: fk_pseudo_role_pseudo_role_id; type: fk constraint
---
-alter table fn_user_pseudo_role
- add constraint fk_pseudo_role_pseudo_role_id foreign key (pseudo_role_id) references fn_role(role_id);
---
--- name: fk_pseudo_role_user_id; type: fk constraint
---
-alter table fn_user_pseudo_role
- add constraint fk_pseudo_role_user_id foreign key (user_id) references fn_user(user_id);
---
--- name: fk_restricted_url_function_cd; type: fk constraint
---
-alter table fn_restricted_url
- add constraint fk_restricted_url_function_cd foreign key (function_cd) references fn_function(function_cd);
---
--- name: fk_timezone; type: fk constraint
---
-alter table fn_user
- add constraint fk_timezone foreign key (timezone) references fn_lu_timezone(timezone_id);
---
--- name: sys_c0014614; type: fk constraint
---
-alter table cr_report_file_history
- add constraint sys_c0014614 foreign key (file_type_id) references cr_lu_file_type(lookup_id);
---
--- name: sys_c0014615; type: fk constraint
---
-alter table cr_report_file_history
- add constraint sys_c0014615 foreign key (rep_id) references cr_report(rep_id);
---
--- name: sys_c0014616; type: fk constraint
---
-alter table cr_hist_user_map
- add constraint sys_c0014616 foreign key (hist_id) references cr_report_file_history(hist_id);
---
--- name: sys_c0014617; type: fk constraint
---
-alter table cr_hist_user_map
- add constraint sys_c0014617 foreign key (user_id) references fn_user(user_id);
---
--- name: sys_c0014618; type: fk constraint
---
-alter table fn_menu_favorites
-add constraint sys_c0014618 foreign key (user_id) references fn_user(user_id);
-
---
--- name: sys_c0014619; type: fk constraint
---
-alter table fn_menu_favorites
-add constraint sys_c0014619 foreign key (menu_id) references fn_menu_functional(menu_id);
-
-commit; \ No newline at end of file
diff --git a/ecomp-portal-BE/ecomp-portal-resources/sql scripts/EcompPortalDMLMySql_1610_Complete_OS.sql b/ecomp-portal-BE/ecomp-portal-resources/sql scripts/EcompPortalDMLMySql_1610_Complete_OS.sql
deleted file mode 100644
index 8e1a4dfb..00000000
--- a/ecomp-portal-BE/ecomp-portal-resources/sql scripts/EcompPortalDMLMySql_1610_Complete_OS.sql
+++ /dev/null
@@ -1,225 +0,0 @@
--- ---------------------------------------------------------------------------------------------------------------
--- This is the default data for the 1610 Open Source Version of Ecomp Portal database called portal
-
-USE portal;
-
-set foreign_key_checks=1;
-
-
--- FN_FUNCTION
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_process','Process List');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('1','test role function');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_job','Job Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_job_create','Job Create');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_job_designer','Process in Designer view');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_task','Task Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_task_search','Task Search');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_map','Map Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_sample','Sample Pages Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_test','Test Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('login','Login');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_home','Home Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_customer','Customer Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_reports','Reports Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_profile','Profile Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_admin','Admin Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_feedback','Feedback Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_help','Help Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_logout','Logout Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_doclib','Document Library Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('doclib','Document Library');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('doclib_admin','Document Library Admin');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_notes','Notes Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_ajax','Ajax Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_customer_create','Customer Create');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_profile_create','Profile Create');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_profile_import','Profile Import');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_tab','Sample Tab Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_concept','CoNCEPT');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_itracker','iTracker Menu');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('view_reports','View Raptor reports');
-Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_itracker_admin','Itracker Admin/Support menu');
-
--- FN_LU_ACTIVITY
-Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('add_role','add_role');
-Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('remove_role','remove_role');
-Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('add_user_role','add_user_role');
-Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('remove_user_role','remove_user_role');
-Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('add_role_function','add_role_function');
-Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('remove_role_function','remove_role_function');
-Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('add_child_role','add_child_role');
-Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('remove_child_role','remove_child_role');
-Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('mobile_login','Mobile Login');
-Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('mobile_logout','Mobile Logout');
-Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('login','Login');
-Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('logout','Logout');
-
--- new 1610.2
-insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values('guest_login','Guest Login');
--- end new 1610.2
-
--- -- FN_LU_ALERT_METHOD
-Insert into fn_lu_alert_method (ALERT_METHOD_CD,ALERT_METHOD) values ('PHONE','Phone');
-Insert into fn_lu_alert_method (ALERT_METHOD_CD,ALERT_METHOD) values ('FAX','Fax');
-Insert into fn_lu_alert_method (ALERT_METHOD_CD,ALERT_METHOD) values ('PAGER','Pager');
-Insert into fn_lu_alert_method (ALERT_METHOD_CD,ALERT_METHOD) values ('EMAIL','Email');
-Insert into fn_lu_alert_method (ALERT_METHOD_CD,ALERT_METHOD) values ('SMS','SMS');
-
--- FN_LU_MENU_SET
-Insert into fn_lu_menu_set (MENU_SET_CD,MENU_SET_NAME) values ('APP','Application Menu');
-
--- FN_LU_PRIORITY
-Insert into fn_lu_priority (PRIORITY_ID,PRIORITY,ACTIVE_YN,SORT_ORDER) values (10,'Low','Y',10);
-Insert into fn_lu_priority (PRIORITY_ID,PRIORITY,ACTIVE_YN,SORT_ORDER) values (20,'Normal','Y',20);
-Insert into fn_lu_priority (PRIORITY_ID,PRIORITY,ACTIVE_YN,SORT_ORDER) values (30,'High','Y',30);
-Insert into fn_lu_priority (PRIORITY_ID,PRIORITY,ACTIVE_YN,SORT_ORDER) values (40,'Urgent','Y',40);
-Insert into fn_lu_priority (PRIORITY_ID,PRIORITY,ACTIVE_YN,SORT_ORDER) values (50,'Fatal','Y',50);
-
--- FN_LU_TAB_SET
-Insert into fn_lu_tab_set (TAB_SET_CD,TAB_SET_NAME) values ('APP','Application Tabs');
-
--- FN_LU_TIMEZONE
-Insert into fn_lu_timezone (TIMEZONE_ID,TIMEZONE_NAME,TIMEZONE_VALUE) values (10,'US/Eastern','US/Eastern');
-Insert into fn_lu_timezone (TIMEZONE_ID,TIMEZONE_NAME,TIMEZONE_VALUE) values (20,'US/Central','US/Central');
-Insert into fn_lu_timezone (TIMEZONE_ID,TIMEZONE_NAME,TIMEZONE_VALUE) values (30,'US/Mountain','US/Mountain');
-Insert into fn_lu_timezone (TIMEZONE_ID,TIMEZONE_NAME,TIMEZONE_VALUE) values (40,'US/Arizona','America/Phoenix');
-Insert into fn_lu_timezone (TIMEZONE_ID,TIMEZONE_NAME,TIMEZONE_VALUE) values (50,'US/Pacific','US/Pacific');
-Insert into fn_lu_timezone (TIMEZONE_ID,TIMEZONE_NAME,TIMEZONE_VALUE) values (60,'US/Alaska','US/Alaska');
-Insert into fn_lu_timezone (TIMEZONE_ID,TIMEZONE_NAME,TIMEZONE_VALUE) values (70,'US/Hawaii','US/Hawaii');
-
--- FN_RESTRICTED_URL
-Insert into fn_restricted_url (restricted_url, function_cd) values ('attachment.htm','menu_admin');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('broadcast.htm','menu_admin');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('file_upload.htm','menu_admin');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('job.htm','menu_admin');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('role.htm','menu_admin');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('role_function.htm','menu_admin');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('test.htm','menu_admin');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('async_test.htm','menu_home');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('chatWindow.htm','menu_home');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('contact_list.htm','menu_home');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('customer_dynamic_list.htm','menu_home');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('event.htm','menu_home');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('event_list.htm','menu_home');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('mobile_welcome.htm','menu_home');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('sample_map.htm','menu_home');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('template.jsp','menu_home');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('zkau','menu_home');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('itracker_assign.htm','menu_itracker');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('itracker_byassignee.htm','menu_itracker');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('itracker_create.htm','menu_itracker');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('itracker_update.htm','menu_itracker');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('manage_license.htm','menu_itracker');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('support_ticket.htm','menu_itracker');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('jbpm_designer.htm','menu_job_create');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('jbpm_drools.htm','menu_job_create');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('process_job.htm','menu_job_create');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('profile.htm','menu_profile_create');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('raptor.htm','menu_reports');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('raptor2.htm','menu_reports');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('raptor_blob_extract.htm','menu_reports');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('raptor_email_attachment.htm','menu_reports');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('raptor_search.htm','menu_reports');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('report_list.htm','menu_reports');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('gauge.htm','menu_tab');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('gmap_controller.htm','menu_tab');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('gmap_frame.htm','menu_tab');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('map.htm','menu_tab');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('map_download.htm','menu_tab');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('map_grid_search.htm','menu_tab');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('sample_animated_map.htm','menu_tab');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('sample_map_2.htm','menu_tab');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('sample_map_3.htm','menu_tab');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('tab2_sub1.htm','menu_tab');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('tab2_sub2_link1.htm','menu_tab');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('tab2_sub2_link2.htm','menu_tab');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('tab2_sub3.htm','menu_tab');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('tab3.htm','menu_tab');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('tab4.htm','menu_tab');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('raptor.htm','view_reports');
-Insert into fn_restricted_url (restricted_url, function_cd) values ('raptor_blob_extract.htm','view_reports');
-
--- FN_ROLE
-Insert into fn_role (ROLE_ID, ROLE_NAME, ACTIVE_YN, PRIORITY, APP_ID, APP_ROLE_ID) values (1,'System Administrator','Y',1,NULL,NULL);
-Insert into fn_role (ROLE_ID, ROLE_NAME, ACTIVE_YN, PRIORITY, APP_ID, APP_ROLE_ID) values (16,'Standard User','Y',5,NULL,NULL);
-Insert into fn_role (ROLE_ID, ROLE_NAME, ACTIVE_YN, PRIORITY, APP_ID, APP_ROLE_ID) values (999,'Account Administrator','Y',1,NULL,NULL);
-Insert into fn_role (ROLE_ID, ROLE_NAME, ACTIVE_YN, PRIORITY, APP_ID, APP_ROLE_ID) values (900,'Restricted App Role','Y','1',NULL,NULL);
-
--- FN_ROLE_Composite
-Insert into fn_role_composite (PARENT_ROLE_ID,CHILD_ROLE_ID) values (1,16);
-
--- FN_ROLE_FUNCTION
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'doclib');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'doclib_admin');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'login');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_admin');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_ajax');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_customer');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_customer_create');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_feedback');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_help');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_home');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_itracker');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_itracker_admin');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_job');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_job_create');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_logout');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_notes');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_process');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_profile');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_profile_create');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_profile_import');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_reports');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_sample');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_tab');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_test');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'login');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_ajax');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_customer');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_customer_create');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_home');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_itracker');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_logout');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_map');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_profile');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_reports');
-Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_tab');
-
--- FN_TAB
-Insert into fn_tab (TAB_CD,TAB_NAME,TAB_DESCR,ACTION,FUNCTION_CD,ACTIVE_YN,SORT_ORDER,PARENT_TAB_CD,TAB_SET_CD) values ('TAB2_SUB1_S1','Left Tab 1','Sub - Sub Tab 1 Information','tab2_sub1.htm','menu_tab','Y',10,'TAB2_SUB1','APP');
-Insert into fn_tab (TAB_CD,TAB_NAME,TAB_DESCR,ACTION,FUNCTION_CD,ACTIVE_YN,SORT_ORDER,PARENT_TAB_CD,TAB_SET_CD) values ('TAB1','Tab 1','Tab 1 Information','tab1.htm','menu_tab','Y',10,null,'APP');
-Insert into fn_tab (TAB_CD,TAB_NAME,TAB_DESCR,ACTION,FUNCTION_CD,ACTIVE_YN,SORT_ORDER,PARENT_TAB_CD,TAB_SET_CD) values ('TAB2','Tab 2','Tab 2 Information','tab2_sub1.htm','menu_tab','Y',20,null,'APP');
-Insert into fn_tab (TAB_CD,TAB_NAME,TAB_DESCR,ACTION,FUNCTION_CD,ACTIVE_YN,SORT_ORDER,PARENT_TAB_CD,TAB_SET_CD) values ('TAB3','Tab 3','Tab 3 Information','tab3.htm','menu_tab','Y',30,null,'APP');
-Insert into fn_tab (TAB_CD,TAB_NAME,TAB_DESCR,ACTION,FUNCTION_CD,ACTIVE_YN,SORT_ORDER,PARENT_TAB_CD,TAB_SET_CD) values ('TAB4','Tab 4','Tab 4 Information','tab4.htm','menu_tab','Y',40,null,'APP');
-Insert into fn_tab (TAB_CD,TAB_NAME,TAB_DESCR,ACTION,FUNCTION_CD,ACTIVE_YN,SORT_ORDER,PARENT_TAB_CD,TAB_SET_CD) values ('TAB2_SUB1','Sub Tab 1','Sub Tab 1 Information','tab2_sub1.htm','menu_tab','Y',10,'TAB2','APP');
-Insert into fn_tab (TAB_CD,TAB_NAME,TAB_DESCR,ACTION,FUNCTION_CD,ACTIVE_YN,SORT_ORDER,PARENT_TAB_CD,TAB_SET_CD) values ('TAB2_SUB2','Sub Tab 2','Sub Tab 2 Information','tab2_sub2.htm','menu_tab','Y',20,'TAB2','APP');
-Insert into fn_tab (TAB_CD,TAB_NAME,TAB_DESCR,ACTION,FUNCTION_CD,ACTIVE_YN,SORT_ORDER,PARENT_TAB_CD,TAB_SET_CD) values ('TAB2_SUB3','Sub Tab 3','Sub Tab 3 Information','tab2_sub3.htm','menu_tab','Y',30,'TAB2','APP');
-
--- FN_TAB_SELECTED
-Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB1','tab1');
-Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB2','tab2_sub1');
-Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB2','tab2_sub2');
-Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB2','tab2_sub3');
-Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB2_SUB1','tab2_sub1');
-Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB2_SUB1_S1','tab2_sub1');
-Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB2_SUB2','tab2_sub2');
-Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB2_SUB3','tab2_sub3');
-Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB3','tab3');
-Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB4','tab4');
-
--- fn_user
-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 (1,NULL,NULL,'Demo',NULL,'User',NULL,NULL,NULL,'demo@openecomp.org',NULL,NULL,NULL,'demo',NULL,'demo','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);
-
--- cr_raptor_action_img
-Insert into cr_raptor_action_img (IMAGE_ID, IMAGE_LOC) values ('DELETE', '/static/fusion/raptor/img/deleteicon.gif');
-Insert into cr_raptor_action_img (IMAGE_ID, IMAGE_LOC) values ('CALENDAR', '/static/fusion/raptor/img/Calendar-16x16.png');
-
--- fn_app
-
-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 (1,'Default','assets/images/tmp/portal1.png','Some Default Description','Some Default Note','http://localhost','http://localhost','http://localhost:8080/ecompportal','EcompPortal','',NULL,'','N','N',NULL,NULL,NULL,NULL,NULL,1);
-
--- fn_user_role
-Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (1,1,NULL,1);
-Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (1,999,NULL,1);
-
-commit; \ No newline at end of file
diff --git a/ecomp-portal-BE/pom.xml b/ecomp-portal-BE/pom.xml
deleted file mode 100644
index 41df842b..00000000
--- a/ecomp-portal-BE/pom.xml
+++ /dev/null
@@ -1,631 +0,0 @@
-<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</artifactId>
- <packaging>war</packaging>
- <version>1.1.0-SNAPSHOT</version>
-
- <properties>
- <springframework.version>4.2.0.RELEASE</springframework.version>
- <hibernate.version>4.3.11.Final</hibernate.version>
- <eelf.version>0.0.1</eelf.version>
- <projectversion>1.1.0-SNAPSHOT</projectversion>
- <encoding>UTF-8</encoding>
- <!-- Tests usually require some setup that maven cannot do, so skip. -->
- <skiptests>false</skiptests>
- <sonar.exclusions>**.js</sonar.exclusions>
- <nexusproxy>https://nexus.onap.org</nexusproxy>
- <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
- <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
- <stagingNexusPath>/content/repositories/staging/</stagingNexusPath>
- <sitePath>/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}</sitePath>
- </properties>
-
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.10.4</version>
- <configuration>
- <failOnError>false</failOnError>
- <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
- <docletArtifact>
- <groupId>org.umlgraph</groupId>
- <artifactId>umlgraph</artifactId>
- <version>5.6</version>
- </docletArtifact>
- <additionalparam>-views</additionalparam>
- <useStandardDocletOptions>true</useStandardDocletOptions>
- </configuration>
- </plugin>
- </plugins>
- </reporting>
- <distributionManagement>
- <site>
- <id>ecomp-site</id>
- <url>dav:${nexusproxy}${sitePath}</url>
- </site>
- </distributionManagement>
- <repositories>
- <repository>
- <!-- Releases repository has ECOMP release artifacts -->
- <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>
- </repository>
- <repository>
- <!-- Snapshots repository has ECOMP snapshot artifacts -->
- <id>oss-snapshots</id>
- <name>oss Central - Snapshots</name>
- <url>https://oss.sonatype.org/service/local/repositories/releases/content/</url>
- </repository>
- <repository>
- <id>central</id>
- <name>Maven 2 repository 2</name>
- <url>http://repo2.maven.org/maven2/</url>
- </repository>
- </repositories>
-
- <build>
- <sourceDirectory>src/main/java</sourceDirectory>
- <finalName>ecompportal</finalName>
-
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-deploy-plugin</artifactId>
- <version>2.8</version>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>sonar-maven-plugin</artifactId>
- <version>3.2</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-site-plugin</artifactId>
- <version>3.6</version>
- <dependencies>
- <dependency>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-webdav-jackrabbit</artifactId>
- <version>2.10</version>
- </dependency>
- </dependencies>
- </plugin>
- <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>
- <warSourceDirectory>war</warSourceDirectory>
- <failOnMissingWebXml>false</failOnMissingWebXml>
- <archive>
- <manifest>
- <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
- </manifest>
- <manifestEntries>
- <Build-Number>${build.number}</Build-Number>
- <Build-Time>${maven.build.timestamp}</Build-Time>
- </manifestEntries>
- </archive>
- </configuration>
- </plugin>
-
-
- <plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <version>3.0.1</version>
- <!--
- Your own property files can be placed in ecomp-portal-be/../../overrides directory and they
- will override the generic source controlled versions at build time allowing
- you to test locally with your own settings.
- -->
- <executions>
- <execution>
- <id>copy-custom-properties1</id>
- <phase>process-resources</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <overwrite>true</overwrite>
- <outputDirectory>${basedir}/war/WEB-INF/conf</outputDirectory>
- <resources>
- <resource>
- <directory>${basedir}/../../overrides</directory>
- <includes>
- <include>system.properties</include>
- </includes>
- </resource>
- </resources>
- </configuration>
- </execution>
- <execution>
- <id>copy-custom-properties2</id>
- <phase>process-resources</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <overwrite>true</overwrite>
- <outputDirectory>${basedir}/war/WEB-INF/fusion/conf</outputDirectory>
- <resources>
- <resource>
- <directory>${basedir}/../../overrides</directory>
- <includes>
- <include>fusion.properties</include>
- </includes>
- </resource>
- </resources>
- </configuration>
- </execution>
- <execution>
- <id>copy-custom-properties3</id>
- <phase>process-resources</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <overwrite>true</overwrite>
- <outputDirectory>${basedir}/src/main/resources</outputDirectory>
- <resources>
- <resource>
- <directory>${basedir}/../../overrides</directory>
- <includes>
- <include>portal.properties</include>
- <include>openid-connect.properties</include>
- <include>openid-keystore.jwks</include>
- </includes>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
-
- <testResources>
- <testResource>
- <directory>src/test/java</directory>
- <includes>
- <include>**/*Test*.*</include>
- </includes>
- </testResource>
- </testResources>
-
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <includes>
- <include>**/*.xml</include>
- <include>**/*.ccf</include>
- <include>**/*.properties</include>
- <include>**/*.jwks</include>
- </includes>
- </resource>
- <resource>
- <directory>src/test/resources</directory>
- <includes>
- <include>**/*.xml</include>
- <include>**/*.properties</include>
- </includes>
- </resource>
- <!-- picks up the applicationcodes.properties file presented in \src\ path -->
- <resource>
- <directory>src/main/java</directory>
- <includes>
- <include>**/*.xml</include>
- <include>**/*.properties</include>
- </includes>
- </resource>
- </resources>
-
- </build>
-
- <dependencies>
- <dependency>
- <groupId>com.att.eelf</groupId>
- <artifactId>eelf-core</artifactId>
- <version>${eelf.version}</version>
- </dependency>
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- <version>2.5</version>
- </dependency>
-
- <!-- Spring -->
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- <version>${springframework.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
- <version>${springframework.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-webmvc</artifactId>
- <version>${springframework.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-tx</artifactId>
- <version>${springframework.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context-support</artifactId>
- <version>${springframework.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-orm</artifactId>
- <version>${springframework.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-test</artifactId>
- <version>${springframework.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter</artifactId>
- <version>1.3.0.RELEASE</version>
- <exclusions>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>log4j-over-slf4j</artifactId>
- </exclusion>
- <exclusion>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <!-- Hibernate -->
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-core</artifactId>
- <version>${hibernate.version}</version>
- </dependency>
-
- <!-- jsr303 validation -->
- <!-- <dependency> <groupId>javax.validation</groupId> <artifactId>validation-api</artifactId>
- <version>1.1.0.Final</version> </dependency> -->
-
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator</artifactId>
- <version>5.1.3.Final</version>
- </dependency>
- <!-- Servlet+JSP+JSTL -->
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <version>3.1.0</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>javax.servlet.jsp-api</artifactId>
- <version>2.3.1</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
- <version>1.2</version>
- </dependency>
-
- <!-- Apache Tiles -->
- <dependency>
- <groupId>org.apache.tiles</groupId>
- <artifactId>tiles-core</artifactId>
- <version>3.0.5</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tiles</groupId>
- <artifactId>tiles-jsp</artifactId>
- <version>3.0.5</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-rs-client</artifactId>
- <version>3.0.0-milestone1</version>
- </dependency>
-
- <!-- Mapper -->
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-annotations</artifactId>
- <version>2.6.3</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-core</artifactId>
- <version>2.6.3</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-databind</artifactId>
- <version>2.6.3</version>
- </dependency>
-
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <version>5.1.22</version>
- </dependency>
-
- <!-- Elastic Search -->
- <dependency>
- <groupId>org.elasticsearch</groupId>
- <artifactId>elasticsearch</artifactId>
- <version>2.2.0</version>
- </dependency>
- <dependency>
- <groupId>io.searchbox</groupId>
- <artifactId>jest</artifactId>
- <version>2.0.0</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.jcs</groupId>
- <artifactId>jcs</artifactId>
- <version>1.3</version>
- <exclusions>
- <exclusion>
- <groupId>*</groupId>
- <artifactId>*</artifactId>
- </exclusion>
- </exclusions>
- <!-- -->
- </dependency>
-
- <dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-websocket</artifactId>
- <version>8.0.28</version>
- <scope>provided</scope>
- </dependency>
-
- <!-- Raptor required Libraries -->
- <!-- for static charts -->
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>2.6</version>
- </dependency>
- <!-- for generating excel/csv/excelx -->
- <dependency>
- <groupId>org.apache.poi</groupId>
- <artifactId>poi</artifactId>
- <version>3.5-FINAL</version>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- <exclusion>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.poi</groupId>
- <artifactId>poi-ooxml</artifactId>
- <version>3.5-FINAL</version>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- <exclusion>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.poi</groupId>
- <artifactId>poi-scratchpad</artifactId>
- <version>3.5-FINAL</version>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- <exclusion>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.poi</groupId>
- <artifactId>poi-contrib</artifactId>
- <version>3.5-FINAL</version>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- <exclusion>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <!--
- <dependency>
- <groupId>com.lowagie</groupId>
- <artifactId>itext</artifactId>
- <version>2.0.8</version>
- <exclusions>
- <exclusion>
- <groupId>org.bouncycastle</groupId>
- <artifactId>bcprov-jdk14</artifactId>
- </exclusion>
- </exclusions>
- </dependency> -->
- <!-- Quartz -->
- <dependency>
- <groupId>org.quartz-scheduler</groupId>
- <artifactId>quartz</artifactId>
- <version>2.2.1</version>
- <exclusions>
- <!-- SDK brings a new version of c3p0 -->
- <exclusion>
- <groupId>c3p0</groupId>
- <artifactId>c3p0</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- <version>1.9</version>
- </dependency>
-
- <dependency>
- <groupId>com.att.nsa</groupId>
- <artifactId>cambriaClient</artifactId>
- <version>0.0.1</version>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- <exclusion>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </exclusion>
- <exclusion>
- <groupId>log4j</groupId>
- <artifactId>apache-log4j-extras</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.openecomp.ecompsdkos</groupId>
- <artifactId>ecompFW</artifactId>
- <version>${projectversion}</version>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- <exclusion>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </exclusion>
- <exclusion>
- <groupId>log4j</groupId>
- <artifactId>apache-log4j-extras</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.openecomp.ecompsdkos</groupId>
- <artifactId>ecompSDK-core</artifactId>
- <version>${projectversion}</version>
- </dependency>
-
- <dependency>
- <groupId>org.openecomp.ecompsdkos</groupId>
- <artifactId>ecompSDK-workflow</artifactId>
- <version>${projectversion}</version>
- </dependency>
-
-
- <!-- Referenced by some poms and needed for testing;
- do NOT use "test" scope here. -->
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- <version>4.5.2</version>
- </dependency>
-
- <!-- for testing -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.11</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>commons-beanutils</groupId>
- <artifactId>commons-beanutils</artifactId>
- <version>1.9.2</version>
- </dependency>
-
- <!-- OpenID Connect Dependencies -->
- <dependency>
- <groupId>org.mitre</groupId>
- <artifactId>openid-connect-client</artifactId>
- <version>1.2.2</version>
- <exclusions>
- <exclusion>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-mapper-asl</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.security</groupId>
- <artifactId>spring-security-taglibs</artifactId>
- <version>3.2.8.RELEASE</version>
- <exclusions>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>*</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
-
- </dependencies>
-</project>
diff --git a/ecomp-portal-BE/resources/META-INF/MANIFEST.MF b/ecomp-portal-BE/resources/META-INF/MANIFEST.MF
deleted file mode 100644
index 718b0a8a..00000000
--- a/ecomp-portal-BE/resources/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,2 +0,0 @@
-Manifest-Version: 1.0
-Class-Path: /WEB-INF/conf
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/authentication/LoginStrategy.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/authentication/LoginStrategy.java
deleted file mode 100644
index 69bf5ec9..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/authentication/LoginStrategy.java
+++ /dev/null
@@ -1,27 +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.authentication;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-public interface LoginStrategy {
- public boolean login(HttpServletRequest request, HttpServletResponse response) throws Exception;
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/authentication/OpenIdConnectLoginStrategy.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/authentication/OpenIdConnectLoginStrategy.java
deleted file mode 100644
index 75ade471..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/authentication/OpenIdConnectLoginStrategy.java
+++ /dev/null
@@ -1,91 +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.authentication;
-
-import java.util.HashSet;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.mitre.openid.connect.model.UserInfo;
-import org.openecomp.portalapp.command.EPLoginBean;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.utils.EPSystemProperties;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalapp.util.EPUserUtils;
-import org.openecomp.portalapp.util.SessionCookieUtil;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.openecomp.portalsdk.core.util.SystemProperties;
-import org.springframework.util.StringUtils;
-
-public class OpenIdConnectLoginStrategy implements LoginStrategy {
-
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(OpenIdConnectLoginStrategy.class);
-
- private static final String GLOBAL_LOCATION_KEY = "Location";
-
- @SuppressWarnings("rawtypes")
- public boolean login(HttpServletRequest request, HttpServletResponse response){
-
- logger.info("Attempting Login");
-
- //check both authentication cookie and authentication header
- UserInfo userInfo = (UserInfo) request.getAttribute("userInfo");
-
- if (userInfo != null && !StringUtils.isEmpty(userInfo.getPreferredUsername())) {
- //package the userid in the login form for processing
- EPLoginBean commandBean = new EPLoginBean();
- commandBean.setOrgUserId(userInfo.getPreferredUsername());
-
- EPUser user = new EPUser();
-
- user.setOrgUserId(userInfo.getPreferredUsername());
- user.setEmail(userInfo.getEmail());
- user.setFirstName(userInfo.getName());
- user.setLastName(userInfo.getFamilyName());
-
- //store the currently logged in user's information in the session
- EPUserUtils.setUserSession(request, user, new HashSet(), new HashSet(), SystemProperties.getProperty(SystemProperties.AUTHENTICATION_MECHANISM));
-
- logger.info(EELFLoggerDelegate.errorLogger, request.getContextPath());
- SessionCookieUtil.preSetUp(request, response);
- return true;
- } else {
- // in case authentication cookie is missing, send 401 UNAUTHORIZED to client and it will redirect to Logon
-
- try {
- String authentication = SystemProperties.getProperty(SystemProperties.AUTHENTICATION_MECHANISM);
- String loginUrl = SystemProperties.getProperty(EPSystemProperties.LOGIN_URL_NO_RET_VAL);
- logger.info(EELFLoggerDelegate.errorLogger, "Authentication Mechanism: '" + authentication + "'.");
-
- if (authentication == null || authentication.equals("") || authentication.trim().equals("OIDC")) {
- response.sendRedirect("oid-login");
- } else {
- logger.info(EELFLoggerDelegate.errorLogger, "No cookies are found, redirecting the request to '" + loginUrl + "'.");
- response.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
- response.setHeader(GLOBAL_LOCATION_KEY, loginUrl);
- }
- } catch(Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred in preHandle() while redirecting, Details: " + EcompPortalUtils.getStackTrace(e));
- }
- }
- return false;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/authentication/SimpleLoginStrategy.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/authentication/SimpleLoginStrategy.java
deleted file mode 100644
index eb09dc08..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/authentication/SimpleLoginStrategy.java
+++ /dev/null
@@ -1,101 +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.authentication;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.openecomp.portalapp.command.EPLoginBean;
-import org.openecomp.portalapp.portal.service.EPLoginService;
-import org.openecomp.portalapp.portal.utils.EPSystemProperties;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalapp.util.EPUserUtils;
-import org.openecomp.portalapp.util.SessionCookieUtil;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.openecomp.portalsdk.core.menu.MenuProperties;
-import org.openecomp.portalsdk.core.onboarding.crossapi.ECOMPSSO;
-import org.openecomp.portalsdk.core.util.SystemProperties;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.util.StringUtils;
-
-public class SimpleLoginStrategy implements LoginStrategy{
-
- @Autowired
- private EPLoginService loginService;
-
- private static final String GLOBAL_LOCATION_KEY = "Location";
-
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SimpleLoginStrategy.class);
-
- public boolean login(HttpServletRequest request, HttpServletResponse response) throws Exception{
- logger.info("Attempting 'Simple' Login");
-
- //check both authentication cookie and authentication header
- String orgUserId = null;
- try{
- orgUserId = ECOMPSSO.getUserIdFromCookie(request);
- } catch(Exception ex){
- logger.error(EELFLoggerDelegate.errorLogger, "Error getting User ID: '" + ex.getLocalizedMessage() + "'.");
- }
-
-
- if (!StringUtils.isEmpty(orgUserId)) {
- // package the userid in the login form for processing
- EPLoginBean commandBean = new EPLoginBean();
- commandBean.setOrgUserId(orgUserId);
- commandBean = loginService.findUser(commandBean, (String)request.getAttribute(MenuProperties.MENU_PROPERTIES_FILENAME_KEY), null);
-
- // in case authentication has passed but user is not in the ECOMP data base, return a Guest User to the home page.
- if (commandBean.getUser() == null) {
- }
- else {
- // store the currently logged in user's information in the session
- EPUserUtils.setUserSession(request, commandBean.getUser(), commandBean.getMenu(), commandBean.getBusinessDirectMenu(), "");
- logger.info(EELFLoggerDelegate.debugLogger, commandBean.getUser().getOrgUserId() + " exists in the the system.");
- }
-
- logger.info(EELFLoggerDelegate.errorLogger, request.getContextPath());
- SessionCookieUtil.preSetUp(request, response);
- return true;
- } else {
- // in case authentication cookie is missing, send 401 UNAUTHORIZED to client and it will redirect to Logon
- try {
- String authentication = SystemProperties.getProperty(SystemProperties.AUTHENTICATION_MECHANISM);
- String loginUrl = SystemProperties.getProperty(EPSystemProperties.LOGIN_URL_NO_RET_VAL);
- logger.info(EELFLoggerDelegate.errorLogger, "Authentication Mechanism: '" + authentication + "'.");
- if (authentication == null || authentication.equals("") || authentication.trim().equals("BOTH")) {
-
- logger.info(EELFLoggerDelegate.errorLogger, "No cookies are found, redirecting the request to '" + loginUrl + "'.");
- response.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
- response.setHeader(GLOBAL_LOCATION_KEY, loginUrl); //returnUrl + "/index.htm");
- }else {
- logger.info(EELFLoggerDelegate.errorLogger, "No cookies are found, redirecting the request to '" + loginUrl + "'.");
- response.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
- response.setHeader(GLOBAL_LOCATION_KEY, loginUrl); //returnUrl + "/index.htm");
- }
- } catch(Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred in preHandle() while redirecting, Details: " + EcompPortalUtils.getStackTrace(e));
- }
- }
-
- return false;
-
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/command/EPLoginBean.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/command/EPLoginBean.java
deleted file mode 100644
index e3bb1433..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/command/EPLoginBean.java
+++ /dev/null
@@ -1,186 +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.command;
-
-import java.util.Set;
-
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalsdk.core.domain.support.FusionCommand;
-
-public class EPLoginBean extends FusionCommand {
- private String loginId;
- private String loginPwd;
- private String hrid;
- private String orgUserId;
- private String siteAccess;
- private String loginErrorMessage;
-
- private EPUser user;
- private Set<?> menu;
- private Set<?> businessDirectMenu;
-
- /**
- * getLoginId
- *
- * @return String
- */
- public String getLoginId() {
- return loginId;
- }
-
- /**
- * getLoginPwd
- *
- * @return String
- */
- public String getLoginPwd() {
- return loginPwd;
- }
-
- /**
- * getMenu
- *
- * @return Set
- */
- public Set<?> getMenu() {
- return menu;
- }
-
- /**
- * getUser
- *
- * @return User
- */
- public EPUser getUser() {
- return user;
- }
-
- /**
- * getHrid
- *
- * @return String
- */
- public String getHrid() {
- return hrid;
- }
-
- /**
- * getSiteAccess
- *
- * @return String
- */
- public String getSiteAccess() {
- return siteAccess;
- }
-
- /**
- * getBusinessDirectMenu
- *
- * @return Set
- */
- public Set<?> getBusinessDirectMenu() {
- return businessDirectMenu;
- }
-
- /**
- * getLoginErrorMessage
- *
- * @return String
- */
- public String getLoginErrorMessage() {
- return loginErrorMessage;
- }
-
- public String getOrgUserId() {
- return orgUserId;
- }
-
- /**
- * setLoginId
- *
- * @param loginId String
- */
- public void setLoginId(String loginId) {
- this.loginId = loginId;
- }
-
- /**
- * setLoginPwd
- *
- * @param loginPwd String
- */
- public void setLoginPwd(String loginPwd) {
- this.loginPwd = loginPwd;
- }
-
- public void setMenu(Set<?> menu) {
- this.menu = menu;
- }
-
- /**
- * setUser
- *
- * @param user User
- */
- public void setUser(EPUser user) {
- this.user = user;
- }
-
- /**
- * setHrid
- *
- * @param hrid String
- */
- public void setHrid(String hrid) {
- this.hrid = hrid;
- }
-
- /**
- * setSiteAccess
- *
- * @param siteAccess String
- */
- public void setSiteAccess(String siteAccess) {
- this.siteAccess = siteAccess;
- }
-
- /**
- * setBusinessDirectMenu
- *
- * @param businessDirectMenu Set
- */
- public void setBusinessDirectMenu(Set<?> businessDirectMenu) {
- this.businessDirectMenu = businessDirectMenu;
- }
-
- /**
- * setLoginErrorMessage
- *
- * @param loginErrorMessage String
- */
- public void setLoginErrorMessage(String loginErrorMessage) {
- this.loginErrorMessage = loginErrorMessage;
- }
-
- public void setOrgUserId(String orgUserId) {
- this.orgUserId = orgUserId;
- }
-}
-
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/command/PostSearchBean.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/command/PostSearchBean.java
deleted file mode 100644
index 0f58807b..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/command/PostSearchBean.java
+++ /dev/null
@@ -1,373 +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.command;
-
-import java.util.List;
-
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalsdk.core.command.support.SearchBase;
-
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-
-@JsonSerialize
-public class PostSearchBean extends SearchBase {
-
- private EPUser user = null;
- private EPUser userOrig = null;
- private String[] selected;
- private String[] postHrid;
- private String[] postOrgUserId;
- private String[] postFirstName;
- private String[] postLastName;
- private String[] postOrgCode;
- private String[] postPhone;
- private String[] postEmail;
- private String[] postAddress1;
- private String[] postAddress2;
- private String[] postCity;
- private String[] postState;
- private String[] postZipCode;
- private String[] postLocationClli;
- private String[] postBusinessCountryCode;
- private String[] postBusinessCountryName;
- private String[] postDepartment;
- private String[] postDepartmentName;
- private String[] postBusinessUnit;
- private String[] postBusinessUnitName;
- private String[] postJobTitle;
- private String[] postOrgManagerUserId;
- private String[] postCommandChain;
- private String[] postCompanyCode;
- private String[] postCompany;
- private String[] postCostCenter;
- private String[] postSiloStatus;
- private String[] postFinancialLocCode;
-
-
- public PostSearchBean() {
- this(null);
- } // PostSearchBean
-
- public PostSearchBean(List<?> items) {
- super(items);
-
- user = new EPUser();
- userOrig = new EPUser();
-
- setSortBy1("");
- setSortBy1Orig("");
-
- //setSortByList(...);
- } // PostSearchBean
-
-
- public String getFirstName() { return user.getFirstName(); }
- public String getLastName() { return user.getLastName(); }
- public String getHrid() { return user.getHrid(); }
- public String getOrgUserId() { return user.getOrgUserId(); }
- public String getOrgCode() { return user.getOrgCode(); }
- public String getEmail() { return user.getEmail(); }
- public String getOrgManagerUserId() { return user.getOrgManagerUserId(); }
-
- public String getFirstNameOrig() { return user.getFirstName(); }
- public String getLastNameOrig() { return user.getLastName(); }
- public String getHridOrig() { return user.getHrid(); }
- public String getOrgUserIdOrig() { return user.getOrgUserId(); }
- public String getOrgCodeOrig() { return user.getOrgCode(); }
- public String getEmailOrig() { return user.getEmail(); }
- public String getOrgManagerUserIdOrig() { return user.getOrgManagerUserId(); }
-
-
- public EPUser getUser() { return user; }
-
- public String[] getPostEmail() {
- return postEmail;
- }
-
- public String[] getPostFirstName() {
- return postFirstName;
- }
-
- public String[] getPostHrid() {
- return postHrid;
- }
-
- public String[] getPostLastName() {
- return postLastName;
- }
-
- public String[] getPostOrgCode() {
- return postOrgCode;
- }
-
- public String[] getPostPhone() {
- return postPhone;
- }
-
- public String[] getPostOrgUserId() {
- return postOrgUserId;
- }
-
- public String[] getSelected() {
- return selected;
- }
-
- public String[] getPostAddress1() {
- return postAddress1;
- }
-
- public String[] getPostBusinessCountryCode() {
- return postBusinessCountryCode;
- }
-
- public String[] getPostCity() {
- return postCity;
- }
-
- public String[] getPostCommandChain() {
- return postCommandChain;
- }
-
- public String[] getPostCompany() {
- return postCompany;
- }
-
- public String[] getPostCompanyCode() {
- return postCompanyCode;
- }
-
- public String[] getPostDepartment() {
- return postDepartment;
- }
-
- public String[] getPostDepartmentName() {
- return postDepartmentName;
- }
-
- public String[] getPostBusinessCountryName() {
- return postBusinessCountryName;
- }
-
- public String[] getPostJobTitle() {
- return postJobTitle;
- }
-
- public String[] getPostLocationClli() {
- return postLocationClli;
- }
-
- public String[] getPostManagerUserId() {
- return postOrgManagerUserId;
- }
-
- public String[] getPostState() {
- return postState;
- }
-
- public String[] getPostZipCode() {
- return postZipCode;
- }
-
- public void setFirstName(String value) { user.setFirstName(value); }
- public void setLastName(String value) { user.setLastName(value); }
- public void setHrid(String value) { user.setHrid(value); }
- public void setOrgUserId(String value) { user.setOrgUserId(value); }
- public void setOrgCode(String value) { user.setOrgCode(value); }
- public void setEmail(String value) { user.setEmail(value); }
- public void setOrgManagerUserId(String value) { user.setOrgManagerUserId(value); }
-
- public void setFirstNameOrig(String value) { userOrig.setFirstName(value); }
- public void setLastNameOrig(String value) { userOrig.setLastName(value); }
- public void setHridOrig(String value) { userOrig.setHrid(value); }
- public void setOrgUserIdOrig(String value) { userOrig.setOrgUserId(value); }
- public void setOrgCodeOrig(String value) { userOrig.setOrgCode(value); }
- public void setEmailOrig(String value) { userOrig.setEmail(value); }
- public void setOrgManagerUserIdOrig(String value) { userOrig.setOrgManagerUserId(value); }
-
- public void setUser(EPUser value) { this.user = value; }
-
- public void setPostEmail(String[] postEmail) {
- this.postEmail = postEmail;
- }
-
- public void setPostFirstName(String[] postFirstName) {
- this.postFirstName = postFirstName;
- }
-
- public void setPostHrid(String[] postHrid) {
- this.postHrid = postHrid;
- }
-
- public void setPostLastName(String[] postLastName) {
- this.postLastName = postLastName;
- }
-
- public void setPostOrgCode(String[] postOrgCode) {
- this.postOrgCode = postOrgCode;
- }
-
- public void setPostPhone(String[] postPhone) {
- this.postPhone = postPhone;
- }
-
- public void setPostUserId(String[] postOrgUserId) {
- this.postOrgUserId = postOrgUserId;
- }
-
- public void setSelected(String[] selected) {
- this.selected = selected;
- }
-
- public void setPostAddress1(String[] postAddress1) {
- this.postAddress1 = postAddress1;
- }
-
- public void setPostBusinessCountryCode(String[] postBusinessCountryCode) {
- this.postBusinessCountryCode = postBusinessCountryCode;
- }
-
- public void setPostCity(String[] postCity) {
- this.postCity = postCity;
- }
-
- public void setPostCommandChain(String[] postCommandChain) {
- this.postCommandChain = postCommandChain;
- }
-
- public void setPostCompany(String[] postCompany) {
- this.postCompany = postCompany;
- }
-
- public void setPostCompanyCode(String[] postCompanyCode) {
- this.postCompanyCode = postCompanyCode;
- }
-
- public void setPostDepartment(String[] postDepartment) {
- this.postDepartment = postDepartment;
- }
-
- public void setPostDepartmentName(String[] postDepartmentName) {
- this.postDepartmentName = postDepartmentName;
- }
-
- public void setPostBusinessCountryName(String[] postBusinessCountryName) {
- this.postBusinessCountryName = postBusinessCountryName;
- }
-
- public void setPostJobTitle(String[] postJobTitle) {
- this.postJobTitle = postJobTitle;
- }
-
- public void setPostLocationClli(String[] postLocationClli) {
- this.postLocationClli = postLocationClli;
- }
-
- public void setPostManagerUserId(String[] postOrgManagerUserId) {
- this.postOrgManagerUserId = postOrgManagerUserId;
- }
-
- public void setPostState(String[] postState) {
- this.postState = postState;
- }
-
- public void setPostZipCode(String[] postZipCode) {
- this.postZipCode = postZipCode;
- }
-
- public String[] getPostAddress2() {
- return postAddress2;
- }
-
- public void setPostAddress2(String[] postAddress2) {
- this.postAddress2 = postAddress2;
- }
-
- public EPUser getUserOrig() {
- return userOrig;
- }
-
- public void setUserOrig(EPUser userOrig) {
- this.userOrig = userOrig;
- }
-
- public String[] getPostBusinessUnit() {
- return postBusinessUnit;
- }
-
- public void setPostBusinessUnit(String[] postBusinessUnit) {
- this.postBusinessUnit = postBusinessUnit;
- }
-
- public String[] getPostBusinessUnitName() {
- return postBusinessUnitName;
- }
-
- public void setPostBusinessUnitName(String[] postBusinessUnitName) {
- this.postBusinessUnitName = postBusinessUnitName;
- }
-
- public String[] getPostCostCenter() {
- return postCostCenter;
- }
-
- public void setPostCostCenter(String[] postCostCenter) {
- this.postCostCenter = postCostCenter;
- }
-
- public String[] getPostSiloStatus() {
- return postSiloStatus;
- }
-
- public void setPostSiloStatus(String[] postSiloStatus) {
- this.postSiloStatus = postSiloStatus;
- }
-
- public String[] getPostFinancialLocCode() {
- return postFinancialLocCode;
- }
-
- public void setPostFinancialLocCode(String[] postFinancialLocCode) {
- this.postFinancialLocCode = postFinancialLocCode;
- }
-
- public void resetSearch() {
- super.resetSearch();
- setUser(new EPUser());
- } // resetSearch
-
-
- public boolean isCriteriaUpdated() {
- if(user==null&&userOrig==null)
- return false;
- else if(user==null||userOrig==null)
- return true;
- else
- return (! (
- Utilities.nvl(user.getFirstName()).equals(Utilities.nvl(userOrig.getFirstName()))&&
- Utilities.nvl(user.getLastName()).equals(Utilities.nvl(userOrig.getLastName()))&&
- //Utilities.nvl(user.getHrid()).equals(Utilities.nvl(userOrig.getHrid()))&&
- Utilities.nvl(user.getOrgUserId()).equals(Utilities.nvl(userOrig.getOrgUserId()))&&
- Utilities.nvl(user.getOrgCode()).equals(Utilities.nvl(userOrig.getOrgCode()))&&
- Utilities.nvl(user.getEmail()).equals(Utilities.nvl(userOrig.getEmail()))&&
- Utilities.nvl(user.getOrgManagerUserId()).equals(Utilities.nvl(userOrig.getOrgManagerUserId()))&&
- true));
- } // isCriteriaUpdated
-
-} // PostSearchBean
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/conf/ExternalAppConfig.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/conf/ExternalAppConfig.java
deleted file mode 100644
index 5bcb4303..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/conf/ExternalAppConfig.java
+++ /dev/null
@@ -1,311 +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.conf;
-
-import static com.att.eelf.configuration.Configuration.MDC_ALERT_SEVERITY;
-import static com.att.eelf.configuration.Configuration.MDC_INSTANCE_UUID;
-import static com.att.eelf.configuration.Configuration.MDC_SERVER_FQDN;
-import static com.att.eelf.configuration.Configuration.MDC_SERVER_IP_ADDRESS;
-import static com.att.eelf.configuration.Configuration.MDC_SERVICE_INSTANCE_ID;
-import static com.att.eelf.configuration.Configuration.MDC_SERVICE_NAME;
-
-import java.net.InetAddress;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.List;
-
-import javax.annotation.PostConstruct;
-
-import org.openecomp.portalapp.authentication.LoginStrategy;
-import org.openecomp.portalapp.authentication.OpenIdConnectLoginStrategy;
-import org.openecomp.portalapp.authentication.SimpleLoginStrategy;
-import org.openecomp.portalapp.portal.interceptor.PortalResourceInterceptor;
-import org.openecomp.portalapp.portal.interceptor.SessionTimeoutInterceptor;
-import org.openecomp.portalapp.portal.listener.HealthMonitor;
-import org.openecomp.portalapp.portal.service.EPLoginService;
-import org.openecomp.portalapp.portal.service.EPLoginServiceImpl;
-import org.openecomp.portalapp.portal.ueb.EPUebHelper;
-import org.openecomp.portalapp.portal.utils.EPSystemProperties;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalapp.scheduler.RegistryAdapter;
-import org.openecomp.portalapp.uebhandler.FunctionalMenuHandler;
-import org.openecomp.portalapp.uebhandler.InitUebHandler;
-import org.openecomp.portalapp.uebhandler.MainUebHandler;
-import org.openecomp.portalapp.uebhandler.WidgetNotificationHandler;
-import org.openecomp.portalsdk.core.conf.AppConfig;
-import org.openecomp.portalsdk.core.conf.Configurable;
-import org.openecomp.portalsdk.core.controller.LogoutController;
-import org.openecomp.portalsdk.core.logging.format.AlarmSeverityEnum;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.openecomp.portalsdk.core.objectcache.AbstractCacheManager;
-import org.openecomp.portalsdk.core.service.DataAccessService;
-import org.openecomp.portalsdk.core.service.FnMenuService;
-import org.openecomp.portalsdk.core.service.FnMenuServiceImpl;
-import org.openecomp.portalsdk.core.util.CacheManager;
-import org.openecomp.portalsdk.core.util.SystemProperties;
-import org.slf4j.MDC;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ComponentScan;
-import org.springframework.context.annotation.ComponentScan.Filter;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.FilterType;
-import org.springframework.context.annotation.Profile;
-import org.springframework.scheduling.annotation.EnableAsync;
-import org.springframework.scheduling.annotation.EnableScheduling;
-import org.springframework.scheduling.quartz.SchedulerFactoryBean;
-import org.springframework.web.servlet.ViewResolver;
-import org.springframework.web.servlet.config.annotation.EnableWebMvc;
-import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
-import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
-
-@Configuration
-@EnableWebMvc
-@ComponentScan(basePackages = {"org.openecomp"}, excludeFilters = {
- @Filter(value = { LogoutController.class }, type = FilterType.ASSIGNABLE_TYPE) })
-@Profile("src")
-@EnableAsync
-@EnableScheduling
-public class ExternalAppConfig extends AppConfig implements Configurable {
-
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ExternalAppConfig.class);
-
- private RegistryAdapter schedulerRegistryAdapter;
-
- public ViewResolver viewResolver() {
- return super.viewResolver();
- }
-
- @Override
- public void addResourceHandlers(ResourceHandlerRegistry registry) {
- registry.addResourceHandler("/static/**").addResourceLocations("/static/");
- registry.addResourceHandler("/images/**").addResourceLocations("/images/");
- registry.addResourceHandler("/**").addResourceLocations("/public/");
- }
-
- @PostConstruct
- private void init() {
- try {
- //Loading defaults
- MDC.put(MDC_SERVICE_NAME, EPSystemProperties.ECOMP_PORTAL_BE);
- MDC.put(MDC_SERVER_FQDN, InetAddress.getLocalHost().getHostName());
- MDC.put(MDC_SERVER_IP_ADDRESS, InetAddress.getLocalHost().getHostAddress());
- MDC.put(MDC_SERVICE_INSTANCE_ID, "");
- MDC.put(MDC_ALERT_SEVERITY, AlarmSeverityEnum.INFORMATIONAL.toString());
- MDC.put(MDC_INSTANCE_UUID, SystemProperties.getProperty(SystemProperties.INSTANCE_UUID));
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- }
- }
-
- /*
- * /
- *
- * @PostConstruct // file://${catalina.home}/conf/log4j.properties public
- * void initLog4j() throws FileNotFoundException { try { URL[] classpathurls
- * = ((URLClassLoader)
- * (Thread.currentThread().getContextClassLoader())).getURLs(); for (URL url
- * : classpathurls) { System.out.println(url.getFile().toString()); }
- * Log4jConfigurer.initLogging(
- * "file://${catalina.home}/conf/log4j.properties"); } catch
- * (FileNotFoundException e) { ((URLClassLoader)
- * (Thread.currentThread().getContextClassLoader())).getURLs();
- * Log4jConfigurer.initLogging("classpath:../conf/log4j.properties"); } } /
- **/
-
- public DataAccessService dataAccessService() {
- return super.dataAccessService();
- }
-
- public String[] tileDefinitions() {
- return super.tileDefinitions();
- }
-
- public List<String> addTileDefinitions() {
- List<String> definitions = new ArrayList<String>();
- definitions.add("/WEB-INF/defs/definitions.xml");
- return definitions;
- }
-
- @Bean
- public AbstractCacheManager cacheManager() {
- return new CacheManager();
- }
-
- @Bean
- public SessionTimeoutInterceptor sessionTimeoutInterceptor() {
- return new SessionTimeoutInterceptor();
- }
-
- @Bean
- public PortalResourceInterceptor portalResourceInterceptor() {
- return new PortalResourceInterceptor();
- }
-
- @Bean
- public EPLoginService eploginService() {
- return new EPLoginServiceImpl();
- }
-
- @Bean
- public LoginStrategy loginStrategy(){
-
- if(SystemProperties.getProperty(SystemProperties.AUTHENTICATION_MECHANISM).trim().equalsIgnoreCase("OIDC"))
- return new OpenIdConnectLoginStrategy();
- else
- return new SimpleLoginStrategy();
- }
-
- public FnMenuService fnMenuService(){
- return new FnMenuServiceImpl();
- }
-
-
- @Override
- public void addInterceptors(InterceptorRegistry registry) {
- // registry.addInterceptor(new
- // StaticResourcesInterceptor()).addPathPatterns("/index.htm",
- // "/applicationsHome", "/widgetsHome", "/admins", "/users",
- // "/applications", "/widgets");
- // Excludes login/logout pages and REST endpoints used by other
- // application servers.
-
-
- registry.addInterceptor(sessionTimeoutInterceptor()).excludePathPatterns("/oid-login", "/portalApi/healthCheck","/portalApi/healthCheck/",
- "/portalApi/healthCheckSuspend","/portalApi/healthCheckSuspend/", "/portalApi/healthCheckResume","/portalApi/healthCheckResume/",
- "/login_external","/login_external.htm*", "login", "/login.htm*", "/auxapi/*", "/context/*",
- "/api*", "/single_signon.htm", "/single_signon","/dashboard", "/OpenSourceLogin.htm");
-
- registry.addInterceptor(portalResourceInterceptor());
-
- }
-
- /**
- * Creates and returns a new instance of a {@link SchedulerFactoryBean} and
- * populates it with triggers.
- *
- * @return New instance of {@link SchedulerFactoryBean}
- * @throws Exception
- */
-
- @Bean
- public EPUebHelper epUebHelper() {
- return new EPUebHelper();
- }
-
- @Bean
- public HealthMonitor healthMonitor() {
- return new HealthMonitor();
- }
-
- /**
- * Creates and returns a new instance of a {@link MainUebHandler}.
- *
- * @return New instance of {@link MainUebHandler}.
- */
- @Bean
- public MainUebHandler mainUebHandler() {
- return new MainUebHandler();
- }
-
- /**
- * Creates and returns a new instance of a {@link InitUebHandler}.
- *
- * @return New instance of {@link InitUebHandler}.
- */
- @Bean
- public InitUebHandler initUebHandler() {
- return new InitUebHandler();
- }
-
- /**
- * Creates and returns a new instance of a {@link WidgetNotificationHandler}
- * .
- *
- * @return New instance of {@link WidgetNotificationHandler}.
- */
- @Bean
- public WidgetNotificationHandler widgetNotificationHandler() {
- return new WidgetNotificationHandler();
- }
-
- /**
- * Creates and returns a new instance of a {@link FunctionalMenuHandler} .
- *
- * @return New instance of {@link FunctionalMenuHandler}.
- */
- @Bean
- public FunctionalMenuHandler functionalMenuHandler() {
- return new FunctionalMenuHandler();
- }
-
- /**
- * Creates and returns a new instance of a {@link SchedulerFactoryBean} and
- * populates it with triggers.
- *
- * @return New instance of {@link SchedulerFactoryBean}
- * @throws Exception
- */
- // APPLICATIONS REQUIRING QUARTZ SHOULD RESTORE ANNOTATION
- @Bean // ANNOTATION COMMENTED OUT
- public SchedulerFactoryBean schedulerFactoryBean() throws Exception {
- SchedulerFactoryBean scheduler = new SchedulerFactoryBean();
- scheduler.setConfigLocation(appApplicationContext.getResource("WEB-INF/conf/quartz.properties"));
- scheduler.setDataSource(dataSource());
- scheduler.setTriggers(schedulerRegistryAdapter.getTriggers());
- scheduler.setSchedulerName(getScheduleName());
- return scheduler;
- }
-
- protected String getScheduleName() {
- final String CRON_SITE_NAME = "cron_site_name";
- String cronSiteVal = "Default";
- try{
- cronSiteVal = SystemProperties.getProperty(CRON_SITE_NAME);
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- logger.warn(EELFLoggerDelegate.errorLogger, "Cron site name not added in property file, using Default value");
- }
-
- String cronSiteName = cronSiteVal != null ? cronSiteVal : "";
-
- SimpleDateFormat dateFormat = new SimpleDateFormat();
- dateFormat.applyPattern("YYYYMMdd");
- String currentDateStr = dateFormat.format(Calendar.getInstance().getTime());
-
-
- return "Scheduler" + "_" + currentDateStr + "_" + cronSiteName;
- }
-
-
- /**
- * Sets the scheduler registry adapter.
- *
- * @param schedulerRegistryAdapter
- */
- @Autowired
- public void setSchedulerRegistryAdapter(final RegistryAdapter schedulerRegistryAdapter) {
- this.schedulerRegistryAdapter = schedulerRegistryAdapter;
- }
-
-
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/conf/ExternalAppInitializer.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/conf/ExternalAppInitializer.java
deleted file mode 100644
index c1bc7cfa..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/conf/ExternalAppInitializer.java
+++ /dev/null
@@ -1,60 +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.conf;
-
-import java.util.Arrays;
-
-import org.openecomp.portalsdk.core.conf.AppInitializer;
-
-public class ExternalAppInitializer extends AppInitializer{
-
-
- @Override
- protected Class<?>[] getRootConfigClasses() {
- return super.getRootConfigClasses();
- }
-
- @Override
- protected Class<?>[] getServletConfigClasses() {
-// Class<?>[] configClasses = super.getServletConfigClasses();
-// Class<?>[] additionalConfigClasses = Arrays.copyOf(configClasses, configClasses.length);
-// addConfigClass(additionalConfigClasses, ExternalAppConfig.class);
-// return additionalConfigClasses;
-//
- return new Class[] {ExternalAppConfig.class};
- }
-
- static Class<?>[] addConfigClass(Class<?>[] a, Class<?> e) {
- a = Arrays.copyOf(a, a.length + 1);
- a[a.length - 1] = e;
- return a;
- }
-
- /*
- * URL request will direct to the Spring dispatcher for processing
- */
- @Override
- protected String[] getServletMappings() {
- return super.getServletMappings();
- }
-
-}
-
-
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/conf/HibernateMappingLocations.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/conf/HibernateMappingLocations.java
deleted file mode 100644
index 3eb88f9b..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/conf/HibernateMappingLocations.java
+++ /dev/null
@@ -1,38 +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.conf;
-
-import org.openecomp.portalsdk.core.conf.HibernateMappingLocatable;
-import org.springframework.context.annotation.Profile;
-import org.springframework.core.io.ClassPathResource;
-import org.springframework.core.io.Resource;
-import org.springframework.stereotype.Component;
-
-@Component
-@Profile("src")
-public class HibernateMappingLocations implements HibernateMappingLocatable {
-
- public Resource[] getMappingLocations() {
- return new Resource[] { new ClassPathResource("../fusion/orm/Fusion.hbm.xml"),
- new ClassPathResource("../fusion/orm/EP.hbm.xml"),
- new ClassPathResource("../fusion/orm/Workflow.hbm.xml") };
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/ECOMPLogoutController.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/ECOMPLogoutController.java
deleted file mode 100644
index 13242c2e..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/ECOMPLogoutController.java
+++ /dev/null
@@ -1,112 +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.controller;
-
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-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.EPSystemProperties;
-import org.openecomp.portalapp.util.EPUserUtils;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.springframework.context.annotation.EnableAspectJAutoProxy;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.context.request.RequestContextHolder;
-import org.springframework.web.context.request.ServletRequestAttributes;
-import org.springframework.web.servlet.ModelAndView;
-
-@Controller
-@RequestMapping("/")
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-public class ECOMPLogoutController extends EPUnRestrictedBaseController{
-
- private EPUser user;
- private static final String EP_SERVICE = "EPService";
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ECOMPLogoutController.class);
-
- @EPAuditLog
- @RequestMapping(value = {"/logout.htm" }, method = RequestMethod.GET)
- public ModelAndView logOut(HttpServletRequest request,
- HttpServletResponse response) throws Exception {
-
- ModelAndView modelView = null;
-
- chatRoomLogout(request);
- logger.debug(EELFLoggerDelegate.debugLogger, "ECOMPLogoutController.handleRequestInternal - Logout request received.");
-
- modelView = new ModelAndView("redirect:login.htm");
-
- /**
- if (UserUtils.isClientMobileDevice(request)){
- modelView.setViewName(modelView.getViewName().concat("?viewType=mobile"));
- }
- */
- String cookieDoamin = EPSystemProperties.getProperty(EPSystemProperties.COOKIE_DOMAIN);
- Cookie epCookie = new Cookie(EP_SERVICE, "");
- epCookie.setMaxAge(0);
- epCookie.setDomain(cookieDoamin);
- epCookie.setPath("/");
-
- Cookie appHeaderCookie = new Cookie("show_app_header", "");
- appHeaderCookie.setMaxAge(0);
- appHeaderCookie.setDomain(cookieDoamin);
- appHeaderCookie.setPath("/");
-
- Cookie appTabCookie = new Cookie("cookieTabs", "");
- appTabCookie.setMaxAge(0);
- appTabCookie.setDomain(cookieDoamin);
- appTabCookie.setPath("/");
-
- Cookie appVisInvisTabCookie = new Cookie("visInVisCookieTabs", "");
- appVisInvisTabCookie.setMaxAge(0);
- appVisInvisTabCookie.setDomain(cookieDoamin);
- appVisInvisTabCookie.setPath("/");
-
- response.addCookie(epCookie);
- response.addCookie(appHeaderCookie);
- response.addCookie(appTabCookie);
- response.addCookie(appVisInvisTabCookie);
- request.getSession().invalidate();
-
- logger.debug(EELFLoggerDelegate.debugLogger, "ECOMPLogoutController.handleRequestInternal - Successfully processed the logout request.");
-
- return modelView;
- }
-
- @EPMetricsLog
- public void chatRoomLogout(HttpServletRequest request){
- request = ((ServletRequestAttributes)RequestContextHolder.currentRequestAttributes()).getRequest();
- setUser(EPUserUtils.getUserSession(request));
- }
-
- public EPUser getUser() {
- return user;
- }
-
- public void setUser(EPUser user) {
- this.user = user;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/EPFusionBaseController.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/EPFusionBaseController.java
deleted file mode 100644
index f34fd078..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/EPFusionBaseController.java
+++ /dev/null
@@ -1,106 +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.controller;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalapp.util.EPUserUtils;
-import org.openecomp.portalsdk.core.controller.FusionBaseController;
-import org.openecomp.portalsdk.core.domain.MenuData;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.openecomp.portalsdk.core.util.SystemProperties;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.ModelAttribute;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-@Controller
-public abstract class EPFusionBaseController extends FusionBaseController {
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EPFusionBaseController.class);
-
-
-
- @Override
- public boolean isAccessible() {
- return true;
- }
-
- public boolean isRESTfulCall() {
- return true;
- }
-
- @ModelAttribute("menu")
- public Map<String, Object> messages(HttpServletRequest request) {
- HttpSession session = null;
- Map<String, Object> model = new HashMap<String, Object>();
- session = request.getSession();
- EPUser user = EPUserUtils.getUserSession(request);
- if (session != null && user != null) {
- @SuppressWarnings("unchecked")
- Set<MenuData> menuResult = (Set<MenuData>) session
- .getAttribute(SystemProperties.getProperty(SystemProperties.APPLICATION_MENU_ATTRIBUTE_NAME));
- try {
- model = setMenu(menuResult);
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- }
- }
-
- return model;
- }
-
- public Map<String, Object> setMenu(Set<MenuData> menuResult) throws Exception {
- ObjectMapper mapper = new ObjectMapper();
- List<List<MenuData>> childItemList = new ArrayList<List<MenuData>>();
- ;
- List<MenuData> parentList = new ArrayList<MenuData>();
- ;
- Map<String, Object> model = new HashMap<String, Object>();
- for (MenuData menu : menuResult) {
- MenuData parentData = new MenuData();
- parentData.setLabel(menu.getLabel());
- parentData.setAction(menu.getAction());
- parentData.setImageSrc(menu.getImageSrc());
- parentList.add(parentData);
- List<MenuData> tempList = new ArrayList<MenuData>();
- for (Object o : menu.getChildMenus()) {
- MenuData m = (MenuData) o;
- MenuData data = new MenuData();
- data.setLabel(m.getLabel());
- data.setAction(m.getAction());
- data.setImageSrc(m.getImageSrc());
- tempList.add(data);
- }
- childItemList.add(tempList);
- }
- model.put("childItemList", childItemList != null ? mapper.writeValueAsString(childItemList) : "");
- model.put("parentList", parentList != null ? mapper.writeValueAsString(parentList) : "");
- return model;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/EPRestrictedBaseController.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/EPRestrictedBaseController.java
deleted file mode 100644
index 286678cc..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/EPRestrictedBaseController.java
+++ /dev/null
@@ -1,52 +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.controller;
-
-public class EPRestrictedBaseController extends EPFusionBaseController{
-
- protected String viewName;
- private String exceptionView;
-
- @Override
- public boolean isAccessible() {
- return false;
- }
-
- @Override
- public boolean isRESTfulCall(){
- return false;
- }
-
- protected String getViewName() {
- return viewName;
- }
-
- protected void setViewName(String viewName) {
- this.viewName = viewName;
- }
-
- public String getExceptionView() {
- return (exceptionView == null) ? "runtime_error_handler" : exceptionView;
- }
-
- public void setExceptionView(String exceptionView) {
- this.exceptionView = exceptionView;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/EPRestrictedRESTfulBaseController.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/EPRestrictedRESTfulBaseController.java
deleted file mode 100644
index 69504a13..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/EPRestrictedRESTfulBaseController.java
+++ /dev/null
@@ -1,54 +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.controller;
-
-public class EPRestrictedRESTfulBaseController extends EPFusionBaseController{
-
- protected String viewName;
- private String exceptionView;
-
- @Override
- public boolean isAccessible() {
- return false;
- }
-
- @Override
- public boolean isRESTfulCall(){
- return true;
- }
-
- protected String getViewName() {
- return viewName;
- }
-
- protected void setViewName(String viewName) {
- this.viewName = viewName;
- }
-
- public String getExceptionView() {
- return (exceptionView == null) ? "runtime_error_handler" : exceptionView;
- }
-
- public void setExceptionView(String exceptionView) {
- this.exceptionView = exceptionView;
- }
-
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/EPUnRestrictedBaseController.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/EPUnRestrictedBaseController.java
deleted file mode 100644
index 7f23ce4c..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/EPUnRestrictedBaseController.java
+++ /dev/null
@@ -1,42 +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.controller;
-
-public class EPUnRestrictedBaseController extends EPFusionBaseController{
- protected String viewName;
-
- @Override
- public boolean isAccessible() {
- return true;
- }
-
- @Override
- public boolean isRESTfulCall(){
- return false;
- }
-
- protected String getViewName() {
- return viewName;
- }
-
- protected void setViewName(String viewName) {
- this.viewName = viewName;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/LoginController.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/LoginController.java
deleted file mode 100644
index 632f9178..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/LoginController.java
+++ /dev/null
@@ -1,356 +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.controller;
-
-import static com.att.eelf.configuration.Configuration.MDC_KEY_REQUEST_ID;
-
-import java.net.URLDecoder;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.json.JSONObject;
-import org.openecomp.portalapp.command.EPLoginBean;
-import org.openecomp.portalapp.portal.domain.SharedContext;
-import org.openecomp.portalapp.portal.service.EPLoginService;
-import org.openecomp.portalapp.portal.service.SharedContextService;
-import org.openecomp.portalapp.portal.utils.EPSystemProperties;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalapp.service.EPProfileService;
-import org.openecomp.portalapp.util.EPUserUtils;
-import org.openecomp.portalapp.util.SessionCookieUtil;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.openecomp.portalsdk.core.menu.MenuProperties;
-import org.openecomp.portalsdk.core.onboarding.crossapi.PortalTimeoutHandler;
-import org.openecomp.portalsdk.core.util.CipherUtil;
-import org.openecomp.portalsdk.core.util.SystemProperties;
-import org.openecomp.portalsdk.core.web.support.AppUtils;
-import org.slf4j.MDC;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.util.StopWatch;
-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.servlet.ModelAndView;
-import org.springframework.web.util.WebUtils;
-
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-@Controller
-@RequestMapping("/")
-public class LoginController extends EPUnRestrictedBaseController implements LoginService{
-
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(LoginController.class);
-
- public static final String DEFAULT_SUCCESS_VIEW = "applicationsHome";
- public static final String DEFAULT_FAILURE_VIEW = "login";
- public static final String ERROR_MESSAGE_KEY = "error";
- public static final String REDIRECT_URL = "redirectUrl";
-
- @Autowired
- EPProfileService service;
- @Autowired
- private EPLoginService loginService;
- @Autowired
- private SharedContextService sharedContextService;
-
- String viewName = "login";
- private String welcomeView;
-
- public String getWelcomeView() {
- return welcomeView;
- }
-
- public void setWelcomeView(String welcomeView) {
- this.welcomeView = welcomeView;
- }
-
- @RequestMapping(value = {"/login.htm" }, method = RequestMethod.GET)
- public ModelAndView login(HttpServletRequest request, HttpServletResponse response) {
- Map<String, Object> model = new HashMap<String, Object>();
-
- String authentication = SystemProperties.getProperty(SystemProperties.AUTHENTICATION_MECHANISM);
-
- String loginPage;
-
- if (authentication == null || authentication.equals("") || authentication.trim().equals("OIDC"))
- loginPage = "openIdLogin";
- else
- loginPage = getViewName();
-
- return new ModelAndView(loginPage,"model", model);
- }
-
- @SuppressWarnings("rawtypes")
- @RequestMapping(value = {"/open_source/login" }, method = RequestMethod.POST)
- public @ResponseBody String loginValidate(HttpServletRequest request, HttpServletResponse response) throws Exception{
-
- ObjectMapper mapper = new ObjectMapper();
- mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
- JsonNode root = mapper.readTree(request.getReader());
-
- EPLoginBean commandBean = new EPLoginBean();
- String loginId = root.get("loginId").textValue();
- String password = root.get("password").textValue();
- commandBean.setLoginId(loginId);
- commandBean.setLoginPwd(CipherUtil.encrypt(password));
- HashMap additionalParamsMap = new HashMap();
- StringBuilder sbAdditionalInfo = new StringBuilder();
-
- commandBean = getLoginService().findUser(commandBean, (String)request.getAttribute(MenuProperties.MENU_PROPERTIES_FILENAME_KEY),
- additionalParamsMap);
- String fullURL = EPUserUtils.getFullURL(request);
- if (commandBean.getUser() == null) {
- String loginErrorMessage = (commandBean.getLoginErrorMessage() != null) ? commandBean.getLoginErrorMessage()
- : "login.error.external.invalid";
-
- logger.info(EELFLoggerDelegate.debugLogger, "loginId = " + loginId + " does not exist in the the DB.");
- logger.info(EELFLoggerDelegate.errorLogger, "loginId = " + loginId + " does not exist in the the DB.");
- sbAdditionalInfo.append(String.format("But the Login-Id: %s doesn't exist in the Database. Request-URL: %s",
- loginId, fullURL));
- return loginErrorMessage;
- }
- else {
- // store the currently logged in user's information in the session
- EPUserUtils.setUserSession(request, commandBean.getUser(), commandBean.getMenu(), commandBean.getBusinessDirectMenu(),
- null);
-
- try{
- logger.info(EELFLoggerDelegate.debugLogger, "******************* store user info into share context begins");
- String sessionId = request.getSession().getId();
- List<SharedContext> existingSC = getSharedContextService().getSharedContexts(sessionId);
- if(existingSC==null || existingSC.size()==0){
- getSharedContextService().addSharedContext(sessionId, EPSystemProperties.USER_FIRST_NAME, commandBean.getUser().getFirstName());
- getSharedContextService().addSharedContext(sessionId, EPSystemProperties.USER_LAST_NAME, commandBean.getUser().getLastName());
- getSharedContextService().addSharedContext(sessionId, EPSystemProperties.USER_EMAIL, commandBean.getUser().getEmail());
- getSharedContextService().addSharedContext(sessionId, EPSystemProperties.USER_ORG_USERID, commandBean.getLoginId());
- }
-
- }catch(Exception e){
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- logger.info(EELFLoggerDelegate.errorLogger, "failed the shared context adding process " + e.getMessage());
- logger.info(EELFLoggerDelegate.debugLogger, "********************** failed the shared context adding process " + e.getMessage());
- }
- logger.info(EELFLoggerDelegate.debugLogger, "********************* PresetUp the EP service cookie and intial sessionManagement");
-
- SessionCookieUtil.preSetUp(request, response);
- SessionCookieUtil.setUpUserIdCookie(request, response, loginId);
-
- JSONObject j = new JSONObject("{success: success}");
-
- return j.toString();
-
- }
-
- }
-
- @RequestMapping(value = {"/processSingleSignOn" }, method = RequestMethod.GET)
- public ModelAndView processSingelSignOn(HttpServletRequest request, HttpServletResponse response) throws Exception{
-
- Map<Object, Object> model = new HashMap<Object, Object>();
- HashMap<Object, Object> additionalParamsMap = new HashMap<Object, Object>();
- EPLoginBean commandBean = new EPLoginBean();
- MDC.put(MDC_KEY_REQUEST_ID, EPUserUtils.getRequestId(request));
- String orgUserId = "";
- //get userId from cookie
- orgUserId = SessionCookieUtil.getUserIdFromCookie(request, response);
- logger.info(EELFLoggerDelegate.debugLogger, "******************** process_singelSignOn process begins");
- logger.info(EELFLoggerDelegate.debugLogger, "******************* We get the orgUserId " + orgUserId);
-
- StringBuilder sbAdditionalInfo = new StringBuilder();
- if ((orgUserId == null || orgUserId.length() == 0)) {
- model.put(ERROR_MESSAGE_KEY, SystemProperties.MESSAGE_KEY_LOGIN_ERROR_COOKIE_EMPTY);
- if(request.getParameter("redirectUrl")!=null && request.getParameter("redirectUrl").length()!=0){
- return new ModelAndView("redirect:" + DEFAULT_FAILURE_VIEW + ".htm" + "?redirectUrl=" + request.getParameter("redirectUrl"));
- }else{
- return new ModelAndView("redirect:" + DEFAULT_FAILURE_VIEW + ".htm");
- }
- }
- else {
-
- StopWatch stopWatch = new StopWatch("LoginController.Login");
- stopWatch.start();
-
- try {
- logger.info(EELFLoggerDelegate.metricsLogger, "Operation findUser is started to locate " + orgUserId + " in the database.");
- logger.info(EELFLoggerDelegate.debugLogger, "Operation findUser is started to locate " + orgUserId + " in the database.");
- commandBean.setLoginId(orgUserId);
- commandBean.setOrgUserId(orgUserId);
- commandBean = getLoginService().findUserWithoutPassword(commandBean, (String)request.getAttribute(MenuProperties.MENU_PROPERTIES_FILENAME_KEY), additionalParamsMap);
-
- stopWatch.stop();
- MDC.put(EPSystemProperties.MDC_TIMER, stopWatch.getTotalTimeMillis() + "ms");
- logger.info(EELFLoggerDelegate.metricsLogger, "Operation findUser is completed.");
- logger.info(EELFLoggerDelegate.debugLogger, "Operation findUser is completed.");
- } catch(Exception e) {
- stopWatch.stop();
- MDC.put(EPSystemProperties.MDC_TIMER, stopWatch.getTotalTimeMillis() + "ms");
- logger.info(EELFLoggerDelegate.errorLogger, "Exception occurred while performing findUser " + orgUserId + ". Details: " + EcompPortalUtils.getStackTrace(e));
- logger.info(EELFLoggerDelegate.debugLogger, "Exception occurred while performing findUser " + orgUserId + ". Details: " + EcompPortalUtils.getStackTrace(e));
- logger.info(EELFLoggerDelegate.metricsLogger, "Operation findUser is failed.");
- } finally {
- MDC.remove(EPSystemProperties.MDC_TIMER);
- }
-
- sbAdditionalInfo.append("Login attempt is succeeded. ");
- String fullURL = EPUserUtils.getFullURL(request);
- if (commandBean.getUser() == null) {
- logger.info(EELFLoggerDelegate.debugLogger, "loginId = " + orgUserId + " does not exist in the the DB.");
- logger.info(EELFLoggerDelegate.errorLogger, "loginId = " + orgUserId + " does not exist in the the DB.");
- logger.info(EELFLoggerDelegate.debugLogger, "loginId = " + orgUserId + " does not exist in the the DB.");
-
- sbAdditionalInfo.append(String.format("But the Login-Id: %s doesn't exist in the Database. Created a Guest Session. Request-URL: %s",
- orgUserId, fullURL));
- if(request.getParameter("redirectUrl")!=null && request.getParameter("redirectUrl").length()!=0){
- return new ModelAndView("redirect:" + DEFAULT_FAILURE_VIEW + ".htm" + "?redirectUrl=" + request.getParameter("redirectUrl"));
- }else{
- return new ModelAndView("redirect:" + DEFAULT_FAILURE_VIEW + ".htm");
- }
- }
- else {
-
- sbAdditionalInfo.append(String.format("Login-Id: %s, Login-Method: %s, Request-URL: %s", orgUserId, "", fullURL));
- logger.info(EELFLoggerDelegate.debugLogger, "*********************** now set up user session for " + orgUserId);
-
- EPUserUtils.setUserSession(request, commandBean.getUser(), commandBean.getMenu(), commandBean.getBusinessDirectMenu(), "");
- logger.info(EELFLoggerDelegate.debugLogger, "*********************** now set up user session for " + orgUserId + " finished");
-
- //Store user's information into share context
- try{
- logger.info(EELFLoggerDelegate.debugLogger, "******************* store user info into share context begins");
-
- String sessionId = request.getSession().getId();
- List<SharedContext> existingSC = getSharedContextService().getSharedContexts(sessionId);
- if(existingSC==null || existingSC.size()==0){
- getSharedContextService().addSharedContext(sessionId, EPSystemProperties.USER_FIRST_NAME, commandBean.getUser().getFirstName());
- getSharedContextService().addSharedContext(sessionId, EPSystemProperties.USER_LAST_NAME, commandBean.getUser().getLastName());
- getSharedContextService().addSharedContext(sessionId, EPSystemProperties.USER_EMAIL, commandBean.getUser().getEmail());
- getSharedContextService().addSharedContext(sessionId, EPSystemProperties.USER_ORG_USERID, commandBean.getLoginId());
- }
-
- }catch(Exception e){
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- logger.info(EELFLoggerDelegate.errorLogger, "failed the shared context adding process " + e.getMessage());
- logger.info(EELFLoggerDelegate.debugLogger, "********************** failed the shared context adding process " + e.getMessage());
-
- }
-
- logger.info(EELFLoggerDelegate.debugLogger, "********************* PresetUp the EP service cookie and intial sessionManagement");
-
- SessionCookieUtil.preSetUp(request, response);
- SessionCookieUtil.setUpUserIdCookie(request, response, orgUserId);
- logger.info(EELFLoggerDelegate.debugLogger, "********************* PresetUp the EP service cookie and intial sessionManagement completed");
- logger.info(EELFLoggerDelegate.errorLogger, commandBean.getUser().getOrgUserId() + " exists in the the system.");
- logger.info(EELFLoggerDelegate.debugLogger, commandBean.getUser().getOrgUserId() + " exists in the the system.");
-
- String redirect = "redirectUrl";
-
- //get redirectUrl from URL parameter
- if(request.getParameter(redirect)!=null && request.getParameter(redirect).length()!=0){
- String forwardUrl = URLDecoder.decode(request.getParameter(redirect),"UTF-8");
- //clean cookie
- Cookie cookie2 = new Cookie(redirect, "");
- cookie2.setMaxAge(0);
- cookie2.setDomain(EPSystemProperties.getProperty(EPSystemProperties.COOKIE_DOMAIN));
- cookie2.setPath("/");
- response.addCookie(cookie2);
- return new ModelAndView("redirect:" + forwardUrl);
- }
-
- //first check if redirectUrl exists or not
- if(WebUtils.getCookie(request, redirect)!=null){
- String forwardUrl = WebUtils.getCookie(request, redirect).getValue();
- //clean cookie
- Cookie cookie2 = new Cookie(redirect, "");
- cookie2.setMaxAge(0);
- cookie2.setDomain(EPSystemProperties.getProperty(EPSystemProperties.COOKIE_DOMAIN));
- cookie2.setPath("/");
- response.addCookie(cookie2);
-
- return new ModelAndView("redirect:" + forwardUrl);
- }
- }
- }
-
- // if user has been authenticated, now take them to the welcome page.
- //return new ModelAndView("redirect:" + DEFAULT_SUCCESS_VIEW + ".htm");
- logger.info(EELFLoggerDelegate.debugLogger, "********************** Now return to application home page");
-
- return new ModelAndView("redirect:" + SystemProperties.getProperty(EPSystemProperties.FE_URL));
-
- //
- // Re-enable for BE/FE separation. For 1607, at last minute we decided to go out
- // without BE/FE separation.
- //
- //return new ModelAndView("redirect:" + SystemProperties.getProperty(EPSystemProperties.FE_URL));
-
- }
-
- public String getJessionId(HttpServletRequest request){
-
- return request.getSession().getId();
- /*
- Cookie ep = WebUtils.getCookie(request, JSESSIONID);
- if(ep==null){
- return request.getSession().getId();
- }
- return ep.getValue();
- */
- }
-
-
- 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 EPLoginService getLoginService() {
- return loginService;
- }
-
- public void setLoginService(EPLoginService loginService) {
- this.loginService = loginService;
- }
-
- public SharedContextService getSharedContextService() {
- return sharedContextService;
- }
-
- public void setSharedContextService(SharedContextService sharedContextService) {
- this.sharedContextService = sharedContextService;
- }
-
-
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/LoginService.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/LoginService.java
deleted file mode 100644
index f69916a0..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/LoginService.java
+++ /dev/null
@@ -1,36 +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.controller;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.servlet.ModelAndView;
-
-public interface LoginService {
-
- public ModelAndView login(HttpServletRequest request, HttpServletResponse response);
-
- public @ResponseBody String loginValidate(HttpServletRequest request, HttpServletResponse response) throws Exception;
-
- public ModelAndView processSingelSignOn(HttpServletRequest request, HttpServletResponse response) throws Exception;
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/OpenCollaborationController.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/OpenCollaborationController.java
deleted file mode 100644
index e360cce8..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/OpenCollaborationController.java
+++ /dev/null
@@ -1,48 +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.controller;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.util.EPUserUtils;
-import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
-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 OpenCollaborationController extends RestrictedBaseController{
-
- @RequestMapping(value = {"/opencollaboration" }, method = RequestMethod.GET)
- public ModelAndView view(HttpServletRequest request) {
- Map<String, Object> model = new HashMap<String, Object>();
- EPUser user = (EPUser) EPUserUtils.getUserSession(request);
-
- model.put("name",(user.getFirstName() + " " + (user.getLastName() != null? user.getLastName().substring(0,1): "" )));
- return new ModelAndView("collaboration","model", model);
- }
-
-} \ No newline at end of file
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/PeerBroadcastSocket.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/PeerBroadcastSocket.java
deleted file mode 100644
index 92dc9294..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/PeerBroadcastSocket.java
+++ /dev/null
@@ -1,106 +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.controller;
-
-import java.io.IOException;
-import java.util.Hashtable;
-import java.util.Map;
-
-import javax.websocket.OnClose;
-import javax.websocket.OnMessage;
-import javax.websocket.OnOpen;
-import javax.websocket.Session;
-import javax.websocket.server.ServerEndpoint;
-
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-@ServerEndpoint("/opencontact")
-public class PeerBroadcastSocket {
-
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PeerBroadcastSocket.class);
-
- public static Map<String, Object> channelMap = new Hashtable<String, Object>();
- public Map<String, String> sessionMap = new Hashtable<String, String>();
- ObjectMapper mapper = new ObjectMapper();
-
- @OnMessage
- public void message(String message, Session session) {
- try {
- // JSONObject jsonObject = new JSONObject(message);
- @SuppressWarnings("unchecked")
- Map<String, Object> jsonObject = mapper.readValue(message, Map.class);
- try {
- Object from = jsonObject.get("from");
- if (from != null) {
- if(channelMap.get(from.toString()) == null) {
- channelMap.put(from.toString(), session);
- sessionMap.put(session.getId(), from.toString());
- }
- }
- } catch (Exception je) {
- logger.error(EELFLoggerDelegate.errorLogger, "Failed to read value" + je.getMessage());
- }
-
- try {
- Object to = jsonObject.get("to");
- if (to == null)
- return;
- Object toSessionObj = channelMap.get(to);
- if (toSessionObj != null) {
- Session toSession = null;
- toSession = (Session) toSessionObj;
- toSession.getBasicRemote().sendText(message);
- }
-
- } catch (Exception ex) {
- logger.error(EELFLoggerDelegate.errorLogger, "Failed to send text" + ex.getMessage());
- }
-
- } catch (Exception ex) {
- logger.error(EELFLoggerDelegate.errorLogger, "Failed" + ex.getMessage());
- }
-
- }
-
- @OnOpen
- public void open(Session session) {
- logger.info(EELFLoggerDelegate.debugLogger, "Channel opened");
- }
-
- @OnClose
- public void close(Session session) {
- String channel = sessionMap.get(session.getId());
- if (channel != null) {
- Object sessObj = channelMap.get(channel);
- if (sessObj != null) {
- try {
- ((Session) sessObj).close();
- } catch (IOException e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Failed to close" + e.getMessage());
- }
- }
- channelMap.remove(channel);
- }
- logger.info(EELFLoggerDelegate.debugLogger, "Channel closed");
- }
-
-}
-
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/UserProfileController.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/UserProfileController.java
deleted file mode 100644
index d7e50ebf..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/UserProfileController.java
+++ /dev/null
@@ -1,77 +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.controller;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalapp.service.EPProfileService;
-import org.openecomp.portalsdk.core.domain.Profile;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.EnableAspectJAutoProxy;
-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;
-
-import com.fasterxml.jackson.core.JsonGenerationException;
-import com.fasterxml.jackson.databind.JsonMappingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-@Controller
-@RequestMapping("/")
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPAuditLog
-public class UserProfileController extends EPRestrictedBaseController {
-
- @Autowired
- EPProfileService service;
-
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(UserProfileController.class);
-
- @RequestMapping(value = {"/user_profile" }, method = RequestMethod.GET)
- public ModelAndView ProfileSearch(HttpServletRequest request) {
- Map<String, Object> model = new HashMap<String, Object>();
- ObjectMapper mapper = new ObjectMapper();
-
- try {
- List<Profile> profileList = service.findAll();
- model.put("customerInfo", mapper.writeValueAsString(profileList));
- } catch (JsonGenerationException e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Encountered an JsonGenerationException while performing the ProfileSearch, Details:" + EcompPortalUtils.getStackTrace(e));
- } catch (JsonMappingException e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Encountered an JsonMappingException while performing the ProfileSearch, Details:" + EcompPortalUtils.getStackTrace(e));
- } catch (IOException e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Encountered an IOException while performing the ProfileSearch, Details:" + EcompPortalUtils.getStackTrace(e));
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Encountered an Exception while performing the ProfileSearch, Details:" + EcompPortalUtils.getStackTrace(e));
- }
-
- return new ModelAndView("user_profile", "model", model);
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/WelcomeController.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/WelcomeController.java
deleted file mode 100644
index 264f0f59..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/WelcomeController.java
+++ /dev/null
@@ -1,89 +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.controller;
-
-import java.security.Principal;
-import java.util.Set;
-
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.mitre.openid.connect.client.SubjectIssuerGrantedAuthority;
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
-import org.springframework.context.annotation.EnableAspectJAutoProxy;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.servlet.ModelAndView;
-
-@Controller
-@RequestMapping("/")
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPAuditLog
-public class WelcomeController extends EPRestrictedBaseController{
- String viewName;
-
- @RequestMapping(value = {"/welcome" }, method = RequestMethod.GET)
- public ModelAndView welcome(HttpServletRequest request) {
- return new ModelAndView(getViewName());
- }
-
- @RequestMapping(value = "/index.htm", method = RequestMethod.GET)
- public String getIndexPage(HttpServletRequest request) {
- return "/index";
- }
-
- @RequestMapping(value = {"/applicationsHome", "/dashboard", "/widgetsHome", "/kpidash*", "/admins", "/users", "/portalAdmins", "/applications", "/widgets", "/functionalMenu", "/contactUs", "/getAccess","/appCatalog" }, method = RequestMethod.GET)
- public String getEcompSinglePage(HttpServletRequest request, HttpServletResponse response) {
- return "forward:/index.html";
- }
-
- protected String getViewName() {
- return viewName;
- }
-
- protected void setViewName(String viewName) {
- this.viewName = viewName;
- }
-
-
- @Resource(name = "namedAdmins")
- private Set<SubjectIssuerGrantedAuthority> admins;
-
- @RequestMapping("/user")
- public String user(Principal p) {
- return "oid-user";
- }
-
- @RequestMapping("/admin")
- public String admin(Model model, Principal p) {
-
- model.addAttribute("admins", admins);
-
- return "oid-admin";
- }
- @RequestMapping("/oid-login")
- public ModelAndView login(Principal p) {
- return new ModelAndView("openIdLogin");
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/sessionmgt/SessionCommunicationController.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/sessionmgt/SessionCommunicationController.java
deleted file mode 100644
index 0348fb8d..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/controller/sessionmgt/SessionCommunicationController.java
+++ /dev/null
@@ -1,64 +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.controller.sessionmgt;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.openecomp.portalapp.controller.EPRestrictedRESTfulBaseController;
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
-import org.openecomp.portalapp.service.sessionmgt.ManageService;
-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.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-
-@RestController
-@RequestMapping("/auxapi")
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPAuditLog
-public class SessionCommunicationController extends EPRestrictedRESTfulBaseController {
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SessionCommunicationController.class);
-
- @Autowired
- ManageService manageService;
-
- protected boolean isAuxRESTfulCall(){
- return true;
- }
-
- @RequestMapping(value={"/getSessionSlotCheckInterval"}, method = RequestMethod.GET, produces = "application/json")
- public Integer getSessionSlotCheckInterval(HttpServletRequest request, HttpServletResponse response) throws Exception {
- return manageService.fetchSessionSlotCheckInterval();
- }
-
- @RequestMapping(value={"/extendSessionTimeOuts"}, method = RequestMethod.POST)
- public Boolean extendSessionTimeOuts(HttpServletRequest request, HttpServletResponse response, @RequestParam String sessionMap) throws Exception {
- manageService.extendSessionTimeOuts(sessionMap);
-
- return true;
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/controller/KpiDashboardController.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/controller/KpiDashboardController.java
deleted file mode 100644
index b3a4f0cb..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/controller/KpiDashboardController.java
+++ /dev/null
@@ -1,268 +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.kpidash.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.kpidash.model.KpiApiStats;
-import org.openecomp.portalapp.kpidash.model.KpiServiceSupported;
-import org.openecomp.portalapp.kpidash.model.KpiUserStoryStats;
-import org.openecomp.portalapp.kpidash.service.KpiDashboardService;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-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
-//@RequestMapping("/")
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPAuditLog
-//public class KpiDashboardController extends EPUnRestrictedBaseController {
-public class KpiDashboardController extends EPRestrictedBaseController {
-
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(KpiDashboardController.class);
-
- @Autowired
- KpiDashboardService service;
-
- @SuppressWarnings("unchecked")
- @RequestMapping(value = { "/portalApi/get_user_stories_stats" }, method = RequestMethod.GET, produces = "application/json")
- public List<KpiUserStoryStats> getUserStories(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- List<KpiUserStoryStats> userStories = null;
-
- try {
- if (user == null) {
- EcompPortalUtils.setBadPermissions(user, response, "getUserApps");
- } else {
- userStories = (List<KpiUserStoryStats>) service.getUserStories();
- EcompPortalUtils.logAndSerializeObject("/portalApi/get_user_stories_stats", "GET result =", userStories);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing getUserApps operation, Details: " + EcompPortalUtils.getStackTrace(e));
- }
- return userStories;
- }
-
- @RequestMapping(value = { "/portalApi/save_user_stories_stats" }, method = RequestMethod.GET, produces = "application/json")
- public void saveUserStories(@RequestBody KpiUserStoryStats kpiUserStoryStats) {
- service.saveUserStories(kpiUserStoryStats);
- }
-
- @SuppressWarnings("unchecked")
- @RequestMapping(value = { "/portalApi/update_user_stories_stats" }, method = RequestMethod.POST)
- public List<KpiUserStoryStats> updateUserStories(@RequestBody KpiUserStoryStats kpiUserStoryStats) {
- service.updateUserStories(kpiUserStoryStats);
- return (List<KpiUserStoryStats>) service.getUserStories();
- }
-
- @SuppressWarnings("unchecked")
- @RequestMapping(value = { "/portalApi/get_user_api_stats" }, method = RequestMethod.GET, produces = "application/json")
- public List<KpiApiStats> getUserApis(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- List<KpiApiStats> apiStats = null;
-
- try {
- if (user == null) {
- EcompPortalUtils.setBadPermissions(user, response, "getUserApps");
- } else {
- apiStats = (List<KpiApiStats>) service.getUserApis();
- EcompPortalUtils.logAndSerializeObject("/portalApi/get_user_api_stats", "GET result =", apiStats);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing getUserApps operation, Details: " + EcompPortalUtils.getStackTrace(e));
- }
- return apiStats;
- }
-
- @SuppressWarnings("unchecked")
- @RequestMapping(value = { "/portalApi/get_kpi_service_supported" }, method = RequestMethod.GET, produces = "application/json")
- public List<KpiServiceSupported> getKpiServiceSupported(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- List<KpiServiceSupported> kpiServiceSupported = null;
-
- try {
- if (user == null) {
- EcompPortalUtils.setBadPermissions(user, response, "getUserApps");
- } else {
- kpiServiceSupported = (List<KpiServiceSupported>) service.getKpiServiceSupported();
- EcompPortalUtils.logAndSerializeObject("/portalApi/get_kpi_service_supported", "GET result =", kpiServiceSupported);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing getUserApps operation, Details: " + EcompPortalUtils.getStackTrace(e));
- }
- return kpiServiceSupported;
-// return (List<KpiServiceSupported>) service.getKpiServiceSupported();
- }
-
- @SuppressWarnings("unchecked")
- @RequestMapping(value = { "/portalApi/update_user_api_stats" }, method = RequestMethod.POST)
- public List<KpiApiStats> updateUserApis(@RequestBody KpiApiStats kpiApiStats) {
- service.updateUserApis(kpiApiStats);
- return (List<KpiApiStats>) service.getUserApis();
- }
-
- @SuppressWarnings("unchecked")
- @RequestMapping(value = { "/portalApi/execute_get_published_delivered" }, method = RequestMethod.GET, produces = "application/json")
- public List<String> getPublishedDelivered(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- List<String> publishedDelivered = null;
-
- try {
- if (user == null) {
- EcompPortalUtils.setBadPermissions(user, response, "getUserApps");
- } else {
- publishedDelivered = service.executeGetBytesPublishedDelivered();
- EcompPortalUtils.logAndSerializeObject("/portalApi/execute_get_published_delivered", "GET result =", publishedDelivered);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing getLOCStatsCat operation, Details: " + EcompPortalUtils.getStackTrace(e));
- }
- return publishedDelivered;
- // return service.executeGetBytesPublishedDelivered();
- }
-
- @SuppressWarnings("unchecked")
- @RequestMapping(value = { "/portalApi/execute_get_feed_stats" }, method = RequestMethod.GET, produces = "application/json")
- public List<Long> getFeedStats(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- List<Long> feedStats= null;
-
- try {
- if (user == null) {
- EcompPortalUtils.setBadPermissions(user, response, "getUserApps");
- } else {
- feedStats = service.executeGetFeedStats();
- EcompPortalUtils.logAndSerializeObject("/portalApi/execute_get_feed_stats", "GET result =", feedStats);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing getLOCStatsCat operation, Details: " + EcompPortalUtils.getStackTrace(e));
- }
- return feedStats;
-// return service.executeGetFeedStats();
- }
-
- @SuppressWarnings("unchecked")
- @RequestMapping(value = { "/portalApi/get_loc_stats_cat" }, method = RequestMethod.GET, produces = "application/json")
- public List<String> getLOCStatsCat(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- List<String> LOCStatsCat = null;
-
- try {
- if (user == null) {
- EcompPortalUtils.setBadPermissions(user, response, "getUserApps");
- } else {
- LOCStatsCat = service.getLOCStatsCat();
- EcompPortalUtils.logAndSerializeObject("/portalApi/get_loc_stats_cat", "GET result =", LOCStatsCat);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing getLOCStatsCat operation, Details: " + EcompPortalUtils.getStackTrace(e));
- }
- return LOCStatsCat;
- }
-
- @SuppressWarnings("unchecked")
- @RequestMapping(value = { "/portalApi/get_loc_stats" }, method = RequestMethod.GET, produces = "application/json")
- public List<Long> getLOCStats(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- List<Long> LOCStats = null;
-
- try {
- if (user == null) {
- EcompPortalUtils.setBadPermissions(user, response, "getUserApps");
- } else {
- LOCStats = service.getLOCStats();
- EcompPortalUtils.logAndSerializeObject("/portalApi/get_loc_stats", "GET result =", LOCStats);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing getLOCStats operation, Details: " + EcompPortalUtils.getStackTrace(e));
- }
- return LOCStats;
- }
-
- @RequestMapping(value = { "/portalApi/get_geo_map_url" }, method = RequestMethod.GET, produces = "text/plain")
- public String getGeoMapUrl(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- String geoMapUrl = null;
-
- try {
- if (user == null) {
- EcompPortalUtils.setBadPermissions(user, response, "getUserApps");
- } else {
- geoMapUrl = service.getGeoMapUrl();
- EcompPortalUtils.logAndSerializeObject("/portalApi/get_geo_map_url", "GET result =", geoMapUrl);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing getGeoMapUrl operation, Details: " + EcompPortalUtils.getStackTrace(e));
- }
-
- return geoMapUrl;
- }
-
- @RequestMapping(value = { "/portalApi/get_rcloud_a_url" }, method = RequestMethod.GET, produces = "text/plain")
- public String getRCloudAUrl(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- String rcloudUrl = null;
-
- try {
- if (user == null) {
- EcompPortalUtils.setBadPermissions(user, response, "getUserApps");
- } else {
- rcloudUrl = service.getRCloudAUrl();
- EcompPortalUtils.logAndSerializeObject("/portalApi/get_rcloud_a_url", "GET result =", rcloudUrl);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing getGeoMapUrl operation, Details: " + EcompPortalUtils.getStackTrace(e));
- }
-
- return rcloudUrl;
- }
-
- @RequestMapping(value = { "/portalApi/get_geo_map_api_url" }, method = RequestMethod.GET, produces = "text/plain")
- public String getGeoMapApiUrl(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- String geoMapApiUrl = null;
-
- try {
- if (user == null) {
- EcompPortalUtils.setBadPermissions(user, response, "getUserApps");
- } else {
- geoMapApiUrl = service.getGeoMapApiUrl();
- EcompPortalUtils.logAndSerializeObject("/portalApi/get_geo_map_api_url", "GET result =", geoMapApiUrl);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing getGeoMapApiUrl operation, Details: " + EcompPortalUtils.getStackTrace(e));
- }
-
- return geoMapApiUrl;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpiApiStats.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpiApiStats.java
deleted file mode 100644
index fb646ef5..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpiApiStats.java
+++ /dev/null
@@ -1,74 +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.kpidash.model;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-import org.openecomp.portalsdk.core.domain.support.DomainVo;
-
-@Entity
-@Table(name = "kpi_api_stats")
-public class KpiApiStats extends DomainVo {
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- @Id
- @Column(name = "api_type")
- private String apiType;
-
- @Column(name = "total_api")
- private Long totalApi;
-
- @Column(name = "comment")
- private String comment;
-
- public KpiApiStats() {
- }
-
- public String getApiType() {
- return apiType;
- }
-
- public void setApiType(String apiType) {
- this.apiType = apiType;
- }
-
- public Long getTotalApi() {
- return totalApi;
- }
-
- public void setTotalApi(Long totalApi) {
- this.totalApi = totalApi;
- }
-
- public String getComment() {
- return comment;
- }
-
- public void setComment(String comment) {
- this.comment = comment;
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpiServiceSupported.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpiServiceSupported.java
deleted file mode 100644
index 1e768390..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpiServiceSupported.java
+++ /dev/null
@@ -1,60 +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.kpidash.model;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-import org.openecomp.portalsdk.core.domain.support.DomainVo;
-
-@Entity
-@Table(name = "kpi_service_supported")
-public class KpiServiceSupported extends DomainVo {
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- @Id
- @Column(name = "service_type")
- private String serviceType;
-
- @Column(name = "total_count")
- private Long totalCount;
-
- public String getServiceType() {
- return serviceType;
- }
-
- public void setServiceType(String serviceType) {
- this.serviceType = serviceType;
- }
-
- public Long getTotalCount() {
- return totalCount;
- }
-
- public void setTotalCount(Long totalCount) {
- this.totalCount = totalCount;
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpiUserStoryStats.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpiUserStoryStats.java
deleted file mode 100644
index e4337cca..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpiUserStoryStats.java
+++ /dev/null
@@ -1,107 +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.kpidash.model;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-import org.openecomp.portalsdk.core.domain.support.DomainVo;
-
-@Entity
-@Table(name = "kpi_user_story_stats1")
-public class KpiUserStoryStats extends DomainVo {
- /**
- *
- */
- private static final long serialVersionUID = -1193197465342848502L;
-
- @Id
- @Column(name = "release_key")
- private String releaseKey;
-
- @Column(name = "delivered")
- private Long delivered;
-
- @Column(name = "in_progress")
- private Long inProgress;
-
- @Column(name = "IST_progress_readiness")
- private String ISTProgressReadiness;
-
- @Column(name = "E2E_progress_readiness")
- private String E2EProgressReadiness;
-
- @Column(name = "Key_Highlights")
- private String KeyHighlights;
-
- public KpiUserStoryStats() {
- }
-
- public String getReleaseKey() {
- return releaseKey;
- }
-
- public void setReleaseKey(String releaseKey) {
- this.releaseKey = releaseKey;
- }
-
- public Long getDelivered() {
- return delivered;
- }
-
- public void setDelivered(Long delivered) {
- this.delivered = delivered;
- }
-
- public Long getInProgress() {
- return inProgress;
- }
-
- public void setInProgress(Long inProgress) {
- this.inProgress = inProgress;
- }
-
- public String getISTProgressReadiness() {
- return ISTProgressReadiness;
- }
-
- public void setISTProgressReadiness(String iSTProgressReadiness) {
- ISTProgressReadiness = iSTProgressReadiness;
- }
-
- public String getE2EProgressReadiness() {
- return E2EProgressReadiness;
- }
-
- public void setE2EProgressReadiness(String e2eProgressReadiness) {
- E2EProgressReadiness = e2eProgressReadiness;
- }
-
- public String getKeyHighlights() {
- return KeyHighlights;
- }
-
- public void setKeyHighlights(String keyHighlights) {
- KeyHighlights = keyHighlights;
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpidashProperties.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpidashProperties.java
deleted file mode 100644
index a6f81f4f..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpidashProperties.java
+++ /dev/null
@@ -1,33 +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.kpidash.model;
-
-import org.openecomp.portalsdk.core.util.SystemProperties;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.PropertySource;
-
-@Configuration
-@PropertySource(value = { "${container.classpath:}/WEB-INF/conf/kpidash.properties" })
-
-public class KpidashProperties extends SystemProperties {
- public static final String GEO_MAP_URL = "url.sectiona";
- public static final String RCLOUD_A_URL = "url.sectionb";
- public static final String GEO_API_URL = "url.geomapapiurl";
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/service/KpiDashboardService.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/service/KpiDashboardService.java
deleted file mode 100644
index 14892f67..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/service/KpiDashboardService.java
+++ /dev/null
@@ -1,56 +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.kpidash.service;
-
-import java.util.List;
-
-import org.openecomp.portalapp.kpidash.model.KpiApiStats;
-import org.openecomp.portalapp.kpidash.model.KpiUserStoryStats;
-
-@SuppressWarnings("rawtypes")
-public interface KpiDashboardService {
- public List getUserStories();
-
- public void saveUserStories(KpiUserStoryStats kpiUserStoryStats);
-
- public void updateUserStories(KpiUserStoryStats kpiUserStoryStats);
-
- public List getUserApis();
-
- public void saveUserApis(KpiApiStats kpiApiStats);
-
- public void updateUserApis(KpiApiStats kpiApiStats);
-
- public List getKpiServiceSupported();
-
- public List executeGetBytesPublishedDelivered();
-
- public List executeGetFeedStats();
-
- public List getLOCStatsCat();
-
- public List getLOCStats();
-
- public String getGeoMapUrl();
-
- public String getRCloudAUrl();
-
- public String getGeoMapApiUrl();
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/service/KpiDashboardServiceImpl.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/service/KpiDashboardServiceImpl.java
deleted file mode 100644
index edbc54af..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/service/KpiDashboardServiceImpl.java
+++ /dev/null
@@ -1,180 +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.kpidash.service;
-
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.openecomp.portalapp.kpidash.model.KpiApiStats;
-import org.openecomp.portalapp.kpidash.model.KpiServiceSupported;
-import org.openecomp.portalapp.kpidash.model.KpiUserStoryStats;
-import org.openecomp.portalapp.kpidash.model.KpidashProperties;
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-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;
-import org.springframework.transaction.annotation.Transactional;
-
-@SuppressWarnings("rawtypes")
-@Service("kpiDashboardService")
-@Transactional
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPMetricsLog
-public class KpiDashboardServiceImpl implements KpiDashboardService {
-
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(KpiDashboardServiceImpl.class);
-
- @Autowired
- private DataAccessService dataAccessService;
-
- @Override
- public void saveUserStories(KpiUserStoryStats kpiUserStoryStats) {
- dataAccessService.saveDomainObject(kpiUserStoryStats, null);
- }
-
- @Override
- public void updateUserStories(KpiUserStoryStats kpiUserStoryStats) {
- dataAccessService.saveDomainObject(kpiUserStoryStats, null);
- }
-
- @Override
- public List getUserStories() {
- return dataAccessService.getList(KpiUserStoryStats.class, null);
- }
-
- @Override
- public List getUserApis() {
- return dataAccessService.getList(KpiApiStats.class, null);
- }
-
- @Override
- public void saveUserApis(KpiApiStats kpiApiStats) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void updateUserApis(KpiApiStats kpiApiStats) {
- dataAccessService.saveDomainObject(kpiApiStats, null);
- }
-
- @Override
- public List getKpiServiceSupported() {
- return dataAccessService.getList(KpiServiceSupported.class, null);
- }
-
- @Override
- public List<String> executeGetBytesPublishedDelivered() {
- List list = dataAccessService.executeNamedQuery("getBytesPublishedDelivered", null, null);
- List<String> newStringList = new ArrayList<String>();
- if (list != null && list.size() > 0) {
- Object[] retunVals = (Object[]) list.get(0); // current entry in
- // VSPEntAdmin table
- newStringList.add((String) retunVals[0]);
- newStringList.add((String) retunVals[1]);
- }
- return newStringList;
- }
-
- @Override
- public List<Long> executeGetFeedStats() {
- List list = dataAccessService.executeNamedQuery("getDataRouterFeedStats", null, null);
- List<Long> newLongList = new ArrayList<Long>();
- if (list != null && list.size() > 0) {
- Object[] retunVals = (Object[]) list.get(0); // current entry in
- // VSPEntAdmin table
- newLongList.add((Long) retunVals[0]);
- newLongList.add((Long) retunVals[1]);
- newLongList.add((Long) retunVals[2]);
- }
- return newLongList;
- }
-
- @Override
- public List<String> getLOCStatsCat() {
- List list = dataAccessService.executeNamedQuery("getLOCStatsCat", null, null);
- List<String> newStringList = new ArrayList<String>();
- if (list != null && list.size() > 0) {
- for (int i = 0; i < list.size(); i++) {
- /* Object[] retunVals = (Object[]) list.get(i); */// current
- // entry in
- // VSPEntAdmin
- // table
- newStringList.add((String) list.get(i));
- }
- }
- return newStringList;
- };
-
- @Override
- public List<Long> getLOCStats() {
- List list = dataAccessService.executeNamedQuery("getLOCStats", null, null);
- List<Long> newLongList = new ArrayList<Long>();
- if (list != null && list.size() > 0) {
- for (int i = 0; i < list.size(); i++) {
- /* Object[] retunVals = (Object[]) list.get(i); */// current
- // entry in
- // VSPEntAdmin
- // table
- newLongList.add(((BigDecimal) list.get(i)).longValue());
- }
- }
- return newLongList;
- };
-
- @Override
- public String getGeoMapUrl() {
- String newURL = "";
- try {
- newURL = KpidashProperties.getProperty(KpidashProperties.GEO_MAP_URL);
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- }
- return newURL;
- }
-
- @Override
- public String getRCloudAUrl() {
- String newURL = "";
- try {
- newURL = KpidashProperties.getProperty(KpidashProperties.RCLOUD_A_URL);
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- }
- return newURL;
- }
-
- @Override
- public String getGeoMapApiUrl() {
- String newURL = "";
- try {
- newURL = KpidashProperties.getProperty(KpidashProperties.GEO_API_URL);
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- }
- return newURL;
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/model/Result.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/model/Result.java
deleted file mode 100644
index 009d0fb3..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/model/Result.java
+++ /dev/null
@@ -1,37 +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.model;
-
-public class Result {
- private String result;
-
- public Result(String result) {
- this.result = result;
- }
-
- public String getResult() {
- return result;
- }
-
- public void setResult(String result) {
- this.result = result;
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/AppCatalogController.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/AppCatalogController.java
deleted file mode 100644
index 684c299f..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/AppCatalogController.java
+++ /dev/null
@@ -1,124 +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.controller;
-
-import java.io.IOException;
-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.logging.aop.EPAuditLog;
-import org.openecomp.portalapp.portal.service.AdminRolesService;
-import org.openecomp.portalapp.portal.service.EPAppService;
-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;
-
-@RestController
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPAuditLog
-public class AppCatalogController extends EPRestrictedBaseController {
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AppCatalogController.class);
-
- @Autowired
- AdminRolesService adminRolesService;
- @Autowired
- EPAppService appService;
- @Autowired
- 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.
- *
- * @return List of items suitable for display
- */
- @RequestMapping(value = { "/portalApi/appCatalog" }, method = RequestMethod.GET, produces = "application/json")
- public List<AppCatalogItem> getAppCatalog(HttpServletRequest request, HttpServletResponse response)
- throws IOException {
- EPUser user = EPUserUtils.getUserSession(request);
- List<AppCatalogItem> appCatalog = null;
- try {
- if (user == null) {
- EcompPortalUtils.setBadPermissions(user, response, "getAppCatalog");
- } else {
- if (adminRolesService.isSuperAdmin(user))
- appCatalog = appService.getAdminAppCatalog(user);
- else
- appCatalog = appService.getUserAppCatalog(user);
- EcompPortalUtils.logAndSerializeObject("/portalApi/getAppCatalog", "GET result =", appCatalog);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Failed in getAppCatalog", e);
- response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.toString());
- }
- return appCatalog;
- }
-
- /**
- * RESTful service to accept a user's action made on the application
- * catalog.
- *
- * @param request
- * @param selectRequest
- * JSON with data including application ID
- * @param response
- * @return FieldsValidator
- * @throws IOException
- */
- @RequestMapping(value = { "/portalApi/appCatalog" }, method = RequestMethod.PUT, produces = "application/json")
- public FieldsValidator putAppCatalogSelection(HttpServletRequest request,
- @RequestBody AppCatalogPersonalization persRequest, HttpServletResponse response) throws IOException {
- FieldsValidator result = new FieldsValidator();
- EPApp app = appService.getApp(persRequest.getAppId());
- EPUser user = EPUserUtils.getUserSession(request);
- try {
- if (app == null || user == null) {
- EcompPortalUtils.setBadPermissions(user, response, "putAppCatalogSelection");
- } else {
- persUserAppService.setPersUserAppValue(user, app, persRequest.getSelect(), persRequest.getPending());
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Failed in putAppCatalogSelection", e);
- response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.toString());
- }
- result.httpStatusCode = new Long(HttpServletResponse.SC_OK);
- return result;
- }
-
-} \ No newline at end of file
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/AppContactUsController.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/AppContactUsController.java
deleted file mode 100644
index 308ab2f2..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/AppContactUsController.java
+++ /dev/null
@@ -1,224 +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.controller;
-
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.json.JSONObject;
-import org.openecomp.portalapp.controller.EPRestrictedBaseController;
-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.logging.aop.EPAuditLog;
-import org.openecomp.portalapp.portal.service.AppContactUsService;
-import org.openecomp.portalapp.portal.utils.EPSystemProperties;
-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.RestController;
-
-@RestController
-@RequestMapping("/portalApi/contactus")
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPAuditLog
-public class AppContactUsController extends EPRestrictedBaseController {
-
- static final String FAILURE = "failure";
-
- private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AppContactUsController.class);
-
- @Autowired
- private AppContactUsService contactUsService;
-
- /**
- * 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
- */
- @RequestMapping(value = "/feedback", method = RequestMethod.GET, produces = "application/json")
- public PortalRestResponse<String> getPortalDetails(HttpServletRequest request) {
- PortalRestResponse<String> portalRestResponse = null;
- try {
- final String ticketUrl = SystemProperties.getProperty(EPSystemProperties.USH_TICKET_URL);
- final String portalInfoUrl = SystemProperties.getProperty(EPSystemProperties.PORTAL_INFO_URL);
- final String feedbackEmail = SystemProperties.getProperty(EPSystemProperties.FEEDBACK_EMAIL_ADDRESS);
- HashMap<String, String> map = new HashMap<String, String>();
- map.put(EPSystemProperties.USH_TICKET_URL, ticketUrl);
- map.put(EPSystemProperties.PORTAL_INFO_URL, portalInfoUrl);
- map.put(EPSystemProperties.FEEDBACK_EMAIL_ADDRESS, feedbackEmail);
- JSONObject j = new JSONObject(map);
- String contactUsPortalResponse = j.toString();
- portalRestResponse = new PortalRestResponse<String>(PortalRestStatusEnum.OK, "success",
- contactUsPortalResponse);
- } catch (Exception e) {
- return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, FAILURE, e.getMessage());
- }
- return portalRestResponse;
- }
-
- /**
- * Answers the contents of the contact-us table, extended with the
- * application name.
- *
- * @param request
- * @return
- */
- @RequestMapping(value = "/list", method = RequestMethod.GET, produces = "application/json")
- public PortalRestResponse<List<AppContactUsItem>> getAppContactUsList(HttpServletRequest request) {
- PortalRestResponse<List<AppContactUsItem>> portalRestResponse = null;
- try {
- List<AppContactUsItem> contents = contactUsService.getAppContactUs();
- portalRestResponse = new PortalRestResponse<List<AppContactUsItem>>(PortalRestStatusEnum.OK, "success",
- contents);
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "getAppContactUsList failed", e);
- portalRestResponse = new PortalRestResponse<List<AppContactUsItem>>(PortalRestStatusEnum.ERROR,
- e.getMessage(), null);
- }
- return portalRestResponse;
- }
-
- /**
- * 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
- */
- @RequestMapping(value = "/allapps", method = RequestMethod.GET, produces = "application/json")
- public PortalRestResponse<List<AppContactUsItem>> getAppsAndContacts(HttpServletRequest request) {
- PortalRestResponse<List<AppContactUsItem>> portalRestResponse = null;
- try {
- List<AppContactUsItem> contents = contactUsService.getAppsAndContacts();
- portalRestResponse = new PortalRestResponse<List<AppContactUsItem>>(PortalRestStatusEnum.OK, "success",
- contents);
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "getAllAppsAndContacts failed", e);
- portalRestResponse = new PortalRestResponse<List<AppContactUsItem>>(PortalRestStatusEnum.ERROR,
- e.getMessage(), null);
- }
- return portalRestResponse;
- }
-
- /**
- * Sorts by category name.
- */
- private Comparator<AppCategoryFunctionsItem> appCategoryFunctionsItemComparator = new Comparator<AppCategoryFunctionsItem>() {
- @Override
- public int compare(AppCategoryFunctionsItem o1, AppCategoryFunctionsItem o2) {
- return o1.getCategory().compareTo(o2.getCategory());
- }
- };
-
- /**
- * Answers a list of objects with category-application-function details. Not
- * all applications participate in the functional menu.
- *
- * @param request
- * @return
- */
- @RequestMapping(value = "/functions", method = RequestMethod.GET, produces = "application/json")
- public PortalRestResponse<List<AppCategoryFunctionsItem>> getAppCategoryFunctions(HttpServletRequest request) {
- PortalRestResponse<List<AppCategoryFunctionsItem>> portalRestResponse = null;
- try {
- List<AppCategoryFunctionsItem> contents = contactUsService.getAppCategoryFunctions();
- // logger.debug(EELFLoggerDelegate.debugLogger,
- // "getAppCategoryFunctions: result list size is " +
- // contents.size());
- Collections.sort(contents, appCategoryFunctionsItemComparator);
- portalRestResponse = new PortalRestResponse<List<AppCategoryFunctionsItem>>(PortalRestStatusEnum.OK,
- "success", contents);
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "getAppCategoryFunctions failed", e);
- // TODO build JSON error
- portalRestResponse = new PortalRestResponse<List<AppCategoryFunctionsItem>>(PortalRestStatusEnum.ERROR,
- e.getMessage(), null);
- }
- return portalRestResponse;
- }
-
- /**
- * Accepts a new application's contact us details.
- *
- * @param contactUs
- * @return
- */
- @RequestMapping(value = "/save", method = RequestMethod.POST, produces = "application/json")
- public PortalRestResponse<String> save(@RequestBody AppContactUsItem contactUs) {
-
- if (contactUs == null || contactUs.getAppName() == null)
- return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, FAILURE,
- "AppName cannot be null or empty");
-
- String saveAppContactUs = FAILURE;
- try {
- saveAppContactUs = contactUsService.saveAppContactUs(contactUs);
- } catch (Exception e) {
- return new PortalRestResponse<String>(PortalRestStatusEnum.OK, saveAppContactUs, e.getMessage());
- }
- return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, saveAppContactUs, "");
- }
-
- @RequestMapping(value = "/saveAll", method = RequestMethod.POST, produces = "application/json")
- public PortalRestResponse<String> save(@RequestBody List<AppContactUsItem> contactUsList) {
-
- String saveAppContactUs = FAILURE;
- try {
- saveAppContactUs = contactUsService.saveAppContactUs(contactUsList);
- } catch (Exception e) {
- return new PortalRestResponse<String>(PortalRestStatusEnum.OK, saveAppContactUs, e.getMessage());
- }
- return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, saveAppContactUs, "");
- }
-
- /**
- * Deletes the specified application's contact-us details entry from the
- * table.
- *
- * @param id
- * @return
- */
- @RequestMapping(value = "/delete/{appid}", method = RequestMethod.POST, produces = "application/json")
- public PortalRestResponse<String> delete(@PathVariable("appid") Long id) {
-
- String saveAppContactUs = FAILURE;
- try {
- saveAppContactUs = contactUsService.deleteContactUs(id);
- } catch (Exception e) {
- return new PortalRestResponse<String>(PortalRestStatusEnum.OK, saveAppContactUs, e.getMessage());
- }
- return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, saveAppContactUs, "");
- }
-
-} \ No newline at end of file
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/AppsController.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/AppsController.java
deleted file mode 100644
index f460ce4d..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/AppsController.java
+++ /dev/null
@@ -1,470 +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.controller;
-
-import java.io.IOException;
-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.RestController;
-
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.json.JSONObject;
-import org.openecomp.portalapp.controller.EPRestrictedBaseController;
-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.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.PersUserAppService;
-import org.openecomp.portalapp.portal.service.UserService;
-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.portal.utils.EcompPortalUtils;
-import org.openecomp.portalapp.util.EPUserUtils;
-
-@RestController
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPAuditLog
-public class AppsController extends EPRestrictedBaseController {
-
- static final String FAILURE = "failure";
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AppsController.class);
-
- @Autowired
- AdminRolesService adminRolesService;
- @Autowired
- EPAppService appService;
- @Autowired
- PersUserAppService persUserAppService;
- @Autowired
- UserService userService;
-
- /**
- * RESTful service method to fetch all Applications available to watch for
- * current user
- *
- * @return
- */
- @RequestMapping(value = { "/portalApi/userApps" }, method = RequestMethod.GET, produces = "application/json")
- public List<EcompApp> getUserApps(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- List<EcompApp> ecompApps = null;
-
- try {
- if (user == null) {
- EcompPortalUtils.setBadPermissions(user, response, "getUserApps");
- } else {
- ecompApps = appService.transformAppsToEcompApps(appService.getUserApps(user));
- EcompPortalUtils.logAndSerializeObject("/portalApi/userApps", "GET result =", ecompApps);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger,
- "Exception occurred while performing getUserApps operation, Details: "
- + EcompPortalUtils.getStackTrace(e));
- }
-
- return ecompApps;
- }
-
- /**
- * Create new application's contact us details.
- *
- * @param contactUs
- * @return
- */
- @RequestMapping(value = "/portalApi/saveNewUser", method = RequestMethod.POST, produces = "application/json")
- public PortalRestResponse<String> saveNewUser(HttpServletRequest request,@RequestBody EPUser newUser) {
- EPUser user = EPUserUtils.getUserSession(request);
- if (newUser == null)
- return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, FAILURE,
- "New User cannot be null or empty");
-
- if (!(adminRolesService.isSuperAdmin(user) || adminRolesService.isAccountAdmin(user))){
- if(!user.getLoginId().equalsIgnoreCase(newUser.getLoginId()))
- return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, FAILURE,
- "UnAuthorized");
- }
-
- String checkDuplicate = request.getParameter("isCheck");
- String saveNewUser = FAILURE;
- try {
- saveNewUser = userService.saveNewUser(newUser,checkDuplicate);
- } catch (Exception e) {
- return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, saveNewUser, e.getMessage());
- }
- return new PortalRestResponse<String>(PortalRestStatusEnum.OK, saveNewUser, "");
- }
-
- /**
- * RESTful service method to fetch all applications accessible to the
- * current user, with personalizations.
- *
- * @return
- */
- @RequestMapping(value = { "/portalApi/persUserApps" }, method = RequestMethod.GET, produces = "application/json")
- public List<EcompApp> getPersUserApps(HttpServletRequest request, HttpServletResponse response) throws IOException {
- EPUser user = EPUserUtils.getUserSession(request);
- List<EcompApp> ecompApps = null;
- try {
- if (user == null) {
- EcompPortalUtils.setBadPermissions(user, response, "getPersUserApps");
- } else {
- List<EPApp> apps = null;
- if (adminRolesService.isSuperAdmin(user))
- apps = appService.getPersAdminApps(user);
- else
- apps = appService.getPersUserApps(user);
- ecompApps = appService.transformAppsToEcompApps(apps);
- EcompPortalUtils.logAndSerializeObject("/portalApi/userPersApps", "GET result =", ecompApps);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Failed in getPersUserApps", e);
- response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.toString());
- }
- return ecompApps;
- }
-
- /**
- * RESTful service method to fetch applications for which the current user
- * is an Administrator
- *
- * @return
- */
- @RequestMapping(value = { "/portalApi/adminApps" }, method = RequestMethod.GET, produces = "application/json")
- public List<AppIdAndNameTransportModel> getAdminApps(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- List<AppIdAndNameTransportModel> adminApps = null;
-
- try {
- if (!adminRolesService.isAccountAdmin(user)) {
- EcompPortalUtils.setBadPermissions(user, response, "getAdminApps");
- } else {
- adminApps = appService.getAdminApps(user);
- EcompPortalUtils.logAndSerializeObject("/portalApi/adminApps", "GET result =", adminApps);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger,
- "Exception occurred while performing getAdminApps operation, Details: "
- + EcompPortalUtils.getStackTrace(e));
- }
-
- return adminApps;
- }
-
- /**
- * RESTful service method to fetch Applications in which the logged in user
- * is an Administrator
- *
- * @return
- */
- @RequestMapping(value = {
- "/portalApi/appsForSuperAdminAndAccountAdmin" }, method = RequestMethod.GET, produces = "application/json")
- public List<AppIdAndNameTransportModel> getAppsForSuperAdminAndAccountAdmin(HttpServletRequest request,
- HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- List<AppIdAndNameTransportModel> adminApps = null;
-
- try {
- if (!adminRolesService.isSuperAdmin(user) && !adminRolesService.isAccountAdmin(user)) {
- EcompPortalUtils.setBadPermissions(user, response, "getAdminApps");
- } else {
- adminApps = appService.getAppsForSuperAdminAndAccountAdmin(user);
- EcompPortalUtils.logAndSerializeObject("/portalApi/appsForSuperAdminAndAccountAdmin", "GET result =",
- adminApps);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger,
- "Exception occurred while performing getAppsForSuperAdminAndAccountAdmin operation, Details: "
- + EcompPortalUtils.getStackTrace(e));
- }
-
- return adminApps;
- }
-
- /**
- * RESTful service method to fetch Application Administrators to Super
- * Administrator user. Attention: Users which have Super Administrator roles
- * only are not included!
- *
- * @return
- */
- @RequestMapping(value = { "/portalApi/accountAdmins" }, method = RequestMethod.GET, produces = "application/json")
- public List<AdminUserApplications> getAppsAdministrators(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- List<AdminUserApplications> admins = null;
-
- try {
- if (!adminRolesService.isSuperAdmin(user)) {
- EcompPortalUtils.setBadPermissions(user, response, "getAppsAdministrators");
- } else {
- admins = appService.getAppsAdmins();
- EcompPortalUtils.logAndSerializeObject("/portalApi/accountAdmins", "GET result =", admins);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger,
- "Exception occurred while performing getAppsAdministrators operation, Details: "
- + EcompPortalUtils.getStackTrace(e));
- }
-
- return admins;
- }
-
- @RequestMapping(value = { "/portalApi/availableApps" }, method = RequestMethod.GET, produces = "application/json")
- public List<AppsResponse> getApps(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- List<AppsResponse> apps = null;
- try {
- if (!adminRolesService.isSuperAdmin(user)) {
- EcompPortalUtils.setBadPermissions(user, response, "getApps");
- } else {
- apps = appService.getAllApps(false);
- EcompPortalUtils.logAndSerializeObject("/portalApi/availableApps", "GET result =", apps);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger,
- "Exception occurred while performing getApps operation, Details: "
- + EcompPortalUtils.getStackTrace(e));
- }
-
- return apps;
- }
-
- /**
- * Gets all apps, both active and inactive; i.e., all on-boarded apps,
- * regardless of enabled status.
- *
- * @param request
- * @param 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) {
- EPUser user = EPUserUtils.getUserSession(request);
- List<AppsResponse> apps = null;
- try {
- if (!adminRolesService.isSuperAdmin(user)) {
- EcompPortalUtils.setBadPermissions(user, response, "getApps");
- } else {
- apps = appService.getAllApps(true);
- EcompPortalUtils.logAndSerializeObject("/portalApi/availableApps", "GET result =", apps);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Failed in getAllApps", e);
- }
-
- return apps;
- }
-
- @RequestMapping(value = { "/portalApi/appsFullList" }, method = RequestMethod.GET, produces = "application/json")
- public List<EcompApp> getAppsFullList(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- List<EcompApp> ecompApps = null;
- if (user == null) {
- EcompPortalUtils.setBadPermissions(user, response, "getAppsFullList");
- } else {
- ecompApps = appService.getEcompAppAppsFullList();
- EcompPortalUtils.logAndSerializeObject("/portalApi/appsFullList", "GET result =", ecompApps);
- }
-
- return ecompApps;
- }
-
- @RequestMapping(value = { "/portalApi/userProfile" }, method = RequestMethod.GET, produces = "application/json")
- public UserRoles getUserProfile(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- UserRoles userAndRoles = null;
- try {
- if (user == null) {
- EcompPortalUtils.setBadPermissions(user, response, "getUserProfile");
- } else {
- // Check database.
- userAndRoles = appService.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.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);
- }
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Failed to get user names and roles", e);
- }
-
- EcompPortalUtils.logAndSerializeObject("/portalApi/userProfile", "getUserProfile result =", userAndRoles);
- return userAndRoles;
- }
-
- @RequestMapping(value = { "/portalApi/currentUserProfile/{loginId}" }, method = RequestMethod.GET, produces = "application/json")
- public String getCurrentUserProfile(HttpServletRequest request, @PathVariable("loginId") String loginId) {
-
- Map<String,String> map = new HashMap<String,String>();
- EPUser user = null;
- try {
- user = (EPUser) userService.getUserByUserId(loginId).get(0);
- map.put("firstName", user.getFirstName());
- map.put("lastName", user.getLastName());
- map.put("email", user.getEmail());
- map.put("loginId", user.getLoginId());
- map.put("loginPwd",user.getLoginPwd());
- map.put("middleInitial",user.getMiddleInitial());
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Failed to get user info", e);
- }
-
- JSONObject j = new JSONObject(map);;
- return j.toString();
- }
-
- @RequestMapping(value = { "/portalApi/appRoles/{appId}" }, method = {
- RequestMethod.GET }, produces = "application/json")
- public List<LocalRole> getAppRoles(HttpServletRequest request, @PathVariable("appId") Long appId) {
- List<LocalRole> roleList = null;
- try {
- roleList = appService.getAppRoles(appId);
- EcompPortalUtils.logAndSerializeObject("/portalApi/appRoles/" + appId, "GET result =", roleList);
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger,
- "Exception occurred while performing getAppRoles operation, Details: "
- + EcompPortalUtils.getStackTrace(e));
- }
-
- return roleList;
- }
-
- @RequestMapping(value = { "/portalApi/onboardingApps" }, method = RequestMethod.GET, produces = "application/json")
- public List<OnboardingApp> getOnboardingApps(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- List<OnboardingApp> onboardingApps = null;
- try {
- if (!adminRolesService.isSuperAdmin(user)) {
- EcompPortalUtils.setBadPermissions(user, response, "getOnboardingApps");
- } else {
- onboardingApps = appService.getOnboardingApps();
- EcompPortalUtils.logAndSerializeObject("/portalApi/onboardingApps", "GET result =",
- "onboardingApps of size " + onboardingApps.size());
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger,
- "Exception occurred while performing getOnboardingApps operation, Details: "
- + EcompPortalUtils.getStackTrace(e));
- }
-
- return onboardingApps;
- }
-
- @RequestMapping(value = { "/portalApi/onboardingApps" }, method = RequestMethod.PUT, produces = "application/json")
- public FieldsValidator putOnboardingApp(HttpServletRequest request,
- @RequestBody OnboardingApp modifiedOnboardingApp, HttpServletResponse response) {
- FieldsValidator fieldsValidator = null;
- try {
- EPUser user = EPUserUtils.getUserSession(request);
- if (!adminRolesService.isSuperAdmin(user)) {
- EcompPortalUtils.setBadPermissions(user, response, "putOnboardingApp");
- } else {
- modifiedOnboardingApp.normalize();
- fieldsValidator = appService.modifyOnboardingApp(modifiedOnboardingApp, user);
- response.setStatus(fieldsValidator.httpStatusCode.intValue());
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger,
- "Exception occurred while performing putOnboardingApps operation, Details: "
- + EcompPortalUtils.getStackTrace(e));
- }
-
- EcompPortalUtils.logAndSerializeObject("/portalApi/onboardingApps", "PUT result =", response.getStatus());
- return fieldsValidator;
- }
-
- @RequestMapping(value = { "/portalApi/onboardingApps" }, method = RequestMethod.POST, produces = "application/json")
- public FieldsValidator postOnboardingApp(HttpServletRequest request, @RequestBody OnboardingApp newOnboardingApp,
- HttpServletResponse response) {
- FieldsValidator fieldsValidator = null;
- try {
- EPUser user = EPUserUtils.getUserSession(request);
- if (!adminRolesService.isSuperAdmin(user)) {
- EcompPortalUtils.setBadPermissions(user, response, "postOnboardingApps");
- } else {
- newOnboardingApp.normalize();
- fieldsValidator = appService.addOnboardingApp(newOnboardingApp, user);
- response.setStatus(fieldsValidator.httpStatusCode.intValue());
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger,
- "Exception occurred while performing postOnboardingApps operation, Details: "
- + EcompPortalUtils.getStackTrace(e));
- }
-
- EcompPortalUtils.logAndSerializeObject("/portalApi/onboardingApps", "POST result =", response.getStatus());
- return fieldsValidator;
- }
-
- @RequestMapping(value = { "/portalApi/onboardingApps/{appId}" }, method = {
- RequestMethod.DELETE }, produces = "application/json")
- public FieldsValidator deleteOnboardingApp(HttpServletRequest request, @PathVariable("appId") Long appId,
- HttpServletResponse response) {
- FieldsValidator fieldsValidator = null;
- ;
- try {
- EPUser user = EPUserUtils.getUserSession(request);
- if (!adminRolesService.isSuperAdmin(user)) {
- EcompPortalUtils.setBadPermissions(user, response, "deleteOnboardingApps");
- } else {
- fieldsValidator = appService.deleteOnboardingApp(user, appId);
- response.setStatus(fieldsValidator.httpStatusCode.intValue());
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- }
-
- EcompPortalUtils.logAndSerializeObject("/portalApi/onboardingApps" + appId, "DELETE result =",
- response.getStatus());
- return fieldsValidator;
- }
-} \ No newline at end of file
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/DashboardController.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/DashboardController.java
deleted file mode 100644
index 74b85acb..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/DashboardController.java
+++ /dev/null
@@ -1,361 +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.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.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.transport.CommonWidget;
-import org.openecomp.portalapp.portal.transport.CommonWidgetMeta;
-import org.openecomp.portalapp.portal.utils.EPSystemProperties;
-import org.openecomp.portalapp.util.EPUserUtils;
-import org.openecomp.portalsdk.core.domain.support.CollaborateList;
-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.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.
- */
-@RestController
-@RequestMapping("/portalApi/dashboard")
-public class DashboardController extends EPRestrictedBaseController {
-
- private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(DashboardController.class);
-
- @Autowired
- private DashboardSearchService searchService;
-
- 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.
- *
- * @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.
- */
- @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);
- 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.
- *
- * @param request
- * @return Rest response wrapped around a list of String
- */
- @RequestMapping(value = "/activeUsers", method = RequestMethod.GET, produces = "application/json")
- public PortalRestResponse<List<Object[]>> getActiveUsers(HttpServletRequest request) {
- List<Object[]> activeUsers = null;
- List<Object[]> onlineUsers = new ArrayList<>();
- try {
- EPUser user = EPUserUtils.getUserSession(request);
- String userId = user.getOrgUserId();
-
- activeUsers = searchService.getRelatedUserVOs(userId);
- HashSet<String> usersSet = CollaborateList.getInstance().getAllUserName();
- for (Object[] users : activeUsers) {
- if (usersSet.contains(users[0])) {
- onlineUsers.add(users);
- }
- }
- return new PortalRestResponse<>(PortalRestStatusEnum.OK, "success", onlineUsers);
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "getActiveUsers failed", e);
- return new PortalRestResponse<>(PortalRestStatusEnum.ERROR, e.toString(), null);
- }
- // 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) {
- PortalRestResponse<String> portalRestResponse = null;
- try {
- String updateRate = SystemProperties.getProperty(EPSystemProperties.ONLINE_USER_UPDATE_RATE);
- String updateDuration = SystemProperties.getProperty(EPSystemProperties.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) {
- PortalRestResponse<String> portalRestResponse = null;
- try {
- String windowWidthString = SystemProperties.getProperty(EPSystemProperties.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) {
- PortalRestResponse<String> portalRestResponse = null;
- try {
- String windowWidthString = SystemProperties.getProperty(EPSystemProperties.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<>());
- }
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/DashboardSearchResultController.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/DashboardSearchResultController.java
deleted file mode 100644
index d6052bcb..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/DashboardSearchResultController.java
+++ /dev/null
@@ -1,243 +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.controller;
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-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.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.transport.CommonWidget;
-import org.openecomp.portalapp.portal.transport.CommonWidgetMeta;
-import org.openecomp.portalapp.util.EPUserUtils;
-import org.openecomp.portalsdk.core.domain.support.CollaborateList;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.springframework.beans.factory.annotation.Autowired;
-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;
-
-@RestController
-@RequestMapping("/portalApi/search")
-public class DashboardSearchResultController extends EPRestrictedBaseController {
-
- private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(DashboardSearchResultController.class);
-
- @Autowired
- private DashboardSearchService searchService;
-
- /**
- * Gets all widgets by type: NEW or RESOURCE
- *
- * @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) {
- return new PortalRestResponse<CommonWidgetMeta>(PortalRestStatusEnum.OK, "success",
- searchService.getWidgetData(resourceType));
- }
-
- /**
- * Saves all: news and 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");
- // 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: 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",
- "Cateogry 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) {
- try {
- if (cw.getEventDate() != null && cw.getEventDate().trim().length() > 0)
- yearMonthDayFormat.parse(cw.getEventDate());
- } catch (ParseException ex) {
- return ex.toString();
- }
- return null;
- }
-
- /**
- * Deletes one: 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.
- */
- @RequestMapping(value = "/allPortal", method = RequestMethod.GET, produces = "application/json")
- public PortalRestResponse<Map<String, List<SearchResultItem>>> searchPortal(HttpServletRequest request,
- @RequestParam String searchString) {
-
- 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.trim().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);
- 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 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<>());
- }
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/ExternalAppsRestfulController.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/ExternalAppsRestfulController.java
deleted file mode 100644
index 08804a07..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/ExternalAppsRestfulController.java
+++ /dev/null
@@ -1,128 +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.controller;
-
-import java.io.IOException;
-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.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.FunctionalMenuService;
-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.EPSystemProperties;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.slf4j.MDC;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.EnableAspectJAutoProxy;
-import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.ExceptionHandler;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-@RestController
-@RequestMapping("/auxapi")
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPAuditLog
-public class ExternalAppsRestfulController extends EPRestrictedRESTfulBaseController {
-
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ExternalAppsRestfulController.class);
-
- @Autowired
- FunctionalMenuService functionalMenuService;
-
- @Autowired
- EPLoginService epLoginService;
-
- @Autowired
- AdminRolesService adminRolesService;
-
- @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(EPSystemProperties.MDC_LOGIN_ID);
- userAgent = MDC.get(EPSystemProperties.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("/auxapi/getFavorites", "result = ", favorites);
- }
-
- return favorites;
- }
-
- @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(EPSystemProperties.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("/auxapi/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());
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/FunctionalMenuController.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/FunctionalMenuController.java
deleted file mode 100644
index 6c69fde9..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/FunctionalMenuController.java
+++ /dev/null
@@ -1,436 +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.controller;
-
-import java.text.SimpleDateFormat;
-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 javax.servlet.http.HttpServletResponse;
-
-import org.apache.cxf.transport.http.HTTPException;
-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.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.FunctionalMenuItemJson;
-import org.openecomp.portalapp.portal.utils.EPSystemProperties;
-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.service.UserProfileService;
-import org.openecomp.portalsdk.core.util.SystemProperties;
-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;
-
-
-@RestController
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPAuditLog
-public class FunctionalMenuController extends EPRestrictedBaseController {
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FunctionalMenuController.class);
-
- @Autowired
- AdminRolesService adminRolesService;
- @Autowired
- FunctionalMenuService functionalMenuService;
- @Autowired
- SharedContextService sharedContextService;
-
- @Autowired
- UserProfileService service;
-
- @Autowired
- SearchService searchService;
-
- /**
- * RESTful service method to fetch all the FunctionalMenuItems.
- *
- * @return
- */
- @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("/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 fetch all the FunctionalMenuItems, both active and inactive,
- * for the EditFunctionalMenu feature.
- * Can only be accessed by the portal admin.
- *
- * @return
- */
- @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("/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 FunctionalMenuItems associated with an application.
- *
- * @return
- */
- @RequestMapping(value = { "/portalApi/functionalMenuForApp/{appId}" }, method = RequestMethod.GET, produces = "application/json")
- public List<FunctionalMenuItem> getMenuItemsForApp(HttpServletRequest request, @PathVariable("appId") Integer appId) throws HTTPException {
- // 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("/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.
- *
- * @return
- */
-
- @RequestMapping(value = { "/portalApi/functionalMenuForUser/{userId}" }, method = RequestMethod.GET, produces = "application/json")
- public List<FunctionalMenuItem> getMenuItemsForUser(HttpServletRequest request, @PathVariable("userId") String userId) throws HTTPException {
- // TODO: should only the superuser be allowed to use this API?
- List<FunctionalMenuItem> menuItems = null;
- try{
- menuItems = functionalMenuService.getFunctionalMenuItemsForUser(userId);
- functionalMenuService.assignHelpURLs(menuItems);
- EcompPortalUtils.logAndSerializeObject("/portalApi/functionalMenuForUser/"+userId, "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.
- *
- * @return
- */
-
- @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("/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.
- *
- * @return
- */
-
- @RequestMapping(value = { "/portalApi/functionalMenuItemDetails/{menuId}" }, method = RequestMethod.GET, produces = "application/json")
- public FunctionalMenuItem getFunctionalMenuItemDetails(HttpServletRequest request, @PathVariable("menuId") Integer menuId, HttpServletResponse response) throws HTTPException {
- // 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("/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.
- */
-
- @RequestMapping(value={"/portalApi/functionalMenuItem"}, method = RequestMethod.POST)
- public FieldsValidator createFunctionalMenuItem(HttpServletRequest request, @RequestBody FunctionalMenuItemJson 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("/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.
- */
-
- @RequestMapping(value={"/portalApi/functionalMenuItem"}, method = RequestMethod.PUT)
- public FieldsValidator editFunctionalMenuItem(HttpServletRequest request, @RequestBody FunctionalMenuItemJson 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("/portalApi/functionalMenuItem", "PUT result =", response.getStatus());
- }
-
- 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("/portalApi/functionalMenuItem", "DELETE result =", response.getStatus());
- }
-
- 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("/portalApi/regenerateAncestorTable", "GET result =", response.getStatus());
- }
-
- 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("/portalApi/setFavoriteItem", "Post result =", response.getStatus());
-
- return fieldsValidator;
- }
-
-
- @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("/portalApi/getFavoriteItems", "GET result =", response.getStatus());
-
- return favorites;
- }
-
- @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("/deleteFavoriteItem", "DELETE result =", response.getStatus());
-
- return fieldsValidator;
- }
-
- @RequestMapping(value = {"/portalApi/functionalMenuStaticInfo" }, method = RequestMethod.GET,produces = "application/json")
- public String functionalMenuStaticInfo(HttpServletRequest request, HttpServletResponse response) {
-
- /*Getting first name, last name, and email from session*/
- logger.debug(EELFLoggerDelegate.debugLogger, "getting functionalMenuStaticInfo values from session");
- Map<String,String> map = new HashMap<String,String>();
- String sessionId = request.getSession().getId();
- SharedContext userIdSC = null , firstNameSC = null, lastNameSC = null, emailSC = null;
- String userIdStr= null, firstNameStr= null, lastNameStr = null, emailStr = null;
- EPUser user = EPUserUtils.getUserSession(request);
- String contact_us_link = null;
- String last_login = null;
- try{
- contact_us_link = SystemProperties.getProperty(EPSystemProperties.CONTACT_US_URL);
- SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss");
- Date lastLoginDate = user.getLastLoginDate();
- last_login =sdf.format(lastLoginDate);// sdf.parse(lastLoginDate.);
- }catch(Exception e){
- logger.error(EELFLoggerDelegate.errorLogger, "CONTACT_US_URL is missing in property file! Details: " + EcompPortalUtils.getStackTrace(e));
- }
-
- try{
- if (user!=null) {
- firstNameStr = user.getFirstName();
- lastNameStr = user.getLastName();
- userIdStr = user.getOrgUserId();
- emailStr = user.getEmail();
- /*if(emailStr==null || emailStr.equals("")){
- EPUser userResult = searchService.searchUsersByUserId(user); //.searchUserByUserId(userIdStr);
- emailStr = userResult.getEmail();
- } */
- } else {
- logger.warn(EELFLoggerDelegate.errorLogger, "Unable to locate the user information in the session. LoginId: " + MDC.get(EPSystemProperties.MDC_LOGIN_ID));
- }
-
- /*If failed getting from session, then get the values from Shared Context*/
- if(firstNameStr==null)
- firstNameSC = sharedContextService.getSharedContext(sessionId,EPSystemProperties.USER_FIRST_NAME);
- if(lastNameStr==null)
- lastNameSC = sharedContextService.getSharedContext(sessionId,EPSystemProperties.USER_LAST_NAME);
- if(emailStr==null)
- emailSC = sharedContextService.getSharedContext(sessionId,EPSystemProperties.USER_EMAIL);
- if(userIdStr==null)
- userIdSC = sharedContextService.getSharedContext(sessionId,EPSystemProperties.USER_ORG_USERID);
-
- /*Getting Contact Us link from properties file*/
-
- 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", userIdStr!=null?userIdStr:(userIdSC!=null?userIdSC.getCvalue():null));
- map.put("last_login",last_login);
- map.put("contact_us_link",contact_us_link);
- }catch(Exception e){
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while getting values : " + EcompPortalUtils.getStackTrace(e));
- }
-
- JSONObject j = new JSONObject(map);
- String fnMenuStaticResponse = "";
- try {
- fnMenuStaticResponse = j.toString();
- // response.getWriter().write(fnMenuStaticResponse);
- EcompPortalUtils.logAndSerializeObject("/portalApi/functionalMenuStaticInfo", "GET result =", fnMenuStaticResponse);
- } catch(Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while writing the result to the HttpServletResponse object. Details: " +
- EcompPortalUtils.getStackTrace(e));
- }
- return fnMenuStaticResponse;
- }
-
- @RequestMapping(value = {"/portalApi/resetFunctionalMenuStaticInfo" }, method = RequestMethod.GET,produces = "application/json")
- public PortalRestResponse<Map<String, String>> resetFunctionalMenuStaticInfo(HttpServletRequest request, HttpServletResponse response) {
- PortalRestResponse<String> portalRestResponse = null;
- try {
- // get current user
- EPUser user = EPUserUtils.getUserSession(request);
- String userId = user.getOrgUserId();
- StringBuffer criteria = new StringBuffer();
- criteria.append(" where org_user_id = '").append(userId).append("'");
- // retrieve latest user info from EPUser
- List list = getDataAccessService().getList(EPUser.class, criteria.toString(), null, null);
- EPUser updatedUser = (EPUser)list.get(0);
- EPUserUtils.setUserSession(request, updatedUser, new HashSet(), new HashSet(), SystemProperties.getProperty(SystemProperties.AUTHENTICATION_MECHANISM));
- return new PortalRestResponse<>(PortalRestStatusEnum.OK, "success", null);
- }
- catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "getOnlineUserUpdateRate failed", e);
- return new PortalRestResponse<>(PortalRestStatusEnum.ERROR, e.toString(), null);
- }
-
- }
-}
-
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/GetAccessController.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/GetAccessController.java
deleted file mode 100644
index 5fe22194..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/GetAccessController.java
+++ /dev/null
@@ -1,70 +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.controller;
-
-import java.io.IOException;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.openecomp.portalapp.controller.EPUnRestrictedBaseController;
-import org.openecomp.portalapp.portal.domain.GetAccessResult;
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
-import org.openecomp.portalapp.portal.service.GetAccessService;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-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.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 GetAccessController extends EPUnRestrictedBaseController {
-
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(GetAccessController.class);
-
- @Autowired
- GetAccessService getAccessService;
-
- /**
- * Sorts the list by ECOMP function name.
- */
- private Comparator<GetAccessResult> getAccessComparator = new Comparator<GetAccessResult>() {
- public int compare(GetAccessResult o1, GetAccessResult o2) {
- return o1.getEcompFunction().compareTo(o2.getEcompFunction());
- }
- };
-
- @RequestMapping(value = { "/portalApi/getAppList" }, method = RequestMethod.GET, produces = "application/json")
- public List<GetAccessResult> getAppList(HttpServletRequest request) throws IOException {
- List<GetAccessResult> appsList = null;
- appsList = getAccessService.getAppAccessList();
- Collections.sort(appsList, getAccessComparator);
- EcompPortalUtils.logAndSerializeObject("/portalApi/getAppList", "result =", appsList);
- return appsList;
- }
-} \ No newline at end of file
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/HealthCheckController.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/HealthCheckController.java
deleted file mode 100644
index a3870517..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/HealthCheckController.java
+++ /dev/null
@@ -1,234 +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.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.listener.HealthMonitor;
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
-import org.openecomp.portalapp.portal.logging.format.EPAppMessagesEnum;
-import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;
-import org.openecomp.portalapp.portal.utils.EPSystemProperties;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.slf4j.MDC;
-import org.springframework.context.annotation.EnableAspectJAutoProxy;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.google.gson.Gson;
-
-/*
- * This controller checks the health status and returns JSON response.
- * It does not require
- */
-@RestController
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPAuditLog
-public class HealthCheckController extends EPRestrictedBaseController {
-
- private class HealthStatus {
- public int statusCode;
- @SuppressWarnings("unused")
- public String body;
-
- public HealthStatus(int code, String body) {
- this.statusCode = code;
- this.body = body;
- }
- }
-
- private class HealthStatusInfo {
- HealthStatusInfo(String healthCheckComponent) {
- this.healthCheckComponent = healthCheckComponent;
- this.healthCheckStatus = statusUp; // Default value
- this.version = "";
- this.description = statusOk; // Default value
- this.hostName = "";
- this.ipAddress = "";
- this.dbClusterStatus = "";
- this.dbPermissions = "";
- }
-
- @SuppressWarnings("unused")
- public String healthCheckComponent;
- @SuppressWarnings("unused")
- public String healthCheckStatus;
- @SuppressWarnings("unused")
- public String version;
- @SuppressWarnings("unused")
- public String description;
- @SuppressWarnings("unused")
- public String hostName;
- @SuppressWarnings("unused")
- public String ipAddress;
- @SuppressWarnings("unused")
- public String dbClusterStatus;
- @SuppressWarnings("unused")
- public String dbPermissions;
- }
-
- private final String statusUp = "UP";
- private final String statusDown = "DOWN";
- private final String statusOk = "OK";
-
- 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, "");
-
- // Return the status as 500 if it suspended due to manual fail over
- if (HealthMonitor.isSuspended) {
- healthStatus.body = "Suspended";
- response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
- MDC.put(EPSystemProperties.RESPONSE_CODE, Integer.toString(HttpServletResponse.SC_INTERNAL_SERVER_ERROR));
- return healthStatus;
- }
-
- try {
- boolean overallStatus = true;
-
- List<HealthStatusInfo> statusCollection = new ArrayList<HealthStatusInfo>();
-
- HealthStatusInfo beInfo = new HealthStatusInfo("BE");
- beInfo.hostName = EcompPortalUtils.getMyHostName();
- beInfo.ipAddress = EcompPortalUtils.getMyIpAdddress();
- if (!HealthMonitor.isBackEndUp()) {
- overallStatus = false;
- beInfo.healthCheckStatus = statusDown;
- beInfo.description = "Check the logs for more details";
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeHealthCheckError);
- }
- statusCollection.add(beInfo);
-
- HealthStatusInfo feInfo = new HealthStatusInfo("FE");
- if (!HealthMonitor.isFrontEndUp()) {
- overallStatus = false;
- feInfo.healthCheckStatus = statusDown;
- feInfo.description = "Check the logs for more details";
- EPLogUtil.logEcompError(EPAppMessagesEnum.FeHealthCheckError);
- }
- statusCollection.add(feInfo);
-
- HealthStatusInfo dbInfo = new HealthStatusInfo("DB");
- if (!HealthMonitor.isDatabaseUp()) {
- overallStatus = false;
- dbInfo.healthCheckStatus = statusDown;
- dbInfo.description = "Check the logs for more details";
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeDaoSystemError);
- }
-
- if (!HealthMonitor.isClusterStatusOk()) {
- dbInfo.dbClusterStatus = "Problem, check the logs for more details";
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeDaoSystemError);
- }
- else {
- dbInfo.dbClusterStatus = statusOk;
- }
-
- if (!HealthMonitor.isDatabasePermissionsOk()) {
- dbInfo.dbPermissions = "Problem, check the logs for more details";
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeDaoSystemError);
- }
- else {
- dbInfo.dbPermissions = statusOk;
- }
- statusCollection.add(dbInfo);
-
- HealthStatusInfo uebInfo = new HealthStatusInfo("UEB");
- if (!HealthMonitor.isUebUp()) {
- uebInfo.healthCheckStatus = statusDown;
- uebInfo.description = "Check the logs for more details";
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeUebConnectionError);
- }
- statusCollection.add(uebInfo);
-
- String json = "";
- try {
- json = new Gson().toJson(statusCollection);
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeInvalidJsonInput);
- }
- logger.info(EELFLoggerDelegate.debugLogger, json);
-
- if (overallStatus) {
- healthStatus = new HealthStatus(200, json);
- } else {
- healthStatus = new HealthStatus(500, json);
- response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
- }
- MDC.put(EPSystemProperties.RESPONSE_CODE, Integer.toString(healthStatus.statusCode));
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing the healthcheck. Details: "
- + EcompPortalUtils.getStackTrace(e));
- }
-
- EcompPortalUtils.logAndSerializeObject("/portalApi/healthCheck", "GET result =", response.getStatus());
-
- return healthStatus;
- }
-
- @RequestMapping(value = {
- "/portalApi/healthCheckSuspend" }, method = RequestMethod.GET, produces = "application/json")
- public HealthStatus healthCheckSuspend(HttpServletRequest request, HttpServletResponse response) {
- HealthStatus healthStatus = new HealthStatus(500, "Suspended for manual failover mechanism");
-
- HealthMonitor.isSuspended = true;
- healthStatus.statusCode = 200;
-
- EcompPortalUtils.logAndSerializeObject("/portalApi/healthCheckSuspend", "GET result =",
- response.getStatus());
-
- return healthStatus;
- }
-
- @RequestMapping(value = {
- "/portalApi/healthCheckResume" }, method = RequestMethod.GET, produces = "application/json")
- public HealthStatus healthCheckResume(HttpServletRequest request, HttpServletResponse response) {
- HealthStatus healthStatus = new HealthStatus(500, "Resumed from manual failover mechanism");
-
- HealthMonitor.isSuspended = false;
- healthStatus.statusCode = 200;
- EcompPortalUtils.logAndSerializeObject("/portalApi/healthCheckResume", "GET result =",
- response.getStatus());
- return healthStatus;
- }
-
-
-
- @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("/portalApi/ping", "GET result =",
- response.getStatus());
-
- return healthStatus;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/ManifestController.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/ManifestController.java
deleted file mode 100644
index ae8dc57b..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/ManifestController.java
+++ /dev/null
@@ -1,93 +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.controller;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.jar.Attributes;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
-import org.openecomp.portalapp.portal.service.ManifestService;
-import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
-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.stereotype.Controller;
-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;
-
-
-
-/**
- * This controller responds to a request for the web application manifest,
- * returning a JSON with the information that was created at build time.
- *
- * Manifest entries have names with hyphens, which means Javascript code can't
- * simply use the shorthand object.key; instead use object['key'].
- */
-@RestController
-@Configuration
-@EnableAspectJAutoProxy
-@RequestMapping("/")
-@EPAuditLog
-@Controller
-public class ManifestController extends RestrictedBaseController {
-
- private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ManifestController.class);
-
- @Autowired
- ManifestService manifestService;
-
- /**
- * Gets the webapp manifest contents as a JSON object.
- *
- * @param request
- * @return A map of key-value pairs. On success:
- *
- * <pre>
- * { "manifest" : { "key1": "value1", "key2": "value2" } }
- * </pre>
- *
- * On failure:
- *
- * <pre>
- * { "error": "message" }
- * </pre>
- */
- @RequestMapping(value = { "/portalApi/manifest" }, method = RequestMethod.GET, produces = "application/json")
- @ResponseBody
- public Map<String, Object> getManifest(HttpServletRequest request) {
- Map<String, Object> response = new HashMap<String, Object>();
- try {
- Attributes attributes = manifestService.getWebappManifest();
- response.put("manifest", attributes);
- } catch (Exception ex) {
- logger.error(EELFLoggerDelegate.errorLogger, "getManifest: failed to read manifest", ex);
- response.put("error", "failed to get manifest: " + ex.toString());
- }
- return response;
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/PortalAdminController.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/PortalAdminController.java
deleted file mode 100644
index 951c0534..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/PortalAdminController.java
+++ /dev/null
@@ -1,117 +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.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.EPUser;
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
-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.EcompPortalUtils;
-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.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 PortalAdminController extends EPRestrictedBaseController {
- @Autowired
- PortalAdminService portalAdminService;
- @Autowired
- AdminRolesService adminRolesService;
-
- 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("/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);
- response.setStatus(fieldsValidator.httpStatusCode.intValue());
- }
- EcompPortalUtils.logAndSerializeObject("/portalAdmin", "POST result =", response.getStatus());
-
- return fieldsValidator;
- }
-
- @RequestMapping(value = { "/portalApi/portalAdmin/{orgUserId}" }, method = RequestMethod.DELETE)
- public FieldsValidator deletePortalAdmin(HttpServletRequest request, @PathVariable("orgUserId") Long orgUserId,
- HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- FieldsValidator fieldsValidator = null;
- if (!adminRolesService.isSuperAdmin(user)) {
- EcompPortalUtils.setBadPermissions(user, response, "deletePortalAdmin");
- } else {
- fieldsValidator = portalAdminService.deletePortalAdmin(orgUserId);
- response.setStatus(fieldsValidator.httpStatusCode.intValue());
- }
- EcompPortalUtils.logAndSerializeObject("/portalAdmin", "DELETE result =", response.getStatus());
-
- return fieldsValidator;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/SharedContextRestController.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/SharedContextRestController.java
deleted file mode 100644
index d2f94e52..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/SharedContextRestController.java
+++ /dev/null
@@ -1,335 +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.controller;
-
-import java.io.IOException;
-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.openecomp.portalapp.controller.EPRestrictedRESTfulBaseController;
-import org.openecomp.portalapp.portal.domain.SharedContext;
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
-import org.openecomp.portalapp.portal.service.SharedContextService;
-import org.openecomp.portalapp.portal.utils.EPSystemProperties;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.springframework.beans.factory.annotation.Autowired;
-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.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-/**
- * The shared-context feature allows onboarded applications to share data among
- * themselves easily for a given session. It basically implements a Java map:
- * put or get a key-value pair within a map identified by a session ID.
- *
- * This REST endpoint listens on the Portal app server and answers requests made
- * by back-end application servers. Reads and writes values to the database
- * using a Hibernate service to ensure all servers in a high-availability
- * cluster see the same data.
- *
- * TODO: This extends EPRestrictedRESTfulBaseController which is an exact copy
- * of org.openecomp.portalsdk.core.controller.RestrictedRESTfulBaseController.
- */
-
-@RestController
-@RequestMapping("/context")
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPAuditLog
-public class SharedContextRestController extends EPRestrictedRESTfulBaseController {
- /**
- * Access to the database
- */
- @Autowired
- SharedContextService contextService;
-
- /**
- * Logger for debug etc.
- */
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SharedContextRestController.class);
-
- /**
- * Reusable JSON (de)serializer
- */
- private final ObjectMapper mapper = new ObjectMapper();
-
- /**
- * Gets a value for the specified context and key (RESTful service method).
- *
- * @param ctxtId
- * 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.
- */
- @RequestMapping(value = { "/get" }, method = RequestMethod.GET, produces = "application/json")
- public String getContext(HttpServletRequest request, @RequestParam String context_id, @RequestParam String ckey) throws Exception {
- String jsonResponse = "";
-
- logger.debug(EELFLoggerDelegate.debugLogger, "getContext for ID " + context_id + ", key " + ckey);
- if (context_id == null || ckey == null) {
- throw new Exception("Received null for context_id and/or ckey");
- }
-
- SharedContext context = contextService.getSharedContext(context_id, ckey);
- if (context == null) {
- jsonResponse = convertResponseToJSON(context);
- } else {
- jsonResponse = mapper.writeValueAsString(context);
- }
-
- return jsonResponse;
- }
-
- /**
- * Gets user information for the specified context (RESTful service method).
- *
- * @param ctxtId
- * ID that identifies the context, usually the ECOMP Portal
- * session key.
- *
- * @return JSON with user's first name, last name and email address; null if
- * none found
- */
- @RequestMapping(value = { "/get_user" }, method = RequestMethod.GET, produces = "application/json")
- public String getUserContext(HttpServletRequest request, @RequestParam String context_id) throws Exception {
- String jsonResponse = "";
- List<SharedContext> listSharedContext = new ArrayList<SharedContext>();
- try{
- logger.debug(EELFLoggerDelegate.debugLogger, "getUserContext for ID " + context_id);
- if (context_id == null) {
- throw new Exception("Received null for contextId");
- }
- try{
- SharedContext firstNameContext = contextService.getSharedContext(context_id, EPSystemProperties.USER_FIRST_NAME);
- SharedContext lastNameContext = contextService.getSharedContext(context_id, EPSystemProperties.USER_LAST_NAME);
- SharedContext emailContext = contextService.getSharedContext(context_id, EPSystemProperties.USER_EMAIL);
- SharedContext userIdContext = contextService.getSharedContext(context_id, EPSystemProperties.USER_ORG_USERID);
- if (firstNameContext != null)
- listSharedContext.add(firstNameContext);
- if (lastNameContext != null)
- listSharedContext.add(lastNameContext);
- if (emailContext != null)
- listSharedContext.add(emailContext);
- if (userIdContext != null)
- listSharedContext.add(userIdContext);
- }catch(Exception e){
- logger.error(EELFLoggerDelegate.errorLogger, "Error while getting SharedContext values from database ... ",e);
- }
- jsonResponse = convertResponseToJSON(listSharedContext);
- }catch(Exception e){
- logger.error(EELFLoggerDelegate.errorLogger, "Error while running getUserContext request ... ", e);
- }
- return jsonResponse;
- }
-
- /**
- * Tests for presence of the specified key in the specified context (RESTful
- * service method).
- *
- * @param context_id
- * ID that identifies the context, usually the ECOMP Portal
- * session key.
- * @param ckey
- * Key for the key-value pair to test
- * @return JSON with result indicating whether the context and key were
- * found.
- */
- @RequestMapping(value = { "/check" }, method = RequestMethod.GET, produces = "application/json")
- public String checkContext(HttpServletRequest request, @RequestParam String context_id, @RequestParam String ckey) throws Exception {
- String jsonResponse = "";
-
- logger.debug(EELFLoggerDelegate.debugLogger, "checkContext for " + context_id + ", key " + ckey);
- if (context_id == null || ckey == null) {
- throw new Exception("Received null for contextId and/or key");
- }
-
- String response = null;
- SharedContext context = contextService.getSharedContext(context_id, ckey);
- if (context != null)
- response = "exists";
-
- jsonResponse = convertResponseToJSON(response);
-
- return jsonResponse;
- }
-
- /**
- * Removes the specified key in the specified context (RESTful service
- * method).
- *
- * @param context_id
- * ID that identifies the context, usually the ECOMP Portal
- * session key.
- * @param ckey
- * Key for the key-value pair to remove
- * @return JSON with result indicating whether the context and key were
- * found.
- */
- @RequestMapping(value = { "/remove" }, method = RequestMethod.GET, produces = "application/json")
- public String removeContext(HttpServletRequest request, @RequestParam String context_id, @RequestParam String ckey) throws Exception {
- String jsonResponse = "";
-
- logger.debug(EELFLoggerDelegate.debugLogger, "removeContext for " + context_id + ", key " + ckey);
- if (context_id == null || ckey == null) {
- throw new Exception("Received null for contextId and/or key");
- }
-
- SharedContext context = contextService.getSharedContext(context_id, ckey);
- String response = null;
- if (context != null) {
- contextService.deleteSharedContext(context);
- response = "removed";
- }
-
- jsonResponse = convertResponseToJSON(response);
-
- return jsonResponse;
- }
-
- /**
- * Clears all key-value pairs in the specified context (RESTful service
- * method).
- *
- * @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.
- */
- @RequestMapping(value = { "/clear" }, method = RequestMethod.GET, produces = "application/json")
- public String clearContext(HttpServletRequest request, @RequestParam String context_id) throws Exception {
- String jsonResponse = "";
-
- logger.debug(EELFLoggerDelegate.debugLogger, "clearContext for " + context_id);
- if (context_id == null) {
- throw new Exception("Received null for contextId");
- }
-
- int count = contextService.deleteSharedContexts(context_id);
- jsonResponse = convertResponseToJSON(Integer.toString(count));
-
- return jsonResponse;
- }
-
- /**
- * Sets a context value for the specified context and key (RESTful service
- * method). Creates the context if no context with the specified ID-key pair
- * exists, overwrites the value if it exists already.
- *
- * @param userJson
- * JSON block with these tag-value pairs:
- * <UL>
- * <LI>context_id: ID that identifies the context
- * <LI>ckey: Key for the key-value pair to store
- * <LI>cvalue: Value to store
- * </UL>
- * @return JSON with result indicating whether the value was added (key not
- * previously known) or replaced (key previously known).
- */
- @RequestMapping(value = { "/set" }, method = RequestMethod.POST, produces = "application/json")
- public String setContext(HttpServletRequest request, @RequestBody String userJson) throws Exception {
- String jsonResponse = "";
-
- @SuppressWarnings("unchecked")
- Map<String, Object> userData = mapper.readValue(userJson, Map.class);
- // Use column names as JSON tags
- final String contextId = (String) userData.get("context_id");
- final String key = (String) userData.get("ckey");
- final String value = (String) userData.get("cvalue");
- if (contextId == null || key == null) {
- throw new Exception("Received null for contextId and/or key");
- }
-
- logger.debug(EELFLoggerDelegate.debugLogger, "setContext for ID " + contextId + ", key " + key + "->" + value);
- String response = null;
- SharedContext existing = contextService.getSharedContext(contextId, key);
- if (existing == null) {
- contextService.addSharedContext(contextId, key, value);
- } else {
- existing.setCvalue(value);
- contextService.saveSharedContext(existing);
- }
- response = existing == null ? "added" : "replaced";
- jsonResponse = convertResponseToJSON(response);
-
- return jsonResponse;
- }
-
- /**
- * Creates a two-element JSON object tagged "response".
- *
- * @param responseBody
- * @return
- * @throws JsonProcessingException
- */
- private String convertResponseToJSON(String responseBody) throws JsonProcessingException {
- Map<String, String> responseMap = new HashMap<String, String>();
- responseMap.put("response", responseBody);
- String response = mapper.writeValueAsString(responseMap);
- return response;
- }
-
- /**
- * Converts list of SharedContext objects to a JSON array.
- *
- * @param contextList
- * @return
- * @throws JsonProcessingException
- */
- private String convertResponseToJSON(List<SharedContext> contextList) throws JsonProcessingException {
- String jsonArray = mapper.writeValueAsString(contextList);
- return jsonArray;
- }
-
- /**
- * Creates a JSON object with the content of the shared context; null is ok.
- *
- * @param responseBody
- * @return tag "response" with collection of context object's fields
- * @throws JsonProcessingException
- */
- private String convertResponseToJSON(SharedContext context) throws JsonProcessingException {
- Map<String, Object> responseMap = new HashMap<String, Object>();
- responseMap.put("response", context);
- String responseBody = mapper.writeValueAsString(responseMap);
- return responseBody;
- }
-
- @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());
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/UserRolesController.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/UserRolesController.java
deleted file mode 100644
index 24370fbb..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/UserRolesController.java
+++ /dev/null
@@ -1,336 +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.controller;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.cxf.transport.http.HTTPException;
-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.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.ApplicationsRestClientService;
-import org.openecomp.portalapp.portal.service.SearchService;
-import org.openecomp.portalapp.portal.service.UserRolesService;
-import org.openecomp.portalapp.portal.transport.AppNameIdIsAdmin;
-import org.openecomp.portalapp.portal.transport.AppWithRolesForUser;
-import org.openecomp.portalapp.portal.transport.AppsListWithAdminRole;
-import org.openecomp.portalapp.portal.transport.FieldsValidator;
-import org.openecomp.portalapp.portal.transport.RoleInAppForUser;
-import org.openecomp.portalapp.portal.transport.UserApplicationRoles;
-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.restful.domain.EcompRole;
-import org.openecomp.portalsdk.core.service.RoleService;
-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;
-
-@RestController
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPAuditLog
-public class UserRolesController extends EPRestrictedBaseController {
-
- static final String FAILURE = "failure";
-
- @Autowired
- SearchService searchService;
- @Autowired
- AdminRolesService adminRolesService;
- @Autowired
- UserRolesService userRolesService;
- @Autowired
- ApplicationsRestClientService applicationsRestClientService;
- @Autowired
- RoleService roleService;
-
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(UserRolesController.class);
-
- /**
- * RESTful service method to fetch users in the WebPhone external service
- *
- * @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) {
- EPUser user = EPUserUtils.getUserSession(request);
- String searchResult = null;
- if (!adminRolesService.isSuperAdmin(user) && !adminRolesService.isAccountAdmin(user)) {
- EcompPortalUtils.setBadPermissions(user, response, "getPhoneBookSearchResult");
- } else {
- searchString = searchString.trim();
- if (searchString.length() > 0) {
- //searchResult = searchService.searchUsersInPhoneBook(searchString);
- searchResult = searchService.searchUsersInFnTable(searchString);
- } else {
- logger.info(EELFLoggerDelegate.errorLogger, "getPhoneBookSearchResult - too short search string: " + searchString);
- }
- }
- EcompPortalUtils.logAndSerializeObject("/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
- */
- @RequestMapping(value = { "/portalApi/adminAppsRoles" }, method = { RequestMethod.GET }, produces = "application/json")
- public AppsListWithAdminRole getAppsWithAdminRoleStateForUser(HttpServletRequest request, @RequestParam("orgUserId") String orgUserId,
- HttpServletResponse response) {
-
- EPUser user = EPUserUtils.getUserSession(request);
- AppsListWithAdminRole result = null;
- if (!adminRolesService.isSuperAdmin(user)) {
- EcompPortalUtils.setBadPermissions(user, response, "getAppsWithAdminRoleStateForUser");
- } else {
- if (EcompPortalUtils.legitimateUserId(orgUserId)) {
- result = adminRolesService.getAppsWithAdminRoleStateForUser(orgUserId);
- } else {
- logger.info(EELFLoggerDelegate.errorLogger, "getAppsWithAdminRoleStateForUser - parms error, no orgUserId");
- response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
- }
- }
-
- StringBuilder adminAppRoles = new StringBuilder();
- if(result != null && result.appsRoles.size() >= 1) {
- adminAppRoles.append("User '" + result.orgUserId + "' has admin role to the apps = {");
- for(AppNameIdIsAdmin adminAppRole : result.appsRoles) {
- if (adminAppRole.isAdmin) {
- adminAppRoles.append(adminAppRole.appName + ", ");
- }
- }
- adminAppRoles.append("}.");
- } else {
- adminAppRoles.append("User '" + result.orgUserId + "' has no Apps with Admin Role.");
- }
- logger.info(EELFLoggerDelegate.errorLogger, adminAppRoles.toString());
-
- EcompPortalUtils.logAndSerializeObject("/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
- FieldsValidator fieldsValidator = new FieldsValidator();
- StringBuilder newAppRoles = new StringBuilder();
- if(newAppsListWithAdminRoles != null && newAppsListWithAdminRoles.appsRoles.size() >= 1) {
- newAppRoles.append("User '" + newAppsListWithAdminRoles.orgUserId + "' has admin role to the apps = {");
- for(AppNameIdIsAdmin adminAppRole : newAppsListWithAdminRoles.appsRoles) {
- if (adminAppRole.isAdmin) {
- newAppRoles.append(adminAppRole.appName + ", ");
- }
- }
- 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 {
- changesApplied = adminRolesService.setAppsWithAdminRoleStateForUser(newAppsListWithAdminRoles);
- }
- EcompPortalUtils.logAndSerializeObject("/portalApi/adminAppsRoles", "put result =", changesApplied);
-
- return fieldsValidator;
- }
-
- @RequestMapping(value = { "/portalApi/userAppRoles" }, method = { RequestMethod.GET }, produces = "application/json")
- public List<RoleInAppForUser> getAppRolesForUser(HttpServletRequest request, @RequestParam("orgUserId") String orgUserId, @RequestParam("app") Long appid, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- List<RoleInAppForUser> result = null;
- String feErrorString = "";
- if (!adminRolesService.isAccountAdmin(user)) {
- EcompPortalUtils.setBadPermissions(user, response, "getAppRolesForUser");
- feErrorString = EcompPortalUtils.getFEErrorString(true, response.getStatus());
- } else {
- if (EcompPortalUtils.legitimateUserId(orgUserId)) {
- result = userRolesService.getAppRolesForUser(appid, orgUserId);
- 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.
- response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
- feErrorString = EcompPortalUtils.getFEErrorString(true, HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
- }
- } else {
- logger.info(EELFLoggerDelegate.errorLogger, "getAppRolesForUser - no userId");
- response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
- feErrorString = EcompPortalUtils.getFEErrorString(true, HttpServletResponse.SC_BAD_REQUEST);
- }
- }
-
- StringBuilder sbUserApps = new StringBuilder();
- if (result!=null && result.size()>=1) {
- sbUserApps.append("User '" + orgUserId + "' has Roles={");
- for(RoleInAppForUser appRole : result) {
- if (appRole.isApplied) {
- sbUserApps.append(appRole.roleName + ", ");
- }
- }
- sbUserApps.append("} assigned to the appId '" + appid + "'.");
- } else {
- 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("/portalApi/userAppRoles", "get result =", result);
- if (feErrorString != "") {
- logger.debug(EELFLoggerDelegate.debugLogger, "LR: FEErrorString to header: "+feErrorString);
-
- response.addHeader("FEErrorString", feErrorString);
- response.addHeader("Access-Control-Expose-Headers", "FEErrorString");
- }
- return result;
- }
-
- @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) {
- sbUserApps.append("User '" + newAppRolesForUser.orgUserId);
- if (newAppRolesForUser.appRoles!=null && newAppRolesForUser.appRoles.size()>=1) {
- sbUserApps.append("' has roles = {");
- for(RoleInAppForUser appRole : newAppRolesForUser.appRoles) {
- if (appRole.isApplied) {
- sbUserApps.append(appRole.roleName + ", ");
- }
- }
- sbUserApps.append("} assigned for the app '" + newAppRolesForUser.appName + "'.");
- } else {
- sbUserApps.append("' has no roles assigned for the app '" + newAppRolesForUser.appName + "'.");
- }
- }
- logger.info(EELFLoggerDelegate.errorLogger, 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 == false) {
- logger.debug(EELFLoggerDelegate.debugLogger, "putAppWithUserRoleStateForUser - Set new User Roles failure");
- }
- }
-
- EcompPortalUtils.logAndSerializeObject("/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) {
-
- String updateRemoteUserFlag = FAILURE;
- try {
- //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 {
- try {
- 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));
- 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 {
- EcompRole[] appRoles = applicationsRestClientService.get(EcompRole[].class, appId, "/roles");
- List<EcompRole> rolesList = Arrays.asList(appRoles);
- EcompPortalUtils.logAndSerializeObject("/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 {
- List<EPRole> rolesList = userRolesService.importRolesFromRemoteApplication(appId);
- EcompPortalUtils.logAndSerializeObject("/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 {
- 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));
- 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("/portalApi/app/{appId}/user/{orgUserId}/roles", "response for appId='" + appId + "' and orgUserId='" + orgUserId + "'", roles[0]);
- return roles[0];
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/WidgetsController.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/WidgetsController.java
deleted file mode 100644
index ddadef93..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/controller/WidgetsController.java
+++ /dev/null
@@ -1,134 +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.controller;
-
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.cxf.common.util.StringUtils;
-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.AdminRolesService;
-import org.openecomp.portalapp.portal.service.WidgetService;
-import org.openecomp.portalapp.portal.transport.FieldsValidator;
-import org.openecomp.portalapp.portal.transport.OnboardingWidget;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-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.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 WidgetsController extends EPRestrictedBaseController {
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WidgetsController.class);
-
- @Autowired
- AdminRolesService adminRolesService;
- @Autowired
- WidgetService widgetService;
-
- @RequestMapping(value = { "/portalApi/widgets" }, method = RequestMethod.GET, produces = "application/json")
- public List<OnboardingWidget> getOnboardingWidgets(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- List<OnboardingWidget> onboardingWidgets = null;
-
- if (user == null || user.isGuest()) {
- EcompPortalUtils.setBadPermissions(user, response, "getOnboardingWidgets");
- } else {
- String getType = request.getHeader("X-Widgets-Type");
- if (!StringUtils.isEmpty(getType) && (getType.equals("managed") || getType.equals("all"))) {
- onboardingWidgets = widgetService.getOnboardingWidgets(user, getType.equals("managed"));
- } else {
- logger.debug(EELFLoggerDelegate.debugLogger, "WidgetsController.getOnboardingApps - request must contain header 'X-Widgets-Type' with 'all' or 'managed'");
- response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
- }
- }
-
- EcompPortalUtils.logAndSerializeObject("/portalApi/widgets", "GET result =", response.getStatus());
- return onboardingWidgets;
- }
-
- private boolean userHasPermissions(EPUser user, HttpServletResponse response, String invocator) {
- if (!adminRolesService.isSuperAdmin(user) && !adminRolesService.isAccountAdmin(user)) {
- EcompPortalUtils.setBadPermissions(user, response, invocator);
- return false;
- }
- return true;
- }
-
- // Attention: real json has all OnboardingWidget fields except "id", we use OnboardingWidget for not to create new class for parsing
- @RequestMapping(value = { "/portalApi/widgets/{widgetId}" }, method = { RequestMethod.PUT }, produces = "application/json")
- public FieldsValidator putOnboardingWidget(HttpServletRequest request, @PathVariable("widgetId") Long widgetId,
- @RequestBody OnboardingWidget onboardingWidget, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- FieldsValidator fieldsValidator = null;
- if (userHasPermissions(user, response, "putOnboardingWidget")) {
- onboardingWidget.id = widgetId; // !
- onboardingWidget.normalize();
- fieldsValidator = widgetService.setOnboardingWidget(user, onboardingWidget);
- response.setStatus(fieldsValidator.httpStatusCode.intValue());
- }
- EcompPortalUtils.logAndSerializeObject("/portalApi/widgets/" + widgetId, "GET result =", response.getStatus());
-
- return fieldsValidator;
- }
-
- // Attention: real json has all OnboardingWidget fields except "id", we use OnboardingWidget for not to create new class for parsing
- @RequestMapping(value = { "/portalApi/widgets" }, method = { RequestMethod.POST }, produces = "application/json")
- public FieldsValidator postOnboardingWidget(HttpServletRequest request, @RequestBody OnboardingWidget onboardingWidget, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- FieldsValidator fieldsValidator = null; ;
-
- if (userHasPermissions(user, response, "postOnboardingWidget")) {
- onboardingWidget.id = null; // !
- onboardingWidget.normalize();
- fieldsValidator = widgetService.setOnboardingWidget(user, onboardingWidget);
- response.setStatus(fieldsValidator.httpStatusCode.intValue());
- }
-
- EcompPortalUtils.logAndSerializeObject("/portalApi/widgets", "POST result =", response.getStatus());
- return fieldsValidator;
- }
-
- @RequestMapping(value = { "/portalApi/widgets/{widgetId}" }, method = { RequestMethod.DELETE }, produces = "application/json")
- public FieldsValidator deleteOnboardingWidget(HttpServletRequest request, @PathVariable("widgetId") Long widgetId, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- FieldsValidator fieldsValidator = null; ;
-
- if (userHasPermissions(user, response, "deleteOnboardingWidget")) {
- fieldsValidator = widgetService.deleteOnboardingWidget(user, widgetId);
- response.setStatus(fieldsValidator.httpStatusCode.intValue());
- }
-
- EcompPortalUtils.logAndSerializeObject("/portalApi/widgets/" + widgetId, "DELETE result =", response.getStatus());
- return fieldsValidator;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/AdminUserApp.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/AdminUserApp.java
deleted file mode 100644
index ae55f6f2..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/AdminUserApp.java
+++ /dev/null
@@ -1,88 +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.domain;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-
-@Entity
-public class AdminUserApp implements Serializable{
- private static final long serialVersionUID = 1L;
-
- @Id
- @Column(name="USER_ID")
- private Long user_Id;
-
- @Column(name="FIRST_NAME")
- private String firstName;
-
- @Column(name="LAST_NAME")
- private String lastName;
-
- @Column(name="ORG_USER_ID")
- private String orgUserId;
-
- @Id
- @Column(name="APP_ID")
- private Long appId;
-
- @Column(name="APP_NAME")
- private String appName;
-
- public Long getAppId() {
- return appId;
- }
- public void setAppId(Long appId) {
- this.appId = appId;
- }
- public Long getUser_Id() {
- return user_Id;
- }
- public void setUserId(Long user_Id) {
- this.user_Id = user_Id;
- }
- 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 String getAppName() {
- return appName;
- }
- public void setAppName(String appName) {
- this.appName = appName;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/AdminUserApplications.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/AdminUserApplications.java
deleted file mode 100644
index 3b4179d9..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/AdminUserApplications.java
+++ /dev/null
@@ -1,96 +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.domain;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class AdminUserApplications {
- private List<Application> apps = new ArrayList<Application>();
-
- private Long user_Id;
- private String firstName;
- private String lastName;
- private String orgUserId;
-
- public AdminUserApplications(AdminUserApp app) {
- setUser_Id(app.getUser_Id());
- setOrgUserId(app.getOrgUserId());
- setFirstName(app.getFirstName());
- setLastName(app.getLastName());
-
- addApp(app.getAppId(), app.getAppName());
- }
- public Long getUser_Id() {
- return user_Id;
- }
- public void setUser_Id(Long user_Id) {
- this.user_Id = user_Id;
- }
- 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<Application> getApps() {
- return apps;
- }
- public void setApps(List<Application> apps) {
- this.apps = apps;
- }
- public void addApp(Long otherAppId, String otherAppName) {
- apps.add(new Application(otherAppId, otherAppName));
- }
-
- public class Application {
- private Long appId;
- private String appName;
-
- public Application(Long otherAppId, String otherAppName) {
- setAppId(otherAppId);
- setAppName(otherAppName);
- }
- 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;
- }
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/AppContactUs.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/AppContactUs.java
deleted file mode 100644
index cb5303c4..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/AppContactUs.java
+++ /dev/null
@@ -1,86 +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.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;
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/AppContactUsTransportModel.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/AppContactUsTransportModel.java
deleted file mode 100644
index e348311f..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/AppContactUsTransportModel.java
+++ /dev/null
@@ -1,84 +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.domain;
-
-/**
- * An easily serializable-as-JSON version of
- * {@link org.openecomp.portalapp.portal.domain.AppContactUs}, with the
- * application ID instead of the EPApp object.
- */
-public class AppContactUsTransportModel {
-
- private Long appId;
- private String appName;
- private String description;
- private String contactEmail;
- private String url;
- private String activeYN;
-
- 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 getUrl() {
- return url;
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-
- public String getActiveYN() {
- return activeYN;
- }
-
- public void setActiveYN(String activeYN) {
- this.activeYN = activeYN;
- }
-
- public String getAppName() {
- return appName;
- }
-
- public void setAppName(String appName) {
- this.appName = appName;
- }
-
- public Long getAppId() {
- return appId;
- }
-
- public void setAppId(Long appId) {
- this.appId = appId;
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/AppIdAndNameTransportModel.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/AppIdAndNameTransportModel.java
deleted file mode 100644
index 52005e88..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/AppIdAndNameTransportModel.java
+++ /dev/null
@@ -1,63 +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.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);
- }
-
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/AppsResponse.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/AppsResponse.java
deleted file mode 100644
index 90d8e964..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/AppsResponse.java
+++ /dev/null
@@ -1,76 +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.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;
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/EPApp.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/EPApp.java
deleted file mode 100644
index 8897151c..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/EPApp.java
+++ /dev/null
@@ -1,319 +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.domain;
-
-import javax.persistence.Lob;
-
-import org.apache.commons.lang.StringUtils;
-import org.openecomp.portalsdk.core.domain.support.DomainVo;
-
-
-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;
-
-
-/*
- private SortedSet<Widget> widgets = new TreeSet<Widget>();
-*/
-
- 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 SortedSet<Widget> getWidgets() {
- return widgets;
- }
-
- public void setWidgets(SortedSet<Widget> widgets) {
- this.widgets = widgets;
- }
-
- public void addWidget(Widget widget) {
- this.widgets.add(widget);
- }
-
- public void removeWidget(Long widgetId) {
- for (Widget widget: widgets) {
- if (widget.getId().equals(widgetId)) {
- widgets.remove(widget);
- break;
- }
- }
- }
- */
-
- 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;
- }
-
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/EPRole.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/EPRole.java
deleted file mode 100644
index db440897..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/EPRole.java
+++ /dev/null
@@ -1,204 +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.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() {
- String str = "[id: "+getId()+", appId: "+appId+", appRoleId: "+appRoleId+"]";
- return str;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/EPUser.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/EPUser.java
deleted file mode 100644
index d70daa9b..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/EPUser.java
+++ /dev/null
@@ -1,602 +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.domain;
-
-import java.util.Date;
-import java.util.Iterator;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import org.openecomp.portalsdk.core.domain.support.DomainVo;
-
-public class EPUser extends DomainVo {
-
- private Long orgId;
- private Long managerId;
- private String firstName;
- private String middleInitial;
- private String lastName;
- private String phone;
- private String fax;
- private String cellular;
- private String email;
- private Long addressId;
- private String alertMethodCd;
- private String hrid;
- private String orgUserId;
- private String orgCode;
- private String address1;
- private String address2;
- private String city;
- private String state;
- private String zipCode;
- private String country;
- private String orgManagerUserId;
- private String locationClli;
- private String businessCountryCode;
- private String businessCountryName;
- private String businessUnit;
- private String businessUnitName;
- private String department;
- private String departmentName;
- private String companyCode;
- private String company;
- private String zipCodeSuffix;
- private String jobTitle;
- private String commandChain;
- private String siloStatus;
- private String costCenter;
- private String financialLocCode;
-
-
-
- private String loginId;
- private String loginPwd;
- private Date lastLoginDate;
- private boolean active;
- private boolean internal;
- private Long selectedProfileId;
- private Long timeZoneId;
- private boolean online;
- private String chatId;
-
- private static final long serialVersionUID = 1L;
-
- private static final long ECOMP_PORTAL_ID = 1L;
- private static final String ECOMP_PORTAL_NAME = "ECOMP";
- private boolean isGuest = false;
-
- private SortedSet<EPUserApp> userApps = new TreeSet<EPUserApp>();
- private SortedSet<EPRole> pseudoRoles = new TreeSet<EPRole>();
-
- public EPUser() {}
-
- public Long getAddressId() {
- return addressId;
- }
-
- public String getAlertMethodCd() {
- return alertMethodCd;
- }
-
- public String getCellular() {
- return cellular;
- }
-
- public String getEmail() {
- return email;
- }
-
- public String getFax() {
- return fax;
- }
-
- public String getFirstName() {
- return firstName;
- }
-
- public String getHrid() {
- return hrid;
- }
-
- public Date getLastLoginDate() {
- return lastLoginDate;
- }
-
- public String getLastName() {
- return lastName;
- }
-
- public String getFullName() {
- return getFirstName() + " " + getLastName();
- }
-
- public String getLoginId() {
- return loginId;
- }
-
- public String getLoginPwd() {
- return loginPwd;
- }
-
- public Long getManagerId() {
- return managerId;
- }
-
- public String getMiddleInitial() {
- return middleInitial;
- }
-
- public String getOrgCode() {
- return orgCode;
- }
-
- public Long getOrgId() {
- return orgId;
- }
-
- public String getPhone() {
- return phone;
- }
-
- public String getOrgUserId() {
- return orgUserId;
- }
-
- public boolean getActive() {
- return active;
- }
-
- public boolean getInternal() {
- return internal;
- }
-
- public String getAddress1() {
- return address1;
- }
-
- public String getAddress2() {
- return address2;
- }
-
- public String getCity() {
- return city;
- }
-
- public String getCountry() {
- return country;
- }
-
- public String getState() {
- return state;
- }
-
- public String getZipCode() {
- return zipCode;
- }
-
- public String getBusinessCountryCode() {
- return businessCountryCode;
- }
-
- public String getCommandChain() {
- return commandChain;
- }
-
- public String getCompany() {
- return company;
- }
-
- public String getCompanyCode() {
- return companyCode;
- }
-
- public String getDepartment() {
- return department;
- }
-
- public String getJobTitle() {
- return jobTitle;
- }
-
- public String getLocationClli() {
- return locationClli;
- }
-
- public String getOrgManagerUserId() {
- return orgManagerUserId;
- }
-
- public String getZipCodeSuffix() {
- return zipCodeSuffix;
- }
-
- public String getBusinessCountryName() {
- return businessCountryName;
- }
-
- public Long getSelectedProfileId() {
- return selectedProfileId;
- }
-
- public void setAddressId(Long addressId) {
- this.addressId = addressId;
- }
-
- public void setAlertMethodCd(String alertMethodCd) {
- this.alertMethodCd = alertMethodCd;
- }
-
- public void setCellular(String cellular) {
- this.cellular = cellular;
- }
-
- public void setEmail(String email) {
- this.email = email;
- }
-
- public void setFax(String fax) {
- this.fax = fax;
- }
-
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
- public void setHrid(String hrid) {
- this.hrid = hrid;
- }
-
- public void setLastLoginDate(Date lastLoginDate) {
- this.lastLoginDate = lastLoginDate;
- }
-
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
-
- public void setLoginId(String loginId) {
- this.loginId = loginId;
- }
-
- public void setLoginPwd(String loginPwd) {
- this.loginPwd = loginPwd;
- }
-
- public void setManagerId(Long managerId) {
- this.managerId = managerId;
- }
-
- public void setMiddleInitial(String middleInitial) {
- this.middleInitial = middleInitial;
- }
-
- public void setOrgCode(String orgCode) {
- this.orgCode = orgCode;
- }
-
- public void setOrgId(Long orgId) {
- this.orgId = orgId;
- }
-
- public void setPhone(String phone) {
- this.phone = phone;
- }
-
- public void setOrgUserId(String orgUserId) {
- this.orgUserId = orgUserId;
- }
-
- public void setActive(boolean active) {
- this.active = active;
- }
-
- public void setInternal(boolean internal) {
- this.internal = internal;
- }
-
- public void setAddress1(String address1) {
- this.address1 = address1;
- }
-
- public void setAddress2(String address2) {
- this.address2 = address2;
- }
-
- public void setCity(String city) {
- this.city = city;
- }
-
- public void setCountry(String country) {
- this.country = country;
- }
-
- public void setState(String state) {
- this.state = state;
- }
-
- public void setZipCode(String zipCode) {
- this.zipCode = zipCode;
- }
-
- public void setBusinessCountryCode(String businessCountryCode) {
- this.businessCountryCode = businessCountryCode;
- }
-
- public void setCommandChain(String commandChain) {
- this.commandChain = commandChain;
- }
-
- public void setCompany(String company) {
- this.company = company;
- }
-
- public void setCompanyCode(String companyCode) {
- this.companyCode = companyCode;
- }
-
- public void setDepartment(String department) {
- this.department = department;
- }
-
- public void setJobTitle(String jobTitle) {
- this.jobTitle = jobTitle;
- }
-
- public void setLocationClli(String locationClli) {
- this.locationClli = locationClli;
- }
-
- public void setOrgManagerUserId(String orgManagerUserId) {
- this.orgManagerUserId = orgManagerUserId;
- }
-
- public void setZipCodeSuffix(String zipCodeSuffix) {
- this.zipCodeSuffix = zipCodeSuffix;
- }
-
- public void setBusinessCountryName(String businessCountryName) {
- this.businessCountryName = businessCountryName;
- }
-
- public SortedSet<EPRole> getPseudoRoles() {
- return pseudoRoles;
- }
-
- public void setPseudoRoles(SortedSet<EPRole> pseudoRoles) {
- this.pseudoRoles = pseudoRoles;
- }
-
- public void setSelectedProfileId(Long selectedProfileId) {
- this.selectedProfileId = selectedProfileId;
- }
-
- public Long getTimeZoneId() {
- return timeZoneId;
- }
-
- public void setTimeZoneId(Long timeZoneId) {
- this.timeZoneId = timeZoneId;
- }
-
- public String getBusinessUnit() {
- return businessUnit;
- }
-
- public void setBusinessUnit(String businessUnit) {
- this.businessUnit = businessUnit;
- }
-
- public String getSiloStatus() {
- return siloStatus;
- }
-
- public void setSiloStatus(String siloStatus) {
- this.siloStatus = siloStatus;
- }
-
- public String getCostCenter() {
- return costCenter;
- }
-
- public void setCostCenter(String costCenter) {
- this.costCenter = costCenter;
- }
-
- public String getFinancialLocCode() {
- return financialLocCode;
- }
-
- public void setFinancialLocCode(String financialLocCode) {
- this.financialLocCode = financialLocCode;
- }
-
- public String getBusinessUnitName() {
- return businessUnitName;
- }
-
- public void setBusinessUnitName(String businessUnitName) {
- this.businessUnitName = businessUnitName;
- }
-
- public String getDepartmentName() {
- return departmentName;
- }
-
- public void setDepartmentName(String departmentName) {
- this.departmentName = departmentName;
- }
-
- public int compareTo(Object obj){
- EPUser user = (EPUser)obj;
-
- String c1 = getLastName() + getFirstName() + getMiddleInitial();
- String c2 = user.getLastName() + user.getFirstName() + user.getMiddleInitial();
-
- return c1.compareTo(c2);
- }
-
- public boolean isOnline() {
- return online;
- }
-
- public void setOnline(boolean online) {
- this.online = online;
- }
-
- public String getChatId() {
- return chatId;
- }
-
- public void setChatId(String chatId) {
- this.chatId = chatId;
- }
-
-
- public void setPseudoEPRoles(SortedSet<EPRole> pseudoRoles) {
- this.pseudoRoles = pseudoRoles;
- }
-
- public SortedSet<EPUserApp> getEPUserApps() {
- return userApps;
- }
-
- public void setEPUserApps(SortedSet<EPUserApp> userApps) {
- this.userApps = userApps;
- }
-
- public void addUserApp(EPUserApp userApp) {
- userApps.add(userApp);
- }
-
- public void addAppRoles(EPApp app, SortedSet<EPRole> roles) {
- if (roles != null) {
- // add all
- SortedSet<EPUserApp> userApps = new TreeSet<EPUserApp>();
- // this.userApps.removeAll(this.userApps);
- Iterator<EPRole> itr = roles.iterator();
- while (itr.hasNext()) {
- EPRole role = (EPRole) itr.next();
- EPUserApp userApp = new EPUserApp();
- userApp.setUserId(this.id);
- userApp.setApp(app);
- userApp.setRole(role);
- userApps.add(userApp);
- }
- setEPUserApps(userApps);
- } else {
- // remove all
- setEPUserApps(null);
- }
-
- }
-
- public SortedSet<EPRole> getAppEPRoles(EPApp app) {
- SortedSet<EPRole> roles = new TreeSet<EPRole>();
- SortedSet<EPUserApp> apps = getEPUserApps();
- Iterator<EPUserApp> appsItr = apps.iterator();
- EPUserApp userApp = null;
- // getting default app
- while (appsItr.hasNext()) {
- EPUserApp tempUserApp = (EPUserApp) appsItr.next();
- if (tempUserApp.getApp().getId().equals(app)) {
- userApp = tempUserApp;
- roles.add((EPRole) userApp.getRole());
- }
- }
- return roles;
- }
-
- /**
- * Attention! Not for use in ECOMP
- */
- public SortedSet<EPRole> getAppRoles(EPApp app) {
- SortedSet<EPRole> roles = new TreeSet<EPRole>();
- SortedSet<EPUserApp> apps = getEPUserApps();
- Iterator<EPUserApp> appsItr = apps.iterator();
- EPUserApp userApp = null;
- // getting default app
- while (appsItr.hasNext()) {
- EPUserApp tempUserApp = (EPUserApp) appsItr.next();
- if (tempUserApp.getApp().getId().equals(app.getId())) {
- userApp = tempUserApp;
- roles.add((EPRole) userApp.getRole());
- }
- }
- return roles;
- }
-
- /**
- * Attention! Not for use in ECOMP
- */
- public SortedSet<EPRole> getEPRoles() {
- EPApp app = new EPApp();
- app.setId(new Long(ECOMP_PORTAL_ID));
- app.setName(ECOMP_PORTAL_NAME);
- return getAppEPRoles(app);
- }
-
- /**
- * Attention! Not for use in ECOMP
- */
- public void setEPRoles(SortedSet<EPRole> roles) {
- EPApp app = new EPApp();
- app.setId(new Long(ECOMP_PORTAL_ID));
- app.setName(ECOMP_PORTAL_NAME);
- addAppRoles(app, roles);
- }
-
- /**
- * Attention! Not for use in ECOMP
- */
- public void removeEPRole(Long roleId) {
- SortedSet<EPUserApp> apps = getEPUserApps();
- Iterator<EPUserApp> appsItr = apps.iterator();
- // getting default app
- while (appsItr.hasNext()) {
- EPUserApp tempUserApp = (EPUserApp) appsItr.next();
- if (tempUserApp.equals(new Long(ECOMP_PORTAL_ID)) && tempUserApp.getRole().getId().equals(roleId)) {
- appsItr.remove();
- }
- }
- }
-
- /**
- * Attention! Not for use in ECOMP
- */
- public void addEPRole(EPRole role) {
- if (role != null) {
- SortedSet<EPRole> roles = getEPRoles();
- if (roles == null) {
- roles = new TreeSet<EPRole>();
- }
- roles.add(role);
- setEPRoles(roles);
- }
- }
-
- public boolean isGuest() {
- return isGuest;
- }
-
- public void setGuest(boolean isGuest) {
- this.isGuest = isGuest;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/EPUserApp.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/EPUserApp.java
deleted file mode 100644
index f4647fca..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/EPUserApp.java
+++ /dev/null
@@ -1,119 +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.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);
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/EcompApp.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/EcompApp.java
deleted file mode 100644
index 2564a178..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/EcompApp.java
+++ /dev/null
@@ -1,143 +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.domain;
-
-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;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/GetAccessResult.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/GetAccessResult.java
deleted file mode 100644
index a7dab37e..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/GetAccessResult.java
+++ /dev/null
@@ -1,70 +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.domain;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.IdClass;
-
-@Entity
-@IdClass(GetAccessResultId.class)
-public class GetAccessResult {
-
- @Id
- @Column(name="ecomp_function")
- private String ecompFunction;
-
- @Id
- @Column(name="app_name")
- private String appName;
-
- @Column(name="app_mots_id",nullable=true)
- private Integer appMotsId;
-
- @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 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;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/GetAccessResultId.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/GetAccessResultId.java
deleted file mode 100644
index 83abda54..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/GetAccessResultId.java
+++ /dev/null
@@ -1,64 +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.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;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/PersUserAppSelection.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/PersUserAppSelection.java
deleted file mode 100644
index 4288d920..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/PersUserAppSelection.java
+++ /dev/null
@@ -1,79 +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.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;
- }
-
-} \ No newline at end of file
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/SharedContext.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/SharedContext.java
deleted file mode 100644
index c68f1b8b..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/SharedContext.java
+++ /dev/null
@@ -1,161 +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.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.
- */
- 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
- */
- 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
- */
- 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
- */
- 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
- */
- 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
- */
- public String getCvalue() {
- return cvalue;
- }
-
- /**
- * Sets the value of the key-value pair.
- *
- * @param cvalue
- */
- public void setCvalue(final String cvalue) {
- this.cvalue = cvalue;
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/UserIdRoleId.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/UserIdRoleId.java
deleted file mode 100644
index cce4cb23..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/UserIdRoleId.java
+++ /dev/null
@@ -1,77 +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.domain;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-
-@Entity
-public class UserIdRoleId implements Serializable{
-
- private static final long serialVersionUID = 1L;
-
- @Id
- @Column(name="USER_ID")
- private String user_Id;
-
- @Column(name="ROLE_ID")
- private String roleId;
-
- @Column(name="ORG_USER_ID")
- private String orgUserId;
-
- @Column(name="APP_ID")
- private String appId;
-
- public String getUser_Id() {
- return user_Id;
- }
-
- public void setUser_Id(String id) {
- this.user_Id = id;
- }
-
- public String getRoleId() {
- return roleId;
- }
-
- public void setRoleId(String roleId) {
- this.roleId = roleId;
- }
-
- public String getAppId() {
- return appId;
- }
-
- public void setAppId(String appId) {
- this.appId = appId;
- }
-
- public String getOrgUserId() {
- return orgUserId;
- }
-
- public void setOrgUserId(String orgUserId) {
- this.orgUserId = orgUserId;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/UserRole.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/UserRole.java
deleted file mode 100644
index d0b5df92..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/UserRole.java
+++ /dev/null
@@ -1,91 +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.domain;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-
-@Entity
-public class UserRole implements Serializable{
- private static final long serialVersionUID = 1L;
-
-
- @Id
- @Column(name="USER_ID")
- private Long user_Id;
-
- @Id
- @Column(name="ROLE_ID")
- private Long roleId;
-
- @Column(name="ORG_USER_ID")
- private String orgUserId;
-
-
- @Column(name="FIRST_NAME")
- private String firstName;
-
- @Column(name="LAST_NAME")
- private String lastName;
-
-
- @Column(name="ROLE_NAME")
- private String roleName;
-
- 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 String getRoleName() {
- return roleName;
- }
- public void setRoleName(String roleName) {
- this.roleName = roleName;
- }
- public Long getUser_Id() {
- return user_Id;
- }
- public void setUser_Id(Long user_Id) {
- this.user_Id = user_Id;
- }
- public Long getRoleId() {
- return roleId;
- }
- public void setRoleId(Long roleId) {
- this.roleId = roleId;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/UserRoles.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/UserRoles.java
deleted file mode 100644
index 60ee4321..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/UserRoles.java
+++ /dev/null
@@ -1,111 +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.domain;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import org.openecomp.portalapp.portal.utils.EPSystemProperties;
-import org.openecomp.portalsdk.core.util.SystemProperties;
-
-public class UserRoles implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static final HashMap<Long, String> rolesDictionary;
-
- 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(EPSystemProperties.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.getRoleId());
- }
-
- public void addRole(Long roleId) {
- String normalizedRole = normalizeRole(roleId);
- if (!getRoles().contains(normalizedRole)) {
- this.roles.add(normalizedRole);
- }
- }
-
- 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;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/Widget.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/Widget.java
deleted file mode 100644
index 309b0c87..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/domain/Widget.java
+++ /dev/null
@@ -1,104 +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.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;
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/AppCatalogItem.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/AppCatalogItem.java
deleted file mode 100644
index e0f516d9..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/AppCatalogItem.java
+++ /dev/null
@@ -1,159 +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.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 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 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 + "]";
- }
-
-} \ No newline at end of file
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/AppCategoryFunctionsItem.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/AppCategoryFunctionsItem.java
deleted file mode 100644
index 16aca032..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/AppCategoryFunctionsItem.java
+++ /dev/null
@@ -1,84 +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.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;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/AppContactUsItem.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/AppContactUsItem.java
deleted file mode 100644
index c8dd8f0c..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/AppContactUsItem.java
+++ /dev/null
@@ -1,104 +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.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 apps table on the Contact Us page.
- */
-@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;
- }
-
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/CommonWidgetsEnum.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/CommonWidgetsEnum.java
deleted file mode 100644
index 6270751b..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/CommonWidgetsEnum.java
+++ /dev/null
@@ -1,36 +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.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;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/PortalRestResponse.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/PortalRestResponse.java
deleted file mode 100644
index 4f92e75e..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/PortalRestResponse.java
+++ /dev/null
@@ -1,60 +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.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;
- };
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/PortalRestStatusEnum.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/PortalRestStatusEnum.java
deleted file mode 100644
index eceabacb..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/PortalRestStatusEnum.java
+++ /dev/null
@@ -1,35 +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.ecomp.model;
-
-public enum PortalRestStatusEnum{
- OK("ok"),
- ERROR("error");
-
- private String value;
- private PortalRestStatusEnum(String value){
- this.value = value;
- }
-
- @Override
- public String toString() {
- return value;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/SearchResultItem.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/SearchResultItem.java
deleted file mode 100644
index 0fadab80..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ecomp/model/SearchResultItem.java
+++ /dev/null
@@ -1,92 +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.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{
-
- /**
- *
- */
- private static final long serialVersionUID = 1598343426058929653L;
-
- @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 + "]";
- }
-
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/interceptor/PortalResourceInterceptor.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/interceptor/PortalResourceInterceptor.java
deleted file mode 100644
index 87ba2a44..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/interceptor/PortalResourceInterceptor.java
+++ /dev/null
@@ -1,95 +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.interceptor;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.openecomp.portalapp.controller.sessionmgt.SessionCommunicationController;
-import org.openecomp.portalapp.portal.controller.ExternalAppsRestfulController;
-import org.openecomp.portalapp.portal.controller.SharedContextRestController;
-import org.openecomp.portalapp.portal.logging.aop.EPEELFLoggerAdvice;
-import org.openecomp.portalapp.portal.logging.format.EPAppMessagesEnum;
-import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalapp.service.sessionmgt.ManageService;
-import org.openecomp.portalapp.service.sessionmgt.RemoteWebServiceCallService;
-import org.openecomp.portalsdk.core.exception.UrlAccessRestrictedException;
-import org.openecomp.portalsdk.core.interceptor.ResourceInterceptor;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.openecomp.portalsdk.core.onboarding.crossapi.PortalTimeoutHandler;
-import org.openecomp.portalsdk.core.util.SystemProperties.SecurityEventTypeEnum;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.method.HandlerMethod;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-public class PortalResourceInterceptor extends ResourceInterceptor {
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PortalResourceInterceptor.class);
-
- @Autowired
- public RemoteWebServiceCallService remoteWebServiceCallService;
-
- @Autowired
- public ManageService manageService;
-
- @Autowired
- private EPEELFLoggerAdvice epAdvice;
-
- static ObjectMapper mapper = new ObjectMapper();
-
- @Override
- public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
- throws Exception {
-
- if (handler instanceof HandlerMethod) {
- HandlerMethod method = (HandlerMethod) handler;
- Object controllerObj = method.getBean();
- /**
- * These classes provide REST endpoints used by other application
- * servers, NOT by an end user's browser.
- */
- if (controllerObj instanceof SessionCommunicationController
- || controllerObj instanceof SharedContextRestController
- || controllerObj instanceof ExternalAppsRestfulController) {
- // check user authentication for RESTful calls
- String secretKey = null;
- try {
- epAdvice.loadServletRequestBasedDefaults(request, SecurityEventTypeEnum.INCOMING_REST_MESSAGE);
- if (!remoteWebServiceCallService.verifyRESTCredential(secretKey, request.getHeader("uebkey"),
- request.getHeader("username"), request.getHeader("password"))) {
- throw new UrlAccessRestrictedException();
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Error authenticating RESTful service. Details: " + EcompPortalUtils.getStackTrace(e));
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeRestApiAuthenticationError);
- throw new UrlAccessRestrictedException();
- }
- }
- }
-
- handleSessionUpdates(request);
- return true;
- }
-
- protected void handleSessionUpdates(HttpServletRequest request) {
- PortalTimeoutHandler.handleSessionUpdatesNative(request, null, null, null, null, manageService);
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/interceptor/SessionTimeoutInterceptor.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/interceptor/SessionTimeoutInterceptor.java
deleted file mode 100644
index cd0a3037..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/interceptor/SessionTimeoutInterceptor.java
+++ /dev/null
@@ -1,97 +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.interceptor;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.openecomp.portalapp.authentication.LoginStrategy;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalapp.util.EPUserUtils;
-import org.openecomp.portalapp.util.SessionCookieUtil;
-import org.openecomp.portalsdk.core.controller.FusionBaseController;
-import org.openecomp.portalsdk.core.domain.support.CollaborateList;
-import org.openecomp.portalsdk.core.exception.SessionExpiredException;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.method.HandlerMethod;
-import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
-
-public class SessionTimeoutInterceptor extends HandlerInterceptorAdapter {
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SessionTimeoutInterceptor.class);
-
- @Autowired
- private LoginStrategy loginStrategy;
-
- public SessionTimeoutInterceptor() {
- }
-
- public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
- throws Exception {
-
- if (!isHandlerMethod(handler))
- return false;
-
- HandlerMethod method = (HandlerMethod) handler;
-
- if (!isFusionController(method.getBean()))
- return false;
-
- FusionBaseController controller = (FusionBaseController) method.getBean();
-
- if (!controller.isAccessible()) {
- try {
- EPUser user = EPUserUtils.getUserSession(request);
-
- if (request.getRequestURI().indexOf("logout.htm") > -1) {
- CollaborateList.delUserName(user.getOrgUserId());
- throw new SessionExpiredException();
- } else {
- resetSessionMaxIdleTimeOut(request);
- CollaborateList.addUserName(user.getOrgUserId());
- }
- } catch (Exception see) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(see));
- return loginStrategy.login(request, response);
- }
-
- }
-
- return true;
- }
-
- private void resetSessionMaxIdleTimeOut(HttpServletRequest request) {
- SessionCookieUtil.resetSessionMaxIdleTimeOut(request);
-
- }
-
- private boolean isFusionController(Object controller) {
- if (controller instanceof FusionBaseController)
- return true;
- return false;
- }
-
- private boolean isHandlerMethod(Object controller) {
- if (controller instanceof HandlerMethod)
- return true;
- return false;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/listener/HealthMonitor.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/listener/HealthMonitor.java
deleted file mode 100644
index 6b71eeb7..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/listener/HealthMonitor.java
+++ /dev/null
@@ -1,393 +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.listener;
-
-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.logging.aop.EPMetricsLog;
-import org.openecomp.portalapp.portal.logging.format.EPAppMessagesEnum;
-import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;
-import org.openecomp.portalapp.portal.ueb.EPUebHelper;
-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.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;
-
- 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;
-
- Thread healthMonitorThread;
-
- 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, "==> Health Monitor thread started");
-
- long sleepInterval = (Long.valueOf(SystemProperties.getProperty(EPSystemProperties.HEALTH_POLL_INTERVAL_SECONDS)) * 1000);
- long numIntervalsBetweenAlerts = Long.valueOf(SystemProperties.getProperty(EPSystemProperties.HEALTHFAIL_ALERT_EVERY_X_INTERVALS));
- logger.debug(EELFLoggerDelegate.debugLogger, "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){
- // Write a Log entry that will generate an alert
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeHealthCheckMySqlError);
- logger.debug(EELFLoggerDelegate.debugLogger, "Database down, logging to error log to trigger alert.");
- numIntervalsDatabaseHasBeenDown++;
- }
- else {
- numIntervalsDatabaseHasBeenDown = 0;
- }
- }
-
- dbClusterStatusOk = this.checkClusterStatus();
- if (dbClusterStatusOk == false) {
-
- if ((numIntervalsClusterNotHealthy % numIntervalsBetweenAlerts) == 0){
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeHealthCheckMySqlError);
- logger.debug(EELFLoggerDelegate.debugLogger, "Cluster nodes appear to be down, logging to error log to trigger alert.");
- numIntervalsClusterNotHealthy++;
- }
- else {
- numIntervalsClusterNotHealthy = 0;
- }
- }
-
- dbPermissionsOk = this.checkDatabaseAndPermissions();
- if (dbPermissionsOk == false) {
-
- if ((numIntervalsDatabasePermissionsIncorrect % numIntervalsBetweenAlerts) == 0){
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeHealthCheckMySqlError);
- logger.debug(EELFLoggerDelegate.debugLogger, "Database permissions don't seem correct, logging to error log to trigger alert.");
- 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){
- // Write a Log entry that will generate an alert
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeHealthCheckUebClusterError);
- logger.debug(EELFLoggerDelegate.debugLogger, "UEB down, logging to error log to trigger alert");
- 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.
- //
-
- //
- // Get DB status. If down, signal alert once every X intervals.
- //
- Thread.sleep(sleepInterval);
- }
- }
-
- @PostConstruct
- public void initHealthMonitor() {
-
- healthMonitorThread = new Thread("EP HealthMonitor thread") {
- public void run(){
- try {
- monitorEPHealth();
- } catch (InterruptedException e) {
- logger.debug(EELFLoggerDelegate.debugLogger, "<== Health Monitor thread exiting..." + EcompPortalUtils.getStackTrace(e));
- } catch(Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred in Healthcheck monitor thread." + EcompPortalUtils.getStackTrace(e));
- }
- }
- };
- if (healthMonitorThread != null) {
- healthMonitorThread.start();
- }
- }
-
- @PreDestroy
- public void closeHealthMonitor()
- {
- this.healthMonitorThread.interrupt();
- }
-
-
- private boolean checkIfDatabaseUp() {
-
- boolean isUp = false;
-
- Session localSession = null;
-
- try {
- localSession = sessionFactory.openSession();
-
- if (localSession != null) {
-
- String sql = "select app_name from fn_app where app_id=1";
- Query query = localSession.createSQLQuery(sql);
- @SuppressWarnings("unchecked")
- List <String>queryList = query.list();
- if (queryList != null) {
- isUp = true;
- }
- localSession.close();
- }
- }
- catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(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() exception msg = " + e.getMessage());
- if ((e.getCause() != null) && (e.getCause().getMessage() != null)) {
- logger.error(EELFLoggerDelegate.errorLogger, "checkClusterStatus() exception msg = " + e.getCause().getMessage());
- }
- logger.error(EELFLoggerDelegate.errorLogger, "Exception inside checkClusterStatus() exception = " + EcompPortalUtils.getStackTrace(e));
- isUp = false;
- }
- finally {
- if (localSession != null) {
- localSession.close();
- }
- }
-
- return isUp;
-
- }
-
-
- private boolean checkDatabaseAndPermissions() {
-
- 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, "checkDatabaseAndPermissions() exception msg = " + e.getMessage());
- if ((e.getCause() != null) && (e.getCause().getMessage() != null)) {
- logger.error(EELFLoggerDelegate.errorLogger, "checkDatabaseAndPermissions() exception msg = " + e.getCause().getMessage());
- }
- logger.error(EELFLoggerDelegate.errorLogger, "Exception inside checkDatabaseAndPermissions() exception = " + EcompPortalUtils.getStackTrace(e));
- 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, "Exception inside CheckIfUebUp exception = " + EcompPortalUtils.getStackTrace(e));
- }
-
- return uebUp;
-
-
- }
-
- /*
- private boolean checkIfFeUp() {
- boolean frontenndUp = false;
- try {
- String url = SystemProperties.getProperty(EPSystemProperties.FE_URL);
- if(StringUtils.isEmpty(url))
- {
- logger.debug(EELFLoggerDelegate.debugLogger, "The front end URL is empty. Cannot check the status");
- return frontenndUp;
- }
-
- url = url.replace("index.html", "app/healthCheck.json");
-
- URL frontEndURL = new URL(url);
-
- HttpURLConnection con = (HttpURLConnection) frontEndURL.openConnection();
-
- // optional default is GET
- con.setRequestMethod("GET");
-
- int responseCode = con.getResponseCode();
- logger.debug(EELFLoggerDelegate.debugLogger, "Fronend response code : " + responseCode);
-
- if(responseCode == 200)
- {
- frontenndUp = true;
- }
-
- }
- catch(Exception e){
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while trying to access font end" + EcompPortalUtils.getStackTrace(e));
- }
-
- return frontenndUp;
- }
- */
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/listener/UserContextListener.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/listener/UserContextListener.java
deleted file mode 100644
index 8255914f..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/listener/UserContextListener.java
+++ /dev/null
@@ -1,49 +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.listener;
-
-import java.util.HashMap;
-
-import javax.servlet.ServletContext;
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-
-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...
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/listener/UserSessionListener.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/listener/UserSessionListener.java
deleted file mode 100644
index 9b48c622..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/listener/UserSessionListener.java
+++ /dev/null
@@ -1,125 +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.listener;
-
-import java.util.HashMap;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.annotation.WebListener;
-import javax.servlet.http.HttpSession;
-import javax.servlet.http.HttpSessionEvent;
-import javax.servlet.http.HttpSessionListener;
-
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.service.SharedContextService;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalsdk.core.domain.support.CollaborateList;
-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.ApplicationContext;
-import org.springframework.util.StringUtils;
-
-/**
- * Listens for session-create and session-destroy events.
- */
-@WebListener
-@SuppressWarnings({ "unchecked", "rawtypes" })
-public class UserSessionListener implements HttpSessionListener {
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(UserSessionListener.class);
-
- /**
- * Access to the database
- */
- @Autowired
- SharedContextService sharedContextService;
-
- public void init(ServletConfig config) {
- }
-
- /**
- * Adds sessions to the context scoped HashMap when they begin.
- */
- public void sessionCreated(HttpSessionEvent event) {
- HttpSession session = event.getSession();
- ServletContext context = session.getServletContext();
- HashMap activeUsers = (HashMap) context.getAttribute("activeUsers");
-
- activeUsers.put(session.getId(), session);
- context.setAttribute("activeUsers", activeUsers);
- logger.info(EELFLoggerDelegate.debugLogger, "Session Created : " + session.getId());
- }
-
- /**
- * Removes sessions from the context scoped HashMap when they expire or are
- * invalidated.
- */
- public void sessionDestroyed(HttpSessionEvent event) {
-
- try {
- HttpSession session = event.getSession();
- ServletContext context = session.getServletContext();
- HashMap activeUsers = (HashMap) context.getAttribute("activeUsers");
- activeUsers.remove(session.getId());
-
- EPUser user = (EPUser) session
- .getAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME));
- if (user!=null && !StringUtils.isEmpty(user.getOrgUserId())) {
- CollaborateList.delUserName(user.getOrgUserId());
- }
-
- // Remove any shared context entries for this session.
- if (getSharedContextService()!=null) {
- getSharedContextService().deleteSharedContexts(session.getId());
-
- // Clean the shared context each time a session is destroyed.
- // TODO: move the threshold to configuration file.
- getSharedContextService().expireSharedContexts(60 * 60 * 8);
- }
-
- logger.info(EELFLoggerDelegate.debugLogger, "Session Destroyed : " + session.getId());
-
- } catch (Exception e) {
- logger.warn(EELFLoggerDelegate.errorLogger, "Exception occurred while executing sessionDestroyed. Details: " + EcompPortalUtils.getStackTrace(e));
- }
- }
-
- private static ApplicationContext applicationContext;
-
- public static void setApplicationContext(ApplicationContext _applicationContext) {
- applicationContext = _applicationContext;
- }
-
- public SharedContextService getSharedContextService() {
- if(sharedContextService == null){
- if (applicationContext != null)
- sharedContextService = (SharedContextService)applicationContext.getBean("sharedContextService");
- }
-
- return sharedContextService;
- }
-
- public void setSharedContextService(SharedContextService sharedContextService) {
- this.sharedContextService = sharedContextService;
- }
-}
-
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/aop/EPAuditLog.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/aop/EPAuditLog.java
deleted file mode 100644
index 15a4c7f0..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/aop/EPAuditLog.java
+++ /dev/null
@@ -1,31 +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.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 "";
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/aop/EPEELFLoggerAdvice.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/aop/EPEELFLoggerAdvice.java
deleted file mode 100644
index a03f5153..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/aop/EPEELFLoggerAdvice.java
+++ /dev/null
@@ -1,341 +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.logging.aop;
-
-import static com.att.eelf.configuration.Configuration.MDC_ALERT_SEVERITY;
-import static com.att.eelf.configuration.Configuration.MDC_INSTANCE_UUID;
-import static com.att.eelf.configuration.Configuration.MDC_KEY_REQUEST_ID;
-import static com.att.eelf.configuration.Configuration.MDC_SERVER_FQDN;
-import static com.att.eelf.configuration.Configuration.MDC_SERVER_IP_ADDRESS;
-import static com.att.eelf.configuration.Configuration.MDC_SERVICE_INSTANCE_ID;
-import static com.att.eelf.configuration.Configuration.MDC_SERVICE_NAME;
-
-import java.net.InetAddress;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.UUID;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.utils.EPSystemProperties;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalapp.util.EPUserUtils;
-import org.openecomp.portalsdk.core.logging.format.AlarmSeverityEnum;
-import org.openecomp.portalsdk.core.logging.format.AuditLogFormatter;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.openecomp.portalsdk.core.util.SystemProperties;
-import org.openecomp.portalsdk.core.util.SystemProperties.SecurityEventTypeEnum;
-import org.openecomp.portalsdk.core.web.support.UserUtils;
-import org.slf4j.MDC;
-
-import com.att.eelf.configuration.Configuration;
-
-@org.springframework.context.annotation.Configuration
-public class EPEELFLoggerAdvice {
-
- EELFLoggerDelegate adviceLogger = EELFLoggerDelegate.getLogger(EPEELFLoggerAdvice.class);
- //DateTime Format according to the ECOMP Application Logging Guidelines.
- private static final SimpleDateFormat ecompLogDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX");
-
- public void loadServletRequestBasedDefaults(HttpServletRequest req, SecurityEventTypeEnum securityEventType) {
- try {
- this.setHttpRequestBasedDefaultsIntoGlobalLoggingContext(req, securityEventType, req.getServletPath());
- } catch(Exception e) {
- adviceLogger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- }
- }
-
- public Object[] before(SecurityEventTypeEnum securityEventType, Object[] args, Object[] passOnArgs) {
- String className = "";
- if (passOnArgs[0]!=null) {
- className = passOnArgs[0].toString();
- }
-
- String methodName = "";
- if (passOnArgs[1]!=null) {
- methodName = passOnArgs[1].toString();
- }
-
- //Initialize Request defaults only for controller methods.
- MDC.put(className + methodName + EPSystemProperties.METRICSLOG_BEGIN_TIMESTAMP, getCurrentDateTimeUTC());
- MDC.put(EPSystemProperties.TARGET_ENTITY, EPSystemProperties.ECOMP_PORTAL_BE);
- MDC.put(EPSystemProperties.TARGET_SERVICE_NAME, methodName);
- if (securityEventType!=null) {
- MDC.put(className + methodName + EPSystemProperties.AUDITLOG_BEGIN_TIMESTAMP, getCurrentDateTimeUTC());
- HttpServletRequest req = null;
- if (args[0]!=null && args[0] instanceof HttpServletRequest ) {
- req = (HttpServletRequest)args[0];
- this.setHttpRequestBasedDefaultsIntoGlobalLoggingContext(req, securityEventType, methodName);
- }
- }
-
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(className);
-
- //StopWatch stopWatch = new StopWatch("Metrics for " + className + "." + methodName);
- //stopWatch.start();
-
- logger.debug(EELFLoggerDelegate.debugLogger, "Entered executing " + methodName +".");
-
- return new Object[] {""};
- }
-
- public void after(SecurityEventTypeEnum securityEventType, String statusCode, String responseCode, Object[] args, Object[] returnArgs, Object[] passOnArgs) {
- //ClassName
- String className = "";
- if (passOnArgs[0]!=null) {
- className = passOnArgs[0].toString();
- }
-
- //Method Name
- String methodName = "";
- if (passOnArgs[1]!=null) {
- methodName = passOnArgs[1].toString();
- }
-
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(className);
- /*/
- StopWatch stopWatch = (StopWatch)returnArgs[0];
- if (stopWatch!=null && stopWatch.isRunning()) {
- stopWatch.stop();
- MDC.put(SystemProperties.MDC_TIMER, stopWatch.getTotalTimeMillis() + "ms");
- }
- /**/
-
- if (MDC.get(EPSystemProperties.TARGET_SERVICE_NAME) == null || MDC.get(EPSystemProperties.TARGET_SERVICE_NAME) == "") {
- MDC.put(EPSystemProperties.TARGET_SERVICE_NAME, methodName);
- }
-
- if (MDC.get(EPSystemProperties.TARGET_ENTITY) == null || MDC.get(EPSystemProperties.TARGET_ENTITY) == "") {
- MDC.put(EPSystemProperties.TARGET_ENTITY, EPSystemProperties.ECOMP_PORTAL_BE);
- }
-
- MDC.put(EPSystemProperties.METRICSLOG_BEGIN_TIMESTAMP, MDC.get(className + methodName + EPSystemProperties.METRICSLOG_BEGIN_TIMESTAMP));
- MDC.put(EPSystemProperties.METRICSLOG_END_TIMESTAMP, getCurrentDateTimeUTC());
- this.calculateDateTimeDifference(MDC.get(EPSystemProperties.METRICSLOG_BEGIN_TIMESTAMP), MDC.get(EPSystemProperties.METRICSLOG_END_TIMESTAMP));
-
- //Making sure to reload the INCOMING request MDC defaults if they have
- //been wiped out by either Outgoing or LDAP Phone book search operations.
- if (securityEventType!=null && args[0]!=null && args[0] instanceof HttpServletRequest &&
- securityEventType==SecurityEventTypeEnum.INCOMING_REST_MESSAGE &&
- (MDC.get(EPSystemProperties.FULL_URL)==null || MDC.get(EPSystemProperties.FULL_URL)=="")) {
- HttpServletRequest req = (HttpServletRequest)args[0];
- this.setHttpRequestBasedDefaultsIntoGlobalLoggingContext(req, securityEventType, methodName);
- }
-
- //Use external API response code in case if it resulted in an error.
- String externalAPIResponseCode = MDC.get(EPSystemProperties.EXTERNAL_API_RESPONSE_CODE);
- if (externalAPIResponseCode==null || externalAPIResponseCode=="" || externalAPIResponseCode.trim().equalsIgnoreCase("200")) {
- MDC.put(EPSystemProperties.RESPONSE_CODE, responseCode);
- MDC.put(EPSystemProperties.STATUS_CODE, statusCode);
- } else {
- MDC.put(EPSystemProperties.RESPONSE_CODE, externalAPIResponseCode);
- MDC.put(EPSystemProperties.STATUS_CODE, "ERROR");
- }
-
- logger.debug(EELFLoggerDelegate.debugLogger, "Finished executing " + methodName + ".");
- logger.info(EELFLoggerDelegate.metricsLogger, methodName + " operation is completed.");
-
- //Log security message, if necessary
- if (securityEventType!=null) {
- MDC.put(EPSystemProperties.AUDITLOG_BEGIN_TIMESTAMP, MDC.get(className + methodName + EPSystemProperties.AUDITLOG_BEGIN_TIMESTAMP));
- MDC.put(EPSystemProperties.AUDITLOG_END_TIMESTAMP, getCurrentDateTimeUTC());
- this.calculateDateTimeDifference(MDC.get(EPSystemProperties.AUDITLOG_BEGIN_TIMESTAMP), MDC.get(EPSystemProperties.AUDITLOG_END_TIMESTAMP));
-
- this.logSecurityMessage(logger, securityEventType, methodName);
-
- //Outgoing & LDAP messages are part of Incoming requests so,
- //keep "RequestId", "PartnerName", "ServiceName", "LoginId" &
- //"ResponseCode" etc. in memory and remove it only when
- //finished processing the parent incoming message.
- if (securityEventType!=SecurityEventTypeEnum.OUTGOING_REST_MESSAGE &&
- securityEventType!=SecurityEventTypeEnum.LDAP_PHONEBOOK_USER_SEARCH) {
- MDC.remove(MDC_KEY_REQUEST_ID);
- MDC.remove(EPSystemProperties.PARTNER_NAME);
- MDC.remove(Configuration.MDC_SERVICE_NAME);
- MDC.remove(EPSystemProperties.MDC_LOGIN_ID);
- MDC.remove(EPSystemProperties.EXTERNAL_API_RESPONSE_CODE);
- }
-
- //clear when finishes audit logging
- MDC.remove(EPSystemProperties.FULL_URL);
- MDC.remove(EPSystemProperties.PROTOCOL);
- MDC.remove(EPSystemProperties.STATUS_CODE);
- MDC.remove(className + methodName + EPSystemProperties.AUDITLOG_BEGIN_TIMESTAMP);
- MDC.remove(EPSystemProperties.AUDITLOG_BEGIN_TIMESTAMP);
- MDC.remove(EPSystemProperties.AUDITLOG_END_TIMESTAMP);
- MDC.remove(EPSystemProperties.RESPONSE_CODE);
- }
- MDC.remove(className + methodName + EPSystemProperties.METRICSLOG_BEGIN_TIMESTAMP);
- MDC.remove(EPSystemProperties.METRICSLOG_BEGIN_TIMESTAMP);
- MDC.remove(EPSystemProperties.METRICSLOG_END_TIMESTAMP);
- MDC.remove(EPSystemProperties.MDC_TIMER);
- MDC.remove(EPSystemProperties.TARGET_ENTITY);
- MDC.remove(EPSystemProperties.TARGET_SERVICE_NAME);
- }
-
- private void logSecurityMessage(EELFLoggerDelegate logger, SecurityEventTypeEnum securityEventType, String restMethod) {
- StringBuilder additionalInfoAppender = new StringBuilder();
- String auditMessage = "";
-
- if (securityEventType == SecurityEventTypeEnum.OUTGOING_REST_MESSAGE) {
- additionalInfoAppender.append(String.format("%s '%s' request was initiated.",
- restMethod, MDC.get(EPSystemProperties.TARGET_SERVICE_NAME)));
- } else if (securityEventType==SecurityEventTypeEnum.LDAP_PHONEBOOK_USER_SEARCH) {
- additionalInfoAppender.append("LDAP Phonebook search operation is performed.");
- } else {
- additionalInfoAppender.append(String.format("%s request was received.", restMethod));
-
- if (securityEventType == SecurityEventTypeEnum.FE_LOGIN_ATTEMPT) {
- String loginId = "";
- String additionalMessage = " Successfully authenticated.";
- loginId = MDC.get(EPSystemProperties.MDC_LOGIN_ID);
- if (loginId==null || loginId=="" || loginId== EPSystemProperties.UNKNOWN) {
- additionalMessage = " No cookies are found.";
- }
- additionalInfoAppender.append(additionalMessage);
- } else if (securityEventType == SecurityEventTypeEnum.FE_LOGOUT) {
- additionalInfoAppender.append(" User has been successfully logged out.");
- }
- }
-
- String fullURL = MDC.get(EPSystemProperties.FULL_URL);
- if (fullURL!=null && fullURL!="") {
- additionalInfoAppender.append(" Request-URL:" + MDC.get(EPSystemProperties.FULL_URL));
- }
-
- auditMessage = AuditLogFormatter.getInstance().createMessage( MDC.get(EPSystemProperties.PROTOCOL),
- securityEventType.name(),
- MDC.get(EPSystemProperties.MDC_LOGIN_ID),
- additionalInfoAppender.toString());
-
- logger.info(EELFLoggerDelegate.auditLogger, auditMessage);
- }
-
- private void setHttpRequestBasedDefaultsIntoGlobalLoggingContext(HttpServletRequest req, SecurityEventTypeEnum securityEventType, String restMethod) {
- //No need to load the request based defaults for the following security messages
- //since either they are initiated by the Portal BE or not Http request based.
- if (req!=null) {
- if (securityEventType!=SecurityEventTypeEnum.OUTGOING_REST_MESSAGE &&
- securityEventType!=SecurityEventTypeEnum.LDAP_PHONEBOOK_USER_SEARCH &&
- securityEventType!=SecurityEventTypeEnum.INCOMING_UEB_MESSAGE) {
- //Load the RequestID (aka TrasactionId) into MDC context.
- String requestId = UserUtils.getRequestId(req);
- if (requestId=="" || requestId==null) {
- requestId = UUID.randomUUID().toString();
- }
- MDC.put(MDC_KEY_REQUEST_ID, requestId);
-
- //Load user agent into MDC context, if available.
- String accessingClient = "Unknown";
- accessingClient = req.getHeader(SystemProperties.USERAGENT_NAME);
- if (accessingClient!=null && accessingClient!="" &&
- (accessingClient.contains("Mozilla") || accessingClient.contains("Chrome") || accessingClient.contains("Safari"))) {
- accessingClient = EPSystemProperties.ECOMP_PORTAL_FE;
- }
- MDC.put(EPSystemProperties.PARTNER_NAME, accessingClient);
-
- //Load loginId into MDC context.
- String loginId = "";
- try {
- loginId = UserUtils.getUserIdFromCookie(req);
- } catch (Exception e) {
- adviceLogger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- }
- if (loginId == null || loginId == "") {
- EPUser user = EPUserUtils.getUserSession(req);
- if (user != null) {
- loginId = user.getLoginId();
- }
-
- if (loginId==null || loginId=="") {
- loginId = "Unknown";
- }
- }
- MDC.put(EPSystemProperties.MDC_LOGIN_ID, loginId);
-
- //Rest URL & Protocol
- String restURL = "";
- MDC.put(EPSystemProperties.FULL_URL, EPSystemProperties.UNKNOWN);
- MDC.put(EPSystemProperties.PROTOCOL, EPSystemProperties.HTTP);
- restURL = UserUtils.getFullURL(req);
- if (restURL!=null && restURL!="") {
- MDC.put(EPSystemProperties.FULL_URL, restURL);
- if (restURL.toLowerCase().contains("https")) {
- MDC.put(EPSystemProperties.PROTOCOL, EPSystemProperties.HTTPS);
- }
- }
-
- //Rest Path
- MDC.put(MDC_SERVICE_NAME, restMethod);
- String restPath = req.getServletPath();
- if (restPath!=null && restPath!="") {
- MDC.put(MDC_SERVICE_NAME, restPath);
- }
-
- //Client IPAddress i.e. IPAddress of the remote host who is making this request.
- String clientIPAddress = "";
- clientIPAddress = req.getHeader("X-FORWARDED-FOR");
- if (clientIPAddress == null) {
- clientIPAddress = req.getRemoteAddr();
- }
- MDC.put(EPSystemProperties.CLIENT_IP_ADDRESS, clientIPAddress);
- } else if(securityEventType==SecurityEventTypeEnum.LDAP_PHONEBOOK_USER_SEARCH) {
- MDC.put(EPSystemProperties.TARGET_ENTITY, "Phonebook");
- MDC.put(EPSystemProperties.TARGET_SERVICE_NAME, "search");
- }
- } else {
- MDC.put(MDC_SERVICE_NAME, restMethod);
- MDC.put(EPSystemProperties.PARTNER_NAME, EPSystemProperties.ECOMP_PORTAL_FE);
- }
-
- MDC.put(MDC_SERVICE_INSTANCE_ID, "");
- MDC.put(MDC_ALERT_SEVERITY, AlarmSeverityEnum.INFORMATIONAL.toString());
- try {
- MDC.put(MDC_SERVER_FQDN, InetAddress.getLocalHost().getHostName());
- MDC.put(MDC_SERVER_IP_ADDRESS, InetAddress.getLocalHost().getHostAddress());
- MDC.put(MDC_INSTANCE_UUID, SystemProperties.getProperty(SystemProperties.INSTANCE_UUID));
- } catch (Exception e) {
- adviceLogger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- }
- }
-
- private String getCurrentDateTimeUTC() {
- String currentDateTime = ecompLogDateFormat.format(new Date());
- return currentDateTime;
- }
-
- private void calculateDateTimeDifference(String beginDateTime, String endDateTime) {
- if (beginDateTime!=null && endDateTime!=null) {
- try {
- Date beginDate = ecompLogDateFormat.parse(beginDateTime);
- Date endDate = ecompLogDateFormat.parse(endDateTime);
- String timeDifference = String.format("%d ms", endDate.getTime() - beginDate.getTime());
- MDC.put(SystemProperties.MDC_TIMER, timeDifference);
- } catch(Exception e) {
- adviceLogger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- }
- }
- }
-
- public String getInternalResponseCode() {
- return MDC.get(EPSystemProperties.RESPONSE_CODE);
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/aop/EPEELFLoggerAspect.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/aop/EPEELFLoggerAspect.java
deleted file mode 100644
index 80ae9262..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/aop/EPEELFLoggerAspect.java
+++ /dev/null
@@ -1,204 +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.logging.aop;
-
-import org.aspectj.lang.ProceedingJoinPoint;
-import org.aspectj.lang.annotation.Around;
-import org.aspectj.lang.annotation.Aspect;
-import org.aspectj.lang.annotation.Pointcut;
-import org.openecomp.portalapp.portal.transport.FieldsValidator;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.openecomp.portalsdk.core.util.SystemProperties.SecurityEventTypeEnum;
-import org.springframework.beans.factory.annotation.Autowired;
-
-@Aspect
-@org.springframework.context.annotation.Configuration
-public class EPEELFLoggerAspect {
-
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EPEELFLoggerAspect.class);
-
- @Autowired
- EPEELFLoggerAdvice epAdvice;
-
- /*
- * Point-cut expression to handle all INCOMING_REST_MESSAGES
- */
- @Pointcut("execution(public * org.openecomp.portalapp.portal.controller.*.*(..))")
- public void incomingAuditMessages() {}
-
- /*
- * Handles all INCOMING_REST_MESSAGES from kpiDashboard
- */
- @Pointcut("execution(public * org.openecomp.portalapp.kpidash.controller.*.*(..))")
- public void kpiDashboardAuditMessages() {}
-
- /*
- * Point-cut expression to handle all session management INCOMING_REST_MESSAGES
- */
- @Pointcut("execution(public * org.openecomp.portalapp.controller.sessionmgt.*.*(..))")
- public void sessionMgtIncomingAuditMessages() {}
-
- /*
- * Point-cut expression to handle UserProfileController INCOMING_REST_MESSAGES
- */
- @Pointcut("execution(public * org.openecomp.portalapp.controller.UserProfileController.*(..))")
- public void userProfileIncomingAuditMessages() {}
-
- /*
- * Point-cut expression to handle UserProfileController INCOMING_REST_MESSAGES
- */
- @Pointcut("execution(public * org.openecomp.portalapp.controller.WelcomeController.*(..))")
- public void welcomeIncomingAuditMessages() {}
-
- /*
- * Point-cut expression to handle INCOING Logout Rest Messages
- */
- @Pointcut("execution(public * org.openecomp.portalapp.controller.ECOMPLogoutController.*(..))")
- public void logoutAuditMessages() {}
-
-
- /*
- * Point-cut expression which handles all the OUTGOING_REST_MESSAGES.
- */
- @Pointcut("execution(public * org.openecomp.portalapp.portal.service.ApplicationsRestClientServiceImpl.*(..))")
- public void outgoingAuditMessages() {}
-
- /*
- * Point-cut expression to handle all the session management OUTGOING_REST_MESSAGES.
- */
- @Pointcut("execution(public * org.openecomp.portalapp.service.sessionmgt.SessionCommunication.*(..))")
- public void sessionMgtOutgoingAuditMessages() {}
-
- /*
- * Point-cut expression which handles all the LDAP_PHONEBOOK_USER_SEARCH calls.
- */
- @Pointcut("execution(public * org.openecomp.portalapp.portal.service.EPLdapServiceImpl.*(..))")
- public void phoneBookSearchAuditMessages() {}
-
- /*
- * Handles Audit, Metrics & Debug logging for the point-cut
- * expression defined at class-level
- */
- @Around("(incomingAuditMessages() || kpiDashboardAuditMessages() || sessionMgtIncomingAuditMessages() || "
- + "userProfileIncomingAuditMessages() || welcomeIncomingAuditMessages()) && @within(epAuditLog)")
- public Object incomingAuditMessagesAroundClass(ProceedingJoinPoint joinPoint, EPAuditLog epAuditLog) throws Throwable {
- return this.logAroundMethod(joinPoint, SecurityEventTypeEnum.INCOMING_REST_MESSAGE);
- }
-
- /*
- * Handles Audit, Metrics & Debug logging for the point-cut
- * expression defined at class-level
- */
- @Around("(outgoingAuditMessages() || sessionMgtOutgoingAuditMessages()) && @within(epAuditLog)")
- public Object outgoingAuditMessagesAroundClass(ProceedingJoinPoint joinPoint, EPAuditLog epAuditLog) throws Throwable {
- return this.logAroundMethod(joinPoint, SecurityEventTypeEnum.OUTGOING_REST_MESSAGE);
- }
-
-
- /*
- * Handles Audit, Metrics & Debug logging for the point-cut
- * expression defined at method-level
- */
- @Around("(outgoingAuditMessages() || sessionMgtOutgoingAuditMessages()) && @annotation(epAuditLog)")
- public Object outgoingAuditMessagesAroundMethod(ProceedingJoinPoint joinPoint, EPAuditLog epAuditLog) throws Throwable {
- return this.logAroundMethod(joinPoint, SecurityEventTypeEnum.OUTGOING_REST_MESSAGE);
- }
-
- /*
- * Handles Audit, Metrics & Debug logging for the point-cut
- * expression defined at method-level
- */
- @Around("(incomingAuditMessages() || kpiDashboardAuditMessages() || sessionMgtIncomingAuditMessages() ||"
- + "userProfileIncomingAuditMessages() || welcomeIncomingAuditMessages()) && @annotation(epAuditLog)")
- public Object incomingAuditMessagesAroundMethod(ProceedingJoinPoint joinPoint, EPAuditLog epAuditLog) throws Throwable {
- return this.logAroundMethod(joinPoint, SecurityEventTypeEnum.INCOMING_REST_MESSAGE);
- }
-
- @Around("@annotation(epAuditLog)")
- public Object loginAuditMessagesAroundMethod(ProceedingJoinPoint joinPoint, EPAuditLog epAuditLog) throws Throwable {
- return this.logAroundMethod(joinPoint, SecurityEventTypeEnum.FE_LOGIN_ATTEMPT);
- }
-
- @Around("logoutAuditMessages() && @annotation(epAuditLog)")
- public Object logoutAuditMessagesAroundMethod(ProceedingJoinPoint joinPoint, EPAuditLog epAuditLog) throws Throwable {
- return this.logAroundMethod(joinPoint, SecurityEventTypeEnum.FE_LOGOUT);
- }
-
- @Around("phoneBookSearchAuditMessages() && @annotation(epAuditLog)")
- public Object phonebookSearchAuditMessagesAroundMethod(ProceedingJoinPoint joinPoint, EPAuditLog epAuditLog) throws Throwable {
- return this.logAroundMethod(joinPoint, SecurityEventTypeEnum.LDAP_PHONEBOOK_USER_SEARCH);
- }
-
- private Object logAroundMethod(ProceedingJoinPoint joinPoint, SecurityEventTypeEnum securityEventType) throws Throwable {
- //Before
- Object[] passOnArgs = new Object[] {joinPoint.getSignature().getDeclaringType().getName(), joinPoint.getSignature().getName()};
- Object[] returnArgs = epAdvice.before(securityEventType, joinPoint.getArgs(), passOnArgs);
-
- //Call the actual method
- Object result = null;
- String statusCode = "COMPLETE";
- String responseCode = "200";
- try {
- result = joinPoint.proceed();
- } catch(Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- statusCode = "ERROR";
- responseCode = "500"; //Internal server error
- }
-
- //Check the result
- if (securityEventType!=null) {
- if (result==null) {
- statusCode = "ERROR";
- //Check if there is an internal response code
- //and use it if the caller function has configured it.
- responseCode = epAdvice.getInternalResponseCode();
- if (responseCode==null||responseCode=="") {
- responseCode = "500"; //Internal server error
- }
- } else if (result instanceof FieldsValidator) {
- FieldsValidator fieldsValidator = (FieldsValidator) result;
- if (fieldsValidator!=null && fieldsValidator.httpStatusCode!=null) {
- responseCode = fieldsValidator.httpStatusCode.toString();
- }
- }
- }
-
- //After
- epAdvice.after(securityEventType, statusCode, responseCode, joinPoint.getArgs(), returnArgs, passOnArgs);
-
- return result;
- }
-
- //Metrics Logging
- @Pointcut("execution(* *(..))")
- public void performMetricsLogging() {}
-
- @Around("performMetricsLogging() && @within(epMetricsLog)")
- public Object metricsLoggingAroundClass(ProceedingJoinPoint joinPoint, EPMetricsLog epMetricsLog) throws Throwable {
- return this.logAroundMethod(joinPoint, null);
- }
-
- @Around("performMetricsLogging() && @annotation(epMetricsLog)")
- public Object metricsLoggingAroundMethod(ProceedingJoinPoint joinPoint, EPMetricsLog epMetricsLog) throws Throwable {
- return this.logAroundMethod(joinPoint, null);
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/aop/EPMetricsLog.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/aop/EPMetricsLog.java
deleted file mode 100644
index cc325a12..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/aop/EPMetricsLog.java
+++ /dev/null
@@ -1,31 +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.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 "";
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/format/ApplicationCodes.properties b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/format/ApplicationCodes.properties
deleted file mode 100644
index 2533dfa8..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/format/ApplicationCodes.properties
+++ /dev/null
@@ -1,141 +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.
-# ================================================================================
-###
-########################################################################
-#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}.
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/format/EPAppMessagesEnum.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/format/EPAppMessagesEnum.java
deleted file mode 100644
index aae56e93..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/format/EPAppMessagesEnum.java
+++ /dev/null
@@ -1,260 +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.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;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/format/EPErrorCodesEnum.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/format/EPErrorCodesEnum.java
deleted file mode 100644
index 39771e3d..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/format/EPErrorCodesEnum.java
+++ /dev/null
@@ -1,95 +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.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");
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/logic/EPLogUtil.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/logic/EPLogUtil.java
deleted file mode 100644
index 489a68a8..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/logging/logic/EPLogUtil.java
+++ /dev/null
@@ -1,76 +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.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.web.support.UserUtils;
-import org.slf4j.MDC;
-
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
-
-public class EPLogUtil {
- private static EELFLogger errorLogger = EELFManager.getInstance().getErrorLogger();
- 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);
- }
- }
-
- public 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();
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/AdminRolesService.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/AdminRolesService.java
deleted file mode 100644
index c399d891..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/AdminRolesService.java
+++ /dev/null
@@ -1,52 +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 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);
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/AdminRolesServiceImpl.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/AdminRolesServiceImpl.java
deleted file mode 100644
index 508bd3d6..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/AdminRolesServiceImpl.java
+++ /dev/null
@@ -1,318 +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.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.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.EPSystemProperties;
-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;
-import org.springframework.transaction.annotation.Transactional;
-
-@Service("adminRolesService")
-@Transactional
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPMetricsLog
-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(EPSystemProperties.SYS_ADMIN_ROLE_ID));
- ACCOUNT_ADMIN_ROLE_ID = Long.valueOf(SystemProperties.getProperty(EPSystemProperties.ACCOUNT_ADMIN_ROLE_ID));
- ECOMP_APP_ID = Long.valueOf(SystemProperties.getProperty(EPSystemProperties.ECOMP_APP_ID));
- } catch(Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- }
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public AppsListWithAdminRole getAppsWithAdminRoleStateForUser(String orgUserId) {
- AppsListWithAdminRole appsListWithAdminRole = null;
-
- try {
- List<EPUser> userList = dataAccessService.getList(EPUser.class, " where org_user_id = '" + 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'", 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
- @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()) {
- 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(EPAppMessagesEnum.BeDaoSystemError);
- logger.error(EELFLoggerDelegate.errorLogger, "setAppsWithAdminRoleStateForUser: exception in point 2 = "
- + EcompPortalUtils.getStackTrace(e));
- try {
- transaction.rollback();
- } catch (Exception ex) {
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeExecuteRollbackError);
- logger.error(EELFLoggerDelegate.errorLogger, "setAppsWithAdminRoleStateForUser: exception in point 3 = "
- + EcompPortalUtils.getStackTrace(ex));
- }
- } finally {
- try {
- localSession.close();
- } catch (Exception e) {
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeDaoCloseSessionError);
- logger.error(EELFLoggerDelegate.errorLogger, "setAppsWithAdminRoleStateForUser: exception in point 4 = "
- + EcompPortalUtils.getStackTrace(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(EPAppMessagesEnum.BeDaoSystemError);
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while executing isSuperAdmin operation, Details: "
- + EcompPortalUtils.getStackTrace(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(EPAppMessagesEnum.BeDaoSystemError);
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while executing isAccountAdmin operation, Details: "
- + EcompPortalUtils.getStackTrace(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(EPAppMessagesEnum.BeDaoSystemError);
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while executing isUser operation, Details: "
- + EcompPortalUtils.getStackTrace(e));
- }
- return false;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/AppContactUsService.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/AppContactUsService.java
deleted file mode 100644
index c81f2938..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/AppContactUsService.java
+++ /dev/null
@@ -1,55 +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.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;
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/AppContactUsServiceImpl.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/AppContactUsServiceImpl.java
deleted file mode 100644
index 7a2f6206..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/AppContactUsServiceImpl.java
+++ /dev/null
@@ -1,178 +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.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-
-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;
-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.transaction.annotation.Transactional;
-
-/**
- * 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;
- }
-
-
- @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;
- }
-
-
- @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;
- }
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/ApplicationsRestClientService.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/ApplicationsRestClientService.java
deleted file mode 100644
index 2ed9820d..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/ApplicationsRestClientService.java
+++ /dev/null
@@ -1,28 +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 org.apache.cxf.transport.http.HTTPException;
-
-public interface ApplicationsRestClientService {
- public <T> T get(Class<T> clazz, long app, String restPath) throws HTTPException;
- public <T> T post(Class<T> clazz, long appId, Object payload, String restPath) throws HTTPException ;
- public <T> T put(Class<T> clazz, long appId, Object payload, String restPath) throws HTTPException ;
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/ApplicationsRestClientServiceImpl.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/ApplicationsRestClientServiceImpl.java
deleted file mode 100644
index c18fe304..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/ApplicationsRestClientServiceImpl.java
+++ /dev/null
@@ -1,267 +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 static com.att.eelf.configuration.Configuration.MDC_KEY_REQUEST_ID;
-
-import java.lang.reflect.Type;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Date;
-
-import javax.annotation.PostConstruct;
-import javax.servlet.http.HttpServletResponse;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-import org.apache.cxf.jaxrs.client.WebClient;
-import org.apache.cxf.transport.http.HTTPException;
-import org.openecomp.portalapp.portal.domain.EPApp;
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
-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.utils.EPSystemProperties;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.openecomp.portalsdk.core.util.CipherUtil;
-import org.openecomp.portalsdk.core.util.SystemProperties;
-import org.slf4j.MDC;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.EnableAspectJAutoProxy;
-import org.springframework.stereotype.Service;
-
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-import com.google.gson.JsonDeserializationContext;
-import com.google.gson.JsonDeserializer;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonParseException;
-
-@Service("applicationsRestClientService")
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPAuditLog
-public class ApplicationsRestClientServiceImpl implements ApplicationsRestClientService{
-
- private static final String PASSWORD_HEADER = "password";
-
- private static final String APP_USERNAME_HEADER = "username";
-
- private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ApplicationsRestClientServiceImpl.class);
-
- @Autowired
- private AppsCacheService appsCacheService;
- Gson gson = null;
-
- @PostConstruct
- private void init(){
- logger.debug(EELFLoggerDelegate.debugLogger, "initializing");
- GsonBuilder builder = new GsonBuilder();
-
- // Register an adapter to manage the date types as long values
- builder.registerTypeAdapter(Date.class, new JsonDeserializer<Date>() {
- public Date deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
- return new Date(json.getAsJsonPrimitive().getAsLong());
- }
- });
-
- gson = builder.create();
- }
-
- // TODO: do we need to do additional logging for remote API calls?
- private static WebClient createClientForPath(String baseUri, String path) {
- logger.info(EELFLoggerDelegate.debugLogger, "Creating web client for " + baseUri + " + " + path);
- WebClient client = WebClient.create(baseUri);
- client.type(MediaType.APPLICATION_JSON).accept(MediaType.APPLICATION_JSON);
- client.path(path);
- return client;
- }
-
- @EPMetricsLog
- private void verifyResponse(Response response) throws HTTPException {
- int status = response.getStatus();
- logger.debug(EELFLoggerDelegate.debugLogger, "http response status=" + status);
- MDC.put(EPSystemProperties.EXTERNAL_API_RESPONSE_CODE, Integer.toString(status));
- if (!isHttpSuccess(status)) {
- String errMsg = "Failed. Status=" + status + "; [" + response.getStatusInfo().getReasonPhrase().toString() + "]";
- URL url = null;
- try {
- // must not be null to avoid NPE in HTTPException constructor
- url = new URL("http://null");
- if (response.getLocation() != null)
- url = response.getLocation().toURL();
- } catch (MalformedURLException e) {
- // never mind. it is only for the debug message.
- logger.warn(EELFLoggerDelegate.errorLogger, "Failed to build URL", e);
- }
- logger.error(EELFLoggerDelegate.errorLogger, "http response failed. " + errMsg + "; url=" + url);
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeIncorrectHttpStatusError);
- throw new HTTPException(status, errMsg, url);
- }
- }
-
- private static boolean isHttpSuccess(int status){
- return status / 100 == 2;
- }
-
- @EPMetricsLog
- private WebClient createClientForApp(long appId, String restPath) {
- logger.debug(EELFLoggerDelegate.debugLogger, "creating client for appId=" + appId + "; restPath=" + restPath);
- EPApp externalApp = appsCacheService.getApp(appId);
- if(externalApp != null){
- String appBaseUri = externalApp.getAppRestEndpoint();
- String username = externalApp.getUsername();
- String encriptedPwd = externalApp.getAppPassword();
- String decreptedAppPwd = "";
-
- //Set local context
- MDC.put(EPSystemProperties.PROTOCOL, EPSystemProperties.HTTP);
- if (appBaseUri!=null && appBaseUri.contains("https")) {
- MDC.put(EPSystemProperties.PROTOCOL, EPSystemProperties.HTTPS);
- }
- MDC.put(EPSystemProperties.FULL_URL, appBaseUri + restPath);
- MDC.put(EPSystemProperties.TARGET_ENTITY, externalApp.getName());
- MDC.put(EPSystemProperties.TARGET_SERVICE_NAME, restPath);
-
- try {
- decreptedAppPwd = CipherUtil.decrypt(encriptedPwd, SystemProperties.getProperty(SystemProperties.Decryption_Key));
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Unable to decrypt App name = " + externalApp, EcompPortalUtils.getStackTrace(e));
- logger.error(EELFLoggerDelegate.errorLogger, "Unable to decrypt App name = " + externalApp, EcompPortalUtils.getStackTrace(e));
- }
- logger.debug(EELFLoggerDelegate.debugLogger, String.format("App %d found, baseUri=[%s], Headers: [%s=%s, %s=%s]", appId, appBaseUri, APP_USERNAME_HEADER, username, PASSWORD_HEADER, encriptedPwd));
- WebClient client = createClientForPath(appBaseUri, restPath);
- client.header(APP_USERNAME_HEADER, username);
- client.header(PASSWORD_HEADER, decreptedAppPwd);
- client.header(SystemProperties.ECOMP_REQUEST_ID, MDC.get(MDC_KEY_REQUEST_ID));
- client.header(SystemProperties.USERAGENT_NAME, EPSystemProperties.ECOMP_PORTAL_BE);
-
- return client;
- }
- return null;
- }
-
- @Override
- public <T> T get(Class<T> clazz, long appId, String restPath) throws HTTPException {
-
- WebClient webClient = null;
- Response response = null;
- T t = null;
-
- webClient = createClientForApp(appId, restPath);
- EcompPortalUtils.logAndSerializeObject(restPath, "GET request =", "no-payload");
-
- try {
- if (webClient!=null) {
- response = webClient.get();
- } else {
- logger.error(EELFLoggerDelegate.errorLogger, "Unable to create the Webclient to make the '" + restPath + "' API call.");
- }
- } catch (Exception e) {
- MDC.put(EPSystemProperties.EXTERNAL_API_RESPONSE_CODE, Integer.toString(HttpServletResponse.SC_INTERNAL_SERVER_ERROR));
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeRestApiGeneralError);
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while making the GET REST API call, Details: " + EcompPortalUtils.getStackTrace(e));
- }
-
- if (response!=null) {
- verifyResponse(response);
- String str = response.readEntity(String.class);
- EcompPortalUtils.logAndSerializeObject(restPath, "GET result =", str);
- try { t = gson.fromJson(str, clazz); } catch(Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeInvalidJsonInput);
- }
- }
-
- return t;
- }
-
- @Override
- public <T> T post(Class<T> clazz, long appId, Object payload, String restPath) throws HTTPException {
- WebClient client = null;
- Response response = null;
- T t = null;
-
- client = createClientForApp(appId, restPath);
- EcompPortalUtils.logAndSerializeObject(restPath, "POST request =", payload);
-
-
- try {
- if (client!=null) {
- response = client.post(payload);
- } else {
- logger.error(EELFLoggerDelegate.errorLogger, "Unable to create the Webclient to make the '" + restPath + "' API call.");
- }
- } catch (Exception e) {
- MDC.put(EPSystemProperties.EXTERNAL_API_RESPONSE_CODE, Integer.toString(HttpServletResponse.SC_INTERNAL_SERVER_ERROR));
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeRestApiGeneralError);
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while making the POST REST API call, Details: " + EcompPortalUtils.getStackTrace(e));
- }
-
- if (response!=null) {
- verifyResponse(response);
-
- //String contentType = response.getHeaderString("Content-Type");
- if(clazz != null) {
- String str = response.readEntity(String.class);
- EcompPortalUtils.logAndSerializeObject(restPath, "POST result =", str);
- try { t = gson.fromJson(str, clazz); } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeInvalidJsonInput);
- }
- }
- }
- return t;
- }
-
- @Override
- public <T> T put(Class<T> clazz, long appId, Object payload, String restPath) throws HTTPException {
- WebClient client = null;
- Response response = null;
- T t = null;
-
- client = createClientForApp(appId, restPath);
- EcompPortalUtils.logAndSerializeObject(restPath, "PUT request =", payload);
-
- try {
- if (client!=null) {
- response = client.put(payload);
- } else {
- logger.error(EELFLoggerDelegate.errorLogger, "Unable to create the Webclient to make the '" + restPath + "' API call.");
- }
- } catch(Exception e) {
- MDC.put(EPSystemProperties.EXTERNAL_API_RESPONSE_CODE, Integer.toString(HttpServletResponse.SC_INTERNAL_SERVER_ERROR));
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeRestApiGeneralError);
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while making the PUT REST API call, Details: " + EcompPortalUtils.getStackTrace(e));
- }
-
- if (response!=null) {
- verifyResponse(response);
- String str = response.readEntity(String.class);
- EcompPortalUtils.logAndSerializeObject(restPath, "PUT result =", str);
- try { t = gson.fromJson(str, clazz); } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeInvalidJsonInput);
- }
- }
- return t;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/AppsCacheService.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/AppsCacheService.java
deleted file mode 100644
index dc3ac56d..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/AppsCacheService.java
+++ /dev/null
@@ -1,40 +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 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);
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/AppsCacheServiceImple.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/AppsCacheServiceImple.java
deleted file mode 100644
index 7bbff768..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/AppsCacheServiceImple.java
+++ /dev/null
@@ -1,104 +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.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.annotation.PostConstruct;
-
-import org.openecomp.portalapp.portal.domain.EPApp;
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.EnableAspectJAutoProxy;
-import org.springframework.stereotype.Service;
-
-@Service("appsCacheService")
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPMetricsLog
-public class AppsCacheServiceImple implements AppsCacheService {
- @Autowired
- EPAppService appsService;
-
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AppsCacheServiceImple.class);
-
- private static long updateTime = 0;
- private static final int cacheUpdateIntervalInSeconds = 10;
-
- private static volatile Map<Long, EPApp> appsMap;
-
- @PostConstruct
- public void init() {
- this.refreshAppsMap();
- }
-
- private Map<Long, EPApp> refreshAppsMap() {
- long now = System.currentTimeMillis();
-
- if(noNeedToUpdate(now))
- return null;
-
- synchronized (this) {
- if(noNeedToUpdate(now))
- return null;
- List<EPApp> allApps = appsService.getAppsFullList();
- Map<Long, EPApp> newAppsMap = new HashMap<Long, EPApp>();
- for (EPApp app : allApps) {
- newAppsMap.put(app.getId(), app);
- }
- // Switch cache with the new one.
- appsMap = newAppsMap;
- updateTime = now;
- }
-
- return appsMap;
- }
-
- private boolean noNeedToUpdate(long now) {
- long secondsPassed = (now - updateTime)/1000;
- if(secondsPassed < cacheUpdateIntervalInSeconds){
- logger.debug(EELFLoggerDelegate.debugLogger, "no need to refresh yet, seconds since last refresh: " + secondsPassed + ", refresh interval (sec) = " + cacheUpdateIntervalInSeconds);
- return true; // no need to update cache
- }
- return false; // its time to update
- }
-
- @Override
- public String getAppEndpoint(Long appId) {
- refreshAppsMap();
- EPApp app = appsMap.get(appId);
- if(app != null)
- return app.getAppRestEndpoint();
- return null;
- }
-
- @Override
- public EPApp getApp(Long appId) {
- refreshAppsMap();
- EPApp app = appsMap.get(appId);
- if(app != null)
- return app;
- return null;
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/DashboardSearchService.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/DashboardSearchService.java
deleted file mode 100644
index 3daeb852..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/DashboardSearchService.java
+++ /dev/null
@@ -1,38 +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 java.util.Map;
-
-import org.openecomp.portalapp.portal.ecomp.model.SearchResultItem;
-import org.openecomp.portalapp.portal.transport.CommonWidget;
-import org.openecomp.portalapp.portal.transport.CommonWidgetMeta;
-
-public interface DashboardSearchService {
- public Map<String, List<SearchResultItem>> searchResults(String userId, String searchString);
- public List<String> getRelatedUsers(String userId);
- public List<Object[]> getRelatedUserVOs(String orgUserId);
-
- public CommonWidgetMeta getWidgetData(String resourceType);
- public String saveWidgetDataBulk(CommonWidgetMeta commonWidgetMetaData);
- public String saveWidgetData(CommonWidget commonWidgetData);
- public String deleteWidgetData(CommonWidget eventWidget);
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/DashboardSearchServiceImpl.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/DashboardSearchServiceImpl.java
deleted file mode 100644
index bf0fc447..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/DashboardSearchServiceImpl.java
+++ /dev/null
@@ -1,238 +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.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.openecomp.portalapp.portal.ecomp.model.SearchResultItem;
-import org.openecomp.portalapp.portal.transport.CommonWidget;
-import org.openecomp.portalapp.portal.transport.CommonWidgetMeta;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-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.stereotype.Component;
-import org.springframework.transaction.annotation.Transactional;
-
-@Component
-@Transactional
-public class DashboardSearchServiceImpl implements DashboardSearchService{
-
- private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(DashboardSearchServiceImpl.class);
-
- @Autowired
- private DataAccessService dataAccessService;
-
- @SuppressWarnings("unchecked")
- public Map<String, List<SearchResultItem>> searchResults(String orgUserId, String searchString){
-
- Map<String, String> params = new HashMap<>();
- params.put("userId", orgUserId);
- 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;
-
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public List<String> getRelatedUsers(String orgUserId) {
-
- Map<String, String> params = new HashMap<>();
-
- params.put("org_user_id", orgUserId);
-
- List<String> activeUsers = null;
-
- try{
- activeUsers = dataAccessService.executeNamedQuery("relatedUsers", params, null);
- }
- catch(Exception e){
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- }
-
- return activeUsers;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public List<Object[]> getRelatedUserVOs(String orgUserId) {
-
- Map<String, String> params = new HashMap<>();
-
- params.put("org_user_id", orgUserId);
-
- List<Object[]> activeUsers = null;
-
- try{
- activeUsers = dataAccessService.executeNamedQuery("relatedUserVOs", params, null);
- }
- catch(Exception e){
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- }
-
- return activeUsers;
- }
-
-
- @SuppressWarnings("unchecked")
- @Override
- public CommonWidgetMeta getWidgetData(String resourceType) {
-
- List<CommonWidget> widgetItems = null;
- try{
- Map<String, String> params = new HashMap<>();
- params.put("cat", resourceType);
- widgetItems = (List<CommonWidget>)dataAccessService.executeNamedQuery("getCommonWidgetItem", params, null);
-
- /*widgetItems2 = new ArrayList<CommonWidget2>();
-
- for(int i = 0; i < widgetItems.size(); i++){
- CommonWidget2 item = (CommonWidget2)widgetItems.get(i);
- widgetItems2.add(new CommonWidget2(item.getCategory(), item.getHref(), item.getTitle(), item.getSortOrder()));
- }*/
- }
- catch(Exception e){
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- }
- return new CommonWidgetMeta(resourceType, widgetItems);
- }
-
- @Override
- public String saveWidgetDataBulk(CommonWidgetMeta commonMetaWidgetData) {
-
- try{
- for(CommonWidget widgetData : commonMetaWidgetData.getItems()){
- widgetData.setCategory(commonMetaWidgetData.getCategory());
- dataAccessService.saveDomainObject(widgetData, null);
- }
-
- return "success";
- }
- catch(Exception e){
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- return e.getMessage();
- }
- }
-
- @Override
- public String saveWidgetData(CommonWidget commonWidgetData) {
-
- try{
-
- dataAccessService.saveDomainObject(commonWidgetData, null);
- return "success";
- }
- catch(Exception e){
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- return e.getMessage();
- }
- }
-
- @Override
- public String deleteWidgetData(CommonWidget eventWidget) {
- try{
- dataAccessService.deleteDomainObject(eventWidget, null);
- return "success";
- }
- catch(Exception e){
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- return e.getMessage();
- }
- }
-
-/* @Override
- public EventWidgetMeta getEventWidgetData() {
- List<EventWidget> widgetItems = null;
- try{
- Map<String, String> params = new HashMap<>();
- widgetItems = (List<EventWidget>)dataAccessService.executeNamedQuery("getEventWidgetData", params, null);
-
- widgetItems2 = new ArrayList<CommonWidget2>();
-
- for(int i = 0; i < widgetItems.size(); i++){
- CommonWidget2 item = (CommonWidget2)widgetItems.get(i);
- widgetItems2.add(new CommonWidget2(item.getCategory(), item.getHref(), item.getTitle(), item.getSortOrder()));
- }
- }
- catch(Exception e){
- e.printStackTrace();
- }
- return new EventWidgetMeta("EVENTS", widgetItems);
- }
-
- @Override
- public String saveEventWidgetDataBulk(EventWidgetMeta eventsWidgetData) {
- try{
- for(EventWidget widgetData : eventsWidgetData.getItems()){
- widgetData.setCategory(eventsWidgetData.getCategory());
- dataAccessService.saveDomainObject(widgetData, null);
- }
-
- return "success";
- }
- catch(Exception e){
- e.printStackTrace();
- return e.getMessage();
- }
- }
-
- @Override
- public String saveEventWidgetData(EventWidget eventWidget) {
- try{
- dataAccessService.saveDomainObject(eventWidget, null);
- return "success";
- }
- catch(Exception e){
- e.printStackTrace();
- return e.getMessage();
- }
- }
-
- @Override
- public String deleteEventWidgetData(EventWidget eventWidget) {
- try{
- dataAccessService.deleteDomainObject(eventWidget, null);
- return "success";
- }
- catch(Exception e){
- e.printStackTrace();
- return e.getMessage();
- }
- }
-
- */
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPAppService.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPAppService.java
deleted file mode 100644
index 4614a2c8..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPAppService.java
+++ /dev/null
@@ -1,164 +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.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.transport.FieldsValidator;
-import org.openecomp.portalapp.portal.transport.LocalRole;
-import org.openecomp.portalapp.portal.transport.OnboardingApp;
-import org.openecomp.portalapp.portal.ecomp.model.AppCatalogItem;
-
-public interface EPAppService {
-
- /**
- * Get all applications adminId is an admin
- *
- * @param adminId
- * - the admin
- * @return the admin's applications
- */
- List<EPApp> getUserAsAdminApps(EPUser user);
-
- List<EPApp> getUserByOrgUserIdAsAdminApps(String attuid);
-
- /**
- * 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<AdminUserApplications> getAppsAdmins();
-
- /**
- * Get all apps from fn_app table (index, name, title only). If all is true,
- * return active and inactive apps; otherwise, just active apps.
- *
- * @return List of AppsResponse objects.
- */
- List<AppsResponse> getAllApps(Boolean all);
-
- UserRoles getUserProfile(String loginId);
-
- List<LocalRole> getAppRoles(Long appId);
-
- List<AppIdAndNameTransportModel> getAdminApps(EPUser user);
-
- List<AppIdAndNameTransportModel> getAppsForSuperAdminAndAccountAdmin(EPUser user);
-
- List<EPApp> getUserRemoteApps(String id);
-
- /**
- * 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 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 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 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);
-
- FieldsValidator deleteOnboardingApp(EPUser user, Long onboardingAppId);
-
- List<EcompApp> transformAppsToEcompApps(List<EPApp> appsList);
-
- EPApp getApp(Long appId);
-
- void writeAppsImagesToDiskCacheIfNecessary();
-
-} \ No newline at end of file
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPAppServiceImpl.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPAppServiceImpl.java
deleted file mode 100644
index fd84ec35..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPAppServiceImpl.java
+++ /dev/null
@@ -1,1218 +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.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Base64;
-/*-
- * ================================================================================
- * eCOMP Portal
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ================================================================================
- */
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeSet;
-
-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.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.onboarding.crossapi.PortalApiConstants;
-import org.openecomp.portalsdk.core.onboarding.crossapi.PortalApiProperties;
-import org.openecomp.portalsdk.core.onboarding.ueb.Helper;
-import org.openecomp.portalsdk.core.onboarding.ueb.TopicManager;
-import org.openecomp.portalsdk.core.service.DataAccessService;
-import org.openecomp.portalsdk.core.util.CipherUtil;
-import org.openecomp.portalsdk.core.util.SystemProperties;
-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.EcompApp;
-import org.openecomp.portalapp.portal.domain.UserRole;
-import org.openecomp.portalapp.portal.domain.UserRoles;
-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.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.EPSystemProperties;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalapp.portal.ecomp.model.AppCatalogItem;
-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;
-
-@Service("epAppService")
-@Transactional
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPMetricsLog
-public class EPAppServiceImpl implements EPAppService {
-
- private String ECOMP_APP_ID = "1";
- private String SUPER_ADMIN_ROLE_ID = "1";
- private String ACCOUNT_ADMIN_ROLE_ID = "999";
- private String RESTRICTED_APP_ROLE_ID = "900";
-
- private static final String PATH_SEPARATOR = "/";
- private static final String webappsBaseFullPath = System.getProperty("catalina.base") + PATH_SEPARATOR
- + "wtpwebapps";
- private static final String imageCacheRelativePath = "images" + PATH_SEPARATOR + "cache";
- private String ecompportalPath = null;
- private static final Long DUBLICATED_FIELD_VALUE_ECOMP_ERROR = new Long(
- EPSystemProperties.DUBLICATED_FIELD_VALUE_ECOMP_ERROR);
-
- private static final String urlField = "url";
-
- private static final String nameField = "name";
-
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EPAppServiceImpl.class);
-
- @Autowired
- AdminRolesService adminRolesService;
- @Autowired
- private SessionFactory sessionFactory;
- @Autowired
- private DataAccessService dataAccessService;
- @Autowired
- EPUebHelper epUebHelper;
-
- private String constructImagesCachePath() {
- String filePath = System.getProperty("catalina.base");
- File eclipseWebAppDir = new File(webappsBaseFullPath);
-
- if (eclipseWebAppDir.exists()) {
- // Eclipse webapps
- filePath += PATH_SEPARATOR + "wtpwebapps";
- } else {
- filePath += PATH_SEPARATOR + "webapps";
- }
- filePath += PATH_SEPARATOR + SystemProperties.getProperty(EPSystemProperties.ECOMP_CONTEXT_ROOT);;
-
- return filePath.toString();
- // return SystemProperties.getProperty(SystemProperties.TEMP_PATH);
- }
-
- @PostConstruct
- private void init() {
- ecompportalPath = constructImagesCachePath();
- writeAppsImagesToDiskCacheIfNecessary();
-
- SUPER_ADMIN_ROLE_ID = SystemProperties.getProperty(EPSystemProperties.SYS_ADMIN_ROLE_ID);
- ACCOUNT_ADMIN_ROLE_ID = SystemProperties.getProperty(EPSystemProperties.ACCOUNT_ADMIN_ROLE_ID);
- ECOMP_APP_ID = SystemProperties.getProperty(EPSystemProperties.ECOMP_APP_ID);
- RESTRICTED_APP_ROLE_ID = SystemProperties.getProperty(EPSystemProperties.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(EPAppMessagesEnum.BeDaoSystemError);
- 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) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeDaoSystemError);
- return null;
- }
- }
-
- @Override
- public List<EPApp> getAppsFullList() {
- @SuppressWarnings("unchecked")
- List<EPApp> apps = dataAccessService.getList(EPApp.class, null);
- // Write the image to disk in case if it is missing
- for (EPApp app : apps)
- writeAppImageToDiskCacheIfNecessary(app);
- 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(EPAppMessagesEnum.BeDaoSystemError);
- 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'";
- 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 (ArrayList<AppIdAndNameTransportModel>) dataAccessService.executeSQLQuery(sql,
- AppIdAndNameTransportModel.class, null);
- } catch (Exception e) {
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeDaoSystemError);
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while fetching the adminApps for user "
- + user.getLoginId() + ". Details: " + EcompPortalUtils.getStackTrace(e));
- }
- }
- return new ArrayList<AppIdAndNameTransportModel>();
- }
-
- @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'";
- } 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'";
- }
- sql = String.format(format, user.getId());
- // sql += " AND app.APP_REST_ENDPOINT IS NOT NULL AND
- // app.APP_REST_ENDPOINT <> ''";
- logQuery(sql);
- try {
- return (ArrayList<AppIdAndNameTransportModel>) dataAccessService.executeSQLQuery(sql,
- AppIdAndNameTransportModel.class, null);
- } catch (Exception e) {
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeDaoSystemError);
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while fetching the adminApps for user "
- + user.getLoginId() + ". Details: " + EcompPortalUtils.getStackTrace(e));
- }
- }
- return new ArrayList<AppIdAndNameTransportModel>();
- }
-
- private void logQuery(String sql) {
- logger.debug(EELFLoggerDelegate.debugLogger, "Executing query: " + sql);
- }
-
- public DataAccessService getDataAccessService() {
- return dataAccessService;
- }
-
- public void setDataAccessService(DataAccessService dataAccessService) {
- this.dataAccessService = dataAccessService;
- }
-
- @Override
- public List<AdminUserApplications> getAppsAdmins() {
- 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 "
- + "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 userrole.ROLE_ID = "
- + ACCOUNT_ADMIN_ROLE_ID + " AND apps.ENABLED = 'Y'";
- logQuery(sql);
- try {
- @SuppressWarnings("unchecked")
- List<AdminUserApp> adminApps = dataAccessService.executeSQLQuery(sql, AdminUserApp.class, null); // DataAccessService
- // does
- // not
- // use
- // generic
- // types.
- return aggregateRowsResultsByUserId(adminApps);
- } catch (Exception e) {
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeDaoSystemError);
- 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'", "name", null);
- List<AppsResponse> appsModified = new ArrayList<AppsResponse>();
- for (EPApp app : apps) {
- appsModified.add(new AppsResponse(app.getId(), app.getName(), app.isRestrictedApp(), app.getEnabled()));
-
- // Write the image to disk in case if it is missing
- writeAppImageToDiskCacheIfNecessary(app);
- }
- 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\";";
- 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);
- }
-
- private 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.getRoleId());
- }
- 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;
- }
-
- private String userAppsQuery(EPUser user) {
- StringBuilder query = new StringBuilder();
- if (adminRolesService.isSuperAdmin(user)) {
- query.append("SELECT * FROM FN_APP where FN_APP.ENABLED = 'Y'");
- } 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();
- }
-
- @Override
- public List<EPApp> getUserApps(EPUser user) {
- List<EPApp> openApps = getOpenApps();
- for (EPApp app : openApps) {
- // Write the image to disk in case if it is missing
- writeAppImageToDiskCacheIfNecessary(app);
- }
-
- if (user.isGuest()) {
- return openApps;
- } else {
- String sql = userAppsQuery(user);
- logQuery(sql);
-
- TreeSet<EPApp> distinctApps = new TreeSet<EPApp>();
-
- @SuppressWarnings("unchecked")
- List<EPApp> adminApps = dataAccessService.executeSQLQuery(sql, EPApp.class, null);
- for (EPApp app : adminApps) {
- // Write the image to disk in case if it is missing
- writeAppImageToDiskCacheIfNecessary(app);
-
- distinctApps.add(app);
- }
-
- for (EPApp app : openApps) {
- distinctApps.add(app);
- }
-
- List<EPApp> userApps = new ArrayList<EPApp>();
- userApps.addAll(distinctApps);
- return userApps;
- }
- }
-
- @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);
- // Why is this necessary?
- for (EPApp app : list)
- writeAppImageToDiskCacheIfNecessary(app);
- 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);
- // Why is this necessary?
- for (EPApp app : list)
- writeAppImageToDiskCacheIfNecessary(app);
- return list;
- }
-
- /*
- * (non-Javadoc)
- * @see org.openecomp.portalapp.portal.service.EPAppService#getAppCatalog(org.openecomp.portalapp.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;
- }
-
- @Override
- public List<OnboardingApp> getOnboardingApps() {
- @SuppressWarnings("unchecked")
- List<EPApp> apps = (List<EPApp>) 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 = (List<EPApp>) 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;
- }
-
- private 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;
- }
-
- @SuppressWarnings("unchecked")
- private void validateOnboardingApp(OnboardingApp onboardingApp, FieldsValidator fieldsValidator) {
- boolean dublicatedUrl = false;
- boolean dublicatedName = 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 (!dublicatedUrl && app.getUrl().equalsIgnoreCase(onboardingApp.url)) {
- dublicatedUrl = true;
- if (dublicatedName) {
- break;
- }
- }
- if (!dublicatedName && app.getName().equalsIgnoreCase(onboardingApp.name)) {
- 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;
- }
- }
-
- @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();
-
- // 2) 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();
-
- // 3) 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();
-
- // 4) 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();
-
- // 5) 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();
-
- // 6) Remove any widgets associated with this app
- sql = "delete from fn_widget where app_id='" + appid + "'";
- logQuery(sql);
- query = localSession.createSQLQuery(sql);
- query.executeUpdate();
-
- // Remove any selections in the personalization table
- sql = "delete from fn_pers_user_app_sel 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) {
- EPLogUtil.logEcompError(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();
- 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();
- boolean isProductionBuild = EcompPortalUtils.isProductionBuild();
- String appMailboxName = null;
-
- int maxNumAttemptsToCreateATopic = 3;
- boolean successfullyCreatedMailbox = false;
- for (int i = 0; i < maxNumAttemptsToCreateATopic; i++) {
- if (isProductionBuild) {
- appMailboxName = "ECOMP-PORTAL-OUTBOX-" + (int) (Math.random() * 100000.0);
- } else {
- appMailboxName = "ECOMP-PORTAL-OUTBOX-TEST-" + (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) {
- String stackTrace = EcompPortalUtils.getStackTrace(e);
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeUebConnectionError, e.getMessage());
- if (e.getStatusCode() == 409) {
- logger.error(EELFLoggerDelegate.errorLogger,
- "Topic/mailbox " + appMailboxName
- + " already exists. Will try using a different name, Details: "
- + stackTrace);
- } else {
- logger.error(EELFLoggerDelegate.errorLogger,
- "HttpException when onboarding App: " + stackTrace);
- }
- }
- }
-
- 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 subcriber of it's 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) {
- String stackTrace = EcompPortalUtils.getStackTrace(e);
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeUebRegisterOnboardingAppError,
- e.getMessage());
- logger.error(EELFLoggerDelegate.errorLogger,
- "Error when configuring Publisher/Subscriber for App's new mailbox "
- + stackTrace);
- 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.debug(EELFLoggerDelegate.debugLogger, "exception: " + e.toString());
- logger.debug(EELFLoggerDelegate.debugLogger, "exception.cause: " + e.getCause());
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeUebRegisterOnboardingAppError, e.getMessage());
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeDaoSystemError);
- 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);
- }
- }
- }
- }
-
- private 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 = this.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()));
- // Write the image to disk in case if it is missing
- writeAppImageToDiskCacheIfNecessary(app);
- }
- }
-
- private EPApp createAppFromOnboarding(EPApp app, OnboardingApp onboardingApp, Session localSession) {
- logger.debug(EELFLoggerDelegate.debugLogger, "LR: entering createAppFromOnboarding");
- 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, "LR: onboarding thumbnail is NOT empty");
- String[] splitBase64Thumbnail = onboardingApp.thumbnail.split("base64,");
- if (splitBase64Thumbnail != null) {
- logger.debug(EELFLoggerDelegate.debugLogger,
- "LR: 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, "LR: finished calling decode");
- deleteOldImageFromDisk(app);
- saveNewImageToDisk(app, onboardingApp, decodedImage);
- app.setThumbnail(decodedImage);
- }
- } else if (app.getThumbnail() != null) {
- // The thumbnail that came in from the json is empty; the previous
- // thumbnail is NOT empty. Must delete it.
- logger.debug(EELFLoggerDelegate.debugLogger, "LR: onboarding thumbnail is empty; db thumbnail is NOT null");
- deleteOldImageFromDisk(app);
- app.setThumbnail(null);
- } else {
- logger.debug(EELFLoggerDelegate.debugLogger, "LR: onboarding thumbnail is empty; db thumbnail is null");
- }
- return app;
- }
-
- private void deleteOldImageFromDisk(EPApp app) {
- if (app.getImageUrl() != null) {
- String oldImageFullFilePath = ecompportalPath + PATH_SEPARATOR + app.getImageUrl();
- try {
- File oldFile = new File(oldImageFullFilePath);
- if (oldFile.exists() && oldFile.delete()) {
- app.setImageUrl(null);
- logger.debug(EELFLoggerDelegate.debugLogger,
- "old file " + oldImageFullFilePath + " was successfully deleted");
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "old file " + oldImageFullFilePath + " delete failure",
- EcompPortalUtils.getStackTrace(e));
- }
- }
- }
-
- // No need to optimize this code since it happens only when adding/modifying
- // an application.
- private void saveNewImageToDisk(EPApp app, OnboardingApp onboardingApp, byte[] decodedImage) {
- // Notice!!!
- // using separator did not worked on WINDOWS as the database was saved
- // as assets\images\tmp\ which the UI did not understand thus ichanged
- // it to "/"
- String imageFileName = constructImageName(onboardingApp);
- String imageRelativeFilePath = imageCacheRelativePath + PATH_SEPARATOR + imageFileName;
- String imageFullFilePath = ecompportalPath + PATH_SEPARATOR + imageRelativeFilePath;
- logger.debug(EELFLoggerDelegate.debugLogger,
- "saving app " + onboardingApp.name + " image to " + imageFullFilePath);
-
- FileOutputStream osf = null;
- try {
- // Base64 Image example: 'data:image/png;base64,AAAFBfj42Pj4'
- logger.info(EELFLoggerDelegate.debugLogger, "Saving new image: " + decodedImage);
- osf = writeImageAsBase64(decodedImage, imageFullFilePath);
- app.setImageUrl(imageRelativeFilePath);
- logger.debug(EELFLoggerDelegate.debugLogger,
- "saveBlobImageToDisk onboardingAppImageUrl = " + imageRelativeFilePath);
- } catch (IOException e) {
- logger.error(EELFLoggerDelegate.errorLogger, "failed to save image to " + imageFullFilePath,
- EcompPortalUtils.getStackTrace(e));
- } finally {
- if (osf != null) {
- try {
- osf.close();
- } catch (IOException e) {
- logger.error(EELFLoggerDelegate.errorLogger,
- "failed to close outpoot stream for image " + imageFullFilePath,
- EcompPortalUtils.getStackTrace(e));
- }
- }
- }
- }
-
- private FileOutputStream writeImageAsBase64(byte[] decodedImage, String imageFullFilePath)
- throws FileNotFoundException, IOException {
- FileOutputStream osf;
- File of = new File(imageFullFilePath);
- osf = new FileOutputStream(of);
- osf.write(decodedImage);
- osf.flush();
- return osf;
- }
-
- private 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, "Unable to decrypt, App name = " + app.getName(),
- EcompPortalUtils.getStackTrace(e));
- }
- }
- return result;
- }
-
- private 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, "Unable to encrypt, App name = " + app,
- EcompPortalUtils.getStackTrace(e));
- }
- }
- return result;
- }
-
- public void writeAppsImagesToDiskCacheIfNecessary() {
- List<EPApp> apps = getAppsFullList();
- for (EPApp app : apps) {
- String imageFullFilePath = ecompportalPath + PATH_SEPARATOR + app.getImageUrl();
- File f = new File(imageFullFilePath);
- if (f.exists() && !f.isDirectory()) {
- continue;// logger.debug("verified existence.");
- }
-
- if (app.getThumbnail() == null) {
- logger.debug(EELFLoggerDelegate.debugLogger,
- "no thumbnail blob available for this app, cannot write to disk " + app.getName());
- continue;
- }
-
- FileOutputStream osf = null;
- try {
- logger.info(EELFLoggerDelegate.debugLogger,
- "Rewriting image for " + app.getName() + " from db to: " + imageFullFilePath);
- osf = writeImageAsBase64(app.getThumbnail(), imageFullFilePath);
- logger.debug(EELFLoggerDelegate.debugLogger, "missing, wrote to disk.");
- } catch (IOException e) {
- logger.error(EELFLoggerDelegate.errorLogger, "failed to save image to " + imageFullFilePath,
- EcompPortalUtils.getStackTrace(e));
- } finally {
- try {
- if (osf != null)
- osf.close();
- } catch (IOException e) {
- logger.error(EELFLoggerDelegate.errorLogger,
- "writeAppsImagesToDiskCacheIfNecessary: failed to close output stream for image "
- + imageFullFilePath,
- EcompPortalUtils.getStackTrace(e));
- }
- }
- }
- }
-
- private void writeAppImageToDiskCacheIfNecessary(EPApp app) {
- if (app == null || app.getImageUrl() == null) {
- return;
- }
-
- String imageFullFilePath = ecompportalPath + PATH_SEPARATOR + app.getImageUrl();
- File f = new File(imageFullFilePath);
-
- // Image file
- if (f.exists() && !f.isDirectory()) {
- return;// logger.debug("verified existence.");
- }
-
- if (app.getThumbnail() == null) {
- logger.debug(EELFLoggerDelegate.debugLogger,
- "no thumbnail blob available for this app, cannot write to disk " + app.getName());
- return;
- }
-
- FileOutputStream osf = null;
- try {
- logger.info(EELFLoggerDelegate.debugLogger,
- "Rewriting image for " + app.getName() + " from db to: " + imageFullFilePath);
- osf = writeImageAsBase64(app.getThumbnail(), imageFullFilePath);
- logger.debug(EELFLoggerDelegate.debugLogger, "missing, wrote to disk.");
- } catch (IOException e) {
- logger.error(EELFLoggerDelegate.errorLogger, "failed to save image to " + imageFullFilePath,
- EcompPortalUtils.getStackTrace(e));
- } finally {
- try {
- if (osf != null)
- osf.close();
- } catch (IOException e) {
- logger.error(EELFLoggerDelegate.errorLogger,
- "writeAppsImagesToDiskCacheIfNecessary: failed to close output stream for image "
- + imageFullFilePath,
- EcompPortalUtils.getStackTrace(e));
- }
- }
- }
-
- @Override
- public List<EPApp> getUserRemoteApps(String id) {
-
- StringBuilder query = new StringBuilder();
-
- 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 = " + id + " AND FN_USER_ROLE.ROLE_ID != " + SUPER_ADMIN_ROLE_ID);
- query.append(" AND FN_APP.ENABLED = 'Y'");
-
- TreeSet<EPApp> distinctApps = new TreeSet<EPApp>();
-
- @SuppressWarnings("unchecked")
- List<EPApp> adminApps = dataAccessService.executeSQLQuery(query.toString(), EPApp.class, null);
- for (EPApp app : adminApps) {
- // Write the image to disk in case if it is missing
- writeAppImageToDiskCacheIfNecessary(app);
-
- distinctApps.add(app);
- }
-
- List<EPApp> userApps = new ArrayList<EPApp>();
- userApps.addAll(distinctApps);
- return userApps;
-
- }
-
-} \ No newline at end of file
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPAuditService.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPAuditService.java
deleted file mode 100644
index 7983467b..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPAuditService.java
+++ /dev/null
@@ -1,26 +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.Date;
-
-public interface EPAuditService {
- public Date getGuestLastLogin(String attuid);
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPAuditServiceImpl.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPAuditServiceImpl.java
deleted file mode 100644
index 9d478fc1..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPAuditServiceImpl.java
+++ /dev/null
@@ -1,74 +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.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.service.DataAccessService;
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
-
-@Service("epAuditService")
-@Transactional
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPMetricsLog
-public class EPAuditServiceImpl implements EPAuditService {
-
- @Autowired
- private DataAccessService dataAccessService;
-
- @Override
- /* get the guest last login time with attuid as param.
- * If record not found in table, return null.
- *
- */
- public Date getGuestLastLogin(String attuid) {
- Map<String, String> params = new HashMap<>();
- params.put("attuid", attuid);
- List<Date> list = getDataAccessService().executeNamedQuery("getGuestLastLogin", params, null);
- Date date=null;
- if(list!=null){
- 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*/
- 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;
- }
-
- public DataAccessService getDataAccessService() {
- return dataAccessService;
- }
-
- public void setDataAccessService(DataAccessService dataAccessService) {
- this.dataAccessService = dataAccessService;
- }
-
-
-} \ No newline at end of file
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPLdapService.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPLdapService.java
deleted file mode 100644
index 8418bec1..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPLdapService.java
+++ /dev/null
@@ -1,31 +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 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 orgUserId) throws Exception;
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPLdapServiceImpl.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPLdapServiceImpl.java
deleted file mode 100644
index 7cf5965a..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPLdapServiceImpl.java
+++ /dev/null
@@ -1,287 +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.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.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.EPSystemProperties;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-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.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;
-
-@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 orgUserId) 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(EPSystemProperties.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 userId 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;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPLoginService.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPLoginService.java
deleted file mode 100644
index 4d0337a5..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPLoginService.java
+++ /dev/null
@@ -1,42 +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.HashMap;
-
-import org.openecomp.portalapp.command.EPLoginBean;
-import org.openecomp.portalapp.portal.domain.EPUser;
-
-
-public interface EPLoginService {
-
- // validate user exists in the system
- @SuppressWarnings("rawtypes")
- EPLoginBean findUser(EPLoginBean bean, String menuPropertiesFilename, HashMap additionalParams) throws Exception;
-
- @SuppressWarnings("rawtypes")
- EPLoginBean findUser(EPLoginBean bean, String menuPropertiesFilename, HashMap additionalParams, boolean matchPassword) throws Exception;
-
- public EPUser findUserWithoutPwd(String loginId);
-
- @SuppressWarnings("rawtypes")
- public EPLoginBean findUserWithoutPassword(EPLoginBean bean, String menuPropertiesFilename, HashMap additionalParams ) throws Exception;
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPLoginServiceImpl.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPLoginServiceImpl.java
deleted file mode 100644
index 48e06be6..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPLoginServiceImpl.java
+++ /dev/null
@@ -1,235 +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.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.openecomp.portalapp.command.EPLoginBean;
-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.utils.EcompPortalUtils;
-import org.openecomp.portalapp.util.EPUserUtils;
-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.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.EnableAspectJAutoProxy;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-@Service("eploginService")
-@Transactional
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPMetricsLog
-public class EPLoginServiceImpl extends FusionService implements EPLoginService {
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EPLoginServiceImpl.class);
-
- @SuppressWarnings("unused")
- private MenuBuilder menuBuilder;
-
- @Autowired
- private DataAccessService dataAccessService;
-
-
- @SuppressWarnings("rawtypes")
- public EPLoginBean findUser(EPLoginBean bean, String menuPropertiesFilename, HashMap additionalParams ) throws Exception {
- return findUser(bean, menuPropertiesFilename, additionalParams, true);
- }
-
- @SuppressWarnings("rawtypes")
- public EPLoginBean findUser(EPLoginBean bean, String menuPropertiesFilename, 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());
- }
-
- if (user != null) {
-
- // raise an error if the 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(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(EPAppMessagesEnum.BeUserInactiveWarning, user.getLoginId());
- }
-
-/*
- * Original SDK from QUANTUM
- boolean hasActiveRole = false;
- Iterator roles = user.getRoles().iterator();
- while (roles.hasNext()) {
- Role role = (Role) roles.next();
- hasActiveRole = true;
- if (role.getActive()) {
- break;
- }
- }
- */
-
- // raise an error if no active roles exist for the user
- if (!userHasActiveRoles(user.getEPUserApps())) {
- bean.setLoginErrorMessage(SystemProperties.MESSAGE_KEY_LOGIN_ERROR_USER_INACTIVE);
- }
-
- // 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);
-
- // update the audit log of the user
- // Check for the client device type and set log attributes appropriately
-
- // save the above changes to the User and their audit trail
-
- // create the application menu based on the user's privileges
- Set appMenu = getMenuBuilder().getMenu(SystemProperties.getProperty(SystemProperties.APPLICATION_MENU_SET_NAME), dataAccessService);
- bean.setMenu(appMenu != null ? appMenu : new HashSet());
- Set businessDirectMenu = getMenuBuilder().getMenu(SystemProperties.getProperty(SystemProperties.BUSINESS_DIRECT_MENU_SET_NAME), dataAccessService);
- bean.setBusinessDirectMenu(businessDirectMenu != null ? businessDirectMenu : new HashSet());
-
- bean.setUser(userCopy);
- }
-
- } else {
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeUserMissingError, bean.getOrgUserId());
- }
-
-
- return bean;
- }
-
- private boolean userHasActiveRoles(Set<EPUserApp> userApps) {
- for (EPUserApp userApp : userApps) {
- if (userApp.getRole().getActive()) {
- return true;
- }
- }
- return false;
- }
-
- @SuppressWarnings("rawtypes")
- public EPLoginBean findUserWithoutPassword(EPLoginBean bean, String menuPropertiesFilename, HashMap additionalParams ) throws Exception {
- return findUser(bean, menuPropertiesFilename, additionalParams, false);
- }
-
- public 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(EPAppMessagesEnum.BeDaoSystemError);
- String stackTrace = EcompPortalUtils.getStackTrace(e);
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while executing findUser operation. Details: " + stackTrace);
- }
-
- return (list == null || list.size() == 0) ? null : (EPUser) list.get(0);
- }
-
- @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(EPAppMessagesEnum.BeDaoSystemError);
- String stackTrace = EcompPortalUtils.getStackTrace(e);
- String message = "Exception occurred while performing findUser: '" + loginId + "'. Details: ";
- logger.error(EELFLoggerDelegate.errorLogger, message + stackTrace);
- }
-
- return (list == null || list.size() == 0) ? null : (EPUser)list.get(0);
- }
-
-
- public EPUser findUser(EPLoginBean bean) {
- List<?> list = null;
-
- StringBuffer criteria = new StringBuffer();
- criteria.append(" where org_user_id = '").append(bean.getOrgUserId()).append("'");
-
- try {
- list = getDataAccessService().getList(EPUser.class, criteria.toString(), null, null);
- } catch (Exception e) {
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeDaoSystemError);
- String stackTrace = EcompPortalUtils.getStackTrace(e);
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while executing findUser operation. Details: " + stackTrace);
- }
-
- return (list == null || list.size() == 0) ? null : (EPUser)list.get(0);
- }
-
-
- public MenuBuilder getMenuBuilder() {
- return new MenuBuilder();
- }
-
-
- public void setMenuBuilder(MenuBuilder menuBuilder) {
- this.menuBuilder = menuBuilder;
- }
-
-
- public DataAccessService getDataAccessService() {
- return dataAccessService;
- }
-
-
- public void setDataAccessService(DataAccessService dataAccessService) {
- this.dataAccessService = dataAccessService;
- }
-
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPRoleService.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPRoleService.java
deleted file mode 100644
index 91aa77b1..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPRoleService.java
+++ /dev/null
@@ -1,32 +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 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);
-
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPRoleServiceImpl.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPRoleServiceImpl.java
deleted file mode 100644
index 467b9007..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/EPRoleServiceImpl.java
+++ /dev/null
@@ -1,149 +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.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
-
-import org.openecomp.portalapp.portal.domain.EPRole;
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
-import org.openecomp.portalsdk.core.domain.RoleFunction;
-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;
-import org.springframework.transaction.annotation.Transactional;
-
-@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;
- }
-
- 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;
- }
-}
-
-
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/FunctionalMenuService.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/FunctionalMenuService.java
deleted file mode 100644
index 9de45996..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/FunctionalMenuService.java
+++ /dev/null
@@ -1,50 +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.openecomp.portalapp.portal.domain.EPUser;
-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.FunctionalMenuItemJson;
-
-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);
- List<FunctionalMenuItem> getFunctionalMenuItemsForApp (Integer appId);
- List<FunctionalMenuItem> getFunctionalMenuItemsForUser (String userId);
- FunctionalMenuItem getFunctionalMenuItemDetails (Integer menuid);
- FieldsValidator createFunctionalMenuItem (FunctionalMenuItemJson menuItemJson);
- FieldsValidator editFunctionalMenuItem (FunctionalMenuItemJson 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);
- //Assign URLs under Help Menu
- void assignHelpURLs(List<FunctionalMenuItem> menuItems);
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/FunctionalMenuServiceImpl.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/FunctionalMenuServiceImpl.java
deleted file mode 100644
index 30aaf5d3..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/FunctionalMenuServiceImpl.java
+++ /dev/null
@@ -1,862 +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.ArrayList;
-import java.util.List;
-
-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.openecomp.portalapp.portal.domain.EPApp;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
-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.FunctionalMenuItemJson;
-import org.openecomp.portalapp.portal.transport.FunctionalMenuRole;
-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.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("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(EPSystemProperties.ACCOUNT_ADMIN_ROLE_ID));
- RESTRICTED_APP_ROLE_ID = SystemProperties.getProperty(EPSystemProperties.RESTRICTED_APP_ROLE_ID);
- } catch(Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(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 "
- + "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 "
- + " FROM fn_menu_functional m "
- + " WHERE m.url='' "
- + activeWhereClause; //" AND UPPER(m.active_yn) = 'Y' ";
- logQuery(sql);
-
- @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 "
- + 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;
- }
-
- 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.roles = roles;
- }
-
- return menuItem;
- }
-
- private FieldsValidator menuItemFieldsChecker(FunctionalMenuItemJson 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(EPSystemProperties.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.roles == null || menuItemJson.roles.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(FunctionalMenuItemJson 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.roles = menuItemJson.roles;
- 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(FunctionalMenuItemJson menuItemJson, Session localSession) {
- logger.debug(EELFLoggerDelegate.debugLogger, "entering addRoles.");
- List<Integer> roles = menuItemJson.roles;
- 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(FunctionalMenuItemJson 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.roles != null && !menuItemJson.roles.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.roles = menuItemJson.roles;
- 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.roles == null || menuItemJson.roles.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(EPSystemProperties.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));
- }
-
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/GetAccessService.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/GetAccessService.java
deleted file mode 100644
index c4ddc75e..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/GetAccessService.java
+++ /dev/null
@@ -1,32 +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.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();
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/GetAccessServiceImpl.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/GetAccessServiceImpl.java
deleted file mode 100644
index a4e36337..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/GetAccessServiceImpl.java
+++ /dev/null
@@ -1,50 +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.openecomp.portalapp.portal.domain.GetAccessResult;
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
-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;
-import org.springframework.transaction.annotation.Transactional;
-
-@Service("getAccessService")
-@Transactional
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPMetricsLog
-public class GetAccessServiceImpl implements GetAccessService{
-
- @Autowired
- private DataAccessService dataAccessService;
-
- @SuppressWarnings("unchecked")
- @Override
- public List<GetAccessResult> getAppAccessList() {
- List<GetAccessResult> appAccessList = (List<GetAccessResult>) dataAccessService
- .executeNamedQuery("getAppAccessFunctionRole", null, null);
- return appAccessList;
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/ManifestService.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/ManifestService.java
deleted file mode 100644
index 263811dc..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/ManifestService.java
+++ /dev/null
@@ -1,34 +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.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;
-}
-
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/ManifestServiceImpl.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/ManifestServiceImpl.java
deleted file mode 100644
index fe2895d8..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/ManifestServiceImpl.java
+++ /dev/null
@@ -1,65 +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.io.IOException;
-import java.io.InputStream;
-import java.util.jar.Attributes;
-import java.util.jar.Manifest;
-
-import javax.servlet.ServletContext;
-
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.EnableAspectJAutoProxy;
-import org.springframework.stereotype.Service;
-
-
-
-@Service("manifestService")
-@EnableAspectJAutoProxy
-@EPMetricsLog
-public class ManifestServiceImpl implements ManifestService {
-
-
- @Autowired
- ServletContext context;
-
-
- // * (non-Javadoc)
- // *
-
- 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;
- }
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/PersUserAppService.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/PersUserAppService.java
deleted file mode 100644
index 8096bc3c..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/PersUserAppService.java
+++ /dev/null
@@ -1,24 +0,0 @@
-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 select
- * True or false
- */
- void setPersUserAppValue(EPUser user, EPApp app, boolean select, boolean pending);
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/PersUserAppServiceImpl.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/PersUserAppServiceImpl.java
deleted file mode 100644
index 5a67dee7..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/PersUserAppServiceImpl.java
+++ /dev/null
@@ -1,117 +0,0 @@
-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;
-
-
- @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 && !adminUserHasAppRole) {
- // The special case: portal admin, no role
- 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
- }
- }
- }
-
-} \ No newline at end of file
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/PortalAdminService.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/PortalAdminService.java
deleted file mode 100644
index 5cf52e51..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/PortalAdminService.java
+++ /dev/null
@@ -1,31 +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.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);
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/PortalAdminServiceImpl.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/PortalAdminServiceImpl.java
deleted file mode 100644
index d8e427fd..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/PortalAdminServiceImpl.java
+++ /dev/null
@@ -1,179 +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 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.EPSystemProperties;
-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(EPSystemProperties.ECOMP_APP_ID);
- }
-
- public List<PortalAdmin> getPortalAdmins() {
- 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.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());
- 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 org_user_id='" + orgUserId + "'",
- null, null);
- if (localUserList.size() > 0) {
- user = localUserList.get(0);
- } else {
- 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);
- }
- }
- 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);
- }
-// logger.debug(EELFLoggerDelegate.debugLogger, "after saving menu object, new id: " + userId);
-
- 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, "LR: 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, "LR: 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);
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/SearchService.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/SearchService.java
deleted file mode 100644
index 5254e20b..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/SearchService.java
+++ /dev/null
@@ -1,38 +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.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.transport.UserWithNameSurnameTitle;
-
-public interface SearchService {
-
-
- public String searchUsersInFnTable(String searchString);
-
- public List<UserWithNameSurnameTitle> searchUsersByName(EPUser attrUser);
-
- public List<UserWithNameSurnameTitle> searchUsersByUserId(EPUser attrUser);
-
- public EPUser searchUserByUserId(String orgUserId);
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/SearchServiceImpl.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/SearchServiceImpl.java
deleted file mode 100644
index 020b7496..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/SearchServiceImpl.java
+++ /dev/null
@@ -1,188 +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.ArrayList;
-import java.util.List;
-
-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 org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-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.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
- UserService userService;
-
-
- @Override
- public String searchUsersInFnTable(String searchString) {
- String orgUserId = null;
- List<String> tokens = EcompPortalUtils.parsingByRegularExpression(searchString, " ");
- for (int i = 0; i < tokens.size(); i++) { // find userid 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 (userId 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.searchUsersByName(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.searchUsersByName(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.searchUsersByName(attrUser);
- resultOfSearch = this.removeWrongFirstNames(resultOfSearch, tokens.get(0));
- if (resultOfSearch.size() < maxSizeOfSearchResult) {
- attrUser.setFirstName(null);
- attrUser.setLastName(tokens.get(0));
- resultOfAdditionalSearch = this.searchUsersByName(attrUser);
- resultOfAdditionalSearch = this.removeWrongLastNames(resultOfAdditionalSearch, tokens.get(0));
- }
- } else if (orgUserId != null) {
- resultOfSearch = this.searchUsersByUserId(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;
- }
-
-
- @SuppressWarnings("rawtypes")
- public List<UserWithNameSurnameTitle> searchUsersByUserId(EPUser attrUser) {
- List<UserWithNameSurnameTitle> foundUsers = new ArrayList<UserWithNameSurnameTitle>();
- try {
- List searchResult = this.userService.getUserByUserId(attrUser.getOrgUserId());
- 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;
- }
-
- @SuppressWarnings("rawtypes")
- public List<UserWithNameSurnameTitle> searchUsersByName(EPUser attrUser) {
- List<UserWithNameSurnameTitle> foundUsers = new ArrayList<UserWithNameSurnameTitle>();
- try {
- List searchResult = this.userService.getUserByFirstLastName(attrUser.getFirstName(),attrUser.getLastName());
- 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;
- }
-
-
- @SuppressWarnings("rawtypes")
- @Override
- public EPUser searchUserByUserId(String orgUserId) {
- List<EPUser> foundUsers = new ArrayList<EPUser>();
- try {
- List searchResult = this.userService.getUserByUserId(orgUserId);
- for (Object obj : searchResult) {
- EPUser user = (EPUser) obj;
- foundUsers.add(user);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "searchInPhoneBookWithToken Exception = " + EcompPortalUtils.getStackTrace(e));
- }
- return foundUsers.get(0);
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/SharedContextService.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/SharedContextService.java
deleted file mode 100644
index 647c9d1b..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/SharedContextService.java
+++ /dev/null
@@ -1,98 +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.openecomp.portalapp.portal.domain.SharedContext;
-
-/**
- * Defines the methods exposed by the service that manages shared context
- * objects in the database via Hibernate.
- */
-public interface SharedContextService {
-
- /**
- * Gets all shared context objects for the specified context 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 in the database with the specified context
- * ID, key and value.
- *
- * @param context
- * SharedContext object to save.
- * @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 to the database.
- *
- * @param context
- * SharedContext object to save.
- */
- void saveSharedContext(SharedContext context);
-
- /**
- * Deletes the specified shared context from the database.
- *
- * @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 that are older (judged from creation
- * timestamp) than the specified value.
- *
- * @param ageInSeconds
- * Expiration threshold in seconds
- */
- void expireSharedContexts(int ageInSeconds);
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/SharedContextServiceImpl.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/SharedContextServiceImpl.java
deleted file mode 100644
index 02e6f8bf..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/SharedContextServiceImpl.java
+++ /dev/null
@@ -1,173 +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.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.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;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.EnableAspectJAutoProxy;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-/**
- * 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;
-
- 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
- */
- @Override
- public void saveSharedContext(SharedContext context) {
- getDataAccessService().saveDomainObject(context, null);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.openecomp.portalsdk.core.service.SharedContextService#deleteSharedContext(org.
- * openecomp.portalapp.portal.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;
-
- 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);
- 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;
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/UserRolesService.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/UserRolesService.java
deleted file mode 100644
index d0964a88..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/UserRolesService.java
+++ /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);
-
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/UserRolesServiceImpl.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/UserRolesServiceImpl.java
deleted file mode 100644
index 340c2d1a..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/UserRolesServiceImpl.java
+++ /dev/null
@@ -1,656 +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.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;
-
-@Service("userRolesService")
-@Transactional
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPMetricsLog
-public class UserRolesServiceImpl implements UserRolesService {
- private static Long ACCOUNT_ADMIN_ROLE_ID = 999L;
-
- 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 EPUser getUserFromRemoteApp(String orgUserId, EPApp app, ApplicationsRestClientService applicationsRestClientService) throws HTTPException {
- EPUser user = applicationsRestClientService.get(EPUser.class, app.getId(), String.format("/user/%s", orgUserId));
- 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 {
- EPUser client = searchService.searchUserByUserId(orgUserId);
- if (client == null) {
- String msg = "cannot create user " + orgUserId + ", because he/she cannot be found in phonebook.";
- logger.error(EELFLoggerDelegate.errorLogger, msg);
- throw new Exception(msg);
- }
- client.setLoginId(orgUserId);
- client.setActive(true);
- // The remote doesn't care about other apps, and this has caused serialization problems - infinite recursion.
- client.getEPUserApps().clear();
- mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
- String userAsString = mapper.writeValueAsString(client);
- logger.debug(EELFLoggerDelegate.debugLogger, "about to post new client to remote application, users json = " + userAsString);
- 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, "/users");
- ArrayList<UserApplicationRoles> userApplicationRoles = new ArrayList<UserApplicationRoles>();
- for (RemoteUserWithRoles remoteUser : remoteUsers) {
- UserApplicationRoles userWithRemoteAppRoles = convertToUserApplicationRoles(appId, remoteUser);
- if(userWithRemoteAppRoles.roles!=null && userWithRemoteAppRoles.roles.size()>0) {
- userApplicationRoles.add(userWithRemoteAppRoles);
- } else {
- logger.debug(EELFLoggerDelegate.debugLogger, "User " + userWithRemoteAppRoles.orgUserId + " doesn't have any roles assigned to any app.");
- }
- }
-
- return userApplicationRoles;
- }
-
- private UserApplicationRoles convertToUserApplicationRoles(Long appId, RemoteUserWithRoles remoteUser) {
- UserApplicationRoles userWithRemoteAppRoles = new UserApplicationRoles();
- userWithRemoteAppRoles.appId = appId;
- userWithRemoteAppRoles.orgUserId = remoteUser.loginId;
- userWithRemoteAppRoles.firstName = remoteUser.firstName;
- userWithRemoteAppRoles.lastName = remoteUser.lastName;
- userWithRemoteAppRoles.roles = remoteUser.roles;
- return userWithRemoteAppRoles;
- }
-
- public static void persistExternalRoleInEcompDb(EPRole externalAppRole, Long appId, EPRoleService roleService) {
- externalAppRole.setAppId(appId);
- externalAppRole.setAppRoleId(externalAppRole.getId());
- externalAppRole.setId(null); // We will persist a new role, with ecomp role id which will be different than external app role id.
-
- roleService.saveRole(externalAppRole);
- logger.debug(EELFLoggerDelegate.debugLogger, String.format("ECOMP persists role from app:%d, app roleId: %d, roleName: %s", appId, 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
- 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;
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/UserService.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/UserService.java
deleted file mode 100644
index 8fcd5669..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/UserService.java
+++ /dev/null
@@ -1,34 +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.openecomp.portalapp.portal.domain.EPUser;
-
-public interface UserService {
-
- List getUserByUserId(String orgUserId);
-
- List getUserByFirstLastName(String firstName, String lastName);
-
- public String saveNewUser(EPUser newUser, String checkDuplicate) throws Exception;
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/UserServiceImpl.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/UserServiceImpl.java
deleted file mode 100644
index 0b4a8809..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/UserServiceImpl.java
+++ /dev/null
@@ -1,260 +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.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.json.JSONArray;
-import org.json.JSONObject;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.utils.EPSystemProperties;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalsdk.core.FusionObject.Utilities;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.openecomp.portalsdk.core.service.DataAccessService;
-import org.openecomp.portalsdk.core.util.CipherUtil;
-import org.openecomp.portalsdk.core.util.SystemProperties;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-@Service("userService")
-@Transactional
-public class UserServiceImpl implements UserService {
-
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(UserServiceImpl.class);
-
- @Autowired
- private DataAccessService dataAccessService;
-
- public DataAccessService getDataAccessService() {
- return dataAccessService;
- }
-
- public void setDataAccessService(DataAccessService dataAccessService) {
- this.dataAccessService = dataAccessService;
- }
-
- @SuppressWarnings("rawtypes")
- @Override
- public List getUserByUserId(String userId) {
-
-
- if(SystemProperties.getProperty(SystemProperties.AUTHENTICATION_MECHANISM).trim().equalsIgnoreCase("OIDC")){
- List<EPUser> users=new ArrayList<EPUser>();
- List<EPUser> filterdUsers=new ArrayList<EPUser>();
- BufferedReader in = null;
- HttpURLConnection con = null;
- try{
- String url = EPSystemProperties.getProperty(EPSystemProperties.AUTH_USER_SERVER);
- URL obj = new URL(url);
-
- con = (HttpURLConnection) obj.openConnection();
-
- // optional default is GET
- con.setRequestMethod("GET");
- con.setConnectTimeout(3000);
- con.setReadTimeout(8000);
-
- StringBuffer response = new StringBuffer();
-
- in = new BufferedReader(new InputStreamReader(con.getInputStream(), "UTF-8"));
- String inputLine;
- while ((inputLine = in.readLine()) != null)
- response.append(inputLine);
- JSONObject jObject = new JSONObject(response.toString()); // json
- JSONArray jsonUsers = jObject.getJSONArray("response"); // get data object
- for (int i = 0; i < jsonUsers.length(); i++) {
- JSONObject eachObject = jsonUsers.getJSONObject(i);
- EPUser eachUser = new EPUser();
- eachUser.setOrgUserId(eachObject.get("id").toString());// getString("id"));
- eachUser.setFirstName(eachObject.get("givenName").toString());
- eachUser.setLastName(eachObject.get("familyName").toString());
- eachUser.setEmail(eachObject.get("email").toString());
- users.add(eachUser);
- }
-
- for(int i = 0 ; i < users.size(); i ++){
-
- if(Utilities.nvl(userId).length() > 0){
- if(!userId.equalsIgnoreCase(users.get(i).getOrgUserId())){
- continue;
- }
- }
- filterdUsers.add(users.get(i));
-
- }
-
- }catch (Exception e){
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- }finally{
- try {
- in.close();
- con.disconnect();
- } catch (IOException e) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- }
- }
-
- return filterdUsers;
-
- }else{
-
- List list = null;
- StringBuffer criteria = new StringBuffer();
- criteria.append(" where org_user_id = '").append(userId).append("'");
- list = getDataAccessService().getList(EPUser.class, criteria.toString(), null, null);
- return (list == null || list.size() == 0) ? null : list;
-
- }
-
- }
-
- @SuppressWarnings("rawtypes")
- @Override
- public List getUserByFirstLastName(String firstName, String lastName) {
-
- if(!SystemProperties.getProperty(SystemProperties.AUTHENTICATION_MECHANISM).trim().equalsIgnoreCase("OIDC")){
-
- List list = null;
- StringBuffer criteria = new StringBuffer();
- if(firstName!=null)
- criteria.append(" where first_name = '").append(firstName).append("'");
- if(lastName!=null)
- criteria.append(" where last_name = '").append(lastName).append("'");
- list = getDataAccessService().getList(EPUser.class, criteria.toString(), null, null);
- return (list == null || list.size() == 0) ? null : list;
-
- }else{
-
- List<EPUser> users=new ArrayList<EPUser>();
- List<EPUser> filterdUsers=new ArrayList<EPUser>();
- BufferedReader in = null;
- HttpURLConnection con = null;
- try{
- String url = EPSystemProperties.getProperty(EPSystemProperties.AUTH_USER_SERVER);
- URL obj = new URL(url);
-
- con = (HttpURLConnection) obj.openConnection();
-
- // optional default is GET
- con.setRequestMethod("GET");
- con.setConnectTimeout(3000);
- con.setReadTimeout(8000);
-
- StringBuffer response = new StringBuffer();
-
- in = new BufferedReader(new InputStreamReader(con.getInputStream(), "UTF-8"));
- String inputLine;
- while ((inputLine = in.readLine()) != null)
- response.append(inputLine);
- JSONObject jObject = new JSONObject(response.toString()); // json
- JSONArray jsonUsers = jObject.getJSONArray("response"); // get data object
- for (int i = 0; i < jsonUsers.length(); i++) {
- JSONObject eachObject = jsonUsers.getJSONObject(i);
- EPUser eachUser = new EPUser();
- eachUser.setOrgUserId(eachObject.get("id").toString());// getString("id"));
- eachUser.setFirstName(eachObject.get("givenName").toString());
- eachUser.setLastName(eachObject.get("familyName").toString());
- eachUser.setEmail(eachObject.get("email").toString());
- users.add(eachUser);
- }
-
- for(int i = 0 ; i < users.size(); i ++){
-
- if(Utilities.nvl(firstName).length() > 0){
- if(!firstName.equalsIgnoreCase(users.get(i).getFirstName())){
- continue;
- }
- }
- if(Utilities.nvl(lastName).length() > 0){
- if(!lastName.equalsIgnoreCase(users.get(i).getLastName())){
- continue;
- }
- }
-
-
- filterdUsers.add(users.get(i));
-
- }
-
- }catch (Exception e){
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- }finally{
- try {
- in.close();
- con.disconnect();
- } catch (IOException e) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- }
- }
-
- return filterdUsers;
- }
-
- }
-
- public String saveNewUser(EPUser newUser, String checkDuplicate) throws Exception{
-
- try{
-
- List list = null;
- StringBuffer criteria = new StringBuffer();
- criteria.append(" where org_user_id = '").append(newUser.getLoginId()).append("'");
- list = getDataAccessService().getList(EPUser.class, criteria.toString(), null, null);
- if(list == null || list.size()==0){
- newUser.setActive(true);
- newUser.setOrgUserId(newUser.getLoginId());
- newUser.setLoginPwd(CipherUtil.encrypt(newUser.getLoginPwd()));
- getDataAccessService().saveDomainObject(newUser, null);
- }else{
- if(checkDuplicate.equals("Yes")){
- // userId already exist in database
- return "Record already exist";
- }else{
-
- EPUser oldUser = (EPUser) list.get(0);
- oldUser.setFirstName(newUser.getFirstName());
- oldUser.setLastName(newUser.getLastName());
- oldUser.setMiddleInitial(newUser.getMiddleInitial());
- if(!oldUser.getLoginPwd().equals(newUser.getLoginPwd()))
- oldUser.setLoginPwd(CipherUtil.encrypt(newUser.getLoginPwd()));
- else
- oldUser.setLoginPwd(newUser.getLoginPwd());
- getDataAccessService().saveDomainObject(oldUser, null);
-
- }
-
- }
-
- }catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "", e);
- throw new Exception(e);
- }
- return "success";
- };
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/WidgetService.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/WidgetService.java
deleted file mode 100644
index afec3389..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/WidgetService.java
+++ /dev/null
@@ -1,36 +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.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);
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/WidgetServiceImpl.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/WidgetServiceImpl.java
deleted file mode 100644
index 62ff9e5f..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/service/WidgetServiceImpl.java
+++ /dev/null
@@ -1,275 +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.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.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.EPSystemProperties;
-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;
-import org.springframework.transaction.annotation.Transactional;
-
-@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(EPSystemProperties.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(EPSystemProperties.ECOMP_APP_ID);
- ACCOUNT_ADMIN_ROLE_ID = Long.valueOf(SystemProperties.getProperty(EPSystemProperties.ACCOUNT_ADMIN_ROLE_ID));
- LONG_ECOMP_APP_ID = Long.valueOf(SystemProperties.getProperty(EPSystemProperties.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 id = " + 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(EPAppMessagesEnum.BeDaoSystemError);
- 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(EPAppMessagesEnum.BeDaoSystemError);
- 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;
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/AllAppsWithRolesForUser.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/AllAppsWithRolesForUser.java
deleted file mode 100644
index 6939a100..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/AllAppsWithRolesForUser.java
+++ /dev/null
@@ -1,40 +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.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;
-
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/AppCatalogPersonalization.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/AppCatalogPersonalization.java
deleted file mode 100644
index 4ad2594a..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/AppCatalogPersonalization.java
+++ /dev/null
@@ -1,38 +0,0 @@
-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;
- }
-
-} \ No newline at end of file
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/AppNameIdIsAdmin.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/AppNameIdIsAdmin.java
deleted file mode 100644
index d04e8406..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/AppNameIdIsAdmin.java
+++ /dev/null
@@ -1,31 +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.transport;
-
-public class AppNameIdIsAdmin {
-
- public Long id;
-
- public String appName;
-
- public Boolean isAdmin;
-
- public Boolean restrictedApp;
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/AppWithRolesForUser.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/AppWithRolesForUser.java
deleted file mode 100644
index fe996fdd..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/AppWithRolesForUser.java
+++ /dev/null
@@ -1,34 +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.transport;
-
-import java.util.List;
-
-public class AppWithRolesForUser {
-
- public String orgUserId;
-
- public Long appId;
-
- public String appName;
-
- public List<RoleInAppForUser> appRoles;
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/AppsListWithAdminRole.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/AppsListWithAdminRole.java
deleted file mode 100644
index 907bf7e5..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/AppsListWithAdminRole.java
+++ /dev/null
@@ -1,34 +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.transport;
-
-import java.util.ArrayList;
-
-public class AppsListWithAdminRole {
-
- public String orgUserId;
-
- public ArrayList<AppNameIdIsAdmin> appsRoles;
-
- public AppsListWithAdminRole() {
- appsRoles = new ArrayList<AppNameIdIsAdmin>();
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/CommonWidget.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/CommonWidget.java
deleted file mode 100644
index 706d6baf..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/CommonWidget.java
+++ /dev/null
@@ -1,140 +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.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;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/CommonWidgetMeta.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/CommonWidgetMeta.java
deleted file mode 100644
index dba1127c..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/CommonWidgetMeta.java
+++ /dev/null
@@ -1,50 +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.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;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/EventWidget.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/EventWidget.java
deleted file mode 100644
index 26d694fd..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/EventWidget.java
+++ /dev/null
@@ -1,139 +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.transport;
-/*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;
- }
-
-
-}
-*/
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/EventWidgetMeta.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/EventWidgetMeta.java
deleted file mode 100644
index 60e9aa01..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/EventWidgetMeta.java
+++ /dev/null
@@ -1,52 +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.transport;
-/*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/src/main/java/org/openecomp/portalapp/portal/transport/FavoritesFunctionalMenuItem.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/FavoritesFunctionalMenuItem.java
deleted file mode 100644
index 1a8691d8..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/FavoritesFunctionalMenuItem.java
+++ /dev/null
@@ -1,45 +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.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;
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/FavoritesFunctionalMenuItemJson.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/FavoritesFunctionalMenuItemJson.java
deleted file mode 100644
index 7d829b6b..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/FavoritesFunctionalMenuItemJson.java
+++ /dev/null
@@ -1,57 +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.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;
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/FieldsValidator.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/FieldsValidator.java
deleted file mode 100644
index ca559970..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/FieldsValidator.java
+++ /dev/null
@@ -1,49 +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.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 List<FieldName> fields = new ArrayList<FieldName>();
-
- public void addProblematicFieldName(String name) {
- fields.add(new FieldName(name));
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/FunctionalMenuItem.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/FunctionalMenuItem.java
deleted file mode 100644
index 022c0af6..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/FunctionalMenuItem.java
+++ /dev/null
@@ -1,90 +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.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 {
- 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;
-
- @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;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/FunctionalMenuItemJson.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/FunctionalMenuItemJson.java
deleted file mode 100644
index a985150b..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/FunctionalMenuItemJson.java
+++ /dev/null
@@ -1,52 +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.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 FunctionalMenuItemJson 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;
-
- public List<Integer> 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();
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/FunctionalMenuRole.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/FunctionalMenuRole.java
deleted file mode 100644
index 1792477d..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/FunctionalMenuRole.java
+++ /dev/null
@@ -1,49 +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.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;
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/LocalRole.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/LocalRole.java
deleted file mode 100644
index 586a3885..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/LocalRole.java
+++ /dev/null
@@ -1,42 +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.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();
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/OnboardingApp.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/OnboardingApp.java
deleted file mode 100644
index fa070b9b..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/OnboardingApp.java
+++ /dev/null
@@ -1,83 +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.transport;
-
-public class OnboardingApp {
-
- public Long id;
-
- public String name;
-
- public String imageUrl;
-
- public String description;
-
- public String notes;
-
- public String url;
-
- public String alternateUrl;
-
- public String restUrl;
-
- public Boolean isOpen;
-
- public Boolean isEnabled;
-
- public String username;
-
- public String appPassword;
-
- public String thumbnail;
-
- public String uebTopicName;
-
- public String uebKey;
-
- public String uebSecret;
-
- public Boolean restrictedApp;
-
- public void normalize() {
- this.name = (this.name == null) ? "" : this.name.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;
- }
-}
-
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/OnboardingWidget.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/OnboardingWidget.java
deleted file mode 100644
index 0a23786f..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/OnboardingWidget.java
+++ /dev/null
@@ -1,65 +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.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();
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/PortalAdmin.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/PortalAdmin.java
deleted file mode 100644
index ebf20447..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/PortalAdmin.java
+++ /dev/null
@@ -1,53 +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.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;
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/PortalAdminUserRole.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/PortalAdminUserRole.java
deleted file mode 100644
index 23134298..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/PortalAdminUserRole.java
+++ /dev/null
@@ -1,48 +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.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/src/main/java/org/openecomp/portalapp/portal/transport/RemoteRole.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/RemoteRole.java
deleted file mode 100644
index 0e6c4ff0..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/RemoteRole.java
+++ /dev/null
@@ -1,28 +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.transport;
-
-public class RemoteRole {
-
- public Long id;
-
- public String name;
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/RemoteUserWithRoles.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/RemoteUserWithRoles.java
deleted file mode 100644
index 48456747..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/RemoteUserWithRoles.java
+++ /dev/null
@@ -1,63 +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.transport;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * User description which we receive in response from request to remote
- * application: applicationsRestClientService.get(RemoteUserWithRoles[].class,
- * appId, "/users"). It contains the most important info about remote
- * application user including his roles in this application.
- */
-public class RemoteUserWithRoles {
-
- public Long orgId;
-
- public Long managerId;
-
- public String firstName;
-
- public String middleInitial;
-
- public String lastName;
-
- public String phone;
-
- public String email;
-
- public String hrid;
-
- public String orgUserid;
-
- public String orgCode;
-
- public String orgManagerUserId;
-
- public String jobTitle;
-
- public String loginId;
-
- public Boolean active;
-
- public List<RemoteRole> roles = new ArrayList<RemoteRole>();
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/RoleInAppForUser.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/RoleInAppForUser.java
deleted file mode 100644
index a74614ce..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/RoleInAppForUser.java
+++ /dev/null
@@ -1,39 +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.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;
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/RolesInAppForUser.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/RolesInAppForUser.java
deleted file mode 100644
index 1c3862db..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/RolesInAppForUser.java
+++ /dev/null
@@ -1,33 +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.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>();
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/UserApplicationRoles.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/UserApplicationRoles.java
deleted file mode 100644
index f9fd4138..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/UserApplicationRoles.java
+++ /dev/null
@@ -1,41 +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.transport;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * A specific application user and his application specific roles.
- *
- */
-public class UserApplicationRoles {
-
- public Long appId;
-
- public String orgUserId;
-
- public String firstName;
-
- public String lastName;
-
- public List<RemoteRole> roles = new ArrayList<RemoteRole>();
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/UserWithNameSurnameTitle.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/UserWithNameSurnameTitle.java
deleted file mode 100644
index 6c6cc415..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/transport/UserWithNameSurnameTitle.java
+++ /dev/null
@@ -1,39 +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.transport;
-
-public class UserWithNameSurnameTitle {
-
- public String orgUserId;
-
- public String firstName;
-
- public String lastName;
-
- public String jobTitle;
-
- public UserWithNameSurnameTitle(String orgUserId, String firstName, String lastName, String jobTitle) {
- this.orgUserId = orgUserId;
- this.firstName = firstName;
- this.lastName = lastName;
- this.jobTitle = jobTitle;
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ueb/EPUebHelper.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ueb/EPUebHelper.java
deleted file mode 100644
index 25766997..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ueb/EPUebHelper.java
+++ /dev/null
@@ -1,218 +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.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.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;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.openecomp.portalsdk.core.onboarding.crossapi.PortalApiConstants;
-import org.openecomp.portalsdk.core.onboarding.crossapi.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.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.EnableAspectJAutoProxy;
-import org.springframework.stereotype.Component;
-import org.springframework.transaction.annotation.Transactional;
-
-@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(EPAppMessagesEnum.BeUebSystemError, "add/remove Publisher");
- String stackTrace = EcompPortalUtils.getStackTrace(e);
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while refreshing the publisher list. Details: " + stackTrace);
- }
-
- //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(EPAppMessagesEnum.BeUebConnectionError, e.getMessage());
- 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
- //
- //
- //
- 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(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(EPAppMessagesEnum.BeHealthCheckUebClusterError);
- String stackTrace = EcompPortalUtils.getStackTrace(e);
- sentMsgSuccessfully = false;
- logger.warn(EELFLoggerDelegate.errorLogger, "Warning! could not successfully publish a UEB msg to "
- + PortalApiProperties.getProperty(PortalApiConstants.ECOMP_PORTAL_INBOX_NAME) + " exception : " + stackTrace);
- }
-
- return sentMsgSuccessfully;
- }
-
-}
-
-
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ueb/EPUebMsgTypes.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ueb/EPUebMsgTypes.java
deleted file mode 100644
index 5dfd822d..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/ueb/EPUebMsgTypes.java
+++ /dev/null
@@ -1,27 +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.ueb;
-
-import org.openecomp.portalsdk.core.onboarding.ueb.UebMsgTypes;
-
-public interface EPUebMsgTypes extends UebMsgTypes {
-
- public static final String UEB_MSG_TYPE_HEALTH_CHECK = "uebHealthCheckPing";
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/utils/CustomLoggingFilter.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/utils/CustomLoggingFilter.java
deleted file mode 100644
index 852779a1..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/utils/CustomLoggingFilter.java
+++ /dev/null
@@ -1,60 +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.utils;
-
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-
-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.
- */
-
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(CustomLoggingFilter.class);
-
- @Override
- public FilterReply decide(ILoggingEvent event) {
- try {
- if ((event.getLevel() != Level.ERROR || event.getLevel() != Level.WARN) &&
- (event.getThreadName().equalsIgnoreCase("UEBConsumerThread")) &&
- (event.getLoggerName().contains("com.att.nsa") || event.getLoggerName().contains("org.apache.http"))
- ) {
- return FilterReply.DENY;
- } else {
- return FilterReply.NEUTRAL;
- }
- } catch(Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- return FilterReply.NEUTRAL;
- }
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/utils/EPSystemProperties.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/utils/EPSystemProperties.java
deleted file mode 100644
index 57eb921f..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/utils/EPSystemProperties.java
+++ /dev/null
@@ -1,77 +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.utils;
-
-import org.openecomp.portalsdk.core.util.SystemProperties;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.PropertySource;
-import org.springframework.context.annotation.PropertySources;
-
-@Configuration
-@PropertySources({
- @PropertySource ("/WEB-INF/conf/system.properties"),
- @PropertySource ("/WEB-INF/conf/sql.properties"),
- @PropertySource ("/WEB-INF/fusion/conf/fusion.properties"),
- @PropertySource (value = "file:${catalina.home}/conf/system.properties", ignoreResourceNotFound = true),
- @PropertySource (value = "file:${catalina.home}/conf/fusion.properties", ignoreResourceNotFound = true)
- })
-
-public class EPSystemProperties extends SystemProperties {
-
- public static final String LOGIN_URL_NO_RET_VAL = "login_url_no_ret_val";
- public static final String HOME_PAGE_INDEX_HTML = "home_page";
- public static final String ECOMP_APP_ID = "ecomp_app_id";
- public static final String SYS_ADMIN_ROLE_ID = "sys_admin_role_id";
- public static final String DUBLICATED_FIELD_VALUE_ECOMP_ERROR = "1201";
- public static final String IDLE_CONNECTION_TEST_PERIOD = "hb.idle_connection_test_period";
- public static final String DB_RECONNECT = "hb.db_reconnect";
- public static final String ACCOUNT_ADMIN_ROLE_ID = "account_admin_role_id";
- public static final String RESTRICTED_APP_ROLE_ID = "restricted_app_role_id";
- public static final String FE_URL = "frontend_url";
- public static final String HEALTH_POLL_INTERVAL_SECONDS = "health_poll_interval_seconds";
- public static final String HEALTHFAIL_ALERT_EVERY_X_INTERVALS = "health_fail_alert_every_x_intervals";
- public static final String CONTACT_US_URL = "contact_us_link";
- public static final String USER_GUIDE_URL = "user_guide_link";
-
- public static final String USER_FIRST_NAME = "USER_FIRST_NAME";
- public static final String USER_LAST_NAME = "USER_LAST_NAME";
- public static final String USER_EMAIL = "USER_EMAIL";
- public static final String USER_ORG_USERID = "USER_ORG_USERID";
- public static final String USER_LAST_LOGIN = "USER_LAST_LOGIN";
- public static final String ELASTIC_SEARCH_URL = "elastic_search_url";
-
- public static final String EXTERNAL_API_RESPONSE_CODE = "External_API_ResponseCode";
- public static final String COOKIE_DOMAIN = "cookie_domain";
-
-
- public static final String USH_TICKET_URL = "ush_ticket_url";
- public static final String FEEDBACK_EMAIL_ADDRESS = "feedback_email_address";
- public static final String PORTAL_INFO_URL = "portal_info_url";
-
- public static final String ONLINE_USER_UPDATE_RATE = "online_user_update_rate";
- public static final String ONLINE_USER_UPDATE_DURATION = "online_user_update_duration";
-
- public static final String WINDOW_WIDTH_THRESHOLD_LEFT_MENU = "window_width_threshold_left_menu";
- public static final String WINDOW_WIDTH_THRESHOLD_RIGHT_MENU = "window_width_threshold_right_menu";
-
- public static final String ECOMP_CONTEXT_ROOT = "context_root";
-
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/utils/EcompPortalUtils.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/utils/EcompPortalUtils.java
deleted file mode 100644
index 6ec14511..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/utils/EcompPortalUtils.java
+++ /dev/null
@@ -1,248 +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.utils;
-
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-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]+$");
- }
-
- 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;
- }
-
- public static String jsonErrorMessageResponse(int errorCode, String errorMessage) {
- return "{\"error\":{\"code\":" + errorCode + "," + "\"message\":\"" + errorMessage + "\"}}";
- }
-
- public static String jsonMessageResponse(String message) {
- return String.format("{\"message\":\"%s\"}", message);
- }
-
- public static void logAndSerializeObject(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, "JsonProcessingException occurred while parsing the response, Details:" + EcompPortalUtils.getStackTrace(e));
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeInvalidJsonInput);
- } catch(Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while parsing the response, Details:" + EcompPortalUtils.getStackTrace(e));
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeInvalidJsonInput);
- }
- }
-
- public static void rollbackTransaction(Transaction transaction, String errorMessage) {
- logger.error(EELFLoggerDelegate.errorLogger, errorMessage);
- try {
- if(transaction != null) {
- transaction.rollback();
- }
- } catch (Exception e) {
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeExecuteRollbackError);
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing a rollback transaction, Details: " + EcompPortalUtils.getStackTrace(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(EPAppMessagesEnum.BeDaoCloseSessionError);
- logger.error(EELFLoggerDelegate.errorLogger, errorMessage + ", closeLocalSession exception: " + EcompPortalUtils.getStackTrace(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(EPSystemProperties.LOGIN_URL_NO_RET_VAL);
- response.setHeader(GLOBAL_LOGIN_URL, loginUrl);
- response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
- MDC.put(EPSystemProperties.RESPONSE_CODE, Integer.toString(HttpServletResponse.SC_UNAUTHORIZED));
- } else {
- response.setStatus(HttpServletResponse.SC_FORBIDDEN);
- MDC.put(EPSystemProperties.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(EPSystemProperties.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(EPSystemProperties.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;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/utils/EcompVersion.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/utils/EcompVersion.java
deleted file mode 100644
index 595ae24f..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/utils/EcompVersion.java
+++ /dev/null
@@ -1,33 +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.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";
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/utils/HashMapFromList.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/utils/HashMapFromList.java
deleted file mode 100644
index c9a55328..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/utils/HashMapFromList.java
+++ /dev/null
@@ -1,100 +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.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) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(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;
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/utils/ParallelExecutor.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/utils/ParallelExecutor.java
deleted file mode 100644
index 19b3fc8c..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/portal/utils/ParallelExecutor.java
+++ /dev/null
@@ -1,83 +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.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;
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/scheduler/LogJob.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/scheduler/LogJob.java
deleted file mode 100644
index 7e1ad889..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/scheduler/LogJob.java
+++ /dev/null
@@ -1,45 +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.scheduler;
-
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.quartz.DisallowConcurrentExecution;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.quartz.PersistJobDataAfterExecution;
-import org.springframework.scheduling.quartz.QuartzJobBean;
-
-@PersistJobDataAfterExecution
-@DisallowConcurrentExecution
-public class LogJob extends QuartzJobBean {
-
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(LogJob.class);
-
- @Override
- protected void executeInternal(JobExecutionContext ctx) throws JobExecutionException {
- // JobDataMap dataMap = ctx.getJobDetail().getJobDataMap();
- // int cnt = dataMap.getInt("");
- // JobKey jobKey = ctx.getJobDetail().getKey();
- logger.info(EELFLoggerDelegate.debugLogger,
- (Runtime.getRuntime().maxMemory() + " " + Runtime.getRuntime().maxMemory()));
-
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/scheduler/LogRegistry.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/scheduler/LogRegistry.java
deleted file mode 100644
index 9b34c87a..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/scheduler/LogRegistry.java
+++ /dev/null
@@ -1,57 +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.scheduler;
-
-import java.text.ParseException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.openecomp.portalsdk.core.scheduler.CronRegistry;
-import org.openecomp.portalsdk.core.util.SystemProperties;
-import org.springframework.context.annotation.DependsOn;
-import org.springframework.scheduling.quartz.CronTriggerFactoryBean;
-import org.springframework.scheduling.quartz.JobDetailFactoryBean;
-import org.springframework.stereotype.Component;
-
-@Component
-@DependsOn({ "systemProperties" })
-public class LogRegistry extends CronRegistry {
-
- private static final String groupName = "AppGroup";
- private static final String jobName = "LogJob";
- private static final String triggerName = "LogTrigger";
-
- // @Autowired
- // private SystemProperties systemProperties;
-
- // @Bean
- public JobDetailFactoryBean jobDetailFactoryBean() {
- Map<String, Object> map = new HashMap<String, Object>();
- map.put("units", "bytes");
- return jobDetailFactoryBean(groupName, jobName, LogJob.class, map);
- }
-
- // @Bean
- public CronTriggerFactoryBean cronTriggerFactoryBean() throws ParseException {
- // "0 * * * * ? *
- return cronTriggerFactoryBean(groupName, triggerName, SystemProperties.getProperty(SystemProperties.LOG_CRON));
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/scheduler/Register.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/scheduler/Register.java
deleted file mode 100644
index c09721c6..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/scheduler/Register.java
+++ /dev/null
@@ -1,86 +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.scheduler;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.openecomp.portalsdk.core.scheduler.Registerable;
-import org.openecomp.portalsdk.core.util.SystemProperties;
-import org.quartz.Trigger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.DependsOn;
-import org.springframework.stereotype.Component;
-
-@Component
-@DependsOn({"logRegistry", "sessionMgtRegistry", "systemProperties"})
-public class Register implements Registerable {
-
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(Register.class);
-
- private List<Trigger> scheduleTriggers = new ArrayList<Trigger>();
- Trigger trigger[] = new Trigger[0];
-
- @Autowired
- private LogRegistry logRegistry;
-
- @Autowired
- private SessionMgtRegistry sessionMgtRegistry;
-
- @Override
- public Trigger[] getTriggers() {
- return getScheduleTriggers().toArray(trigger);
- }
-
- @Override
- public void registerTriggers() {
- // if the property value is not available; the cron will not be added
- // and can be ignored. its safe to ignore the exceptions
- try {
- if (SystemProperties.getProperty(SystemProperties.LOG_CRON) != null)
- getScheduleTriggers().add(logRegistry.getTrigger());
-
- } catch (IllegalStateException ies) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(ies));
- logger.info(EELFLoggerDelegate.debugLogger, ("Log Cron not available"));
- }
-
- try {
- if(SystemProperties.getProperty(SystemProperties.SESSIONTIMEOUT_FEED_CRON) != null)
- getScheduleTriggers().add(sessionMgtRegistry.getTrigger());
-
- } catch(IllegalStateException ies) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(ies));
- logger.info(EELFLoggerDelegate.debugLogger, ("Session Cron not available"));
- }
-
- }
-
- public List<Trigger> getScheduleTriggers() {
- return scheduleTriggers;
- }
-
- public void setScheduleTriggers(List<Trigger> scheduleTriggers) {
- this.scheduleTriggers = scheduleTriggers;
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/scheduler/RegistryAdapter.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/scheduler/RegistryAdapter.java
deleted file mode 100644
index b26df58b..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/scheduler/RegistryAdapter.java
+++ /dev/null
@@ -1,100 +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.scheduler;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.openecomp.portalsdk.core.scheduler.Registerable;
-import org.openecomp.portalsdk.workflow.services.WorkflowScheduleService;
-import org.quartz.Trigger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.scheduling.quartz.SchedulerFactoryBean;
-import org.springframework.stereotype.Component;
-
-/**
- * TODO REFACTOR moved from org.openecomp.portalsdk.core.scheduler to
- * org.openecomp.portalapp.scheduler
- *
- */
-@Component
-public class RegistryAdapter {
-
- @Autowired
- private Registerable registry;
-
- @Autowired
- private WorkflowScheduleService workflowScheduleService;
-
- private SchedulerFactoryBean schedulerBean;
-
- Trigger trigger[] = new Trigger[0];
-
- public Trigger[] getTriggers() {
-
- registry.registerTriggers();
-
- List<Trigger> allTriggers = new ArrayList<Trigger>();
-
- List<Trigger> coreTriggers = addCoreTriggers();
- final Trigger[] extTriggerArray = registry.getTriggers();
-
- allTriggers.addAll(Arrays.asList(extTriggerArray));
- allTriggers.addAll(coreTriggers);
-
- return allTriggers.toArray(trigger);
-
- }
-
- public List<Trigger> addCoreTriggers() {
- // On startup of the application after crash recovery, invoke workflow
- // schedule trigger
- List<Trigger> triggers = getWorkflowScheduleService().triggerWorkflowScheduling();
- return triggers;
- }
-
- public void setSchedulerBean(SchedulerFactoryBean _schedulerBean) {
- schedulerBean = _schedulerBean;
-
- }
-
- public SchedulerFactoryBean getSchedulerBean() {
- return schedulerBean;
-
- }
-
- public Registerable getRegistry() {
- return registry;
- }
-
- public void setRegistry(Registerable registry) {
- this.registry = registry;
- }
-
- public WorkflowScheduleService getWorkflowScheduleService() {
- return workflowScheduleService;
- }
-
- public void setWorkflowScheduleService(WorkflowScheduleService workflowScheduleService) {
- this.workflowScheduleService = workflowScheduleService;
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/scheduler/SessionMgtRegistry.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/scheduler/SessionMgtRegistry.java
deleted file mode 100644
index 177b4299..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/scheduler/SessionMgtRegistry.java
+++ /dev/null
@@ -1,89 +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.scheduler;
-
-import java.text.ParseException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.openecomp.portalapp.portal.listener.UserSessionListener;
-import org.openecomp.portalapp.service.sessionmgt.TimeoutHandler;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.openecomp.portalsdk.core.scheduler.CronRegistry;
-import org.openecomp.portalsdk.core.util.SystemProperties;
-import org.springframework.beans.BeansException;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ApplicationContextAware;
-import org.springframework.context.annotation.DependsOn;
-import org.springframework.scheduling.quartz.CronTriggerFactoryBean;
-import org.springframework.scheduling.quartz.JobDetailFactoryBean;
-import org.springframework.stereotype.Component;
-
-/**
- * Extra depends-on annotation tells Spring that the system properties object
- * will be used in the constructor.
- */
-@Component
-// @DependsOn({ "manageService", "epAppService", "systemProperties" })
-@DependsOn({ "systemProperties" })
-public class SessionMgtRegistry extends CronRegistry implements ApplicationContextAware {
-
- EELFLoggerDelegate logger = null;
-
- private static final String groupName = "AppGroup";
- private static final String jobName = "PortalSessionTimeoutFeedJob";
- private static final String triggerName = "PortalSessionTimeoutFeedTrigger";
-
- // Not strictly necessary, but preparing for the day
- // when the getProperty method is not static.
- @Autowired
- private SystemProperties systemProperties;
-
- private ApplicationContext applicationContext;
-
- public JobDetailFactoryBean jobDetailFactoryBean() {
- logger = EELFLoggerDelegate.getLogger(SessionMgtRegistry.class);
- Map<String, Object> map = new HashMap<String, Object>();
- return jobDetailFactoryBean(groupName, jobName, TimeoutHandler.class, map);
- }
-
- @SuppressWarnings("static-access")
- public CronTriggerFactoryBean cronTriggerFactoryBean() throws ParseException {
- logger = EELFLoggerDelegate.getLogger(SessionMgtRegistry.class);
- String property = "* * * * * ? 2099";
- try {
- property = systemProperties.getProperty(SystemProperties.SESSIONTIMEOUT_FEED_CRON);
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger,
- "Failed to retrieve " + SystemProperties.SESSIONTIMEOUT_FEED_CRON + ", defaulting to " + property,
- e);
- }
- return cronTriggerFactoryBean(groupName, triggerName, property);
- }
-
- @Override
- public void setApplicationContext(ApplicationContext _applicationContext) throws BeansException {
- applicationContext = _applicationContext;
- TimeoutHandler.setApplicationContext(applicationContext);
- UserSessionListener.setApplicationContext(_applicationContext);
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/AdminAuthExtension.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/AdminAuthExtension.java
deleted file mode 100644
index 2432061e..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/AdminAuthExtension.java
+++ /dev/null
@@ -1,35 +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.service;
-
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-
-@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
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/EPProfileService.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/EPProfileService.java
deleted file mode 100644
index 98415662..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/EPProfileService.java
+++ /dev/null
@@ -1,36 +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.service;
-
-import java.util.List;
-
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalsdk.core.domain.Profile;
-
-
-public interface EPProfileService {
- List<Profile> findAll();
-
- Profile getProfile(int id);
-
- EPUser getUser(String id);
-
- void saveUser(EPUser user);
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/EPProfileServiceImpl.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/EPProfileServiceImpl.java
deleted file mode 100644
index 9dcc8dc9..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/EPProfileServiceImpl.java
+++ /dev/null
@@ -1,76 +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.service;
-
-import java.util.List;
-
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
-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.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.EnableAspectJAutoProxy;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-@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;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/sessionmgt/CoreTimeoutHandler.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/sessionmgt/CoreTimeoutHandler.java
deleted file mode 100644
index dace543c..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/sessionmgt/CoreTimeoutHandler.java
+++ /dev/null
@@ -1,166 +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.service.sessionmgt;
-
-import java.util.Calendar;
-import java.util.Hashtable;
-import java.util.Map;
-
-import javax.servlet.http.HttpSession;
-
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalsdk.core.domain.sessionmgt.TimeoutVO;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.openecomp.portalsdk.core.onboarding.crossapi.PortalApiConstants;
-import org.springframework.context.annotation.EnableAspectJAutoProxy;
-import org.springframework.stereotype.Service;
-
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-
-@Service
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPMetricsLog
-public class CoreTimeoutHandler{
- private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(CoreTimeoutHandler.class);
-
- public static final Map<String, HttpSession> sessionMap = new Hashtable<String,HttpSession>();
- public static final Integer repeatInterval = 15 * 60; // 15 minutes
- ObjectMapper mapper = new ObjectMapper();
-
-
- public static void sessionCreated(String portalJSessionId, String jSessionId, HttpSession session) {
-
- storeMaxInactiveTime(session);
-
- // this key is a combination of portal jsession id and app session id
- session.setAttribute(PortalApiConstants.PORTAL_JSESSION_ID,jSessionKey(jSessionId, portalJSessionId));
- sessionMap.put((String)session.getAttribute(PortalApiConstants.PORTAL_JSESSION_ID), session);
-
- }
-
- protected static void storeMaxInactiveTime(HttpSession session) {
-
- if(session.getAttribute(PortalApiConstants.GLOBAL_SESSION_MAX_IDLE_TIME) == null)
- session.setAttribute(PortalApiConstants.GLOBAL_SESSION_MAX_IDLE_TIME,session.getMaxInactiveInterval());
- }
-
- public static void sessionDestroyed(HttpSession session) {
-
- try{
- sessionMap.remove((String)session.getAttribute(PortalApiConstants.PORTAL_JSESSION_ID));
- }catch(Exception e){
- logger.error(EELFLoggerDelegate.errorLogger, "************************ Session Management: Error while destroying session for " + session.getId() + " Details: " + EcompPortalUtils.getStackTrace(e));
- }
-
- }
-
- public String gatherSessionExtenstions() {
-
- Map<String,TimeoutVO> sessionTimeoutMap = new Hashtable<String,TimeoutVO>();
- String jsonMap = "";
-
-
- for(String jSessionKey: sessionMap.keySet()) {
-
- try{
- // get the expirytime in seconds
- HttpSession session = sessionMap.get(jSessionKey);
-
- Long lastAccessedTimeMilliSec = session.getLastAccessedTime();
- Long maxIntervalMilliSec = session.getMaxInactiveInterval() * 1000L;
- //Long currentTimeMilliSec = Calendar.getInstance().getTimeInMillis() ;
- //(maxIntervalMilliSec - (currentTimeMilliSec - lastAccessedTimeMilliSec) + ;
- Calendar instance = Calendar.getInstance();
- instance.setTimeInMillis(session.getLastAccessedTime());
- logger.info(EELFLoggerDelegate.errorLogger, "************************ Session Management: Last Accessed time for "+ jSessionKey + ": " + instance.getTime());
-
- Long sessionTimOutMilliSec = maxIntervalMilliSec + lastAccessedTimeMilliSec;
-
- sessionTimeoutMap.put( portalJSessionId(jSessionKey), new TimeoutVO(jSessionId(jSessionKey),sessionTimOutMilliSec));
-
-
- jsonMap = mapper.writeValueAsString(sessionTimeoutMap);
- } catch(Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "************************ Session Management: Error during JsonSessionTimout conversion. Details: " + EcompPortalUtils.getStackTrace(e));
- }
- }
-
- return jsonMap;
-
- }
-
-
- public void updateSessionExtensions(String sessionTimeoutMapStr) throws Exception {
-
- //Map<String,Object> sessionTimeoutMap = mapper.readValue(sessionTimeoutMapStr, Map.class);
- Map<String,TimeoutVO> sessionTimeoutMap;
- try{
- TypeReference<Hashtable<String,TimeoutVO>> typeRef
- = new TypeReference<Hashtable<String,TimeoutVO>>() {};
-
- sessionTimeoutMap = mapper.readValue(sessionTimeoutMapStr, typeRef);
- }catch(Exception e){
- logger.error(EELFLoggerDelegate.errorLogger, "************************ Session Management: Error while to parse update session extension in portal", e);
- return;
- }
- for(String jPortalSessionId: sessionTimeoutMap.keySet()) {
- try {
-
- TimeoutVO extendedTimeoutVO = mapper.readValue(mapper.writeValueAsString(sessionTimeoutMap.get(jPortalSessionId)),TimeoutVO.class);
- HttpSession session = sessionMap.get(jSessionKey(extendedTimeoutVO.getjSessionId(), jPortalSessionId));
-
- if(session == null) {
- continue;
- }
-
- Long lastAccessedTimeMilliSec = session.getLastAccessedTime();
- Long maxIntervalMilliSec = session.getMaxInactiveInterval() * 1000L;
- Long sessionTimOutMilliSec = maxIntervalMilliSec + lastAccessedTimeMilliSec;
-
- Long maxTimeoutTimeMilliSec = extendedTimeoutVO.getSessionTimOutMilliSec();
- if(maxTimeoutTimeMilliSec>sessionTimOutMilliSec) {
- logger.debug(EELFLoggerDelegate.debugLogger, "************************ Session Management: " + " updated session max idle time");
- session.setMaxInactiveInterval((int)(maxTimeoutTimeMilliSec-lastAccessedTimeMilliSec)/1000);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "************************ Session Management: " + EcompPortalUtils.getStackTrace(e));
- }
-
- }
-
- }
-
- protected static String jSessionKey(String jSessionId, String portalJSessionId) {
- return portalJSessionId + "-" + jSessionId;
- }
-
- protected String portalJSessionId(String jSessionKey) {
- return jSessionKey.split("-")[0];
- }
-
- protected String jSessionId(String jSessionKey) {
- return jSessionKey.split("-")[1];
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/sessionmgt/ManageService.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/sessionmgt/ManageService.java
deleted file mode 100644
index a485176f..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/sessionmgt/ManageService.java
+++ /dev/null
@@ -1,101 +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.service.sessionmgt;
-
-import java.util.Calendar;
-import java.util.Date;
-import java.util.List;
-
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
-import org.openecomp.portalapp.portal.service.EPAppService;
-import org.openecomp.portalapp.portal.transport.OnboardingApp;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.openecomp.portalsdk.core.onboarding.crossapi.PortalTimeoutHandler;
-import org.openecomp.portalsdk.core.util.SystemProperties;
-import org.quartz.CronExpression;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.EnableAspectJAutoProxy;
-import org.springframework.stereotype.Service;
-import org.springframework.util.StringUtils;
-
-@Service("manageService")
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPMetricsLog
-public class ManageService implements PortalTimeoutHandler.SessionCommInf {
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ManageService.class);
-
- @Autowired
- EPAppService appService;
-
- @Autowired
- SessionCommunication sessionCommunication;
-
- public Integer fetchSessionSlotCheckInterval(String... params) throws Exception {
-
- String defaultCronExpressionStr = "0 0/5 * * * ? *";
- String cronExpressionStr = SystemProperties.getProperty(SystemProperties.SESSIONTIMEOUT_FEED_CRON);
-
- if (cronExpressionStr == null) {
- cronExpressionStr = defaultCronExpressionStr;
- }
-
- CronExpression cal = new CronExpression(cronExpressionStr);
- final Date nowTime = Calendar.getInstance().getTime();
- Date nextTime = cal.getNextValidTimeAfter(nowTime);
- Date nextNextTime = cal.getNextValidTimeAfter(nextTime);
-
- final int timeDiff = (int)(nextNextTime.getTime()-nextTime.getTime());
- logger.debug(EELFLoggerDelegate.debugLogger, "Time interval between subsequent session checks " + timeDiff);
-
- return timeDiff;
- }
-
- public void extendSessionTimeOuts(String... params) throws Exception {
- try {
- String sessionMap = params[3];
-
- logger.debug(EELFLoggerDelegate.debugLogger, "Extending the App sessions for last minute request: " + sessionMap);
-
- if (StringUtils.isEmpty(sessionMap)) {
- logger.error(EELFLoggerDelegate.errorLogger, "extendSessionTimeOuts: Skipping session updates since the portal session value is empty.");
- } else {
- List<OnboardingApp> appList = appService.getEnabledNonOpenOnboardingApps();
- for (OnboardingApp onApp : appList) {
- sessionCommunication.pingSession(onApp, sessionMap);
- }
- updateSessionExtensions(sessionMap);
- sessionCommunication.clear(false);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred in extendSessionTimeOuts(). Details: " + EcompPortalUtils.getStackTrace(e));
- }
- }
-
- public String gatherSessionExtenstions() {
- return PortalTimeoutHandler.gatherSessionExtensions();
- }
-
- public void updateSessionExtensions(String sessionTimeoutMapStr) throws Exception {
- PortalTimeoutHandler.updateSessionExtensions(sessionTimeoutMapStr);
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/sessionmgt/RemoteWebServiceCallService.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/sessionmgt/RemoteWebServiceCallService.java
deleted file mode 100644
index 15693a60..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/sessionmgt/RemoteWebServiceCallService.java
+++ /dev/null
@@ -1,44 +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.service.sessionmgt;
-
-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 requesUserName
- * 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;
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/sessionmgt/RemoteWebServiceCallServiceImpl.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/sessionmgt/RemoteWebServiceCallServiceImpl.java
deleted file mode 100644
index e2b2dd5d..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/sessionmgt/RemoteWebServiceCallServiceImpl.java
+++ /dev/null
@@ -1,83 +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.service.sessionmgt;
-
-import java.util.List;
-
-import org.openecomp.portalapp.portal.domain.EPApp;
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.openecomp.portalsdk.core.service.WebServiceCallServiceImpl;
-import org.openecomp.portalsdk.core.util.CipherUtil;
-import org.openecomp.portalsdk.core.util.SystemProperties;
-import org.springframework.context.annotation.EnableAspectJAutoProxy;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-@Service("remoteWebServiceCallService")
-@Transactional
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPMetricsLog
-public class RemoteWebServiceCallServiceImpl extends WebServiceCallServiceImpl implements RemoteWebServiceCallService {
-
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RemoteWebServiceCallServiceImpl.class);
-
- /*
- * (non-Javadoc)
- * @see org.openecomp.portalapp.service.sessionmgt.RemoteWebServiceCallService#verifyRESTCredential(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
- */
- public boolean verifyRESTCredential(String secretKey, String requestUebKey, String requestAppName,
- String requestPassword) throws Exception {
- EPApp appRecord = findEpApp(requestUebKey);
- if (appRecord == null) {
- logger.warn(EELFLoggerDelegate.errorLogger, "Failed to find application with UEB key " + requestUebKey);
- return false;
- }
-
- String encryptedPwdDB = appRecord.getAppPassword();
- String appUserName = appRecord.getUsername();
- String decryptedPwd = CipherUtil.decrypt(encryptedPwdDB,
- secretKey == null ? SystemProperties.getProperty(SystemProperties.Decryption_Key) : secretKey);
- if (decryptedPwd.equals(requestPassword) && appUserName.equals(requestAppName))
- return true;
- else
- return false;
- }
-
- /**
- * Searches the FN_APP table for the specified UEB key.
- *
- * @return EPApp object if the key is found; else null.
- */
- public 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);
- }
-
- public static void main(String args[]) throws Exception {
- String decryptedPwd = CipherUtil.decrypt("okYTaDrhzibcbGVq5mjkVQ==", "AGLDdG4D04BKm2IxIWEr8o==");
- System.out.print(decryptedPwd);
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/sessionmgt/SessionCommunication.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/sessionmgt/SessionCommunication.java
deleted file mode 100644
index 57fdd8a0..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/sessionmgt/SessionCommunication.java
+++ /dev/null
@@ -1,274 +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.service.sessionmgt;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.util.UUID;
-
-import javax.servlet.http.HttpServletResponse;
-
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
-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.OnboardingApp;
-import org.openecomp.portalapp.portal.utils.EPSystemProperties;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalsdk.core.exception.UrlAccessRestrictedException;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.slf4j.MDC;
-import org.springframework.context.annotation.EnableAspectJAutoProxy;
-import org.springframework.stereotype.Service;
-import org.springframework.util.StringUtils;
-
-import com.att.eelf.configuration.Configuration;
-
-@Service("sessionCommunication")
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-public class SessionCommunication {
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SessionCommunication.class);
-
- @EPAuditLog
- public String sendGet(OnboardingApp app) throws Exception {
- String appResponse = "";
- String appName = "Unknwon";
- int responseCode = 0;
-
- try {
- if (app != null && app.name != null && app.name != "") {
- appName = app.name;
- }
- String url = app.restUrl + "/sessionTimeOuts";
- String encriptedPwdDB = app.appPassword;
- String appUserName = app.username;
-
- setLocalMDCContext(app, "/sessionTimeOuts", url);
-
- URL obj = new URL(url);
-
- HttpURLConnection con = (HttpURLConnection) obj.openConnection();
-
- // optional default is GET
- con.setRequestMethod("GET");
- con.setConnectTimeout(3000);
- con.setReadTimeout(8000);
- // add request header
- con.setRequestProperty("username", appUserName);
- con.setRequestProperty("password", encriptedPwdDB);
-
- // con.set
- responseCode = con.getResponseCode();
- logger.debug(EELFLoggerDelegate.debugLogger, "Response Code : " + responseCode);
-
- BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
- String inputLine;
- StringBuffer response = new StringBuffer();
-
- while ((inputLine = in.readLine()) != null) {
- response.append(inputLine);
- }
-
- in.close();
- appResponse = response.toString();
- } catch (UrlAccessRestrictedException e) {
- responseCode = HttpServletResponse.SC_UNAUTHORIZED;
- logger.error(EELFLoggerDelegate.errorLogger, String.format("SessionCommunication.sendGet received an un-authorized exception. AppName: %s", appName));
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeRestApiAuthenticationError);
- } catch (Exception e) {
- responseCode = HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
- String message = String.format(
- "SessionCommunication.sendGet encountered an Exception. AppName: %s, Details: %s", appName,
- EcompPortalUtils.getStackTrace(e));
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeHttpConnectionError, e.getMessage());
- logger.error(EELFLoggerDelegate.errorLogger, message);
- } finally {
- EcompPortalUtils.setExternalAppResponseCode(responseCode);
- }
- return appResponse;
- }
-
- @EPAuditLog
- public Boolean pingSession(OnboardingApp app, String sessionTimeoutMap) throws Exception {
- String appName = "Unknwon";
- int responseCode = 0;
- try {
- if (app != null && app.name != null && app.name != "") {
- appName = app.name;
- }
-
- String url = app.restUrl + "/updateSessionTimeOuts";
- String encriptedPwdDB = app.appPassword;
- String appUserName = app.username;
- // String decreptedPwd = CipherUtil.decrypt(encriptedPwdDB,
- // SystemProperties.getProperty(SystemProperties.Decryption_Key));
-
- setLocalMDCContext(app, "/updateSessionTimeOuts", url);
-
- URL obj = new URL(url);
-
- HttpURLConnection con = (HttpURLConnection) obj.openConnection();
-
- // optional default is GET
- con.setRequestMethod("POST");
- con.setConnectTimeout(3000);
- con.setReadTimeout(15000);
-
- // add request header
- con.setRequestProperty("username", appUserName);
- con.setRequestProperty("password", encriptedPwdDB);
-
- con.setRequestProperty("sessionMap", sessionTimeoutMap);
- con.setDoInput(true);
- con.setDoOutput(true);
- con.getOutputStream().write(sessionTimeoutMap.getBytes());
- con.getOutputStream().flush();
- con.getOutputStream().close();
-
- responseCode = con.getResponseCode();
- logger.debug(EELFLoggerDelegate.debugLogger, "Response Code : " + responseCode);
- } catch (UrlAccessRestrictedException e) {
- responseCode = HttpServletResponse.SC_UNAUTHORIZED;
- String message = String.format(
- "SessionCommunication.pingSession received an un-authorized exception. AppName: %s", appName);
- logger.error(EELFLoggerDelegate.errorLogger, message);
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeRestApiAuthenticationError);
- } catch (Exception e) {
- responseCode = HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
- String message = String.format(
- "SessionCommunication.pingSession encountered an Exception. AppName: %s, Details: %s", appName,
- EcompPortalUtils.getStackTrace(e));
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeHttpConnectionError, e.getMessage());
- logger.error(EELFLoggerDelegate.errorLogger, message);
- } finally {
- EcompPortalUtils.setExternalAppResponseCode(responseCode);
- }
-
- return true;
- }
-
- @EPAuditLog
- public Boolean timeoutSession(OnboardingApp app, String portalJSessionId) throws Exception {
- String appName = "Unknwon";
- int responseCode = 0;
- try {
- if (app != null && app.name != null && app.name != "") {
- appName = app.name;
- }
-
- String url = app.restUrl + "/timeoutSession" + "?portalJSessionId=" + portalJSessionId;
-
- String encriptedPwdDB = app.appPassword;
- String appUserName = app.username;
- // String decreptedPwd = CipherUtil.decrypt(encriptedPwdDB,
- // SystemProperties.getProperty(SystemProperties.Decryption_Key));
-
- setLocalMDCContext(app, "/timeoutSession", url);
-
- URL obj = new URL(url);
- HttpURLConnection con = (HttpURLConnection) obj.openConnection();
-
- // optional default is GET
- con.setRequestMethod("POST");
- con.setConnectTimeout(3000);
- con.setReadTimeout(15000);
-
- // add request header
- con.setRequestProperty("username", appUserName);
- con.setRequestProperty("password", encriptedPwdDB);
-
- // con.setRequestProperty("portalJSessionId", portalJSessionId);
- con.setDoInput(true);
- con.setDoOutput(true);
- con.getOutputStream().flush();
- con.getOutputStream().close();
-
- responseCode = con.getResponseCode();
- logger.debug(EELFLoggerDelegate.debugLogger, "Response Code : " + responseCode);
- } catch (UrlAccessRestrictedException e) {
- responseCode = HttpServletResponse.SC_UNAUTHORIZED;
- String message = String.format(
- "SessionCommunication.timeoutSession received an un-authorized exception. AppName: %s", appName);
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- logger.error(EELFLoggerDelegate.errorLogger, message);
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeRestApiAuthenticationError);
- } catch (Exception e) {
- responseCode = HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
- String message = String.format(
- "SessionCommunication.timeoutSession encountered an Exception. AppName: %s, Details: %s", appName,
- EcompPortalUtils.getStackTrace(e));
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeHttpConnectionError, e.getMessage());
- logger.error(EELFLoggerDelegate.errorLogger, message);
- } finally {
- EcompPortalUtils.setExternalAppResponseCode(responseCode);
- }
- return true;
- }
-
- @EPMetricsLog
- private void setLocalMDCContext(OnboardingApp app, String restPath, String url) {
- setRequestId();
- MDC.put(EPSystemProperties.PROTOCOL, EPSystemProperties.HTTP);
- if (url!=null && url.contains("https")) {
- MDC.put(EPSystemProperties.PROTOCOL, EPSystemProperties.HTTPS);
- }
- MDC.put(EPSystemProperties.FULL_URL, url);
- MDC.put(EPSystemProperties.TARGET_ENTITY, app.name);
- MDC.put(EPSystemProperties.TARGET_SERVICE_NAME, restPath);
- }
-
- /**
- * Generates request id, service name fields and loads them
- * into MDC, as these values could be empty as these
- * session timeout requests are generated at
- * scheduled intervals using quartz scheduler.
- */
- @EPMetricsLog
- public void setRequestId() {
- String requestId = MDC.get(Configuration.MDC_KEY_REQUEST_ID);
- if (StringUtils.isEmpty(requestId)) {
- MDC.put(Configuration.MDC_KEY_REQUEST_ID, UUID.randomUUID().toString());
- }
-
- MDC.put(Configuration.MDC_SERVICE_NAME, "/quartz/keepSessionAlive");
- MDC.put(EPSystemProperties.PARTNER_NAME, EPSystemProperties.ECOMP_PORTAL_BE);
- }
-
- /**
- * Remove the values from MDC as these requests are
- * executed at regular intervals based on quartz rather
- * incoming REST API requests.
- * @param bAll
- */
- @EPMetricsLog
- public void clear(Boolean bAll) {
- MDC.remove(EPSystemProperties.EXTERNAL_API_RESPONSE_CODE);
- if (bAll) {
- MDC.remove(Configuration.MDC_KEY_REQUEST_ID);
- MDC.remove(Configuration.MDC_SERVICE_NAME);
- MDC.remove(EPSystemProperties.PARTNER_NAME);
- }
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/sessionmgt/TimeoutHandler.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/sessionmgt/TimeoutHandler.java
deleted file mode 100644
index 84dcf3fa..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/service/sessionmgt/TimeoutHandler.java
+++ /dev/null
@@ -1,252 +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.service.sessionmgt;
-
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.http.HttpSession;
-
-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.transport.OnboardingApp;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalsdk.core.domain.sessionmgt.TimeoutVO;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.openecomp.portalsdk.core.onboarding.crossapi.PortalApiConstants;
-import org.quartz.DisallowConcurrentExecution;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.quartz.PersistJobDataAfterExecution;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.annotation.EnableAspectJAutoProxy;
-import org.springframework.scheduling.quartz.QuartzJobBean;
-
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.JsonMappingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-/**
- * Executed periodically by Quartz to discover remote application sessions and
- * update timeouts suitably.
- */
-@PersistJobDataAfterExecution
-@DisallowConcurrentExecution
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPMetricsLog
-public class TimeoutHandler extends QuartzJobBean {
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(TimeoutHandler.class);
-
- ObjectMapper mapper = new ObjectMapper();
-
- /**
- * Supports static call {@link #timeoutSessions(HttpSession)}
- */
- private static List<OnboardingApp> onboardedAppList = null;
-
- @Autowired
- SessionCommunication sessionCommunication;
-
- @Override
- protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
- try {
- //Create a request id if there is none available,
- //and which will internally be used when making
- //session extended timeout calls to the partner applications.
- if (getSessionCommunication()!=null) {
- getSessionCommunication().setRequestId();
- }
- logger.info(EELFLoggerDelegate.debugLogger, "Quartz Cronjob for Session Management begins");
-
- ManageService manageService = (ManageService) applicationContext.getBean("manageService");
- EPAppService appService = (EPAppService) applicationContext.getBean("epAppService");
-
- List<OnboardingApp> appList = appService.getEnabledNonOpenOnboardingApps();
- onboardedAppList = appList;
- TypeReference<Hashtable<String, TimeoutVO>> typeRef = new TypeReference<Hashtable<String, TimeoutVO>>() {
- };
- String portalJsonSessionStr;
- Map<String, TimeoutVO> portalSessionTimeoutMap = null;
-
- portalJsonSessionStr = manageService.gatherSessionExtenstions();
- if (portalJsonSessionStr == null || portalJsonSessionStr == "") {
- logger.error(EELFLoggerDelegate.errorLogger, "Session Management: Portal session information is empty.");
- return;
- }
-
- try {
- portalSessionTimeoutMap = mapper.readValue(portalJsonSessionStr, typeRef);
- } catch (JsonMappingException | JsonParseException je) {
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeInvalidJsonInput);
- logger.error(EELFLoggerDelegate.errorLogger, "Session Management: JSON Mapping Exception occurred while gathering the Session", je);
- return;
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Session Management: Error while gather Session from portal", e);
- return;
- }
-
- Map<Long, Map<String, TimeoutVO>> appSessionTimeOutMap = new Hashtable<Long, Map<String, TimeoutVO>>();
- // determine the Max TimeOut Time for each of the managed sessions
- for (OnboardingApp app : appList) {
- if (app.restUrl == null) {
- logger.info(EELFLoggerDelegate.debugLogger, "Session Management: null restUrl, not fetching from app " + app.name);
- continue;
- }
- logger.info(EELFLoggerDelegate.debugLogger, "Session Management: Calling App " + app.name + " at URL " + app.restUrl);
- String jsonSessionStr = fetchAppSessions(app);
- logger.info(EELFLoggerDelegate.debugLogger, "Session Management: App " + app.name + " returned " + jsonSessionStr);
- if (jsonSessionStr == null || jsonSessionStr.isEmpty())
- continue;
-
- try {
- Map<String, TimeoutVO> sessionTimeoutMap = mapper.readValue(jsonSessionStr, typeRef);
- appSessionTimeOutMap.put(app.id, sessionTimeoutMap);
- for (String portalJSessionId : sessionTimeoutMap.keySet()) {
- final TimeoutVO maxTimeoutVO = portalSessionTimeoutMap.get(portalJSessionId);
- final TimeoutVO compareTimeoutVO = sessionTimeoutMap.get(portalJSessionId);
- if (maxTimeoutVO != null && compareTimeoutVO != null) {
- if (maxTimeoutVO.compareTo(compareTimeoutVO) < 0)
- portalSessionTimeoutMap.get(portalJSessionId)
- .setSessionTimOutMilliSec(compareTimeoutVO.getSessionTimOutMilliSec());
- }
- }
- } catch (JsonParseException | JsonMappingException e) {
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeInvalidJsonInput);
- logger.error(EELFLoggerDelegate.errorLogger,
- "JSON Mapping/Processing Exception occurred while mapping/parsing the jsonSessionStr", e);
- continue;
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while mapping/parsing the jsonSessionStr", e);
- continue;
- }
-
- }
-
- // post the updated session timeouts back to the Apps
- for (OnboardingApp app : appList) {
- if (app.restUrl == null) {
- logger.warn(EELFLoggerDelegate.errorLogger, "Session Management: null restUrl, not posting back to app " + app.name);
- continue;
- }
-
- Map<String, TimeoutVO> sessionTimeoutMap = appSessionTimeOutMap.get(app.id);
- if (sessionTimeoutMap == null || sessionTimeoutMap.isEmpty())
- continue;
-
- for (String portalJSessionId : sessionTimeoutMap.keySet()) {
- try {
- final TimeoutVO maxTimeoutVO = portalSessionTimeoutMap.get(portalJSessionId);
- final TimeoutVO setTimeoutVO = sessionTimeoutMap.get(portalJSessionId);
- if (maxTimeoutVO == null || setTimeoutVO == null) {
- String message = String.format(
- "Session Management: Failed to update the session timeouts for the app: %s and the sessionId: %s.",
- app.name, portalJSessionId);
- logger.warn(EELFLoggerDelegate.errorLogger, message);
- continue;
- }
- setTimeoutVO.setSessionTimOutMilliSec(maxTimeoutVO.getSessionTimOutMilliSec());
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Session Management: error while updating the session timeout map", e);
- continue;
- }
- }
- logger.info(EELFLoggerDelegate.debugLogger, "Session Management: Updating App " + app.restUrl);
- String sessionTimeoutMapStr = "";
- try {
- sessionTimeoutMapStr = mapper.writeValueAsString(sessionTimeoutMap);
- } catch (JsonProcessingException je) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while processing sessionTimeOutMap object to a String. Details: "
- + EcompPortalUtils.getStackTrace(je));
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeInvalidJsonInput);
- }
- pingAppSessions(app, sessionTimeoutMapStr);
- }
- String portalSessionTimeoutMapStr = "";
- try {
- portalSessionTimeoutMapStr = mapper.writeValueAsString(portalSessionTimeoutMap);
- } catch (JsonProcessingException je) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while processing portalSessionTimeOutMap object to a String", je);
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeInvalidJsonInput);
- }
- manageService.updateSessionExtensions(portalSessionTimeoutMapStr);
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "************************ Session Management: error in managing session timeouts", e);
- } finally {
- getSessionCommunication().clear(true);
- }
- }
-
- private String fetchAppSessions(OnboardingApp app) throws Exception {
- String jsonSessionValue = getSessionCommunication().sendGet(app);
- getSessionCommunication().clear(false);
- return jsonSessionValue;
- }
-
- private void pingAppSessions(OnboardingApp app, String sessionTimeoutMapStr) throws Exception {
- getSessionCommunication().pingSession(app, sessionTimeoutMapStr);
- getSessionCommunication().clear(false);
- }
-
- public void timeoutSessions(HttpSession session) throws Exception {
- String portalJSessionId = portalJSessionId(session);
- if (onboardedAppList == null)
- return;
-
- for (OnboardingApp app : onboardedAppList) {
- getSessionCommunication().timeoutSession(app, portalJSessionId);
- getSessionCommunication().clear(false);
- }
- }
-
- protected static String portalJSessionId(HttpSession session) {
- final Object attribute = session.getAttribute(PortalApiConstants.PORTAL_JSESSION_ID);
- if (attribute == null)
- return "";
- String jSessionKey = (String) attribute;
- return jSessionKey.split("-")[0];
- }
-
- private static ApplicationContext applicationContext;
-
- public static void setApplicationContext(ApplicationContext _applicationContext) {
- applicationContext = _applicationContext;
- }
-
- public SessionCommunication getSessionCommunication() {
- if(sessionCommunication == null){
- if (applicationContext != null)
- sessionCommunication = (SessionCommunication)applicationContext.getBean("sessionCommunication");
- }
-
- return sessionCommunication;
- }
-
- public void setSessionCommunication(SessionCommunication sessionCommunication) {
- this.sessionCommunication = sessionCommunication;
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/uebhandler/FunctionalMenuHandler.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/uebhandler/FunctionalMenuHandler.java
deleted file mode 100644
index a726674c..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/uebhandler/FunctionalMenuHandler.java
+++ /dev/null
@@ -1,126 +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.uebhandler;
-
-import java.util.List;
-
-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.FunctionalMenuService;
-import org.openecomp.portalapp.portal.service.SearchService;
-import org.openecomp.portalapp.portal.transport.FunctionalMenuItem;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-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.portalsdk.core.service.DataAccessService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.EnableAspectJAutoProxy;
-import org.springframework.scheduling.annotation.Async;
-import org.springframework.stereotype.Component;
-
-import com.google.gson.Gson;
-
-@Component
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPAuditLog
-public class FunctionalMenuHandler {
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FunctionalMenuHandler.class);
-
- @Autowired
- AdminRolesService adminRolesService;
-
- @Autowired
- FunctionalMenuService functionalMenuService;
-
- @Autowired
- SearchService searchSvc;
-
- @Autowired
- DataAccessService dataAccessService;
-
- @Async
- public Boolean getFunctionalMenu(UebMsg requestMsg)
- {
- UebMsg returnMsg = new UebMsg();
-
- if (requestMsg == null)
- {
- logger.error(EELFLoggerDelegate.errorLogger, "handleMenuRequest received null message");
- return false;
- }
- else if (requestMsg.getSourceTopicName() == null)
- {
- logger.error(EELFLoggerDelegate.errorLogger, "A source topic name is required and not found in this msg:" + requestMsg.toString());
- return false;
- }
- else if (requestMsg.getUserId() == null)
- {
- logger.debug(EELFLoggerDelegate.debugLogger, "Error getting functional menu. A userId is required and not found in this msg: " + requestMsg.toString());
- returnMsg.putMsgId(requestMsg.getMsgId()); // echo tells requester this is a response
- returnMsg.putPayload("Error: A userId is required. Call msg.putUserId() with an userId");
- }
- else
- {
- logger.debug(EELFLoggerDelegate.debugLogger, "Getting functional menu for user = " + requestMsg.getUserId());
- EPUser user = searchSvc.searchUserByUserId(requestMsg.getUserId());
-
- List<FunctionalMenuItem> menuItems = null;
- if (user == null)
- {
- logger.debug(EELFLoggerDelegate.debugLogger, "Error getting functional menu. userId not found in directory or is guest: " + requestMsg.toString());
- }
- else if (adminRolesService.isSuperAdmin(user))
- {
- logger.debug(EELFLoggerDelegate.debugLogger, "FunctionalMenuHandler: SuperUser, about to call getFunctionalMenuItems()");
- menuItems = functionalMenuService.getFunctionalMenuItems();
- }
- else
- {
- logger.debug(EELFLoggerDelegate.debugLogger, "getMenuItemsForAuthUser: about to call getFunctionalMenuItemsForUser()");
- menuItems = functionalMenuService.getFunctionalMenuItemsForUser(requestMsg.getUserId());
- }
-
- if ( menuItems != null )
- {
- String functionalMenuJsonString = new Gson().toJson(menuItems);
- logger.debug(EELFLoggerDelegate.debugLogger, "returning functional menu : " + functionalMenuJsonString);
- returnMsg.putMsgId(requestMsg.getMsgId()); // echo tells requester this is a response
- returnMsg.putPayload(functionalMenuJsonString);
- } else {
- returnMsg.putMsgId(requestMsg.getMsgId()); // echo tells requester this is a response
- returnMsg.putPayload("Error: Not found for userId = " + requestMsg.getUserId());
- }
- }
-
- try {
- UebManager.getInstance().publishReplyEP(returnMsg, requestMsg.getSourceTopicName());
- } catch (UebException e) {
- logger.error(EELFLoggerDelegate.errorLogger, "UebException occurred while responding to the Ueb message, Details:" + EcompPortalUtils.getStackTrace(e));
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while responding to the Ueb message, Details:" + EcompPortalUtils.getStackTrace(e));
- }
-
- return true;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/uebhandler/InitUebHandler.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/uebhandler/InitUebHandler.java
deleted file mode 100644
index b8289538..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/uebhandler/InitUebHandler.java
+++ /dev/null
@@ -1,75 +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.uebhandler;
-
-import java.util.concurrent.ConcurrentLinkedQueue;
-
-import javax.annotation.PostConstruct;
-
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.openecomp.portalsdk.core.onboarding.crossapi.PortalApiConstants;
-import org.openecomp.portalsdk.core.onboarding.crossapi.PortalApiProperties;
-import org.openecomp.portalsdk.core.onboarding.ueb.UebManager;
-import org.openecomp.portalsdk.core.onboarding.ueb.UebMsg;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.EnableAspectJAutoProxy;
-
-//
-// Adding this class for the sole purpose of insuring that the MainUebHandler really
-// honors @Async and kicks off a thread. For more info google @Async and read about
-// @Async only working if called from different class.
-//
-//@Configuration
-//@EnableAspectJAutoProxy
-//@EPMetricsLog
-public class InitUebHandler {
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(InitUebHandler.class);
-
- //@Autowired
- MainUebHandler mainUebHandler;
-
- public InitUebHandler() {
-
- }
-
- //@PostConstruct
- public void initUeb() {
-
- try {
- String enableListenerThread = PortalApiProperties.getProperty(PortalApiConstants.UEB_LISTENERS_ENABLE);
- if (enableListenerThread.equalsIgnoreCase("true")) {
- ConcurrentLinkedQueue<UebMsg> inboxQueue = new ConcurrentLinkedQueue<UebMsg>();
- UebManager.getInstance().initListener(inboxQueue);
- mainUebHandler.runHandler(inboxQueue);
- logger.info(EELFLoggerDelegate.errorLogger, "Returned from initiating mainUebHandler...");
- }
- else {
- logger.info(EELFLoggerDelegate.errorLogger, "Not starting UEB listening thread because ueb_listeners_enable is not set to true in the properties file.");
- }
- }
- catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- logger.info(EELFLoggerDelegate.errorLogger, "Not starting UEB listening thread because property could not be read " + PortalApiConstants.UEB_LISTENERS_ENABLE + e.getMessage());
- }
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/uebhandler/MainUebHandler.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/uebhandler/MainUebHandler.java
deleted file mode 100644
index de085419..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/uebhandler/MainUebHandler.java
+++ /dev/null
@@ -1,115 +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.uebhandler;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.concurrent.ConcurrentLinkedQueue;
-
-import org.openecomp.portalapp.portal.ueb.EPUebMsgTypes;
-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.onboarding.ueb.UebMsg;
-import org.openecomp.portalsdk.core.onboarding.ueb.UebMsgTypes;
-import org.slf4j.MDC;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.scheduling.annotation.Async;
-import org.springframework.stereotype.Component;
-
-import com.att.eelf.configuration.Configuration;
-
-
-//-------------------------------------------------------------------------
-// Listens for received UEB messages and handles the messages
-//
-// Note: To implement a synchronous reply call getMsgId on the request
-// and putMsgId on the reply (echoing the request MsgId).
-//
-//-------------------------------------------------------------------------
-@Component("MainUebHandler")
-public class MainUebHandler
-{
- final DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MainUebHandler.class);
-
- ConcurrentLinkedQueue<UebMsg> inboxQueue = null;
-
- @Autowired
- FunctionalMenuHandler funcMenuHandler;
-
- @Autowired
- WidgetNotificationHandler widgetNotificationHandler;
-
- @Async
- public void runHandler(ConcurrentLinkedQueue<UebMsg> queue)
- {
- inboxQueue = queue;
- logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "==> MainUebHandler started");
- while (true)
- {
- UebMsg msg = null;
- while ((msg = inboxQueue.poll()) != null)
- {
- if ((msg.getMsgType() != null) && (!msg.getMsgType().equalsIgnoreCase(EPUebMsgTypes.UEB_MSG_TYPE_HEALTH_CHECK)))
- {
- // TODO: switch this back to debug
- logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== Received UEB message : " + msg.toString());
- logger.info(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== Received UEB message : " + msg.toString());
- MDC.put(EPSystemProperties.PARTNER_NAME, msg.getSourceTopicName());
- MDC.put(Configuration.MDC_SERVICE_NAME, msg.getMsgType().toString());
- switch(msg.getMsgType())
- {
- case UebMsgTypes.UEB_MSG_TYPE_GET_FUNC_MENU:
- {
- funcMenuHandler.getFunctionalMenu(msg);
- break;
- }
- case UebMsgTypes.UEB_MSG_TYPE_WIDGET_NOTIFICATION:
- {
- widgetNotificationHandler.handleWidgetNotification(msg);
- break;
- }
- default:
- {
- logger.info(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "Unknown UEB message type " + msg.toString());
- break;
- }
- }
- }
- }
-
- if (Thread.interrupted())
- {
- logger.info(EELFLoggerDelegate.errorLogger, "==> UebMainHandler exiting");
- break;
- }
-
- try {
- Thread.sleep(10);
- } catch (InterruptedException e) {
- logger.error(EELFLoggerDelegate.errorLogger, "UebMainHandler interrupted during sleep" + EcompPortalUtils.getStackTrace(e));
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred during sleep" + EcompPortalUtils.getStackTrace(e));
- }
- }
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/uebhandler/WidgetNotificationHandler.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/uebhandler/WidgetNotificationHandler.java
deleted file mode 100644
index a066b124..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/uebhandler/WidgetNotificationHandler.java
+++ /dev/null
@@ -1,93 +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.uebhandler;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.List;
-
-import org.openecomp.portalapp.portal.domain.EPApp;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
-import org.openecomp.portalapp.portal.service.EPAppService;
-import org.openecomp.portalapp.portal.service.SearchService;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-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.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.EnableAspectJAutoProxy;
-import org.springframework.scheduling.annotation.Async;
-import org.springframework.stereotype.Component;
-
-@Component
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPMetricsLog
-public class WidgetNotificationHandler {
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WidgetNotificationHandler.class);
-
- final DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
-
- @Autowired
- EPAppService appSvc;
-
- @Autowired
- SearchService searchSvc;
-
-
- public WidgetNotificationHandler()
- {
- }
-
- @Async
- public void handleWidgetNotification(UebMsg requestMsg)
- {
- if (requestMsg.getUserId() != null) {
- logger.debug(EELFLoggerDelegate.debugLogger, "handleWidgetNotification: getting widgets/apps for user = " + requestMsg.getUserId());
- EPUser user = searchSvc.searchUserByUserId(requestMsg.getUserId());
- if (user != null && (appSvc != null)) {
- logger.debug(EELFLoggerDelegate.debugLogger, "Debug mytag: " + appSvc);
- List<EPApp> apps = appSvc.getUserApps(user);
- for (EPApp app : apps) {
- if (app.getUebTopicName() != null) {
- UebMsg widgetMsg = new UebMsg();
- widgetMsg.putSourceTopicName(app.getUebTopicName());
- logger.debug(EELFLoggerDelegate.debugLogger, "app.getUebTopicName was invoked");
- widgetMsg.putPayload(requestMsg.getPayload());
- try {
- logger.debug(EELFLoggerDelegate.debugLogger, "Sending widget notification from " + requestMsg.getSourceTopicName() + " to " + app.getUebTopicName());
- UebManager.getInstance().publishEP(widgetMsg, app.getUebTopicName());
- } catch (UebException e) {
- logger.error(EELFLoggerDelegate.errorLogger, "handleWidgetNotification publishEP exception" + EcompPortalUtils.getStackTrace(e));
- }
- }
- }
- } else {
- logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "handleWidgetNotification: user " +
- requestMsg.getUserId() + " not found" + " source = " + requestMsg.getSourceTopicName() +
- ". This widget notification cannot be posted to other widgets");
- }
- }
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/util/EPUserUtils.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/util/EPUserUtils.java
deleted file mode 100644
index 0b79a2b4..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/util/EPUserUtils.java
+++ /dev/null
@@ -1,308 +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.util;
-
-import java.io.Serializable;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.UUID;
-
-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.utils.EcompPortalUtils;
-import org.openecomp.portalsdk.core.FusionObject;
-import org.openecomp.portalsdk.core.domain.RoleFunction;
-import org.openecomp.portalsdk.core.domain.UrlsAccessible;
-import org.openecomp.portalsdk.core.exception.SessionExpiredException;
-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 implements Serializable, FusionObject {
- private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EPUserUtils.class);
-
- public static final String KEY_USER_ROLES_CACHE = "userRoles";
-
- public static final String WJ_HEADER_USER_NAME = "iv-user";
- public static final String WJ_HEADER_USER_GROUP = "iv-groups";
-
- private static DataAccessService dataAccessService;
-
- private static final long serialVersionUID = 1L;
-
- 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));
- }
-
- @SuppressWarnings("rawtypes")
- public static void setUserSession(HttpServletRequest request, EPUser user, Set applicationMenuData,
- Set businessDirectMenuData, String loginMethod) {
- HttpSession session = request.getSession(true);
-
- EPUserUtils.clearUserSession(request); // let's clear the current user
- // session to avoid any
- // conflicts during the set
-
- session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
-
- 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());
- session.setAttribute(SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME), "My Portal");
- 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));
- }
-
- public 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));
- }
-
- @SuppressWarnings({ "rawtypes", "unchecked" })
- public 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;
- }
-
- @SuppressWarnings("rawtypes")
- public static HashMap getRoles(HttpServletRequest request) {
- HashMap roles = null;
-
- // HttpSession session = request.getSession();
- 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),
- getAllUserRoles(user));
- }
-
- return roles;
- }
-
- @SuppressWarnings({ "rawtypes", "unchecked" })
- public 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);
- }
- }
-
- return roles;
- }
-
- @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);
- }
- }
- }
-
- }
-
- @SuppressWarnings({ "unchecked", "rawtypes", "unused" })
- public static boolean isUrlAccessible(HttpServletRequest request, String currentUrl) {
- boolean isAccessible = false;
-
- Map params = new HashMap();
- params.put("current_url", currentUrl);
-
- List list = getDataAccessService().executeNamedQuery("restrictedUrls", params, null);
-
- // loop through the list of restricted URL's
- if (list != null && list.size() > 0) {
- for (int i = 0; i < list.size(); i++) {
- /*
- * Object[] restrictedUrl = (Object[])list.get(i);
- *
- * String url = (String)restrictedUrl[0]; String functionCd =
- * (String)restrictedUrl[1];
- */
- UrlsAccessible urlFunctions = (UrlsAccessible) list.get(i);
-
- String url = (String) urlFunctions.getUrl();
- String functionCd = (String) urlFunctions.getFunctionCd();
-
- if (EPUserUtils.isAccessible(request, functionCd)) {
- isAccessible = true;
- }
- }
- return isAccessible;
- }
-
- return true;
- }
-
- public static boolean hasRole(HttpServletRequest request, String roleKey) {
- return getRoles(request).keySet().contains(new Long(roleKey));
- }
-
- public static boolean hasRole(EPUser user, String roleKey) {
- return getAllUserRoles(user).keySet().contains(new Long(roleKey));
- }
-
- public static boolean isAccessible(HttpServletRequest request, String functionKey) {
- return getRoleFunctions(request).contains(functionKey);
- }
-
- public static DataAccessService getDataAccessService() {
- return dataAccessService;
- }
-
- @Autowired
- public void setDataAccessService(DataAccessService dataAccessService) {
- EPUserUtils.dataAccessService = dataAccessService;
- }
-
- public static int getUserId(HttpServletRequest request) {
- return getUserIdAsLong(request).intValue();
- }
-
- 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;
- }
-
- 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);
- }
-
- 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 "";
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/util/SessionCookieUtil.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/util/SessionCookieUtil.java
deleted file mode 100644
index 69fc9b21..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/util/SessionCookieUtil.java
+++ /dev/null
@@ -1,129 +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.util;
-
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-
-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.onboarding.crossapi.PortalApiConstants;
-import org.openecomp.portalsdk.core.onboarding.crossapi.PortalTimeoutHandler;
-import org.openecomp.portalsdk.core.util.CipherUtil;
-import org.openecomp.portalsdk.core.util.SystemProperties;
-import org.openecomp.portalsdk.core.web.support.AppUtils;
-
-public class SessionCookieUtil {
-
- //private static final String JSESSIONID = "JSESSIONID";
- private static final String EP_SERVICE = "EPService";
- private static final String USER_ID = "UserId";
- private static Integer cookieMaxAge = -1;
- private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SessionCookieUtil.class);
-
- public static void preSetUp(HttpServletRequest request,
- HttpServletResponse response) {
- initateSessionMgtHandler(request);
- //set up EPService cookie
- setUpEPServiceCookie(request, response);
- }
-
- public static void setUpEPServiceCookie(HttpServletRequest request,
- HttpServletResponse response) {
- String jSessionId = getJessionId(request);
- Cookie cookie1 = new Cookie(EP_SERVICE, jSessionId);
- cookie1.setMaxAge(cookieMaxAge);
- cookie1.setDomain(EPSystemProperties.getProperty(EPSystemProperties.COOKIE_DOMAIN));
- cookie1.setPath("/");
- response.addCookie(cookie1);
- }
-
- public static void setUpUserIdCookie(HttpServletRequest request,
- HttpServletResponse response,String userId) throws Exception {
- logger.info("************** session cookie util set up UserId cookie begins");
- userId = CipherUtil.encrypt(userId,
- SystemProperties.getProperty(SystemProperties.Decryption_Key));
- Cookie cookie1 = new Cookie(USER_ID, userId);
- cookie1.setMaxAge(cookieMaxAge);
- cookie1.setDomain(EPSystemProperties.getProperty(EPSystemProperties.COOKIE_DOMAIN));
- cookie1.setPath("/");
- response.addCookie(cookie1);
- logger.info("************** session cookie util set up EP cookie completed");
- }
-
- public static String getUserIdFromCookie(HttpServletRequest request,
- HttpServletResponse response) throws Exception {
- String userId = "";
- Cookie[] cookies = request.getCookies();
- Cookie userIdcookie = null;
- if (cookies != null)
- for (Cookie cookie : cookies)
- if (cookie.getName().equals(USER_ID))
- userIdcookie = cookie;
- if(userIdcookie!=null){
- userId = CipherUtil.decrypt(userIdcookie.getValue(),
- SystemProperties.getProperty(SystemProperties.Decryption_Key));
- }
-
- logger.info("************** session cookie util set up EP cookie completed");
- return userId;
- }
-
- public static String getJessionId(HttpServletRequest request){
-
- return request.getSession().getId();
- /*
- Cookie ep = WebUtils.getCookie(request, JSESSIONID);
- if(ep==null){
- return request.getSession().getId();
- }
- return ep.getValue();
- */
- }
-
- protected static void initateSessionMgtHandler(HttpServletRequest request) {
- String jSessionId = getJessionId(request);
- storeMaxInactiveTime(request);
- PortalTimeoutHandler.sessionCreated(jSessionId, jSessionId, AppUtils.getSession(request));
- }
-
- protected static void storeMaxInactiveTime(HttpServletRequest request) {
- HttpSession session = AppUtils.getSession(request);
- if(session.getAttribute(PortalApiConstants.GLOBAL_SESSION_MAX_IDLE_TIME) == null)
- session.setAttribute(PortalApiConstants.GLOBAL_SESSION_MAX_IDLE_TIME,session.getMaxInactiveInterval());
- }
-
- public static void resetSessionMaxIdleTimeOut(HttpServletRequest request) {
- try {
- HttpSession session = AppUtils.getSession(request);
- final Object maxIdleAttribute = session.getAttribute(PortalApiConstants.GLOBAL_SESSION_MAX_IDLE_TIME);
- if(session != null && maxIdleAttribute != null) {
- session.setMaxInactiveInterval(Integer.parseInt(maxIdleAttribute.toString()));
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Could not reset the session timeout. Details: " + EcompPortalUtils.getStackTrace(e));
- }
-
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/resources/cache.ccf b/ecomp-portal-BE/src/main/resources/cache.ccf
deleted file mode 100644
index 6f5c6f92..00000000
--- a/ecomp-portal-BE/src/main/resources/cache.ccf
+++ /dev/null
@@ -1,30 +0,0 @@
-# DEFAULT CACHE REGION
-jcs.default=DC
-jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
-jcs.default.cacheattributes.MaxObjects=1000
-jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
-jcs.default.elementattributes=org.apache.jcs.engine.ElementAttributes
-jcs.default.elementattributes.IsEternal=true
-jcs.default.elementattributes.IsSpool=true
-
-
-# MEMORY SHRINKING CONFIGURATION (Commented)
-#jcs.default.cacheattributes.UseMemoryShrinker=true
-#jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=3600
-#jcs.default.cacheattributes.ShrinkerIntervalSeconds=60
-#jcs.default.cacheattributes.MaxSpoolPerRun=500
-#jcs.default.elementattributes=org.apache.jcs.engine.ElementAttributes
-#jcs.default.elementattributes.IsEternal=false
-
-
-# AUXILLARY CACHE CONFIGURATION
-jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
-jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
-jcs.auxiliary.DC.attributes.DiskPath=c:/projects/fusion/war/WEB-INF/cache
-
-
-# PRE-DEFINED REGION FOR LOOKUP DATA
-jcs.region.lookUpObjectCache=DC
-jcs.region.lookUpObjectCache.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
-jcs.region.lookUpObjectCache.cacheattributes.MaxObjects=4000
-jcs.region.lookUpObjectCache.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
diff --git a/ecomp-portal-BE/src/main/resources/logback.xml b/ecomp-portal-BE/src/main/resources/logback.xml
deleted file mode 100644
index 0c0d7647..00000000
--- a/ecomp-portal-BE/src/main/resources/logback.xml
+++ /dev/null
@@ -1,285 +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 xml>
-<configuration scan="true" scanPeriod="3 seconds" debug="true">
- <!-- Log-back files for the ECOMP Portal "ecompportal" are created in directory
- ${catalina.base}/logs/ecompportal; e.g., apache-tomcat-8.0.35/logs/ecompportal/application.log -->
- <!--<jmxConfigurator /> -->
-
- <!-- specify the component name -->
- <property name="componentName" value="ecompportal"></property>
-
- <!-- specify the base path of the log directory -->
- <property name="logDirPrefix" value="${catalina.base}/logs"></property>
-
- <!-- The directories where logs are written -->
- <property name="logDirectory" value="${logDirPrefix}/${componentName}" />
- <!-- Can easily relocate debug logs by modifying this path. -->
- <property name="debugLogDirectory" value="${logDirPrefix}/${componentName}" />
-
- <!-- log file names -->
- <property name="generalLogName" value="application" />
- <property name="errorLogName" value="error" />
- <property name="metricsLogName" value="metrics" />
- <property name="auditLogName" value="audit" />
- <property name="debugLogName" value="debug" />
- <!-- These loggers are not used in code (yet). <property name="securityLogName"
- value="security" /> <property name="policyLogName" value="policy" /> <property
- name="performanceLogName" value="performance" /> <property name="serverLogName"
- value="server" /> -->
-
- <!-- ServerFQDN=Server, -->
- <property name="auditLoggerPattern"
- value="%X{AuditLogBeginTimestamp}|%X{AuditLogEndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{Timer}|%X{ServerFQDN}|%X{ClientIPAddress}|%X{ClassName}|%X{Unused}|%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}| %msg%n" />
-
- <property name="metricsLoggerPattern"
- value="%X{MetricsLogBeginTimestamp}|%X{MetricsLogEndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{Timer}|%X{ServerFQDN}|%X{ClientIPAddress}|%X{ClassName}|%X{Unused}|%X{ProcessKey}|%X{TargetVisualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}| %msg%n" />
-
- <property name="errorLoggerPattern"
- value="%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{ClassName}|%X{AlertSeverity}|%X{ErrorCode}|%X{ErrorDescription}| %msg%n" />
-
- <property name="defaultLoggerPattern"
- value="%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%thread|%X{ClassName}| %msg%n" />
-
- <!-- use %class so library logging calls yield their class name -->
- <property name="applicationLoggerPattern"
- value="%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%thread|%class{36}| %msg%n" />
-
- <!--
- <property name="defaultPattern"
- value="%date{ISO8601}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Timer}| %msg%n" />
- <property name="debugLoggerPattern"
- value="%date{ISO8601}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Timer}| %msg%n" />
- -->
- <!-- <property name="debugLoggerPattern" value="%date{ISO8601}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{Timer}|[%caller{3}]|%msg%n"
- /> -->
- <!-- Example evaluator filter applied against console appender -->
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <encoder>
- <pattern>${applicationLoggerPattern}</pattern>
- </encoder>
- </appender>
-
- <!-- ============================================================================ -->
- <!-- EELF Appenders -->
- <!-- ============================================================================ -->
-
- <!-- The EELFAppender is used to record events to the general application
- log -->
-
-
- <appender name="EELF"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logDirectory}/${generalLogName}.log</file>
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <!-- daily rollover -->
- <fileNamePattern>${logDirectory}/${generalLogName}.log.%d{yyyy-MM-dd}.zip
- </fileNamePattern>
- <maxHistory>30</maxHistory>
- </rollingPolicy>
- <encoder>
- <pattern>${applicationLoggerPattern}</pattern>
- </encoder>
- <filter class="org.openecomp.portalapp.portal.utils.CustomLoggingFilter" />
- </appender>
-
- <appender name="asyncEELF" class="ch.qos.logback.classic.AsyncAppender">
- <queueSize>256</queueSize>
- <!-- Class name is part of caller data -->
- <includeCallerData>true</includeCallerData>
- <appender-ref ref="EELF" />
- </appender>
-
- <!-- EELF Security Appender. This appender is used to record security events
- to the security log file. Security events are separate from other loggers
- in EELF so that security log records can be captured and managed in a secure
- way separate from the other logs. This appender is set to never discard any
- events. -->
- <!-- <appender name="EELFSecurity" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logDirectory}/${securityLogName}.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <fileNamePattern>${logDirectory}/${securityLogName}.%i.log.zip </fileNamePattern>
- <minIndex>1</minIndex> <maxIndex>9</maxIndex> </rollingPolicy> <triggeringPolicy
- class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> <maxFileSize>5MB</maxFileSize>
- </triggeringPolicy> <encoder> <pattern>${defaultPattern}</pattern> </encoder>
- </appender> <appender name="asyncEELFSecurity" class="ch.qos.logback.classic.AsyncAppender">
- <queueSize>256</queueSize> <discardingThreshold>0</discardingThreshold> <appender-ref
- ref="EELFSecurity" /> </appender> -->
-
- <!-- EELF Performance Appender. This appender is used to record performance
- records. -->
- <!-- <appender name="EELFPerformance" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logDirectory}/${performanceLogName}.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <fileNamePattern>${logDirectory}/${performanceLogName}.%i.log.zip </fileNamePattern>
- <minIndex>1</minIndex> <maxIndex>9</maxIndex> </rollingPolicy> <triggeringPolicy
- class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> <maxFileSize>5MB</maxFileSize>
- </triggeringPolicy> <encoder> <outputPatternAsHeader>true</outputPatternAsHeader>
- <pattern>${defaultPattern}</pattern> </encoder> </appender> <appender name="asyncEELFPerformance"
- class="ch.qos.logback.classic.AsyncAppender"> <queueSize>256</queueSize>
- <appender-ref ref="EELFPerformance" /> </appender> -->
-
- <!-- EELF Server Appender. This appender is used to record Server related
- logging events. The Server logger and appender are specializations of the
- EELF application root logger and appender. This can be used to segregate
- Server events from other components, or it can be eliminated to record these
- events as part of the application root log. -->
- <!-- <appender name="EELFServer" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logDirectory}/${serverLogName}.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <fileNamePattern>${logDirectory}/${serverLogName}.%i.log.zip </fileNamePattern>
- <minIndex>1</minIndex> <maxIndex>9</maxIndex> </rollingPolicy> <triggeringPolicy
- class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> <maxFileSize>5MB</maxFileSize>
- </triggeringPolicy> <encoder> <pattern>${defaultPattern}</pattern> </encoder>
- </appender> <appender name="asyncEELFServer" class="ch.qos.logback.classic.AsyncAppender">
- <queueSize>256</queueSize> <appender-ref ref="EELFServer" /> </appender> -->
-
- <!-- EELF Policy Appender. This appender is used to record Policy engine
- related logging events. The Policy logger and appender are specializations
- of the EELF application root logger and appender. This can be used to segregate
- Policy engine events from other components, or it can be eliminated to record
- these events as part of the application root log. -->
- <!-- <appender name="EELFPolicy" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logDirectory}/${policyLogName}.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <fileNamePattern>${logDirectory}/${policyLogName}.%i.log.zip </fileNamePattern>
- <minIndex>1</minIndex> <maxIndex>9</maxIndex> </rollingPolicy> <triggeringPolicy
- class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> <maxFileSize>5MB</maxFileSize>
- </triggeringPolicy> <encoder> <pattern>${defaultPattern}</pattern> </encoder>
- </appender> <appender name="asyncEELFPolicy" class="ch.qos.logback.classic.AsyncAppender">
- <queueSize>256</queueSize> <appender-ref ref="EELFPolicy" /> </appender> -->
-
- <!-- EELF Audit Appender. This appender is used to record audit engine related
- logging events. The audit logger and appender are specializations of the
- EELF application root logger and appender. This can be used to segregate
- Policy engine events from other components, or it can be eliminated to record
- these events as part of the application root log. -->
-
- <appender name="EELFAudit"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logDirectory}/${auditLogName}.log</file>
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <!-- daily roll over -->
- <fileNamePattern>${logDirectory}/${auditLogName}.log.%d{yyyy-MM-dd}.zip
- </fileNamePattern>
- <maxHistory>30</maxHistory>
- </rollingPolicy>
- <encoder>
- <pattern>${auditLoggerPattern}</pattern>
- </encoder>
- </appender>
- <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender">
- <queueSize>256</queueSize>
- <appender-ref ref="EELFAudit" />
- </appender>
-
- <appender name="EELFMetrics"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logDirectory}/${metricsLogName}.log</file>
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <!-- daily roll over -->
- <fileNamePattern>${logDirectory}/${metricsLogName}.log.%d{yyyy-MM-dd}.zip
- </fileNamePattern>
- <maxHistory>30</maxHistory>
- </rollingPolicy>
- <encoder>
- <pattern>${metricsLoggerPattern}</pattern>
- </encoder>
- </appender>
-
-
- <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender">
- <queueSize>256</queueSize>
- <appender-ref ref="EELFMetrics" />
- </appender>
-
- <appender name="EELFError"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logDirectory}/${errorLogName}.log</file>
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <!-- daily roll over -->
- <fileNamePattern>${logDirectory}/${errorLogName}.log.%d{yyyy-MM-dd}.zip
- </fileNamePattern>
- <maxHistory>30</maxHistory>
- </rollingPolicy>
- <encoder>
- <pattern>${errorLoggerPattern}</pattern>
- </encoder>
- </appender>
-
- <appender name="asyncEELFError" class="ch.qos.logback.classic.AsyncAppender">
- <queueSize>256</queueSize>
- <appender-ref ref="EELFError" />
- </appender>
-
- <appender name="EELFDebug"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${debugLogDirectory}/${debugLogName}.log</file>
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <!-- daily roll over -->
- <fileNamePattern>${logDirectory}/${debugLogName}.log.%d{yyyy-MM-dd}.zip
- </fileNamePattern>
- <maxHistory>30</maxHistory>
- </rollingPolicy>
- <encoder>
- <pattern>${defaultLoggerPattern}</pattern>
- </encoder>
- </appender>
-
- <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender">
- <queueSize>256</queueSize>
- <appender-ref ref="EELFDebug" />
- <includeCallerData>true</includeCallerData>
- </appender>
-
-
- <!-- ============================================================================ -->
- <!-- EELF loggers -->
- <!-- ============================================================================ -->
- <logger name="com.att.eelf" level="info" additivity="false">
- <appender-ref ref="asyncEELF" />
- </logger>
-
- <!-- <logger name="com.att.eelf.security" level="info" additivity="false">
- <appender-ref ref="asyncEELFSecurity" /> </logger> <logger name="com.att.eelf.perf"
- level="info" additivity="false"> <appender-ref ref="asyncEELFPerformance"
- /> </logger> <logger name="com.att.eelf.server" level="info" additivity="false">
- <appender-ref ref="asyncEELFServer" /> </logger> <logger name="com.att.eelf.policy"
- level="info" additivity="false"> <appender-ref ref="asyncEELFPolicy" /> </logger> -->
-
- <logger name="com.att.eelf.audit" level="info" additivity="false">
- <appender-ref ref="asyncEELFAudit" />
- </logger>
-
- <logger name="com.att.eelf.metrics" level="info" additivity="false">
- <appender-ref ref="asyncEELFMetrics" />
- </logger>
-
- <logger name="com.att.eelf.error" level="info" additivity="false">
- <appender-ref ref="asyncEELFError" />
- </logger>
-
- <logger name="com.att.eelf.debug" level="debug" additivity="false">
- <appender-ref ref="asyncEELFDebug" />
- </logger>
-
- <root level="INFO">
- <appender-ref ref="asyncEELF" />
- </root>
-
-</configuration>
diff --git a/ecomp-portal-BE/src/main/resources/openid-connect.properties b/ecomp-portal-BE/src/main/resources/openid-connect.properties
deleted file mode 100644
index 79d3b9b4..00000000
--- a/ecomp-portal-BE/src/main/resources/openid-connect.properties
+++ /dev/null
@@ -1,22 +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.
-# ================================================================================
-###
-authentication_server_url = http://localhost:8383/openid-connect-server-webapp/
-ecomp_openid_connect_client = http://localhost:8080/ecompportal/openid_connect_login
-ecomp_redirect_uri = http://localhost:8080/ecompportal/welcome.htm
diff --git a/ecomp-portal-BE/src/main/resources/openid-keystore.jwks b/ecomp-portal-BE/src/main/resources/openid-keystore.jwks
deleted file mode 100644
index caad4aaa..00000000
--- a/ecomp-portal-BE/src/main/resources/openid-keystore.jwks
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "keys": [
- {
- "alg": "RSA256",
- "d": "GIW2b3-ig8rk-Pm3cD5VqRSxtKBJfNhuBCSNe1N6-_kGrk3M5MWgqEbJCzdoZz8M8fclE8sV11b9_-iQx2iVjaw77gHsGe-IUucSNEeW2VtvbpvgCklw-B3CathBMOuHzqCbafj-J6zJ9uxGUFhgUKkLWZJ1iSuIw7WfKoBx_jU",
- "e": "AQAB",
- "n": "qYJqXTXsDroPYyQBBmSolK3bJtrSerEm-nrmbSpfn8Rz3y3oXLydvUqj8869PkcEzoJIY5Xf7xDN1Co_qyT9qge-3C6DEwGVHXOwRoXRGQ_h50Vsh60MB5MIuDN188EeZnQ30dtCTBB9KDTSEA2DunplhwLCq4xphnMNUaeHdEk",
- "kty": "RSA",
- "kid": "rsa1"
- }
- ]
-}
diff --git a/ecomp-portal-BE/src/main/resources/portal.properties b/ecomp-portal-BE/src/main/resources/portal.properties
deleted file mode 100644
index a1982632..00000000
--- a/ecomp-portal-BE/src/main/resources/portal.properties
+++ /dev/null
@@ -1,44 +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.
-# ================================================================================
-###
-portal.api.impl.class = org.openecomp.portalsdk.core.onboarding.client.OnBoardingApiServiceImpl
-portal.api.prefix = /api
-max.idle.time = 5
-user.attribute.name = user_attribute
-
-# Global Log On for single sign on
-ecomp_redirect_url = https://localhost:8080/ecompportal/login.htm
-
-testing=testing
-
-# URL of the ECOMP Portal REST API
-ecomp_rest_url = http://localhost:8080/ecompportal/auxapi
-
-ueb_listeners_enable = true
-
-ueb_app_key = EkrqsjQqZt4ZrPh6
-ueb_app_secret = KDwJDKdiVVkaz6gIBlRbyxbk
-ueb_app_mailbox_name = ECOMP-PORTAL-INBOX-DEV-LOCAL
-
-ueb_url_list = todo_ueb_url
-ecomp_portal_inbox_name = ECOMP-PORTAL-INBOX-DEV-LOCAL
-
-# Consumer group name for UEB topic.
-# Use the special tag to generate a unique one for each sdk-app server.
-ueb_app_consumer_group_name = {UUID}
diff --git a/ecomp-portal-BE/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextRestClient.java b/ecomp-portal-BE/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextRestClient.java
deleted file mode 100644
index 3ea6fd59..00000000
--- a/ecomp-portal-BE/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextRestClient.java
+++ /dev/null
@@ -1,262 +0,0 @@
-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;
- }
-
-}
diff --git a/ecomp-portal-BE/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextRestControllerTest.java b/ecomp-portal-BE/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextRestControllerTest.java
deleted file mode 100644
index 6c0de97e..00000000
--- a/ecomp-portal-BE/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextRestControllerTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-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;
- }
-}
diff --git a/ecomp-portal-BE/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextTestProperties.java b/ecomp-portal-BE/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextTestProperties.java
deleted file mode 100644
index 593f3d0f..00000000
--- a/ecomp-portal-BE/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextTestProperties.java
+++ /dev/null
@@ -1,62 +0,0 @@
-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));
- }
-}
diff --git a/ecomp-portal-BE/src/test/java/org/openecomp/portalapp/portal/controller/shared-context-test.properties b/ecomp-portal-BE/src/test/java/org/openecomp/portalapp/portal/controller/shared-context-test.properties
deleted file mode 100644
index f81db022..00000000
--- a/ecomp-portal-BE/src/test/java/org/openecomp/portalapp/portal/controller/shared-context-test.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-
-hostname= localhost
-# port = 80
-secure = true
-appname = ecompportal
-restpath = context
-uebkey = xgnLrmNmkfCRnIwa
-username = Default
-password = AppPassword!1
diff --git a/ecomp-portal-BE/src/test/java/org/openecomp/portalapp/portal/listener/HealthMonitorTest.java b/ecomp-portal-BE/src/test/java/org/openecomp/portalapp/portal/listener/HealthMonitorTest.java
deleted file mode 100644
index 69959835..00000000
--- a/ecomp-portal-BE/src/test/java/org/openecomp/portalapp/portal/listener/HealthMonitorTest.java
+++ /dev/null
@@ -1,17 +0,0 @@
-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());
- }
-
-}
diff --git a/ecomp-portal-BE/src/test/java/org/openecomp/portalapp/portal/utils/EcompPortalUtilsTest.java b/ecomp-portal-BE/src/test/java/org/openecomp/portalapp/portal/utils/EcompPortalUtilsTest.java
deleted file mode 100644
index 5f07575b..00000000
--- a/ecomp-portal-BE/src/test/java/org/openecomp/portalapp/portal/utils/EcompPortalUtilsTest.java
+++ /dev/null
@@ -1,14 +0,0 @@
-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-BE/war/META-INF/MANIFEST.MF b/ecomp-portal-BE/war/META-INF/MANIFEST.MF
deleted file mode 100644
index 254272e1..00000000
--- a/ecomp-portal-BE/war/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,3 +0,0 @@
-Manifest-Version: 1.0
-Class-Path:
-
diff --git a/ecomp-portal-BE/war/WEB-INF/conf/cache.ccf b/ecomp-portal-BE/war/WEB-INF/conf/cache.ccf
deleted file mode 100644
index b8a2363d..00000000
--- a/ecomp-portal-BE/war/WEB-INF/conf/cache.ccf
+++ /dev/null
@@ -1,30 +0,0 @@
-# DEFAULT CACHE REGION
-jcs.default=DC
-jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
-jcs.default.cacheattributes.MaxObjects=1000
-jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
-jcs.default.elementattributes=org.apache.jcs.engine.ElementAttributes
-jcs.default.elementattributes.IsEternal=true
-jcs.default.elementattributes.IsSpool=true
-
-
-# MEMORY SHRINKING CONFIGURATION (Commented)
-#jcs.default.cacheattributes.UseMemoryShrinker=true
-#jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=3600
-#jcs.default.cacheattributes.ShrinkerIntervalSeconds=60
-#jcs.default.cacheattributes.MaxSpoolPerRun=500
-#jcs.default.elementattributes=org.apache.jcs.engine.ElementAttributes
-#jcs.default.elementattributes.IsEternal=false
-
-
-# AUXILLARY CACHE CONFIGURATION
-jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
-jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
-jcs.auxiliary.DC.attributes.DiskPath=fusion/cache
-
-
-# PRE-DEFINED REGION FOR LOOKUP DATA
-jcs.region.lookUpObjectCache=DC
-jcs.region.lookUpObjectCache.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
-jcs.region.lookUpObjectCache.cacheattributes.MaxObjects=4000
-jcs.region.lookUpObjectCache.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
diff --git a/ecomp-portal-BE/war/WEB-INF/conf/kpidash.properties b/ecomp-portal-BE/war/WEB-INF/conf/kpidash.properties
deleted file mode 100644
index eebfff76..00000000
--- a/ecomp-portal-BE/war/WEB-INF/conf/kpidash.properties
+++ /dev/null
@@ -1,22 +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.
-# ================================================================================
-###
-url.sectiona = kpi-dashboard/views/DCAE_DASH/dcae_locations.html
-url.sectionb = https://rtodo_url/mini.html?notebook=c131ea997453e75303588699936d1896
-url.geomapapiurl = https://todo_url:8080/dcae-services?vnfLocation=
diff --git a/ecomp-portal-BE/war/WEB-INF/conf/quartz.properties b/ecomp-portal-BE/war/WEB-INF/conf/quartz.properties
deleted file mode 100644
index f95f469f..00000000
--- a/ecomp-portal-BE/war/WEB-INF/conf/quartz.properties
+++ /dev/null
@@ -1,55 +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.
-# ================================================================================
-###
-#################################################################################
-# Quartz configurations for Quantum Work Flow #
-#################################################################################
-
-org.quartz.scheduler.instanceId = AUTO
-
-#################################################################################
-# Main configurations
-org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
-org.quartz.threadPool.threadCount = 30
-
-============================================================================
-# Configure JobStore
-#============================================================================
-
-org.quartz.jobStore.misfireThreshold = 60000
-
-org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
-org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-org.quartz.jobStore.useProperties = false
-#org.quartz.jobStore.dataSource = myDS
-org.quartz.jobStore.tablePrefix = FN_QZ_
-
-org.quartz.jobStore.isClustered = true
-org.quartz.jobStore.clusterCheckinInterval = 20000
-
-#============================================================================
-# Configure Datasources
-#============================================================================
-
-#org.quartz.dataSource.myDS.driver = com.mysql.jdbc.Driver
-#org.quartz.dataSource.myDS.URL = jdbc:mysql://localhost:3306/portal
-#org.quartz.dataSource.myDS.user = todo
-#org.quartz.dataSource.myDS.password = todo
-#org.quartz.dataSource.myDS.maxConnections = 5
-#org.quartz.dataSource.myDS.validationQuery=select 0 from dual
diff --git a/ecomp-portal-BE/war/WEB-INF/conf/raptor.properties b/ecomp-portal-BE/war/WEB-INF/conf/raptor.properties
deleted file mode 100644
index 0c32ef65..00000000
--- a/ecomp-portal-BE/war/WEB-INF/conf/raptor.properties
+++ /dev/null
@@ -1,185 +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.
-# ================================================================================
-###
-##C## Mention the name of the framework. At present RAPTOR supports FUSION
-system=fusion
-##C## Determines the priority for the debug message.
-debug_level=5
-##C## Determines the number of records can be downloaded in excel when you select "download all" option.
-download_limit=65000
-csv_download_limit=10
-##C## Determines the number of records to be displayed in a single page.
-default_page_size=50
-##C## Determines the list size in the form field.
-form_fields_list_size=99000
-##C## Determines the scheduler interval
-#scheduler_interval=0 => disabled
-scheduler_interval=0
-##C## System Name
-system_name=RAPTOR
-##C## This is used for Bread crumbs.
-base_title=ANALYSIS
-##C## whether to allow SQL-based report definition (security risk); super users are always allowed to create SQL-based reports
-allow_sql_based_reports=no
-##C## Determines whether to include disclaimer page at the bottom of each screen
-show_disclaimer=yes
-disclaimer_positioned_top_in_csvexcel=yes
-##C## Determines whether to display the form page as a separate page before running the report
-display_form_before_run=yes
-##C## Determines whether to include the form page on the report data page
-include_form_with_data=yes
-##C## Determines whether to cache chart data in the session => faster re-display if the data volume does not get too large
-cache_chart_data=yes
-##C## Determines whether to cache report data for the currently displayed page in the session => faster re-display
- ##C## if the data volume does not get too large
-cache_cur_page_data=yes
-##C## Determines Chart width
-default_chart_width=700
-##C## Determines Chart height
-default_chart_height=420
-##C## Determines whether to permit report deletion only by report owner or by everyone with "write" access
-delete_only_by_owner=yes
-##C## Determines whether to log each report execution and update time and user ID
-enable_report_log=yes
-##C## Determines whether to cache user roles info in memory (saves many DB reads, but does not account for roles
- ##C## assigned after the cache was loaded)
-cache_user_roles=yes
-##C## Determines whether to convert month formats (e.g. MM/YYYY) to the last day of the month (true) or
- ##C## first day (false) - like 12/2003 is converted to either 12/31/2003 or 12/01/2003
-month_format_use_last_day=no
-##C## Determines whether to print the report title in the download files
-print_title_in_download=yes
-##C## Determines whether to show report description when the report is run and in the quick links
-show_descr_at_runtime=no
-##C## Determines whether to skip labels on the Line chart axis when they overlap
-#DEPRECATED skip_chart_labels_to_fit=no
-##C## Determines whether to show chart types that are purpose and/or data specific
-show_nonstandard_charts=yes
-##C## Determines whether to allow the user to change the chart type at runtime
-allow_runtime_chart_sel=yes
-##C## Determines whether to display the report title as chart title as well
-display_chart_title=yes
-##C## Determines whether to merge/blank multi-level row headings in cross-tab report
-merge_crosstab_row_headings=yes
-##C## Determines whether to display chart when displaying the report at first or just a "Show Chart" button
-display_chart_by_default=yes
-##C## Determines whether to print the form field values in the download files
-print_params_in_download=yes
-##C## Determines the limitation to the characters in chart label.
-skip_chart_labels_limit=30
-##C## Determines whether to users with read-only rights for a report can copy it
-can_copy_on_read_only=yes
-##C## Determines the no of decimals to be displayed in Totals column
-#max_decimals_on_totals=-1 => don't truncate, display all decimal digits
-max_decimals_on_totals=2
-##C## Determines which JFreeChart to use.
-jfree_version=latest
-#jfree_version=0.9.11
-# Added this restriction so that heavily used system which contain
-# more than 1000 users can enable this feature not to display whole
-# users in the drop down menu
-display_all_users=yes
-##Sheet name
-sheet_name=raptor
-#shell_script_name=/home/sundar/test.sh
-#download_query_folder=/titan/PROJECT3/RAPTOR/raptor/dwnld/query/
-## this directory is mentioned if the flat file is downloaded using shell script
-shell_script_dir=/titan/PROJECT3/RAPTOR/raptor/dwnld/
-flat_file_lower_limit=1
-flat_file_upper_limit=200000
-## whatever request mentioned here would be parsed in sql and request parameter would be filled
-request_get_params=c_master,isEmbedded
-print_footer_in_download=yes
-## footer mentioned here appears in downloaded excel
-footer_first_line=AT&T Proprietary
-footer_second_line=Use Pursuant to Company Instructions
-## to run report in popup window
-report_in_popup_window=yes
-## to run each report in new popup window if the above is selected
-popup_in_new_window=yes
-## "Yes" allows the request param to be passed to the drill down report
-pass_request_param_in_drilldown=yes
-## Show PDF download icon
-show_pdf_download=yes
-# Show Folder Tree
-show_folder_tree=no
-#Show folder tree only for Admin Users
-show_folder_tree_only_to_admin_users=no
-#folder tree should be minimized
-folder_tree_minimized=yes
-## whatever session mentioned here would be parsed in sql and session parameter would be filled
-session_params=login_id
-display_formfield_info=yes
-customize_formfield_info=yes
-#schedule limit for end users
-schedule_limit=10
-# customized query if you need any restrictions for schedule and security tab for fusion
-#schedule_custom_query_for_users=getAllUsersByCustomer
-#schedule_custom_query_for_roles=getAllRolesByCustomer
-# customized query if you need any restrictions for schedule and security tab for prisms example
-#schedule_custom_query_for_users=SELECT au.user_id, au.first_name||' '||au.last_name user_name FROM app_user au order by 2
-schedule_custom_query_for_users=SELECT au.user_id id, au.first_name||' '||au.last_name name FROM app_user au where user_id = 1 order by 2
-#schedule_custom_query_for_roles=SELECT ar.role_id, ar.descr role_name FROM app_role ar order by 2
-schedule_date_pattern=MM/dd/yyyy hh:mm:ss a
-## This is used to display in right format in chart timestamp axis as we give in the sql
-#chart_yearly_format=yyyy
-#chart_monthly_format=MMM-yyyy
-#chart_daily_format=MM-dd-yyyy
-chart_hourly_format=MM/dd HH
-#chart_minute_format=HH:mm
-chart_minute_format=MM-dd-yyyy-HH:mm
-#chart_second_format=HH:mm:ss
-chart_second_format=MM-dd-yyyy
-#chart_millisecond_format=HH:mm:ss.S
-schedule_help_text=This form is used to schedule a specific Reporting Platform report to be delivered to one or more email addresses associated with your Company's Business Direct user logins. Note that report output delivered via email does not include the capability to drill down/back up to additional data levels. So, select the appropriate data level report for the scheduled report. View the status of scheduled report requests in the My Schedules menu item.
-use_loginid_in_schedYN=Y
-session_params_for_scheduling=login_id
-session_date_formfield_auto_incr=yes
-display_session_param_pdfexcel=login_id;Login Id
-session_params_for_displaying_in_scheduling=login_id;Login Id
-application_server=tomcat
-#gmap properties
-gmap_key=ABQIAAAAToJSSetKBMjBJx8MiRw4ghQiU0SbbKnm8C5eu25cpyLwgkLzyRShrQTbgZtqnKAqZU9JwcSq1bKwiA
-PROJECT-FOLDER=/Users/sundar/git/st_quantum/quantum/target/quantum-1.0
-#
-MARKET-SHAPEFILE-FOLDER=resources/files
-# output folder for files generated on server side
-OUTPUT-FOLDER=resources/temp
-# tile size in pixel
-TILE-SIZE=256
-#check if map is disabled or not
-map_allowed=Y
-max_drilldown_level=2
-admin_role_equiv_to_super_role=N
-show_loading_during_formfield_chain=Y
-show_print_icon=N
-globally_nowrap=N
-calendar_output_date_format=MM/dd/yyyy
-memory_threshold_percentage=99
-print_params_in_csv_download=yes
-notitle_in_dashboard=yes
-generate_store_sched_reports=yes
-show_excel_2007_download=yes
-print_excel_in_landscape=yes
-show_animated_chart_option=yes
-show_animated_chart_only=no
-adjust_content_based_on_height=yes
-custom_submit_button_text=Run Button
-customize_formfield_layout=yes
-db_type=postgresql
diff --git a/ecomp-portal-BE/war/WEB-INF/conf/raptor_app_fusion.properties b/ecomp-portal-BE/war/WEB-INF/conf/raptor_app_fusion.properties
deleted file mode 100644
index 09fe0cec..00000000
--- a/ecomp-portal-BE/war/WEB-INF/conf/raptor_app_fusion.properties
+++ /dev/null
@@ -1,36 +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.
-# ================================================================================
-###
-temp_folder_path=/Users/sundar/git/st_quantum/quantum/target/quantum-1.0/temp/
-upload_folder_path=/Users/sundar/git/st_quantum/quantum/target/quantum-1.0/files/
-excel_template_path=/Users/sundar/git/st_quantum/quantum/target/quantum-1.0/files/raptor_template/
-temp_folder_url=temp/
-upload_folder_url=upload/
-smtp_server=todo_url
-default_email_sender=dev-local@email.com
-error_page=error_page.jsp
-jsp_context_path=raptor/
-img_folder_url=static/fusion/raptor/images/
-base_folder_url=static/fusion/raptor/
-direct_access_url=http://localhost:8080/quantum/raptor_email_attachment.htm?action=raptor&source_page=report_run&display_content=y
-base_action_url=raptor.htm?action=
-base_action_param=c_master=
-super_role_id=1
-admin_role_ids=1
-quick_links_menu_ids=HOME,CUSTOMER,REPORTS
diff --git a/ecomp-portal-BE/war/WEB-INF/conf/raptor_db_fusion.properties b/ecomp-portal-BE/war/WEB-INF/conf/raptor_db_fusion.properties
deleted file mode 100644
index 497fa16d..00000000
--- a/ecomp-portal-BE/war/WEB-INF/conf/raptor_db_fusion.properties
+++ /dev/null
@@ -1,19 +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.
-# ================================================================================
-###
diff --git a/ecomp-portal-BE/war/WEB-INF/conf/raptor_pdf.properties b/ecomp-portal-BE/war/WEB-INF/conf/raptor_pdf.properties
deleted file mode 100644
index 548cf3bf..00000000
--- a/ecomp-portal-BE/war/WEB-INF/conf/raptor_pdf.properties
+++ /dev/null
@@ -1,49 +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.
-# ================================================================================
-###
-## pdf file specific properties
-pdf_data_font_size=9
-pdf_data_font_family=Arial
-#reduce the font size from html config
-pdf_data_font_size_offset=2
-pdf_data_alternate_color=true
-#data row background(white), alternate(light light blue/gray)
-pdf_data_background_alternate_hex_code=#EDEDED
-pdf_data_default_background_hex_code=#FFFFFF
-#header font (white) background (gray)
-pdf_data_table_header_font_hex_code=#FFFFFF
-pdf_data_table_header_background_hex_code=#8A9BB3
-#footer header
-pdf_footer_font_size=9
-pdf_footer_font_family=Arial
-pdf_att_proprietary=xxxx
-pdf_att_proprierary_font_size=7
-pdf_date_timezone=GMT
-pdf_date_pattern=MM/dd/yyyy hh:mm:ss a
-##page number position at 1 - footer middle, 0 -- header right, 2 - both
-pdf_page_number_position=1
-pdf_word_before_page_number=Page
-pdf_word_after_page_number=
-pdf_coverpage_firstcolumn_size=0.3
-pdf_image_auto_rotate=false
-display_create_owner_info=true
-#session_info=customer,customerId
-display_loginid_for_downloaded_by=false
-# please use false if you want landscape to be default.
-is_default_orientation_portrait=true
diff --git a/ecomp-portal-BE/war/WEB-INF/conf/sql.properties b/ecomp-portal-BE/war/WEB-INF/conf/sql.properties
deleted file mode 100644
index 954330d3..00000000
--- a/ecomp-portal-BE/war/WEB-INF/conf/sql.properties
+++ /dev/null
@@ -1,295 +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.
-# ================================================================================
-###
-#SQL Statements for PostgreSQL
-
-#ReportLoader.java
-
-load.custom.report.xml = SELECT cr.report_xml FROM cr_report cr WHERE rep_id=?::int
-
-db.update.report.xml = SELECT cr.rep_id, cr.report_xml FROM cr_report cr WHERE rep_id=? FOR UPDATE
-
-update.custom.report.rec = UPDATE cr_report SET title='[Utils.oracleSafe(rw.getReportName())]', descr='[Utils.oracleSafe(rw.getReportDescr())]', public_yn='[(rw.isPublic()]', menu_id='[rw.getMenuID()]', menu_approved_yn='[(rw.isMenuApproved()]', owner_id=[rw.getOwnerID()], maint_id=[rw.getUpdateID()], maint_date=TO_DATE('[rw.getUpdateDate()]', '[Globals.getOracleTimeFormat()]'), dashboard_type_yn='[(rw.isDashboardType()]', dashboard_yn= '[(rw.getReportType().equals(AppConstants.RT_DASHBOARD)]' WHERE rep_id = [rw.getReportID()]
-
-is.report.already.scheduled = select rep_id from cr_report_schedule where rep_id = ?::int
-
-create.custom.report.rec = INSERT INTO cr_report(rep_id, title, descr, public_yn, menu_id, menu_approved_yn, report_xml, owner_id, create_id, create_date, maint_id, maint_date, dashboard_type_yn, dashboard_yn, folder_id) VALUES([rw.getReportID()], '[Utils.oracleSafe(rw.getReportName())]', '[Utils.oracleSafe(rw.getReportDescr())]', '[rw.isPublic()]', '[rw.getMenuID()]', '[rw.isMenuApproved()]', '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>', [rw.getOwnerID()], [rw.getCreateID()], TO_DATE('[rw.getCreateDate()]', '[Globals.getOracleTimeFormat()]'), [rw.getUpdateID()], TO_DATE('[rw.getUpdateDate()]', '[Globals.getOracleTimeFormat()]'), '[rw.isDashboardType()]', '[rw.getReportType().equals(AppConstants.RT_DASHBOARD)]',[rw.getFolderId()])
-
-get.user.report.names = SELECT cr.rep_id, cr.title FROM cr_report cr WHERE coalesce(cr.owner_id, cr.create_id) = [userID]
-
-get.report.owner.id = SELECT coalesce(cr.owner_id, cr.create_id) AS owner FROM cr_report cr WHERE rep_id = ?::int
-
-delete.report.record.log = DELETE FROM cr_report_log WHERE rep_id = [reportID]
-
-delete.report.record.users = DELETE FROM cr_report_schedule_users WHERE rep_id = [reportID]
-
-delete.report.record.schedule = DELETE FROM cr_report_schedule WHERE rep_id = [reportID]
-
-delete.report.record.access = DELETE FROM cr_report_access WHERE rep_id = [reportID]
-
-delete.report.record.email = DELETE FROM cr_report_email_sent_log WHERE rep_id = [reportID]
-
-delete.report.record.favorite = DELETE FROM cr_favorite_reports WHERE rep_id = [reportID]
-
-delete.report.record.report = DELETE FROM cr_report WHERE rep_id = [reportID]
-
-load.quick.links = SELECT cr.rep_id, cr.title, cr.descr FROM (SELECT rep_id, MIN(read_only_yn) read_only_yn FROM ((SELECT ua.rep_id, ua.read_only_yn FROM cr_report_access ua WHERE ua.user_id = [userID]) UNION ALL (SELECT ra.rep_id, ra.read_only_yn FROM cr_report_access ra WHERE ra.role_id IN ([roleList.toString()]))) report_access GROUP BY rep_id) ra LEFT JOIN cr_report cr ON cr.rep_id = ra.rep_id WHERE cr.menu_id LIKE '%[nvls(menuId)]%' AND cr.menu_approved_yn = 'Y' AND (coalesce(cr.owner_id, cr.create_id) = [userID] OR cr.public_yn = 'Y' OR ra.read_only_yn IS NOT NULL) ORDER BY cr.title
-
-load.folder.reports = SELECT cr.rep_id, cr.rep_id report_id, [rep_title_sql] || CASE WHEN cr.public_yn = 'Y' THEN '' ELSE '[PRIVATE_ICON]' END||cr.title||'</a>' title, cr.descr, au.first_name||' '||au.last_name owner_name, TO_CHAR(cr.create_date, 'MM/DD/YYYY') create_date, CASE WHEN coalesce(cr.owner_id, cr.create_id) = [userID] THEN 'N' ELSE coalesce(ra.read_only_yn, 'Y') END read_only_yn, CASE WHEN coalesce(cr.owner_id, cr.create_id) = [userID] THEN 'Y' ELSE 'N' END user_is_owner_yn FROM cr_report cr JOIN app_user au ON coalesce(cr.owner_id, cr.create_id) = au.user_id AND cr.folder_id= '[folderId]' LEFT JOIN (SELECT rep_id, MIN(read_only_yn) read_only_yn FROM ((SELECT ua.rep_id, ua.read_only_yn FROM cr_report_access ua WHERE ua.user_id = [userID]) UNION ALL(SELECT ra.rep_id, ra.read_only_yn FROM cr_report_access ra WHERE ra.role_id IN ([roleList.toString()]))) report_access GROUP BY rep_id) ra ON cr.rep_id = ra.rep_id
-#If roleList.toString() is '' PostgreSQL returns an error - needs to be null instead of empty
-
-load.folder.reports.user = AND coalesce(cr.owner_id, cr.create_id) = [userID]
-
-load.folder.reports.publicsql = AND (coalesce(cr.owner_id, cr.create_id) = [userID] OR cr.public_yn = 'Y' OR ra.read_only_yn IS NOT NULL)
-
-load.quick.download.links = SELECT a.file_name, b.title,to_char(a.dwnld_start_time, 'Dy DD-Mon-YYYY HH24:MI:SS') as time, a.dwnld_start_time FROM cr_report_dwnld_log a, cr_report b where a.user_id = [userID] and a.rep_id = b.rep_id and (a.dwnld_start_time) >= to_date(to_char(now()- interval '1 day', 'mm/dd/yyyy'), 'mm/dd/yyyy') and a.record_ready_time is not null order by a.dwnld_start_time
-
-load.reports.to.schedule = SELECT cr.rep_id, Initcap(cr.title), cr.descr FROM cr_report cr LEFT OUTER JOIN (SELECT rep_id, MIN(read_only_yn) read_only_yn FROM ((SELECT ua.rep_id, ua.read_only_yn FROM cr_report_access ua WHERE ua.user_id = [userID]) UNION ALL (SELECT ra.rep_id, ra.read_only_yn FROM cr_report_access ra WHERE ra.role_id IN ([roleList.toString()]))) report_access GROUP BY rep_id) ra ON cr.rep_id = ra.rep_id AND (cr.public_yn = 'Y' OR ra.read_only_yn IS NOT NULL or cr.owner_id = [userID] )ORDER BY Initcap(cr.title)
-
-load.reports.to.add.in.dashboard = SELECT cr.rep_id, cr.title, cr.descr FROM cr_report cr LEFT OUTER JOIN (SELECT rep_id, MIN(read_only_yn) read_only_yn FROM ((SELECT ua.rep_id, ua.read_only_yn FROM cr_report_access ua WHERE ua.user_id = [userID]) UNION ALL (SELECT ra.rep_id, ra.read_only_yn FROM cr_report_access ra WHERE ra.role_id IN ([roleList.toString()]))) report_access GROUP BY rep_id) ra ON cr.rep_id = ra.rep_id AND (coalesce(cr.owner_id, cr.create_id) = [userID] OR cr.public_yn = 'Y' OR ra.read_only_yn IS NOT NULL) AND (cr.dashboard_yn = 'N' or cr.dashboard_yn is null) ORDER BY cr.title
-
-load.my.recent.links = select rep_id, title, descr, form_fields from ( select row_number() OVER () AS rnum, rep_id, title, descr, form_fields from (select cr.rep_id, cr.title, a.form_fields, cr.descr, a.log_time, a.user_id, a.action, a.action_value from cr_report_log a, cr_report cr where user_id = [userID] AND action = 'Report Execution Time' and a.rep_id = cr.rep_id order by log_time desc) AS x) AS y where rnum <= 6 AND rnum >= 1
-
-create.report.log.entry = INSERT INTO cr_report_log (rep_id, log_time, user_id, action, action_value, form_fields) VALUES([reportID], now(), [userID], '[action]' , '[executionTime]', '[form_fields]')
-
-create.report.log.entry.exec.time = INSERT INTO cr_report_log (rep_id, log_time, user_id, action, action_value, form_fields) VALUES([reportID], now()+'1 second', [userID], '[action]' , '[executionTime]', '[formFields]')
-
-clear.report.log.entries = DELETE FROM cr_report_log WHERE rep_id = ? and user_id = ?
-
-load.report.log.entries = SELECT x.log_time, x.user_id, (CASE WHEN x.action = 'Report Execution Time' THEN '<a href=\"[AppUtils.getRaptorActionURL()]report.run.container&c_master='||x.rep_id||'&'||x.form_fields||'&fromReportLog=Y&display_content=Y&noFormFields=Y&refresh=Y\">'||x.action||'</a>' ELSE x.action END) action, (CASE WHEN x.action = 'Report Execution Time' THEN action_value ELSE 'N/A' END) time_taken, (CASE WHEN x.action = 'Report Execution Time' THEN '<a href=\"[AppUtils.getRaptorActionURL()]report.run.container&c_master='||x.rep_id||'&'||x.form_fields||'&fromReportLog=Y&display_content=Y&noFormFields=Y&refresh=Y\"><img src=\"[AppUtils.getImgFolderURL()]test_run.gif\" width=\"12\" height=\"12\" border=0 alt=\"Run report\"/></a>' ELSE 'N/A' END) run_image, x.name FROM (SELECT rl.rep_id, TO_CHAR(rl.log_time, 'Month DD, YYYY HH:MI:SS AM') log_time, rl.action_value, fuser.last_name ||', '||fuser.first_name name, rl.user_id, rl.action, rl.form_fields FROM cr_report_log rl, fn_user fuser WHERE rl.rep_id = [nvls(reportId)] and rl.action != 'Report Run' and fuser.user_id = rl.user_id ORDER BY rl.log_time DESC) x WHERE LIMIT 100
-
-does.user.can.schedule.report = select crs.sched_user_id, count(*) from cr_report_schedule crs where sched_user_id = [userId] group by crs.sched_user_id having count(*) >= [Globals.getScheduleLimit()]
-
-does.user.can.schedule = select crs.schedule_id from cr_report_schedule crs where schedule_id = [scheduleId]
-
-get.system.date.time = select to_char(now(),'MM/dd/yyyy HH24:mi:ss')
-
-get.next.day.date.time = select to_char(now()+'1 day','MM/dd/yyyy HH24:mi:ss')
-
-get.next.fifteen.minutes.date.time = select to_char(now()+'15 min','MM/dd/yyyy HH24:mi:ss')
-
-get.next.thirty.minutes.date.time = select to_char(now()+'30 min','MM/dd/yyyy HH24:mi:ss')
-
-get.template.file = select template_file from cr_report_template_map where report_id = [reportId]
-
-load.pdf.img.lookup = select image_id, image_loc from cr_raptor_pdf_img
-
-load.action.img.lookup = select image_id, image_loc from cr_raptor_action_img
-
-
-#ActionHandler.java
-
-report.values.map.def.a = SELECT x FROM (SELECT DISTINCT
-
-report.values.map.def.b = TO_CHAR([colName], '[nvl(displayFormat, AppConstants.DEFAULT_DATE_FORMAT)]')
-
-report.values.map.def.c = [colName]
-
-report.values.map.def.d = x FROM [rdef.getTableById(tableId).getTableName()] WHERE [colName] IS NOT NULL ORDER BY 1) xx LIMIT <= [Globals.getDefaultPageSize()]
-
-test.sched.cond.popup = SELECT 1 WHERE EXISTS ([sql])
-
-download.all.email.sent = Select user_id, rep_id from CR_REPORT_EMAIL_SENT_LOG where gen_key='[pdfAttachmentKey.trim()]' and log_id =[report_email_sent_log_id.trim()] and (now() - sent_date) < '1 day' limit 1
-
-download.all.gen.key = select schedule_id from cr_report_email_sent_log u where U.GEN_KEY = '[pdfAttachmentKey]'
-
-download.all.retrieve = SELECT au.user_id FROM (SELECT rs.schedule_id, rs.rep_id FROM cr_report_schedule rs WHERE rs.enabled_yn='Y' AND rs.run_date IS NOT NULL AND rs.schedule_id = [scheduleId]) x, cr_report r, app_user au WHERE x.rep_id = r.rep_id AND au.user_id IN (SELECT rsu.user_id FROM cr_report_schedule_users rsu WHERE rsu.schedule_id = x.schedule_id and rsu.schedule_id = [scheduleId] UNION SELECT ur.user_id FROM fn_user_role ur WHERE ur.role_id IN (SELECT rsu2.role_id FROM cr_report_schedule_users rsu2 WHERE rsu2.schedule_id = x.schedule_id and rsu2.schedule_id = [scheduleId]))
-
-download.all.insert = insert into cr_report_dwnld_log (user_id,rep_id,file_name,dwnld_start_time,filter_params) values (?,?,?,?,?)
-
-#ReportWrapper.java
-
-report.wrapper.format = SELECT coalesce(cr.owner_id, cr.create_id) owner_id, cr.create_id, TO_CHAR(cr.create_date, '[Globals.getOracleTimeFormat()]') create_date, maint_id, TO_CHAR(cr.maint_date, '[Globals.getOracleTimeFormat()]') update_date, cr.menu_id, cr.menu_approved_yn FROM cr_report cr WHERE cr.rep_id= [reportID]
-
-generate.subset.sql = SELECT [colNames.toString()] FROM (SELECT row_number() OVER () AS rnum, [colNames.toString()] FROM ([reportSQL]) AS x ) AS y
-
-report.sql.only.first.part = SELECT row_number() OVER () AS rnum, [colNames.toString()] FROM (SELECT row_number() OVER () AS rnum, [colNames.toString()] FROM (
-
-report.sql.only.second.part.a = WHERE rnum <= [endRow]
-
-report.sql.only.second.part.b = AND rnum >= [startRow] ORDER BY rnum
-
-report.sql.only.second.part.b.noorderby = AND rnum >= [startRow]
-
-generate.sql.visual.select = SELECT
-
-generate.sql.visual.count = COUNT(*) cnt
-
-generate.sql.visual.dual =
-#No DUAL table in PostgreSQL so this is blank
-
-#ReportRuntime.java
-
-load.crosstab.report.data = SELECT row_number() OVER () AS rnum, [colNames.toString()] FROM ( [reportSQL]
-
-#RaptorRunHandler.java
-
-generate.sql.handler = SELECT row_number() OVER () AS rnum, x.* from ([sql]) AS x LIMIT 2
-
-generate.sql.select = SELECT [colNames.toString()] FROM (SELECT row_number() OVER () AS rnum, [colNames.toString()] FROM ([sql]) AS y) AS x
-
-#ReportSchedule.java
-
-load.schedule.data = SELECT rs.enabled_yn, TO_CHAR(rs.start_date, 'MM/DD/YYYY') start_date, TO_CHAR(rs.end_date, 'MM/DD/YYYY') end_date, TO_CHAR(rs.run_date, 'MM/DD/YYYY') run_date, coalesce(TO_CHAR(rs.run_date, 'HH'), '12') run_hour, coalesce(TO_CHAR(rs.run_date, 'MI'), '00') run_min, coalesce(TO_CHAR(rs.run_date, 'AM'), 'AM') run_ampm, rs.recurrence, rs.conditional_yn, rs.notify_type, rs.max_row, rs.initial_formfields, rs.schedule_id, coalesce(TO_CHAR(rs.end_date, 'HH'), '11') end_hour, coalesce(TO_CHAR(rs.end_date, 'MI'), '45') end_min, coalesce(TO_CHAR(rs.end_date, 'AM'), 'PM') end_ampm, encrypt_yn, attachment_yn FROM cr_report_schedule rs WHERE rs.rep_id = [reportID]
-
-load.schedule.getid = SELECT rsu.user_id, fuser.last_name||', '||fuser.first_name, fuser.login_id FROM cr_report_schedule_users rsu, fn_user fuser WHERE rsu.rep_id = [reportID] AND rsu.schedule_id = [getScheduleID()] and rsu.user_id IS NOT NULL and rsu.user_id = fuser.user_id
-
-load.schedule.users = SELECT rsu.role_id FROM cr_report_schedule_users rsu WHERE rsu.rep_id = [reportID] AND rsu.schedule_id = [getScheduleID()] AND rsu.role_id IS NOT NULL
-
-new.schedule.data = SELECT nextval('SEQ_CR_REPORT_SCHEDULE') AS sequence
-
-execute.update = DELETE FROM cr_report_schedule_users WHERE rep_id = [reportID] and schedule_id = [getScheduleID()]
-
-execute.update.users = INSERT INTO cr_report_schedule_users (schedule_id, rep_id, user_id, role_id, order_no) VALUES([getScheduleID()], [reportID], [emailToUsers.get(i)).getId()], NULL, [(i + 1)])
-
-execute.update.roles = INSERT INTO cr_report_schedule_users (schedule_id, rep_id, user_id, role_id, order_no) VALUES([getScheduleID()], [reportID], NULL, [emailToRoles.get(i)).getId()], [((emailToUsers.size() + i + 1)])
-
-execute.update.activity = INSERT into cr_schedule_activity_log (schedule_id, notes, run_time) values ([getScheduleID()],'Submitted:Schedule',TO_DATE('[getRunDate()] [getRunHour()]:[getRunMin()] [getRunAMPM()]', 'MM/DD/YYYY HH:MI AM'))
-
-delete.schedule.data = SELECT 1 FROM cr_report_schedule WHERE rep_id = [reportID] and sched_user_id = [getScheduleUserID()] and schedule_id = [getScheduleID()]
-
-delete.schedule.data.users = DELETE FROM cr_report_schedule_users WHERE rep_id = [reportID] and schedule_id = [getScheduleID()]
-
-delete.schedule.data.id = DELETE FROM cr_report_schedule where rep_id = [reportID] and sched_user_id = [getScheduleUserID()] and schedule_id = [getScheduleID()]
-
-load.cond.sql = SELECT condition_large_sql FROM cr_report_schedule WHERE schedule_id=?::int
-
-load.cond.sql.select = SELECT condition_sql FROM cr_report_schedule WHERE schedule_id = [scheduleId]
-
-persist.cond.sql.update = update cr_report_schedule set condition_large_sql = '' where schedule_id = [scheduleId]
-#EMPTY CLOB() changed to ''
-
-persist.cond.sql.large = SELECT condition_large_sql FROM cr_report_schedule cr WHERE schedule_id=? FOR UPDATE
-
-persist.cond.sql.set = update cr_report_schedule set condition_sql = ? where schedule_id = [scheduleId]
-
-#DataCache.java
-
-get.data.view.actions = SELECT ts.web_view_action FROM cr_table_source ts WHERE ts.web_view_action IS NOT NULL
-
-get.public.report.id.names = SELECT rep_id, title FROM cr_report WHERE public_yn = 'Y' ORDER BY title
-
-get.private.accessible.names.a = SELECT cr.rep_id, cr.title FROM cr_report cr WHERE cr.rep_id not in (select rep_id from cr_report_access cra where user_id = '[user_id]'
-
-get.private.accessible.names.if = OR role_id in (
-
-get.private.accessible.names.b = ) AND public_yn = 'N' and cr.owner_id = '[user_id]' order by 2
-
-get.group.accessible.names.a = SELECT cr.rep_id, cr.title FROM cr_report cr WHERE cr.rep_id in (select rep_id from cr_report_access cra where user_id = '[user_id]'
-
-get.group.accessible.names.b = ) AND public_yn = 'N' order by 2
-
-get.report.table.sources.a = SELECT table_name, display_name, pk_fields, web_view_action, large_data_source_yn, filter_sql FROM cr_table_source
-
-get.report.table.sources.where = where SOURCE_DB= '[dBInfo]'
-
-get.report.table.sources.if = where SOURCE_DB is null or SOURCE_DB = '[AppConstants.DB_LOCAL]'
-
-get.report.table.sources.else = ORDER BY table_name
-
-grab.report.table.a = SELECT ts.table_name, ts.display_name, ts.pk_fields, ts.web_view_action, ts.large_data_source_yn, ts.filter_sql FROM cr_table_source ts WHERE
-
-grab.report.table.if = ts.SOURCE_DB= '[dBInfo]'
-
-grab.report.table.else = (ts.SOURCE_DB is null or ts.SOURCE_DB = '[AppConstants.DB_LOCAL]')
-
-grab.report.table.b = except SELECT ts.table_name, ts.display_name, ts.pk_fields, ts.web_view_action, ts.large_data_source_yn, ts.filter_sql from cr_table_source ts where table_name in (select table_name from cr_table_role where role_id not IN [sb.toString()]) and
-
-grab.report.table.c = ORDER BY 1
-
-get.report.table.crjoin = SELECT src_table_name, dest_table_name, join_expr FROM cr_table_join
-
-get.report.table.joins = SELECT tj.src_table_name, tj.dest_table_name, tj.join_expr FROM cr_table_join tj WHERE ((EXISTS (SELECT 1 FROM cr_table_role trs WHERE trs.table_name=tj.src_table_name AND trs.role_id IN [sb.toString()])) OR (NOT EXISTS (SELECT 1 FROM cr_table_role trs WHERE trs.table_name=tj.src_table_name))) AND ((EXISTS (SELECT 1 FROM cr_table_role trd WHERE trd.table_name=tj.dest_table_name AND trd.role_id IN [sb.toString()])) OR (NOT EXISTS (SELECT 1 FROM cr_table_role trd WHERE trd.table_name=tj.dest_table_name)))
-
-generate.report.table.col = SELECT a.table_name, a.column_name, a.data_type, a.label FROM user_column_def a WHERE a.table_name = '[tableName.toUpperCase()]' ORDER BY a.column_id
-
-generate.db.user.sql.a = SELECT utc.table_name, utc.column_name, utc.data_type,
-
-generate.db.user.sql.if = utc.column_name FROM user_tab_columns utc
-
-generate.db.user.sql.else = coalesce(x.label, utc.column_name) FROM user_tab_columns utc
-
-generate.db.user.sql.b = WHERE utc.table_name = '[tableName.toUpperCase()]'
-
-generate.db.user.sql.c = AND utc.table_name = x.table_name AND utc.column_name = x.column_name
-
-generate.db.user.sql.d = ORDER BY utc.column_id
-
-#SearchHandler.java
-
-load.report.search.result = SELECT cr.rep_id, cr.rep_id report_id, [rep_title_sql] || CASE WHEN cr.public_yn = 'Y' THEN '' ELSE '[PRIVATE_ICON]' END || cr.title ||'</a>' title, cr.descr, au.first_name||' '||au.last_name owner_name, TO_CHAR(cr.create_date, 'MM/DD/YYYY') create_date, CASE WHEN coalesce(cr.owner_id, cr.create_id) = [userID] THEN 'N' ELSE coalesce(ra.read_only_yn, 'Y') END read_only_yn, CASE WHEN coalesce(cr.owner_id, cr.create_id) = [userID] THEN 'Y' ELSE 'N' END user_is_owner_yn, case when report_xml like '%<allowSchedule>N</allowSchedule>%' then 'N' when report_xml like '%<allowSchedule>Y</allowSchedule>%' or 1 = (select distinct 1 from cr_report_schedule where rep_id = cr.rep_id) then 'Y' else 'N' end FROM cr_report cr JOIN fn_user au ON coalesce (cr.owner_id, cr.create_id) = au.user_id AND TO_CHAR(cr.rep_id, 'FM99999999') like coalesce('%[fReportID]%', TO_CHAR(cr.rep_id, 'FM99999999')) AND UPPER(cr.title) LIKE UPPER('%[fReportName]%') LEFT JOIN(SELECT rep_id, MIN(read_only_yn) read_only_yn FROM ((SELECT ua.rep_id, ua.read_only_yn FROM cr_report_access ua WHERE ua.user_id = [userID]) UNION ALL (SELECT ra.rep_id, ra.read_only_yn FROM cr_report_access ra WHERE ra.role_id IN ([roleList.toString()]))) report_access GROUP BY rep_id) ra ON ra.rep_id = cr.rep_id
-
-load.report.search.instr = WHERE cr.menu_id LIKE '%[menuId]%'
-
-load.report.search.result.user = WHERE coalesce(cr.owner_id, cr.create_id) = [userID]
-
-load.report.search.result.public = WHERE (coalesce(cr.owner_id, cr.create_id) = [userID] OR cr.public_yn = 'Y' OR ra.read_only_yn IS NOT NULL)
-
-load.report.search.result.fav = WHERE cr.rep_id in (select rep_id from cr_favorite_reports where user_id = [userID]
-
-load.report.search.result.sort = ORDER BY CASE coalesce(cr.owner_id, cr.create_id) WHEN [userID] THEN ' ' WHEN 'upper(au.first_name||' '||au.last_name)' ELSE 'upper(cr.title)' END
-
-load.folder.report.result = SELECT cr.rep_id, cr.rep_id report_id, [rep_title_sql] || CASE WHEN cr.public_yn = 'Y' THEN '' ELSE '[PRIVATE_ICON]' END || cr.title || '</a>' title, cr.descr, au.first_name||' '||au.last_name owner_name, TO_CHAR(cr.create_date, 'MM/DD/YYYY') create_date, CASE WHEN coalesce(cr.owner_id, cr.create_id) = [userID] THEN 'N' ELSE coalesce(ra.read_only_yn, 'Y') END read_only_yn, CASE WHEN coalesce(cr.owner_id, cr.create_id) = [userID] THEN 'Y' ELSE 'N' END user_is_owner_yn FROM cr_report cr JOIN fn_user au ON coalesce (cr.owner_id, cr.create_id) = au.user_id AND TO_CHAR(cr.rep_id, 'FM99999999') like coalesce('%[fReportID]%', TO_CHAR(cr.rep_id, 'FM99999999')) AND UPPER(cr.title) LIKE UPPER('%[fReportName]%') LEFT JOIN(SELECT rep_id, MIN(read_only_yn) read_only_yn FROM ((SELECT ua.rep_id, ua.read_only_yn FROM cr_report_access ua WHERE ua.user_id = [userID]) UNION ALL (SELECT ra.rep_id, ra.read_only_yn FROM cr_report_access ra WHERE ra.role_id IN ([roleList.toString()]))) report_access GROUP BY rep_id) ra ON ra.rep_id = cr.rep_id
-
-load.folder.report.result.sort = ORDER BY CASE coalesce(cr.owner_id, cr.create_id) WHEN [userID] THEN ' ' WHEN '(au.first_name||' '||au.last_name)' ELSE 'cr.title' END
-
-#WizardProcessor.java
-
-process.filter.add.edit = '[argValue]'
-
-#ReportDefinition.java
-
-persist.report.adhoc = SELECT nextval('[Globals.getAdhocReportSequence()]') AS sequence
-
-#Globals.java
-
-initialize.roles = SELECT 1 WHERE EXISTS (SELECT 1 FROM cr_table_role)
-
-initialize.version = SELECT cr_raptor.get_version
-
-# scheduler
-
-
-scheduler.available.schedules = SELECT x.rep_id, x.schedule_id, x.conditional_yn, x.condition_large_sql, x.notify_type, x.max_row, x.initial_formfields, x.processed_formfields, r.title, x.user_id FROM ( SELECT rs.rep_id, rs.schedule_id, rs.sched_user_id user_id, rs.conditional_yn, rs.condition_large_sql, rs.notify_type, rs.max_row, rs.initial_formfields, rs.processed_formfields FROM cr_report_schedule rs WHERE rs.enabled_yn='Y' AND rs.start_date <= [currentDate] AND (rs.end_date >= [currentDate] or rs.end_date is null ) AND rs.run_date IS NOT NULL ) x, cr_report r WHERE x.rep_id = r.rep_id
-
-random.string = select ( 'Z' || round(random() * 1000000000000))
-
-
-scheduler.user.emails = SELECT au.user_id FROM (SELECT rs.schedule_id, rs.rep_id FROM cr_report_schedule rs WHERE rs.enabled_yn='Y' AND rs.start_date <= now() AND rs.end_date >= now() AND rs.run_date IS NOT NULL AND rs.schedule_id = [p_schedule_id] ) x, cr_report r, fn_user au WHERE x.rep_id = r.rep_id AND au.user_id IN (SELECT rsu.user_id FROM cr_report_schedule_users rsu WHERE rsu.schedule_id = x.schedule_id and rsu.schedule_id = [p_schedule_id] UNION SELECT ur.user_id FROM fn_user_role ur WHERE ur.role_id IN (SELECT rsu2.role_id FROM cr_report_schedule_users rsu2 WHERE rsu2.schedule_id = x.schedule_id and rsu2.schedule_id = [p_schedule_id]))
-
-
-# my logins
-
-app.query = SELECT APP_ID, ML_APP_NAME, MOTS_ID from fn_app where ((enabled = 'Y' and open = 'N') or app_id = 1 )
-
-user.log.query = SELECT DISTINCT IFNULL(ORG_USER_ID, '') CUID, '' AWID, CONCAT('"',IFNULL(ORG_USER_ID, ''),'"') APPLICATIONUSERID, CONCAT('"',IFNULL(FIRST_NAME, ''),'"') FIRST_NAME, CONCAT('"',substr(IFNULL(MIDDLE_NAME, ''), 0, 1),'"') MIDDLE_INITIAL, CONCAT('"',IFNULL(LAST_NAME, ''),'"') LAST_NAME, IFNULL(DATE_FORMAT(LAST_LOGIN_DATE, '%Y/%m/%d'), '') LAST_LOGON_DATE, DATE_FORMAT(CREATED_DATE, '%Y/%m/%d') ACCOUNT_ACTIVATION_DATE, IFNULL(DATE_FORMAT(MODIFIED_DATE, '%Y/%m/%d'), '') LAST_DATE_ACCOUNT_MODIFIED, '' LAST_PASSWORD_CHANGE_DATE, CONCAT('"',IFNULL(FIRST_NAME, ''),' ',IFNULL(MIDDLE_NAME, ''),' ',IFNULL(LAST_NAME, ''),'"') FULL_USER_NAME, '' NT_ID, IFNULL(EMAIL, '') EMAIL FROM FN_USER FU, FN_USER_ROLE FUR, FN_ROLE FR WHERE FU.USER_ID = FUR.USER_ID and FUR.ROLE_ID = FR.ROLE_ID and ((FUR.APP_ID = 1 and FUR.APP_ID = ? and FR.ROLE_NAME <> 'Standard User') or (FUR.APP_ID = ? and FUR.APP_ID <> 1)) and FU.ACTIVE_YN = 'Y' and FU.org_user_id is not null order by 1
-
-profile.log.query = SELECT DISTINCT CONCAT('"' , ROLE_NAME , '"') PROFILE_NAME, '""' SECURITY_SETTINGS FROM FN_ROLE FR, FN_USER_ROLE FUR WHERE FUR.ROLE_ID = FR.ROLE_ID and FR.ACTIVE_YN = 'Y' and ((FUR.APP_ID = 1 and FUR.APP_ID = ? and FR.ROLE_NAME <> 'Standard User') or (FUR.APP_ID = ? and FUR.APP_ID <> 1)) ORDER BY 1
-
-user.profile.log.query = SELECT DISTINCT IFNULL(ORG_USER_ID, '') CUID, '' AWID, CONCAT('"' , IFNULL(ORG_USER_ID, '') , '"') APPLICATIONUSERID , CONCAT('"' , ROLE_NAME , '"') PROFILE_NAME FROM FN_USER A, FN_USER_ROLE B, FN_ROLE C WHERE A.USER_ID = B.USER_ID AND B.ROLE_ID = C.ROLE_ID AND A.ACTIVE_YN = 'Y' AND C.ACTIVE_YN = 'Y' AND a.ORG_USER_ID is not null AND ((B.APP_ID = 1 and B.APP_ID = ? and C.ROLE_NAME <> 'Standard User') or (B.APP_ID = ? and B.APP_ID <> 1)) ORDER BY 1
-
-all.accounts.log.query = SELECT DISTINCT IFNULL(ORG_USER_ID, '') CUID, (case when A.ACTIVE_YN='Y' then 'ACTIVE' else 'INACTIVE' end) ACTIVE_YN, CONCAT('"' , IFNULL(ORG_USER_ID, '') , '"') APPLICATIONUSERID , IFNULL(DATE_FORMAT(LAST_LOGIN_DATE, '%Y/%m/%d'), '') LAST_LOGON_DATE, '' LAST_PASSWORD_CHANGE_DATE, CONCAT('"' , ROLE_NAME , '"') PROFILE_NAME FROM FN_USER A, FN_USER_ROLE B, FN_ROLE C WHERE A.USER_ID = B.USER_ID AND B.ROLE_ID = C.ROLE_ID AND a.ORG_USER_ID is not null AND ((B.APP_ID = 1 and B.APP_ID = ? and C.ROLE_NAME <> 'Standard User') or (B.APP_ID = ? and B.APP_ID <> 1)) ORDER BY 1
-
-# basic sql
-
-seq.next.val = SELECT nextval('[sequenceName]') AS id
-
-current.date = now()
-
-nvl = IFNULL
diff --git a/ecomp-portal-BE/war/WEB-INF/conf/system.properties b/ecomp-portal-BE/war/WEB-INF/conf/system.properties
deleted file mode 100644
index d5e9c21b..00000000
--- a/ecomp-portal-BE/war/WEB-INF/conf/system.properties
+++ /dev/null
@@ -1,102 +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.
-# ================================================================================
-###
-
-db.driver = com.mysql.jdbc.Driver
-db.connectionURL = jdbc:mysql://portal.api.simpledemo.openecomp.org:3306/portal
-db.userName = xxxx
-db.password = xxxxxxx
-
-db.hib.dialect = org.hibernate.dialect.MySQLDialect
-db.min_pool_size = 5
-db.max_pool_size = 10
-hb.dialect = org.hibernate.dialect.MySQLDialect
-hb.show_sql = false
-hb.db_reconnect = true
-hb.idle_connection_test_period = 3600
-
-
-app_display_name = app_display_name
-files_path = /demeter/WebApps/dev/ECOMP_APP/files
-context_root = ECOMPPORTAL
-# menu settings
-menu_query_name = menuData
-menu_properties_file_location = /WEB-INF/fusion/menu/
-application_menu_set_name = APP
-application_menu_attribute_name = applicationMenuData
-application_menu_properties_name = menu.properties
-business_direct_menu_set_name = BD
-business_direct_menu_properties_name = bd.menu.properties
-business_direct_menu_attribute_name = businessDirectMenuData
-
-application_user_id = 30000
-post_default_role_id = 1
-
-#Enable Fusion Mobile capabilities for the application
-mobile_enable = false
-
-cache_config_file_path = /WEB-INF/conf/cache.ccf
-cache_switch = 1
-cache_load_on_startup = false
-
-user_name = fullName
-decryption_key = xxxxxx
-
-
-#Cron Schedules
-cron_site_name = one
-log_cron = 0 * * * * ? *
-sessiontimeout_feed_cron = 0 0/5 * * * ? *
-
-#Front end URL
-frontend_url = http://portal.openecomp.org:8080/ecompportal/applicationsHome
-
-#cookie domain PLEASE DO NOT REMOVE THIS VALUE FOR OPEN SOUCE REFACTOR
-cookie_domain = openecomp.org
-
-# An Unique 128-bit value defined to identify a specific version of
-# ECOMP Portal deployed on a specific virtual machine.
-# This value must be generated and updated at the time of
-# the deployment.
-# Online Unique UUID generator - https://www.uuidgenerator.net/
-instance_uuid = 90bc9497-10e6-49fe-916b-dcdfaa972383
-
-ecomp_shared_context_rest_url= http://todo_enter_be_hostname:9000/ecompportal/context
-
-elastic_search_url = http://todo_enter_elastic_search_hostname:9200
-contact_us_link = http://todo_enter_contact_us_hostname
-user_guide_link = http://todo_enter_user_guide_link
-
-# Contact Us page properties
-ush_ticket_url = http://todo_enter_ush_ticket_url
-feedback_email_address = portal@lists.openecomp.org
-portal_info_url = https://todo_enter_portal_info_url
-
-#Online user bar refresh interval, in seconds
-online_user_update_rate = 5
-
-#Online user bar refresh total duration, in seconds
-online_user_update_duration = 30
-
-#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
diff --git a/ecomp-portal-BE/war/WEB-INF/defs/definitions.xml b/ecomp-portal-BE/war/WEB-INF/defs/definitions.xml
deleted file mode 100644
index 603e1144..00000000
--- a/ecomp-portal-BE/war/WEB-INF/defs/definitions.xml
+++ /dev/null
@@ -1,38 +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 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>
diff --git a/ecomp-portal-BE/war/WEB-INF/fusion/.DS_Store b/ecomp-portal-BE/war/WEB-INF/fusion/.DS_Store
deleted file mode 100644
index 7fb274c0..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/.DS_Store
+++ /dev/null
Binary files differ
diff --git a/ecomp-portal-BE/war/WEB-INF/fusion/conf/fusion.properties b/ecomp-portal-BE/war/WEB-INF/fusion/conf/fusion.properties
deleted file mode 100644
index 242a21d5..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/conf/fusion.properties
+++ /dev/null
@@ -1,82 +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.
-# ================================================================================
-###
-# domain settings
-#domain_class_location =
-
-# validator settings
-#default_error_message = Default error message
-
-login_url_no_ret_val = http://localhost:9000/ecompportal/login.htm
-
-user_attribute_name = user
-
-# User Session settings
-#user_attribute_name = user
-roles_attribute_name = roles
-role_functions_attribute_name = role_functions
-#client_device_attribute_name = client_device
-#client_device_emulation = false
-#client_device_type_to_emulate =
-
-# menu settings
-menu_query_name = menuData
-#menu_properties_file_location = /WEB-INF/fusion/menu/
-application_menu_set_name = APP
-application_menu_attribute_name = applicationMenuData
-#application_menu_properties_name = menu.properties
-business_direct_menu_set_name = BD
-#business_direct_menu_properties_name = bd.menu.properties
-business_direct_menu_attribute_name = businessDirectMenuData
-
-# RAPTOR config settings
-#raptor_config_file_path = /WEB-INF/conf/
-
-# ECOMP settings
-ecomp_app_id = 1
-# Role settings
-sys_admin_role_id = 1
-account_admin_role_id = 999
-restricted_app_role_id = 900
-#sys_admin_role_function_delete_from_ui = true
-
-# Profile Search settings
-#profile_search_report_id=181
-#callable_profile_search_report_id=386
-
-
-# Home Page index html
-
-home_page = /index.html
-
-authentication_mechanism = DBAUTH
-
-login.error.hrid.empty = Login failed, please contact system administrator.
-login.error.hrid.not-found = User not found, please contact system administrator.
-login.error.user.inactive = Account is disabled, please contact system administrator.
-
-#
-# Number of seconds to poll health (database operational, etc.)
-#
-health_poll_interval_seconds = 5
-#
-# If a component is down a log entry will be written that triggers an alert. This parameter specifies how often this alert should be triggered
-# if the component remains down. For example a value of 30, would translate to 30 * 60 seconds = 1800 seconds, or every 30 minutes
-#
-health_fail_alert_every_x_intervals = 30
diff --git a/ecomp-portal-BE/war/WEB-INF/fusion/defs/definitions.xml b/ecomp-portal-BE/war/WEB-INF/fusion/defs/definitions.xml
deleted file mode 100644
index f11b39a0..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/defs/definitions.xml
+++ /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/war/WEB-INF/fusion/jsp/.gitignore b/ecomp-portal-BE/war/WEB-INF/fusion/jsp/.gitignore
deleted file mode 100644
index e69de29b..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/.gitignore
+++ /dev/null
diff --git a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/collaborateList.jsp b/ecomp-portal-BE/war/WEB-INF/fusion/jsp/collaborateList.jsp
deleted file mode 100644
index 21497518..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/collaborateList.jsp
+++ /dev/null
@@ -1,101 +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.
- ================================================================================
- --%>
-<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/app.js"></script>
-<script src= "static/ebz/angular_js/gestures.js"></script>
-
-<script src="static/js/jquery-1.10.2.js"></script>
-<script src="static/js/modalService.js"></script>
-<script src="static/js/jquery.mask.min.js" type="text/javascript"></script>
-<script src="static/js/jquery-ui.js" type="text/javascript"></script>
-<script src="static/ebz/sandbox/att-abs-tpls.js" type="text/javascript"></script>
-<%@ include file="/WEB-INF/fusion/jsp/popup_modal.html" %>
-<div ng-controller="collaborateListController">
- <div>
- <h1 class="heading1" style="margin-top:20px;">Collaborate List</h1>
- <div style="margin-top:30px">
- <table att-table table-data="tableData" view-per-page="viewPerPage" current-page="currentPage" search-category="searchCategory" search-string="searchString" total-page="totalPage">
-
- <thead att-table-row type="header">
- <tr>
- <th att-table-header key="id">User ID</th>
- <th att-table-header key="last_name">Last Name</th>
- <th att-table-header key="first_name">First Name</th>
- <th att-table-header key="email">Email</th>
- <th att-table-header key="sbcid">ATTUID</th>
- <th att-table-header key="active">Online/Offline</th>
- </tr>
- </thead>
- <tbody att-table-row type="body" row-repeat="rowData in tableData">
- <tr>
- <td att-table-body >{{rowData.id}}</td>
- <td att-table-body >{{rowData.lastName}}</td>
- <td att-table-body >{{rowData.firstName}}</td>
- <td att-table-body >{{rowData.email}}</td>
- <td att-table-body >{{rowData.sbcid}}</td>
- <td att-table-body >
- <tag-badges ng-hide="rowData.online" style-type="color" class="lred" ng-click="rowData.isActive=true;openCollaboration(rowData.sbcid)">Offline</tag-badges>
- <tag-badges ng-show="rowData.online" style-type="color" class="lgreen" ng-click="rowData.isActive=false;openCollaboration(rowData.sbcid)">Online</tag-badges>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <input ng-model="currentPage"></input>
-</div>
-
-<script>
-app.controller("collaborateListController", function ($scope,$http,modalService, $modal) {
- // Table Data
- $scope.tableData=${model.profileList};
- $scope.viewPerPage = 20;
- $scope.scrollViewsPerPage = 2;
- $scope.currentPage = 1;
- $scope.totalPage;
- $scope.searchCategory = "";
- $scope.searchString = "";
- /* modalService.showSuccess('','Modal Sample') ; */
- for(x in $scope.tableData){
- if($scope.tableData[x].active_yn=='Y')
- $scope.tableData[x].active_yn=true;
- else
- $scope.tableData[x].active_yn=false;
- }
- $scope.openCollaboration = function(userId){
- openInNewTab('collaboration?user_id=' + userId);
- }
-
- $scope.toggleProfileActive = function(profileId) {
- if (confirm("You are about to change user's active status. Do you want to continue?")) {
- $http.get("profile/toggleProfileActive?profile_id="+profileId).success(function(){});
- }
- };
-
-});
-
-function openInNewTab(url) {
- var win = window.open(url, '_blank');
- win.focus();
-};
-
-</script>
diff --git a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/ebz/ebz_footer.jsp b/ecomp-portal-BE/war/WEB-INF/fusion/jsp/ebz/ebz_footer.jsp
deleted file mode 100644
index ae72af66..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/ebz/ebz_footer.jsp
+++ /dev/null
@@ -1,63 +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.
- ================================================================================
- --%>
-
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
-<script src="static/ebz/js/footer.js"></script>
-<script type="text/javascript" src="static/ebz/js/attHeaderSnippet.js"></script>
-<link rel="stylesheet" type="text/css" href="static/ebz/footer_new.css" >
-
-
-
-<div class="footerContainer" id="footerContainer">
- <div class="footerWrapper" id="footerWrapper">
-
- <div class="footerItem">
-
- </div>
- <div class="feedbackSection">
- <div class="dividerTop"></div>
- <div class="feedbackContent">
- <form id="feedbackForm" name="feedbackForm" action="javascript: void(0)" method="post">
- <div class="feedbackInfo">Please tell us about your AT&amp;T Business Center experience. Your feedback is appreciated and will help us improve the site.</div>
- <div class="feedbackTextSection">
- <textarea id="feedbackText" class="feedbackText" name="feedbackText" maxlength="4000"></textarea>
- <button type="submit" class="feedbackSubmitButton" id="feedbackSubmitButton" name ="feedbackSubmitButton" >Submit</button>
- </div>
- </form>
- </div>
- </div>
- <div class="dividerBottom" id="feedbackResultDivider"></div>
- <div class="feedbackResultMsg">
- <div class='readFeedBackMessage' tabindex='-1' style="outline:0px; display:inline-block" aria-live="assertive"></div>
- <span class="icon-included-checkmark" id="feedbackMsgCheck"></span>
- <button id="feedbackOkButton" class="feedbackMsgOKButton">OK</button>
- </div>
- <div class="dividerBottom"></div>
- <div class="feedbackButtonDiv">
- <button type="button" class="feedbackButton" id="feedbackButton" name ="feedbackButton" >Feedback<span class="icon-chevron-down"></span></button>
- </div>
-
- <div class="attFooterInfo">
- <div class="footerLastSection">
- </div>
- </div>
- </div>
-</div>
diff --git a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/ebz/ebz_header.jsp b/ecomp-portal-BE/war/WEB-INF/fusion/jsp/ebz/ebz_header.jsp
deleted file mode 100644
index e4cd224c..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/ebz/ebz_header.jsp
+++ /dev/null
@@ -1,303 +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.
- ================================================================================
- --%>
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
- <%@ page isELIgnored ="false" %>
- <%@ page import="org.openecomp.portalsdk.core.util.SystemProperties" %>
- <link rel="stylesheet" type="text/css" href="static/ebz/header_new.css">
- <script src= "static/ebz/js/attHeaderSnippet.js"></script>
- <script src= "static/ebz/js/attHeader_new.js"></script>
- <c:set var="menu" value="<%=session.getAttribute(SystemProperties.getProperty(SystemProperties.APPLICATION_MENU_ATTRIBUTE_NAME))%>"/>
-
- <style>
- li {
- list-style: none;
- }
-
- #userIcon:hover {
- color: rgb(191, 231, 239);
- }
-
- #headerChatIcon:hover {
- background: url(static/images/headerChatIcon_hover.png) no-repeat -3px
- -3px !important;
- }
-
- .headerContentContainer .primaryMenuContainer .headerIconContainer .popbox .openpopbox:hover
- {
- color: #bfe7fb;
- margin-top: -2px;
- text-decoration: none;
- outline: none
- }
- /* .headerContentContainer .primaryMenuContainer .headerIconContainer .popbox .openpopbox:focus{color:#bfe7fb;margin-top:-2px;text-decoration:none;outline:none} */
- .headerContentContainer .primaryMenuContainer .headerIconContainer .popbox .openpopbox
- {
- color: #fff;
- display: block;
- min-width: 70px;
- max-width: 115px;
- text-decoration: none
- }
-
- a {
- -webkit-transition: all .3s ease-out;
- -moz-transition: all .3s ease-out;
- transition: all .3s ease-out
- }
-
- a:active,a:hover {
- outline: 0
- }
-
- b,strong {
- font-weight: 700
- }
-
- .thirdMenuContainer {
- width: 100%;
- overflow: auto;
- margin-top: 101px;
- position: fixed;
- z-index: 3000;
- min-height: 140px;
- max-height: 500px;
- opacity: 1;
- background-color: rgb(255, 255, 255);
- }
-</style>
- <div style="position:relative; z-index:999;">
- <div class="headerContainer" id="headerContainer" >
- <div class="headerContentContainer">
- <div class="primaryMenuContainer">
- <div style="background: url(static/ebz/images/att_logo.png) no-repeat scroll -10px -10px transparent; !important;"></div>
- <div class="attHomeContainer">
- <div class="businessCenterR">
- <a id="attBusinessCenter" href="">OpenECOMP Portal</a>
- </div>
- </div>
- <div class="primaryMenuOptionsContainer" >
-
- <div class="primaryMenuOption">
- <a class="primaryMenuOptionLink" href="javascript:openSecondLevel('m')">Manage</a>
- </div>
- <div class="primaryMenuOption">
- <a id="supportFirstLevel" class="primaryMenuOptionLink" href="javascript:openSecondLevel('s')">Support</a>
-
- </div>
- <div id="indicator" class="selectedOptionIndicator" style="display:none"></div>
- </div>
- <div class="headerIconContainer">
- <%-- <div class="loginName" style="width:107px;">
- <span class="popbox" >
- <a style="color:#ffffff;display: block;min-width: 70px;max-width: 115;" class="openpopbox" href="#" >
- <div id="headerLoginIcon" class="loginIcon"><span id="userIcon" style="font-size:19px;" class="icon-user"></span> </div>
- <div id="headerNameEllipsis" class="ellipsis-header-name">${ociUserName}</div>
- </a>
- <div class="box1" style="line-height: normal; right: 167px; min-height: 200px; height: auto; width: 390px !important; display: none; top: 0px; left: -230.5px;" target="auth">
- <div class="arrow" style="left: 230px;"></div>
- <div id="reg-header-snippet">
- <div class="reg-profilePicture" style="min-height: 215px;" id="reg-profile-links">
- <div id="reg-profileImage">
- <div style="clear: both; height: 80px; position: relative; width: 80px;" class="">
- <img id="reg-userProfilePicture-id" style="height: 80px; width: 80px; float: left;" src="" alt="">
- <span style=" background-position: -1px -1px; height: 81px;left: 0;position: absolute;top: 0;width: 81px;">&nbsp;</span>
- </div>
- </div>
- <div id="reg-myprofile-link">
- <a href="">My Profile</a>
- </div>
- <div id="reg-companyProfile-link">
- <a href="">Company Profile</a>
- </div>
- <div id="reg-logout-div">
- <a class="reg-logout-btn" href="ebiz_logout.htm">Log Out</a>
- </div>
- </div>
- <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 class="att-global-fonts" id="reg-userName">${ociUserName}&nbsp;</h3><span class="visuallyhidden">.</span></div></div></div></li>
- <li><div class="reg-userEmail-label"><span class="reg-userEmail-label-spn">EMAIL<span class="visuallyhidden">:</span></span></div></li>
- <li><div class="reg-userEmail-value"><span class="reg-userEmail-value-spn">${email}<span class="visuallyhidden">.</span></span></div></li>
- <li><div class="reg-userRole-label"><span class="reg-userRole-label-spn">PROFILE ID<span class="visuallyhidden">:</span></span></div></li>
- <li><div class="reg-userRole-value"><span class="reg-userRole-value-spn">${groupId}<span class="visuallyhidden">.</span></span></div></li>
- <li><div class="reg-userCompany-label"><span class="reg-userCompany-spn"> ENTERPRISE NAME<span class="visuallyhidden">:</span></span></div></li>
- <li><div class="reg-userCompany-value"><span class="reg-userCompany-spn">${serviceProviderId}<span class="visuallyhidden">.</span></span></div></li>
- </ul>
- </div>
- </div>
- </div>
- </span>
- </div> --%>
- <!-- Chat -->
-
-
- <!-- <div id="headerChatIcon" class='chatIcon' style="background: url(static/images/headerChatIcon.png) no-repeat -3px -3px;"></div>
- <div class="chatBox">
- <div class='arrow'></div>
- <div class="chatBox-header">
- <span class="chatBox-heading">Live Chat</span>
- <i class="icon-erase circle_close_chat"></i>
- </div>
-
- </div> -->
- </div>
- </div>
- </div>
- <!-- HTML for the secondary menu for dashboard. -->
- <div id="secondLevel" class="secondaryMenuContainer secondaryMenuContainerForDashboard" style="display:none;">
- <div id="secondaryMenuContentContainer" class="secondaryMenuContentContainer" style="">
- <c:forEach items="${menu}" var="menuItem">
- <div class="secondaryMenuOption" style="margin-left:20px; font-size:16px !important;">
- <a id="${menuItem.id}" href="${menuItem.action}" class="secondaryMenuOptionLink selectedSecondaryMenuOption">${menuItem.label}</a>
- </div>
- </c:forEach>
- </div>
- </div>
- <c:forEach items="${menu}" var="menuItem">
- <c:if test="${!empty menuItem.childMenus}">
- <div id="thirdLevel${menuItem.id}" class="secondaryMenuContainer secondaryMenuContainerForDashboard" style="display:none;">
- <div id="secondaryMenuContentContainer${menuItem.id}" class="secondaryMenuContentContainer" style="">
- <c:forEach items="${menuItem.childMenus}" var="subMenuItem">
- <div class="secondaryMenuOption" style="margin-left:20px; font-size:16px !important;">
- <a id="${subMenuItem.id}" href="${subMenuItem.action}" class="thirdMenuOptionLink selectedSecondaryMenuOption">${subMenuItem.label}</a>
- </div>
- </c:forEach>
- </div>
- </div>
- </c:if>
- </c:forEach>
- <%-- <c:forEach items="${menu}" var="menuItem">
- <c:if test="${!empty menuItem.childMenus}">
- <div id="thirdLevel${menuItem.id}" class="secondaryMenuContainer secondaryMenuContainerForDashboard" style="display:none;">
- <div id="secondaryMenuContentContainer${menuItem.id}" class="secondaryMenuContentContainer" style="">
- <c:forEach items="${menuItem.childMenus}" var="subMenuItem">
- <div class="secondaryMenuOption" style="margin-left:20px; font-size:16px !important;">
- <a id="${subMenuItem.id}" href="${subMenuItem.action}" class="thirdMenuOptionLink selectedSecondaryMenuOption">${subMenuItem.label}</a>
- </div>
- </c:forEach>
- </div>
- </div>
- </c:if>
- </c:forEach> --%>
- </div>
- </div>
-
- <c:forEach items="${menu}" var="menuItem">
- <c:if test="${!empty menuItem.childMenus}">
- <c:forEach items="${menuItem.childMenus}" var="subMenuItem">
- <div id="megaMenu${subMenuItem.id}" class="megaMenuContainer" style="right:0px; margin-top:145px; display:none;">
- <div class="megaMenuContentContainer">
- <ul class="megaMenuTable" id="megaMenuTable" style="padding:0px;">
- <li class="megaMenuFirstRow megaMenuRow" >
- <ul style=" display: flex; flex-direction: column; flex-wrap: wrap; height:500px;">
- <li class="categoryContainerColumn" style="margin-right:30px;">
- <div class="categoryContainer" align="left" style="margin-top:10px; margin-left:40px;">
- <c:forEach items="${subMenuItem.childMenus}" var="childSubMenuItem">
- <div class="categoryOption" style="margin-bottom:13px; width:500px; ">
- <a class="categoryOptionLink" style="margin-bottom:0px; font-size:16px;" href="${childSubMenuItem.action}">${childSubMenuItem.label}</a>
- </div>
- </c:forEach>
- </div>
- </li>
- </ul>
- </li>
- </ul>
- </div>
- </div>
- </c:forEach>
- </c:if>
- </c:forEach>
- <div id="megaMenuContainerTemp" class="megaMenuContainer" style="right:0px; margin-top:89px; display:none;">
- <div class="megaMenuContentContainer">
- <ul class="megaMenuTable" id="megaMenuTable" style="padding:0px;">
- <li class="megaMenuFirstRow megaMenuRow" >
- <ul style=" display: flex; flex-direction: column; flex-wrap: wrap; height:500px;">
- <li class="categoryContainerColumn" style="margin-right:30px;">
- <div class="categoryContainer" align="left" style="margin-bottom:0px; margin-left:40px;">
- <div class="categoryTitle" style="margin-top:10px; min-width:160px;"></div>
- <div class="categoryOption" style="margin-bottom:13px;">
- <a class="categoryOptionLink" style="margin-bottom:0px;" href="#"></a>
- </div>
- </div>
- </li>
- </ul>
- </li>
- <li class="megaMenuSecondRow megaMenuRow" style="display:none"></li>
- </ul>
- </div>
- </div>
-
-
- <script>
-
- $(document).ready(function() {
- $(document).on('mouseleave', '#megaMenuContainer', function() {
- $("#thirdLevel").css("display", "none");
- $("#megaMenuContainerTemp").css("display", "none");
-
- });
- $(document).on('mouseleave', '#megaMenuContainerTemp', function() {
- $("#megaMenuContainerTemp").css("display", "none");
- });
-
- $(document).on('mouseenter', '#secondLevel', function() {
- <c:forEach items="${menu}" var="menuItem">
- <c:choose>
- <c:when test="${!empty menuItem.childMenus}">
- $("#${menuItem.id}").hover(function() {
- <c:forEach items="${menu}" var="menuItem2">
- <c:if test="${!empty menuItem2.childMenus}">
- $("#thirdLevel${menuItem2.id}").css("display", "none");
- </c:if>
- </c:forEach>
- $(".megaMenuContainer").css("display", "none");
- $("#thirdLevel${menuItem.id}").css("display", "inline");
- });
- </c:when>
- <c:otherwise>
- $("#${menuItem.id}").hover(function() {
- <c:forEach items="${menu}" var="menuItem2">
- <c:if test="${!empty menuItem2.childMenus}">
- $("#thirdLevel${menuItem2.id}").css("display", "none");
- </c:if>
- </c:forEach>
- $(".megaMenuContainer").css("display", "none");
- });
- </c:otherwise>
- </c:choose>
- </c:forEach>
- });
-
- $('.thirdMenuOptionLink').hover(function() {
- $(".megaMenuContainer").css("display", "none");
-
- var id= "#megaMenu"+this.id;
- $(id).css("display", "inline");
- });
- });
- function openSecondLevel(item){
- if(item=='m'){
- $("#secondLevel").css("display", "inline");
- }
- }
-
-
- </script>
diff --git a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/ebz_template.jsp b/ecomp-portal-BE/war/WEB-INF/fusion/jsp/ebz_template.jsp
deleted file mode 100644
index 32010111..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/ebz_template.jsp
+++ /dev/null
@@ -1,44 +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.
- ================================================================================
- --%>
-<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
-<!DOCTYPE html>
-<html ng-app="abs">
- <head>
- <%@ include file="/WEB-INF/fusion/jsp/meta.jsp" %>
- <script src="static/js/jquery-1.10.2.js" type="text/javascript"></script>
- </head>
- <body class="templatebody" style="opacity: 1; background-color: rgb(242, 242, 242); padding: 0px;">
- <div class="applicationWindow">
- <div>
- <tiles:insertAttribute name="header" />
- </div>
- <br>
- <div class="content" style="margin-left:100px; margin-right:100px;">
- <div style="margin-top: 50px;">
- <tiles:insertAttribute name="body" />
- </div>
- </div>
- <br>
- <div>
- <tiles:insertAttribute name="footer" />
- </div>
- </div>
- </body>
-</html>
diff --git a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/ebz_template_noheader_nofooter.jsp b/ecomp-portal-BE/war/WEB-INF/fusion/jsp/ebz_template_noheader_nofooter.jsp
deleted file mode 100644
index c3f9fef9..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/ebz_template_noheader_nofooter.jsp
+++ /dev/null
@@ -1,35 +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.
- ================================================================================
- --%>
-<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
-<!DOCTYPE html>
-<html ng-app="abs">
- <%@ include file="/WEB-INF/fusion/jsp/meta.jsp" %>
- <body class="templatebody" style="opacity: 1; background-color: rgb(242, 242, 242); padding: 0px;">
- <div class="applicationWindow">
-
- <div class="content" style="margin-left:100px; margin-right:100px;">
- <div style="margin-top: 50px;">
- <tiles:insertAttribute name="body" />
- </div>
- </div>
-
- </div>
- </body>
-</html>
diff --git a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/include.jsp b/ecomp-portal-BE/war/WEB-INF/fusion/jsp/include.jsp
deleted file mode 100644
index e4ca6e4b..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/include.jsp
+++ /dev/null
@@ -1,30 +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.
- ================================================================================
- --%>
-<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties" %>
-<%@ page import="org.openecomp.portalsdk.core.web.support.AppUtils" %>
-
-<%@ page import="java.util.LinkedHashMap" %>
-
-
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
-
-<c:set var="request" value="<%=request%>"/>
diff --git a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/jcs_admin.jsp b/ecomp-portal-BE/war/WEB-INF/fusion/jsp/jcs_admin.jsp
deleted file mode 100644
index bf56c56b..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/jcs_admin.jsp
+++ /dev/null
@@ -1,149 +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.
- ================================================================================
- --%>
-<%-- <%@ include file="/WEB-INF/fusion/jsp/include.jsp"%> --%>
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
-
-<link rel="stylesheet" type="text/css" href="static/ebz/sandbox.css" >
-<link rel="stylesheet" type="text/css" href="static/fusion/css/jquery-ui.css">
-
-<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/jquery-1.10.2.js"></script>
-<script src="static/js/modalService.js"></script>
-<script src="static/js/jquery.mask.min.js" type="text/javascript"></script>
-<script src="static/js/jquery-ui.js" type="text/javascript"></script>
-<jsp:include page="/WEB-INF/fusion/jsp/popup_modal.html" ></jsp:include>
-
-<div align="left" ng-controller="cacheAdminController">
- <div class="pageTitle"><h3>Cache Regions</h3></div>
- These are the regions which are currently defined in the cache. 'Items' and 'Bytes' refer to the elements currently in memory (not spooled).
- You can clear all items for a region by clicking on the Clear icon next to the desired region below. You can also <a href="#" ng-click="clearAll();">clear all regions</a> which
- empties the entire cache. <br /><br />
-
- <div style="width: 97%; border-top: 1px solid #c4c4c4; margin-top: 0px; background-color: #fff; padding: 10px 0; color: #646464s">
- <div style="margin: 0 20px 10px 0px; font-size: 80%; float: left; width: 97%;">
- <div class="col-md-4"><b>Cache Name</b></div>
- <div class="col-md-2"><b># of Items</b></div>
- <div class="col-md-2"><b>Bytes</b></div>
- <div class="col-md-2"><b>Status</b></div>
- <div class="col-md-3"><b>Memory Hits</b></div>
- <div class="col-md-3"><b>Aux Hits</b></div>
- <div class="col-md-3"><b>Not Found Misses</b></div>
- <div class="col-md-3"><b>Expired Misses</b></div>
- <div class="col-md-1"><b>Clear?</b></div>
- <div class="col-md-1"><b>Items</b></div>
- </div>
- <div ng-repeat="region in regions">
- <div style="margin: 0 20px 10px 0px; font-size: 80%; float: left; width: 97%;">
- <div class="col-md-4"><a href="#" tooltip="Click to Show Region Details" ng-click="showRegionDetails(region.cacheName);">{{region.cacheName}}</a></div>
- <div class="col-md-2">{{region.size}}</div>
- <div class="col-md-2">{{region.byteCount}}</div>
- <div class="col-md-2">{{region.status}}</div>
- <div class="col-md-3">{{region.hitCountRam}}</div>
- <div class="col-md-3">{{region.hitCountAux}}</div>
- <div class="col-md-3">{{region.missCountNotFound}}</div>
- <div class="col-md-3">{{region.missCountExpired}}</div>
- <div class="col-md-1">
- <div ng-click="clearRegion(region.cacheName);" style="font-size:20px;"><a href="javascript:void(0)" class="icon-trash"></a></div>
- </div>
- <div class="col-md-1"><span class="att--tree__plus col-md-1" ng-class="{minus: bling$index}" ng-click="bling$index = !bling$index" style="display: block;"></span></div>
- </div>
- <div style="margin: 0px 20px 0px 30px; font-size: 80%; float: left; width: 95%; border-top: 1px solid #e4e4e4; padding-top: 10px"
- ng-show="bling$index">
- <span class="att--tree__arrow" style="height: 20px; width: 20px; display: inline-block; float: left"></span>
- <div class="col-md-12"><b>Key</b></div>
- <div class="col-md-2"><b>Eternal?</b></div>
- <div class="col-md-4"><b>Created</b></div>
- <div class="col-md-2"><b>Max Life</b></div>
- <div class="col-md-2"><b>Expires</b></div>
- <div class="col-md-1"><b>Clear?</b></div>
- </div>
- <div ng-repeat="item in region.items">
- <div style="margin: 0px 20px 0px 30px; font-size: 80%; float: left; width: 95%;" ng-show="bling$index">
- <span class="att--tree__arrow" style="height: 20px; width: 20px; display: inline-block; float: left"></span>
- <div class="col-md-12"><a href="#" tooltip="Click to Show Item Details" ng-click="showItemDetails(region.cacheName,item.key);">{{item.key}}</a></div>
- <div class="col-md-2">{{item.eternal}}</div>
- <div class="col-md-4">{{item.createTime}}</div>
- <div class="col-md-2">{{item.maxLifeSeconds}}</div>
- <div class="col-md-2">{{item.expiresInSeconds}}</div>
- <div class="col-md-1"><a ng-click="clearItem(region.cacheName,item.key);"><img src="static/fusion/images/deleteicon.gif"></a></div>
- </div>
- </div>
- <div style="clear: both"></div>
- </div>
- </div>
-</div>
-
-<script>
-app.controller('cacheAdminController', function ($scope,$interval,$http,$modal,modalService){
- $scope.regions=${model};
-
- $scope.clearAll = function() {
- if(confirm('You are about to clear all of the items for all cache regions. Do you want to continue?')){
- $http.get("jcs_admin/clearAll").success(function(response){$scope.regions=response;});
- }
- };
-
- $scope.clearRegion = function(cacheName) {
- if(confirm('You are about to clear all of the items in the cache region "' + cacheName + '". Do you want to continue?')){
- $http.get("jcs_admin/clearRegion?cacheName="+cacheName).success(function(response){$scope.regions=response;});
- }
- };
-
- $scope.clearItem = function(cacheName,key) {
- if(confirm('You are about to clear this item from the cache region "' + cacheName + '". Do you want to continue?')){
- $http.get("jcs_admin/clearItem?keyName="+key+"&cacheName="+cacheName).success(function(response){$scope.regions=response;});
- }
- };
-
- $scope.showRegionDetails = function(cacheName) {
- $http.get("jcs_admin/showRegionDetails?cacheName="+cacheName).success(function(response){modalService.showSuccess('',response);});
- };
-
- $scope.showItemDetails = function(cacheName,key) {
- $http.get("jcs_admin/showItemDetails?keyName="+key+"&cacheName="+cacheName).success(function(response){
- var message = "CacheName: "+ response.cacheName
- +"\nkey: "+response.key
- +"\nIS_SPOOL: "+response.attr.IS_SPOOL
- +"\nIS_LATERAL: "+response.attr.IS_LATERAL
- +"\nIS_REMOTE: "+response.attr.IS_REMOTE
- +"\nIS_ETERNAL: "+response.attr.IS_ETERNAL
- +"\nversion: "+response.attr.version
- +"\nmaxLifeSeconds: "+response.attr.maxLifeSeconds
- +"\nmaxIdleTimeSeconds: "+response.attr.maxIdleTimeSeconds
- +"\nsize: "+response.attr.size
- +"\ncreateTime: "+response.attr.createTime
- +"\nlastAccessTime: "+response.attr.lastAccessTime
- +"\nidleTime: "+response.attr.idleTime
- +"\ntimeToLiveSeconds: "+response.attr.timeToLiveSeconds
- +"\nisSpool: "+response.attr.isSpool
- +"\nisLateral: "+response.attr.isLateral
- +"\nisRemote: "+response.attr.isRemote
- +"\nisEternal: "+response.attr.isEternal;
- modalService.showSuccess('',message);});
- };
-});
-</script>
diff --git a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/meta.jsp b/ecomp-portal-BE/war/WEB-INF/fusion/jsp/meta.jsp
deleted file mode 100644
index 1899b79f..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/meta.jsp
+++ /dev/null
@@ -1,35 +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.
- ================================================================================
- --%>
-<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/demo.css" >
- <link rel="stylesheet" type="text/css" href="static/ebz/sandbox/styles/base.css" >
- <link rel="stylesheet" type="text/css" href="static/ebz/sandbox/styles/btn.css" >
- <link rel="stylesheet" type="text/css" href="static/ebz/sandbox/styles/dtpk.css" >
- <link rel="stylesheet" type="text/css" href="static/ebz/sandbox/styles/frms.css" >
- <link rel="stylesheet" type="text/css" href="static/ebz/sandbox/styles/sldr.css" >
- <link rel="stylesheet" type="text/css" href="static/ebz/sandbox/styles/style.css" >
- <link rel="stylesheet" type="text/css" href="static/ebz/sandbox/styles/tbs.css" >
-
-</head>
diff --git a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/popup_modal.html b/ecomp-portal-BE/war/WEB-INF/fusion/jsp/popup_modal.html
deleted file mode 100644
index 82c5616f..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/popup_modal.html
+++ /dev/null
@@ -1,311 +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.
- ================================================================================
- -->
-
-<script type="text/ng-template" id="modal_informative.html">
- <div class="modal__informative font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Success!</h2>
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content" style="white-space: pre-wrap;">{{message.text}}</div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Dismiss</button>
- </div>
- </div>
- </script>
-
-
- <script type="text/ng-template" id="delete_informative.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are you sure you want to delete the profile?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="email_report_informative.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Mailing your report...</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- The report will be sent to your email soon!
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Ok</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="delete_authCode.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are you sure you want to delete the Authorization Code(s)?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="delete_Schedule.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are You Sure You Want to Delete This Schedule(s) ?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="alternate_number.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are You Sure You Want to Delete This Number ?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="manage_device.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are You Sure You Want to Delete This Line Port ?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="delete_virtualOnNet.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are You Sure You Want to Delete this Virtual On-Net User?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="delete_user_meet_me_conference.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are You Sure You Want to Delete this Conference?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="confirmation_informative.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">{{message.title}}</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content" style="white-space: pre-wrap;">{{message.text}}<br/></div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
-
- <script type="text/ng-template" id="confirmation_for_delete.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name"> <h2 class="font-showcase-font-name">Are You Sure You Want to Delete This {{message.title}}?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">Deletions are not reversible. {{message.text}}<br/></div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
-
- <script type="text/ng-template" id="modal_warning.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Unable to process your request!</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content" style="white-space: pre-wrap;">Unable to process your request. <br/>{{message.text}}<br/>
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Dismiss</button>
- </div>
- </div>
- </script>
-
- <script type="text/ng-template" id="modal_warning_message.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Warning</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content" style="white-space: pre-wrap;">{{message.text}}<br/>
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Dismiss</button>
- </div>
- </div>
- </script>
-
-
-
- <script type="text/ng-template" id="modal_prompt.html">
- <div class="modal__warning font-showcase">
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Unable to process your request. </h2>
- <i class="icon-circle-action-close close-modal modal__header--close" ng-click="$dismiss()"></i>
-
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Unable to process your request. <br/> {{message.text}}
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="delete_device.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are You Sure You Want to Delete This Device?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="delete_multiple_device.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are You Sure You Want to Delete The Device(s)?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
-
-<script>
-
-//.controller('modalpopupController', function ($scope, $modalInstance){
-var modalpopupController = function ($scope, $modalInstance, message){
-
- $scope.message = message;
-
-
- $scope.hello = function () {
- $modalInstance.close($scope.digitPattern);
- };
- $modalInstance.ok = function() {
- //add the ok functionality
- alert("Logout");
- };
- $modalInstance.cancel = function() {
- //add the cancel functionality
- alert("Keep Log in");
- };
- $modalInstance.cancelbutton = function() {
- //add the cancel functionality
- alert("Modal Waring popup close event");
- };
-}
-
-
-</script>
diff --git a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/popup_modal_role.html b/ecomp-portal-BE/war/WEB-INF/fusion/jsp/popup_modal_role.html
deleted file mode 100644
index eae53e4f..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/popup_modal_role.html
+++ /dev/null
@@ -1,257 +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.
- ================================================================================
- -->
-
-<script type="text/ng-template" id="role_functions_popup.html">
- <div class="modal__informative font-showcase" style="width:700px;">
- <div class="modal__header">
- <h2 class="font-showcase-font-name" style="width: 500px;">Select Role Functions</h2>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- <table table-data="availableRoleFunctions" att-table>
- <thead att-table-row type="header">
- <tr>
- <th att-table-header sortable="false" width="10%"> </th>
- <th att-table-header sortable="false" width="90%">Role Function</th>
- </tr>
- </thead>
- <tbody att-table-row type="body" row-repeat="availableRoleFunction in availableRoleFunctions track by availableRoleFunction.code" style="max-height: 980px;" >
- <tr>
-
- <td width="10%">
- <div ng-click="toggleRoleFunction(availableRoleFunction.selected,availableRoleFunction);">
- <input type="checkbox" ng-model="availableRoleFunction.selected" att-toggle-main>
- </div>
- </td>
- <td width="90%">{{ availableRoleFunction.name }}</td>
-
- </tr>
- </tbody>
- </table>
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="close()">Close</button>
- </div>
- </div>
-</script>
-
-
-<script type="text/ng-template" id="child_roles_popup.html">
- <div class="modal__informative font-showcase" style="width:700px;">
- <div class="modal__header">
- <h2 class="font-showcase-font-name" style="width: 500px;">Select Child Roles</h2>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- <table table-data="availableRoles" att-table>
- <thead att-table-row type="header">
- <tr>
- <th att-table-header sortable="false" width="10%"> </th>
- <th att-table-header sortable="false" width="90%">Role</th>
- </tr>
- </thead>
- <tbody att-table-row type="body" row-repeat="availableRole in availableRoles track by availableRole.id" style="max-height: 980px;" ><!-- background colors will alternate not properly with multiple tbody-->
- <tr>
- <td att-table-body width="10%">
- <div ng-click="toggleChildRole(availableRole.selected,availableRole);">
- <input type="checkbox" ng-model="availableRole.selected" att-toggle-main>
- </div>
- </td>
- <td att-table-body width="90%">{{ availableRole.name }}</td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="close()">Close</button>
- </div>
- </div>
-</script>
-
-<script>
-
-var rolepopupController = function ($scope, $modalInstance, role){
- $scope.role = 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};
-
- $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.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 = "role/removeRoleFunction.htm?role_id=${param.role_id}";
- if (confirm("You are about to remove the role funtcion "+availableRoleFunction.name+" from the role for "+$scope.role.name+". Do you want to continue?")) {
-
- var postData={roleFunction:availableRoleFunction};
- $.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){
- alert("Error while saving.");
- }
- });
- } else {
- availableRoleFunction.selected=true;
- }
- } else {
- //add role function
- if(role.id==null){
- $scope.role.roleFunctions.push(availableRoleFunction);
- return;
- }
- var uuu = "role/addRoleFunction.htm?role_id=${param.role_id}";
-
- var postData={roleFunction:availableRoleFunction};
- $.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){
- alert("Error while saving.");
- }
- });
- }
-
-
- };
-
- $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 = "role/removeChildRole.htm?role_id=${param.role_id}";
- if (confirm("You are about to remove the child role "+availableRole.name+" from the role for "+$scope.role.name+". Do you want to continue?")) {
-
- var postData={childRole:availableRole};
- $.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){
- alert("Error while saving.");
- }
- });
- } else {
- availableRole.selected=true;
- }
- } else {
- //add role
- if(role.id==null){
- $scope.role.childRoles.push(availableRole);
- return;
- }
- var uuu = "role/addChildRole.htm?role_id=${param.role_id}";
-
- var postData={childRole:availableRole};
- $.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){
- alert("Error while saving.");
- }
- });
- }
-
-
- };
-
-
- $scope.close = function() {
- console.log('role', $scope.role);
- $modalInstance.close({role:$scope.role});
- };
-
-}
-
-
-</script>
diff --git a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/popup_modal_rolefunction.html b/ecomp-portal-BE/war/WEB-INF/fusion/jsp/popup_modal_rolefunction.html
deleted file mode 100644
index 958333de..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/popup_modal_rolefunction.html
+++ /dev/null
@@ -1,87 +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.
- ================================================================================
- -->
-<script type="text/ng-template" id="edit_role_function_popup.html">
- <div class="modal__informative font-showcase" style="width:400px;">
- <div class="modal__header">
- <h2 class="font-showcase-font-name" style="width: 500px;">{{label}}</h2>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Name:</label><br>
- <input type="text" class="fn-ebz-text" ng-model="editRoleFunction.name"
- maxlength="30" />
- </div>
- <br/>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Code:</label><br>
- <input type="text" class="fn-ebz-text" ng-model="editRoleFunction.code" ng-disabled="disableCd"
- maxlength="30" />
- </div>
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="saveRoleFunction(editRoleFunction);">Save</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="close()">Close</button>
- </div>
- </div>
-</script>
-
-<script>
-
-var rolefunctionpopupController = function ($scope, $modalInstance, message){
- if(message.availableRoleFunction==null)
- $scope.label='Add Role Function'
- else{
- $scope.label='Edit Role Function'
- $scope.disableCd=true;
- }
- $scope.editRoleFunction = message.availableRoleFunction;
-
- $scope.saveRoleFunction = function(availableRoleFunction) {
- var uuu = "role_function_list/saveRoleFunction.htm";
- var postData={availableRoleFunction: availableRoleFunction};
- $.ajax({
- type : 'POST',
- url : uuu,
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success : function(data){
- $scope.$apply(function(){
- //$scope.availableRoleFunctions=[];$scope.$apply();
- $scope.availableRoleFunctions=data.availableRoleFunctions;});
- //alert("Update Successful.") ;
- console.log($scope.availableRoleFunctions);
-
- //$scope.editRoleFunction = null;
- $modalInstance.close({availableRoleFunctions:$scope.availableRoleFunctions});
- },
- error : function(data){
- alert("Error while saving.");
- }
- });
- };
-
- $scope.close = function() {
- $modalInstance.close();
- };
-}
-
-</script>
diff --git a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/post_search.jsp b/ecomp-portal-BE/war/WEB-INF/fusion/jsp/post_search.jsp
deleted file mode 100644
index 3e0b16ab..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/post_search.jsp
+++ /dev/null
@@ -1,370 +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.
- ================================================================================
- --%>
-<%@ page import="java.util.*" %>
-<%@ page import="com.fasterxml.jackson.databind.ObjectMapper" %>
-<%@ page import="org.json.JSONObject" %>
-
-<%-- <%@ include file="/WEB-INF/fusion/jsp/include.jsp"%> --%>
-
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
-
-<link rel="stylesheet" type="text/css" href="static/fusion/css/jquery-ui.css">
-
-<script src= "static/ebz/angular_js/angular.js"></script>
-<script src= "static/ebz/angular_js/angular-sanitize.js"></script>
-<script src="static/ebz/sandbox/att-abs-tpls.js" type="text/javascript"></script>
-<script src= "static/ebz/angular_js/app.js"></script>
-<script src= "static/ebz/angular_js/gestures.js"></script>
-<script src="static/js/jquery-1.10.2.js"></script>
-<script src="static/js/modalService.js"></script>
-<script src="static/js/jquery.mask.min.js" type="text/javascript"></script>
-<script src="static/js/jquery-ui.js" type="text/javascript"></script>
-
-<div ng-controller="postSearchController" >
-
-<h1 class="heading1" style="margin-top:20px;">WEBPHONE Search</h1>
- <%-- <h3>
- <div class="pageTitle"><fmt:message key="post-search.title"/></div>
- </h3> --%>
- <br>
- Please enter search criteria below:<br/>
-
- <div class="fn-ebz-container">
- Last Name:<br/>
- <input class="fn-ebz-text" type="text" ng-model="postSearchBean.lastName" value="" size="25">
- </div>
-
- <div class="fn-ebz-container">
- First Name:<br/>
- <input class="fn-ebz-text" type="text" ng-model="postSearchBean.firstName" value="" size="25">
- </div>
-
- <div class="fn-ebz-container">
- ATTUID:<br/>
- <input class="fn-ebz-text" type="text" ng-model="postSearchBean.sbcid" value="" size="25">
- </div>
-
- <div class="fn-ebz-container">
- Manager ATTUID:<br/>
- <input class="fn-ebz-text" type="text" ng-model="postSearchBean.managerAttuid" value="" size="25">
- </div>
- <br>
- <div class="fn-ebz-container">
- Organization:<br/>
- <input class="fn-ebz-text" type="text" ng-model="postSearchBean.orgCode" value="" size="25">
- </div>
-
- <div class="fn-ebz-container">
- Email:<br/>
- <input class="fn-ebz-text" type="text" ng-model="postSearchBean.email" value="" size="25">
- </div>
- <br>
-<!-- Sort By: <br/>
- <div class="fn-ebz-container" >
-
- <div class="fn-ebz-container">
- <div class="form-field" att-select="sortByList" ng-model="postSearchBean.sortBy1"></div>
- </div>
- </div>
-
-
-
-
- <div class="fn-ebz-container" >
- <br/>
- &nbsp;
-
- <div class="fn-ebz-container">
- <div class="form-field" att-select="sortByList" ng-model="postSearchBean.sortBy2"></div>
- </div>
- </div>
-
-
- <div class="fn-ebz-container" >
- <br/> &nbsp;
-
- <div class="fn-ebz-container">
- <div class="form-field" att-select="sortByList" ng-model="postSearchBean.sortBy3"></div>
- </div>
- </div> -->
- <div>
- <input att-button btn-type="primary" size="small" class="button" type="submit" value="Search" ng-click="search(postSearchBean);" />
-
- <input att-button btn-type="primary" size="small" class="button" type="submit" value="Reset" ng-click="reset();"/>
- </div>
- <br>
- {{noResultsString}}
- <div ng-if="profileList.length != 0">
- <table att-table table-data="profileList" view-per-page="viewPerPage" current-page="currentPage" search-category="searchCategory" search-string="searchString" total-page="totalPage">
- <thead att-table-row type="header" >
- <tr>
- <th att-table-header width="5%" align="left">No</th>
- <th att-table-header width="30%" key="lastName" align="left">Name</th>
- <th att-table-header width="5%" key="sbcid" align="left">ATTUID</th>
- <th att-table-header width="10%" key="orgCode" align="left">Organization</th>
- <th att-table-header width="20%" align="left">Phone</th>
- <th att-table-header width="20%" key="email" align="left">Email</th>
- <th att-table-header width="10%" align="left">Import?</th>
- </tr>
- </thead>
-
- <tbody att-table-row type="body" row-repeat="profile in profileList" style="max-height: 980px;" ><!-- background colors will alternate not properly with multiple tbody-->
- <tr >
- <td att-table-body width="5%" align="left">
- {{$index + 1}}
- </td>
- <td att-table-body width="30%" align="left">
- <div ng-if="ngexistingUsers[profile.sbcid] == null">
- {{profile.lastName}},&nbsp;{{profile.firstName}}
- </div>
- <div ng-if="ngexistingUsers[profile.sbcid] != null">
- <a href="profile.htm?profile_id={{ngexistingUsers[profile.sbcid]}}" alt="View/Edit Profile">
- {{profile.lastName}},&nbsp;{{profile.firstName}}
- </a>
- </div>
-
- </td>
- <td att-table-body width="5%" align="left">
- {{profile.sbcid}}
- </td>
- <td att-table-body width="10%" align="left">
- {{profile.orgCode}}
- </td>
- <td att-table-body width="20%" align="left">
- {{profile.phone}}
- </td>
- <td att-table-body width="20%" align="left">
- {{profile.email}}
- </td>
-
- <td att-table-body width="10%" align="left">
- <div ng-if="ngexistingUsers[profile.sbcid] == null">
- <div ng-click="toggleSelection(profile);">
- <input name="selected" type="checkbox" ng-model="profile.selected" att-checkbox/>
- </div>
- </div>
- <div ng-if="ngexistingUsers[profile.sbcid] != null">
- Exists
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- <div class="fn-ebz-container">
- Rows Per Page:
- <input class="fn-ebz-text" type="text" ng-model="viewPerPage" size="5" style="width: 47px;">
- </div>
- <div class="fn-ebz-container">
- Current Page:
- <input class="fn-ebz-text" type="text" ng-model="currentPage" size="5" style="width: 47px;">
- </div>
- <div class="fn-ebz-container">
- Total Page(s):
- <input class="fn-ebz-text" type="text" ng-model="totalPage" size="5" readonly="true" style="width: 47px;">
- </div>
-
- <div ng-if="profileList.length != 0">
- <input att-button btn-type="primary" size="small" class="button" type="submit" value="Import" ng-click="process();"/>
- </div>
-
- </div>
-
-
-
-
-</div>
-<script>
- app.controller('postSearchController', function ($scope){
-
- $scope.viewPerPage = 200;
- $scope.currentPage = 1;
- $scope.totalPage;
- $scope.searchCategory = "";
- $scope.searchString = "";
-
- $scope.noResultsString = "";
-
- $scope.postSearchBean=${postSearchBean};
- $scope.profileList=${profileList};
- //console.log($scope.postSearchBean);
-
- $scope.ngexistingUsers=${existingUsers};
- console.log($scope.ngexistingUsers);
-
- $scope.ocisortByList=${sortByList};
- $scope.sortByList = [];
- if($scope.ocisortByList)
- $.each($scope.ocisortByList, function(i, a){
- var sortBy = {"index":i, "value":a.value, "title":a.label};
- $scope.sortByList.push(sortBy);
- });
- ;
-
- $scope.search = function(postSearchBean) {
- console.log(postSearchBean);
- var uuu = "post_search/search";
- var postData={postSearchBean:postSearchBean};
- $.ajax({
- type : 'POST',
- url : uuu,
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success : function(data){
- $scope.$apply(function(){
- $scope.profileList=data.postSearchBean.searchResult;
- //$scope.postSearchBean={};
- console.log($scope.profileList);
- if($scope.profileList.length == 0)
- $scope.noResultsString = "There is currently no one matching your search criteria.";
- else
- $scope.noResultsString = "";
- });
- },
- error : function(data){
- console.log(data);
- alert("Error while searching: "+ data.responseText);
- }
- });
-
- };
-
- $scope.reset = function() {
- $scope.postSearchBean={};
- $scope.profileList=[];
- $scope.noResultsString = "";
- //console.log($scope.postSearchBean);
- };
-
- $scope.process = function() {
- $scope.prepareProfileSelection();
- var uuu = "post_search/process";
- var postData={postSearchBean:$scope.postSearchBean};
- $.ajax({
- type : 'POST',
- url : uuu,
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success : function(data){
- $scope.$apply(function(){
- $scope.profileList=data.postSearchBean.searchResult;
- //$scope.postSearchBean={};
- $scope.ngexistingUsers=data.existingUsers;
- $scope.postSearchBean.selected=null;
- });
- },
- error : function(data){
- console.log(data);
- alert("Error while searching: "+ data.responseText);
- }
- });
-
- };
- $scope.importProfileList=[];
- $scope.toggleSelection = function(profile) {
- if(profile.selected)
- $scope.importProfileList.push(profile);
- else{
- var index = $scope.importProfileList.indexOf(profile);
- if(index>=0)
- $scope.importProfileList.splice(index, 1);
- }
- };
-
- $scope.prepareProfileSelection = function() {
- if($scope.importProfileList)
- $.each($scope.importProfileList, function(i, profile){
- $scope.preparePostSearchBean(profile);
- });
- ;
- }
-
- $scope.preparePostSearchBean = function(profile) {
- //console.log('Importing: '+profile.sbcid);
- //console.log('ngexistinguser:'+$scope.ngexistingUsers[profile.sbcid])
- if($scope.postSearchBean.selected==null){
- $scope.postSearchBean.selected=[];
- $scope.postSearchBean.postSbcid=[];
- $scope.postSearchBean.postHrid=[];
- $scope.postSearchBean.postFirstName=[];
- $scope.postSearchBean.postLastName=[];
- $scope.postSearchBean.postOrgCode=[];
- $scope.postSearchBean.postPhone=[];
- $scope.postSearchBean.postEmail=[];
- $scope.postSearchBean.postAddress1=[];
- $scope.postSearchBean.postAddress2=[];
- $scope.postSearchBean.postCity=[];
- $scope.postSearchBean.postState=[];
- $scope.postSearchBean.postZipCode=[];
- $scope.postSearchBean.postLocationClli=[];
- $scope.postSearchBean.postBusinessCountryCode=[];
- $scope.postSearchBean.postBusinessCountryName=[];
- $scope.postSearchBean.postDepartment=[];
- $scope.postSearchBean.postDepartmentName=[];
- $scope.postSearchBean.postBusinessUnit=[];
- $scope.postSearchBean.postBusinessUnitName=[];
- $scope.postSearchBean.postJobTitle=[];
- $scope.postSearchBean.postManagerAttuid=[];
- $scope.postSearchBean.postCommandChain=[];
- $scope.postSearchBean.postCompanyCode=[];
- $scope.postSearchBean.postCompany=[];
- $scope.postSearchBean.postCostCenter=[];
- $scope.postSearchBean.postSiloStatus=[];
- $scope.postSearchBean.postFinancialLocCode=[];
- }
-
- $scope.postSearchBean.selected.push(profile.sbcid);
- $scope.postSearchBean.postSbcid.push(profile.sbcid);
- $scope.postSearchBean.postHrid.push(profile.hrid);
- $scope.postSearchBean.postFirstName.push(profile.firstName);
- $scope.postSearchBean.postLastName.push(profile.lastName);
- $scope.postSearchBean.postOrgCode.push(profile.orgCode);
- $scope.postSearchBean.postPhone.push(profile.phone);
- $scope.postSearchBean.postEmail.push(profile.email);
- $scope.postSearchBean.postAddress1.push(profile.address1);
- $scope.postSearchBean.postAddress2.push(profile.address2);
- $scope.postSearchBean.postCity.push(profile.city);
- $scope.postSearchBean.postState.push(profile.state);
- if(profile.zipCodeSuffix==null)
- $scope.postSearchBean.postZipCode.push(profile.zipCode);
- else
- $scope.postSearchBean.postZipCode.push(profile.zipCode+'-'+profile.zipCodeSuffix);
- $scope.postSearchBean.postLocationClli.push(profile.locationClli);
- $scope.postSearchBean.postBusinessCountryCode.push(profile.businessCountryCode);
- $scope.postSearchBean.postBusinessCountryName.push(profile.businessCountryName);
- $scope.postSearchBean.postDepartment.push(profile.department);
- $scope.postSearchBean.postDepartmentName.push(profile.departmentName);
- $scope.postSearchBean.postBusinessUnit.push(profile.businessUnit);
- $scope.postSearchBean.postBusinessUnitName.push(profile.businessUnitName);
- $scope.postSearchBean.postJobTitle.push(profile.jobTitle);
- $scope.postSearchBean.postManagerAttuid.push(profile.managerAttuid);
- $scope.postSearchBean.postCommandChain.push(profile.commandChain);
- $scope.postSearchBean.postCompanyCode.push(profile.companyCode);
- $scope.postSearchBean.postCompany.push(profile.company);
- $scope.postSearchBean.postCostCenter.push(profile.costCenter);
- $scope.postSearchBean.postSiloStatus.push(profile.siloStatus);
- $scope.postSearchBean.postFinancialLocCode.push(profile.financialLocCode);
- };
-
- });
-</script>
diff --git a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/profile.jsp b/ecomp-portal-BE/war/WEB-INF/fusion/jsp/profile.jsp
deleted file mode 100644
index 7e10a213..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/profile.jsp
+++ /dev/null
@@ -1,442 +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.
- ================================================================================
- --%>
-<%@ page import="org.openecomp.portalsdk.core.domain.User"%>
-<%@ page import="org.openecomp.portalsdk.core.web.support.UserUtils"%>
-
-<%@page import="org.openecomp.portalsdk.core.web.support.ControllerProperties"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
-
-<link rel="stylesheet" type="text/css" href="static/fusion/css/jquery-ui.css">
-
-<script src= "static/ebz/angular_js/angular.js"></script>
-<script src= "static/ebz/angular_js/angular-sanitize.js"></script>
-<script src="static/ebz/sandbox/att-abs-tpls.js" type="text/javascript"></script>
-<script src= "static/ebz/angular_js/app.js"></script>
-<script src= "static/ebz/angular_js/gestures.js"></script>
-
-<script src="static/js/jquery-1.10.2.js"></script>
-<script src="static/js/modalService.js"></script>
-<script src="static/js/jquery.mask.min.js" type="text/javascript"></script>
-<script src="static/js/jquery-ui.js" type="text/javascript"></script>
-
-
-
-<link rel="stylesheet" type="text/css" href="static/ebz/fn-ebz.css" >
-<link rel="stylesheet" type="text/css" href="static/ebz/sandbox.css" >
-<link rel="stylesheet" type="text/css" href="static/ebz/sandbox/sandbox-base.css" >
-<link rel="stylesheet" type="text/css" href="static/ebz/sandbox/sandbox-buttons.css" >
-<link rel="stylesheet" type="text/css" href="static/ebz/sandbox/sandbox-datepicker.css" >
-<link rel="stylesheet" type="text/css" href="static/ebz/sandbox/sandbox-forms.css" >
-<link rel="stylesheet" type="text/css" href="static/ebz/sandbox/sandbox-slider.css" >
-<link rel="stylesheet" type="text/css" href="static/ebz/sandbox/sandbox-tables.css" >
-<link rel="stylesheet" type="text/css" href="static/ebz/sandbox/ui-charts-tpls.css" >
-<link rel="stylesheet" type="text/css" href="static/ebz/icons/style.css" >
-<%@ include file="/WEB-INF/fusion/jsp/include.jsp"%>
-
-<div class="pageTitle">
- <h3>
- <c:choose>
- <c:when test="${!empty profileId}">
- <h1 class="heading1" style="margin-top:20px;">Profile Edit</h1>
- </c:when>
- <c:otherwise>
- <h1 class="heading1" style="margin-top:20px;">Profile Edit</h1>
- </c:otherwise>
- </c:choose>
- </h3>
-</div>
-
-<div ng-controller="profileController" >
-
- Please edit the profile details below:&nbsp;<br><br>
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>First Name:</label><BR>
- <input type="text" class="fn-ebz-text" ng-model="profile.firstName"
- maxlength="30" />
- </div>
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Last Name:</label><BR>
- <input type="text" class="fn-ebz-text" ng-model="profile.lastName"
- maxlength="30" />
- </div>
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">OrgUserId:</label><BR>
- <input type="text" class="fn-ebz-text" ng-model="profile.orgUserId"
- maxlength="30" style="margin-right:0px;"/>
- </div>
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Manager OrgUserId:</label><BR>
- <input type="text" class="fn-ebz-text" ng-model="profile.orgManagerUserId"
- maxlength="30" style="margin-right:0px;"/>
- </div>
-<BR>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Login Id:</label><BR>
- <input type="text" class="fn-ebz-text" ng-model="profile.loginId"
- maxlength="30" />
- </div>
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Password:</label><BR>
- <input type="password" att-form-field ng-model="profile.loginPwd"
- maxlength="30" />
- </div>
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Phone:</label><BR>
- <input type="text" class="fn-ebz-text" ng-model="profile.phone"
- maxlength="30" />
- </div>
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Fax:</label><BR>
- <input type="text" class="fn-ebz-text" ng-model="profile.fax"
- maxlength="30" />
- </div>
-<BR>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Cellular:</label><BR>
- <input type="text" class="fn-ebz-text" ng-model="profile.cellular"
- maxlength="30" />
- </div>
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Email:</label><BR>
- <input type="text" class="fn-ebz-text" ng-model="profile.email"
- maxlength="30" />
- </div>
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Address 1:</label><BR>
- <input type="text" class="fn-ebz-text" ng-model="profile.address1"
- maxlength="30" />
- </div>
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Address 2:</label><BR>
- <input type="text" class="fn-ebz-text" ng-model="profile.address2"
- maxlength="30" />
- </div>
-<BR>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">City:</label><BR>
- <input type="text" class="fn-ebz-text" ng-model="profile.city"
- maxlength="30" />
- </div>
-
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">State:</label><BR>
- <div class="form-field" att-select="stateList.options" ng-model="stateList.selected"></div>
- </div>
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Zip Code:</label><BR>
- <input type="text" class="fn-ebz-text" ng-model="profile.zipCode"
- maxlength="30" />
- </div>
-
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Country:</label><BR>
- <div class="form-field" att-select="countries" ng-model="selectedCountry"></div>
- </div>
- <BR>
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Time Zone:</label><BR>
- <div class="form-field" att-select="timeZones" ng-model="selectedTimeZone"></div>
- </div>
-
- <div align="left" >
- <button type="submit" ng-click="saveProfile();" att-button
- btn-type="primary" size="small">Save</button>
- </div>
-
-<br>
- <div class="pageTitle">
- <label>Roles</label>
- <a ng-click="addNewRolePopup();" class="icon-add" size="small"></a>
-
- </div>
-
- <table att-table table-data="profile.roles" view-per-page="viewPerPage" current-page="currentPage" search-category="searchCategory" search-string="searchString" total-page="totalPage">
-<!-- <table border="1" class="hovertable_1"> -->
- <thead att-table-row type="header">
- <tr>
- <th att-table-header sortable="false" align="left" width="90%">Name</th>
- <th att-table-header sortable="false" width="10%">Remove?</th>
- </tr>
- </thead>
- <tbody att-table-row type="body" row-repeat="role in profile.roles" style="max-height: 980px;" ><!-- background colors will alternate not properly with multiple tbody-->
-<!-- <tr ng-repeat="role in profile.roles track by role.id"> -->
- <tr>
- <td att-table-body width="90%" >{{ role.name }}</td>
- <td att-table-body width="10%">
- <a ng-click="removeRole(role);" ><img src="static/fusion/images/deleteicon.gif"></a>
- </td>
- </tr>
- </tbody>
- </table>
-
-
- <div id="dialog" title="Select Roles">
- <table table-data="availableRoles" att-table >
- <thead att-table-row type="header">
- <tr>
- <th att-table-header sortable="false" width="10%"> </th>
- <th att-table-header sortable="false" width="90%">Role</th>
- </tr>
- </thead>
-
- <tbody att-table-row type="body" row-repeat="availableRole in availableRoles" style="max-height: 980px;" ><!-- background colors will alternate not properly with multiple tbody-->
- <tr>
- <td att-table-body width="10%">
- <div ng-click="toggleRole(availableRole.selected,availableRole);">
- <input type="checkbox" ng-model="availableRole.selected" att-toggle-main>
- </div>
- </td>
- <td att-table-body width="90%">{{ availableRole.name }}</td>
- </tr>
- </tbody>
- </table>
- </div>
-
-</div>
-
-
-
-<script>
-app.controller('profileController', function ($scope){
-
- $scope.profile=${model.profile};
- $scope.sbcid=$scope.profile.sbcid;
- $scope.managerAttuid=$scope.profile.managerAttuid;
-
- $scope.viewPerPage = 2;
- $scope.currentPage = 1;
- $scope.totalPage;
- $scope.searchCategory = "";
- $scope.searchString = "";
-
- $( "#dialog" ).hide();
-
- $scope.ociavailableRoles=${model.availableRoles};
- //modalService.showFailure('Error','') ;
- $scope.availableRoles = [];
- if($scope.ociavailableRoles)
- $.each($scope.ociavailableRoles, function(i, a){
- var availableRole = a;
- availableRole.selected = false;
- $.each($scope.profile.roles, function(j, b){
- if(a.id === b.id) {
- availableRole.selected = true;
- }
- });
- $scope.availableRoles.push(availableRole);
- });
- ;
-
- $scope.ociTimeZones = ${model.timeZones};
- $scope.timeZones = [];
- $scope.selectedTimeZone = null;
- if($scope.ociTimeZones){
- $.each($scope.ociTimeZones, function(i, a){
- var timeZone = {"index":i, "value":a.value, "title":a.label};
- $scope.timeZones.push(timeZone);
- if($scope.profile.timeZoneId !== null && a.value === $scope.profile.timeZoneId.toString()){
- $scope.selectedTimeZone = timeZone;
- }
- });
- };
-
- $scope.ociCountries = ${model.countries};
- $scope.countries = [];
- $scope.selectedCountry = null;
- //alert($scope.ociCountries[0].label);
- if($scope.ociCountries)
- $.each($scope.ociCountries, function(i, a){
- var country = {"index":i, "value":a.value, "title":a.label};
- $scope.countries.push(country);
- if(a.value === $scope.profile.country){
- $scope.selectedCountry = country;
- }
- });
- ;
-
- var stateList=${model.stateList};
- //alert(stateList[0].label);
- stateList = stateList== null? []: stateList;
- var selectedState= $scope.profile.state ? $scope.profile.state:"";
- $scope.stateList = initDropdownWithLookUp(stateList,selectedState );
-
- $scope.saveProfile = function() {
- var uuu = "profile/saveProfile?profile_id=${param.profile_id}";
- var postData={profile: $scope.profile,
- selectedCountry:$scope.selectedCountry!=null?$scope.selectedCountry.value:"",
- selectedState:$scope.stateList.selected!=null?$scope.stateList.selected.value:"",
- selectedTimeZone:$scope.selectedTimeZone!=null?$scope.selectedTimeZone.value:""
- };
- $.ajax({
- type : 'POST',
- url : uuu,
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success : function(data){
- alert("Update Successful.") ;
- },
- error : function(data){
- alert("Error while saving.");
- }
- });
- };
-
- $scope.addNewRolePopup = function(role) {
- $( "#dialog" ).dialog({
- modal: true
- });
- };
-
- $scope.toggleRole = function(selected,availableRole) {
- //alert('toggleRole: '+selected);
- if(!selected) {
- //remove role
- var uuu = "profile/removeRole?profile_id=${param.profile_id}";
- if (confirm("You are about to remove the role "+availableRole.name+" from the profile for "+$scope.profile.firstName+" "+$scope.profile.lastName+". Do you want to continue?")) {
-
- var postData={role:availableRole};
- $.ajax({
- type : 'POST',
- url : uuu,
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success : function(data){
- $scope.$apply(function(){$scope.profile=data;});
- },
- error : function(data){
- alert("Error while saving.");
- }
- });
- } else {
- availableRole.selected=true;
- }
- } else {
- //add role
- var uuu = "profile/addNewRole?profile_id=${param.profile_id}";
- if (confirm("You are about to add the role "+availableRole.name+" from the profile for "+$scope.profile.firstName+" "+$scope.profile.lastName+". Do you want to continue?")) {
- var postData={role:availableRole};
- $.ajax({
- type : 'POST',
- url : uuu,
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success : function(data){
- $scope.$apply(function(){$scope.profile=data;});
- },
- error : function(data){
- alert("Error while saving.");
- }
- });
- }
- }
-
-
- };
-
- $scope.removeRole = function(role) {
- if (confirm("You are about to remove the role "+role.name+" from the profile for "+$scope.profile.firstName+" "+$scope.profile.lastName+". Do you want to continue?")) {
- //alert('deleted'+role.name);
- var uuu = "profile/removeRole?profile_id=${param.profile_id}";
- 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.profile=data;
- $.each($scope.availableRoles, function(k, c){
- if(c.id === role.id) {
- c.selected = false;
- }
- });
- });
-
- },
- error : function(data){
- alert("Error while saving.");
- }
- });
- }
-
- };
-
- function initDropdownWithLookUp(arr,selectedValue){
- var dropdownArray=[];
- var selected = null;
- if(arr){
- for(var i = 0,l = arr.length; i < l; i++) {
- var option = {
- "index" : i ,
- "value" : arr[i].value,
- "title" : arr[i].label
- };
- dropdownArray.push(option);
- if(arr[i].value === selectedValue){
- selected = option;
- }
- }
- }
- var dropDown={};
- dropDown.options = dropdownArray;
- dropDown.selected = selected;
- return dropDown;
- };
-
- $scope.doRolePopup = function() {
- var modalInstance = $modal.open({
- templateUrl: 'roles_popup.html',
- controller: 'rolepopupController',
- resolve: {
- message: function () {
- var message ={
- availableRoles: $scope.availableRoles
- };
- return message;
- }
- }
- });
- modalInstance.result.then(function (opts) {
- if(opts!=null){
- $scope.profile=opts.profile;
- }
- });
- }
-
-
-});
-</script>
diff --git a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/profile_search.jsp b/ecomp-portal-BE/war/WEB-INF/fusion/jsp/profile_search.jsp
deleted file mode 100644
index e7ad5762..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/profile_search.jsp
+++ /dev/null
@@ -1,100 +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.
- ================================================================================
- --%>
-<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/app.js"></script>
-<script src= "static/ebz/angular_js/gestures.js"></script>
-
-<script src="static/js/jquery-1.10.2.js"></script>
-<script src="static/js/modalService.js"></script>
-<script src="static/js/jquery.mask.min.js" type="text/javascript"></script>
-<script src="static/js/jquery-ui.js" type="text/javascript"></script>
-<script src="static/ebz/sandbox/att-abs-tpls.js" type="text/javascript"></script>
-<%@ include file="/WEB-INF/fusion/jsp/popup_modal.html" %>
-<div ng-controller="profileSearchController">
- <div>
- <h1 class="heading1" style="margin-top:20px;">Profile Search</h1>
- <div style="margin-top:30px">
- <table att-table table-data="tableData" view-per-page="viewPerPage" current-page="currentPage" search-category="searchCategory" search-string="searchString" total-page="totalPage">
-
- <thead att-table-row type="header">
- <tr>
- <th att-table-header key="id">User ID</th>
- <th att-table-header key="last_name">Last Name</th>
- <th att-table-header key="first_name">First Name</th>
- <th att-table-header key="email">Email</th>
- <th att-table-header key="sbcid">ATTUID</th>
- <th att-table-header key="manager_attuid">Manager ATTUID</th>
- <th att-table-header >Edit</th>
- <th att-table-header key="active">Active?</th>
- </tr>
- </thead>
- <tbody att-table-row type="body" row-repeat="rowData in tableData">
- <tr>
- <td att-table-body >{{rowData.id}}</td>
- <td att-table-body >{{rowData.lastName}}</td>
- <td att-table-body >{{rowData.firstName}}</td>
- <td att-table-body >{{rowData.email}}</td>
- <td att-table-body >{{rowData.sbcid}}</td>
- <td att-table-body >{{rowData.managerId}}</td>
- <td att-table-body ><a href="" ng-click="editRow(rowData.id)" class="icon-edit" style="color: #888;font-size:20px;"></a></td>
- <td att-table-body >
- <div ng-click="toggleProfileActive(rowData.id)">
- <input type="checkbox" ng-model="rowData.active" att-toggle-main>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <input ng-model="currentPage"></input>
-</div>
-
-<script>
-app.controller("profileSearchController", function ($scope,$http,modalService, $modal) {
- // Table Data
- $scope.tableData=${model.profileList};
- $scope.viewPerPage = 5;
- $scope.scrollViewsPerPage = 2;
- $scope.currentPage = 1;
- $scope.totalPage;
- $scope.searchCategory = "";
- $scope.searchString = "";
- modalService.showSuccess('','Modal Sample') ;
- for(x in $scope.tableData){
- if($scope.tableData[x].active_yn=='Y')
- $scope.tableData[x].active_yn=true;
- else
- $scope.tableData[x].active_yn=false;
- }
- $scope.editRow = function(profileId){
- window.location = 'profile?profile_id=' + profileId;
- }
-
- $scope.toggleProfileActive = function(profileId) {
- if (confirm("You are about to change user's active status. Do you want to continue?")) {
- $http.get("profile/toggleProfileActive?profile_id="+profileId).success(function(){});
- }
- };
-
-});
-</script>
diff --git a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/role.jsp b/ecomp-portal-BE/war/WEB-INF/fusion/jsp/role.jsp
deleted file mode 100644
index e1c100db..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/role.jsp
+++ /dev/null
@@ -1,298 +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.
- ================================================================================
- --%>
-
-<%@ include file="/WEB-INF/fusion/jsp/include.jsp"%> --%>
-
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
-
-<link rel="stylesheet" type="text/css" href="static/ebz/sandbox.css" >
-<link rel="stylesheet" type="text/css" href="static/fusion/css/jquery-ui.css">
-
-<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/jquery-1.10.2.js"></script>
-<script src="static/js/modalService.js"></script>
-<script src="static/js/jquery.mask.min.js" type="text/javascript"></script>
-<script src="static/js/jquery-ui.js" type="text/javascript"></script>
-<%@ include file="/WEB-INF/fusion/jsp/popup_modal_role.html" %>
-<style type="text/css">
- .bc-style{
- margin: 20px;
- align: left;
- }
-</style>
-<div class="bc-style">
- <ul class="breadcrumb" >
- <li><a href="welcome">Home</a></li>
- <li><a href="role_list">Roles</a></li>
- <li class="active">Role</li>
- </ul>
-</div>
-<div class="pageTitle">
-<h3>
- <c:choose>
- <c:when test="${!empty param.role_id}">
- <h1 class="heading1" style="margin-top:20px;">Role Edit</h1>
- </c:when>
- <c:otherwise>
- <h1 class="heading1" style="margin-top:20px;">Role Create</h1>
- </c:otherwise>
- </c:choose>
- </h3>
-</div>
-
-<div ng-controller="roleController" >
-
- <br>
- Please edit the role details below:&nbsp;<br>
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Name:</label><BR>
- <input type="text" class="fn-ebz-text" ng-model="role.name"
- maxlength="30" />
- </div>
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Priority:</label><BR>
- <input type="text" class="fn-ebz-text" ng-model="role.priority"
- maxlength="30" />
- </div>
-
- <div align="left" >
- <button type="submit" ng-click="saveRole();" att-button
- btn-type="primary" size="small">Save</button>
- </div>
-
- <br>
- <div class="pageTitle">
- <label>Role Functions</label>
- <a ng-click="addNewRoleFunctionModalPopup();" class="icon-add" size="small"></a>
- </div>
-
- <table table-data="role.roleFunctions" att-table >
- <thead att-table-row type="header">
- <tr>
- <th att-table-header sortable="false" align="left" width="90%">Name</th>
- <th att-table-header sortable="false" width="10%">Remove?</th>
- </tr>
- </thead>
- <tbody att-table-row type="body" row-repeat="roleFunction in role.roleFunctions track by roleFunction.code" style="max-height: 980px;" ><!-- background colors will alternate not properly with multiple tbody-->
- <tr>
- <td att-table-body width="90%" >{{ roleFunction.name }}</td>
- <td att-table-body width="10%">
- <div ng-click="removeRoleFunction(roleFunction);" style="font-size:20px;"><a href="javascript:void(0)" class="icon-trash"></a></div>
- </td>
- </tr>
- </tbody>
- </table>
- <a href="role_function_list.htm">Manage Role Functions</a><br><br>
-
- <div class="pageTitle">
- <label>Child Roles</label>
- <a ng-click="addNewChildRoleModalPopup();" class="icon-add" size="small"></a>
- </div>
-
- <table table-data="role.childRoles" att-table >
- <thead att-table-row type="header">
- <tr>
- <th att-table-header sortable="false" align="left" width="90%">Name</th>
- <th att-table-header sortable="false" width="10%">Remove?</th>
- </tr>
- </thead>
- <tbody att-table-row type="body" row-repeat="role in role.childRoles track by role.id" style="max-height: 980px;" >
- <tr>
- <td att-table-body width="90%" >{{ role.name }}</td>
- <td att-table-body width="10%">
- <div ng-click="removeChildRole(role);" style="font-size:20px;"><a href="javascript:void(0)" class="icon-trash"></a></div>
- </td>
- </tr>
- </tbody>
- </table>
-
- <div id="dialogChildRole" title="Select Child Roles">
- <table table-data="availableRoles" att-table>
- <thead att-table-row type="header">
- <tr>
- <th att-table-header sortable="false" width="10%"> </th>
- <th att-table-header sortable="false" width="90%">Role</th>
- </tr>
- </thead>
- <tbody att-table-row type="body" row-repeat="availableRole in availableRoles track by availableRole.id" style="max-height: 980px;" ><!-- background colors will alternate not properly with multiple tbody-->
- <tr>
- <td att-table-body width="10%">
- <div ng-click="toggleChildRole(availableRole.selected,availableRole);">
- <input type="checkbox" ng-model="availableRole.selected" att-toggle-main>
- </div>
- </td>
- <td att-table-body width="90%">{{ availableRole.name }}</td>
-
- </tr>
- </tbody>
- </table>
- </div>
-</div>
-
-
-
-<script>
-app.controller('roleController', function ($scope, modalService, $modal){
- $scope.role=${role};
- console.log($scope.role);
-
- $( "#dialogRoleFunction" ).hide();
- $( "#dialogChildRole" ).hide();
-
- $scope.ociavailableRoleFunctions=${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.saveRole = function() {
- var uuu = "role/saveRole.htm?role_id=${param.role_id}";
- var postData={role: $scope.role, childRoles: $scope.role.childRoles, roleFunctions : $scope.role.roleFunctions};
- $.ajax({
- type : 'POST',
- url : uuu,
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success : function(data){
- alert("Update Successful.") ;
- },
- error : function(data){
- console.log(data);
- alert("Error while saving.");
- }
- });
- };
-
- $scope.addNewRoleFunctionModalPopup = function() {
- var modalInstance = $modal.open({
- templateUrl: 'role_functions_popup.html',
- controller: 'rolepopupController',
- resolve: {
- role: function () {
- return $scope.role;
- }
- }
- });
- modalInstance.result.then(function(response){
- console.log('response', response);
- $scope.role=response.role;
- });
- };
-
- $scope.addNewChildRoleModalPopup = function() {
- var modalInstance = $modal.open({
- templateUrl: 'child_roles_popup.html',
- controller: 'rolepopupController',
- resolve: {
- role: function () {
- return $scope.role;
- }
- }
- });
- modalInstance.result.then(function(response){
- console.log('response', response);
- $scope.role=response.role;
- });
- };
-
-
-
- $scope.removeRoleFunction = function(roleFunction) {
- if (confirm("You are about to remove the role function "+roleFunction.name+" from the role for "+$scope.role.name+". Do you want to continue?")) {
- //alert('deleted'+role.name);
- var uuu = "role/removeRoleFunction.htm?role_id=${param.role_id}";
- var postData={roleFunction:roleFunction};
- $.ajax({
- type : 'POST',
- url : uuu,
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success : function(data){
- $scope.$apply(function(){
- $scope.role=data.role;
- $.each($scope.availableRoleFunctions, function(k, c){
- if(c.code === roleFunction.code) {
- c.selected = false;
- }
- });
- });
-
- },
- error : function(data){
- alert("Error while saving.");
- }
- });
- };
-
- };
-
- $scope.removeChildRole = function(childRole) {
- if (confirm("You are about to remove the child role "+childRole.name+" from the role for "+$scope.role.name+". Do you want to continue?")) {
- //alert('deleted'+role.name);
- var uuu = "role/removeChildRole.htm?role_id=${param.role_id}";
- var postData={childRole:childRole};
- $.ajax({
- type : 'POST',
- url : uuu,
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success : function(data){
- $scope.$apply(function(){
- $scope.role=data.role;
- $.each($scope.availableRoles, function(k, c){
- if(c.id === childRole.id) {
- c.selected = false;
- }
- });
- });
-
- },
- error : function(data){
- alert("Error while saving.");
- }
- });
- };
-
- };
-
-});
-</script>
diff --git a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/role_function_list.jsp b/ecomp-portal-BE/war/WEB-INF/fusion/jsp/role_function_list.jsp
deleted file mode 100644
index 51aea051..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/role_function_list.jsp
+++ /dev/null
@@ -1,225 +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.
- ================================================================================
- --%>
-
-<%-- <%@ include file="/WEB-INF/fusion/jsp/include.jsp" %> --%>
-
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
-
-<link rel="stylesheet" type="text/css" href="static/ebz/sandbox.css" >
-<link rel="stylesheet" type="text/css" href="static/fusion/css/jquery-ui.css">
-
-<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/jquery-1.10.2.js"></script>
-<script src="static/js/modalService.js"></script>
-<script src="static/js/jquery.mask.min.js" type="text/javascript"></script>
-<script src="static/js/jquery-ui.js" type="text/javascript"></script>
-<%@ include file="/WEB-INF/fusion/jsp/popup_modal_rolefunction.html" %>
-<div ng-controller="roleFunctionListController" >
- <div class="pageTitle">
-
- <h1 class="heading1" style="margin-top:20px;">Role Functions</h1>
-
- <a ng-click="addNewRoleFunctionModalPopup();" class="icon-add" size="small" ></a>
- <br><br>
-
- </div>
-
- <br>
- 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.
- <br>
- <div id="rolesTable" title="Role Functions">
- <table att-table table-data="availableRoleFunctions" current-page="1">
- <thead att-table-row type="header">
- <tr>
- <th att-table-header width="70%">Name</th>
- <th att-table-header width="10%">Code</th>
- <th att-table-header width="10%">Edit?</th>
- <th att-table-header width="10%">Delete?</th>
- </tr>
- </thead>
- <tbody att-table-row type="body" row-repeat="availableRoleFunction in availableRoleFunctions" style="max-height: 980px;" ><!-- background colors will alternate not properly with multiple tbody-->
- <tr>
- <td att-table-body width="70%">{{ availableRoleFunction.name }}</td>
- <td att-table-body width="10%">{{ availableRoleFunction.code }}</td>
- <td att-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 href="javascript:void(0)" class="icon-edit"></a></div>
- </td>
- <td att-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 href="javascript:void(0)" class="icon-trash"></a></div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
-
-<!-- <div align="left" style="marin-bottom: 50px;"> -->
-<!-- <button type="submit" onClick="window.location='role_function.htm';" att-button -->
-<!-- btn-type="primary" size="small">Create</button> -->
-<!-- </div> -->
-
- <div id="dialog" title="Add Role Function">
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Name:</label><br>
- <input type="text" class="fn-ebz-text" ng-model="editRoleFunction.name"
- maxlength="30" />
- </div>
- <br/>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Code:</label><br>
- <input type="text" class="fn-ebz-text" ng-model="editRoleFunction.code" ng-disabled="editRoleFunction.code!=null"
- maxlength="30" />
- </div>
- <br/>
- <button type="submit" ng-click="saveRoleFunction(editRoleFunction);" att-button
- btn-type="primary" size="small">Save</button>
-
- </div>
-
-</div>
-
-
-
-
-<script>
-app.controller('roleFunctionListController', function ($scope, modalService, $modal){
- $( "#dialog" ).hide();
- $scope.availableRoleFunctions=${availableRoleFunctions};
-
-
- $scope.editRoleFunction = null;
- var dialog = null;
- $scope.editRoleFunctionPopup = function(availableRoleFunction) {
- $scope.editRoleFunction = availableRoleFunction;
- $( "#dialog" ).dialog({
- modal: true
- });
- };
-
- $scope.editRoleFunctionModalPopup = function(availableRoleFunction) {
- $scope.editRoleFunction = availableRoleFunction;
- var modalInstance = $modal.open({
- templateUrl: 'edit_role_function_popup.html',
- controller: 'rolefunctionpopupController',
- resolve: {
- message: function () {
- var message = {
- availableRoleFunction: $scope.editRoleFunction
- };
- return message;
- }
- }
- });
- modalInstance.result.then(function(response){
- console.log('response', response);
- $scope.availableRoleFunctions=response.availableRoleFunctions;
- });
- };
-
- $scope.addNewRoleFunctionModalPopup = function(availableRoleFunction) {
- $scope.editRoleFunction = null;
- var modalInstance = $modal.open({
- templateUrl: 'edit_role_function_popup.html',
- controller: 'rolefunctionpopupController',
- resolve: {
- message: function () {
- var message = {
- availableRoleFunction: $scope.editRoleFunction
- };
- return message;
- }
- }
- });
- modalInstance.result.then(function(response){
- console.log('response', response);
- $scope.availableRoleFunctions=response.availableRoleFunctions;
- });
- };
-
- $scope.addNewRoleFunctionPopup = function() {
- $scope.editRoleFunction = null;
- $( "#dialog" ).dialog({
- modal: true
- });
- };
-
- $scope.saveRoleFunction = function(availableRoleFunction) {
- var uuu = "role_function_list/saveRoleFunction.htm";
- var postData={availableRoleFunction: availableRoleFunction};
- $.ajax({
- type : 'POST',
- url : uuu,
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success : function(data){
- $scope.$apply(function(){
- $scope.availableRoleFunctions=[];$scope.$apply();
- $scope.availableRoleFunctions=data.availableRoleFunctions;});
- //alert("Update Successful.") ;
- console.log($scope.availableRoleFunctions);
-
- $scope.editRoleFunction = null;
- $( "#dialog" ).dialog("close");
- },
- error : function(data){
- alert("Error while saving.");
- }
- });
- };
-
-
- $scope.removeRole = function(availableRoleFunction) {
- if (confirm("You are about to delete the role function "+availableRoleFunction.name+". Do you want to continue?")) {
- //alert('deleted'+roleFunction.name);
- var uuu = "role_function_list/removeRoleFunction.htm";
- var postData={availableRoleFunction: availableRoleFunction};
- $.ajax({
- type : 'POST',
- url : uuu,
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success : function(data){
- $scope.$apply(function(){$scope.availableRoleFunctions=data.availableRoleFunctions;});
- },
- error : function(data){
- console.log(data);
- alert("Error while deleting: "+ data.responseText);
- }
- });
- }
-
- };
-
-
-});
-</script>
diff --git a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/role_list.jsp b/ecomp-portal-BE/war/WEB-INF/fusion/jsp/role_list.jsp
deleted file mode 100644
index f35d975e..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/role_list.jsp
+++ /dev/null
@@ -1,147 +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.
- ================================================================================
- --%>
-
-<%-- <%@ include file="/WEB-INF/fusion/jsp/include.jsp" %> --%>
-
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
-
-<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/jquery-1.10.2.js"></script>
-<script src="static/js/modalService.js"></script>
-<script src="static/js/jquery.mask.min.js" type="text/javascript"></script>
-<script src="static/js/jquery-ui.js" type="text/javascript"></script>
-
-<div class="pageTitle">
- <h1 class="heading1" style="margin-top:20px;">Roles</h1>
-</div>
-<br>
-Click on a Role to view its details.
-
-<div ng-controller="roleListController" >
- <div id="dialog" title="Roles">
- <table att-table table-data="availableRoles" current-page="1">
- <thead att-table-row type="header">
- <tr>
- <th att-table-header width="70%">Name</th>
- <th att-table-header width="10%">Priority</th>
- <th att-table-header width="10%">Active?</th>
- <th att-table-header width="10%">Delete?</th>
- </tr>
- </thead>
- <tbody att-table-row type="body" row-repeat="availableRole in availableRoles track by availableRole.id" style="max-height: 980px;" ><!-- background colors will alternate not properly with multiple tbody-->
-<!-- <tr ng-repeat="availableRole in availableRoles track by availableRole.id"> -->
- <tr>
- <td width="70%"><a href="role.htm?role_id={{availableRole.id}}">{{ availableRole.name }}</a></td>
- <td width="10%">{{ availableRole.priority }}</td>
- <td width="10%">
- <div ng-click="toggleRole(availableRole.active,availableRole);">
- <input type="checkbox" ng-model="availableRole.active" att-toggle-main>
- </div>
- </td>
- <td att-table-body width="10%">
- <div ng-click="removeRole(availableRole);" style="font-size:20px;"><a href="javascript:void(0)" class="icon-trash"></a></div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
-
- <div align="left" style="marin-bottom: 50px;">
- <button type="submit" onClick="window.location='role.htm';" att-button
- btn-type="primary" size="small">Create</button>
- </div>
-
-</div>
-
-
-
-
-<script>
-app.controller('roleListController', function ($scope){
-
- $scope.availableRoles=${availableRoles};
- //console.log($scope.availableRoles);
- $scope.toggleRole = function(selected,availableRole) {
- //alert('toggleRole: '+selected);
- var toggleType = null;
- if(selected) {
- toggleType = "activate";
- } else {
- toggleType = "inactivate";
- }
-
- if (confirm("You are about to "+toggleType+" the test role "+availableRole.name+". Do you want to continue?")) {
-
- var uuu = "role_list/toggleRole";
-
- var postData={role:availableRole};
- $.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);
- alert("Error while saving. ");
- }
- });
- }
-
- };
-
- $scope.removeRole = function(role) {
- if (confirm("You are about to delete the role "+role.name+". Do you want to continue?")) {
- //alert('deleted'+role.name);
- var uuu = "role_list/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);
- alert("Error while deleting: "+ data.responseText);
- }
- });
- }
-
- };
-
-
-});
-</script>
diff --git a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/usage_list.jsp b/ecomp-portal-BE/war/WEB-INF/fusion/jsp/usage_list.jsp
deleted file mode 100644
index 11e2439e..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/usage_list.jsp
+++ /dev/null
@@ -1,99 +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.
- ================================================================================
- --%>
-
-<%-- <%@ include file="/WEB-INF/fusion/jsp/include.jsp" %> --%>
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
-
-<link rel="stylesheet" type="text/css" href="static/ebz/sandbox.css" >
-<link rel="stylesheet" type="text/css" href="static/fusion/css/jquery-ui.css">
-
-<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/jquery-1.10.2.js"></script>
-<script src="static/js/modalService.js"></script>
-<script src="static/js/jquery.mask.min.js" type="text/javascript"></script>
-<script src="static/js/jquery-ui.js" type="text/javascript"></script>
-
-<div ng-controller="usageListController" >
- <div class="pageTitle">
- <h3>
- Usage
- </h3>
- </div>
- <br/>
- The following shows all users currently logged into the application. Click the icon to expel a user from the application.
-
- <div title="Current User Sessions">
- <table att-table table-data="users" current-page="1">
-
- <thead att-table-row type="header">
- <tr>
- <th att-table-header sortable="false" width="10%" align="left">Current User Sessions</th>
- <th att-table-header sortable="false" width="10%" align="center"></th>
- <th att-table-header sortable="false" width="10%" align="center"></th>
- <th att-table-header sortable="false" width="10%" align="center"></th>
- <th att-table-header sortable="false" width="10%" align="center"></th>
- <th att-table-header sortable="false" width="10%" align="center"></th>
- </tr>
- <tr>
- <th att-table-header sortable="false" width="10%" align="center">User Id</th>
- <th att-table-header sortable="false" width="10%" align="center">User Name</th>
- <th att-table-header sortable="false" width="10%" align="center">Email</th>
- <th att-table-header sortable="false" width="10%" align="center">Last Access Time (minutes)</th>
- <th att-table-header sortable="false" width="10%" align="center">Time Remaining (minutes)</th>
- <th att-table-header sortable="false" width="10%" align="center">Expel?</th>
- </tr>
- </thead>
- <tbody att-table-row type="body" row-repeat="user in users" style="max-height: 980px;" ><!-- background colors will alternate not properly with multiple tbody-->
- <tr>
- <td att-table-body width="10%">{{user.id}}</td>
- <td att-table-body width="10%">{{user.lastName}}</td>
- <td att-table-body width="10%">{{user.email}}</td>
- <td att-table-body width="10%">{{user.lastAccess}}</td>
- <td att-table-body width="10%">{{user.remaining}}</td>
- <td att-table-body width="10%"><div ng-hide="user.delete=='yes'">Current Session</div>
- <div ng-click="removeSession(user.sessionId);" ng-hide="user.delete=='no'" style="font-size:20px;"><a href="javascript:void(0)" class="icon-trash"></a></div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
-</div>
-
-
-
-
-<script>
-app.controller('usageListController', function ($scope,$interval,$http,$modal,modalService){
-
- $scope.users=${model};console.log($scope.users);
- $scope.removeSession = function(sessionId) {
- if(confirm("You are about to expel this user from the application. All of their unsaved data will be lost. Do you want to continue?")){
- $http.get("usage_list/removeSession?deleteSessionId="+sessionId).success(function(response){$scope.users=response;});
- }
- }
-});
-</script>
diff --git a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/webrtc/collaboration.jsp b/ecomp-portal-BE/war/WEB-INF/fusion/jsp/webrtc/collaboration.jsp
deleted file mode 100644
index b0480d45..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/jsp/webrtc/collaboration.jsp
+++ /dev/null
@@ -1,529 +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.
- ================================================================================
- --%>
-<!DOCTYPE html>
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
- <link type="text/css" rel="stylesheet" href="static/fusion/css/layout/layout-default-latest.css" />
- <link rel="stylesheet" type="text/css" href="static/ebz/sandbox/styles/btn.css" >
- <link rel="stylesheet" type="text/css" href="static/ebz/fn-ebz.css" >
- <style type="text/css">
- /*
- * NOTE: All CSS is purely cosmetic - it does not affect functionality
- * http://layout.jquery-dev.com/demos.cfm
- */
-
- /* customize borders to avoid double-borders around inner-layouts */
- .ui-layout-pane {
- border: 0; /* override layout-default-latest.css */
- border-top: 1px solid #BBB;
- border-bottom: 1px solid #BBB;
- }
- .ui-layout-pane-north ,
- .ui-layout-pane-south {
- border: 1px solid #BBB;
- overflow: auto;
- }
- .ui-layout-pane-west ,
- .ui-layout-pane-east {
- }
- .ui-layout-pane-center {
- border-left: 0;
- border-right: 0;
- }
- .inner-center {
- border: 1px solid #BBB;
- }
-
- /* add shading to outer sidebar-panes */
- .outer-west ,
- .outer-east {
- background-color: #EEE;
- }
- .middle-west ,
- .middle-east {
- background-color: #F8F8F8;
- }
-
- /* remove padding & scrolling from panes that are 'containers' for nested layouts */
- .outer-center ,
- .middle-center {
- border: 0; /* cosmetic */
- padding: 0;
- overflow: auto;
- }
-
- /*
- * customize borders on panes/resizers to make pretty
- */
- .ui-layout-pane-west { border-right: 0; }
- .ui-layout-resizer-west { border-left: 1px solid #BBB; }
- .ui-layout-pane-east { border-left: 0; }
- .ui-layout-resizer-east { border-right: 1px solid #BBB; }
- .ui-layout-pane-north { border-bottom: 0; }
- .ui-layout-resizer-north { border-top: 1px solid #BBB; }
- .ui-layout-pane-south { border-top: 0; }
- .ui-layout-resizer-south { border-bottom: 1px solid #BBB; }
- /*
- * add borders to resizers when pane is 'closed'
- *
- *.ui-layout-resizer-closed { border: 1px solid #BBB; }
- */
- /*
- * show both borders when the resizer is 'dragging'
- */
- .ui-layout-resizer-west-dragging ,
- .ui-layout-resizer-east-dragging {
- border-left: 1px solid #BBB;
- border-right: 1px solid #BBB;
- }
- .ui-layout-resizer-north-dragging ,
- .ui-layout-resizer-south-dragging {
- border-top: 1px solid #BBB;
- border-bottom: 1px solid #BBB;
- }
-
-
- /*
- layout toggler background image
- */
- .ui-layout-toggler-west, .ui-layout-toggler-east {
- border-width: 1px 0;
- background-image: url("static/fusion/images/layout/panel-e-w-toggle.png");
- background-size: 10px 10px;
- background-repeat: no-repeat;
- background-position: center;
- }
-
- .ui-layout-toggler-north, .ui-layout-toggler-south {
- border-width: 0 1px;
- background-image: url("static/fusion/images/layout/panel-n-s-toggle.png");
- background-size: 10px 10px;
- background-repeat: no-repeat;
- background-position: center;
- }
-
- </style>
-
-
- <!-- LAYOUT v 1.3.0 -->
- <script type="text/javascript" src="static/fusion/js/layout/jquery-latest.js"></script>
- <script type="text/javascript" src="static/fusion/js/layout/jquery-ui-latest.js"></script>
- <script type="text/javascript" src="static/fusion/js/layout/jquery.layout-latest.js"></script>
- <script type="text/javascript" src="static/fusion/webrtc/js/RTCMultiConnection.js"></script>
- <script type="text/javascript" src="static/fusion/webrtc/js/peerBroadcast.js"></script>
- <script type="text/javascript" src="static/fusion/js/layout/debug.js"></script>
-
- <script type="text/javascript">
-
-
- $(document).ready(function () {
-
- // OUTER-LAYOUT
- panelLayout = $('body').layout({
- center__paneSelector: ".outer-center"
- , west__paneSelector: ".outer-west"
- , east__paneSelector: ".outer-east"
- , west__size: 500
- , east__size: 200
- , spacing_open: 8 // ALL panes
- , spacing_closed: 12 // ALL panes
-
- , center__childOptions: {
- center__paneSelector: ".inner-center"
- , west__paneSelector: ".inner-west"
- , east__paneSelector: ".inner-east"
- , west__size: 75
- , east__size: 75
- , spacing_open: 8 // ALL panes
- , spacing_closed: 8 // ALL panes
- , west__spacing_closed: 12
- , east__spacing_closed: 12
- }
-
-
-
-
- });
-
-
- function initializeConnections() {
-
- var channelId = null; var audioVideo = true; var data = true;
- channelId = location.href.replace(/\/|:|#|%|\.|\[|\]/g, '');
- var videoChannelId = channelId.concat("video");
- var screenChannelId = channelId.concat("screen");
-
- videoConnection = new RTCMultiConnection(videoChannelId);
- screenConnection = new RTCMultiConnection(screenChannelId);
-
-
- if( window.location.protocol == 'http:' && DetectRTC.browser.isChrome ) {
- audioVideo = false;
- console.log("Video Chat is not supported over unsecured connection for Chrome; Use Firefox")
- }
- configConnection(videoConnection,audioVideo,audioVideo,false,true,false);
- configConnection(screenConnection,false,false,true,false,true);
-
- };
-
- function configConnection(_connection, _audio, _video, _screen, _data, _oneway) {
- _connection.session = {
- audio: _audio, // by default, it is true
- video: _video, // by default, it is true
- screen: _screen,
- data: _data,
- oneway: _oneway,
- broadcast: false
- };
-
- _connection.direction = "one-to-one";
-
- if( _data == true ) {
- _connection.onmessage = function(e) {
- appendDIV(e.data);
-
- console.debug(e.userid, 'posted', e.data);
- console.log('latency:', e.latency, 'ms');
- };
- }
-
-
- };
-
- function assignStreamToDom() {
-
-
- screenConnection.screenbody = document.querySelector('.screenContainer1');
- screenConnection.videobody = document.querySelector('.videoContainer2');
-
- videoConnection.screenbody = document.querySelector('.screenContainer2');
- videoConnection.videobody = document.querySelector('.videoContainer1');
- };
-
- function maximizeLayout() {
-
- // open the panes and maximize the window.
- top.window.resizeTo(screen.availWidth,screen.availHeight);
- // lets keep this closed as its the screen share panel; will be opened up in future release
- panelLayout.open('west');
- // panelLayout.open('south'); is not working due to state initialization problem; debug to find out. so replacing the call with work around below - hack.
- // $(".ui-layout-toggler-south-closed").first().click();
-
- };
-
- function minimizeLayout() {
-
- // close the panes and minimize the window.
- top.window.resizeTo(screen.availWidth - 2*screen.availWidth/3, screen.availHeight - screen.availHeight/2);
- panelLayout.close('west');
- // panelLayout.close('south'); is not working due to state initialization problem; debug to find out. so replacing the call with work around below - hack.
- $(".ui-layout-toggler-south-opened").first().click();
- };
-
- function emptyContainers() {
- $('.screenContainer1').empty();
- $('.videoContainer2').empty();
-
- $('.screenContainer2').empty();
- $('.videoContainer1').empty();
- };
-
- function appendDIV(div, parent) {
- if (typeof div === 'string') {
- var content = div;
- div = document.createElement('div');
- div.innerHTML = content;
- };
-
- var chatOutput = document.getElementById('chat-output'),
- fileProgress = document.getElementById('file-progress');
-
- if (!parent) {chatOutput.appendChild(div, chatOutput.firstChild); chatOutput.scrollTop = chatOutput.scrollHeight;
- }
- else fileProgress.insertBefore(div, fileProgress.firstChild);
-
- div.tabIndex = 0;
- $('#chat-input').focus();
- };
-
- function confirmClose() {
- var message = "Are you sure you want to close the session?";
-
- // if(popupModalService != undefined) {
- // popupModalService.popupConfirmWin("Confirm", message, function(){ location.reload();});
- // }
-
- if (confirm(message) == true) {
- location.reload();
- //window.opener.location.reload(); // go to the parent window
- //close();
- } else {
- // do nothing
- }
-
- };
-
- function notifyOthers() {
-
- // var websocket = localStorage.getItem('notifySocket');
- //if( websocket != null) {
- // handling websocket peer broadcast session
- var currentUser = "${sessionScope.user.orgUserId}";
- var initialPageVisit = "${sessionScope.initialPageVisit}";
- var remoteUser = '';
-
- var userList = location.search.split('chat_id=')[1].split('-');
- for(var i=0;i<userList.length;i++) {
- if(userList[i] !== currentUser) {
- remoteUser = userList[i];
- break;
- }
- }
-
- socketSetup(initialPageVisit, currentUser, remoteUser,"socketSend");
-
-
-
-
-
-
- };
-
- function makeChatVisible() {
-
- $('#chat-input').css("visibility", 'visible');
- };
-
- function srcDestinationSessionAction() {
- var url = window.location.href;
- var chatId = "";
-
- try{
- chatId = url.split("chat_id=")[1];
- }
- catch(err) {
- chatId ="";
- }
- // window.localStorage.getItem(chatId) == "source"
- if(chatId != "" && getCookie(chatId) == "source") {
- startSession();
- setCookie(chatId,"",-1);
- //window.localStorage.removeItem(chatId);
- } else {
- viewSession();
- }
-
- };
-
- function startSession() {
-
- emptyContainers();
- videoConnection.close();
- screenConnection.close();
-
- maximizeLayout();
- emptyContainers();
- makeChatVisible();
-
- videoConnection.open();
- screenConnection.open();
-
-
- notifyOthers();
- };
-
- function viewSession() {
- maximizeLayout();
- emptyContainers();
- makeChatVisible();
-
- // timeout is required for the sharing to properly work
- setTimeout(function() {
- screenConnection.connect();
- },2000);
- setTimeout(function() {
- videoConnection.connect();
- },1000);
- };
-
-
- function setCookie(cname,cvalue,exdays) {
- var d = new Date();
- d.setTime(d.getTime() + (exdays*24*60*60*1000));
- var expires = "expires=" + d.toGMTString();
- document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
- }
-
- function getCookie(cname) {
- var name = cname + "=";
- var decodedCookie = decodeURIComponent(document.cookie);
- var ca = decodedCookie.split(';');
- for(var i = 0; i < ca.length; i++) {
- var c = ca[i];
- while (c.charAt(0) == ' ') {
- c = c.substring(1);
- }
- if (c.indexOf(name) == 0) {
- return c.substring(name.length, c.length);
- }
- }
- return "";
- }
-
-
-
- /* on click button enabled*/
- document.getElementById('share-screen').onclick = function() {
- startSession();
- };
-
- document.getElementById('stop-share-screen').onclick = function() {
-
- emptyContainers();
-
- videoConnection.close();
- screenConnection.close();
-
- confirmClose();
-
- };
-
- document.getElementById('view-screen').onclick = function() {
- viewSession();
- };
-
- document.getElementById('chat-input').onkeypress = function(e) {
- if (e.keyCode !== 13 || !this.value) return;
- var message = "<b>${model.name}</b>: " + this.value;
- appendDIV(message);
-
- // sending text message
- videoConnection.send(message);
-
- this.value = '';
- };
-
- /*
- document.getElementById('file').onchange = function() {
- videoConnection.send(this.files[0]);
- };
- */
-
-
- //document.querySelector('.screenContainerPane').appenChild(document.querySelector('.screenContainer'));
- //document.querySelector('.videoContainerPane').appendChild(document.querySelector('.videoContainer'));
-
- //panelLayout.bindButton($('#share-screen'), 'open', 'outer-west');
- //panelLayout.bindButton($('#stop-share-screen'), 'close', 'outer-west');
- var videoConnection = null, screenConnection = null;
- initializeConnections();
- assignStreamToDom();
- srcDestinationSessionAction();
-
- // start the share
- //document.getElementById('share-screen').click();
- //
- });
-
-
-</script>
-
-
-</head>
-
-<body>
-<!--
- <button id="share-screen" hidden="true" style="display: none;" class="setup">Share Your Screen</button>
- <button id="stop-share-screen" hidden="true" style="display: none;" class="setup">Stop Share Your Screen</button>
- <button id="view-screen" hidden="true" style="display: none;" class="setup">View My Screen</button>
-
- -->
-
-<div class="outer-center" style="position: absolute; left: 12px; right: 0px; top: 0px;bottom: 0px;">
- <div class="inner-center">
-
- <!-- <jsp:include page="/WEB-INF/fusion/zul/chatOne.zul" /> -->
-
-
-
- <table style="width: 100%;">
- <tbody><tr>
- <td>
- <button id="share-screen" style="display:none" class="button button--primary button--small setup">Start Session</button>
- <button id="stop-share-screen" style="display:none" class="button button--primary button--small setup">Stop Session</button>
- <button id="view-screen" style="display:none" class="button button--primary button--small setup">View</button>
-
- </td>
- <td>
-
- </td>
-
- </tr>
- </tbody>
-
- <tbody>
- <tr>
- <td>
- <div class="videoContainer1"></div>
- <div class="videoContainer2"></div>
- </td>
- </tr>
- </tbody>
- </table>
-
-
- </div>
- <!--
- <div id="inner-south" class="ui-layout-south">
- <!--
- <div class="videoContainer1"></div>
- <div class="videoContainer2"></div>
- -->
-
- </div>
- -->
-</div>
-
-<div class="outer-west">
- <!--
- <div class="screenContainer1"></div>
- <div class="screenContainer2"></div>
- <div ng-controller="collaborationController"> </div>
- -->
-
-
- <div style="height: 90%;overflow-y: scroll;overflow-x: hidden;overflow-wrap: break-word;word-wrap: break-word;" id="chat-output"></div>
-
- <div style="bottom:0;width: 100%;">
- <input type="text" id="chat-input" style="font-size: 1.2em;width: 100%;" placeholder="Please type and hit return to send..."/>
- </div>
-
-
-
-</div>
-
-
-
-
-
-</body>
-</html>
diff --git a/ecomp-portal-BE/war/WEB-INF/fusion/orm/EP.hbm.xml b/ecomp-portal-BE/war/WEB-INF/fusion/orm/EP.hbm.xml
deleted file mode 100644
index 1ed165b5..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/orm/EP.hbm.xml
+++ /dev/null
@@ -1,558 +0,0 @@
-<?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.portalapp.portal.domain">
-
- <!-- Widget class mapping details -->
- <class name="Widget" table="FN_WIDGET">
- <id name="id" column="WIDGET_ID">
- <generator class="native">
- <param name="sequence">seq_fn_widget</param>
- </generator>
- </id>
- <property name="width" type="integer">
- <column name="WDG_WIDTH" not-null="true" default="0"></column>
- </property>
- <property name="height" type="integer">
- <column name="WDG_HEIGHT" not-null="true" default="0"></column>
- </property>
- <property name="url" type="string">
- <column name="WDG_URL" not-null="true" default="?"></column>
- </property>
- <property name="name" type="string">
- <column name="WDG_NAME" not-null="true" default="?"></column>
- </property>
-
- <property name="appId" type="long">
- <column name="APP_ID" not-null="true"></column>
- </property>
-
- </class>
-
-
- <!-- User class mapping details -->
- <class name="EPUser" 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="EPUserApps" table="FN_USER_ROLE" lazy="false" sort="natural" inverse="true">
- <key column="user_id"/>
- <one-to-many class="org.openecomp.portalapp.portal.domain.EPUserApp" />
- </set>
-
- </class>
-
- <!-- UserApp class mapping details -->
- <class name="EPUserApp" 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.portalapp.portal.domain.EPApp" column="app_id" />
- <key-many-to-one name="role" class="org.openecomp.portalapp.portal.domain.EPRole" 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="EPApp" table="fn_app">
- <id name="id" column="app_id">
- <generator class="native">
- <param name="sequence">seq_fn_app</param>
- </generator>
- </id>
- <property name="name" type="string">
- <column name="app_name" not-null="true" default="?"></column>
- </property>
- <property name="imageUrl" column="app_image_url" />
- <property name="description" column="app_description" />
- <property name="notes" column="app_notes" />
- <property name="url" column="app_url" />
- <property name="alternateUrl" column="app_alternate_url" />
- <property name="appRestEndpoint" column="app_rest_endpoint" />
- <property name="mlAppName" type="string">
- <column name="ml_app_name" not-null="true" default="?"></column>
- </property>
- <property name="mlAppAdminId" type="string">
- <column name="ml_app_admin_id" not-null="true" default="?"></column>
- </property>
- <property name="motsId" column="mots_id" />
- <property name="appPassword" type="string">
- <column name="app_password" not-null="true" default="?"></column>
- </property>
- <property name="thumbnail" column="thumbnail"/>
- <property name="username" type="string">
- <column name="app_username" not-null="true" default="?"></column>
- </property>
- <property name="open" type="yes_no">
- <column name="open" not-null="true" default="Y"></column>
- </property>
- <property name="enabled" type="yes_no">
- <column name="enabled" not-null="true" default="N"></column>
- </property>
- <property name="uebTopicName" type="string">
- <column name="ueb_topic_name"></column>
- </property>
- <property name="uebKey" type="string">
- <column name="ueb_key"></column>
- </property>
- <property name="uebSecret" type="string">
- <column name="ueb_secret"></column>
- </property>
- <property name="appType" type="integer">
- <column name="app_type"></column>
- </property>
-
- <one-to-one name="contactUs" class="AppContactUs" cascade="save-update"></one-to-one>
-
- </class>
-
-
- <!-- User Role class mapping details -->
- <class name="EPRole" table="FN_ROLE">
- <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" />
- <!-- 2 lines below may be removed! -->
- <property name="appId" column="APP_ID" />
- <property name="appRoleId" column="APP_ROLE_ID" />
- <!-- 2 lines above may be removed -->
-
- <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.portalapp.portal.domain.EPRole" />
- </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.portalapp.portal.domain.EPRole" />
- </set>
-
- </class>
-
- <!-- User App class mapping details -->
- <class name="AppContactUs" table="fn_app_contact_us">
- <id name="id" column="app_id">
- <generator class="foreign">
- <param name="property">app</param>
- </generator>
- </id>
- <property name="url" column="url" />
- <property name="description" column="description" />
- <property name="contactName" column="contact_name" />
- <property name="contactEmail" column="contact_email" />
- <property name="activeYN" column="active_yn" />
-
- <one-to-one name="app" class="EPApp" constrained="true" ></one-to-one>
-
- </class>
-
- <!-- Personalization of user app selections -->
- <class name="PersUserAppSelection" table="fn_pers_user_app_sel">
- <id name="id" column="id">
- <generator class="native">
- <param name="property">seq_fn_pers_user_app_sel</param>
- </generator>
- </id>
- <property name="userId" column="user_id" />
- <property name="appId" column="app_id" />
- <property name="statusCode" column="status_cd" />
- </class>
-
- <!-- requires values for named parameters :searchQuery and :userId -->
- <sql-query name="searchPortal">
- <return alias="searchResult" class="org.openecomp.portalapp.portal.ecomp.model.SearchResultItem"/>
- <![CDATA[
- select @rn /*'*/:=/*'*/ @rn+1 AS rowId, CATEGORY, NAME, UUID, TARGET from
- ( (
- select distinct 'User' CATEGORY, concat(concat(first_name, ' '), last_name) NAME, user_id UUID, email TARGET
- from fn_user where
- upper( :searchQuery ) != ''
- and (upper(first_name) like upper(CONCAT('%', :searchQuery, '%'))
- or upper(last_name) like upper(CONCAT('%', :searchQuery, '%'))
- or upper(org_user_id) like upper(CONCAT('%', :searchQuery, '%')))
- and upper(active_yn) = 'Y'
- )
- union
- (
- select distinct 'Application' CATEGORY, b1.app_name NAME,
- if (b1.app_type = 2,'false','true') UUID,
- if (a1.app_id is null, if (b1.app_type = 2, b1.APP_URL, ''), a1.APP_URL) TARGET
- from
- (
- select c.*
- from fn_user_role a, fn_user b, fn_app c
- where a.USER_ID = b.user_id
- and upper(b.org_user_id) = upper( :userId )
- and a.app_id = c.app_id
- and upper(c.APP_NAME) like upper(CONCAT('%', :searchQuery, '%'))
- and upper(c.ENABLED) = 'Y'
- ) a1 right outer join
- (select * from fn_app where
- upper(APP_NAME) like upper(CONCAT('%', :searchQuery, '%'))
- and upper(ENABLED) = 'Y') b1
- on a1.APP_ID = b1.app_id
- )
- union
- (
- select distinct 'Menu' CATEGORY, b1.TEXT NAME,
- if (b1.app_type = 2,'false','true') UUID,
- if (a1.menu_id is null , if (b1.app_type = 2, b1.URL, '') , a1.URL ) TARGET
- from
- (select distinct d.*, e.app_type from fn_user a,
- fn_user_role b, fn_menu_functional_roles c, fn_menu_functional d, fn_app e
- where a.USER_ID = b.user_id
- and b.role_id = c.role_id
- and c.menu_id = d.menu_id
- and upper(a.org_user_id) = upper( :userId )
- and c.APP_ID = e.app_id
- and upper(d.TEXT) like upper(CONCAT('%', :searchQuery, '%'))
- and upper(d.active_yn) = 'Y'
- and upper(e.enabled) = 'Y'
- ) a1 right outer join
- (
- select distinct a.*, c.app_type from fn_menu_functional a, fn_menu_functional_roles b, fn_app c
- where active_yn = 'Y'
- and upper(TEXT) like upper(CONCAT('%', :searchQuery, '%'))
- and a.menu_id = b.menu_id
- and b.app_id = c.app_id
- and c.enabled = 'Y'
- ) b1
- on a1.menu_id = b1.menu_id
- ) ) t,
- (SELECT @rn /*'*/:=/*'*/ 0) t2
- ;
- ]]>
- </sql-query>
-
- <!-- Gets one row for each function-application-role combination. -->
- <sql-query name="getAppAccessFunctionRole">
- <return alias="appAccessFunctionRole" class="org.openecomp.portalapp.portal.domain.GetAccessResult"/>
- <!-- This query requires no parameters. -->
- <![CDATA[
- SELECT
- A.TEXT ECOMP_FUNCTION, D.APP_NAME, D.MOTS_ID APP_MOTS_ID, C.ROLE_NAME
- FROM
- fn_menu_functional A, fn_menu_functional_roles B, FN_ROLE C, FN_APP D
- WHERE
- A.MENU_ID = B.MENU_ID AND B.ROLE_ID = C.ROLE_ID AND B.APP_ID = D.APP_ID
- ;
- ]]>
- </sql-query>
-
- <!-- Gets all applications, possibly with contact information -->
- <sql-query name="getAppsAndContacts">
- <return alias="appContactUs" class="org.openecomp.portalapp.portal.ecomp.model.AppContactUsItem"/>
- <!-- This query requires no parameters. -->
- <![CDATA[
- select
- a.app_id as appId, a.app_name as appName,
- c.contact_name as contactName,
- c.contact_email as contactEmail, c.url, c.description,
- c.active_yn as activeYN
- from
- fn_app a
- left join
- fn_app_contact_us c
- on a.app_id = c.app_id
- where
- a.enabled = 'Y' and a.app_name is not null and a.app_name != ''
- ;
- ]]>
- </sql-query>
- <!-- Gets all rows from the app-contact-us table, extended with app information -->
- <sql-query name="getAppContactUsItems">
- <return alias="appContactUs" class="org.openecomp.portalapp.portal.ecomp.model.AppContactUsItem"/>
- <!-- This query requires no parameters. -->
- <![CDATA[
- select
- c.app_id as appId, c.contact_name as contactName,
- c.contact_email as contactEmail, c.url, c.description,
- c.active_yn as activeYN, a.app_name as appName
- from
- fn_app_contact_us c
- left join
- fn_app a
- on a.app_id = c.app_id
- where
- a.enabled = 'Y' and a.app_name is not null and a.app_name != ''
- ;
- ]]>
- </sql-query>
- <sql-query name="getAppCategoryFunctions">
- <return alias="appCategoryFunctions" class="org.openecomp.portalapp.portal.ecomp.model.AppCategoryFunctionsItem"/>
- <!-- This query requires no parameters. -->
- <![CDATA[
- SELECT @rn /*'*/:=/*'*/ @rn+1 AS rowId,
- r.category as category, r.app_id as appId, r.app_name as application,
- group_concat(function_text separator ', ') as functions
- FROM (
- SELECT
- app_id, function_text, app_name,
- IF (a.parent_menu_id IS NULL, fn.parent_menu, a.text) category
- FROM (
- SELECT
- j.text function_text, j.menu_id function_id, j.app_id app_id, j.app_name app_name,
- k.text parent_menu, k.parent_menu_id parent_menu_id
- FROM (
- SELECT distinct
- x.Text, x.PARENT_MENU_ID, x.menu_id, y.app_id, z.app_name
- FROM
- fn_menu_functional x, fn_menu_functional_roles y, fn_app z
- WHERE
- x.MENU_ID = y.menu_id AND x.ACTIVE_YN = 'Y' AND y.app_id = z.app_id
- ) j,
- fn_menu_functional k
- WHERE j.parent_menu_id = k.menu_id
- ) fn,
- fn_menu_functional a
- WHERE fn.parent_menu_id = a.menu_id
- ) r,
- (SELECT @rn /*'*/:=/*'*/ 0) t2
- group by r.category, r.app_id, r.app_name
- order by category, app_name
- ;
- ]]>
- </sql-query>
-
-
- <sql-query name="getGuestLastLogin">
- <return-scalar column="audit_date" type="java.util.Date"/>
- <![CDATA[
- select audit_date from fn_audit_log where affected_record_id =:attuid order by audit_date desc limit 2;
- ]]>
- </sql-query>
-
- <!-- Gets personalized list of enabled and accessible apps for regular user -->
- <sql-query name="getPersUserApps">
- <return alias="persUserApps" class="EPApp"/>
- <!-- This query requires one parameter: userId (number) -->
- <![CDATA[
- select
- distinct -- multiple roles yield multiple rows
- a.APP_ID , a.APP_NAME , a.APP_IMAGE_URL , a.APP_DESCRIPTION ,
- a.APP_NOTES , a.APP_URL , a.APP_ALTERNATE_URL , a.APP_REST_ENDPOINT ,
- a.ML_APP_NAME , a.ML_APP_ADMIN_ID , a.MOTS_ID , a.APP_PASSWORD ,
- a.THUMBNAIL , a.APP_USERNAME , a.OPEN , a.ENABLED ,
- a.UEB_TOPIC_NAME , a.UEB_KEY , a.UEB_SECRET , a.APP_TYPE
- from FN_APP a
- -- Portal assigns role 999 to app administrator
- left outer join FN_USER_ROLE r ON a.APP_ID = r.APP_ID and r.USER_ID = :userId and r.ROLE_ID != 999
- left outer join FN_PERS_USER_APP_SEL p ON a.APP_ID = p.APP_ID and p.USER_ID = :userId
- where a.ENABLED = 'Y'
- and (
- (a.OPEN = 'Y' and p.STATUS_CD = 'S')
- or
- (a.OPEN = 'N' and r.USER_ID is not null and (p.STATUS_CD is null or p.STATUS_CD != 'H'))
- )
- order by app_name
- ;
- ]]>
- </sql-query>
-
- <!-- Gets personalized list of enabled and accessible apps for Portal (super) admin -->
- <sql-query name="getPersAdminApps">
- <return alias="persAdminApps" class="EPApp"/>
- <!-- This query requires one parameter: userId (number) -->
- <![CDATA[
- select
- distinct -- multiple roles yield multiple rows
- a.APP_ID , a.APP_NAME , a.APP_IMAGE_URL , a.APP_DESCRIPTION ,
- a.APP_NOTES , a.APP_URL , a.APP_ALTERNATE_URL , a.APP_REST_ENDPOINT ,
- a.ML_APP_NAME , a.ML_APP_ADMIN_ID , a.MOTS_ID , a.APP_PASSWORD ,
- a.THUMBNAIL , a.APP_USERNAME , a.OPEN , a.ENABLED ,
- a.UEB_TOPIC_NAME , a.UEB_KEY , a.UEB_SECRET , a.APP_TYPE
- from FN_APP a
- -- Portal assigns role 999 to app administrator
- left outer join FN_USER_ROLE r ON a.APP_ID = r.APP_ID and r.USER_ID = :userId and r.ROLE_ID != 999
- left outer join FN_PERS_USER_APP_SEL p ON a.APP_ID = p.APP_ID and p.USER_ID = :userId
- where a.ENABLED = 'Y'
- and (
- (a.OPEN = 'Y' and p.STATUS_CD = 'S')
- or
- (a.OPEN = 'N' and r.ROLE_ID is not null and (p.STATUS_CD is null or p.STATUS_CD != 'H'))
- or
- (a.OPEN = 'N' and r.ROLE_ID is null and p.STATUS_CD = 'S')
- )
- order by app_name
- ;
- ]]>
- </sql-query>
-
- <!-- Gets regular user's list of enabled apps including accessible and select statuses -->
- <sql-query name="getUserAppCatalog">
- <return alias="userAppCatalog" class="org.openecomp.portalapp.portal.ecomp.model.AppCatalogItem"/>
- <!-- This query requires one parameter: userId (number) -->
- <![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_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,
- IF(a.open = 'Y', TRUE, FALSE) as open,
- -- ACCESS(-ible) means user has a defined role OR the application is open
- case
- -- regular app and user has a role
- when a.OPEN = 'N' and r.ROLE_ID is not null then TRUE
- -- open app
- when a.OPEN = 'Y' then TRUE
- else FALSE
- end as 'access' ,
- -- SELECT(-ed) indicates user personalization
- 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
- -- open app and has personalization
- when a.OPEN = 'Y' and p.STATUS_CD is not null then TRUE
- else FALSE
- end as 'select' ,
- -- PENDING indicates user checked a box
- case
- when a.OPEN = 'N' and p.STATUS_CD = 'P' then TRUE
- else FALSE
- end as 'pending'
- from FN_APP a
- -- Portal assigns role 999 to app administrator
- left outer join FN_USER_ROLE r ON a.APP_ID = r.APP_ID and r.USER_ID = :userId and r.ROLE_ID != 999
- left outer join FN_PERS_USER_APP_SEL p ON a.APP_ID = p.APP_ID and p.USER_ID = :userId
- where a.ENABLED = 'Y'
- -- Show accessible apps first, then the rest; sort by name within each set.
- order by access desc, app_name asc
- ;
- ]]>
- </sql-query>
-
- <!-- Gets list of enabled apps including accessible and select statuses -->
- <sql-query name="getAdminAppCatalog">
- <return alias="adminAppCatalog" class="org.openecomp.portalapp.portal.ecomp.model.AppCatalogItem"/>
- <!-- This query requires one parameter: userId (number) -->
- <![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_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,
- IF(a.open = 'Y', TRUE, FALSE) as open,
- -- ACCESS(-ible) means user has a defined role OR the application is open
- case
- -- regular app and user has a role
- when a.OPEN = 'N' and r.ROLE_ID is not null then TRUE
- -- open app
- when a.OPEN = 'Y' then TRUE
- else FALSE
- end as 'access' ,
- -- SELECT(-ed) indicates user personalization
- 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 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
- when a.OPEN = 'Y' and p.STATUS_CD is not null then TRUE
- else FALSE
- end as 'select' ,
- -- PENDING indicates user checked a box
- case
- when a.OPEN = 'N' and p.STATUS_CD = 'P' then TRUE
- else FALSE
- end as 'pending'
- from FN_APP a
- -- Portal assigns role 999 to app administrator
- left outer join FN_USER_ROLE r ON a.APP_ID = r.APP_ID and r.USER_ID = :userId and r.ROLE_ID != 999
- left outer join FN_PERS_USER_APP_SEL p ON a.APP_ID = p.APP_ID and p.USER_ID = :userId
- where a.ENABLED = 'Y'
- -- Show accessible apps first, then the rest; sort by name within each set.
- order by access desc, app_name asc
- ;
- ]]>
- </sql-query>
-
-
-</hibernate-mapping> \ No newline at end of file
diff --git a/ecomp-portal-BE/war/WEB-INF/fusion/orm/Fusion.hbm.xml b/ecomp-portal-BE/war/WEB-INF/fusion/orm/Fusion.hbm.xml
deleted file mode 100644
index 53c45b79..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/orm/Fusion.hbm.xml
+++ /dev/null
@@ -1,372 +0,0 @@
-<?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.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">
- <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>
-
-
- <!-- 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>
-
- <sql-query name="relatedUsers">
- <return-scalar column="ORG_USER_ID" type="java.lang.String"/>
-
- <![CDATA[
-
- select t.org_user_id from (
- select distinct c.org_user_id ORG_USER_ID, c.last_login_date
- from
- fn_user_role a,
- (select distinct role_id, app_id from fn_user_role a1, fn_user a2 where a1.user_id = a2.user_id and a2.org_user_id=:org_user_id) b,
- fn_user c
- where a.ROLE_ID = b.role_id
- and a.APP_ID = b.app_id
- and a.USER_ID = c.user_id
- order by c.last_login_date desc limit 10
- ) t
-
-
- ]]>
- </sql-query>
-
- <sql-query name="relatedUserVOs">
- <return-scalar column="ORG_USER_ID" type="java.lang.String"/>
- <return-scalar column="EMAIL" type="java.lang.String"/>
-
- <![CDATA[
-
- select t.org_user_id, t.email from (
- select distinct c.org_user_id ORG_USER_ID, c.email, c.last_login_date
- from
- fn_user_role a,
- (select distinct role_id, app_id from fn_user_role a1, fn_user a2 where a1.user_id = a2.user_id and a2.org_user_id=:org_user_id) b,
- fn_user c
- where a.ROLE_ID = b.role_id
- and a.APP_ID = b.app_id
- and a.USER_ID = c.user_id
- order by c.last_login_date desc limit 10
- ) t
-
-
- ]]>
- </sql-query>
-
- <query name="getCommonWidgetItem">
- from CommonWidget where category = :cat order by sortOrder, title
- </query>
-
- <!-- <query name="getEventWidgetData">
- from EventWidget order by sortOrder
- </query> -->
-
-
-</hibernate-mapping>
-
diff --git a/ecomp-portal-BE/war/WEB-INF/fusion/orm/Workflow.hbm.xml b/ecomp-portal-BE/war/WEB-INF/fusion/orm/Workflow.hbm.xml
deleted file mode 100644
index 69c19db7..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/orm/Workflow.hbm.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?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>
diff --git a/ecomp-portal-BE/war/WEB-INF/fusion/raptor/report_search.jsp b/ecomp-portal-BE/war/WEB-INF/fusion/raptor/report_search.jsp
deleted file mode 100644
index e1895d2c..00000000
--- a/ecomp-portal-BE/war/WEB-INF/fusion/raptor/report_search.jsp
+++ /dev/null
@@ -1,20 +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.
- ================================================================================
- --%>
-Hello world
diff --git a/ecomp-portal-BE/war/WEB-INF/jsp/error.jsp b/ecomp-portal-BE/war/WEB-INF/jsp/error.jsp
deleted file mode 100644
index c79aa89a..00000000
--- a/ecomp-portal-BE/war/WEB-INF/jsp/error.jsp
+++ /dev/null
@@ -1,20 +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.
- ================================================================================
- --%>
-${errMsg}
diff --git a/ecomp-portal-BE/war/WEB-INF/jsp/index.jsp b/ecomp-portal-BE/war/WEB-INF/jsp/index.jsp
deleted file mode 100644
index 4726ce19..00000000
--- a/ecomp-portal-BE/war/WEB-INF/jsp/index.jsp
+++ /dev/null
@@ -1,21 +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.
- ================================================================================
- --%>
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<c:redirect url="/index.html"/>
diff --git a/ecomp-portal-BE/war/WEB-INF/jsp/login.jsp b/ecomp-portal-BE/war/WEB-INF/jsp/login.jsp
deleted file mode 100644
index bdffc734..00000000
--- a/ecomp-portal-BE/war/WEB-INF/jsp/login.jsp
+++ /dev/null
@@ -1,152 +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.
- ================================================================================
- --%>
-<%@ 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" %>
-<%@ page import="org.openecomp.portalapp.portal.utils.EPSystemProperties" %>
-<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>
- <link rel="shortcut icon" href="assets/images/1cc621d2.ecomp_logo.png">
- <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;">
- <%
- String frontUrl = SystemProperties.getProperty(EPSystemProperties.FE_URL);
- %>
- <div ng-controller="externalLoginController">
- <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;opacity:0.7;background-color:white">
- <img src="static/fusion/images/ecomp-login.jpg" height="250"/>
- <br>
- <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;
- <a class="login-btn" id="loginBtn" ng-click="loginExternal();">LOGIN</a>
- <br>
- </div>
- </div>
- <br/><br/><br/><br/><br/><br/><br/>
- </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.loginUrl = "";
-
- $scope.loginExternal = function() {
- var postData={loginId:$scope.loginId,password:$scope.password};
- $.ajax({
- url: "open_source/login?",
- type : "POST",
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success:function (response){
- if(response.success=="success"){
- //window.location.href = 'applicationsHome';
- window.location.href= "<%=frontUrl%>"
- }else{
- $("#errorInfo span").text(response);
- //$("#errorInfo").text = response;
- $("#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>
diff --git a/ecomp-portal-BE/war/WEB-INF/jsp/oid-admin.jsp b/ecomp-portal-BE/war/WEB-INF/jsp/oid-admin.jsp
deleted file mode 100644
index 93fd69ce..00000000
--- a/ecomp-portal-BE/war/WEB-INF/jsp/oid-admin.jsp
+++ /dev/null
@@ -1,72 +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.
- ================================================================================
- --%>
-<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
-<%@ taglib prefix="o" tagdir="/WEB-INF/tags"%>
-<o:header title="Admin"/>
-<o:topbar pageName="Admin"/>
-<div class="container-fluid main">
- <div class="row-fluid">
- <div class="span10 offset1">
-
- <h1>Hello ${ userInfo.name }</h1>
-
- <div>
- <p>This page requires that the user be logged in with a valid account and the <code>ROLE_ADMIN</code> Spring Security authority.
- If you are reading this page, <span class="text-success">you are currently logged in as an administrator</span>.</p>
-
- <p>The authorization provider will assign your account a set of authorities depending on how it's configured.
- Your current login has the following Spring Security authorities:</p>
-
- <ul>
- <security:authentication property="authorities" var="authorities" />
- <c:forEach items="${authorities}" var="auth">
- <li><code>${ auth }</code></li>
- </c:forEach>
- </ul>
-
- </div>
- <div>
- <h3>Administrators</h3>
-
- <p>Logged in users are assigned the <code>ROLE_USER</code> authority by default, but the following users
- (identified by issuer/subject pairs) will also be given <code>ROLE_ADMIN</code>:</p>
-
- <table class="table table-striped table-hover span4">
- <tr>
- <th>Issuer</th>
- <th>Subject</th>
- </tr>
- <c:forEach items="${ admins }" var="admin">
- <tr>
- <td>${ admin.issuer }</td>
- <td>${ admin.subject }</td>
- </tr>
- </c:forEach>
- </table>
- </div>
-
- </div>
- </div>
-</div>
-
-
-<o:footer />
diff --git a/ecomp-portal-BE/war/WEB-INF/jsp/oid-home.jsp b/ecomp-portal-BE/war/WEB-INF/jsp/oid-home.jsp
deleted file mode 100644
index 9fd11036..00000000
--- a/ecomp-portal-BE/war/WEB-INF/jsp/oid-home.jsp
+++ /dev/null
@@ -1,102 +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.
- ================================================================================
- --%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
-<%@ taglib prefix="o" tagdir="/WEB-INF/tags"%>
-<%@ page session="false" %>
-<o:header title="Home"/>
-<o:topbar pageName="Home"/>
-<div class="container-fluid main">
- <div class="row-fluid">
- <div class="span10 offset1">
-
- <h1>
- Hello world!
- </h1>
-
- <div>
- <p class="well">
- <security:authorize access="hasRole('ROLE_USER')">
- <b><span class="text-success">You are currently logged in.</span></b>
- </security:authorize>
- <security:authorize access="!hasRole('ROLE_USER')">
- <b><span class="text-error">You are <em>NOT</em> currently logged in.</span></b>
- </security:authorize>
- </p>
-
- <p>This example application is configured with several pages requiring different levels of access.
- This page does not require the user to be logged in. Use the tabs in the navbar above to navigate to
- pages with different access requirements.
- </p>
-
- <ul>
- <li><a href="user">User</a>, requires the user to be logged in with the <code>ROLE_USER</code> Spring Security authority.</li>
- <li><a href="admin">Admin</a>, requires the user to be logged in with the <code>ROLE_ADMIN</code> Spring Security authority.
- See below for the currently configured list of admin accounts.</li>
- <security:authorize access="hasRole('ROLE_USER')">
- <li><a href="j_spring_security_logout">Logout</a>, log out directly and return to this page.</li>
- </security:authorize>
- <security:authorize access="!hasRole('ROLE_USER')">
- <li><a href="login">Log in</a>, log in directly and return to this page.</li>
- </security:authorize>
- </ul>
-
-
- </div>
-
- <div>
- <h3>Client Filter Configuration</h3>
-
- <p>This authorization filter for this client has been configured with the following components:</p>
-
- <ul>
- <li>Issuer service: <code>${ issuerServiceClass }</code></li>
- <li>Server configuration service: <code>${ serverConfigurationServiceClass }</code></li>
- <li>Client configuration service: <code>${ clientConfigurationServiceClass }</code></li>
- <li>Auth request options service: <code>${ authRequestOptionsServiceClass }</code></li>
- <li>Auth request URI builder: <code>${ authRequestUriBuilderClass }</code></li>
- </ul>
- </div>
-
- <div>
- <h3>Administrators</h3>
-
- <p>Logged in users are assigned the <code>ROLE_USER</code> authority by default, but the following users
- (identified by issuer/subject pairs) will also be given <code>ROLE_ADMIN</code>:</p>
-
- <table class="table table-striped table-hover span4">
- <tr>
- <th>Issuer</th>
- <th>Subject</th>
- </tr>
- <c:forEach items="${ admins }" var="admin">
- <tr>
- <td>${ admin.issuer }</td>
- <td>${ admin.subject }</td>
- </tr>
- </c:forEach>
- </table>
- </div>
- </div>
- </div>
-</div>
-
-
-<o:footer />
diff --git a/ecomp-portal-BE/war/WEB-INF/jsp/oid-login.jsp b/ecomp-portal-BE/war/WEB-INF/jsp/oid-login.jsp
deleted file mode 100644
index cf2f9bcc..00000000
--- a/ecomp-portal-BE/war/WEB-INF/jsp/oid-login.jsp
+++ /dev/null
@@ -1,76 +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.
- ================================================================================
- --%>
-<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
-<%@ taglib prefix="o" tagdir="/WEB-INF/tags"%>
-<o:header title="Login"/>
-<div class="container-fluid main">
- <div class="row-fluid">
- <div class="span10 offset1">
-
- <h2>Welcome to ECOMP Portal OpenId Login</h2>
-
- <p>
- Please provide the URI for your <code>OpenId Authorization Server</code>. Make sure the OpenId Connect Server is Running on the following location
- </p>
-
- <p>
- If you do not have one of your own, for a quick start up, you can clone from <a href='https://github.com/mitreid-connect/OpenID-Connect-Java-Spring-Server'>this</a> github location - It's an open source OpenID Connect Server.
- </p>
-
- <p>
- Simply clone on your local, go to sub-project directory called 'openid-connect-server-webapp' and do
-
- <code>mvn jetty:run</code>
-
- </p>
-
- <p>
- Choose a different port using the jetty plugin inside pom.xml, if the default 8080 is already taken by your Application.
- </p>
-
-
-
- <div class="well">
- <div class="row-fluid">
-
- <div class="span8">
- <form action="openid_connect_login" method="get">
- <input type="text" class="input-xxlarge" name="identifier" id="identifier" value = "http://localhost:8383/openid-connect-server-webapp/" />
- <input type="submit" value="Log In" />
- </form>
- </div>
- </div>
- </div>
- </div>
-</div>
-
-<script type="text/javascript">
- $(document).ready(function () {
- $('#localhost').on('click', function() {
- $('#identifier').val('http://localhost:8383/openid-connect-server-webapp/');
- });
- $('#mitreidorg').on('click', function() {
- $('#identifier').val('user@mitreid.org');
- });
-
- });
-</script>
diff --git a/ecomp-portal-BE/war/WEB-INF/jsp/oid-user.jsp b/ecomp-portal-BE/war/WEB-INF/jsp/oid-user.jsp
deleted file mode 100644
index 112415b0..00000000
--- a/ecomp-portal-BE/war/WEB-INF/jsp/oid-user.jsp
+++ /dev/null
@@ -1,139 +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.
- ================================================================================
- --%>
-<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
-<%@ taglib prefix="o" tagdir="/WEB-INF/tags"%>
-<o:header title="User"/>
-<o:topbar pageName="User"/>
-<div class="container-fluid main">
- <div class="row-fluid">
- <div class="span10 offset1">
-
- <h1>Hello ${ userInfo.name }</h1>
-
- <div>
- <p>This page requires that the user be logged in with a valid account and the <code>ROLE_USER</code> Spring Security authority.
- If you are reading this page, <span class="text-success">you are currently logged in</span>.</p>
-
- <security:authentication var="user" property="principal" />
-
- <p>The authorization provider will create a Principal object based on the <code>iss</code> and <code>sub</code>
- claims associated with your ID token. This value can be used as a globally unique username within the application
- (though it's not meant to be human-readable).
- Your Principal is: <code>${ user }</code></p>
-
- <p>The authorization provider will assign your account a set of authorities depending on how it's configured.
- Your current login has the following Spring Security authorities:</p>
-
- <ul>
- <security:authentication property="authorities" var="authorities" />
- <c:forEach items="${authorities}" var="auth">
- <li><code>${ auth }</code></li>
- </c:forEach>
- </ul>
-
- <h3>ID Token</h3>
-
- <p>Your ID Token has the following set of claims:</p>
-
- <security:authentication property="idToken" var="idToken" />
- <table class="table table-striped table-hover" id="idTokenTable">
- <thead>
- <tr>
- <th class="span1">Name</th>
- <th class="span11">Value</th>
- </tr>
- </thead>
- <tbody>
- </tbody>
- </table>
-
- <p>The ID Token header contains the following claims:</p>
-
- <table class="table table-striped table-hover" id="idTokenHeader">
- <thead>
- <tr>
- <th class="span1">Name</th>
- <th class="span11">Value</th>
- </tr>
- </thead>
- <tbody>
- </tbody>
- </table>
-
- <h3>User Info</h3>
-
- <p>The call to the User Info Endpoint returned the following set of claims:</p>
-
- <table class="table table-striped table-hover" id="userInfoTable">
- <thead>
- <tr>
- <th class="span1">Name</th>
- <th class="span11">Value</th>
- </tr>
- </thead>
- <tbody>
- </tbody>
- </table>
-
- </div>
-
- </div>
- </div>
-</div>
-
-<script type="text/javascript">
- $(document).ready(function () {
-
- var idTokenString = "${ idToken.serialize() }";
- var idToken = jwt.WebTokenParser.parse(idTokenString);
- var idHeader = JSON.parse(jwt.base64urldecode(idToken.headerSegment));
- var idClaims = JSON.parse(jwt.base64urldecode(idToken.payloadSegment));
-
- _.each(idClaims, function(val, key, list) {
- if (_.contains(["iat", "exp", "auth_time", "nbf"], key)) {
- // it's a date field, parse and print it
- var date = new Date(val * 1000);
- $('#idTokenTable tbody').append('<tr><td>' + _.escape(key) + '</td><td><span title="' + _.escape(val) + '">' + date + '</span></td></tr>');
- } else {
- $('#idTokenTable tbody').append('<tr><td>' + _.escape(key) + '</td><td>' + _.escape(val) + '</td></tr>');
- }
- });
-
- _.each(idHeader, function(val, key, list) {
- if (_.contains(["iat", "exp", "auth_time", "nbf"], key)) {
- // it's a date field, parse and print it
- var date = new Date(val * 1000);
- $('#idTokenHeader tbody').append('<tr><td>' + _.escape(key) + '</td><td><span title="' + _.escape(val) + '">' + date + '</span></td></tr>');
- } else {
- $('#idTokenHeader tbody').append('<tr><td>' + _.escape(key) + '</td><td>' + _.escape(val) + '</td></tr>');
- }
- });
-
- var userInfo = ${ userInfoJson };
- _.each(userInfo, function(val, key, list) {
- $('#userInfoTable tbody').append('<tr><td>' + _.escape(key) + '</td><td>' + _.escape(val) + '</td></tr>');
- });
- });
-
-</script>
-
-<o:footer />
diff --git a/ecomp-portal-BE/war/WEB-INF/jsp/welcome.jsp b/ecomp-portal-BE/war/WEB-INF/jsp/welcome.jsp
deleted file mode 100644
index 054c38fe..00000000
--- a/ecomp-portal-BE/war/WEB-INF/jsp/welcome.jsp
+++ /dev/null
@@ -1,695 +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.
- ================================================================================
- --%>
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
-
-<link rel="stylesheet" type="text/css" href="static/fusion/sample/css/slider.css">
-<link rel="stylesheet" type="text/css" href="static/fusion/sample/css/scribble.css" />
-<link rel="stylesheet" type="text/css" href="static/fusion/sample/css/spacegallery.css" />
-<link rel="stylesheet" href="static/fusion/css/att_angular_gridster/ui-gridster.css"/>
-<link rel="stylesheet" href="static/fusion/css/att_angular_gridster/sandbox-gridster.css"/>
-
-<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/app.js"></script>
-<script src= "static/ebz/angular_js/gestures.js"></script>
-
-<script src="static/js/jquery-1.10.2.js"></script>
-<!-- <script src="static/fusion/js/jquery.resize.js"></script> -->
-<script src="static/fusion/js/att_angular_gridster/ui-gridster-tpls.js"></script>
-<script src="static/fusion/js/att_angular_gridster/angular-gridster.js"></script>
-
-<script src= "static/ebz/angular_js/checklist-model.js"></script>
-<script src= "static/js/modalService.js"></script>
-<script src="static/js/jquery.mask.min.js" type="text/javascript"></script>
-<script src="static/js/jquery-ui.js" type="text/javascript"></script>
-<script src="static/ebz/sandbox/att-abs-tpls.js" type="text/javascript"></script>
-<script src="static/ebz/sandbox/att-abs-tpls.min.js" type="text/javascript"></script>
-<style>
-.button--small, [class*=bg-] .button--small {
- font-size: 14px;
- };
-</style>
-
-<style>
-.gridster-item-container .gridster-item-body{
-bottom:0px;
-}
-.gridster-item-container{
-min-height:50px;
-}
-.att-accordion {
- border-width: 0px;
-}
-</style>
-
-<style>
- #myGallery {
- width: 100%;
- height: 400px;
- }
-
- #myGallery img {
- border: 2px solid #52697E;
- }
-
- a.loading {
- background: #fff url(../images/ajax_small.gif) no-repeat center;
- }
-
- .center {
- margin-left: auto;
- margin-right: auto;
- }
-
-</style>
-
-<script type="text/javascript" src="static/fusion/sample/js/FusionCharts.js"></script> <!-- Charts -->
-<script type="text/javascript" src="static/fusion/sample/js/charts.js"></script> <!-- Charts -->
-
-<script type="text/javascript" src="static/fusion/sample/js/slides.min.jquery.js"></script> <!-- Image Slider -->
-<script type="text/javascript" src="static/fusion/sample/js/scribble.js"></script> <!-- Scribble -->
-<script type="text/javascript" src="static/fusion/sample/js/eye.js"></script> <!-- Space Gallery -->
-<script type="text/javascript" src="static/fusion/sample/js/utils.js"></script> <!-- Space Gallery -->
-<script type="text/javascript" src="static/fusion/sample/js/spacegallery.js"></script> <!-- Space Gallery -->
-
- <!-- Carousel rendering -->
- <script>
- (function($){
- var initLayout = function() {
- $('#myGallery').spacegallery({loadingClass: 'loading'});
- };
-
- EYE.register(initLayout, 'init');
- })(jQuery)
- </script>
-
- <!-- Slider rendering -->
- <script>
- $(function(){
- $('#slides').slides({
- preload: true,
- preloadImage: 'static/fusion/sample/images/loading.gif',
- play: 5000,
- pause: 10000,
- hoverPause: true,
- animationStart: function(current){
- $('.caption').animate({
- bottom:-35
- },100);
- if (window.console && console.log) {
- // example return of current slide number
- //console.log('animationStart on slide: ', current);
- };
- },
- animationComplete: function(current){
- $('.caption').animate({
- bottom:0
- },200);
- if (window.console && console.log) {
- // example return of current slide number
- //console.log('animationComplete on slide: ', current);
- };
- },
- slidesLoaded: function() {
- $('.caption').animate({
- bottom:0
- },200);
- }
- });
- });
-
-
- </script>
-
-<div ng-controller="welcomeController">
- <fmt:message key="general.home" var="title" />
- <div>
- <span style="font-weight:bold;font-size:11pt;">Welcome ${sessionScope.user.firstName} ${sessionScope.user.lastName}</span>&nbsp;
- (Last Login:&nbsp;<fmt:formatDate value="${sessionScope.user.lastLoginDate}" type="date" pattern="dd MMM yyyy hh:mma zzz" var="lastLogin" /> ${lastLogin})
- </div>
-
- <div style="float:left; width:320px; height:320px; margin:10px 27px 10px 27px;color:#222222;text-shadow: 1px 1px 2px #A0A0A0;" >
- <p style="font-weight:bold;font-size:16pt;color:#0046B8;">Network </p>
- <p style="font-weight:bold;font-size:16pt;color:#0046B8;">Visualization </p>
-
- </div>
-
- <!-- Spacer required to center the Image slider (can also be used for content) -->
- <div style="float:right; width:120px; height:320px; margin:10px 27px 10px 10px;color:#222222;text-shadow: 1px 1px 2px #A0A0A0;">
- <p style="font-weight:bold;font-size:9pt;">
- You can toggle between the Image Slider and Carousel controls by clicking on the respective radio button below:
- </p>
- <input type="radio" name="viewer" onClick="$('#example').show();$('#myGallery').hide();" value="Slider" />Slider<br/>
- <input type="radio" name="viewer" onClick="$('#example').hide();$('#myGallery').show();" value="Carousel" />Carousel
-
- <br/>
- </div>
-
- <div id="container">
-
- <div style="position:relative">
- <div id="myGallery" class="spacegallery" style="position:static">
- <img src="static/fusion/sample/images/carousel/slide_b_drive_test_map.png" alt="Drive test analytics" />
- <img src="static/fusion/sample/images/carousel/slide_b_ios_throughput.png" alt="MTSA - Nationwide DL throughput for iOS devices over cellular network" />
- <img src="static/fusion/sample/images/carousel/slide_b_eppt_county.png" alt="Location based services county level drive test" />
- <img src="static/fusion/sample/images/carousel/slide_b_lata_map.png" alt="Network demand data by LATA (2020 forecast)" />
- <img src="static/fusion/sample/images/carousel/slide_b_eppt_regression.png" alt="Linear regression prediction of LBS/E911 drive test accuracy" />
- <img src="static/fusion/sample/images/carousel/slide_b_nova_sdn_map.png" alt="SDN Simulator - SNRC Traffic" />
- <span style="float:right; color:#222222;">(Click on Image to Rotate)</span>
- </div>
- </div>
- <div id="example">
- <div id="slides">
- <div class="slides_container">
- <div class="slide">
- <a href="#" title="Drive test analytics"><img src="static/fusion/sample/images/carousel/slide_b_drive_test_map.png" width="570" height="270" alt="Drive test analytics"></a>
- <div class="caption">
- <p>Drive test analytics</p>
- </div>
- </div>
- <div class="slide">
- <a href="doclib.htm" title="MTSA - Nationwide DL throughput for iOS devices over cellular network"><img src="static/fusion/sample/images/carousel/slide_b_ios_throughput.png" width="570" height="270" alt="MTSA - Nationwide DL throughput for iOS devices over cellular network"></a>
- <div class="caption">
- <p>Nationwide DL throughput for iOS devices over cellular network</p>
- </div>
- </div>
- <div class="slide">
- <a href="#" title="Network demand data by LATA (2020 forecast)"><img src="static/fusion/sample/images/carousel/slide_b_lata_map.png" width="570" height="270" alt="Network demand data by LATA (2020 forecast)"></a>
- <div class="caption">
- <p>Network demand data by LATA (2020 forecast)</p>
- </div>
- </div>
- <div class="slide">
- <a href="#" title="Location based services county level drive test"><img src="static/fusion/sample/images/carousel/slide_b_eppt_county.png" width="570" height="270" alt="Location based services county level drive test"></a>
- <div class="caption">
- <p>Location based services county level drive test</p>
- </div>
- </div>
- <div class="slide">
- <a href="broadcast_list.htm" title="SDN Simulator - SNRC Traffic"><img src="static/fusion/sample/images/carousel/slide_b_nova_sdn_map.png" width="570" height="270" alt="SDN Simulator - SNRC Traffic"></a>
- <div class="caption">
- <p>SDN Simulator - SNRC Traffic</p>
- </div>
- </div>
- <div class="slide">
- <a href="#" title="Linear regression prediction of LBS/E911 drive test accuracy"><img src="static/fusion/sample/images/carousel/slide_b_eppt_regression.png" width="570" height="270" alt="Linear regression prediction of LBS/E911 drive test accuracy"></a>
- <div class="caption" style="bottom:0">
- <p>Linear regression prediction of LBS/E911 drive test accuracy</p>
- </div>
- </div>
- </div>
- <a href="#" class="prev"><img src="static/fusion/sample/images/arrow-prev.png" width="24" height="43" alt="Arrow Prev"></a>
- <a href="#" class="next"><img src="static/fusion/sample/images/arrow-next.png" width="24" height="43" alt="Arrow Next"></a>
- </div>
- <img src="static/fusion/sample/images/example-frame.png" width="739" height="341" alt="Example Frame" id="frame">
- </div>
- </div>
-
- <center>
- <div class="gridster-container">
- <div att-gridster att-gridster-options='gridsterOpts'>
- <div att-gridster-item='item' ng-repeat="item in standardItems">
- <div att-gridster-item-header
- header-text={{item.headerText}}
- sub-header-text={{item.subHeaderText}}>
- <!--ICON BUTTONS PLACEHOLDER START-->
- <div class="tileMinMaxBtn" ng-click="toggleMinMax($index,'')">
- <span class="tileMinMaxIcon">
- <i class="icon-chevron-up" style="color:gray" ng-show="item.max"></i>
- <i class="icon-chevron-down" style="color:gray" ng-hide="item.max"></i>
- </span>
- </div>
- <!--ICON BUTTONS PLACEHOLDER END-->
- </div>
- <div att-gridster-item-body >
- <!--ACTUAL BODY CONTENT START-->
- <div align="center" style="margin-top:10px;">
- <div align="left" ng-if="item.headerText=='Dashboard' && item.max">
- <label>&nbsp; Sample Charts</label><BR>
- <iframe scrolling="no" frameBorder="0" style="width: 430px; height: 360px;" src="static/fusion/sample/html/wordcloud.html"></iframe>
- </div>
- <div ng-if="item.headerText=='Donut Chart' && item.max">
- <iframe scrolling="no" frameBorder="0" style="width: 310px; height: 210px;" src="static/fusion/sample/html/donut_d3.html"></iframe>
- </div>
- <div ng-if="item.headerText=='Area Chart' && item.max">
- <iframe scrolling="no" frameBorder="0" style="width: 310px; height: 210px;" src="static/fusion/sample/html/area_chart.html"></iframe>
- </div>
- <div ng-if="item.headerText=='Pie Chart' && item.max">
- <iframe scrolling="no" frameBorder="0" style="width: 310px; height: 210px;" src="static/fusion/sample/html/pie_chart.html"></iframe>
- </div>
- <div ng-if="item.headerText=='Line Chart' && item.max">
- <iframe scrolling="no" frameBorder="0" style="width: 310px; height: 210px;" src="static/fusion/sample/html/line_chart.html"></iframe>
- </div>
- <div ng-if="item.headerText=='Gauges' && item.max">
- <iframe scrolling="no" frameBorder="0" style="width: 310pxx; height: 210px;" src="static/fusion/sample/html/d3_gauges_demo.html"></iframe>
- </div>
-
- <div align="left" ng-if="item.headerText=='Traffic distribution by day of week' && item.max">
- <att-tabs title="gTabs" class="tabs" >
- <floating-tabs ng-model='activeTabId' size="small"></floating-tabs>
- </att-Tabs>
- <div>
- <div id="Monday" align="left"><img src="static/fusion/sample/images/tunnels/1_mon.png" width=100% height=100% alt="Monday"></div>
- <div id="Tuesday" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/2_tue.png" width=100% height=100% alt="Tuesday"></div>
- <div id="Wednesday" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/3_wed.png" width=100% height=100% alt="Wednesday"></div>
- <div id="Thursday" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/4_thu.png" width=100% height=100% alt="Thursday"></div>
- <div id="Friday" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/5_fri.png" width=100% height=100% alt="Friday"></div>
- <div id="Saturday" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/6_sat.png" width=100% height=100% alt="Saturday"></div>
- <div id="Sunday" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/7_sun.png" width=100% height=100% alt="Sunday"></div>
- </div>
- </div>
- <div align="left" ng-if="item.headerText=='Busy hour traffic analysis by day of week' && item.max">
- <att-tabs title="gTabs2">
- <floating-tabs ng-model='activeTabId2' size="small"></floating-tabs>
- </att-Tabs>
- <div>
- <div id="Incoming" align="left"><img src="static/fusion/sample/images/tunnels/BH_DLSTX_IN.png" width=100% height=100% alt="Monday"></div>
- <div id="Outgoing" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/BH_DLSTX_OUT.png" width=100% height=100% alt="Tuesday"></div>
- <div id="Default" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/BH_Nat_Def.png" width=100% height=100% alt="Wednesday"></div>
- <div id="Priority" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/BH_Nat_Priority.png" width=100% height=100% alt="Thursday"></div>
- <div id="BHNational" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/BH_Nat.png" width=100% height=100% alt="Friday"></div>
- </div>
- </div>
-
- <div align="left" ng-if="item.headerText=='Additional Samples' && item.max">
- <label>&nbsp;Quick Links</label>
- <table att-table >
-
- <tr>
- <td att-table-body width="90%" ><a href="" target="_blank">Contacts</a></td>
- <td att-table-body width="10%">
- <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a>
- </td>
- </tr>
- <tr>
- <td att-table-body width="90%" ><a href="" target="_blank">Developer Program</a></td>
- <td att-table-body width="10%">
- <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a>
- </td>
- </tr>
- <tr>
- <td att-table-body width="90%" ><a href="http://www.zkoss.org" target="_blank">ZK Framework</a></td>
- <td att-table-body width="10%">
- <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a>
- </td>
- </tr>
- <tr>
- <td att-table-body width="90%" ><a href="http://jquery.com" target="_blank">JQuery</a></td>
- <td att-table-body width="10%">
- <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a>
- </td>
- </tr>
- <tr>
- <td att-table-body width="90%" ><a href="force_cluster.html" target="_blank">RNC Visualization</a></td>
- <td att-table-body width="10%">
- <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a>
- </td>
- </tr>
- <tr>
- <td att-table-body width="90%" ><a href="sample_heat_map.htm" target="">Heat Map</a></td>
- <td att-table-body width="10%">
- <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a>
- </td>
- </tr>
- <tr>
- <td att-table-body width="90%" ><a href="sample_animated_map.htm" target="">Animated Map</a></td>
- <td att-table-body width="10%">
- <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a>
- </td>
- </tr>
- <tr>
- <td att-table-body width="90%" ><a href="jbpm_drools.htm" target="_blank">Process Management</a></td>
- <td att-table-body width="10%">
- <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a>
- </td>
- </tr>
- <tr>
- <td att-table-body width="90%" ><a href="chatRoom.htm">Chat Session</a></td>
- <td att-table-body width="10%">
- <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a>
- </td>
- </tr>
- </table>
- </div>
- <div ng-if="item.headerText=='Sticky Notes' && item.max">
- <div style="width:100%; height:400px" id="scribble-pad"><pre id="scribble" contenteditable="true" onkeyup="storeUserScribble(this.id);"></pre></div>
- </div>
- <div ng-if="item.headerText=='Service Configuration' && item.max">
- <accordion close-others="true" css="att-accordion">
- <accordion-group heading="Service Configuration" is-open="group11.open">
- <iframe scrolling="no" frameBorder="0" align="center" width="100%" height="400px" src="static/fusion/sample/org_chart/example.html" ></iframe>
- </accordion-group>
- <accordion-group heading="VSP Service Configuration" is-open="group12.open">
- <iframe scrolling="no" frameBorder="0" align="center" width="100%" height="400px" src="static/fusion/sample/org_chart/example_vsp.html" ></iframe>
- </accordion-group>
- </accordion>
- </div>
-
- </div>
-
- <!--ACTUAL BODY CONTENT END-->
- </div>
- <!-- <div att-gridster-item-footer
- att-gridster-item-footer-link={{item.footerLink}}>
- {{item.footerLinkText}}
- </div> -->
- </div>
- </div>
- </div>
- </center>
-
-</div>
-
-<script>
-$(document).ready(function(){
- $( "#rightIcon" ).hide();
- $( "#leftIcon" ).show();
-});
-var app=angular.module("abs", ["att.abs", "modalServices","att.gridster","checklist-model"]);
-app.controller('welcomeController', function ($scope, modalService, $modal) {
-
- $scope.gridsterOpts = {
- columns: 3, // the width of the grid, in columns
- pushing: true, // whether to push other items out of the way on move or resize
- floating: true, // whether to automatically float items up so they stack (you can temporarily disable if you are adding unsorted items with ng-repeat)
- width: 'auto', // can be an integer or 'auto'. 'auto' scales gridster to be the full width of its containing element
- colWidth: 'auto', // can be an integer or 'auto'. 'auto' uses the pixel width of the element divided by 'columns'
- rowHeight: 60, // can be an integer or 'match'. Match uses the colWidth, giving you square widgets.
- margins: [10, 10], // the pixel distance between each widget
- outerMargin: true, // whether margins apply to outer edges of the grid
- swapping: true,
- draggable: {
- enabled: true, // whether dragging items is supported
- stop: function(event, uiWidget, $element) {$scope.setCookie();} // optional callback fired when item is finished dragging
- }
-
- };
-
- /* $scope.gridsterOpts = {
- columns: 6,
- width: 'auto',
- colWidth: '230',
- rowHeight: '120',
- margins: [10, 10],
- outerMargin: true,
- pushing: true,
- floating: true,
- swapping: true
- }; */
-
-
- $scope.toggleMinMax = function(index, tileName){
- if(tileName==''){
- $scope.standardItems[index].max = !$scope.standardItems[index].max;
- if($scope.standardItems[index].max)
- $scope.standardItems[index].sizeY=$scope.standardItems[index].maxHeight;
- else
- $scope.standardItems[index].sizeY=0;
- }else{
- $scope.tileTemp = $scope.$eval(tileName);
- var tileMax = $parse(tileName+'.max');
- tileMax.assign($scope, !$scope.$eval(tileName).max);
- var tileSizeY = $parse(tileName+'.sizeY');
- if($scope.tileTemp.max)
- tileSizeY.assign($scope, $scope.tileTemp.maxHeight);
- else
- tileSizeY.assign($scope, 0);
- }
- };
- // These map directly to gridsterItem options
- // IMPORTANT: Items should be placed in the grid in the order in which
- // they should appear.
- // In most cases the sorting should be by row ASC, col ASC
- $scope.standardItems = [{
- sizeX: 1,
- sizeY: 8,
- maxHeight: 8,
- row: 0,
- col: 0,
- headerText:'Dashboard',
- max:false
-
-
- },
- {
- sizeX: 1,
- sizeY: 5,
- maxHeight: 5,
- row: 0,
- col: 1,
- headerText:'Donut Chart',
- max:false
-
- },
- {
- sizeX: 1,
- sizeY: 5,
- maxHeight: 5,
- row: 0,
- col: 2,
- headerText:'Area Chart',
- max:true
- },
- {
- sizeX: 1,
- sizeY: 5,
- maxHeight: 5,
- row: 8,
- col: 0,
- headerText:'Pie Chart',
- max:false
- },
- {
- sizeX: 1,
- sizeY: 5,
- maxHeight: 5,
- row: 8,
- col: 1,
- headerText:'Line Chart',
- max:true
- },
- {
- sizeX: 1,
- sizeY: 5,
- maxHeight: 5,
- row: 8,
- col: 2,
- headerText:'Gauges',
- max:false
- },
- {
- sizeX: 1,
- sizeY: 8,
- maxHeight: 8,
- row: 16,
- col: 0,
- headerText:'Traffic distribution by day of week',
- max:false
- },
- {
- sizeX: 1,
- sizeY: 8,
- maxHeight: 8,
- row: 16,
- col: 1,
- headerText:'Busy hour traffic analysis by day of week',
- max:false
- },
- {
- sizeX: 1,
- sizeY: 6,
- maxHeight: 6,
- row: 24,
- col: 0,
- headerText:'Additional Samples',
- max:false
- },
- {
- sizeX: 1,
- sizeY: 8,
- maxHeight: 8,
- row: 24,
- col: 1,
- headerText:'Sticky Notes',
- max:false
- },
- {
- sizeX: 3,
- sizeY: 10,
- maxHeight: 10,
- row: 32,
- col: 0,
- headerText:'Service Configuration',
- max:false
- }];
-
- $.each($scope.standardItems, function(i, a){
- $scope.toggleMinMax(i,'');
- });
- $scope.activeTabId = 'Monday';
- //for generic tabs
- $scope.gTabs = [{
- title: 'Monday',
- id: 'Monday',
- url: '#Monday',
- selected: true
- },{
- title: 'Tuesday',
- id: 'Tuesday',
- url: '#Tuesday'
- },{
- title: 'Wednesday',
- id: 'Wednesday',
- url: '#Wednesday'
- },{
- title: 'Thursday',
- id: 'Thursday',
- url: '#Thursday'
- },{
- title: 'Friday',
- id: 'Friday',
- url: '#Friday'
- },{
- title: 'Saturday',
- id: 'Saturday',
- url: '#Saturday'
- },{
- title: 'Sunday',
- id: 'Sunday',
- url: '#Sunday'
- }
- ];
-
- $scope.activeTabId2 = 'Incoming';
- //for generic tabs
- $scope.gTabs2 = [{
- title: 'BH SNRC DLSTX - Incoming',
- id: 'Incoming',
- url: '#Incoming',
- selected: true
- },{
- title: 'BH SNRC DLSTX - Outgoing',
- id: 'Outgoing',
- url: '#Outgoing'
- },{
- title: 'BH National - Default',
- id: 'Default',
- url: '#Default'
- },{
- title: 'BH National - Priority',
- id: 'Priority',
- url: '#Priority'
- },{
- title: 'BH National',
- id: 'BHNational',
- url: '#BHNational'
- }
- ];
-
- $scope.activeTabId3 = 'Incoming';
- //for generic tabs
- $scope.gTabs3 = [{
- title: 'BH SNRC DLSTX - Incoming',
- id: 'Incoming',
- url: '#Incoming',
- selected: true
- },{
- title: 'BH SNRC DLSTX - Outgoing',
- id: 'Outgoing',
- url: '#Outgoing'
- },{
- title: 'BH National - Default',
- id: 'Default',
- url: '#Default'
- },{
- title: 'BH National - Priority',
- id: 'Priority',
- url: '#Priority'
- },{
- title: 'BH National',
- id: 'BHNational',
- url: '#BHNational'
- }
- ];
-
- /* $scope.$watch('activeTabId', function(newVal) {
- alert(newval);
- $('#'+newval).show();
- }, true); */
-
- $scope.toggleEastToWest = function() {
- $( "#toggle" ).toggle( 'slide');
- if ($("#leftIcon").is(":visible")) {
- $( "#rightIcon" ).show();
- $( "#leftIcon" ).hide();
- }
- else if ($("#rightIcon").is(":visible")) {
- $( "#rightIcon" ).hide();
- $( "#leftIcon" ).show();
- }
- };
-
- $scope.group1 = {
- open: true
- };
- $scope.group2 = {
- open: true
- };
- $scope.group3 = {
- open: true
- };
- $scope.group4 = {
- open: true
- };
- $scope.group5 = {
- open: true
- };
- $scope.group6 = {
- open: true
- };
- $scope.group7 = {
- open: true
- };
- $scope.group71 = {
- open: true
- };
- $scope.group8 = {
- open: true
- };
- $scope.group9 = {
- open: true
- };
- $scope.group10 = {
- open: true
- };
- $scope.group11 = {
- open: true
- };
- $scope.group12 = {
- open: false
- };
-});
-</script>
-
- <!-- Select the Slider control by default -->
- <script>$('input[name=viewer]:eq(1)').click();</script>
diff --git a/ecomp-portal-BE/war/WEB-INF/oid-context.xml b/ecomp-portal-BE/war/WEB-INF/oid-context.xml
deleted file mode 100644
index 33458d6d..00000000
--- a/ecomp-portal-BE/war/WEB-INF/oid-context.xml
+++ /dev/null
@@ -1,455 +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.
- ================================================================================
- -->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:mvc="http://www.springframework.org/schema/mvc"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:tx="http://www.springframework.org/schema/tx"
- xmlns:context="http://www.springframework.org/schema/context"
- xmlns:security="http://www.springframework.org/schema/security"
- xmlns:oauth="http://www.springframework.org/schema/security/oauth2"
- xmlns:util="http://www.springframework.org/schema/util"
- xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd
- http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
- http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.1.xsd
- http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.1.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd">
-
- <!-- DispatcherServlet Context: defines this servlet's request-processing
- infrastructure -->
-
-
- <bean
- class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
- <property name="location">
- <value>classpath:openid-connect.properties</value>
- </property>
- </bean>
-
-
- <!-- Enables the Spring MVC @Controller programming model -->
- <mvc:annotation-driven />
-
- <mvc:interceptors>
- <!-- Inject the UserInfo into the current context -->
- <bean id="userInfoInterceptor" class="org.mitre.openid.connect.web.UserInfoInterceptor" />
- </mvc:interceptors>
-
- <!-- Handles HTTP GET requests for /resources/** by efficiently serving
- up static resources in the ${webappRoot}/resources directory -->
- <mvc:resources mapping="/resources/**" location="/resources/" />
-
- <!-- Resolves views selected for rendering by @Controllers to .jsp resources
- in the /WEB-INF/views directory -->
- <bean
- class="org.springframework.web.servlet.view.InternalResourceViewResolver">
- <property name="prefix" value="/WEB-INF/views/" />
- <property name="suffix" value=".jsp" />
- </bean>
-
- <context:component-scan base-package="org.openecomp.portalapp.security.openid.controllers" />
-
- <security:global-method-security pre-post-annotations="enabled" proxy-target-class="true" authentication-manager-ref="authenticationManager"/>
-
- <security:http auto-config="false" use-expressions="true" disable-url-rewriting="true" entry-point-ref="authenticationEntryPoint" pattern="/**">
- <security:custom-filter before="PRE_AUTH_FILTER" ref="openIdConnectAuthenticationFilter" />
- <security:logout />
- </security:http>
-
- <bean id="authenticationEntryPoint" class="org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint">
- <property name="loginFormUrl" value="/openid_connect_login" />
- </bean>
-
- <security:authentication-manager alias="authenticationManager">
- <security:authentication-provider ref="openIdConnectAuthenticationProvider" />
- </security:authentication-manager>
-
- <bean id="openIdConnectAuthenticationProvider" class="org.mitre.openid.connect.client.OIDCAuthenticationProvider">
- <property name="authoritiesMapper">
- <bean class="org.mitre.openid.connect.client.NamedAdminAuthoritiesMapper">
- <property name="admins" ref="namedAdmins" />
- </bean>
- </property>
- </bean>
-
- <util:set id="namedAdmins" value-type="org.mitre.openid.connect.client.SubjectIssuerGrantedAuthority">
- <!--
- This is an example of how to set up a user as an administrator: they'll be given ROLE_ADMIN in addition to ROLE_USER.
- Note that having an administrator role on the IdP doesn't grant administrator access on this client.
-
- These are values from the demo "openid-connect-server-webapp" project of MITREid Connect.
- -->
- <bean class="org.mitre.openid.connect.client.SubjectIssuerGrantedAuthority">
- <constructor-arg name="subject" value="90342.ASDFJWFA" />
- <constructor-arg name="issuer" value="${authentication_server_url}" />
- </bean>
- </util:set>
-
-
- <!--
- -
- - The authentication filter
- -
- -->
- <bean id="openIdConnectAuthenticationFilter" class="org.mitre.openid.connect.client.OIDCAuthenticationFilter">
- <property name="authenticationManager" ref="authenticationManager" />
-
- <property name="issuerService" ref="hybridIssuerService" />
- <property name="serverConfigurationService" ref="dynamicServerConfigurationService" />
- <property name="clientConfigurationService" ref="dynamicClientConfigurationService" />
- <property name="authRequestOptionsService" ref="staticAuthRequestOptionsService" />
- <property name="authRequestUrlBuilder" ref="plainAuthRequestUrlBuilder" />
-
- </bean>
-
-
-
- <!--
- -
- - Issuer Services: Determine which identity provider issuer is used.
- -
- -->
-
-
- <!--
- Static issuer service, returns the same issuer for every request.
- -->
- <bean class="org.mitre.openid.connect.client.service.impl.StaticSingleIssuerService" id="staticIssuerService">
- <property name="issuer" value="${authentication_server_url}" />
- </bean>
-
- <!--
- WebFinger issuer service, does OpenID Connect Discovery on user-entered text (received from the
- loginPageUrl page) to find the issuer. The login page needs to return the user-entered text
- as the "identifier" parameter as a query parameter.
- -->
- <bean class="org.mitre.openid.connect.client.service.impl.WebfingerIssuerService" id="webfingerIssuerService">
- <property name="loginPageUrl" value="login" />
- </bean>
-
- <!--
- Third-party (account chooser) issuer service. Looks for the "iss" parameter on the request
- and returns that as the issuer. If there is no "iss" value, redirects to the configured
- account chooser URI. This URI should direct back to the login filter URL with an
- "iss" value as a query parameter.
- -->
- <bean class="org.mitre.openid.connect.client.service.impl.ThirdPartyIssuerService">
- <property name="accountChooserUrl" value="http://localhost/account-chooser/" />
- </bean>
-
- <!--
- Hybrid issuer service. If an issuer is passed in directly with the "iss" parameter, it will use that. If not, it will
- look for an "identifier" parameter to do Webfinger discovery on that. Failing that, it will redirect to the login
- page URL.
- -->
- <bean class="org.mitre.openid.connect.client.service.impl.HybridIssuerService" id="hybridIssuerService">
- <property name="loginPageUrl" value="login" />
- <property name="forceHttps" value="false" /> <!-- this default property forces the webfinger issuer URL to be HTTPS, turn off for development work -->
- </bean>
-
- <!--
- -
- - Server configuration: determines the parameters and URLs of the server to talk to.
- -
- -->
-
- <!--
- Static server configuration, contains a map of server configuration objects keyed by the issuer URL.
- -->
- <bean class="org.mitre.openid.connect.client.service.impl.StaticServerConfigurationService">
- <property name="servers">
- <map>
- <entry key="${authentication_server_url}">
- <bean class="org.mitre.openid.connect.config.ServerConfiguration">
- <property name="issuer" value="${authentication_server_url}" />
- <property name="authorizationEndpointUri" value="${authentication_server_url}authorize" />
- <property name="tokenEndpointUri" value="${authentication_server_url}token" />
- <property name="userInfoUri" value="${authentication_server_url}userinfo" />
- <property name="jwksUri" value="${authentication_server_url}jwk" />
- </bean>
- </entry>
- </map>
- </property>
- </bean>
-
- <!--
- Dynamic server configuration, fetches the server's information using OIDC Discovery.
- -->
- <bean class="org.mitre.openid.connect.client.service.impl.DynamicServerConfigurationService" id="dynamicServerConfigurationService" />
-
- <!--
- Hybrid server configuration. Tries to look up a statically configured server in the map, does
- dynamic OIDC Discovery if the static lookup fails.
- -->
- <bean class="org.mitre.openid.connect.client.service.impl.HybridServerConfigurationService">
- <property name="servers">
- <map>
- <entry key="${authentication_server_url}">
- <bean class="org.mitre.openid.connect.config.ServerConfiguration">
- <property name="issuer" value="${authentication_server_url}" />
- <property name="authorizationEndpointUri" value="${authentication_server_url}authorize" />
- <property name="tokenEndpointUri" value="${authentication_server_url}token" />
- <property name="userInfoUri" value="${authentication_server_url}userinfo" />
- <property name="jwksUri" value="${authentication_server_url}jwk" />
- </bean>
- </entry>
- </map>
- </property>
- </bean>
-
-
- <!--
- -
- - Client Configuration: Determine which client identifier and credentials are used.
- -
- -->
-
-
- <!--
- Dynamic Client Configuration, uses dynamic client registration. This version stores the registered
- clients in an in-memory map. To override, add a bean to the registeredClientService property.
- -->
-
- <bean class="org.mitre.openid.connect.client.service.impl.DynamicRegistrationClientConfigurationService" id="dynamicClientConfigurationService">
- <property name="template">
- <bean class="org.mitre.oauth2.model.RegisteredClient">
- <property name="clientName" value="ECOMP Portal OpenId Connect Client1" />
-
- <property name="scope">
- <set value-type="java.lang.String">
- <value>openid</value>
- <value>email</value>
- <value>address</value>
- <value>profile</value>
- <value>phone</value>
- </set>
- </property>
- <property name="tokenEndpointAuthMethod" value="SECRET_BASIC" />
- <property name="redirectUris">
- <set>
- <value>${ecomp_openid_connect_client}</value>
- </set>
- </property>
- </bean>
- </property>
- <!--
- Registered Client Service. Uncomment this to save dynamically registered clients out to a
- file on disk (indicated by the filename property) or replace this with another implementation
- of RegisteredClientService. This defaults to an in-memory implementation of RegisteredClientService
- which will forget and re-register all clients on restart.
- -->
- <!--
- <property name="registeredClientService">
- <bean class="org.mitre.openid.connect.client.service.impl.JsonFileRegisteredClientService">
- <constructor-arg name="filename" value="/tmp/simple-web-app-clients.json" />
- </bean>
- </property>
- -->
- </bean>
-
- <!--
- Static Client Configuration. Configures a client statically by storing configuration on a per-issuer basis.
- -->
-
- <bean class="org.mitre.openid.connect.client.service.impl.StaticClientConfigurationService" id="staticClientConfigurationService">
- <property name="clients">
- <map>
- <entry key="${authentication_server_url}">
- <bean class="org.mitre.oauth2.model.RegisteredClient">
- <property name="clientId" value="ecomp" />
- <property name="clientSecret" value="secret" />
- <property name="scope">
- <set value-type="java.lang.String">
- <value>openid</value>
- <value>email</value>
- <value>address</value>
- <value>profile</value>
- <value>phone</value>
- </set>
- </property>
- <property name="tokenEndpointAuthMethod" value="SECRET_BASIC" />
- <property name="redirectUris">
- <set>
- <value>${ecomp_openid_connect_client}</value>
- </set>
- </property>
- </bean>
- </entry>
- </map>
- </property>
- </bean>
-
- <!--
- Hybrid Client Configuration. Tries to configure a client statically first, but if a client isn't found in the map,
- it will dynamically configure one.
- -->
- <bean class="org.mitre.openid.connect.client.service.impl.HybridClientConfigurationService" id="hybridClientConfigurationService">
- <property name="clients">
- <map>
- <entry key="${authentication_server_url}">
- <bean class="org.mitre.oauth2.model.RegisteredClient">
- <property name="clientId" value="client" />
- <property name="clientSecret" value="secret" />
- <property name="scope">
- <set value-type="java.lang.String">
- <value>openid</value>
- <value>email</value>
- <value>address</value>
- <value>profile</value>
- <value>phone</value>
- </set>
- </property>
- <property name="tokenEndpointAuthMethod" value="SECRET_BASIC" />
- <property name="redirectUris">
- <set>
- <value>${ecomp_openid_connect_client}</value>
- </set>
- </property>
-
- </bean>
- </entry>
- </map>
- </property>
- <property name="template">
- <bean class="org.mitre.oauth2.model.RegisteredClient">
- <property name="clientName" value="ECOMP Portal OpenId Connect Client2" />
- <property name="scope">
- <set value-type="java.lang.String">
- <value>openid</value>
- <value>email</value>
- <value>address</value>
- <value>profile</value>
- <value>phone</value>
- </set>
- </property>
- <property name="tokenEndpointAuthMethod" value="SECRET_BASIC" />
- <property name="redirectUris">
- <set>
- <value>${ecomp_openid_connect_client}</value>
- </set>
- </property>
- </bean>
- </property>
- <!--
- Registered Client Service. Uncomment this to save dynamically registered clients out to a
- file on disk (indicated by the filename property) or replace this with another implementation
- of RegisteredClientService. This defaults to an in-memory implementation of RegisteredClientService
- which will forget and re-register all clients on restart.
- -->
- <!--
- <property name="registeredClientService">
- <bean class="org.mitre.openid.connect.client.service.impl.JsonFileRegisteredClientService">
- <constructor-arg name="filename" value="/tmp/simple-web-app-clients.json" />
- </bean>
- </property>
- -->
- </bean>
-
-
- <!--
- -
- - Auth request options service: returns the optional components of the request
- -
- -->
- <bean class="org.mitre.openid.connect.client.service.impl.StaticAuthRequestOptionsService" id="staticAuthRequestOptionsService">
- <property name="options">
- <map>
- <!-- Entries in this map are sent as key-value parameters to the auth request -->
- <!--
- <entry key="display" value="page" />
- <entry key="max_age" value="30" />
- <entry key="prompt" value="none" />
- -->
- </map>
- </property>
- </bean>
-
- <!--
- -
- - Authorization URL Builders: create the URL to redirect the user to for authorization.
- -
- -->
-
- <!--
- Plain authorization request builder, puts all options as query parameters on the GET request
- -->
- <bean class="org.mitre.openid.connect.client.service.impl.PlainAuthRequestUrlBuilder" id="plainAuthRequestUrlBuilder" />
-
- <!--
- Signed authorization request builder, puts all options as elements in a JWS-signed request object
- -->
- <bean class="org.mitre.openid.connect.client.service.impl.SignedAuthRequestUrlBuilder" id="signedAuthRequestUrlBuilder">
- <property name="signingAndValidationService" ref="defaultSignerService" />
- </bean>
-
- <!--
- Encrypted authorization request builder, puts all the options as elements in a JWE-encrypted request object
- -->
- <bean class="org.mitre.openid.connect.client.service.impl.EncryptedAuthRequestUrlBuilder" id="encryptedAuthRequestUrlBuilder">
- <property name="encrypterService" ref="validatorCache" />
- <property name="alg">
- <util:constant static-field="com.nimbusds.jose.JWEAlgorithm.RSA1_5"/>
- </property>
- <property name="enc">
- <util:constant static-field="com.nimbusds.jose.EncryptionMethod.A128GCM"/>
- </property>
- </bean>
-
-
-
-
- <!--
- -
- - Utility beans for the above classes
- -
- -->
-
- <!--
- This service fetches and caches JWK sets from URLs.
- -->
-
- <bean id="validatorCache" class="org.mitre.jwt.signer.service.impl.JWKSetCacheService" />
-
- <!--
- This service sets up a bunch of signers and validators based on our own keys.
- Replace this keystore's contents for a production deployment.
- -->
- <bean id="defaultSignerService" class="org.mitre.jwt.signer.service.impl.DefaultJWTSigningAndValidationService">
- <constructor-arg name="keyStore">
- <bean id="defaultKeyStore" class="org.mitre.jose.keystore.JWKSetKeyStore">
- <property name="location" value="classpath:openid-keystore.jwks" />
- </bean>
- </constructor-arg>
- <property name="defaultSignerKeyId" value="rsa1" />
- <property name="defaultSigningAlgorithmName" value="RS256" />
- </bean>
-
- <!--
- This service publishes the client's public key on a the endpoint "jwk" off the root of this client.
- -->
- <bean id="clientKeyPublisher" class="org.mitre.openid.connect.client.keypublisher.ClientKeyPublisher">
- <property name="jwkPublishUrl" value="jwk" />
- <property name="signingAndValidationService" ref="defaultSignerService" />
- </bean>
-
-</beans>
diff --git a/ecomp-portal-BE/war/WEB-INF/tags/copyright.tag b/ecomp-portal-BE/war/WEB-INF/tags/copyright.tag
deleted file mode 100644
index f06786c6..00000000
--- a/ecomp-portal-BE/war/WEB-INF/tags/copyright.tag
+++ /dev/null
@@ -1 +0,0 @@
-Powered by <a href="https://github.com/mitreid-connect/">MITREid Connect <span class="label">${project.version}</span></a> <span class="pull-right">&copy; 2014 The MITRE Corporation and MIT KIT.</span>
diff --git a/ecomp-portal-BE/war/WEB-INF/tags/footer.tag b/ecomp-portal-BE/war/WEB-INF/tags/footer.tag
deleted file mode 100644
index 8b47824a..00000000
--- a/ecomp-portal-BE/war/WEB-INF/tags/footer.tag
+++ /dev/null
@@ -1,12 +0,0 @@
-<%@ attribute name="js" required="false"%>
-<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
-<%@ taglib prefix="o" tagdir="/WEB-INF/tags"%>
-<!-- javascript
-================================================== -->
-<!-- Placed at the end of the document so the pages load faster -->
-<script type="text/javascript" src="static/oid-connect/bootstrap2/js/bootstrap.js"></script>
-<script type="text/javascript" src="static/oid-connect/js/lib/underscore.js"></script>
-<script type="text/javascript" src="static/oid-connect/js/lib/jwt.js"></script>
-</body>
-</html>
diff --git a/ecomp-portal-BE/war/WEB-INF/tags/header.tag b/ecomp-portal-BE/war/WEB-INF/tags/header.tag
deleted file mode 100644
index 6f8c5c3d..00000000
--- a/ecomp-portal-BE/war/WEB-INF/tags/header.tag
+++ /dev/null
@@ -1,59 +0,0 @@
-<%@attribute name="title" required="false"%>
-<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
-<%@ tag import="com.google.gson.Gson" %>
-<!DOCTYPE html>
-<html lang="en">
-<head>
-
- <base href="${config.issuer}">
-
- <meta charset="utf-8">
- <title>Simple Web App - ${title}</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="description" content="">
- <meta name="author" content="">
-
- <!-- stylesheets -->
- <link href="static/oid-connect/bootstrap2/css/bootstrap.css" rel="stylesheet">
- <link href="static/oid-connect/bootstrap2/css/bootstrap-responsive.css" rel="stylesheet">
-
- <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
- <!--[if lt IE 9]>
- <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
-
- <!-- Load jQuery up here so that we can use in-page functions -->
- <script type="text/javascript" src="static/oid-connect/js/lib/jquery.js"></script>
- <script type="text/javascript">
- // safely set the title of the application
- function setPageTitle(title) {
- document.title = "${config.topbarTitle} - " + title;
- }
-
- // get the info of the current user, if available (null otherwise)
- function getUserInfo() {
- return ${userInfoJson};
- }
-
- // get the authorities of the current user, if available (null otherwise)
- function getUserAuthorities() {
- return ${userAuthorities};
- }
-
- // is the current user an admin?
- // NOTE: this is just for
- function isAdmin() {
- var auth = getUserAuthorities();
- if (auth && _.contains(auth, "ROLE_ADMIN")) {
- return true;
- } else {
- return false;
- }
- }
- </script>
-</head>
-
-<body>
-
-<!-- Start body --> \ No newline at end of file
diff --git a/ecomp-portal-BE/war/WEB-INF/tags/topbar.tag b/ecomp-portal-BE/war/WEB-INF/tags/topbar.tag
deleted file mode 100644
index 5109523a..00000000
--- a/ecomp-portal-BE/war/WEB-INF/tags/topbar.tag
+++ /dev/null
@@ -1,96 +0,0 @@
-<%@attribute name="pageName" required="false"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
-<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags"%>
-<%@ taglib prefix="o" tagdir="/WEB-INF/tags"%>
-<c:choose>
- <c:when test="${ not empty userInfo.preferredUsername }">
- <c:set var="shortName" value="${ userInfo.preferredUsername }" />
- </c:when>
- <c:otherwise>
- <c:set var="shortName" value="${ userInfo.sub }" />
- </c:otherwise>
-</c:choose>
-<c:choose>
- <c:when test="${ not empty userInfo.name }">
- <c:set var="longName" value="${ userInfo.name }" />
- </c:when>
- <c:otherwise>
- <c:choose>
- <c:when test="${ not empty userInfo.givenName || not empty userInfo.familyName }">
- <c:set var="longName" value="${ userInfo.givenName } {$ userInfo.familyName }" />
- </c:when>
- <c:otherwise>
- <c:set var="longName" value="${ shortName }" />
- </c:otherwise>
- </c:choose>
- </c:otherwise>
-</c:choose>
-<div class="navbar navbar-inverse">
- <div class="navbar-inner">
- <div class="container">
- <button class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- <a class="brand" href="">MITREid Connect: Simple Web App</a>
- <c:if test="${ not empty pageName }">
- <div class="nav-collapse collapse">
- <ul class="nav">
- <c:choose>
- <c:when test="${pageName == 'Home'}">
- <li class="active"><a href="#">Home</a></li>
- </c:when>
- <c:otherwise>
- <li><a href=".">Home</a></li>
- </c:otherwise>
- </c:choose>
- <c:choose>
- <c:when test="${pageName == 'User'}">
- <li class="active"><a href="#">User</a></li>
- </c:when>
- <c:otherwise>
- <li><a href="user">User</a></li>
- </c:otherwise>
- </c:choose>
- <c:choose>
- <c:when test="${pageName == 'Admin'}">
- <li class="active"><a href="#">Admin</a></li>
- </c:when>
- <c:otherwise>
- <li><a href="admin">Admin</a></li>
- </c:otherwise>
- </c:choose>
- <c:choose>
- <c:when test="${pageName == 'Logout'}">
- <li class="active"><a href="#">Logout</a></li>
- </c:when>
- <c:otherwise>
- <li><a href="j_spring_security_logout">Logout</a></li>
- </c:otherwise>
- </c:choose>
-
- </ul>
- <ul class="nav pull-right">
- <security:authorize access="hasRole('ROLE_USER')">
- <li class="dropdown">
- <a id="userButton" class="dropdown-toggle" data-toggle="dropdown" href=""><i class="icon-user icon-white"></i> ${ shortName } <span class="caret"></span></a>
- <ul class="dropdown-menu pull-right">
- <li><a href="user" data-toggle="collapse" data-target=".nav-collapse">${ longName }</a></li>
- <li class="divider"></li>
- <li><a href="j_spring_security_logout" data-toggle="collapse" data-target=".nav-collapse"><i class="icon-remove"></i> Log out</a></li>
- </ul>
- </li>
- </security:authorize>
- <security:authorize access="!hasRole('ROLE_USER')">
- <li>
- <a id="loginButton" href="login" data-toggle="collapse" data-target=".nav-collapse"><i class="icon-lock icon-white"></i> Log in</a>
- </li>
- </security:authorize>
- </ul>
-
- </div><!--/.nav-collapse -->
- </c:if>
- </div>
- </div>
-</div>
diff --git a/ecomp-portal-BE/war/WEB-INF/web.xml b/ecomp-portal-BE/war/WEB-INF/web.xml
deleted file mode 100644
index 8c920d12..00000000
--- a/ecomp-portal-BE/war/WEB-INF/web.xml
+++ /dev/null
@@ -1,87 +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.
- ================================================================================
- -->
-
-<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/>
-
- <context-param>
- <param-name>contextConfigLocation</param-name>
- <param-value>/WEB-INF/oid-context.xml</param-value>
- </context-param>
-
- <listener>
- <listener-class>
- org.springframework.web.context.ContextLoaderListener
- </listener-class>
- </listener>
-
-
- <listener>
- <listener-class>org.openecomp.portalapp.portal.listener.UserSessionListener</listener-class>
- </listener>
-
- <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>
-
- <filter>
- <filter-name>springSecurityFilterChain</filter-name>
- <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
- <!-- <init-param>
- <param-name>contextAttribute</param-name>
- <param-value>org.springframework.web.servlet.FrameworkServlet.CONTEXT.appServlet</param-value>
- </init-param> -->
- </filter>
-
- <filter-mapping>
- <filter-name>springSecurityFilterChain</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
-</web-app>
diff --git a/ecomp-portal-BE/war/images/cache/README.txt b/ecomp-portal-BE/war/images/cache/README.txt
deleted file mode 100644
index 65bb14cc..00000000
--- a/ecomp-portal-BE/war/images/cache/README.txt
+++ /dev/null
@@ -1 +0,0 @@
-image cache \ No newline at end of file
diff --git a/ecomp-portal-BE/war/index.jsp b/ecomp-portal-BE/war/index.jsp
deleted file mode 100644
index b39156c5..00000000
--- a/ecomp-portal-BE/war/index.jsp
+++ /dev/null
@@ -1,22 +0,0 @@
-<%@ 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>
- \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/ebz/angular_js/angular-sanitize.js b/ecomp-portal-BE/war/static/ebz/angular_js/angular-sanitize.js
deleted file mode 100644
index 87100fdb..00000000
--- a/ecomp-portal-BE/war/static/ebz/angular_js/angular-sanitize.js
+++ /dev/null
@@ -1,647 +0,0 @@
-/**
- * @license AngularJS v1.2.25
- * (c) 2010-2014 Google, Inc. http://angularjs.org
- * License: MIT
- */
-(function(window, angular, undefined) {'use strict';
-
-var $sanitizeMinErr = angular.$$minErr('$sanitize');
-
-/**
- * @ngdoc module
- * @name ngSanitize
- * @description
- *
- * # ngSanitize
- *
- * The `ngSanitize` module provides functionality to sanitize HTML.
- *
- *
- * <div doc-module-components="ngSanitize"></div>
- *
- * See {@link ngSanitize.$sanitize `$sanitize`} for usage.
- */
-
-/*
- * HTML Parser By Misko Hevery (misko@hevery.com)
- * based on: HTML Parser By John Resig (ejohn.org)
- * Original code by Erik Arvidsson, Mozilla Public License
- * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
- *
- * // Use like so:
- * htmlParser(htmlString, {
- * start: function(tag, attrs, unary) {},
- * end: function(tag) {},
- * chars: function(text) {},
- * comment: function(text) {}
- * });
- *
- */
-
-
-/**
- * @ngdoc service
- * @name $sanitize
- * @kind function
- *
- * @description
- * The input is sanitized by parsing the html into tokens. All safe tokens (from a whitelist) are
- * then serialized back to properly escaped html string. This means that no unsafe input can make
- * it into the returned string, however, since our parser is more strict than a typical browser
- * parser, it's possible that some obscure input, which would be recognized as valid HTML by a
- * browser, won't make it through the sanitizer.
- * The whitelist is configured using the functions `aHrefSanitizationWhitelist` and
- * `imgSrcSanitizationWhitelist` of {@link ng.$compileProvider `$compileProvider`}.
- *
- * @param {string} html Html input.
- * @returns {string} Sanitized html.
- *
- * @example
- <example module="sanitizeExample" deps="angular-sanitize.js">
- <file name="index.html">
- <script>
- angular.module('sanitizeExample', ['ngSanitize'])
- .controller('ExampleController', ['$scope', '$sce', function($scope, $sce) {
- $scope.snippet =
- '<p style="color:blue">an html\n' +
- '<em onmouseover="this.textContent=\'PWN3D!\'">click here</em>\n' +
- 'snippet</p>';
- $scope.deliberatelyTrustDangerousSnippet = function() {
- return $sce.trustAsHtml($scope.snippet);
- };
- }]);
- </script>
- <div ng-controller="ExampleController">
- Snippet: <textarea ng-model="snippet" cols="60" rows="3"></textarea>
- <table>
- <tr>
- <td>Directive</td>
- <td>How</td>
- <td>Source</td>
- <td>Rendered</td>
- </tr>
- <tr id="bind-html-with-sanitize">
- <td>ng-bind-html</td>
- <td>Automatically uses $sanitize</td>
- <td><pre>&lt;div ng-bind-html="snippet"&gt;<br/>&lt;/div&gt;</pre></td>
- <td><div ng-bind-html="snippet"></div></td>
- </tr>
- <tr id="bind-html-with-trust">
- <td>ng-bind-html</td>
- <td>Bypass $sanitize by explicitly trusting the dangerous value</td>
- <td>
- <pre>&lt;div ng-bind-html="deliberatelyTrustDangerousSnippet()"&gt;
-&lt;/div&gt;</pre>
- </td>
- <td><div ng-bind-html="deliberatelyTrustDangerousSnippet()"></div></td>
- </tr>
- <tr id="bind-default">
- <td>ng-bind</td>
- <td>Automatically escapes</td>
- <td><pre>&lt;div ng-bind="snippet"&gt;<br/>&lt;/div&gt;</pre></td>
- <td><div ng-bind="snippet"></div></td>
- </tr>
- </table>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should sanitize the html snippet by default', function() {
- expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()).
- toBe('<p>an html\n<em>click here</em>\nsnippet</p>');
- });
-
- it('should inline raw snippet if bound to a trusted value', function() {
- expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()).
- toBe("<p style=\"color:blue\">an html\n" +
- "<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" +
- "snippet</p>");
- });
-
- it('should escape snippet without any filter', function() {
- expect(element(by.css('#bind-default div')).getInnerHtml()).
- toBe("&lt;p style=\"color:blue\"&gt;an html\n" +
- "&lt;em onmouseover=\"this.textContent='PWN3D!'\"&gt;click here&lt;/em&gt;\n" +
- "snippet&lt;/p&gt;");
- });
-
- it('should update', function() {
- element(by.model('snippet')).clear();
- element(by.model('snippet')).sendKeys('new <b onclick="alert(1)">text</b>');
- expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()).
- toBe('new <b>text</b>');
- expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()).toBe(
- 'new <b onclick="alert(1)">text</b>');
- expect(element(by.css('#bind-default div')).getInnerHtml()).toBe(
- "new &lt;b onclick=\"alert(1)\"&gt;text&lt;/b&gt;");
- });
- </file>
- </example>
- */
-function $SanitizeProvider() {
- this.$get = ['$$sanitizeUri', function($$sanitizeUri) {
- return function(html) {
- var buf = [];
- htmlParser(html, htmlSanitizeWriter(buf, function(uri, isImage) {
- return !/^unsafe/.test($$sanitizeUri(uri, isImage));
- }));
- return buf.join('');
- };
- }];
-}
-
-function sanitizeText(chars) {
- var buf = [];
- var writer = htmlSanitizeWriter(buf, angular.noop);
- writer.chars(chars);
- return buf.join('');
-}
-
-
-// Regular Expressions for parsing tags and attributes
-var START_TAG_REGEXP =
- /^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,
- END_TAG_REGEXP = /^<\/\s*([\w:-]+)[^>]*>/,
- ATTR_REGEXP = /([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,
- BEGIN_TAG_REGEXP = /^</,
- BEGING_END_TAGE_REGEXP = /^<\//,
- COMMENT_REGEXP = /<!--(.*?)-->/g,
- DOCTYPE_REGEXP = /<!DOCTYPE([^>]*?)>/i,
- CDATA_REGEXP = /<!\[CDATA\[(.*?)]]>/g,
- SURROGATE_PAIR_REGEXP = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g,
- // Match everything outside of normal chars and " (quote character)
- NON_ALPHANUMERIC_REGEXP = /([^\#-~| |!])/g;
-
-
-// Good source of info about elements and attributes
-// http://dev.w3.org/html5/spec/Overview.html#semantics
-// http://simon.html5.org/html-elements
-
-// Safe Void Elements - HTML5
-// http://dev.w3.org/html5/spec/Overview.html#void-elements
-var voidElements = makeMap("area,br,col,hr,img,wbr");
-
-// Elements that you can, intentionally, leave open (and which close themselves)
-// http://dev.w3.org/html5/spec/Overview.html#optional-tags
-var optionalEndTagBlockElements = makeMap("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),
- optionalEndTagInlineElements = makeMap("rp,rt"),
- optionalEndTagElements = angular.extend({},
- optionalEndTagInlineElements,
- optionalEndTagBlockElements);
-
-// Safe Block Elements - HTML5
-var blockElements = angular.extend({}, optionalEndTagBlockElements, makeMap("address,article," +
- "aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5," +
- "h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul"));
-
-// Inline Elements - HTML5
-var inlineElements = angular.extend({}, optionalEndTagInlineElements, makeMap("a,abbr,acronym,b," +
- "bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s," +
- "samp,small,span,strike,strong,sub,sup,time,tt,u,var"));
-
-
-// Special Elements (can contain anything)
-var specialElements = makeMap("script,style");
-
-var validElements = angular.extend({},
- voidElements,
- blockElements,
- inlineElements,
- optionalEndTagElements);
-
-//Attributes that have href and hence need to be sanitized
-var uriAttrs = makeMap("background,cite,href,longdesc,src,usemap");
-var validAttrs = angular.extend({}, uriAttrs, makeMap(
- 'abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,'+
- 'color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,'+
- 'ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,'+
- 'scope,scrolling,shape,size,span,start,summary,target,title,type,'+
- 'valign,value,vspace,width'));
-
-function makeMap(str) {
- var obj = {}, items = str.split(','), i;
- for (i = 0; i < items.length; i++) obj[items[i]] = true;
- return obj;
-}
-
-
-/**
- * @example
- * htmlParser(htmlString, {
- * start: function(tag, attrs, unary) {},
- * end: function(tag) {},
- * chars: function(text) {},
- * comment: function(text) {}
- * });
- *
- * @param {string} html string
- * @param {object} handler
- */
-function htmlParser( html, handler ) {
- if (typeof html !== 'string') {
- if (html === null || typeof html === 'undefined') {
- html = '';
- } else {
- html = '' + html;
- }
- }
- var index, chars, match, stack = [], last = html, text;
- stack.last = function() { return stack[ stack.length - 1 ]; };
-
- while ( html ) {
- text = '';
- chars = true;
-
- // Make sure we're not in a script or style element
- if ( !stack.last() || !specialElements[ stack.last() ] ) {
-
- // Comment
- if ( html.indexOf("<!--") === 0 ) {
- // comments containing -- are not allowed unless they terminate the comment
- index = html.indexOf("--", 4);
-
- if ( index >= 0 && html.lastIndexOf("-->", index) === index) {
- if (handler.comment) handler.comment( html.substring( 4, index ) );
- html = html.substring( index + 3 );
- chars = false;
- }
- // DOCTYPE
- } else if ( DOCTYPE_REGEXP.test(html) ) {
- match = html.match( DOCTYPE_REGEXP );
-
- if ( match ) {
- html = html.replace( match[0], '');
- chars = false;
- }
- // end tag
- } else if ( BEGING_END_TAGE_REGEXP.test(html) ) {
- match = html.match( END_TAG_REGEXP );
-
- if ( match ) {
- html = html.substring( match[0].length );
- match[0].replace( END_TAG_REGEXP, parseEndTag );
- chars = false;
- }
-
- // start tag
- } else if ( BEGIN_TAG_REGEXP.test(html) ) {
- match = html.match( START_TAG_REGEXP );
-
- if ( match ) {
- // We only have a valid start-tag if there is a '>'.
- if ( match[4] ) {
- html = html.substring( match[0].length );
- match[0].replace( START_TAG_REGEXP, parseStartTag );
- }
- chars = false;
- } else {
- // no ending tag found --- this piece should be encoded as an entity.
- text += '<';
- html = html.substring(1);
- }
- }
-
- if ( chars ) {
- index = html.indexOf("<");
-
- text += index < 0 ? html : html.substring( 0, index );
- html = index < 0 ? "" : html.substring( index );
-
- if (handler.chars) handler.chars( decodeEntities(text) );
- }
-
- } else {
- html = html.replace(new RegExp("(.*)<\\s*\\/\\s*" + stack.last() + "[^>]*>", 'i'),
- function(all, text){
- text = text.replace(COMMENT_REGEXP, "$1").replace(CDATA_REGEXP, "$1");
-
- if (handler.chars) handler.chars( decodeEntities(text) );
-
- return "";
- });
-
- parseEndTag( "", stack.last() );
- }
-
- if ( html == last ) {
- throw $sanitizeMinErr('badparse', "The sanitizer was unable to parse the following block " +
- "of html: {0}", html);
- }
- last = html;
- }
-
- // Clean up any remaining tags
- parseEndTag();
-
- function parseStartTag( tag, tagName, rest, unary ) {
- tagName = angular.lowercase(tagName);
- if ( blockElements[ tagName ] ) {
- while ( stack.last() && inlineElements[ stack.last() ] ) {
- parseEndTag( "", stack.last() );
- }
- }
-
- if ( optionalEndTagElements[ tagName ] && stack.last() == tagName ) {
- parseEndTag( "", tagName );
- }
-
- unary = voidElements[ tagName ] || !!unary;
-
- if ( !unary )
- stack.push( tagName );
-
- var attrs = {};
-
- rest.replace(ATTR_REGEXP,
- function(match, name, doubleQuotedValue, singleQuotedValue, unquotedValue) {
- var value = doubleQuotedValue
- || singleQuotedValue
- || unquotedValue
- || '';
-
- attrs[name] = decodeEntities(value);
- });
- if (handler.start) handler.start( tagName, attrs, unary );
- }
-
- function parseEndTag( tag, tagName ) {
- var pos = 0, i;
- tagName = angular.lowercase(tagName);
- if ( tagName )
- // Find the closest opened tag of the same type
- for ( pos = stack.length - 1; pos >= 0; pos-- )
- if ( stack[ pos ] == tagName )
- break;
-
- if ( pos >= 0 ) {
- // Close all the open elements, up the stack
- for ( i = stack.length - 1; i >= pos; i-- )
- if (handler.end) handler.end( stack[ i ] );
-
- // Remove the open elements from the stack
- stack.length = pos;
- }
- }
-}
-
-var hiddenPre=document.createElement("pre");
-var spaceRe = /^(\s*)([\s\S]*?)(\s*)$/;
-/**
- * decodes all entities into regular string
- * @param value
- * @returns {string} A string with decoded entities.
- */
-function decodeEntities(value) {
- if (!value) { return ''; }
-
- // Note: IE8 does not preserve spaces at the start/end of innerHTML
- // so we must capture them and reattach them afterward
- var parts = spaceRe.exec(value);
- var spaceBefore = parts[1];
- var spaceAfter = parts[3];
- var content = parts[2];
- if (content) {
- hiddenPre.innerHTML=content.replace(/</g,"&lt;");
- // innerText depends on styling as it doesn't display hidden elements.
- // Therefore, it's better to use textContent not to cause unnecessary
- // reflows. However, IE<9 don't support textContent so the innerText
- // fallback is necessary.
- content = 'textContent' in hiddenPre ?
- hiddenPre.textContent : hiddenPre.innerText;
- }
- return spaceBefore + content + spaceAfter;
-}
-
-/**
- * Escapes all potentially dangerous characters, so that the
- * resulting string can be safely inserted into attribute or
- * element text.
- * @param value
- * @returns {string} escaped text
- */
-function encodeEntities(value) {
- return value.
- replace(/&/g, '&amp;').
- replace(SURROGATE_PAIR_REGEXP, function (value) {
- var hi = value.charCodeAt(0);
- var low = value.charCodeAt(1);
- return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';';
- }).
- replace(NON_ALPHANUMERIC_REGEXP, function(value){
- return '&#' + value.charCodeAt(0) + ';';
- }).
- replace(/</g, '&lt;').
- replace(/>/g, '&gt;');
-}
-
-/**
- * create an HTML/XML writer which writes to buffer
- * @param {Array} buf use buf.jain('') to get out sanitized html string
- * @returns {object} in the form of {
- * start: function(tag, attrs, unary) {},
- * end: function(tag) {},
- * chars: function(text) {},
- * comment: function(text) {}
- * }
- */
-function htmlSanitizeWriter(buf, uriValidator){
- var ignore = false;
- var out = angular.bind(buf, buf.push);
- return {
- start: function(tag, attrs, unary){
- tag = angular.lowercase(tag);
- if (!ignore && specialElements[tag]) {
- ignore = tag;
- }
- if (!ignore && validElements[tag] === true) {
- out('<');
- out(tag);
- angular.forEach(attrs, function(value, key){
- var lkey=angular.lowercase(key);
- var isImage = (tag === 'img' && lkey === 'src') || (lkey === 'background');
- if (validAttrs[lkey] === true &&
- (uriAttrs[lkey] !== true || uriValidator(value, isImage))) {
- out(' ');
- out(key);
- out('="');
- out(encodeEntities(value));
- out('"');
- }
- });
- out(unary ? '/>' : '>');
- }
- },
- end: function(tag){
- tag = angular.lowercase(tag);
- if (!ignore && validElements[tag] === true) {
- out('</');
- out(tag);
- out('>');
- }
- if (tag == ignore) {
- ignore = false;
- }
- },
- chars: function(chars){
- if (!ignore) {
- out(encodeEntities(chars));
- }
- }
- };
-}
-
-
-// define ngSanitize module and register $sanitize service
-angular.module('ngSanitize', []).provider('$sanitize', $SanitizeProvider);
-
-/* global sanitizeText: false */
-
-/**
- * @ngdoc filter
- * @name linky
- * @kind function
- *
- * @description
- * Finds links in text input and turns them into html links. Supports http/https/ftp/mailto and
- * plain email address links.
- *
- * Requires the {@link ngSanitize `ngSanitize`} module to be installed.
- *
- * @param {string} text Input text.
- * @param {string} target Window (_blank|_self|_parent|_top) or named frame to open links in.
- * @returns {string} Html-linkified text.
- *
- * @usage
- <span ng-bind-html="linky_expression | linky"></span>
- *
- * @example
- <example module="linkyExample" deps="angular-sanitize.js">
- <file name="index.html">
- <script>
- angular.module('linkyExample', ['ngSanitize'])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.snippet =
- 'Pretty text with some links:\n'+
- 'http://angularjs.org/,\n'+
- 'mailto:us@somewhere.org,\n'+
- 'another@somewhere.org,\n'+
- 'and one more: ftp://127.0.0.1/.';
- $scope.snippetWithTarget = 'http://angularjs.org/';
- }]);
- </script>
- <div ng-controller="ExampleController">
- Snippet: <textarea ng-model="snippet" cols="60" rows="3"></textarea>
- <table>
- <tr>
- <td>Filter</td>
- <td>Source</td>
- <td>Rendered</td>
- </tr>
- <tr id="linky-filter">
- <td>linky filter</td>
- <td>
- <pre>&lt;div ng-bind-html="snippet | linky"&gt;<br>&lt;/div&gt;</pre>
- </td>
- <td>
- <div ng-bind-html="snippet | linky"></div>
- </td>
- </tr>
- <tr id="linky-target">
- <td>linky target</td>
- <td>
- <pre>&lt;div ng-bind-html="snippetWithTarget | linky:'_blank'"&gt;<br>&lt;/div&gt;</pre>
- </td>
- <td>
- <div ng-bind-html="snippetWithTarget | linky:'_blank'"></div>
- </td>
- </tr>
- <tr id="escaped-html">
- <td>no filter</td>
- <td><pre>&lt;div ng-bind="snippet"&gt;<br>&lt;/div&gt;</pre></td>
- <td><div ng-bind="snippet"></div></td>
- </tr>
- </table>
- </file>
- <file name="protractor.js" type="protractor">
- it('should linkify the snippet with urls', function() {
- expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()).
- toBe('Pretty text with some links: http://angularjs.org/, us@somewhere.org, ' +
- 'another@somewhere.org, and one more: ftp://127.0.0.1/.');
- expect(element.all(by.css('#linky-filter a')).count()).toEqual(4);
- });
-
- it('should not linkify snippet without the linky filter', function() {
- expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()).
- toBe('Pretty text with some links: http://angularjs.org/, mailto:us@somewhere.org, ' +
- 'another@somewhere.org, and one more: ftp://127.0.0.1/.');
- expect(element.all(by.css('#escaped-html a')).count()).toEqual(0);
- });
-
- it('should update', function() {
- element(by.model('snippet')).clear();
- element(by.model('snippet')).sendKeys('new http://link.');
- expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()).
- toBe('new http://link.');
- expect(element.all(by.css('#linky-filter a')).count()).toEqual(1);
- expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText())
- .toBe('new http://link.');
- });
-
- it('should work with the target property', function() {
- expect(element(by.id('linky-target')).
- element(by.binding("snippetWithTarget | linky:'_blank'")).getText()).
- toBe('http://angularjs.org/');
- expect(element(by.css('#linky-target a')).getAttribute('target')).toEqual('_blank');
- });
- </file>
- </example>
- */
-angular.module('ngSanitize').filter('linky', ['$sanitize', function($sanitize) {
- var LINKY_URL_REGEXP =
- /((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"]/,
- MAILTO_REGEXP = /^mailto:/;
-
- return function(text, target) {
- if (!text) return text;
- var match;
- var raw = text;
- var html = [];
- var url;
- var i;
- while ((match = raw.match(LINKY_URL_REGEXP))) {
- // We can not end in these as they are sometimes found at the end of the sentence
- url = match[0];
- // if we did not match ftp/http/mailto then assume mailto
- if (match[2] == match[3]) url = 'mailto:' + url;
- i = match.index;
- addText(raw.substr(0, i));
- addLink(url, match[0].replace(MAILTO_REGEXP, ''));
- raw = raw.substring(i + match[0].length);
- }
- addText(raw);
- return $sanitize(html.join(''));
-
- function addText(text) {
- if (!text) {
- return;
- }
- html.push(sanitizeText(text));
- }
-
- function addLink(url, text) {
- html.push('<a ');
- if (angular.isDefined(target)) {
- html.push('target="');
- html.push(target);
- html.push('" ');
- }
- html.push('href="');
- html.push(url);
- html.push('">');
- addText(text);
- html.push('</a>');
- }
- };
-}]);
-
-
-})(window, window.angular);
diff --git a/ecomp-portal-BE/war/static/ebz/angular_js/angular.js b/ecomp-portal-BE/war/static/ebz/angular_js/angular.js
deleted file mode 100644
index 132234b6..00000000
--- a/ecomp-portal-BE/war/static/ebz/angular_js/angular.js
+++ /dev/null
@@ -1,22024 +0,0 @@
-/**
- * @license AngularJS v1.2.25
- * (c) 2010-2014 Google, Inc. http://angularjs.org
- * License: MIT
- */
-(function(window, document, undefined) {'use strict';
-
-/**
- * @description
- *
- * This object provides a utility for producing rich Error messages within
- * Angular. It can be called as follows:
- *
- * var exampleMinErr = minErr('example');
- * throw exampleMinErr('one', 'This {0} is {1}', foo, bar);
- *
- * The above creates an instance of minErr in the example namespace. The
- * resulting error will have a namespaced error code of example.one. The
- * resulting error will replace {0} with the value of foo, and {1} with the
- * value of bar. The object is not restricted in the number of arguments it can
- * take.
- *
- * If fewer arguments are specified than necessary for interpolation, the extra
- * interpolation markers will be preserved in the final string.
- *
- * Since data will be parsed statically during a build step, some restrictions
- * are applied with respect to how minErr instances are created and called.
- * Instances should have names of the form namespaceMinErr for a minErr created
- * using minErr('namespace') . Error codes, namespaces and template strings
- * should all be static strings, not variables or general expressions.
- *
- * @param {string} module The namespace to use for the new minErr instance.
- * @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance
- */
-
-function minErr(module) {
- return function () {
- var code = arguments[0],
- prefix = '[' + (module ? module + ':' : '') + code + '] ',
- template = arguments[1],
- templateArgs = arguments,
- stringify = function (obj) {
- if (typeof obj === 'function') {
- return obj.toString().replace(/ \{[\s\S]*$/, '');
- } else if (typeof obj === 'undefined') {
- return 'undefined';
- } else if (typeof obj !== 'string') {
- return JSON.stringify(obj);
- }
- return obj;
- },
- message, i;
-
- message = prefix + template.replace(/\{\d+\}/g, function (match) {
- var index = +match.slice(1, -1), arg;
-
- if (index + 2 < templateArgs.length) {
- arg = templateArgs[index + 2];
- if (typeof arg === 'function') {
- return arg.toString().replace(/ ?\{[\s\S]*$/, '');
- } else if (typeof arg === 'undefined') {
- return 'undefined';
- } else if (typeof arg !== 'string') {
- return toJson(arg);
- }
- return arg;
- }
- return match;
- });
-
- message = message + '\nhttp://errors.angularjs.org/1.2.25/' +
- (module ? module + '/' : '') + code;
- for (i = 2; i < arguments.length; i++) {
- message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' +
- encodeURIComponent(stringify(arguments[i]));
- }
-
- return new Error(message);
- };
-}
-
-/* We need to tell jshint what variables are being exported */
-/* global angular: true,
- msie: true,
- jqLite: true,
- jQuery: true,
- slice: true,
- push: true,
- toString: true,
- ngMinErr: true,
- angularModule: true,
- nodeName_: true,
- uid: true,
- VALIDITY_STATE_PROPERTY: true,
-
- lowercase: true,
- uppercase: true,
- manualLowercase: true,
- manualUppercase: true,
- nodeName_: true,
- isArrayLike: true,
- forEach: true,
- sortedKeys: true,
- forEachSorted: true,
- reverseParams: true,
- nextUid: true,
- setHashKey: true,
- extend: true,
- int: true,
- inherit: true,
- noop: true,
- identity: true,
- valueFn: true,
- isUndefined: true,
- isDefined: true,
- isObject: true,
- isString: true,
- isNumber: true,
- isDate: true,
- isArray: true,
- isFunction: true,
- isRegExp: true,
- isWindow: true,
- isScope: true,
- isFile: true,
- isBlob: true,
- isBoolean: true,
- isPromiseLike: true,
- trim: true,
- isElement: true,
- makeMap: true,
- map: true,
- size: true,
- includes: true,
- indexOf: true,
- arrayRemove: true,
- isLeafNode: true,
- copy: true,
- shallowCopy: true,
- equals: true,
- csp: true,
- concat: true,
- sliceArgs: true,
- bind: true,
- toJsonReplacer: true,
- toJson: true,
- fromJson: true,
- toBoolean: true,
- startingTag: true,
- tryDecodeURIComponent: true,
- parseKeyValue: true,
- toKeyValue: true,
- encodeUriSegment: true,
- encodeUriQuery: true,
- angularInit: true,
- bootstrap: true,
- snake_case: true,
- bindJQuery: true,
- assertArg: true,
- assertArgFn: true,
- assertNotHasOwnProperty: true,
- getter: true,
- getBlockElements: true,
- hasOwnProperty: true,
-*/
-
-////////////////////////////////////
-
-/**
- * @ngdoc module
- * @name ng
- * @module ng
- * @description
- *
- * # ng (core module)
- * The ng module is loaded by default when an AngularJS application is started. The module itself
- * contains the essential components for an AngularJS application to function. The table below
- * lists a high level breakdown of each of the services/factories, filters, directives and testing
- * components available within this core module.
- *
- * <div doc-module-components="ng"></div>
- */
-
-// The name of a form control's ValidityState property.
-// This is used so that it's possible for internal tests to create mock ValidityStates.
-var VALIDITY_STATE_PROPERTY = 'validity';
-
-/**
- * @ngdoc function
- * @name angular.lowercase
- * @module ng
- * @kind function
- *
- * @description Converts the specified string to lowercase.
- * @param {string} string String to be converted to lowercase.
- * @returns {string} Lowercased string.
- */
-var lowercase = function(string){return isString(string) ? string.toLowerCase() : string;};
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-
-/**
- * @ngdoc function
- * @name angular.uppercase
- * @module ng
- * @kind function
- *
- * @description Converts the specified string to uppercase.
- * @param {string} string String to be converted to uppercase.
- * @returns {string} Uppercased string.
- */
-var uppercase = function(string){return isString(string) ? string.toUpperCase() : string;};
-
-
-var manualLowercase = function(s) {
- /* jshint bitwise: false */
- return isString(s)
- ? s.replace(/[A-Z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) | 32);})
- : s;
-};
-var manualUppercase = function(s) {
- /* jshint bitwise: false */
- return isString(s)
- ? s.replace(/[a-z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) & ~32);})
- : s;
-};
-
-
-// String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish
-// locale, for this reason we need to detect this case and redefine lowercase/uppercase methods
-// with correct but slower alternatives.
-if ('i' !== 'I'.toLowerCase()) {
- lowercase = manualLowercase;
- uppercase = manualUppercase;
-}
-
-
-var /** holds major version number for IE or NaN for real browsers */
- msie,
- jqLite, // delay binding since jQuery could be loaded after us.
- jQuery, // delay binding
- slice = [].slice,
- push = [].push,
- toString = Object.prototype.toString,
- ngMinErr = minErr('ng'),
-
- /** @name angular */
- angular = window.angular || (window.angular = {}),
- angularModule,
- nodeName_,
- uid = ['0', '0', '0'];
-
-/**
- * IE 11 changed the format of the UserAgent string.
- * See http://msdn.microsoft.com/en-us/library/ms537503.aspx
- */
-msie = int((/msie (\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]);
-if (isNaN(msie)) {
- msie = int((/trident\/.*; rv:(\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]);
-}
-
-
-/**
- * @private
- * @param {*} obj
- * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments,
- * String ...)
- */
-function isArrayLike(obj) {
- if (obj == null || isWindow(obj)) {
- return false;
- }
-
- var length = obj.length;
-
- if (obj.nodeType === 1 && length) {
- return true;
- }
-
- return isString(obj) || isArray(obj) || length === 0 ||
- typeof length === 'number' && length > 0 && (length - 1) in obj;
-}
-
-/**
- * @ngdoc function
- * @name angular.forEach
- * @module ng
- * @kind function
- *
- * @description
- * Invokes the `iterator` function once for each item in `obj` collection, which can be either an
- * object or an array. The `iterator` function is invoked with `iterator(value, key)`, where `value`
- * is the value of an object property or an array element and `key` is the object property key or
- * array element index. Specifying a `context` for the function is optional.
- *
- * It is worth noting that `.forEach` does not iterate over inherited properties because it filters
- * using the `hasOwnProperty` method.
- *
- ```js
- var values = {name: 'misko', gender: 'male'};
- var log = [];
- angular.forEach(values, function(value, key) {
- this.push(key + ': ' + value);
- }, log);
- expect(log).toEqual(['name: misko', 'gender: male']);
- ```
- *
- * @param {Object|Array} obj Object to iterate over.
- * @param {Function} iterator Iterator function.
- * @param {Object=} context Object to become context (`this`) for the iterator function.
- * @returns {Object|Array} Reference to `obj`.
- */
-function forEach(obj, iterator, context) {
- var key;
- if (obj) {
- if (isFunction(obj)) {
- for (key in obj) {
- // Need to check if hasOwnProperty exists,
- // as on IE8 the result of querySelectorAll is an object without a hasOwnProperty function
- if (key != 'prototype' && key != 'length' && key != 'name' && (!obj.hasOwnProperty || obj.hasOwnProperty(key))) {
- iterator.call(context, obj[key], key);
- }
- }
- } else if (isArray(obj) || isArrayLike(obj)) {
- for (key = 0; key < obj.length; key++) {
- iterator.call(context, obj[key], key);
- }
- } else if (obj.forEach && obj.forEach !== forEach) {
- obj.forEach(iterator, context);
- } else {
- for (key in obj) {
- if (obj.hasOwnProperty(key)) {
- iterator.call(context, obj[key], key);
- }
- }
- }
- }
- return obj;
-}
-
-function sortedKeys(obj) {
- var keys = [];
- for (var key in obj) {
- if (obj.hasOwnProperty(key)) {
- keys.push(key);
- }
- }
- return keys.sort();
-}
-
-function forEachSorted(obj, iterator, context) {
- var keys = sortedKeys(obj);
- for ( var i = 0; i < keys.length; i++) {
- iterator.call(context, obj[keys[i]], keys[i]);
- }
- return keys;
-}
-
-
-/**
- * when using forEach the params are value, key, but it is often useful to have key, value.
- * @param {function(string, *)} iteratorFn
- * @returns {function(*, string)}
- */
-function reverseParams(iteratorFn) {
- return function(value, key) { iteratorFn(key, value); };
-}
-
-/**
- * A consistent way of creating unique IDs in angular. The ID is a sequence of alpha numeric
- * characters such as '012ABC'. The reason why we are not using simply a number counter is that
- * the number string gets longer over time, and it can also overflow, where as the nextId
- * will grow much slower, it is a string, and it will never overflow.
- *
- * @returns {string} an unique alpha-numeric string
- */
-function nextUid() {
- var index = uid.length;
- var digit;
-
- while(index) {
- index--;
- digit = uid[index].charCodeAt(0);
- if (digit == 57 /*'9'*/) {
- uid[index] = 'A';
- return uid.join('');
- }
- if (digit == 90 /*'Z'*/) {
- uid[index] = '0';
- } else {
- uid[index] = String.fromCharCode(digit + 1);
- return uid.join('');
- }
- }
- uid.unshift('0');
- return uid.join('');
-}
-
-
-/**
- * Set or clear the hashkey for an object.
- * @param obj object
- * @param h the hashkey (!truthy to delete the hashkey)
- */
-function setHashKey(obj, h) {
- if (h) {
- obj.$$hashKey = h;
- }
- else {
- delete obj.$$hashKey;
- }
-}
-
-/**
- * @ngdoc function
- * @name angular.extend
- * @module ng
- * @kind function
- *
- * @description
- * Extends the destination object `dst` by copying all of the properties from the `src` object(s)
- * to `dst`. You can specify multiple `src` objects.
- *
- * @param {Object} dst Destination object.
- * @param {...Object} src Source object(s).
- * @returns {Object} Reference to `dst`.
- */
-function extend(dst) {
- var h = dst.$$hashKey;
- forEach(arguments, function(obj) {
- if (obj !== dst) {
- forEach(obj, function(value, key) {
- dst[key] = value;
- });
- }
- });
-
- setHashKey(dst,h);
- return dst;
-}
-
-function int(str) {
- return parseInt(str, 10);
-}
-
-
-function inherit(parent, extra) {
- return extend(new (extend(function() {}, {prototype:parent}))(), extra);
-}
-
-/**
- * @ngdoc function
- * @name angular.noop
- * @module ng
- * @kind function
- *
- * @description
- * A function that performs no operations. This function can be useful when writing code in the
- * functional style.
- ```js
- function foo(callback) {
- var result = calculateResult();
- (callback || angular.noop)(result);
- }
- ```
- */
-function noop() {}
-noop.$inject = [];
-
-
-/**
- * @ngdoc function
- * @name angular.identity
- * @module ng
- * @kind function
- *
- * @description
- * A function that returns its first argument. This function is useful when writing code in the
- * functional style.
- *
- ```js
- function transformer(transformationFn, value) {
- return (transformationFn || angular.identity)(value);
- };
- ```
- */
-function identity($) {return $;}
-identity.$inject = [];
-
-
-function valueFn(value) {return function() {return value;};}
-
-/**
- * @ngdoc function
- * @name angular.isUndefined
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is undefined.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is undefined.
- */
-function isUndefined(value){return typeof value === 'undefined';}
-
-
-/**
- * @ngdoc function
- * @name angular.isDefined
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is defined.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is defined.
- */
-function isDefined(value){return typeof value !== 'undefined';}
-
-
-/**
- * @ngdoc function
- * @name angular.isObject
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not
- * considered to be objects. Note that JavaScript arrays are objects.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is an `Object` but not `null`.
- */
-function isObject(value){return value != null && typeof value === 'object';}
-
-
-/**
- * @ngdoc function
- * @name angular.isString
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is a `String`.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `String`.
- */
-function isString(value){return typeof value === 'string';}
-
-
-/**
- * @ngdoc function
- * @name angular.isNumber
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is a `Number`.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `Number`.
- */
-function isNumber(value){return typeof value === 'number';}
-
-
-/**
- * @ngdoc function
- * @name angular.isDate
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a value is a date.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `Date`.
- */
-function isDate(value) {
- return toString.call(value) === '[object Date]';
-}
-
-
-/**
- * @ngdoc function
- * @name angular.isArray
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is an `Array`.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is an `Array`.
- */
-var isArray = (function() {
- if (!isFunction(Array.isArray)) {
- return function(value) {
- return toString.call(value) === '[object Array]';
- };
- }
- return Array.isArray;
-})();
-
-/**
- * @ngdoc function
- * @name angular.isFunction
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is a `Function`.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `Function`.
- */
-function isFunction(value){return typeof value === 'function';}
-
-
-/**
- * Determines if a value is a regular expression object.
- *
- * @private
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `RegExp`.
- */
-function isRegExp(value) {
- return toString.call(value) === '[object RegExp]';
-}
-
-
-/**
- * Checks if `obj` is a window object.
- *
- * @private
- * @param {*} obj Object to check
- * @returns {boolean} True if `obj` is a window obj.
- */
-function isWindow(obj) {
- return obj && obj.document && obj.location && obj.alert && obj.setInterval;
-}
-
-
-function isScope(obj) {
- return obj && obj.$evalAsync && obj.$watch;
-}
-
-
-function isFile(obj) {
- return toString.call(obj) === '[object File]';
-}
-
-
-function isBlob(obj) {
- return toString.call(obj) === '[object Blob]';
-}
-
-
-function isBoolean(value) {
- return typeof value === 'boolean';
-}
-
-
-function isPromiseLike(obj) {
- return obj && isFunction(obj.then);
-}
-
-
-var trim = (function() {
- // native trim is way faster: http://jsperf.com/angular-trim-test
- // but IE doesn't have it... :-(
- // TODO: we should move this into IE/ES5 polyfill
- if (!String.prototype.trim) {
- return function(value) {
- return isString(value) ? value.replace(/^\s\s*/, '').replace(/\s\s*$/, '') : value;
- };
- }
- return function(value) {
- return isString(value) ? value.trim() : value;
- };
-})();
-
-
-/**
- * @ngdoc function
- * @name angular.isElement
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is a DOM element (or wrapped jQuery element).
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a DOM element (or wrapped jQuery element).
- */
-function isElement(node) {
- return !!(node &&
- (node.nodeName // we are a direct element
- || (node.prop && node.attr && node.find))); // we have an on and find method part of jQuery API
-}
-
-/**
- * @param str 'key1,key2,...'
- * @returns {object} in the form of {key1:true, key2:true, ...}
- */
-function makeMap(str) {
- var obj = {}, items = str.split(","), i;
- for ( i = 0; i < items.length; i++ )
- obj[ items[i] ] = true;
- return obj;
-}
-
-
-if (msie < 9) {
- nodeName_ = function(element) {
- element = element.nodeName ? element : element[0];
- return (element.scopeName && element.scopeName != 'HTML')
- ? uppercase(element.scopeName + ':' + element.nodeName) : element.nodeName;
- };
-} else {
- nodeName_ = function(element) {
- return element.nodeName ? element.nodeName : element[0].nodeName;
- };
-}
-
-
-function map(obj, iterator, context) {
- var results = [];
- forEach(obj, function(value, index, list) {
- results.push(iterator.call(context, value, index, list));
- });
- return results;
-}
-
-
-/**
- * @description
- * Determines the number of elements in an array, the number of properties an object has, or
- * the length of a string.
- *
- * Note: This function is used to augment the Object type in Angular expressions. See
- * {@link angular.Object} for more information about Angular arrays.
- *
- * @param {Object|Array|string} obj Object, array, or string to inspect.
- * @param {boolean} [ownPropsOnly=false] Count only "own" properties in an object
- * @returns {number} The size of `obj` or `0` if `obj` is neither an object nor an array.
- */
-function size(obj, ownPropsOnly) {
- var count = 0, key;
-
- if (isArray(obj) || isString(obj)) {
- return obj.length;
- } else if (isObject(obj)) {
- for (key in obj)
- if (!ownPropsOnly || obj.hasOwnProperty(key))
- count++;
- }
-
- return count;
-}
-
-
-function includes(array, obj) {
- return indexOf(array, obj) != -1;
-}
-
-function indexOf(array, obj) {
- if (array.indexOf) return array.indexOf(obj);
-
- for (var i = 0; i < array.length; i++) {
- if (obj === array[i]) return i;
- }
- return -1;
-}
-
-function arrayRemove(array, value) {
- var index = indexOf(array, value);
- if (index >=0)
- array.splice(index, 1);
- return value;
-}
-
-function isLeafNode (node) {
- if (node) {
- switch (node.nodeName) {
- case "OPTION":
- case "PRE":
- case "TITLE":
- return true;
- }
- }
- return false;
-}
-
-/**
- * @ngdoc function
- * @name angular.copy
- * @module ng
- * @kind function
- *
- * @description
- * Creates a deep copy of `source`, which should be an object or an array.
- *
- * * If no destination is supplied, a copy of the object or array is created.
- * * If a destination is provided, all of its elements (for array) or properties (for objects)
- * are deleted and then all elements/properties from the source are copied to it.
- * * If `source` is not an object or array (inc. `null` and `undefined`), `source` is returned.
- * * If `source` is identical to 'destination' an exception will be thrown.
- *
- * @param {*} source The source that will be used to make a copy.
- * Can be any type, including primitives, `null`, and `undefined`.
- * @param {(Object|Array)=} destination Destination into which the source is copied. If
- * provided, must be of the same type as `source`.
- * @returns {*} The copy or updated `destination`, if `destination` was specified.
- *
- * @example
- <example module="copyExample">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <form novalidate class="simple-form">
- Name: <input type="text" ng-model="user.name" /><br />
- E-mail: <input type="email" ng-model="user.email" /><br />
- Gender: <input type="radio" ng-model="user.gender" value="male" />male
- <input type="radio" ng-model="user.gender" value="female" />female<br />
- <button ng-click="reset()">RESET</button>
- <button ng-click="update(user)">SAVE</button>
- </form>
- <pre>form = {{user | json}}</pre>
- <pre>master = {{master | json}}</pre>
- </div>
-
- <script>
- angular.module('copyExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.master= {};
-
- $scope.update = function(user) {
- // Example with 1 argument
- $scope.master= angular.copy(user);
- };
-
- $scope.reset = function() {
- // Example with 2 arguments
- angular.copy($scope.master, $scope.user);
- };
-
- $scope.reset();
- }]);
- </script>
- </file>
- </example>
- */
-function copy(source, destination, stackSource, stackDest) {
- if (isWindow(source) || isScope(source)) {
- throw ngMinErr('cpws',
- "Can't copy! Making copies of Window or Scope instances is not supported.");
- }
-
- if (!destination) {
- destination = source;
- if (source) {
- if (isArray(source)) {
- destination = copy(source, [], stackSource, stackDest);
- } else if (isDate(source)) {
- destination = new Date(source.getTime());
- } else if (isRegExp(source)) {
- destination = new RegExp(source.source, source.toString().match(/[^\/]*$/)[0]);
- destination.lastIndex = source.lastIndex;
- } else if (isObject(source)) {
- destination = copy(source, {}, stackSource, stackDest);
- }
- }
- } else {
- if (source === destination) throw ngMinErr('cpi',
- "Can't copy! Source and destination are identical.");
-
- stackSource = stackSource || [];
- stackDest = stackDest || [];
-
- if (isObject(source)) {
- var index = indexOf(stackSource, source);
- if (index !== -1) return stackDest[index];
-
- stackSource.push(source);
- stackDest.push(destination);
- }
-
- var result;
- if (isArray(source)) {
- destination.length = 0;
- for ( var i = 0; i < source.length; i++) {
- result = copy(source[i], null, stackSource, stackDest);
- if (isObject(source[i])) {
- stackSource.push(source[i]);
- stackDest.push(result);
- }
- destination.push(result);
- }
- } else {
- var h = destination.$$hashKey;
- if (isArray(destination)) {
- destination.length = 0;
- } else {
- forEach(destination, function(value, key) {
- delete destination[key];
- });
- }
- for ( var key in source) {
- result = copy(source[key], null, stackSource, stackDest);
- if (isObject(source[key])) {
- stackSource.push(source[key]);
- stackDest.push(result);
- }
- destination[key] = result;
- }
- setHashKey(destination,h);
- }
-
- }
- return destination;
-}
-
-/**
- * Creates a shallow copy of an object, an array or a primitive
- */
-function shallowCopy(src, dst) {
- if (isArray(src)) {
- dst = dst || [];
-
- for ( var i = 0; i < src.length; i++) {
- dst[i] = src[i];
- }
- } else if (isObject(src)) {
- dst = dst || {};
-
- for (var key in src) {
- if (hasOwnProperty.call(src, key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) {
- dst[key] = src[key];
- }
- }
- }
-
- return dst || src;
-}
-
-
-/**
- * @ngdoc function
- * @name angular.equals
- * @module ng
- * @kind function
- *
- * @description
- * Determines if two objects or two values are equivalent. Supports value types, regular
- * expressions, arrays and objects.
- *
- * Two objects or values are considered equivalent if at least one of the following is true:
- *
- * * Both objects or values pass `===` comparison.
- * * Both objects or values are of the same type and all of their properties are equal by
- * comparing them with `angular.equals`.
- * * Both values are NaN. (In JavaScript, NaN == NaN => false. But we consider two NaN as equal)
- * * Both values represent the same regular expression (In JavaScript,
- * /abc/ == /abc/ => false. But we consider two regular expressions as equal when their textual
- * representation matches).
- *
- * During a property comparison, properties of `function` type and properties with names
- * that begin with `$` are ignored.
- *
- * Scope and DOMWindow objects are being compared only by identify (`===`).
- *
- * @param {*} o1 Object or value to compare.
- * @param {*} o2 Object or value to compare.
- * @returns {boolean} True if arguments are equal.
- */
-function equals(o1, o2) {
- if (o1 === o2) return true;
- if (o1 === null || o2 === null) return false;
- if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN
- var t1 = typeof o1, t2 = typeof o2, length, key, keySet;
- if (t1 == t2) {
- if (t1 == 'object') {
- if (isArray(o1)) {
- if (!isArray(o2)) return false;
- if ((length = o1.length) == o2.length) {
- for(key=0; key<length; key++) {
- if (!equals(o1[key], o2[key])) return false;
- }
- return true;
- }
- } else if (isDate(o1)) {
- if (!isDate(o2)) return false;
- return (isNaN(o1.getTime()) && isNaN(o2.getTime())) || (o1.getTime() === o2.getTime());
- } else if (isRegExp(o1) && isRegExp(o2)) {
- return o1.toString() == o2.toString();
- } else {
- if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2) || isArray(o2)) return false;
- keySet = {};
- for(key in o1) {
- if (key.charAt(0) === '$' || isFunction(o1[key])) continue;
- if (!equals(o1[key], o2[key])) return false;
- keySet[key] = true;
- }
- for(key in o2) {
- if (!keySet.hasOwnProperty(key) &&
- key.charAt(0) !== '$' &&
- o2[key] !== undefined &&
- !isFunction(o2[key])) return false;
- }
- return true;
- }
- }
- }
- return false;
-}
-
-var csp = function() {
- if (isDefined(csp.isActive_)) return csp.isActive_;
-
- var active = !!(document.querySelector('[ng-csp]') ||
- document.querySelector('[data-ng-csp]'));
-
- if (!active) {
- try {
- /* jshint -W031, -W054 */
- new Function('');
- /* jshint +W031, +W054 */
- } catch (e) {
- active = true;
- }
- }
-
- return (csp.isActive_ = active);
-};
-
-
-
-function concat(array1, array2, index) {
- return array1.concat(slice.call(array2, index));
-}
-
-function sliceArgs(args, startIndex) {
- return slice.call(args, startIndex || 0);
-}
-
-
-/* jshint -W101 */
-/**
- * @ngdoc function
- * @name angular.bind
- * @module ng
- * @kind function
- *
- * @description
- * Returns a function which calls function `fn` bound to `self` (`self` becomes the `this` for
- * `fn`). You can supply optional `args` that are prebound to the function. This feature is also
- * known as [partial application](http://en.wikipedia.org/wiki/Partial_application), as
- * distinguished from [function currying](http://en.wikipedia.org/wiki/Currying#Contrast_with_partial_function_application).
- *
- * @param {Object} self Context which `fn` should be evaluated in.
- * @param {function()} fn Function to be bound.
- * @param {...*} args Optional arguments to be prebound to the `fn` function call.
- * @returns {function()} Function that wraps the `fn` with all the specified bindings.
- */
-/* jshint +W101 */
-function bind(self, fn) {
- var curryArgs = arguments.length > 2 ? sliceArgs(arguments, 2) : [];
- if (isFunction(fn) && !(fn instanceof RegExp)) {
- return curryArgs.length
- ? function() {
- return arguments.length
- ? fn.apply(self, curryArgs.concat(slice.call(arguments, 0)))
- : fn.apply(self, curryArgs);
- }
- : function() {
- return arguments.length
- ? fn.apply(self, arguments)
- : fn.call(self);
- };
- } else {
- // in IE, native methods are not functions so they cannot be bound (note: they don't need to be)
- return fn;
- }
-}
-
-
-function toJsonReplacer(key, value) {
- var val = value;
-
- if (typeof key === 'string' && key.charAt(0) === '$') {
- val = undefined;
- } else if (isWindow(value)) {
- val = '$WINDOW';
- } else if (value && document === value) {
- val = '$DOCUMENT';
- } else if (isScope(value)) {
- val = '$SCOPE';
- }
-
- return val;
-}
-
-
-/**
- * @ngdoc function
- * @name angular.toJson
- * @module ng
- * @kind function
- *
- * @description
- * Serializes input into a JSON-formatted string. Properties with leading $ characters will be
- * stripped since angular uses this notation internally.
- *
- * @param {Object|Array|Date|string|number} obj Input to be serialized into JSON.
- * @param {boolean=} pretty If set to true, the JSON output will contain newlines and whitespace.
- * @returns {string|undefined} JSON-ified string representing `obj`.
- */
-function toJson(obj, pretty) {
- if (typeof obj === 'undefined') return undefined;
- return JSON.stringify(obj, toJsonReplacer, pretty ? ' ' : null);
-}
-
-
-/**
- * @ngdoc function
- * @name angular.fromJson
- * @module ng
- * @kind function
- *
- * @description
- * Deserializes a JSON string.
- *
- * @param {string} json JSON string to deserialize.
- * @returns {Object|Array|string|number} Deserialized thingy.
- */
-function fromJson(json) {
- return isString(json)
- ? JSON.parse(json)
- : json;
-}
-
-
-function toBoolean(value) {
- if (typeof value === 'function') {
- value = true;
- } else if (value && value.length !== 0) {
- var v = lowercase("" + value);
- value = !(v == 'f' || v == '0' || v == 'false' || v == 'no' || v == 'n' || v == '[]');
- } else {
- value = false;
- }
- return value;
-}
-
-/**
- * @returns {string} Returns the string representation of the element.
- */
-function startingTag(element) {
- element = jqLite(element).clone();
- try {
- // turns out IE does not let you set .html() on elements which
- // are not allowed to have children. So we just ignore it.
- element.empty();
- } catch(e) {}
- // As Per DOM Standards
- var TEXT_NODE = 3;
- var elemHtml = jqLite('<div>').append(element).html();
- try {
- return element[0].nodeType === TEXT_NODE ? lowercase(elemHtml) :
- elemHtml.
- match(/^(<[^>]+>)/)[1].
- replace(/^<([\w\-]+)/, function(match, nodeName) { return '<' + lowercase(nodeName); });
- } catch(e) {
- return lowercase(elemHtml);
- }
-
-}
-
-
-/////////////////////////////////////////////////
-
-/**
- * Tries to decode the URI component without throwing an exception.
- *
- * @private
- * @param str value potential URI component to check.
- * @returns {boolean} True if `value` can be decoded
- * with the decodeURIComponent function.
- */
-function tryDecodeURIComponent(value) {
- try {
- return decodeURIComponent(value);
- } catch(e) {
- // Ignore any invalid uri component
- }
-}
-
-
-/**
- * Parses an escaped url query string into key-value pairs.
- * @returns {Object.<string,boolean|Array>}
- */
-function parseKeyValue(/**string*/keyValue) {
- var obj = {}, key_value, key;
- forEach((keyValue || "").split('&'), function(keyValue) {
- if ( keyValue ) {
- key_value = keyValue.replace(/\+/g,'%20').split('=');
- key = tryDecodeURIComponent(key_value[0]);
- if ( isDefined(key) ) {
- var val = isDefined(key_value[1]) ? tryDecodeURIComponent(key_value[1]) : true;
- if (!hasOwnProperty.call(obj, key)) {
- obj[key] = val;
- } else if(isArray(obj[key])) {
- obj[key].push(val);
- } else {
- obj[key] = [obj[key],val];
- }
- }
- }
- });
- return obj;
-}
-
-function toKeyValue(obj) {
- var parts = [];
- forEach(obj, function(value, key) {
- if (isArray(value)) {
- forEach(value, function(arrayValue) {
- parts.push(encodeUriQuery(key, true) +
- (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true)));
- });
- } else {
- parts.push(encodeUriQuery(key, true) +
- (value === true ? '' : '=' + encodeUriQuery(value, true)));
- }
- });
- return parts.length ? parts.join('&') : '';
-}
-
-
-/**
- * We need our custom method because encodeURIComponent is too aggressive and doesn't follow
- * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path
- * segments:
- * segment = *pchar
- * pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
- * pct-encoded = "%" HEXDIG HEXDIG
- * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
- * sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
- * / "*" / "+" / "," / ";" / "="
- */
-function encodeUriSegment(val) {
- return encodeUriQuery(val, true).
- replace(/%26/gi, '&').
- replace(/%3D/gi, '=').
- replace(/%2B/gi, '+');
-}
-
-
-/**
- * This method is intended for encoding *key* or *value* parts of query component. We need a custom
- * method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be
- * encoded per http://tools.ietf.org/html/rfc3986:
- * query = *( pchar / "/" / "?" )
- * pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
- * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
- * pct-encoded = "%" HEXDIG HEXDIG
- * sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
- * / "*" / "+" / "," / ";" / "="
- */
-function encodeUriQuery(val, pctEncodeSpaces) {
- return encodeURIComponent(val).
- replace(/%40/gi, '@').
- replace(/%3A/gi, ':').
- replace(/%24/g, '$').
- replace(/%2C/gi, ',').
- replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));
-}
-
-
-/**
- * @ngdoc directive
- * @name ngApp
- * @module ng
- *
- * @element ANY
- * @param {angular.Module} ngApp an optional application
- * {@link angular.module module} name to load.
- *
- * @description
- *
- * Use this directive to **auto-bootstrap** an AngularJS application. The `ngApp` directive
- * designates the **root element** of the application and is typically placed near the root element
- * of the page - e.g. on the `<body>` or `<html>` tags.
- *
- * Only one AngularJS application can be auto-bootstrapped per HTML document. The first `ngApp`
- * found in the document will be used to define the root element to auto-bootstrap as an
- * application. To run multiple applications in an HTML document you must manually bootstrap them using
- * {@link angular.bootstrap} instead. AngularJS applications cannot be nested within each other.
- *
- * You can specify an **AngularJS module** to be used as the root module for the application. This
- * module will be loaded into the {@link auto.$injector} when the application is bootstrapped and
- * should contain the application code needed or have dependencies on other modules that will
- * contain the code. See {@link angular.module} for more information.
- *
- * In the example below if the `ngApp` directive were not placed on the `html` element then the
- * document would not be compiled, the `AppController` would not be instantiated and the `{{ a+b }}`
- * would not be resolved to `3`.
- *
- * `ngApp` is the easiest, and most common, way to bootstrap an application.
- *
- <example module="ngAppDemo">
- <file name="index.html">
- <div ng-controller="ngAppDemoController">
- I can add: {{a}} + {{b}} = {{ a+b }}
- </div>
- </file>
- <file name="script.js">
- angular.module('ngAppDemo', []).controller('ngAppDemoController', function($scope) {
- $scope.a = 1;
- $scope.b = 2;
- });
- </file>
- </example>
- *
- */
-function angularInit(element, bootstrap) {
- var elements = [element],
- appElement,
- module,
- names = ['ng:app', 'ng-app', 'x-ng-app', 'data-ng-app'],
- NG_APP_CLASS_REGEXP = /\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;
-
- function append(element) {
- element && elements.push(element);
- }
-
- forEach(names, function(name) {
- names[name] = true;
- append(document.getElementById(name));
- name = name.replace(':', '\\:');
- if (element.querySelectorAll) {
- forEach(element.querySelectorAll('.' + name), append);
- forEach(element.querySelectorAll('.' + name + '\\:'), append);
- forEach(element.querySelectorAll('[' + name + ']'), append);
- }
- });
-
- forEach(elements, function(element) {
- if (!appElement) {
- var className = ' ' + element.className + ' ';
- var match = NG_APP_CLASS_REGEXP.exec(className);
- if (match) {
- appElement = element;
- module = (match[2] || '').replace(/\s+/g, ',');
- } else {
- forEach(element.attributes, function(attr) {
- if (!appElement && names[attr.name]) {
- appElement = element;
- module = attr.value;
- }
- });
- }
- }
- });
- if (appElement) {
- bootstrap(appElement, module ? [module] : []);
- }
-}
-
-/**
- * @ngdoc function
- * @name angular.bootstrap
- * @module ng
- * @description
- * Use this function to manually start up angular application.
- *
- * See: {@link guide/bootstrap Bootstrap}
- *
- * Note that ngScenario-based end-to-end tests cannot use this function to bootstrap manually.
- * They must use {@link ng.directive:ngApp ngApp}.
- *
- * Angular will detect if it has been loaded into the browser more than once and only allow the
- * first loaded script to be bootstrapped and will report a warning to the browser console for
- * each of the subsequent scripts. This prevents strange results in applications, where otherwise
- * multiple instances of Angular try to work on the DOM.
- *
- * <example name="multi-bootstrap" module="multi-bootstrap">
- * <file name="index.html">
- * <script src="../../../angular.js"></script>
- * <div ng-controller="BrokenTable">
- * <table>
- * <tr>
- * <th ng-repeat="heading in headings">{{heading}}</th>
- * </tr>
- * <tr ng-repeat="filling in fillings">
- * <td ng-repeat="fill in filling">{{fill}}</td>
- * </tr>
- * </table>
- * </div>
- * </file>
- * <file name="controller.js">
- * var app = angular.module('multi-bootstrap', [])
- *
- * .controller('BrokenTable', function($scope) {
- * $scope.headings = ['One', 'Two', 'Three'];
- * $scope.fillings = [[1, 2, 3], ['A', 'B', 'C'], [7, 8, 9]];
- * });
- * </file>
- * <file name="protractor.js" type="protractor">
- * it('should only insert one table cell for each item in $scope.fillings', function() {
- * expect(element.all(by.css('td')).count())
- * .toBe(9);
- * });
- * </file>
- * </example>
- *
- * @param {DOMElement} element DOM element which is the root of angular application.
- * @param {Array<String|Function|Array>=} modules an array of modules to load into the application.
- * Each item in the array should be the name of a predefined module or a (DI annotated)
- * function that will be invoked by the injector as a run block.
- * See: {@link angular.module modules}
- * @returns {auto.$injector} Returns the newly created injector for this app.
- */
-function bootstrap(element, modules) {
- var doBootstrap = function() {
- element = jqLite(element);
-
- if (element.injector()) {
- var tag = (element[0] === document) ? 'document' : startingTag(element);
- //Encode angle brackets to prevent input from being sanitized to empty string #8683
- throw ngMinErr(
- 'btstrpd',
- "App Already Bootstrapped with this Element '{0}'",
- tag.replace(/</,'&lt;').replace(/>/,'&gt;'));
- }
-
- modules = modules || [];
- modules.unshift(['$provide', function($provide) {
- $provide.value('$rootElement', element);
- }]);
- modules.unshift('ng');
- var injector = createInjector(modules);
- injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector', '$animate',
- function(scope, element, compile, injector, animate) {
- scope.$apply(function() {
- element.data('$injector', injector);
- compile(element)(scope);
- });
- }]
- );
- return injector;
- };
-
- var NG_DEFER_BOOTSTRAP = /^NG_DEFER_BOOTSTRAP!/;
-
- if (window && !NG_DEFER_BOOTSTRAP.test(window.name)) {
- return doBootstrap();
- }
-
- window.name = window.name.replace(NG_DEFER_BOOTSTRAP, '');
- angular.resumeBootstrap = function(extraModules) {
- forEach(extraModules, function(module) {
- modules.push(module);
- });
- doBootstrap();
- };
-}
-
-var SNAKE_CASE_REGEXP = /[A-Z]/g;
-function snake_case(name, separator) {
- separator = separator || '_';
- return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {
- return (pos ? separator : '') + letter.toLowerCase();
- });
-}
-
-function bindJQuery() {
- // bind to jQuery if present;
- jQuery = window.jQuery;
- // Use jQuery if it exists with proper functionality, otherwise default to us.
- // Angular 1.2+ requires jQuery 1.7.1+ for on()/off() support.
- if (jQuery && jQuery.fn.on) {
- jqLite = jQuery;
- extend(jQuery.fn, {
- scope: JQLitePrototype.scope,
- isolateScope: JQLitePrototype.isolateScope,
- controller: JQLitePrototype.controller,
- injector: JQLitePrototype.injector,
- inheritedData: JQLitePrototype.inheritedData
- });
- // Method signature:
- // jqLitePatchJQueryRemove(name, dispatchThis, filterElems, getterIfNoArguments)
- jqLitePatchJQueryRemove('remove', true, true, false);
- jqLitePatchJQueryRemove('empty', false, false, false);
- jqLitePatchJQueryRemove('html', false, false, true);
- } else {
- jqLite = JQLite;
- }
- angular.element = jqLite;
-}
-
-/**
- * throw error if the argument is falsy.
- */
-function assertArg(arg, name, reason) {
- if (!arg) {
- throw ngMinErr('areq', "Argument '{0}' is {1}", (name || '?'), (reason || "required"));
- }
- return arg;
-}
-
-function assertArgFn(arg, name, acceptArrayAnnotation) {
- if (acceptArrayAnnotation && isArray(arg)) {
- arg = arg[arg.length - 1];
- }
-
- assertArg(isFunction(arg), name, 'not a function, got ' +
- (arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg));
- return arg;
-}
-
-/**
- * throw error if the name given is hasOwnProperty
- * @param {String} name the name to test
- * @param {String} context the context in which the name is used, such as module or directive
- */
-function assertNotHasOwnProperty(name, context) {
- if (name === 'hasOwnProperty') {
- throw ngMinErr('badname', "hasOwnProperty is not a valid {0} name", context);
- }
-}
-
-/**
- * Return the value accessible from the object by path. Any undefined traversals are ignored
- * @param {Object} obj starting object
- * @param {String} path path to traverse
- * @param {boolean} [bindFnToScope=true]
- * @returns {Object} value as accessible by path
- */
-//TODO(misko): this function needs to be removed
-function getter(obj, path, bindFnToScope) {
- if (!path) return obj;
- var keys = path.split('.');
- var key;
- var lastInstance = obj;
- var len = keys.length;
-
- for (var i = 0; i < len; i++) {
- key = keys[i];
- if (obj) {
- obj = (lastInstance = obj)[key];
- }
- }
- if (!bindFnToScope && isFunction(obj)) {
- return bind(lastInstance, obj);
- }
- return obj;
-}
-
-/**
- * Return the DOM siblings between the first and last node in the given array.
- * @param {Array} array like object
- * @returns {DOMElement} object containing the elements
- */
-function getBlockElements(nodes) {
- var startNode = nodes[0],
- endNode = nodes[nodes.length - 1];
- if (startNode === endNode) {
- return jqLite(startNode);
- }
-
- var element = startNode;
- var elements = [element];
-
- do {
- element = element.nextSibling;
- if (!element) break;
- elements.push(element);
- } while (element !== endNode);
-
- return jqLite(elements);
-}
-
-/**
- * @ngdoc type
- * @name angular.Module
- * @module ng
- * @description
- *
- * Interface for configuring angular {@link angular.module modules}.
- */
-
-function setupModuleLoader(window) {
-
- var $injectorMinErr = minErr('$injector');
- var ngMinErr = minErr('ng');
-
- function ensure(obj, name, factory) {
- return obj[name] || (obj[name] = factory());
- }
-
- var angular = ensure(window, 'angular', Object);
-
- // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap
- angular.$$minErr = angular.$$minErr || minErr;
-
- return ensure(angular, 'module', function() {
- /** @type {Object.<string, angular.Module>} */
- var modules = {};
-
- /**
- * @ngdoc function
- * @name angular.module
- * @module ng
- * @description
- *
- * The `angular.module` is a global place for creating, registering and retrieving Angular
- * modules.
- * All modules (angular core or 3rd party) that should be available to an application must be
- * registered using this mechanism.
- *
- * When passed two or more arguments, a new module is created. If passed only one argument, an
- * existing module (the name passed as the first argument to `module`) is retrieved.
- *
- *
- * # Module
- *
- * A module is a collection of services, directives, controllers, filters, and configuration information.
- * `angular.module` is used to configure the {@link auto.$injector $injector}.
- *
- * ```js
- * // Create a new module
- * var myModule = angular.module('myModule', []);
- *
- * // register a new service
- * myModule.value('appName', 'MyCoolApp');
- *
- * // configure existing services inside initialization blocks.
- * myModule.config(['$locationProvider', function($locationProvider) {
- * // Configure existing providers
- * $locationProvider.hashPrefix('!');
- * }]);
- * ```
- *
- * Then you can create an injector and load your modules like this:
- *
- * ```js
- * var injector = angular.injector(['ng', 'myModule'])
- * ```
- *
- * However it's more likely that you'll just use
- * {@link ng.directive:ngApp ngApp} or
- * {@link angular.bootstrap} to simplify this process for you.
- *
- * @param {!string} name The name of the module to create or retrieve.
- * @param {!Array.<string>=} requires If specified then new module is being created. If
- * unspecified then the module is being retrieved for further configuration.
- * @param {Function=} configFn Optional configuration function for the module. Same as
- * {@link angular.Module#config Module#config()}.
- * @returns {module} new module with the {@link angular.Module} api.
- */
- return function module(name, requires, configFn) {
- var assertNotHasOwnProperty = function(name, context) {
- if (name === 'hasOwnProperty') {
- throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);
- }
- };
-
- assertNotHasOwnProperty(name, 'module');
- if (requires && modules.hasOwnProperty(name)) {
- modules[name] = null;
- }
- return ensure(modules, name, function() {
- if (!requires) {
- throw $injectorMinErr('nomod', "Module '{0}' is not available! You either misspelled " +
- "the module name or forgot to load it. If registering a module ensure that you " +
- "specify the dependencies as the second argument.", name);
- }
-
- /** @type {!Array.<Array.<*>>} */
- var invokeQueue = [];
-
- /** @type {!Array.<Function>} */
- var runBlocks = [];
-
- var config = invokeLater('$injector', 'invoke');
-
- /** @type {angular.Module} */
- var moduleInstance = {
- // Private state
- _invokeQueue: invokeQueue,
- _runBlocks: runBlocks,
-
- /**
- * @ngdoc property
- * @name angular.Module#requires
- * @module ng
- *
- * @description
- * Holds the list of modules which the injector will load before the current module is
- * loaded.
- */
- requires: requires,
-
- /**
- * @ngdoc property
- * @name angular.Module#name
- * @module ng
- *
- * @description
- * Name of the module.
- */
- name: name,
-
-
- /**
- * @ngdoc method
- * @name angular.Module#provider
- * @module ng
- * @param {string} name service name
- * @param {Function} providerType Construction function for creating new instance of the
- * service.
- * @description
- * See {@link auto.$provide#provider $provide.provider()}.
- */
- provider: invokeLater('$provide', 'provider'),
-
- /**
- * @ngdoc method
- * @name angular.Module#factory
- * @module ng
- * @param {string} name service name
- * @param {Function} providerFunction Function for creating new instance of the service.
- * @description
- * See {@link auto.$provide#factory $provide.factory()}.
- */
- factory: invokeLater('$provide', 'factory'),
-
- /**
- * @ngdoc method
- * @name angular.Module#service
- * @module ng
- * @param {string} name service name
- * @param {Function} constructor A constructor function that will be instantiated.
- * @description
- * See {@link auto.$provide#service $provide.service()}.
- */
- service: invokeLater('$provide', 'service'),
-
- /**
- * @ngdoc method
- * @name angular.Module#value
- * @module ng
- * @param {string} name service name
- * @param {*} object Service instance object.
- * @description
- * See {@link auto.$provide#value $provide.value()}.
- */
- value: invokeLater('$provide', 'value'),
-
- /**
- * @ngdoc method
- * @name angular.Module#constant
- * @module ng
- * @param {string} name constant name
- * @param {*} object Constant value.
- * @description
- * Because the constant are fixed, they get applied before other provide methods.
- * See {@link auto.$provide#constant $provide.constant()}.
- */
- constant: invokeLater('$provide', 'constant', 'unshift'),
-
- /**
- * @ngdoc method
- * @name angular.Module#animation
- * @module ng
- * @param {string} name animation name
- * @param {Function} animationFactory Factory function for creating new instance of an
- * animation.
- * @description
- *
- * **NOTE**: animations take effect only if the **ngAnimate** module is loaded.
- *
- *
- * Defines an animation hook that can be later used with
- * {@link ngAnimate.$animate $animate} service and directives that use this service.
- *
- * ```js
- * module.animation('.animation-name', function($inject1, $inject2) {
- * return {
- * eventName : function(element, done) {
- * //code to run the animation
- * //once complete, then run done()
- * return function cancellationFunction(element) {
- * //code to cancel the animation
- * }
- * }
- * }
- * })
- * ```
- *
- * See {@link ngAnimate.$animateProvider#register $animateProvider.register()} and
- * {@link ngAnimate ngAnimate module} for more information.
- */
- animation: invokeLater('$animateProvider', 'register'),
-
- /**
- * @ngdoc method
- * @name angular.Module#filter
- * @module ng
- * @param {string} name Filter name.
- * @param {Function} filterFactory Factory function for creating new instance of filter.
- * @description
- * See {@link ng.$filterProvider#register $filterProvider.register()}.
- */
- filter: invokeLater('$filterProvider', 'register'),
-
- /**
- * @ngdoc method
- * @name angular.Module#controller
- * @module ng
- * @param {string|Object} name Controller name, or an object map of controllers where the
- * keys are the names and the values are the constructors.
- * @param {Function} constructor Controller constructor function.
- * @description
- * See {@link ng.$controllerProvider#register $controllerProvider.register()}.
- */
- controller: invokeLater('$controllerProvider', 'register'),
-
- /**
- * @ngdoc method
- * @name angular.Module#directive
- * @module ng
- * @param {string|Object} name Directive name, or an object map of directives where the
- * keys are the names and the values are the factories.
- * @param {Function} directiveFactory Factory function for creating new instance of
- * directives.
- * @description
- * See {@link ng.$compileProvider#directive $compileProvider.directive()}.
- */
- directive: invokeLater('$compileProvider', 'directive'),
-
- /**
- * @ngdoc method
- * @name angular.Module#config
- * @module ng
- * @param {Function} configFn Execute this function on module load. Useful for service
- * configuration.
- * @description
- * Use this method to register work which needs to be performed on module loading.
- * For more about how to configure services, see
- * {@link providers#providers_provider-recipe Provider Recipe}.
- */
- config: config,
-
- /**
- * @ngdoc method
- * @name angular.Module#run
- * @module ng
- * @param {Function} initializationFn Execute this function after injector creation.
- * Useful for application initialization.
- * @description
- * Use this method to register work which should be performed when the injector is done
- * loading all modules.
- */
- run: function(block) {
- runBlocks.push(block);
- return this;
- }
- };
-
- if (configFn) {
- config(configFn);
- }
-
- return moduleInstance;
-
- /**
- * @param {string} provider
- * @param {string} method
- * @param {String=} insertMethod
- * @returns {angular.Module}
- */
- function invokeLater(provider, method, insertMethod) {
- return function() {
- invokeQueue[insertMethod || 'push']([provider, method, arguments]);
- return moduleInstance;
- };
- }
- });
- };
- });
-
-}
-
-/* global angularModule: true,
- version: true,
-
- $LocaleProvider,
- $CompileProvider,
-
- htmlAnchorDirective,
- inputDirective,
- inputDirective,
- formDirective,
- scriptDirective,
- selectDirective,
- styleDirective,
- optionDirective,
- ngBindDirective,
- ngBindHtmlDirective,
- ngBindTemplateDirective,
- ngClassDirective,
- ngClassEvenDirective,
- ngClassOddDirective,
- ngCspDirective,
- ngCloakDirective,
- ngControllerDirective,
- ngFormDirective,
- ngHideDirective,
- ngIfDirective,
- ngIncludeDirective,
- ngIncludeFillContentDirective,
- ngInitDirective,
- ngNonBindableDirective,
- ngPluralizeDirective,
- ngRepeatDirective,
- ngShowDirective,
- ngStyleDirective,
- ngSwitchDirective,
- ngSwitchWhenDirective,
- ngSwitchDefaultDirective,
- ngOptionsDirective,
- ngTranscludeDirective,
- ngModelDirective,
- ngListDirective,
- ngChangeDirective,
- requiredDirective,
- requiredDirective,
- ngValueDirective,
- ngAttributeAliasDirectives,
- ngEventDirectives,
-
- $AnchorScrollProvider,
- $AnimateProvider,
- $BrowserProvider,
- $CacheFactoryProvider,
- $ControllerProvider,
- $DocumentProvider,
- $ExceptionHandlerProvider,
- $FilterProvider,
- $InterpolateProvider,
- $IntervalProvider,
- $HttpProvider,
- $HttpBackendProvider,
- $LocationProvider,
- $LogProvider,
- $ParseProvider,
- $RootScopeProvider,
- $QProvider,
- $$SanitizeUriProvider,
- $SceProvider,
- $SceDelegateProvider,
- $SnifferProvider,
- $TemplateCacheProvider,
- $TimeoutProvider,
- $$RAFProvider,
- $$AsyncCallbackProvider,
- $WindowProvider
-*/
-
-
-/**
- * @ngdoc object
- * @name angular.version
- * @module ng
- * @description
- * An object that contains information about the current AngularJS version. This object has the
- * following properties:
- *
- * - `full` – `{string}` – Full version string, such as "0.9.18".
- * - `major` – `{number}` – Major version number, such as "0".
- * - `minor` – `{number}` – Minor version number, such as "9".
- * - `dot` – `{number}` – Dot version number, such as "18".
- * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
- */
-var version = {
- full: '1.2.25', // all of these placeholder strings will be replaced by grunt's
- major: 1, // package task
- minor: 2,
- dot: 25,
- codeName: 'hypnotic-gesticulation'
-};
-
-
-function publishExternalAPI(angular){
- extend(angular, {
- 'bootstrap': bootstrap,
- 'copy': copy,
- 'extend': extend,
- 'equals': equals,
- 'element': jqLite,
- 'forEach': forEach,
- 'injector': createInjector,
- 'noop': noop,
- 'bind': bind,
- 'toJson': toJson,
- 'fromJson': fromJson,
- 'identity': identity,
- 'isUndefined': isUndefined,
- 'isDefined': isDefined,
- 'isString': isString,
- 'isFunction': isFunction,
- 'isObject': isObject,
- 'isNumber': isNumber,
- 'isElement': isElement,
- 'isArray': isArray,
- 'version': version,
- 'isDate': isDate,
- 'lowercase': lowercase,
- 'uppercase': uppercase,
- 'callbacks': {counter: 0},
- '$$minErr': minErr,
- '$$csp': csp
- });
-
- angularModule = setupModuleLoader(window);
- try {
- angularModule('ngLocale');
- } catch (e) {
- angularModule('ngLocale', []).provider('$locale', $LocaleProvider);
- }
-
- angularModule('ng', ['ngLocale'], ['$provide',
- function ngModule($provide) {
- // $$sanitizeUriProvider needs to be before $compileProvider as it is used by it.
- $provide.provider({
- $$sanitizeUri: $$SanitizeUriProvider
- });
- $provide.provider('$compile', $CompileProvider).
- directive({
- a: htmlAnchorDirective,
- input: inputDirective,
- textarea: inputDirective,
- form: formDirective,
- script: scriptDirective,
- select: selectDirective,
- style: styleDirective,
- option: optionDirective,
- ngBind: ngBindDirective,
- ngBindHtml: ngBindHtmlDirective,
- ngBindTemplate: ngBindTemplateDirective,
- ngClass: ngClassDirective,
- ngClassEven: ngClassEvenDirective,
- ngClassOdd: ngClassOddDirective,
- ngCloak: ngCloakDirective,
- ngController: ngControllerDirective,
- ngForm: ngFormDirective,
- ngHide: ngHideDirective,
- ngIf: ngIfDirective,
- ngInclude: ngIncludeDirective,
- ngInit: ngInitDirective,
- ngNonBindable: ngNonBindableDirective,
- ngPluralize: ngPluralizeDirective,
- ngRepeat: ngRepeatDirective,
- ngShow: ngShowDirective,
- ngStyle: ngStyleDirective,
- ngSwitch: ngSwitchDirective,
- ngSwitchWhen: ngSwitchWhenDirective,
- ngSwitchDefault: ngSwitchDefaultDirective,
- ngOptions: ngOptionsDirective,
- ngTransclude: ngTranscludeDirective,
- ngModel: ngModelDirective,
- ngList: ngListDirective,
- ngChange: ngChangeDirective,
- required: requiredDirective,
- ngRequired: requiredDirective,
- ngValue: ngValueDirective
- }).
- directive({
- ngInclude: ngIncludeFillContentDirective
- }).
- directive(ngAttributeAliasDirectives).
- directive(ngEventDirectives);
- $provide.provider({
- $anchorScroll: $AnchorScrollProvider,
- $animate: $AnimateProvider,
- $browser: $BrowserProvider,
- $cacheFactory: $CacheFactoryProvider,
- $controller: $ControllerProvider,
- $document: $DocumentProvider,
- $exceptionHandler: $ExceptionHandlerProvider,
- $filter: $FilterProvider,
- $interpolate: $InterpolateProvider,
- $interval: $IntervalProvider,
- $http: $HttpProvider,
- $httpBackend: $HttpBackendProvider,
- $location: $LocationProvider,
- $log: $LogProvider,
- $parse: $ParseProvider,
- $rootScope: $RootScopeProvider,
- $q: $QProvider,
- $sce: $SceProvider,
- $sceDelegate: $SceDelegateProvider,
- $sniffer: $SnifferProvider,
- $templateCache: $TemplateCacheProvider,
- $timeout: $TimeoutProvider,
- $window: $WindowProvider,
- $$rAF: $$RAFProvider,
- $$asyncCallback : $$AsyncCallbackProvider
- });
- }
- ]);
-}
-
-/* global JQLitePrototype: true,
- addEventListenerFn: true,
- removeEventListenerFn: true,
- BOOLEAN_ATTR: true
-*/
-
-//////////////////////////////////
-//JQLite
-//////////////////////////////////
-
-/**
- * @ngdoc function
- * @name angular.element
- * @module ng
- * @kind function
- *
- * @description
- * Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element.
- *
- * If jQuery is available, `angular.element` is an alias for the
- * [jQuery](http://api.jquery.com/jQuery/) function. If jQuery is not available, `angular.element`
- * delegates to Angular's built-in subset of jQuery, called "jQuery lite" or "jqLite."
- *
- * <div class="alert alert-success">jqLite is a tiny, API-compatible subset of jQuery that allows
- * Angular to manipulate the DOM in a cross-browser compatible way. **jqLite** implements only the most
- * commonly needed functionality with the goal of having a very small footprint.</div>
- *
- * To use jQuery, simply load it before `DOMContentLoaded` event fired.
- *
- * <div class="alert">**Note:** all element references in Angular are always wrapped with jQuery or
- * jqLite; they are never raw DOM references.</div>
- *
- * ## Angular's jqLite
- * jqLite provides only the following jQuery methods:
- *
- * - [`addClass()`](http://api.jquery.com/addClass/)
- * - [`after()`](http://api.jquery.com/after/)
- * - [`append()`](http://api.jquery.com/append/)
- * - [`attr()`](http://api.jquery.com/attr/)
- * - [`bind()`](http://api.jquery.com/bind/) - Does not support namespaces, selectors or eventData
- * - [`children()`](http://api.jquery.com/children/) - Does not support selectors
- * - [`clone()`](http://api.jquery.com/clone/)
- * - [`contents()`](http://api.jquery.com/contents/)
- * - [`css()`](http://api.jquery.com/css/)
- * - [`data()`](http://api.jquery.com/data/)
- * - [`empty()`](http://api.jquery.com/empty/)
- * - [`eq()`](http://api.jquery.com/eq/)
- * - [`find()`](http://api.jquery.com/find/) - Limited to lookups by tag name
- * - [`hasClass()`](http://api.jquery.com/hasClass/)
- * - [`html()`](http://api.jquery.com/html/)
- * - [`next()`](http://api.jquery.com/next/) - Does not support selectors
- * - [`on()`](http://api.jquery.com/on/) - Does not support namespaces, selectors or eventData
- * - [`off()`](http://api.jquery.com/off/) - Does not support namespaces or selectors
- * - [`one()`](http://api.jquery.com/one/) - Does not support namespaces or selectors
- * - [`parent()`](http://api.jquery.com/parent/) - Does not support selectors
- * - [`prepend()`](http://api.jquery.com/prepend/)
- * - [`prop()`](http://api.jquery.com/prop/)
- * - [`ready()`](http://api.jquery.com/ready/)
- * - [`remove()`](http://api.jquery.com/remove/)
- * - [`removeAttr()`](http://api.jquery.com/removeAttr/)
- * - [`removeClass()`](http://api.jquery.com/removeClass/)
- * - [`removeData()`](http://api.jquery.com/removeData/)
- * - [`replaceWith()`](http://api.jquery.com/replaceWith/)
- * - [`text()`](http://api.jquery.com/text/)
- * - [`toggleClass()`](http://api.jquery.com/toggleClass/)
- * - [`triggerHandler()`](http://api.jquery.com/triggerHandler/) - Passes a dummy event object to handlers.
- * - [`unbind()`](http://api.jquery.com/unbind/) - Does not support namespaces
- * - [`val()`](http://api.jquery.com/val/)
- * - [`wrap()`](http://api.jquery.com/wrap/)
- *
- * ## jQuery/jqLite Extras
- * Angular also provides the following additional methods and events to both jQuery and jqLite:
- *
- * ### Events
- * - `$destroy` - AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires this event
- * on all DOM nodes being removed. This can be used to clean up any 3rd party bindings to the DOM
- * element before it is removed.
- *
- * ### Methods
- * - `controller(name)` - retrieves the controller of the current element or its parent. By default
- * retrieves controller associated with the `ngController` directive. If `name` is provided as
- * camelCase directive name, then the controller for this directive will be retrieved (e.g.
- * `'ngModel'`).
- * - `injector()` - retrieves the injector of the current element or its parent.
- * - `scope()` - retrieves the {@link ng.$rootScope.Scope scope} of the current
- * element or its parent.
- * - `isolateScope()` - retrieves an isolate {@link ng.$rootScope.Scope scope} if one is attached directly to the
- * current element. This getter should be used only on elements that contain a directive which starts a new isolate
- * scope. Calling `scope()` on this element always returns the original non-isolate scope.
- * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top
- * parent element is reached.
- *
- * @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery.
- * @returns {Object} jQuery object.
- */
-
-JQLite.expando = 'ng339';
-
-var jqCache = JQLite.cache = {},
- jqId = 1,
- addEventListenerFn = (window.document.addEventListener
- ? function(element, type, fn) {element.addEventListener(type, fn, false);}
- : function(element, type, fn) {element.attachEvent('on' + type, fn);}),
- removeEventListenerFn = (window.document.removeEventListener
- ? function(element, type, fn) {element.removeEventListener(type, fn, false); }
- : function(element, type, fn) {element.detachEvent('on' + type, fn); });
-
-/*
- * !!! This is an undocumented "private" function !!!
- */
-var jqData = JQLite._data = function(node) {
- //jQuery always returns an object on cache miss
- return this.cache[node[this.expando]] || {};
-};
-
-function jqNextId() { return ++jqId; }
-
-
-var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
-var MOZ_HACK_REGEXP = /^moz([A-Z])/;
-var jqLiteMinErr = minErr('jqLite');
-
-/**
- * Converts snake_case to camelCase.
- * Also there is special case for Moz prefix starting with upper case letter.
- * @param name Name to normalize
- */
-function camelCase(name) {
- return name.
- replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
- return offset ? letter.toUpperCase() : letter;
- }).
- replace(MOZ_HACK_REGEXP, 'Moz$1');
-}
-
-/////////////////////////////////////////////
-// jQuery mutation patch
-//
-// In conjunction with bindJQuery intercepts all jQuery's DOM destruction apis and fires a
-// $destroy event on all DOM nodes being removed.
-//
-/////////////////////////////////////////////
-
-function jqLitePatchJQueryRemove(name, dispatchThis, filterElems, getterIfNoArguments) {
- var originalJqFn = jQuery.fn[name];
- originalJqFn = originalJqFn.$original || originalJqFn;
- removePatch.$original = originalJqFn;
- jQuery.fn[name] = removePatch;
-
- function removePatch(param) {
- // jshint -W040
- var list = filterElems && param ? [this.filter(param)] : [this],
- fireEvent = dispatchThis,
- set, setIndex, setLength,
- element, childIndex, childLength, children;
-
- if (!getterIfNoArguments || param != null) {
- while(list.length) {
- set = list.shift();
- for(setIndex = 0, setLength = set.length; setIndex < setLength; setIndex++) {
- element = jqLite(set[setIndex]);
- if (fireEvent) {
- element.triggerHandler('$destroy');
- } else {
- fireEvent = !fireEvent;
- }
- for(childIndex = 0, childLength = (children = element.children()).length;
- childIndex < childLength;
- childIndex++) {
- list.push(jQuery(children[childIndex]));
- }
- }
- }
- }
- return originalJqFn.apply(this, arguments);
- }
-}
-
-var SINGLE_TAG_REGEXP = /^<(\w+)\s*\/?>(?:<\/\1>|)$/;
-var HTML_REGEXP = /<|&#?\w+;/;
-var TAG_NAME_REGEXP = /<([\w:]+)/;
-var XHTML_TAG_REGEXP = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi;
-
-var wrapMap = {
- 'option': [1, '<select multiple="multiple">', '</select>'],
-
- 'thead': [1, '<table>', '</table>'],
- 'col': [2, '<table><colgroup>', '</colgroup></table>'],
- 'tr': [2, '<table><tbody>', '</tbody></table>'],
- 'td': [3, '<table><tbody><tr>', '</tr></tbody></table>'],
- '_default': [0, "", ""]
-};
-
-wrapMap.optgroup = wrapMap.option;
-wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
-wrapMap.th = wrapMap.td;
-
-function jqLiteIsTextNode(html) {
- return !HTML_REGEXP.test(html);
-}
-
-function jqLiteBuildFragment(html, context) {
- var elem, tmp, tag, wrap,
- fragment = context.createDocumentFragment(),
- nodes = [], i, j, jj;
-
- if (jqLiteIsTextNode(html)) {
- // Convert non-html into a text node
- nodes.push(context.createTextNode(html));
- } else {
- tmp = fragment.appendChild(context.createElement('div'));
- // Convert html into DOM nodes
- tag = (TAG_NAME_REGEXP.exec(html) || ["", ""])[1].toLowerCase();
- wrap = wrapMap[tag] || wrapMap._default;
- tmp.innerHTML = '<div>&#160;</div>' +
- wrap[1] + html.replace(XHTML_TAG_REGEXP, "<$1></$2>") + wrap[2];
- tmp.removeChild(tmp.firstChild);
-
- // Descend through wrappers to the right content
- i = wrap[0];
- while (i--) {
- tmp = tmp.lastChild;
- }
-
- for (j=0, jj=tmp.childNodes.length; j<jj; ++j) nodes.push(tmp.childNodes[j]);
-
- tmp = fragment.firstChild;
- tmp.textContent = "";
- }
-
- // Remove wrapper from fragment
- fragment.textContent = "";
- fragment.innerHTML = ""; // Clear inner HTML
- return nodes;
-}
-
-function jqLiteParseHTML(html, context) {
- context = context || document;
- var parsed;
-
- if ((parsed = SINGLE_TAG_REGEXP.exec(html))) {
- return [context.createElement(parsed[1])];
- }
-
- return jqLiteBuildFragment(html, context);
-}
-
-/////////////////////////////////////////////
-function JQLite(element) {
- if (element instanceof JQLite) {
- return element;
- }
- if (isString(element)) {
- element = trim(element);
- }
- if (!(this instanceof JQLite)) {
- if (isString(element) && element.charAt(0) != '<') {
- throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element');
- }
- return new JQLite(element);
- }
-
- if (isString(element)) {
- jqLiteAddNodes(this, jqLiteParseHTML(element));
- var fragment = jqLite(document.createDocumentFragment());
- fragment.append(this);
- } else {
- jqLiteAddNodes(this, element);
- }
-}
-
-function jqLiteClone(element) {
- return element.cloneNode(true);
-}
-
-function jqLiteDealoc(element){
- jqLiteRemoveData(element);
- for ( var i = 0, children = element.childNodes || []; i < children.length; i++) {
- jqLiteDealoc(children[i]);
- }
-}
-
-function jqLiteOff(element, type, fn, unsupported) {
- if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument');
-
- var events = jqLiteExpandoStore(element, 'events'),
- handle = jqLiteExpandoStore(element, 'handle');
-
- if (!handle) return; //no listeners registered
-
- if (isUndefined(type)) {
- forEach(events, function(eventHandler, type) {
- removeEventListenerFn(element, type, eventHandler);
- delete events[type];
- });
- } else {
- forEach(type.split(' '), function(type) {
- if (isUndefined(fn)) {
- removeEventListenerFn(element, type, events[type]);
- delete events[type];
- } else {
- arrayRemove(events[type] || [], fn);
- }
- });
- }
-}
-
-function jqLiteRemoveData(element, name) {
- var expandoId = element.ng339,
- expandoStore = jqCache[expandoId];
-
- if (expandoStore) {
- if (name) {
- delete jqCache[expandoId].data[name];
- return;
- }
-
- if (expandoStore.handle) {
- expandoStore.events.$destroy && expandoStore.handle({}, '$destroy');
- jqLiteOff(element);
- }
- delete jqCache[expandoId];
- element.ng339 = undefined; // don't delete DOM expandos. IE and Chrome don't like it
- }
-}
-
-function jqLiteExpandoStore(element, key, value) {
- var expandoId = element.ng339,
- expandoStore = jqCache[expandoId || -1];
-
- if (isDefined(value)) {
- if (!expandoStore) {
- element.ng339 = expandoId = jqNextId();
- expandoStore = jqCache[expandoId] = {};
- }
- expandoStore[key] = value;
- } else {
- return expandoStore && expandoStore[key];
- }
-}
-
-function jqLiteData(element, key, value) {
- var data = jqLiteExpandoStore(element, 'data'),
- isSetter = isDefined(value),
- keyDefined = !isSetter && isDefined(key),
- isSimpleGetter = keyDefined && !isObject(key);
-
- if (!data && !isSimpleGetter) {
- jqLiteExpandoStore(element, 'data', data = {});
- }
-
- if (isSetter) {
- data[key] = value;
- } else {
- if (keyDefined) {
- if (isSimpleGetter) {
- // don't create data in this case.
- return data && data[key];
- } else {
- extend(data, key);
- }
- } else {
- return data;
- }
- }
-}
-
-function jqLiteHasClass(element, selector) {
- if (!element.getAttribute) return false;
- return ((" " + (element.getAttribute('class') || '') + " ").replace(/[\n\t]/g, " ").
- indexOf( " " + selector + " " ) > -1);
-}
-
-function jqLiteRemoveClass(element, cssClasses) {
- if (cssClasses && element.setAttribute) {
- forEach(cssClasses.split(' '), function(cssClass) {
- element.setAttribute('class', trim(
- (" " + (element.getAttribute('class') || '') + " ")
- .replace(/[\n\t]/g, " ")
- .replace(" " + trim(cssClass) + " ", " "))
- );
- });
- }
-}
-
-function jqLiteAddClass(element, cssClasses) {
- if (cssClasses && element.setAttribute) {
- var existingClasses = (' ' + (element.getAttribute('class') || '') + ' ')
- .replace(/[\n\t]/g, " ");
-
- forEach(cssClasses.split(' '), function(cssClass) {
- cssClass = trim(cssClass);
- if (existingClasses.indexOf(' ' + cssClass + ' ') === -1) {
- existingClasses += cssClass + ' ';
- }
- });
-
- element.setAttribute('class', trim(existingClasses));
- }
-}
-
-function jqLiteAddNodes(root, elements) {
- if (elements) {
- elements = (!elements.nodeName && isDefined(elements.length) && !isWindow(elements))
- ? elements
- : [ elements ];
- for(var i=0; i < elements.length; i++) {
- root.push(elements[i]);
- }
- }
-}
-
-function jqLiteController(element, name) {
- return jqLiteInheritedData(element, '$' + (name || 'ngController' ) + 'Controller');
-}
-
-function jqLiteInheritedData(element, name, value) {
- // if element is the document object work with the html element instead
- // this makes $(document).scope() possible
- if(element.nodeType == 9) {
- element = element.documentElement;
- }
- var names = isArray(name) ? name : [name];
-
- while (element) {
- for (var i = 0, ii = names.length; i < ii; i++) {
- if ((value = jqLite.data(element, names[i])) !== undefined) return value;
- }
-
- // If dealing with a document fragment node with a host element, and no parent, use the host
- // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM
- // to lookup parent controllers.
- element = element.parentNode || (element.nodeType === 11 && element.host);
- }
-}
-
-function jqLiteEmpty(element) {
- for (var i = 0, childNodes = element.childNodes; i < childNodes.length; i++) {
- jqLiteDealoc(childNodes[i]);
- }
- while (element.firstChild) {
- element.removeChild(element.firstChild);
- }
-}
-
-//////////////////////////////////////////
-// Functions which are declared directly.
-//////////////////////////////////////////
-var JQLitePrototype = JQLite.prototype = {
- ready: function(fn) {
- var fired = false;
-
- function trigger() {
- if (fired) return;
- fired = true;
- fn();
- }
-
- // check if document already is loaded
- if (document.readyState === 'complete'){
- setTimeout(trigger);
- } else {
- this.on('DOMContentLoaded', trigger); // works for modern browsers and IE9
- // we can not use jqLite since we are not done loading and jQuery could be loaded later.
- // jshint -W064
- JQLite(window).on('load', trigger); // fallback to window.onload for others
- // jshint +W064
- }
- },
- toString: function() {
- var value = [];
- forEach(this, function(e){ value.push('' + e);});
- return '[' + value.join(', ') + ']';
- },
-
- eq: function(index) {
- return (index >= 0) ? jqLite(this[index]) : jqLite(this[this.length + index]);
- },
-
- length: 0,
- push: push,
- sort: [].sort,
- splice: [].splice
-};
-
-//////////////////////////////////////////
-// Functions iterating getter/setters.
-// these functions return self on setter and
-// value on get.
-//////////////////////////////////////////
-var BOOLEAN_ATTR = {};
-forEach('multiple,selected,checked,disabled,readOnly,required,open'.split(','), function(value) {
- BOOLEAN_ATTR[lowercase(value)] = value;
-});
-var BOOLEAN_ELEMENTS = {};
-forEach('input,select,option,textarea,button,form,details'.split(','), function(value) {
- BOOLEAN_ELEMENTS[uppercase(value)] = true;
-});
-
-function getBooleanAttrName(element, name) {
- // check dom last since we will most likely fail on name
- var booleanAttr = BOOLEAN_ATTR[name.toLowerCase()];
-
- // booleanAttr is here twice to minimize DOM access
- return booleanAttr && BOOLEAN_ELEMENTS[element.nodeName] && booleanAttr;
-}
-
-forEach({
- data: jqLiteData,
- removeData: jqLiteRemoveData
-}, function(fn, name) {
- JQLite[name] = fn;
-});
-
-forEach({
- data: jqLiteData,
- inheritedData: jqLiteInheritedData,
-
- scope: function(element) {
- // Can't use jqLiteData here directly so we stay compatible with jQuery!
- return jqLite.data(element, '$scope') || jqLiteInheritedData(element.parentNode || element, ['$isolateScope', '$scope']);
- },
-
- isolateScope: function(element) {
- // Can't use jqLiteData here directly so we stay compatible with jQuery!
- return jqLite.data(element, '$isolateScope') || jqLite.data(element, '$isolateScopeNoTemplate');
- },
-
- controller: jqLiteController,
-
- injector: function(element) {
- return jqLiteInheritedData(element, '$injector');
- },
-
- removeAttr: function(element,name) {
- element.removeAttribute(name);
- },
-
- hasClass: jqLiteHasClass,
-
- css: function(element, name, value) {
- name = camelCase(name);
-
- if (isDefined(value)) {
- element.style[name] = value;
- } else {
- var val;
-
- if (msie <= 8) {
- // this is some IE specific weirdness that jQuery 1.6.4 does not sure why
- val = element.currentStyle && element.currentStyle[name];
- if (val === '') val = 'auto';
- }
-
- val = val || element.style[name];
-
- if (msie <= 8) {
- // jquery weirdness :-/
- val = (val === '') ? undefined : val;
- }
-
- return val;
- }
- },
-
- attr: function(element, name, value){
- var lowercasedName = lowercase(name);
- if (BOOLEAN_ATTR[lowercasedName]) {
- if (isDefined(value)) {
- if (!!value) {
- element[name] = true;
- element.setAttribute(name, lowercasedName);
- } else {
- element[name] = false;
- element.removeAttribute(lowercasedName);
- }
- } else {
- return (element[name] ||
- (element.attributes.getNamedItem(name)|| noop).specified)
- ? lowercasedName
- : undefined;
- }
- } else if (isDefined(value)) {
- element.setAttribute(name, value);
- } else if (element.getAttribute) {
- // the extra argument "2" is to get the right thing for a.href in IE, see jQuery code
- // some elements (e.g. Document) don't have get attribute, so return undefined
- var ret = element.getAttribute(name, 2);
- // normalize non-existing attributes to undefined (as jQuery)
- return ret === null ? undefined : ret;
- }
- },
-
- prop: function(element, name, value) {
- if (isDefined(value)) {
- element[name] = value;
- } else {
- return element[name];
- }
- },
-
- text: (function() {
- var NODE_TYPE_TEXT_PROPERTY = [];
- if (msie < 9) {
- NODE_TYPE_TEXT_PROPERTY[1] = 'innerText'; /** Element **/
- NODE_TYPE_TEXT_PROPERTY[3] = 'nodeValue'; /** Text **/
- } else {
- NODE_TYPE_TEXT_PROPERTY[1] = /** Element **/
- NODE_TYPE_TEXT_PROPERTY[3] = 'textContent'; /** Text **/
- }
- getText.$dv = '';
- return getText;
-
- function getText(element, value) {
- var textProp = NODE_TYPE_TEXT_PROPERTY[element.nodeType];
- if (isUndefined(value)) {
- return textProp ? element[textProp] : '';
- }
- element[textProp] = value;
- }
- })(),
-
- val: function(element, value) {
- if (isUndefined(value)) {
- if (nodeName_(element) === 'SELECT' && element.multiple) {
- var result = [];
- forEach(element.options, function (option) {
- if (option.selected) {
- result.push(option.value || option.text);
- }
- });
- return result.length === 0 ? null : result;
- }
- return element.value;
- }
- element.value = value;
- },
-
- html: function(element, value) {
- if (isUndefined(value)) {
- return element.innerHTML;
- }
- for (var i = 0, childNodes = element.childNodes; i < childNodes.length; i++) {
- jqLiteDealoc(childNodes[i]);
- }
- element.innerHTML = value;
- },
-
- empty: jqLiteEmpty
-}, function(fn, name){
- /**
- * Properties: writes return selection, reads return first value
- */
- JQLite.prototype[name] = function(arg1, arg2) {
- var i, key;
- var nodeCount = this.length;
-
- // jqLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it
- // in a way that survives minification.
- // jqLiteEmpty takes no arguments but is a setter.
- if (fn !== jqLiteEmpty &&
- (((fn.length == 2 && (fn !== jqLiteHasClass && fn !== jqLiteController)) ? arg1 : arg2) === undefined)) {
- if (isObject(arg1)) {
-
- // we are a write, but the object properties are the key/values
- for (i = 0; i < nodeCount; i++) {
- if (fn === jqLiteData) {
- // data() takes the whole object in jQuery
- fn(this[i], arg1);
- } else {
- for (key in arg1) {
- fn(this[i], key, arg1[key]);
- }
- }
- }
- // return self for chaining
- return this;
- } else {
- // we are a read, so read the first child.
- // TODO: do we still need this?
- var value = fn.$dv;
- // Only if we have $dv do we iterate over all, otherwise it is just the first element.
- var jj = (value === undefined) ? Math.min(nodeCount, 1) : nodeCount;
- for (var j = 0; j < jj; j++) {
- var nodeValue = fn(this[j], arg1, arg2);
- value = value ? value + nodeValue : nodeValue;
- }
- return value;
- }
- } else {
- // we are a write, so apply to all children
- for (i = 0; i < nodeCount; i++) {
- fn(this[i], arg1, arg2);
- }
- // return self for chaining
- return this;
- }
- };
-});
-
-function createEventHandler(element, events) {
- var eventHandler = function (event, type) {
- if (!event.preventDefault) {
- event.preventDefault = function() {
- event.returnValue = false; //ie
- };
- }
-
- if (!event.stopPropagation) {
- event.stopPropagation = function() {
- event.cancelBubble = true; //ie
- };
- }
-
- if (!event.target) {
- event.target = event.srcElement || document;
- }
-
- if (isUndefined(event.defaultPrevented)) {
- var prevent = event.preventDefault;
- event.preventDefault = function() {
- event.defaultPrevented = true;
- prevent.call(event);
- };
- event.defaultPrevented = false;
- }
-
- event.isDefaultPrevented = function() {
- return event.defaultPrevented || event.returnValue === false;
- };
-
- // Copy event handlers in case event handlers array is modified during execution.
- var eventHandlersCopy = shallowCopy(events[type || event.type] || []);
-
- forEach(eventHandlersCopy, function(fn) {
- fn.call(element, event);
- });
-
- // Remove monkey-patched methods (IE),
- // as they would cause memory leaks in IE8.
- if (msie <= 8) {
- // IE7/8 does not allow to delete property on native object
- event.preventDefault = null;
- event.stopPropagation = null;
- event.isDefaultPrevented = null;
- } else {
- // It shouldn't affect normal browsers (native methods are defined on prototype).
- delete event.preventDefault;
- delete event.stopPropagation;
- delete event.isDefaultPrevented;
- }
- };
- eventHandler.elem = element;
- return eventHandler;
-}
-
-//////////////////////////////////////////
-// Functions iterating traversal.
-// These functions chain results into a single
-// selector.
-//////////////////////////////////////////
-forEach({
- removeData: jqLiteRemoveData,
-
- dealoc: jqLiteDealoc,
-
- on: function onFn(element, type, fn, unsupported){
- if (isDefined(unsupported)) throw jqLiteMinErr('onargs', 'jqLite#on() does not support the `selector` or `eventData` parameters');
-
- var events = jqLiteExpandoStore(element, 'events'),
- handle = jqLiteExpandoStore(element, 'handle');
-
- if (!events) jqLiteExpandoStore(element, 'events', events = {});
- if (!handle) jqLiteExpandoStore(element, 'handle', handle = createEventHandler(element, events));
-
- forEach(type.split(' '), function(type){
- var eventFns = events[type];
-
- if (!eventFns) {
- if (type == 'mouseenter' || type == 'mouseleave') {
- var contains = document.body.contains || document.body.compareDocumentPosition ?
- function( a, b ) {
- // jshint bitwise: false
- var adown = a.nodeType === 9 ? a.documentElement : a,
- bup = b && b.parentNode;
- return a === bup || !!( bup && bup.nodeType === 1 && (
- adown.contains ?
- adown.contains( bup ) :
- a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
- ));
- } :
- function( a, b ) {
- if ( b ) {
- while ( (b = b.parentNode) ) {
- if ( b === a ) {
- return true;
- }
- }
- }
- return false;
- };
-
- events[type] = [];
-
- // Refer to jQuery's implementation of mouseenter & mouseleave
- // Read about mouseenter and mouseleave:
- // http://www.quirksmode.org/js/events_mouse.html#link8
- var eventmap = { mouseleave : "mouseout", mouseenter : "mouseover"};
-
- onFn(element, eventmap[type], function(event) {
- var target = this, related = event.relatedTarget;
- // For mousenter/leave call the handler if related is outside the target.
- // NB: No relatedTarget if the mouse left/entered the browser window
- if ( !related || (related !== target && !contains(target, related)) ){
- handle(event, type);
- }
- });
-
- } else {
- addEventListenerFn(element, type, handle);
- events[type] = [];
- }
- eventFns = events[type];
- }
- eventFns.push(fn);
- });
- },
-
- off: jqLiteOff,
-
- one: function(element, type, fn) {
- element = jqLite(element);
-
- //add the listener twice so that when it is called
- //you can remove the original function and still be
- //able to call element.off(ev, fn) normally
- element.on(type, function onFn() {
- element.off(type, fn);
- element.off(type, onFn);
- });
- element.on(type, fn);
- },
-
- replaceWith: function(element, replaceNode) {
- var index, parent = element.parentNode;
- jqLiteDealoc(element);
- forEach(new JQLite(replaceNode), function(node){
- if (index) {
- parent.insertBefore(node, index.nextSibling);
- } else {
- parent.replaceChild(node, element);
- }
- index = node;
- });
- },
-
- children: function(element) {
- var children = [];
- forEach(element.childNodes, function(element){
- if (element.nodeType === 1)
- children.push(element);
- });
- return children;
- },
-
- contents: function(element) {
- return element.contentDocument || element.childNodes || [];
- },
-
- append: function(element, node) {
- forEach(new JQLite(node), function(child){
- if (element.nodeType === 1 || element.nodeType === 11) {
- element.appendChild(child);
- }
- });
- },
-
- prepend: function(element, node) {
- if (element.nodeType === 1) {
- var index = element.firstChild;
- forEach(new JQLite(node), function(child){
- element.insertBefore(child, index);
- });
- }
- },
-
- wrap: function(element, wrapNode) {
- wrapNode = jqLite(wrapNode)[0];
- var parent = element.parentNode;
- if (parent) {
- parent.replaceChild(wrapNode, element);
- }
- wrapNode.appendChild(element);
- },
-
- remove: function(element) {
- jqLiteDealoc(element);
- var parent = element.parentNode;
- if (parent) parent.removeChild(element);
- },
-
- after: function(element, newElement) {
- var index = element, parent = element.parentNode;
- forEach(new JQLite(newElement), function(node){
- parent.insertBefore(node, index.nextSibling);
- index = node;
- });
- },
-
- addClass: jqLiteAddClass,
- removeClass: jqLiteRemoveClass,
-
- toggleClass: function(element, selector, condition) {
- if (selector) {
- forEach(selector.split(' '), function(className){
- var classCondition = condition;
- if (isUndefined(classCondition)) {
- classCondition = !jqLiteHasClass(element, className);
- }
- (classCondition ? jqLiteAddClass : jqLiteRemoveClass)(element, className);
- });
- }
- },
-
- parent: function(element) {
- var parent = element.parentNode;
- return parent && parent.nodeType !== 11 ? parent : null;
- },
-
- next: function(element) {
- if (element.nextElementSibling) {
- return element.nextElementSibling;
- }
-
- // IE8 doesn't have nextElementSibling
- var elm = element.nextSibling;
- while (elm != null && elm.nodeType !== 1) {
- elm = elm.nextSibling;
- }
- return elm;
- },
-
- find: function(element, selector) {
- if (element.getElementsByTagName) {
- return element.getElementsByTagName(selector);
- } else {
- return [];
- }
- },
-
- clone: jqLiteClone,
-
- triggerHandler: function(element, event, extraParameters) {
-
- var dummyEvent, eventFnsCopy, handlerArgs;
- var eventName = event.type || event;
- var eventFns = (jqLiteExpandoStore(element, 'events') || {})[eventName];
-
- if (eventFns) {
-
- // Create a dummy event to pass to the handlers
- dummyEvent = {
- preventDefault: function() { this.defaultPrevented = true; },
- isDefaultPrevented: function() { return this.defaultPrevented === true; },
- stopPropagation: noop,
- type: eventName,
- target: element
- };
-
- // If a custom event was provided then extend our dummy event with it
- if (event.type) {
- dummyEvent = extend(dummyEvent, event);
- }
-
- // Copy event handlers in case event handlers array is modified during execution.
- eventFnsCopy = shallowCopy(eventFns);
- handlerArgs = extraParameters ? [dummyEvent].concat(extraParameters) : [dummyEvent];
-
- forEach(eventFnsCopy, function(fn) {
- fn.apply(element, handlerArgs);
- });
-
- }
- }
-}, function(fn, name){
- /**
- * chaining functions
- */
- JQLite.prototype[name] = function(arg1, arg2, arg3) {
- var value;
- for(var i=0; i < this.length; i++) {
- if (isUndefined(value)) {
- value = fn(this[i], arg1, arg2, arg3);
- if (isDefined(value)) {
- // any function which returns a value needs to be wrapped
- value = jqLite(value);
- }
- } else {
- jqLiteAddNodes(value, fn(this[i], arg1, arg2, arg3));
- }
- }
- return isDefined(value) ? value : this;
- };
-
- // bind legacy bind/unbind to on/off
- JQLite.prototype.bind = JQLite.prototype.on;
- JQLite.prototype.unbind = JQLite.prototype.off;
-});
-
-/**
- * Computes a hash of an 'obj'.
- * Hash of a:
- * string is string
- * number is number as string
- * object is either result of calling $$hashKey function on the object or uniquely generated id,
- * that is also assigned to the $$hashKey property of the object.
- *
- * @param obj
- * @returns {string} hash string such that the same input will have the same hash string.
- * The resulting string key is in 'type:hashKey' format.
- */
-function hashKey(obj, nextUidFn) {
- var objType = typeof obj,
- key;
-
- if (objType == 'function' || (objType == 'object' && obj !== null)) {
- if (typeof (key = obj.$$hashKey) == 'function') {
- // must invoke on object to keep the right this
- key = obj.$$hashKey();
- } else if (key === undefined) {
- key = obj.$$hashKey = (nextUidFn || nextUid)();
- }
- } else {
- key = obj;
- }
-
- return objType + ':' + key;
-}
-
-/**
- * HashMap which can use objects as keys
- */
-function HashMap(array, isolatedUid) {
- if (isolatedUid) {
- var uid = 0;
- this.nextUid = function() {
- return ++uid;
- };
- }
- forEach(array, this.put, this);
-}
-HashMap.prototype = {
- /**
- * Store key value pair
- * @param key key to store can be any type
- * @param value value to store can be any type
- */
- put: function(key, value) {
- this[hashKey(key, this.nextUid)] = value;
- },
-
- /**
- * @param key
- * @returns {Object} the value for the key
- */
- get: function(key) {
- return this[hashKey(key, this.nextUid)];
- },
-
- /**
- * Remove the key/value pair
- * @param key
- */
- remove: function(key) {
- var value = this[key = hashKey(key, this.nextUid)];
- delete this[key];
- return value;
- }
-};
-
-/**
- * @ngdoc function
- * @module ng
- * @name angular.injector
- * @kind function
- *
- * @description
- * Creates an injector function that can be used for retrieving services as well as for
- * dependency injection (see {@link guide/di dependency injection}).
- *
-
- * @param {Array.<string|Function>} modules A list of module functions or their aliases. See
- * {@link angular.module}. The `ng` module must be explicitly added.
- * @returns {function()} Injector function. See {@link auto.$injector $injector}.
- *
- * @example
- * Typical usage
- * ```js
- * // create an injector
- * var $injector = angular.injector(['ng']);
- *
- * // use the injector to kick off your application
- * // use the type inference to auto inject arguments, or use implicit injection
- * $injector.invoke(function($rootScope, $compile, $document){
- * $compile($document)($rootScope);
- * $rootScope.$digest();
- * });
- * ```
- *
- * Sometimes you want to get access to the injector of a currently running Angular app
- * from outside Angular. Perhaps, you want to inject and compile some markup after the
- * application has been bootstrapped. You can do this using the extra `injector()` added
- * to JQuery/jqLite elements. See {@link angular.element}.
- *
- * *This is fairly rare but could be the case if a third party library is injecting the
- * markup.*
- *
- * In the following example a new block of HTML containing a `ng-controller`
- * directive is added to the end of the document body by JQuery. We then compile and link
- * it into the current AngularJS scope.
- *
- * ```js
- * var $div = $('<div ng-controller="MyCtrl">{{content.label}}</div>');
- * $(document.body).append($div);
- *
- * angular.element(document).injector().invoke(function($compile) {
- * var scope = angular.element($div).scope();
- * $compile($div)(scope);
- * });
- * ```
- */
-
-
-/**
- * @ngdoc module
- * @name auto
- * @description
- *
- * Implicit module which gets automatically added to each {@link auto.$injector $injector}.
- */
-
-var FN_ARGS = /^function\s*[^\(]*\(\s*([^\)]*)\)/m;
-var FN_ARG_SPLIT = /,/;
-var FN_ARG = /^\s*(_?)(\S+?)\1\s*$/;
-var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
-var $injectorMinErr = minErr('$injector');
-function annotate(fn) {
- var $inject,
- fnText,
- argDecl,
- last;
-
- if (typeof fn === 'function') {
- if (!($inject = fn.$inject)) {
- $inject = [];
- if (fn.length) {
- fnText = fn.toString().replace(STRIP_COMMENTS, '');
- argDecl = fnText.match(FN_ARGS);
- forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg){
- arg.replace(FN_ARG, function(all, underscore, name){
- $inject.push(name);
- });
- });
- }
- fn.$inject = $inject;
- }
- } else if (isArray(fn)) {
- last = fn.length - 1;
- assertArgFn(fn[last], 'fn');
- $inject = fn.slice(0, last);
- } else {
- assertArgFn(fn, 'fn', true);
- }
- return $inject;
-}
-
-///////////////////////////////////////
-
-/**
- * @ngdoc service
- * @name $injector
- * @kind function
- *
- * @description
- *
- * `$injector` is used to retrieve object instances as defined by
- * {@link auto.$provide provider}, instantiate types, invoke methods,
- * and load modules.
- *
- * The following always holds true:
- *
- * ```js
- * var $injector = angular.injector();
- * expect($injector.get('$injector')).toBe($injector);
- * expect($injector.invoke(function($injector){
- * return $injector;
- * }).toBe($injector);
- * ```
- *
- * # Injection Function Annotation
- *
- * JavaScript does not have annotations, and annotations are needed for dependency injection. The
- * following are all valid ways of annotating function with injection arguments and are equivalent.
- *
- * ```js
- * // inferred (only works if code not minified/obfuscated)
- * $injector.invoke(function(serviceA){});
- *
- * // annotated
- * function explicit(serviceA) {};
- * explicit.$inject = ['serviceA'];
- * $injector.invoke(explicit);
- *
- * // inline
- * $injector.invoke(['serviceA', function(serviceA){}]);
- * ```
- *
- * ## Inference
- *
- * In JavaScript calling `toString()` on a function returns the function definition. The definition
- * can then be parsed and the function arguments can be extracted. *NOTE:* This does not work with
- * minification, and obfuscation tools since these tools change the argument names.
- *
- * ## `$inject` Annotation
- * By adding an `$inject` property onto a function the injection parameters can be specified.
- *
- * ## Inline
- * As an array of injection names, where the last item in the array is the function to call.
- */
-
-/**
- * @ngdoc method
- * @name $injector#get
- *
- * @description
- * Return an instance of the service.
- *
- * @param {string} name The name of the instance to retrieve.
- * @return {*} The instance.
- */
-
-/**
- * @ngdoc method
- * @name $injector#invoke
- *
- * @description
- * Invoke the method and supply the method arguments from the `$injector`.
- *
- * @param {!Function} fn The function to invoke. Function parameters are injected according to the
- * {@link guide/di $inject Annotation} rules.
- * @param {Object=} self The `this` for the invoked method.
- * @param {Object=} locals Optional object. If preset then any argument names are read from this
- * object first, before the `$injector` is consulted.
- * @returns {*} the value returned by the invoked `fn` function.
- */
-
-/**
- * @ngdoc method
- * @name $injector#has
- *
- * @description
- * Allows the user to query if the particular service exists.
- *
- * @param {string} Name of the service to query.
- * @returns {boolean} returns true if injector has given service.
- */
-
-/**
- * @ngdoc method
- * @name $injector#instantiate
- * @description
- * Create a new instance of JS type. The method takes a constructor function, invokes the new
- * operator, and supplies all of the arguments to the constructor function as specified by the
- * constructor annotation.
- *
- * @param {Function} Type Annotated constructor function.
- * @param {Object=} locals Optional object. If preset then any argument names are read from this
- * object first, before the `$injector` is consulted.
- * @returns {Object} new instance of `Type`.
- */
-
-/**
- * @ngdoc method
- * @name $injector#annotate
- *
- * @description
- * Returns an array of service names which the function is requesting for injection. This API is
- * used by the injector to determine which services need to be injected into the function when the
- * function is invoked. There are three ways in which the function can be annotated with the needed
- * dependencies.
- *
- * # Argument names
- *
- * The simplest form is to extract the dependencies from the arguments of the function. This is done
- * by converting the function into a string using `toString()` method and extracting the argument
- * names.
- * ```js
- * // Given
- * function MyController($scope, $route) {
- * // ...
- * }
- *
- * // Then
- * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);
- * ```
- *
- * This method does not work with code minification / obfuscation. For this reason the following
- * annotation strategies are supported.
- *
- * # The `$inject` property
- *
- * If a function has an `$inject` property and its value is an array of strings, then the strings
- * represent names of services to be injected into the function.
- * ```js
- * // Given
- * var MyController = function(obfuscatedScope, obfuscatedRoute) {
- * // ...
- * }
- * // Define function dependencies
- * MyController['$inject'] = ['$scope', '$route'];
- *
- * // Then
- * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);
- * ```
- *
- * # The array notation
- *
- * It is often desirable to inline Injected functions and that's when setting the `$inject` property
- * is very inconvenient. In these situations using the array notation to specify the dependencies in
- * a way that survives minification is a better choice:
- *
- * ```js
- * // We wish to write this (not minification / obfuscation safe)
- * injector.invoke(function($compile, $rootScope) {
- * // ...
- * });
- *
- * // We are forced to write break inlining
- * var tmpFn = function(obfuscatedCompile, obfuscatedRootScope) {
- * // ...
- * };
- * tmpFn.$inject = ['$compile', '$rootScope'];
- * injector.invoke(tmpFn);
- *
- * // To better support inline function the inline annotation is supported
- * injector.invoke(['$compile', '$rootScope', function(obfCompile, obfRootScope) {
- * // ...
- * }]);
- *
- * // Therefore
- * expect(injector.annotate(
- * ['$compile', '$rootScope', function(obfus_$compile, obfus_$rootScope) {}])
- * ).toEqual(['$compile', '$rootScope']);
- * ```
- *
- * @param {Function|Array.<string|Function>} fn Function for which dependent service names need to
- * be retrieved as described above.
- *
- * @returns {Array.<string>} The names of the services which the function requires.
- */
-
-
-
-
-/**
- * @ngdoc service
- * @name $provide
- *
- * @description
- *
- * The {@link auto.$provide $provide} service has a number of methods for registering components
- * with the {@link auto.$injector $injector}. Many of these functions are also exposed on
- * {@link angular.Module}.
- *
- * An Angular **service** is a singleton object created by a **service factory**. These **service
- * factories** are functions which, in turn, are created by a **service provider**.
- * The **service providers** are constructor functions. When instantiated they must contain a
- * property called `$get`, which holds the **service factory** function.
- *
- * When you request a service, the {@link auto.$injector $injector} is responsible for finding the
- * correct **service provider**, instantiating it and then calling its `$get` **service factory**
- * function to get the instance of the **service**.
- *
- * Often services have no configuration options and there is no need to add methods to the service
- * provider. The provider will be no more than a constructor function with a `$get` property. For
- * these cases the {@link auto.$provide $provide} service has additional helper methods to register
- * services without specifying a provider.
- *
- * * {@link auto.$provide#provider provider(provider)} - registers a **service provider** with the
- * {@link auto.$injector $injector}
- * * {@link auto.$provide#constant constant(obj)} - registers a value/object that can be accessed by
- * providers and services.
- * * {@link auto.$provide#value value(obj)} - registers a value/object that can only be accessed by
- * services, not providers.
- * * {@link auto.$provide#factory factory(fn)} - registers a service **factory function**, `fn`,
- * that will be wrapped in a **service provider** object, whose `$get` property will contain the
- * given factory function.
- * * {@link auto.$provide#service service(class)} - registers a **constructor function**, `class`
- * that will be wrapped in a **service provider** object, whose `$get` property will instantiate
- * a new object using the given constructor function.
- *
- * See the individual methods for more information and examples.
- */
-
-/**
- * @ngdoc method
- * @name $provide#provider
- * @description
- *
- * Register a **provider function** with the {@link auto.$injector $injector}. Provider functions
- * are constructor functions, whose instances are responsible for "providing" a factory for a
- * service.
- *
- * Service provider names start with the name of the service they provide followed by `Provider`.
- * For example, the {@link ng.$log $log} service has a provider called
- * {@link ng.$logProvider $logProvider}.
- *
- * Service provider objects can have additional methods which allow configuration of the provider
- * and its service. Importantly, you can configure what kind of service is created by the `$get`
- * method, or how that service will act. For example, the {@link ng.$logProvider $logProvider} has a
- * method {@link ng.$logProvider#debugEnabled debugEnabled}
- * which lets you specify whether the {@link ng.$log $log} service will log debug messages to the
- * console or not.
- *
- * @param {string} name The name of the instance. NOTE: the provider will be available under `name +
- 'Provider'` key.
- * @param {(Object|function())} provider If the provider is:
- *
- * - `Object`: then it should have a `$get` method. The `$get` method will be invoked using
- * {@link auto.$injector#invoke $injector.invoke()} when an instance needs to be created.
- * - `Constructor`: a new instance of the provider will be created using
- * {@link auto.$injector#instantiate $injector.instantiate()}, then treated as `object`.
- *
- * @returns {Object} registered provider instance
-
- * @example
- *
- * The following example shows how to create a simple event tracking service and register it using
- * {@link auto.$provide#provider $provide.provider()}.
- *
- * ```js
- * // Define the eventTracker provider
- * function EventTrackerProvider() {
- * var trackingUrl = '/track';
- *
- * // A provider method for configuring where the tracked events should been saved
- * this.setTrackingUrl = function(url) {
- * trackingUrl = url;
- * };
- *
- * // The service factory function
- * this.$get = ['$http', function($http) {
- * var trackedEvents = {};
- * return {
- * // Call this to track an event
- * event: function(event) {
- * var count = trackedEvents[event] || 0;
- * count += 1;
- * trackedEvents[event] = count;
- * return count;
- * },
- * // Call this to save the tracked events to the trackingUrl
- * save: function() {
- * $http.post(trackingUrl, trackedEvents);
- * }
- * };
- * }];
- * }
- *
- * describe('eventTracker', function() {
- * var postSpy;
- *
- * beforeEach(module(function($provide) {
- * // Register the eventTracker provider
- * $provide.provider('eventTracker', EventTrackerProvider);
- * }));
- *
- * beforeEach(module(function(eventTrackerProvider) {
- * // Configure eventTracker provider
- * eventTrackerProvider.setTrackingUrl('/custom-track');
- * }));
- *
- * it('tracks events', inject(function(eventTracker) {
- * expect(eventTracker.event('login')).toEqual(1);
- * expect(eventTracker.event('login')).toEqual(2);
- * }));
- *
- * it('saves to the tracking url', inject(function(eventTracker, $http) {
- * postSpy = spyOn($http, 'post');
- * eventTracker.event('login');
- * eventTracker.save();
- * expect(postSpy).toHaveBeenCalled();
- * expect(postSpy.mostRecentCall.args[0]).not.toEqual('/track');
- * expect(postSpy.mostRecentCall.args[0]).toEqual('/custom-track');
- * expect(postSpy.mostRecentCall.args[1]).toEqual({ 'login': 1 });
- * }));
- * });
- * ```
- */
-
-/**
- * @ngdoc method
- * @name $provide#factory
- * @description
- *
- * Register a **service factory**, which will be called to return the service instance.
- * This is short for registering a service where its provider consists of only a `$get` property,
- * which is the given service factory function.
- * You should use {@link auto.$provide#factory $provide.factory(getFn)} if you do not need to
- * configure your service in a provider.
- *
- * @param {string} name The name of the instance.
- * @param {function()} $getFn The $getFn for the instance creation. Internally this is a short hand
- * for `$provide.provider(name, {$get: $getFn})`.
- * @returns {Object} registered provider instance
- *
- * @example
- * Here is an example of registering a service
- * ```js
- * $provide.factory('ping', ['$http', function($http) {
- * return function ping() {
- * return $http.send('/ping');
- * };
- * }]);
- * ```
- * You would then inject and use this service like this:
- * ```js
- * someModule.controller('Ctrl', ['ping', function(ping) {
- * ping();
- * }]);
- * ```
- */
-
-
-/**
- * @ngdoc method
- * @name $provide#service
- * @description
- *
- * Register a **service constructor**, which will be invoked with `new` to create the service
- * instance.
- * This is short for registering a service where its provider's `$get` property is the service
- * constructor function that will be used to instantiate the service instance.
- *
- * You should use {@link auto.$provide#service $provide.service(class)} if you define your service
- * as a type/class.
- *
- * @param {string} name The name of the instance.
- * @param {Function} constructor A class (constructor function) that will be instantiated.
- * @returns {Object} registered provider instance
- *
- * @example
- * Here is an example of registering a service using
- * {@link auto.$provide#service $provide.service(class)}.
- * ```js
- * var Ping = function($http) {
- * this.$http = $http;
- * };
- *
- * Ping.$inject = ['$http'];
- *
- * Ping.prototype.send = function() {
- * return this.$http.get('/ping');
- * };
- * $provide.service('ping', Ping);
- * ```
- * You would then inject and use this service like this:
- * ```js
- * someModule.controller('Ctrl', ['ping', function(ping) {
- * ping.send();
- * }]);
- * ```
- */
-
-
-/**
- * @ngdoc method
- * @name $provide#value
- * @description
- *
- * Register a **value service** with the {@link auto.$injector $injector}, such as a string, a
- * number, an array, an object or a function. This is short for registering a service where its
- * provider's `$get` property is a factory function that takes no arguments and returns the **value
- * service**.
- *
- * Value services are similar to constant services, except that they cannot be injected into a
- * module configuration function (see {@link angular.Module#config}) but they can be overridden by
- * an Angular
- * {@link auto.$provide#decorator decorator}.
- *
- * @param {string} name The name of the instance.
- * @param {*} value The value.
- * @returns {Object} registered provider instance
- *
- * @example
- * Here are some examples of creating value services.
- * ```js
- * $provide.value('ADMIN_USER', 'admin');
- *
- * $provide.value('RoleLookup', { admin: 0, writer: 1, reader: 2 });
- *
- * $provide.value('halfOf', function(value) {
- * return value / 2;
- * });
- * ```
- */
-
-
-/**
- * @ngdoc method
- * @name $provide#constant
- * @description
- *
- * Register a **constant service**, such as a string, a number, an array, an object or a function,
- * with the {@link auto.$injector $injector}. Unlike {@link auto.$provide#value value} it can be
- * injected into a module configuration function (see {@link angular.Module#config}) and it cannot
- * be overridden by an Angular {@link auto.$provide#decorator decorator}.
- *
- * @param {string} name The name of the constant.
- * @param {*} value The constant value.
- * @returns {Object} registered instance
- *
- * @example
- * Here a some examples of creating constants:
- * ```js
- * $provide.constant('SHARD_HEIGHT', 306);
- *
- * $provide.constant('MY_COLOURS', ['red', 'blue', 'grey']);
- *
- * $provide.constant('double', function(value) {
- * return value * 2;
- * });
- * ```
- */
-
-
-/**
- * @ngdoc method
- * @name $provide#decorator
- * @description
- *
- * Register a **service decorator** with the {@link auto.$injector $injector}. A service decorator
- * intercepts the creation of a service, allowing it to override or modify the behaviour of the
- * service. The object returned by the decorator may be the original service, or a new service
- * object which replaces or wraps and delegates to the original service.
- *
- * @param {string} name The name of the service to decorate.
- * @param {function()} decorator This function will be invoked when the service needs to be
- * instantiated and should return the decorated service instance. The function is called using
- * the {@link auto.$injector#invoke injector.invoke} method and is therefore fully injectable.
- * Local injection arguments:
- *
- * * `$delegate` - The original service instance, which can be monkey patched, configured,
- * decorated or delegated to.
- *
- * @example
- * Here we decorate the {@link ng.$log $log} service to convert warnings to errors by intercepting
- * calls to {@link ng.$log#error $log.warn()}.
- * ```js
- * $provide.decorator('$log', ['$delegate', function($delegate) {
- * $delegate.warn = $delegate.error;
- * return $delegate;
- * }]);
- * ```
- */
-
-
-function createInjector(modulesToLoad) {
- var INSTANTIATING = {},
- providerSuffix = 'Provider',
- path = [],
- loadedModules = new HashMap([], true),
- providerCache = {
- $provide: {
- provider: supportObject(provider),
- factory: supportObject(factory),
- service: supportObject(service),
- value: supportObject(value),
- constant: supportObject(constant),
- decorator: decorator
- }
- },
- providerInjector = (providerCache.$injector =
- createInternalInjector(providerCache, function() {
- throw $injectorMinErr('unpr', "Unknown provider: {0}", path.join(' <- '));
- })),
- instanceCache = {},
- instanceInjector = (instanceCache.$injector =
- createInternalInjector(instanceCache, function(servicename) {
- var provider = providerInjector.get(servicename + providerSuffix);
- return instanceInjector.invoke(provider.$get, provider);
- }));
-
-
- forEach(loadModules(modulesToLoad), function(fn) { instanceInjector.invoke(fn || noop); });
-
- return instanceInjector;
-
- ////////////////////////////////////
- // $provider
- ////////////////////////////////////
-
- function supportObject(delegate) {
- return function(key, value) {
- if (isObject(key)) {
- forEach(key, reverseParams(delegate));
- } else {
- return delegate(key, value);
- }
- };
- }
-
- function provider(name, provider_) {
- assertNotHasOwnProperty(name, 'service');
- if (isFunction(provider_) || isArray(provider_)) {
- provider_ = providerInjector.instantiate(provider_);
- }
- if (!provider_.$get) {
- throw $injectorMinErr('pget', "Provider '{0}' must define $get factory method.", name);
- }
- return providerCache[name + providerSuffix] = provider_;
- }
-
- function factory(name, factoryFn) { return provider(name, { $get: factoryFn }); }
-
- function service(name, constructor) {
- return factory(name, ['$injector', function($injector) {
- return $injector.instantiate(constructor);
- }]);
- }
-
- function value(name, val) { return factory(name, valueFn(val)); }
-
- function constant(name, value) {
- assertNotHasOwnProperty(name, 'constant');
- providerCache[name] = value;
- instanceCache[name] = value;
- }
-
- function decorator(serviceName, decorFn) {
- var origProvider = providerInjector.get(serviceName + providerSuffix),
- orig$get = origProvider.$get;
-
- origProvider.$get = function() {
- var origInstance = instanceInjector.invoke(orig$get, origProvider);
- return instanceInjector.invoke(decorFn, null, {$delegate: origInstance});
- };
- }
-
- ////////////////////////////////////
- // Module Loading
- ////////////////////////////////////
- function loadModules(modulesToLoad){
- var runBlocks = [], moduleFn, invokeQueue, i, ii;
- forEach(modulesToLoad, function(module) {
- if (loadedModules.get(module)) return;
- loadedModules.put(module, true);
-
- try {
- if (isString(module)) {
- moduleFn = angularModule(module);
- runBlocks = runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks);
-
- for(invokeQueue = moduleFn._invokeQueue, i = 0, ii = invokeQueue.length; i < ii; i++) {
- var invokeArgs = invokeQueue[i],
- provider = providerInjector.get(invokeArgs[0]);
-
- provider[invokeArgs[1]].apply(provider, invokeArgs[2]);
- }
- } else if (isFunction(module)) {
- runBlocks.push(providerInjector.invoke(module));
- } else if (isArray(module)) {
- runBlocks.push(providerInjector.invoke(module));
- } else {
- assertArgFn(module, 'module');
- }
- } catch (e) {
- if (isArray(module)) {
- module = module[module.length - 1];
- }
- if (e.message && e.stack && e.stack.indexOf(e.message) == -1) {
- // Safari & FF's stack traces don't contain error.message content
- // unlike those of Chrome and IE
- // So if stack doesn't contain message, we create a new string that contains both.
- // Since error.stack is read-only in Safari, I'm overriding e and not e.stack here.
- /* jshint -W022 */
- e = e.message + '\n' + e.stack;
- }
- throw $injectorMinErr('modulerr', "Failed to instantiate module {0} due to:\n{1}",
- module, e.stack || e.message || e);
- }
- });
- return runBlocks;
- }
-
- ////////////////////////////////////
- // internal Injector
- ////////////////////////////////////
-
- function createInternalInjector(cache, factory) {
-
- function getService(serviceName) {
- if (cache.hasOwnProperty(serviceName)) {
- if (cache[serviceName] === INSTANTIATING) {
- throw $injectorMinErr('cdep', 'Circular dependency found: {0}',
- serviceName + ' <- ' + path.join(' <- '));
- }
- return cache[serviceName];
- } else {
- try {
- path.unshift(serviceName);
- cache[serviceName] = INSTANTIATING;
- return cache[serviceName] = factory(serviceName);
- } catch (err) {
- if (cache[serviceName] === INSTANTIATING) {
- delete cache[serviceName];
- }
- throw err;
- } finally {
- path.shift();
- }
- }
- }
-
- function invoke(fn, self, locals){
- var args = [],
- $inject = annotate(fn),
- length, i,
- key;
-
- for(i = 0, length = $inject.length; i < length; i++) {
- key = $inject[i];
- if (typeof key !== 'string') {
- throw $injectorMinErr('itkn',
- 'Incorrect injection token! Expected service name as string, got {0}', key);
- }
- args.push(
- locals && locals.hasOwnProperty(key)
- ? locals[key]
- : getService(key)
- );
- }
- if (isArray(fn)) {
- fn = fn[length];
- }
-
- // http://jsperf.com/angularjs-invoke-apply-vs-switch
- // #5388
- return fn.apply(self, args);
- }
-
- function instantiate(Type, locals) {
- var Constructor = function() {},
- instance, returnedValue;
-
- // Check if Type is annotated and use just the given function at n-1 as parameter
- // e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]);
- Constructor.prototype = (isArray(Type) ? Type[Type.length - 1] : Type).prototype;
- instance = new Constructor();
- returnedValue = invoke(Type, instance, locals);
-
- return isObject(returnedValue) || isFunction(returnedValue) ? returnedValue : instance;
- }
-
- return {
- invoke: invoke,
- instantiate: instantiate,
- get: getService,
- annotate: annotate,
- has: function(name) {
- return providerCache.hasOwnProperty(name + providerSuffix) || cache.hasOwnProperty(name);
- }
- };
- }
-}
-
-/**
- * @ngdoc service
- * @name $anchorScroll
- * @kind function
- * @requires $window
- * @requires $location
- * @requires $rootScope
- *
- * @description
- * When called, it checks current value of `$location.hash()` and scrolls to the related element,
- * according to rules specified in
- * [Html5 spec](http://dev.w3.org/html5/spec/Overview.html#the-indicated-part-of-the-document).
- *
- * It also watches the `$location.hash()` and scrolls whenever it changes to match any anchor.
- * This can be disabled by calling `$anchorScrollProvider.disableAutoScrolling()`.
- *
- * @example
- <example>
- <file name="index.html">
- <div id="scrollArea" ng-controller="ScrollCtrl">
- <a ng-click="gotoBottom()">Go to bottom</a>
- <a id="bottom"></a> You're at the bottom!
- </div>
- </file>
- <file name="script.js">
- function ScrollCtrl($scope, $location, $anchorScroll) {
- $scope.gotoBottom = function (){
- // set the location.hash to the id of
- // the element you wish to scroll to.
- $location.hash('bottom');
-
- // call $anchorScroll()
- $anchorScroll();
- };
- }
- </file>
- <file name="style.css">
- #scrollArea {
- height: 350px;
- overflow: auto;
- }
-
- #bottom {
- display: block;
- margin-top: 2000px;
- }
- </file>
- </example>
- */
-function $AnchorScrollProvider() {
-
- var autoScrollingEnabled = true;
-
- this.disableAutoScrolling = function() {
- autoScrollingEnabled = false;
- };
-
- this.$get = ['$window', '$location', '$rootScope', function($window, $location, $rootScope) {
- var document = $window.document;
-
- // helper function to get first anchor from a NodeList
- // can't use filter.filter, as it accepts only instances of Array
- // and IE can't convert NodeList to an array using [].slice
- // TODO(vojta): use filter if we change it to accept lists as well
- function getFirstAnchor(list) {
- var result = null;
- forEach(list, function(element) {
- if (!result && lowercase(element.nodeName) === 'a') result = element;
- });
- return result;
- }
-
- function scroll() {
- var hash = $location.hash(), elm;
-
- // empty hash, scroll to the top of the page
- if (!hash) $window.scrollTo(0, 0);
-
- // element with given id
- else if ((elm = document.getElementById(hash))) elm.scrollIntoView();
-
- // first anchor with given name :-D
- else if ((elm = getFirstAnchor(document.getElementsByName(hash)))) elm.scrollIntoView();
-
- // no element and hash == 'top', scroll to the top of the page
- else if (hash === 'top') $window.scrollTo(0, 0);
- }
-
- // does not scroll when user clicks on anchor link that is currently on
- // (no url change, no $location.hash() change), browser native does scroll
- if (autoScrollingEnabled) {
- $rootScope.$watch(function autoScrollWatch() {return $location.hash();},
- function autoScrollWatchAction() {
- $rootScope.$evalAsync(scroll);
- });
- }
-
- return scroll;
- }];
-}
-
-var $animateMinErr = minErr('$animate');
-
-/**
- * @ngdoc provider
- * @name $animateProvider
- *
- * @description
- * Default implementation of $animate that doesn't perform any animations, instead just
- * synchronously performs DOM
- * updates and calls done() callbacks.
- *
- * In order to enable animations the ngAnimate module has to be loaded.
- *
- * To see the functional implementation check out src/ngAnimate/animate.js
- */
-var $AnimateProvider = ['$provide', function($provide) {
-
-
- this.$$selectors = {};
-
-
- /**
- * @ngdoc method
- * @name $animateProvider#register
- *
- * @description
- * Registers a new injectable animation factory function. The factory function produces the
- * animation object which contains callback functions for each event that is expected to be
- * animated.
- *
- * * `eventFn`: `function(Element, doneFunction)` The element to animate, the `doneFunction`
- * must be called once the element animation is complete. If a function is returned then the
- * animation service will use this function to cancel the animation whenever a cancel event is
- * triggered.
- *
- *
- * ```js
- * return {
- * eventFn : function(element, done) {
- * //code to run the animation
- * //once complete, then run done()
- * return function cancellationFunction() {
- * //code to cancel the animation
- * }
- * }
- * }
- * ```
- *
- * @param {string} name The name of the animation.
- * @param {Function} factory The factory function that will be executed to return the animation
- * object.
- */
- this.register = function(name, factory) {
- var key = name + '-animation';
- if (name && name.charAt(0) != '.') throw $animateMinErr('notcsel',
- "Expecting class selector starting with '.' got '{0}'.", name);
- this.$$selectors[name.substr(1)] = key;
- $provide.factory(key, factory);
- };
-
- /**
- * @ngdoc method
- * @name $animateProvider#classNameFilter
- *
- * @description
- * Sets and/or returns the CSS class regular expression that is checked when performing
- * an animation. Upon bootstrap the classNameFilter value is not set at all and will
- * therefore enable $animate to attempt to perform an animation on any element.
- * When setting the classNameFilter value, animations will only be performed on elements
- * that successfully match the filter expression. This in turn can boost performance
- * for low-powered devices as well as applications containing a lot of structural operations.
- * @param {RegExp=} expression The className expression which will be checked against all animations
- * @return {RegExp} The current CSS className expression value. If null then there is no expression value
- */
- this.classNameFilter = function(expression) {
- if(arguments.length === 1) {
- this.$$classNameFilter = (expression instanceof RegExp) ? expression : null;
- }
- return this.$$classNameFilter;
- };
-
- this.$get = ['$timeout', '$$asyncCallback', function($timeout, $$asyncCallback) {
-
- function async(fn) {
- fn && $$asyncCallback(fn);
- }
-
- /**
- *
- * @ngdoc service
- * @name $animate
- * @description The $animate service provides rudimentary DOM manipulation functions to
- * insert, remove and move elements within the DOM, as well as adding and removing classes.
- * This service is the core service used by the ngAnimate $animator service which provides
- * high-level animation hooks for CSS and JavaScript.
- *
- * $animate is available in the AngularJS core, however, the ngAnimate module must be included
- * to enable full out animation support. Otherwise, $animate will only perform simple DOM
- * manipulation operations.
- *
- * To learn more about enabling animation support, click here to visit the {@link ngAnimate
- * ngAnimate module page} as well as the {@link ngAnimate.$animate ngAnimate $animate service
- * page}.
- */
- return {
-
- /**
- *
- * @ngdoc method
- * @name $animate#enter
- * @kind function
- * @description Inserts the element into the DOM either after the `after` element or within
- * the `parent` element. Once complete, the done() callback will be fired (if provided).
- * @param {DOMElement} element the element which will be inserted into the DOM
- * @param {DOMElement} parent the parent element which will append the element as
- * a child (if the after element is not present)
- * @param {DOMElement} after the sibling element which will append the element
- * after itself
- * @param {Function=} done callback function that will be called after the element has been
- * inserted into the DOM
- */
- enter : function(element, parent, after, done) {
- if (after) {
- after.after(element);
- } else {
- if (!parent || !parent[0]) {
- parent = after.parent();
- }
- parent.append(element);
- }
- async(done);
- },
-
- /**
- *
- * @ngdoc method
- * @name $animate#leave
- * @kind function
- * @description Removes the element from the DOM. Once complete, the done() callback will be
- * fired (if provided).
- * @param {DOMElement} element the element which will be removed from the DOM
- * @param {Function=} done callback function that will be called after the element has been
- * removed from the DOM
- */
- leave : function(element, done) {
- element.remove();
- async(done);
- },
-
- /**
- *
- * @ngdoc method
- * @name $animate#move
- * @kind function
- * @description Moves the position of the provided element within the DOM to be placed
- * either after the `after` element or inside of the `parent` element. Once complete, the
- * done() callback will be fired (if provided).
- *
- * @param {DOMElement} element the element which will be moved around within the
- * DOM
- * @param {DOMElement} parent the parent element where the element will be
- * inserted into (if the after element is not present)
- * @param {DOMElement} after the sibling element where the element will be
- * positioned next to
- * @param {Function=} done the callback function (if provided) that will be fired after the
- * element has been moved to its new position
- */
- move : function(element, parent, after, done) {
- // Do not remove element before insert. Removing will cause data associated with the
- // element to be dropped. Insert will implicitly do the remove.
- this.enter(element, parent, after, done);
- },
-
- /**
- *
- * @ngdoc method
- * @name $animate#addClass
- * @kind function
- * @description Adds the provided className CSS class value to the provided element. Once
- * complete, the done() callback will be fired (if provided).
- * @param {DOMElement} element the element which will have the className value
- * added to it
- * @param {string} className the CSS class which will be added to the element
- * @param {Function=} done the callback function (if provided) that will be fired after the
- * className value has been added to the element
- */
- addClass : function(element, className, done) {
- className = isString(className) ?
- className :
- isArray(className) ? className.join(' ') : '';
- forEach(element, function (element) {
- jqLiteAddClass(element, className);
- });
- async(done);
- },
-
- /**
- *
- * @ngdoc method
- * @name $animate#removeClass
- * @kind function
- * @description Removes the provided className CSS class value from the provided element.
- * Once complete, the done() callback will be fired (if provided).
- * @param {DOMElement} element the element which will have the className value
- * removed from it
- * @param {string} className the CSS class which will be removed from the element
- * @param {Function=} done the callback function (if provided) that will be fired after the
- * className value has been removed from the element
- */
- removeClass : function(element, className, done) {
- className = isString(className) ?
- className :
- isArray(className) ? className.join(' ') : '';
- forEach(element, function (element) {
- jqLiteRemoveClass(element, className);
- });
- async(done);
- },
-
- /**
- *
- * @ngdoc method
- * @name $animate#setClass
- * @kind function
- * @description Adds and/or removes the given CSS classes to and from the element.
- * Once complete, the done() callback will be fired (if provided).
- * @param {DOMElement} element the element which will have its CSS classes changed
- * removed from it
- * @param {string} add the CSS classes which will be added to the element
- * @param {string} remove the CSS class which will be removed from the element
- * @param {Function=} done the callback function (if provided) that will be fired after the
- * CSS classes have been set on the element
- */
- setClass : function(element, add, remove, done) {
- forEach(element, function (element) {
- jqLiteAddClass(element, add);
- jqLiteRemoveClass(element, remove);
- });
- async(done);
- },
-
- enabled : noop
- };
- }];
-}];
-
-function $$AsyncCallbackProvider(){
- this.$get = ['$$rAF', '$timeout', function($$rAF, $timeout) {
- return $$rAF.supported
- ? function(fn) { return $$rAF(fn); }
- : function(fn) {
- return $timeout(fn, 0, false);
- };
- }];
-}
-
-/**
- * ! This is a private undocumented service !
- *
- * @name $browser
- * @requires $log
- * @description
- * This object has two goals:
- *
- * - hide all the global state in the browser caused by the window object
- * - abstract away all the browser specific features and inconsistencies
- *
- * For tests we provide {@link ngMock.$browser mock implementation} of the `$browser`
- * service, which can be used for convenient testing of the application without the interaction with
- * the real browser apis.
- */
-/**
- * @param {object} window The global window object.
- * @param {object} document jQuery wrapped document.
- * @param {function()} XHR XMLHttpRequest constructor.
- * @param {object} $log console.log or an object with the same interface.
- * @param {object} $sniffer $sniffer service
- */
-function Browser(window, document, $log, $sniffer) {
- var self = this,
- rawDocument = document[0],
- location = window.location,
- history = window.history,
- setTimeout = window.setTimeout,
- clearTimeout = window.clearTimeout,
- pendingDeferIds = {};
-
- self.isMock = false;
-
- var outstandingRequestCount = 0;
- var outstandingRequestCallbacks = [];
-
- // TODO(vojta): remove this temporary api
- self.$$completeOutstandingRequest = completeOutstandingRequest;
- self.$$incOutstandingRequestCount = function() { outstandingRequestCount++; };
-
- /**
- * Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks`
- * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.
- */
- function completeOutstandingRequest(fn) {
- try {
- fn.apply(null, sliceArgs(arguments, 1));
- } finally {
- outstandingRequestCount--;
- if (outstandingRequestCount === 0) {
- while(outstandingRequestCallbacks.length) {
- try {
- outstandingRequestCallbacks.pop()();
- } catch (e) {
- $log.error(e);
- }
- }
- }
- }
- }
-
- /**
- * @private
- * Note: this method is used only by scenario runner
- * TODO(vojta): prefix this method with $$ ?
- * @param {function()} callback Function that will be called when no outstanding request
- */
- self.notifyWhenNoOutstandingRequests = function(callback) {
- // force browser to execute all pollFns - this is needed so that cookies and other pollers fire
- // at some deterministic time in respect to the test runner's actions. Leaving things up to the
- // regular poller would result in flaky tests.
- forEach(pollFns, function(pollFn){ pollFn(); });
-
- if (outstandingRequestCount === 0) {
- callback();
- } else {
- outstandingRequestCallbacks.push(callback);
- }
- };
-
- //////////////////////////////////////////////////////////////
- // Poll Watcher API
- //////////////////////////////////////////////////////////////
- var pollFns = [],
- pollTimeout;
-
- /**
- * @name $browser#addPollFn
- *
- * @param {function()} fn Poll function to add
- *
- * @description
- * Adds a function to the list of functions that poller periodically executes,
- * and starts polling if not started yet.
- *
- * @returns {function()} the added function
- */
- self.addPollFn = function(fn) {
- if (isUndefined(pollTimeout)) startPoller(100, setTimeout);
- pollFns.push(fn);
- return fn;
- };
-
- /**
- * @param {number} interval How often should browser call poll functions (ms)
- * @param {function()} setTimeout Reference to a real or fake `setTimeout` function.
- *
- * @description
- * Configures the poller to run in the specified intervals, using the specified
- * setTimeout fn and kicks it off.
- */
- function startPoller(interval, setTimeout) {
- (function check() {
- forEach(pollFns, function(pollFn){ pollFn(); });
- pollTimeout = setTimeout(check, interval);
- })();
- }
-
- //////////////////////////////////////////////////////////////
- // URL API
- //////////////////////////////////////////////////////////////
-
- var lastBrowserUrl = location.href,
- baseElement = document.find('base'),
- newLocation = null;
-
- /**
- * @name $browser#url
- *
- * @description
- * GETTER:
- * Without any argument, this method just returns current value of location.href.
- *
- * SETTER:
- * With at least one argument, this method sets url to new value.
- * If html5 history api supported, pushState/replaceState is used, otherwise
- * location.href/location.replace is used.
- * Returns its own instance to allow chaining
- *
- * NOTE: this api is intended for use only by the $location service. Please use the
- * {@link ng.$location $location service} to change url.
- *
- * @param {string} url New url (when used as setter)
- * @param {boolean=} replace Should new url replace current history record ?
- */
- self.url = function(url, replace) {
- // Android Browser BFCache causes location, history reference to become stale.
- if (location !== window.location) location = window.location;
- if (history !== window.history) history = window.history;
-
- // setter
- if (url) {
- if (lastBrowserUrl == url) return;
- lastBrowserUrl = url;
- if ($sniffer.history) {
- if (replace) history.replaceState(null, '', url);
- else {
- history.pushState(null, '', url);
- // Crazy Opera Bug: http://my.opera.com/community/forums/topic.dml?id=1185462
- baseElement.attr('href', baseElement.attr('href'));
- }
- } else {
- newLocation = url;
- if (replace) {
- location.replace(url);
- } else {
- location.href = url;
- }
- }
- return self;
- // getter
- } else {
- // - newLocation is a workaround for an IE7-9 issue with location.replace and location.href
- // methods not updating location.href synchronously.
- // - the replacement is a workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=407172
- return newLocation || location.href.replace(/%27/g,"'");
- }
- };
-
- var urlChangeListeners = [],
- urlChangeInit = false;
-
- function fireUrlChange() {
- newLocation = null;
- if (lastBrowserUrl == self.url()) return;
-
- lastBrowserUrl = self.url();
- forEach(urlChangeListeners, function(listener) {
- listener(self.url());
- });
- }
-
- /**
- * @name $browser#onUrlChange
- *
- * @description
- * Register callback function that will be called, when url changes.
- *
- * It's only called when the url is changed from outside of angular:
- * - user types different url into address bar
- * - user clicks on history (forward/back) button
- * - user clicks on a link
- *
- * It's not called when url is changed by $browser.url() method
- *
- * The listener gets called with new url as parameter.
- *
- * NOTE: this api is intended for use only by the $location service. Please use the
- * {@link ng.$location $location service} to monitor url changes in angular apps.
- *
- * @param {function(string)} listener Listener function to be called when url changes.
- * @return {function(string)} Returns the registered listener fn - handy if the fn is anonymous.
- */
- self.onUrlChange = function(callback) {
- // TODO(vojta): refactor to use node's syntax for events
- if (!urlChangeInit) {
- // We listen on both (hashchange/popstate) when available, as some browsers (e.g. Opera)
- // don't fire popstate when user change the address bar and don't fire hashchange when url
- // changed by push/replaceState
-
- // html5 history api - popstate event
- if ($sniffer.history) jqLite(window).on('popstate', fireUrlChange);
- // hashchange event
- if ($sniffer.hashchange) jqLite(window).on('hashchange', fireUrlChange);
- // polling
- else self.addPollFn(fireUrlChange);
-
- urlChangeInit = true;
- }
-
- urlChangeListeners.push(callback);
- return callback;
- };
-
- /**
- * Checks whether the url has changed outside of Angular.
- * Needs to be exported to be able to check for changes that have been done in sync,
- * as hashchange/popstate events fire in async.
- */
- self.$$checkUrlChange = fireUrlChange;
-
- //////////////////////////////////////////////////////////////
- // Misc API
- //////////////////////////////////////////////////////////////
-
- /**
- * @name $browser#baseHref
- *
- * @description
- * Returns current <base href>
- * (always relative - without domain)
- *
- * @returns {string} The current base href
- */
- self.baseHref = function() {
- var href = baseElement.attr('href');
- return href ? href.replace(/^(https?\:)?\/\/[^\/]*/, '') : '';
- };
-
- //////////////////////////////////////////////////////////////
- // Cookies API
- //////////////////////////////////////////////////////////////
- var lastCookies = {};
- var lastCookieString = '';
- var cookiePath = self.baseHref();
-
- /**
- * @name $browser#cookies
- *
- * @param {string=} name Cookie name
- * @param {string=} value Cookie value
- *
- * @description
- * The cookies method provides a 'private' low level access to browser cookies.
- * It is not meant to be used directly, use the $cookie service instead.
- *
- * The return values vary depending on the arguments that the method was called with as follows:
- *
- * - cookies() -> hash of all cookies, this is NOT a copy of the internal state, so do not modify
- * it
- * - cookies(name, value) -> set name to value, if value is undefined delete the cookie
- * - cookies(name) -> the same as (name, undefined) == DELETES (no one calls it right now that
- * way)
- *
- * @returns {Object} Hash of all cookies (if called without any parameter)
- */
- self.cookies = function(name, value) {
- /* global escape: false, unescape: false */
- var cookieLength, cookieArray, cookie, i, index;
-
- if (name) {
- if (value === undefined) {
- rawDocument.cookie = escape(name) + "=;path=" + cookiePath +
- ";expires=Thu, 01 Jan 1970 00:00:00 GMT";
- } else {
- if (isString(value)) {
- cookieLength = (rawDocument.cookie = escape(name) + '=' + escape(value) +
- ';path=' + cookiePath).length + 1;
-
- // per http://www.ietf.org/rfc/rfc2109.txt browser must allow at minimum:
- // - 300 cookies
- // - 20 cookies per unique domain
- // - 4096 bytes per cookie
- if (cookieLength > 4096) {
- $log.warn("Cookie '"+ name +
- "' possibly not set or overflowed because it was too large ("+
- cookieLength + " > 4096 bytes)!");
- }
- }
- }
- } else {
- if (rawDocument.cookie !== lastCookieString) {
- lastCookieString = rawDocument.cookie;
- cookieArray = lastCookieString.split("; ");
- lastCookies = {};
-
- for (i = 0; i < cookieArray.length; i++) {
- cookie = cookieArray[i];
- index = cookie.indexOf('=');
- if (index > 0) { //ignore nameless cookies
- name = unescape(cookie.substring(0, index));
- // the first value that is seen for a cookie is the most
- // specific one. values for the same cookie name that
- // follow are for less specific paths.
- if (lastCookies[name] === undefined) {
- lastCookies[name] = unescape(cookie.substring(index + 1));
- }
- }
- }
- }
- return lastCookies;
- }
- };
-
-
- /**
- * @name $browser#defer
- * @param {function()} fn A function, who's execution should be deferred.
- * @param {number=} [delay=0] of milliseconds to defer the function execution.
- * @returns {*} DeferId that can be used to cancel the task via `$browser.defer.cancel()`.
- *
- * @description
- * Executes a fn asynchronously via `setTimeout(fn, delay)`.
- *
- * Unlike when calling `setTimeout` directly, in test this function is mocked and instead of using
- * `setTimeout` in tests, the fns are queued in an array, which can be programmatically flushed
- * via `$browser.defer.flush()`.
- *
- */
- self.defer = function(fn, delay) {
- var timeoutId;
- outstandingRequestCount++;
- timeoutId = setTimeout(function() {
- delete pendingDeferIds[timeoutId];
- completeOutstandingRequest(fn);
- }, delay || 0);
- pendingDeferIds[timeoutId] = true;
- return timeoutId;
- };
-
-
- /**
- * @name $browser#defer.cancel
- *
- * @description
- * Cancels a deferred task identified with `deferId`.
- *
- * @param {*} deferId Token returned by the `$browser.defer` function.
- * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully
- * canceled.
- */
- self.defer.cancel = function(deferId) {
- if (pendingDeferIds[deferId]) {
- delete pendingDeferIds[deferId];
- clearTimeout(deferId);
- completeOutstandingRequest(noop);
- return true;
- }
- return false;
- };
-
-}
-
-function $BrowserProvider(){
- this.$get = ['$window', '$log', '$sniffer', '$document',
- function( $window, $log, $sniffer, $document){
- return new Browser($window, $document, $log, $sniffer);
- }];
-}
-
-/**
- * @ngdoc service
- * @name $cacheFactory
- *
- * @description
- * Factory that constructs {@link $cacheFactory.Cache Cache} objects and gives access to
- * them.
- *
- * ```js
- *
- * var cache = $cacheFactory('cacheId');
- * expect($cacheFactory.get('cacheId')).toBe(cache);
- * expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined();
- *
- * cache.put("key", "value");
- * cache.put("another key", "another value");
- *
- * // We've specified no options on creation
- * expect(cache.info()).toEqual({id: 'cacheId', size: 2});
- *
- * ```
- *
- *
- * @param {string} cacheId Name or id of the newly created cache.
- * @param {object=} options Options object that specifies the cache behavior. Properties:
- *
- * - `{number=}` `capacity` — turns the cache into LRU cache.
- *
- * @returns {object} Newly created cache object with the following set of methods:
- *
- * - `{object}` `info()` — Returns id, size, and options of cache.
- * - `{{*}}` `put({string} key, {*} value)` — Puts a new key-value pair into the cache and returns
- * it.
- * - `{{*}}` `get({string} key)` — Returns cached value for `key` or undefined for cache miss.
- * - `{void}` `remove({string} key)` — Removes a key-value pair from the cache.
- * - `{void}` `removeAll()` — Removes all cached values.
- * - `{void}` `destroy()` — Removes references to this cache from $cacheFactory.
- *
- * @example
- <example module="cacheExampleApp">
- <file name="index.html">
- <div ng-controller="CacheController">
- <input ng-model="newCacheKey" placeholder="Key">
- <input ng-model="newCacheValue" placeholder="Value">
- <button ng-click="put(newCacheKey, newCacheValue)">Cache</button>
-
- <p ng-if="keys.length">Cached Values</p>
- <div ng-repeat="key in keys">
- <span ng-bind="key"></span>
- <span>: </span>
- <b ng-bind="cache.get(key)"></b>
- </div>
-
- <p>Cache Info</p>
- <div ng-repeat="(key, value) in cache.info()">
- <span ng-bind="key"></span>
- <span>: </span>
- <b ng-bind="value"></b>
- </div>
- </div>
- </file>
- <file name="script.js">
- angular.module('cacheExampleApp', []).
- controller('CacheController', ['$scope', '$cacheFactory', function($scope, $cacheFactory) {
- $scope.keys = [];
- $scope.cache = $cacheFactory('cacheId');
- $scope.put = function(key, value) {
- if ($scope.cache.get(key) === undefined) {
- $scope.keys.push(key);
- }
- $scope.cache.put(key, value === undefined ? null : value);
- };
- }]);
- </file>
- <file name="style.css">
- p {
- margin: 10px 0 3px;
- }
- </file>
- </example>
- */
-function $CacheFactoryProvider() {
-
- this.$get = function() {
- var caches = {};
-
- function cacheFactory(cacheId, options) {
- if (cacheId in caches) {
- throw minErr('$cacheFactory')('iid', "CacheId '{0}' is already taken!", cacheId);
- }
-
- var size = 0,
- stats = extend({}, options, {id: cacheId}),
- data = {},
- capacity = (options && options.capacity) || Number.MAX_VALUE,
- lruHash = {},
- freshEnd = null,
- staleEnd = null;
-
- /**
- * @ngdoc type
- * @name $cacheFactory.Cache
- *
- * @description
- * A cache object used to store and retrieve data, primarily used by
- * {@link $http $http} and the {@link ng.directive:script script} directive to cache
- * templates and other data.
- *
- * ```js
- * angular.module('superCache')
- * .factory('superCache', ['$cacheFactory', function($cacheFactory) {
- * return $cacheFactory('super-cache');
- * }]);
- * ```
- *
- * Example test:
- *
- * ```js
- * it('should behave like a cache', inject(function(superCache) {
- * superCache.put('key', 'value');
- * superCache.put('another key', 'another value');
- *
- * expect(superCache.info()).toEqual({
- * id: 'super-cache',
- * size: 2
- * });
- *
- * superCache.remove('another key');
- * expect(superCache.get('another key')).toBeUndefined();
- *
- * superCache.removeAll();
- * expect(superCache.info()).toEqual({
- * id: 'super-cache',
- * size: 0
- * });
- * }));
- * ```
- */
- return caches[cacheId] = {
-
- /**
- * @ngdoc method
- * @name $cacheFactory.Cache#put
- * @kind function
- *
- * @description
- * Inserts a named entry into the {@link $cacheFactory.Cache Cache} object to be
- * retrieved later, and incrementing the size of the cache if the key was not already
- * present in the cache. If behaving like an LRU cache, it will also remove stale
- * entries from the set.
- *
- * It will not insert undefined values into the cache.
- *
- * @param {string} key the key under which the cached data is stored.
- * @param {*} value the value to store alongside the key. If it is undefined, the key
- * will not be stored.
- * @returns {*} the value stored.
- */
- put: function(key, value) {
- if (capacity < Number.MAX_VALUE) {
- var lruEntry = lruHash[key] || (lruHash[key] = {key: key});
-
- refresh(lruEntry);
- }
-
- if (isUndefined(value)) return;
- if (!(key in data)) size++;
- data[key] = value;
-
- if (size > capacity) {
- this.remove(staleEnd.key);
- }
-
- return value;
- },
-
- /**
- * @ngdoc method
- * @name $cacheFactory.Cache#get
- * @kind function
- *
- * @description
- * Retrieves named data stored in the {@link $cacheFactory.Cache Cache} object.
- *
- * @param {string} key the key of the data to be retrieved
- * @returns {*} the value stored.
- */
- get: function(key) {
- if (capacity < Number.MAX_VALUE) {
- var lruEntry = lruHash[key];
-
- if (!lruEntry) return;
-
- refresh(lruEntry);
- }
-
- return data[key];
- },
-
-
- /**
- * @ngdoc method
- * @name $cacheFactory.Cache#remove
- * @kind function
- *
- * @description
- * Removes an entry from the {@link $cacheFactory.Cache Cache} object.
- *
- * @param {string} key the key of the entry to be removed
- */
- remove: function(key) {
- if (capacity < Number.MAX_VALUE) {
- var lruEntry = lruHash[key];
-
- if (!lruEntry) return;
-
- if (lruEntry == freshEnd) freshEnd = lruEntry.p;
- if (lruEntry == staleEnd) staleEnd = lruEntry.n;
- link(lruEntry.n,lruEntry.p);
-
- delete lruHash[key];
- }
-
- delete data[key];
- size--;
- },
-
-
- /**
- * @ngdoc method
- * @name $cacheFactory.Cache#removeAll
- * @kind function
- *
- * @description
- * Clears the cache object of any entries.
- */
- removeAll: function() {
- data = {};
- size = 0;
- lruHash = {};
- freshEnd = staleEnd = null;
- },
-
-
- /**
- * @ngdoc method
- * @name $cacheFactory.Cache#destroy
- * @kind function
- *
- * @description
- * Destroys the {@link $cacheFactory.Cache Cache} object entirely,
- * removing it from the {@link $cacheFactory $cacheFactory} set.
- */
- destroy: function() {
- data = null;
- stats = null;
- lruHash = null;
- delete caches[cacheId];
- },
-
-
- /**
- * @ngdoc method
- * @name $cacheFactory.Cache#info
- * @kind function
- *
- * @description
- * Retrieve information regarding a particular {@link $cacheFactory.Cache Cache}.
- *
- * @returns {object} an object with the following properties:
- * <ul>
- * <li>**id**: the id of the cache instance</li>
- * <li>**size**: the number of entries kept in the cache instance</li>
- * <li>**...**: any additional properties from the options object when creating the
- * cache.</li>
- * </ul>
- */
- info: function() {
- return extend({}, stats, {size: size});
- }
- };
-
-
- /**
- * makes the `entry` the freshEnd of the LRU linked list
- */
- function refresh(entry) {
- if (entry != freshEnd) {
- if (!staleEnd) {
- staleEnd = entry;
- } else if (staleEnd == entry) {
- staleEnd = entry.n;
- }
-
- link(entry.n, entry.p);
- link(entry, freshEnd);
- freshEnd = entry;
- freshEnd.n = null;
- }
- }
-
-
- /**
- * bidirectionally links two entries of the LRU linked list
- */
- function link(nextEntry, prevEntry) {
- if (nextEntry != prevEntry) {
- if (nextEntry) nextEntry.p = prevEntry; //p stands for previous, 'prev' didn't minify
- if (prevEntry) prevEntry.n = nextEntry; //n stands for next, 'next' didn't minify
- }
- }
- }
-
-
- /**
- * @ngdoc method
- * @name $cacheFactory#info
- *
- * @description
- * Get information about all the caches that have been created
- *
- * @returns {Object} - key-value map of `cacheId` to the result of calling `cache#info`
- */
- cacheFactory.info = function() {
- var info = {};
- forEach(caches, function(cache, cacheId) {
- info[cacheId] = cache.info();
- });
- return info;
- };
-
-
- /**
- * @ngdoc method
- * @name $cacheFactory#get
- *
- * @description
- * Get access to a cache object by the `cacheId` used when it was created.
- *
- * @param {string} cacheId Name or id of a cache to access.
- * @returns {object} Cache object identified by the cacheId or undefined if no such cache.
- */
- cacheFactory.get = function(cacheId) {
- return caches[cacheId];
- };
-
-
- return cacheFactory;
- };
-}
-
-/**
- * @ngdoc service
- * @name $templateCache
- *
- * @description
- * The first time a template is used, it is loaded in the template cache for quick retrieval. You
- * can load templates directly into the cache in a `script` tag, or by consuming the
- * `$templateCache` service directly.
- *
- * Adding via the `script` tag:
- *
- * ```html
- * <script type="text/ng-template" id="templateId.html">
- * <p>This is the content of the template</p>
- * </script>
- * ```
- *
- * **Note:** the `script` tag containing the template does not need to be included in the `head` of
- * the document, but it must be below the `ng-app` definition.
- *
- * Adding via the $templateCache service:
- *
- * ```js
- * var myApp = angular.module('myApp', []);
- * myApp.run(function($templateCache) {
- * $templateCache.put('templateId.html', 'This is the content of the template');
- * });
- * ```
- *
- * To retrieve the template later, simply use it in your HTML:
- * ```html
- * <div ng-include=" 'templateId.html' "></div>
- * ```
- *
- * or get it via Javascript:
- * ```js
- * $templateCache.get('templateId.html')
- * ```
- *
- * See {@link ng.$cacheFactory $cacheFactory}.
- *
- */
-function $TemplateCacheProvider() {
- this.$get = ['$cacheFactory', function($cacheFactory) {
- return $cacheFactory('templates');
- }];
-}
-
-/* ! VARIABLE/FUNCTION NAMING CONVENTIONS THAT APPLY TO THIS FILE!
- *
- * DOM-related variables:
- *
- * - "node" - DOM Node
- * - "element" - DOM Element or Node
- * - "$node" or "$element" - jqLite-wrapped node or element
- *
- *
- * Compiler related stuff:
- *
- * - "linkFn" - linking fn of a single directive
- * - "nodeLinkFn" - function that aggregates all linking fns for a particular node
- * - "childLinkFn" - function that aggregates all linking fns for child nodes of a particular node
- * - "compositeLinkFn" - function that aggregates all linking fns for a compilation root (nodeList)
- */
-
-
-/**
- * @ngdoc service
- * @name $compile
- * @kind function
- *
- * @description
- * Compiles an HTML string or DOM into a template and produces a template function, which
- * can then be used to link {@link ng.$rootScope.Scope `scope`} and the template together.
- *
- * The compilation is a process of walking the DOM tree and matching DOM elements to
- * {@link ng.$compileProvider#directive directives}.
- *
- * <div class="alert alert-warning">
- * **Note:** This document is an in-depth reference of all directive options.
- * For a gentle introduction to directives with examples of common use cases,
- * see the {@link guide/directive directive guide}.
- * </div>
- *
- * ## Comprehensive Directive API
- *
- * There are many different options for a directive.
- *
- * The difference resides in the return value of the factory function.
- * You can either return a "Directive Definition Object" (see below) that defines the directive properties,
- * or just the `postLink` function (all other properties will have the default values).
- *
- * <div class="alert alert-success">
- * **Best Practice:** It's recommended to use the "directive definition object" form.
- * </div>
- *
- * Here's an example directive declared with a Directive Definition Object:
- *
- * ```js
- * var myModule = angular.module(...);
- *
- * myModule.directive('directiveName', function factory(injectables) {
- * var directiveDefinitionObject = {
- * priority: 0,
- * template: '<div></div>', // or // function(tElement, tAttrs) { ... },
- * // or
- * // templateUrl: 'directive.html', // or // function(tElement, tAttrs) { ... },
- * transclude: false,
- * restrict: 'A',
- * scope: false,
- * controller: function($scope, $element, $attrs, $transclude, otherInjectables) { ... },
- * controllerAs: 'stringAlias',
- * require: 'siblingDirectiveName', // or // ['^parentDirectiveName', '?optionalDirectiveName', '?^optionalParent'],
- * compile: function compile(tElement, tAttrs, transclude) {
- * return {
- * pre: function preLink(scope, iElement, iAttrs, controller) { ... },
- * post: function postLink(scope, iElement, iAttrs, controller) { ... }
- * }
- * // or
- * // return function postLink( ... ) { ... }
- * },
- * // or
- * // link: {
- * // pre: function preLink(scope, iElement, iAttrs, controller) { ... },
- * // post: function postLink(scope, iElement, iAttrs, controller) { ... }
- * // }
- * // or
- * // link: function postLink( ... ) { ... }
- * };
- * return directiveDefinitionObject;
- * });
- * ```
- *
- * <div class="alert alert-warning">
- * **Note:** Any unspecified options will use the default value. You can see the default values below.
- * </div>
- *
- * Therefore the above can be simplified as:
- *
- * ```js
- * var myModule = angular.module(...);
- *
- * myModule.directive('directiveName', function factory(injectables) {
- * var directiveDefinitionObject = {
- * link: function postLink(scope, iElement, iAttrs) { ... }
- * };
- * return directiveDefinitionObject;
- * // or
- * // return function postLink(scope, iElement, iAttrs) { ... }
- * });
- * ```
- *
- *
- *
- * ### Directive Definition Object
- *
- * The directive definition object provides instructions to the {@link ng.$compile
- * compiler}. The attributes are:
- *
- * #### `priority`
- * When there are multiple directives defined on a single DOM element, sometimes it
- * is necessary to specify the order in which the directives are applied. The `priority` is used
- * to sort the directives before their `compile` functions get called. Priority is defined as a
- * number. Directives with greater numerical `priority` are compiled first. Pre-link functions
- * are also run in priority order, but post-link functions are run in reverse order. The order
- * of directives with the same priority is undefined. The default priority is `0`.
- *
- * #### `terminal`
- * If set to true then the current `priority` will be the last set of directives
- * which will execute (any directives at the current priority will still execute
- * as the order of execution on same `priority` is undefined).
- *
- * #### `scope`
- * **If set to `true`,** then a new scope will be created for this directive. If multiple directives on the
- * same element request a new scope, only one new scope is created. The new scope rule does not
- * apply for the root of the template since the root of the template always gets a new scope.
- *
- * **If set to `{}` (object hash),** then a new "isolate" scope is created. The 'isolate' scope differs from
- * normal scope in that it does not prototypically inherit from the parent scope. This is useful
- * when creating reusable components, which should not accidentally read or modify data in the
- * parent scope.
- *
- * The 'isolate' scope takes an object hash which defines a set of local scope properties
- * derived from the parent scope. These local properties are useful for aliasing values for
- * templates. Locals definition is a hash of local scope property to its source:
- *
- * * `@` or `@attr` - bind a local scope property to the value of DOM attribute. The result is
- * always a string since DOM attributes are strings. If no `attr` name is specified then the
- * attribute name is assumed to be the same as the local name.
- * Given `<widget my-attr="hello {{name}}">` and widget definition
- * of `scope: { localName:'@myAttr' }`, then widget scope property `localName` will reflect
- * the interpolated value of `hello {{name}}`. As the `name` attribute changes so will the
- * `localName` property on the widget scope. The `name` is read from the parent scope (not
- * component scope).
- *
- * * `=` or `=attr` - set up bi-directional binding between a local scope property and the
- * parent scope property of name defined via the value of the `attr` attribute. If no `attr`
- * name is specified then the attribute name is assumed to be the same as the local name.
- * Given `<widget my-attr="parentModel">` and widget definition of
- * `scope: { localModel:'=myAttr' }`, then widget scope property `localModel` will reflect the
- * value of `parentModel` on the parent scope. Any changes to `parentModel` will be reflected
- * in `localModel` and any changes in `localModel` will reflect in `parentModel`. If the parent
- * scope property doesn't exist, it will throw a NON_ASSIGNABLE_MODEL_EXPRESSION exception. You
- * can avoid this behavior using `=?` or `=?attr` in order to flag the property as optional.
- *
- * * `&` or `&attr` - provides a way to execute an expression in the context of the parent scope.
- * If no `attr` name is specified then the attribute name is assumed to be the same as the
- * local name. Given `<widget my-attr="count = count + value">` and widget definition of
- * `scope: { localFn:'&myAttr' }`, then isolate scope property `localFn` will point to
- * a function wrapper for the `count = count + value` expression. Often it's desirable to
- * pass data from the isolated scope via an expression to the parent scope, this can be
- * done by passing a map of local variable names and values into the expression wrapper fn.
- * For example, if the expression is `increment(amount)` then we can specify the amount value
- * by calling the `localFn` as `localFn({amount: 22})`.
- *
- *
- *
- * #### `controller`
- * Controller constructor function. The controller is instantiated before the
- * pre-linking phase and it is shared with other directives (see
- * `require` attribute). This allows the directives to communicate with each other and augment
- * each other's behavior. The controller is injectable (and supports bracket notation) with the following locals:
- *
- * * `$scope` - Current scope associated with the element
- * * `$element` - Current element
- * * `$attrs` - Current attributes object for the element
- * * `$transclude` - A transclude linking function pre-bound to the correct transclusion scope.
- * The scope can be overridden by an optional first argument.
- * `function([scope], cloneLinkingFn)`.
- *
- *
- * #### `require`
- * Require another directive and inject its controller as the fourth argument to the linking function. The
- * `require` takes a string name (or array of strings) of the directive(s) to pass in. If an array is used, the
- * injected argument will be an array in corresponding order. If no such directive can be
- * found, or if the directive does not have a controller, then an error is raised. The name can be prefixed with:
- *
- * * (no prefix) - Locate the required controller on the current element. Throw an error if not found.
- * * `?` - Attempt to locate the required controller or pass `null` to the `link` fn if not found.
- * * `^` - Locate the required controller by searching the element and its parents. Throw an error if not found.
- * * `?^` - Attempt to locate the required controller by searching the element and its parents or pass
- * `null` to the `link` fn if not found.
- *
- *
- * #### `controllerAs`
- * Controller alias at the directive scope. An alias for the controller so it
- * can be referenced at the directive template. The directive needs to define a scope for this
- * configuration to be used. Useful in the case when directive is used as component.
- *
- *
- * #### `restrict`
- * String of subset of `EACM` which restricts the directive to a specific directive
- * declaration style. If omitted, the default (attributes only) is used.
- *
- * * `E` - Element name: `<my-directive></my-directive>`
- * * `A` - Attribute (default): `<div my-directive="exp"></div>`
- * * `C` - Class: `<div class="my-directive: exp;"></div>`
- * * `M` - Comment: `<!-- directive: my-directive exp -->`
- *
- *
- * #### `template`
- * HTML markup that may:
- * * Replace the contents of the directive's element (default).
- * * Replace the directive's element itself (if `replace` is true - DEPRECATED).
- * * Wrap the contents of the directive's element (if `transclude` is true).
- *
- * Value may be:
- *
- * * A string. For example `<div red-on-hover>{{delete_str}}</div>`.
- * * A function which takes two arguments `tElement` and `tAttrs` (described in the `compile`
- * function api below) and returns a string value.
- *
- *
- * #### `templateUrl`
- * Same as `template` but the template is loaded from the specified URL. Because
- * the template loading is asynchronous the compilation/linking is suspended until the template
- * is loaded.
- *
- * You can specify `templateUrl` as a string representing the URL or as a function which takes two
- * arguments `tElement` and `tAttrs` (described in the `compile` function api below) and returns
- * a string value representing the url. In either case, the template URL is passed through {@link
- * api/ng.$sce#getTrustedResourceUrl $sce.getTrustedResourceUrl}.
- *
- *
- * #### `replace` ([*DEPRECATED*!], will be removed in next major release)
- * specify what the template should replace. Defaults to `false`.
- *
- * * `true` - the template will replace the directive's element.
- * * `false` - the template will replace the contents of the directive's element.
- *
- * The replacement process migrates all of the attributes / classes from the old element to the new
- * one. See the {@link guide/directive#creating-custom-directives_creating-directives_template-expanding-directive
- * Directives Guide} for an example.
- *
- * #### `transclude`
- * compile the content of the element and make it available to the directive.
- * Typically used with {@link ng.directive:ngTransclude
- * ngTransclude}. The advantage of transclusion is that the linking function receives a
- * transclusion function which is pre-bound to the correct scope. In a typical setup the widget
- * creates an `isolate` scope, but the transclusion is not a child, but a sibling of the `isolate`
- * scope. This makes it possible for the widget to have private state, and the transclusion to
- * be bound to the parent (pre-`isolate`) scope.
- *
- * * `true` - transclude the content of the directive.
- * * `'element'` - transclude the whole element including any directives defined at lower priority.
- *
- * <div class="alert alert-warning">
- * **Note:** When testing an element transclude directive you must not place the directive at the root of the
- * DOM fragment that is being compiled. See {@link guide/unit-testing#testing-transclusion-directives
- * Testing Transclusion Directives}.
- * </div>
- *
- * #### `compile`
- *
- * ```js
- * function compile(tElement, tAttrs, transclude) { ... }
- * ```
- *
- * The compile function deals with transforming the template DOM. Since most directives do not do
- * template transformation, it is not used often. The compile function takes the following arguments:
- *
- * * `tElement` - template element - The element where the directive has been declared. It is
- * safe to do template transformation on the element and child elements only.
- *
- * * `tAttrs` - template attributes - Normalized list of attributes declared on this element shared
- * between all directive compile functions.
- *
- * * `transclude` - [*DEPRECATED*!] A transclude linking function: `function(scope, cloneLinkingFn)`
- *
- * <div class="alert alert-warning">
- * **Note:** The template instance and the link instance may be different objects if the template has
- * been cloned. For this reason it is **not** safe to do anything other than DOM transformations that
- * apply to all cloned DOM nodes within the compile function. Specifically, DOM listener registration
- * should be done in a linking function rather than in a compile function.
- * </div>
-
- * <div class="alert alert-warning">
- * **Note:** The compile function cannot handle directives that recursively use themselves in their
- * own templates or compile functions. Compiling these directives results in an infinite loop and a
- * stack overflow errors.
- *
- * This can be avoided by manually using $compile in the postLink function to imperatively compile
- * a directive's template instead of relying on automatic template compilation via `template` or
- * `templateUrl` declaration or manual compilation inside the compile function.
- * </div>
- *
- * <div class="alert alert-error">
- * **Note:** The `transclude` function that is passed to the compile function is deprecated, as it
- * e.g. does not know about the right outer scope. Please use the transclude function that is passed
- * to the link function instead.
- * </div>
-
- * A compile function can have a return value which can be either a function or an object.
- *
- * * returning a (post-link) function - is equivalent to registering the linking function via the
- * `link` property of the config object when the compile function is empty.
- *
- * * returning an object with function(s) registered via `pre` and `post` properties - allows you to
- * control when a linking function should be called during the linking phase. See info about
- * pre-linking and post-linking functions below.
- *
- *
- * #### `link`
- * This property is used only if the `compile` property is not defined.
- *
- * ```js
- * function link(scope, iElement, iAttrs, controller, transcludeFn) { ... }
- * ```
- *
- * The link function is responsible for registering DOM listeners as well as updating the DOM. It is
- * executed after the template has been cloned. This is where most of the directive logic will be
- * put.
- *
- * * `scope` - {@link ng.$rootScope.Scope Scope} - The scope to be used by the
- * directive for registering {@link ng.$rootScope.Scope#$watch watches}.
- *
- * * `iElement` - instance element - The element where the directive is to be used. It is safe to
- * manipulate the children of the element only in `postLink` function since the children have
- * already been linked.
- *
- * * `iAttrs` - instance attributes - Normalized list of attributes declared on this element shared
- * between all directive linking functions.
- *
- * * `controller` - a controller instance - A controller instance if at least one directive on the
- * element defines a controller. The controller is shared among all the directives, which allows
- * the directives to use the controllers as a communication channel.
- *
- * * `transcludeFn` - A transclude linking function pre-bound to the correct transclusion scope.
- * The scope can be overridden by an optional first argument. This is the same as the `$transclude`
- * parameter of directive controllers.
- * `function([scope], cloneLinkingFn)`.
- *
- *
- * #### Pre-linking function
- *
- * Executed before the child elements are linked. Not safe to do DOM transformation since the
- * compiler linking function will fail to locate the correct elements for linking.
- *
- * #### Post-linking function
- *
- * Executed after the child elements are linked. It is safe to do DOM transformation in the post-linking function.
- *
- * <a name="Attributes"></a>
- * ### Attributes
- *
- * The {@link ng.$compile.directive.Attributes Attributes} object - passed as a parameter in the
- * `link()` or `compile()` functions. It has a variety of uses.
- *
- * accessing *Normalized attribute names:*
- * Directives like 'ngBind' can be expressed in many ways: 'ng:bind', `data-ng-bind`, or 'x-ng-bind'.
- * the attributes object allows for normalized access to
- * the attributes.
- *
- * * *Directive inter-communication:* All directives share the same instance of the attributes
- * object which allows the directives to use the attributes object as inter directive
- * communication.
- *
- * * *Supports interpolation:* Interpolation attributes are assigned to the attribute object
- * allowing other directives to read the interpolated value.
- *
- * * *Observing interpolated attributes:* Use `$observe` to observe the value changes of attributes
- * that contain interpolation (e.g. `src="{{bar}}"`). Not only is this very efficient but it's also
- * the only way to easily get the actual value because during the linking phase the interpolation
- * hasn't been evaluated yet and so the value is at this time set to `undefined`.
- *
- * ```js
- * function linkingFn(scope, elm, attrs, ctrl) {
- * // get the attribute value
- * console.log(attrs.ngModel);
- *
- * // change the attribute
- * attrs.$set('ngModel', 'new value');
- *
- * // observe changes to interpolated attribute
- * attrs.$observe('ngModel', function(value) {
- * console.log('ngModel has changed value to ' + value);
- * });
- * }
- * ```
- *
- * Below is an example using `$compileProvider`.
- *
- * <div class="alert alert-warning">
- * **Note**: Typically directives are registered with `module.directive`. The example below is
- * to illustrate how `$compile` works.
- * </div>
- *
- <example module="compileExample">
- <file name="index.html">
- <script>
- angular.module('compileExample', [], function($compileProvider) {
- // configure new 'compile' directive by passing a directive
- // factory function. The factory function injects the '$compile'
- $compileProvider.directive('compile', function($compile) {
- // directive factory creates a link function
- return function(scope, element, attrs) {
- scope.$watch(
- function(scope) {
- // watch the 'compile' expression for changes
- return scope.$eval(attrs.compile);
- },
- function(value) {
- // when the 'compile' expression changes
- // assign it into the current DOM
- element.html(value);
-
- // compile the new DOM and link it to the current
- // scope.
- // NOTE: we only compile .childNodes so that
- // we don't get into infinite loop compiling ourselves
- $compile(element.contents())(scope);
- }
- );
- };
- });
- })
- .controller('GreeterController', ['$scope', function($scope) {
- $scope.name = 'Angular';
- $scope.html = 'Hello {{name}}';
- }]);
- </script>
- <div ng-controller="GreeterController">
- <input ng-model="name"> <br>
- <textarea ng-model="html"></textarea> <br>
- <div compile="html"></div>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should auto compile', function() {
- var textarea = $('textarea');
- var output = $('div[compile]');
- // The initial state reads 'Hello Angular'.
- expect(output.getText()).toBe('Hello Angular');
- textarea.clear();
- textarea.sendKeys('{{name}}!');
- expect(output.getText()).toBe('Angular!');
- });
- </file>
- </example>
-
- *
- *
- * @param {string|DOMElement} element Element or HTML string to compile into a template function.
- * @param {function(angular.Scope, cloneAttachFn=)} transclude function available to directives.
- * @param {number} maxPriority only apply directives lower than given priority (Only effects the
- * root element(s), not their children)
- * @returns {function(scope, cloneAttachFn=)} a link function which is used to bind template
- * (a DOM element/tree) to a scope. Where:
- *
- * * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to.
- * * `cloneAttachFn` - If `cloneAttachFn` is provided, then the link function will clone the
- * `template` and call the `cloneAttachFn` function allowing the caller to attach the
- * cloned elements to the DOM document at the appropriate place. The `cloneAttachFn` is
- * called as: <br> `cloneAttachFn(clonedElement, scope)` where:
- *
- * * `clonedElement` - is a clone of the original `element` passed into the compiler.
- * * `scope` - is the current scope with which the linking function is working with.
- *
- * Calling the linking function returns the element of the template. It is either the original
- * element passed in, or the clone of the element if the `cloneAttachFn` is provided.
- *
- * After linking the view is not updated until after a call to $digest which typically is done by
- * Angular automatically.
- *
- * If you need access to the bound view, there are two ways to do it:
- *
- * - If you are not asking the linking function to clone the template, create the DOM element(s)
- * before you send them to the compiler and keep this reference around.
- * ```js
- * var element = $compile('<p>{{total}}</p>')(scope);
- * ```
- *
- * - if on the other hand, you need the element to be cloned, the view reference from the original
- * example would not point to the clone, but rather to the original template that was cloned. In
- * this case, you can access the clone via the cloneAttachFn:
- * ```js
- * var templateElement = angular.element('<p>{{total}}</p>'),
- * scope = ....;
- *
- * var clonedElement = $compile(templateElement)(scope, function(clonedElement, scope) {
- * //attach the clone to DOM document at the right place
- * });
- *
- * //now we have reference to the cloned DOM via `clonedElement`
- * ```
- *
- *
- * For information on how the compiler works, see the
- * {@link guide/compiler Angular HTML Compiler} section of the Developer Guide.
- */
-
-var $compileMinErr = minErr('$compile');
-
-/**
- * @ngdoc provider
- * @name $compileProvider
- * @kind function
- *
- * @description
- */
-$CompileProvider.$inject = ['$provide', '$$sanitizeUriProvider'];
-function $CompileProvider($provide, $$sanitizeUriProvider) {
- var hasDirectives = {},
- Suffix = 'Directive',
- COMMENT_DIRECTIVE_REGEXP = /^\s*directive\:\s*([\d\w_\-]+)\s+(.*)$/,
- CLASS_DIRECTIVE_REGEXP = /(([\d\w_\-]+)(?:\:([^;]+))?;?)/;
-
- // Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes
- // The assumption is that future DOM event attribute names will begin with
- // 'on' and be composed of only English letters.
- var EVENT_HANDLER_ATTR_REGEXP = /^(on[a-z]+|formaction)$/;
-
- /**
- * @ngdoc method
- * @name $compileProvider#directive
- * @kind function
- *
- * @description
- * Register a new directive with the compiler.
- *
- * @param {string|Object} name Name of the directive in camel-case (i.e. <code>ngBind</code> which
- * will match as <code>ng-bind</code>), or an object map of directives where the keys are the
- * names and the values are the factories.
- * @param {Function|Array} directiveFactory An injectable directive factory function. See
- * {@link guide/directive} for more info.
- * @returns {ng.$compileProvider} Self for chaining.
- */
- this.directive = function registerDirective(name, directiveFactory) {
- assertNotHasOwnProperty(name, 'directive');
- if (isString(name)) {
- assertArg(directiveFactory, 'directiveFactory');
- if (!hasDirectives.hasOwnProperty(name)) {
- hasDirectives[name] = [];
- $provide.factory(name + Suffix, ['$injector', '$exceptionHandler',
- function($injector, $exceptionHandler) {
- var directives = [];
- forEach(hasDirectives[name], function(directiveFactory, index) {
- try {
- var directive = $injector.invoke(directiveFactory);
- if (isFunction(directive)) {
- directive = { compile: valueFn(directive) };
- } else if (!directive.compile && directive.link) {
- directive.compile = valueFn(directive.link);
- }
- directive.priority = directive.priority || 0;
- directive.index = index;
- directive.name = directive.name || name;
- directive.require = directive.require || (directive.controller && directive.name);
- directive.restrict = directive.restrict || 'A';
- directives.push(directive);
- } catch (e) {
- $exceptionHandler(e);
- }
- });
- return directives;
- }]);
- }
- hasDirectives[name].push(directiveFactory);
- } else {
- forEach(name, reverseParams(registerDirective));
- }
- return this;
- };
-
-
- /**
- * @ngdoc method
- * @name $compileProvider#aHrefSanitizationWhitelist
- * @kind function
- *
- * @description
- * Retrieves or overrides the default regular expression that is used for whitelisting of safe
- * urls during a[href] sanitization.
- *
- * The sanitization is a security measure aimed at prevent XSS attacks via html links.
- *
- * Any url about to be assigned to a[href] via data-binding is first normalized and turned into
- * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist`
- * regular expression. If a match is found, the original url is written into the dom. Otherwise,
- * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
- *
- * @param {RegExp=} regexp New regexp to whitelist urls with.
- * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for
- * chaining otherwise.
- */
- this.aHrefSanitizationWhitelist = function(regexp) {
- if (isDefined(regexp)) {
- $$sanitizeUriProvider.aHrefSanitizationWhitelist(regexp);
- return this;
- } else {
- return $$sanitizeUriProvider.aHrefSanitizationWhitelist();
- }
- };
-
-
- /**
- * @ngdoc method
- * @name $compileProvider#imgSrcSanitizationWhitelist
- * @kind function
- *
- * @description
- * Retrieves or overrides the default regular expression that is used for whitelisting of safe
- * urls during img[src] sanitization.
- *
- * The sanitization is a security measure aimed at prevent XSS attacks via html links.
- *
- * Any url about to be assigned to img[src] via data-binding is first normalized and turned into
- * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist`
- * regular expression. If a match is found, the original url is written into the dom. Otherwise,
- * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
- *
- * @param {RegExp=} regexp New regexp to whitelist urls with.
- * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for
- * chaining otherwise.
- */
- this.imgSrcSanitizationWhitelist = function(regexp) {
- if (isDefined(regexp)) {
- $$sanitizeUriProvider.imgSrcSanitizationWhitelist(regexp);
- return this;
- } else {
- return $$sanitizeUriProvider.imgSrcSanitizationWhitelist();
- }
- };
-
- this.$get = [
- '$injector', '$interpolate', '$exceptionHandler', '$http', '$templateCache', '$parse',
- '$controller', '$rootScope', '$document', '$sce', '$animate', '$$sanitizeUri',
- function($injector, $interpolate, $exceptionHandler, $http, $templateCache, $parse,
- $controller, $rootScope, $document, $sce, $animate, $$sanitizeUri) {
-
- var Attributes = function(element, attr) {
- this.$$element = element;
- this.$attr = attr || {};
- };
-
- Attributes.prototype = {
- $normalize: directiveNormalize,
-
-
- /**
- * @ngdoc method
- * @name $compile.directive.Attributes#$addClass
- * @kind function
- *
- * @description
- * Adds the CSS class value specified by the classVal parameter to the element. If animations
- * are enabled then an animation will be triggered for the class addition.
- *
- * @param {string} classVal The className value that will be added to the element
- */
- $addClass : function(classVal) {
- if(classVal && classVal.length > 0) {
- $animate.addClass(this.$$element, classVal);
- }
- },
-
- /**
- * @ngdoc method
- * @name $compile.directive.Attributes#$removeClass
- * @kind function
- *
- * @description
- * Removes the CSS class value specified by the classVal parameter from the element. If
- * animations are enabled then an animation will be triggered for the class removal.
- *
- * @param {string} classVal The className value that will be removed from the element
- */
- $removeClass : function(classVal) {
- if(classVal && classVal.length > 0) {
- $animate.removeClass(this.$$element, classVal);
- }
- },
-
- /**
- * @ngdoc method
- * @name $compile.directive.Attributes#$updateClass
- * @kind function
- *
- * @description
- * Adds and removes the appropriate CSS class values to the element based on the difference
- * between the new and old CSS class values (specified as newClasses and oldClasses).
- *
- * @param {string} newClasses The current CSS className value
- * @param {string} oldClasses The former CSS className value
- */
- $updateClass : function(newClasses, oldClasses) {
- var toAdd = tokenDifference(newClasses, oldClasses);
- var toRemove = tokenDifference(oldClasses, newClasses);
-
- if(toAdd.length === 0) {
- $animate.removeClass(this.$$element, toRemove);
- } else if(toRemove.length === 0) {
- $animate.addClass(this.$$element, toAdd);
- } else {
- $animate.setClass(this.$$element, toAdd, toRemove);
- }
- },
-
- /**
- * Set a normalized attribute on the element in a way such that all directives
- * can share the attribute. This function properly handles boolean attributes.
- * @param {string} key Normalized key. (ie ngAttribute)
- * @param {string|boolean} value The value to set. If `null` attribute will be deleted.
- * @param {boolean=} writeAttr If false, does not write the value to DOM element attribute.
- * Defaults to true.
- * @param {string=} attrName Optional none normalized name. Defaults to key.
- */
- $set: function(key, value, writeAttr, attrName) {
- // TODO: decide whether or not to throw an error if "class"
- //is set through this function since it may cause $updateClass to
- //become unstable.
-
- var booleanKey = getBooleanAttrName(this.$$element[0], key),
- normalizedVal,
- nodeName;
-
- if (booleanKey) {
- this.$$element.prop(key, value);
- attrName = booleanKey;
- }
-
- this[key] = value;
-
- // translate normalized key to actual key
- if (attrName) {
- this.$attr[key] = attrName;
- } else {
- attrName = this.$attr[key];
- if (!attrName) {
- this.$attr[key] = attrName = snake_case(key, '-');
- }
- }
-
- nodeName = nodeName_(this.$$element);
-
- // sanitize a[href] and img[src] values
- if ((nodeName === 'A' && key === 'href') ||
- (nodeName === 'IMG' && key === 'src')) {
- this[key] = value = $$sanitizeUri(value, key === 'src');
- }
-
- if (writeAttr !== false) {
- if (value === null || value === undefined) {
- this.$$element.removeAttr(attrName);
- } else {
- this.$$element.attr(attrName, value);
- }
- }
-
- // fire observers
- var $$observers = this.$$observers;
- $$observers && forEach($$observers[key], function(fn) {
- try {
- fn(value);
- } catch (e) {
- $exceptionHandler(e);
- }
- });
- },
-
-
- /**
- * @ngdoc method
- * @name $compile.directive.Attributes#$observe
- * @kind function
- *
- * @description
- * Observes an interpolated attribute.
- *
- * The observer function will be invoked once during the next `$digest` following
- * compilation. The observer is then invoked whenever the interpolated value
- * changes.
- *
- * @param {string} key Normalized key. (ie ngAttribute) .
- * @param {function(interpolatedValue)} fn Function that will be called whenever
- the interpolated value of the attribute changes.
- * See the {@link guide/directive#Attributes Directives} guide for more info.
- * @returns {function()} the `fn` parameter.
- */
- $observe: function(key, fn) {
- var attrs = this,
- $$observers = (attrs.$$observers || (attrs.$$observers = {})),
- listeners = ($$observers[key] || ($$observers[key] = []));
-
- listeners.push(fn);
- $rootScope.$evalAsync(function() {
- if (!listeners.$$inter) {
- // no one registered attribute interpolation function, so lets call it manually
- fn(attrs[key]);
- }
- });
- return fn;
- }
- };
-
- var startSymbol = $interpolate.startSymbol(),
- endSymbol = $interpolate.endSymbol(),
- denormalizeTemplate = (startSymbol == '{{' || endSymbol == '}}')
- ? identity
- : function denormalizeTemplate(template) {
- return template.replace(/\{\{/g, startSymbol).replace(/}}/g, endSymbol);
- },
- NG_ATTR_BINDING = /^ngAttr[A-Z]/;
-
-
- return compile;
-
- //================================
-
- function compile($compileNodes, transcludeFn, maxPriority, ignoreDirective,
- previousCompileContext) {
- if (!($compileNodes instanceof jqLite)) {
- // jquery always rewraps, whereas we need to preserve the original selector so that we can
- // modify it.
- $compileNodes = jqLite($compileNodes);
- }
- // We can not compile top level text elements since text nodes can be merged and we will
- // not be able to attach scope data to them, so we will wrap them in <span>
- forEach($compileNodes, function(node, index){
- if (node.nodeType == 3 /* text node */ && node.nodeValue.match(/\S+/) /* non-empty */ ) {
- $compileNodes[index] = node = jqLite(node).wrap('<span></span>').parent()[0];
- }
- });
- var compositeLinkFn =
- compileNodes($compileNodes, transcludeFn, $compileNodes,
- maxPriority, ignoreDirective, previousCompileContext);
- safeAddClass($compileNodes, 'ng-scope');
- return function publicLinkFn(scope, cloneConnectFn, transcludeControllers, parentBoundTranscludeFn){
- assertArg(scope, 'scope');
- // important!!: we must call our jqLite.clone() since the jQuery one is trying to be smart
- // and sometimes changes the structure of the DOM.
- var $linkNode = cloneConnectFn
- ? JQLitePrototype.clone.call($compileNodes) // IMPORTANT!!!
- : $compileNodes;
-
- forEach(transcludeControllers, function(instance, name) {
- $linkNode.data('$' + name + 'Controller', instance);
- });
-
- // Attach scope only to non-text nodes.
- for(var i = 0, ii = $linkNode.length; i<ii; i++) {
- var node = $linkNode[i],
- nodeType = node.nodeType;
- if (nodeType === 1 /* element */ || nodeType === 9 /* document */) {
- $linkNode.eq(i).data('$scope', scope);
- }
- }
-
- if (cloneConnectFn) cloneConnectFn($linkNode, scope);
- if (compositeLinkFn) compositeLinkFn(scope, $linkNode, $linkNode, parentBoundTranscludeFn);
- return $linkNode;
- };
- }
-
- function safeAddClass($element, className) {
- try {
- $element.addClass(className);
- } catch(e) {
- // ignore, since it means that we are trying to set class on
- // SVG element, where class name is read-only.
- }
- }
-
- /**
- * Compile function matches each node in nodeList against the directives. Once all directives
- * for a particular node are collected their compile functions are executed. The compile
- * functions return values - the linking functions - are combined into a composite linking
- * function, which is the a linking function for the node.
- *
- * @param {NodeList} nodeList an array of nodes or NodeList to compile
- * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the
- * scope argument is auto-generated to the new child of the transcluded parent scope.
- * @param {DOMElement=} $rootElement If the nodeList is the root of the compilation tree then
- * the rootElement must be set the jqLite collection of the compile root. This is
- * needed so that the jqLite collection items can be replaced with widgets.
- * @param {number=} maxPriority Max directive priority.
- * @returns {Function} A composite linking function of all of the matched directives or null.
- */
- function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority, ignoreDirective,
- previousCompileContext) {
- var linkFns = [],
- attrs, directives, nodeLinkFn, childNodes, childLinkFn, linkFnFound;
-
- for (var i = 0; i < nodeList.length; i++) {
- attrs = new Attributes();
-
- // we must always refer to nodeList[i] since the nodes can be replaced underneath us.
- directives = collectDirectives(nodeList[i], [], attrs, i === 0 ? maxPriority : undefined,
- ignoreDirective);
-
- nodeLinkFn = (directives.length)
- ? applyDirectivesToNode(directives, nodeList[i], attrs, transcludeFn, $rootElement,
- null, [], [], previousCompileContext)
- : null;
-
- if (nodeLinkFn && nodeLinkFn.scope) {
- safeAddClass(attrs.$$element, 'ng-scope');
- }
-
- childLinkFn = (nodeLinkFn && nodeLinkFn.terminal ||
- !(childNodes = nodeList[i].childNodes) ||
- !childNodes.length)
- ? null
- : compileNodes(childNodes,
- nodeLinkFn ? (
- (nodeLinkFn.transcludeOnThisElement || !nodeLinkFn.templateOnThisElement)
- && nodeLinkFn.transclude) : transcludeFn);
-
- linkFns.push(nodeLinkFn, childLinkFn);
- linkFnFound = linkFnFound || nodeLinkFn || childLinkFn;
- //use the previous context only for the first element in the virtual group
- previousCompileContext = null;
- }
-
- // return a linking function if we have found anything, null otherwise
- return linkFnFound ? compositeLinkFn : null;
-
- function compositeLinkFn(scope, nodeList, $rootElement, parentBoundTranscludeFn) {
- var nodeLinkFn, childLinkFn, node, childScope, i, ii, n, childBoundTranscludeFn;
-
- // copy nodeList so that linking doesn't break due to live list updates.
- var nodeListLength = nodeList.length,
- stableNodeList = new Array(nodeListLength);
- for (i = 0; i < nodeListLength; i++) {
- stableNodeList[i] = nodeList[i];
- }
-
- for(i = 0, n = 0, ii = linkFns.length; i < ii; n++) {
- node = stableNodeList[n];
- nodeLinkFn = linkFns[i++];
- childLinkFn = linkFns[i++];
-
- if (nodeLinkFn) {
- if (nodeLinkFn.scope) {
- childScope = scope.$new();
- jqLite.data(node, '$scope', childScope);
- } else {
- childScope = scope;
- }
-
- if ( nodeLinkFn.transcludeOnThisElement ) {
- childBoundTranscludeFn = createBoundTranscludeFn(scope, nodeLinkFn.transclude, parentBoundTranscludeFn);
-
- } else if (!nodeLinkFn.templateOnThisElement && parentBoundTranscludeFn) {
- childBoundTranscludeFn = parentBoundTranscludeFn;
-
- } else if (!parentBoundTranscludeFn && transcludeFn) {
- childBoundTranscludeFn = createBoundTranscludeFn(scope, transcludeFn);
-
- } else {
- childBoundTranscludeFn = null;
- }
-
- nodeLinkFn(childLinkFn, childScope, node, $rootElement, childBoundTranscludeFn);
-
- } else if (childLinkFn) {
- childLinkFn(scope, node.childNodes, undefined, parentBoundTranscludeFn);
- }
- }
- }
- }
-
- function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn) {
-
- var boundTranscludeFn = function(transcludedScope, cloneFn, controllers) {
- var scopeCreated = false;
-
- if (!transcludedScope) {
- transcludedScope = scope.$new();
- transcludedScope.$$transcluded = true;
- scopeCreated = true;
- }
-
- var clone = transcludeFn(transcludedScope, cloneFn, controllers, previousBoundTranscludeFn);
- if (scopeCreated) {
- clone.on('$destroy', function() { transcludedScope.$destroy(); });
- }
- return clone;
- };
-
- return boundTranscludeFn;
- }
-
- /**
- * Looks for directives on the given node and adds them to the directive collection which is
- * sorted.
- *
- * @param node Node to search.
- * @param directives An array to which the directives are added to. This array is sorted before
- * the function returns.
- * @param attrs The shared attrs object which is used to populate the normalized attributes.
- * @param {number=} maxPriority Max directive priority.
- */
- function collectDirectives(node, directives, attrs, maxPriority, ignoreDirective) {
- var nodeType = node.nodeType,
- attrsMap = attrs.$attr,
- match,
- className;
-
- switch(nodeType) {
- case 1: /* Element */
- // use the node name: <directive>
- addDirective(directives,
- directiveNormalize(nodeName_(node).toLowerCase()), 'E', maxPriority, ignoreDirective);
-
- // iterate over the attributes
- for (var attr, name, nName, ngAttrName, value, isNgAttr, nAttrs = node.attributes,
- j = 0, jj = nAttrs && nAttrs.length; j < jj; j++) {
- var attrStartName = false;
- var attrEndName = false;
-
- attr = nAttrs[j];
- if (!msie || msie >= 8 || attr.specified) {
- name = attr.name;
- value = trim(attr.value);
-
- // support ngAttr attribute binding
- ngAttrName = directiveNormalize(name);
- if (isNgAttr = NG_ATTR_BINDING.test(ngAttrName)) {
- name = snake_case(ngAttrName.substr(6), '-');
- }
-
- var directiveNName = ngAttrName.replace(/(Start|End)$/, '');
- if (ngAttrName === directiveNName + 'Start') {
- attrStartName = name;
- attrEndName = name.substr(0, name.length - 5) + 'end';
- name = name.substr(0, name.length - 6);
- }
-
- nName = directiveNormalize(name.toLowerCase());
- attrsMap[nName] = name;
- if (isNgAttr || !attrs.hasOwnProperty(nName)) {
- attrs[nName] = value;
- if (getBooleanAttrName(node, nName)) {
- attrs[nName] = true; // presence means true
- }
- }
- addAttrInterpolateDirective(node, directives, value, nName);
- addDirective(directives, nName, 'A', maxPriority, ignoreDirective, attrStartName,
- attrEndName);
- }
- }
-
- // use class as directive
- className = node.className;
- if (isString(className) && className !== '') {
- while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) {
- nName = directiveNormalize(match[2]);
- if (addDirective(directives, nName, 'C', maxPriority, ignoreDirective)) {
- attrs[nName] = trim(match[3]);
- }
- className = className.substr(match.index + match[0].length);
- }
- }
- break;
- case 3: /* Text Node */
- addTextInterpolateDirective(directives, node.nodeValue);
- break;
- case 8: /* Comment */
- try {
- match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);
- if (match) {
- nName = directiveNormalize(match[1]);
- if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {
- attrs[nName] = trim(match[2]);
- }
- }
- } catch (e) {
- // turns out that under some circumstances IE9 throws errors when one attempts to read
- // comment's node value.
- // Just ignore it and continue. (Can't seem to reproduce in test case.)
- }
- break;
- }
-
- directives.sort(byPriority);
- return directives;
- }
-
- /**
- * Given a node with an directive-start it collects all of the siblings until it finds
- * directive-end.
- * @param node
- * @param attrStart
- * @param attrEnd
- * @returns {*}
- */
- function groupScan(node, attrStart, attrEnd) {
- var nodes = [];
- var depth = 0;
- if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) {
- var startNode = node;
- do {
- if (!node) {
- throw $compileMinErr('uterdir',
- "Unterminated attribute, found '{0}' but no matching '{1}' found.",
- attrStart, attrEnd);
- }
- if (node.nodeType == 1 /** Element **/) {
- if (node.hasAttribute(attrStart)) depth++;
- if (node.hasAttribute(attrEnd)) depth--;
- }
- nodes.push(node);
- node = node.nextSibling;
- } while (depth > 0);
- } else {
- nodes.push(node);
- }
-
- return jqLite(nodes);
- }
-
- /**
- * Wrapper for linking function which converts normal linking function into a grouped
- * linking function.
- * @param linkFn
- * @param attrStart
- * @param attrEnd
- * @returns {Function}
- */
- function groupElementsLinkFnWrapper(linkFn, attrStart, attrEnd) {
- return function(scope, element, attrs, controllers, transcludeFn) {
- element = groupScan(element[0], attrStart, attrEnd);
- return linkFn(scope, element, attrs, controllers, transcludeFn);
- };
- }
-
- /**
- * Once the directives have been collected, their compile functions are executed. This method
- * is responsible for inlining directive templates as well as terminating the application
- * of the directives if the terminal directive has been reached.
- *
- * @param {Array} directives Array of collected directives to execute their compile function.
- * this needs to be pre-sorted by priority order.
- * @param {Node} compileNode The raw DOM node to apply the compile functions to
- * @param {Object} templateAttrs The shared attribute function
- * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the
- * scope argument is auto-generated to the new
- * child of the transcluded parent scope.
- * @param {JQLite} jqCollection If we are working on the root of the compile tree then this
- * argument has the root jqLite array so that we can replace nodes
- * on it.
- * @param {Object=} originalReplaceDirective An optional directive that will be ignored when
- * compiling the transclusion.
- * @param {Array.<Function>} preLinkFns
- * @param {Array.<Function>} postLinkFns
- * @param {Object} previousCompileContext Context used for previous compilation of the current
- * node
- * @returns {Function} linkFn
- */
- function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn,
- jqCollection, originalReplaceDirective, preLinkFns, postLinkFns,
- previousCompileContext) {
- previousCompileContext = previousCompileContext || {};
-
- var terminalPriority = -Number.MAX_VALUE,
- newScopeDirective,
- controllerDirectives = previousCompileContext.controllerDirectives,
- newIsolateScopeDirective = previousCompileContext.newIsolateScopeDirective,
- templateDirective = previousCompileContext.templateDirective,
- nonTlbTranscludeDirective = previousCompileContext.nonTlbTranscludeDirective,
- hasTranscludeDirective = false,
- hasTemplate = false,
- hasElementTranscludeDirective = previousCompileContext.hasElementTranscludeDirective,
- $compileNode = templateAttrs.$$element = jqLite(compileNode),
- directive,
- directiveName,
- $template,
- replaceDirective = originalReplaceDirective,
- childTranscludeFn = transcludeFn,
- linkFn,
- directiveValue;
-
- // executes all directives on the current element
- for(var i = 0, ii = directives.length; i < ii; i++) {
- directive = directives[i];
- var attrStart = directive.$$start;
- var attrEnd = directive.$$end;
-
- // collect multiblock sections
- if (attrStart) {
- $compileNode = groupScan(compileNode, attrStart, attrEnd);
- }
- $template = undefined;
-
- if (terminalPriority > directive.priority) {
- break; // prevent further processing of directives
- }
-
- if (directiveValue = directive.scope) {
- newScopeDirective = newScopeDirective || directive;
-
- // skip the check for directives with async templates, we'll check the derived sync
- // directive when the template arrives
- if (!directive.templateUrl) {
- assertNoDuplicate('new/isolated scope', newIsolateScopeDirective, directive,
- $compileNode);
- if (isObject(directiveValue)) {
- newIsolateScopeDirective = directive;
- }
- }
- }
-
- directiveName = directive.name;
-
- if (!directive.templateUrl && directive.controller) {
- directiveValue = directive.controller;
- controllerDirectives = controllerDirectives || {};
- assertNoDuplicate("'" + directiveName + "' controller",
- controllerDirectives[directiveName], directive, $compileNode);
- controllerDirectives[directiveName] = directive;
- }
-
- if (directiveValue = directive.transclude) {
- hasTranscludeDirective = true;
-
- // Special case ngIf and ngRepeat so that we don't complain about duplicate transclusion.
- // This option should only be used by directives that know how to safely handle element transclusion,
- // where the transcluded nodes are added or replaced after linking.
- if (!directive.$$tlb) {
- assertNoDuplicate('transclusion', nonTlbTranscludeDirective, directive, $compileNode);
- nonTlbTranscludeDirective = directive;
- }
-
- if (directiveValue == 'element') {
- hasElementTranscludeDirective = true;
- terminalPriority = directive.priority;
- $template = $compileNode;
- $compileNode = templateAttrs.$$element =
- jqLite(document.createComment(' ' + directiveName + ': ' +
- templateAttrs[directiveName] + ' '));
- compileNode = $compileNode[0];
- replaceWith(jqCollection, sliceArgs($template), compileNode);
-
- childTranscludeFn = compile($template, transcludeFn, terminalPriority,
- replaceDirective && replaceDirective.name, {
- // Don't pass in:
- // - controllerDirectives - otherwise we'll create duplicates controllers
- // - newIsolateScopeDirective or templateDirective - combining templates with
- // element transclusion doesn't make sense.
- //
- // We need only nonTlbTranscludeDirective so that we prevent putting transclusion
- // on the same element more than once.
- nonTlbTranscludeDirective: nonTlbTranscludeDirective
- });
- } else {
- $template = jqLite(jqLiteClone(compileNode)).contents();
- $compileNode.empty(); // clear contents
- childTranscludeFn = compile($template, transcludeFn);
- }
- }
-
- if (directive.template) {
- hasTemplate = true;
- assertNoDuplicate('template', templateDirective, directive, $compileNode);
- templateDirective = directive;
-
- directiveValue = (isFunction(directive.template))
- ? directive.template($compileNode, templateAttrs)
- : directive.template;
-
- directiveValue = denormalizeTemplate(directiveValue);
-
- if (directive.replace) {
- replaceDirective = directive;
- if (jqLiteIsTextNode(directiveValue)) {
- $template = [];
- } else {
- $template = jqLite(trim(directiveValue));
- }
- compileNode = $template[0];
-
- if ($template.length != 1 || compileNode.nodeType !== 1) {
- throw $compileMinErr('tplrt',
- "Template for directive '{0}' must have exactly one root element. {1}",
- directiveName, '');
- }
-
- replaceWith(jqCollection, $compileNode, compileNode);
-
- var newTemplateAttrs = {$attr: {}};
-
- // combine directives from the original node and from the template:
- // - take the array of directives for this element
- // - split it into two parts, those that already applied (processed) and those that weren't (unprocessed)
- // - collect directives from the template and sort them by priority
- // - combine directives as: processed + template + unprocessed
- var templateDirectives = collectDirectives(compileNode, [], newTemplateAttrs);
- var unprocessedDirectives = directives.splice(i + 1, directives.length - (i + 1));
-
- if (newIsolateScopeDirective) {
- markDirectivesAsIsolate(templateDirectives);
- }
- directives = directives.concat(templateDirectives).concat(unprocessedDirectives);
- mergeTemplateAttributes(templateAttrs, newTemplateAttrs);
-
- ii = directives.length;
- } else {
- $compileNode.html(directiveValue);
- }
- }
-
- if (directive.templateUrl) {
- hasTemplate = true;
- assertNoDuplicate('template', templateDirective, directive, $compileNode);
- templateDirective = directive;
-
- if (directive.replace) {
- replaceDirective = directive;
- }
-
- nodeLinkFn = compileTemplateUrl(directives.splice(i, directives.length - i), $compileNode,
- templateAttrs, jqCollection, hasTranscludeDirective && childTranscludeFn, preLinkFns, postLinkFns, {
- controllerDirectives: controllerDirectives,
- newIsolateScopeDirective: newIsolateScopeDirective,
- templateDirective: templateDirective,
- nonTlbTranscludeDirective: nonTlbTranscludeDirective
- });
- ii = directives.length;
- } else if (directive.compile) {
- try {
- linkFn = directive.compile($compileNode, templateAttrs, childTranscludeFn);
- if (isFunction(linkFn)) {
- addLinkFns(null, linkFn, attrStart, attrEnd);
- } else if (linkFn) {
- addLinkFns(linkFn.pre, linkFn.post, attrStart, attrEnd);
- }
- } catch (e) {
- $exceptionHandler(e, startingTag($compileNode));
- }
- }
-
- if (directive.terminal) {
- nodeLinkFn.terminal = true;
- terminalPriority = Math.max(terminalPriority, directive.priority);
- }
-
- }
-
- nodeLinkFn.scope = newScopeDirective && newScopeDirective.scope === true;
- nodeLinkFn.transcludeOnThisElement = hasTranscludeDirective;
- nodeLinkFn.templateOnThisElement = hasTemplate;
- nodeLinkFn.transclude = childTranscludeFn;
-
- previousCompileContext.hasElementTranscludeDirective = hasElementTranscludeDirective;
-
- // might be normal or delayed nodeLinkFn depending on if templateUrl is present
- return nodeLinkFn;
-
- ////////////////////
-
- function addLinkFns(pre, post, attrStart, attrEnd) {
- if (pre) {
- if (attrStart) pre = groupElementsLinkFnWrapper(pre, attrStart, attrEnd);
- pre.require = directive.require;
- pre.directiveName = directiveName;
- if (newIsolateScopeDirective === directive || directive.$$isolateScope) {
- pre = cloneAndAnnotateFn(pre, {isolateScope: true});
- }
- preLinkFns.push(pre);
- }
- if (post) {
- if (attrStart) post = groupElementsLinkFnWrapper(post, attrStart, attrEnd);
- post.require = directive.require;
- post.directiveName = directiveName;
- if (newIsolateScopeDirective === directive || directive.$$isolateScope) {
- post = cloneAndAnnotateFn(post, {isolateScope: true});
- }
- postLinkFns.push(post);
- }
- }
-
-
- function getControllers(directiveName, require, $element, elementControllers) {
- var value, retrievalMethod = 'data', optional = false;
- if (isString(require)) {
- while((value = require.charAt(0)) == '^' || value == '?') {
- require = require.substr(1);
- if (value == '^') {
- retrievalMethod = 'inheritedData';
- }
- optional = optional || value == '?';
- }
- value = null;
-
- if (elementControllers && retrievalMethod === 'data') {
- value = elementControllers[require];
- }
- value = value || $element[retrievalMethod]('$' + require + 'Controller');
-
- if (!value && !optional) {
- throw $compileMinErr('ctreq',
- "Controller '{0}', required by directive '{1}', can't be found!",
- require, directiveName);
- }
- return value;
- } else if (isArray(require)) {
- value = [];
- forEach(require, function(require) {
- value.push(getControllers(directiveName, require, $element, elementControllers));
- });
- }
- return value;
- }
-
-
- function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) {
- var attrs, $element, i, ii, linkFn, controller, isolateScope, elementControllers = {}, transcludeFn;
-
- attrs = (compileNode === linkNode)
- ? templateAttrs
- : shallowCopy(templateAttrs, new Attributes(jqLite(linkNode), templateAttrs.$attr));
- $element = attrs.$$element;
-
- if (newIsolateScopeDirective) {
- var LOCAL_REGEXP = /^\s*([@=&])(\??)\s*(\w*)\s*$/;
-
- isolateScope = scope.$new(true);
-
- if (templateDirective && (templateDirective === newIsolateScopeDirective ||
- templateDirective === newIsolateScopeDirective.$$originalDirective)) {
- $element.data('$isolateScope', isolateScope);
- } else {
- $element.data('$isolateScopeNoTemplate', isolateScope);
- }
-
-
-
- safeAddClass($element, 'ng-isolate-scope');
-
- forEach(newIsolateScopeDirective.scope, function(definition, scopeName) {
- var match = definition.match(LOCAL_REGEXP) || [],
- attrName = match[3] || scopeName,
- optional = (match[2] == '?'),
- mode = match[1], // @, =, or &
- lastValue,
- parentGet, parentSet, compare;
-
- isolateScope.$$isolateBindings[scopeName] = mode + attrName;
-
- switch (mode) {
-
- case '@':
- attrs.$observe(attrName, function(value) {
- isolateScope[scopeName] = value;
- });
- attrs.$$observers[attrName].$$scope = scope;
- if( attrs[attrName] ) {
- // If the attribute has been provided then we trigger an interpolation to ensure
- // the value is there for use in the link fn
- isolateScope[scopeName] = $interpolate(attrs[attrName])(scope);
- }
- break;
-
- case '=':
- if (optional && !attrs[attrName]) {
- return;
- }
- parentGet = $parse(attrs[attrName]);
- if (parentGet.literal) {
- compare = equals;
- } else {
- compare = function(a,b) { return a === b || (a !== a && b !== b); };
- }
- parentSet = parentGet.assign || function() {
- // reset the change, or we will throw this exception on every $digest
- lastValue = isolateScope[scopeName] = parentGet(scope);
- throw $compileMinErr('nonassign',
- "Expression '{0}' used with directive '{1}' is non-assignable!",
- attrs[attrName], newIsolateScopeDirective.name);
- };
- lastValue = isolateScope[scopeName] = parentGet(scope);
- isolateScope.$watch(function parentValueWatch() {
- var parentValue = parentGet(scope);
- if (!compare(parentValue, isolateScope[scopeName])) {
- // we are out of sync and need to copy
- if (!compare(parentValue, lastValue)) {
- // parent changed and it has precedence
- isolateScope[scopeName] = parentValue;
- } else {
- // if the parent can be assigned then do so
- parentSet(scope, parentValue = isolateScope[scopeName]);
- }
- }
- return lastValue = parentValue;
- }, null, parentGet.literal);
- break;
-
- case '&':
- parentGet = $parse(attrs[attrName]);
- isolateScope[scopeName] = function(locals) {
- return parentGet(scope, locals);
- };
- break;
-
- default:
- throw $compileMinErr('iscp',
- "Invalid isolate scope definition for directive '{0}'." +
- " Definition: {... {1}: '{2}' ...}",
- newIsolateScopeDirective.name, scopeName, definition);
- }
- });
- }
- transcludeFn = boundTranscludeFn && controllersBoundTransclude;
- if (controllerDirectives) {
- forEach(controllerDirectives, function(directive) {
- var locals = {
- $scope: directive === newIsolateScopeDirective || directive.$$isolateScope ? isolateScope : scope,
- $element: $element,
- $attrs: attrs,
- $transclude: transcludeFn
- }, controllerInstance;
-
- controller = directive.controller;
- if (controller == '@') {
- controller = attrs[directive.name];
- }
-
- controllerInstance = $controller(controller, locals);
- // For directives with element transclusion the element is a comment,
- // but jQuery .data doesn't support attaching data to comment nodes as it's hard to
- // clean up (http://bugs.jquery.com/ticket/8335).
- // Instead, we save the controllers for the element in a local hash and attach to .data
- // later, once we have the actual element.
- elementControllers[directive.name] = controllerInstance;
- if (!hasElementTranscludeDirective) {
- $element.data('$' + directive.name + 'Controller', controllerInstance);
- }
-
- if (directive.controllerAs) {
- locals.$scope[directive.controllerAs] = controllerInstance;
- }
- });
- }
-
- // PRELINKING
- for(i = 0, ii = preLinkFns.length; i < ii; i++) {
- try {
- linkFn = preLinkFns[i];
- linkFn(linkFn.isolateScope ? isolateScope : scope, $element, attrs,
- linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers), transcludeFn);
- } catch (e) {
- $exceptionHandler(e, startingTag($element));
- }
- }
-
- // RECURSION
- // We only pass the isolate scope, if the isolate directive has a template,
- // otherwise the child elements do not belong to the isolate directive.
- var scopeToChild = scope;
- if (newIsolateScopeDirective && (newIsolateScopeDirective.template || newIsolateScopeDirective.templateUrl === null)) {
- scopeToChild = isolateScope;
- }
- childLinkFn && childLinkFn(scopeToChild, linkNode.childNodes, undefined, boundTranscludeFn);
-
- // POSTLINKING
- for(i = postLinkFns.length - 1; i >= 0; i--) {
- try {
- linkFn = postLinkFns[i];
- linkFn(linkFn.isolateScope ? isolateScope : scope, $element, attrs,
- linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers), transcludeFn);
- } catch (e) {
- $exceptionHandler(e, startingTag($element));
- }
- }
-
- // This is the function that is injected as `$transclude`.
- function controllersBoundTransclude(scope, cloneAttachFn) {
- var transcludeControllers;
-
- // no scope passed
- if (arguments.length < 2) {
- cloneAttachFn = scope;
- scope = undefined;
- }
-
- if (hasElementTranscludeDirective) {
- transcludeControllers = elementControllers;
- }
-
- return boundTranscludeFn(scope, cloneAttachFn, transcludeControllers);
- }
- }
- }
-
- function markDirectivesAsIsolate(directives) {
- // mark all directives as needing isolate scope.
- for (var j = 0, jj = directives.length; j < jj; j++) {
- directives[j] = inherit(directives[j], {$$isolateScope: true});
- }
- }
-
- /**
- * looks up the directive and decorates it with exception handling and proper parameters. We
- * call this the boundDirective.
- *
- * @param {string} name name of the directive to look up.
- * @param {string} location The directive must be found in specific format.
- * String containing any of theses characters:
- *
- * * `E`: element name
- * * `A': attribute
- * * `C`: class
- * * `M`: comment
- * @returns {boolean} true if directive was added.
- */
- function addDirective(tDirectives, name, location, maxPriority, ignoreDirective, startAttrName,
- endAttrName) {
- if (name === ignoreDirective) return null;
- var match = null;
- if (hasDirectives.hasOwnProperty(name)) {
- for(var directive, directives = $injector.get(name + Suffix),
- i = 0, ii = directives.length; i<ii; i++) {
- try {
- directive = directives[i];
- if ( (maxPriority === undefined || maxPriority > directive.priority) &&
- directive.restrict.indexOf(location) != -1) {
- if (startAttrName) {
- directive = inherit(directive, {$$start: startAttrName, $$end: endAttrName});
- }
- tDirectives.push(directive);
- match = directive;
- }
- } catch(e) { $exceptionHandler(e); }
- }
- }
- return match;
- }
-
-
- /**
- * When the element is replaced with HTML template then the new attributes
- * on the template need to be merged with the existing attributes in the DOM.
- * The desired effect is to have both of the attributes present.
- *
- * @param {object} dst destination attributes (original DOM)
- * @param {object} src source attributes (from the directive template)
- */
- function mergeTemplateAttributes(dst, src) {
- var srcAttr = src.$attr,
- dstAttr = dst.$attr,
- $element = dst.$$element;
-
- // reapply the old attributes to the new element
- forEach(dst, function(value, key) {
- if (key.charAt(0) != '$') {
- if (src[key] && src[key] !== value) {
- value += (key === 'style' ? ';' : ' ') + src[key];
- }
- dst.$set(key, value, true, srcAttr[key]);
- }
- });
-
- // copy the new attributes on the old attrs object
- forEach(src, function(value, key) {
- if (key == 'class') {
- safeAddClass($element, value);
- dst['class'] = (dst['class'] ? dst['class'] + ' ' : '') + value;
- } else if (key == 'style') {
- $element.attr('style', $element.attr('style') + ';' + value);
- dst['style'] = (dst['style'] ? dst['style'] + ';' : '') + value;
- // `dst` will never contain hasOwnProperty as DOM parser won't let it.
- // You will get an "InvalidCharacterError: DOM Exception 5" error if you
- // have an attribute like "has-own-property" or "data-has-own-property", etc.
- } else if (key.charAt(0) != '$' && !dst.hasOwnProperty(key)) {
- dst[key] = value;
- dstAttr[key] = srcAttr[key];
- }
- });
- }
-
-
- function compileTemplateUrl(directives, $compileNode, tAttrs,
- $rootElement, childTranscludeFn, preLinkFns, postLinkFns, previousCompileContext) {
- var linkQueue = [],
- afterTemplateNodeLinkFn,
- afterTemplateChildLinkFn,
- beforeTemplateCompileNode = $compileNode[0],
- origAsyncDirective = directives.shift(),
- // The fact that we have to copy and patch the directive seems wrong!
- derivedSyncDirective = extend({}, origAsyncDirective, {
- templateUrl: null, transclude: null, replace: null, $$originalDirective: origAsyncDirective
- }),
- templateUrl = (isFunction(origAsyncDirective.templateUrl))
- ? origAsyncDirective.templateUrl($compileNode, tAttrs)
- : origAsyncDirective.templateUrl;
-
- $compileNode.empty();
-
- $http.get($sce.getTrustedResourceUrl(templateUrl), {cache: $templateCache}).
- success(function(content) {
- var compileNode, tempTemplateAttrs, $template, childBoundTranscludeFn;
-
- content = denormalizeTemplate(content);
-
- if (origAsyncDirective.replace) {
- if (jqLiteIsTextNode(content)) {
- $template = [];
- } else {
- $template = jqLite(trim(content));
- }
- compileNode = $template[0];
-
- if ($template.length != 1 || compileNode.nodeType !== 1) {
- throw $compileMinErr('tplrt',
- "Template for directive '{0}' must have exactly one root element. {1}",
- origAsyncDirective.name, templateUrl);
- }
-
- tempTemplateAttrs = {$attr: {}};
- replaceWith($rootElement, $compileNode, compileNode);
- var templateDirectives = collectDirectives(compileNode, [], tempTemplateAttrs);
-
- if (isObject(origAsyncDirective.scope)) {
- markDirectivesAsIsolate(templateDirectives);
- }
- directives = templateDirectives.concat(directives);
- mergeTemplateAttributes(tAttrs, tempTemplateAttrs);
- } else {
- compileNode = beforeTemplateCompileNode;
- $compileNode.html(content);
- }
-
- directives.unshift(derivedSyncDirective);
-
- afterTemplateNodeLinkFn = applyDirectivesToNode(directives, compileNode, tAttrs,
- childTranscludeFn, $compileNode, origAsyncDirective, preLinkFns, postLinkFns,
- previousCompileContext);
- forEach($rootElement, function(node, i) {
- if (node == compileNode) {
- $rootElement[i] = $compileNode[0];
- }
- });
- afterTemplateChildLinkFn = compileNodes($compileNode[0].childNodes, childTranscludeFn);
-
- while(linkQueue.length) {
- var scope = linkQueue.shift(),
- beforeTemplateLinkNode = linkQueue.shift(),
- linkRootElement = linkQueue.shift(),
- boundTranscludeFn = linkQueue.shift(),
- linkNode = $compileNode[0];
-
- if (beforeTemplateLinkNode !== beforeTemplateCompileNode) {
- var oldClasses = beforeTemplateLinkNode.className;
-
- if (!(previousCompileContext.hasElementTranscludeDirective &&
- origAsyncDirective.replace)) {
- // it was cloned therefore we have to clone as well.
- linkNode = jqLiteClone(compileNode);
- }
-
- replaceWith(linkRootElement, jqLite(beforeTemplateLinkNode), linkNode);
-
- // Copy in CSS classes from original node
- safeAddClass(jqLite(linkNode), oldClasses);
- }
- if (afterTemplateNodeLinkFn.transcludeOnThisElement) {
- childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn);
- } else {
- childBoundTranscludeFn = boundTranscludeFn;
- }
- afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, linkNode, $rootElement,
- childBoundTranscludeFn);
- }
- linkQueue = null;
- }).
- error(function(response, code, headers, config) {
- throw $compileMinErr('tpload', 'Failed to load template: {0}', config.url);
- });
-
- return function delayedNodeLinkFn(ignoreChildLinkFn, scope, node, rootElement, boundTranscludeFn) {
- var childBoundTranscludeFn = boundTranscludeFn;
- if (linkQueue) {
- linkQueue.push(scope);
- linkQueue.push(node);
- linkQueue.push(rootElement);
- linkQueue.push(childBoundTranscludeFn);
- } else {
- if (afterTemplateNodeLinkFn.transcludeOnThisElement) {
- childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn);
- }
- afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, node, rootElement, childBoundTranscludeFn);
- }
- };
- }
-
-
- /**
- * Sorting function for bound directives.
- */
- function byPriority(a, b) {
- var diff = b.priority - a.priority;
- if (diff !== 0) return diff;
- if (a.name !== b.name) return (a.name < b.name) ? -1 : 1;
- return a.index - b.index;
- }
-
-
- function assertNoDuplicate(what, previousDirective, directive, element) {
- if (previousDirective) {
- throw $compileMinErr('multidir', 'Multiple directives [{0}, {1}] asking for {2} on: {3}',
- previousDirective.name, directive.name, what, startingTag(element));
- }
- }
-
-
- function addTextInterpolateDirective(directives, text) {
- var interpolateFn = $interpolate(text, true);
- if (interpolateFn) {
- directives.push({
- priority: 0,
- compile: function textInterpolateCompileFn(templateNode) {
- // when transcluding a template that has bindings in the root
- // then we don't have a parent and should do this in the linkFn
- var parent = templateNode.parent(), hasCompileParent = parent.length;
- if (hasCompileParent) safeAddClass(templateNode.parent(), 'ng-binding');
-
- return function textInterpolateLinkFn(scope, node) {
- var parent = node.parent(),
- bindings = parent.data('$binding') || [];
- bindings.push(interpolateFn);
- parent.data('$binding', bindings);
- if (!hasCompileParent) safeAddClass(parent, 'ng-binding');
- scope.$watch(interpolateFn, function interpolateFnWatchAction(value) {
- node[0].nodeValue = value;
- });
- };
- }
- });
- }
- }
-
-
- function getTrustedContext(node, attrNormalizedName) {
- if (attrNormalizedName == "srcdoc") {
- return $sce.HTML;
- }
- var tag = nodeName_(node);
- // maction[xlink:href] can source SVG. It's not limited to <maction>.
- if (attrNormalizedName == "xlinkHref" ||
- (tag == "FORM" && attrNormalizedName == "action") ||
- (tag != "IMG" && (attrNormalizedName == "src" ||
- attrNormalizedName == "ngSrc"))) {
- return $sce.RESOURCE_URL;
- }
- }
-
-
- function addAttrInterpolateDirective(node, directives, value, name) {
- var interpolateFn = $interpolate(value, true);
-
- // no interpolation found -> ignore
- if (!interpolateFn) return;
-
-
- if (name === "multiple" && nodeName_(node) === "SELECT") {
- throw $compileMinErr("selmulti",
- "Binding to the 'multiple' attribute is not supported. Element: {0}",
- startingTag(node));
- }
-
- directives.push({
- priority: 100,
- compile: function() {
- return {
- pre: function attrInterpolatePreLinkFn(scope, element, attr) {
- var $$observers = (attr.$$observers || (attr.$$observers = {}));
-
- if (EVENT_HANDLER_ATTR_REGEXP.test(name)) {
- throw $compileMinErr('nodomevents',
- "Interpolations for HTML DOM event attributes are disallowed. Please use the " +
- "ng- versions (such as ng-click instead of onclick) instead.");
- }
-
- // we need to interpolate again, in case the attribute value has been updated
- // (e.g. by another directive's compile function)
- interpolateFn = $interpolate(attr[name], true, getTrustedContext(node, name));
-
- // if attribute was updated so that there is no interpolation going on we don't want to
- // register any observers
- if (!interpolateFn) return;
-
- // TODO(i): this should likely be attr.$set(name, iterpolateFn(scope) so that we reset the
- // actual attr value
- attr[name] = interpolateFn(scope);
- ($$observers[name] || ($$observers[name] = [])).$$inter = true;
- (attr.$$observers && attr.$$observers[name].$$scope || scope).
- $watch(interpolateFn, function interpolateFnWatchAction(newValue, oldValue) {
- //special case for class attribute addition + removal
- //so that class changes can tap into the animation
- //hooks provided by the $animate service. Be sure to
- //skip animations when the first digest occurs (when
- //both the new and the old values are the same) since
- //the CSS classes are the non-interpolated values
- if(name === 'class' && newValue != oldValue) {
- attr.$updateClass(newValue, oldValue);
- } else {
- attr.$set(name, newValue);
- }
- });
- }
- };
- }
- });
- }
-
-
- /**
- * This is a special jqLite.replaceWith, which can replace items which
- * have no parents, provided that the containing jqLite collection is provided.
- *
- * @param {JqLite=} $rootElement The root of the compile tree. Used so that we can replace nodes
- * in the root of the tree.
- * @param {JqLite} elementsToRemove The jqLite element which we are going to replace. We keep
- * the shell, but replace its DOM node reference.
- * @param {Node} newNode The new DOM node.
- */
- function replaceWith($rootElement, elementsToRemove, newNode) {
- var firstElementToRemove = elementsToRemove[0],
- removeCount = elementsToRemove.length,
- parent = firstElementToRemove.parentNode,
- i, ii;
-
- if ($rootElement) {
- for(i = 0, ii = $rootElement.length; i < ii; i++) {
- if ($rootElement[i] == firstElementToRemove) {
- $rootElement[i++] = newNode;
- for (var j = i, j2 = j + removeCount - 1,
- jj = $rootElement.length;
- j < jj; j++, j2++) {
- if (j2 < jj) {
- $rootElement[j] = $rootElement[j2];
- } else {
- delete $rootElement[j];
- }
- }
- $rootElement.length -= removeCount - 1;
- break;
- }
- }
- }
-
- if (parent) {
- parent.replaceChild(newNode, firstElementToRemove);
- }
- var fragment = document.createDocumentFragment();
- fragment.appendChild(firstElementToRemove);
- newNode[jqLite.expando] = firstElementToRemove[jqLite.expando];
- for (var k = 1, kk = elementsToRemove.length; k < kk; k++) {
- var element = elementsToRemove[k];
- jqLite(element).remove(); // must do this way to clean up expando
- fragment.appendChild(element);
- delete elementsToRemove[k];
- }
-
- elementsToRemove[0] = newNode;
- elementsToRemove.length = 1;
- }
-
-
- function cloneAndAnnotateFn(fn, annotation) {
- return extend(function() { return fn.apply(null, arguments); }, fn, annotation);
- }
- }];
-}
-
-var PREFIX_REGEXP = /^(x[\:\-_]|data[\:\-_])/i;
-/**
- * Converts all accepted directives format into proper directive name.
- * All of these will become 'myDirective':
- * my:Directive
- * my-directive
- * x-my-directive
- * data-my:directive
- *
- * Also there is special case for Moz prefix starting with upper case letter.
- * @param name Name to normalize
- */
-function directiveNormalize(name) {
- return camelCase(name.replace(PREFIX_REGEXP, ''));
-}
-
-/**
- * @ngdoc type
- * @name $compile.directive.Attributes
- *
- * @description
- * A shared object between directive compile / linking functions which contains normalized DOM
- * element attributes. The values reflect current binding state `{{ }}`. The normalization is
- * needed since all of these are treated as equivalent in Angular:
- *
- * ```
- * <span ng:bind="a" ng-bind="a" data-ng-bind="a" x-ng-bind="a">
- * ```
- */
-
-/**
- * @ngdoc property
- * @name $compile.directive.Attributes#$attr
- *
- * @description
- * A map of DOM element attribute names to the normalized name. This is
- * needed to do reverse lookup from normalized name back to actual name.
- */
-
-
-/**
- * @ngdoc method
- * @name $compile.directive.Attributes#$set
- * @kind function
- *
- * @description
- * Set DOM element attribute value.
- *
- *
- * @param {string} name Normalized element attribute name of the property to modify. The name is
- * reverse-translated using the {@link ng.$compile.directive.Attributes#$attr $attr}
- * property to the original name.
- * @param {string} value Value to set the attribute to. The value can be an interpolated string.
- */
-
-
-
-/**
- * Closure compiler type information
- */
-
-function nodesetLinkingFn(
- /* angular.Scope */ scope,
- /* NodeList */ nodeList,
- /* Element */ rootElement,
- /* function(Function) */ boundTranscludeFn
-){}
-
-function directiveLinkingFn(
- /* nodesetLinkingFn */ nodesetLinkingFn,
- /* angular.Scope */ scope,
- /* Node */ node,
- /* Element */ rootElement,
- /* function(Function) */ boundTranscludeFn
-){}
-
-function tokenDifference(str1, str2) {
- var values = '',
- tokens1 = str1.split(/\s+/),
- tokens2 = str2.split(/\s+/);
-
- outer:
- for(var i = 0; i < tokens1.length; i++) {
- var token = tokens1[i];
- for(var j = 0; j < tokens2.length; j++) {
- if(token == tokens2[j]) continue outer;
- }
- values += (values.length > 0 ? ' ' : '') + token;
- }
- return values;
-}
-
-/**
- * @ngdoc provider
- * @name $controllerProvider
- * @description
- * The {@link ng.$controller $controller service} is used by Angular to create new
- * controllers.
- *
- * This provider allows controller registration via the
- * {@link ng.$controllerProvider#register register} method.
- */
-function $ControllerProvider() {
- var controllers = {},
- CNTRL_REG = /^(\S+)(\s+as\s+(\w+))?$/;
-
-
- /**
- * @ngdoc method
- * @name $controllerProvider#register
- * @param {string|Object} name Controller name, or an object map of controllers where the keys are
- * the names and the values are the constructors.
- * @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI
- * annotations in the array notation).
- */
- this.register = function(name, constructor) {
- assertNotHasOwnProperty(name, 'controller');
- if (isObject(name)) {
- extend(controllers, name);
- } else {
- controllers[name] = constructor;
- }
- };
-
-
- this.$get = ['$injector', '$window', function($injector, $window) {
-
- /**
- * @ngdoc service
- * @name $controller
- * @requires $injector
- *
- * @param {Function|string} constructor If called with a function then it's considered to be the
- * controller constructor function. Otherwise it's considered to be a string which is used
- * to retrieve the controller constructor using the following steps:
- *
- * * check if a controller with given name is registered via `$controllerProvider`
- * * check if evaluating the string on the current scope returns a constructor
- * * check `window[constructor]` on the global `window` object
- *
- * @param {Object} locals Injection locals for Controller.
- * @return {Object} Instance of given controller.
- *
- * @description
- * `$controller` service is responsible for instantiating controllers.
- *
- * It's just a simple call to {@link auto.$injector $injector}, but extracted into
- * a service, so that one can override this service with [BC version](https://gist.github.com/1649788).
- */
- return function(expression, locals) {
- var instance, match, constructor, identifier;
-
- if(isString(expression)) {
- match = expression.match(CNTRL_REG),
- constructor = match[1],
- identifier = match[3];
- expression = controllers.hasOwnProperty(constructor)
- ? controllers[constructor]
- : getter(locals.$scope, constructor, true) || getter($window, constructor, true);
-
- assertArgFn(expression, constructor, true);
- }
-
- instance = $injector.instantiate(expression, locals);
-
- if (identifier) {
- if (!(locals && typeof locals.$scope === 'object')) {
- throw minErr('$controller')('noscp',
- "Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",
- constructor || expression.name, identifier);
- }
-
- locals.$scope[identifier] = instance;
- }
-
- return instance;
- };
- }];
-}
-
-/**
- * @ngdoc service
- * @name $document
- * @requires $window
- *
- * @description
- * A {@link angular.element jQuery or jqLite} wrapper for the browser's `window.document` object.
- *
- * @example
- <example module="documentExample">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <p>$document title: <b ng-bind="title"></b></p>
- <p>window.document title: <b ng-bind="windowTitle"></b></p>
- </div>
- </file>
- <file name="script.js">
- angular.module('documentExample', [])
- .controller('ExampleController', ['$scope', '$document', function($scope, $document) {
- $scope.title = $document[0].title;
- $scope.windowTitle = angular.element(window.document)[0].title;
- }]);
- </file>
- </example>
- */
-function $DocumentProvider(){
- this.$get = ['$window', function(window){
- return jqLite(window.document);
- }];
-}
-
-/**
- * @ngdoc service
- * @name $exceptionHandler
- * @requires ng.$log
- *
- * @description
- * Any uncaught exception in angular expressions is delegated to this service.
- * The default implementation simply delegates to `$log.error` which logs it into
- * the browser console.
- *
- * In unit tests, if `angular-mocks.js` is loaded, this service is overridden by
- * {@link ngMock.$exceptionHandler mock $exceptionHandler} which aids in testing.
- *
- * ## Example:
- *
- * ```js
- * angular.module('exceptionOverride', []).factory('$exceptionHandler', function () {
- * return function (exception, cause) {
- * exception.message += ' (caused by "' + cause + '")';
- * throw exception;
- * };
- * });
- * ```
- *
- * This example will override the normal action of `$exceptionHandler`, to make angular
- * exceptions fail hard when they happen, instead of just logging to the console.
- *
- * @param {Error} exception Exception associated with the error.
- * @param {string=} cause optional information about the context in which
- * the error was thrown.
- *
- */
-function $ExceptionHandlerProvider() {
- this.$get = ['$log', function($log) {
- return function(exception, cause) {
- $log.error.apply($log, arguments);
- };
- }];
-}
-
-/**
- * Parse headers into key value object
- *
- * @param {string} headers Raw headers as a string
- * @returns {Object} Parsed headers as key value object
- */
-function parseHeaders(headers) {
- var parsed = {}, key, val, i;
-
- if (!headers) return parsed;
-
- forEach(headers.split('\n'), function(line) {
- i = line.indexOf(':');
- key = lowercase(trim(line.substr(0, i)));
- val = trim(line.substr(i + 1));
-
- if (key) {
- parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
- }
- });
-
- return parsed;
-}
-
-
-/**
- * Returns a function that provides access to parsed headers.
- *
- * Headers are lazy parsed when first requested.
- * @see parseHeaders
- *
- * @param {(string|Object)} headers Headers to provide access to.
- * @returns {function(string=)} Returns a getter function which if called with:
- *
- * - if called with single an argument returns a single header value or null
- * - if called with no arguments returns an object containing all headers.
- */
-function headersGetter(headers) {
- var headersObj = isObject(headers) ? headers : undefined;
-
- return function(name) {
- if (!headersObj) headersObj = parseHeaders(headers);
-
- if (name) {
- return headersObj[lowercase(name)] || null;
- }
-
- return headersObj;
- };
-}
-
-
-/**
- * Chain all given functions
- *
- * This function is used for both request and response transforming
- *
- * @param {*} data Data to transform.
- * @param {function(string=)} headers Http headers getter fn.
- * @param {(Function|Array.<Function>)} fns Function or an array of functions.
- * @returns {*} Transformed data.
- */
-function transformData(data, headers, fns) {
- if (isFunction(fns))
- return fns(data, headers);
-
- forEach(fns, function(fn) {
- data = fn(data, headers);
- });
-
- return data;
-}
-
-
-function isSuccess(status) {
- return 200 <= status && status < 300;
-}
-
-
-/**
- * @ngdoc provider
- * @name $httpProvider
- * @description
- * Use `$httpProvider` to change the default behavior of the {@link ng.$http $http} service.
- * */
-function $HttpProvider() {
- var JSON_START = /^\s*(\[|\{[^\{])/,
- JSON_END = /[\}\]]\s*$/,
- PROTECTION_PREFIX = /^\)\]\}',?\n/,
- CONTENT_TYPE_APPLICATION_JSON = {'Content-Type': 'application/json;charset=utf-8'};
-
- /**
- * @ngdoc property
- * @name $httpProvider#defaults
- * @description
- *
- * Object containing default values for all {@link ng.$http $http} requests.
- *
- * - **`defaults.xsrfCookieName`** - {string} - Name of cookie containing the XSRF token.
- * Defaults value is `'XSRF-TOKEN'`.
- *
- * - **`defaults.xsrfHeaderName`** - {string} - Name of HTTP header to populate with the
- * XSRF token. Defaults value is `'X-XSRF-TOKEN'`.
- *
- * - **`defaults.headers`** - {Object} - Default headers for all $http requests.
- * Refer to {@link ng.$http#setting-http-headers $http} for documentation on
- * setting default headers.
- * - **`defaults.headers.common`**
- * - **`defaults.headers.post`**
- * - **`defaults.headers.put`**
- * - **`defaults.headers.patch`**
- **/
- var defaults = this.defaults = {
- // transform incoming response data
- transformResponse: [function(data) {
- if (isString(data)) {
- // strip json vulnerability protection prefix
- data = data.replace(PROTECTION_PREFIX, '');
- if (JSON_START.test(data) && JSON_END.test(data))
- data = fromJson(data);
- }
- return data;
- }],
-
- // transform outgoing request data
- transformRequest: [function(d) {
- return isObject(d) && !isFile(d) && !isBlob(d) ? toJson(d) : d;
- }],
-
- // default headers
- headers: {
- common: {
- 'Accept': 'application/json, text/plain, */*'
- },
- post: shallowCopy(CONTENT_TYPE_APPLICATION_JSON),
- put: shallowCopy(CONTENT_TYPE_APPLICATION_JSON),
- patch: shallowCopy(CONTENT_TYPE_APPLICATION_JSON)
- },
-
- xsrfCookieName: 'XSRF-TOKEN',
- xsrfHeaderName: 'X-XSRF-TOKEN'
- };
-
- /**
- * Are ordered by request, i.e. they are applied in the same order as the
- * array, on request, but reverse order, on response.
- */
- var interceptorFactories = this.interceptors = [];
-
- /**
- * For historical reasons, response interceptors are ordered by the order in which
- * they are applied to the response. (This is the opposite of interceptorFactories)
- */
- var responseInterceptorFactories = this.responseInterceptors = [];
-
- this.$get = ['$httpBackend', '$browser', '$cacheFactory', '$rootScope', '$q', '$injector',
- function($httpBackend, $browser, $cacheFactory, $rootScope, $q, $injector) {
-
- var defaultCache = $cacheFactory('$http');
-
- /**
- * Interceptors stored in reverse order. Inner interceptors before outer interceptors.
- * The reversal is needed so that we can build up the interception chain around the
- * server request.
- */
- var reversedInterceptors = [];
-
- forEach(interceptorFactories, function(interceptorFactory) {
- reversedInterceptors.unshift(isString(interceptorFactory)
- ? $injector.get(interceptorFactory) : $injector.invoke(interceptorFactory));
- });
-
- forEach(responseInterceptorFactories, function(interceptorFactory, index) {
- var responseFn = isString(interceptorFactory)
- ? $injector.get(interceptorFactory)
- : $injector.invoke(interceptorFactory);
-
- /**
- * Response interceptors go before "around" interceptors (no real reason, just
- * had to pick one.) But they are already reversed, so we can't use unshift, hence
- * the splice.
- */
- reversedInterceptors.splice(index, 0, {
- response: function(response) {
- return responseFn($q.when(response));
- },
- responseError: function(response) {
- return responseFn($q.reject(response));
- }
- });
- });
-
-
- /**
- * @ngdoc service
- * @kind function
- * @name $http
- * @requires ng.$httpBackend
- * @requires $cacheFactory
- * @requires $rootScope
- * @requires $q
- * @requires $injector
- *
- * @description
- * The `$http` service is a core Angular service that facilitates communication with the remote
- * HTTP servers via the browser's [XMLHttpRequest](https://developer.mozilla.org/en/xmlhttprequest)
- * object or via [JSONP](http://en.wikipedia.org/wiki/JSONP).
- *
- * For unit testing applications that use `$http` service, see
- * {@link ngMock.$httpBackend $httpBackend mock}.
- *
- * For a higher level of abstraction, please check out the {@link ngResource.$resource
- * $resource} service.
- *
- * The $http API is based on the {@link ng.$q deferred/promise APIs} exposed by
- * the $q service. While for simple usage patterns this doesn't matter much, for advanced usage
- * it is important to familiarize yourself with these APIs and the guarantees they provide.
- *
- *
- * # General usage
- * The `$http` service is a function which takes a single argument — a configuration object —
- * that is used to generate an HTTP request and returns a {@link ng.$q promise}
- * with two $http specific methods: `success` and `error`.
- *
- * ```js
- * $http({method: 'GET', url: '/someUrl'}).
- * success(function(data, status, headers, config) {
- * // this callback will be called asynchronously
- * // when the response is available
- * }).
- * error(function(data, status, headers, config) {
- * // called asynchronously if an error occurs
- * // or server returns response with an error status.
- * });
- * ```
- *
- * Since the returned value of calling the $http function is a `promise`, you can also use
- * the `then` method to register callbacks, and these callbacks will receive a single argument –
- * an object representing the response. See the API signature and type info below for more
- * details.
- *
- * A response status code between 200 and 299 is considered a success status and
- * will result in the success callback being called. Note that if the response is a redirect,
- * XMLHttpRequest will transparently follow it, meaning that the error callback will not be
- * called for such responses.
- *
- * # Writing Unit Tests that use $http
- * When unit testing (using {@link ngMock ngMock}), it is necessary to call
- * {@link ngMock.$httpBackend#flush $httpBackend.flush()} to flush each pending
- * request using trained responses.
- *
- * ```
- * $httpBackend.expectGET(...);
- * $http.get(...);
- * $httpBackend.flush();
- * ```
- *
- * # Shortcut methods
- *
- * Shortcut methods are also available. All shortcut methods require passing in the URL, and
- * request data must be passed in for POST/PUT requests.
- *
- * ```js
- * $http.get('/someUrl').success(successCallback);
- * $http.post('/someUrl', data).success(successCallback);
- * ```
- *
- * Complete list of shortcut methods:
- *
- * - {@link ng.$http#get $http.get}
- * - {@link ng.$http#head $http.head}
- * - {@link ng.$http#post $http.post}
- * - {@link ng.$http#put $http.put}
- * - {@link ng.$http#delete $http.delete}
- * - {@link ng.$http#jsonp $http.jsonp}
- * - {@link ng.$http#patch $http.patch}
- *
- *
- * # Setting HTTP Headers
- *
- * The $http service will automatically add certain HTTP headers to all requests. These defaults
- * can be fully configured by accessing the `$httpProvider.defaults.headers` configuration
- * object, which currently contains this default configuration:
- *
- * - `$httpProvider.defaults.headers.common` (headers that are common for all requests):
- * - `Accept: application/json, text/plain, * / *`
- * - `$httpProvider.defaults.headers.post`: (header defaults for POST requests)
- * - `Content-Type: application/json`
- * - `$httpProvider.defaults.headers.put` (header defaults for PUT requests)
- * - `Content-Type: application/json`
- *
- * To add or overwrite these defaults, simply add or remove a property from these configuration
- * objects. To add headers for an HTTP method other than POST or PUT, simply add a new object
- * with the lowercased HTTP method name as the key, e.g.
- * `$httpProvider.defaults.headers.get = { 'My-Header' : 'value' }.
- *
- * The defaults can also be set at runtime via the `$http.defaults` object in the same
- * fashion. For example:
- *
- * ```
- * module.run(function($http) {
- * $http.defaults.headers.common.Authorization = 'Basic YmVlcDpib29w'
- * });
- * ```
- *
- * In addition, you can supply a `headers` property in the config object passed when
- * calling `$http(config)`, which overrides the defaults without changing them globally.
- *
- *
- * # Transforming Requests and Responses
- *
- * Both requests and responses can be transformed using transform functions. By default, Angular
- * applies these transformations:
- *
- * Request transformations:
- *
- * - If the `data` property of the request configuration object contains an object, serialize it
- * into JSON format.
- *
- * Response transformations:
- *
- * - If XSRF prefix is detected, strip it (see Security Considerations section below).
- * - If JSON response is detected, deserialize it using a JSON parser.
- *
- * To globally augment or override the default transforms, modify the
- * `$httpProvider.defaults.transformRequest` and `$httpProvider.defaults.transformResponse`
- * properties. These properties are by default an array of transform functions, which allows you
- * to `push` or `unshift` a new transformation function into the transformation chain. You can
- * also decide to completely override any default transformations by assigning your
- * transformation functions to these properties directly without the array wrapper. These defaults
- * are again available on the $http factory at run-time, which may be useful if you have run-time
- * services you wish to be involved in your transformations.
- *
- * Similarly, to locally override the request/response transforms, augment the
- * `transformRequest` and/or `transformResponse` properties of the configuration object passed
- * into `$http`.
- *
- *
- * # Caching
- *
- * To enable caching, set the request configuration `cache` property to `true` (to use default
- * cache) or to a custom cache object (built with {@link ng.$cacheFactory `$cacheFactory`}).
- * When the cache is enabled, `$http` stores the response from the server in the specified
- * cache. The next time the same request is made, the response is served from the cache without
- * sending a request to the server.
- *
- * Note that even if the response is served from cache, delivery of the data is asynchronous in
- * the same way that real requests are.
- *
- * If there are multiple GET requests for the same URL that should be cached using the same
- * cache, but the cache is not populated yet, only one request to the server will be made and
- * the remaining requests will be fulfilled using the response from the first request.
- *
- * You can change the default cache to a new object (built with
- * {@link ng.$cacheFactory `$cacheFactory`}) by updating the
- * {@link ng.$http#properties_defaults `$http.defaults.cache`} property. All requests who set
- * their `cache` property to `true` will now use this cache object.
- *
- * If you set the default cache to `false` then only requests that specify their own custom
- * cache object will be cached.
- *
- * # Interceptors
- *
- * Before you start creating interceptors, be sure to understand the
- * {@link ng.$q $q and deferred/promise APIs}.
- *
- * For purposes of global error handling, authentication, or any kind of synchronous or
- * asynchronous pre-processing of request or postprocessing of responses, it is desirable to be
- * able to intercept requests before they are handed to the server and
- * responses before they are handed over to the application code that
- * initiated these requests. The interceptors leverage the {@link ng.$q
- * promise APIs} to fulfill this need for both synchronous and asynchronous pre-processing.
- *
- * The interceptors are service factories that are registered with the `$httpProvider` by
- * adding them to the `$httpProvider.interceptors` array. The factory is called and
- * injected with dependencies (if specified) and returns the interceptor.
- *
- * There are two kinds of interceptors (and two kinds of rejection interceptors):
- *
- * * `request`: interceptors get called with a http `config` object. The function is free to
- * modify the `config` object or create a new one. The function needs to return the `config`
- * object directly, or a promise containing the `config` or a new `config` object.
- * * `requestError`: interceptor gets called when a previous interceptor threw an error or
- * resolved with a rejection.
- * * `response`: interceptors get called with http `response` object. The function is free to
- * modify the `response` object or create a new one. The function needs to return the `response`
- * object directly, or as a promise containing the `response` or a new `response` object.
- * * `responseError`: interceptor gets called when a previous interceptor threw an error or
- * resolved with a rejection.
- *
- *
- * ```js
- * // register the interceptor as a service
- * $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) {
- * return {
- * // optional method
- * 'request': function(config) {
- * // do something on success
- * return config;
- * },
- *
- * // optional method
- * 'requestError': function(rejection) {
- * // do something on error
- * if (canRecover(rejection)) {
- * return responseOrNewPromise
- * }
- * return $q.reject(rejection);
- * },
- *
- *
- *
- * // optional method
- * 'response': function(response) {
- * // do something on success
- * return response;
- * },
- *
- * // optional method
- * 'responseError': function(rejection) {
- * // do something on error
- * if (canRecover(rejection)) {
- * return responseOrNewPromise
- * }
- * return $q.reject(rejection);
- * }
- * };
- * });
- *
- * $httpProvider.interceptors.push('myHttpInterceptor');
- *
- *
- * // alternatively, register the interceptor via an anonymous factory
- * $httpProvider.interceptors.push(function($q, dependency1, dependency2) {
- * return {
- * 'request': function(config) {
- * // same as above
- * },
- *
- * 'response': function(response) {
- * // same as above
- * }
- * };
- * });
- * ```
- *
- * # Response interceptors (DEPRECATED)
- *
- * Before you start creating interceptors, be sure to understand the
- * {@link ng.$q $q and deferred/promise APIs}.
- *
- * For purposes of global error handling, authentication or any kind of synchronous or
- * asynchronous preprocessing of received responses, it is desirable to be able to intercept
- * responses for http requests before they are handed over to the application code that
- * initiated these requests. The response interceptors leverage the {@link ng.$q
- * promise apis} to fulfil this need for both synchronous and asynchronous preprocessing.
- *
- * The interceptors are service factories that are registered with the $httpProvider by
- * adding them to the `$httpProvider.responseInterceptors` array. The factory is called and
- * injected with dependencies (if specified) and returns the interceptor — a function that
- * takes a {@link ng.$q promise} and returns the original or a new promise.
- *
- * ```js
- * // register the interceptor as a service
- * $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) {
- * return function(promise) {
- * return promise.then(function(response) {
- * // do something on success
- * return response;
- * }, function(response) {
- * // do something on error
- * if (canRecover(response)) {
- * return responseOrNewPromise
- * }
- * return $q.reject(response);
- * });
- * }
- * });
- *
- * $httpProvider.responseInterceptors.push('myHttpInterceptor');
- *
- *
- * // register the interceptor via an anonymous factory
- * $httpProvider.responseInterceptors.push(function($q, dependency1, dependency2) {
- * return function(promise) {
- * // same as above
- * }
- * });
- * ```
- *
- *
- * # Security Considerations
- *
- * When designing web applications, consider security threats from:
- *
- * - [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)
- * - [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)
- *
- * Both server and the client must cooperate in order to eliminate these threats. Angular comes
- * pre-configured with strategies that address these issues, but for this to work backend server
- * cooperation is required.
- *
- * ## JSON Vulnerability Protection
- *
- * A [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)
- * allows third party website to turn your JSON resource URL into
- * [JSONP](http://en.wikipedia.org/wiki/JSONP) request under some conditions. To
- * counter this your server can prefix all JSON requests with following string `")]}',\n"`.
- * Angular will automatically strip the prefix before processing it as JSON.
- *
- * For example if your server needs to return:
- * ```js
- * ['one','two']
- * ```
- *
- * which is vulnerable to attack, your server can return:
- * ```js
- * )]}',
- * ['one','two']
- * ```
- *
- * Angular will strip the prefix, before processing the JSON.
- *
- *
- * ## Cross Site Request Forgery (XSRF) Protection
- *
- * [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery) is a technique by which
- * an unauthorized site can gain your user's private data. Angular provides a mechanism
- * to counter XSRF. When performing XHR requests, the $http service reads a token from a cookie
- * (by default, `XSRF-TOKEN`) and sets it as an HTTP header (`X-XSRF-TOKEN`). Since only
- * JavaScript that runs on your domain could read the cookie, your server can be assured that
- * the XHR came from JavaScript running on your domain. The header will not be set for
- * cross-domain requests.
- *
- * To take advantage of this, your server needs to set a token in a JavaScript readable session
- * cookie called `XSRF-TOKEN` on the first HTTP GET request. On subsequent XHR requests the
- * server can verify that the cookie matches `X-XSRF-TOKEN` HTTP header, and therefore be sure
- * that only JavaScript running on your domain could have sent the request. The token must be
- * unique for each user and must be verifiable by the server (to prevent the JavaScript from
- * making up its own tokens). We recommend that the token is a digest of your site's
- * authentication cookie with a [salt](https://en.wikipedia.org/wiki/Salt_(cryptography&#41;)
- * for added security.
- *
- * The name of the headers can be specified using the xsrfHeaderName and xsrfCookieName
- * properties of either $httpProvider.defaults at config-time, $http.defaults at run-time,
- * or the per-request config object.
- *
- *
- * @param {object} config Object describing the request to be made and how it should be
- * processed. The object has following properties:
- *
- * - **method** – `{string}` – HTTP method (e.g. 'GET', 'POST', etc)
- * - **url** – `{string}` – Absolute or relative URL of the resource that is being requested.
- * - **params** – `{Object.<string|Object>}` – Map of strings or objects which will be turned
- * to `?key1=value1&key2=value2` after the url. If the value is not a string, it will be
- * JSONified.
- * - **data** – `{string|Object}` – Data to be sent as the request message data.
- * - **headers** – `{Object}` – Map of strings or functions which return strings representing
- * HTTP headers to send to the server. If the return value of a function is null, the
- * header will not be sent.
- * - **xsrfHeaderName** – `{string}` – Name of HTTP header to populate with the XSRF token.
- * - **xsrfCookieName** – `{string}` – Name of cookie containing the XSRF token.
- * - **transformRequest** –
- * `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –
- * transform function or an array of such functions. The transform function takes the http
- * request body and headers and returns its transformed (typically serialized) version.
- * - **transformResponse** –
- * `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –
- * transform function or an array of such functions. The transform function takes the http
- * response body and headers and returns its transformed (typically deserialized) version.
- * - **cache** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the
- * GET request, otherwise if a cache instance built with
- * {@link ng.$cacheFactory $cacheFactory}, this cache will be used for
- * caching.
- * - **timeout** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise}
- * that should abort the request when resolved.
- * - **withCredentials** - `{boolean}` - whether to set the `withCredentials` flag on the
- * XHR object. See [requests with credentials](https://developer.mozilla.org/docs/Web/HTTP/Access_control_CORS#Requests_with_credentials)
- * for more information.
- * - **responseType** - `{string}` - see
- * [requestType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType).
- *
- * @returns {HttpPromise} Returns a {@link ng.$q promise} object with the
- * standard `then` method and two http specific methods: `success` and `error`. The `then`
- * method takes two arguments a success and an error callback which will be called with a
- * response object. The `success` and `error` methods take a single argument - a function that
- * will be called when the request succeeds or fails respectively. The arguments passed into
- * these functions are destructured representation of the response object passed into the
- * `then` method. The response object has these properties:
- *
- * - **data** – `{string|Object}` – The response body transformed with the transform
- * functions.
- * - **status** – `{number}` – HTTP status code of the response.
- * - **headers** – `{function([headerName])}` – Header getter function.
- * - **config** – `{Object}` – The configuration object that was used to generate the request.
- * - **statusText** – `{string}` – HTTP status text of the response.
- *
- * @property {Array.<Object>} pendingRequests Array of config objects for currently pending
- * requests. This is primarily meant to be used for debugging purposes.
- *
- *
- * @example
-<example module="httpExample">
-<file name="index.html">
- <div ng-controller="FetchController">
- <select ng-model="method">
- <option>GET</option>
- <option>JSONP</option>
- </select>
- <input type="text" ng-model="url" size="80"/>
- <button id="fetchbtn" ng-click="fetch()">fetch</button><br>
- <button id="samplegetbtn" ng-click="updateModel('GET', 'http-hello.html')">Sample GET</button>
- <button id="samplejsonpbtn"
- ng-click="updateModel('JSONP',
- 'https://angularjs.org/greet.php?callback=JSON_CALLBACK&name=Super%20Hero')">
- Sample JSONP
- </button>
- <button id="invalidjsonpbtn"
- ng-click="updateModel('JSONP', 'https://angularjs.org/doesntexist&callback=JSON_CALLBACK')">
- Invalid JSONP
- </button>
- <pre>http status code: {{status}}</pre>
- <pre>http response data: {{data}}</pre>
- </div>
-</file>
-<file name="script.js">
- angular.module('httpExample', [])
- .controller('FetchController', ['$scope', '$http', '$templateCache',
- function($scope, $http, $templateCache) {
- $scope.method = 'GET';
- $scope.url = 'http-hello.html';
-
- $scope.fetch = function() {
- $scope.code = null;
- $scope.response = null;
-
- $http({method: $scope.method, url: $scope.url, cache: $templateCache}).
- success(function(data, status) {
- $scope.status = status;
- $scope.data = data;
- }).
- error(function(data, status) {
- $scope.data = data || "Request failed";
- $scope.status = status;
- });
- };
-
- $scope.updateModel = function(method, url) {
- $scope.method = method;
- $scope.url = url;
- };
- }]);
-</file>
-<file name="http-hello.html">
- Hello, $http!
-</file>
-<file name="protractor.js" type="protractor">
- var status = element(by.binding('status'));
- var data = element(by.binding('data'));
- var fetchBtn = element(by.id('fetchbtn'));
- var sampleGetBtn = element(by.id('samplegetbtn'));
- var sampleJsonpBtn = element(by.id('samplejsonpbtn'));
- var invalidJsonpBtn = element(by.id('invalidjsonpbtn'));
-
- it('should make an xhr GET request', function() {
- sampleGetBtn.click();
- fetchBtn.click();
- expect(status.getText()).toMatch('200');
- expect(data.getText()).toMatch(/Hello, \$http!/);
- });
-
- it('should make a JSONP request to angularjs.org', function() {
- sampleJsonpBtn.click();
- fetchBtn.click();
- expect(status.getText()).toMatch('200');
- expect(data.getText()).toMatch(/Super Hero!/);
- });
-
- it('should make JSONP request to invalid URL and invoke the error handler',
- function() {
- invalidJsonpBtn.click();
- fetchBtn.click();
- expect(status.getText()).toMatch('0');
- expect(data.getText()).toMatch('Request failed');
- });
-</file>
-</example>
- */
- function $http(requestConfig) {
- var config = {
- method: 'get',
- transformRequest: defaults.transformRequest,
- transformResponse: defaults.transformResponse
- };
- var headers = mergeHeaders(requestConfig);
-
- extend(config, requestConfig);
- config.headers = headers;
- config.method = uppercase(config.method);
-
- var serverRequest = function(config) {
- headers = config.headers;
- var reqData = transformData(config.data, headersGetter(headers), config.transformRequest);
-
- // strip content-type if data is undefined
- if (isUndefined(reqData)) {
- forEach(headers, function(value, header) {
- if (lowercase(header) === 'content-type') {
- delete headers[header];
- }
- });
- }
-
- if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {
- config.withCredentials = defaults.withCredentials;
- }
-
- // send request
- return sendReq(config, reqData, headers).then(transformResponse, transformResponse);
- };
-
- var chain = [serverRequest, undefined];
- var promise = $q.when(config);
-
- // apply interceptors
- forEach(reversedInterceptors, function(interceptor) {
- if (interceptor.request || interceptor.requestError) {
- chain.unshift(interceptor.request, interceptor.requestError);
- }
- if (interceptor.response || interceptor.responseError) {
- chain.push(interceptor.response, interceptor.responseError);
- }
- });
-
- while(chain.length) {
- var thenFn = chain.shift();
- var rejectFn = chain.shift();
-
- promise = promise.then(thenFn, rejectFn);
- }
-
- promise.success = function(fn) {
- promise.then(function(response) {
- fn(response.data, response.status, response.headers, config);
- });
- return promise;
- };
-
- promise.error = function(fn) {
- promise.then(null, function(response) {
- fn(response.data, response.status, response.headers, config);
- });
- return promise;
- };
-
- return promise;
-
- function transformResponse(response) {
- // make a copy since the response must be cacheable
- var resp = extend({}, response, {
- data: transformData(response.data, response.headers, config.transformResponse)
- });
- return (isSuccess(response.status))
- ? resp
- : $q.reject(resp);
- }
-
- function mergeHeaders(config) {
- var defHeaders = defaults.headers,
- reqHeaders = extend({}, config.headers),
- defHeaderName, lowercaseDefHeaderName, reqHeaderName;
-
- defHeaders = extend({}, defHeaders.common, defHeaders[lowercase(config.method)]);
-
- // using for-in instead of forEach to avoid unecessary iteration after header has been found
- defaultHeadersIteration:
- for (defHeaderName in defHeaders) {
- lowercaseDefHeaderName = lowercase(defHeaderName);
-
- for (reqHeaderName in reqHeaders) {
- if (lowercase(reqHeaderName) === lowercaseDefHeaderName) {
- continue defaultHeadersIteration;
- }
- }
-
- reqHeaders[defHeaderName] = defHeaders[defHeaderName];
- }
-
- // execute if header value is a function for merged headers
- execHeaders(reqHeaders);
- return reqHeaders;
-
- function execHeaders(headers) {
- var headerContent;
-
- forEach(headers, function(headerFn, header) {
- if (isFunction(headerFn)) {
- headerContent = headerFn();
- if (headerContent != null) {
- headers[header] = headerContent;
- } else {
- delete headers[header];
- }
- }
- });
- }
- }
- }
-
- $http.pendingRequests = [];
-
- /**
- * @ngdoc method
- * @name $http#get
- *
- * @description
- * Shortcut method to perform `GET` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
-
- /**
- * @ngdoc method
- * @name $http#delete
- *
- * @description
- * Shortcut method to perform `DELETE` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
-
- /**
- * @ngdoc method
- * @name $http#head
- *
- * @description
- * Shortcut method to perform `HEAD` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
-
- /**
- * @ngdoc method
- * @name $http#jsonp
- *
- * @description
- * Shortcut method to perform `JSONP` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request.
- * The name of the callback should be the string `JSON_CALLBACK`.
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
- createShortMethods('get', 'delete', 'head', 'jsonp');
-
- /**
- * @ngdoc method
- * @name $http#post
- *
- * @description
- * Shortcut method to perform `POST` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request
- * @param {*} data Request content
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
-
- /**
- * @ngdoc method
- * @name $http#put
- *
- * @description
- * Shortcut method to perform `PUT` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request
- * @param {*} data Request content
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
- createShortMethodsWithData('post', 'put');
-
- /**
- * @ngdoc property
- * @name $http#defaults
- *
- * @description
- * Runtime equivalent of the `$httpProvider.defaults` property. Allows configuration of
- * default headers, withCredentials as well as request and response transformations.
- *
- * See "Setting HTTP Headers" and "Transforming Requests and Responses" sections above.
- */
- $http.defaults = defaults;
-
-
- return $http;
-
-
- function createShortMethods(names) {
- forEach(arguments, function(name) {
- $http[name] = function(url, config) {
- return $http(extend(config || {}, {
- method: name,
- url: url
- }));
- };
- });
- }
-
-
- function createShortMethodsWithData(name) {
- forEach(arguments, function(name) {
- $http[name] = function(url, data, config) {
- return $http(extend(config || {}, {
- method: name,
- url: url,
- data: data
- }));
- };
- });
- }
-
-
- /**
- * Makes the request.
- *
- * !!! ACCESSES CLOSURE VARS:
- * $httpBackend, defaults, $log, $rootScope, defaultCache, $http.pendingRequests
- */
- function sendReq(config, reqData, reqHeaders) {
- var deferred = $q.defer(),
- promise = deferred.promise,
- cache,
- cachedResp,
- url = buildUrl(config.url, config.params);
-
- $http.pendingRequests.push(config);
- promise.then(removePendingReq, removePendingReq);
-
-
- if ((config.cache || defaults.cache) && config.cache !== false &&
- (config.method === 'GET' || config.method === 'JSONP')) {
- cache = isObject(config.cache) ? config.cache
- : isObject(defaults.cache) ? defaults.cache
- : defaultCache;
- }
-
- if (cache) {
- cachedResp = cache.get(url);
- if (isDefined(cachedResp)) {
- if (isPromiseLike(cachedResp)) {
- // cached request has already been sent, but there is no response yet
- cachedResp.then(removePendingReq, removePendingReq);
- return cachedResp;
- } else {
- // serving from cache
- if (isArray(cachedResp)) {
- resolvePromise(cachedResp[1], cachedResp[0], shallowCopy(cachedResp[2]), cachedResp[3]);
- } else {
- resolvePromise(cachedResp, 200, {}, 'OK');
- }
- }
- } else {
- // put the promise for the non-transformed response into cache as a placeholder
- cache.put(url, promise);
- }
- }
-
-
- // if we won't have the response in cache, set the xsrf headers and
- // send the request to the backend
- if (isUndefined(cachedResp)) {
- var xsrfValue = urlIsSameOrigin(config.url)
- ? $browser.cookies()[config.xsrfCookieName || defaults.xsrfCookieName]
- : undefined;
- if (xsrfValue) {
- reqHeaders[(config.xsrfHeaderName || defaults.xsrfHeaderName)] = xsrfValue;
- }
-
- $httpBackend(config.method, url, reqData, done, reqHeaders, config.timeout,
- config.withCredentials, config.responseType);
- }
-
- return promise;
-
-
- /**
- * Callback registered to $httpBackend():
- * - caches the response if desired
- * - resolves the raw $http promise
- * - calls $apply
- */
- function done(status, response, headersString, statusText) {
- if (cache) {
- if (isSuccess(status)) {
- cache.put(url, [status, response, parseHeaders(headersString), statusText]);
- } else {
- // remove promise from the cache
- cache.remove(url);
- }
- }
-
- resolvePromise(response, status, headersString, statusText);
- if (!$rootScope.$$phase) $rootScope.$apply();
- }
-
-
- /**
- * Resolves the raw $http promise.
- */
- function resolvePromise(response, status, headers, statusText) {
- // normalize internal statuses to 0
- status = Math.max(status, 0);
-
- (isSuccess(status) ? deferred.resolve : deferred.reject)({
- data: response,
- status: status,
- headers: headersGetter(headers),
- config: config,
- statusText : statusText
- });
- }
-
-
- function removePendingReq() {
- var idx = indexOf($http.pendingRequests, config);
- if (idx !== -1) $http.pendingRequests.splice(idx, 1);
- }
- }
-
-
- function buildUrl(url, params) {
- if (!params) return url;
- var parts = [];
- forEachSorted(params, function(value, key) {
- if (value === null || isUndefined(value)) return;
- if (!isArray(value)) value = [value];
-
- forEach(value, function(v) {
- if (isObject(v)) {
- if (isDate(v)){
- v = v.toISOString();
- } else {
- v = toJson(v);
- }
- }
- parts.push(encodeUriQuery(key) + '=' +
- encodeUriQuery(v));
- });
- });
- if(parts.length > 0) {
- url += ((url.indexOf('?') == -1) ? '?' : '&') + parts.join('&');
- }
- return url;
- }
- }];
-}
-
-function createXhr(method) {
- //if IE and the method is not RFC2616 compliant, or if XMLHttpRequest
- //is not available, try getting an ActiveXObject. Otherwise, use XMLHttpRequest
- //if it is available
- if (msie <= 8 && (!method.match(/^(get|post|head|put|delete|options)$/i) ||
- !window.XMLHttpRequest)) {
- return new window.ActiveXObject("Microsoft.XMLHTTP");
- } else if (window.XMLHttpRequest) {
- return new window.XMLHttpRequest();
- }
-
- throw minErr('$httpBackend')('noxhr', "This browser does not support XMLHttpRequest.");
-}
-
-/**
- * @ngdoc service
- * @name $httpBackend
- * @requires $window
- * @requires $document
- *
- * @description
- * HTTP backend used by the {@link ng.$http service} that delegates to
- * XMLHttpRequest object or JSONP and deals with browser incompatibilities.
- *
- * You should never need to use this service directly, instead use the higher-level abstractions:
- * {@link ng.$http $http} or {@link ngResource.$resource $resource}.
- *
- * During testing this implementation is swapped with {@link ngMock.$httpBackend mock
- * $httpBackend} which can be trained with responses.
- */
-function $HttpBackendProvider() {
- this.$get = ['$browser', '$window', '$document', function($browser, $window, $document) {
- return createHttpBackend($browser, createXhr, $browser.defer, $window.angular.callbacks, $document[0]);
- }];
-}
-
-function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDocument) {
- var ABORTED = -1;
-
- // TODO(vojta): fix the signature
- return function(method, url, post, callback, headers, timeout, withCredentials, responseType) {
- var status;
- $browser.$$incOutstandingRequestCount();
- url = url || $browser.url();
-
- if (lowercase(method) == 'jsonp') {
- var callbackId = '_' + (callbacks.counter++).toString(36);
- callbacks[callbackId] = function(data) {
- callbacks[callbackId].data = data;
- callbacks[callbackId].called = true;
- };
-
- var jsonpDone = jsonpReq(url.replace('JSON_CALLBACK', 'angular.callbacks.' + callbackId),
- callbackId, function(status, text) {
- completeRequest(callback, status, callbacks[callbackId].data, "", text);
- callbacks[callbackId] = noop;
- });
- } else {
-
- var xhr = createXhr(method);
-
- xhr.open(method, url, true);
- forEach(headers, function(value, key) {
- if (isDefined(value)) {
- xhr.setRequestHeader(key, value);
- }
- });
-
- // In IE6 and 7, this might be called synchronously when xhr.send below is called and the
- // response is in the cache. the promise api will ensure that to the app code the api is
- // always async
- xhr.onreadystatechange = function() {
- // onreadystatechange might get called multiple times with readyState === 4 on mobile webkit caused by
- // xhrs that are resolved while the app is in the background (see #5426).
- // since calling completeRequest sets the `xhr` variable to null, we just check if it's not null before
- // continuing
- //
- // we can't set xhr.onreadystatechange to undefined or delete it because that breaks IE8 (method=PATCH) and
- // Safari respectively.
- if (xhr && xhr.readyState == 4) {
- var responseHeaders = null,
- response = null,
- statusText = '';
-
- if(status !== ABORTED) {
- responseHeaders = xhr.getAllResponseHeaders();
-
- // responseText is the old-school way of retrieving response (supported by IE8 & 9)
- // response/responseType properties were introduced in XHR Level2 spec (supported by IE10)
- response = ('response' in xhr) ? xhr.response : xhr.responseText;
- }
-
- // Accessing statusText on an aborted xhr object will
- // throw an 'c00c023f error' in IE9 and lower, don't touch it.
- if (!(status === ABORTED && msie < 10)) {
- statusText = xhr.statusText;
- }
-
- completeRequest(callback,
- status || xhr.status,
- response,
- responseHeaders,
- statusText);
- }
- };
-
- if (withCredentials) {
- xhr.withCredentials = true;
- }
-
- if (responseType) {
- try {
- xhr.responseType = responseType;
- } catch (e) {
- // WebKit added support for the json responseType value on 09/03/2013
- // https://bugs.webkit.org/show_bug.cgi?id=73648. Versions of Safari prior to 7 are
- // known to throw when setting the value "json" as the response type. Other older
- // browsers implementing the responseType
- //
- // The json response type can be ignored if not supported, because JSON payloads are
- // parsed on the client-side regardless.
- if (responseType !== 'json') {
- throw e;
- }
- }
- }
-
- xhr.send(post || null);
- }
-
- if (timeout > 0) {
- var timeoutId = $browserDefer(timeoutRequest, timeout);
- } else if (isPromiseLike(timeout)) {
- timeout.then(timeoutRequest);
- }
-
-
- function timeoutRequest() {
- status = ABORTED;
- jsonpDone && jsonpDone();
- xhr && xhr.abort();
- }
-
- function completeRequest(callback, status, response, headersString, statusText) {
- // cancel timeout and subsequent timeout promise resolution
- timeoutId && $browserDefer.cancel(timeoutId);
- jsonpDone = xhr = null;
-
- // fix status code when it is 0 (0 status is undocumented).
- // Occurs when accessing file resources or on Android 4.1 stock browser
- // while retrieving files from application cache.
- if (status === 0) {
- status = response ? 200 : urlResolve(url).protocol == 'file' ? 404 : 0;
- }
-
- // normalize IE bug (http://bugs.jquery.com/ticket/1450)
- status = status === 1223 ? 204 : status;
- statusText = statusText || '';
-
- callback(status, response, headersString, statusText);
- $browser.$$completeOutstandingRequest(noop);
- }
- };
-
- function jsonpReq(url, callbackId, done) {
- // we can't use jQuery/jqLite here because jQuery does crazy shit with script elements, e.g.:
- // - fetches local scripts via XHR and evals them
- // - adds and immediately removes script elements from the document
- var script = rawDocument.createElement('script'), callback = null;
- script.type = "text/javascript";
- script.src = url;
- script.async = true;
-
- callback = function(event) {
- removeEventListenerFn(script, "load", callback);
- removeEventListenerFn(script, "error", callback);
- rawDocument.body.removeChild(script);
- script = null;
- var status = -1;
- var text = "unknown";
-
- if (event) {
- if (event.type === "load" && !callbacks[callbackId].called) {
- event = { type: "error" };
- }
- text = event.type;
- status = event.type === "error" ? 404 : 200;
- }
-
- if (done) {
- done(status, text);
- }
- };
-
- addEventListenerFn(script, "load", callback);
- addEventListenerFn(script, "error", callback);
-
- if (msie <= 8) {
- script.onreadystatechange = function() {
- if (isString(script.readyState) && /loaded|complete/.test(script.readyState)) {
- script.onreadystatechange = null;
- callback({
- type: 'load'
- });
- }
- };
- }
-
- rawDocument.body.appendChild(script);
- return callback;
- }
-}
-
-var $interpolateMinErr = minErr('$interpolate');
-
-/**
- * @ngdoc provider
- * @name $interpolateProvider
- * @kind function
- *
- * @description
- *
- * Used for configuring the interpolation markup. Defaults to `{{` and `}}`.
- *
- * @example
-<example module="customInterpolationApp">
-<file name="index.html">
-<script>
- var customInterpolationApp = angular.module('customInterpolationApp', []);
-
- customInterpolationApp.config(function($interpolateProvider) {
- $interpolateProvider.startSymbol('//');
- $interpolateProvider.endSymbol('//');
- });
-
-
- customInterpolationApp.controller('DemoController', function() {
- this.label = "This binding is brought you by // interpolation symbols.";
- });
-</script>
-<div ng-app="App" ng-controller="DemoController as demo">
- //demo.label//
-</div>
-</file>
-<file name="protractor.js" type="protractor">
- it('should interpolate binding with custom symbols', function() {
- expect(element(by.binding('demo.label')).getText()).toBe('This binding is brought you by // interpolation symbols.');
- });
-</file>
-</example>
- */
-function $InterpolateProvider() {
- var startSymbol = '{{';
- var endSymbol = '}}';
-
- /**
- * @ngdoc method
- * @name $interpolateProvider#startSymbol
- * @description
- * Symbol to denote start of expression in the interpolated string. Defaults to `{{`.
- *
- * @param {string=} value new value to set the starting symbol to.
- * @returns {string|self} Returns the symbol when used as getter and self if used as setter.
- */
- this.startSymbol = function(value){
- if (value) {
- startSymbol = value;
- return this;
- } else {
- return startSymbol;
- }
- };
-
- /**
- * @ngdoc method
- * @name $interpolateProvider#endSymbol
- * @description
- * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.
- *
- * @param {string=} value new value to set the ending symbol to.
- * @returns {string|self} Returns the symbol when used as getter and self if used as setter.
- */
- this.endSymbol = function(value){
- if (value) {
- endSymbol = value;
- return this;
- } else {
- return endSymbol;
- }
- };
-
-
- this.$get = ['$parse', '$exceptionHandler', '$sce', function($parse, $exceptionHandler, $sce) {
- var startSymbolLength = startSymbol.length,
- endSymbolLength = endSymbol.length;
-
- /**
- * @ngdoc service
- * @name $interpolate
- * @kind function
- *
- * @requires $parse
- * @requires $sce
- *
- * @description
- *
- * Compiles a string with markup into an interpolation function. This service is used by the
- * HTML {@link ng.$compile $compile} service for data binding. See
- * {@link ng.$interpolateProvider $interpolateProvider} for configuring the
- * interpolation markup.
- *
- *
- * ```js
- * var $interpolate = ...; // injected
- * var exp = $interpolate('Hello {{name | uppercase}}!');
- * expect(exp({name:'Angular'}).toEqual('Hello ANGULAR!');
- * ```
- *
- *
- * @param {string} text The text with markup to interpolate.
- * @param {boolean=} mustHaveExpression if set to true then the interpolation string must have
- * embedded expression in order to return an interpolation function. Strings with no
- * embedded expression will return null for the interpolation function.
- * @param {string=} trustedContext when provided, the returned function passes the interpolated
- * result through {@link ng.$sce#getTrusted $sce.getTrusted(interpolatedResult,
- * trustedContext)} before returning it. Refer to the {@link ng.$sce $sce} service that
- * provides Strict Contextual Escaping for details.
- * @returns {function(context)} an interpolation function which is used to compute the
- * interpolated string. The function has these parameters:
- *
- * * `context`: an object against which any expressions embedded in the strings are evaluated
- * against.
- *
- */
- function $interpolate(text, mustHaveExpression, trustedContext) {
- var startIndex,
- endIndex,
- index = 0,
- parts = [],
- length = text.length,
- hasInterpolation = false,
- fn,
- exp,
- concat = [];
-
- while(index < length) {
- if ( ((startIndex = text.indexOf(startSymbol, index)) != -1) &&
- ((endIndex = text.indexOf(endSymbol, startIndex + startSymbolLength)) != -1) ) {
- (index != startIndex) && parts.push(text.substring(index, startIndex));
- parts.push(fn = $parse(exp = text.substring(startIndex + startSymbolLength, endIndex)));
- fn.exp = exp;
- index = endIndex + endSymbolLength;
- hasInterpolation = true;
- } else {
- // we did not find anything, so we have to add the remainder to the parts array
- (index != length) && parts.push(text.substring(index));
- index = length;
- }
- }
-
- if (!(length = parts.length)) {
- // we added, nothing, must have been an empty string.
- parts.push('');
- length = 1;
- }
-
- // Concatenating expressions makes it hard to reason about whether some combination of
- // concatenated values are unsafe to use and could easily lead to XSS. By requiring that a
- // single expression be used for iframe[src], object[src], etc., we ensure that the value
- // that's used is assigned or constructed by some JS code somewhere that is more testable or
- // make it obvious that you bound the value to some user controlled value. This helps reduce
- // the load when auditing for XSS issues.
- if (trustedContext && parts.length > 1) {
- throw $interpolateMinErr('noconcat',
- "Error while interpolating: {0}\nStrict Contextual Escaping disallows " +
- "interpolations that concatenate multiple expressions when a trusted value is " +
- "required. See http://docs.angularjs.org/api/ng.$sce", text);
- }
-
- if (!mustHaveExpression || hasInterpolation) {
- concat.length = length;
- fn = function(context) {
- try {
- for(var i = 0, ii = length, part; i<ii; i++) {
- if (typeof (part = parts[i]) == 'function') {
- part = part(context);
- if (trustedContext) {
- part = $sce.getTrusted(trustedContext, part);
- } else {
- part = $sce.valueOf(part);
- }
- if (part == null) { // null || undefined
- part = '';
- } else {
- switch (typeof part) {
- case 'string':
- {
- break;
- }
- case 'number':
- {
- part = '' + part;
- break;
- }
- default:
- {
- part = toJson(part);
- }
- }
- }
- }
- concat[i] = part;
- }
- return concat.join('');
- }
- catch(err) {
- var newErr = $interpolateMinErr('interr', "Can't interpolate: {0}\n{1}", text,
- err.toString());
- $exceptionHandler(newErr);
- }
- };
- fn.exp = text;
- fn.parts = parts;
- return fn;
- }
- }
-
-
- /**
- * @ngdoc method
- * @name $interpolate#startSymbol
- * @description
- * Symbol to denote the start of expression in the interpolated string. Defaults to `{{`.
- *
- * Use {@link ng.$interpolateProvider#startSymbol `$interpolateProvider.startSymbol`} to change
- * the symbol.
- *
- * @returns {string} start symbol.
- */
- $interpolate.startSymbol = function() {
- return startSymbol;
- };
-
-
- /**
- * @ngdoc method
- * @name $interpolate#endSymbol
- * @description
- * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.
- *
- * Use {@link ng.$interpolateProvider#endSymbol `$interpolateProvider.endSymbol`} to change
- * the symbol.
- *
- * @returns {string} end symbol.
- */
- $interpolate.endSymbol = function() {
- return endSymbol;
- };
-
- return $interpolate;
- }];
-}
-
-function $IntervalProvider() {
- this.$get = ['$rootScope', '$window', '$q',
- function($rootScope, $window, $q) {
- var intervals = {};
-
-
- /**
- * @ngdoc service
- * @name $interval
- *
- * @description
- * Angular's wrapper for `window.setInterval`. The `fn` function is executed every `delay`
- * milliseconds.
- *
- * The return value of registering an interval function is a promise. This promise will be
- * notified upon each tick of the interval, and will be resolved after `count` iterations, or
- * run indefinitely if `count` is not defined. The value of the notification will be the
- * number of iterations that have run.
- * To cancel an interval, call `$interval.cancel(promise)`.
- *
- * In tests you can use {@link ngMock.$interval#flush `$interval.flush(millis)`} to
- * move forward by `millis` milliseconds and trigger any functions scheduled to run in that
- * time.
- *
- * <div class="alert alert-warning">
- * **Note**: Intervals created by this service must be explicitly destroyed when you are finished
- * with them. In particular they are not automatically destroyed when a controller's scope or a
- * directive's element are destroyed.
- * You should take this into consideration and make sure to always cancel the interval at the
- * appropriate moment. See the example below for more details on how and when to do this.
- * </div>
- *
- * @param {function()} fn A function that should be called repeatedly.
- * @param {number} delay Number of milliseconds between each function call.
- * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat
- * indefinitely.
- * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise
- * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.
- * @returns {promise} A promise which will be notified on each iteration.
- *
- * @example
- * <example module="intervalExample">
- * <file name="index.html">
- * <script>
- * angular.module('intervalExample', [])
- * .controller('ExampleController', ['$scope', '$interval',
- * function($scope, $interval) {
- * $scope.format = 'M/d/yy h:mm:ss a';
- * $scope.blood_1 = 100;
- * $scope.blood_2 = 120;
- *
- * var stop;
- * $scope.fight = function() {
- * // Don't start a new fight if we are already fighting
- * if ( angular.isDefined(stop) ) return;
- *
- * stop = $interval(function() {
- * if ($scope.blood_1 > 0 && $scope.blood_2 > 0) {
- * $scope.blood_1 = $scope.blood_1 - 3;
- * $scope.blood_2 = $scope.blood_2 - 4;
- * } else {
- * $scope.stopFight();
- * }
- * }, 100);
- * };
- *
- * $scope.stopFight = function() {
- * if (angular.isDefined(stop)) {
- * $interval.cancel(stop);
- * stop = undefined;
- * }
- * };
- *
- * $scope.resetFight = function() {
- * $scope.blood_1 = 100;
- * $scope.blood_2 = 120;
- * };
- *
- * $scope.$on('$destroy', function() {
- * // Make sure that the interval is destroyed too
- * $scope.stopFight();
- * });
- * }])
- * // Register the 'myCurrentTime' directive factory method.
- * // We inject $interval and dateFilter service since the factory method is DI.
- * .directive('myCurrentTime', ['$interval', 'dateFilter',
- * function($interval, dateFilter) {
- * // return the directive link function. (compile function not needed)
- * return function(scope, element, attrs) {
- * var format, // date format
- * stopTime; // so that we can cancel the time updates
- *
- * // used to update the UI
- * function updateTime() {
- * element.text(dateFilter(new Date(), format));
- * }
- *
- * // watch the expression, and update the UI on change.
- * scope.$watch(attrs.myCurrentTime, function(value) {
- * format = value;
- * updateTime();
- * });
- *
- * stopTime = $interval(updateTime, 1000);
- *
- * // listen on DOM destroy (removal) event, and cancel the next UI update
- * // to prevent updating time after the DOM element was removed.
- * element.bind('$destroy', function() {
- * $interval.cancel(stopTime);
- * });
- * }
- * }]);
- * </script>
- *
- * <div>
- * <div ng-controller="ExampleController">
- * Date format: <input ng-model="format"> <hr/>
- * Current time is: <span my-current-time="format"></span>
- * <hr/>
- * Blood 1 : <font color='red'>{{blood_1}}</font>
- * Blood 2 : <font color='red'>{{blood_2}}</font>
- * <button type="button" data-ng-click="fight()">Fight</button>
- * <button type="button" data-ng-click="stopFight()">StopFight</button>
- * <button type="button" data-ng-click="resetFight()">resetFight</button>
- * </div>
- * </div>
- *
- * </file>
- * </example>
- */
- function interval(fn, delay, count, invokeApply) {
- var setInterval = $window.setInterval,
- clearInterval = $window.clearInterval,
- deferred = $q.defer(),
- promise = deferred.promise,
- iteration = 0,
- skipApply = (isDefined(invokeApply) && !invokeApply);
-
- count = isDefined(count) ? count : 0;
-
- promise.then(null, null, fn);
-
- promise.$$intervalId = setInterval(function tick() {
- deferred.notify(iteration++);
-
- if (count > 0 && iteration >= count) {
- deferred.resolve(iteration);
- clearInterval(promise.$$intervalId);
- delete intervals[promise.$$intervalId];
- }
-
- if (!skipApply) $rootScope.$apply();
-
- }, delay);
-
- intervals[promise.$$intervalId] = deferred;
-
- return promise;
- }
-
-
- /**
- * @ngdoc method
- * @name $interval#cancel
- *
- * @description
- * Cancels a task associated with the `promise`.
- *
- * @param {promise} promise returned by the `$interval` function.
- * @returns {boolean} Returns `true` if the task was successfully canceled.
- */
- interval.cancel = function(promise) {
- if (promise && promise.$$intervalId in intervals) {
- intervals[promise.$$intervalId].reject('canceled');
- $window.clearInterval(promise.$$intervalId);
- delete intervals[promise.$$intervalId];
- return true;
- }
- return false;
- };
-
- return interval;
- }];
-}
-
-/**
- * @ngdoc service
- * @name $locale
- *
- * @description
- * $locale service provides localization rules for various Angular components. As of right now the
- * only public api is:
- *
- * * `id` – `{string}` – locale id formatted as `languageId-countryId` (e.g. `en-us`)
- */
-function $LocaleProvider(){
- this.$get = function() {
- return {
- id: 'en-us',
-
- NUMBER_FORMATS: {
- DECIMAL_SEP: '.',
- GROUP_SEP: ',',
- PATTERNS: [
- { // Decimal Pattern
- minInt: 1,
- minFrac: 0,
- maxFrac: 3,
- posPre: '',
- posSuf: '',
- negPre: '-',
- negSuf: '',
- gSize: 3,
- lgSize: 3
- },{ //Currency Pattern
- minInt: 1,
- minFrac: 2,
- maxFrac: 2,
- posPre: '\u00A4',
- posSuf: '',
- negPre: '(\u00A4',
- negSuf: ')',
- gSize: 3,
- lgSize: 3
- }
- ],
- CURRENCY_SYM: '$'
- },
-
- DATETIME_FORMATS: {
- MONTH:
- 'January,February,March,April,May,June,July,August,September,October,November,December'
- .split(','),
- SHORTMONTH: 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','),
- DAY: 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'.split(','),
- SHORTDAY: 'Sun,Mon,Tue,Wed,Thu,Fri,Sat'.split(','),
- AMPMS: ['AM','PM'],
- medium: 'MMM d, y h:mm:ss a',
- short: 'M/d/yy h:mm a',
- fullDate: 'EEEE, MMMM d, y',
- longDate: 'MMMM d, y',
- mediumDate: 'MMM d, y',
- shortDate: 'M/d/yy',
- mediumTime: 'h:mm:ss a',
- shortTime: 'h:mm a'
- },
-
- pluralCat: function(num) {
- if (num === 1) {
- return 'one';
- }
- return 'other';
- }
- };
- };
-}
-
-var PATH_MATCH = /^([^\?#]*)(\?([^#]*))?(#(.*))?$/,
- DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21};
-var $locationMinErr = minErr('$location');
-
-
-/**
- * Encode path using encodeUriSegment, ignoring forward slashes
- *
- * @param {string} path Path to encode
- * @returns {string}
- */
-function encodePath(path) {
- var segments = path.split('/'),
- i = segments.length;
-
- while (i--) {
- segments[i] = encodeUriSegment(segments[i]);
- }
-
- return segments.join('/');
-}
-
-function parseAbsoluteUrl(absoluteUrl, locationObj, appBase) {
- var parsedUrl = urlResolve(absoluteUrl, appBase);
-
- locationObj.$$protocol = parsedUrl.protocol;
- locationObj.$$host = parsedUrl.hostname;
- locationObj.$$port = int(parsedUrl.port) || DEFAULT_PORTS[parsedUrl.protocol] || null;
-}
-
-
-function parseAppUrl(relativeUrl, locationObj, appBase) {
- var prefixed = (relativeUrl.charAt(0) !== '/');
- if (prefixed) {
- relativeUrl = '/' + relativeUrl;
- }
- var match = urlResolve(relativeUrl, appBase);
- locationObj.$$path = decodeURIComponent(prefixed && match.pathname.charAt(0) === '/' ?
- match.pathname.substring(1) : match.pathname);
- locationObj.$$search = parseKeyValue(match.search);
- locationObj.$$hash = decodeURIComponent(match.hash);
-
- // make sure path starts with '/';
- if (locationObj.$$path && locationObj.$$path.charAt(0) != '/') {
- locationObj.$$path = '/' + locationObj.$$path;
- }
-}
-
-
-/**
- *
- * @param {string} begin
- * @param {string} whole
- * @returns {string} returns text from whole after begin or undefined if it does not begin with
- * expected string.
- */
-function beginsWith(begin, whole) {
- if (whole.indexOf(begin) === 0) {
- return whole.substr(begin.length);
- }
-}
-
-
-function stripHash(url) {
- var index = url.indexOf('#');
- return index == -1 ? url : url.substr(0, index);
-}
-
-
-function stripFile(url) {
- return url.substr(0, stripHash(url).lastIndexOf('/') + 1);
-}
-
-/* return the server only (scheme://host:port) */
-function serverBase(url) {
- return url.substring(0, url.indexOf('/', url.indexOf('//') + 2));
-}
-
-
-/**
- * LocationHtml5Url represents an url
- * This object is exposed as $location service when HTML5 mode is enabled and supported
- *
- * @constructor
- * @param {string} appBase application base URL
- * @param {string} basePrefix url path prefix
- */
-function LocationHtml5Url(appBase, basePrefix) {
- this.$$html5 = true;
- basePrefix = basePrefix || '';
- var appBaseNoFile = stripFile(appBase);
- parseAbsoluteUrl(appBase, this, appBase);
-
-
- /**
- * Parse given html5 (regular) url string into properties
- * @param {string} newAbsoluteUrl HTML5 url
- * @private
- */
- this.$$parse = function(url) {
- var pathUrl = beginsWith(appBaseNoFile, url);
- if (!isString(pathUrl)) {
- throw $locationMinErr('ipthprfx', 'Invalid url "{0}", missing path prefix "{1}".', url,
- appBaseNoFile);
- }
-
- parseAppUrl(pathUrl, this, appBase);
-
- if (!this.$$path) {
- this.$$path = '/';
- }
-
- this.$$compose();
- };
-
- /**
- * Compose url and update `absUrl` property
- * @private
- */
- this.$$compose = function() {
- var search = toKeyValue(this.$$search),
- hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';
-
- this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;
- this.$$absUrl = appBaseNoFile + this.$$url.substr(1); // first char is always '/'
- };
-
- this.$$rewrite = function(url) {
- var appUrl, prevAppUrl;
-
- if ( (appUrl = beginsWith(appBase, url)) !== undefined ) {
- prevAppUrl = appUrl;
- if ( (appUrl = beginsWith(basePrefix, appUrl)) !== undefined ) {
- return appBaseNoFile + (beginsWith('/', appUrl) || appUrl);
- } else {
- return appBase + prevAppUrl;
- }
- } else if ( (appUrl = beginsWith(appBaseNoFile, url)) !== undefined ) {
- return appBaseNoFile + appUrl;
- } else if (appBaseNoFile == url + '/') {
- return appBaseNoFile;
- }
- };
-}
-
-
-/**
- * LocationHashbangUrl represents url
- * This object is exposed as $location service when developer doesn't opt into html5 mode.
- * It also serves as the base class for html5 mode fallback on legacy browsers.
- *
- * @constructor
- * @param {string} appBase application base URL
- * @param {string} hashPrefix hashbang prefix
- */
-function LocationHashbangUrl(appBase, hashPrefix) {
- var appBaseNoFile = stripFile(appBase);
-
- parseAbsoluteUrl(appBase, this, appBase);
-
-
- /**
- * Parse given hashbang url into properties
- * @param {string} url Hashbang url
- * @private
- */
- this.$$parse = function(url) {
- var withoutBaseUrl = beginsWith(appBase, url) || beginsWith(appBaseNoFile, url);
- var withoutHashUrl = withoutBaseUrl.charAt(0) == '#'
- ? beginsWith(hashPrefix, withoutBaseUrl)
- : (this.$$html5)
- ? withoutBaseUrl
- : '';
-
- if (!isString(withoutHashUrl)) {
- throw $locationMinErr('ihshprfx', 'Invalid url "{0}", missing hash prefix "{1}".', url,
- hashPrefix);
- }
- parseAppUrl(withoutHashUrl, this, appBase);
-
- this.$$path = removeWindowsDriveName(this.$$path, withoutHashUrl, appBase);
-
- this.$$compose();
-
- /*
- * In Windows, on an anchor node on documents loaded from
- * the filesystem, the browser will return a pathname
- * prefixed with the drive name ('/C:/path') when a
- * pathname without a drive is set:
- * * a.setAttribute('href', '/foo')
- * * a.pathname === '/C:/foo' //true
- *
- * Inside of Angular, we're always using pathnames that
- * do not include drive names for routing.
- */
- function removeWindowsDriveName (path, url, base) {
- /*
- Matches paths for file protocol on windows,
- such as /C:/foo/bar, and captures only /foo/bar.
- */
- var windowsFilePathExp = /^\/[A-Z]:(\/.*)/;
-
- var firstPathSegmentMatch;
-
- //Get the relative path from the input URL.
- if (url.indexOf(base) === 0) {
- url = url.replace(base, '');
- }
-
- // The input URL intentionally contains a first path segment that ends with a colon.
- if (windowsFilePathExp.exec(url)) {
- return path;
- }
-
- firstPathSegmentMatch = windowsFilePathExp.exec(path);
- return firstPathSegmentMatch ? firstPathSegmentMatch[1] : path;
- }
- };
-
- /**
- * Compose hashbang url and update `absUrl` property
- * @private
- */
- this.$$compose = function() {
- var search = toKeyValue(this.$$search),
- hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';
-
- this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;
- this.$$absUrl = appBase + (this.$$url ? hashPrefix + this.$$url : '');
- };
-
- this.$$rewrite = function(url) {
- if(stripHash(appBase) == stripHash(url)) {
- return url;
- }
- };
-}
-
-
-/**
- * LocationHashbangUrl represents url
- * This object is exposed as $location service when html5 history api is enabled but the browser
- * does not support it.
- *
- * @constructor
- * @param {string} appBase application base URL
- * @param {string} hashPrefix hashbang prefix
- */
-function LocationHashbangInHtml5Url(appBase, hashPrefix) {
- this.$$html5 = true;
- LocationHashbangUrl.apply(this, arguments);
-
- var appBaseNoFile = stripFile(appBase);
-
- this.$$rewrite = function(url) {
- var appUrl;
-
- if ( appBase == stripHash(url) ) {
- return url;
- } else if ( (appUrl = beginsWith(appBaseNoFile, url)) ) {
- return appBase + hashPrefix + appUrl;
- } else if ( appBaseNoFile === url + '/') {
- return appBaseNoFile;
- }
- };
-
- this.$$compose = function() {
- var search = toKeyValue(this.$$search),
- hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';
-
- this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;
- // include hashPrefix in $$absUrl when $$url is empty so IE8 & 9 do not reload page because of removal of '#'
- this.$$absUrl = appBase + hashPrefix + this.$$url;
- };
-
-}
-
-
-LocationHashbangInHtml5Url.prototype =
- LocationHashbangUrl.prototype =
- LocationHtml5Url.prototype = {
-
- /**
- * Are we in html5 mode?
- * @private
- */
- $$html5: false,
-
- /**
- * Has any change been replacing ?
- * @private
- */
- $$replace: false,
-
- /**
- * @ngdoc method
- * @name $location#absUrl
- *
- * @description
- * This method is getter only.
- *
- * Return full url representation with all segments encoded according to rules specified in
- * [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt).
- *
- * @return {string} full url
- */
- absUrl: locationGetter('$$absUrl'),
-
- /**
- * @ngdoc method
- * @name $location#url
- *
- * @description
- * This method is getter / setter.
- *
- * Return url (e.g. `/path?a=b#hash`) when called without any parameter.
- *
- * Change path, search and hash, when called with parameter and return `$location`.
- *
- * @param {string=} url New url without base prefix (e.g. `/path?a=b#hash`)
- * @return {string} url
- */
- url: function(url) {
- if (isUndefined(url))
- return this.$$url;
-
- var match = PATH_MATCH.exec(url);
- if (match[1]) this.path(decodeURIComponent(match[1]));
- if (match[2] || match[1]) this.search(match[3] || '');
- this.hash(match[5] || '');
-
- return this;
- },
-
- /**
- * @ngdoc method
- * @name $location#protocol
- *
- * @description
- * This method is getter only.
- *
- * Return protocol of current url.
- *
- * @return {string} protocol of current url
- */
- protocol: locationGetter('$$protocol'),
-
- /**
- * @ngdoc method
- * @name $location#host
- *
- * @description
- * This method is getter only.
- *
- * Return host of current url.
- *
- * @return {string} host of current url.
- */
- host: locationGetter('$$host'),
-
- /**
- * @ngdoc method
- * @name $location#port
- *
- * @description
- * This method is getter only.
- *
- * Return port of current url.
- *
- * @return {Number} port
- */
- port: locationGetter('$$port'),
-
- /**
- * @ngdoc method
- * @name $location#path
- *
- * @description
- * This method is getter / setter.
- *
- * Return path of current url when called without any parameter.
- *
- * Change path when called with parameter and return `$location`.
- *
- * Note: Path should always begin with forward slash (/), this method will add the forward slash
- * if it is missing.
- *
- * @param {(string|number)=} path New path
- * @return {string} path
- */
- path: locationGetterSetter('$$path', function(path) {
- path = path ? path.toString() : '';
- return path.charAt(0) == '/' ? path : '/' + path;
- }),
-
- /**
- * @ngdoc method
- * @name $location#search
- *
- * @description
- * This method is getter / setter.
- *
- * Return search part (as object) of current url when called without any parameter.
- *
- * Change search part when called with parameter and return `$location`.
- *
- *
- * ```js
- * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
- * var searchObject = $location.search();
- * // => {foo: 'bar', baz: 'xoxo'}
- *
- *
- * // set foo to 'yipee'
- * $location.search('foo', 'yipee');
- * // => $location
- * ```
- *
- * @param {string|Object.<string>|Object.<Array.<string>>} search New search params - string or
- * hash object.
- *
- * When called with a single argument the method acts as a setter, setting the `search` component
- * of `$location` to the specified value.
- *
- * If the argument is a hash object containing an array of values, these values will be encoded
- * as duplicate search parameters in the url.
- *
- * @param {(string|Number|Array<string>|boolean)=} paramValue If `search` is a string or number, then `paramValue`
- * will override only a single search property.
- *
- * If `paramValue` is an array, it will override the property of the `search` component of
- * `$location` specified via the first argument.
- *
- * If `paramValue` is `null`, the property specified via the first argument will be deleted.
- *
- * If `paramValue` is `true`, the property specified via the first argument will be added with no
- * value nor trailing equal sign.
- *
- * @return {Object} If called with no arguments returns the parsed `search` object. If called with
- * one or more arguments returns `$location` object itself.
- */
- search: function(search, paramValue) {
- switch (arguments.length) {
- case 0:
- return this.$$search;
- case 1:
- if (isString(search) || isNumber(search)) {
- search = search.toString();
- this.$$search = parseKeyValue(search);
- } else if (isObject(search)) {
- // remove object undefined or null properties
- forEach(search, function(value, key) {
- if (value == null) delete search[key];
- });
-
- this.$$search = search;
- } else {
- throw $locationMinErr('isrcharg',
- 'The first argument of the `$location#search()` call must be a string or an object.');
- }
- break;
- default:
- if (isUndefined(paramValue) || paramValue === null) {
- delete this.$$search[search];
- } else {
- this.$$search[search] = paramValue;
- }
- }
-
- this.$$compose();
- return this;
- },
-
- /**
- * @ngdoc method
- * @name $location#hash
- *
- * @description
- * This method is getter / setter.
- *
- * Return hash fragment when called without any parameter.
- *
- * Change hash fragment when called with parameter and return `$location`.
- *
- * @param {(string|number)=} hash New hash fragment
- * @return {string} hash
- */
- hash: locationGetterSetter('$$hash', function(hash) {
- return hash ? hash.toString() : '';
- }),
-
- /**
- * @ngdoc method
- * @name $location#replace
- *
- * @description
- * If called, all changes to $location during current `$digest` will be replacing current history
- * record, instead of adding new one.
- */
- replace: function() {
- this.$$replace = true;
- return this;
- }
-};
-
-function locationGetter(property) {
- return function() {
- return this[property];
- };
-}
-
-
-function locationGetterSetter(property, preprocess) {
- return function(value) {
- if (isUndefined(value))
- return this[property];
-
- this[property] = preprocess(value);
- this.$$compose();
-
- return this;
- };
-}
-
-
-/**
- * @ngdoc service
- * @name $location
- *
- * @requires $rootElement
- *
- * @description
- * The $location service parses the URL in the browser address bar (based on the
- * [window.location](https://developer.mozilla.org/en/window.location)) and makes the URL
- * available to your application. Changes to the URL in the address bar are reflected into
- * $location service and changes to $location are reflected into the browser address bar.
- *
- * **The $location service:**
- *
- * - Exposes the current URL in the browser address bar, so you can
- * - Watch and observe the URL.
- * - Change the URL.
- * - Synchronizes the URL with the browser when the user
- * - Changes the address bar.
- * - Clicks the back or forward button (or clicks a History link).
- * - Clicks on a link.
- * - Represents the URL object as a set of methods (protocol, host, port, path, search, hash).
- *
- * For more information see {@link guide/$location Developer Guide: Using $location}
- */
-
-/**
- * @ngdoc provider
- * @name $locationProvider
- * @description
- * Use the `$locationProvider` to configure how the application deep linking paths are stored.
- */
-function $LocationProvider(){
- var hashPrefix = '',
- html5Mode = false;
-
- /**
- * @ngdoc method
- * @name $locationProvider#hashPrefix
- * @description
- * @param {string=} prefix Prefix for hash part (containing path and search)
- * @returns {*} current value if used as getter or itself (chaining) if used as setter
- */
- this.hashPrefix = function(prefix) {
- if (isDefined(prefix)) {
- hashPrefix = prefix;
- return this;
- } else {
- return hashPrefix;
- }
- };
-
- /**
- * @ngdoc method
- * @name $locationProvider#html5Mode
- * @description
- * @param {boolean=} mode Use HTML5 strategy if available.
- * @returns {*} current value if used as getter or itself (chaining) if used as setter
- */
- this.html5Mode = function(mode) {
- if (isDefined(mode)) {
- html5Mode = mode;
- return this;
- } else {
- return html5Mode;
- }
- };
-
- /**
- * @ngdoc event
- * @name $location#$locationChangeStart
- * @eventType broadcast on root scope
- * @description
- * Broadcasted before a URL will change. This change can be prevented by calling
- * `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} for more
- * details about event object. Upon successful change
- * {@link ng.$location#events_$locationChangeSuccess $locationChangeSuccess} is fired.
- *
- * @param {Object} angularEvent Synthetic event object.
- * @param {string} newUrl New URL
- * @param {string=} oldUrl URL that was before it was changed.
- */
-
- /**
- * @ngdoc event
- * @name $location#$locationChangeSuccess
- * @eventType broadcast on root scope
- * @description
- * Broadcasted after a URL was changed.
- *
- * @param {Object} angularEvent Synthetic event object.
- * @param {string} newUrl New URL
- * @param {string=} oldUrl URL that was before it was changed.
- */
-
- this.$get = ['$rootScope', '$browser', '$sniffer', '$rootElement',
- function( $rootScope, $browser, $sniffer, $rootElement) {
- var $location,
- LocationMode,
- baseHref = $browser.baseHref(), // if base[href] is undefined, it defaults to ''
- initialUrl = $browser.url(),
- appBase;
-
- if (html5Mode) {
- appBase = serverBase(initialUrl) + (baseHref || '/');
- LocationMode = $sniffer.history ? LocationHtml5Url : LocationHashbangInHtml5Url;
- } else {
- appBase = stripHash(initialUrl);
- LocationMode = LocationHashbangUrl;
- }
- $location = new LocationMode(appBase, '#' + hashPrefix);
- $location.$$parse($location.$$rewrite(initialUrl));
-
- var IGNORE_URI_REGEXP = /^\s*(javascript|mailto):/i;
-
- $rootElement.on('click', function(event) {
- // TODO(vojta): rewrite link when opening in new tab/window (in legacy browser)
- // currently we open nice url link and redirect then
-
- if (event.ctrlKey || event.metaKey || event.which == 2) return;
-
- var elm = jqLite(event.target);
-
- // traverse the DOM up to find first A tag
- while (lowercase(elm[0].nodeName) !== 'a') {
- // ignore rewriting if no A tag (reached root element, or no parent - removed from document)
- if (elm[0] === $rootElement[0] || !(elm = elm.parent())[0]) return;
- }
-
- var absHref = elm.prop('href');
-
- if (isObject(absHref) && absHref.toString() === '[object SVGAnimatedString]') {
- // SVGAnimatedString.animVal should be identical to SVGAnimatedString.baseVal, unless during
- // an animation.
- absHref = urlResolve(absHref.animVal).href;
- }
-
- // Ignore when url is started with javascript: or mailto:
- if (IGNORE_URI_REGEXP.test(absHref)) return;
-
- // Make relative links work in HTML5 mode for legacy browsers (or at least IE8 & 9)
- // The href should be a regular url e.g. /link/somewhere or link/somewhere or ../somewhere or
- // somewhere#anchor or http://example.com/somewhere
- if (LocationMode === LocationHashbangInHtml5Url) {
- // get the actual href attribute - see
- // http://msdn.microsoft.com/en-us/library/ie/dd347148(v=vs.85).aspx
- var href = elm.attr('href') || elm.attr('xlink:href');
-
- if (href && href.indexOf('://') < 0) { // Ignore absolute URLs
- var prefix = '#' + hashPrefix;
- if (href[0] == '/') {
- // absolute path - replace old path
- absHref = appBase + prefix + href;
- } else if (href[0] == '#') {
- // local anchor
- absHref = appBase + prefix + ($location.path() || '/') + href;
- } else {
- // relative path - join with current path
- var stack = $location.path().split("/"),
- parts = href.split("/");
- if (stack.length === 2 && !stack[1]) stack.length = 1;
- for (var i=0; i<parts.length; i++) {
- if (parts[i] == ".")
- continue;
- else if (parts[i] == "..")
- stack.pop();
- else if (parts[i].length)
- stack.push(parts[i]);
- }
- absHref = appBase + prefix + stack.join('/');
- }
- }
- }
-
- var rewrittenUrl = $location.$$rewrite(absHref);
-
- if (absHref && !elm.attr('target') && rewrittenUrl && !event.isDefaultPrevented()) {
- event.preventDefault();
- if (rewrittenUrl != $browser.url()) {
- // update location manually
- $location.$$parse(rewrittenUrl);
- $rootScope.$apply();
- // hack to work around FF6 bug 684208 when scenario runner clicks on links
- window.angular['ff-684208-preventDefault'] = true;
- }
- }
- });
-
-
- // rewrite hashbang url <> html5 url
- if ($location.absUrl() != initialUrl) {
- $browser.url($location.absUrl(), true);
- }
-
- // update $location when $browser url changes
- $browser.onUrlChange(function(newUrl) {
- if ($location.absUrl() != newUrl) {
- $rootScope.$evalAsync(function() {
- var oldUrl = $location.absUrl();
-
- $location.$$parse(newUrl);
- if ($rootScope.$broadcast('$locationChangeStart', newUrl,
- oldUrl).defaultPrevented) {
- $location.$$parse(oldUrl);
- $browser.url(oldUrl);
- } else {
- afterLocationChange(oldUrl);
- }
- });
- if (!$rootScope.$$phase) $rootScope.$digest();
- }
- });
-
- // update browser
- var changeCounter = 0;
- $rootScope.$watch(function $locationWatch() {
- var oldUrl = $browser.url();
- var currentReplace = $location.$$replace;
-
- if (!changeCounter || oldUrl != $location.absUrl()) {
- changeCounter++;
- $rootScope.$evalAsync(function() {
- if ($rootScope.$broadcast('$locationChangeStart', $location.absUrl(), oldUrl).
- defaultPrevented) {
- $location.$$parse(oldUrl);
- } else {
- $browser.url($location.absUrl(), currentReplace);
- afterLocationChange(oldUrl);
- }
- });
- }
- $location.$$replace = false;
-
- return changeCounter;
- });
-
- return $location;
-
- function afterLocationChange(oldUrl) {
- $rootScope.$broadcast('$locationChangeSuccess', $location.absUrl(), oldUrl);
- }
-}];
-}
-
-/**
- * @ngdoc service
- * @name $log
- * @requires $window
- *
- * @description
- * Simple service for logging. Default implementation safely writes the message
- * into the browser's console (if present).
- *
- * The main purpose of this service is to simplify debugging and troubleshooting.
- *
- * The default is to log `debug` messages. You can use
- * {@link ng.$logProvider ng.$logProvider#debugEnabled} to change this.
- *
- * @example
- <example module="logExample">
- <file name="script.js">
- angular.module('logExample', [])
- .controller('LogController', ['$scope', '$log', function($scope, $log) {
- $scope.$log = $log;
- $scope.message = 'Hello World!';
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="LogController">
- <p>Reload this page with open console, enter text and hit the log button...</p>
- Message:
- <input type="text" ng-model="message"/>
- <button ng-click="$log.log(message)">log</button>
- <button ng-click="$log.warn(message)">warn</button>
- <button ng-click="$log.info(message)">info</button>
- <button ng-click="$log.error(message)">error</button>
- </div>
- </file>
- </example>
- */
-
-/**
- * @ngdoc provider
- * @name $logProvider
- * @description
- * Use the `$logProvider` to configure how the application logs messages
- */
-function $LogProvider(){
- var debug = true,
- self = this;
-
- /**
- * @ngdoc method
- * @name $logProvider#debugEnabled
- * @description
- * @param {boolean=} flag enable or disable debug level messages
- * @returns {*} current value if used as getter or itself (chaining) if used as setter
- */
- this.debugEnabled = function(flag) {
- if (isDefined(flag)) {
- debug = flag;
- return this;
- } else {
- return debug;
- }
- };
-
- this.$get = ['$window', function($window){
- return {
- /**
- * @ngdoc method
- * @name $log#log
- *
- * @description
- * Write a log message
- */
- log: consoleLog('log'),
-
- /**
- * @ngdoc method
- * @name $log#info
- *
- * @description
- * Write an information message
- */
- info: consoleLog('info'),
-
- /**
- * @ngdoc method
- * @name $log#warn
- *
- * @description
- * Write a warning message
- */
- warn: consoleLog('warn'),
-
- /**
- * @ngdoc method
- * @name $log#error
- *
- * @description
- * Write an error message
- */
- error: consoleLog('error'),
-
- /**
- * @ngdoc method
- * @name $log#debug
- *
- * @description
- * Write a debug message
- */
- debug: (function () {
- var fn = consoleLog('debug');
-
- return function() {
- if (debug) {
- fn.apply(self, arguments);
- }
- };
- }())
- };
-
- function formatError(arg) {
- if (arg instanceof Error) {
- if (arg.stack) {
- arg = (arg.message && arg.stack.indexOf(arg.message) === -1)
- ? 'Error: ' + arg.message + '\n' + arg.stack
- : arg.stack;
- } else if (arg.sourceURL) {
- arg = arg.message + '\n' + arg.sourceURL + ':' + arg.line;
- }
- }
- return arg;
- }
-
- function consoleLog(type) {
- var console = $window.console || {},
- logFn = console[type] || console.log || noop,
- hasApply = false;
-
- // Note: reading logFn.apply throws an error in IE11 in IE8 document mode.
- // The reason behind this is that console.log has type "object" in IE8...
- try {
- hasApply = !!logFn.apply;
- } catch (e) {}
-
- if (hasApply) {
- return function() {
- var args = [];
- forEach(arguments, function(arg) {
- args.push(formatError(arg));
- });
- return logFn.apply(console, args);
- };
- }
-
- // we are IE which either doesn't have window.console => this is noop and we do nothing,
- // or we are IE where console.log doesn't have apply so we log at least first 2 args
- return function(arg1, arg2) {
- logFn(arg1, arg2 == null ? '' : arg2);
- };
- }
- }];
-}
-
-var $parseMinErr = minErr('$parse');
-var promiseWarningCache = {};
-var promiseWarning;
-
-// Sandboxing Angular Expressions
-// ------------------------------
-// Angular expressions are generally considered safe because these expressions only have direct
-// access to $scope and locals. However, one can obtain the ability to execute arbitrary JS code by
-// obtaining a reference to native JS functions such as the Function constructor.
-//
-// As an example, consider the following Angular expression:
-//
-// {}.toString.constructor('alert("evil JS code")')
-//
-// This sandboxing technique is not perfect and doesn't aim to be. The goal is to prevent exploits
-// against the expression language, but not to prevent exploits that were enabled by exposing
-// sensitive JavaScript or browser apis on Scope. Exposing such objects on a Scope is never a good
-// practice and therefore we are not even trying to protect against interaction with an object
-// explicitly exposed in this way.
-//
-// In general, it is not possible to access a Window object from an angular expression unless a
-// window or some DOM object that has a reference to window is published onto a Scope.
-// Similarly we prevent invocations of function known to be dangerous, as well as assignments to
-// native objects.
-
-
-function ensureSafeMemberName(name, fullExpression) {
- if (name === "__defineGetter__" || name === "__defineSetter__"
- || name === "__lookupGetter__" || name === "__lookupSetter__"
- || name === "__proto__") {
- throw $parseMinErr('isecfld',
- 'Attempting to access a disallowed field in Angular expressions! '
- +'Expression: {0}', fullExpression);
- }
- return name;
-}
-
-function ensureSafeObject(obj, fullExpression) {
- // nifty check if obj is Function that is fast and works across iframes and other contexts
- if (obj) {
- if (obj.constructor === obj) {
- throw $parseMinErr('isecfn',
- 'Referencing Function in Angular expressions is disallowed! Expression: {0}',
- fullExpression);
- } else if (// isWindow(obj)
- obj.document && obj.location && obj.alert && obj.setInterval) {
- throw $parseMinErr('isecwindow',
- 'Referencing the Window in Angular expressions is disallowed! Expression: {0}',
- fullExpression);
- } else if (// isElement(obj)
- obj.children && (obj.nodeName || (obj.prop && obj.attr && obj.find))) {
- throw $parseMinErr('isecdom',
- 'Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}',
- fullExpression);
- } else if (// block Object so that we can't get hold of dangerous Object.* methods
- obj === Object) {
- throw $parseMinErr('isecobj',
- 'Referencing Object in Angular expressions is disallowed! Expression: {0}',
- fullExpression);
- }
- }
- return obj;
-}
-
-var CALL = Function.prototype.call;
-var APPLY = Function.prototype.apply;
-var BIND = Function.prototype.bind;
-
-function ensureSafeFunction(obj, fullExpression) {
- if (obj) {
- if (obj.constructor === obj) {
- throw $parseMinErr('isecfn',
- 'Referencing Function in Angular expressions is disallowed! Expression: {0}',
- fullExpression);
- } else if (obj === CALL || obj === APPLY || (BIND && obj === BIND)) {
- throw $parseMinErr('isecff',
- 'Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}',
- fullExpression);
- }
- }
-}
-
-var OPERATORS = {
- /* jshint bitwise : false */
- 'null':function(){return null;},
- 'true':function(){return true;},
- 'false':function(){return false;},
- undefined:noop,
- '+':function(self, locals, a,b){
- a=a(self, locals); b=b(self, locals);
- if (isDefined(a)) {
- if (isDefined(b)) {
- return a + b;
- }
- return a;
- }
- return isDefined(b)?b:undefined;},
- '-':function(self, locals, a,b){
- a=a(self, locals); b=b(self, locals);
- return (isDefined(a)?a:0)-(isDefined(b)?b:0);
- },
- '*':function(self, locals, a,b){return a(self, locals)*b(self, locals);},
- '/':function(self, locals, a,b){return a(self, locals)/b(self, locals);},
- '%':function(self, locals, a,b){return a(self, locals)%b(self, locals);},
- '^':function(self, locals, a,b){return a(self, locals)^b(self, locals);},
- '=':noop,
- '===':function(self, locals, a, b){return a(self, locals)===b(self, locals);},
- '!==':function(self, locals, a, b){return a(self, locals)!==b(self, locals);},
- '==':function(self, locals, a,b){return a(self, locals)==b(self, locals);},
- '!=':function(self, locals, a,b){return a(self, locals)!=b(self, locals);},
- '<':function(self, locals, a,b){return a(self, locals)<b(self, locals);},
- '>':function(self, locals, a,b){return a(self, locals)>b(self, locals);},
- '<=':function(self, locals, a,b){return a(self, locals)<=b(self, locals);},
- '>=':function(self, locals, a,b){return a(self, locals)>=b(self, locals);},
- '&&':function(self, locals, a,b){return a(self, locals)&&b(self, locals);},
- '||':function(self, locals, a,b){return a(self, locals)||b(self, locals);},
- '&':function(self, locals, a,b){return a(self, locals)&b(self, locals);},
-// '|':function(self, locals, a,b){return a|b;},
- '|':function(self, locals, a,b){return b(self, locals)(self, locals, a(self, locals));},
- '!':function(self, locals, a){return !a(self, locals);}
-};
-/* jshint bitwise: true */
-var ESCAPE = {"n":"\n", "f":"\f", "r":"\r", "t":"\t", "v":"\v", "'":"'", '"':'"'};
-
-
-/////////////////////////////////////////
-
-
-/**
- * @constructor
- */
-var Lexer = function (options) {
- this.options = options;
-};
-
-Lexer.prototype = {
- constructor: Lexer,
-
- lex: function (text) {
- this.text = text;
-
- this.index = 0;
- this.ch = undefined;
- this.lastCh = ':'; // can start regexp
-
- this.tokens = [];
-
- while (this.index < this.text.length) {
- this.ch = this.text.charAt(this.index);
- if (this.is('"\'')) {
- this.readString(this.ch);
- } else if (this.isNumber(this.ch) || this.is('.') && this.isNumber(this.peek())) {
- this.readNumber();
- } else if (this.isIdent(this.ch)) {
- this.readIdent();
- } else if (this.is('(){}[].,;:?')) {
- this.tokens.push({
- index: this.index,
- text: this.ch
- });
- this.index++;
- } else if (this.isWhitespace(this.ch)) {
- this.index++;
- continue;
- } else {
- var ch2 = this.ch + this.peek();
- var ch3 = ch2 + this.peek(2);
- var fn = OPERATORS[this.ch];
- var fn2 = OPERATORS[ch2];
- var fn3 = OPERATORS[ch3];
- if (fn3) {
- this.tokens.push({index: this.index, text: ch3, fn: fn3});
- this.index += 3;
- } else if (fn2) {
- this.tokens.push({index: this.index, text: ch2, fn: fn2});
- this.index += 2;
- } else if (fn) {
- this.tokens.push({
- index: this.index,
- text: this.ch,
- fn: fn
- });
- this.index += 1;
- } else {
- this.throwError('Unexpected next character ', this.index, this.index + 1);
- }
- }
- this.lastCh = this.ch;
- }
- return this.tokens;
- },
-
- is: function(chars) {
- return chars.indexOf(this.ch) !== -1;
- },
-
- was: function(chars) {
- return chars.indexOf(this.lastCh) !== -1;
- },
-
- peek: function(i) {
- var num = i || 1;
- return (this.index + num < this.text.length) ? this.text.charAt(this.index + num) : false;
- },
-
- isNumber: function(ch) {
- return ('0' <= ch && ch <= '9');
- },
-
- isWhitespace: function(ch) {
- // IE treats non-breaking space as \u00A0
- return (ch === ' ' || ch === '\r' || ch === '\t' ||
- ch === '\n' || ch === '\v' || ch === '\u00A0');
- },
-
- isIdent: function(ch) {
- return ('a' <= ch && ch <= 'z' ||
- 'A' <= ch && ch <= 'Z' ||
- '_' === ch || ch === '$');
- },
-
- isExpOperator: function(ch) {
- return (ch === '-' || ch === '+' || this.isNumber(ch));
- },
-
- throwError: function(error, start, end) {
- end = end || this.index;
- var colStr = (isDefined(start)
- ? 's ' + start + '-' + this.index + ' [' + this.text.substring(start, end) + ']'
- : ' ' + end);
- throw $parseMinErr('lexerr', 'Lexer Error: {0} at column{1} in expression [{2}].',
- error, colStr, this.text);
- },
-
- readNumber: function() {
- var number = '';
- var start = this.index;
- while (this.index < this.text.length) {
- var ch = lowercase(this.text.charAt(this.index));
- if (ch == '.' || this.isNumber(ch)) {
- number += ch;
- } else {
- var peekCh = this.peek();
- if (ch == 'e' && this.isExpOperator(peekCh)) {
- number += ch;
- } else if (this.isExpOperator(ch) &&
- peekCh && this.isNumber(peekCh) &&
- number.charAt(number.length - 1) == 'e') {
- number += ch;
- } else if (this.isExpOperator(ch) &&
- (!peekCh || !this.isNumber(peekCh)) &&
- number.charAt(number.length - 1) == 'e') {
- this.throwError('Invalid exponent');
- } else {
- break;
- }
- }
- this.index++;
- }
- number = 1 * number;
- this.tokens.push({
- index: start,
- text: number,
- literal: true,
- constant: true,
- fn: function() { return number; }
- });
- },
-
- readIdent: function() {
- var parser = this;
-
- var ident = '';
- var start = this.index;
-
- var lastDot, peekIndex, methodName, ch;
-
- while (this.index < this.text.length) {
- ch = this.text.charAt(this.index);
- if (ch === '.' || this.isIdent(ch) || this.isNumber(ch)) {
- if (ch === '.') lastDot = this.index;
- ident += ch;
- } else {
- break;
- }
- this.index++;
- }
-
- //check if this is not a method invocation and if it is back out to last dot
- if (lastDot) {
- peekIndex = this.index;
- while (peekIndex < this.text.length) {
- ch = this.text.charAt(peekIndex);
- if (ch === '(') {
- methodName = ident.substr(lastDot - start + 1);
- ident = ident.substr(0, lastDot - start);
- this.index = peekIndex;
- break;
- }
- if (this.isWhitespace(ch)) {
- peekIndex++;
- } else {
- break;
- }
- }
- }
-
-
- var token = {
- index: start,
- text: ident
- };
-
- // OPERATORS is our own object so we don't need to use special hasOwnPropertyFn
- if (OPERATORS.hasOwnProperty(ident)) {
- token.fn = OPERATORS[ident];
- token.literal = true;
- token.constant = true;
- } else {
- var getter = getterFn(ident, this.options, this.text);
- token.fn = extend(function(self, locals) {
- return (getter(self, locals));
- }, {
- assign: function(self, value) {
- return setter(self, ident, value, parser.text, parser.options);
- }
- });
- }
-
- this.tokens.push(token);
-
- if (methodName) {
- this.tokens.push({
- index:lastDot,
- text: '.'
- });
- this.tokens.push({
- index: lastDot + 1,
- text: methodName
- });
- }
- },
-
- readString: function(quote) {
- var start = this.index;
- this.index++;
- var string = '';
- var rawString = quote;
- var escape = false;
- while (this.index < this.text.length) {
- var ch = this.text.charAt(this.index);
- rawString += ch;
- if (escape) {
- if (ch === 'u') {
- var hex = this.text.substring(this.index + 1, this.index + 5);
- if (!hex.match(/[\da-f]{4}/i))
- this.throwError('Invalid unicode escape [\\u' + hex + ']');
- this.index += 4;
- string += String.fromCharCode(parseInt(hex, 16));
- } else {
- var rep = ESCAPE[ch];
- string = string + (rep || ch);
- }
- escape = false;
- } else if (ch === '\\') {
- escape = true;
- } else if (ch === quote) {
- this.index++;
- this.tokens.push({
- index: start,
- text: rawString,
- string: string,
- literal: true,
- constant: true,
- fn: function() { return string; }
- });
- return;
- } else {
- string += ch;
- }
- this.index++;
- }
- this.throwError('Unterminated quote', start);
- }
-};
-
-
-/**
- * @constructor
- */
-var Parser = function (lexer, $filter, options) {
- this.lexer = lexer;
- this.$filter = $filter;
- this.options = options;
-};
-
-Parser.ZERO = extend(function () {
- return 0;
-}, {
- constant: true
-});
-
-Parser.prototype = {
- constructor: Parser,
-
- parse: function (text) {
- this.text = text;
-
- this.tokens = this.lexer.lex(text);
-
- var value = this.statements();
-
- if (this.tokens.length !== 0) {
- this.throwError('is an unexpected token', this.tokens[0]);
- }
-
- value.literal = !!value.literal;
- value.constant = !!value.constant;
-
- return value;
- },
-
- primary: function () {
- var primary;
- if (this.expect('(')) {
- primary = this.filterChain();
- this.consume(')');
- } else if (this.expect('[')) {
- primary = this.arrayDeclaration();
- } else if (this.expect('{')) {
- primary = this.object();
- } else {
- var token = this.expect();
- primary = token.fn;
- if (!primary) {
- this.throwError('not a primary expression', token);
- }
- primary.literal = !!token.literal;
- primary.constant = !!token.constant;
- }
-
- var next, context;
- while ((next = this.expect('(', '[', '.'))) {
- if (next.text === '(') {
- primary = this.functionCall(primary, context);
- context = null;
- } else if (next.text === '[') {
- context = primary;
- primary = this.objectIndex(primary);
- } else if (next.text === '.') {
- context = primary;
- primary = this.fieldAccess(primary);
- } else {
- this.throwError('IMPOSSIBLE');
- }
- }
- return primary;
- },
-
- throwError: function(msg, token) {
- throw $parseMinErr('syntax',
- 'Syntax Error: Token \'{0}\' {1} at column {2} of the expression [{3}] starting at [{4}].',
- token.text, msg, (token.index + 1), this.text, this.text.substring(token.index));
- },
-
- peekToken: function() {
- if (this.tokens.length === 0)
- throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text);
- return this.tokens[0];
- },
-
- peek: function(e1, e2, e3, e4) {
- if (this.tokens.length > 0) {
- var token = this.tokens[0];
- var t = token.text;
- if (t === e1 || t === e2 || t === e3 || t === e4 ||
- (!e1 && !e2 && !e3 && !e4)) {
- return token;
- }
- }
- return false;
- },
-
- expect: function(e1, e2, e3, e4){
- var token = this.peek(e1, e2, e3, e4);
- if (token) {
- this.tokens.shift();
- return token;
- }
- return false;
- },
-
- consume: function(e1){
- if (!this.expect(e1)) {
- this.throwError('is unexpected, expecting [' + e1 + ']', this.peek());
- }
- },
-
- unaryFn: function(fn, right) {
- return extend(function(self, locals) {
- return fn(self, locals, right);
- }, {
- constant:right.constant
- });
- },
-
- ternaryFn: function(left, middle, right){
- return extend(function(self, locals){
- return left(self, locals) ? middle(self, locals) : right(self, locals);
- }, {
- constant: left.constant && middle.constant && right.constant
- });
- },
-
- binaryFn: function(left, fn, right) {
- return extend(function(self, locals) {
- return fn(self, locals, left, right);
- }, {
- constant:left.constant && right.constant
- });
- },
-
- statements: function() {
- var statements = [];
- while (true) {
- if (this.tokens.length > 0 && !this.peek('}', ')', ';', ']'))
- statements.push(this.filterChain());
- if (!this.expect(';')) {
- // optimize for the common case where there is only one statement.
- // TODO(size): maybe we should not support multiple statements?
- return (statements.length === 1)
- ? statements[0]
- : function(self, locals) {
- var value;
- for (var i = 0; i < statements.length; i++) {
- var statement = statements[i];
- if (statement) {
- value = statement(self, locals);
- }
- }
- return value;
- };
- }
- }
- },
-
- filterChain: function() {
- var left = this.expression();
- var token;
- while (true) {
- if ((token = this.expect('|'))) {
- left = this.binaryFn(left, token.fn, this.filter());
- } else {
- return left;
- }
- }
- },
-
- filter: function() {
- var token = this.expect();
- var fn = this.$filter(token.text);
- var argsFn = [];
- while (true) {
- if ((token = this.expect(':'))) {
- argsFn.push(this.expression());
- } else {
- var fnInvoke = function(self, locals, input) {
- var args = [input];
- for (var i = 0; i < argsFn.length; i++) {
- args.push(argsFn[i](self, locals));
- }
- return fn.apply(self, args);
- };
- return function() {
- return fnInvoke;
- };
- }
- }
- },
-
- expression: function() {
- return this.assignment();
- },
-
- assignment: function() {
- var left = this.ternary();
- var right;
- var token;
- if ((token = this.expect('='))) {
- if (!left.assign) {
- this.throwError('implies assignment but [' +
- this.text.substring(0, token.index) + '] can not be assigned to', token);
- }
- right = this.ternary();
- return function(scope, locals) {
- return left.assign(scope, right(scope, locals), locals);
- };
- }
- return left;
- },
-
- ternary: function() {
- var left = this.logicalOR();
- var middle;
- var token;
- if ((token = this.expect('?'))) {
- middle = this.assignment();
- if ((token = this.expect(':'))) {
- return this.ternaryFn(left, middle, this.assignment());
- } else {
- this.throwError('expected :', token);
- }
- } else {
- return left;
- }
- },
-
- logicalOR: function() {
- var left = this.logicalAND();
- var token;
- while (true) {
- if ((token = this.expect('||'))) {
- left = this.binaryFn(left, token.fn, this.logicalAND());
- } else {
- return left;
- }
- }
- },
-
- logicalAND: function() {
- var left = this.equality();
- var token;
- if ((token = this.expect('&&'))) {
- left = this.binaryFn(left, token.fn, this.logicalAND());
- }
- return left;
- },
-
- equality: function() {
- var left = this.relational();
- var token;
- if ((token = this.expect('==','!=','===','!=='))) {
- left = this.binaryFn(left, token.fn, this.equality());
- }
- return left;
- },
-
- relational: function() {
- var left = this.additive();
- var token;
- if ((token = this.expect('<', '>', '<=', '>='))) {
- left = this.binaryFn(left, token.fn, this.relational());
- }
- return left;
- },
-
- additive: function() {
- var left = this.multiplicative();
- var token;
- while ((token = this.expect('+','-'))) {
- left = this.binaryFn(left, token.fn, this.multiplicative());
- }
- return left;
- },
-
- multiplicative: function() {
- var left = this.unary();
- var token;
- while ((token = this.expect('*','/','%'))) {
- left = this.binaryFn(left, token.fn, this.unary());
- }
- return left;
- },
-
- unary: function() {
- var token;
- if (this.expect('+')) {
- return this.primary();
- } else if ((token = this.expect('-'))) {
- return this.binaryFn(Parser.ZERO, token.fn, this.unary());
- } else if ((token = this.expect('!'))) {
- return this.unaryFn(token.fn, this.unary());
- } else {
- return this.primary();
- }
- },
-
- fieldAccess: function(object) {
- var parser = this;
- var field = this.expect().text;
- var getter = getterFn(field, this.options, this.text);
-
- return extend(function(scope, locals, self) {
- return getter(self || object(scope, locals));
- }, {
- assign: function(scope, value, locals) {
- var o = object(scope, locals);
- if (!o) object.assign(scope, o = {});
- return setter(o, field, value, parser.text, parser.options);
- }
- });
- },
-
- objectIndex: function(obj) {
- var parser = this;
-
- var indexFn = this.expression();
- this.consume(']');
-
- return extend(function(self, locals) {
- var o = obj(self, locals),
- i = indexFn(self, locals),
- v, p;
-
- ensureSafeMemberName(i, parser.text);
- if (!o) return undefined;
- v = ensureSafeObject(o[i], parser.text);
- if (v && v.then && parser.options.unwrapPromises) {
- p = v;
- if (!('$$v' in v)) {
- p.$$v = undefined;
- p.then(function(val) { p.$$v = val; });
- }
- v = v.$$v;
- }
- return v;
- }, {
- assign: function(self, value, locals) {
- var key = ensureSafeMemberName(indexFn(self, locals), parser.text);
- // prevent overwriting of Function.constructor which would break ensureSafeObject check
- var o = ensureSafeObject(obj(self, locals), parser.text);
- if (!o) obj.assign(self, o = {});
- return o[key] = value;
- }
- });
- },
-
- functionCall: function(fn, contextGetter) {
- var argsFn = [];
- if (this.peekToken().text !== ')') {
- do {
- argsFn.push(this.expression());
- } while (this.expect(','));
- }
- this.consume(')');
-
- var parser = this;
-
- return function(scope, locals) {
- var args = [];
- var context = contextGetter ? contextGetter(scope, locals) : scope;
-
- for (var i = 0; i < argsFn.length; i++) {
- args.push(ensureSafeObject(argsFn[i](scope, locals), parser.text));
- }
- var fnPtr = fn(scope, locals, context) || noop;
-
- ensureSafeObject(context, parser.text);
- ensureSafeFunction(fnPtr, parser.text);
-
- // IE stupidity! (IE doesn't have apply for some native functions)
- var v = fnPtr.apply
- ? fnPtr.apply(context, args)
- : fnPtr(args[0], args[1], args[2], args[3], args[4]);
-
- return ensureSafeObject(v, parser.text);
- };
- },
-
- // This is used with json array declaration
- arrayDeclaration: function () {
- var elementFns = [];
- var allConstant = true;
- if (this.peekToken().text !== ']') {
- do {
- if (this.peek(']')) {
- // Support trailing commas per ES5.1.
- break;
- }
- var elementFn = this.expression();
- elementFns.push(elementFn);
- if (!elementFn.constant) {
- allConstant = false;
- }
- } while (this.expect(','));
- }
- this.consume(']');
-
- return extend(function(self, locals) {
- var array = [];
- for (var i = 0; i < elementFns.length; i++) {
- array.push(elementFns[i](self, locals));
- }
- return array;
- }, {
- literal: true,
- constant: allConstant
- });
- },
-
- object: function () {
- var keyValues = [];
- var allConstant = true;
- if (this.peekToken().text !== '}') {
- do {
- if (this.peek('}')) {
- // Support trailing commas per ES5.1.
- break;
- }
- var token = this.expect(),
- key = token.string || token.text;
- this.consume(':');
- var value = this.expression();
- keyValues.push({key: key, value: value});
- if (!value.constant) {
- allConstant = false;
- }
- } while (this.expect(','));
- }
- this.consume('}');
-
- return extend(function(self, locals) {
- var object = {};
- for (var i = 0; i < keyValues.length; i++) {
- var keyValue = keyValues[i];
- object[keyValue.key] = keyValue.value(self, locals);
- }
- return object;
- }, {
- literal: true,
- constant: allConstant
- });
- }
-};
-
-
-//////////////////////////////////////////////////
-// Parser helper functions
-//////////////////////////////////////////////////
-
-function setter(obj, path, setValue, fullExp, options) {
- ensureSafeObject(obj, fullExp);
-
- //needed?
- options = options || {};
-
- var element = path.split('.'), key;
- for (var i = 0; element.length > 1; i++) {
- key = ensureSafeMemberName(element.shift(), fullExp);
- var propertyObj = ensureSafeObject(obj[key], fullExp);
- if (!propertyObj) {
- propertyObj = {};
- obj[key] = propertyObj;
- }
- obj = propertyObj;
- if (obj.then && options.unwrapPromises) {
- promiseWarning(fullExp);
- if (!("$$v" in obj)) {
- (function(promise) {
- promise.then(function(val) { promise.$$v = val; }); }
- )(obj);
- }
- if (obj.$$v === undefined) {
- obj.$$v = {};
- }
- obj = obj.$$v;
- }
- }
- key = ensureSafeMemberName(element.shift(), fullExp);
- ensureSafeObject(obj[key], fullExp);
- obj[key] = setValue;
- return setValue;
-}
-
-var getterFnCache = {};
-
-/**
- * Implementation of the "Black Hole" variant from:
- * - http://jsperf.com/angularjs-parse-getter/4
- * - http://jsperf.com/path-evaluation-simplified/7
- */
-function cspSafeGetterFn(key0, key1, key2, key3, key4, fullExp, options) {
- ensureSafeMemberName(key0, fullExp);
- ensureSafeMemberName(key1, fullExp);
- ensureSafeMemberName(key2, fullExp);
- ensureSafeMemberName(key3, fullExp);
- ensureSafeMemberName(key4, fullExp);
-
- return !options.unwrapPromises
- ? function cspSafeGetter(scope, locals) {
- var pathVal = (locals && locals.hasOwnProperty(key0)) ? locals : scope;
-
- if (pathVal == null) return pathVal;
- pathVal = pathVal[key0];
-
- if (!key1) return pathVal;
- if (pathVal == null) return undefined;
- pathVal = pathVal[key1];
-
- if (!key2) return pathVal;
- if (pathVal == null) return undefined;
- pathVal = pathVal[key2];
-
- if (!key3) return pathVal;
- if (pathVal == null) return undefined;
- pathVal = pathVal[key3];
-
- if (!key4) return pathVal;
- if (pathVal == null) return undefined;
- pathVal = pathVal[key4];
-
- return pathVal;
- }
- : function cspSafePromiseEnabledGetter(scope, locals) {
- var pathVal = (locals && locals.hasOwnProperty(key0)) ? locals : scope,
- promise;
-
- if (pathVal == null) return pathVal;
-
- pathVal = pathVal[key0];
- if (pathVal && pathVal.then) {
- promiseWarning(fullExp);
- if (!("$$v" in pathVal)) {
- promise = pathVal;
- promise.$$v = undefined;
- promise.then(function(val) { promise.$$v = val; });
- }
- pathVal = pathVal.$$v;
- }
-
- if (!key1) return pathVal;
- if (pathVal == null) return undefined;
- pathVal = pathVal[key1];
- if (pathVal && pathVal.then) {
- promiseWarning(fullExp);
- if (!("$$v" in pathVal)) {
- promise = pathVal;
- promise.$$v = undefined;
- promise.then(function(val) { promise.$$v = val; });
- }
- pathVal = pathVal.$$v;
- }
-
- if (!key2) return pathVal;
- if (pathVal == null) return undefined;
- pathVal = pathVal[key2];
- if (pathVal && pathVal.then) {
- promiseWarning(fullExp);
- if (!("$$v" in pathVal)) {
- promise = pathVal;
- promise.$$v = undefined;
- promise.then(function(val) { promise.$$v = val; });
- }
- pathVal = pathVal.$$v;
- }
-
- if (!key3) return pathVal;
- if (pathVal == null) return undefined;
- pathVal = pathVal[key3];
- if (pathVal && pathVal.then) {
- promiseWarning(fullExp);
- if (!("$$v" in pathVal)) {
- promise = pathVal;
- promise.$$v = undefined;
- promise.then(function(val) { promise.$$v = val; });
- }
- pathVal = pathVal.$$v;
- }
-
- if (!key4) return pathVal;
- if (pathVal == null) return undefined;
- pathVal = pathVal[key4];
- if (pathVal && pathVal.then) {
- promiseWarning(fullExp);
- if (!("$$v" in pathVal)) {
- promise = pathVal;
- promise.$$v = undefined;
- promise.then(function(val) { promise.$$v = val; });
- }
- pathVal = pathVal.$$v;
- }
- return pathVal;
- };
-}
-
-function getterFn(path, options, fullExp) {
- // Check whether the cache has this getter already.
- // We can use hasOwnProperty directly on the cache because we ensure,
- // see below, that the cache never stores a path called 'hasOwnProperty'
- if (getterFnCache.hasOwnProperty(path)) {
- return getterFnCache[path];
- }
-
- var pathKeys = path.split('.'),
- pathKeysLength = pathKeys.length,
- fn;
-
- // http://jsperf.com/angularjs-parse-getter/6
- if (options.csp) {
- if (pathKeysLength < 6) {
- fn = cspSafeGetterFn(pathKeys[0], pathKeys[1], pathKeys[2], pathKeys[3], pathKeys[4], fullExp,
- options);
- } else {
- fn = function(scope, locals) {
- var i = 0, val;
- do {
- val = cspSafeGetterFn(pathKeys[i++], pathKeys[i++], pathKeys[i++], pathKeys[i++],
- pathKeys[i++], fullExp, options)(scope, locals);
-
- locals = undefined; // clear after first iteration
- scope = val;
- } while (i < pathKeysLength);
- return val;
- };
- }
- } else {
- var code = 'var p;\n';
- forEach(pathKeys, function(key, index) {
- ensureSafeMemberName(key, fullExp);
- code += 'if(s == null) return undefined;\n' +
- 's='+ (index
- // we simply dereference 's' on any .dot notation
- ? 's'
- // but if we are first then we check locals first, and if so read it first
- : '((k&&k.hasOwnProperty("' + key + '"))?k:s)') + '["' + key + '"]' + ';\n' +
- (options.unwrapPromises
- ? 'if (s && s.then) {\n' +
- ' pw("' + fullExp.replace(/(["\r\n])/g, '\\$1') + '");\n' +
- ' if (!("$$v" in s)) {\n' +
- ' p=s;\n' +
- ' p.$$v = undefined;\n' +
- ' p.then(function(v) {p.$$v=v;});\n' +
- '}\n' +
- ' s=s.$$v\n' +
- '}\n'
- : '');
- });
- code += 'return s;';
-
- /* jshint -W054 */
- var evaledFnGetter = new Function('s', 'k', 'pw', code); // s=scope, k=locals, pw=promiseWarning
- /* jshint +W054 */
- evaledFnGetter.toString = valueFn(code);
- fn = options.unwrapPromises ? function(scope, locals) {
- return evaledFnGetter(scope, locals, promiseWarning);
- } : evaledFnGetter;
- }
-
- // Only cache the value if it's not going to mess up the cache object
- // This is more performant that using Object.prototype.hasOwnProperty.call
- if (path !== 'hasOwnProperty') {
- getterFnCache[path] = fn;
- }
- return fn;
-}
-
-///////////////////////////////////
-
-/**
- * @ngdoc service
- * @name $parse
- * @kind function
- *
- * @description
- *
- * Converts Angular {@link guide/expression expression} into a function.
- *
- * ```js
- * var getter = $parse('user.name');
- * var setter = getter.assign;
- * var context = {user:{name:'angular'}};
- * var locals = {user:{name:'local'}};
- *
- * expect(getter(context)).toEqual('angular');
- * setter(context, 'newValue');
- * expect(context.user.name).toEqual('newValue');
- * expect(getter(context, locals)).toEqual('local');
- * ```
- *
- *
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- *
- * The returned function also has the following properties:
- * * `literal` – `{boolean}` – whether the expression's top-level node is a JavaScript
- * literal.
- * * `constant` – `{boolean}` – whether the expression is made entirely of JavaScript
- * constant literals.
- * * `assign` – `{?function(context, value)}` – if the expression is assignable, this will be
- * set to a function to change its value on the given context.
- *
- */
-
-
-/**
- * @ngdoc provider
- * @name $parseProvider
- * @kind function
- *
- * @description
- * `$parseProvider` can be used for configuring the default behavior of the {@link ng.$parse $parse}
- * service.
- */
-function $ParseProvider() {
- var cache = {};
-
- var $parseOptions = {
- csp: false,
- unwrapPromises: false,
- logPromiseWarnings: true
- };
-
-
- /**
- * @deprecated Promise unwrapping via $parse is deprecated and will be removed in the future.
- *
- * @ngdoc method
- * @name $parseProvider#unwrapPromises
- * @description
- *
- * **This feature is deprecated, see deprecation notes below for more info**
- *
- * If set to true (default is false), $parse will unwrap promises automatically when a promise is
- * found at any part of the expression. In other words, if set to true, the expression will always
- * result in a non-promise value.
- *
- * While the promise is unresolved, it's treated as undefined, but once resolved and fulfilled,
- * the fulfillment value is used in place of the promise while evaluating the expression.
- *
- * **Deprecation notice**
- *
- * This is a feature that didn't prove to be wildly useful or popular, primarily because of the
- * dichotomy between data access in templates (accessed as raw values) and controller code
- * (accessed as promises).
- *
- * In most code we ended up resolving promises manually in controllers anyway and thus unifying
- * the model access there.
- *
- * Other downsides of automatic promise unwrapping:
- *
- * - when building components it's often desirable to receive the raw promises
- * - adds complexity and slows down expression evaluation
- * - makes expression code pre-generation unattractive due to the amount of code that needs to be
- * generated
- * - makes IDE auto-completion and tool support hard
- *
- * **Warning Logs**
- *
- * If the unwrapping is enabled, Angular will log a warning about each expression that unwraps a
- * promise (to reduce the noise, each expression is logged only once). To disable this logging use
- * `$parseProvider.logPromiseWarnings(false)` api.
- *
- *
- * @param {boolean=} value New value.
- * @returns {boolean|self} Returns the current setting when used as getter and self if used as
- * setter.
- */
- this.unwrapPromises = function(value) {
- if (isDefined(value)) {
- $parseOptions.unwrapPromises = !!value;
- return this;
- } else {
- return $parseOptions.unwrapPromises;
- }
- };
-
-
- /**
- * @deprecated Promise unwrapping via $parse is deprecated and will be removed in the future.
- *
- * @ngdoc method
- * @name $parseProvider#logPromiseWarnings
- * @description
- *
- * Controls whether Angular should log a warning on any encounter of a promise in an expression.
- *
- * The default is set to `true`.
- *
- * This setting applies only if `$parseProvider.unwrapPromises` setting is set to true as well.
- *
- * @param {boolean=} value New value.
- * @returns {boolean|self} Returns the current setting when used as getter and self if used as
- * setter.
- */
- this.logPromiseWarnings = function(value) {
- if (isDefined(value)) {
- $parseOptions.logPromiseWarnings = value;
- return this;
- } else {
- return $parseOptions.logPromiseWarnings;
- }
- };
-
-
- this.$get = ['$filter', '$sniffer', '$log', function($filter, $sniffer, $log) {
- $parseOptions.csp = $sniffer.csp;
-
- promiseWarning = function promiseWarningFn(fullExp) {
- if (!$parseOptions.logPromiseWarnings || promiseWarningCache.hasOwnProperty(fullExp)) return;
- promiseWarningCache[fullExp] = true;
- $log.warn('[$parse] Promise found in the expression `' + fullExp + '`. ' +
- 'Automatic unwrapping of promises in Angular expressions is deprecated.');
- };
-
- return function(exp) {
- var parsedExpression;
-
- switch (typeof exp) {
- case 'string':
-
- if (cache.hasOwnProperty(exp)) {
- return cache[exp];
- }
-
- var lexer = new Lexer($parseOptions);
- var parser = new Parser(lexer, $filter, $parseOptions);
- parsedExpression = parser.parse(exp);
-
- if (exp !== 'hasOwnProperty') {
- // Only cache the value if it's not going to mess up the cache object
- // This is more performant that using Object.prototype.hasOwnProperty.call
- cache[exp] = parsedExpression;
- }
-
- return parsedExpression;
-
- case 'function':
- return exp;
-
- default:
- return noop;
- }
- };
- }];
-}
-
-/**
- * @ngdoc service
- * @name $q
- * @requires $rootScope
- *
- * @description
- * A promise/deferred implementation inspired by [Kris Kowal's Q](https://github.com/kriskowal/q).
- *
- * [The CommonJS Promise proposal](http://wiki.commonjs.org/wiki/Promises) describes a promise as an
- * interface for interacting with an object that represents the result of an action that is
- * performed asynchronously, and may or may not be finished at any given point in time.
- *
- * From the perspective of dealing with error handling, deferred and promise APIs are to
- * asynchronous programming what `try`, `catch` and `throw` keywords are to synchronous programming.
- *
- * ```js
- * // for the purpose of this example let's assume that variables `$q`, `scope` and `okToGreet`
- * // are available in the current lexical scope (they could have been injected or passed in).
- *
- * function asyncGreet(name) {
- * var deferred = $q.defer();
- *
- * setTimeout(function() {
- * deferred.notify('About to greet ' + name + '.');
- *
- * if (okToGreet(name)) {
- * deferred.resolve('Hello, ' + name + '!');
- * } else {
- * deferred.reject('Greeting ' + name + ' is not allowed.');
- * }
- * }, 1000);
- *
- * return deferred.promise;
- * }
- *
- * var promise = asyncGreet('Robin Hood');
- * promise.then(function(greeting) {
- * alert('Success: ' + greeting);
- * }, function(reason) {
- * alert('Failed: ' + reason);
- * }, function(update) {
- * alert('Got notification: ' + update);
- * });
- * ```
- *
- * At first it might not be obvious why this extra complexity is worth the trouble. The payoff
- * comes in the way of guarantees that promise and deferred APIs make, see
- * https://github.com/kriskowal/uncommonjs/blob/master/promises/specification.md.
- *
- * Additionally the promise api allows for composition that is very hard to do with the
- * traditional callback ([CPS](http://en.wikipedia.org/wiki/Continuation-passing_style)) approach.
- * For more on this please see the [Q documentation](https://github.com/kriskowal/q) especially the
- * section on serial or parallel joining of promises.
- *
- *
- * # The Deferred API
- *
- * A new instance of deferred is constructed by calling `$q.defer()`.
- *
- * The purpose of the deferred object is to expose the associated Promise instance as well as APIs
- * that can be used for signaling the successful or unsuccessful completion, as well as the status
- * of the task.
- *
- * **Methods**
- *
- * - `resolve(value)` – resolves the derived promise with the `value`. If the value is a rejection
- * constructed via `$q.reject`, the promise will be rejected instead.
- * - `reject(reason)` – rejects the derived promise with the `reason`. This is equivalent to
- * resolving it with a rejection constructed via `$q.reject`.
- * - `notify(value)` - provides updates on the status of the promise's execution. This may be called
- * multiple times before the promise is either resolved or rejected.
- *
- * **Properties**
- *
- * - promise – `{Promise}` – promise object associated with this deferred.
- *
- *
- * # The Promise API
- *
- * A new promise instance is created when a deferred instance is created and can be retrieved by
- * calling `deferred.promise`.
- *
- * The purpose of the promise object is to allow for interested parties to get access to the result
- * of the deferred task when it completes.
- *
- * **Methods**
- *
- * - `then(successCallback, errorCallback, notifyCallback)` – regardless of when the promise was or
- * will be resolved or rejected, `then` calls one of the success or error callbacks asynchronously
- * as soon as the result is available. The callbacks are called with a single argument: the result
- * or rejection reason. Additionally, the notify callback may be called zero or more times to
- * provide a progress indication, before the promise is resolved or rejected.
- *
- * This method *returns a new promise* which is resolved or rejected via the return value of the
- * `successCallback`, `errorCallback`. It also notifies via the return value of the
- * `notifyCallback` method. The promise can not be resolved or rejected from the notifyCallback
- * method.
- *
- * - `catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)`
- *
- * - `finally(callback)` – allows you to observe either the fulfillment or rejection of a promise,
- * but to do so without modifying the final value. This is useful to release resources or do some
- * clean-up that needs to be done whether the promise was rejected or resolved. See the [full
- * specification](https://github.com/kriskowal/q/wiki/API-Reference#promisefinallycallback) for
- * more information.
- *
- * Because `finally` is a reserved word in JavaScript and reserved keywords are not supported as
- * property names by ES3, you'll need to invoke the method like `promise['finally'](callback)` to
- * make your code IE8 and Android 2.x compatible.
- *
- * # Chaining promises
- *
- * Because calling the `then` method of a promise returns a new derived promise, it is easily
- * possible to create a chain of promises:
- *
- * ```js
- * promiseB = promiseA.then(function(result) {
- * return result + 1;
- * });
- *
- * // promiseB will be resolved immediately after promiseA is resolved and its value
- * // will be the result of promiseA incremented by 1
- * ```
- *
- * It is possible to create chains of any length and since a promise can be resolved with another
- * promise (which will defer its resolution further), it is possible to pause/defer resolution of
- * the promises at any point in the chain. This makes it possible to implement powerful APIs like
- * $http's response interceptors.
- *
- *
- * # Differences between Kris Kowal's Q and $q
- *
- * There are two main differences:
- *
- * - $q is integrated with the {@link ng.$rootScope.Scope} Scope model observation
- * mechanism in angular, which means faster propagation of resolution or rejection into your
- * models and avoiding unnecessary browser repaints, which would result in flickering UI.
- * - Q has many more features than $q, but that comes at a cost of bytes. $q is tiny, but contains
- * all the important functionality needed for common async tasks.
- *
- * # Testing
- *
- * ```js
- * it('should simulate promise', inject(function($q, $rootScope) {
- * var deferred = $q.defer();
- * var promise = deferred.promise;
- * var resolvedValue;
- *
- * promise.then(function(value) { resolvedValue = value; });
- * expect(resolvedValue).toBeUndefined();
- *
- * // Simulate resolving of promise
- * deferred.resolve(123);
- * // Note that the 'then' function does not get called synchronously.
- * // This is because we want the promise API to always be async, whether or not
- * // it got called synchronously or asynchronously.
- * expect(resolvedValue).toBeUndefined();
- *
- * // Propagate promise resolution to 'then' functions using $apply().
- * $rootScope.$apply();
- * expect(resolvedValue).toEqual(123);
- * }));
- * ```
- */
-function $QProvider() {
-
- this.$get = ['$rootScope', '$exceptionHandler', function($rootScope, $exceptionHandler) {
- return qFactory(function(callback) {
- $rootScope.$evalAsync(callback);
- }, $exceptionHandler);
- }];
-}
-
-
-/**
- * Constructs a promise manager.
- *
- * @param {function(Function)} nextTick Function for executing functions in the next turn.
- * @param {function(...*)} exceptionHandler Function into which unexpected exceptions are passed for
- * debugging purposes.
- * @returns {object} Promise manager.
- */
-function qFactory(nextTick, exceptionHandler) {
-
- /**
- * @ngdoc method
- * @name $q#defer
- * @kind function
- *
- * @description
- * Creates a `Deferred` object which represents a task which will finish in the future.
- *
- * @returns {Deferred} Returns a new instance of deferred.
- */
- var defer = function() {
- var pending = [],
- value, deferred;
-
- deferred = {
-
- resolve: function(val) {
- if (pending) {
- var callbacks = pending;
- pending = undefined;
- value = ref(val);
-
- if (callbacks.length) {
- nextTick(function() {
- var callback;
- for (var i = 0, ii = callbacks.length; i < ii; i++) {
- callback = callbacks[i];
- value.then(callback[0], callback[1], callback[2]);
- }
- });
- }
- }
- },
-
-
- reject: function(reason) {
- deferred.resolve(createInternalRejectedPromise(reason));
- },
-
-
- notify: function(progress) {
- if (pending) {
- var callbacks = pending;
-
- if (pending.length) {
- nextTick(function() {
- var callback;
- for (var i = 0, ii = callbacks.length; i < ii; i++) {
- callback = callbacks[i];
- callback[2](progress);
- }
- });
- }
- }
- },
-
-
- promise: {
- then: function(callback, errback, progressback) {
- var result = defer();
-
- var wrappedCallback = function(value) {
- try {
- result.resolve((isFunction(callback) ? callback : defaultCallback)(value));
- } catch(e) {
- result.reject(e);
- exceptionHandler(e);
- }
- };
-
- var wrappedErrback = function(reason) {
- try {
- result.resolve((isFunction(errback) ? errback : defaultErrback)(reason));
- } catch(e) {
- result.reject(e);
- exceptionHandler(e);
- }
- };
-
- var wrappedProgressback = function(progress) {
- try {
- result.notify((isFunction(progressback) ? progressback : defaultCallback)(progress));
- } catch(e) {
- exceptionHandler(e);
- }
- };
-
- if (pending) {
- pending.push([wrappedCallback, wrappedErrback, wrappedProgressback]);
- } else {
- value.then(wrappedCallback, wrappedErrback, wrappedProgressback);
- }
-
- return result.promise;
- },
-
- "catch": function(callback) {
- return this.then(null, callback);
- },
-
- "finally": function(callback) {
-
- function makePromise(value, resolved) {
- var result = defer();
- if (resolved) {
- result.resolve(value);
- } else {
- result.reject(value);
- }
- return result.promise;
- }
-
- function handleCallback(value, isResolved) {
- var callbackOutput = null;
- try {
- callbackOutput = (callback ||defaultCallback)();
- } catch(e) {
- return makePromise(e, false);
- }
- if (isPromiseLike(callbackOutput)) {
- return callbackOutput.then(function() {
- return makePromise(value, isResolved);
- }, function(error) {
- return makePromise(error, false);
- });
- } else {
- return makePromise(value, isResolved);
- }
- }
-
- return this.then(function(value) {
- return handleCallback(value, true);
- }, function(error) {
- return handleCallback(error, false);
- });
- }
- }
- };
-
- return deferred;
- };
-
-
- var ref = function(value) {
- if (isPromiseLike(value)) return value;
- return {
- then: function(callback) {
- var result = defer();
- nextTick(function() {
- result.resolve(callback(value));
- });
- return result.promise;
- }
- };
- };
-
-
- /**
- * @ngdoc method
- * @name $q#reject
- * @kind function
- *
- * @description
- * Creates a promise that is resolved as rejected with the specified `reason`. This api should be
- * used to forward rejection in a chain of promises. If you are dealing with the last promise in
- * a promise chain, you don't need to worry about it.
- *
- * When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of
- * `reject` as the `throw` keyword in JavaScript. This also means that if you "catch" an error via
- * a promise error callback and you want to forward the error to the promise derived from the
- * current promise, you have to "rethrow" the error by returning a rejection constructed via
- * `reject`.
- *
- * ```js
- * promiseB = promiseA.then(function(result) {
- * // success: do something and resolve promiseB
- * // with the old or a new result
- * return result;
- * }, function(reason) {
- * // error: handle the error if possible and
- * // resolve promiseB with newPromiseOrValue,
- * // otherwise forward the rejection to promiseB
- * if (canHandle(reason)) {
- * // handle the error and recover
- * return newPromiseOrValue;
- * }
- * return $q.reject(reason);
- * });
- * ```
- *
- * @param {*} reason Constant, message, exception or an object representing the rejection reason.
- * @returns {Promise} Returns a promise that was already resolved as rejected with the `reason`.
- */
- var reject = function(reason) {
- var result = defer();
- result.reject(reason);
- return result.promise;
- };
-
- var createInternalRejectedPromise = function(reason) {
- return {
- then: function(callback, errback) {
- var result = defer();
- nextTick(function() {
- try {
- result.resolve((isFunction(errback) ? errback : defaultErrback)(reason));
- } catch(e) {
- result.reject(e);
- exceptionHandler(e);
- }
- });
- return result.promise;
- }
- };
- };
-
-
- /**
- * @ngdoc method
- * @name $q#when
- * @kind function
- *
- * @description
- * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise.
- * This is useful when you are dealing with an object that might or might not be a promise, or if
- * the promise comes from a source that can't be trusted.
- *
- * @param {*} value Value or a promise
- * @returns {Promise} Returns a promise of the passed value or promise
- */
- var when = function(value, callback, errback, progressback) {
- var result = defer(),
- done;
-
- var wrappedCallback = function(value) {
- try {
- return (isFunction(callback) ? callback : defaultCallback)(value);
- } catch (e) {
- exceptionHandler(e);
- return reject(e);
- }
- };
-
- var wrappedErrback = function(reason) {
- try {
- return (isFunction(errback) ? errback : defaultErrback)(reason);
- } catch (e) {
- exceptionHandler(e);
- return reject(e);
- }
- };
-
- var wrappedProgressback = function(progress) {
- try {
- return (isFunction(progressback) ? progressback : defaultCallback)(progress);
- } catch (e) {
- exceptionHandler(e);
- }
- };
-
- nextTick(function() {
- ref(value).then(function(value) {
- if (done) return;
- done = true;
- result.resolve(ref(value).then(wrappedCallback, wrappedErrback, wrappedProgressback));
- }, function(reason) {
- if (done) return;
- done = true;
- result.resolve(wrappedErrback(reason));
- }, function(progress) {
- if (done) return;
- result.notify(wrappedProgressback(progress));
- });
- });
-
- return result.promise;
- };
-
-
- function defaultCallback(value) {
- return value;
- }
-
-
- function defaultErrback(reason) {
- return reject(reason);
- }
-
-
- /**
- * @ngdoc method
- * @name $q#all
- * @kind function
- *
- * @description
- * Combines multiple promises into a single promise that is resolved when all of the input
- * promises are resolved.
- *
- * @param {Array.<Promise>|Object.<Promise>} promises An array or hash of promises.
- * @returns {Promise} Returns a single promise that will be resolved with an array/hash of values,
- * each value corresponding to the promise at the same index/key in the `promises` array/hash.
- * If any of the promises is resolved with a rejection, this resulting promise will be rejected
- * with the same rejection value.
- */
- function all(promises) {
- var deferred = defer(),
- counter = 0,
- results = isArray(promises) ? [] : {};
-
- forEach(promises, function(promise, key) {
- counter++;
- ref(promise).then(function(value) {
- if (results.hasOwnProperty(key)) return;
- results[key] = value;
- if (!(--counter)) deferred.resolve(results);
- }, function(reason) {
- if (results.hasOwnProperty(key)) return;
- deferred.reject(reason);
- });
- });
-
- if (counter === 0) {
- deferred.resolve(results);
- }
-
- return deferred.promise;
- }
-
- return {
- defer: defer,
- reject: reject,
- when: when,
- all: all
- };
-}
-
-function $$RAFProvider(){ //rAF
- this.$get = ['$window', '$timeout', function($window, $timeout) {
- var requestAnimationFrame = $window.requestAnimationFrame ||
- $window.webkitRequestAnimationFrame ||
- $window.mozRequestAnimationFrame;
-
- var cancelAnimationFrame = $window.cancelAnimationFrame ||
- $window.webkitCancelAnimationFrame ||
- $window.mozCancelAnimationFrame ||
- $window.webkitCancelRequestAnimationFrame;
-
- var rafSupported = !!requestAnimationFrame;
- var raf = rafSupported
- ? function(fn) {
- var id = requestAnimationFrame(fn);
- return function() {
- cancelAnimationFrame(id);
- };
- }
- : function(fn) {
- var timer = $timeout(fn, 16.66, false); // 1000 / 60 = 16.666
- return function() {
- $timeout.cancel(timer);
- };
- };
-
- raf.supported = rafSupported;
-
- return raf;
- }];
-}
-
-/**
- * DESIGN NOTES
- *
- * The design decisions behind the scope are heavily favored for speed and memory consumption.
- *
- * The typical use of scope is to watch the expressions, which most of the time return the same
- * value as last time so we optimize the operation.
- *
- * Closures construction is expensive in terms of speed as well as memory:
- * - No closures, instead use prototypical inheritance for API
- * - Internal state needs to be stored on scope directly, which means that private state is
- * exposed as $$____ properties
- *
- * Loop operations are optimized by using while(count--) { ... }
- * - this means that in order to keep the same order of execution as addition we have to add
- * items to the array at the beginning (unshift) instead of at the end (push)
- *
- * Child scopes are created and removed often
- * - Using an array would be slow since inserts in middle are expensive so we use linked list
- *
- * There are few watches then a lot of observers. This is why you don't want the observer to be
- * implemented in the same way as watch. Watch requires return of initialization function which
- * are expensive to construct.
- */
-
-
-/**
- * @ngdoc provider
- * @name $rootScopeProvider
- * @description
- *
- * Provider for the $rootScope service.
- */
-
-/**
- * @ngdoc method
- * @name $rootScopeProvider#digestTtl
- * @description
- *
- * Sets the number of `$digest` iterations the scope should attempt to execute before giving up and
- * assuming that the model is unstable.
- *
- * The current default is 10 iterations.
- *
- * In complex applications it's possible that the dependencies between `$watch`s will result in
- * several digest iterations. However if an application needs more than the default 10 digest
- * iterations for its model to stabilize then you should investigate what is causing the model to
- * continuously change during the digest.
- *
- * Increasing the TTL could have performance implications, so you should not change it without
- * proper justification.
- *
- * @param {number} limit The number of digest iterations.
- */
-
-
-/**
- * @ngdoc service
- * @name $rootScope
- * @description
- *
- * Every application has a single root {@link ng.$rootScope.Scope scope}.
- * All other scopes are descendant scopes of the root scope. Scopes provide separation
- * between the model and the view, via a mechanism for watching the model for changes.
- * They also provide an event emission/broadcast and subscription facility. See the
- * {@link guide/scope developer guide on scopes}.
- */
-function $RootScopeProvider(){
- var TTL = 10;
- var $rootScopeMinErr = minErr('$rootScope');
- var lastDirtyWatch = null;
-
- this.digestTtl = function(value) {
- if (arguments.length) {
- TTL = value;
- }
- return TTL;
- };
-
- this.$get = ['$injector', '$exceptionHandler', '$parse', '$browser',
- function( $injector, $exceptionHandler, $parse, $browser) {
-
- /**
- * @ngdoc type
- * @name $rootScope.Scope
- *
- * @description
- * A root scope can be retrieved using the {@link ng.$rootScope $rootScope} key from the
- * {@link auto.$injector $injector}. Child scopes are created using the
- * {@link ng.$rootScope.Scope#$new $new()} method. (Most scopes are created automatically when
- * compiled HTML template is executed.)
- *
- * Here is a simple scope snippet to show how you can interact with the scope.
- * ```html
- * <file src="./test/ng/rootScopeSpec.js" tag="docs1" />
- * ```
- *
- * # Inheritance
- * A scope can inherit from a parent scope, as in this example:
- * ```js
- var parent = $rootScope;
- var child = parent.$new();
-
- parent.salutation = "Hello";
- child.name = "World";
- expect(child.salutation).toEqual('Hello');
-
- child.salutation = "Welcome";
- expect(child.salutation).toEqual('Welcome');
- expect(parent.salutation).toEqual('Hello');
- * ```
- *
- *
- * @param {Object.<string, function()>=} providers Map of service factory which need to be
- * provided for the current scope. Defaults to {@link ng}.
- * @param {Object.<string, *>=} instanceCache Provides pre-instantiated services which should
- * append/override services provided by `providers`. This is handy
- * when unit-testing and having the need to override a default
- * service.
- * @returns {Object} Newly created scope.
- *
- */
- function Scope() {
- this.$id = nextUid();
- this.$$phase = this.$parent = this.$$watchers =
- this.$$nextSibling = this.$$prevSibling =
- this.$$childHead = this.$$childTail = null;
- this['this'] = this.$root = this;
- this.$$destroyed = false;
- this.$$asyncQueue = [];
- this.$$postDigestQueue = [];
- this.$$listeners = {};
- this.$$listenerCount = {};
- this.$$isolateBindings = {};
- }
-
- /**
- * @ngdoc property
- * @name $rootScope.Scope#$id
- *
- * @description
- * Unique scope ID (monotonically increasing) useful for debugging.
- */
-
- /**
- * @ngdoc property
- * @name $rootScope.Scope#$parent
- *
- * @description
- * Reference to the parent scope.
- */
-
- /**
- * @ngdoc property
- * @name $rootScope.Scope#$root
- *
- * @description
- * Reference to the root scope.
- */
-
- Scope.prototype = {
- constructor: Scope,
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$new
- * @kind function
- *
- * @description
- * Creates a new child {@link ng.$rootScope.Scope scope}.
- *
- * The parent scope will propagate the {@link ng.$rootScope.Scope#$digest $digest()} event.
- * The scope can be removed from the scope hierarchy using {@link ng.$rootScope.Scope#$destroy $destroy()}.
- *
- * {@link ng.$rootScope.Scope#$destroy $destroy()} must be called on a scope when it is
- * desired for the scope and its child scopes to be permanently detached from the parent and
- * thus stop participating in model change detection and listener notification by invoking.
- *
- * @param {boolean} isolate If true, then the scope does not prototypically inherit from the
- * parent scope. The scope is isolated, as it can not see parent scope properties.
- * When creating widgets, it is useful for the widget to not accidentally read parent
- * state.
- *
- * @returns {Object} The newly created child scope.
- *
- */
- $new: function(isolate) {
- var ChildScope,
- child;
-
- if (isolate) {
- child = new Scope();
- child.$root = this.$root;
- // ensure that there is just one async queue per $rootScope and its children
- child.$$asyncQueue = this.$$asyncQueue;
- child.$$postDigestQueue = this.$$postDigestQueue;
- } else {
- // Only create a child scope class if somebody asks for one,
- // but cache it to allow the VM to optimize lookups.
- if (!this.$$childScopeClass) {
- this.$$childScopeClass = function() {
- this.$$watchers = this.$$nextSibling =
- this.$$childHead = this.$$childTail = null;
- this.$$listeners = {};
- this.$$listenerCount = {};
- this.$id = nextUid();
- this.$$childScopeClass = null;
- };
- this.$$childScopeClass.prototype = this;
- }
- child = new this.$$childScopeClass();
- }
- child['this'] = child;
- child.$parent = this;
- child.$$prevSibling = this.$$childTail;
- if (this.$$childHead) {
- this.$$childTail.$$nextSibling = child;
- this.$$childTail = child;
- } else {
- this.$$childHead = this.$$childTail = child;
- }
- return child;
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$watch
- * @kind function
- *
- * @description
- * Registers a `listener` callback to be executed whenever the `watchExpression` changes.
- *
- * - The `watchExpression` is called on every call to {@link ng.$rootScope.Scope#$digest
- * $digest()} and should return the value that will be watched. (Since
- * {@link ng.$rootScope.Scope#$digest $digest()} reruns when it detects changes the
- * `watchExpression` can execute multiple times per
- * {@link ng.$rootScope.Scope#$digest $digest()} and should be idempotent.)
- * - The `listener` is called only when the value from the current `watchExpression` and the
- * previous call to `watchExpression` are not equal (with the exception of the initial run,
- * see below). Inequality is determined according to reference inequality,
- * [strict comparison](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators)
- * via the `!==` Javascript operator, unless `objectEquality == true`
- * (see next point)
- * - When `objectEquality == true`, inequality of the `watchExpression` is determined
- * according to the {@link angular.equals} function. To save the value of the object for
- * later comparison, the {@link angular.copy} function is used. This therefore means that
- * watching complex objects will have adverse memory and performance implications.
- * - The watch `listener` may change the model, which may trigger other `listener`s to fire.
- * This is achieved by rerunning the watchers until no changes are detected. The rerun
- * iteration limit is 10 to prevent an infinite loop deadlock.
- *
- *
- * If you want to be notified whenever {@link ng.$rootScope.Scope#$digest $digest} is called,
- * you can register a `watchExpression` function with no `listener`. (Since `watchExpression`
- * can execute multiple times per {@link ng.$rootScope.Scope#$digest $digest} cycle when a
- * change is detected, be prepared for multiple calls to your listener.)
- *
- * After a watcher is registered with the scope, the `listener` fn is called asynchronously
- * (via {@link ng.$rootScope.Scope#$evalAsync $evalAsync}) to initialize the
- * watcher. In rare cases, this is undesirable because the listener is called when the result
- * of `watchExpression` didn't change. To detect this scenario within the `listener` fn, you
- * can compare the `newVal` and `oldVal`. If these two values are identical (`===`) then the
- * listener was called due to initialization.
- *
- * The example below contains an illustration of using a function as your $watch listener
- *
- *
- * # Example
- * ```js
- // let's assume that scope was dependency injected as the $rootScope
- var scope = $rootScope;
- scope.name = 'misko';
- scope.counter = 0;
-
- expect(scope.counter).toEqual(0);
- scope.$watch('name', function(newValue, oldValue) {
- scope.counter = scope.counter + 1;
- });
- expect(scope.counter).toEqual(0);
-
- scope.$digest();
- // the listener is always called during the first $digest loop after it was registered
- expect(scope.counter).toEqual(1);
-
- scope.$digest();
- // but now it will not be called unless the value changes
- expect(scope.counter).toEqual(1);
-
- scope.name = 'adam';
- scope.$digest();
- expect(scope.counter).toEqual(2);
-
-
-
- // Using a listener function
- var food;
- scope.foodCounter = 0;
- expect(scope.foodCounter).toEqual(0);
- scope.$watch(
- // This is the listener function
- function() { return food; },
- // This is the change handler
- function(newValue, oldValue) {
- if ( newValue !== oldValue ) {
- // Only increment the counter if the value changed
- scope.foodCounter = scope.foodCounter + 1;
- }
- }
- );
- // No digest has been run so the counter will be zero
- expect(scope.foodCounter).toEqual(0);
-
- // Run the digest but since food has not changed count will still be zero
- scope.$digest();
- expect(scope.foodCounter).toEqual(0);
-
- // Update food and run digest. Now the counter will increment
- food = 'cheeseburger';
- scope.$digest();
- expect(scope.foodCounter).toEqual(1);
-
- * ```
- *
- *
- *
- * @param {(function()|string)} watchExpression Expression that is evaluated on each
- * {@link ng.$rootScope.Scope#$digest $digest} cycle. A change in the return value triggers
- * a call to the `listener`.
- *
- * - `string`: Evaluated as {@link guide/expression expression}
- * - `function(scope)`: called with current `scope` as a parameter.
- * @param {(function()|string)=} listener Callback called whenever the return value of
- * the `watchExpression` changes.
- *
- * - `string`: Evaluated as {@link guide/expression expression}
- * - `function(newValue, oldValue, scope)`: called with current and previous values as
- * parameters.
- *
- * @param {boolean=} objectEquality Compare for object equality using {@link angular.equals} instead of
- * comparing for reference equality.
- * @returns {function()} Returns a deregistration function for this listener.
- */
- $watch: function(watchExp, listener, objectEquality) {
- var scope = this,
- get = compileToFn(watchExp, 'watch'),
- array = scope.$$watchers,
- watcher = {
- fn: listener,
- last: initWatchVal,
- get: get,
- exp: watchExp,
- eq: !!objectEquality
- };
-
- lastDirtyWatch = null;
-
- // in the case user pass string, we need to compile it, do we really need this ?
- if (!isFunction(listener)) {
- var listenFn = compileToFn(listener || noop, 'listener');
- watcher.fn = function(newVal, oldVal, scope) {listenFn(scope);};
- }
-
- if (typeof watchExp == 'string' && get.constant) {
- var originalFn = watcher.fn;
- watcher.fn = function(newVal, oldVal, scope) {
- originalFn.call(this, newVal, oldVal, scope);
- arrayRemove(array, watcher);
- };
- }
-
- if (!array) {
- array = scope.$$watchers = [];
- }
- // we use unshift since we use a while loop in $digest for speed.
- // the while loop reads in reverse order.
- array.unshift(watcher);
-
- return function deregisterWatch() {
- arrayRemove(array, watcher);
- lastDirtyWatch = null;
- };
- },
-
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$watchCollection
- * @kind function
- *
- * @description
- * Shallow watches the properties of an object and fires whenever any of the properties change
- * (for arrays, this implies watching the array items; for object maps, this implies watching
- * the properties). If a change is detected, the `listener` callback is fired.
- *
- * - The `obj` collection is observed via standard $watch operation and is examined on every
- * call to $digest() to see if any items have been added, removed, or moved.
- * - The `listener` is called whenever anything within the `obj` has changed. Examples include
- * adding, removing, and moving items belonging to an object or array.
- *
- *
- * # Example
- * ```js
- $scope.names = ['igor', 'matias', 'misko', 'james'];
- $scope.dataCount = 4;
-
- $scope.$watchCollection('names', function(newNames, oldNames) {
- $scope.dataCount = newNames.length;
- });
-
- expect($scope.dataCount).toEqual(4);
- $scope.$digest();
-
- //still at 4 ... no changes
- expect($scope.dataCount).toEqual(4);
-
- $scope.names.pop();
- $scope.$digest();
-
- //now there's been a change
- expect($scope.dataCount).toEqual(3);
- * ```
- *
- *
- * @param {string|function(scope)} obj Evaluated as {@link guide/expression expression}. The
- * expression value should evaluate to an object or an array which is observed on each
- * {@link ng.$rootScope.Scope#$digest $digest} cycle. Any shallow change within the
- * collection will trigger a call to the `listener`.
- *
- * @param {function(newCollection, oldCollection, scope)} listener a callback function called
- * when a change is detected.
- * - The `newCollection` object is the newly modified data obtained from the `obj` expression
- * - The `oldCollection` object is a copy of the former collection data.
- * Due to performance considerations, the`oldCollection` value is computed only if the
- * `listener` function declares two or more arguments.
- * - The `scope` argument refers to the current scope.
- *
- * @returns {function()} Returns a de-registration function for this listener. When the
- * de-registration function is executed, the internal watch operation is terminated.
- */
- $watchCollection: function(obj, listener) {
- var self = this;
- // the current value, updated on each dirty-check run
- var newValue;
- // a shallow copy of the newValue from the last dirty-check run,
- // updated to match newValue during dirty-check run
- var oldValue;
- // a shallow copy of the newValue from when the last change happened
- var veryOldValue;
- // only track veryOldValue if the listener is asking for it
- var trackVeryOldValue = (listener.length > 1);
- var changeDetected = 0;
- var objGetter = $parse(obj);
- var internalArray = [];
- var internalObject = {};
- var initRun = true;
- var oldLength = 0;
-
- function $watchCollectionWatch() {
- newValue = objGetter(self);
- var newLength, key, bothNaN;
-
- if (!isObject(newValue)) { // if primitive
- if (oldValue !== newValue) {
- oldValue = newValue;
- changeDetected++;
- }
- } else if (isArrayLike(newValue)) {
- if (oldValue !== internalArray) {
- // we are transitioning from something which was not an array into array.
- oldValue = internalArray;
- oldLength = oldValue.length = 0;
- changeDetected++;
- }
-
- newLength = newValue.length;
-
- if (oldLength !== newLength) {
- // if lengths do not match we need to trigger change notification
- changeDetected++;
- oldValue.length = oldLength = newLength;
- }
- // copy the items to oldValue and look for changes.
- for (var i = 0; i < newLength; i++) {
- bothNaN = (oldValue[i] !== oldValue[i]) &&
- (newValue[i] !== newValue[i]);
- if (!bothNaN && (oldValue[i] !== newValue[i])) {
- changeDetected++;
- oldValue[i] = newValue[i];
- }
- }
- } else {
- if (oldValue !== internalObject) {
- // we are transitioning from something which was not an object into object.
- oldValue = internalObject = {};
- oldLength = 0;
- changeDetected++;
- }
- // copy the items to oldValue and look for changes.
- newLength = 0;
- for (key in newValue) {
- if (newValue.hasOwnProperty(key)) {
- newLength++;
- if (oldValue.hasOwnProperty(key)) {
- bothNaN = (oldValue[key] !== oldValue[key]) &&
- (newValue[key] !== newValue[key]);
- if (!bothNaN && (oldValue[key] !== newValue[key])) {
- changeDetected++;
- oldValue[key] = newValue[key];
- }
- } else {
- oldLength++;
- oldValue[key] = newValue[key];
- changeDetected++;
- }
- }
- }
- if (oldLength > newLength) {
- // we used to have more keys, need to find them and destroy them.
- changeDetected++;
- for(key in oldValue) {
- if (oldValue.hasOwnProperty(key) && !newValue.hasOwnProperty(key)) {
- oldLength--;
- delete oldValue[key];
- }
- }
- }
- }
- return changeDetected;
- }
-
- function $watchCollectionAction() {
- if (initRun) {
- initRun = false;
- listener(newValue, newValue, self);
- } else {
- listener(newValue, veryOldValue, self);
- }
-
- // make a copy for the next time a collection is changed
- if (trackVeryOldValue) {
- if (!isObject(newValue)) {
- //primitive
- veryOldValue = newValue;
- } else if (isArrayLike(newValue)) {
- veryOldValue = new Array(newValue.length);
- for (var i = 0; i < newValue.length; i++) {
- veryOldValue[i] = newValue[i];
- }
- } else { // if object
- veryOldValue = {};
- for (var key in newValue) {
- if (hasOwnProperty.call(newValue, key)) {
- veryOldValue[key] = newValue[key];
- }
- }
- }
- }
- }
-
- return this.$watch($watchCollectionWatch, $watchCollectionAction);
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$digest
- * @kind function
- *
- * @description
- * Processes all of the {@link ng.$rootScope.Scope#$watch watchers} of the current scope and
- * its children. Because a {@link ng.$rootScope.Scope#$watch watcher}'s listener can change
- * the model, the `$digest()` keeps calling the {@link ng.$rootScope.Scope#$watch watchers}
- * until no more listeners are firing. This means that it is possible to get into an infinite
- * loop. This function will throw `'Maximum iteration limit exceeded.'` if the number of
- * iterations exceeds 10.
- *
- * Usually, you don't call `$digest()` directly in
- * {@link ng.directive:ngController controllers} or in
- * {@link ng.$compileProvider#directive directives}.
- * Instead, you should call {@link ng.$rootScope.Scope#$apply $apply()} (typically from within
- * a {@link ng.$compileProvider#directive directives}), which will force a `$digest()`.
- *
- * If you want to be notified whenever `$digest()` is called,
- * you can register a `watchExpression` function with
- * {@link ng.$rootScope.Scope#$watch $watch()} with no `listener`.
- *
- * In unit tests, you may need to call `$digest()` to simulate the scope life cycle.
- *
- * # Example
- * ```js
- var scope = ...;
- scope.name = 'misko';
- scope.counter = 0;
-
- expect(scope.counter).toEqual(0);
- scope.$watch('name', function(newValue, oldValue) {
- scope.counter = scope.counter + 1;
- });
- expect(scope.counter).toEqual(0);
-
- scope.$digest();
- // the listener is always called during the first $digest loop after it was registered
- expect(scope.counter).toEqual(1);
-
- scope.$digest();
- // but now it will not be called unless the value changes
- expect(scope.counter).toEqual(1);
-
- scope.name = 'adam';
- scope.$digest();
- expect(scope.counter).toEqual(2);
- * ```
- *
- */
- $digest: function() {
- var watch, value, last,
- watchers,
- asyncQueue = this.$$asyncQueue,
- postDigestQueue = this.$$postDigestQueue,
- length,
- dirty, ttl = TTL,
- next, current, target = this,
- watchLog = [],
- logIdx, logMsg, asyncTask;
-
- beginPhase('$digest');
- // Check for changes to browser url that happened in sync before the call to $digest
- $browser.$$checkUrlChange();
-
- lastDirtyWatch = null;
-
- do { // "while dirty" loop
- dirty = false;
- current = target;
-
- while(asyncQueue.length) {
- try {
- asyncTask = asyncQueue.shift();
- asyncTask.scope.$eval(asyncTask.expression);
- } catch (e) {
- clearPhase();
- $exceptionHandler(e);
- }
- lastDirtyWatch = null;
- }
-
- traverseScopesLoop:
- do { // "traverse the scopes" loop
- if ((watchers = current.$$watchers)) {
- // process our watches
- length = watchers.length;
- while (length--) {
- try {
- watch = watchers[length];
- // Most common watches are on primitives, in which case we can short
- // circuit it with === operator, only when === fails do we use .equals
- if (watch) {
- if ((value = watch.get(current)) !== (last = watch.last) &&
- !(watch.eq
- ? equals(value, last)
- : (typeof value === 'number' && typeof last === 'number'
- && isNaN(value) && isNaN(last)))) {
- dirty = true;
- lastDirtyWatch = watch;
- watch.last = watch.eq ? copy(value, null) : value;
- watch.fn(value, ((last === initWatchVal) ? value : last), current);
- if (ttl < 5) {
- logIdx = 4 - ttl;
- if (!watchLog[logIdx]) watchLog[logIdx] = [];
- logMsg = (isFunction(watch.exp))
- ? 'fn: ' + (watch.exp.name || watch.exp.toString())
- : watch.exp;
- logMsg += '; newVal: ' + toJson(value) + '; oldVal: ' + toJson(last);
- watchLog[logIdx].push(logMsg);
- }
- } else if (watch === lastDirtyWatch) {
- // If the most recently dirty watcher is now clean, short circuit since the remaining watchers
- // have already been tested.
- dirty = false;
- break traverseScopesLoop;
- }
- }
- } catch (e) {
- clearPhase();
- $exceptionHandler(e);
- }
- }
- }
-
- // Insanity Warning: scope depth-first traversal
- // yes, this code is a bit crazy, but it works and we have tests to prove it!
- // this piece should be kept in sync with the traversal in $broadcast
- if (!(next = (current.$$childHead ||
- (current !== target && current.$$nextSibling)))) {
- while(current !== target && !(next = current.$$nextSibling)) {
- current = current.$parent;
- }
- }
- } while ((current = next));
-
- // `break traverseScopesLoop;` takes us to here
-
- if((dirty || asyncQueue.length) && !(ttl--)) {
- clearPhase();
- throw $rootScopeMinErr('infdig',
- '{0} $digest() iterations reached. Aborting!\n' +
- 'Watchers fired in the last 5 iterations: {1}',
- TTL, toJson(watchLog));
- }
-
- } while (dirty || asyncQueue.length);
-
- clearPhase();
-
- while(postDigestQueue.length) {
- try {
- postDigestQueue.shift()();
- } catch (e) {
- $exceptionHandler(e);
- }
- }
- },
-
-
- /**
- * @ngdoc event
- * @name $rootScope.Scope#$destroy
- * @eventType broadcast on scope being destroyed
- *
- * @description
- * Broadcasted when a scope and its children are being destroyed.
- *
- * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to
- * clean up DOM bindings before an element is removed from the DOM.
- */
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$destroy
- * @kind function
- *
- * @description
- * Removes the current scope (and all of its children) from the parent scope. Removal implies
- * that calls to {@link ng.$rootScope.Scope#$digest $digest()} will no longer
- * propagate to the current scope and its children. Removal also implies that the current
- * scope is eligible for garbage collection.
- *
- * The `$destroy()` is usually used by directives such as
- * {@link ng.directive:ngRepeat ngRepeat} for managing the
- * unrolling of the loop.
- *
- * Just before a scope is destroyed, a `$destroy` event is broadcasted on this scope.
- * Application code can register a `$destroy` event handler that will give it a chance to
- * perform any necessary cleanup.
- *
- * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to
- * clean up DOM bindings before an element is removed from the DOM.
- */
- $destroy: function() {
- // we can't destroy the root scope or a scope that has been already destroyed
- if (this.$$destroyed) return;
- var parent = this.$parent;
-
- this.$broadcast('$destroy');
- this.$$destroyed = true;
- if (this === $rootScope) return;
-
- forEach(this.$$listenerCount, bind(null, decrementListenerCount, this));
-
- // sever all the references to parent scopes (after this cleanup, the current scope should
- // not be retained by any of our references and should be eligible for garbage collection)
- if (parent.$$childHead == this) parent.$$childHead = this.$$nextSibling;
- if (parent.$$childTail == this) parent.$$childTail = this.$$prevSibling;
- if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling;
- if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling;
-
-
- // All of the code below is bogus code that works around V8's memory leak via optimized code
- // and inline caches.
- //
- // see:
- // - https://code.google.com/p/v8/issues/detail?id=2073#c26
- // - https://github.com/angular/angular.js/issues/6794#issuecomment-38648909
- // - https://github.com/angular/angular.js/issues/1313#issuecomment-10378451
-
- this.$parent = this.$$nextSibling = this.$$prevSibling = this.$$childHead =
- this.$$childTail = this.$root = null;
-
- // don't reset these to null in case some async task tries to register a listener/watch/task
- this.$$listeners = {};
- this.$$watchers = this.$$asyncQueue = this.$$postDigestQueue = [];
-
- // prevent NPEs since these methods have references to properties we nulled out
- this.$destroy = this.$digest = this.$apply = noop;
- this.$on = this.$watch = function() { return noop; };
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$eval
- * @kind function
- *
- * @description
- * Executes the `expression` on the current scope and returns the result. Any exceptions in
- * the expression are propagated (uncaught). This is useful when evaluating Angular
- * expressions.
- *
- * # Example
- * ```js
- var scope = ng.$rootScope.Scope();
- scope.a = 1;
- scope.b = 2;
-
- expect(scope.$eval('a+b')).toEqual(3);
- expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3);
- * ```
- *
- * @param {(string|function())=} expression An angular expression to be executed.
- *
- * - `string`: execute using the rules as defined in {@link guide/expression expression}.
- * - `function(scope)`: execute the function with the current `scope` parameter.
- *
- * @param {(object)=} locals Local variables object, useful for overriding values in scope.
- * @returns {*} The result of evaluating the expression.
- */
- $eval: function(expr, locals) {
- return $parse(expr)(this, locals);
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$evalAsync
- * @kind function
- *
- * @description
- * Executes the expression on the current scope at a later point in time.
- *
- * The `$evalAsync` makes no guarantees as to when the `expression` will be executed, only
- * that:
- *
- * - it will execute after the function that scheduled the evaluation (preferably before DOM
- * rendering).
- * - at least one {@link ng.$rootScope.Scope#$digest $digest cycle} will be performed after
- * `expression` execution.
- *
- * Any exceptions from the execution of the expression are forwarded to the
- * {@link ng.$exceptionHandler $exceptionHandler} service.
- *
- * __Note:__ if this function is called outside of a `$digest` cycle, a new `$digest` cycle
- * will be scheduled. However, it is encouraged to always call code that changes the model
- * from within an `$apply` call. That includes code evaluated via `$evalAsync`.
- *
- * @param {(string|function())=} expression An angular expression to be executed.
- *
- * - `string`: execute using the rules as defined in {@link guide/expression expression}.
- * - `function(scope)`: execute the function with the current `scope` parameter.
- *
- */
- $evalAsync: function(expr) {
- // if we are outside of an $digest loop and this is the first time we are scheduling async
- // task also schedule async auto-flush
- if (!$rootScope.$$phase && !$rootScope.$$asyncQueue.length) {
- $browser.defer(function() {
- if ($rootScope.$$asyncQueue.length) {
- $rootScope.$digest();
- }
- });
- }
-
- this.$$asyncQueue.push({scope: this, expression: expr});
- },
-
- $$postDigest : function(fn) {
- this.$$postDigestQueue.push(fn);
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$apply
- * @kind function
- *
- * @description
- * `$apply()` is used to execute an expression in angular from outside of the angular
- * framework. (For example from browser DOM events, setTimeout, XHR or third party libraries).
- * Because we are calling into the angular framework we need to perform proper scope life
- * cycle of {@link ng.$exceptionHandler exception handling},
- * {@link ng.$rootScope.Scope#$digest executing watches}.
- *
- * ## Life cycle
- *
- * # Pseudo-Code of `$apply()`
- * ```js
- function $apply(expr) {
- try {
- return $eval(expr);
- } catch (e) {
- $exceptionHandler(e);
- } finally {
- $root.$digest();
- }
- }
- * ```
- *
- *
- * Scope's `$apply()` method transitions through the following stages:
- *
- * 1. The {@link guide/expression expression} is executed using the
- * {@link ng.$rootScope.Scope#$eval $eval()} method.
- * 2. Any exceptions from the execution of the expression are forwarded to the
- * {@link ng.$exceptionHandler $exceptionHandler} service.
- * 3. The {@link ng.$rootScope.Scope#$watch watch} listeners are fired immediately after the
- * expression was executed using the {@link ng.$rootScope.Scope#$digest $digest()} method.
- *
- *
- * @param {(string|function())=} exp An angular expression to be executed.
- *
- * - `string`: execute using the rules as defined in {@link guide/expression expression}.
- * - `function(scope)`: execute the function with current `scope` parameter.
- *
- * @returns {*} The result of evaluating the expression.
- */
- $apply: function(expr) {
- try {
- beginPhase('$apply');
- return this.$eval(expr);
- } catch (e) {
- $exceptionHandler(e);
- } finally {
- clearPhase();
- try {
- $rootScope.$digest();
- } catch (e) {
- $exceptionHandler(e);
- throw e;
- }
- }
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$on
- * @kind function
- *
- * @description
- * Listens on events of a given type. See {@link ng.$rootScope.Scope#$emit $emit} for
- * discussion of event life cycle.
- *
- * The event listener function format is: `function(event, args...)`. The `event` object
- * passed into the listener has the following attributes:
- *
- * - `targetScope` - `{Scope}`: the scope on which the event was `$emit`-ed or
- * `$broadcast`-ed.
- * - `currentScope` - `{Scope}`: the current scope which is handling the event.
- * - `name` - `{string}`: name of the event.
- * - `stopPropagation` - `{function=}`: calling `stopPropagation` function will cancel
- * further event propagation (available only for events that were `$emit`-ed).
- * - `preventDefault` - `{function}`: calling `preventDefault` sets `defaultPrevented` flag
- * to true.
- * - `defaultPrevented` - `{boolean}`: true if `preventDefault` was called.
- *
- * @param {string} name Event name to listen on.
- * @param {function(event, ...args)} listener Function to call when the event is emitted.
- * @returns {function()} Returns a deregistration function for this listener.
- */
- $on: function(name, listener) {
- var namedListeners = this.$$listeners[name];
- if (!namedListeners) {
- this.$$listeners[name] = namedListeners = [];
- }
- namedListeners.push(listener);
-
- var current = this;
- do {
- if (!current.$$listenerCount[name]) {
- current.$$listenerCount[name] = 0;
- }
- current.$$listenerCount[name]++;
- } while ((current = current.$parent));
-
- var self = this;
- return function() {
- namedListeners[indexOf(namedListeners, listener)] = null;
- decrementListenerCount(self, 1, name);
- };
- },
-
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$emit
- * @kind function
- *
- * @description
- * Dispatches an event `name` upwards through the scope hierarchy notifying the
- * registered {@link ng.$rootScope.Scope#$on} listeners.
- *
- * The event life cycle starts at the scope on which `$emit` was called. All
- * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get
- * notified. Afterwards, the event traverses upwards toward the root scope and calls all
- * registered listeners along the way. The event will stop propagating if one of the listeners
- * cancels it.
- *
- * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed
- * onto the {@link ng.$exceptionHandler $exceptionHandler} service.
- *
- * @param {string} name Event name to emit.
- * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.
- * @return {Object} Event object (see {@link ng.$rootScope.Scope#$on}).
- */
- $emit: function(name, args) {
- var empty = [],
- namedListeners,
- scope = this,
- stopPropagation = false,
- event = {
- name: name,
- targetScope: scope,
- stopPropagation: function() {stopPropagation = true;},
- preventDefault: function() {
- event.defaultPrevented = true;
- },
- defaultPrevented: false
- },
- listenerArgs = concat([event], arguments, 1),
- i, length;
-
- do {
- namedListeners = scope.$$listeners[name] || empty;
- event.currentScope = scope;
- for (i=0, length=namedListeners.length; i<length; i++) {
-
- // if listeners were deregistered, defragment the array
- if (!namedListeners[i]) {
- namedListeners.splice(i, 1);
- i--;
- length--;
- continue;
- }
- try {
- //allow all listeners attached to the current scope to run
- namedListeners[i].apply(null, listenerArgs);
- } catch (e) {
- $exceptionHandler(e);
- }
- }
- //if any listener on the current scope stops propagation, prevent bubbling
- if (stopPropagation) return event;
- //traverse upwards
- scope = scope.$parent;
- } while (scope);
-
- return event;
- },
-
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$broadcast
- * @kind function
- *
- * @description
- * Dispatches an event `name` downwards to all child scopes (and their children) notifying the
- * registered {@link ng.$rootScope.Scope#$on} listeners.
- *
- * The event life cycle starts at the scope on which `$broadcast` was called. All
- * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get
- * notified. Afterwards, the event propagates to all direct and indirect scopes of the current
- * scope and calls all registered listeners along the way. The event cannot be canceled.
- *
- * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed
- * onto the {@link ng.$exceptionHandler $exceptionHandler} service.
- *
- * @param {string} name Event name to broadcast.
- * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.
- * @return {Object} Event object, see {@link ng.$rootScope.Scope#$on}
- */
- $broadcast: function(name, args) {
- var target = this,
- current = target,
- next = target,
- event = {
- name: name,
- targetScope: target,
- preventDefault: function() {
- event.defaultPrevented = true;
- },
- defaultPrevented: false
- },
- listenerArgs = concat([event], arguments, 1),
- listeners, i, length;
-
- //down while you can, then up and next sibling or up and next sibling until back at root
- while ((current = next)) {
- event.currentScope = current;
- listeners = current.$$listeners[name] || [];
- for (i=0, length = listeners.length; i<length; i++) {
- // if listeners were deregistered, defragment the array
- if (!listeners[i]) {
- listeners.splice(i, 1);
- i--;
- length--;
- continue;
- }
-
- try {
- listeners[i].apply(null, listenerArgs);
- } catch(e) {
- $exceptionHandler(e);
- }
- }
-
- // Insanity Warning: scope depth-first traversal
- // yes, this code is a bit crazy, but it works and we have tests to prove it!
- // this piece should be kept in sync with the traversal in $digest
- // (though it differs due to having the extra check for $$listenerCount)
- if (!(next = ((current.$$listenerCount[name] && current.$$childHead) ||
- (current !== target && current.$$nextSibling)))) {
- while(current !== target && !(next = current.$$nextSibling)) {
- current = current.$parent;
- }
- }
- }
-
- return event;
- }
- };
-
- var $rootScope = new Scope();
-
- return $rootScope;
-
-
- function beginPhase(phase) {
- if ($rootScope.$$phase) {
- throw $rootScopeMinErr('inprog', '{0} already in progress', $rootScope.$$phase);
- }
-
- $rootScope.$$phase = phase;
- }
-
- function clearPhase() {
- $rootScope.$$phase = null;
- }
-
- function compileToFn(exp, name) {
- var fn = $parse(exp);
- assertArgFn(fn, name);
- return fn;
- }
-
- function decrementListenerCount(current, count, name) {
- do {
- current.$$listenerCount[name] -= count;
-
- if (current.$$listenerCount[name] === 0) {
- delete current.$$listenerCount[name];
- }
- } while ((current = current.$parent));
- }
-
- /**
- * function used as an initial value for watchers.
- * because it's unique we can easily tell it apart from other values
- */
- function initWatchVal() {}
- }];
-}
-
-/**
- * @description
- * Private service to sanitize uris for links and images. Used by $compile and $sanitize.
- */
-function $$SanitizeUriProvider() {
- var aHrefSanitizationWhitelist = /^\s*(https?|ftp|mailto|tel|file):/,
- imgSrcSanitizationWhitelist = /^\s*((https?|ftp|file):|data:image\/)/;
-
- /**
- * @description
- * Retrieves or overrides the default regular expression that is used for whitelisting of safe
- * urls during a[href] sanitization.
- *
- * The sanitization is a security measure aimed at prevent XSS attacks via html links.
- *
- * Any url about to be assigned to a[href] via data-binding is first normalized and turned into
- * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist`
- * regular expression. If a match is found, the original url is written into the dom. Otherwise,
- * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
- *
- * @param {RegExp=} regexp New regexp to whitelist urls with.
- * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for
- * chaining otherwise.
- */
- this.aHrefSanitizationWhitelist = function(regexp) {
- if (isDefined(regexp)) {
- aHrefSanitizationWhitelist = regexp;
- return this;
- }
- return aHrefSanitizationWhitelist;
- };
-
-
- /**
- * @description
- * Retrieves or overrides the default regular expression that is used for whitelisting of safe
- * urls during img[src] sanitization.
- *
- * The sanitization is a security measure aimed at prevent XSS attacks via html links.
- *
- * Any url about to be assigned to img[src] via data-binding is first normalized and turned into
- * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist`
- * regular expression. If a match is found, the original url is written into the dom. Otherwise,
- * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
- *
- * @param {RegExp=} regexp New regexp to whitelist urls with.
- * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for
- * chaining otherwise.
- */
- this.imgSrcSanitizationWhitelist = function(regexp) {
- if (isDefined(regexp)) {
- imgSrcSanitizationWhitelist = regexp;
- return this;
- }
- return imgSrcSanitizationWhitelist;
- };
-
- this.$get = function() {
- return function sanitizeUri(uri, isImage) {
- var regex = isImage ? imgSrcSanitizationWhitelist : aHrefSanitizationWhitelist;
- var normalizedVal;
- // NOTE: urlResolve() doesn't support IE < 8 so we don't sanitize for that case.
- if (!msie || msie >= 8 ) {
- normalizedVal = urlResolve(uri).href;
- if (normalizedVal !== '' && !normalizedVal.match(regex)) {
- return 'unsafe:'+normalizedVal;
- }
- }
- return uri;
- };
- };
-}
-
-var $sceMinErr = minErr('$sce');
-
-var SCE_CONTEXTS = {
- HTML: 'html',
- CSS: 'css',
- URL: 'url',
- // RESOURCE_URL is a subtype of URL used in contexts where a privileged resource is sourced from a
- // url. (e.g. ng-include, script src, templateUrl)
- RESOURCE_URL: 'resourceUrl',
- JS: 'js'
-};
-
-// Helper functions follow.
-
-// Copied from:
-// http://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962
-// Prereq: s is a string.
-function escapeForRegexp(s) {
- return s.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g, '\\$1').
- replace(/\x08/g, '\\x08');
-}
-
-
-function adjustMatcher(matcher) {
- if (matcher === 'self') {
- return matcher;
- } else if (isString(matcher)) {
- // Strings match exactly except for 2 wildcards - '*' and '**'.
- // '*' matches any character except those from the set ':/.?&'.
- // '**' matches any character (like .* in a RegExp).
- // More than 2 *'s raises an error as it's ill defined.
- if (matcher.indexOf('***') > -1) {
- throw $sceMinErr('iwcard',
- 'Illegal sequence *** in string matcher. String: {0}', matcher);
- }
- matcher = escapeForRegexp(matcher).
- replace('\\*\\*', '.*').
- replace('\\*', '[^:/.?&;]*');
- return new RegExp('^' + matcher + '$');
- } else if (isRegExp(matcher)) {
- // The only other type of matcher allowed is a Regexp.
- // Match entire URL / disallow partial matches.
- // Flags are reset (i.e. no global, ignoreCase or multiline)
- return new RegExp('^' + matcher.source + '$');
- } else {
- throw $sceMinErr('imatcher',
- 'Matchers may only be "self", string patterns or RegExp objects');
- }
-}
-
-
-function adjustMatchers(matchers) {
- var adjustedMatchers = [];
- if (isDefined(matchers)) {
- forEach(matchers, function(matcher) {
- adjustedMatchers.push(adjustMatcher(matcher));
- });
- }
- return adjustedMatchers;
-}
-
-
-/**
- * @ngdoc service
- * @name $sceDelegate
- * @kind function
- *
- * @description
- *
- * `$sceDelegate` is a service that is used by the `$sce` service to provide {@link ng.$sce Strict
- * Contextual Escaping (SCE)} services to AngularJS.
- *
- * Typically, you would configure or override the {@link ng.$sceDelegate $sceDelegate} instead of
- * the `$sce` service to customize the way Strict Contextual Escaping works in AngularJS. This is
- * because, while the `$sce` provides numerous shorthand methods, etc., you really only need to
- * override 3 core functions (`trustAs`, `getTrusted` and `valueOf`) to replace the way things
- * work because `$sce` delegates to `$sceDelegate` for these operations.
- *
- * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} to configure this service.
- *
- * The default instance of `$sceDelegate` should work out of the box with little pain. While you
- * can override it completely to change the behavior of `$sce`, the common case would
- * involve configuring the {@link ng.$sceDelegateProvider $sceDelegateProvider} instead by setting
- * your own whitelists and blacklists for trusting URLs used for loading AngularJS resources such as
- * templates. Refer {@link ng.$sceDelegateProvider#resourceUrlWhitelist
- * $sceDelegateProvider.resourceUrlWhitelist} and {@link
- * ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}
- */
-
-/**
- * @ngdoc provider
- * @name $sceDelegateProvider
- * @description
- *
- * The `$sceDelegateProvider` provider allows developers to configure the {@link ng.$sceDelegate
- * $sceDelegate} service. This allows one to get/set the whitelists and blacklists used to ensure
- * that the URLs used for sourcing Angular templates are safe. Refer {@link
- * ng.$sceDelegateProvider#resourceUrlWhitelist $sceDelegateProvider.resourceUrlWhitelist} and
- * {@link ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}
- *
- * For the general details about this service in Angular, read the main page for {@link ng.$sce
- * Strict Contextual Escaping (SCE)}.
- *
- * **Example**: Consider the following case. <a name="example"></a>
- *
- * - your app is hosted at url `http://myapp.example.com/`
- * - but some of your templates are hosted on other domains you control such as
- * `http://srv01.assets.example.com/`,  `http://srv02.assets.example.com/`, etc.
- * - and you have an open redirect at `http://myapp.example.com/clickThru?...`.
- *
- * Here is what a secure configuration for this scenario might look like:
- *
- * ```
- * angular.module('myApp', []).config(function($sceDelegateProvider) {
- * $sceDelegateProvider.resourceUrlWhitelist([
- * // Allow same origin resource loads.
- * 'self',
- * // Allow loading from our assets domain. Notice the difference between * and **.
- * 'http://srv*.assets.example.com/**'
- * ]);
- *
- * // The blacklist overrides the whitelist so the open redirect here is blocked.
- * $sceDelegateProvider.resourceUrlBlacklist([
- * 'http://myapp.example.com/clickThru**'
- * ]);
- * });
- * ```
- */
-
-function $SceDelegateProvider() {
- this.SCE_CONTEXTS = SCE_CONTEXTS;
-
- // Resource URLs can also be trusted by policy.
- var resourceUrlWhitelist = ['self'],
- resourceUrlBlacklist = [];
-
- /**
- * @ngdoc method
- * @name $sceDelegateProvider#resourceUrlWhitelist
- * @kind function
- *
- * @param {Array=} whitelist When provided, replaces the resourceUrlWhitelist with the value
- * provided. This must be an array or null. A snapshot of this array is used so further
- * changes to the array are ignored.
- *
- * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items
- * allowed in this array.
- *
- * Note: **an empty whitelist array will block all URLs**!
- *
- * @return {Array} the currently set whitelist array.
- *
- * The **default value** when no whitelist has been explicitly set is `['self']` allowing only
- * same origin resource requests.
- *
- * @description
- * Sets/Gets the whitelist of trusted resource URLs.
- */
- this.resourceUrlWhitelist = function (value) {
- if (arguments.length) {
- resourceUrlWhitelist = adjustMatchers(value);
- }
- return resourceUrlWhitelist;
- };
-
- /**
- * @ngdoc method
- * @name $sceDelegateProvider#resourceUrlBlacklist
- * @kind function
- *
- * @param {Array=} blacklist When provided, replaces the resourceUrlBlacklist with the value
- * provided. This must be an array or null. A snapshot of this array is used so further
- * changes to the array are ignored.
- *
- * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items
- * allowed in this array.
- *
- * The typical usage for the blacklist is to **block
- * [open redirects](http://cwe.mitre.org/data/definitions/601.html)** served by your domain as
- * these would otherwise be trusted but actually return content from the redirected domain.
- *
- * Finally, **the blacklist overrides the whitelist** and has the final say.
- *
- * @return {Array} the currently set blacklist array.
- *
- * The **default value** when no whitelist has been explicitly set is the empty array (i.e. there
- * is no blacklist.)
- *
- * @description
- * Sets/Gets the blacklist of trusted resource URLs.
- */
-
- this.resourceUrlBlacklist = function (value) {
- if (arguments.length) {
- resourceUrlBlacklist = adjustMatchers(value);
- }
- return resourceUrlBlacklist;
- };
-
- this.$get = ['$injector', function($injector) {
-
- var htmlSanitizer = function htmlSanitizer(html) {
- throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');
- };
-
- if ($injector.has('$sanitize')) {
- htmlSanitizer = $injector.get('$sanitize');
- }
-
-
- function matchUrl(matcher, parsedUrl) {
- if (matcher === 'self') {
- return urlIsSameOrigin(parsedUrl);
- } else {
- // definitely a regex. See adjustMatchers()
- return !!matcher.exec(parsedUrl.href);
- }
- }
-
- function isResourceUrlAllowedByPolicy(url) {
- var parsedUrl = urlResolve(url.toString());
- var i, n, allowed = false;
- // Ensure that at least one item from the whitelist allows this url.
- for (i = 0, n = resourceUrlWhitelist.length; i < n; i++) {
- if (matchUrl(resourceUrlWhitelist[i], parsedUrl)) {
- allowed = true;
- break;
- }
- }
- if (allowed) {
- // Ensure that no item from the blacklist blocked this url.
- for (i = 0, n = resourceUrlBlacklist.length; i < n; i++) {
- if (matchUrl(resourceUrlBlacklist[i], parsedUrl)) {
- allowed = false;
- break;
- }
- }
- }
- return allowed;
- }
-
- function generateHolderType(Base) {
- var holderType = function TrustedValueHolderType(trustedValue) {
- this.$$unwrapTrustedValue = function() {
- return trustedValue;
- };
- };
- if (Base) {
- holderType.prototype = new Base();
- }
- holderType.prototype.valueOf = function sceValueOf() {
- return this.$$unwrapTrustedValue();
- };
- holderType.prototype.toString = function sceToString() {
- return this.$$unwrapTrustedValue().toString();
- };
- return holderType;
- }
-
- var trustedValueHolderBase = generateHolderType(),
- byType = {};
-
- byType[SCE_CONTEXTS.HTML] = generateHolderType(trustedValueHolderBase);
- byType[SCE_CONTEXTS.CSS] = generateHolderType(trustedValueHolderBase);
- byType[SCE_CONTEXTS.URL] = generateHolderType(trustedValueHolderBase);
- byType[SCE_CONTEXTS.JS] = generateHolderType(trustedValueHolderBase);
- byType[SCE_CONTEXTS.RESOURCE_URL] = generateHolderType(byType[SCE_CONTEXTS.URL]);
-
- /**
- * @ngdoc method
- * @name $sceDelegate#trustAs
- *
- * @description
- * Returns an object that is trusted by angular for use in specified strict
- * contextual escaping contexts (such as ng-bind-html, ng-include, any src
- * attribute interpolation, any dom event binding attribute interpolation
- * such as for onclick, etc.) that uses the provided value.
- * See {@link ng.$sce $sce} for enabling strict contextual escaping.
- *
- * @param {string} type The kind of context in which this value is safe for use. e.g. url,
- * resourceUrl, html, js and css.
- * @param {*} value The value that that should be considered trusted/safe.
- * @returns {*} A value that can be used to stand in for the provided `value` in places
- * where Angular expects a $sce.trustAs() return value.
- */
- function trustAs(type, trustedValue) {
- var Constructor = (byType.hasOwnProperty(type) ? byType[type] : null);
- if (!Constructor) {
- throw $sceMinErr('icontext',
- 'Attempted to trust a value in invalid context. Context: {0}; Value: {1}',
- type, trustedValue);
- }
- if (trustedValue === null || trustedValue === undefined || trustedValue === '') {
- return trustedValue;
- }
- // All the current contexts in SCE_CONTEXTS happen to be strings. In order to avoid trusting
- // mutable objects, we ensure here that the value passed in is actually a string.
- if (typeof trustedValue !== 'string') {
- throw $sceMinErr('itype',
- 'Attempted to trust a non-string value in a content requiring a string: Context: {0}',
- type);
- }
- return new Constructor(trustedValue);
- }
-
- /**
- * @ngdoc method
- * @name $sceDelegate#valueOf
- *
- * @description
- * If the passed parameter had been returned by a prior call to {@link ng.$sceDelegate#trustAs
- * `$sceDelegate.trustAs`}, returns the value that had been passed to {@link
- * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}.
- *
- * If the passed parameter is not a value that had been returned by {@link
- * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}, returns it as-is.
- *
- * @param {*} value The result of a prior {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}
- * call or anything else.
- * @returns {*} The `value` that was originally provided to {@link ng.$sceDelegate#trustAs
- * `$sceDelegate.trustAs`} if `value` is the result of such a call. Otherwise, returns
- * `value` unchanged.
- */
- function valueOf(maybeTrusted) {
- if (maybeTrusted instanceof trustedValueHolderBase) {
- return maybeTrusted.$$unwrapTrustedValue();
- } else {
- return maybeTrusted;
- }
- }
-
- /**
- * @ngdoc method
- * @name $sceDelegate#getTrusted
- *
- * @description
- * Takes the result of a {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`} call and
- * returns the originally supplied value if the queried context type is a supertype of the
- * created type. If this condition isn't satisfied, throws an exception.
- *
- * @param {string} type The kind of context in which this value is to be used.
- * @param {*} maybeTrusted The result of a prior {@link ng.$sceDelegate#trustAs
- * `$sceDelegate.trustAs`} call.
- * @returns {*} The value the was originally provided to {@link ng.$sceDelegate#trustAs
- * `$sceDelegate.trustAs`} if valid in this context. Otherwise, throws an exception.
- */
- function getTrusted(type, maybeTrusted) {
- if (maybeTrusted === null || maybeTrusted === undefined || maybeTrusted === '') {
- return maybeTrusted;
- }
- var constructor = (byType.hasOwnProperty(type) ? byType[type] : null);
- if (constructor && maybeTrusted instanceof constructor) {
- return maybeTrusted.$$unwrapTrustedValue();
- }
- // If we get here, then we may only take one of two actions.
- // 1. sanitize the value for the requested type, or
- // 2. throw an exception.
- if (type === SCE_CONTEXTS.RESOURCE_URL) {
- if (isResourceUrlAllowedByPolicy(maybeTrusted)) {
- return maybeTrusted;
- } else {
- throw $sceMinErr('insecurl',
- 'Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}',
- maybeTrusted.toString());
- }
- } else if (type === SCE_CONTEXTS.HTML) {
- return htmlSanitizer(maybeTrusted);
- }
- throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');
- }
-
- return { trustAs: trustAs,
- getTrusted: getTrusted,
- valueOf: valueOf };
- }];
-}
-
-
-/**
- * @ngdoc provider
- * @name $sceProvider
- * @description
- *
- * The $sceProvider provider allows developers to configure the {@link ng.$sce $sce} service.
- * - enable/disable Strict Contextual Escaping (SCE) in a module
- * - override the default implementation with a custom delegate
- *
- * Read more about {@link ng.$sce Strict Contextual Escaping (SCE)}.
- */
-
-/* jshint maxlen: false*/
-
-/**
- * @ngdoc service
- * @name $sce
- * @kind function
- *
- * @description
- *
- * `$sce` is a service that provides Strict Contextual Escaping services to AngularJS.
- *
- * # Strict Contextual Escaping
- *
- * Strict Contextual Escaping (SCE) is a mode in which AngularJS requires bindings in certain
- * contexts to result in a value that is marked as safe to use for that context. One example of
- * such a context is binding arbitrary html controlled by the user via `ng-bind-html`. We refer
- * to these contexts as privileged or SCE contexts.
- *
- * As of version 1.2, Angular ships with SCE enabled by default.
- *
- * Note: When enabled (the default), IE8 in quirks mode is not supported. In this mode, IE8 allows
- * one to execute arbitrary javascript by the use of the expression() syntax. Refer
- * <http://blogs.msdn.com/b/ie/archive/2008/10/16/ending-expressions.aspx> to learn more about them.
- * You can ensure your document is in standards mode and not quirks mode by adding `<!doctype html>`
- * to the top of your HTML document.
- *
- * SCE assists in writing code in way that (a) is secure by default and (b) makes auditing for
- * security vulnerabilities such as XSS, clickjacking, etc. a lot easier.
- *
- * Here's an example of a binding in a privileged context:
- *
- * ```
- * <input ng-model="userHtml">
- * <div ng-bind-html="userHtml"></div>
- * ```
- *
- * Notice that `ng-bind-html` is bound to `userHtml` controlled by the user. With SCE
- * disabled, this application allows the user to render arbitrary HTML into the DIV.
- * In a more realistic example, one may be rendering user comments, blog articles, etc. via
- * bindings. (HTML is just one example of a context where rendering user controlled input creates
- * security vulnerabilities.)
- *
- * For the case of HTML, you might use a library, either on the client side, or on the server side,
- * to sanitize unsafe HTML before binding to the value and rendering it in the document.
- *
- * How would you ensure that every place that used these types of bindings was bound to a value that
- * was sanitized by your library (or returned as safe for rendering by your server?) How can you
- * ensure that you didn't accidentally delete the line that sanitized the value, or renamed some
- * properties/fields and forgot to update the binding to the sanitized value?
- *
- * To be secure by default, you want to ensure that any such bindings are disallowed unless you can
- * determine that something explicitly says it's safe to use a value for binding in that
- * context. You can then audit your code (a simple grep would do) to ensure that this is only done
- * for those values that you can easily tell are safe - because they were received from your server,
- * sanitized by your library, etc. You can organize your codebase to help with this - perhaps
- * allowing only the files in a specific directory to do this. Ensuring that the internal API
- * exposed by that code doesn't markup arbitrary values as safe then becomes a more manageable task.
- *
- * In the case of AngularJS' SCE service, one uses {@link ng.$sce#trustAs $sce.trustAs}
- * (and shorthand methods such as {@link ng.$sce#trustAsHtml $sce.trustAsHtml}, etc.) to
- * obtain values that will be accepted by SCE / privileged contexts.
- *
- *
- * ## How does it work?
- *
- * In privileged contexts, directives and code will bind to the result of {@link ng.$sce#getTrusted
- * $sce.getTrusted(context, value)} rather than to the value directly. Directives use {@link
- * ng.$sce#parse $sce.parseAs} rather than `$parse` to watch attribute bindings, which performs the
- * {@link ng.$sce#getTrusted $sce.getTrusted} behind the scenes on non-constant literals.
- *
- * As an example, {@link ng.directive:ngBindHtml ngBindHtml} uses {@link
- * ng.$sce#parseAsHtml $sce.parseAsHtml(binding expression)}. Here's the actual code (slightly
- * simplified):
- *
- * ```
- * var ngBindHtmlDirective = ['$sce', function($sce) {
- * return function(scope, element, attr) {
- * scope.$watch($sce.parseAsHtml(attr.ngBindHtml), function(value) {
- * element.html(value || '');
- * });
- * };
- * }];
- * ```
- *
- * ## Impact on loading templates
- *
- * This applies both to the {@link ng.directive:ngInclude `ng-include`} directive as well as
- * `templateUrl`'s specified by {@link guide/directive directives}.
- *
- * By default, Angular only loads templates from the same domain and protocol as the application
- * document. This is done by calling {@link ng.$sce#getTrustedResourceUrl
- * $sce.getTrustedResourceUrl} on the template URL. To load templates from other domains and/or
- * protocols, you may either either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist
- * them} or {@link ng.$sce#trustAsResourceUrl wrap it} into a trusted value.
- *
- * *Please note*:
- * The browser's
- * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)
- * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)
- * policy apply in addition to this and may further restrict whether the template is successfully
- * loaded. This means that without the right CORS policy, loading templates from a different domain
- * won't work on all browsers. Also, loading templates from `file://` URL does not work on some
- * browsers.
- *
- * ## This feels like too much overhead for the developer?
- *
- * It's important to remember that SCE only applies to interpolation expressions.
- *
- * If your expressions are constant literals, they're automatically trusted and you don't need to
- * call `$sce.trustAs` on them (remember to include the `ngSanitize` module) (e.g.
- * `<div ng-bind-html="'<b>implicitly trusted</b>'"></div>`) just works.
- *
- * Additionally, `a[href]` and `img[src]` automatically sanitize their URLs and do not pass them
- * through {@link ng.$sce#getTrusted $sce.getTrusted}. SCE doesn't play a role here.
- *
- * The included {@link ng.$sceDelegate $sceDelegate} comes with sane defaults to allow you to load
- * templates in `ng-include` from your application's domain without having to even know about SCE.
- * It blocks loading templates from other domains or loading templates over http from an https
- * served document. You can change these by setting your own custom {@link
- * ng.$sceDelegateProvider#resourceUrlWhitelist whitelists} and {@link
- * ng.$sceDelegateProvider#resourceUrlBlacklist blacklists} for matching such URLs.
- *
- * This significantly reduces the overhead. It is far easier to pay the small overhead and have an
- * application that's secure and can be audited to verify that with much more ease than bolting
- * security onto an application later.
- *
- * <a name="contexts"></a>
- * ## What trusted context types are supported?
- *
- * | Context | Notes |
- * |---------------------|----------------|
- * | `$sce.HTML` | For HTML that's safe to source into the application. The {@link ng.directive:ngBindHtml ngBindHtml} directive uses this context for bindings. If an unsafe value is encountered and the {@link ngSanitize $sanitize} module is present this will sanitize the value instead of throwing an error. |
- * | `$sce.CSS` | For CSS that's safe to source into the application. Currently unused. Feel free to use it in your own directives. |
- * | `$sce.URL` | For URLs that are safe to follow as links. Currently unused (`<a href=` and `<img src=` sanitize their urls and don't constitute an SCE context. |
- * | `$sce.RESOURCE_URL` | For URLs that are not only safe to follow as links, but whose contents are also safe to include in your application. Examples include `ng-include`, `src` / `ngSrc` bindings for tags other than `IMG` (e.g. `IFRAME`, `OBJECT`, etc.) <br><br>Note that `$sce.RESOURCE_URL` makes a stronger statement about the URL than `$sce.URL` does and therefore contexts requiring values trusted for `$sce.RESOURCE_URL` can be used anywhere that values trusted for `$sce.URL` are required. |
- * | `$sce.JS` | For JavaScript that is safe to execute in your application's context. Currently unused. Feel free to use it in your own directives. |
- *
- * ## Format of items in {@link ng.$sceDelegateProvider#resourceUrlWhitelist resourceUrlWhitelist}/{@link ng.$sceDelegateProvider#resourceUrlBlacklist Blacklist} <a name="resourceUrlPatternItem"></a>
- *
- * Each element in these arrays must be one of the following:
- *
- * - **'self'**
- * - The special **string**, `'self'`, can be used to match against all URLs of the **same
- * domain** as the application document using the **same protocol**.
- * - **String** (except the special value `'self'`)
- * - The string is matched against the full *normalized / absolute URL* of the resource
- * being tested (substring matches are not good enough.)
- * - There are exactly **two wildcard sequences** - `*` and `**`. All other characters
- * match themselves.
- * - `*`: matches zero or more occurrences of any character other than one of the following 6
- * characters: '`:`', '`/`', '`.`', '`?`', '`&`' and ';'. It's a useful wildcard for use
- * in a whitelist.
- * - `**`: matches zero or more occurrences of *any* character. As such, it's not
- * not appropriate to use in for a scheme, domain, etc. as it would match too much. (e.g.
- * http://**.example.com/ would match http://evil.com/?ignore=.example.com/ and that might
- * not have been the intention.) Its usage at the very end of the path is ok. (e.g.
- * http://foo.example.com/templates/**).
- * - **RegExp** (*see caveat below*)
- * - *Caveat*: While regular expressions are powerful and offer great flexibility, their syntax
- * (and all the inevitable escaping) makes them *harder to maintain*. It's easy to
- * accidentally introduce a bug when one updates a complex expression (imho, all regexes should
- * have good test coverage.). For instance, the use of `.` in the regex is correct only in a
- * small number of cases. A `.` character in the regex used when matching the scheme or a
- * subdomain could be matched against a `:` or literal `.` that was likely not intended. It
- * is highly recommended to use the string patterns and only fall back to regular expressions
- * if they as a last resort.
- * - The regular expression must be an instance of RegExp (i.e. not a string.) It is
- * matched against the **entire** *normalized / absolute URL* of the resource being tested
- * (even when the RegExp did not have the `^` and `$` codes.) In addition, any flags
- * present on the RegExp (such as multiline, global, ignoreCase) are ignored.
- * - If you are generating your JavaScript from some other templating engine (not
- * recommended, e.g. in issue [#4006](https://github.com/angular/angular.js/issues/4006)),
- * remember to escape your regular expression (and be aware that you might need more than
- * one level of escaping depending on your templating engine and the way you interpolated
- * the value.) Do make use of your platform's escaping mechanism as it might be good
- * enough before coding your own. e.g. Ruby has
- * [Regexp.escape(str)](http://www.ruby-doc.org/core-2.0.0/Regexp.html#method-c-escape)
- * and Python has [re.escape](http://docs.python.org/library/re.html#re.escape).
- * Javascript lacks a similar built in function for escaping. Take a look at Google
- * Closure library's [goog.string.regExpEscape(s)](
- * http://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962).
- *
- * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} for an example.
- *
- * ## Show me an example using SCE.
- *
- * <example module="mySceApp" deps="angular-sanitize.js">
- * <file name="index.html">
- * <div ng-controller="myAppController as myCtrl">
- * <i ng-bind-html="myCtrl.explicitlyTrustedHtml" id="explicitlyTrustedHtml"></i><br><br>
- * <b>User comments</b><br>
- * By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when
- * $sanitize is available. If $sanitize isn't available, this results in an error instead of an
- * exploit.
- * <div class="well">
- * <div ng-repeat="userComment in myCtrl.userComments">
- * <b>{{userComment.name}}</b>:
- * <span ng-bind-html="userComment.htmlComment" class="htmlComment"></span>
- * <br>
- * </div>
- * </div>
- * </div>
- * </file>
- *
- * <file name="script.js">
- * var mySceApp = angular.module('mySceApp', ['ngSanitize']);
- *
- * mySceApp.controller("myAppController", function myAppController($http, $templateCache, $sce) {
- * var self = this;
- * $http.get("test_data.json", {cache: $templateCache}).success(function(userComments) {
- * self.userComments = userComments;
- * });
- * self.explicitlyTrustedHtml = $sce.trustAsHtml(
- * '<span onmouseover="this.textContent=&quot;Explicitly trusted HTML bypasses ' +
- * 'sanitization.&quot;">Hover over this text.</span>');
- * });
- * </file>
- *
- * <file name="test_data.json">
- * [
- * { "name": "Alice",
- * "htmlComment":
- * "<span onmouseover='this.textContent=\"PWN3D!\"'>Is <i>anyone</i> reading this?</span>"
- * },
- * { "name": "Bob",
- * "htmlComment": "<i>Yes!</i> Am I the only other one?"
- * }
- * ]
- * </file>
- *
- * <file name="protractor.js" type="protractor">
- * describe('SCE doc demo', function() {
- * it('should sanitize untrusted values', function() {
- * expect(element.all(by.css('.htmlComment')).first().getInnerHtml())
- * .toBe('<span>Is <i>anyone</i> reading this?</span>');
- * });
- *
- * it('should NOT sanitize explicitly trusted values', function() {
- * expect(element(by.id('explicitlyTrustedHtml')).getInnerHtml()).toBe(
- * '<span onmouseover="this.textContent=&quot;Explicitly trusted HTML bypasses ' +
- * 'sanitization.&quot;">Hover over this text.</span>');
- * });
- * });
- * </file>
- * </example>
- *
- *
- *
- * ## Can I disable SCE completely?
- *
- * Yes, you can. However, this is strongly discouraged. SCE gives you a lot of security benefits
- * for little coding overhead. It will be much harder to take an SCE disabled application and
- * either secure it on your own or enable SCE at a later stage. It might make sense to disable SCE
- * for cases where you have a lot of existing code that was written before SCE was introduced and
- * you're migrating them a module at a time.
- *
- * That said, here's how you can completely disable SCE:
- *
- * ```
- * angular.module('myAppWithSceDisabledmyApp', []).config(function($sceProvider) {
- * // Completely disable SCE. For demonstration purposes only!
- * // Do not use in new projects.
- * $sceProvider.enabled(false);
- * });
- * ```
- *
- */
-/* jshint maxlen: 100 */
-
-function $SceProvider() {
- var enabled = true;
-
- /**
- * @ngdoc method
- * @name $sceProvider#enabled
- * @kind function
- *
- * @param {boolean=} value If provided, then enables/disables SCE.
- * @return {boolean} true if SCE is enabled, false otherwise.
- *
- * @description
- * Enables/disables SCE and returns the current value.
- */
- this.enabled = function (value) {
- if (arguments.length) {
- enabled = !!value;
- }
- return enabled;
- };
-
-
- /* Design notes on the default implementation for SCE.
- *
- * The API contract for the SCE delegate
- * -------------------------------------
- * The SCE delegate object must provide the following 3 methods:
- *
- * - trustAs(contextEnum, value)
- * This method is used to tell the SCE service that the provided value is OK to use in the
- * contexts specified by contextEnum. It must return an object that will be accepted by
- * getTrusted() for a compatible contextEnum and return this value.
- *
- * - valueOf(value)
- * For values that were not produced by trustAs(), return them as is. For values that were
- * produced by trustAs(), return the corresponding input value to trustAs. Basically, if
- * trustAs is wrapping the given values into some type, this operation unwraps it when given
- * such a value.
- *
- * - getTrusted(contextEnum, value)
- * This function should return the a value that is safe to use in the context specified by
- * contextEnum or throw and exception otherwise.
- *
- * NOTE: This contract deliberately does NOT state that values returned by trustAs() must be
- * opaque or wrapped in some holder object. That happens to be an implementation detail. For
- * instance, an implementation could maintain a registry of all trusted objects by context. In
- * such a case, trustAs() would return the same object that was passed in. getTrusted() would
- * return the same object passed in if it was found in the registry under a compatible context or
- * throw an exception otherwise. An implementation might only wrap values some of the time based
- * on some criteria. getTrusted() might return a value and not throw an exception for special
- * constants or objects even if not wrapped. All such implementations fulfill this contract.
- *
- *
- * A note on the inheritance model for SCE contexts
- * ------------------------------------------------
- * I've used inheritance and made RESOURCE_URL wrapped types a subtype of URL wrapped types. This
- * is purely an implementation details.
- *
- * The contract is simply this:
- *
- * getTrusted($sce.RESOURCE_URL, value) succeeding implies that getTrusted($sce.URL, value)
- * will also succeed.
- *
- * Inheritance happens to capture this in a natural way. In some future, we
- * may not use inheritance anymore. That is OK because no code outside of
- * sce.js and sceSpecs.js would need to be aware of this detail.
- */
-
- this.$get = ['$parse', '$sniffer', '$sceDelegate', function(
- $parse, $sniffer, $sceDelegate) {
- // Prereq: Ensure that we're not running in IE8 quirks mode. In that mode, IE allows
- // the "expression(javascript expression)" syntax which is insecure.
- if (enabled && $sniffer.msie && $sniffer.msieDocumentMode < 8) {
- throw $sceMinErr('iequirks',
- 'Strict Contextual Escaping does not support Internet Explorer version < 9 in quirks ' +
- 'mode. You can fix this by adding the text <!doctype html> to the top of your HTML ' +
- 'document. See http://docs.angularjs.org/api/ng.$sce for more information.');
- }
-
- var sce = shallowCopy(SCE_CONTEXTS);
-
- /**
- * @ngdoc method
- * @name $sce#isEnabled
- * @kind function
- *
- * @return {Boolean} true if SCE is enabled, false otherwise. If you want to set the value, you
- * have to do it at module config time on {@link ng.$sceProvider $sceProvider}.
- *
- * @description
- * Returns a boolean indicating if SCE is enabled.
- */
- sce.isEnabled = function () {
- return enabled;
- };
- sce.trustAs = $sceDelegate.trustAs;
- sce.getTrusted = $sceDelegate.getTrusted;
- sce.valueOf = $sceDelegate.valueOf;
-
- if (!enabled) {
- sce.trustAs = sce.getTrusted = function(type, value) { return value; };
- sce.valueOf = identity;
- }
-
- /**
- * @ngdoc method
- * @name $sce#parseAs
- *
- * @description
- * Converts Angular {@link guide/expression expression} into a function. This is like {@link
- * ng.$parse $parse} and is identical when the expression is a literal constant. Otherwise, it
- * wraps the expression in a call to {@link ng.$sce#getTrusted $sce.getTrusted(*type*,
- * *result*)}
- *
- * @param {string} type The kind of SCE context in which this result will be used.
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- */
- sce.parseAs = function sceParseAs(type, expr) {
- var parsed = $parse(expr);
- if (parsed.literal && parsed.constant) {
- return parsed;
- } else {
- return function sceParseAsTrusted(self, locals) {
- return sce.getTrusted(type, parsed(self, locals));
- };
- }
- };
-
- /**
- * @ngdoc method
- * @name $sce#trustAs
- *
- * @description
- * Delegates to {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}. As such,
- * returns an object that is trusted by angular for use in specified strict contextual
- * escaping contexts (such as ng-bind-html, ng-include, any src attribute
- * interpolation, any dom event binding attribute interpolation such as for onclick, etc.)
- * that uses the provided value. See * {@link ng.$sce $sce} for enabling strict contextual
- * escaping.
- *
- * @param {string} type The kind of context in which this value is safe for use. e.g. url,
- * resource_url, html, js and css.
- * @param {*} value The value that that should be considered trusted/safe.
- * @returns {*} A value that can be used to stand in for the provided `value` in places
- * where Angular expects a $sce.trustAs() return value.
- */
-
- /**
- * @ngdoc method
- * @name $sce#trustAsHtml
- *
- * @description
- * Shorthand method. `$sce.trustAsHtml(value)` →
- * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.HTML, value)`}
- *
- * @param {*} value The value to trustAs.
- * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedHtml
- * $sce.getTrustedHtml(value)} to obtain the original value. (privileged directives
- * only accept expressions that are either literal constants or are the
- * return value of {@link ng.$sce#trustAs $sce.trustAs}.)
- */
-
- /**
- * @ngdoc method
- * @name $sce#trustAsUrl
- *
- * @description
- * Shorthand method. `$sce.trustAsUrl(value)` →
- * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.URL, value)`}
- *
- * @param {*} value The value to trustAs.
- * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedUrl
- * $sce.getTrustedUrl(value)} to obtain the original value. (privileged directives
- * only accept expressions that are either literal constants or are the
- * return value of {@link ng.$sce#trustAs $sce.trustAs}.)
- */
-
- /**
- * @ngdoc method
- * @name $sce#trustAsResourceUrl
- *
- * @description
- * Shorthand method. `$sce.trustAsResourceUrl(value)` →
- * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.RESOURCE_URL, value)`}
- *
- * @param {*} value The value to trustAs.
- * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedResourceUrl
- * $sce.getTrustedResourceUrl(value)} to obtain the original value. (privileged directives
- * only accept expressions that are either literal constants or are the return
- * value of {@link ng.$sce#trustAs $sce.trustAs}.)
- */
-
- /**
- * @ngdoc method
- * @name $sce#trustAsJs
- *
- * @description
- * Shorthand method. `$sce.trustAsJs(value)` →
- * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.JS, value)`}
- *
- * @param {*} value The value to trustAs.
- * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedJs
- * $sce.getTrustedJs(value)} to obtain the original value. (privileged directives
- * only accept expressions that are either literal constants or are the
- * return value of {@link ng.$sce#trustAs $sce.trustAs}.)
- */
-
- /**
- * @ngdoc method
- * @name $sce#getTrusted
- *
- * @description
- * Delegates to {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted`}. As such,
- * takes the result of a {@link ng.$sce#trustAs `$sce.trustAs`}() call and returns the
- * originally supplied value if the queried context type is a supertype of the created type.
- * If this condition isn't satisfied, throws an exception.
- *
- * @param {string} type The kind of context in which this value is to be used.
- * @param {*} maybeTrusted The result of a prior {@link ng.$sce#trustAs `$sce.trustAs`}
- * call.
- * @returns {*} The value the was originally provided to
- * {@link ng.$sce#trustAs `$sce.trustAs`} if valid in this context.
- * Otherwise, throws an exception.
- */
-
- /**
- * @ngdoc method
- * @name $sce#getTrustedHtml
- *
- * @description
- * Shorthand method. `$sce.getTrustedHtml(value)` →
- * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.HTML, value)`}
- *
- * @param {*} value The value to pass to `$sce.getTrusted`.
- * @returns {*} The return value of `$sce.getTrusted($sce.HTML, value)`
- */
-
- /**
- * @ngdoc method
- * @name $sce#getTrustedCss
- *
- * @description
- * Shorthand method. `$sce.getTrustedCss(value)` →
- * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.CSS, value)`}
- *
- * @param {*} value The value to pass to `$sce.getTrusted`.
- * @returns {*} The return value of `$sce.getTrusted($sce.CSS, value)`
- */
-
- /**
- * @ngdoc method
- * @name $sce#getTrustedUrl
- *
- * @description
- * Shorthand method. `$sce.getTrustedUrl(value)` →
- * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.URL, value)`}
- *
- * @param {*} value The value to pass to `$sce.getTrusted`.
- * @returns {*} The return value of `$sce.getTrusted($sce.URL, value)`
- */
-
- /**
- * @ngdoc method
- * @name $sce#getTrustedResourceUrl
- *
- * @description
- * Shorthand method. `$sce.getTrustedResourceUrl(value)` →
- * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.RESOURCE_URL, value)`}
- *
- * @param {*} value The value to pass to `$sceDelegate.getTrusted`.
- * @returns {*} The return value of `$sce.getTrusted($sce.RESOURCE_URL, value)`
- */
-
- /**
- * @ngdoc method
- * @name $sce#getTrustedJs
- *
- * @description
- * Shorthand method. `$sce.getTrustedJs(value)` →
- * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.JS, value)`}
- *
- * @param {*} value The value to pass to `$sce.getTrusted`.
- * @returns {*} The return value of `$sce.getTrusted($sce.JS, value)`
- */
-
- /**
- * @ngdoc method
- * @name $sce#parseAsHtml
- *
- * @description
- * Shorthand method. `$sce.parseAsHtml(expression string)` →
- * {@link ng.$sce#parse `$sce.parseAs($sce.HTML, value)`}
- *
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- */
-
- /**
- * @ngdoc method
- * @name $sce#parseAsCss
- *
- * @description
- * Shorthand method. `$sce.parseAsCss(value)` →
- * {@link ng.$sce#parse `$sce.parseAs($sce.CSS, value)`}
- *
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- */
-
- /**
- * @ngdoc method
- * @name $sce#parseAsUrl
- *
- * @description
- * Shorthand method. `$sce.parseAsUrl(value)` →
- * {@link ng.$sce#parse `$sce.parseAs($sce.URL, value)`}
- *
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- */
-
- /**
- * @ngdoc method
- * @name $sce#parseAsResourceUrl
- *
- * @description
- * Shorthand method. `$sce.parseAsResourceUrl(value)` →
- * {@link ng.$sce#parse `$sce.parseAs($sce.RESOURCE_URL, value)`}
- *
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- */
-
- /**
- * @ngdoc method
- * @name $sce#parseAsJs
- *
- * @description
- * Shorthand method. `$sce.parseAsJs(value)` →
- * {@link ng.$sce#parse `$sce.parseAs($sce.JS, value)`}
- *
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- */
-
- // Shorthand delegations.
- var parse = sce.parseAs,
- getTrusted = sce.getTrusted,
- trustAs = sce.trustAs;
-
- forEach(SCE_CONTEXTS, function (enumValue, name) {
- var lName = lowercase(name);
- sce[camelCase("parse_as_" + lName)] = function (expr) {
- return parse(enumValue, expr);
- };
- sce[camelCase("get_trusted_" + lName)] = function (value) {
- return getTrusted(enumValue, value);
- };
- sce[camelCase("trust_as_" + lName)] = function (value) {
- return trustAs(enumValue, value);
- };
- });
-
- return sce;
- }];
-}
-
-/**
- * !!! This is an undocumented "private" service !!!
- *
- * @name $sniffer
- * @requires $window
- * @requires $document
- *
- * @property {boolean} history Does the browser support html5 history api ?
- * @property {boolean} hashchange Does the browser support hashchange event ?
- * @property {boolean} transitions Does the browser support CSS transition events ?
- * @property {boolean} animations Does the browser support CSS animation events ?
- *
- * @description
- * This is very simple implementation of testing browser's features.
- */
-function $SnifferProvider() {
- this.$get = ['$window', '$document', function($window, $document) {
- var eventSupport = {},
- android =
- int((/android (\d+)/.exec(lowercase(($window.navigator || {}).userAgent)) || [])[1]),
- boxee = /Boxee/i.test(($window.navigator || {}).userAgent),
- document = $document[0] || {},
- documentMode = document.documentMode,
- vendorPrefix,
- vendorRegex = /^(Moz|webkit|O|ms)(?=[A-Z])/,
- bodyStyle = document.body && document.body.style,
- transitions = false,
- animations = false,
- match;
-
- if (bodyStyle) {
- for(var prop in bodyStyle) {
- if(match = vendorRegex.exec(prop)) {
- vendorPrefix = match[0];
- vendorPrefix = vendorPrefix.substr(0, 1).toUpperCase() + vendorPrefix.substr(1);
- break;
- }
- }
-
- if(!vendorPrefix) {
- vendorPrefix = ('WebkitOpacity' in bodyStyle) && 'webkit';
- }
-
- transitions = !!(('transition' in bodyStyle) || (vendorPrefix + 'Transition' in bodyStyle));
- animations = !!(('animation' in bodyStyle) || (vendorPrefix + 'Animation' in bodyStyle));
-
- if (android && (!transitions||!animations)) {
- transitions = isString(document.body.style.webkitTransition);
- animations = isString(document.body.style.webkitAnimation);
- }
- }
-
-
- return {
- // Android has history.pushState, but it does not update location correctly
- // so let's not use the history API at all.
- // http://code.google.com/p/android/issues/detail?id=17471
- // https://github.com/angular/angular.js/issues/904
-
- // older webkit browser (533.9) on Boxee box has exactly the same problem as Android has
- // so let's not use the history API also
- // We are purposefully using `!(android < 4)` to cover the case when `android` is undefined
- // jshint -W018
- history: !!($window.history && $window.history.pushState && !(android < 4) && !boxee),
- // jshint +W018
- hashchange: 'onhashchange' in $window &&
- // IE8 compatible mode lies
- (!documentMode || documentMode > 7),
- hasEvent: function(event) {
- // IE9 implements 'input' event it's so fubared that we rather pretend that it doesn't have
- // it. In particular the event is not fired when backspace or delete key are pressed or
- // when cut operation is performed.
- if (event == 'input' && msie == 9) return false;
-
- if (isUndefined(eventSupport[event])) {
- var divElm = document.createElement('div');
- eventSupport[event] = 'on' + event in divElm;
- }
-
- return eventSupport[event];
- },
- csp: csp(),
- vendorPrefix: vendorPrefix,
- transitions : transitions,
- animations : animations,
- android: android,
- msie : msie,
- msieDocumentMode: documentMode
- };
- }];
-}
-
-function $TimeoutProvider() {
- this.$get = ['$rootScope', '$browser', '$q', '$exceptionHandler',
- function($rootScope, $browser, $q, $exceptionHandler) {
- var deferreds = {};
-
-
- /**
- * @ngdoc service
- * @name $timeout
- *
- * @description
- * Angular's wrapper for `window.setTimeout`. The `fn` function is wrapped into a try/catch
- * block and delegates any exceptions to
- * {@link ng.$exceptionHandler $exceptionHandler} service.
- *
- * The return value of registering a timeout function is a promise, which will be resolved when
- * the timeout is reached and the timeout function is executed.
- *
- * To cancel a timeout request, call `$timeout.cancel(promise)`.
- *
- * In tests you can use {@link ngMock.$timeout `$timeout.flush()`} to
- * synchronously flush the queue of deferred functions.
- *
- * @param {function()} fn A function, whose execution should be delayed.
- * @param {number=} [delay=0] Delay in milliseconds.
- * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise
- * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.
- * @returns {Promise} Promise that will be resolved when the timeout is reached. The value this
- * promise will be resolved with is the return value of the `fn` function.
- *
- */
- function timeout(fn, delay, invokeApply) {
- var deferred = $q.defer(),
- promise = deferred.promise,
- skipApply = (isDefined(invokeApply) && !invokeApply),
- timeoutId;
-
- timeoutId = $browser.defer(function() {
- try {
- deferred.resolve(fn());
- } catch(e) {
- deferred.reject(e);
- $exceptionHandler(e);
- }
- finally {
- delete deferreds[promise.$$timeoutId];
- }
-
- if (!skipApply) $rootScope.$apply();
- }, delay);
-
- promise.$$timeoutId = timeoutId;
- deferreds[timeoutId] = deferred;
-
- return promise;
- }
-
-
- /**
- * @ngdoc method
- * @name $timeout#cancel
- *
- * @description
- * Cancels a task associated with the `promise`. As a result of this, the promise will be
- * resolved with a rejection.
- *
- * @param {Promise=} promise Promise returned by the `$timeout` function.
- * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully
- * canceled.
- */
- timeout.cancel = function(promise) {
- if (promise && promise.$$timeoutId in deferreds) {
- deferreds[promise.$$timeoutId].reject('canceled');
- delete deferreds[promise.$$timeoutId];
- return $browser.defer.cancel(promise.$$timeoutId);
- }
- return false;
- };
-
- return timeout;
- }];
-}
-
-// NOTE: The usage of window and document instead of $window and $document here is
-// deliberate. This service depends on the specific behavior of anchor nodes created by the
-// browser (resolving and parsing URLs) that is unlikely to be provided by mock objects and
-// cause us to break tests. In addition, when the browser resolves a URL for XHR, it
-// doesn't know about mocked locations and resolves URLs to the real document - which is
-// exactly the behavior needed here. There is little value is mocking these out for this
-// service.
-var urlParsingNode = document.createElement("a");
-var originUrl = urlResolve(window.location.href, true);
-
-
-/**
- *
- * Implementation Notes for non-IE browsers
- * ----------------------------------------
- * Assigning a URL to the href property of an anchor DOM node, even one attached to the DOM,
- * results both in the normalizing and parsing of the URL. Normalizing means that a relative
- * URL will be resolved into an absolute URL in the context of the application document.
- * Parsing means that the anchor node's host, hostname, protocol, port, pathname and related
- * properties are all populated to reflect the normalized URL. This approach has wide
- * compatibility - Safari 1+, Mozilla 1+, Opera 7+,e etc. See
- * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html
- *
- * Implementation Notes for IE
- * ---------------------------
- * IE >= 8 and <= 10 normalizes the URL when assigned to the anchor node similar to the other
- * browsers. However, the parsed components will not be set if the URL assigned did not specify
- * them. (e.g. if you assign a.href = "foo", then a.protocol, a.host, etc. will be empty.) We
- * work around that by performing the parsing in a 2nd step by taking a previously normalized
- * URL (e.g. by assigning to a.href) and assigning it a.href again. This correctly populates the
- * properties such as protocol, hostname, port, etc.
- *
- * IE7 does not normalize the URL when assigned to an anchor node. (Apparently, it does, if one
- * uses the inner HTML approach to assign the URL as part of an HTML snippet -
- * http://stackoverflow.com/a/472729) However, setting img[src] does normalize the URL.
- * Unfortunately, setting img[src] to something like "javascript:foo" on IE throws an exception.
- * Since the primary usage for normalizing URLs is to sanitize such URLs, we can't use that
- * method and IE < 8 is unsupported.
- *
- * References:
- * http://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement
- * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html
- * http://url.spec.whatwg.org/#urlutils
- * https://github.com/angular/angular.js/pull/2902
- * http://james.padolsey.com/javascript/parsing-urls-with-the-dom/
- *
- * @kind function
- * @param {string} url The URL to be parsed.
- * @description Normalizes and parses a URL.
- * @returns {object} Returns the normalized URL as a dictionary.
- *
- * | member name | Description |
- * |---------------|----------------|
- * | href | A normalized version of the provided URL if it was not an absolute URL |
- * | protocol | The protocol including the trailing colon |
- * | host | The host and port (if the port is non-default) of the normalizedUrl |
- * | search | The search params, minus the question mark |
- * | hash | The hash string, minus the hash symbol
- * | hostname | The hostname
- * | port | The port, without ":"
- * | pathname | The pathname, beginning with "/"
- *
- */
-function urlResolve(url, base) {
- var href = url;
-
- if (msie) {
- // Normalize before parse. Refer Implementation Notes on why this is
- // done in two steps on IE.
- urlParsingNode.setAttribute("href", href);
- href = urlParsingNode.href;
- }
-
- urlParsingNode.setAttribute('href', href);
-
- // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
- return {
- href: urlParsingNode.href,
- protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
- host: urlParsingNode.host,
- search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
- hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
- hostname: urlParsingNode.hostname,
- port: urlParsingNode.port,
- pathname: (urlParsingNode.pathname.charAt(0) === '/')
- ? urlParsingNode.pathname
- : '/' + urlParsingNode.pathname
- };
-}
-
-/**
- * Parse a request URL and determine whether this is a same-origin request as the application document.
- *
- * @param {string|object} requestUrl The url of the request as a string that will be resolved
- * or a parsed URL object.
- * @returns {boolean} Whether the request is for the same origin as the application document.
- */
-function urlIsSameOrigin(requestUrl) {
- var parsed = (isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl;
- return (parsed.protocol === originUrl.protocol &&
- parsed.host === originUrl.host);
-}
-
-/**
- * @ngdoc service
- * @name $window
- *
- * @description
- * A reference to the browser's `window` object. While `window`
- * is globally available in JavaScript, it causes testability problems, because
- * it is a global variable. In angular we always refer to it through the
- * `$window` service, so it may be overridden, removed or mocked for testing.
- *
- * Expressions, like the one defined for the `ngClick` directive in the example
- * below, are evaluated with respect to the current scope. Therefore, there is
- * no risk of inadvertently coding in a dependency on a global value in such an
- * expression.
- *
- * @example
- <example module="windowExample">
- <file name="index.html">
- <script>
- angular.module('windowExample', [])
- .controller('ExampleController', ['$scope', '$window', function ($scope, $window) {
- $scope.greeting = 'Hello, World!';
- $scope.doGreeting = function(greeting) {
- $window.alert(greeting);
- };
- }]);
- </script>
- <div ng-controller="ExampleController">
- <input type="text" ng-model="greeting" />
- <button ng-click="doGreeting(greeting)">ALERT</button>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should display the greeting in the input box', function() {
- element(by.model('greeting')).sendKeys('Hello, E2E Tests');
- // If we click the button it will block the test runner
- // element(':button').click();
- });
- </file>
- </example>
- */
-function $WindowProvider(){
- this.$get = valueFn(window);
-}
-
-/* global currencyFilter: true,
- dateFilter: true,
- filterFilter: true,
- jsonFilter: true,
- limitToFilter: true,
- lowercaseFilter: true,
- numberFilter: true,
- orderByFilter: true,
- uppercaseFilter: true,
- */
-
-/**
- * @ngdoc provider
- * @name $filterProvider
- * @description
- *
- * Filters are just functions which transform input to an output. However filters need to be
- * Dependency Injected. To achieve this a filter definition consists of a factory function which is
- * annotated with dependencies and is responsible for creating a filter function.
- *
- * ```js
- * // Filter registration
- * function MyModule($provide, $filterProvider) {
- * // create a service to demonstrate injection (not always needed)
- * $provide.value('greet', function(name){
- * return 'Hello ' + name + '!';
- * });
- *
- * // register a filter factory which uses the
- * // greet service to demonstrate DI.
- * $filterProvider.register('greet', function(greet){
- * // return the filter function which uses the greet service
- * // to generate salutation
- * return function(text) {
- * // filters need to be forgiving so check input validity
- * return text && greet(text) || text;
- * };
- * });
- * }
- * ```
- *
- * The filter function is registered with the `$injector` under the filter name suffix with
- * `Filter`.
- *
- * ```js
- * it('should be the same instance', inject(
- * function($filterProvider) {
- * $filterProvider.register('reverse', function(){
- * return ...;
- * });
- * },
- * function($filter, reverseFilter) {
- * expect($filter('reverse')).toBe(reverseFilter);
- * });
- * ```
- *
- *
- * For more information about how angular filters work, and how to create your own filters, see
- * {@link guide/filter Filters} in the Angular Developer Guide.
- */
-
-/**
- * @ngdoc service
- * @name $filter
- * @kind function
- * @description
- * Filters are used for formatting data displayed to the user.
- *
- * The general syntax in templates is as follows:
- *
- * {{ expression [| filter_name[:parameter_value] ... ] }}
- *
- * @param {String} name Name of the filter function to retrieve
- * @return {Function} the filter function
- * @example
- <example name="$filter" module="filterExample">
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <h3>{{ originalText }}</h3>
- <h3>{{ filteredText }}</h3>
- </div>
- </file>
-
- <file name="script.js">
- angular.module('filterExample', [])
- .controller('MainCtrl', function($scope, $filter) {
- $scope.originalText = 'hello';
- $scope.filteredText = $filter('uppercase')($scope.originalText);
- });
- </file>
- </example>
- */
-$FilterProvider.$inject = ['$provide'];
-function $FilterProvider($provide) {
- var suffix = 'Filter';
-
- /**
- * @ngdoc method
- * @name $filterProvider#register
- * @param {string|Object} name Name of the filter function, or an object map of filters where
- * the keys are the filter names and the values are the filter factories.
- * @returns {Object} Registered filter instance, or if a map of filters was provided then a map
- * of the registered filter instances.
- */
- function register(name, factory) {
- if(isObject(name)) {
- var filters = {};
- forEach(name, function(filter, key) {
- filters[key] = register(key, filter);
- });
- return filters;
- } else {
- return $provide.factory(name + suffix, factory);
- }
- }
- this.register = register;
-
- this.$get = ['$injector', function($injector) {
- return function(name) {
- return $injector.get(name + suffix);
- };
- }];
-
- ////////////////////////////////////////
-
- /* global
- currencyFilter: false,
- dateFilter: false,
- filterFilter: false,
- jsonFilter: false,
- limitToFilter: false,
- lowercaseFilter: false,
- numberFilter: false,
- orderByFilter: false,
- uppercaseFilter: false,
- */
-
- register('currency', currencyFilter);
- register('date', dateFilter);
- register('filter', filterFilter);
- register('json', jsonFilter);
- register('limitTo', limitToFilter);
- register('lowercase', lowercaseFilter);
- register('number', numberFilter);
- register('orderBy', orderByFilter);
- register('uppercase', uppercaseFilter);
-}
-
-/**
- * @ngdoc filter
- * @name filter
- * @kind function
- *
- * @description
- * Selects a subset of items from `array` and returns it as a new array.
- *
- * @param {Array} array The source array.
- * @param {string|Object|function()} expression The predicate to be used for selecting items from
- * `array`.
- *
- * Can be one of:
- *
- * - `string`: The string is evaluated as an expression and the resulting value is used for substring match against
- * the contents of the `array`. All strings or objects with string properties in `array` that contain this string
- * will be returned. The predicate can be negated by prefixing the string with `!`.
- *
- * - `Object`: A pattern object can be used to filter specific properties on objects contained
- * by `array`. For example `{name:"M", phone:"1"}` predicate will return an array of items
- * which have property `name` containing "M" and property `phone` containing "1". A special
- * property name `$` can be used (as in `{$:"text"}`) to accept a match against any
- * property of the object. That's equivalent to the simple substring match with a `string`
- * as described above. The predicate can be negated by prefixing the string with `!`.
- * For Example `{name: "!M"}` predicate will return an array of items which have property `name`
- * not containing "M".
- *
- * - `function(value)`: A predicate function can be used to write arbitrary filters. The function is
- * called for each element of `array`. The final result is an array of those elements that
- * the predicate returned true for.
- *
- * @param {function(actual, expected)|true|undefined} comparator Comparator which is used in
- * determining if the expected value (from the filter expression) and actual value (from
- * the object in the array) should be considered a match.
- *
- * Can be one of:
- *
- * - `function(actual, expected)`:
- * The function will be given the object value and the predicate value to compare and
- * should return true if the item should be included in filtered result.
- *
- * - `true`: A shorthand for `function(actual, expected) { return angular.equals(expected, actual)}`.
- * this is essentially strict comparison of expected and actual.
- *
- * - `false|undefined`: A short hand for a function which will look for a substring match in case
- * insensitive way.
- *
- * @example
- <example>
- <file name="index.html">
- <div ng-init="friends = [{name:'John', phone:'555-1276'},
- {name:'Mary', phone:'800-BIG-MARY'},
- {name:'Mike', phone:'555-4321'},
- {name:'Adam', phone:'555-5678'},
- {name:'Julie', phone:'555-8765'},
- {name:'Juliette', phone:'555-5678'}]"></div>
-
- Search: <input ng-model="searchText">
- <table id="searchTextResults">
- <tr><th>Name</th><th>Phone</th></tr>
- <tr ng-repeat="friend in friends | filter:searchText">
- <td>{{friend.name}}</td>
- <td>{{friend.phone}}</td>
- </tr>
- </table>
- <hr>
- Any: <input ng-model="search.$"> <br>
- Name only <input ng-model="search.name"><br>
- Phone only <input ng-model="search.phone"><br>
- Equality <input type="checkbox" ng-model="strict"><br>
- <table id="searchObjResults">
- <tr><th>Name</th><th>Phone</th></tr>
- <tr ng-repeat="friendObj in friends | filter:search:strict">
- <td>{{friendObj.name}}</td>
- <td>{{friendObj.phone}}</td>
- </tr>
- </table>
- </file>
- <file name="protractor.js" type="protractor">
- var expectFriendNames = function(expectedNames, key) {
- element.all(by.repeater(key + ' in friends').column(key + '.name')).then(function(arr) {
- arr.forEach(function(wd, i) {
- expect(wd.getText()).toMatch(expectedNames[i]);
- });
- });
- };
-
- it('should search across all fields when filtering with a string', function() {
- var searchText = element(by.model('searchText'));
- searchText.clear();
- searchText.sendKeys('m');
- expectFriendNames(['Mary', 'Mike', 'Adam'], 'friend');
-
- searchText.clear();
- searchText.sendKeys('76');
- expectFriendNames(['John', 'Julie'], 'friend');
- });
-
- it('should search in specific fields when filtering with a predicate object', function() {
- var searchAny = element(by.model('search.$'));
- searchAny.clear();
- searchAny.sendKeys('i');
- expectFriendNames(['Mary', 'Mike', 'Julie', 'Juliette'], 'friendObj');
- });
- it('should use a equal comparison when comparator is true', function() {
- var searchName = element(by.model('search.name'));
- var strict = element(by.model('strict'));
- searchName.clear();
- searchName.sendKeys('Julie');
- strict.click();
- expectFriendNames(['Julie'], 'friendObj');
- });
- </file>
- </example>
- */
-function filterFilter() {
- return function(array, expression, comparator) {
- if (!isArray(array)) return array;
-
- var comparatorType = typeof(comparator),
- predicates = [];
-
- predicates.check = function(value) {
- for (var j = 0; j < predicates.length; j++) {
- if(!predicates[j](value)) {
- return false;
- }
- }
- return true;
- };
-
- if (comparatorType !== 'function') {
- if (comparatorType === 'boolean' && comparator) {
- comparator = function(obj, text) {
- return angular.equals(obj, text);
- };
- } else {
- comparator = function(obj, text) {
- if (obj && text && typeof obj === 'object' && typeof text === 'object') {
- for (var objKey in obj) {
- if (objKey.charAt(0) !== '$' && hasOwnProperty.call(obj, objKey) &&
- comparator(obj[objKey], text[objKey])) {
- return true;
- }
- }
- return false;
- }
- text = (''+text).toLowerCase();
- return (''+obj).toLowerCase().indexOf(text) > -1;
- };
- }
- }
-
- var search = function(obj, text){
- if (typeof text == 'string' && text.charAt(0) === '!') {
- return !search(obj, text.substr(1));
- }
- switch (typeof obj) {
- case "boolean":
- case "number":
- case "string":
- return comparator(obj, text);
- case "object":
- switch (typeof text) {
- case "object":
- return comparator(obj, text);
- default:
- for ( var objKey in obj) {
- if (objKey.charAt(0) !== '$' && search(obj[objKey], text)) {
- return true;
- }
- }
- break;
- }
- return false;
- case "array":
- for ( var i = 0; i < obj.length; i++) {
- if (search(obj[i], text)) {
- return true;
- }
- }
- return false;
- default:
- return false;
- }
- };
- switch (typeof expression) {
- case "boolean":
- case "number":
- case "string":
- // Set up expression object and fall through
- expression = {$:expression};
- // jshint -W086
- case "object":
- // jshint +W086
- for (var key in expression) {
- (function(path) {
- if (typeof expression[path] === 'undefined') return;
- predicates.push(function(value) {
- return search(path == '$' ? value : (value && value[path]), expression[path]);
- });
- })(key);
- }
- break;
- case 'function':
- predicates.push(expression);
- break;
- default:
- return array;
- }
- var filtered = [];
- for ( var j = 0; j < array.length; j++) {
- var value = array[j];
- if (predicates.check(value)) {
- filtered.push(value);
- }
- }
- return filtered;
- };
-}
-
-/**
- * @ngdoc filter
- * @name currency
- * @kind function
- *
- * @description
- * Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default
- * symbol for current locale is used.
- *
- * @param {number} amount Input to filter.
- * @param {string=} symbol Currency symbol or identifier to be displayed.
- * @returns {string} Formatted number.
- *
- *
- * @example
- <example module="currencyExample">
- <file name="index.html">
- <script>
- angular.module('currencyExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.amount = 1234.56;
- }]);
- </script>
- <div ng-controller="ExampleController">
- <input type="number" ng-model="amount"> <br>
- default currency symbol ($): <span id="currency-default">{{amount | currency}}</span><br>
- custom currency identifier (USD$): <span>{{amount | currency:"USD$"}}</span>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should init with 1234.56', function() {
- expect(element(by.id('currency-default')).getText()).toBe('$1,234.56');
- expect(element(by.binding('amount | currency:"USD$"')).getText()).toBe('USD$1,234.56');
- });
- it('should update', function() {
- if (browser.params.browser == 'safari') {
- // Safari does not understand the minus key. See
- // https://github.com/angular/protractor/issues/481
- return;
- }
- element(by.model('amount')).clear();
- element(by.model('amount')).sendKeys('-1234');
- expect(element(by.id('currency-default')).getText()).toBe('($1,234.00)');
- expect(element(by.binding('amount | currency:"USD$"')).getText()).toBe('(USD$1,234.00)');
- });
- </file>
- </example>
- */
-currencyFilter.$inject = ['$locale'];
-function currencyFilter($locale) {
- var formats = $locale.NUMBER_FORMATS;
- return function(amount, currencySymbol){
- if (isUndefined(currencySymbol)) currencySymbol = formats.CURRENCY_SYM;
- return formatNumber(amount, formats.PATTERNS[1], formats.GROUP_SEP, formats.DECIMAL_SEP, 2).
- replace(/\u00A4/g, currencySymbol);
- };
-}
-
-/**
- * @ngdoc filter
- * @name number
- * @kind function
- *
- * @description
- * Formats a number as text.
- *
- * If the input is not a number an empty string is returned.
- *
- * @param {number|string} number Number to format.
- * @param {(number|string)=} fractionSize Number of decimal places to round the number to.
- * If this is not provided then the fraction size is computed from the current locale's number
- * formatting pattern. In the case of the default locale, it will be 3.
- * @returns {string} Number rounded to decimalPlaces and places a “,†after each third digit.
- *
- * @example
- <example module="numberFilterExample">
- <file name="index.html">
- <script>
- angular.module('numberFilterExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.val = 1234.56789;
- }]);
- </script>
- <div ng-controller="ExampleController">
- Enter number: <input ng-model='val'><br>
- Default formatting: <span id='number-default'>{{val | number}}</span><br>
- No fractions: <span>{{val | number:0}}</span><br>
- Negative number: <span>{{-val | number:4}}</span>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should format numbers', function() {
- expect(element(by.id('number-default')).getText()).toBe('1,234.568');
- expect(element(by.binding('val | number:0')).getText()).toBe('1,235');
- expect(element(by.binding('-val | number:4')).getText()).toBe('-1,234.5679');
- });
-
- it('should update', function() {
- element(by.model('val')).clear();
- element(by.model('val')).sendKeys('3374.333');
- expect(element(by.id('number-default')).getText()).toBe('3,374.333');
- expect(element(by.binding('val | number:0')).getText()).toBe('3,374');
- expect(element(by.binding('-val | number:4')).getText()).toBe('-3,374.3330');
- });
- </file>
- </example>
- */
-
-
-numberFilter.$inject = ['$locale'];
-function numberFilter($locale) {
- var formats = $locale.NUMBER_FORMATS;
- return function(number, fractionSize) {
- return formatNumber(number, formats.PATTERNS[0], formats.GROUP_SEP, formats.DECIMAL_SEP,
- fractionSize);
- };
-}
-
-var DECIMAL_SEP = '.';
-function formatNumber(number, pattern, groupSep, decimalSep, fractionSize) {
- if (number == null || !isFinite(number) || isObject(number)) return '';
-
- var isNegative = number < 0;
- number = Math.abs(number);
- var numStr = number + '',
- formatedText = '',
- parts = [];
-
- var hasExponent = false;
- if (numStr.indexOf('e') !== -1) {
- var match = numStr.match(/([\d\.]+)e(-?)(\d+)/);
- if (match && match[2] == '-' && match[3] > fractionSize + 1) {
- numStr = '0';
- number = 0;
- } else {
- formatedText = numStr;
- hasExponent = true;
- }
- }
-
- if (!hasExponent) {
- var fractionLen = (numStr.split(DECIMAL_SEP)[1] || '').length;
-
- // determine fractionSize if it is not specified
- if (isUndefined(fractionSize)) {
- fractionSize = Math.min(Math.max(pattern.minFrac, fractionLen), pattern.maxFrac);
- }
-
- // safely round numbers in JS without hitting imprecisions of floating-point arithmetics
- // inspired by:
- // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round
- number = +(Math.round(+(number.toString() + 'e' + fractionSize)).toString() + 'e' + -fractionSize);
-
- if (number === 0) {
- isNegative = false;
- }
-
- var fraction = ('' + number).split(DECIMAL_SEP);
- var whole = fraction[0];
- fraction = fraction[1] || '';
-
- var i, pos = 0,
- lgroup = pattern.lgSize,
- group = pattern.gSize;
-
- if (whole.length >= (lgroup + group)) {
- pos = whole.length - lgroup;
- for (i = 0; i < pos; i++) {
- if ((pos - i)%group === 0 && i !== 0) {
- formatedText += groupSep;
- }
- formatedText += whole.charAt(i);
- }
- }
-
- for (i = pos; i < whole.length; i++) {
- if ((whole.length - i)%lgroup === 0 && i !== 0) {
- formatedText += groupSep;
- }
- formatedText += whole.charAt(i);
- }
-
- // format fraction part.
- while(fraction.length < fractionSize) {
- fraction += '0';
- }
-
- if (fractionSize && fractionSize !== "0") formatedText += decimalSep + fraction.substr(0, fractionSize);
- } else {
-
- if (fractionSize > 0 && number > -1 && number < 1) {
- formatedText = number.toFixed(fractionSize);
- }
- }
-
- parts.push(isNegative ? pattern.negPre : pattern.posPre);
- parts.push(formatedText);
- parts.push(isNegative ? pattern.negSuf : pattern.posSuf);
- return parts.join('');
-}
-
-function padNumber(num, digits, trim) {
- var neg = '';
- if (num < 0) {
- neg = '-';
- num = -num;
- }
- num = '' + num;
- while(num.length < digits) num = '0' + num;
- if (trim)
- num = num.substr(num.length - digits);
- return neg + num;
-}
-
-
-function dateGetter(name, size, offset, trim) {
- offset = offset || 0;
- return function(date) {
- var value = date['get' + name]();
- if (offset > 0 || value > -offset)
- value += offset;
- if (value === 0 && offset == -12 ) value = 12;
- return padNumber(value, size, trim);
- };
-}
-
-function dateStrGetter(name, shortForm) {
- return function(date, formats) {
- var value = date['get' + name]();
- var get = uppercase(shortForm ? ('SHORT' + name) : name);
-
- return formats[get][value];
- };
-}
-
-function timeZoneGetter(date) {
- var zone = -1 * date.getTimezoneOffset();
- var paddedZone = (zone >= 0) ? "+" : "";
-
- paddedZone += padNumber(Math[zone > 0 ? 'floor' : 'ceil'](zone / 60), 2) +
- padNumber(Math.abs(zone % 60), 2);
-
- return paddedZone;
-}
-
-function ampmGetter(date, formats) {
- return date.getHours() < 12 ? formats.AMPMS[0] : formats.AMPMS[1];
-}
-
-var DATE_FORMATS = {
- yyyy: dateGetter('FullYear', 4),
- yy: dateGetter('FullYear', 2, 0, true),
- y: dateGetter('FullYear', 1),
- MMMM: dateStrGetter('Month'),
- MMM: dateStrGetter('Month', true),
- MM: dateGetter('Month', 2, 1),
- M: dateGetter('Month', 1, 1),
- dd: dateGetter('Date', 2),
- d: dateGetter('Date', 1),
- HH: dateGetter('Hours', 2),
- H: dateGetter('Hours', 1),
- hh: dateGetter('Hours', 2, -12),
- h: dateGetter('Hours', 1, -12),
- mm: dateGetter('Minutes', 2),
- m: dateGetter('Minutes', 1),
- ss: dateGetter('Seconds', 2),
- s: dateGetter('Seconds', 1),
- // while ISO 8601 requires fractions to be prefixed with `.` or `,`
- // we can be just safely rely on using `sss` since we currently don't support single or two digit fractions
- sss: dateGetter('Milliseconds', 3),
- EEEE: dateStrGetter('Day'),
- EEE: dateStrGetter('Day', true),
- a: ampmGetter,
- Z: timeZoneGetter
-};
-
-var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,
- NUMBER_STRING = /^\-?\d+$/;
-
-/**
- * @ngdoc filter
- * @name date
- * @kind function
- *
- * @description
- * Formats `date` to a string based on the requested `format`.
- *
- * `format` string can be composed of the following elements:
- *
- * * `'yyyy'`: 4 digit representation of year (e.g. AD 1 => 0001, AD 2010 => 2010)
- * * `'yy'`: 2 digit representation of year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)
- * * `'y'`: 1 digit representation of year, e.g. (AD 1 => 1, AD 199 => 199)
- * * `'MMMM'`: Month in year (January-December)
- * * `'MMM'`: Month in year (Jan-Dec)
- * * `'MM'`: Month in year, padded (01-12)
- * * `'M'`: Month in year (1-12)
- * * `'dd'`: Day in month, padded (01-31)
- * * `'d'`: Day in month (1-31)
- * * `'EEEE'`: Day in Week,(Sunday-Saturday)
- * * `'EEE'`: Day in Week, (Sun-Sat)
- * * `'HH'`: Hour in day, padded (00-23)
- * * `'H'`: Hour in day (0-23)
- * * `'hh'`: Hour in am/pm, padded (01-12)
- * * `'h'`: Hour in am/pm, (1-12)
- * * `'mm'`: Minute in hour, padded (00-59)
- * * `'m'`: Minute in hour (0-59)
- * * `'ss'`: Second in minute, padded (00-59)
- * * `'s'`: Second in minute (0-59)
- * * `'.sss' or ',sss'`: Millisecond in second, padded (000-999)
- * * `'a'`: am/pm marker
- * * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200)
- *
- * `format` string can also be one of the following predefined
- * {@link guide/i18n localizable formats}:
- *
- * * `'medium'`: equivalent to `'MMM d, y h:mm:ss a'` for en_US locale
- * (e.g. Sep 3, 2010 12:05:08 pm)
- * * `'short'`: equivalent to `'M/d/yy h:mm a'` for en_US locale (e.g. 9/3/10 12:05 pm)
- * * `'fullDate'`: equivalent to `'EEEE, MMMM d,y'` for en_US locale
- * (e.g. Friday, September 3, 2010)
- * * `'longDate'`: equivalent to `'MMMM d, y'` for en_US locale (e.g. September 3, 2010)
- * * `'mediumDate'`: equivalent to `'MMM d, y'` for en_US locale (e.g. Sep 3, 2010)
- * * `'shortDate'`: equivalent to `'M/d/yy'` for en_US locale (e.g. 9/3/10)
- * * `'mediumTime'`: equivalent to `'h:mm:ss a'` for en_US locale (e.g. 12:05:08 pm)
- * * `'shortTime'`: equivalent to `'h:mm a'` for en_US locale (e.g. 12:05 pm)
- *
- * `format` string can contain literal values. These need to be escaped by surrounding with single quotes (e.g.
- * `"h 'in the morning'"`). In order to output a single quote, escape it - i.e., two single quotes in a sequence
- * (e.g. `"h 'o''clock'"`).
- *
- * @param {(Date|number|string)} date Date to format either as Date object, milliseconds (string or
- * number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its
- * shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is
- * specified in the string input, the time is considered to be in the local timezone.
- * @param {string=} format Formatting rules (see Description). If not specified,
- * `mediumDate` is used.
- * @returns {string} Formatted string or the input if input is not recognized as date/millis.
- *
- * @example
- <example>
- <file name="index.html">
- <span ng-non-bindable>{{1288323623006 | date:'medium'}}</span>:
- <span>{{1288323623006 | date:'medium'}}</span><br>
- <span ng-non-bindable>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span>:
- <span>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span><br>
- <span ng-non-bindable>{{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}</span>:
- <span>{{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}</span><br>
- <span ng-non-bindable>{{1288323623006 | date:"MM/dd/yyyy 'at' h:mma"}}</span>:
- <span>{{'1288323623006' | date:"MM/dd/yyyy 'at' h:mma"}}</span><br>
- </file>
- <file name="protractor.js" type="protractor">
- it('should format date', function() {
- expect(element(by.binding("1288323623006 | date:'medium'")).getText()).
- toMatch(/Oct 2\d, 2010 \d{1,2}:\d{2}:\d{2} (AM|PM)/);
- expect(element(by.binding("1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'")).getText()).
- toMatch(/2010\-10\-2\d \d{2}:\d{2}:\d{2} (\-|\+)?\d{4}/);
- expect(element(by.binding("'1288323623006' | date:'MM/dd/yyyy @ h:mma'")).getText()).
- toMatch(/10\/2\d\/2010 @ \d{1,2}:\d{2}(AM|PM)/);
- expect(element(by.binding("'1288323623006' | date:\"MM/dd/yyyy 'at' h:mma\"")).getText()).
- toMatch(/10\/2\d\/2010 at \d{1,2}:\d{2}(AM|PM)/);
- });
- </file>
- </example>
- */
-dateFilter.$inject = ['$locale'];
-function dateFilter($locale) {
-
-
- var R_ISO8601_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;
- // 1 2 3 4 5 6 7 8 9 10 11
- function jsonStringToDate(string) {
- var match;
- if (match = string.match(R_ISO8601_STR)) {
- var date = new Date(0),
- tzHour = 0,
- tzMin = 0,
- dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,
- timeSetter = match[8] ? date.setUTCHours : date.setHours;
-
- if (match[9]) {
- tzHour = int(match[9] + match[10]);
- tzMin = int(match[9] + match[11]);
- }
- dateSetter.call(date, int(match[1]), int(match[2]) - 1, int(match[3]));
- var h = int(match[4]||0) - tzHour;
- var m = int(match[5]||0) - tzMin;
- var s = int(match[6]||0);
- var ms = Math.round(parseFloat('0.' + (match[7]||0)) * 1000);
- timeSetter.call(date, h, m, s, ms);
- return date;
- }
- return string;
- }
-
-
- return function(date, format) {
- var text = '',
- parts = [],
- fn, match;
-
- format = format || 'mediumDate';
- format = $locale.DATETIME_FORMATS[format] || format;
- if (isString(date)) {
- date = NUMBER_STRING.test(date) ? int(date) : jsonStringToDate(date);
- }
-
- if (isNumber(date)) {
- date = new Date(date);
- }
-
- if (!isDate(date)) {
- return date;
- }
-
- while(format) {
- match = DATE_FORMATS_SPLIT.exec(format);
- if (match) {
- parts = concat(parts, match, 1);
- format = parts.pop();
- } else {
- parts.push(format);
- format = null;
- }
- }
-
- forEach(parts, function(value){
- fn = DATE_FORMATS[value];
- text += fn ? fn(date, $locale.DATETIME_FORMATS)
- : value.replace(/(^'|'$)/g, '').replace(/''/g, "'");
- });
-
- return text;
- };
-}
-
-
-/**
- * @ngdoc filter
- * @name json
- * @kind function
- *
- * @description
- * Allows you to convert a JavaScript object into JSON string.
- *
- * This filter is mostly useful for debugging. When using the double curly {{value}} notation
- * the binding is automatically converted to JSON.
- *
- * @param {*} object Any JavaScript object (including arrays and primitive types) to filter.
- * @returns {string} JSON string.
- *
- *
- * @example
- <example>
- <file name="index.html">
- <pre>{{ {'name':'value'} | json }}</pre>
- </file>
- <file name="protractor.js" type="protractor">
- it('should jsonify filtered objects', function() {
- expect(element(by.binding("{'name':'value'}")).getText()).toMatch(/\{\n "name": ?"value"\n}/);
- });
- </file>
- </example>
- *
- */
-function jsonFilter() {
- return function(object) {
- return toJson(object, true);
- };
-}
-
-
-/**
- * @ngdoc filter
- * @name lowercase
- * @kind function
- * @description
- * Converts string to lowercase.
- * @see angular.lowercase
- */
-var lowercaseFilter = valueFn(lowercase);
-
-
-/**
- * @ngdoc filter
- * @name uppercase
- * @kind function
- * @description
- * Converts string to uppercase.
- * @see angular.uppercase
- */
-var uppercaseFilter = valueFn(uppercase);
-
-/**
- * @ngdoc filter
- * @name limitTo
- * @kind function
- *
- * @description
- * Creates a new array or string containing only a specified number of elements. The elements
- * are taken from either the beginning or the end of the source array or string, as specified by
- * the value and sign (positive or negative) of `limit`.
- *
- * @param {Array|string} input Source array or string to be limited.
- * @param {string|number} limit The length of the returned array or string. If the `limit` number
- * is positive, `limit` number of items from the beginning of the source array/string are copied.
- * If the number is negative, `limit` number of items from the end of the source array/string
- * are copied. The `limit` will be trimmed if it exceeds `array.length`
- * @returns {Array|string} A new sub-array or substring of length `limit` or less if input array
- * had less than `limit` elements.
- *
- * @example
- <example module="limitToExample">
- <file name="index.html">
- <script>
- angular.module('limitToExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.numbers = [1,2,3,4,5,6,7,8,9];
- $scope.letters = "abcdefghi";
- $scope.numLimit = 3;
- $scope.letterLimit = 3;
- }]);
- </script>
- <div ng-controller="ExampleController">
- Limit {{numbers}} to: <input type="integer" ng-model="numLimit">
- <p>Output numbers: {{ numbers | limitTo:numLimit }}</p>
- Limit {{letters}} to: <input type="integer" ng-model="letterLimit">
- <p>Output letters: {{ letters | limitTo:letterLimit }}</p>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- var numLimitInput = element(by.model('numLimit'));
- var letterLimitInput = element(by.model('letterLimit'));
- var limitedNumbers = element(by.binding('numbers | limitTo:numLimit'));
- var limitedLetters = element(by.binding('letters | limitTo:letterLimit'));
-
- it('should limit the number array to first three items', function() {
- expect(numLimitInput.getAttribute('value')).toBe('3');
- expect(letterLimitInput.getAttribute('value')).toBe('3');
- expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3]');
- expect(limitedLetters.getText()).toEqual('Output letters: abc');
- });
-
- it('should update the output when -3 is entered', function() {
- numLimitInput.clear();
- numLimitInput.sendKeys('-3');
- letterLimitInput.clear();
- letterLimitInput.sendKeys('-3');
- expect(limitedNumbers.getText()).toEqual('Output numbers: [7,8,9]');
- expect(limitedLetters.getText()).toEqual('Output letters: ghi');
- });
-
- it('should not exceed the maximum size of input array', function() {
- numLimitInput.clear();
- numLimitInput.sendKeys('100');
- letterLimitInput.clear();
- letterLimitInput.sendKeys('100');
- expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]');
- expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi');
- });
- </file>
- </example>
- */
-function limitToFilter(){
- return function(input, limit) {
- if (!isArray(input) && !isString(input)) return input;
-
- if (Math.abs(Number(limit)) === Infinity) {
- limit = Number(limit);
- } else {
- limit = int(limit);
- }
-
- if (isString(input)) {
- //NaN check on limit
- if (limit) {
- return limit >= 0 ? input.slice(0, limit) : input.slice(limit, input.length);
- } else {
- return "";
- }
- }
-
- var out = [],
- i, n;
-
- // if abs(limit) exceeds maximum length, trim it
- if (limit > input.length)
- limit = input.length;
- else if (limit < -input.length)
- limit = -input.length;
-
- if (limit > 0) {
- i = 0;
- n = limit;
- } else {
- i = input.length + limit;
- n = input.length;
- }
-
- for (; i<n; i++) {
- out.push(input[i]);
- }
-
- return out;
- };
-}
-
-/**
- * @ngdoc filter
- * @name orderBy
- * @kind function
- *
- * @description
- * Orders a specified `array` by the `expression` predicate. It is ordered alphabetically
- * for strings and numerically for numbers. Note: if you notice numbers are not being sorted
- * correctly, make sure they are actually being saved as numbers and not strings.
- *
- * @param {Array} array The array to sort.
- * @param {function(*)|string|Array.<(function(*)|string)>} expression A predicate to be
- * used by the comparator to determine the order of elements.
- *
- * Can be one of:
- *
- * - `function`: Getter function. The result of this function will be sorted using the
- * `<`, `=`, `>` operator.
- * - `string`: An Angular expression. The result of this expression is used to compare elements
- * (for example `name` to sort by a property called `name` or `name.substr(0, 3)` to sort by
- * 3 first characters of a property called `name`). The result of a constant expression
- * is interpreted as a property name to be used in comparisons (for example `"special name"`
- * to sort object by the value of their `special name` property). An expression can be
- * optionally prefixed with `+` or `-` to control ascending or descending sort order
- * (for example, `+name` or `-name`).
- * - `Array`: An array of function or string predicates. The first predicate in the array
- * is used for sorting, but when two items are equivalent, the next predicate is used.
- *
- * @param {boolean=} reverse Reverse the order of the array.
- * @returns {Array} Sorted copy of the source array.
- *
- * @example
- <example module="orderByExample">
- <file name="index.html">
- <script>
- angular.module('orderByExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.friends =
- [{name:'John', phone:'555-1212', age:10},
- {name:'Mary', phone:'555-9876', age:19},
- {name:'Mike', phone:'555-4321', age:21},
- {name:'Adam', phone:'555-5678', age:35},
- {name:'Julie', phone:'555-8765', age:29}];
- $scope.predicate = '-age';
- }]);
- </script>
- <div ng-controller="ExampleController">
- <pre>Sorting predicate = {{predicate}}; reverse = {{reverse}}</pre>
- <hr/>
- [ <a href="" ng-click="predicate=''">unsorted</a> ]
- <table class="friend">
- <tr>
- <th><a href="" ng-click="predicate = 'name'; reverse=false">Name</a>
- (<a href="" ng-click="predicate = '-name'; reverse=false">^</a>)</th>
- <th><a href="" ng-click="predicate = 'phone'; reverse=!reverse">Phone Number</a></th>
- <th><a href="" ng-click="predicate = 'age'; reverse=!reverse">Age</a></th>
- </tr>
- <tr ng-repeat="friend in friends | orderBy:predicate:reverse">
- <td>{{friend.name}}</td>
- <td>{{friend.phone}}</td>
- <td>{{friend.age}}</td>
- </tr>
- </table>
- </div>
- </file>
- </example>
- *
- * It's also possible to call the orderBy filter manually, by injecting `$filter`, retrieving the
- * filter routine with `$filter('orderBy')`, and calling the returned filter routine with the
- * desired parameters.
- *
- * Example:
- *
- * @example
- <example module="orderByExample">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <table class="friend">
- <tr>
- <th><a href="" ng-click="reverse=false;order('name', false)">Name</a>
- (<a href="" ng-click="order('-name',false)">^</a>)</th>
- <th><a href="" ng-click="reverse=!reverse;order('phone', reverse)">Phone Number</a></th>
- <th><a href="" ng-click="reverse=!reverse;order('age',reverse)">Age</a></th>
- </tr>
- <tr ng-repeat="friend in friends">
- <td>{{friend.name}}</td>
- <td>{{friend.phone}}</td>
- <td>{{friend.age}}</td>
- </tr>
- </table>
- </div>
- </file>
-
- <file name="script.js">
- angular.module('orderByExample', [])
- .controller('ExampleController', ['$scope', '$filter', function($scope, $filter) {
- var orderBy = $filter('orderBy');
- $scope.friends = [
- { name: 'John', phone: '555-1212', age: 10 },
- { name: 'Mary', phone: '555-9876', age: 19 },
- { name: 'Mike', phone: '555-4321', age: 21 },
- { name: 'Adam', phone: '555-5678', age: 35 },
- { name: 'Julie', phone: '555-8765', age: 29 }
- ];
- $scope.order = function(predicate, reverse) {
- $scope.friends = orderBy($scope.friends, predicate, reverse);
- };
- $scope.order('-age',false);
- }]);
- </file>
-</example>
- */
-orderByFilter.$inject = ['$parse'];
-function orderByFilter($parse){
- return function(array, sortPredicate, reverseOrder) {
- if (!(isArrayLike(array))) return array;
- if (!sortPredicate) return array;
- sortPredicate = isArray(sortPredicate) ? sortPredicate: [sortPredicate];
- sortPredicate = map(sortPredicate, function(predicate){
- var descending = false, get = predicate || identity;
- if (isString(predicate)) {
- if ((predicate.charAt(0) == '+' || predicate.charAt(0) == '-')) {
- descending = predicate.charAt(0) == '-';
- predicate = predicate.substring(1);
- }
- get = $parse(predicate);
- if (get.constant) {
- var key = get();
- return reverseComparator(function(a,b) {
- return compare(a[key], b[key]);
- }, descending);
- }
- }
- return reverseComparator(function(a,b){
- return compare(get(a),get(b));
- }, descending);
- });
- var arrayCopy = [];
- for ( var i = 0; i < array.length; i++) { arrayCopy.push(array[i]); }
- return arrayCopy.sort(reverseComparator(comparator, reverseOrder));
-
- function comparator(o1, o2){
- for ( var i = 0; i < sortPredicate.length; i++) {
- var comp = sortPredicate[i](o1, o2);
- if (comp !== 0) return comp;
- }
- return 0;
- }
- function reverseComparator(comp, descending) {
- return toBoolean(descending)
- ? function(a,b){return comp(b,a);}
- : comp;
- }
- function compare(v1, v2){
- var t1 = typeof v1;
- var t2 = typeof v2;
- if (t1 == t2) {
- if (isDate(v1) && isDate(v2)) {
- v1 = v1.valueOf();
- v2 = v2.valueOf();
- }
- if (t1 == "string") {
- v1 = v1.toLowerCase();
- v2 = v2.toLowerCase();
- }
- if (v1 === v2) return 0;
- return v1 < v2 ? -1 : 1;
- } else {
- return t1 < t2 ? -1 : 1;
- }
- }
- };
-}
-
-function ngDirective(directive) {
- if (isFunction(directive)) {
- directive = {
- link: directive
- };
- }
- directive.restrict = directive.restrict || 'AC';
- return valueFn(directive);
-}
-
-/**
- * @ngdoc directive
- * @name a
- * @restrict E
- *
- * @description
- * Modifies the default behavior of the html A tag so that the default action is prevented when
- * the href attribute is empty.
- *
- * This change permits the easy creation of action links with the `ngClick` directive
- * without changing the location or causing page reloads, e.g.:
- * `<a href="" ng-click="list.addItem()">Add Item</a>`
- */
-var htmlAnchorDirective = valueFn({
- restrict: 'E',
- compile: function(element, attr) {
-
- if (msie <= 8) {
-
- // turn <a href ng-click="..">link</a> into a stylable link in IE
- // but only if it doesn't have name attribute, in which case it's an anchor
- if (!attr.href && !attr.name) {
- attr.$set('href', '');
- }
-
- // add a comment node to anchors to workaround IE bug that causes element content to be reset
- // to new attribute content if attribute is updated with value containing @ and element also
- // contains value with @
- // see issue #1949
- element.append(document.createComment('IE fix'));
- }
-
- if (!attr.href && !attr.xlinkHref && !attr.name) {
- return function(scope, element) {
- // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.
- var href = toString.call(element.prop('href')) === '[object SVGAnimatedString]' ?
- 'xlink:href' : 'href';
- element.on('click', function(event){
- // if we have no href url, then don't navigate anywhere.
- if (!element.attr(href)) {
- event.preventDefault();
- }
- });
- };
- }
- }
-});
-
-/**
- * @ngdoc directive
- * @name ngHref
- * @restrict A
- * @priority 99
- *
- * @description
- * Using Angular markup like `{{hash}}` in an href attribute will
- * make the link go to the wrong URL if the user clicks it before
- * Angular has a chance to replace the `{{hash}}` markup with its
- * value. Until Angular replaces the markup the link will be broken
- * and will most likely return a 404 error.
- *
- * The `ngHref` directive solves this problem.
- *
- * The wrong way to write it:
- * ```html
- * <a href="http://www.gravatar.com/avatar/{{hash}}"/>
- * ```
- *
- * The correct way to write it:
- * ```html
- * <a ng-href="http://www.gravatar.com/avatar/{{hash}}"/>
- * ```
- *
- * @element A
- * @param {template} ngHref any string which can contain `{{}}` markup.
- *
- * @example
- * This example shows various combinations of `href`, `ng-href` and `ng-click` attributes
- * in links and their different behaviors:
- <example>
- <file name="index.html">
- <input ng-model="value" /><br />
- <a id="link-1" href ng-click="value = 1">link 1</a> (link, don't reload)<br />
- <a id="link-2" href="" ng-click="value = 2">link 2</a> (link, don't reload)<br />
- <a id="link-3" ng-href="/{{'123'}}">link 3</a> (link, reload!)<br />
- <a id="link-4" href="" name="xx" ng-click="value = 4">anchor</a> (link, don't reload)<br />
- <a id="link-5" name="xxx" ng-click="value = 5">anchor</a> (no link)<br />
- <a id="link-6" ng-href="{{value}}">link</a> (link, change location)
- </file>
- <file name="protractor.js" type="protractor">
- it('should execute ng-click but not reload when href without value', function() {
- element(by.id('link-1')).click();
- expect(element(by.model('value')).getAttribute('value')).toEqual('1');
- expect(element(by.id('link-1')).getAttribute('href')).toBe('');
- });
-
- it('should execute ng-click but not reload when href empty string', function() {
- element(by.id('link-2')).click();
- expect(element(by.model('value')).getAttribute('value')).toEqual('2');
- expect(element(by.id('link-2')).getAttribute('href')).toBe('');
- });
-
- it('should execute ng-click and change url when ng-href specified', function() {
- expect(element(by.id('link-3')).getAttribute('href')).toMatch(/\/123$/);
-
- element(by.id('link-3')).click();
-
- // At this point, we navigate away from an Angular page, so we need
- // to use browser.driver to get the base webdriver.
-
- browser.wait(function() {
- return browser.driver.getCurrentUrl().then(function(url) {
- return url.match(/\/123$/);
- });
- }, 5000, 'page should navigate to /123');
- });
-
- xit('should execute ng-click but not reload when href empty string and name specified', function() {
- element(by.id('link-4')).click();
- expect(element(by.model('value')).getAttribute('value')).toEqual('4');
- expect(element(by.id('link-4')).getAttribute('href')).toBe('');
- });
-
- it('should execute ng-click but not reload when no href but name specified', function() {
- element(by.id('link-5')).click();
- expect(element(by.model('value')).getAttribute('value')).toEqual('5');
- expect(element(by.id('link-5')).getAttribute('href')).toBe(null);
- });
-
- it('should only change url when only ng-href', function() {
- element(by.model('value')).clear();
- element(by.model('value')).sendKeys('6');
- expect(element(by.id('link-6')).getAttribute('href')).toMatch(/\/6$/);
-
- element(by.id('link-6')).click();
-
- // At this point, we navigate away from an Angular page, so we need
- // to use browser.driver to get the base webdriver.
- browser.wait(function() {
- return browser.driver.getCurrentUrl().then(function(url) {
- return url.match(/\/6$/);
- });
- }, 5000, 'page should navigate to /6');
- });
- </file>
- </example>
- */
-
-/**
- * @ngdoc directive
- * @name ngSrc
- * @restrict A
- * @priority 99
- *
- * @description
- * Using Angular markup like `{{hash}}` in a `src` attribute doesn't
- * work right: The browser will fetch from the URL with the literal
- * text `{{hash}}` until Angular replaces the expression inside
- * `{{hash}}`. The `ngSrc` directive solves this problem.
- *
- * The buggy way to write it:
- * ```html
- * <img src="http://www.gravatar.com/avatar/{{hash}}"/>
- * ```
- *
- * The correct way to write it:
- * ```html
- * <img ng-src="http://www.gravatar.com/avatar/{{hash}}"/>
- * ```
- *
- * @element IMG
- * @param {template} ngSrc any string which can contain `{{}}` markup.
- */
-
-/**
- * @ngdoc directive
- * @name ngSrcset
- * @restrict A
- * @priority 99
- *
- * @description
- * Using Angular markup like `{{hash}}` in a `srcset` attribute doesn't
- * work right: The browser will fetch from the URL with the literal
- * text `{{hash}}` until Angular replaces the expression inside
- * `{{hash}}`. The `ngSrcset` directive solves this problem.
- *
- * The buggy way to write it:
- * ```html
- * <img srcset="http://www.gravatar.com/avatar/{{hash}} 2x"/>
- * ```
- *
- * The correct way to write it:
- * ```html
- * <img ng-srcset="http://www.gravatar.com/avatar/{{hash}} 2x"/>
- * ```
- *
- * @element IMG
- * @param {template} ngSrcset any string which can contain `{{}}` markup.
- */
-
-/**
- * @ngdoc directive
- * @name ngDisabled
- * @restrict A
- * @priority 100
- *
- * @description
- *
- * We shouldn't do this, because it will make the button enabled on Chrome/Firefox but not on IE8 and older IEs:
- * ```html
- * <div ng-init="scope = { isDisabled: false }">
- * <button disabled="{{scope.isDisabled}}">Disabled</button>
- * </div>
- * ```
- *
- * The HTML specification does not require browsers to preserve the values of boolean attributes
- * such as disabled. (Their presence means true and their absence means false.)
- * If we put an Angular interpolation expression into such an attribute then the
- * binding information would be lost when the browser removes the attribute.
- * The `ngDisabled` directive solves this problem for the `disabled` attribute.
- * This complementary directive is not removed by the browser and so provides
- * a permanent reliable place to store the binding information.
- *
- * @example
- <example>
- <file name="index.html">
- Click me to toggle: <input type="checkbox" ng-model="checked"><br/>
- <button ng-model="button" ng-disabled="checked">Button</button>
- </file>
- <file name="protractor.js" type="protractor">
- it('should toggle button', function() {
- expect(element(by.css('button')).getAttribute('disabled')).toBeFalsy();
- element(by.model('checked')).click();
- expect(element(by.css('button')).getAttribute('disabled')).toBeTruthy();
- });
- </file>
- </example>
- *
- * @element INPUT
- * @param {expression} ngDisabled If the {@link guide/expression expression} is truthy,
- * then special attribute "disabled" will be set on the element
- */
-
-
-/**
- * @ngdoc directive
- * @name ngChecked
- * @restrict A
- * @priority 100
- *
- * @description
- * The HTML specification does not require browsers to preserve the values of boolean attributes
- * such as checked. (Their presence means true and their absence means false.)
- * If we put an Angular interpolation expression into such an attribute then the
- * binding information would be lost when the browser removes the attribute.
- * The `ngChecked` directive solves this problem for the `checked` attribute.
- * This complementary directive is not removed by the browser and so provides
- * a permanent reliable place to store the binding information.
- * @example
- <example>
- <file name="index.html">
- Check me to check both: <input type="checkbox" ng-model="master"><br/>
- <input id="checkSlave" type="checkbox" ng-checked="master">
- </file>
- <file name="protractor.js" type="protractor">
- it('should check both checkBoxes', function() {
- expect(element(by.id('checkSlave')).getAttribute('checked')).toBeFalsy();
- element(by.model('master')).click();
- expect(element(by.id('checkSlave')).getAttribute('checked')).toBeTruthy();
- });
- </file>
- </example>
- *
- * @element INPUT
- * @param {expression} ngChecked If the {@link guide/expression expression} is truthy,
- * then special attribute "checked" will be set on the element
- */
-
-
-/**
- * @ngdoc directive
- * @name ngReadonly
- * @restrict A
- * @priority 100
- *
- * @description
- * The HTML specification does not require browsers to preserve the values of boolean attributes
- * such as readonly. (Their presence means true and their absence means false.)
- * If we put an Angular interpolation expression into such an attribute then the
- * binding information would be lost when the browser removes the attribute.
- * The `ngReadonly` directive solves this problem for the `readonly` attribute.
- * This complementary directive is not removed by the browser and so provides
- * a permanent reliable place to store the binding information.
- * @example
- <example>
- <file name="index.html">
- Check me to make text readonly: <input type="checkbox" ng-model="checked"><br/>
- <input type="text" ng-readonly="checked" value="I'm Angular"/>
- </file>
- <file name="protractor.js" type="protractor">
- it('should toggle readonly attr', function() {
- expect(element(by.css('[type="text"]')).getAttribute('readonly')).toBeFalsy();
- element(by.model('checked')).click();
- expect(element(by.css('[type="text"]')).getAttribute('readonly')).toBeTruthy();
- });
- </file>
- </example>
- *
- * @element INPUT
- * @param {expression} ngReadonly If the {@link guide/expression expression} is truthy,
- * then special attribute "readonly" will be set on the element
- */
-
-
-/**
- * @ngdoc directive
- * @name ngSelected
- * @restrict A
- * @priority 100
- *
- * @description
- * The HTML specification does not require browsers to preserve the values of boolean attributes
- * such as selected. (Their presence means true and their absence means false.)
- * If we put an Angular interpolation expression into such an attribute then the
- * binding information would be lost when the browser removes the attribute.
- * The `ngSelected` directive solves this problem for the `selected` attribute.
- * This complementary directive is not removed by the browser and so provides
- * a permanent reliable place to store the binding information.
- *
- * @example
- <example>
- <file name="index.html">
- Check me to select: <input type="checkbox" ng-model="selected"><br/>
- <select>
- <option>Hello!</option>
- <option id="greet" ng-selected="selected">Greetings!</option>
- </select>
- </file>
- <file name="protractor.js" type="protractor">
- it('should select Greetings!', function() {
- expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy();
- element(by.model('selected')).click();
- expect(element(by.id('greet')).getAttribute('selected')).toBeTruthy();
- });
- </file>
- </example>
- *
- * @element OPTION
- * @param {expression} ngSelected If the {@link guide/expression expression} is truthy,
- * then special attribute "selected" will be set on the element
- */
-
-/**
- * @ngdoc directive
- * @name ngOpen
- * @restrict A
- * @priority 100
- *
- * @description
- * The HTML specification does not require browsers to preserve the values of boolean attributes
- * such as open. (Their presence means true and their absence means false.)
- * If we put an Angular interpolation expression into such an attribute then the
- * binding information would be lost when the browser removes the attribute.
- * The `ngOpen` directive solves this problem for the `open` attribute.
- * This complementary directive is not removed by the browser and so provides
- * a permanent reliable place to store the binding information.
- * @example
- <example>
- <file name="index.html">
- Check me check multiple: <input type="checkbox" ng-model="open"><br/>
- <details id="details" ng-open="open">
- <summary>Show/Hide me</summary>
- </details>
- </file>
- <file name="protractor.js" type="protractor">
- it('should toggle open', function() {
- expect(element(by.id('details')).getAttribute('open')).toBeFalsy();
- element(by.model('open')).click();
- expect(element(by.id('details')).getAttribute('open')).toBeTruthy();
- });
- </file>
- </example>
- *
- * @element DETAILS
- * @param {expression} ngOpen If the {@link guide/expression expression} is truthy,
- * then special attribute "open" will be set on the element
- */
-
-var ngAttributeAliasDirectives = {};
-
-
-// boolean attrs are evaluated
-forEach(BOOLEAN_ATTR, function(propName, attrName) {
- // binding to multiple is not supported
- if (propName == "multiple") return;
-
- var normalized = directiveNormalize('ng-' + attrName);
- ngAttributeAliasDirectives[normalized] = function() {
- return {
- priority: 100,
- link: function(scope, element, attr) {
- scope.$watch(attr[normalized], function ngBooleanAttrWatchAction(value) {
- attr.$set(attrName, !!value);
- });
- }
- };
- };
-});
-
-
-// ng-src, ng-srcset, ng-href are interpolated
-forEach(['src', 'srcset', 'href'], function(attrName) {
- var normalized = directiveNormalize('ng-' + attrName);
- ngAttributeAliasDirectives[normalized] = function() {
- return {
- priority: 99, // it needs to run after the attributes are interpolated
- link: function(scope, element, attr) {
- var propName = attrName,
- name = attrName;
-
- if (attrName === 'href' &&
- toString.call(element.prop('href')) === '[object SVGAnimatedString]') {
- name = 'xlinkHref';
- attr.$attr[name] = 'xlink:href';
- propName = null;
- }
-
- attr.$observe(normalized, function(value) {
- if (!value) {
- if (attrName === 'href') {
- attr.$set(name, null);
- }
- return;
- }
-
- attr.$set(name, value);
-
- // on IE, if "ng:src" directive declaration is used and "src" attribute doesn't exist
- // then calling element.setAttribute('src', 'foo') doesn't do anything, so we need
- // to set the property as well to achieve the desired effect.
- // we use attr[attrName] value since $set can sanitize the url.
- if (msie && propName) element.prop(propName, attr[name]);
- });
- }
- };
- };
-});
-
-/* global -nullFormCtrl */
-var nullFormCtrl = {
- $addControl: noop,
- $removeControl: noop,
- $setValidity: noop,
- $setDirty: noop,
- $setPristine: noop
-};
-
-/**
- * @ngdoc type
- * @name form.FormController
- *
- * @property {boolean} $pristine True if user has not interacted with the form yet.
- * @property {boolean} $dirty True if user has already interacted with the form.
- * @property {boolean} $valid True if all of the containing forms and controls are valid.
- * @property {boolean} $invalid True if at least one containing control or form is invalid.
- *
- * @property {Object} $error Is an object hash, containing references to all invalid controls or
- * forms, where:
- *
- * - keys are validation tokens (error names),
- * - values are arrays of controls or forms that are invalid for given error name.
- *
- *
- * Built-in validation tokens:
- *
- * - `email`
- * - `max`
- * - `maxlength`
- * - `min`
- * - `minlength`
- * - `number`
- * - `pattern`
- * - `required`
- * - `url`
- *
- * @description
- * `FormController` keeps track of all its controls and nested forms as well as the state of them,
- * such as being valid/invalid or dirty/pristine.
- *
- * Each {@link ng.directive:form form} directive creates an instance
- * of `FormController`.
- *
- */
-//asks for $scope to fool the BC controller module
-FormController.$inject = ['$element', '$attrs', '$scope', '$animate'];
-function FormController(element, attrs, $scope, $animate) {
- var form = this,
- parentForm = element.parent().controller('form') || nullFormCtrl,
- invalidCount = 0, // used to easily determine if we are valid
- errors = form.$error = {},
- controls = [];
-
- // init state
- form.$name = attrs.name || attrs.ngForm;
- form.$dirty = false;
- form.$pristine = true;
- form.$valid = true;
- form.$invalid = false;
-
- parentForm.$addControl(form);
-
- // Setup initial state of the control
- element.addClass(PRISTINE_CLASS);
- toggleValidCss(true);
-
- // convenience method for easy toggling of classes
- function toggleValidCss(isValid, validationErrorKey) {
- validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';
- $animate.setClass(element,
- (isValid ? VALID_CLASS : INVALID_CLASS) + validationErrorKey,
- (isValid ? INVALID_CLASS : VALID_CLASS) + validationErrorKey);
- }
-
- /**
- * @ngdoc method
- * @name form.FormController#$addControl
- *
- * @description
- * Register a control with the form.
- *
- * Input elements using ngModelController do this automatically when they are linked.
- */
- form.$addControl = function(control) {
- // Breaking change - before, inputs whose name was "hasOwnProperty" were quietly ignored
- // and not added to the scope. Now we throw an error.
- assertNotHasOwnProperty(control.$name, 'input');
- controls.push(control);
-
- if (control.$name) {
- form[control.$name] = control;
- }
- };
-
- /**
- * @ngdoc method
- * @name form.FormController#$removeControl
- *
- * @description
- * Deregister a control from the form.
- *
- * Input elements using ngModelController do this automatically when they are destroyed.
- */
- form.$removeControl = function(control) {
- if (control.$name && form[control.$name] === control) {
- delete form[control.$name];
- }
- forEach(errors, function(queue, validationToken) {
- form.$setValidity(validationToken, true, control);
- });
-
- arrayRemove(controls, control);
- };
-
- /**
- * @ngdoc method
- * @name form.FormController#$setValidity
- *
- * @description
- * Sets the validity of a form control.
- *
- * This method will also propagate to parent forms.
- */
- form.$setValidity = function(validationToken, isValid, control) {
- var queue = errors[validationToken];
-
- if (isValid) {
- if (queue) {
- arrayRemove(queue, control);
- if (!queue.length) {
- invalidCount--;
- if (!invalidCount) {
- toggleValidCss(isValid);
- form.$valid = true;
- form.$invalid = false;
- }
- errors[validationToken] = false;
- toggleValidCss(true, validationToken);
- parentForm.$setValidity(validationToken, true, form);
- }
- }
-
- } else {
- if (!invalidCount) {
- toggleValidCss(isValid);
- }
- if (queue) {
- if (includes(queue, control)) return;
- } else {
- errors[validationToken] = queue = [];
- invalidCount++;
- toggleValidCss(false, validationToken);
- parentForm.$setValidity(validationToken, false, form);
- }
- queue.push(control);
-
- form.$valid = false;
- form.$invalid = true;
- }
- };
-
- /**
- * @ngdoc method
- * @name form.FormController#$setDirty
- *
- * @description
- * Sets the form to a dirty state.
- *
- * This method can be called to add the 'ng-dirty' class and set the form to a dirty
- * state (ng-dirty class). This method will also propagate to parent forms.
- */
- form.$setDirty = function() {
- $animate.removeClass(element, PRISTINE_CLASS);
- $animate.addClass(element, DIRTY_CLASS);
- form.$dirty = true;
- form.$pristine = false;
- parentForm.$setDirty();
- };
-
- /**
- * @ngdoc method
- * @name form.FormController#$setPristine
- *
- * @description
- * Sets the form to its pristine state.
- *
- * This method can be called to remove the 'ng-dirty' class and set the form to its pristine
- * state (ng-pristine class). This method will also propagate to all the controls contained
- * in this form.
- *
- * Setting a form back to a pristine state is often useful when we want to 'reuse' a form after
- * saving or resetting it.
- */
- form.$setPristine = function () {
- $animate.removeClass(element, DIRTY_CLASS);
- $animate.addClass(element, PRISTINE_CLASS);
- form.$dirty = false;
- form.$pristine = true;
- forEach(controls, function(control) {
- control.$setPristine();
- });
- };
-}
-
-
-/**
- * @ngdoc directive
- * @name ngForm
- * @restrict EAC
- *
- * @description
- * Nestable alias of {@link ng.directive:form `form`} directive. HTML
- * does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a
- * sub-group of controls needs to be determined.
- *
- * Note: the purpose of `ngForm` is to group controls,
- * but not to be a replacement for the `<form>` tag with all of its capabilities
- * (e.g. posting to the server, ...).
- *
- * @param {string=} ngForm|name Name of the form. If specified, the form controller will be published into
- * related scope, under this name.
- *
- */
-
- /**
- * @ngdoc directive
- * @name form
- * @restrict E
- *
- * @description
- * Directive that instantiates
- * {@link form.FormController FormController}.
- *
- * If the `name` attribute is specified, the form controller is published onto the current scope under
- * this name.
- *
- * # Alias: {@link ng.directive:ngForm `ngForm`}
- *
- * In Angular forms can be nested. This means that the outer form is valid when all of the child
- * forms are valid as well. However, browsers do not allow nesting of `<form>` elements, so
- * Angular provides the {@link ng.directive:ngForm `ngForm`} directive which behaves identically to
- * `<form>` but can be nested. This allows you to have nested forms, which is very useful when
- * using Angular validation directives in forms that are dynamically generated using the
- * {@link ng.directive:ngRepeat `ngRepeat`} directive. Since you cannot dynamically generate the `name`
- * attribute of input elements using interpolation, you have to wrap each set of repeated inputs in an
- * `ngForm` directive and nest these in an outer `form` element.
- *
- *
- * # CSS classes
- * - `ng-valid` is set if the form is valid.
- * - `ng-invalid` is set if the form is invalid.
- * - `ng-pristine` is set if the form is pristine.
- * - `ng-dirty` is set if the form is dirty.
- *
- * Keep in mind that ngAnimate can detect each of these classes when added and removed.
- *
- *
- * # Submitting a form and preventing the default action
- *
- * Since the role of forms in client-side Angular applications is different than in classical
- * roundtrip apps, it is desirable for the browser not to translate the form submission into a full
- * page reload that sends the data to the server. Instead some javascript logic should be triggered
- * to handle the form submission in an application-specific way.
- *
- * For this reason, Angular prevents the default action (form submission to the server) unless the
- * `<form>` element has an `action` attribute specified.
- *
- * You can use one of the following two ways to specify what javascript method should be called when
- * a form is submitted:
- *
- * - {@link ng.directive:ngSubmit ngSubmit} directive on the form element
- * - {@link ng.directive:ngClick ngClick} directive on the first
- * button or input field of type submit (input[type=submit])
- *
- * To prevent double execution of the handler, use only one of the {@link ng.directive:ngSubmit ngSubmit}
- * or {@link ng.directive:ngClick ngClick} directives.
- * This is because of the following form submission rules in the HTML specification:
- *
- * - If a form has only one input field then hitting enter in this field triggers form submit
- * (`ngSubmit`)
- * - if a form has 2+ input fields and no buttons or input[type=submit] then hitting enter
- * doesn't trigger submit
- * - if a form has one or more input fields and one or more buttons or input[type=submit] then
- * hitting enter in any of the input fields will trigger the click handler on the *first* button or
- * input[type=submit] (`ngClick`) *and* a submit handler on the enclosing form (`ngSubmit`)
- *
- *
- * ## Animation Hooks
- *
- * Animations in ngForm are triggered when any of the associated CSS classes are added and removed.
- * These classes are: `.ng-pristine`, `.ng-dirty`, `.ng-invalid` and `.ng-valid` as well as any
- * other validations that are performed within the form. Animations in ngForm are similar to how
- * they work in ngClass and animations can be hooked into using CSS transitions, keyframes as well
- * as JS animations.
- *
- * The following example shows a simple way to utilize CSS transitions to style a form element
- * that has been rendered as invalid after it has been validated:
- *
- * <pre>
- * //be sure to include ngAnimate as a module to hook into more
- * //advanced animations
- * .my-form {
- * transition:0.5s linear all;
- * background: white;
- * }
- * .my-form.ng-invalid {
- * background: red;
- * color:white;
- * }
- * </pre>
- *
- * @example
- <example deps="angular-animate.js" animations="true" fixBase="true" module="formExample">
- <file name="index.html">
- <script>
- angular.module('formExample', [])
- .controller('FormController', ['$scope', function($scope) {
- $scope.userType = 'guest';
- }]);
- </script>
- <style>
- .my-form {
- -webkit-transition:all linear 0.5s;
- transition:all linear 0.5s;
- background: transparent;
- }
- .my-form.ng-invalid {
- background: red;
- }
- </style>
- <form name="myForm" ng-controller="FormController" class="my-form">
- userType: <input name="input" ng-model="userType" required>
- <span class="error" ng-show="myForm.input.$error.required">Required!</span><br>
- <tt>userType = {{userType}}</tt><br>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- it('should initialize to model', function() {
- var userType = element(by.binding('userType'));
- var valid = element(by.binding('myForm.input.$valid'));
-
- expect(userType.getText()).toContain('guest');
- expect(valid.getText()).toContain('true');
- });
-
- it('should be invalid if empty', function() {
- var userType = element(by.binding('userType'));
- var valid = element(by.binding('myForm.input.$valid'));
- var userInput = element(by.model('userType'));
-
- userInput.clear();
- userInput.sendKeys('');
-
- expect(userType.getText()).toEqual('userType =');
- expect(valid.getText()).toContain('false');
- });
- </file>
- </example>
- *
- * @param {string=} name Name of the form. If specified, the form controller will be published into
- * related scope, under this name.
- */
-var formDirectiveFactory = function(isNgForm) {
- return ['$timeout', function($timeout) {
- var formDirective = {
- name: 'form',
- restrict: isNgForm ? 'EAC' : 'E',
- controller: FormController,
- compile: function() {
- return {
- pre: function(scope, formElement, attr, controller) {
- if (!attr.action) {
- // we can't use jq events because if a form is destroyed during submission the default
- // action is not prevented. see #1238
- //
- // IE 9 is not affected because it doesn't fire a submit event and try to do a full
- // page reload if the form was destroyed by submission of the form via a click handler
- // on a button in the form. Looks like an IE9 specific bug.
- var preventDefaultListener = function(event) {
- event.preventDefault
- ? event.preventDefault()
- : event.returnValue = false; // IE
- };
-
- addEventListenerFn(formElement[0], 'submit', preventDefaultListener);
-
- // unregister the preventDefault listener so that we don't not leak memory but in a
- // way that will achieve the prevention of the default action.
- formElement.on('$destroy', function() {
- $timeout(function() {
- removeEventListenerFn(formElement[0], 'submit', preventDefaultListener);
- }, 0, false);
- });
- }
-
- var parentFormCtrl = formElement.parent().controller('form'),
- alias = attr.name || attr.ngForm;
-
- if (alias) {
- setter(scope, alias, controller, alias);
- }
- if (parentFormCtrl) {
- formElement.on('$destroy', function() {
- parentFormCtrl.$removeControl(controller);
- if (alias) {
- setter(scope, alias, undefined, alias);
- }
- extend(controller, nullFormCtrl); //stop propagating child destruction handlers upwards
- });
- }
- }
- };
- }
- };
-
- return formDirective;
- }];
-};
-
-var formDirective = formDirectiveFactory();
-var ngFormDirective = formDirectiveFactory(true);
-
-/* global VALID_CLASS: true,
- INVALID_CLASS: true,
- PRISTINE_CLASS: true,
- DIRTY_CLASS: true
-*/
-
-var URL_REGEXP = /^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/;
-var EMAIL_REGEXP = /^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i;
-var NUMBER_REGEXP = /^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/;
-
-var inputType = {
-
- /**
- * @ngdoc input
- * @name input[text]
- *
- * @description
- * Standard HTML text input with angular data binding, inherited by most of the `input` elements.
- *
- * *NOTE* Not every feature offered is available for all input types.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} required Adds `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
- * minlength.
- * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
- * maxlength.
- * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the
- * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
- * patterns defined as scope expressions.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.
- * This parameter is ignored for input[type=password] controls, which will never trim the
- * input.
- *
- * @example
- <example name="text-input-directive" module="textInputExample">
- <file name="index.html">
- <script>
- angular.module('textInputExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.text = 'guest';
- $scope.word = /^\s*\w*\s*$/;
- }]);
- </script>
- <form name="myForm" ng-controller="ExampleController">
- Single word: <input type="text" name="input" ng-model="text"
- ng-pattern="word" required ng-trim="false">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.pattern">
- Single word only!</span>
-
- <tt>text = {{text}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var text = element(by.binding('text'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('text'));
-
- it('should initialize to model', function() {
- expect(text.getText()).toContain('guest');
- expect(valid.getText()).toContain('true');
- });
-
- it('should be invalid if empty', function() {
- input.clear();
- input.sendKeys('');
-
- expect(text.getText()).toEqual('text =');
- expect(valid.getText()).toContain('false');
- });
-
- it('should be invalid if multi word', function() {
- input.clear();
- input.sendKeys('hello world');
-
- expect(valid.getText()).toContain('false');
- });
- </file>
- </example>
- */
- 'text': textInputType,
-
-
- /**
- * @ngdoc input
- * @name input[number]
- *
- * @description
- * Text input with number validation and transformation. Sets the `number` validation
- * error if not a valid number.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.
- * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
- * minlength.
- * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
- * maxlength.
- * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the
- * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
- * patterns defined as scope expressions.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="number-input-directive" module="numberExample">
- <file name="index.html">
- <script>
- angular.module('numberExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.value = 12;
- }]);
- </script>
- <form name="myForm" ng-controller="ExampleController">
- Number: <input type="number" name="input" ng-model="value"
- min="0" max="99" required>
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.number">
- Not valid number!</span>
- <tt>value = {{value}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var value = element(by.binding('value'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('value'));
-
- it('should initialize to model', function() {
- expect(value.getText()).toContain('12');
- expect(valid.getText()).toContain('true');
- });
-
- it('should be invalid if empty', function() {
- input.clear();
- input.sendKeys('');
- expect(value.getText()).toEqual('value =');
- expect(valid.getText()).toContain('false');
- });
-
- it('should be invalid if over max', function() {
- input.clear();
- input.sendKeys('123');
- expect(value.getText()).toEqual('value =');
- expect(valid.getText()).toContain('false');
- });
- </file>
- </example>
- */
- 'number': numberInputType,
-
-
- /**
- * @ngdoc input
- * @name input[url]
- *
- * @description
- * Text input with URL validation. Sets the `url` validation error key if the content is not a
- * valid URL.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
- * minlength.
- * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
- * maxlength.
- * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the
- * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
- * patterns defined as scope expressions.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="url-input-directive" module="urlExample">
- <file name="index.html">
- <script>
- angular.module('urlExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.text = 'http://google.com';
- }]);
- </script>
- <form name="myForm" ng-controller="ExampleController">
- URL: <input type="url" name="input" ng-model="text" required>
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.url">
- Not valid url!</span>
- <tt>text = {{text}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- <tt>myForm.$error.url = {{!!myForm.$error.url}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var text = element(by.binding('text'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('text'));
-
- it('should initialize to model', function() {
- expect(text.getText()).toContain('http://google.com');
- expect(valid.getText()).toContain('true');
- });
-
- it('should be invalid if empty', function() {
- input.clear();
- input.sendKeys('');
-
- expect(text.getText()).toEqual('text =');
- expect(valid.getText()).toContain('false');
- });
-
- it('should be invalid if not url', function() {
- input.clear();
- input.sendKeys('box');
-
- expect(valid.getText()).toContain('false');
- });
- </file>
- </example>
- */
- 'url': urlInputType,
-
-
- /**
- * @ngdoc input
- * @name input[email]
- *
- * @description
- * Text input with email validation. Sets the `email` validation error key if not a valid email
- * address.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
- * minlength.
- * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
- * maxlength.
- * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the
- * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
- * patterns defined as scope expressions.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="email-input-directive" module="emailExample">
- <file name="index.html">
- <script>
- angular.module('emailExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.text = 'me@example.com';
- }]);
- </script>
- <form name="myForm" ng-controller="ExampleController">
- Email: <input type="email" name="input" ng-model="text" required>
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.email">
- Not valid email!</span>
- <tt>text = {{text}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- <tt>myForm.$error.email = {{!!myForm.$error.email}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var text = element(by.binding('text'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('text'));
-
- it('should initialize to model', function() {
- expect(text.getText()).toContain('me@example.com');
- expect(valid.getText()).toContain('true');
- });
-
- it('should be invalid if empty', function() {
- input.clear();
- input.sendKeys('');
- expect(text.getText()).toEqual('text =');
- expect(valid.getText()).toContain('false');
- });
-
- it('should be invalid if not email', function() {
- input.clear();
- input.sendKeys('xxx');
-
- expect(valid.getText()).toContain('false');
- });
- </file>
- </example>
- */
- 'email': emailInputType,
-
-
- /**
- * @ngdoc input
- * @name input[radio]
- *
- * @description
- * HTML radio button.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string} value The value to which the expression should be set when selected.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- * @param {string} ngValue Angular expression which sets the value to which the expression should
- * be set when selected.
- *
- * @example
- <example name="radio-input-directive" module="radioExample">
- <file name="index.html">
- <script>
- angular.module('radioExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.color = 'blue';
- $scope.specialValue = {
- "id": "12345",
- "value": "green"
- };
- }]);
- </script>
- <form name="myForm" ng-controller="ExampleController">
- <input type="radio" ng-model="color" value="red"> Red <br/>
- <input type="radio" ng-model="color" ng-value="specialValue"> Green <br/>
- <input type="radio" ng-model="color" value="blue"> Blue <br/>
- <tt>color = {{color | json}}</tt><br/>
- </form>
- Note that `ng-value="specialValue"` sets radio item's value to be the value of `$scope.specialValue`.
- </file>
- <file name="protractor.js" type="protractor">
- it('should change state', function() {
- var color = element(by.binding('color'));
-
- expect(color.getText()).toContain('blue');
-
- element.all(by.model('color')).get(0).click();
-
- expect(color.getText()).toContain('red');
- });
- </file>
- </example>
- */
- 'radio': radioInputType,
-
-
- /**
- * @ngdoc input
- * @name input[checkbox]
- *
- * @description
- * HTML checkbox.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} ngTrueValue The value to which the expression should be set when selected.
- * @param {string=} ngFalseValue The value to which the expression should be set when not selected.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="checkbox-input-directive" module="checkboxExample">
- <file name="index.html">
- <script>
- angular.module('checkboxExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.value1 = true;
- $scope.value2 = 'YES'
- }]);
- </script>
- <form name="myForm" ng-controller="ExampleController">
- Value1: <input type="checkbox" ng-model="value1"> <br/>
- Value2: <input type="checkbox" ng-model="value2"
- ng-true-value="YES" ng-false-value="NO"> <br/>
- <tt>value1 = {{value1}}</tt><br/>
- <tt>value2 = {{value2}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- it('should change state', function() {
- var value1 = element(by.binding('value1'));
- var value2 = element(by.binding('value2'));
-
- expect(value1.getText()).toContain('true');
- expect(value2.getText()).toContain('YES');
-
- element(by.model('value1')).click();
- element(by.model('value2')).click();
-
- expect(value1.getText()).toContain('false');
- expect(value2.getText()).toContain('NO');
- });
- </file>
- </example>
- */
- 'checkbox': checkboxInputType,
-
- 'hidden': noop,
- 'button': noop,
- 'submit': noop,
- 'reset': noop,
- 'file': noop
-};
-
-// A helper function to call $setValidity and return the value / undefined,
-// a pattern that is repeated a lot in the input validation logic.
-function validate(ctrl, validatorName, validity, value){
- ctrl.$setValidity(validatorName, validity);
- return validity ? value : undefined;
-}
-
-function testFlags(validity, flags) {
- var i, flag;
- if (flags) {
- for (i=0; i<flags.length; ++i) {
- flag = flags[i];
- if (validity[flag]) {
- return true;
- }
- }
- }
- return false;
-}
-
-// Pass validity so that behaviour can be mocked easier.
-function addNativeHtml5Validators(ctrl, validatorName, badFlags, ignoreFlags, validity) {
- if (isObject(validity)) {
- ctrl.$$hasNativeValidators = true;
- var validator = function(value) {
- // Don't overwrite previous validation, don't consider valueMissing to apply (ng-required can
- // perform the required validation)
- if (!ctrl.$error[validatorName] &&
- !testFlags(validity, ignoreFlags) &&
- testFlags(validity, badFlags)) {
- ctrl.$setValidity(validatorName, false);
- return;
- }
- return value;
- };
- ctrl.$parsers.push(validator);
- }
-}
-
-function textInputType(scope, element, attr, ctrl, $sniffer, $browser) {
- var validity = element.prop(VALIDITY_STATE_PROPERTY);
- var placeholder = element[0].placeholder, noevent = {};
- var type = lowercase(element[0].type);
- ctrl.$$validityState = validity;
-
- // In composition mode, users are still inputing intermediate text buffer,
- // hold the listener until composition is done.
- // More about composition events: https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent
- if (!$sniffer.android) {
- var composing = false;
-
- element.on('compositionstart', function(data) {
- composing = true;
- });
-
- element.on('compositionend', function() {
- composing = false;
- listener();
- });
- }
-
- var listener = function(ev) {
- if (composing) return;
- var value = element.val();
-
- // IE (11 and under) seem to emit an 'input' event if the placeholder value changes.
- // We don't want to dirty the value when this happens, so we abort here. Unfortunately,
- // IE also sends input events for other non-input-related things, (such as focusing on a
- // form control), so this change is not entirely enough to solve this.
- if (msie && (ev || noevent).type === 'input' && element[0].placeholder !== placeholder) {
- placeholder = element[0].placeholder;
- return;
- }
-
- // By default we will trim the value
- // If the attribute ng-trim exists we will avoid trimming
- // If input type is 'password', the value is never trimmed
- if (type !== 'password' && (toBoolean(attr.ngTrim || 'T'))) {
- value = trim(value);
- }
-
- // If a control is suffering from bad input, browsers discard its value, so it may be
- // necessary to revalidate even if the control's value is the same empty value twice in
- // a row.
- var revalidate = validity && ctrl.$$hasNativeValidators;
- if (ctrl.$viewValue !== value || (value === '' && revalidate)) {
- if (scope.$root.$$phase) {
- ctrl.$setViewValue(value);
- } else {
- scope.$apply(function() {
- ctrl.$setViewValue(value);
- });
- }
- }
- };
-
- // if the browser does support "input" event, we are fine - except on IE9 which doesn't fire the
- // input event on backspace, delete or cut
- if ($sniffer.hasEvent('input')) {
- element.on('input', listener);
- } else {
- var timeout;
-
- var deferListener = function() {
- if (!timeout) {
- timeout = $browser.defer(function() {
- listener();
- timeout = null;
- });
- }
- };
-
- element.on('keydown', function(event) {
- var key = event.keyCode;
-
- // ignore
- // command modifiers arrows
- if (key === 91 || (15 < key && key < 19) || (37 <= key && key <= 40)) return;
-
- deferListener();
- });
-
- // if user modifies input value using context menu in IE, we need "paste" and "cut" events to catch it
- if ($sniffer.hasEvent('paste')) {
- element.on('paste cut', deferListener);
- }
- }
-
- // if user paste into input using mouse on older browser
- // or form autocomplete on newer browser, we need "change" event to catch it
- element.on('change', listener);
-
- ctrl.$render = function() {
- element.val(ctrl.$isEmpty(ctrl.$viewValue) ? '' : ctrl.$viewValue);
- };
-
- // pattern validator
- var pattern = attr.ngPattern,
- patternValidator,
- match;
-
- if (pattern) {
- var validateRegex = function(regexp, value) {
- return validate(ctrl, 'pattern', ctrl.$isEmpty(value) || regexp.test(value), value);
- };
- match = pattern.match(/^\/(.*)\/([gim]*)$/);
- if (match) {
- pattern = new RegExp(match[1], match[2]);
- patternValidator = function(value) {
- return validateRegex(pattern, value);
- };
- } else {
- patternValidator = function(value) {
- var patternObj = scope.$eval(pattern);
-
- if (!patternObj || !patternObj.test) {
- throw minErr('ngPattern')('noregexp',
- 'Expected {0} to be a RegExp but was {1}. Element: {2}', pattern,
- patternObj, startingTag(element));
- }
- return validateRegex(patternObj, value);
- };
- }
-
- ctrl.$formatters.push(patternValidator);
- ctrl.$parsers.push(patternValidator);
- }
-
- // min length validator
- if (attr.ngMinlength) {
- var minlength = int(attr.ngMinlength);
- var minLengthValidator = function(value) {
- return validate(ctrl, 'minlength', ctrl.$isEmpty(value) || value.length >= minlength, value);
- };
-
- ctrl.$parsers.push(minLengthValidator);
- ctrl.$formatters.push(minLengthValidator);
- }
-
- // max length validator
- if (attr.ngMaxlength) {
- var maxlength = int(attr.ngMaxlength);
- var maxLengthValidator = function(value) {
- return validate(ctrl, 'maxlength', ctrl.$isEmpty(value) || value.length <= maxlength, value);
- };
-
- ctrl.$parsers.push(maxLengthValidator);
- ctrl.$formatters.push(maxLengthValidator);
- }
-}
-
-var numberBadFlags = ['badInput'];
-
-function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {
- textInputType(scope, element, attr, ctrl, $sniffer, $browser);
-
- ctrl.$parsers.push(function(value) {
- var empty = ctrl.$isEmpty(value);
- if (empty || NUMBER_REGEXP.test(value)) {
- ctrl.$setValidity('number', true);
- return value === '' ? null : (empty ? value : parseFloat(value));
- } else {
- ctrl.$setValidity('number', false);
- return undefined;
- }
- });
-
- addNativeHtml5Validators(ctrl, 'number', numberBadFlags, null, ctrl.$$validityState);
-
- ctrl.$formatters.push(function(value) {
- return ctrl.$isEmpty(value) ? '' : '' + value;
- });
-
- if (attr.min) {
- var minValidator = function(value) {
- var min = parseFloat(attr.min);
- return validate(ctrl, 'min', ctrl.$isEmpty(value) || value >= min, value);
- };
-
- ctrl.$parsers.push(minValidator);
- ctrl.$formatters.push(minValidator);
- }
-
- if (attr.max) {
- var maxValidator = function(value) {
- var max = parseFloat(attr.max);
- return validate(ctrl, 'max', ctrl.$isEmpty(value) || value <= max, value);
- };
-
- ctrl.$parsers.push(maxValidator);
- ctrl.$formatters.push(maxValidator);
- }
-
- ctrl.$formatters.push(function(value) {
- return validate(ctrl, 'number', ctrl.$isEmpty(value) || isNumber(value), value);
- });
-}
-
-function urlInputType(scope, element, attr, ctrl, $sniffer, $browser) {
- textInputType(scope, element, attr, ctrl, $sniffer, $browser);
-
- var urlValidator = function(value) {
- return validate(ctrl, 'url', ctrl.$isEmpty(value) || URL_REGEXP.test(value), value);
- };
-
- ctrl.$formatters.push(urlValidator);
- ctrl.$parsers.push(urlValidator);
-}
-
-function emailInputType(scope, element, attr, ctrl, $sniffer, $browser) {
- textInputType(scope, element, attr, ctrl, $sniffer, $browser);
-
- var emailValidator = function(value) {
- return validate(ctrl, 'email', ctrl.$isEmpty(value) || EMAIL_REGEXP.test(value), value);
- };
-
- ctrl.$formatters.push(emailValidator);
- ctrl.$parsers.push(emailValidator);
-}
-
-function radioInputType(scope, element, attr, ctrl) {
- // make the name unique, if not defined
- if (isUndefined(attr.name)) {
- element.attr('name', nextUid());
- }
-
- element.on('click', function() {
- if (element[0].checked) {
- scope.$apply(function() {
- ctrl.$setViewValue(attr.value);
- });
- }
- });
-
- ctrl.$render = function() {
- var value = attr.value;
- element[0].checked = (value == ctrl.$viewValue);
- };
-
- attr.$observe('value', ctrl.$render);
-}
-
-function checkboxInputType(scope, element, attr, ctrl) {
- var trueValue = attr.ngTrueValue,
- falseValue = attr.ngFalseValue;
-
- if (!isString(trueValue)) trueValue = true;
- if (!isString(falseValue)) falseValue = false;
-
- element.on('click', function() {
- scope.$apply(function() {
- ctrl.$setViewValue(element[0].checked);
- });
- });
-
- ctrl.$render = function() {
- element[0].checked = ctrl.$viewValue;
- };
-
- // Override the standard `$isEmpty` because a value of `false` means empty in a checkbox.
- ctrl.$isEmpty = function(value) {
- return value !== trueValue;
- };
-
- ctrl.$formatters.push(function(value) {
- return value === trueValue;
- });
-
- ctrl.$parsers.push(function(value) {
- return value ? trueValue : falseValue;
- });
-}
-
-
-/**
- * @ngdoc directive
- * @name textarea
- * @restrict E
- *
- * @description
- * HTML textarea element control with angular data-binding. The data-binding and validation
- * properties of this element are exactly the same as those of the
- * {@link ng.directive:input input element}.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
- * minlength.
- * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
- * maxlength.
- * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the
- * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
- * patterns defined as scope expressions.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.
- */
-
-
-/**
- * @ngdoc directive
- * @name input
- * @restrict E
- *
- * @description
- * HTML input element control with angular data-binding. Input control follows HTML5 input types
- * and polyfills the HTML5 validation behavior for older browsers.
- *
- * *NOTE* Not every feature offered is available for all input types.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {boolean=} ngRequired Sets `required` attribute if set to true
- * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
- * minlength.
- * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
- * maxlength.
- * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the
- * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
- * patterns defined as scope expressions.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.
- * This parameter is ignored for input[type=password] controls, which will never trim the
- * input.
- *
- * @example
- <example name="input-directive" module="inputExample">
- <file name="index.html">
- <script>
- angular.module('inputExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.user = {name: 'guest', last: 'visitor'};
- }]);
- </script>
- <div ng-controller="ExampleController">
- <form name="myForm">
- User name: <input type="text" name="userName" ng-model="user.name" required>
- <span class="error" ng-show="myForm.userName.$error.required">
- Required!</span><br>
- Last name: <input type="text" name="lastName" ng-model="user.last"
- ng-minlength="3" ng-maxlength="10">
- <span class="error" ng-show="myForm.lastName.$error.minlength">
- Too short!</span>
- <span class="error" ng-show="myForm.lastName.$error.maxlength">
- Too long!</span><br>
- </form>
- <hr>
- <tt>user = {{user}}</tt><br/>
- <tt>myForm.userName.$valid = {{myForm.userName.$valid}}</tt><br>
- <tt>myForm.userName.$error = {{myForm.userName.$error}}</tt><br>
- <tt>myForm.lastName.$valid = {{myForm.lastName.$valid}}</tt><br>
- <tt>myForm.lastName.$error = {{myForm.lastName.$error}}</tt><br>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br>
- <tt>myForm.$error.minlength = {{!!myForm.$error.minlength}}</tt><br>
- <tt>myForm.$error.maxlength = {{!!myForm.$error.maxlength}}</tt><br>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- var user = element(by.binding('{{user}}'));
- var userNameValid = element(by.binding('myForm.userName.$valid'));
- var lastNameValid = element(by.binding('myForm.lastName.$valid'));
- var lastNameError = element(by.binding('myForm.lastName.$error'));
- var formValid = element(by.binding('myForm.$valid'));
- var userNameInput = element(by.model('user.name'));
- var userLastInput = element(by.model('user.last'));
-
- it('should initialize to model', function() {
- expect(user.getText()).toContain('{"name":"guest","last":"visitor"}');
- expect(userNameValid.getText()).toContain('true');
- expect(formValid.getText()).toContain('true');
- });
-
- it('should be invalid if empty when required', function() {
- userNameInput.clear();
- userNameInput.sendKeys('');
-
- expect(user.getText()).toContain('{"last":"visitor"}');
- expect(userNameValid.getText()).toContain('false');
- expect(formValid.getText()).toContain('false');
- });
-
- it('should be valid if empty when min length is set', function() {
- userLastInput.clear();
- userLastInput.sendKeys('');
-
- expect(user.getText()).toContain('{"name":"guest","last":""}');
- expect(lastNameValid.getText()).toContain('true');
- expect(formValid.getText()).toContain('true');
- });
-
- it('should be invalid if less than required min length', function() {
- userLastInput.clear();
- userLastInput.sendKeys('xx');
-
- expect(user.getText()).toContain('{"name":"guest"}');
- expect(lastNameValid.getText()).toContain('false');
- expect(lastNameError.getText()).toContain('minlength');
- expect(formValid.getText()).toContain('false');
- });
-
- it('should be invalid if longer than max length', function() {
- userLastInput.clear();
- userLastInput.sendKeys('some ridiculously long name');
-
- expect(user.getText()).toContain('{"name":"guest"}');
- expect(lastNameValid.getText()).toContain('false');
- expect(lastNameError.getText()).toContain('maxlength');
- expect(formValid.getText()).toContain('false');
- });
- </file>
- </example>
- */
-var inputDirective = ['$browser', '$sniffer', function($browser, $sniffer) {
- return {
- restrict: 'E',
- require: '?ngModel',
- link: function(scope, element, attr, ctrl) {
- if (ctrl) {
- (inputType[lowercase(attr.type)] || inputType.text)(scope, element, attr, ctrl, $sniffer,
- $browser);
- }
- }
- };
-}];
-
-var VALID_CLASS = 'ng-valid',
- INVALID_CLASS = 'ng-invalid',
- PRISTINE_CLASS = 'ng-pristine',
- DIRTY_CLASS = 'ng-dirty';
-
-/**
- * @ngdoc type
- * @name ngModel.NgModelController
- *
- * @property {string} $viewValue Actual string value in the view.
- * @property {*} $modelValue The value in the model, that the control is bound to.
- * @property {Array.<Function>} $parsers Array of functions to execute, as a pipeline, whenever
- the control reads value from the DOM. Each function is called, in turn, passing the value
- through to the next. The last return value is used to populate the model.
- Used to sanitize / convert the value as well as validation. For validation,
- the parsers should update the validity state using
- {@link ngModel.NgModelController#$setValidity $setValidity()},
- and return `undefined` for invalid values.
-
- *
- * @property {Array.<Function>} $formatters Array of functions to execute, as a pipeline, whenever
- the model value changes. Each function is called, in turn, passing the value through to the
- next. Used to format / convert values for display in the control and validation.
- * ```js
- * function formatter(value) {
- * if (value) {
- * return value.toUpperCase();
- * }
- * }
- * ngModel.$formatters.push(formatter);
- * ```
- *
- * @property {Array.<Function>} $viewChangeListeners Array of functions to execute whenever the
- * view value has changed. It is called with no arguments, and its return value is ignored.
- * This can be used in place of additional $watches against the model value.
- *
- * @property {Object} $error An object hash with all errors as keys.
- *
- * @property {boolean} $pristine True if user has not interacted with the control yet.
- * @property {boolean} $dirty True if user has already interacted with the control.
- * @property {boolean} $valid True if there is no error.
- * @property {boolean} $invalid True if at least one error on the control.
- *
- * @description
- *
- * `NgModelController` provides API for the `ng-model` directive. The controller contains
- * services for data-binding, validation, CSS updates, and value formatting and parsing. It
- * purposefully does not contain any logic which deals with DOM rendering or listening to
- * DOM events. Such DOM related logic should be provided by other directives which make use of
- * `NgModelController` for data-binding.
- *
- * ## Custom Control Example
- * This example shows how to use `NgModelController` with a custom control to achieve
- * data-binding. Notice how different directives (`contenteditable`, `ng-model`, and `required`)
- * collaborate together to achieve the desired result.
- *
- * Note that `contenteditable` is an HTML5 attribute, which tells the browser to let the element
- * contents be edited in place by the user. This will not work on older browsers.
- *
- * We are using the {@link ng.service:$sce $sce} service here and include the {@link ngSanitize $sanitize}
- * module to automatically remove "bad" content like inline event listener (e.g. `<span onclick="...">`).
- * However, as we are using `$sce` the model can still decide to to provide unsafe content if it marks
- * that content using the `$sce` service.
- *
- * <example name="NgModelController" module="customControl" deps="angular-sanitize.js">
- <file name="style.css">
- [contenteditable] {
- border: 1px solid black;
- background-color: white;
- min-height: 20px;
- }
-
- .ng-invalid {
- border: 1px solid red;
- }
-
- </file>
- <file name="script.js">
- angular.module('customControl', ['ngSanitize']).
- directive('contenteditable', ['$sce', function($sce) {
- return {
- restrict: 'A', // only activate on element attribute
- require: '?ngModel', // get a hold of NgModelController
- link: function(scope, element, attrs, ngModel) {
- if(!ngModel) return; // do nothing if no ng-model
-
- // Specify how UI should be updated
- ngModel.$render = function() {
- element.html($sce.getTrustedHtml(ngModel.$viewValue || ''));
- };
-
- // Listen for change events to enable binding
- element.on('blur keyup change', function() {
- scope.$apply(read);
- });
- read(); // initialize
-
- // Write data to the model
- function read() {
- var html = element.html();
- // When we clear the content editable the browser leaves a <br> behind
- // If strip-br attribute is provided then we strip this out
- if( attrs.stripBr && html == '<br>' ) {
- html = '';
- }
- ngModel.$setViewValue(html);
- }
- }
- };
- }]);
- </file>
- <file name="index.html">
- <form name="myForm">
- <div contenteditable
- name="myWidget" ng-model="userContent"
- strip-br="true"
- required>Change me!</div>
- <span ng-show="myForm.myWidget.$error.required">Required!</span>
- <hr>
- <textarea ng-model="userContent"></textarea>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- it('should data-bind and become invalid', function() {
- if (browser.params.browser == 'safari' || browser.params.browser == 'firefox') {
- // SafariDriver can't handle contenteditable
- // and Firefox driver can't clear contenteditables very well
- return;
- }
- var contentEditable = element(by.css('[contenteditable]'));
- var content = 'Change me!';
-
- expect(contentEditable.getText()).toEqual(content);
-
- contentEditable.clear();
- contentEditable.sendKeys(protractor.Key.BACK_SPACE);
- expect(contentEditable.getText()).toEqual('');
- expect(contentEditable.getAttribute('class')).toMatch(/ng-invalid-required/);
- });
- </file>
- * </example>
- *
- *
- */
-var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$parse', '$animate',
- function($scope, $exceptionHandler, $attr, $element, $parse, $animate) {
- this.$viewValue = Number.NaN;
- this.$modelValue = Number.NaN;
- this.$parsers = [];
- this.$formatters = [];
- this.$viewChangeListeners = [];
- this.$pristine = true;
- this.$dirty = false;
- this.$valid = true;
- this.$invalid = false;
- this.$name = $attr.name;
-
- var ngModelGet = $parse($attr.ngModel),
- ngModelSet = ngModelGet.assign;
-
- if (!ngModelSet) {
- throw minErr('ngModel')('nonassign', "Expression '{0}' is non-assignable. Element: {1}",
- $attr.ngModel, startingTag($element));
- }
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$render
- *
- * @description
- * Called when the view needs to be updated. It is expected that the user of the ng-model
- * directive will implement this method.
- */
- this.$render = noop;
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$isEmpty
- *
- * @description
- * This is called when we need to determine if the value of the input is empty.
- *
- * For instance, the required directive does this to work out if the input has data or not.
- * The default `$isEmpty` function checks whether the value is `undefined`, `''`, `null` or `NaN`.
- *
- * You can override this for input directives whose concept of being empty is different to the
- * default. The `checkboxInputType` directive does this because in its case a value of `false`
- * implies empty.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is empty.
- */
- this.$isEmpty = function(value) {
- return isUndefined(value) || value === '' || value === null || value !== value;
- };
-
- var parentForm = $element.inheritedData('$formController') || nullFormCtrl,
- invalidCount = 0, // used to easily determine if we are valid
- $error = this.$error = {}; // keep invalid keys here
-
-
- // Setup initial state of the control
- $element.addClass(PRISTINE_CLASS);
- toggleValidCss(true);
-
- // convenience method for easy toggling of classes
- function toggleValidCss(isValid, validationErrorKey) {
- validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';
- $animate.removeClass($element, (isValid ? INVALID_CLASS : VALID_CLASS) + validationErrorKey);
- $animate.addClass($element, (isValid ? VALID_CLASS : INVALID_CLASS) + validationErrorKey);
- }
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$setValidity
- *
- * @description
- * Change the validity state, and notifies the form when the control changes validity. (i.e. it
- * does not notify form if given validator is already marked as invalid).
- *
- * This method should be called by validators - i.e. the parser or formatter functions.
- *
- * @param {string} validationErrorKey Name of the validator. the `validationErrorKey` will assign
- * to `$error[validationErrorKey]=!isValid` so that it is available for data-binding.
- * The `validationErrorKey` should be in camelCase and will get converted into dash-case
- * for class name. Example: `myError` will result in `ng-valid-my-error` and `ng-invalid-my-error`
- * class and can be bound to as `{{someForm.someControl.$error.myError}}` .
- * @param {boolean} isValid Whether the current state is valid (true) or invalid (false).
- */
- this.$setValidity = function(validationErrorKey, isValid) {
- // Purposeful use of ! here to cast isValid to boolean in case it is undefined
- // jshint -W018
- if ($error[validationErrorKey] === !isValid) return;
- // jshint +W018
-
- if (isValid) {
- if ($error[validationErrorKey]) invalidCount--;
- if (!invalidCount) {
- toggleValidCss(true);
- this.$valid = true;
- this.$invalid = false;
- }
- } else {
- toggleValidCss(false);
- this.$invalid = true;
- this.$valid = false;
- invalidCount++;
- }
-
- $error[validationErrorKey] = !isValid;
- toggleValidCss(isValid, validationErrorKey);
-
- parentForm.$setValidity(validationErrorKey, isValid, this);
- };
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$setPristine
- *
- * @description
- * Sets the control to its pristine state.
- *
- * This method can be called to remove the 'ng-dirty' class and set the control to its pristine
- * state (ng-pristine class).
- */
- this.$setPristine = function () {
- this.$dirty = false;
- this.$pristine = true;
- $animate.removeClass($element, DIRTY_CLASS);
- $animate.addClass($element, PRISTINE_CLASS);
- };
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$setViewValue
- *
- * @description
- * Update the view value.
- *
- * This method should be called when the view value changes, typically from within a DOM event handler.
- * For example {@link ng.directive:input input} and
- * {@link ng.directive:select select} directives call it.
- *
- * It will update the $viewValue, then pass this value through each of the functions in `$parsers`,
- * which includes any validators. The value that comes out of this `$parsers` pipeline, be applied to
- * `$modelValue` and the **expression** specified in the `ng-model` attribute.
- *
- * Lastly, all the registered change listeners, in the `$viewChangeListeners` list, are called.
- *
- * Note that calling this function does not trigger a `$digest`.
- *
- * @param {string} value Value from the view.
- */
- this.$setViewValue = function(value) {
- this.$viewValue = value;
-
- // change to dirty
- if (this.$pristine) {
- this.$dirty = true;
- this.$pristine = false;
- $animate.removeClass($element, PRISTINE_CLASS);
- $animate.addClass($element, DIRTY_CLASS);
- parentForm.$setDirty();
- }
-
- forEach(this.$parsers, function(fn) {
- value = fn(value);
- });
-
- if (this.$modelValue !== value) {
- this.$modelValue = value;
- ngModelSet($scope, value);
- forEach(this.$viewChangeListeners, function(listener) {
- try {
- listener();
- } catch(e) {
- $exceptionHandler(e);
- }
- });
- }
- };
-
- // model -> value
- var ctrl = this;
-
- $scope.$watch(function ngModelWatch() {
- var value = ngModelGet($scope);
-
- // if scope model value and ngModel value are out of sync
- if (ctrl.$modelValue !== value) {
-
- var formatters = ctrl.$formatters,
- idx = formatters.length;
-
- ctrl.$modelValue = value;
- while(idx--) {
- value = formatters[idx](value);
- }
-
- if (ctrl.$viewValue !== value) {
- ctrl.$viewValue = value;
- ctrl.$render();
- }
- }
-
- return value;
- });
-}];
-
-
-/**
- * @ngdoc directive
- * @name ngModel
- *
- * @element input
- *
- * @description
- * The `ngModel` directive binds an `input`,`select`, `textarea` (or custom form control) to a
- * property on the scope using {@link ngModel.NgModelController NgModelController},
- * which is created and exposed by this directive.
- *
- * `ngModel` is responsible for:
- *
- * - Binding the view into the model, which other directives such as `input`, `textarea` or `select`
- * require.
- * - Providing validation behavior (i.e. required, number, email, url).
- * - Keeping the state of the control (valid/invalid, dirty/pristine, validation errors).
- * - Setting related css classes on the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`) including animations.
- * - Registering the control with its parent {@link ng.directive:form form}.
- *
- * Note: `ngModel` will try to bind to the property given by evaluating the expression on the
- * current scope. If the property doesn't already exist on this scope, it will be created
- * implicitly and added to the scope.
- *
- * For best practices on using `ngModel`, see:
- *
- * - [https://github.com/angular/angular.js/wiki/Understanding-Scopes]
- *
- * For basic examples, how to use `ngModel`, see:
- *
- * - {@link ng.directive:input input}
- * - {@link input[text] text}
- * - {@link input[checkbox] checkbox}
- * - {@link input[radio] radio}
- * - {@link input[number] number}
- * - {@link input[email] email}
- * - {@link input[url] url}
- * - {@link ng.directive:select select}
- * - {@link ng.directive:textarea textarea}
- *
- * # CSS classes
- * The following CSS classes are added and removed on the associated input/select/textarea element
- * depending on the validity of the model.
- *
- * - `ng-valid` is set if the model is valid.
- * - `ng-invalid` is set if the model is invalid.
- * - `ng-pristine` is set if the model is pristine.
- * - `ng-dirty` is set if the model is dirty.
- *
- * Keep in mind that ngAnimate can detect each of these classes when added and removed.
- *
- * ## Animation Hooks
- *
- * Animations within models are triggered when any of the associated CSS classes are added and removed
- * on the input element which is attached to the model. These classes are: `.ng-pristine`, `.ng-dirty`,
- * `.ng-invalid` and `.ng-valid` as well as any other validations that are performed on the model itself.
- * The animations that are triggered within ngModel are similar to how they work in ngClass and
- * animations can be hooked into using CSS transitions, keyframes as well as JS animations.
- *
- * The following example shows a simple way to utilize CSS transitions to style an input element
- * that has been rendered as invalid after it has been validated:
- *
- * <pre>
- * //be sure to include ngAnimate as a module to hook into more
- * //advanced animations
- * .my-input {
- * transition:0.5s linear all;
- * background: white;
- * }
- * .my-input.ng-invalid {
- * background: red;
- * color:white;
- * }
- * </pre>
- *
- * @example
- * <example deps="angular-animate.js" animations="true" fixBase="true" module="inputExample">
- <file name="index.html">
- <script>
- angular.module('inputExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.val = '1';
- }]);
- </script>
- <style>
- .my-input {
- -webkit-transition:all linear 0.5s;
- transition:all linear 0.5s;
- background: transparent;
- }
- .my-input.ng-invalid {
- color:white;
- background: red;
- }
- </style>
- Update input to see transitions when valid/invalid.
- Integer is a valid value.
- <form name="testForm" ng-controller="ExampleController">
- <input ng-model="val" ng-pattern="/^\d+$/" name="anim" class="my-input" />
- </form>
- </file>
- * </example>
- */
-var ngModelDirective = function() {
- return {
- require: ['ngModel', '^?form'],
- controller: NgModelController,
- link: function(scope, element, attr, ctrls) {
- // notify others, especially parent forms
-
- var modelCtrl = ctrls[0],
- formCtrl = ctrls[1] || nullFormCtrl;
-
- formCtrl.$addControl(modelCtrl);
-
- scope.$on('$destroy', function() {
- formCtrl.$removeControl(modelCtrl);
- });
- }
- };
-};
-
-
-/**
- * @ngdoc directive
- * @name ngChange
- *
- * @description
- * Evaluate the given expression when the user changes the input.
- * The expression is evaluated immediately, unlike the JavaScript onchange event
- * which only triggers at the end of a change (usually, when the user leaves the
- * form element or presses the return key).
- * The expression is not evaluated when the value change is coming from the model.
- *
- * Note, this directive requires `ngModel` to be present.
- *
- * @element input
- * @param {expression} ngChange {@link guide/expression Expression} to evaluate upon change
- * in input value.
- *
- * @example
- * <example name="ngChange-directive" module="changeExample">
- * <file name="index.html">
- * <script>
- * angular.module('changeExample', [])
- * .controller('ExampleController', ['$scope', function($scope) {
- * $scope.counter = 0;
- * $scope.change = function() {
- * $scope.counter++;
- * };
- * }]);
- * </script>
- * <div ng-controller="ExampleController">
- * <input type="checkbox" ng-model="confirmed" ng-change="change()" id="ng-change-example1" />
- * <input type="checkbox" ng-model="confirmed" id="ng-change-example2" />
- * <label for="ng-change-example2">Confirmed</label><br />
- * <tt>debug = {{confirmed}}</tt><br/>
- * <tt>counter = {{counter}}</tt><br/>
- * </div>
- * </file>
- * <file name="protractor.js" type="protractor">
- * var counter = element(by.binding('counter'));
- * var debug = element(by.binding('confirmed'));
- *
- * it('should evaluate the expression if changing from view', function() {
- * expect(counter.getText()).toContain('0');
- *
- * element(by.id('ng-change-example1')).click();
- *
- * expect(counter.getText()).toContain('1');
- * expect(debug.getText()).toContain('true');
- * });
- *
- * it('should not evaluate the expression if changing from model', function() {
- * element(by.id('ng-change-example2')).click();
-
- * expect(counter.getText()).toContain('0');
- * expect(debug.getText()).toContain('true');
- * });
- * </file>
- * </example>
- */
-var ngChangeDirective = valueFn({
- require: 'ngModel',
- link: function(scope, element, attr, ctrl) {
- ctrl.$viewChangeListeners.push(function() {
- scope.$eval(attr.ngChange);
- });
- }
-});
-
-
-var requiredDirective = function() {
- return {
- require: '?ngModel',
- link: function(scope, elm, attr, ctrl) {
- if (!ctrl) return;
- attr.required = true; // force truthy in case we are on non input element
-
- var validator = function(value) {
- if (attr.required && ctrl.$isEmpty(value)) {
- ctrl.$setValidity('required', false);
- return;
- } else {
- ctrl.$setValidity('required', true);
- return value;
- }
- };
-
- ctrl.$formatters.push(validator);
- ctrl.$parsers.unshift(validator);
-
- attr.$observe('required', function() {
- validator(ctrl.$viewValue);
- });
- }
- };
-};
-
-
-/**
- * @ngdoc directive
- * @name ngList
- *
- * @description
- * Text input that converts between a delimited string and an array of strings. The delimiter
- * can be a fixed string (by default a comma) or a regular expression.
- *
- * @element input
- * @param {string=} ngList optional delimiter that should be used to split the value. If
- * specified in form `/something/` then the value will be converted into a regular expression.
- *
- * @example
- <example name="ngList-directive" module="listExample">
- <file name="index.html">
- <script>
- angular.module('listExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.names = ['igor', 'misko', 'vojta'];
- }]);
- </script>
- <form name="myForm" ng-controller="ExampleController">
- List: <input name="namesInput" ng-model="names" ng-list required>
- <span class="error" ng-show="myForm.namesInput.$error.required">
- Required!</span>
- <br>
- <tt>names = {{names}}</tt><br/>
- <tt>myForm.namesInput.$valid = {{myForm.namesInput.$valid}}</tt><br/>
- <tt>myForm.namesInput.$error = {{myForm.namesInput.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var listInput = element(by.model('names'));
- var names = element(by.binding('{{names}}'));
- var valid = element(by.binding('myForm.namesInput.$valid'));
- var error = element(by.css('span.error'));
-
- it('should initialize to model', function() {
- expect(names.getText()).toContain('["igor","misko","vojta"]');
- expect(valid.getText()).toContain('true');
- expect(error.getCssValue('display')).toBe('none');
- });
-
- it('should be invalid if empty', function() {
- listInput.clear();
- listInput.sendKeys('');
-
- expect(names.getText()).toContain('');
- expect(valid.getText()).toContain('false');
- expect(error.getCssValue('display')).not.toBe('none'); });
- </file>
- </example>
- */
-var ngListDirective = function() {
- return {
- require: 'ngModel',
- link: function(scope, element, attr, ctrl) {
- var match = /\/(.*)\//.exec(attr.ngList),
- separator = match && new RegExp(match[1]) || attr.ngList || ',';
-
- var parse = function(viewValue) {
- // If the viewValue is invalid (say required but empty) it will be `undefined`
- if (isUndefined(viewValue)) return;
-
- var list = [];
-
- if (viewValue) {
- forEach(viewValue.split(separator), function(value) {
- if (value) list.push(trim(value));
- });
- }
-
- return list;
- };
-
- ctrl.$parsers.push(parse);
- ctrl.$formatters.push(function(value) {
- if (isArray(value)) {
- return value.join(', ');
- }
-
- return undefined;
- });
-
- // Override the standard $isEmpty because an empty array means the input is empty.
- ctrl.$isEmpty = function(value) {
- return !value || !value.length;
- };
- }
- };
-};
-
-
-var CONSTANT_VALUE_REGEXP = /^(true|false|\d+)$/;
-/**
- * @ngdoc directive
- * @name ngValue
- *
- * @description
- * Binds the given expression to the value of `input[select]` or `input[radio]`, so
- * that when the element is selected, the `ngModel` of that element is set to the
- * bound value.
- *
- * `ngValue` is useful when dynamically generating lists of radio buttons using `ng-repeat`, as
- * shown below.
- *
- * @element input
- * @param {string=} ngValue angular expression, whose value will be bound to the `value` attribute
- * of the `input` element
- *
- * @example
- <example name="ngValue-directive" module="valueExample">
- <file name="index.html">
- <script>
- angular.module('valueExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.names = ['pizza', 'unicorns', 'robots'];
- $scope.my = { favorite: 'unicorns' };
- }]);
- </script>
- <form ng-controller="ExampleController">
- <h2>Which is your favorite?</h2>
- <label ng-repeat="name in names" for="{{name}}">
- {{name}}
- <input type="radio"
- ng-model="my.favorite"
- ng-value="name"
- id="{{name}}"
- name="favorite">
- </label>
- <div>You chose {{my.favorite}}</div>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var favorite = element(by.binding('my.favorite'));
-
- it('should initialize to model', function() {
- expect(favorite.getText()).toContain('unicorns');
- });
- it('should bind the values to the inputs', function() {
- element.all(by.model('my.favorite')).get(0).click();
- expect(favorite.getText()).toContain('pizza');
- });
- </file>
- </example>
- */
-var ngValueDirective = function() {
- return {
- priority: 100,
- compile: function(tpl, tplAttr) {
- if (CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue)) {
- return function ngValueConstantLink(scope, elm, attr) {
- attr.$set('value', scope.$eval(attr.ngValue));
- };
- } else {
- return function ngValueLink(scope, elm, attr) {
- scope.$watch(attr.ngValue, function valueWatchAction(value) {
- attr.$set('value', value);
- });
- };
- }
- }
- };
-};
-
-/**
- * @ngdoc directive
- * @name ngBind
- * @restrict AC
- *
- * @description
- * The `ngBind` attribute tells Angular to replace the text content of the specified HTML element
- * with the value of a given expression, and to update the text content when the value of that
- * expression changes.
- *
- * Typically, you don't use `ngBind` directly, but instead you use the double curly markup like
- * `{{ expression }}` which is similar but less verbose.
- *
- * It is preferable to use `ngBind` instead of `{{ expression }}` if a template is momentarily
- * displayed by the browser in its raw state before Angular compiles it. Since `ngBind` is an
- * element attribute, it makes the bindings invisible to the user while the page is loading.
- *
- * An alternative solution to this problem would be using the
- * {@link ng.directive:ngCloak ngCloak} directive.
- *
- *
- * @element ANY
- * @param {expression} ngBind {@link guide/expression Expression} to evaluate.
- *
- * @example
- * Enter a name in the Live Preview text box; the greeting below the text box changes instantly.
- <example module="bindExample">
- <file name="index.html">
- <script>
- angular.module('bindExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.name = 'Whirled';
- }]);
- </script>
- <div ng-controller="ExampleController">
- Enter name: <input type="text" ng-model="name"><br>
- Hello <span ng-bind="name"></span>!
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-bind', function() {
- var nameInput = element(by.model('name'));
-
- expect(element(by.binding('name')).getText()).toBe('Whirled');
- nameInput.clear();
- nameInput.sendKeys('world');
- expect(element(by.binding('name')).getText()).toBe('world');
- });
- </file>
- </example>
- */
-var ngBindDirective = ngDirective({
- compile: function(templateElement) {
- templateElement.addClass('ng-binding');
- return function (scope, element, attr) {
- element.data('$binding', attr.ngBind);
- scope.$watch(attr.ngBind, function ngBindWatchAction(value) {
- // We are purposefully using == here rather than === because we want to
- // catch when value is "null or undefined"
- // jshint -W041
- element.text(value == undefined ? '' : value);
- });
- };
- }
-});
-
-
-/**
- * @ngdoc directive
- * @name ngBindTemplate
- *
- * @description
- * The `ngBindTemplate` directive specifies that the element
- * text content should be replaced with the interpolation of the template
- * in the `ngBindTemplate` attribute.
- * Unlike `ngBind`, the `ngBindTemplate` can contain multiple `{{` `}}`
- * expressions. This directive is needed since some HTML elements
- * (such as TITLE and OPTION) cannot contain SPAN elements.
- *
- * @element ANY
- * @param {string} ngBindTemplate template of form
- * <tt>{{</tt> <tt>expression</tt> <tt>}}</tt> to eval.
- *
- * @example
- * Try it here: enter text in text box and watch the greeting change.
- <example module="bindExample">
- <file name="index.html">
- <script>
- angular.module('bindExample', [])
- .controller('ExampleController', ['$scope', function ($scope) {
- $scope.salutation = 'Hello';
- $scope.name = 'World';
- }]);
- </script>
- <div ng-controller="ExampleController">
- Salutation: <input type="text" ng-model="salutation"><br>
- Name: <input type="text" ng-model="name"><br>
- <pre ng-bind-template="{{salutation}} {{name}}!"></pre>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-bind', function() {
- var salutationElem = element(by.binding('salutation'));
- var salutationInput = element(by.model('salutation'));
- var nameInput = element(by.model('name'));
-
- expect(salutationElem.getText()).toBe('Hello World!');
-
- salutationInput.clear();
- salutationInput.sendKeys('Greetings');
- nameInput.clear();
- nameInput.sendKeys('user');
-
- expect(salutationElem.getText()).toBe('Greetings user!');
- });
- </file>
- </example>
- */
-var ngBindTemplateDirective = ['$interpolate', function($interpolate) {
- return function(scope, element, attr) {
- // TODO: move this to scenario runner
- var interpolateFn = $interpolate(element.attr(attr.$attr.ngBindTemplate));
- element.addClass('ng-binding').data('$binding', interpolateFn);
- attr.$observe('ngBindTemplate', function(value) {
- element.text(value);
- });
- };
-}];
-
-
-/**
- * @ngdoc directive
- * @name ngBindHtml
- *
- * @description
- * Creates a binding that will innerHTML the result of evaluating the `expression` into the current
- * element in a secure way. By default, the innerHTML-ed content will be sanitized using the {@link
- * ngSanitize.$sanitize $sanitize} service. To utilize this functionality, ensure that `$sanitize`
- * is available, for example, by including {@link ngSanitize} in your module's dependencies (not in
- * core Angular.) You may also bypass sanitization for values you know are safe. To do so, bind to
- * an explicitly trusted value via {@link ng.$sce#trustAsHtml $sce.trustAsHtml}. See the example
- * under {@link ng.$sce#Example Strict Contextual Escaping (SCE)}.
- *
- * Note: If a `$sanitize` service is unavailable and the bound value isn't explicitly trusted, you
- * will have an exception (instead of an exploit.)
- *
- * @element ANY
- * @param {expression} ngBindHtml {@link guide/expression Expression} to evaluate.
- *
- * @example
-
- <example module="bindHtmlExample" deps="angular-sanitize.js">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <p ng-bind-html="myHTML"></p>
- </div>
- </file>
-
- <file name="script.js">
- angular.module('bindHtmlExample', ['ngSanitize'])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.myHTML =
- 'I am an <code>HTML</code>string with ' +
- '<a href="#">links!</a> and other <em>stuff</em>';
- }]);
- </file>
-
- <file name="protractor.js" type="protractor">
- it('should check ng-bind-html', function() {
- expect(element(by.binding('myHTML')).getText()).toBe(
- 'I am an HTMLstring with links! and other stuff');
- });
- </file>
- </example>
- */
-var ngBindHtmlDirective = ['$sce', '$parse', function($sce, $parse) {
- return {
- compile: function (tElement) {
- tElement.addClass('ng-binding');
-
- return function (scope, element, attr) {
- element.data('$binding', attr.ngBindHtml);
-
- var parsed = $parse(attr.ngBindHtml);
-
- function getStringValue() {
- return (parsed(scope) || '').toString();
- }
-
- scope.$watch(getStringValue, function ngBindHtmlWatchAction(value) {
- element.html($sce.getTrustedHtml(parsed(scope)) || '');
- });
- };
- }
- };
-}];
-
-function classDirective(name, selector) {
- name = 'ngClass' + name;
- return ['$animate', function($animate) {
- return {
- restrict: 'AC',
- link: function(scope, element, attr) {
- var oldVal;
-
- scope.$watch(attr[name], ngClassWatchAction, true);
-
- attr.$observe('class', function(value) {
- ngClassWatchAction(scope.$eval(attr[name]));
- });
-
-
- if (name !== 'ngClass') {
- scope.$watch('$index', function($index, old$index) {
- // jshint bitwise: false
- var mod = $index & 1;
- if (mod !== (old$index & 1)) {
- var classes = arrayClasses(scope.$eval(attr[name]));
- mod === selector ?
- addClasses(classes) :
- removeClasses(classes);
- }
- });
- }
-
- function addClasses(classes) {
- var newClasses = digestClassCounts(classes, 1);
- attr.$addClass(newClasses);
- }
-
- function removeClasses(classes) {
- var newClasses = digestClassCounts(classes, -1);
- attr.$removeClass(newClasses);
- }
-
- function digestClassCounts (classes, count) {
- var classCounts = element.data('$classCounts') || {};
- var classesToUpdate = [];
- forEach(classes, function (className) {
- if (count > 0 || classCounts[className]) {
- classCounts[className] = (classCounts[className] || 0) + count;
- if (classCounts[className] === +(count > 0)) {
- classesToUpdate.push(className);
- }
- }
- });
- element.data('$classCounts', classCounts);
- return classesToUpdate.join(' ');
- }
-
- function updateClasses (oldClasses, newClasses) {
- var toAdd = arrayDifference(newClasses, oldClasses);
- var toRemove = arrayDifference(oldClasses, newClasses);
- toRemove = digestClassCounts(toRemove, -1);
- toAdd = digestClassCounts(toAdd, 1);
-
- if (toAdd.length === 0) {
- $animate.removeClass(element, toRemove);
- } else if (toRemove.length === 0) {
- $animate.addClass(element, toAdd);
- } else {
- $animate.setClass(element, toAdd, toRemove);
- }
- }
-
- function ngClassWatchAction(newVal) {
- if (selector === true || scope.$index % 2 === selector) {
- var newClasses = arrayClasses(newVal || []);
- if (!oldVal) {
- addClasses(newClasses);
- } else if (!equals(newVal,oldVal)) {
- var oldClasses = arrayClasses(oldVal);
- updateClasses(oldClasses, newClasses);
- }
- }
- oldVal = shallowCopy(newVal);
- }
- }
- };
-
- function arrayDifference(tokens1, tokens2) {
- var values = [];
-
- outer:
- for(var i = 0; i < tokens1.length; i++) {
- var token = tokens1[i];
- for(var j = 0; j < tokens2.length; j++) {
- if(token == tokens2[j]) continue outer;
- }
- values.push(token);
- }
- return values;
- }
-
- function arrayClasses (classVal) {
- if (isArray(classVal)) {
- return classVal;
- } else if (isString(classVal)) {
- return classVal.split(' ');
- } else if (isObject(classVal)) {
- var classes = [], i = 0;
- forEach(classVal, function(v, k) {
- if (v) {
- classes = classes.concat(k.split(' '));
- }
- });
- return classes;
- }
- return classVal;
- }
- }];
-}
-
-/**
- * @ngdoc directive
- * @name ngClass
- * @restrict AC
- *
- * @description
- * The `ngClass` directive allows you to dynamically set CSS classes on an HTML element by databinding
- * an expression that represents all classes to be added.
- *
- * The directive operates in three different ways, depending on which of three types the expression
- * evaluates to:
- *
- * 1. If the expression evaluates to a string, the string should be one or more space-delimited class
- * names.
- *
- * 2. If the expression evaluates to an array, each element of the array should be a string that is
- * one or more space-delimited class names.
- *
- * 3. If the expression evaluates to an object, then for each key-value pair of the
- * object with a truthy value the corresponding key is used as a class name.
- *
- * The directive won't add duplicate classes if a particular class was already set.
- *
- * When the expression changes, the previously added classes are removed and only then the
- * new classes are added.
- *
- * @animations
- * add - happens just before the class is applied to the element
- * remove - happens just before the class is removed from the element
- *
- * @element ANY
- * @param {expression} ngClass {@link guide/expression Expression} to eval. The result
- * of the evaluation can be a string representing space delimited class
- * names, an array, or a map of class names to boolean values. In the case of a map, the
- * names of the properties whose values are truthy will be added as css classes to the
- * element.
- *
- * @example Example that demonstrates basic bindings via ngClass directive.
- <example>
- <file name="index.html">
- <p ng-class="{strike: deleted, bold: important, red: error}">Map Syntax Example</p>
- <input type="checkbox" ng-model="deleted"> deleted (apply "strike" class)<br>
- <input type="checkbox" ng-model="important"> important (apply "bold" class)<br>
- <input type="checkbox" ng-model="error"> error (apply "red" class)
- <hr>
- <p ng-class="style">Using String Syntax</p>
- <input type="text" ng-model="style" placeholder="Type: bold strike red">
- <hr>
- <p ng-class="[style1, style2, style3]">Using Array Syntax</p>
- <input ng-model="style1" placeholder="Type: bold, strike or red"><br>
- <input ng-model="style2" placeholder="Type: bold, strike or red"><br>
- <input ng-model="style3" placeholder="Type: bold, strike or red"><br>
- </file>
- <file name="style.css">
- .strike {
- text-decoration: line-through;
- }
- .bold {
- font-weight: bold;
- }
- .red {
- color: red;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var ps = element.all(by.css('p'));
-
- it('should let you toggle the class', function() {
-
- expect(ps.first().getAttribute('class')).not.toMatch(/bold/);
- expect(ps.first().getAttribute('class')).not.toMatch(/red/);
-
- element(by.model('important')).click();
- expect(ps.first().getAttribute('class')).toMatch(/bold/);
-
- element(by.model('error')).click();
- expect(ps.first().getAttribute('class')).toMatch(/red/);
- });
-
- it('should let you toggle string example', function() {
- expect(ps.get(1).getAttribute('class')).toBe('');
- element(by.model('style')).clear();
- element(by.model('style')).sendKeys('red');
- expect(ps.get(1).getAttribute('class')).toBe('red');
- });
-
- it('array example should have 3 classes', function() {
- expect(ps.last().getAttribute('class')).toBe('');
- element(by.model('style1')).sendKeys('bold');
- element(by.model('style2')).sendKeys('strike');
- element(by.model('style3')).sendKeys('red');
- expect(ps.last().getAttribute('class')).toBe('bold strike red');
- });
- </file>
- </example>
-
- ## Animations
-
- The example below demonstrates how to perform animations using ngClass.
-
- <example module="ngAnimate" deps="angular-animate.js" animations="true">
- <file name="index.html">
- <input id="setbtn" type="button" value="set" ng-click="myVar='my-class'">
- <input id="clearbtn" type="button" value="clear" ng-click="myVar=''">
- <br>
- <span class="base-class" ng-class="myVar">Sample Text</span>
- </file>
- <file name="style.css">
- .base-class {
- -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
- transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
- }
-
- .base-class.my-class {
- color: red;
- font-size:3em;
- }
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-class', function() {
- expect(element(by.css('.base-class')).getAttribute('class')).not.
- toMatch(/my-class/);
-
- element(by.id('setbtn')).click();
-
- expect(element(by.css('.base-class')).getAttribute('class')).
- toMatch(/my-class/);
-
- element(by.id('clearbtn')).click();
-
- expect(element(by.css('.base-class')).getAttribute('class')).not.
- toMatch(/my-class/);
- });
- </file>
- </example>
-
-
- ## ngClass and pre-existing CSS3 Transitions/Animations
- The ngClass directive still supports CSS3 Transitions/Animations even if they do not follow the ngAnimate CSS naming structure.
- Upon animation ngAnimate will apply supplementary CSS classes to track the start and end of an animation, but this will not hinder
- any pre-existing CSS transitions already on the element. To get an idea of what happens during a class-based animation, be sure
- to view the step by step details of {@link ngAnimate.$animate#addclass $animate.addClass} and
- {@link ngAnimate.$animate#removeclass $animate.removeClass}.
- */
-var ngClassDirective = classDirective('', true);
-
-/**
- * @ngdoc directive
- * @name ngClassOdd
- * @restrict AC
- *
- * @description
- * The `ngClassOdd` and `ngClassEven` directives work exactly as
- * {@link ng.directive:ngClass ngClass}, except they work in
- * conjunction with `ngRepeat` and take effect only on odd (even) rows.
- *
- * This directive can be applied only within the scope of an
- * {@link ng.directive:ngRepeat ngRepeat}.
- *
- * @element ANY
- * @param {expression} ngClassOdd {@link guide/expression Expression} to eval. The result
- * of the evaluation can be a string representing space delimited class names or an array.
- *
- * @example
- <example>
- <file name="index.html">
- <ol ng-init="names=['John', 'Mary', 'Cate', 'Suz']">
- <li ng-repeat="name in names">
- <span ng-class-odd="'odd'" ng-class-even="'even'">
- {{name}}
- </span>
- </li>
- </ol>
- </file>
- <file name="style.css">
- .odd {
- color: red;
- }
- .even {
- color: blue;
- }
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-class-odd and ng-class-even', function() {
- expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).
- toMatch(/odd/);
- expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).
- toMatch(/even/);
- });
- </file>
- </example>
- */
-var ngClassOddDirective = classDirective('Odd', 0);
-
-/**
- * @ngdoc directive
- * @name ngClassEven
- * @restrict AC
- *
- * @description
- * The `ngClassOdd` and `ngClassEven` directives work exactly as
- * {@link ng.directive:ngClass ngClass}, except they work in
- * conjunction with `ngRepeat` and take effect only on odd (even) rows.
- *
- * This directive can be applied only within the scope of an
- * {@link ng.directive:ngRepeat ngRepeat}.
- *
- * @element ANY
- * @param {expression} ngClassEven {@link guide/expression Expression} to eval. The
- * result of the evaluation can be a string representing space delimited class names or an array.
- *
- * @example
- <example>
- <file name="index.html">
- <ol ng-init="names=['John', 'Mary', 'Cate', 'Suz']">
- <li ng-repeat="name in names">
- <span ng-class-odd="'odd'" ng-class-even="'even'">
- {{name}} &nbsp; &nbsp; &nbsp;
- </span>
- </li>
- </ol>
- </file>
- <file name="style.css">
- .odd {
- color: red;
- }
- .even {
- color: blue;
- }
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-class-odd and ng-class-even', function() {
- expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).
- toMatch(/odd/);
- expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).
- toMatch(/even/);
- });
- </file>
- </example>
- */
-var ngClassEvenDirective = classDirective('Even', 1);
-
-/**
- * @ngdoc directive
- * @name ngCloak
- * @restrict AC
- *
- * @description
- * The `ngCloak` directive is used to prevent the Angular html template from being briefly
- * displayed by the browser in its raw (uncompiled) form while your application is loading. Use this
- * directive to avoid the undesirable flicker effect caused by the html template display.
- *
- * The directive can be applied to the `<body>` element, but the preferred usage is to apply
- * multiple `ngCloak` directives to small portions of the page to permit progressive rendering
- * of the browser view.
- *
- * `ngCloak` works in cooperation with the following css rule embedded within `angular.js` and
- * `angular.min.js`.
- * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).
- *
- * ```css
- * [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
- * display: none !important;
- * }
- * ```
- *
- * When this css rule is loaded by the browser, all html elements (including their children) that
- * are tagged with the `ngCloak` directive are hidden. When Angular encounters this directive
- * during the compilation of the template it deletes the `ngCloak` element attribute, making
- * the compiled element visible.
- *
- * For the best result, the `angular.js` script must be loaded in the head section of the html
- * document; alternatively, the css rule above must be included in the external stylesheet of the
- * application.
- *
- * Legacy browsers, like IE7, do not provide attribute selector support (added in CSS 2.1) so they
- * cannot match the `[ng\:cloak]` selector. To work around this limitation, you must add the css
- * class `ng-cloak` in addition to the `ngCloak` directive as shown in the example below.
- *
- * @element ANY
- *
- * @example
- <example>
- <file name="index.html">
- <div id="template1" ng-cloak>{{ 'hello' }}</div>
- <div id="template2" ng-cloak class="ng-cloak">{{ 'hello IE7' }}</div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should remove the template directive and css class', function() {
- expect($('#template1').getAttribute('ng-cloak')).
- toBeNull();
- expect($('#template2').getAttribute('ng-cloak')).
- toBeNull();
- });
- </file>
- </example>
- *
- */
-var ngCloakDirective = ngDirective({
- compile: function(element, attr) {
- attr.$set('ngCloak', undefined);
- element.removeClass('ng-cloak');
- }
-});
-
-/**
- * @ngdoc directive
- * @name ngController
- *
- * @description
- * The `ngController` directive attaches a controller class to the view. This is a key aspect of how angular
- * supports the principles behind the Model-View-Controller design pattern.
- *
- * MVC components in angular:
- *
- * * Model — Models are the properties of a scope; scopes are attached to the DOM where scope properties
- * are accessed through bindings.
- * * View — The template (HTML with data bindings) that is rendered into the View.
- * * Controller — The `ngController` directive specifies a Controller class; the class contains business
- * logic behind the application to decorate the scope with functions and values
- *
- * Note that you can also attach controllers to the DOM by declaring it in a route definition
- * via the {@link ngRoute.$route $route} service. A common mistake is to declare the controller
- * again using `ng-controller` in the template itself. This will cause the controller to be attached
- * and executed twice.
- *
- * @element ANY
- * @scope
- * @param {expression} ngController Name of a globally accessible constructor function or an
- * {@link guide/expression expression} that on the current scope evaluates to a
- * constructor function. The controller instance can be published into a scope property
- * by specifying `as propertyName`.
- *
- * @example
- * Here is a simple form for editing user contact information. Adding, removing, clearing, and
- * greeting are methods declared on the controller (see source tab). These methods can
- * easily be called from the angular markup. Any changes to the data are automatically reflected
- * in the View without the need for a manual update.
- *
- * Two different declaration styles are included below:
- *
- * * one binds methods and properties directly onto the controller using `this`:
- * `ng-controller="SettingsController1 as settings"`
- * * one injects `$scope` into the controller:
- * `ng-controller="SettingsController2"`
- *
- * The second option is more common in the Angular community, and is generally used in boilerplates
- * and in this guide. However, there are advantages to binding properties directly to the controller
- * and avoiding scope.
- *
- * * Using `controller as` makes it obvious which controller you are accessing in the template when
- * multiple controllers apply to an element.
- * * If you are writing your controllers as classes you have easier access to the properties and
- * methods, which will appear on the scope, from inside the controller code.
- * * Since there is always a `.` in the bindings, you don't have to worry about prototypal
- * inheritance masking primitives.
- *
- * This example demonstrates the `controller as` syntax.
- *
- * <example name="ngControllerAs" module="controllerAsExample">
- * <file name="index.html">
- * <div id="ctrl-as-exmpl" ng-controller="SettingsController1 as settings">
- * Name: <input type="text" ng-model="settings.name"/>
- * [ <a href="" ng-click="settings.greet()">greet</a> ]<br/>
- * Contact:
- * <ul>
- * <li ng-repeat="contact in settings.contacts">
- * <select ng-model="contact.type">
- * <option>phone</option>
- * <option>email</option>
- * </select>
- * <input type="text" ng-model="contact.value"/>
- * [ <a href="" ng-click="settings.clearContact(contact)">clear</a>
- * | <a href="" ng-click="settings.removeContact(contact)">X</a> ]
- * </li>
- * <li>[ <a href="" ng-click="settings.addContact()">add</a> ]</li>
- * </ul>
- * </div>
- * </file>
- * <file name="app.js">
- * angular.module('controllerAsExample', [])
- * .controller('SettingsController1', SettingsController1);
- *
- * function SettingsController1() {
- * this.name = "John Smith";
- * this.contacts = [
- * {type: 'phone', value: '408 555 1212'},
- * {type: 'email', value: 'john.smith@example.org'} ];
- * }
- *
- * SettingsController1.prototype.greet = function() {
- * alert(this.name);
- * };
- *
- * SettingsController1.prototype.addContact = function() {
- * this.contacts.push({type: 'email', value: 'yourname@example.org'});
- * };
- *
- * SettingsController1.prototype.removeContact = function(contactToRemove) {
- * var index = this.contacts.indexOf(contactToRemove);
- * this.contacts.splice(index, 1);
- * };
- *
- * SettingsController1.prototype.clearContact = function(contact) {
- * contact.type = 'phone';
- * contact.value = '';
- * };
- * </file>
- * <file name="protractor.js" type="protractor">
- * it('should check controller as', function() {
- * var container = element(by.id('ctrl-as-exmpl'));
- * expect(container.element(by.model('settings.name'))
- * .getAttribute('value')).toBe('John Smith');
- *
- * var firstRepeat =
- * container.element(by.repeater('contact in settings.contacts').row(0));
- * var secondRepeat =
- * container.element(by.repeater('contact in settings.contacts').row(1));
- *
- * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))
- * .toBe('408 555 1212');
- *
- * expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))
- * .toBe('john.smith@example.org');
- *
- * firstRepeat.element(by.linkText('clear')).click();
- *
- * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))
- * .toBe('');
- *
- * container.element(by.linkText('add')).click();
- *
- * expect(container.element(by.repeater('contact in settings.contacts').row(2))
- * .element(by.model('contact.value'))
- * .getAttribute('value'))
- * .toBe('yourname@example.org');
- * });
- * </file>
- * </example>
- *
- * This example demonstrates the "attach to `$scope`" style of controller.
- *
- * <example name="ngController" module="controllerExample">
- * <file name="index.html">
- * <div id="ctrl-exmpl" ng-controller="SettingsController2">
- * Name: <input type="text" ng-model="name"/>
- * [ <a href="" ng-click="greet()">greet</a> ]<br/>
- * Contact:
- * <ul>
- * <li ng-repeat="contact in contacts">
- * <select ng-model="contact.type">
- * <option>phone</option>
- * <option>email</option>
- * </select>
- * <input type="text" ng-model="contact.value"/>
- * [ <a href="" ng-click="clearContact(contact)">clear</a>
- * | <a href="" ng-click="removeContact(contact)">X</a> ]
- * </li>
- * <li>[ <a href="" ng-click="addContact()">add</a> ]</li>
- * </ul>
- * </div>
- * </file>
- * <file name="app.js">
- * angular.module('controllerExample', [])
- * .controller('SettingsController2', ['$scope', SettingsController2]);
- *
- * function SettingsController2($scope) {
- * $scope.name = "John Smith";
- * $scope.contacts = [
- * {type:'phone', value:'408 555 1212'},
- * {type:'email', value:'john.smith@example.org'} ];
- *
- * $scope.greet = function() {
- * alert($scope.name);
- * };
- *
- * $scope.addContact = function() {
- * $scope.contacts.push({type:'email', value:'yourname@example.org'});
- * };
- *
- * $scope.removeContact = function(contactToRemove) {
- * var index = $scope.contacts.indexOf(contactToRemove);
- * $scope.contacts.splice(index, 1);
- * };
- *
- * $scope.clearContact = function(contact) {
- * contact.type = 'phone';
- * contact.value = '';
- * };
- * }
- * </file>
- * <file name="protractor.js" type="protractor">
- * it('should check controller', function() {
- * var container = element(by.id('ctrl-exmpl'));
- *
- * expect(container.element(by.model('name'))
- * .getAttribute('value')).toBe('John Smith');
- *
- * var firstRepeat =
- * container.element(by.repeater('contact in contacts').row(0));
- * var secondRepeat =
- * container.element(by.repeater('contact in contacts').row(1));
- *
- * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))
- * .toBe('408 555 1212');
- * expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))
- * .toBe('john.smith@example.org');
- *
- * firstRepeat.element(by.linkText('clear')).click();
- *
- * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))
- * .toBe('');
- *
- * container.element(by.linkText('add')).click();
- *
- * expect(container.element(by.repeater('contact in contacts').row(2))
- * .element(by.model('contact.value'))
- * .getAttribute('value'))
- * .toBe('yourname@example.org');
- * });
- * </file>
- *</example>
-
- */
-var ngControllerDirective = [function() {
- return {
- scope: true,
- controller: '@',
- priority: 500
- };
-}];
-
-/**
- * @ngdoc directive
- * @name ngCsp
- *
- * @element html
- * @description
- * Enables [CSP (Content Security Policy)](https://developer.mozilla.org/en/Security/CSP) support.
- *
- * This is necessary when developing things like Google Chrome Extensions.
- *
- * CSP forbids apps to use `eval` or `Function(string)` generated functions (among other things).
- * For Angular to be CSP compatible there are only two things that we need to do differently:
- *
- * - don't use `Function` constructor to generate optimized value getters
- * - don't inject custom stylesheet into the document
- *
- * AngularJS uses `Function(string)` generated functions as a speed optimization. Applying the `ngCsp`
- * directive will cause Angular to use CSP compatibility mode. When this mode is on AngularJS will
- * evaluate all expressions up to 30% slower than in non-CSP mode, but no security violations will
- * be raised.
- *
- * CSP forbids JavaScript to inline stylesheet rules. In non CSP mode Angular automatically
- * includes some CSS rules (e.g. {@link ng.directive:ngCloak ngCloak}).
- * To make those directives work in CSP mode, include the `angular-csp.css` manually.
- *
- * Angular tries to autodetect if CSP is active and automatically turn on the CSP-safe mode. This
- * autodetection however triggers a CSP error to be logged in the console:
- *
- * ```
- * Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of
- * script in the following Content Security Policy directive: "default-src 'self'". Note that
- * 'script-src' was not explicitly set, so 'default-src' is used as a fallback.
- * ```
- *
- * This error is harmless but annoying. To prevent the error from showing up, put the `ngCsp`
- * directive on the root element of the application or on the `angular.js` script tag, whichever
- * appears first in the html document.
- *
- * *Note: This directive is only available in the `ng-csp` and `data-ng-csp` attribute form.*
- *
- * @example
- * This example shows how to apply the `ngCsp` directive to the `html` tag.
- ```html
- <!doctype html>
- <html ng-app ng-csp>
- ...
- ...
- </html>
- ```
- */
-
-// ngCsp is not implemented as a proper directive any more, because we need it be processed while we
-// bootstrap the system (before $parse is instantiated), for this reason we just have
-// the csp.isActive() fn that looks for ng-csp attribute anywhere in the current doc
-
-/**
- * @ngdoc directive
- * @name ngClick
- *
- * @description
- * The ngClick directive allows you to specify custom behavior when
- * an element is clicked.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngClick {@link guide/expression Expression} to evaluate upon
- * click. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-click="count = count + 1" ng-init="count=0">
- Increment
- </button>
- <span>
- count: {{count}}
- <span>
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-click', function() {
- expect(element(by.binding('count')).getText()).toMatch('0');
- element(by.css('button')).click();
- expect(element(by.binding('count')).getText()).toMatch('1');
- });
- </file>
- </example>
- */
-/*
- * A directive that allows creation of custom onclick handlers that are defined as angular
- * expressions and are compiled and executed within the current scope.
- *
- * Events that are handled via these handler are always configured not to propagate further.
- */
-var ngEventDirectives = {};
-
-// For events that might fire synchronously during DOM manipulation
-// we need to execute their event handlers asynchronously using $evalAsync,
-// so that they are not executed in an inconsistent state.
-var forceAsyncEvents = {
- 'blur': true,
- 'focus': true
-};
-forEach(
- 'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste'.split(' '),
- function(eventName) {
- var directiveName = directiveNormalize('ng-' + eventName);
- ngEventDirectives[directiveName] = ['$parse', '$rootScope', function($parse, $rootScope) {
- return {
- compile: function($element, attr) {
- var fn = $parse(attr[directiveName]);
- return function ngEventHandler(scope, element) {
- element.on(eventName, function(event) {
- var callback = function() {
- fn(scope, {$event:event});
- };
- if (forceAsyncEvents[eventName] && $rootScope.$$phase) {
- scope.$evalAsync(callback);
- } else {
- scope.$apply(callback);
- }
- });
- };
- }
- };
- }];
- }
-);
-
-/**
- * @ngdoc directive
- * @name ngDblclick
- *
- * @description
- * The `ngDblclick` directive allows you to specify custom behavior on a dblclick event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngDblclick {@link guide/expression Expression} to evaluate upon
- * a dblclick. (The Event object is available as `$event`)
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-dblclick="count = count + 1" ng-init="count=0">
- Increment (on double click)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngMousedown
- *
- * @description
- * The ngMousedown directive allows you to specify custom behavior on mousedown event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngMousedown {@link guide/expression Expression} to evaluate upon
- * mousedown. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-mousedown="count = count + 1" ng-init="count=0">
- Increment (on mouse down)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngMouseup
- *
- * @description
- * Specify custom behavior on mouseup event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngMouseup {@link guide/expression Expression} to evaluate upon
- * mouseup. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-mouseup="count = count + 1" ng-init="count=0">
- Increment (on mouse up)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-/**
- * @ngdoc directive
- * @name ngMouseover
- *
- * @description
- * Specify custom behavior on mouseover event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngMouseover {@link guide/expression Expression} to evaluate upon
- * mouseover. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-mouseover="count = count + 1" ng-init="count=0">
- Increment (when mouse is over)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngMouseenter
- *
- * @description
- * Specify custom behavior on mouseenter event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngMouseenter {@link guide/expression Expression} to evaluate upon
- * mouseenter. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-mouseenter="count = count + 1" ng-init="count=0">
- Increment (when mouse enters)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngMouseleave
- *
- * @description
- * Specify custom behavior on mouseleave event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngMouseleave {@link guide/expression Expression} to evaluate upon
- * mouseleave. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-mouseleave="count = count + 1" ng-init="count=0">
- Increment (when mouse leaves)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngMousemove
- *
- * @description
- * Specify custom behavior on mousemove event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngMousemove {@link guide/expression Expression} to evaluate upon
- * mousemove. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-mousemove="count = count + 1" ng-init="count=0">
- Increment (when mouse moves)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngKeydown
- *
- * @description
- * Specify custom behavior on keydown event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngKeydown {@link guide/expression Expression} to evaluate upon
- * keydown. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)
- *
- * @example
- <example>
- <file name="index.html">
- <input ng-keydown="count = count + 1" ng-init="count=0">
- key down count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngKeyup
- *
- * @description
- * Specify custom behavior on keyup event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngKeyup {@link guide/expression Expression} to evaluate upon
- * keyup. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)
- *
- * @example
- <example>
- <file name="index.html">
- <p>Typing in the input box below updates the key count</p>
- <input ng-keyup="count = count + 1" ng-init="count=0"> key up count: {{count}}
-
- <p>Typing in the input box below updates the keycode</p>
- <input ng-keyup="event=$event">
- <p>event keyCode: {{ event.keyCode }}</p>
- <p>event altKey: {{ event.altKey }}</p>
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngKeypress
- *
- * @description
- * Specify custom behavior on keypress event.
- *
- * @element ANY
- * @param {expression} ngKeypress {@link guide/expression Expression} to evaluate upon
- * keypress. ({@link guide/expression#-event- Event object is available as `$event`}
- * and can be interrogated for keyCode, altKey, etc.)
- *
- * @example
- <example>
- <file name="index.html">
- <input ng-keypress="count = count + 1" ng-init="count=0">
- key press count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngSubmit
- *
- * @description
- * Enables binding angular expressions to onsubmit events.
- *
- * Additionally it prevents the default action (which for form means sending the request to the
- * server and reloading the current page), but only if the form does not contain `action`,
- * `data-action`, or `x-action` attributes.
- *
- * <div class="alert alert-warning">
- * **Warning:** Be careful not to cause "double-submission" by using both the `ngClick` and
- * `ngSubmit` handlers together. See the
- * {@link form#submitting-a-form-and-preventing-the-default-action `form` directive documentation}
- * for a detailed discussion of when `ngSubmit` may be triggered.
- * </div>
- *
- * @element form
- * @priority 0
- * @param {expression} ngSubmit {@link guide/expression Expression} to eval.
- * ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example module="submitExample">
- <file name="index.html">
- <script>
- angular.module('submitExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.list = [];
- $scope.text = 'hello';
- $scope.submit = function() {
- if ($scope.text) {
- $scope.list.push(this.text);
- $scope.text = '';
- }
- };
- }]);
- </script>
- <form ng-submit="submit()" ng-controller="ExampleController">
- Enter text and hit enter:
- <input type="text" ng-model="text" name="text" />
- <input type="submit" id="submit" value="Submit" />
- <pre>list={{list}}</pre>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-submit', function() {
- expect(element(by.binding('list')).getText()).toBe('list=[]');
- element(by.css('#submit')).click();
- expect(element(by.binding('list')).getText()).toContain('hello');
- expect(element(by.model('text')).getAttribute('value')).toBe('');
- });
- it('should ignore empty strings', function() {
- expect(element(by.binding('list')).getText()).toBe('list=[]');
- element(by.css('#submit')).click();
- element(by.css('#submit')).click();
- expect(element(by.binding('list')).getText()).toContain('hello');
- });
- </file>
- </example>
- */
-
-/**
- * @ngdoc directive
- * @name ngFocus
- *
- * @description
- * Specify custom behavior on focus event.
- *
- * Note: As the `focus` event is executed synchronously when calling `input.focus()`
- * AngularJS executes the expression using `scope.$evalAsync` if the event is fired
- * during an `$apply` to ensure a consistent state.
- *
- * @element window, input, select, textarea, a
- * @priority 0
- * @param {expression} ngFocus {@link guide/expression Expression} to evaluate upon
- * focus. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- * See {@link ng.directive:ngClick ngClick}
- */
-
-/**
- * @ngdoc directive
- * @name ngBlur
- *
- * @description
- * Specify custom behavior on blur event.
- *
- * A [blur event](https://developer.mozilla.org/en-US/docs/Web/Events/blur) fires when
- * an element has lost focus.
- *
- * Note: As the `blur` event is executed synchronously also during DOM manipulations
- * (e.g. removing a focussed input),
- * AngularJS executes the expression using `scope.$evalAsync` if the event is fired
- * during an `$apply` to ensure a consistent state.
- *
- * @element window, input, select, textarea, a
- * @priority 0
- * @param {expression} ngBlur {@link guide/expression Expression} to evaluate upon
- * blur. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- * See {@link ng.directive:ngClick ngClick}
- */
-
-/**
- * @ngdoc directive
- * @name ngCopy
- *
- * @description
- * Specify custom behavior on copy event.
- *
- * @element window, input, select, textarea, a
- * @priority 0
- * @param {expression} ngCopy {@link guide/expression Expression} to evaluate upon
- * copy. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <input ng-copy="copied=true" ng-init="copied=false; value='copy me'" ng-model="value">
- copied: {{copied}}
- </file>
- </example>
- */
-
-/**
- * @ngdoc directive
- * @name ngCut
- *
- * @description
- * Specify custom behavior on cut event.
- *
- * @element window, input, select, textarea, a
- * @priority 0
- * @param {expression} ngCut {@link guide/expression Expression} to evaluate upon
- * cut. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <input ng-cut="cut=true" ng-init="cut=false; value='cut me'" ng-model="value">
- cut: {{cut}}
- </file>
- </example>
- */
-
-/**
- * @ngdoc directive
- * @name ngPaste
- *
- * @description
- * Specify custom behavior on paste event.
- *
- * @element window, input, select, textarea, a
- * @priority 0
- * @param {expression} ngPaste {@link guide/expression Expression} to evaluate upon
- * paste. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <input ng-paste="paste=true" ng-init="paste=false" placeholder='paste here'>
- pasted: {{paste}}
- </file>
- </example>
- */
-
-/**
- * @ngdoc directive
- * @name ngIf
- * @restrict A
- *
- * @description
- * The `ngIf` directive removes or recreates a portion of the DOM tree based on an
- * {expression}. If the expression assigned to `ngIf` evaluates to a false
- * value then the element is removed from the DOM, otherwise a clone of the
- * element is reinserted into the DOM.
- *
- * `ngIf` differs from `ngShow` and `ngHide` in that `ngIf` completely removes and recreates the
- * element in the DOM rather than changing its visibility via the `display` css property. A common
- * case when this difference is significant is when using css selectors that rely on an element's
- * position within the DOM, such as the `:first-child` or `:last-child` pseudo-classes.
- *
- * Note that when an element is removed using `ngIf` its scope is destroyed and a new scope
- * is created when the element is restored. The scope created within `ngIf` inherits from
- * its parent scope using
- * [prototypal inheritance](https://github.com/angular/angular.js/wiki/The-Nuances-of-Scope-Prototypal-Inheritance).
- * An important implication of this is if `ngModel` is used within `ngIf` to bind to
- * a javascript primitive defined in the parent scope. In this case any modifications made to the
- * variable within the child scope will override (hide) the value in the parent scope.
- *
- * Also, `ngIf` recreates elements using their compiled state. An example of this behavior
- * is if an element's class attribute is directly modified after it's compiled, using something like
- * jQuery's `.addClass()` method, and the element is later removed. When `ngIf` recreates the element
- * the added class will be lost because the original compiled state is used to regenerate the element.
- *
- * Additionally, you can provide animations via the `ngAnimate` module to animate the `enter`
- * and `leave` effects.
- *
- * @animations
- * enter - happens just after the ngIf contents change and a new DOM element is created and injected into the ngIf container
- * leave - happens just before the ngIf contents are removed from the DOM
- *
- * @element ANY
- * @scope
- * @priority 600
- * @param {expression} ngIf If the {@link guide/expression expression} is falsy then
- * the element is removed from the DOM tree. If it is truthy a copy of the compiled
- * element is added to the DOM tree.
- *
- * @example
- <example module="ngAnimate" deps="angular-animate.js" animations="true">
- <file name="index.html">
- Click me: <input type="checkbox" ng-model="checked" ng-init="checked=true" /><br/>
- Show when checked:
- <span ng-if="checked" class="animate-if">
- I'm removed when the checkbox is unchecked.
- </span>
- </file>
- <file name="animations.css">
- .animate-if {
- background:white;
- border:1px solid black;
- padding:10px;
- }
-
- .animate-if.ng-enter, .animate-if.ng-leave {
- -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
- transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
- }
-
- .animate-if.ng-enter,
- .animate-if.ng-leave.ng-leave-active {
- opacity:0;
- }
-
- .animate-if.ng-leave,
- .animate-if.ng-enter.ng-enter-active {
- opacity:1;
- }
- </file>
- </example>
- */
-var ngIfDirective = ['$animate', function($animate) {
- return {
- transclude: 'element',
- priority: 600,
- terminal: true,
- restrict: 'A',
- $$tlb: true,
- link: function ($scope, $element, $attr, ctrl, $transclude) {
- var block, childScope, previousElements;
- $scope.$watch($attr.ngIf, function ngIfWatchAction(value) {
-
- if (toBoolean(value)) {
- if (!childScope) {
- childScope = $scope.$new();
- $transclude(childScope, function (clone) {
- clone[clone.length++] = document.createComment(' end ngIf: ' + $attr.ngIf + ' ');
- // Note: We only need the first/last node of the cloned nodes.
- // However, we need to keep the reference to the jqlite wrapper as it might be changed later
- // by a directive with templateUrl when its template arrives.
- block = {
- clone: clone
- };
- $animate.enter(clone, $element.parent(), $element);
- });
- }
- } else {
- if(previousElements) {
- previousElements.remove();
- previousElements = null;
- }
- if(childScope) {
- childScope.$destroy();
- childScope = null;
- }
- if(block) {
- previousElements = getBlockElements(block.clone);
- $animate.leave(previousElements, function() {
- previousElements = null;
- });
- block = null;
- }
- }
- });
- }
- };
-}];
-
-/**
- * @ngdoc directive
- * @name ngInclude
- * @restrict ECA
- *
- * @description
- * Fetches, compiles and includes an external HTML fragment.
- *
- * By default, the template URL is restricted to the same domain and protocol as the
- * application document. This is done by calling {@link ng.$sce#getTrustedResourceUrl
- * $sce.getTrustedResourceUrl} on it. To load templates from other domains or protocols
- * you may either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist them} or
- * [wrap them](ng.$sce#trustAsResourceUrl) as trusted values. Refer to Angular's {@link
- * ng.$sce Strict Contextual Escaping}.
- *
- * In addition, the browser's
- * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)
- * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)
- * policy may further restrict whether the template is successfully loaded.
- * For example, `ngInclude` won't work for cross-domain requests on all browsers and for `file://`
- * access on some browsers.
- *
- * @animations
- * enter - animation is used to bring new content into the browser.
- * leave - animation is used to animate existing content away.
- *
- * The enter and leave animation occur concurrently.
- *
- * @scope
- * @priority 400
- *
- * @param {string} ngInclude|src angular expression evaluating to URL. If the source is a string constant,
- * make sure you wrap it in **single** quotes, e.g. `src="'myPartialTemplate.html'"`.
- * @param {string=} onload Expression to evaluate when a new partial is loaded.
- *
- * @param {string=} autoscroll Whether `ngInclude` should call {@link ng.$anchorScroll
- * $anchorScroll} to scroll the viewport after the content is loaded.
- *
- * - If the attribute is not set, disable scrolling.
- * - If the attribute is set without value, enable scrolling.
- * - Otherwise enable scrolling only if the expression evaluates to truthy value.
- *
- * @example
- <example module="includeExample" deps="angular-animate.js" animations="true">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <select ng-model="template" ng-options="t.name for t in templates">
- <option value="">(blank)</option>
- </select>
- url of the template: <tt>{{template.url}}</tt>
- <hr/>
- <div class="slide-animate-container">
- <div class="slide-animate" ng-include="template.url"></div>
- </div>
- </div>
- </file>
- <file name="script.js">
- angular.module('includeExample', ['ngAnimate'])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.templates =
- [ { name: 'template1.html', url: 'template1.html'},
- { name: 'template2.html', url: 'template2.html'} ];
- $scope.template = $scope.templates[0];
- }]);
- </file>
- <file name="template1.html">
- Content of template1.html
- </file>
- <file name="template2.html">
- Content of template2.html
- </file>
- <file name="animations.css">
- .slide-animate-container {
- position:relative;
- background:white;
- border:1px solid black;
- height:40px;
- overflow:hidden;
- }
-
- .slide-animate {
- padding:10px;
- }
-
- .slide-animate.ng-enter, .slide-animate.ng-leave {
- -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
- transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
-
- position:absolute;
- top:0;
- left:0;
- right:0;
- bottom:0;
- display:block;
- padding:10px;
- }
-
- .slide-animate.ng-enter {
- top:-50px;
- }
- .slide-animate.ng-enter.ng-enter-active {
- top:0;
- }
-
- .slide-animate.ng-leave {
- top:0;
- }
- .slide-animate.ng-leave.ng-leave-active {
- top:50px;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var templateSelect = element(by.model('template'));
- var includeElem = element(by.css('[ng-include]'));
-
- it('should load template1.html', function() {
- expect(includeElem.getText()).toMatch(/Content of template1.html/);
- });
-
- it('should load template2.html', function() {
- if (browser.params.browser == 'firefox') {
- // Firefox can't handle using selects
- // See https://github.com/angular/protractor/issues/480
- return;
- }
- templateSelect.click();
- templateSelect.all(by.css('option')).get(2).click();
- expect(includeElem.getText()).toMatch(/Content of template2.html/);
- });
-
- it('should change to blank', function() {
- if (browser.params.browser == 'firefox') {
- // Firefox can't handle using selects
- return;
- }
- templateSelect.click();
- templateSelect.all(by.css('option')).get(0).click();
- expect(includeElem.isPresent()).toBe(false);
- });
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc event
- * @name ngInclude#$includeContentRequested
- * @eventType emit on the scope ngInclude was declared in
- * @description
- * Emitted every time the ngInclude content is requested.
- */
-
-
-/**
- * @ngdoc event
- * @name ngInclude#$includeContentLoaded
- * @eventType emit on the current ngInclude scope
- * @description
- * Emitted every time the ngInclude content is reloaded.
- */
-var ngIncludeDirective = ['$http', '$templateCache', '$anchorScroll', '$animate', '$sce',
- function($http, $templateCache, $anchorScroll, $animate, $sce) {
- return {
- restrict: 'ECA',
- priority: 400,
- terminal: true,
- transclude: 'element',
- controller: angular.noop,
- compile: function(element, attr) {
- var srcExp = attr.ngInclude || attr.src,
- onloadExp = attr.onload || '',
- autoScrollExp = attr.autoscroll;
-
- return function(scope, $element, $attr, ctrl, $transclude) {
- var changeCounter = 0,
- currentScope,
- previousElement,
- currentElement;
-
- var cleanupLastIncludeContent = function() {
- if(previousElement) {
- previousElement.remove();
- previousElement = null;
- }
- if(currentScope) {
- currentScope.$destroy();
- currentScope = null;
- }
- if(currentElement) {
- $animate.leave(currentElement, function() {
- previousElement = null;
- });
- previousElement = currentElement;
- currentElement = null;
- }
- };
-
- scope.$watch($sce.parseAsResourceUrl(srcExp), function ngIncludeWatchAction(src) {
- var afterAnimation = function() {
- if (isDefined(autoScrollExp) && (!autoScrollExp || scope.$eval(autoScrollExp))) {
- $anchorScroll();
- }
- };
- var thisChangeId = ++changeCounter;
-
- if (src) {
- $http.get(src, {cache: $templateCache}).success(function(response) {
- if (thisChangeId !== changeCounter) return;
- var newScope = scope.$new();
- ctrl.template = response;
-
- // Note: This will also link all children of ng-include that were contained in the original
- // html. If that content contains controllers, ... they could pollute/change the scope.
- // However, using ng-include on an element with additional content does not make sense...
- // Note: We can't remove them in the cloneAttchFn of $transclude as that
- // function is called before linking the content, which would apply child
- // directives to non existing elements.
- var clone = $transclude(newScope, function(clone) {
- cleanupLastIncludeContent();
- $animate.enter(clone, null, $element, afterAnimation);
- });
-
- currentScope = newScope;
- currentElement = clone;
-
- currentScope.$emit('$includeContentLoaded');
- scope.$eval(onloadExp);
- }).error(function() {
- if (thisChangeId === changeCounter) cleanupLastIncludeContent();
- });
- scope.$emit('$includeContentRequested');
- } else {
- cleanupLastIncludeContent();
- ctrl.template = null;
- }
- });
- };
- }
- };
-}];
-
-// This directive is called during the $transclude call of the first `ngInclude` directive.
-// It will replace and compile the content of the element with the loaded template.
-// We need this directive so that the element content is already filled when
-// the link function of another directive on the same element as ngInclude
-// is called.
-var ngIncludeFillContentDirective = ['$compile',
- function($compile) {
- return {
- restrict: 'ECA',
- priority: -400,
- require: 'ngInclude',
- link: function(scope, $element, $attr, ctrl) {
- $element.html(ctrl.template);
- $compile($element.contents())(scope);
- }
- };
- }];
-
-/**
- * @ngdoc directive
- * @name ngInit
- * @restrict AC
- *
- * @description
- * The `ngInit` directive allows you to evaluate an expression in the
- * current scope.
- *
- * <div class="alert alert-error">
- * The only appropriate use of `ngInit` is for aliasing special properties of
- * {@link ng.directive:ngRepeat `ngRepeat`}, as seen in the demo below. Besides this case, you
- * should use {@link guide/controller controllers} rather than `ngInit`
- * to initialize values on a scope.
- * </div>
- * <div class="alert alert-warning">
- * **Note**: If you have assignment in `ngInit` along with {@link ng.$filter `$filter`}, make
- * sure you have parenthesis for correct precedence:
- * <pre class="prettyprint">
- * <div ng-init="test1 = (data | orderBy:'name')"></div>
- * </pre>
- * </div>
- *
- * @priority 450
- *
- * @element ANY
- * @param {expression} ngInit {@link guide/expression Expression} to eval.
- *
- * @example
- <example module="initExample">
- <file name="index.html">
- <script>
- angular.module('initExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.list = [['a', 'b'], ['c', 'd']];
- }]);
- </script>
- <div ng-controller="ExampleController">
- <div ng-repeat="innerList in list" ng-init="outerIndex = $index">
- <div ng-repeat="value in innerList" ng-init="innerIndex = $index">
- <span class="example-init">list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}};</span>
- </div>
- </div>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should alias index positions', function() {
- var elements = element.all(by.css('.example-init'));
- expect(elements.get(0).getText()).toBe('list[ 0 ][ 0 ] = a;');
- expect(elements.get(1).getText()).toBe('list[ 0 ][ 1 ] = b;');
- expect(elements.get(2).getText()).toBe('list[ 1 ][ 0 ] = c;');
- expect(elements.get(3).getText()).toBe('list[ 1 ][ 1 ] = d;');
- });
- </file>
- </example>
- */
-var ngInitDirective = ngDirective({
- priority: 450,
- compile: function() {
- return {
- pre: function(scope, element, attrs) {
- scope.$eval(attrs.ngInit);
- }
- };
- }
-});
-
-/**
- * @ngdoc directive
- * @name ngNonBindable
- * @restrict AC
- * @priority 1000
- *
- * @description
- * The `ngNonBindable` directive tells Angular not to compile or bind the contents of the current
- * DOM element. This is useful if the element contains what appears to be Angular directives and
- * bindings but which should be ignored by Angular. This could be the case if you have a site that
- * displays snippets of code, for instance.
- *
- * @element ANY
- *
- * @example
- * In this example there are two locations where a simple interpolation binding (`{{}}`) is present,
- * but the one wrapped in `ngNonBindable` is left alone.
- *
- * @example
- <example>
- <file name="index.html">
- <div>Normal: {{1 + 2}}</div>
- <div ng-non-bindable>Ignored: {{1 + 2}}</div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-non-bindable', function() {
- expect(element(by.binding('1 + 2')).getText()).toContain('3');
- expect(element.all(by.css('div')).last().getText()).toMatch(/1 \+ 2/);
- });
- </file>
- </example>
- */
-var ngNonBindableDirective = ngDirective({ terminal: true, priority: 1000 });
-
-/**
- * @ngdoc directive
- * @name ngPluralize
- * @restrict EA
- *
- * @description
- * `ngPluralize` is a directive that displays messages according to en-US localization rules.
- * These rules are bundled with angular.js, but can be overridden
- * (see {@link guide/i18n Angular i18n} dev guide). You configure ngPluralize directive
- * by specifying the mappings between
- * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html)
- * and the strings to be displayed.
- *
- * # Plural categories and explicit number rules
- * There are two
- * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html)
- * in Angular's default en-US locale: "one" and "other".
- *
- * While a plural category may match many numbers (for example, in en-US locale, "other" can match
- * any number that is not 1), an explicit number rule can only match one number. For example, the
- * explicit number rule for "3" matches the number 3. There are examples of plural categories
- * and explicit number rules throughout the rest of this documentation.
- *
- * # Configuring ngPluralize
- * You configure ngPluralize by providing 2 attributes: `count` and `when`.
- * You can also provide an optional attribute, `offset`.
- *
- * The value of the `count` attribute can be either a string or an {@link guide/expression
- * Angular expression}; these are evaluated on the current scope for its bound value.
- *
- * The `when` attribute specifies the mappings between plural categories and the actual
- * string to be displayed. The value of the attribute should be a JSON object.
- *
- * The following example shows how to configure ngPluralize:
- *
- * ```html
- * <ng-pluralize count="personCount"
- when="{'0': 'Nobody is viewing.',
- * 'one': '1 person is viewing.',
- * 'other': '{} people are viewing.'}">
- * </ng-pluralize>
- *```
- *
- * In the example, `"0: Nobody is viewing."` is an explicit number rule. If you did not
- * specify this rule, 0 would be matched to the "other" category and "0 people are viewing"
- * would be shown instead of "Nobody is viewing". You can specify an explicit number rule for
- * other numbers, for example 12, so that instead of showing "12 people are viewing", you can
- * show "a dozen people are viewing".
- *
- * You can use a set of closed braces (`{}`) as a placeholder for the number that you want substituted
- * into pluralized strings. In the previous example, Angular will replace `{}` with
- * <span ng-non-bindable>`{{personCount}}`</span>. The closed braces `{}` is a placeholder
- * for <span ng-non-bindable>{{numberExpression}}</span>.
- *
- * # Configuring ngPluralize with offset
- * The `offset` attribute allows further customization of pluralized text, which can result in
- * a better user experience. For example, instead of the message "4 people are viewing this document",
- * you might display "John, Kate and 2 others are viewing this document".
- * The offset attribute allows you to offset a number by any desired value.
- * Let's take a look at an example:
- *
- * ```html
- * <ng-pluralize count="personCount" offset=2
- * when="{'0': 'Nobody is viewing.',
- * '1': '{{person1}} is viewing.',
- * '2': '{{person1}} and {{person2}} are viewing.',
- * 'one': '{{person1}}, {{person2}} and one other person are viewing.',
- * 'other': '{{person1}}, {{person2}} and {} other people are viewing.'}">
- * </ng-pluralize>
- * ```
- *
- * Notice that we are still using two plural categories(one, other), but we added
- * three explicit number rules 0, 1 and 2.
- * When one person, perhaps John, views the document, "John is viewing" will be shown.
- * When three people view the document, no explicit number rule is found, so
- * an offset of 2 is taken off 3, and Angular uses 1 to decide the plural category.
- * In this case, plural category 'one' is matched and "John, Mary and one other person are viewing"
- * is shown.
- *
- * Note that when you specify offsets, you must provide explicit number rules for
- * numbers from 0 up to and including the offset. If you use an offset of 3, for example,
- * you must provide explicit number rules for 0, 1, 2 and 3. You must also provide plural strings for
- * plural categories "one" and "other".
- *
- * @param {string|expression} count The variable to be bound to.
- * @param {string} when The mapping between plural category to its corresponding strings.
- * @param {number=} offset Offset to deduct from the total number.
- *
- * @example
- <example module="pluralizeExample">
- <file name="index.html">
- <script>
- angular.module('pluralizeExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.person1 = 'Igor';
- $scope.person2 = 'Misko';
- $scope.personCount = 1;
- }]);
- </script>
- <div ng-controller="ExampleController">
- Person 1:<input type="text" ng-model="person1" value="Igor" /><br/>
- Person 2:<input type="text" ng-model="person2" value="Misko" /><br/>
- Number of People:<input type="text" ng-model="personCount" value="1" /><br/>
-
- <!--- Example with simple pluralization rules for en locale --->
- Without Offset:
- <ng-pluralize count="personCount"
- when="{'0': 'Nobody is viewing.',
- 'one': '1 person is viewing.',
- 'other': '{} people are viewing.'}">
- </ng-pluralize><br>
-
- <!--- Example with offset --->
- With Offset(2):
- <ng-pluralize count="personCount" offset=2
- when="{'0': 'Nobody is viewing.',
- '1': '{{person1}} is viewing.',
- '2': '{{person1}} and {{person2}} are viewing.',
- 'one': '{{person1}}, {{person2}} and one other person are viewing.',
- 'other': '{{person1}}, {{person2}} and {} other people are viewing.'}">
- </ng-pluralize>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should show correct pluralized string', function() {
- var withoutOffset = element.all(by.css('ng-pluralize')).get(0);
- var withOffset = element.all(by.css('ng-pluralize')).get(1);
- var countInput = element(by.model('personCount'));
-
- expect(withoutOffset.getText()).toEqual('1 person is viewing.');
- expect(withOffset.getText()).toEqual('Igor is viewing.');
-
- countInput.clear();
- countInput.sendKeys('0');
-
- expect(withoutOffset.getText()).toEqual('Nobody is viewing.');
- expect(withOffset.getText()).toEqual('Nobody is viewing.');
-
- countInput.clear();
- countInput.sendKeys('2');
-
- expect(withoutOffset.getText()).toEqual('2 people are viewing.');
- expect(withOffset.getText()).toEqual('Igor and Misko are viewing.');
-
- countInput.clear();
- countInput.sendKeys('3');
-
- expect(withoutOffset.getText()).toEqual('3 people are viewing.');
- expect(withOffset.getText()).toEqual('Igor, Misko and one other person are viewing.');
-
- countInput.clear();
- countInput.sendKeys('4');
-
- expect(withoutOffset.getText()).toEqual('4 people are viewing.');
- expect(withOffset.getText()).toEqual('Igor, Misko and 2 other people are viewing.');
- });
- it('should show data-bound names', function() {
- var withOffset = element.all(by.css('ng-pluralize')).get(1);
- var personCount = element(by.model('personCount'));
- var person1 = element(by.model('person1'));
- var person2 = element(by.model('person2'));
- personCount.clear();
- personCount.sendKeys('4');
- person1.clear();
- person1.sendKeys('Di');
- person2.clear();
- person2.sendKeys('Vojta');
- expect(withOffset.getText()).toEqual('Di, Vojta and 2 other people are viewing.');
- });
- </file>
- </example>
- */
-var ngPluralizeDirective = ['$locale', '$interpolate', function($locale, $interpolate) {
- var BRACE = /{}/g;
- return {
- restrict: 'EA',
- link: function(scope, element, attr) {
- var numberExp = attr.count,
- whenExp = attr.$attr.when && element.attr(attr.$attr.when), // we have {{}} in attrs
- offset = attr.offset || 0,
- whens = scope.$eval(whenExp) || {},
- whensExpFns = {},
- startSymbol = $interpolate.startSymbol(),
- endSymbol = $interpolate.endSymbol(),
- isWhen = /^when(Minus)?(.+)$/;
-
- forEach(attr, function(expression, attributeName) {
- if (isWhen.test(attributeName)) {
- whens[lowercase(attributeName.replace('when', '').replace('Minus', '-'))] =
- element.attr(attr.$attr[attributeName]);
- }
- });
- forEach(whens, function(expression, key) {
- whensExpFns[key] =
- $interpolate(expression.replace(BRACE, startSymbol + numberExp + '-' +
- offset + endSymbol));
- });
-
- scope.$watch(function ngPluralizeWatch() {
- var value = parseFloat(scope.$eval(numberExp));
-
- if (!isNaN(value)) {
- //if explicit number rule such as 1, 2, 3... is defined, just use it. Otherwise,
- //check it against pluralization rules in $locale service
- if (!(value in whens)) value = $locale.pluralCat(value - offset);
- return whensExpFns[value](scope, element, true);
- } else {
- return '';
- }
- }, function ngPluralizeWatchAction(newVal) {
- element.text(newVal);
- });
- }
- };
-}];
-
-/**
- * @ngdoc directive
- * @name ngRepeat
- *
- * @description
- * The `ngRepeat` directive instantiates a template once per item from a collection. Each template
- * instance gets its own scope, where the given loop variable is set to the current collection item,
- * and `$index` is set to the item index or key.
- *
- * Special properties are exposed on the local scope of each template instance, including:
- *
- * | Variable | Type | Details |
- * |-----------|-----------------|-----------------------------------------------------------------------------|
- * | `$index` | {@type number} | iterator offset of the repeated element (0..length-1) |
- * | `$first` | {@type boolean} | true if the repeated element is first in the iterator. |
- * | `$middle` | {@type boolean} | true if the repeated element is between the first and last in the iterator. |
- * | `$last` | {@type boolean} | true if the repeated element is last in the iterator. |
- * | `$even` | {@type boolean} | true if the iterator position `$index` is even (otherwise false). |
- * | `$odd` | {@type boolean} | true if the iterator position `$index` is odd (otherwise false). |
- *
- * Creating aliases for these properties is possible with {@link ng.directive:ngInit `ngInit`}.
- * This may be useful when, for instance, nesting ngRepeats.
- *
- * # Special repeat start and end points
- * To repeat a series of elements instead of just one parent element, ngRepeat (as well as other ng directives) supports extending
- * the range of the repeater by defining explicit start and end points by using **ng-repeat-start** and **ng-repeat-end** respectively.
- * The **ng-repeat-start** directive works the same as **ng-repeat**, but will repeat all the HTML code (including the tag it's defined on)
- * up to and including the ending HTML tag where **ng-repeat-end** is placed.
- *
- * The example below makes use of this feature:
- * ```html
- * <header ng-repeat-start="item in items">
- * Header {{ item }}
- * </header>
- * <div class="body">
- * Body {{ item }}
- * </div>
- * <footer ng-repeat-end>
- * Footer {{ item }}
- * </footer>
- * ```
- *
- * And with an input of {@type ['A','B']} for the items variable in the example above, the output will evaluate to:
- * ```html
- * <header>
- * Header A
- * </header>
- * <div class="body">
- * Body A
- * </div>
- * <footer>
- * Footer A
- * </footer>
- * <header>
- * Header B
- * </header>
- * <div class="body">
- * Body B
- * </div>
- * <footer>
- * Footer B
- * </footer>
- * ```
- *
- * The custom start and end points for ngRepeat also support all other HTML directive syntax flavors provided in AngularJS (such
- * as **data-ng-repeat-start**, **x-ng-repeat-start** and **ng:repeat-start**).
- *
- * @animations
- * **.enter** - when a new item is added to the list or when an item is revealed after a filter
- *
- * **.leave** - when an item is removed from the list or when an item is filtered out
- *
- * **.move** - when an adjacent item is filtered out causing a reorder or when the item contents are reordered
- *
- * @element ANY
- * @scope
- * @priority 1000
- * @param {repeat_expression} ngRepeat The expression indicating how to enumerate a collection. These
- * formats are currently supported:
- *
- * * `variable in expression` – where variable is the user defined loop variable and `expression`
- * is a scope expression giving the collection to enumerate.
- *
- * For example: `album in artist.albums`.
- *
- * * `(key, value) in expression` – where `key` and `value` can be any user defined identifiers,
- * and `expression` is the scope expression giving the collection to enumerate.
- *
- * For example: `(name, age) in {'adam':10, 'amalie':12}`.
- *
- * * `variable in expression track by tracking_expression` – You can also provide an optional tracking function
- * which can be used to associate the objects in the collection with the DOM elements. If no tracking function
- * is specified the ng-repeat associates elements by identity in the collection. It is an error to have
- * more than one tracking function to resolve to the same key. (This would mean that two distinct objects are
- * mapped to the same DOM element, which is not possible.) Filters should be applied to the expression,
- * before specifying a tracking expression.
- *
- * For example: `item in items` is equivalent to `item in items track by $id(item)`. This implies that the DOM elements
- * will be associated by item identity in the array.
- *
- * For example: `item in items track by $id(item)`. A built in `$id()` function can be used to assign a unique
- * `$$hashKey` property to each item in the array. This property is then used as a key to associated DOM elements
- * with the corresponding item in the array by identity. Moving the same object in array would move the DOM
- * element in the same way in the DOM.
- *
- * For example: `item in items track by item.id` is a typical pattern when the items come from the database. In this
- * case the object identity does not matter. Two objects are considered equivalent as long as their `id`
- * property is same.
- *
- * For example: `item in items | filter:searchText track by item.id` is a pattern that might be used to apply a filter
- * to items in conjunction with a tracking expression.
- *
- * @example
- * This example initializes the scope to a list of names and
- * then uses `ngRepeat` to display every person:
- <example module="ngAnimate" deps="angular-animate.js" animations="true">
- <file name="index.html">
- <div ng-init="friends = [
- {name:'John', age:25, gender:'boy'},
- {name:'Jessie', age:30, gender:'girl'},
- {name:'Johanna', age:28, gender:'girl'},
- {name:'Joy', age:15, gender:'girl'},
- {name:'Mary', age:28, gender:'girl'},
- {name:'Peter', age:95, gender:'boy'},
- {name:'Sebastian', age:50, gender:'boy'},
- {name:'Erika', age:27, gender:'girl'},
- {name:'Patrick', age:40, gender:'boy'},
- {name:'Samantha', age:60, gender:'girl'}
- ]">
- I have {{friends.length}} friends. They are:
- <input type="search" ng-model="q" placeholder="filter friends..." />
- <ul class="example-animate-container">
- <li class="animate-repeat" ng-repeat="friend in friends | filter:q">
- [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old.
- </li>
- </ul>
- </div>
- </file>
- <file name="animations.css">
- .example-animate-container {
- background:white;
- border:1px solid black;
- list-style:none;
- margin:0;
- padding:0 10px;
- }
-
- .animate-repeat {
- line-height:40px;
- list-style:none;
- box-sizing:border-box;
- }
-
- .animate-repeat.ng-move,
- .animate-repeat.ng-enter,
- .animate-repeat.ng-leave {
- -webkit-transition:all linear 0.5s;
- transition:all linear 0.5s;
- }
-
- .animate-repeat.ng-leave.ng-leave-active,
- .animate-repeat.ng-move,
- .animate-repeat.ng-enter {
- opacity:0;
- max-height:0;
- }
-
- .animate-repeat.ng-leave,
- .animate-repeat.ng-move.ng-move-active,
- .animate-repeat.ng-enter.ng-enter-active {
- opacity:1;
- max-height:40px;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var friends = element.all(by.repeater('friend in friends'));
-
- it('should render initial data set', function() {
- expect(friends.count()).toBe(10);
- expect(friends.get(0).getText()).toEqual('[1] John who is 25 years old.');
- expect(friends.get(1).getText()).toEqual('[2] Jessie who is 30 years old.');
- expect(friends.last().getText()).toEqual('[10] Samantha who is 60 years old.');
- expect(element(by.binding('friends.length')).getText())
- .toMatch("I have 10 friends. They are:");
- });
-
- it('should update repeater when filter predicate changes', function() {
- expect(friends.count()).toBe(10);
-
- element(by.model('q')).sendKeys('ma');
-
- expect(friends.count()).toBe(2);
- expect(friends.get(0).getText()).toEqual('[1] Mary who is 28 years old.');
- expect(friends.last().getText()).toEqual('[2] Samantha who is 60 years old.');
- });
- </file>
- </example>
- */
-var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
- var NG_REMOVED = '$$NG_REMOVED';
- var ngRepeatMinErr = minErr('ngRepeat');
- return {
- transclude: 'element',
- priority: 1000,
- terminal: true,
- $$tlb: true,
- link: function($scope, $element, $attr, ctrl, $transclude){
- var expression = $attr.ngRepeat;
- var match = expression.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/),
- trackByExp, trackByExpGetter, trackByIdExpFn, trackByIdArrayFn, trackByIdObjFn,
- lhs, rhs, valueIdentifier, keyIdentifier,
- hashFnLocals = {$id: hashKey};
-
- if (!match) {
- throw ngRepeatMinErr('iexp', "Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",
- expression);
- }
-
- lhs = match[1];
- rhs = match[2];
- trackByExp = match[3];
-
- if (trackByExp) {
- trackByExpGetter = $parse(trackByExp);
- trackByIdExpFn = function(key, value, index) {
- // assign key, value, and $index to the locals so that they can be used in hash functions
- if (keyIdentifier) hashFnLocals[keyIdentifier] = key;
- hashFnLocals[valueIdentifier] = value;
- hashFnLocals.$index = index;
- return trackByExpGetter($scope, hashFnLocals);
- };
- } else {
- trackByIdArrayFn = function(key, value) {
- return hashKey(value);
- };
- trackByIdObjFn = function(key) {
- return key;
- };
- }
-
- match = lhs.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);
- if (!match) {
- throw ngRepeatMinErr('iidexp', "'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",
- lhs);
- }
- valueIdentifier = match[3] || match[1];
- keyIdentifier = match[2];
-
- // Store a list of elements from previous run. This is a hash where key is the item from the
- // iterator, and the value is objects with following properties.
- // - scope: bound scope
- // - element: previous element.
- // - index: position
- var lastBlockMap = {};
-
- //watch props
- $scope.$watchCollection(rhs, function ngRepeatAction(collection){
- var index, length,
- previousNode = $element[0], // current position of the node
- nextNode,
- // Same as lastBlockMap but it has the current state. It will become the
- // lastBlockMap on the next iteration.
- nextBlockMap = {},
- arrayLength,
- childScope,
- key, value, // key/value of iteration
- trackById,
- trackByIdFn,
- collectionKeys,
- block, // last object information {scope, element, id}
- nextBlockOrder = [],
- elementsToRemove;
-
-
- if (isArrayLike(collection)) {
- collectionKeys = collection;
- trackByIdFn = trackByIdExpFn || trackByIdArrayFn;
- } else {
- trackByIdFn = trackByIdExpFn || trackByIdObjFn;
- // if object, extract keys, sort them and use to determine order of iteration over obj props
- collectionKeys = [];
- for (key in collection) {
- if (collection.hasOwnProperty(key) && key.charAt(0) != '$') {
- collectionKeys.push(key);
- }
- }
- collectionKeys.sort();
- }
-
- arrayLength = collectionKeys.length;
-
- // locate existing items
- length = nextBlockOrder.length = collectionKeys.length;
- for(index = 0; index < length; index++) {
- key = (collection === collectionKeys) ? index : collectionKeys[index];
- value = collection[key];
- trackById = trackByIdFn(key, value, index);
- assertNotHasOwnProperty(trackById, '`track by` id');
- if(lastBlockMap.hasOwnProperty(trackById)) {
- block = lastBlockMap[trackById];
- delete lastBlockMap[trackById];
- nextBlockMap[trackById] = block;
- nextBlockOrder[index] = block;
- } else if (nextBlockMap.hasOwnProperty(trackById)) {
- // restore lastBlockMap
- forEach(nextBlockOrder, function(block) {
- if (block && block.scope) lastBlockMap[block.id] = block;
- });
- // This is a duplicate and we need to throw an error
- throw ngRepeatMinErr('dupes',
- "Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",
- expression, trackById, toJson(value));
- } else {
- // new never before seen block
- nextBlockOrder[index] = { id: trackById };
- nextBlockMap[trackById] = false;
- }
- }
-
- // remove existing items
- for (key in lastBlockMap) {
- // lastBlockMap is our own object so we don't need to use special hasOwnPropertyFn
- if (lastBlockMap.hasOwnProperty(key)) {
- block = lastBlockMap[key];
- elementsToRemove = getBlockElements(block.clone);
- $animate.leave(elementsToRemove);
- forEach(elementsToRemove, function(element) { element[NG_REMOVED] = true; });
- block.scope.$destroy();
- }
- }
-
- // we are not using forEach for perf reasons (trying to avoid #call)
- for (index = 0, length = collectionKeys.length; index < length; index++) {
- key = (collection === collectionKeys) ? index : collectionKeys[index];
- value = collection[key];
- block = nextBlockOrder[index];
- if (nextBlockOrder[index - 1]) previousNode = getBlockEnd(nextBlockOrder[index - 1]);
-
- if (block.scope) {
- // if we have already seen this object, then we need to reuse the
- // associated scope/element
- childScope = block.scope;
-
- nextNode = previousNode;
- do {
- nextNode = nextNode.nextSibling;
- } while(nextNode && nextNode[NG_REMOVED]);
-
- if (getBlockStart(block) != nextNode) {
- // existing item which got moved
- $animate.move(getBlockElements(block.clone), null, jqLite(previousNode));
- }
- previousNode = getBlockEnd(block);
- } else {
- // new item which we don't know about
- childScope = $scope.$new();
- }
-
- childScope[valueIdentifier] = value;
- if (keyIdentifier) childScope[keyIdentifier] = key;
- childScope.$index = index;
- childScope.$first = (index === 0);
- childScope.$last = (index === (arrayLength - 1));
- childScope.$middle = !(childScope.$first || childScope.$last);
- // jshint bitwise: false
- childScope.$odd = !(childScope.$even = (index&1) === 0);
- // jshint bitwise: true
-
- if (!block.scope) {
- $transclude(childScope, function(clone) {
- clone[clone.length++] = document.createComment(' end ngRepeat: ' + expression + ' ');
- $animate.enter(clone, null, jqLite(previousNode));
- previousNode = clone;
- block.scope = childScope;
- // Note: We only need the first/last node of the cloned nodes.
- // However, we need to keep the reference to the jqlite wrapper as it might be changed later
- // by a directive with templateUrl when its template arrives.
- block.clone = clone;
- nextBlockMap[block.id] = block;
- });
- }
- }
- lastBlockMap = nextBlockMap;
- });
- }
- };
-
- function getBlockStart(block) {
- return block.clone[0];
- }
-
- function getBlockEnd(block) {
- return block.clone[block.clone.length - 1];
- }
-}];
-
-/**
- * @ngdoc directive
- * @name ngShow
- *
- * @description
- * The `ngShow` directive shows or hides the given HTML element based on the expression
- * provided to the `ngShow` attribute. The element is shown or hidden by removing or adding
- * the `.ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined
- * in AngularJS and sets the display style to none (using an !important flag).
- * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).
- *
- * ```html
- * <!-- when $scope.myValue is truthy (element is visible) -->
- * <div ng-show="myValue"></div>
- *
- * <!-- when $scope.myValue is falsy (element is hidden) -->
- * <div ng-show="myValue" class="ng-hide"></div>
- * ```
- *
- * When the `ngShow` expression evaluates to false then the `.ng-hide` CSS class is added to the class attribute
- * on the element causing it to become hidden. When true, the `.ng-hide` CSS class is removed
- * from the element causing the element not to appear hidden.
- *
- * <div class="alert alert-warning">
- * **Note:** Here is a list of values that ngShow will consider as a falsy value (case insensitive):<br />
- * "f" / "0" / "false" / "no" / "n" / "[]"
- * </div>
- *
- * ## Why is !important used?
- *
- * You may be wondering why !important is used for the `.ng-hide` CSS class. This is because the `.ng-hide` selector
- * can be easily overridden by heavier selectors. For example, something as simple
- * as changing the display style on a HTML list item would make hidden elements appear visible.
- * This also becomes a bigger issue when dealing with CSS frameworks.
- *
- * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector
- * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the
- * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.
- *
- * ### Overriding `.ng-hide`
- *
- * By default, the `.ng-hide` class will style the element with `display:none!important`. If you wish to change
- * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`
- * class in CSS:
- *
- * ```css
- * .ng-hide {
- * //this is just another form of hiding an element
- * display:block!important;
- * position:absolute;
- * top:-9999px;
- * left:-9999px;
- * }
- * ```
- *
- * By default you don't need to override in CSS anything and the animations will work around the display style.
- *
- * ## A note about animations with `ngShow`
- *
- * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression
- * is true and false. This system works like the animation system present with ngClass except that
- * you must also include the !important flag to override the display property
- * so that you can perform an animation when the element is hidden during the time of the animation.
- *
- * ```css
- * //
- * //a working example can be found at the bottom of this page
- * //
- * .my-element.ng-hide-add, .my-element.ng-hide-remove {
- * transition:0.5s linear all;
- * }
- *
- * .my-element.ng-hide-add { ... }
- * .my-element.ng-hide-add.ng-hide-add-active { ... }
- * .my-element.ng-hide-remove { ... }
- * .my-element.ng-hide-remove.ng-hide-remove-active { ... }
- * ```
- *
- * Keep in mind that, as of AngularJS version 1.2.17 (and 1.3.0-beta.11), there is no need to change the display
- * property to block during animation states--ngAnimate will handle the style toggling automatically for you.
- *
- * @animations
- * addClass: `.ng-hide` - happens after the `ngShow` expression evaluates to a truthy value and the just before contents are set to visible
- * removeClass: `.ng-hide` - happens after the `ngShow` expression evaluates to a non truthy value and just before the contents are set to hidden
- *
- * @element ANY
- * @param {expression} ngShow If the {@link guide/expression expression} is truthy
- * then the element is shown or hidden respectively.
- *
- * @example
- <example module="ngAnimate" deps="angular-animate.js" animations="true">
- <file name="index.html">
- Click me: <input type="checkbox" ng-model="checked"><br/>
- <div>
- Show:
- <div class="check-element animate-show" ng-show="checked">
- <span class="glyphicon glyphicon-thumbs-up"></span> I show up when your checkbox is checked.
- </div>
- </div>
- <div>
- Hide:
- <div class="check-element animate-show" ng-hide="checked">
- <span class="glyphicon glyphicon-thumbs-down"></span> I hide when your checkbox is checked.
- </div>
- </div>
- </file>
- <file name="glyphicons.css">
- @import url(//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css);
- </file>
- <file name="animations.css">
- .animate-show {
- -webkit-transition:all linear 0.5s;
- transition:all linear 0.5s;
- line-height:20px;
- opacity:1;
- padding:10px;
- border:1px solid black;
- background:white;
- }
-
- .animate-show.ng-hide {
- line-height:0;
- opacity:0;
- padding:0 10px;
- }
-
- .check-element {
- padding:10px;
- border:1px solid black;
- background:white;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var thumbsUp = element(by.css('span.glyphicon-thumbs-up'));
- var thumbsDown = element(by.css('span.glyphicon-thumbs-down'));
-
- it('should check ng-show / ng-hide', function() {
- expect(thumbsUp.isDisplayed()).toBeFalsy();
- expect(thumbsDown.isDisplayed()).toBeTruthy();
-
- element(by.model('checked')).click();
-
- expect(thumbsUp.isDisplayed()).toBeTruthy();
- expect(thumbsDown.isDisplayed()).toBeFalsy();
- });
- </file>
- </example>
- */
-var ngShowDirective = ['$animate', function($animate) {
- return function(scope, element, attr) {
- scope.$watch(attr.ngShow, function ngShowWatchAction(value){
- $animate[toBoolean(value) ? 'removeClass' : 'addClass'](element, 'ng-hide');
- });
- };
-}];
-
-
-/**
- * @ngdoc directive
- * @name ngHide
- *
- * @description
- * The `ngHide` directive shows or hides the given HTML element based on the expression
- * provided to the `ngHide` attribute. The element is shown or hidden by removing or adding
- * the `ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined
- * in AngularJS and sets the display style to none (using an !important flag).
- * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).
- *
- * ```html
- * <!-- when $scope.myValue is truthy (element is hidden) -->
- * <div ng-hide="myValue" class="ng-hide"></div>
- *
- * <!-- when $scope.myValue is falsy (element is visible) -->
- * <div ng-hide="myValue"></div>
- * ```
- *
- * When the `.ngHide` expression evaluates to true then the `.ng-hide` CSS class is added to the class attribute
- * on the element causing it to become hidden. When false, the `.ng-hide` CSS class is removed
- * from the element causing the element not to appear hidden.
- *
- * <div class="alert alert-warning">
- * **Note:** Here is a list of values that ngHide will consider as a falsy value (case insensitive):<br />
- * "f" / "0" / "false" / "no" / "n" / "[]"
- * </div>
- *
- * ## Why is !important used?
- *
- * You may be wondering why !important is used for the `.ng-hide` CSS class. This is because the `.ng-hide` selector
- * can be easily overridden by heavier selectors. For example, something as simple
- * as changing the display style on a HTML list item would make hidden elements appear visible.
- * This also becomes a bigger issue when dealing with CSS frameworks.
- *
- * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector
- * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the
- * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.
- *
- * ### Overriding `.ng-hide`
- *
- * By default, the `.ng-hide` class will style the element with `display:none!important`. If you wish to change
- * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`
- * class in CSS:
- *
- * ```css
- * .ng-hide {
- * //this is just another form of hiding an element
- * display:block!important;
- * position:absolute;
- * top:-9999px;
- * left:-9999px;
- * }
- * ```
- *
- * By default you don't need to override in CSS anything and the animations will work around the display style.
- *
- * ## A note about animations with `ngHide`
- *
- * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression
- * is true and false. This system works like the animation system present with ngClass, except that the `.ng-hide`
- * CSS class is added and removed for you instead of your own CSS class.
- *
- * ```css
- * //
- * //a working example can be found at the bottom of this page
- * //
- * .my-element.ng-hide-add, .my-element.ng-hide-remove {
- * transition:0.5s linear all;
- * }
- *
- * .my-element.ng-hide-add { ... }
- * .my-element.ng-hide-add.ng-hide-add-active { ... }
- * .my-element.ng-hide-remove { ... }
- * .my-element.ng-hide-remove.ng-hide-remove-active { ... }
- * ```
- *
- * Keep in mind that, as of AngularJS version 1.2.17 (and 1.3.0-beta.11), there is no need to change the display
- * property to block during animation states--ngAnimate will handle the style toggling automatically for you.
- *
- * @animations
- * removeClass: `.ng-hide` - happens after the `ngHide` expression evaluates to a truthy value and just before the contents are set to hidden
- * addClass: `.ng-hide` - happens after the `ngHide` expression evaluates to a non truthy value and just before the contents are set to visible
- *
- * @element ANY
- * @param {expression} ngHide If the {@link guide/expression expression} is truthy then
- * the element is shown or hidden respectively.
- *
- * @example
- <example module="ngAnimate" deps="angular-animate.js" animations="true">
- <file name="index.html">
- Click me: <input type="checkbox" ng-model="checked"><br/>
- <div>
- Show:
- <div class="check-element animate-hide" ng-show="checked">
- <span class="glyphicon glyphicon-thumbs-up"></span> I show up when your checkbox is checked.
- </div>
- </div>
- <div>
- Hide:
- <div class="check-element animate-hide" ng-hide="checked">
- <span class="glyphicon glyphicon-thumbs-down"></span> I hide when your checkbox is checked.
- </div>
- </div>
- </file>
- <file name="glyphicons.css">
- @import url(//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css);
- </file>
- <file name="animations.css">
- .animate-hide {
- -webkit-transition:all linear 0.5s;
- transition:all linear 0.5s;
- line-height:20px;
- opacity:1;
- padding:10px;
- border:1px solid black;
- background:white;
- }
-
- .animate-hide.ng-hide {
- line-height:0;
- opacity:0;
- padding:0 10px;
- }
-
- .check-element {
- padding:10px;
- border:1px solid black;
- background:white;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var thumbsUp = element(by.css('span.glyphicon-thumbs-up'));
- var thumbsDown = element(by.css('span.glyphicon-thumbs-down'));
-
- it('should check ng-show / ng-hide', function() {
- expect(thumbsUp.isDisplayed()).toBeFalsy();
- expect(thumbsDown.isDisplayed()).toBeTruthy();
-
- element(by.model('checked')).click();
-
- expect(thumbsUp.isDisplayed()).toBeTruthy();
- expect(thumbsDown.isDisplayed()).toBeFalsy();
- });
- </file>
- </example>
- */
-var ngHideDirective = ['$animate', function($animate) {
- return function(scope, element, attr) {
- scope.$watch(attr.ngHide, function ngHideWatchAction(value){
- $animate[toBoolean(value) ? 'addClass' : 'removeClass'](element, 'ng-hide');
- });
- };
-}];
-
-/**
- * @ngdoc directive
- * @name ngStyle
- * @restrict AC
- *
- * @description
- * The `ngStyle` directive allows you to set CSS style on an HTML element conditionally.
- *
- * @element ANY
- * @param {expression} ngStyle
- *
- * {@link guide/expression Expression} which evals to an
- * object whose keys are CSS style names and values are corresponding values for those CSS
- * keys.
- *
- * Since some CSS style names are not valid keys for an object, they must be quoted.
- * See the 'background-color' style in the example below.
- *
- * @example
- <example>
- <file name="index.html">
- <input type="button" value="set color" ng-click="myStyle={color:'red'}">
- <input type="button" value="set background" ng-click="myStyle={'background-color':'blue'}">
- <input type="button" value="clear" ng-click="myStyle={}">
- <br/>
- <span ng-style="myStyle">Sample Text</span>
- <pre>myStyle={{myStyle}}</pre>
- </file>
- <file name="style.css">
- span {
- color: black;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var colorSpan = element(by.css('span'));
-
- it('should check ng-style', function() {
- expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');
- element(by.css('input[value=\'set color\']')).click();
- expect(colorSpan.getCssValue('color')).toBe('rgba(255, 0, 0, 1)');
- element(by.css('input[value=clear]')).click();
- expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');
- });
- </file>
- </example>
- */
-var ngStyleDirective = ngDirective(function(scope, element, attr) {
- scope.$watch(attr.ngStyle, function ngStyleWatchAction(newStyles, oldStyles) {
- if (oldStyles && (newStyles !== oldStyles)) {
- forEach(oldStyles, function(val, style) { element.css(style, '');});
- }
- if (newStyles) element.css(newStyles);
- }, true);
-});
-
-/**
- * @ngdoc directive
- * @name ngSwitch
- * @restrict EA
- *
- * @description
- * The `ngSwitch` directive is used to conditionally swap DOM structure on your template based on a scope expression.
- * Elements within `ngSwitch` but without `ngSwitchWhen` or `ngSwitchDefault` directives will be preserved at the location
- * as specified in the template.
- *
- * The directive itself works similar to ngInclude, however, instead of downloading template code (or loading it
- * from the template cache), `ngSwitch` simply chooses one of the nested elements and makes it visible based on which element
- * matches the value obtained from the evaluated expression. In other words, you define a container element
- * (where you place the directive), place an expression on the **`on="..."` attribute**
- * (or the **`ng-switch="..."` attribute**), define any inner elements inside of the directive and place
- * a when attribute per element. The when attribute is used to inform ngSwitch which element to display when the on
- * expression is evaluated. If a matching expression is not found via a when attribute then an element with the default
- * attribute is displayed.
- *
- * <div class="alert alert-info">
- * Be aware that the attribute values to match against cannot be expressions. They are interpreted
- * as literal string values to match against.
- * For example, **`ng-switch-when="someVal"`** will match against the string `"someVal"` not against the
- * value of the expression `$scope.someVal`.
- * </div>
-
- * @animations
- * enter - happens after the ngSwitch contents change and the matched child element is placed inside the container
- * leave - happens just after the ngSwitch contents change and just before the former contents are removed from the DOM
- *
- * @usage
- *
- * ```
- * <ANY ng-switch="expression">
- * <ANY ng-switch-when="matchValue1">...</ANY>
- * <ANY ng-switch-when="matchValue2">...</ANY>
- * <ANY ng-switch-default>...</ANY>
- * </ANY>
- * ```
- *
- *
- * @scope
- * @priority 800
- * @param {*} ngSwitch|on expression to match against <tt>ng-switch-when</tt>.
- * On child elements add:
- *
- * * `ngSwitchWhen`: the case statement to match against. If match then this
- * case will be displayed. If the same match appears multiple times, all the
- * elements will be displayed.
- * * `ngSwitchDefault`: the default case when no other case match. If there
- * are multiple default cases, all of them will be displayed when no other
- * case match.
- *
- *
- * @example
- <example module="switchExample" deps="angular-animate.js" animations="true">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <select ng-model="selection" ng-options="item for item in items">
- </select>
- <tt>selection={{selection}}</tt>
- <hr/>
- <div class="animate-switch-container"
- ng-switch on="selection">
- <div class="animate-switch" ng-switch-when="settings">Settings Div</div>
- <div class="animate-switch" ng-switch-when="home">Home Span</div>
- <div class="animate-switch" ng-switch-default>default</div>
- </div>
- </div>
- </file>
- <file name="script.js">
- angular.module('switchExample', ['ngAnimate'])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.items = ['settings', 'home', 'other'];
- $scope.selection = $scope.items[0];
- }]);
- </file>
- <file name="animations.css">
- .animate-switch-container {
- position:relative;
- background:white;
- border:1px solid black;
- height:40px;
- overflow:hidden;
- }
-
- .animate-switch {
- padding:10px;
- }
-
- .animate-switch.ng-animate {
- -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
- transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
-
- position:absolute;
- top:0;
- left:0;
- right:0;
- bottom:0;
- }
-
- .animate-switch.ng-leave.ng-leave-active,
- .animate-switch.ng-enter {
- top:-50px;
- }
- .animate-switch.ng-leave,
- .animate-switch.ng-enter.ng-enter-active {
- top:0;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var switchElem = element(by.css('[ng-switch]'));
- var select = element(by.model('selection'));
-
- it('should start in settings', function() {
- expect(switchElem.getText()).toMatch(/Settings Div/);
- });
- it('should change to home', function() {
- select.all(by.css('option')).get(1).click();
- expect(switchElem.getText()).toMatch(/Home Span/);
- });
- it('should select default', function() {
- select.all(by.css('option')).get(2).click();
- expect(switchElem.getText()).toMatch(/default/);
- });
- </file>
- </example>
- */
-var ngSwitchDirective = ['$animate', function($animate) {
- return {
- restrict: 'EA',
- require: 'ngSwitch',
-
- // asks for $scope to fool the BC controller module
- controller: ['$scope', function ngSwitchController() {
- this.cases = {};
- }],
- link: function(scope, element, attr, ngSwitchController) {
- var watchExpr = attr.ngSwitch || attr.on,
- selectedTranscludes = [],
- selectedElements = [],
- previousElements = [],
- selectedScopes = [];
-
- scope.$watch(watchExpr, function ngSwitchWatchAction(value) {
- var i, ii;
- for (i = 0, ii = previousElements.length; i < ii; ++i) {
- previousElements[i].remove();
- }
- previousElements.length = 0;
-
- for (i = 0, ii = selectedScopes.length; i < ii; ++i) {
- var selected = selectedElements[i];
- selectedScopes[i].$destroy();
- previousElements[i] = selected;
- $animate.leave(selected, function() {
- previousElements.splice(i, 1);
- });
- }
-
- selectedElements.length = 0;
- selectedScopes.length = 0;
-
- if ((selectedTranscludes = ngSwitchController.cases['!' + value] || ngSwitchController.cases['?'])) {
- scope.$eval(attr.change);
- forEach(selectedTranscludes, function(selectedTransclude) {
- var selectedScope = scope.$new();
- selectedScopes.push(selectedScope);
- selectedTransclude.transclude(selectedScope, function(caseElement) {
- var anchor = selectedTransclude.element;
-
- selectedElements.push(caseElement);
- $animate.enter(caseElement, anchor.parent(), anchor);
- });
- });
- }
- });
- }
- };
-}];
-
-var ngSwitchWhenDirective = ngDirective({
- transclude: 'element',
- priority: 800,
- require: '^ngSwitch',
- link: function(scope, element, attrs, ctrl, $transclude) {
- ctrl.cases['!' + attrs.ngSwitchWhen] = (ctrl.cases['!' + attrs.ngSwitchWhen] || []);
- ctrl.cases['!' + attrs.ngSwitchWhen].push({ transclude: $transclude, element: element });
- }
-});
-
-var ngSwitchDefaultDirective = ngDirective({
- transclude: 'element',
- priority: 800,
- require: '^ngSwitch',
- link: function(scope, element, attr, ctrl, $transclude) {
- ctrl.cases['?'] = (ctrl.cases['?'] || []);
- ctrl.cases['?'].push({ transclude: $transclude, element: element });
- }
-});
-
-/**
- * @ngdoc directive
- * @name ngTransclude
- * @restrict AC
- *
- * @description
- * Directive that marks the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion.
- *
- * Any existing content of the element that this directive is placed on will be removed before the transcluded content is inserted.
- *
- * @element ANY
- *
- * @example
- <example module="transcludeExample">
- <file name="index.html">
- <script>
- angular.module('transcludeExample', [])
- .directive('pane', function(){
- return {
- restrict: 'E',
- transclude: true,
- scope: { title:'@' },
- template: '<div style="border: 1px solid black;">' +
- '<div style="background-color: gray">{{title}}</div>' +
- '<div ng-transclude></div>' +
- '</div>'
- };
- })
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.title = 'Lorem Ipsum';
- $scope.text = 'Neque porro quisquam est qui dolorem ipsum quia dolor...';
- }]);
- </script>
- <div ng-controller="ExampleController">
- <input ng-model="title"><br>
- <textarea ng-model="text"></textarea> <br/>
- <pane title="{{title}}">{{text}}</pane>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should have transcluded', function() {
- var titleElement = element(by.model('title'));
- titleElement.clear();
- titleElement.sendKeys('TITLE');
- var textElement = element(by.model('text'));
- textElement.clear();
- textElement.sendKeys('TEXT');
- expect(element(by.binding('title')).getText()).toEqual('TITLE');
- expect(element(by.binding('text')).getText()).toEqual('TEXT');
- });
- </file>
- </example>
- *
- */
-var ngTranscludeDirective = ngDirective({
- link: function($scope, $element, $attrs, controller, $transclude) {
- if (!$transclude) {
- throw minErr('ngTransclude')('orphan',
- 'Illegal use of ngTransclude directive in the template! ' +
- 'No parent directive that requires a transclusion found. ' +
- 'Element: {0}',
- startingTag($element));
- }
-
- $transclude(function(clone) {
- $element.empty();
- $element.append(clone);
- });
- }
-});
-
-/**
- * @ngdoc directive
- * @name script
- * @restrict E
- *
- * @description
- * Load the content of a `<script>` element into {@link ng.$templateCache `$templateCache`}, so that the
- * template can be used by {@link ng.directive:ngInclude `ngInclude`},
- * {@link ngRoute.directive:ngView `ngView`}, or {@link guide/directive directives}. The type of the
- * `<script>` element must be specified as `text/ng-template`, and a cache name for the template must be
- * assigned through the element's `id`, which can then be used as a directive's `templateUrl`.
- *
- * @param {string} type Must be set to `'text/ng-template'`.
- * @param {string} id Cache name of the template.
- *
- * @example
- <example>
- <file name="index.html">
- <script type="text/ng-template" id="/tpl.html">
- Content of the template.
- </script>
-
- <a ng-click="currentTpl='/tpl.html'" id="tpl-link">Load inlined template</a>
- <div id="tpl-content" ng-include src="currentTpl"></div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should load template defined inside script tag', function() {
- element(by.css('#tpl-link')).click();
- expect(element(by.css('#tpl-content')).getText()).toMatch(/Content of the template/);
- });
- </file>
- </example>
- */
-var scriptDirective = ['$templateCache', function($templateCache) {
- return {
- restrict: 'E',
- terminal: true,
- compile: function(element, attr) {
- if (attr.type == 'text/ng-template') {
- var templateUrl = attr.id,
- // IE is not consistent, in scripts we have to read .text but in other nodes we have to read .textContent
- text = element[0].text;
-
- $templateCache.put(templateUrl, text);
- }
- }
- };
-}];
-
-var ngOptionsMinErr = minErr('ngOptions');
-/**
- * @ngdoc directive
- * @name select
- * @restrict E
- *
- * @description
- * HTML `SELECT` element with angular data-binding.
- *
- * # `ngOptions`
- *
- * The `ngOptions` attribute can be used to dynamically generate a list of `<option>`
- * elements for the `<select>` element using the array or object obtained by evaluating the
- * `ngOptions` comprehension_expression.
- *
- * When an item in the `<select>` menu is selected, the array element or object property
- * represented by the selected option will be bound to the model identified by the `ngModel`
- * directive.
- *
- * <div class="alert alert-warning">
- * **Note:** `ngModel` compares by reference, not value. This is important when binding to an
- * array of objects. See an example [in this jsfiddle](http://jsfiddle.net/qWzTb/).
- * </div>
- *
- * Optionally, a single hard-coded `<option>` element, with the value set to an empty string, can
- * be nested into the `<select>` element. This element will then represent the `null` or "not selected"
- * option. See example below for demonstration.
- *
- * <div class="alert alert-warning">
- * **Note:** `ngOptions` provides an iterator facility for the `<option>` element which should be used instead
- * of {@link ng.directive:ngRepeat ngRepeat} when you want the
- * `select` model to be bound to a non-string value. This is because an option element can only
- * be bound to string values at present.
- * </div>
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} required The control is considered valid only if value is entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {comprehension_expression=} ngOptions in one of the following forms:
- *
- * * for array data sources:
- * * `label` **`for`** `value` **`in`** `array`
- * * `select` **`as`** `label` **`for`** `value` **`in`** `array`
- * * `label` **`group by`** `group` **`for`** `value` **`in`** `array`
- * * `select` **`as`** `label` **`group by`** `group` **`for`** `value` **`in`** `array` **`track by`** `trackexpr`
- * * for object data sources:
- * * `label` **`for (`**`key` **`,`** `value`**`) in`** `object`
- * * `select` **`as`** `label` **`for (`**`key` **`,`** `value`**`) in`** `object`
- * * `label` **`group by`** `group` **`for (`**`key`**`,`** `value`**`) in`** `object`
- * * `select` **`as`** `label` **`group by`** `group`
- * **`for` `(`**`key`**`,`** `value`**`) in`** `object`
- *
- * Where:
- *
- * * `array` / `object`: an expression which evaluates to an array / object to iterate over.
- * * `value`: local variable which will refer to each item in the `array` or each property value
- * of `object` during iteration.
- * * `key`: local variable which will refer to a property name in `object` during iteration.
- * * `label`: The result of this expression will be the label for `<option>` element. The
- * `expression` will most likely refer to the `value` variable (e.g. `value.propertyName`).
- * * `select`: The result of this expression will be bound to the model of the parent `<select>`
- * element. If not specified, `select` expression will default to `value`.
- * * `group`: The result of this expression will be used to group options using the `<optgroup>`
- * DOM element.
- * * `trackexpr`: Used when working with an array of objects. The result of this expression will be
- * used to identify the objects in the array. The `trackexpr` will most likely refer to the
- * `value` variable (e.g. `value.propertyName`).
- *
- * @example
- <example module="selectExample">
- <file name="index.html">
- <script>
- angular.module('selectExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.colors = [
- {name:'black', shade:'dark'},
- {name:'white', shade:'light'},
- {name:'red', shade:'dark'},
- {name:'blue', shade:'dark'},
- {name:'yellow', shade:'light'}
- ];
- $scope.myColor = $scope.colors[2]; // red
- }]);
- </script>
- <div ng-controller="ExampleController">
- <ul>
- <li ng-repeat="color in colors">
- Name: <input ng-model="color.name">
- [<a href ng-click="colors.splice($index, 1)">X</a>]
- </li>
- <li>
- [<a href ng-click="colors.push({})">add</a>]
- </li>
- </ul>
- <hr/>
- Color (null not allowed):
- <select ng-model="myColor" ng-options="color.name for color in colors"></select><br>
-
- Color (null allowed):
- <span class="nullable">
- <select ng-model="myColor" ng-options="color.name for color in colors">
- <option value="">-- choose color --</option>
- </select>
- </span><br/>
-
- Color grouped by shade:
- <select ng-model="myColor" ng-options="color.name group by color.shade for color in colors">
- </select><br/>
-
-
- Select <a href ng-click="myColor = { name:'not in list', shade: 'other' }">bogus</a>.<br>
- <hr/>
- Currently selected: {{ {selected_color:myColor} }}
- <div style="border:solid 1px black; height:20px"
- ng-style="{'background-color':myColor.name}">
- </div>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-options', function() {
- expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('red');
- element.all(by.model('myColor')).first().click();
- element.all(by.css('select[ng-model="myColor"] option')).first().click();
- expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('black');
- element(by.css('.nullable select[ng-model="myColor"]')).click();
- element.all(by.css('.nullable select[ng-model="myColor"] option')).first().click();
- expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('null');
- });
- </file>
- </example>
- */
-
-var ngOptionsDirective = valueFn({ terminal: true });
-// jshint maxlen: false
-var selectDirective = ['$compile', '$parse', function($compile, $parse) {
- //000011111111110000000000022222222220000000000000000000003333333333000000000000004444444444444440000000005555555555555550000000666666666666666000000000000000777777777700000000000000000008888888888
- var NG_OPTIONS_REGEXP = /^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,
- nullModelCtrl = {$setViewValue: noop};
-// jshint maxlen: 100
-
- return {
- restrict: 'E',
- require: ['select', '?ngModel'],
- controller: ['$element', '$scope', '$attrs', function($element, $scope, $attrs) {
- var self = this,
- optionsMap = {},
- ngModelCtrl = nullModelCtrl,
- nullOption,
- unknownOption;
-
-
- self.databound = $attrs.ngModel;
-
-
- self.init = function(ngModelCtrl_, nullOption_, unknownOption_) {
- ngModelCtrl = ngModelCtrl_;
- nullOption = nullOption_;
- unknownOption = unknownOption_;
- };
-
-
- self.addOption = function(value) {
- assertNotHasOwnProperty(value, '"option value"');
- optionsMap[value] = true;
-
- if (ngModelCtrl.$viewValue == value) {
- $element.val(value);
- if (unknownOption.parent()) unknownOption.remove();
- }
- };
-
-
- self.removeOption = function(value) {
- if (this.hasOption(value)) {
- delete optionsMap[value];
- if (ngModelCtrl.$viewValue == value) {
- this.renderUnknownOption(value);
- }
- }
- };
-
-
- self.renderUnknownOption = function(val) {
- var unknownVal = '? ' + hashKey(val) + ' ?';
- unknownOption.val(unknownVal);
- $element.prepend(unknownOption);
- $element.val(unknownVal);
- unknownOption.prop('selected', true); // needed for IE
- };
-
-
- self.hasOption = function(value) {
- return optionsMap.hasOwnProperty(value);
- };
-
- $scope.$on('$destroy', function() {
- // disable unknown option so that we don't do work when the whole select is being destroyed
- self.renderUnknownOption = noop;
- });
- }],
-
- link: function(scope, element, attr, ctrls) {
- // if ngModel is not defined, we don't need to do anything
- if (!ctrls[1]) return;
-
- var selectCtrl = ctrls[0],
- ngModelCtrl = ctrls[1],
- multiple = attr.multiple,
- optionsExp = attr.ngOptions,
- nullOption = false, // if false, user will not be able to select it (used by ngOptions)
- emptyOption,
- // we can't just jqLite('<option>') since jqLite is not smart enough
- // to create it in <select> and IE barfs otherwise.
- optionTemplate = jqLite(document.createElement('option')),
- optGroupTemplate =jqLite(document.createElement('optgroup')),
- unknownOption = optionTemplate.clone();
-
- // find "null" option
- for(var i = 0, children = element.children(), ii = children.length; i < ii; i++) {
- if (children[i].value === '') {
- emptyOption = nullOption = children.eq(i);
- break;
- }
- }
-
- selectCtrl.init(ngModelCtrl, nullOption, unknownOption);
-
- // required validator
- if (multiple) {
- ngModelCtrl.$isEmpty = function(value) {
- return !value || value.length === 0;
- };
- }
-
- if (optionsExp) setupAsOptions(scope, element, ngModelCtrl);
- else if (multiple) setupAsMultiple(scope, element, ngModelCtrl);
- else setupAsSingle(scope, element, ngModelCtrl, selectCtrl);
-
-
- ////////////////////////////
-
-
-
- function setupAsSingle(scope, selectElement, ngModelCtrl, selectCtrl) {
- ngModelCtrl.$render = function() {
- var viewValue = ngModelCtrl.$viewValue;
-
- if (selectCtrl.hasOption(viewValue)) {
- if (unknownOption.parent()) unknownOption.remove();
- selectElement.val(viewValue);
- if (viewValue === '') emptyOption.prop('selected', true); // to make IE9 happy
- } else {
- if (isUndefined(viewValue) && emptyOption) {
- selectElement.val('');
- } else {
- selectCtrl.renderUnknownOption(viewValue);
- }
- }
- };
-
- selectElement.on('change', function() {
- scope.$apply(function() {
- if (unknownOption.parent()) unknownOption.remove();
- ngModelCtrl.$setViewValue(selectElement.val());
- });
- });
- }
-
- function setupAsMultiple(scope, selectElement, ctrl) {
- var lastView;
- ctrl.$render = function() {
- var items = new HashMap(ctrl.$viewValue);
- forEach(selectElement.find('option'), function(option) {
- option.selected = isDefined(items.get(option.value));
- });
- };
-
- // we have to do it on each watch since ngModel watches reference, but
- // we need to work of an array, so we need to see if anything was inserted/removed
- scope.$watch(function selectMultipleWatch() {
- if (!equals(lastView, ctrl.$viewValue)) {
- lastView = shallowCopy(ctrl.$viewValue);
- ctrl.$render();
- }
- });
-
- selectElement.on('change', function() {
- scope.$apply(function() {
- var array = [];
- forEach(selectElement.find('option'), function(option) {
- if (option.selected) {
- array.push(option.value);
- }
- });
- ctrl.$setViewValue(array);
- });
- });
- }
-
- function setupAsOptions(scope, selectElement, ctrl) {
- var match;
-
- if (!(match = optionsExp.match(NG_OPTIONS_REGEXP))) {
- throw ngOptionsMinErr('iexp',
- "Expected expression in form of " +
- "'_select_ (as _label_)? for (_key_,)?_value_ in _collection_'" +
- " but got '{0}'. Element: {1}",
- optionsExp, startingTag(selectElement));
- }
-
- var displayFn = $parse(match[2] || match[1]),
- valueName = match[4] || match[6],
- keyName = match[5],
- groupByFn = $parse(match[3] || ''),
- valueFn = $parse(match[2] ? match[1] : valueName),
- valuesFn = $parse(match[7]),
- track = match[8],
- trackFn = track ? $parse(match[8]) : null,
- // This is an array of array of existing option groups in DOM.
- // We try to reuse these if possible
- // - optionGroupsCache[0] is the options with no option group
- // - optionGroupsCache[?][0] is the parent: either the SELECT or OPTGROUP element
- optionGroupsCache = [[{element: selectElement, label:''}]];
-
- if (nullOption) {
- // compile the element since there might be bindings in it
- $compile(nullOption)(scope);
-
- // remove the class, which is added automatically because we recompile the element and it
- // becomes the compilation root
- nullOption.removeClass('ng-scope');
-
- // we need to remove it before calling selectElement.empty() because otherwise IE will
- // remove the label from the element. wtf?
- nullOption.remove();
- }
-
- // clear contents, we'll add what's needed based on the model
- selectElement.empty();
-
- selectElement.on('change', function() {
- scope.$apply(function() {
- var optionGroup,
- collection = valuesFn(scope) || [],
- locals = {},
- key, value, optionElement, index, groupIndex, length, groupLength, trackIndex;
-
- if (multiple) {
- value = [];
- for (groupIndex = 0, groupLength = optionGroupsCache.length;
- groupIndex < groupLength;
- groupIndex++) {
- // list of options for that group. (first item has the parent)
- optionGroup = optionGroupsCache[groupIndex];
-
- for(index = 1, length = optionGroup.length; index < length; index++) {
- if ((optionElement = optionGroup[index].element)[0].selected) {
- key = optionElement.val();
- if (keyName) locals[keyName] = key;
- if (trackFn) {
- for (trackIndex = 0; trackIndex < collection.length; trackIndex++) {
- locals[valueName] = collection[trackIndex];
- if (trackFn(scope, locals) == key) break;
- }
- } else {
- locals[valueName] = collection[key];
- }
- value.push(valueFn(scope, locals));
- }
- }
- }
- } else {
- key = selectElement.val();
- if (key == '?') {
- value = undefined;
- } else if (key === ''){
- value = null;
- } else {
- if (trackFn) {
- for (trackIndex = 0; trackIndex < collection.length; trackIndex++) {
- locals[valueName] = collection[trackIndex];
- if (trackFn(scope, locals) == key) {
- value = valueFn(scope, locals);
- break;
- }
- }
- } else {
- locals[valueName] = collection[key];
- if (keyName) locals[keyName] = key;
- value = valueFn(scope, locals);
- }
- }
- }
- ctrl.$setViewValue(value);
- render();
- });
- });
-
- ctrl.$render = render;
-
- scope.$watchCollection(valuesFn, render);
- scope.$watchCollection(function () {
- var locals = {},
- values = valuesFn(scope);
- if (values) {
- var toDisplay = new Array(values.length);
- for (var i = 0, ii = values.length; i < ii; i++) {
- locals[valueName] = values[i];
- toDisplay[i] = displayFn(scope, locals);
- }
- return toDisplay;
- }
- }, render);
-
- if ( multiple ) {
- scope.$watchCollection(function() { return ctrl.$modelValue; }, render);
- }
-
- function getSelectedSet() {
- var selectedSet = false;
- if (multiple) {
- var modelValue = ctrl.$modelValue;
- if (trackFn && isArray(modelValue)) {
- selectedSet = new HashMap([]);
- var locals = {};
- for (var trackIndex = 0; trackIndex < modelValue.length; trackIndex++) {
- locals[valueName] = modelValue[trackIndex];
- selectedSet.put(trackFn(scope, locals), modelValue[trackIndex]);
- }
- } else {
- selectedSet = new HashMap(modelValue);
- }
- }
- return selectedSet;
- }
-
-
- function render() {
- // Temporary location for the option groups before we render them
- var optionGroups = {'':[]},
- optionGroupNames = [''],
- optionGroupName,
- optionGroup,
- option,
- existingParent, existingOptions, existingOption,
- modelValue = ctrl.$modelValue,
- values = valuesFn(scope) || [],
- keys = keyName ? sortedKeys(values) : values,
- key,
- groupLength, length,
- groupIndex, index,
- locals = {},
- selected,
- selectedSet = getSelectedSet(),
- lastElement,
- element,
- label;
-
-
- // We now build up the list of options we need (we merge later)
- for (index = 0; length = keys.length, index < length; index++) {
-
- key = index;
- if (keyName) {
- key = keys[index];
- if ( key.charAt(0) === '$' ) continue;
- locals[keyName] = key;
- }
-
- locals[valueName] = values[key];
-
- optionGroupName = groupByFn(scope, locals) || '';
- if (!(optionGroup = optionGroups[optionGroupName])) {
- optionGroup = optionGroups[optionGroupName] = [];
- optionGroupNames.push(optionGroupName);
- }
- if (multiple) {
- selected = isDefined(
- selectedSet.remove(trackFn ? trackFn(scope, locals) : valueFn(scope, locals))
- );
- } else {
- if (trackFn) {
- var modelCast = {};
- modelCast[valueName] = modelValue;
- selected = trackFn(scope, modelCast) === trackFn(scope, locals);
- } else {
- selected = modelValue === valueFn(scope, locals);
- }
- selectedSet = selectedSet || selected; // see if at least one item is selected
- }
- label = displayFn(scope, locals); // what will be seen by the user
-
- // doing displayFn(scope, locals) || '' overwrites zero values
- label = isDefined(label) ? label : '';
- optionGroup.push({
- // either the index into array or key from object
- id: trackFn ? trackFn(scope, locals) : (keyName ? keys[index] : index),
- label: label,
- selected: selected // determine if we should be selected
- });
- }
- if (!multiple) {
- if (nullOption || modelValue === null) {
- // insert null option if we have a placeholder, or the model is null
- optionGroups[''].unshift({id:'', label:'', selected:!selectedSet});
- } else if (!selectedSet) {
- // option could not be found, we have to insert the undefined item
- optionGroups[''].unshift({id:'?', label:'', selected:true});
- }
- }
-
- // Now we need to update the list of DOM nodes to match the optionGroups we computed above
- for (groupIndex = 0, groupLength = optionGroupNames.length;
- groupIndex < groupLength;
- groupIndex++) {
- // current option group name or '' if no group
- optionGroupName = optionGroupNames[groupIndex];
-
- // list of options for that group. (first item has the parent)
- optionGroup = optionGroups[optionGroupName];
-
- if (optionGroupsCache.length <= groupIndex) {
- // we need to grow the optionGroups
- existingParent = {
- element: optGroupTemplate.clone().attr('label', optionGroupName),
- label: optionGroup.label
- };
- existingOptions = [existingParent];
- optionGroupsCache.push(existingOptions);
- selectElement.append(existingParent.element);
- } else {
- existingOptions = optionGroupsCache[groupIndex];
- existingParent = existingOptions[0]; // either SELECT (no group) or OPTGROUP element
-
- // update the OPTGROUP label if not the same.
- if (existingParent.label != optionGroupName) {
- existingParent.element.attr('label', existingParent.label = optionGroupName);
- }
- }
-
- lastElement = null; // start at the beginning
- for(index = 0, length = optionGroup.length; index < length; index++) {
- option = optionGroup[index];
- if ((existingOption = existingOptions[index+1])) {
- // reuse elements
- lastElement = existingOption.element;
- if (existingOption.label !== option.label) {
- lastElement.text(existingOption.label = option.label);
- }
- if (existingOption.id !== option.id) {
- lastElement.val(existingOption.id = option.id);
- }
- // lastElement.prop('selected') provided by jQuery has side-effects
- if (lastElement[0].selected !== option.selected) {
- lastElement.prop('selected', (existingOption.selected = option.selected));
- if (msie) {
- // See #7692
- // The selected item wouldn't visually update on IE without this.
- // Tested on Win7: IE9, IE10 and IE11. Future IEs should be tested as well
- lastElement.prop('selected', existingOption.selected);
- }
- }
- } else {
- // grow elements
-
- // if it's a null option
- if (option.id === '' && nullOption) {
- // put back the pre-compiled element
- element = nullOption;
- } else {
- // jQuery(v1.4.2) Bug: We should be able to chain the method calls, but
- // in this version of jQuery on some browser the .text() returns a string
- // rather then the element.
- (element = optionTemplate.clone())
- .val(option.id)
- .prop('selected', option.selected)
- .attr('selected', option.selected)
- .text(option.label);
- }
-
- existingOptions.push(existingOption = {
- element: element,
- label: option.label,
- id: option.id,
- selected: option.selected
- });
- if (lastElement) {
- lastElement.after(element);
- } else {
- existingParent.element.append(element);
- }
- lastElement = element;
- }
- }
- // remove any excessive OPTIONs in a group
- index++; // increment since the existingOptions[0] is parent element not OPTION
- while(existingOptions.length > index) {
- existingOptions.pop().element.remove();
- }
- }
- // remove any excessive OPTGROUPs from select
- while(optionGroupsCache.length > groupIndex) {
- optionGroupsCache.pop()[0].element.remove();
- }
- }
- }
- }
- };
-}];
-
-var optionDirective = ['$interpolate', function($interpolate) {
- var nullSelectCtrl = {
- addOption: noop,
- removeOption: noop
- };
-
- return {
- restrict: 'E',
- priority: 100,
- compile: function(element, attr) {
- if (isUndefined(attr.value)) {
- var interpolateFn = $interpolate(element.text(), true);
- if (!interpolateFn) {
- attr.$set('value', element.text());
- }
- }
-
- return function (scope, element, attr) {
- var selectCtrlName = '$selectController',
- parent = element.parent(),
- selectCtrl = parent.data(selectCtrlName) ||
- parent.parent().data(selectCtrlName); // in case we are in optgroup
-
- if (selectCtrl && selectCtrl.databound) {
- // For some reason Opera defaults to true and if not overridden this messes up the repeater.
- // We don't want the view to drive the initialization of the model anyway.
- element.prop('selected', false);
- } else {
- selectCtrl = nullSelectCtrl;
- }
-
- if (interpolateFn) {
- scope.$watch(interpolateFn, function interpolateWatchAction(newVal, oldVal) {
- attr.$set('value', newVal);
- if (newVal !== oldVal) selectCtrl.removeOption(oldVal);
- selectCtrl.addOption(newVal);
- });
- } else {
- selectCtrl.addOption(attr.value);
- }
-
- element.on('$destroy', function() {
- selectCtrl.removeOption(attr.value);
- });
- };
- }
- };
-}];
-
-var styleDirective = valueFn({
- restrict: 'E',
- terminal: true
-});
-
- if (window.angular.bootstrap) {
- //AngularJS is already loaded, so we can return here...
- console.log('WARNING: Tried to load angular more than once.');
- return;
- }
-
- //try to bind to jquery now so that one can write angular.element().read()
- //but we will rebind on bootstrap again.
- bindJQuery();
-
- publishExternalAPI(angular);
-
- jqLite(document).ready(function() {
- angularInit(document, bootstrap);
- });
-
-})(window, document);
-
-!window.angular.$$csp() && window.angular.element(document).find('head').prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide{display:none !important;}ng\\:form{display:block;}.ng-animate-block-transitions{transition:0s all!important;-webkit-transition:0s all!important;}.ng-hide-add-active,.ng-hide-remove{display:block!important;}</style>'); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/ebz/angular_js/app.js b/ecomp-portal-BE/war/static/ebz/angular_js/app.js
deleted file mode 100644
index 917b9767..00000000
--- a/ecomp-portal-BE/war/static/ebz/angular_js/app.js
+++ /dev/null
@@ -1,3 +0,0 @@
-angular.module('att.abs.helper', []);
-
-var app=angular.module("abs", ["att.abs","att.abs.helper","modalServices"]); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/ebz/angular_js/att-abs-tpls-1.2.51.js b/ecomp-portal-BE/war/static/ebz/angular_js/att-abs-tpls-1.2.51.js
deleted file mode 100644
index bc6ae142..00000000
--- a/ecomp-portal-BE/war/static/ebz/angular_js/att-abs-tpls-1.2.51.js
+++ /dev/null
@@ -1,17587 +0,0 @@
-angular.module("att.abs", ["att.abs.tpls", "att.abs.position","att.abs.transition","att.abs.accordion","att.abs.alert","att.abs.breadCrumbs","att.abs.utilities","att.abs.buttons","att.abs.checkbox","att.abs.colorselector","att.abs.datepicker","att.abs.devNotes","att.abs.dividerLines","att.abs.dragdrop","att.abs.drawer","att.abs.message","att.abs.formField","att.abs.hourpicker","att.abs.iconButtons","att.abs.links","att.abs.loading","att.abs.modal","att.abs.pagination","att.abs.paneSelector","att.abs.profileCard","att.abs.progressBars","att.abs.radio","att.abs.scrollbar","att.abs.search","att.abs.select","att.abs.slider","att.abs.splitButtonDropdown","att.abs.splitIconButton","att.abs.stepSlider","att.abs.steptracker","att.abs.table","att.abs.tabs","att.abs.tagBadges","att.abs.textOverflow","att.abs.toggle","att.abs.tooltip","att.abs.treeview","att.abs.typeAhead","att.abs.userMessages","att.abs.verticalSteptracker","att.abs.videoControls"]);
-angular.module("att.abs.tpls", ["app/scripts/ng_js_att_tpls/accordion/accordion.html","app/scripts/ng_js_att_tpls/accordion/accordion_alt.html","app/scripts/ng_js_att_tpls/accordion/attAccord.html","app/scripts/ng_js_att_tpls/accordion/attAccordBody.html","app/scripts/ng_js_att_tpls/accordion/attAccordHeader.html","app/scripts/ng_js_att_tpls/alert/alert.html","app/scripts/ng_js_att_tpls/colorselector/colorselector.html","app/scripts/ng_js_att_tpls/datepicker/dateFilter.html","app/scripts/ng_js_att_tpls/datepicker/dateFilterList.html","app/scripts/ng_js_att_tpls/datepicker/datepicker.html","app/scripts/ng_js_att_tpls/datepicker/datepickerPopup.html","app/scripts/ng_js_att_tpls/dividerLines/dividerLines.html","app/scripts/ng_js_att_tpls/dragdrop/fileUpload.html","app/scripts/ng_js_att_tpls/formField/attFormFieldValidationAlert.html","app/scripts/ng_js_att_tpls/hourpicker/hourpicker.html","app/scripts/ng_js_att_tpls/links/readMore.html","app/scripts/ng_js_att_tpls/loading/loading.html","app/scripts/ng_js_att_tpls/modal/backdrop.html","app/scripts/ng_js_att_tpls/modal/window.html","app/scripts/ng_js_att_tpls/pagination/pagination.html","app/scripts/ng_js_att_tpls/paneSelector/innerPane.html","app/scripts/ng_js_att_tpls/paneSelector/paneGroup.html","app/scripts/ng_js_att_tpls/paneSelector/sidePane.html","app/scripts/ng_js_att_tpls/profileCard/addUser.html","app/scripts/ng_js_att_tpls/profileCard/profileCard.html","app/scripts/ng_js_att_tpls/progressBars/progressBars.html","app/scripts/ng_js_att_tpls/scrollbar/scrollbar.html","app/scripts/ng_js_att_tpls/search/search.html","app/scripts/ng_js_att_tpls/search/search_2.html","app/scripts/ng_js_att_tpls/select/select.html","app/scripts/ng_js_att_tpls/select/textDropdown.html","app/scripts/ng_js_att_tpls/slider/maxContent.html","app/scripts/ng_js_att_tpls/slider/minContent.html","app/scripts/ng_js_att_tpls/slider/slider.html","app/scripts/ng_js_att_tpls/splitButtonDropdown/splitButtonDropdown.html","app/scripts/ng_js_att_tpls/splitIconButton/splitIcon.html","app/scripts/ng_js_att_tpls/splitIconButton/splitIconButton.html","app/scripts/ng_js_att_tpls/splitIconButton/splitIconButtonGroup.html","app/scripts/ng_js_att_tpls/stepSlider/attStepSlider.html","app/scripts/ng_js_att_tpls/steptracker/step-tracker.html","app/scripts/ng_js_att_tpls/steptracker/step.html","app/scripts/ng_js_att_tpls/steptracker/timeline.html","app/scripts/ng_js_att_tpls/steptracker/timelineBar.html","app/scripts/ng_js_att_tpls/steptracker/timelineDot.html","app/scripts/ng_js_att_tpls/table/attTable.html","app/scripts/ng_js_att_tpls/table/attTableBody.html","app/scripts/ng_js_att_tpls/table/attTableHeader.html","app/scripts/ng_js_att_tpls/tabs/floatingTabs.html","app/scripts/ng_js_att_tpls/tabs/genericTabs.html","app/scripts/ng_js_att_tpls/tabs/menuTab.html","app/scripts/ng_js_att_tpls/tabs/parentmenuTab.html","app/scripts/ng_js_att_tpls/tabs/simplifiedTabs.html","app/scripts/ng_js_att_tpls/tabs/submenuTab.html","app/scripts/ng_js_att_tpls/tagBadges/tagBadges.html","app/scripts/ng_js_att_tpls/toggle/demoToggle.html","app/scripts/ng_js_att_tpls/tooltip/tooltip-popup.html","app/scripts/ng_js_att_tpls/typeAhead/typeAhead.html","app/scripts/ng_js_att_tpls/userMessages/attTableMessage.html","app/scripts/ng_js_att_tpls/userMessages/attUserMessage.html","app/scripts/ng_js_att_tpls/verticalSteptracker/vertical-step-tracker.html","app/scripts/ng_js_att_tpls/videoControls/photoControls.html","app/scripts/ng_js_att_tpls/videoControls/videoControls.html"]);
-angular.module('att.abs.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)
- };
- }
- };
-}])
-
-.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;
-}]);
-
-/*!
- * 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 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('att.abs.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('att.abs.accordion', ['att.abs.position', 'att.abs.transition'])
- .constant('accordionConfig', {
- closeOthers: false
- }).controller('AccordionController', ['$scope', '$attrs', 'accordionConfig', '$log',
- function ($scope, $attrs, accordionConfig, $log) {
- // This array keeps track of the accordion groups
- this.groups = [];
- this.index = -1;
- // Keep reference to user's scope to properly assign `is-open`
- this.scope = $scope;
- $scope.forceExpand = false;
- // Ensure that all the groups in this accordion are closed, unless close-others explicitly says not to
- this.closeOthers = function (openGroup) {
- var closeOthers = angular.isDefined($attrs.closeOthers) ? $scope.$eval($attrs.closeOthers) : accordionConfig.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.expandAll = function () {
- $scope.forceExpand = true;
- angular.forEach(this.groups, function (group) {
- group.isOpen = true;
- });
- };
- this.collapseAll = function () {
- angular.forEach(this.groups, function (group) {
- group.isOpen = false;
- });
- };
- /**function focus @param focusGroup */
- this.focus = function (focusGroup) {
- var self = this;
- angular.forEach(this.groups, function (group, index) {
- if (group !== focusGroup) {
- group.focused = false;
- } else {
- self.index = index;
- group.focused = true;
- }
- });
- };
- /** @param blurGroup*/
- this.blur = function (blurGroup) {
- blurGroup.focused = false;
- this.index = -1;
- $log.log("accordion.blur()", blurGroup);
- };
- /** @param group - the group in current focus @param down - cycling down */
- this.cycle = function (group, down, noRecycle) {
- if (!down) {
- if (this.index <= 0 && !noRecycle) {
- this.index = this.groups.length - 1;
- } else {
- this.index--;
- }
- } else {
- if (this.index === (this.groups.length - 1))
- {
- if (noRecycle) {
- this.index = 0;
- group.focused = false;
- $scope.$apply();
- return;
- }
- else
- {
- this.index = 0;
- }
- } else {
- this.index++;
- }
- }
-
- group.focused = false;
- this.groups[this.index].setFocus = true;
- this.groups[this.index].focused = true;
- $scope.$apply();
- };
- // This is called from the accordion-group directive to add itself to the accordion
- this.addGroup = function (groupScope) {
- var that = this;
- groupScope.index = this.groups.length;
- groupScope.focused = false;
- this.groups.push(groupScope);
-
- if(this.groups.length > 0){
- this.index = 0;
- }
-
- groupScope.$on('$destroy', function () {
- that.removeGroup(groupScope);
- });
- };
- // This is called from the accordion-group directive when to remove itself
- this.removeGroup = function (group) {
- var index = this.groups.indexOf(group);
- if (index !== -1) {
- this.groups.splice(this.groups.indexOf(group), 1);
- }
- };
- }])
-// The accordion directive simply sets up the directive controller and adds an accordion CSS class to itself element.
- .directive('accordion', function () {
- return {
- restrict: 'EA',
- controller: 'AccordionController',
- transclude: true,
- replace: false,
- scope: {
- cClass: '@css',
- expandAll: "=?",
- collapseAll: "=?"
- },
- template: '<div class="{{cClass}}" ng-transclude></div>',
- link: function (scope, elem, attribute, ctrl) {
- scope.$watch("expandAll", function (value) {
- if (value) {
- ctrl.expandAll();
- scope.expandAll = false;
- }
- });
- scope.$watch("collapseAll", function (value) {
- if (value) {
- ctrl.collapseAll();
- scope.collapseAll = false;
- }
- });
- }
- };
- })
-// The accordion-group directive indicates a block of html that will expand and collapse in an accordion
- .directive('accordionGroup', ['$parse', '$transition', '$scrollTo', '$timeout', '$log', function ($parse, $transition, $scrollTo, $timeout, $log) {
- return {
- // We need this directive to be inside an accordion
- require: ['^accordion', 'accordionGroup'],
- restrict: 'EA',
- // It transcludes the contents of the directive into the template
- transclude: true,
- // The element containing the directive will be replaced with the template
- replace: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/accordion/accordion.html',
- scope: {
- // Create an isolated scope and interpolate the heading attribute onto this scope
- heading: '@',
- isOpen: '=?'
- },
- controller: ['$scope', function ($scope)
- {
- $scope.showico = true;
- this.setHeading = function (element)
- {
- this.heading = element;
- $scope.showico = false;
- };
- this.isIsOpen = function ()
- {
- return $scope.isOpen;
- };
- }],
- link: function (scope, element, attrs, ctrl) {
- var accordionCtrl = ctrl[0];
- var accordionGroupCtrl = ctrl[1];
- var keys = {tab: 9, enter: 13, esc: 27, space: 32, pageup: 33, pagedown: 34, end: 35, home: 36, left: 37, up: 38, right: 39, down: 40};
- //not a fix
- var tab = element.children().eq(0);
-
- scope.setFocus = false;
-
- var handleKeydown = function (ev) {
- var boolFlag = true;
- switch (ev.keyCode)
- {
- case keys.enter:
- ev.preventDefault();
- scope.toggle();
- scope.$apply();
- break;
- case keys.up:
- case keys.left:
- ev.preventDefault();
- accordionCtrl.cycle(scope, false);
- break;
- case keys.down:
- case keys.right:
- ev.preventDefault();
- accordionCtrl.cycle(scope, true);
- break;
- default:
- boolFlag = false;
- break;
- }
- ev.stopPropagation();
- return boolFlag;
- };
-
- if (angular.isUndefined(scope.isOpen)) {
- scope.isOpen = false;
- }
-
- tab.bind("keydown", handleKeydown);
-
- accordionCtrl.addGroup(scope);
-
- if (scope.index === 0) {
- scope.focused = true;
- }
-
- accordionGroupCtrl.toggle = scope.toggle = function () {
- scope.isOpen = !scope.isOpen;
- accordionCtrl.focus(scope);
- return scope.isOpen;
- };
-
- scope.$watch('isOpen', function (value) {
- if (value) {
- accordionCtrl.closeOthers(scope);
- }
- });
-
- scope.$watch("focused", function (value) {
- if (!!value) {
- tab.attr("tabindex", "0");
- if(scope.setFocus){
- tab[0].focus();
- }
- }
- else{
- scope.setFocus = false;
- tab.attr("tabindex", "-1");
- }
- });
- }
- };
- }])
-// Use accordion-heading below an accordion-group to provide a heading containing HTML
-// <accordion-group>
-// <accordion-heading>Heading containing HTML - <img src="..."></accordion-heading>
-// </accordion-group>
- .directive('accordionToggle', function () {
- return{
- restrict: 'EA',
- require: '^accordionGroup',
- scope: {
- expandIcon: '@',
- collapseIcon: '@'
- },
- link: function (scope, element, attr, accordionCtrl)
- {
- var setIcon = function (isOpen) {
- if (scope.expandIcon && scope.collapseIcon)
- {
- if (isOpen) {
- element.removeClass(scope.expandIcon);
- element.addClass(scope.collapseIcon);
- }
- else {
- element.removeClass(scope.collapseIcon);
- element.addClass(scope.expandIcon);
- }
- }
- };
- element.bind('click', function ()
- {
- accordionCtrl.toggle();
- scope.$apply();
- });
- scope.$watch(function () {
- return accordionCtrl.isIsOpen();
- }, function (value) {
- setIcon(value);
- });
- }
- };
- }).directive('accordionHeading', function () {
- return {
- restrict: 'EA',
- transclude: true,
- template: '',
- require: '^accordionGroup',
- compile: function (element, attr, transclude) {
- var link = function (scope, element, attr, accordionGroupCtrl) {
- // Pass the heading to the accordion-group controller
- // so that it can be transcluded into the right place in the template
- // [The second parameter to transclude causes the elements to be cloned so that they work in ng-repeat]
- transclude(scope, function (clone) {
- element.append(clone);
- accordionGroupCtrl.setHeading(element);
- });
- };
- return link;
- }
- };
-})
-// Use in the accordion-group template to indicate where you want the heading to be transcluded
-// You must provide the property on the accordion-group controller that will hold the transcluded element
- .directive('accordionTransclude', function () {
- return {
- require: '^accordionGroup',
- link: function (scope, element, attr, controller) {
- scope.$watch(function () {
- return controller[attr.accordionTransclude];
- }, function (heading) {
- if (heading) {
- element.find("span").eq(0).prepend(heading);
- }
- });
- }
- };
- })
- .directive('attGoTop', ['$scrollTo', function ($scrollTo) {
- return {
- restrict: 'A',
- transclude: false,
- link: function (scope, elem, attrs)
- {
- elem.bind('click', function ()
- {
- $scrollTo(0, attrs["attGoTop"]);
- });
- }
- };
- }])
- .directive('attGoTo', ['$anchorScroll', '$location', function ($anchorScroll, $location) {
- return {
- restrict: 'A',
- transclude: false,
- link: function (scope, elem, attrs)
- {
- elem.bind('click', function ()
- {
- var newHash = attrs["attGoTo"];
- if ($location.hash() !== newHash)
- {
- $location.hash(attrs["attGoTo"]);
- }
- else
- {
- $anchorScroll();
- }
- });
- }
- };
- }])
- .directive('freeStanding', function () {
- return {
- restrict: 'EA',
- transclude: true,
- replace: true,
- scope: true,
- template: "<div><span class='att-accordion__freestanding' ng-show='showAccordion'></span>\n" +
- "<div class='section-toggle'>\n" +
- "<button class='section-toggle__button' ng-click='fsToggle()'>\n" +
- " {{btnText}}<i style='font-size:0.875rem' ng-class='{\"icon-chevron-up\": showAccordion,\"icon-chevron-down\": !showAccordion, }'></i> \n" +
- "</button>\n" +
- "</div></div>",
- compile: function (element, attr, transclude)
- {
- var link = function (scope, elem, attrs) {
- scope.content = "";
- transclude(scope, function (clone)
- {
- elem.find("span").append(clone);
- });
- scope.showAccordion = false;
- scope.btnText = scope.showAccordion ? attrs.hideMsg : attrs.showMsg;
- scope.fsToggle = function ()
- {
- scope.showAccordion = !scope.showAccordion;
- scope.btnText = scope.showAccordion ? attrs.hideMsg : attrs.showMsg;
- };
- };
- return link;
- }
- };
- }).directive('expanders', function () {
- return{
- restrict: 'EA',
- replace: true,
- transclude: true,
- template: "<div ng-transclude></div>",
- controller: [function () {
- var bodyScope = null;
- this.setScope = function (scope) {
- bodyScope = scope;
- };
- this.toggle = function () {
- bodyScope.isOpen = !bodyScope.isOpen;
- return bodyScope.isOpen;
- };
- }],
- link: function (scope, element)
- {
- scope.isOpen = false;
- element.bind('click', function ()
- {
- scope.isOpen = !scope.isOpen;
- });
- }
- };
-}).directive('expanderHeading', function () {
- return{
- require: "^expanders",
- restrict: 'EA',
- replace: true,
- transclude: true,
- scope: true,
- template: "<div style='padding:10px !important' ng-transclude></div>"
- };
-}).directive('expanderBody', function () {
- return{
- restrict: 'EA',
- require: "^expanders",
- replace: true,
- transclude: true,
- scope: {},
- template: "<div collapse='!isOpen'><div ng-transclude></div></div>",
- link: function (scope, elem, attr, myCtrl) {
- scope.isOpen = false;
- myCtrl.setScope(scope);
- }
- };
-}).directive('expanderToggle', function () {
- return{
- restrict: 'EA',
- require: "^expanders",
- scope: {
- expandIcon: '@',
- collapseIcon: '@'
- },
- link: function (scope, element, attr, myCtrl)
- {
- var isOpen = false;
- var setIcon = function () {
- if (scope.expandIcon && scope.collapseIcon)
- {
- if (isOpen) {
- element.removeClass(scope.expandIcon);
- element.addClass(scope.collapseIcon);
- }
- else {
- element.removeClass(scope.collapseIcon);
- element.addClass(scope.expandIcon);
- }
- }
- };
- element.bind("keydown", function (e) {
- if (e.keyCode === 13)
- {
- scope.toggleit();
- }
- });
- element.bind('click', function ()
- {
- scope.toggleit();
- });
- scope.toggleit = function ()
- {
- isOpen = myCtrl.toggle();
- setIcon();
- scope.$apply();
- };
- setIcon();
- }
- };
-}).directive('collapse', ['$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('collapse');
- 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 :-/
- element.addClass('collapse');
- };
- return {
- link: function (scope, element, attrs) {
- var isCollapsed;
- var initialAnimSkip = true;
- scope.$watch(function () {
- return element[0].scrollHeight;
- }, function () {
- //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 && !isCollapsed) {
- if (initialAnimSkip) {
- fixUpHeight(scope, element, element[0].scrollHeight + 'px');
- } else {
- fixUpHeight(scope, element, 'auto');
- }
- }
- });
- 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(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;
- });
- }
- };
- scope.$watch(attrs.collapse, function (value) {
- if (value) {
- collapse();
- } else {
- expand();
- }
- });
- }
- };
- }])
- .directive('attAccord', function () {
- return {
- restrict: 'EA',
- transclude: true,
- replace: true,
- scope: {},
- controller: 'AttAccordCtrl',
- templateUrl: 'app/scripts/ng_js_att_tpls/accordion/attAccordHeader.html'
- };
- })
- .controller('AttAccordCtrl', [function () {
- this.type = 'attAccord';
- this.headerCtrl;
- this.bodyCtrl;
- var isOpen = true;
- this.toggleBody = function () {
- if (isOpen) {
- this.expandBody();
- }
- else {
- this.collapseBody();
- }
- isOpen = !isOpen;
- };
- this.expandBody = function () {
- this.bodyCtrl.expand();
- };
- this.collapseBody = function () {
- this.bodyCtrl.collapse();
- };
- }])
- .controller('AttAccordHeaderCtrl', [function () {
- this.type = 'header';
- }])
- .directive('attAccordHeader', function () {
- return {
- restrict: 'EA',
- transclude: true,
- replace: true,
- require: ['^attAccord', 'attAccordHeader'],
- controller: 'AttAccordHeaderCtrl',
- templateUrl: 'app/scripts/ng_js_att_tpls/accordion/attAccordHeader.html',
- link: function (scope, element, attr, ctrls) {
- var attAccordCtrl = ctrls[0];
- var attAccordHeaderCtrl = ctrls[1];
- attAccordCtrl.headerCtrl = attAccordHeaderCtrl;
- scope.clickFunc = function () {
- attAccordCtrl.toggleBody();
- };
- }
- };
- })
- .controller('AttAccordBodyCtrl', ['$scope', function ($scope) {
- this.type = 'body';
- this.expand = function () {
- $scope.expand();
- };
- this.collapse = function () {
- $scope.collapse();
- };
- }])
- .directive('attAccordBody', ['$timeout', '$height', function ($timeout, $height) {
- return {
- restrict: 'EA',
- transclude: true,
- replace: true,
- require: ['^attAccord', 'attAccordBody'],
- controller: 'AttAccordBodyCtrl',
- templateUrl: 'app/scripts/ng_js_att_tpls/accordion/attAccordBody.html',
- link: function (scope, element, attr, ctrls) {
- var attAccordCtrl = ctrls[0];
- var attAccordBodyCtrl = ctrls[1];
- attAccordCtrl.bodyCtrl = attAccordBodyCtrl;
- var originalHeight;
- $timeout(function () {
- originalHeight = element[0].offsetHeight;
- $height(element, 0, 0, 0);
- });
- scope.expand = function () {
- $height(element, 0.05, originalHeight, 1);
- };
- scope.collapse = function () {
- $height(element, 0.25, 0, 0);
- };
- }
- };
- }]);
-angular.module('att.abs.alert', [])
-.directive('attAlert', [function()
-{
- return {
- restrict:'EA',
- replace : true,
- transclude : true,
- scope: {
- alertType : "@type",
- showTop : "@topPos",
- showAlert : "="
- },
- templateUrl : 'app/scripts/ng_js_att_tpls/alert/alert.html',
- link: function(scope)
- {
- if(scope.showTop === 'true'){
- scope.cssStyle = {'top':'50px'};
- }
- else{
- scope.cssStyle = {'top':'0px'};
- }
- scope.close = function(){
- scope.showAlert = false;
- };
- }
- };
-}]);
-
-angular.module('att.abs.breadCrumbs', [])
- .constant("classConstant",{
- "defaultClass" : "breadcrumbs__link",
- "activeClass": "breadcrumbs__link--active"
- })
- .directive('attCrumb', ['classConstant', function(classConstant) {
- return {
- restrict: 'A',
- link: function(scope, elem, attr) {
- elem.addClass(classConstant.defaultClass);
- if(attr.attCrumb === 'active'){
- elem.addClass(classConstant.activeClass);
- }
- if(!elem.hasClass('last')){
- elem.after('<i class="breadcrumbs__item"></i>');
- }
- }
- };
- }
-]);
-angular.module('att.abs.utilities', [])
-
-.filter('unsafe',[ '$sce', function ($sce) {
- return function(val){
- return $sce.trustAsHtml(val);
- };
-}])
-
-.filter('highlight', 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;
- };
-})
-
-.filter('attLimitTo', function() {
- return function(actualArray, _limit, _begin) {
- var finalArray = [];
- var limit = _limit;
- var begin = _begin;
- if(isNaN(begin)) {
- begin = 0;
- }
- if(actualArray && !isNaN(limit)) {
- finalArray = actualArray.slice(begin, begin+limit);
- } else {
- finalArray = actualArray;
- }
- return finalArray;
- };
-})
-
-.filter('startsWith', function() {
- if (typeof String.prototype.startsWith !== 'function') {
- // see below for better implementation!
- String.prototype.startsWith = function (str){
- return this.indexOf(str) === 0;
- };
- }
-
- return function(items, searchString) {
- if (searchString === undefined || searchString === "") {
- return items;
- }
-
- var filtered = [];
- angular.forEach(items, function(item) {
- if (item.title.toLowerCase().startsWith(searchString.toLowerCase())) {
- filtered.push(item);
- }
- });
- return filtered;
- };
-})
-
-.directive('attInputDeny', [function() {
- return {
- restrict: 'A',
- require: 'ngModel',
- link: function (scope, elem, attr, ctrl) {
- var regexExpression = null;
- attr.$observe('attInputDeny', 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('attAccessibilityClick', [function() {
- return {
- restrict: 'A',
- link: function (scope, elem, attr) {
- var keyCode = [];
- attr.$observe('attAccessibilityClick', function (value) {
- if (value) {
- keyCode = value.split(',');
- }
- });
- elem.bind('keydown', 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('attElementFocus', [function() {
- return {
- restrict: 'A',
- link: function(scope, elem, attr) {
- scope.$watch(attr.attElementFocus, function (value) {
- if (value) {
- elem[0].focus();
- }
- });
- }
- };
-}])
-
-.factory('events', function(){
- var s = function(e){
- if(e.stopPropagation) {
- e.stopPropagation();
- } else {
- e.returnValue = false;
- }
- };
- return {
- stopPropagation: s
- };
-})
-
-.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);
- }
- });
- });
- };
-
- return {
- click: _click
- };
-}])
-
-.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);
- }
- };
-});
-
-
-(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 || '';
- direction = (direction !== undefined && direction) || true;
- 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;
- };
- }
-})();
-
-angular.module('att.abs.buttons', ['att.abs.position', 'att.abs.utilities'])
- .constant('btnConfig', {
- btnClass: 'button',
- btnPrimaryClass: 'button--primary',
- btnSecondaryClass: 'button--secondary',
- btnDisabledClass: 'button--inactive',
- btnSmallClass: 'button--small'
- })
- .directive('attButton', ['btnConfig', function (btnConfig) {
- return {
- restrict: 'A',
- link: function (scope, element, attrs) {
- element.addClass(btnConfig.btnClass);
- if (attrs.size === 'small') {
- element.addClass(btnConfig.btnSmallClass);
- }
- attrs.$observe('btnType', function (value) {
- if (value === 'primary') {
- element.addClass(btnConfig.btnPrimaryClass);
- element.removeClass(btnConfig.btnSecondaryClass);
- element.removeClass(btnConfig.btnDisabledClass);
- element.removeAttr('disabled');
- } else if (value === 'secondary') {
- element.addClass(btnConfig.btnSecondaryClass);
- element.removeClass(btnConfig.btnPrimaryClass);
- element.removeClass(btnConfig.btnDisabledClass);
- element.removeAttr('disabled');
- } else if (value === 'disabled') {
- element.addClass(btnConfig.btnDisabledClass);
- element.removeClass(btnConfig.btnPrimaryClass);
- element.removeClass(btnConfig.btnSecondaryClass);
- element.attr('disabled', 'disabled');
- }
- });
- }
- };
- }])
- .directive('attButtonLoader', [function () {
- return {
- restrict: 'A',
- replace: false,
- scope: {
- size: '@'
- },
- template: '<div ng-class="{\'button--loading\': size === \'large\',\'button--loading__small\': size === \'small\'}"><i></i><i></i><i></i></div>',
- link: function (scope, element) {
- element.addClass('button button--inactive');
- }
- };
- }])
- .directive('attButtonHero', [function () {
- return {
- restrict: 'A',
- replace: false,
- transclude: true,
- scope: {
- icon: '@'
- },
- template: '<div class="button--hero__inner"><span ng-transclude></span> <i ng-class="{\'icon-arrow-right\': icon === \'arrow-right\',\'icon-cart\': icon === \'cart\'}"></i></div>',
- link: function (scope, element) {
- element.addClass('button button--hero');
- element.attr("tabindex", "0");
- }
- };
- }])
- .directive('attBtnDropdown', ['$document', '$isElement', '$documentBind', function ($document, $isElement, $documentBind) {
- return {
- restrict: 'EA',
- scope: {
- type: "@dropdowntype"
- },
- replace: true,
- transclude: true,
- template: '<div class="att-btn-dropdown"> <div class="buttons-dropdown--small btn-group" ng-class="{\'open\': isOpen}" ng-click="toggleDropdown()"> <button class="button button--secondary button--small buttons-dropdown__drop dropdown-toggle ng-isolate-scope" ng-if="type==\'dots\'"> <div class="circle" ng-click="toggleDropdownCircle()"></div> <div class="circle" ng-click="toggleDropdownCircle()"></div> <div class="circle" ng-click="toggleDropdownCircle()"></div> </button> <button class="button button--secondary button--small buttons-dropdown__drop dropdown-toggle ng-isolate-scope actions-title" ng-if="type==\'actions\'"> Actions </button> <ul ng-class="{\'dropdown-menu dots-dropdwn\':type==\'dots\', \'dropdown-menu actions-dropdwn\':type==\'actions\'}" role="menu" ng-transclude></ul></div></div>',
- link: function (scope, element) {
- scope.isOpen = false;
- var toggle = scope.toggle = function (show) {
- if (show === undefined || show === '') {
- scope.isOpen = !scope.isOpen;
- }
- else {
- scope.isOpen = show;
- }
- };
- scope.toggleDropdownCircle = function () {
- toggle(false);
- };
- scope.toggleDropdown = function () {
- toggle();
- };
- var outsideClick = function (e) {
- var isElement = $isElement(angular.element(e.target), element, $document);
- if (!isElement) {
- toggle(false);
- scope.$apply();
- }
- };
- $documentBind.click('isOpen', outsideClick, scope);
- }
- };
- }]);
-
-angular.module('att.abs.checkbox', [])
-.constant("attCheckboxConfig", {
- activeClass : "att-checkbox--on",
- disabledClass : "att-checkbox--disabled"
-})
-.directive('checkboxLimit', function () {
-return {
- scope: {
- checkboxLimit:'=',
- selectLimit:'@?',
- maxSelected:'&?'
- },
- restrict: 'A',
- require:'checkboxLimit',
- controller: ['$scope',function($scope)
- {
- $scope.limit=true;
- this.getMaxLimits=function(){
- return $scope.limit;
- };
- this.setMaxLimits=function(value){
- $scope.limit=value;
- };
- this.maxCheckboxSelected=function(){
- $scope.maxSelected();
- };
- }],
- link: function (scope, element, attribute, ctrl) {
- scope.$watch('checkboxLimit', function()
- {
- var countTrue = 0;
- for (var keys in scope.checkboxLimit) {
- if (scope.checkboxLimit.hasOwnProperty(keys) && scope.checkboxLimit[keys]) {
- countTrue = countTrue + 1;
- }
- };
- if(countTrue>=parseInt(scope.selectLimit)){
- ctrl.setMaxLimits(false);
- }
- else{
- ctrl.setMaxLimits(true);
- }
- }, true);
- }
-};
-})
-.directive('attCheckbox', ['$compile', "attCheckboxConfig", function ($compile, attCheckboxConfig) {
- return {
- scope: {},
- restrict: 'A',
- require: ['ngModel','^?checkboxLimit'],
- link: function (scope, element, attribute, ctrl) {
- var ngCtrl = ctrl[0];
- var checkboxLimitCtrl = ctrl[1];
- var parentDiv = $compile('<div tabindex="0" role="checkbox" att-accessibility-click="13,32" ng-click="updateModel($event)" class="att-checkbox"></div>')(scope);
- element.css({display:'none'});
- element.wrap(parentDiv);
- element.parent().append('<div class="att-checkbox__indicator"></div>');
- element.parent().attr("title", attribute.title);
- element.parent().attr("id", attribute.id);
- element.removeAttr("id");
- //model -> UI
- ngCtrl.$render = function () {
- var selected = ngCtrl.$modelValue ? true : false;
- element.parent().toggleClass(attCheckboxConfig.activeClass, selected);
- element.parent().attr("aria-checked", selected);
- };
-
- //ui->model
- scope.updateModel = function (evt) {
- if (!scope.disabled) {
- ngCtrl.$setViewValue(element.parent().hasClass(attCheckboxConfig.activeClass) ? false : true);
- if(checkboxLimitCtrl && !(checkboxLimitCtrl.getMaxLimits())){
- if(!ngCtrl.$modelValue){
- ngCtrl.$render();
- }
- else{
- checkboxLimitCtrl.maxCheckboxSelected();
- ngCtrl.$setViewValue(element.parent().hasClass(attCheckboxConfig.activeClass) ? true : false);
- }
- }
- else{
- ngCtrl.$render();
- }
- }
- evt.preventDefault();
- };
-
- attribute.$observe('disabled', function(val) {
- scope.disabled = (val || val === "disabled" || val === "true");
- element.parent().toggleClass(attCheckboxConfig.disabledClass, scope.disabled);
- element.parent().attr("tabindex", scope.disabled ? "-1" : "0");
- });
- }
- };
-}])
-.directive('checkboxGroup', ['$compile',function($compile) {
- return {
- scope:{
- checkboxGroup: "=",
- checkboxGroupValue: "=?"
- },
- restrict: 'A',
- link: function(scope, element, attribute){
- scope.checkboxState = 'none';
- scope.checkboxGroupValue="indeterminate";
- element.css({display:'none'});
- element.wrap($compile('<div tabindex="0" role="checkbox" att-accessibility-click="13,32" ng-click="updateModel($event)" class="att-checkbox"></div>')(scope));
- element.parent().append('<div class="att-checkbox__indicator"></div>');
- element.parent().attr("title", attribute.title);
- scope.$watch('checkboxState', function(val) {
- if (val === 'all') {
- element.parent().addClass('att-checkbox--on');
- element.parent().removeClass('att-checkbox--indeterminate');
- element.parent().attr("aria-checked", true);
- }
- else if (val === 'none') {
- element.parent().removeClass('att-checkbox--on');
- element.parent().removeClass('att-checkbox--indeterminate');
- element.parent().attr("aria-checked", false);
- }
- else if (val === 'indeterminate') {
- element.parent().removeClass('att-checkbox--on');
- element.parent().addClass('att-checkbox--indeterminate');
- element.parent().attr("aria-checked", true);
- }
- });
- scope.updateModel = function(evt){
- if (element.parent().hasClass('att-checkbox--on')) {
- element.parent().removeClass('att-checkbox--on');
- for (var keys in scope.checkboxGroup) {
- if (scope.checkboxGroup.hasOwnProperty(keys)) {
- scope.checkboxGroup[keys] = false;
- }
- };
- }
- else {
- element.parent().addClass('att-checkbox--on');
- for (var key in scope.checkboxGroup) {
- if (scope.checkboxGroup.hasOwnProperty(key)) {
- scope.checkboxGroup[key] = true;
- }
- };
- }
- evt.preventDefault();
- };
- scope.$watch('checkboxGroupValue', function (value) {
- if (value==="false") {
- element.parent().removeClass('att-checkbox--on');
- for (var keys in scope.checkboxGroup) {
- if (scope.checkboxGroup.hasOwnProperty(keys)) {
- scope.checkboxGroup[keys] = false;
- }
- };
- }
- else if (value === "true"){
- element.parent().addClass('att-checkbox--on');
- for (var key in scope.checkboxGroup) {
- if (scope.checkboxGroup.hasOwnProperty(key)) {
- scope.checkboxGroup[key] = true;
- }
- };
- }
- });
- scope.$watch('checkboxGroup', function(){
- var countTrue = 0;
- var countFalse = 0;
- var count = 0;
- for (var keys in scope.checkboxGroup) {
- if (scope.checkboxGroup.hasOwnProperty(keys)) {
- count = count + 1;
- if (scope.checkboxGroup[keys]) {
- countTrue = countTrue + 1;
- }
- else if (!scope.checkboxGroup[keys]) {
- countFalse = countFalse + 1;
- }
- }
- };
- if (count === countTrue) {
- scope.checkboxState = "all";
- scope.checkboxGroupValue="true";
- }
- else if (count === countFalse) {
- scope.checkboxState = "none";
- scope.checkboxGroupValue="false";
- }
- else {
- scope.checkboxState = "indeterminate";
- scope.checkboxGroupValue="indeterminate";
- }
- }, true);
- }
- };
-}]);
-
-angular.module('att.abs.colorselector', [])
- .directive('colorSelectorWrapper', [function() {
- return {
- scope: {
- selected: '=',
- iconColor: '@'
- },
- restrict: 'AE',
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/colorselector/colorselector.html',
- link: function(scope) {
- scope.applycolor = {'background-color': scope.iconColor};
- scope.selectedcolor = function(iconColor) {
- scope.selected = iconColor;
- };
- }
- };
- }])
- .directive('colorSelector', ['$compile', function($compile) {
- return{
- restrict: 'A',
- scope: {
- colorSelector: '@',
- ngModel: '='
- },
- link: function(scope, element) {
- element.removeAttr('color-selector');
- var wrapcont = angular.element('<color-selector-wrapper selected="ngModel" icon-color="{{colorSelector}}">' + element.prop('outerHTML') + '</color-selector-wrapper>');
- var newWrapcont = $compile(wrapcont)(scope);
- element.replaceWith(newWrapcont);
- }
- };
- }]);
-angular.module('att.abs.datepicker', ['att.abs.position', 'att.abs.utilities'])
-
-.constant('datepickerConfig', {
- dateFormat: 'MM/dd/yyyy',
- dayFormat: 'd',
- monthFormat: 'MMMM',
- yearFormat: 'yyyy',
- dayHeaderFormat: 'EEEE',
- dayTitleFormat: 'MMMM yyyy',
- disableWeekend: false,
- disableSunday: false,
- startingDay: 0,
- minDate: null,
- maxDate: null,
- mode: 0,
- dateFilter: {
- defaultText: 'Select from list'
- },
- datepickerEvalAttributes: ['dateFormat', 'dayFormat', 'monthFormat', 'yearFormat', 'dayHeaderFormat', 'dayTitleFormat', 'disableWeekend', 'disableSunday', 'startingDay', 'mode'],
- datepickerWatchAttributes: ['min', 'max']
-})
-
-.factory('datepickerService', ['datepickerConfig', 'dateFilter', function (datepickerConfig, dateFilter) {
- var setAttributes = function (attr, elem) {
- if (angular.isDefined(attr) && attr !== null && angular.isDefined(elem) && elem !== null) {
- var attributes = datepickerConfig.datepickerEvalAttributes.concat(datepickerConfig.datepickerWatchAttributes);
- 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 = datepickerConfig.datepickerEvalAttributes;
- var watchAttributes = datepickerConfig.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);
- }
- }
- }
- };
-
- var validateDateString = function (dateString, dateFormat) {
- if (dateString && dateFormat) {
- var delimiter;
- if (dateFormat.indexOf('/') !== -1) {
- delimiter = '/';
- } else if (dateFormat.indexOf('-') !== -1) {
- delimiter = '-';
- } else if (dateFormat.indexOf('.') !== -1) {
- delimiter = '.';
- }
-
- var dateStringArray = dateString.split(delimiter);
- var dateFormatArray = dateFormat.split(delimiter);
- if (dateStringArray.length !== dateFormatArray.length) {
- return false;
- }
-
- for (var i = 0; i < dateStringArray.length; i++) {
- dateStringArray[i] = dateStringArray[i].lPad(dateFormatArray[i].length, '0');
- }
- var intermediateDateString = dateStringArray.join(delimiter);
-
- var actualDateString = dateFilter(new Date(intermediateDateString), dateFormat);
- if (intermediateDateString === actualDateString) {
- return true;
- } else {
- return false;
- }
- }
- };
-
- return {
- setAttributes: setAttributes,
- bindScope: bindScope,
- validateDateString: validateDateString
- };
-}])
-
-.controller('DatepickerController', ['$scope', '$attrs', 'dateFilter', 'datepickerConfig', function($scope, $attrs, dateFilter, 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)
- },
- startingDay = getValue($attrs.startingDay, dtConfig.startingDay);
- $scope.mode = getValue($attrs.mode, dtConfig.mode);
-
- $scope.minDate = dtConfig.minDate ? $scope.resetTime(dtConfig.minDate) : null;
- $scope.maxDate = dtConfig.maxDate ? $scope.resetTime(dtConfig.maxDate) : null;
-
- 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;
- }
-
- 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 isToDate(dt) {
- if (dt && angular.isDate($scope.fromDate) && angular.isDate($scope.currentDate) && compare(dt, $scope.currentDate) === 0) {
- return true;
- }
- return false;
- }
-
- function isDateRange(dt) {
- if (dt && angular.isDate($scope.fromDate) && angular.isDate($scope.currentDate) && (compare(dt, $scope.fromDate) >= 0) && (compare(dt, $scope.currentDate) <= 0)) {
- return true;
- }
- return false;
- }
-
- function isWeekend(date) {
- if (dateFilter(date, format.dayHeader) === "Saturday" || dateFilter(date, format.dayHeader) === "Sunday") {
- return true;
- }
- return false;
- }
-
- function isToday(date) {
- if (compare(date, $scope.resetTime(new Date())) === 0) {
- return true;
- }
- return false;
- }
- function isFocused(date) {
- if (date && angular.isDate($scope.focusedDate) && compare(date, $scope.focusedDate) === 0) {
- return true;
- }
- return false;
- }
-
- var isDisabled = this.isDisabled = function(date) {
- 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));
- };
-
- var compare = this.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())) {
- return true;
- }
- else {
- return false;
- }
- }
-
- function isMaxDateAvailable(startDate, endDate) {
- if(($scope.maxDate && $scope.maxDate.getTime() >= startDate.getTime()) && ($scope.maxDate.getTime() <= endDate.getTime())) {
- return true;
- }
- else {
- return false;
- }
- }
-
- function getLabel(label) {
- if (label)
- {
- var labelObj = {
- pre: label.substr(0, 3),
- post: label
- };
- return labelObj;
- }
- return;
- }
-
- function makeDate(date, dayFormat, dayHeaderFormat, isFocused, isSelected, isFromDate, isToDate, isDateRange, isOld, isNew, isDisabled, isToday, isWeekend) {
- return {date: date, label: dateFilter(date, dayFormat), header: dateFilter(date, dayHeaderFormat), focused: !!isFocused, selected: !!isSelected, from: !!isFromDate, to: !!isToDate, dateRange: !!isDateRange, oldMonth: !!isOld, nextMonth: !!isNew, disabled: !!isDisabled, today: !!isToday, weekend: !!isWeekend};
- }
-
- this.modes = [
- {
- name: 'day',
- getVisibleDates: function(date, calendar) {
- 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,
- isFocused(dt),
- isSelected(dt),
- isFromDate(dt),
- isToDate(dt),
- isDateRange(dt),
- (new Date(dt.getFullYear(), dt.getMonth(), 1, 0, 0, 0).getTime() < new Date(year, month, 1, 0, 0, 0).getTime()),
- (new Date(dt.getFullYear(), dt.getMonth(), 1, 0, 0, 0).getTime() > new Date(year, month, 1, 0, 0, 0).getTime()),
- isDisabled(dt),
- isToday(dt),
- isWeekend(dt));
- }
- for (var j = 0; j < 7; j++) {
- labels[j] = getLabel(dateFilter(days[j].date, format.dayHeader));
- }
- if (calendar === 'top') {
- $scope.disablePrevTop = isMinDateAvailable(firstDayOfMonth, lastDayOfMonth);
- $scope.disableNextTop = isMaxDateAvailable(firstDayOfMonth, lastDayOfMonth);
- } else if (calendar === 'bottom') {
- $scope.disablePrevBottom = isMinDateAvailable(firstDayOfMonth, lastDayOfMonth);
- $scope.disableNextBottom = isMaxDateAvailable(firstDayOfMonth, lastDayOfMonth);
- } else {
- $scope.disablePrevTop = $scope.disablePrevBottom = isMinDateAvailable(firstDayOfMonth, lastDayOfMonth);
- $scope.disableNextTop = $scope.disableNextBottom = isMaxDateAvailable(firstDayOfMonth, lastDayOfMonth);
- }
- $scope.disablePrev = $scope.disablePrevTop || $scope.disablePrevBottom;
- $scope.disableNext = $scope.disableNextTop || $scope.disableNextBottom;
- return {objects: days, title: dateFilter(date, format.dayTitle), labels: labels};
- },
- split: 7,
- step: {months: 1}
- },
- {
- name: 'month',
- getVisibleDates: function(date, calendar) {
- var months = new Array(12), labels = [], year = date.getFullYear(), month = date.getMonth();
- for (var i = 0; i < 12; i++) {
- var dt = new Date(year,i,1);
- months[i] = makeDate(dt,
- format.month,
- format.month,
- isFocused(dt),
- isSelected(dt),
- isFromDate(dt),
- isToDate(dt),
- isDateRange(dt),
- false,
- false,
- isDisabled(dt),
- isToday(dt),
- false
- );
- }
- return {objects: months, title: dateFilter(date, format.year), labels: labels};
- },
- split:3,
- step: {years: 1}
- }
- ];
-
-}])
-
-.directive('datepicker', ['$timeout', function ($timeout) {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/datepicker/datepicker.html',
- scope: {
- currentDate: "=?current",
- fromDate: "=?from"
- },
- require: 'datepicker',
- controller: 'DatepickerController',
- link: function(scope, element, attrs, ctrl) {
- var datepickerCtrl = ctrl;
- var selected, calendarSelected = false;
- scope.focusedDate;
-
- scope.resetTime = function(date) {
- 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 dt;
- };
-
- if (attrs.min) {
- scope.$parent.$watch(attrs.min, function(value) {
- scope.minDate = value ? scope.resetTime(value) : null;
- refill();
- });
- }
- if (attrs.max) {
- scope.$parent.$watch(attrs.max, function(value) {
- scope.maxDate = value ? scope.resetTime(value) : null;
- refill();
- });
- }
-
- // 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 selectedCalendar;
- if(scope.mode === 1){
- selected = new Date();
- selectedCalendar = moveMonth(angular.copy(selected), -1);
- } else {
- selectedCalendar = angular.copy(selected);
- }
-
- var currentMode = datepickerCtrl.modes[scope.mode];
- var currentData = currentMode.getVisibleDates(selectedCalendar, 'top');
- scope.currentRows = split(currentData.objects, currentMode.split);
- scope.currentTitle = currentData.title;
- scope.labels = currentData.labels || [];
-
- var nextData = currentMode.getVisibleDates(moveMonth(angular.copy(selectedCalendar), 1), 'bottom');
- scope.nextRows = split(nextData.objects, currentMode.split);
- scope.nextTitle = nextData.title;
- }
- }
-
- scope.select = function(date) {
- calendarSelected = true;
- if(attrs.from) {
- if(!(angular.isDate(scope.fromDate) && angular.isDate(scope.currentDate))) {
- if(angular.isDate(scope.fromDate)) {
- selectCurrentDate(date);
- } else if(!angular.isDate(scope.fromDate)) {
- selectFromDate(date);
- }
- }
- } else {
- selectCurrentDate(date);
- }
- scope.focusedDate = date;
- };
-
- var selectCurrentDate = function(date) {
- var dt = new Date(date.getFullYear(), date.getMonth(), date.getDate());
- scope.currentDate = dt;
- };
-
- var selectFromDate = function(date) {
- var dt = new Date(date.getFullYear(), date.getMonth(), date.getDate());
- scope.fromDate = dt;
- };
-
- var swapDate = function(fromDate, currentDate) {
- selectFromDate(currentDate);
- $timeout(function () {
- calendarSelected = true;
- scope.focusedDate = currentDate;
- selectCurrentDate(fromDate);
- });
- }
- var moveMonth = function(selectedDate, direction) {
- var step = datepickerCtrl.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;
- };
-
- scope.move = function(direction) {
- selected = moveMonth(angular.copy(selected), direction);
- refill();
- };
-
- scope.$watch('currentDate', function (value) {
- if(angular.isDate(value) && !isNaN(value) && datepickerCtrl.isDisabled(value)) {
- scope.currentDate = null;
- return;
- }
- if (attrs.from) {
- if (!isNaN(value) && !isNaN(scope.fromDate) && datepickerCtrl.compare(value, scope.fromDate) < 0) {
- swapDate(scope.fromDate, value);
- return;
- }
- }
- if (calendarSelected) {
- refill();
- calendarSelected = false;
- } else {
- if (angular.isDefined(value) && value !== null) {
- refill(value);
- } else {
- refill();
- }
- }
- scope.focusedDate = undefined;
- });
-
- scope.$watch('fromDate', function (value) {
- if(angular.isDate(value) && !isNaN(value) && datepickerCtrl.isDisabled(value)) {
- scope.fromDate = null;
- return;
- }
- if (attrs.from) {
- if (!isNaN(scope.currentDate) && !isNaN(value) && datepickerCtrl.compare(scope.currentDate, value) < 0) {
- swapDate(value, scope.currentDate);
- return;
- }
- if (calendarSelected) {
- refill();
- calendarSelected = false;
- } else {
- if (angular.isDefined(value) && value !== null) {
- refill(value);
- } else {
- refill();
- }
- }
- }
- scope.focusedDate = undefined;
- });
- }
- };
-}])
-.directive('datepickerPopup', ['$document', 'datepickerService', '$isElement', '$documentBind', function($document, datepickerService, $isElement, $documentBind) {
- var link = function (scope, elem, attr, ctrl) {
- datepickerService.bindScope(attr, scope);
-
- scope.isOpen = false;
-
- var toggle = scope.toggle = function (show) {
- if(show === true || show === false) {
- scope.isOpen = show;
- } else {
- scope.isOpen = !scope.isOpen;
- }
- };
-
- scope.$watch('current', function () {
- toggle(false);
- });
-
- var outsideClick = function (e) {
- var isElement = $isElement(angular.element(e.target), elem, $document);
- if(!isElement) {
- toggle(false);
- scope.$apply();
- }
- };
-
- $documentBind.click('isOpen', outsideClick, scope);
- };
-
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/datepicker/datepickerPopup.html',
- scope: {
- current: "=current"
- },
- compile: function (elem, attr) {
- var wrapperElement = elem.find('span').eq(1);
- wrapperElement.attr('current', 'current');
- datepickerService.setAttributes(attr, wrapperElement);
-
- return link;
- }
- };
-}])
-
-.directive('attDatepicker', ['$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');
- $element.removeAttr('ng-model');
- $element.attr('ng-model', '$parent.current');
- $element.attr('aria-describedby', 'datepicker');
- $element.attr('format-date', dateFormatString);
- $element.attr('att-input-deny', '[^0-9\/-]');
- $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) {
- $log.error("ng-model is required.");
- return; // do nothing if no ng-model
- }
-
- scope.$watch('current', function(value) {
- ctrl.$setViewValue(value);
- });
- ctrl.$render = function() {
- scope.current = ctrl.$viewValue;
- };
- }
- };
-}])
-
-.directive('formatDate', ['dateFilter', 'datepickerService', function(dateFilter, datepickerService) {
- return {
- restrict: 'A',
- require: 'ngModel',
- link: function(scope, elem, attr, ctrl) {
- var formatDate = "";
- attr.$observe('formatDate', function (value) {
- formatDate = value;
- });
- var dateToString = function(value) {
- if (value) {
- ctrl.$setValidity('invalidDate', true);
- return dateFilter(value, formatDate);
- } else {
- ctrl.$setValidity('invalidDate', false);
- return elem.val();
- }
- };
- var stringToDate = function(value) {
- if(datepickerService.validateDateString(value, formatDate)) {
- ctrl.$setValidity('invalidDate', true);
- return new Date(value);
- } else {
- ctrl.$setValidity('invalidDate', false);
- return null;
- }
- };
- ctrl.$formatters.unshift(dateToString);
- ctrl.$parsers.unshift(stringToDate);
- }
- };
-}])
-
-.directive('attDateFilter', ['$document', 'dateFilter', 'datepickerConfig', 'datepickerService', '$isElement', '$documentBind', function($document, dateFilter, datepickerConfig, datepickerService, $isElement, $documentBind) {
-
- var link = function (scope, elem, attr, ctrl) {
- datepickerService.bindScope(attr, scope);
-
- scope.selectedOption = datepickerConfig.dateFilter.defaultText;
- scope.showDropdownList = false;
- scope.showCalendar = false;
- scope.applyButtonType = "disabled";
-
- scope.currentSelection = "";
- var dateFormatString = angular.isDefined(attr.dateFormat) ? scope.$parent.$eval(attr.dateFormat) : datepickerConfig.dateFormat;
- var inputChange = false;
-
-
-
- var showDropdown = scope.showDropdown = function (show) {
- if(show === true || show === false) {
- scope.showDropdownList = show;
- } else {
- scope.showDropdownList = !scope.showDropdownList;
- }
-
- if (!scope.showDropdownList) {
- scope.focusInputButton = true;
- hideCalendar();
- } else {
- if (scope.currentSelection === 'Custom Single Date' || scope.currentSelection === 'Custom Range') {
- showCalendar();
- }
- }
- };
-
- var resetTime = scope.resetTime = function(date) {
- var dt;
- if (!isNaN(new Date(date))) {
- dt = new Date(date);
- } else {
- return null;
- }
- return new Date(dt.getFullYear(), dt.getMonth(), dt.getDate());
- };
-
- var addDays = scope.addDays = function (date, days) {
- var dt;
- if (!isNaN(new Date(date)) && !isNaN(days)) {
- dt = new Date(date);
- dt.setDate(dt.getDate() + days);
- } else {
- dt = new Date();
- }
- return dt;
- };
- var addMonth = scope.addMonth = function (date, months) {
- var dt;
- if (!isNaN(new Date(date)) && !isNaN(months)) {
- dt = new Date(date);
- dt.setMonth(dt.getMonth() + months);
- } else {
- dt = new Date();
- }
- return dt;
- };
-
- var showCalendar = function() {
- scope.showCalendar = true;
- };
-
- var hideCalendar = function() {
- scope.showCalendar = false;
- if(scope.currentSelection !== 'Custom Single Date' && scope.currentSelection !== 'Custom Range') {
- clear(true);
- }
- };
-
- var setDropdownText = function(value) {
- if(inputChange) {
- return;
- }
-
- var fromDateText = dateFormatString.toUpperCase();
- var currentDateText = dateFormatString.toUpperCase();
-
- if(!isNaN(new Date(scope.fromDate))) {
- fromDateText = dateFilter(scope.fromDate, dateFormatString);
- }
- if(!isNaN(new Date(scope.currentDate))) {
- currentDateText = dateFilter(scope.currentDate, dateFormatString);
- }
-
- if(value === 'Custom Single Date') {
- ctrl.$setValidity('invalidDate', true);
- scope.maxLength = 10;
- scope.selectedOption = currentDateText;
- } else if(value === 'Custom Range') {
- ctrl.$setValidity('invalidDate', true);
- ctrl.$setValidity('invalidDateRange', true);
- scope.maxLength = 21;
- scope.selectedOption = fromDateText + '-' + currentDateText;
- }
- };
-
- scope.getDropdownText = function () {
- inputChange = true;
- var dropdownText = scope.selectedOption;
-
- if (scope.currentSelection === 'Custom Single Date') {
- if (!isNaN(new Date(dropdownText)) && datepickerService.validateDateString(dropdownText, dateFormatString)) {
- ctrl.$setValidity('invalidDate', true);
- scope.fromDate = undefined;
- scope.currentDate = new Date(dropdownText);
- } else {
- ctrl.$setValidity('invalidDate', false);
- clear(true);
- }
- } else if (scope.currentSelection === 'Custom Range') {
- if (dropdownText.indexOf('-') !== -1 && (dropdownText.split('-').length === 2 || dropdownText.split('-').length === 6)) {
- ctrl.$setValidity('invalidDateRange', true);
- var resultDropdownText = dropdownText.split('-');
- if (resultDropdownText.length === 2) {
- resultDropdownText[0] = resultDropdownText[0].trim();
- resultDropdownText[1] = resultDropdownText[1].trim();
- } else if (resultDropdownText.length === 6) {
- var firstDateString = resultDropdownText[0].trim() + '-' + resultDropdownText[1].trim() + '-' + resultDropdownText[2].trim();
- var secondDateString = resultDropdownText[3].trim() + '-' + resultDropdownText[4].trim() + '-' + resultDropdownText[5].trim();
- resultDropdownText[0] = firstDateString;
- resultDropdownText[1] = secondDateString;
- }
-
- if (!isNaN(new Date(resultDropdownText[0])) && !isNaN(new Date(resultDropdownText[1])) && datepickerService.validateDateString(resultDropdownText[0], dateFormatString) && datepickerService.validateDateString(resultDropdownText[1], dateFormatString)) {
- ctrl.$setValidity('invalidDate', true);
- var fromDate = new Date(resultDropdownText[0]);
- var currentDate = new Date(resultDropdownText[1]);
- if(fromDate.getTime() < currentDate.getTime()) {
- ctrl.$setValidity('invalidDateRange', true);
- scope.fromDate = fromDate;
- scope.currentDate = currentDate;
- } else {
- ctrl.$setValidity('invalidDateRange', false);
- clear(true);
- }
- } else {
- ctrl.$setValidity('invalidDate', false);
- clear(true);
- }
- } else {
- ctrl.$setValidity('invalidDateRange', false);
- clear(true);
- }
- }
- };
-
- scope.untrackInputChange = function(ev) {
- inputChange = false;
- };
-
- scope.selectAdvancedOption = function (value, notClearFlag) {
- scope.currentSelection = value;
- if(!notClearFlag){
- clear();
- showCalendar();
- }
- scope.$watch('currentDate', function(val) {
- if(!isNaN(new Date(val))) {
- scope.applyButtonType = "primary";
- setDropdownText(value);
- if (!inputChange) {
- scope.focusApplyButton = true;
- }
- }
- });
- scope.$watch('fromDate', function(val) {
- if(!isNaN(new Date(val))) {
- setDropdownText(value);
- }
- });
- if (value === 'Custom Single Date') {
- scope.focusSingleDateCalendar = true;
- } else if (value === 'Custom Range') {
- scope.focusRangeCalendar = true;
- }
- };
-
- scope.resetFocus = function (ev) {
- scope.focusSingleDateCalendar = false;
- scope.focusRangeCalendar = false;
- scope.focusApplyButton = false;
- };
-
- scope.apply = function() {
- scope.dateRange.selection = scope.selectedOption;
- if(!isNaN(new Date(scope.fromDate))) {
- scope.from = scope.fromDate;
- scope.dateRange.from = scope.fromDate;
- } else {
- scope.from = undefined;
- scope.dateRange.from = undefined;
- }
- if(!isNaN(new Date(scope.currentDate))) {
- scope.current = scope.currentDate;
- scope.dateRange.current = scope.currentDate;
- } else {
- scope.current = undefined;
- scope.dateRange.current = undefined;
- }
-
- showDropdown();
- };
-
- scope.$watchCollection(function() {
- return scope.dateRange;
- }, function(value) {
- if(ctrl) {
- var finalDateRange = angular.copy(value);
- ctrl.$setViewValue(finalDateRange);
- }
- });
-
- ctrl.$render = function() {
- if (ctrl.$viewValue) {
- var inputRange = ctrl.$viewValue;
- scope.selectedOption = inputRange.selection;
- scope.fromDate = inputRange.from;
- scope.currentDate = inputRange.current;
- if(scope.fromDate !== undefined && scope.currentDate !== undefined){
- scope.selectAdvancedOption('Custom Range',true);
- scope.dateRange.from= scope.fromDate;
- scope.dateRange.current = scope.currentDate;
- }else if(scope.currentDate !== undefined){
- scope.selectAdvancedOption('Custom Single Date',true);
- }
- }
- };
-
- var cancel = scope.cancel = function() {
- scope.currentSelection = "";
- scope.selectedOption = datepickerConfig.dateFilter.defaultText;
- showDropdown();
- };
-
- var clear = scope.clear = function(partial) {
- scope.fromDate = undefined;
- scope.currentDate = undefined;
- scope.applyButtonType = "disabled";
- if(!partial) {
- ctrl.$setValidity('invalidDate', true);
- ctrl.$setValidity('invalidDateRange', true);
- setDropdownText(scope.currentSelection);
- }
- };
-
- var outsideClick = function (e) {
- var isElement = $isElement(angular.element(e.target), elem, $document);
- if(!isElement) {
- scope.cancel();
- scope.$apply();
- }
- };
-
- $documentBind.click('showDropdownList', outsideClick, scope);
- };
-
- return {
- restrict: 'EA',
- scope: {
- from: '=?from',
- current: "=?current"
- },
- replace: true,
- require: '?ngModel',
- transclude:true,
- templateUrl: 'app/scripts/ng_js_att_tpls/datepicker/dateFilter.html',
- controller:['$scope', '$element', '$attrs',function($scope, $element, $attrs){
- $scope.dateRange = {
- selection: undefined,
- from: undefined,
- current: undefined
- };
- this.selectOption = function (fromDate,toDate,caption) {
- $scope.selectedOption = caption;
- $scope.currentSelection =caption;
- $scope.dateRange.selection = caption;
- $scope.dateRange.current = $scope.resetTime(toDate);
- $scope.dateRange.from = $scope.resetTime(fromDate);
- $scope.showDropdown();
- };
- $scope.checkCurrentSelection=this.checkCurrentSelection = function(value) {
- if(value === $scope.currentSelection) {
- return true;
- }
- return false;
- };
- }],
- compile: function(elem, attr) {
- var singleDateCalendar = elem.find('span').eq(4);
- var rangeCalendar = elem.find('span').eq(5);
- rangeCalendar.attr('from', 'fromDate');
- singleDateCalendar.attr('current', 'currentDate');
- rangeCalendar.attr('current', 'currentDate');
- datepickerService.setAttributes(attr, singleDateCalendar);
- datepickerService.setAttributes(attr, rangeCalendar);
-
- return link;
- }
- };
-}])
-.directive('attDateFilterList',function(){
- return{
- restrict:'EA',
- scope:{
- fromDate:'=fromDate',
- toDate:'=toDate',
- caption:'=caption',
- disabled:'=disabled'
- },
- require:'^attDateFilter',
- transclude:true,
- replace:true,
- templateUrl:'app/scripts/ng_js_att_tpls/datepicker/dateFilterList.html',
- link:function(scope,elem,attr,ctrl){
- scope.selectOption=function(fromDate,toDate,caption){
- ctrl.selectOption(fromDate,toDate,caption);
- }
- scope.checkCurrentSelection=ctrl.checkCurrentSelection;
-
- }
- }
-});
-angular.module('att.abs.devNotes', [])
-
- .directive('attDevNotes', function() {
- return {
- restrict: 'EA',
- transclude: true,
- scope: {},
- controller: function($scope){
- var panes = $scope.panes = [];
- $scope.select = function(pane)
- {
- angular.forEach(panes, function(pane)
- {
- pane.selected = false;
- });
- pane.selected = true;
- };
- this.addPane = function(pane) {
- if (panes.length === 0) {
- $scope.select(pane);
- }
- panes.push(pane);
- };
- },
- template:'<div>'+
- '<ul class="tabs">' +
- '<li ng-repeat="pane in panes" ng-class="{active:pane.selected}">'+
- '<a href="javascript:void(0)" ng-click="select(pane)">{{pane.title}}</a>' +
- '</li>' +
- '</ul>' +
- '<div ng-transclude></div>'+
- '</div>',
- replace: true
- };
- })
-
- .directive('pane', function() {
- return {
- require: '^attDevNotes',
- restrict: 'EA',
- transclude: true,
- scope: {
- title: '@'
- },
- link: function(scope, element, attrs, tabsCtrl) {
- tabsCtrl.addPane(scope);
- },
- template:
- '<div class="tab-pane" ng-class="{active: selected}">' +
- '<pre ng-class="{\'language-markup\':title==\'HTML\',\'language-javascript\':title==\'JavaScript\'}" class=" line-numbers">' +
- '<code ng-transclude></code>' +
- '</pre>' +
- '</div>',
- replace: true
- };
- });
-
-angular.module('att.abs.dividerLines', [])
- .directive('attDividerLines', [function()
- {
- return {
- scope: {
- attDividerLines: '@'
- },
- restrict: 'A',
- replace: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/dividerLines/dividerLines.html',
- link: function(scope, element, attribute)
- {
- scope.lightContainer = attribute.attDividerLines;
- }
- };
- }]);
-
-angular.module('att.abs.dragdrop', [])
- .directive('attFileDrop', ['$parse', function($parse) {
- return {
- restrict: 'A',
- scope: {
- fileModel : '=',
- onDrop : '&',
- attFileDrop : '&'
- },
- controller: ['$scope', '$attrs', function($scope, $attrs){
- if($attrs.attFileDrop!==""){
- $scope.onDrop=$scope.attFileDrop;
- }
- this.onDrop = $scope.onDrop;
- }],
- link: function(scope, element) {
- element.addClass('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('dragdrop-over');
- return false;
- }
- );
- element.bind(
- 'dragenter',
- function(e) {
- // allows us to drop
- if (e.preventDefault) {
- e.preventDefault();
- }
- element.addClass('dragdrop-over');
- return false;
- }
- );
- element.bind(
- 'dragleave',
- function() {
- element.removeClass('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('dragdrop-over');
- if(e.dataTransfer.files && e.dataTransfer.files.length > 0){
- scope.fileModel = e.dataTransfer.files[0];
- scope.$apply();
- if(typeof scope.onDrop === "function"){
- scope.onDrop = $parse(scope.onDrop);
- scope.onDrop();
- }
- }
- return false;
- }
- );
- }
- };
- }])
- .directive('attFileLink', [ function() {
- return {
- restrict: 'EA',
- require: '^?attFileDrop',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/dragdrop/fileUpload.html',
- scope: {
- fileModel : '=?',
- onFileSelect : '&',
- attFileLink : '&'
- },
- controller: ['$scope', '$parse', function($scope, $parse){
- this.setFileModel= function(fileModel){
- if($scope.takeFileModelFromParent){
- $scope.$parent.fileModel = fileModel;
- $scope.$parent.$apply();
- }
- else{
- $scope.fileModel = fileModel;
- $scope.$apply();
- }
- };
- this.callbackFunction= function(){
- if(typeof $scope.onFileSelect === "function"){
- $scope.onFileSelect = $parse($scope.onFileSelect);
- $scope.onFileSelect();
- }
- };
- }],
- link: function(scope, element, attr, attFileDropCtrl) {
- scope.takeFileModelFromParent = false;
- if(!(attr.fileModel) && attFileDropCtrl){
- scope.takeFileModelFromParent = true;
- }
- if(attr.attFileLink!==""){
- scope.onFileSelect=scope.attFileLink;
- }
- else if(!(attr.onFileSelect) && attFileDropCtrl){
- scope.onFileSelect = attFileDropCtrl.onDrop;
- }
- }
- };
- }])
- .directive('attFileChange', [function() {
- return {
- restrict: 'A',
- require: '^attFileLink',
- link: function(scope, element, attr, attFileLinkCtrl) {
- element.bind(
- 'change',
- function (e) {
- if(e.target.files && e.target.files.length > 0){
- attFileLinkCtrl.setFileModel(e.target.files[0]);
- attFileLinkCtrl.callbackFunction();
- }
- else{
- var strFileName = e.target.value;
- var objFSO = new ActiveXObject("Scripting.FileSystemObject");
- attFileLinkCtrl.setFileModel(objFSO.getFile(strFileName));
- attFileLinkCtrl.callbackFunction();
- }
- }
- );
- }
- };
- }]);
-angular.module("att.abs.drawer", [])
-.directive('attDrawer', ['$document', '$timeout', function ($document, $timeout) {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- scope: {
- drawerOpen: "=?",
- drawerAutoClose: "=?"
- },
- template: '<div><div class="att-drawer" ng-transclude></div><div ng-class="{\'drawer-backdrop\':drawerOpen}"></div></div>',
- link: function ($scope, element, attrs) {
- var param = {};
- // Override default parameters
- param.side = attrs.drawerSlide || 'top';
- param.speed = attrs.drawerSpeed || '0.25';
- param.size = attrs.drawerSize || '300px';
- param.zindex = attrs.drawerZindex || 1000;
- param.className = attrs.drawerClass || 'att-drawer';
- var slider = element.eq(0).children()[0];
- var content = angular.element(slider).children()[0];
- slider.className = param.className;
- /* Style setup */
- slider.style.transitionDuration = param.speed + 's';
- slider.style.webkitTransitionDuration = param.speed + 's';
- slider.style.zIndex = param.zindex;
- slider.style.position = 'fixed';
- slider.style.width = 0;
- slider.style.height = 0;
- slider.style.transitionProperty = 'width, height';
- if(param.side==='right' || param.side==='left'){
- slider.style.height = attrs.drawerCustomHeight || '100%';
- slider.style.top = attrs.drawerCustomTop || '0px';
- slider.style.bottom = attrs.drawerCustomBottom || '0px';
- slider.style.right = attrs.drawerCustomRight || '0px';
- }
- else if(param.side==='top' || param.side==='bottom'){
- slider.style.width = attrs.drawerCustomWidth || '100%';
- slider.style.left = attrs.drawerCustomLeft || '0px';
- slider.style.top = attrs.drawerCustomTop || '0px';
- slider.style.right = attrs.drawerCustomRight || '0px';
- }
- /* Closed */
- function drawerClose(slider, param) {
- if (slider && slider.style.width !== 0 && slider.style.height !== 0){
- content.style.display = 'none';
- if(param.side==='right' || param.side==='left'){
- slider.style.width = '0px';
- }
- else if(param.side==='top' || param.side==='bottom'){
- slider.style.height = '0px';
- }
- }
- $scope.drawerOpen = false;
- }
- /* Open */
- function drawerOpen(slider, param) {
- if (slider.style.width !== 0 && slider.style.height !== 0){
- if(param.side==='right' || param.side==='left'){
- slider.style.width = param.size;
- }
- else if(param.side==='top' || param.side==='bottom'){
- slider.style.height = param.size;
- }
- $timeout(function() {
- content.style.display = 'block';
- },(param.speed * 1000));
- }
- }
- function isFunction(functionToCheck) {
- var getType = {};
- return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
- }
- /*
- * Watchers
- * */
- if(attrs.drawerSize) {
- $scope.$watch(function() {
- return attrs.drawerSize;
- }, function(newVal) {
- param.size = newVal;
- if($scope.drawerOpen) {
- drawerOpen(slider,param);
- }
- });
- }
- $scope.$watch("drawerOpen", function (value){
- if (!!value) {
- // Open
- drawerOpen(slider,param);
- } else {
- // Close
- drawerClose(slider,param);
- }
- });
- // close panel on location change
- if($scope.drawerAutoClose) {
- $scope.$on("$locationChangeStart", function(){
- drawerClose(slider, param);
- if(isFunction($scope.drawerAutoClose)) {
- $scope.drawerAutoClose();
- }
- });
- $scope.$on("$stateChangeStart", function(){
- drawerClose(slider, param);
- if(isFunction($scope.drawerAutoClose)) {
- $scope.drawerAutoClose();
- }
- });
- }
- }
- };
- }
-]);
-angular.module('att.abs.message', [])
-
-.directive('attMessages', [function() {
- return {
- restrict: 'EA',
- scope: true,
- controller: ['$scope', '$element', '$attrs', function($scope, $element, $attrs) {
- $scope.messageType;
- $scope.$watchCollection($attrs['for'], function(errors) {
- for (var key in errors) {
- if (errors[key]) {
- $scope.error = key;
- break;
- } else {
- $scope.error = null;
- }
- };
- if ($scope.error === null) {
- $scope.messageType = null;
- $element.removeAttr('message-type');
- }
- });
- this.setMessageType = function(messageType) {
- $scope.messageType = messageType;
- };
- $scope.$watch('messageType', function(value) {
- if (angular.isDefined(value) && value !== null) {
- $element.attr('message-type', value);
- }
- });
- }]
- };
-}])
-
-.directive('attMessage', [function() {
- return {
- restrict: 'EA',
- scope: {},
- require: '^attMessages',
- link: function(scope, elem, attr, ctrl) {
- scope.when = attr.when || attr.attMessage;
- scope.type = attr.type;
- elem.css({display: 'none'});
- scope.$parent.$watch('error', function(value) {
- if (value === scope.when) {
- elem.css({display: 'block'});
- ctrl.setMessageType(scope.type);
- } else {
- elem.css({display: 'none'});
- }
- });
- }
- };
-}]);
-
-angular.module('att.abs.formField', ['att.abs.message'])
-
-.directive('attFormField', [function() {
- return {
- priority: 101,
- restrict: 'A',
- controller:function() {
- },
- link: function(scope, elem, attr) {
- elem.wrap('<div class="form-field"></div>');
- elem.parent().append('<label class="form-field__label">' + attr.placeholder || attr.attFormField + '</label>');
- elem.wrap('<div class="form-field-input-container"></div>');
-
- elem.bind('keyup', function() {
- if (this.value !== '') {
- elem.parent().parent().find('label').addClass('form-field__label--show').removeClass('form-field__label--hide');
- } else {
- elem.parent().parent().find('label').addClass('form-field__label--hide').removeClass('form-field__label--show');
- }
- });
-
- elem.bind('blur', function() {
- if (this.value === '') {
- elem.parent().parent().find('label').removeClass('form-field__label--hide');
- }
- });
- }
- };
-}])
-
-.directive('attFormFieldValidation', ['$compile', '$log', function($compile, $log) {
- return {
- priority: 102,
- scope: {},
- restrict: 'A',
- require: ['?ngModel', '?attFormField'],
- link: function(scope, elem, attr, ctrl) {
- var ngCtrl = ctrl[0];
- var attFormFieldCtrl = ctrl[1];
- scope.valid = "";
- if (!ngCtrl) {
- $log.error("att-form-field-validation :: ng-model directive is required.");
- return;
- }
- if (!attFormFieldCtrl) {
- $log.error("att-form-field-validation :: att-form-field directive is required.");
- return;
- }
-
- elem.parent().append($compile(angular.element('<i class="icon-info-alert error" ng-show="valid===false">&nbsp;</i>'))(scope));
- elem.parent().append($compile(angular.element('<i class="icon-info-success success" ng-show="valid===true">&nbsp;</i>'))(scope));
-
- scope.$watch('valid', function(value) {
- if (value) {
- elem.parent().parent().addClass('success');
- } else if (value === false) {
- elem.parent().parent().addClass('error');
- } else {
- elem.parent().parent().removeClass('success').removeClass('error');
- }
- });
-
- elem.bind('keyup', function() {
- if (ngCtrl.$valid) {
- scope.valid = true;
- } else if (ngCtrl.$invalid) {
- scope.valid = false;
- } else {
- scope.valid = "";
- }
- scope.$apply();
- });
- }
- };
-}])
-
-.directive('attFormFieldValidationAlert', ['$timeout', function($timeout) {
- return {
- scope: {},
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/formField/attFormFieldValidationAlert.html',
- link: function(scope, elem) {
- scope.showLabel = false;
- scope.hideLabel = false;
- scope.errorMessage = false;
- scope.warningMessage = false;
- var checkMessageType = function() {
- if (elem.find('att-messages').attr('message-type') === 'error') {
- scope.errorMessage = true;
- scope.warningMessage = false;
- } else if (elem.find('att-messages').attr('message-type') === 'warning') {
- scope.errorMessage = false;
- scope.warningMessage = true;
- } else {
- scope.errorMessage = false;
- scope.warningMessage = false;
- }
- };
-
- elem.find('label').text(elem.find('input').attr('placeholder'));
- elem.find('input').bind('keyup', function() {
- if (this.value !== '') {
- scope.showLabel = true;
- scope.hideLabel = false;
- } else {
- scope.showLabel = false;
- scope.hideLabel = true;
- }
- checkMessageType();
- scope.$apply();
- });
-
- elem.find('input').bind('blur', function() {
- if (this.value === '') {
- scope.showLabel = false;
- scope.hideLabel = false;
- }
- scope.$apply();
- });
- $timeout(function() {
- checkMessageType();
- }, 100);
- }
- };
-}]);
-
-angular.module('att.abs.hourpicker', ['att.abs.utilities'])
- .constant('hourpickerConfig', {
- days: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
- customOption: 'Custom'
- })
-
- .controller('hourPickerController', ['$scope', function($scope) {
-
- $scope.options = [];
- this.setOptions = function(value, fromtime, totime, preselect, uncheckedFromTime,uncheckedToTime) {
- $scope.options.push(value);
-
- if (preselect !== undefined) {
- $scope.preselect = preselect;
- }
-
- var daycount;
-
- if (fromtime !== undefined) {
- $scope.fromtime = fromtime;
- for (daycount in $scope.days) {
- if ($scope.days.hasOwnProperty(daycount)) {
- $scope.FrtimeList[$scope.days[daycount]] = {};
- if(uncheckedFromTime !== undefined){
- $scope.FrtimeList[$scope.days[daycount]].value = uncheckedFromTime;
- $scope.selectedFromOption[$scope.days[daycount]] = uncheckedFromTime;
- }else{
- $scope.FrtimeList[$scope.days[daycount]].value = fromtime[0].value;
- $scope.selectedFromOption[$scope.days[daycount]] = fromtime[0].value;
- }
- }
- }
- }
- if (totime !== undefined) {
- $scope.totime = totime;
- for (daycount in $scope.days) {
- if ($scope.days.hasOwnProperty(daycount)) {
- $scope.TotimeList[$scope.days[daycount]] = {};
- if(uncheckedToTime !== undefined){
- $scope.TotimeList[$scope.days[daycount]].value = uncheckedToTime;
- $scope.selectedToOption[$scope.days[daycount]] = uncheckedToTime;
- }else{
- $scope.TotimeList[$scope.days[daycount]].value = totime[0].value;
- $scope.selectedToOption[$scope.days[daycount]] = totime[0].value;
- }
- }
- }
- }
-
- if(uncheckedFromTime !== undefined){
- $scope.uncheckedFromTime = uncheckedFromTime;
- }
- if(uncheckedToTime !== undefined){
- $scope.uncheckedToTime = uncheckedToTime;
- }
- };
- }])
-
- .directive('attHourpickerOption', [function() {
- return {
- restrict: 'EA',
- require: '^attHourpicker',
- scope: {
- option: "=option",
- fromtime: "=fromtime",
- totime: "=totime",
- preselect: "=preselect",
- uncheckedFromTime: "=",
- uncheckedToTime: "="
- },
- link: function(scope, element, attr, ctrl) {
- ctrl.setOptions(scope.option,
- scope.fromtime,
- scope.totime,
- scope.preselect,
- scope.uncheckedFromTime,
- scope.uncheckedToTime);
- }
- };
- }])
-
- .directive('attHourpicker', ["hourpickerConfig", "$document", "$log", "$documentBind", "$timeout", function(hourpickerConfig, $document, $log, $documentBind, $timeout) {
- return{
- require: 'ngModel',
- restrict: 'EA',
- controller: 'hourPickerController',
- transclude: true,
- scope:{
- model: "=ngModel",
- resetFlag: "=?"
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/hourpicker/hourpicker.html',
- link: function(scope, element, attr, ctrl) {
- var flag = false;
- scope.isFromDropDownOpen = false;
- scope.isToDropDownOpen = false;
- var dropDownOpenValue = "";
- var custTime = {};
- scope.days = hourpickerConfig.days;
- scope.daysList = {};
- scope.FrtimeList = {};
- scope.FrtimeListDay = {};
- scope.TotimeListDay = {};
- scope.selectedFromOption = {};
- scope.selectedToOption = {};
- scope.TotimeList = {};
- scope.selectedIndex = 0;
- scope.selectedOption = "Select from list";
- scope.customTime = [];
-
- scope.resetFlag = false;
-
- scope.$watch('resetFlag', function(newVal, oldVal){
- if(newVal !== oldVal){
- if( newVal && scope.selectedOption === hourpickerConfig.customOption ){
- //disable and reset all days checkbox
- for (day in scope.daysList) {
- if (scope.daysList.hasOwnProperty(day)) {
- scope.daysList[day] = false;
- scope.addSelectedValue(day);
- }
- }
- scope.preselectUpdateFxn(scope.preselect);
- }
- scope.resetFlag = false;
- }
- });
-
- scope.$watch('selCategory', function(value) {
- if (value){
- ctrl.$setViewValue(value);
- }
- });
- scope.$watch('model', function(value,oldValue) {
- if (value && oldValue && angular.toJson(value) !== angular.toJson(oldValue)) {
- scope.updateData(value);
- }});
-
- scope.updateData = function(value) {
- if (value.constructor === Array) {
- scope.showDaysSelector = true;
- scope.selectedOption = hourpickerConfig.customOption;
- for (var arry in value) {
- if (value.hasOwnProperty(arry)) {
- var day = value[arry].day;
- scope.daysList[day] = true;
-
- for (var fromcount in scope.fromtime) {
- if (scope.fromtime[fromcount].value === value[arry].FromTime) {
- scope.FrtimeList[day].value = scope.fromtime[fromcount].value;
- scope.selectedFromOption[day] = scope.FrtimeList[day].value;
- }
- }
- for (var tocount in scope.totime) {
- if (scope.totime[tocount].value === value[arry].ToTime) {
- scope.TotimeList[day].value = scope.totime[tocount].value;
- scope.selectedToOption[day] = scope.TotimeList[day].value;
- }
- }
- scope.addSelectedValue(day, value[arry].FromTime, value[arry].ToTime);
- //for IE8 Fix
- if (parseInt(arry) + 1 === value.length) {
- break;
- }
- }
- }
- }
- else {
- scope.selectOption(value.day);
- }
- };
-
- scope.$watch('preselect', function(value){
- scope.preselectUpdateFxn(value);
- });
-
- scope.preselectUpdateFxn = function(value){
- if (value !== undefined) {
- if(scope.options){
- value = scope.validatePreselectData(value);
- }
- if (value === "") {
- return;
- }
- scope.updateData(value);
- }
- };
-
- scope.validatePreselectData = function(value){
- if (value.constructor === Array) {
- for (var arry in value) {
- if (value.hasOwnProperty(arry)) {
- var day = value[arry].day;
- var isDayFound = false;
- var isFrmFound = false;
- var isToFound = false;
- for (var daycount in scope.days) {
- if (scope.days[daycount] === day) {
- isDayFound = true;
- break;
- }
- }
- if (!isDayFound) {
- value.splice(arry, 1);
- continue;
- }
- for (var fromcount in scope.fromtime) {
- if (scope.fromtime[fromcount].value === value[arry].FromTime) {
- isFrmFound = true;
- break;
- }
- }
- if (!isFrmFound) {
- value[arry].FromTime = scope.fromtime[0].value;
- }
- for (var tocount in scope.totime) {
- if (scope.totime[tocount].value === value[arry].ToTime) {
- isToFound = true;
- break;
- }
- }
- if (!isToFound) {
- value[arry].ToTime = scope.totime[0].value;
- }
- //for IE8 Fix
- if (parseInt(arry) + 1 === value.length) {
- break;
- }
- }
- }
- }
- else {
- var isOptionFound = false;
- for (var optcount in scope.options) {
- if (scope.options[optcount] === value.day) {
- isOptionFound = true;
- break;
- }
- }
- if (!isOptionFound) {
- value = "";
- }
- }
- return value;
- };
-
- scope.selectPrevNextValue = function($event, arrayValues, currValue) {
-
- var value;
- var index = 0;
- if ($event.keyCode === 38) {
- value = -1;
- } else if ($event.keyCode === 40) {
- value = 1;
- } else {
- return currValue;
- }
-
- if (arrayValues.indexOf(currValue) !== -1) {
- index = arrayValues.indexOf(currValue) + value;
- } else {
- for (var count in arrayValues) {
- if (arrayValues[count].value === currValue) {
- index = parseInt(count) + value;
- break;
- }
- }
- }
-
- if (index === arrayValues.length) {
- index = index - 1;
- } else if (index === -1) {
- index = index + 1;
- }
-
- $event.preventDefault();
- if (arrayValues[index].value){
- return arrayValues[index].value;
- }
- else{
- return arrayValues[index];
- }
- };
-
- scope.showDropdown = function()
- {
- scope.showlist = !scope.showlist;
- flag = !flag;
- };
-
- scope.showfromDayDropdown = function(value)
- {
- //close dropdown if any other From drop down is opened
- for (count in scope.FrtimeListDay) {
- if (count !== value && scope.FrtimeListDay[count]) {
- scope.FrtimeListDay[count] = false;
- }
- }
- for (count in scope.TotimeListDay) {
- if (scope.TotimeListDay[count]) {
- scope.TotimeListDay[count] = false;
- }
- }
- scope.FrtimeListDay[value] = !scope.FrtimeListDay[value];
- flag = !flag;
- scope.showlist = false;
-
- //save model value so we can close current dropdown on click of other part of the document
- if (scope.FrtimeListDay[value]) {
- scope.isFromDropDownOpen = true;
- dropDownOpenValue = value;
- } else {
- scope.isFromDropDownOpen = false;
- }
-
- $timeout(function () {
- if(scope.FrtimeListDay[value]){
- var daysContainerDIV = angular.element(element)[0].querySelector(".customdays-width");
- var containerUL = angular.element(daysContainerDIV.querySelector('.select2-container-active')).parent()[0].querySelector("ul");
- var selectedElemTopPos = angular.element(containerUL.querySelector('.selectedItemInDropDown'))[0].offsetTop;
- angular.element(containerUL)[0].scrollTop = selectedElemTopPos;
- }
- });
- };
-
- scope.showtoDayDropdown = function(value)
- {
- //close dropdown if any other To drop down is opened
- for (count in scope.TotimeListDay) {
- if (count !== value && scope.TotimeListDay[count]) {
- scope.TotimeListDay[count] = false;
- }
- }
- for (count in scope.FrtimeListDay) {
- if (scope.FrtimeListDay[count]) {
- scope.FrtimeListDay[count] = false;
- }
- }
- scope.TotimeListDay[value] = !scope.TotimeListDay[value];
- flag = !flag;
- scope.showlist = false;
-
- //save model value so we can close current dropdown on click of other part of the document
- if (scope.TotimeListDay[value]) {
- scope.isToDropDownOpen = true;
- dropDownOpenValue = value;
-
- } else {
- scope.isToDropDownOpen = false;
- }
-
- $timeout(function () {
- if(scope.FrtimeListDay[value]){
- var daysContainerDIV = angular.element(element)[0].querySelector(".customdays-width");
- var containerUL = angular.element(daysContainerDIV.querySelector('.select2-container-active')).parent()[0].querySelector("ul");
- var selectedElemTopPos = angular.element(containerUL.querySelector('.selectedItemInDropDown'))[0].offsetTop;
- angular.element(containerUL)[0].scrollTop = selectedElemTopPos;
- }
- });
- };
-
- scope.selectFromDayOption = function(day, value)
- {
- scope.selectedFromOption[day] = value;
- scope.FrtimeList[day].value = value;
- scope.FrtimeListDay[day] = false;
- scope.isFromDropDownOpen = false;
- };
-
- scope.selectToDayOption = function(day, value)
- {
- scope.selectedToOption[day] = value;
- scope.TotimeList[day].value = value;
- scope.TotimeListDay[day] = false;
- scope.isToDropDownOpen = false;
- };
-
- scope.addSelectedValue = function(value, fromtime, totime) {
- var count,len;
- if (scope.daysList[value] !== undefined && !scope.daysList[value]) {
- for (count = 0, len = scope.customTime.length; count < len; count++) {
- if (scope.customTime[count].day === value) {
- if(scope.uncheckedFromTime){
- scope.selectedFromOption[scope.customTime[count].day] = scope.uncheckedFromTime;
- }
- else{
- scope.selectedFromOption[scope.customTime[count].day] = scope.FrtimeList[scope.customTime[count].day].value;
- }
-
- if(scope.uncheckedToTime){
- scope.selectedToOption[scope.customTime[count].day] = scope.uncheckedToTime;
- }
- else{
- scope.selectedToOption[scope.customTime[count].day] = scope.TotimeList[scope.customTime[count].day].value;
- }
-
- scope.customTime.splice(count, 1);
- break;
- }
- }
- }
- else {
- if(scope.selectedFromOption[value] === scope.uncheckedFromTime){
- scope.selectedFromOption[value] = scope.fromtime[0].value;
- fromtime = scope.fromtime[0].value;
- scope.FrtimeList[value].value = scope.fromtime[0].value;
- }
-
- if(scope.selectedToOption[value] === scope.uncheckedToTime){
- scope.selectedToOption[value] = scope.totime[0].value;
- totime = scope.totime[0].value;
- scope.TotimeList[value].value = scope.totime[0].value;
- }
-
- custTime["day"] = value;
- custTime["FromTime"] = scope.FrtimeList[value].value;
- custTime["ToTime"] = scope.TotimeList[value].value;
-
- for (count = 0, len = scope.customTime.length; count < len; count++) {
- if (scope.customTime[count].day === value) {
- scope.customTime[count].FromTime = custTime["FromTime"];
- scope.customTime[count].ToTime = custTime["ToTime"];
- break;
- }
- }
- if (count === len) {
- var x = angular.copy(custTime);
- scope.customTime.push(x);
- }
- }
- scope.selCategory = scope.customTime;
- };
-
-
- var outsideClick = function() {
- if (scope.showlist) {
- scope.$apply(function() {
- scope.showlist = false;
- });
- }
- };
-
- $documentBind.click('showlist', outsideClick, scope);
-
- var outsideClickFromDropdown = function() {
- scope.$apply(function() {
- if (scope.isFromDropDownOpen) {
- scope.FrtimeListDay[dropDownOpenValue] = false;
- scope.isFromDropDownOpen = false;
- }
- });
- };
-
- $documentBind.click('isFromDropDownOpen', outsideClickFromDropdown, scope);
-
- var outsideClickToDropdown = function() {
- scope.$apply(function() {
- if (scope.isToDropDownOpen) {
- scope.TotimeListDay[dropDownOpenValue] = false;
- scope.isToDropDownOpen = false;
- }
- });
- };
-
- $documentBind.click('isToDropDownOpen', outsideClickToDropdown, scope);
-
- scope.selectOption = function(sItem)
- {
-
- if (sItem === hourpickerConfig.customOption) {
- scope.showDaysSelector = true;
- scope.selCategory = scope.customTime;
- } else {
- scope.showDaysSelector = false;
- var fromTime = /[0-9]\s?am/i.exec(sItem);
- var toTime = /[0-9]\s?pm/i.exec(sItem);
- scope.selCategory = {day: sItem, FromTime: fromTime === null ? 'NA' : fromTime[0], ToTime: toTime === null ? 'NA' : toTime[0]};
- }
-
- scope.showlist = false;
- flag = false;
- scope.selectedOption = sItem;
- };
- }
- };
- }]);
-
-angular.module('att.abs.iconButtons', [])
- .constant('buttonConfig', {
- activeClass: 'active--button',
- toggleEvent: 'click'
- })
- .directive('attIconBtnRadio', ['buttonConfig', function(buttonConfig) {
- var activeClass = buttonConfig.activeClass || 'active--button';
- var toggleEvent = buttonConfig.toggleEvent || 'click';
- return {
- require: 'ngModel',
- link: function(scope, element, attrs, ngModelCtrl) {
- element.attr("role","button");
- element.attr("tabindex","0");
- element.append("<span class='hidden-spoken'>"+attrs.attIconBtnRadio+"</span>");
- //model -> UI
- ngModelCtrl.$render = function() {
- element.parent().toggleClass(activeClass, angular.equals(ngModelCtrl.$modelValue, attrs.attIconBtnRadio));
- };
- //ui->model
- element.parent().bind(toggleEvent, function() {
- if (!element.parent().hasClass(activeClass)) {
- scope.$apply(function() {
- ngModelCtrl.$setViewValue(attrs.attIconBtnRadio);
- ngModelCtrl.$render();
- });
- }
- });
- }
- };
- }])
- .directive('attIconBtnCheckbox', ['buttonConfig', function(buttonConfig) {
- var activeClass = buttonConfig.activeClass || 'active--button';
- var toggleEvent = buttonConfig.toggleEvent || 'click';
- return {
- require: 'ngModel',
- link: function(scope, element, attrs, ngModelCtrl) {
- element.attr("role","button");
- element.attr("tabindex","0");
- element.append("<span class='hidden-spoken'>"+attrs.attIconBtnCheckbox+"</span>");
- function getTrueValue() {
- var trueValue = scope.$eval(attrs.btnCheckboxTrue);
- return angular.isDefined(trueValue) ? trueValue : true;
- }
- function getFalseValue() {
- var falseValue = scope.$eval(attrs.btnCheckboxFalse);
- return angular.isDefined(falseValue) ? falseValue : false;
- }
- //model -> UI
- ngModelCtrl.$render = function() {
- element.parent().toggleClass(activeClass, angular.equals(ngModelCtrl.$modelValue, getTrueValue()));
- };
- //ui->model
- element.parent().bind(toggleEvent, function() {
- scope.$apply(function() {
- ngModelCtrl.$setViewValue(element.parent().hasClass(activeClass) ? getFalseValue() : getTrueValue());
- ngModelCtrl.$render();
- });
- });
- }
- };
- }]);
-
-angular.module('att.abs.links', ['ngSanitize'])
- .directive('attLink', [function() {
- return {
- restrict: 'A',
- link: function(scope, elem) {
- elem.addClass('link');
- if(!(elem.attr('href'))){
- elem.attr("tabindex", "0");
- }
- }
- };
- }])
- .directive('attLinkVisited', [function() {
- return {
- restrict: 'A',
- link: function(scope, elem) {
- elem.addClass('link--visited');
- if(!(elem.attr('href'))){
- elem.attr("tabindex", "0");
- }
- }
- };
- }])
- .directive('attReadmore', ['$timeout',function($timeout) {
- return {
- restrict: 'A',
- scope: {
- lines:"@noOfLines",
- textModel: "=",
- //attribute to use readmore inside accordion
- isOpen: "="
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/links/readMore.html',
- link: function(scope, elem) {
- var height = 1;
- scope.$watch('textModel', function(val){
- if(!val){
- scope.textToDisplay = '';
- scope.readMoreLink = false;
- scope.readLessLink = false;
- scope.readFlag = false;
- }
- else{
- if (typeof String.prototype.trim !== 'function') {
- String.prototype.trim = function() {
- return this.replace(/^\s+|\s+$/g, '');
- };
- }
- scope.textToDisplay = val.trim();
- scope.readFlag = true;
- $timeout(function() {
- var readElem = elem[0].children[0].children[0];
- if(height===1){
- if(window.getComputedStyle){
- height = parseInt(scope.lines) * parseFloat(window.getComputedStyle(readElem,null).getPropertyValue("height"));
- }
- else {
- height = parseInt(scope.lines) * parseFloat(readElem.currentStyle.height);
- }
- scope.elemHeight = height;
- scope.readLinkStyle = {'height': scope.elemHeight + 'px'};
- }
- });
- scope.readMoreLink = true;
- scope.readLessLink = false;
- }
- });
- // Code to use readmore inside accordion
- var parentElem = elem.parent();
- if (parentElem.hasClass('att-accordion__body')) {
- scope.$watch('isOpen', function(val) {
- if (!val) {
- scope.readLess();
- }
- });
- }
- scope.readMore = function() {
- scope.readMoreLink = false;
- scope.readLessLink = true;
- scope.readLinkStyle = {'height': 'auto'};
- scope.readFlag = false;
- };
- scope.readLess = function() {
- scope.readMoreLink = true;
- scope.readLessLink = false;
- scope.readLinkStyle = {'height': scope.elemHeight + 'px'};
- scope.readFlag = true;
- };
- }
- };
- }])
- .directive('attLinksList', [function() {
- return {
- restrict: 'A',
- controller: function() {
- },
- link: function(scope, elem) {
- elem.addClass('links-list');
- }
- };
- }])
- .directive('attLinksListItem', [function() {
- return {
- restrict: 'A',
- require: '^attLinksList',
- link: function(scope, elem) {
- elem.addClass('links-list__item');
- if(!(elem.attr('href'))){
- elem.attr("tabindex", "0");
- }
- }
- };
- }]);
-angular.module('att.abs.loading', [])
- .directive('attLoading', ['$window',function($window) {
- return {
- restrict: 'A',
- replace: true,
- scope: {
- icon: '@attLoading',
- progressStatus: '=?',
- colorClass: '=?'
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/loading/loading.html',
- link: function(scope, element) {
- var progressvalue = scope.progressStatus;
- scope.progressStatus = Math.min(100, Math.max(0, progressvalue));
- if($window.navigator.userAgent.indexOf("MSIE 8.")!==-1){
- var shiftX = 0, shiftY = scope.progressStatus * 36;
- element.css({
- 'background-position-x' : shiftX,
- 'background-position-y' : -shiftY
- });
- }
- }
- };
- }]);
-angular.module('att.abs.modal', [])
-/**
- * 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;
- }
- };
- }
- };
- })
-
-/**
- * A helper directive for the $modal service. It creates a backdrop element.
- */
- .directive('modalBackdrop', ['$timeout', function ($timeout) {
- return {
- restrict: 'EA',
- replace: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/modal/backdrop.html',
- link: function (scope) {
- scope.animate = false;
- //trigger CSS transitions
- $timeout(function () {
- scope.animate = true;
- });
- }
- };
- }])
-
- .directive('modalWindow', ['$modalStack','$timeout','$document', function ($modalStack,$timeout,$document) {
- return {
- restrict: 'EA',
- scope: {
- index: '@'
- },
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/modal/window.html',
- link: function (scope, element, attrs) {
- scope.windowClass = attrs.windowClass || '';
- $timeout(function () {
- // trigger CSS transitions
- scope.focusModalFlag = true;
- scope.animate = true;
- });
- $document.on('focus keydown', function(e){
- if (e.which ===9) {
- String.prototype.contains = function(it) {
- return this.indexOf(it) !== -1;
- };
- if (element[0] !== e.target && !element[0].contains( e.target )) {
- element[0].focus();
- }
- }
- });
- scope.close = function (evt) {
- var modal = $modalStack.getTop();
- if (modal && modal.value.backdrop && modal.value.backdrop !== 'static' && (evt.target === evt.currentTarget)) {
- // Check if preventDefault exists due to lack of support for IE8
- if (evt.preventDefault) {
- evt.preventDefault();
- evt.stopPropagation();
- } else {
- evt.returnValue = false;
- }
- $modalStack.dismiss(modal.key, 'backdrop click');
- }
- };
- }
- };
- }])
-
- .factory('$modalStack', ['$document', '$compile', '$rootScope', '$$stackedMap',
- function ($document, $compile, $rootScope, $$stackedMap) {
- var OPENED_MODAL_CLASS = 'modal-open';
- var backdropjqLiteEl, backdropDomEl;
- var backdropScope = $rootScope.$new(true);
- 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) {
-
- var body = $document.find('body').eq(0);
- var modalWindow = openedWindows.get(modalInstance).value;
- //clean up the stack
- openedWindows.remove(modalInstance);
- ////remove window DOM element
- modalWindow.modalDomEl.remove();
- body.toggleClass(OPENED_MODAL_CLASS, openedWindows.length() > 0);
-
- //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 body = $document.find('body').eq(0);
-
- if (backdropIndex() >= 0 && !backdropDomEl) {
- backdropjqLiteEl = angular.element('<div modal-backdrop></div>');
- backdropDomEl = $compile(backdropjqLiteEl)(backdropScope);
- body.append(backdropDomEl);
- }
- var angularDomEl = angular.element('<div modal-window></div>');
- angularDomEl.attr('window-class', modal.windowClass);
- angularDomEl.attr('index', openedWindows.length() - 1);
- angularDomEl.html(modal.content);
-
- var modalDomEl = $compile(angularDomEl)(modal.scope);
- openedWindows.top().value.modalDomEl = modalDomEl;
- body.append(modalDomEl);
- body.addClass(OPENED_MODAL_CLASS);
- };
-
- $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: {
- //can be also false or 'static'
- backdrop: true,
- 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) {
- 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(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
- });
-
- }, function(reason) {
- modalResultDeferred.reject(reason);
- });
-
- templateAndResolvePromise.then(function () {
- modalOpenedDeferred.resolve(true);
- }, function () {
- modalOpenedDeferred.reject(false);
- });
-
- return modalInstance;
- };
-
- return $modal;
- }]
- };
-
- return $modalProvider;
- })
-
-.directive("simpleModal", ["$modal", function($modal) {
- return {
- restrict: 'EA',
- scope: {
- simpleModal: '@',
- backdrop:'@',
- keyboard:'@',
- modalOk:'&',
- modalCancel:'&',
- windowClass:'@',
- controller:'@'
- },
- link: function(scope, elm) {
- elm.bind('click', function(ev) {
- ev.preventDefault();
- if (angular.isDefined(elm.attr("href")) && elm.attr("href") !== "") {
- scope.simpleModal = elm.attr("href");
- }
- if(!scope.backdrop){
- scope.backdropclick='static';
- }
- else
- {
- scope.backdropclick=true;
- }
- if(!scope.keyboard ){
- scope.keyboardev=false;
- }
- else{
- scope.keyboardev=true;
- }
- $modal.open({
- templateUrl: scope.simpleModal,
- backdrop:scope.backdropclick,
- keyboard:scope.keyboardev,
- windowClass:scope.windowClass,
- controller: scope.controller
- }).result.then(scope.modalOk, scope.modalCancel);
- });
- }
- };
- }]);
-
-angular.module('att.abs.pagination', ['att.abs.utilities'])
-.directive('attPagination', [ function() {
- return {
- restrict: 'EA',
- scope: {
- totalPages: '=',
- currentPage: '=',
- showInput: '=',
- clickHandler: '=?'
- },
- replace: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/pagination/pagination.html',
- link: function(scope) {
- scope.focusedPage;
- scope.$watch('totalPages', function(value) {
- if(angular.isDefined(value) && value !== null){
- scope.pages = [];
- if (value < 1) {
- scope.totalPages = 1;
- return;
- }
- if (value <= 7) {
- for (var i = 1; i <= value; i++) {
- scope.pages.push(i);
- }
- } else if (value > 7) {
- var midVal = Math.ceil(value / 2);
- scope.pages = [midVal - 1, midVal, midVal + 1];
- }
- currentPageChanged(1);
- }
- });
- scope.$watch('currentPage', function(value) {
- currentPageChanged(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 > 7) {
- if (value < scope.pages[0] && value > 3) {
- scope.pages = [value, value + 1, value + 2];
- } else if (value > scope.pages[2] && value < scope.totalPages - 2) {
- scope.pages = [value - 2, value - 1, value];
- } else if (value <= 3) {
- scope.pages = [1, 2, 3];
- } else if (value >= scope.totalPages - 2) {
- scope.pages = [scope.totalPages - 2, scope.totalPages - 1, scope.totalPages];
- }
- }
- }
- }
- scope.next = function(event) {
- event.preventDefault();
- if (scope.currentPage < scope.totalPages) {
- scope.currentPage += 1;
- callbackHandler(scope.currentPage);
- }
- };
- scope.prev = function(event) {
- 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;
- };
- }
- };
-}]);
-
-angular.module('att.abs.paneSelector',[])
-.constant('paneGroupConstants',{
- SIDE_WIDTH_DEFAULT: '33%',
- INNER_PANE_DEFAULT: '67%',
- SIDE_PANE_ID: 'sidePane',
- NO_DRILL_DOWN: 'none'
-})
-.factory('animation', function(){
- return TweenLite;
-})
-.directive('sideRow', [function(){
- return {
- restrict: 'A',
- replace:true,
- require: ['^sidePane','^paneGroup'],
- link: function(scope,element,attr,ctrls){
- var sidePaneCtrl = ctrls[0];
- var paneGroupCtrl = ctrls[1];
- if(scope.$first){
- /*
- Reset the sidePaneId array if a new
- set of ngRepeat data appeared
- */
- sidePaneCtrl.sidePaneIds = [];
- }
-
- var paneId =attr['paneId'];
- var drillDownTo = attr['drillDownTo'];
-
- sidePaneCtrl.sidePaneRows.push({'paneId':paneId, 'drillDownTo':drillDownTo});
- element.on('click', function(){
- sidePaneCtrl.currentSelectedRowPaneId = paneId;
- paneGroupCtrl.slideOutPane(paneId,true);
- });
- }
- };
-}])
-.controller('SidePaneCtrl',['$scope', '$element','animation', 'paneGroupConstants',
- function($scope,$element,animation, paneGroupConstants){
-
- this.sidePaneTracker = {};
- this.currentWidth = paneGroupConstants.SIDE_WIDTH_DEFAULT;
- this.paneId = paneGroupConstants.SIDE_PANE_ID;
- this.currentSelectedRowPaneId;
-
- this.drillDownToMapper = {};
-
- this.sidePaneRows = [];
-
- this.init = function(){
-
- var sidePaneRows = this.sidePaneRows;
-
- if(sidePaneRows){
- for(var index in sidePaneRows){
- if (sidePaneRows.hasOwnProperty(index)) {
- var paneId = sidePaneRows[index].paneId;
- var drillDownTo = sidePaneRows[index].drillDownTo;
-
- this.drillDownToMapper[paneId] = drillDownTo;
-
- if(index === 0){
- this.currentSelectedRowPaneId = paneId;
- this.sidePaneTracker[paneId] = [];
- }
- }
- }
- }
- };
-
- this.getSidePanesList = function(){
- return this.sidePaneTracker[this.currentSelectedRowPaneId];
- };
-
- this.addToSidePanesList = function(newPaneId){
- if(this.sidePaneTracker[this.currentSelectedRowPaneId] === undefined){
- this.sidePaneTracker[this.currentSelectedRowPaneId] = [];
- }
- else if(newPaneId){
- this.sidePaneTracker[this.currentSelectedRowPaneId].push(newPaneId);
- }
- };
-
- this.setWidth = function(val){
- if(val){
- this.currentWidth = val;
- }
- animation.set($element,{width:this.currentWidth});
- };
-
- this.resizeWidth = function(val){
- if(val){
- this.currentWidth = val;
- }
- animation.to($element,.5,{width:val});
- };
-
-}])
-.directive('sidePane', ['paneGroupConstants', function(paneGroupConstants){
- return {
- restrict: 'EA',
- transclude: true,
- replace: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/paneSelector/sidePane.html',
- require: ['^paneGroup', 'sidePane'],
- controller: 'SidePaneCtrl',
- scope:{},
- link: function(scope,element,attr, ctrls){
- var paneGroupCtrl = ctrls[0];
- var sidePaneCtrl = ctrls[1];
- paneGroupCtrl.addPaneCtrl(paneGroupConstants.SIDE_PANE_ID, sidePaneCtrl);
- }
- };
-}])
-.directive('drillDownRow', ['$parse', 'paneGroupConstants',function($parse,paneGroupConstants){
- return {
- restrict: 'A',
- replace:true,
- require: ['^innerPane','^paneGroup'],
- link: function(scope,element,attr,ctrls){
- var innerPaneCtrl = ctrls[0];
- var paneGroupCtrl = ctrls[1];
-
- element.on('click', function(){
- var drillDownTo = innerPaneCtrl.drillDownTo;
-
- if(innerPaneCtrl.drillDownTo !== paneGroupConstants.NO_DRILL_DOWN){
- paneGroupCtrl.slideOutPane(drillDownTo);
- }
- });
- }
- };
-}])
-.controller('InnerPaneCtrl', ['$scope', '$element','animation', 'paneGroupConstants',
- function($scope,$element,animation,paneGroupConstants){
-
- this.paneId = $scope.paneId;
- this.drillDownTo;
- this.currentWidth = paneGroupConstants.INNER_PANE_DEFAULT;
-
- this.setWidth = function(val){
- if(val){
- this.currentWidth = val;
- }
- animation.set($element,{width:this.currentWidth});
- };
-
- this.resizeWidth = function(val,callback){
- animation.to($element,.25,{width:val,onComplete: callback});
- };
-
- this.displayNone = function(){
- animation.set($element, {display:'none'});
- };
-
- this.displayBlock = function(){
- animation.set($element,{display:'block'});
- if(this){
- this.hideRightBorder();
- }
- };
-
- this.floatLeft = function(){
- animation.set($element,{float:'left'});
- };
-
- this.hideLeftBorder = function(){
- animation.set($element, {borderLeftWidth: '0px'});
- };
-
- this.showLeftBorder = function(){
- animation.set($element,{borderLeftWidth: '1px'});
- };
-
- this.hideRightBorder = function(){
- animation.set($element,{borderRightWidth: '0px'});
- };
-
- this.showRightBorder = function(){
- animation.set($element, {borderRightWidth: '1px'});
- };
-
- this.slideFromRight = function(){
- animation.set($element, {float:'right'});
- animation.set($element, {width: this.currentWidth});
- };
-
- this.startOpen = function(){
- return $scope.startOpen;
- };
-
-}])
-.directive('innerPane', function(){
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/paneSelector/innerPane.html',
- require: ['^paneGroup', 'innerPane'],
- controller: 'InnerPaneCtrl',
- scope:{
- paneId:'@'
- },
- link: function(scope,element,attr,ctrls){
-
- if(attr.startOpen === ""){
- scope.startOpen = true;
- }
-
- var paneGroupCtrl = ctrls[0];
- var innerPaneCtrl = ctrls[1];
- paneGroupCtrl.addPaneCtrl(scope.paneId,innerPaneCtrl);
- }
- };
-})
-.controller('PaneGroupCtrl', ['$scope', '$element', 'paneGroupConstants',function($scope,$element,paneGroupConstants){
- this.panes = {};
- this.accountLevelPaneModel = [];
-
- this.title = $scope.title;
-
- this.init = function(){
- var sidePane = this.panes[paneGroupConstants.SIDE_PANE_ID];
-
- if(sidePane){
-
- sidePane.init();
-
- //Show the other panes that may be set to startOpen
- //numOpen starts at 1 because of the side pane
- var numOpen = 1;
- var key;
- for(key in this.panes){
- if(this.panes[key].startOpen && this.panes[key].startOpen()){
- numOpen++;
- }
- }
- var width;
- if(numOpen >= 3){
- width = ((100/numOpen)) + '%';
- }
-
-
- if(this.panes[sidePane.currentSelectedRowPaneId])
- {
- if(width){
- sidePane.setWidth(width);
- this.panes[sidePane.currentSelectedRowPaneId].setWidth(width);
- }
- else{
- sidePane.setWidth();
- this.panes[sidePane.currentSelectedRowPaneId].setWidth();
- }
-
- this.panes[sidePane.currentSelectedRowPaneId].displayBlock();
-
- for(key in this.panes){
- if(key !== paneGroupConstants.SIDE_PANE_ID && key !== sidePane.currentSelectedRowPaneId){
- this.panes[key].displayNone();
- }
- this.panes[key].drillDownTo = sidePane.drillDownToMapper[key];
- }
- }
- openOtherPanesOnStart(sidePane, this.panes);
- }
-
- function openOtherPanesOnStart(sidePane, panes){
- //Build an array of the panes that need to be out
- var otherPanesStartOpened = [];
- var index;
- for(index in sidePane.sidePaneRows){
- if (sidePane.sidePaneRows.hasOwnProperty(index)) {
- var pane = sidePane.sidePaneRows[index];
-
- //Skip the first pane row since we handled it in the begining
- if(index > 0 && panes[pane.paneId].startOpen && panes[pane.paneId].startOpen()){
- otherPanesStartOpened.push(pane);
- //Remember the panes that are opened for the first pane row Index
- sidePane.addToSidePanesList(pane.paneId);
- }
- }
- }
-
- if(width){
- for(index in otherPanesStartOpened){
- if (otherPanesStartOpened.hasOwnProperty(index)) {
- var paneId = otherPanesStartOpened[index].paneId;
- var paneCtrl = panes[paneId];
-
- if(paneCtrl && paneCtrl.setWidth && paneCtrl.displayBlock){
- paneCtrl.setWidth(width);
- paneCtrl.displayBlock();
- }
- }
- }
- }
-
- }
- };
-
- /*
- Resets all the panels to their original positions at the end of a sidebar click
- By setting the sideBar to its default width
- Setting all panes to float left and displaynone
- Setting the pane that was clicked to default width and slide right
- */
-
- this.resetPanes = function(){
- for(var key in this.panes){
- if(this.panes.hasOwnProperty(key)){
- var pane = this.panes[key];
- if(pane && (pane.paneId !== paneGroupConstants.SIDE_PANE_ID)){
- pane.floatLeft();
- pane.displayNone();
- }
- }
- }
-
- if(this.panes[paneGroupConstants.SIDE_PANE_ID]){
- this.panes[paneGroupConstants.SIDE_PANE_ID].setWidth(paneGroupConstants.SIDE_WIDTH_DEFAULT);
- }
- };
-
- this.addPaneCtrl = function(paneId,paneCtrl){
- this.panes[paneId] = paneCtrl;
- };
-
- this._slideOutPane = function(paneId,isFromSidePane){
-
- this.resetPanes();
- //Check current side pane stack to see how many panes are already open for that side pane choice
- //then add the new pane that needs to be there
- var panesList;
- if(isFromSidePane){
-
- //Check if the side pane id has already been clicked
- if(this.panes[paneGroupConstants.SIDE_PANE_ID]){
- panesList = this.panes[paneGroupConstants.SIDE_PANE_ID].getSidePanesList();
- }
-
- if(!panesList){
-
- if(this.panes && this.panes[paneGroupConstants.SIDE_PANE_ID] && this.panes[paneId]){
- this.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId = paneId;
- this.panes[paneGroupConstants.SIDE_PANE_ID].addToSidePanesList();
-
- this.panes[paneId].slideFromRight();
- this.panes[paneId].displayBlock();
-
- this.panes[paneId].setWidth(paneGroupConstants.INNER_PANE_DEFAULT);
- }
-
- }
- else if(this.panes && this.panes[paneGroupConstants.SIDE_PANE_ID]){
- //Restore the panes based on the panelist
- if(panesList.length === 0 && this.panes[paneId]){
- //Only one pane is out
- this.panes[paneGroupConstants.SIDE_PANE_ID].setWidth(paneGroupConstants.SIDE_WIDTH_DEFAULT);
- this.panes[paneId].displayBlock();
- this.panes[paneId].setWidth(paneGroupConstants.INNER_PANE_DEFAULT);
- }
- else{
- //Multiple panes out
- var numPanes = panesList.length + 2;
- var width = ((100/numPanes)) + '%';
- this.panes[paneGroupConstants.SIDE_PANE_ID].setWidth(width);
-
- //Set the sidePanes pane
- //set the panes children list
- if(this.panes[this.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId]){
- this.panes[this.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId].displayBlock();
- this.panes[this.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId].setWidth(width);
- }
-
- for(var i in panesList){
- if(this.panes[panesList[i]]){
- this.panes[panesList[i]].displayBlock();
- this.panes[panesList[i]].setWidth(width);
- }
- }
- }
- }
- }
- else{
-
- //Have to check the paneId that was given and where it is drilling down to
- var isPaneInStack = false;
-
- var stackPaneList;
-
- if(this.panes[paneGroupConstants.SIDE_PANE_ID]){
- stackPaneList = this.panes[paneGroupConstants.SIDE_PANE_ID].getSidePanesList();
- }
-
- for(var j in stackPaneList){
- if(stackPaneList.hasOwnProperty(j)){
- var pId = stackPaneList[j];
- if(pId === paneId){
- isPaneInStack = true;
- break;
- }
- }
- }
-
- if(!isPaneInStack && this.panes[paneGroupConstants.SIDE_PANE_ID]){
- this.panes[paneGroupConstants.SIDE_PANE_ID].addToSidePanesList(paneId);
- }
-
- var sidePanesListLength;
-
- if(this.panes[paneGroupConstants.SIDE_PANE_ID]){
- sidePanesListLength = this.panes[paneGroupConstants.SIDE_PANE_ID].getSidePanesList().length;
- }
-
- var numberPanes = sidePanesListLength + 2;
- var widthToSet = ((100/numberPanes)) + '%';
-
- if(this.panes[paneGroupConstants.SIDE_PANE_ID]){
- this.panes[paneGroupConstants.SIDE_PANE_ID].setWidth(widthToSet);
- }
-
- var slideInPaneId;
-
- if(this.panes[paneGroupConstants.SIDE_PANE_ID]){
- slideInPaneId = this.panes[paneGroupConstants.SIDE_PANE_ID].getSidePanesList()[sidePanesListLength - 1];
- }
-
- var that = this;
-
- if(that.panes[paneGroupConstants.SIDE_PANE_ID]){
- panesList = that.panes[paneGroupConstants.SIDE_PANE_ID].getSidePanesList();
- }
-
- for(var p in panesList){
- if(panesList.hasOwnProperty(p)){
- var paneListPaneId = panesList[p];
- var pane = this.panes[paneListPaneId];
- if(paneListPaneId !== slideInPaneId && pane){
- pane.setWidth(widthToSet);
- pane.displayBlock();
- pane.floatLeft();
- }
- }
- }
-
- if(this.panes[this.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId]){
- this.panes[this.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId].displayBlock();
- this.panes[this.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId].showRightBorder();
-
- this.panes[this.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId].resizeWidth(width,function(){
-
- if(that.panes[slideInPaneId] && that.panes[that.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId]){
- that.panes[that.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId].hideRightBorder();
- that.panes[slideInPaneId].setWidth(width);
- that.panes[slideInPaneId].slideFromRight();
- that.panes[slideInPaneId].displayBlock();
- that.panes[slideInPaneId].floatLeft();
- }
-
- });
- }
- }
- };
-
- this.slideOutPane = function(paneId,isFromSidePane){
- this._slideOutPane(paneId,isFromSidePane);
- };
-
-}])
-.directive('paneGroup', ['$timeout',function($timeout){
- return {
- restrict: 'EA',
- transclude: true,
- replace: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/paneSelector/paneGroup.html',
- scope:{
- },
- controller: 'PaneGroupCtrl',
- link: function(scope,element,attr,ctrl){
-
- $timeout(initialize,100);
-
- function initialize(){
- ctrl.init();
- }
-
- }
- };
-}]);
-angular.module('att.abs.profileCard', [])
- .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('profileCard',['$http','$q','profileStatus', function($http,$q,profileStatus) {
- return {
- restrict: 'EA',
- replace:'true',
- templateUrl:function(element, attrs){
- if(!attrs.addUser){
- return 'app/scripts/ng_js_att_tpls/profileCard/profileCard.html';
- }
- else{
- return 'app/scripts/ng_js_att_tpls/profileCard/addUser.html';
- }
- },
- scope:{
- profile:'='
- },
- link: function(scope, elem, attr){
- 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";
- }
- }
- }
- };
- }]);
-angular.module('att.abs.progressBars', [])
-
-.directive('attProgressBar', [function(){
- return {
- restrict: 'A',
- replace: true,
- templateUrl : 'app/scripts/ng_js_att_tpls/progressBars/progressBars.html'
- };
-}]);
-angular.module('att.abs.radio', [])
- .constant('attRadioConfig', {
- activeClass : "att-radio--on",
- disabledClass : "att-radio--disabled"
- })
-.directive('attRadio', ['$compile','attRadioConfig', function ($compile, attRadioConfig) {
- return {
- scope: {},
- restrict: 'A',
- require: 'ngModel',
- link: function (scope, element, attr, ctrl) {
- var ngCtrl = ctrl;
- var parentDiv = $compile('<div tabindex="0" role="radio" att-accessibility-click="13,32" ng-click="updateModel($event)" class="att-radio"></div>')(scope);
-
- element.wrap(parentDiv);
- element.parent().append('<div class="att-radio__indicator"></div>');
- element.parent().attr("title", attr.title);
- element.attr("tabindex","-1");
-
- ngCtrl.$render = function () {
- var selected = angular.equals(ngCtrl.$modelValue, attr.attRadio);
- element.parent().toggleClass(attRadioConfig.activeClass, selected);
- element.parent().attr("aria-checked", selected);
- };
-
- scope.updateModel = function (evt) {
- var isActive = element.parent().hasClass(attRadioConfig.activeClass);
-
- if (!isActive && !scope.disabled) {
- ngCtrl.$setViewValue(isActive ? null : attr.attRadio);
- ngCtrl.$render();
- }
- evt.preventDefault();
- };
-
- attr.$observe('disabled', function (val) {
- scope.disabled = (val || val === "disabled" || val === "true");
- element.parent().toggleClass(attRadioConfig.disabledClass, scope.disabled);
- element.parent().attr("tabindex", scope.disabled ? "-1" : "0");
- });
- }
- };
-}]);
-
-angular.module('att.abs.scrollbar', [])
- .constant('attScrollbarConstant', {
- defaults : {
- // Vertical or horizontal scrollbar? ( x || y ).
- axis: 'y',
- // Enable or disable the mousewheel.
- wheel: true,
- // How many pixels must the mouswheel scroll at a time.
- wheelSpeed: 40,
- // Lock default scrolling window when there is no more content.
- wheelLock: true,
- //// Enable invert style scrolling
- scrollInvert: false,
- // Set the size of the scrollbar to auto or a fixed number.
- trackSize: false,
- // Set the size of the thumb to auto or a fixed number.
- thumbSize: false,
- // Set to false to hide the scrollbar if not being used
- alwaysVisible: true
- }
- })
- .directive('attScrollbar', ['$window', '$timeout', '$parse', '$animate', 'attScrollbarConstant',
- function ($window, $timeout, $parse, $animate, attScrollbarConstant) {
- return {
- restrict: 'A',
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/scrollbar/scrollbar.html',
- controller: ['$scope','$element','$attrs', function($scope, $element, $attrs) {
- var defaults =attScrollbarConstant.defaults;
- var options = $attrs.scrollbar;
- if (options) {
- options = $parse(options)($scope);
- } else {
- options = {};
- }
- this.options = angular.extend({}, defaults, options);
- this._defaults = defaults;
-
- var self = this,
- $body = angular.element(document.querySelectorAll('body')[0]),
- $document = angular.element(document),
- $viewport = angular.element($element[0].querySelectorAll('.scroll-viewport')[0]),
- $overview = angular.element($element[0].querySelectorAll('.scroll-overview')[0]),
- $scrollbar = angular.element($element[0].querySelectorAll('.scroll-bar')[0]),
- $thumb = angular.element($element[0].querySelectorAll('.scroll-thumb')[0]),
- mousePosition = 0,
- isHorizontal = this.options.axis === 'x',
- hasTouchEvents=false,
- // Modern browsers support "wheel"
- wheelEvent = ("onwheel" in document ? "wheel" :
- // Webkit and IE support at least "mousewheel"
- document.onmousewheel !== undefined ? "mousewheel" :
- // let's assume that remaining browsers are older Firefox
- "DOMMouseScroll"),
- sizeLabel = isHorizontal ? 'width' : 'height',
- sizeLabelCap = sizeLabel.charAt(0).toUpperCase() + sizeLabel.slice(1).toLowerCase(),
- posiLabel = isHorizontal ? 'left' : 'top',
- // moveEvent = document.createEvent('HTMLEvents'),
- restoreVisibilityAfterWheel,
- thumbscrolltouch=false,documnetscrolltouch=false;
- if(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {
- hasTouchEvents = true;
- }
- this.contentPosition = 0;
- this.viewportSize = 0;
- this.contentSize = 0;
- this.contentRatio = 0;
- this.trackSize = 0;
- this.trackRatio = 0;
- this.thumbSize = 0;
- this.thumbPosition = 0;
-
- this.initialize = function() {
- if (!this.options.alwaysVisible) {
- $scrollbar.css('opacity', 0);
- }
- self.update();
- setEvents();
- return self;
- };
- this.setSizeData = function() {
- this.viewportSize = $viewport.prop('offset' + sizeLabelCap) || 1;
- this.contentSize = $overview.prop('scroll' + sizeLabelCap) || 1;
- this.contentRatio = this.viewportSize / this.contentSize;
- this.trackSize = this.options.trackSize || this.viewportSize;
- this.thumbSize = Math.min(this.trackSize, Math.max(0, (this.options.thumbSize || (this.trackSize * this.contentRatio))));
- this.trackRatio = this.options.thumbSize ? (this.contentSize - this.viewportSize) / (this.trackSize - this.thumbSize) : (this.contentSize / this.trackSize);
- };
- this.update = function(scrollTo) {
- self.setSizeData();
- mousePosition = $scrollbar.prop('offsetTop');
-
- $scrollbar.toggleClass('disable', this.contentRatio >= 1 || isNaN(this.contentRatio));
-
- if (!this.options.alwaysVisible && this.contentRatio < 1 && this.viewportSize > 0) {
- //flash the scrollbar when update happens
- $animate.addClass($scrollbar, 'visible').then(function() {
- $animate.removeClass($scrollbar, 'visible');
- $scope.$digest();
- });
- }
- if (scrollTo !== null) {
- if (scrollTo==='bottom') {
- this.contentPosition = this.contentSize - this.viewportSize;
- }else{
- this.contentPosition = parseInt(scrollTo, 10) || 0;
- }
- }
- ensureContentPosition();
- $thumb.css(posiLabel, self.contentPosition / self.trackRatio + 'px');
- $scrollbar.css(sizeLabel, self.trackSize + 'px');
- $thumb.css(sizeLabel, self.thumbSize + 'px');
- $overview.css(posiLabel, -self.contentPosition + 'px');
-
- return this;
- };
- fireEvent = function(obj, evt) {
- var fireOnThis = obj;
- var evtObj;
- if (document.createEvent) {
- evtObj = document.createEvent('HTMLEvents');
- evtObj.initEvent(evt, true, false);
- fireOnThis.dispatchEvent(evtObj);
- }
- else if (document.createEventObject) {
- evtObj = document.createEventObject();
- fireOnThis.fireEvent('on' + evt, evtObj);
- }
- };
- function ensureContentPosition() {
- // if scrollbar is on, ensure the bottom of the content does not go above the bottom of the viewport
- if (self.contentRatio <= 1 && self.contentPosition > self.contentSize - self.viewportSize) {
- self.contentPosition = self.contentSize - self.viewportSize;
- }
- // if scrollbar is off, ensure the top of the content does not go below the top of the viewport
- else if (self.contentRatio > 1 && self.contentPosition > 0) {
- self.contentPosition = 0;
- }
- }
-
- function setEvents() {
-
- if (hasTouchEvents) {
- $viewport.on('touchstart', touchstart);
- $thumb.on('touchstart', touchstart);
- }
- else {
- $thumb.on('mousedown', start);
- $scrollbar.on('mousedown', drag);
- }
-
- angular.element($window).on('resize', resize);
-
- if (self.options.wheel) {
- $element.on(wheelEvent, wheel);
- }
- }
-
- function resize() {
- self.update();
- }
-
- function touchstart(event) {
- if (1 === event.touches.length) {
- event.stopPropagation();
- start(event.touches[0]);
- }
- }
-
- function start(event) {
- $body.addClass('scroll-no-select');
- $element.addClass('scroll-no-select');
-
- if (!self.options.alwaysVisible) {
- $scrollbar.addClass('visible');
- }
- mousePosition = isHorizontal ? event.clientX : event.clientY;
- self.thumbPosition = parseInt($thumb.css(posiLabel), 10) || 0;
- if (hasTouchEvents) {
- documnetscrolltouch=false;
- thumbscrolltouch=false;
- $viewport.on('touchmove', touchdrag);
- $thumb.on('touchmove',touchdragthumb);
- $thumb.on('touchend', end);
- } else {
- $document.on('mousemove', drag);
- $document.on('mouseup', end);
- $thumb.on('mouseup', end);
- }
- }
-
- function wheel(event) {
-
- if (self.contentRatio >= 1) {
- return;
- }
-
- if (!self.options.alwaysVisible) {
- //cancel removing visibility if wheel event is triggered before the timeout
- if (restoreVisibilityAfterWheel) {
- $timeout.cancel(restoreVisibilityAfterWheel);
- }
- $scrollbar.addClass('visible');
-
- restoreVisibilityAfterWheel = $timeout(function() {
- $scrollbar.removeClass('visible');
- }, 100);
- }
-
-
- var evntObj = (event && event.originalEvent) || event || $window.event,
- deltaDir = self.options.axis.toUpperCase(),
- delta = {
- X: evntObj.deltaX,
- Y: evntObj.deltaY
- },
- wheelSpeed = evntObj.deltaMode === 0 ? self.options.wheelSpeed : 1;
-
- if (self.options.scrollInvert) {
- wheelSpeed *= -1;
- }
-
- if (wheelEvent === 'mousewheel') {
- delta.Y = -1 * evntObj.wheelDelta / 40;
- if(evntObj.wheelDeltaX){
- delta.X = -1 * evntObj.wheelDeltaX / 40;
- }
- }
- delta.X *= -1 / wheelSpeed;
- delta.Y *= -1 / wheelSpeed;
-
- var wheelSpeedDelta = delta[deltaDir];
-
- self.contentPosition -= wheelSpeedDelta * self.options.wheelSpeed;
- self.contentPosition = Math.min((self.contentSize - self.viewportSize), Math.max(0, self.contentPosition));
- fireEvent($element[0], 'move');
-
- ensureContentPosition();
- $thumb.css(posiLabel, self.contentPosition / self.trackRatio + 'px');
- $overview.css(posiLabel, -self.contentPosition + 'px');
-
- if (self.options.wheelLock || (self.contentPosition !== (self.contentSize - self.viewportSize) && self.contentPosition !== 0)) {
- evntObj.preventDefault();
- }
- }
-
- function touchdrag(event) {
- event.preventDefault();
- documnetscrolltouch=true;
- drag(event.touches[0]);
- }
- function touchdragthumb(event){
- event.preventDefault();
- thumbscrolltouch=true;
- drag(event.touches[0]);
- }
-
- function drag(event) {
-
- if (self.contentRatio >= 1) {
- return;
- }
- var mousePositionNew = isHorizontal ? event.clientX : event.clientY,
- thumbPositionDelta = mousePositionNew - mousePosition;
-
- if ((self.options.scrollInvert && !hasTouchEvents) ||
- (hasTouchEvents && !self.options.scrollInvert))
- {
- thumbPositionDelta = mousePosition - mousePositionNew;
- }
- if(documnetscrolltouch && hasTouchEvents){
- thumbPositionDelta = mousePosition - mousePositionNew;
- }
- if(thumbscrolltouch && hasTouchEvents){
- thumbPositionDelta = mousePositionNew - mousePosition;
- }
- var thumbPositionNew = Math.min((self.trackSize - self.thumbSize), Math.max(0, self.thumbPosition + thumbPositionDelta));
- self.contentPosition = thumbPositionNew * self.trackRatio;
- fireEvent($element[0], 'move');
-
- ensureContentPosition();
- $thumb.css(posiLabel, thumbPositionNew + 'px');
- $overview.css(posiLabel, -self.contentPosition + 'px');
- }
-
- function end() {
-
- $body.removeClass('scroll-no-select');
- $element.removeClass('scroll-no-select');
- if (!self.options.alwaysVisible) {
- $scrollbar.removeClass('visible');
- }
- $document.off('mousemove', drag);
- $document.off('mouseup', end);
- $thumb.off('mouseup', end);
- $document.off('touchmove', touchdrag);
- $document.off('ontouchend', end);
- $thumb.off('touchmove',touchdragthumb);
- $thumb.off('touchend', end);
- }
- this.cleanup = function() {
- $viewport.off('touchstart', touchstart);
- $thumb.off('mousedown', start);
- $scrollbar.off('mousedown', drag);
- $thumb.off('touchmove',touchdragthumb);
- $thumb.off('touchend', end);
- angular.element($window).off('resize', resize);
- $element.off(wheelEvent, wheel);
- //ensure scrollbar isn't activated
- self.options.alwaysVisible = true;
- end();
- };
-
- }],
- link: function(scope, iElement, iAttrs, controller) {
- var position = iElement.css('position');
- if (position !== 'relative' && position !== 'absolute') {
- iElement.css('position', 'relative');
- }
- scope.$watch(function() {
- $timeout(function() {
- var $overview = angular.element(iElement[0].querySelectorAll('.scroll-overview')[0]);
- var newValue = $overview.prop('scrollHeight');
- var oldValue = scope.oldValue;
- if (newValue !== oldValue) {
- scope.oldValue = newValue;
- controller.update();
- }
- }, 100, false);
- });
- controller.initialize();
- iElement.on('$destroy', function() {
- controller.cleanup();
- });
- }
- };
-}]);
-angular.module('att.abs.search', ['att.abs.utilities', 'att.abs.position', 'att.abs.utilities'])
-.directive('attSearch', ["$document", "$filter", "$isElement", '$documentBind', "$timeout", "keymap", function($document,$filter,$isElement,$documentBind,$timeout,keymap){
- return{
- restrict: 'A',
- scope:{cName: '=attSearch'},
- transclude: false,
- replace: false,
- require:'ngModel',
- templateUrl: 'app/scripts/ng_js_att_tpls/search/search.html',
- link: function(scope, element, attr, ctrl) {
- scope.selectedIndex = -1;
- scope.selectedOption = attr.placeholder;
- scope.isDisabled = false;
- scope.className = "select2-match";
- scope.showSearch = false;
- scope.showlist = false;
- if(attr.placeholderAsOption === "false")
- {
- scope.selectMsg = "";
- }
- else
- {
- scope.selectMsg = attr.placeholder;
- }
- if (attr.startsWithFilter === "true" || attr.startsWithFilter) {
- scope.startsWithFilter = true;
- }
- if(attr.showInputFilter === "true"){
- scope.showSearch = true;
- }
- scope.showDropdown = function(){
- if(!(attr.disabled)){
- scope.showlist = !scope.showlist;
- scope.setSelectTop();
- }
- };
- element.bind("keydown", function(e){
- if (keymap.isAllowedKey(e.keyCode) || keymap.isControl(e) || keymap.isFunctionKey(e))
- {
- e.preventDefault();
- e.stopPropagation();
-
- switch (e.keyCode) {
- case keymap.KEY.DOWN:
- scope.selectNext();
- break;
- case keymap.KEY.UP:
- scope.selectPrev();
- break;
- case keymap.KEY.ENTER:
- scope.selectCurrent();
- break;
- case keymap.KEY.BACKSPACE:
- scope.title = "";
- scope.$apply();
- break;
- case keymap.KEY.SPACE:
- scope.title += " ";
- scope.$apply();
- break;
- case keymap.KEY.ESC:
- if(scope.title === "")
- {
- scope.showlist = false;
- scope.$apply();
- }
- else
- {
- scope.title = "";
- scope.$apply();
- }
- break;
- default:;
- }
- }
- else
- {
- if(typeof scope.showSearch === 'boolean' && !scope.showSearch && e.keyCode !== 9)
- {
- scope.showlist = true;
- scope.title = scope.title ? scope.title + String.fromCharCode(e.keyCode):String.fromCharCode(e.keyCode);
- scope.$apply();
- }
- else if(e.keyCode === 9)
- {
- scope.showlist = false;
- scope.title = "";
- scope.$apply();
- }
- }
- });
- scope.selectOption = function(sTitle,sIndex,keepOpen)
- {
- if(sIndex === -1 || sIndex === '-1'){
- scope.selCategory = "";
- scope.selectedIndex = -1;
- ctrl.$setViewValue("");
- scope.selectedOption = scope.selectMsg;
- }
- else
- {
- scope.selCategory = scope.cName[sIndex];
- scope.selectedIndex = sIndex;
- ctrl.$setViewValue(scope.selCategory);
- scope.selectedOption = scope.selCategory.title;
- }
- scope.title = "";
- if(!keepOpen)
- {
- scope.showlist = false;
- }
- };
- if(attr.disabled)
- {
- scope.isDisabled = true;
- }
- scope.selectCurrent = function()
- {
- if(scope.showlist)
- {
- scope.selectOption(scope.selectMsg,scope.selectedIndex ,false);
- scope.$apply();
- }
- else
- {
- scope.showlist = true;
- scope.setSelectTop();
- scope.$apply();
- }
- };
- scope.hoverIn = function(cItem)
- {
- scope.selectedIndex = cItem;
- };
- scope.setSelectTop = function()
- {
- $timeout(function ()
- {
- if(scope.showlist)
- {
- var containerUL = angular.element(element)[0].querySelector(".select2-results");
- var selectedElemTopPos = angular.element(containerUL.querySelector('.select2-result-current'))[0].offsetTop;
- angular.element(containerUL)[0].scrollTop = selectedElemTopPos;
- }
- });
- };
- scope.setCurrentTop = function()
- {
- $timeout(function ()
- {
- if(scope.showlist)
- {
- var containerUL = angular.element(element)[0].querySelector(".select2-results");
- var selectedElemTopPos = angular.element(containerUL.querySelector('.hovstyle'))[0].offsetTop;
- if(selectedElemTopPos < (angular.element(containerUL)[0].scrollTop) )
- {
- angular.element(containerUL)[0].scrollTop -= 30;
- }
- else if((selectedElemTopPos + 30) > (angular.element(containerUL)[0].clientHeight))
- {
- angular.element(containerUL)[0].scrollTop += 30;
- }
-
- }
- });
- };
- scope.selectNext = function()
- {
- if((scope.selectedIndex + 1) <= (scope.cName.length-1))
- {
- scope.selectedIndex += 1;
- if(!scope.showlist)
- {
- scope.selectOption(scope.selectMsg,scope.selectedIndex ,false);
- }
- scope.$apply();
- }
- scope.setCurrentTop();
- };
- scope.selectPrev = function()
- {
- if((scope.selectedIndex - 1) >= 0)
- {
- scope.selectedIndex -= 1;
- if(!scope.showlist)
- {
- scope.selectOption(scope.selectMsg,scope.selectedIndex ,false);
- }
- scope.$apply();
- }
- else if(scope.selectedIndex -1 < 0)
- {
- scope.selectedIndex = -1;
- if(!scope.showlist)
- {
- scope.selectOption(scope.selectMsg,scope.selectedIndex ,false);
- }
- scope.$apply();
- }
- scope.setCurrentTop();
-
- };
- scope.updateSelection = function(sItem)
- {
- scope.selectedOption = sItem.title;
- scope.title = "";
- };
- scope.$watch('selCategory',function(value)
- {
- if(value){
- scope.updateSelection(value);
- };
- });
- ctrl.$viewChangeListeners.push(function(){
- scope.$eval(attr.ngChange);
- });
- ctrl.$render = function(){
- scope.selCategory = ctrl.$viewValue;
- };
- var outsideClick = function(e){
- var isElement = $isElement(angular.element(e.target), element, $document);
- if(!isElement) {
- scope.showlist = false;
- scope.$apply();
- }
- };
- $documentBind.click('showlist', outsideClick, scope);
- }
- };
-}]);
-
-angular.module('att.abs.select', ['att.abs.utilities', 'att.abs.position', 'att.abs.utilities'])
-.directive('attSelect', ["$document", "$filter", "$isElement", '$documentBind', "$timeout", "keymap", function($document,$filter,$isElement,$documentBind,$timeout,keymap){
- return{
- restrict: 'A',
- scope:{cName: '=attSelect'},
- transclude: false,
- replace: false,
- require:'ngModel',
- templateUrl: 'app/scripts/ng_js_att_tpls/select/select.html',
- link: function(scope, element, attr, ctrl) {
- scope.selectedIndex = -1;
- scope.selectedOption = attr.placeholder;
- scope.isDisabled = false;
- scope.className = "select2-match";
- scope.showSearch = false;
- scope.showlist = false;
- if(attr.placeholderAsOption === "false")
- {
- scope.selectMsg = "";
- }
- else
- {
- scope.selectMsg = attr.placeholder;
- }
- if (attr.startsWithFilter === "true" || attr.startsWithFilter) {
- scope.startsWithFilter = true;
- }
- if(attr.showInputFilter === "true"){
- scope.showSearch = true;
- }
- scope.showDropdown = function(){
- if(!(attr.disabled)){
- scope.showlist = !scope.showlist;
- scope.setSelectTop();
- }
- };
- element.bind("keydown", function(e){
- if (keymap.isAllowedKey(e.keyCode) || keymap.isControl(e) || keymap.isFunctionKey(e))
- {
- e.preventDefault();
- e.stopPropagation();
-
- switch (e.keyCode) {
- case keymap.KEY.DOWN:
- scope.selectNext();
- break;
- case keymap.KEY.UP:
- scope.selectPrev();
- break;
- case keymap.KEY.ENTER:
- scope.selectCurrent();
- break;
- case keymap.KEY.BACKSPACE:
- scope.title = "";
- scope.$apply();
- break;
- case keymap.KEY.SPACE:
- scope.title += " ";
- scope.$apply();
- break;
- case keymap.KEY.ESC:
- if(scope.title === "")
- {
- scope.showlist = false;
- scope.$apply();
- }
- else
- {
- scope.title = "";
- scope.$apply();
- }
- break;
- default:;
- }
- }
- else
- {
- if(typeof scope.showSearch === 'boolean' && !scope.showSearch && e.keyCode !== 9)
- {
- scope.showlist = true;
- scope.title = scope.title ? scope.title + String.fromCharCode(e.keyCode):String.fromCharCode(e.keyCode);
- scope.$apply();
- }
- else if(e.keyCode === 9)
- {
- scope.showlist = false;
- scope.title = "";
- scope.$apply();
- }
- }
- });
- scope.selectOption = function(sTitle,sIndex,keepOpen)
- {
- if(sIndex === -1 || sIndex === '-1'){
- scope.selCategory = "";
- scope.selectedIndex = -1;
- ctrl.$setViewValue("");
- scope.selectedOption = scope.selectMsg;
- }
- else
- {
- scope.selCategory = scope.cName[sIndex];
- scope.selectedIndex = sIndex;
- ctrl.$setViewValue(scope.selCategory);
- scope.selectedOption = scope.selCategory.title;
- }
- scope.title = "";
- if(!keepOpen)
- {
- scope.showlist = false;
- }
- };
- if(attr.disabled)
- {
- scope.isDisabled = true;
- }
- scope.selectCurrent = function()
- {
- if(scope.showlist)
- {
- scope.selectOption(scope.selectMsg,scope.selectedIndex ,false);
- scope.$apply();
- }
- else
- {
- scope.showlist = true;
- scope.setSelectTop();
- scope.$apply();
- }
- };
- scope.hoverIn = function(cItem)
- {
- scope.selectedIndex = cItem;
- };
- scope.setSelectTop = function()
- {
- $timeout(function ()
- {
- if(scope.showlist)
- {
- var containerUL = angular.element(element)[0].querySelector(".select2-results");
- var selectedElemTopPos = angular.element(containerUL.querySelector('.select2-result-current'))[0].offsetTop;
- angular.element(containerUL)[0].scrollTop = selectedElemTopPos;
- }
- });
- };
- scope.setCurrentTop = function()
- {
- $timeout(function ()
- {
- if(scope.showlist)
- {
- var containerUL = angular.element(element)[0].querySelector(".select2-results");
- var selectedElemTopPos = angular.element(containerUL.querySelector('.hovstyle'))[0].offsetTop;
- if(selectedElemTopPos < (angular.element(containerUL)[0].scrollTop) )
- {
- angular.element(containerUL)[0].scrollTop -= 30;
- }
- else if((selectedElemTopPos + 30) > (angular.element(containerUL)[0].clientHeight))
- {
- angular.element(containerUL)[0].scrollTop += 30;
- }
-
- }
- });
- };
- scope.selectNext = function()
- {
- if((scope.selectedIndex + 1) <= (scope.cName.length-1))
- {
- scope.selectedIndex += 1;
- if(!scope.showlist)
- {
- scope.selectOption(scope.selectMsg,scope.selectedIndex ,false);
- }
- scope.$apply();
- }
- scope.setCurrentTop();
- };
- scope.selectPrev = function()
- {
- if((scope.selectedIndex - 1) >= 0)
- {
- scope.selectedIndex -= 1;
- if(!scope.showlist)
- {
- scope.selectOption(scope.selectMsg,scope.selectedIndex ,false);
- }
- scope.$apply();
- }
- else if(scope.selectedIndex -1 < 0)
- {
- scope.selectedIndex = -1;
- if(!scope.showlist)
- {
- scope.selectOption(scope.selectMsg,scope.selectedIndex ,false);
- }
- scope.$apply();
- }
- scope.setCurrentTop();
-
- };
- scope.updateSelection = function(sItem)
- {
- scope.selectedOption = sItem.title;
- scope.title = "";
- };
-
- scope.$watch('selCategory',function(value)
- {
- if(value){
- scope.updateSelection(value);
- };
- });
- ctrl.$viewChangeListeners.push(function(){
- scope.$eval(attr.ngChange);
- });
- ctrl.$render = function(){
- scope.selCategory = ctrl.$viewValue;
- };
- var outsideClick = function(e){
- var isElement = $isElement(angular.element(e.target), element, $document);
- if(!isElement) {
- scope.showlist = false;
- scope.$apply();
- }
- };
- $documentBind.click('showlist', outsideClick, scope);
- }
- };
-}])
-
-.directive('textDropdown', ['$document', '$isElement', '$documentBind', "keymap", function($document,$isElement,$documentBind,keymap) {
- return {
- restrict: 'EA',
- replace: true,
- scope: {
- actions: '=actions',
- defaultAction: '=defaultAction',
- onActionClicked: '=?'
- },
- templateUrl : 'app/scripts/ng_js_att_tpls/select/textDropdown.html',
-
- link: function(scope, element, attr) {
- scope.selectedIndex = 0;
- scope.selectedOption = attr.placeholder;
- scope.isDisabled = false;
- scope.isActionsShown = false;
-
- if(typeof scope.defaultAction === 'undefined')
- {
- scope.currentAction = scope.actions[0];
- scope.selectedIndex = 0;
- } else if (typeof scope.defaultAction !== 'undefined' || scope.defaultAction !== '') {
- for (var act in scope.actions)
- {
- if (scope.actions[act] === scope.defaultAction)
- {
- scope.currentAction = scope.actions[act];
- scope.selectedIndex = scope.actions.indexOf(act);
- scope.isActionsShown = false;
-
- break;
- }
- }
-
- } else {
- scope.currentAction = scope.actions[0];
- }
-
- scope.toggle = function() {
- scope.isActionsShown = !scope.isActionsShown;
- };
-
- scope.chooseAction = function($event, action){
-
- if ($event != null) {
- scope.currentAction = action;
- scope.selectedIndex = scope.actions.indexOf(action);
- }
- else {
- scope.currentAction = scope.actions[scope.selectedIndex];
- }
-
- if (angular.isFunction(scope.onActionClicked))
- {
- scope.onActionClicked(scope.currentAction);
- }
-
- scope.toggle();
- };
-
- scope.isCurrentAction = function(action) {
- return (action === scope.currentAction);
- };
-
- // cato
- element.bind("keydown", function(e){
- if (keymap.isAllowedKey(e.keyCode) || keymap.isControl(e) || keymap.isFunctionKey(e))
- {
- e.preventDefault();
- e.stopPropagation();
- switch (e.keyCode) {
- case keymap.KEY.DOWN:
- scope.selectNext();
- break;
- case keymap.KEY.UP:
- scope.selectPrev();
- break;
- case keymap.KEY.ENTER:
- scope.selectCurrent();
- break;
- case keymap.KEY.ESC:
- scope.isActionsShown = false;
- scope.$apply();
- break;
- default:;
- }
- scope.$apply();
- return;
- }
- });
-
- if(attr.disabled)
- {
- scope.isDisabled = true;
- }
-
-
- scope.selectCurrent = function()
- {
- if (scope.selectedIndex < 0)
- {
- scope.selectedIndex = 0;
- }
-
-
- if(!scope.isActionsShown) {
- scope.toggle();
- }
- else {
- scope.chooseAction(null, scope.currentAction);
- }
- };
-
- scope.selectNext = function()
- {
- if(scope.isActionsShown)
- {
- if((scope.selectedIndex + 1) < scope.actions.length)
- {
- scope.selectedIndex += 1;
- scope.$apply();
-
- }
- else{
- scope.selectedIndex = (scope.actions.length - 1);
- scope.$apply();
-
- }
- }
- };
-
- scope.selectPrev = function()
- {
- if(scope.isActionsShown)
- {
- if((scope.selectedIndex - 1) >= 0)
- {
- scope.selectedIndex -= 1;
- scope.$apply();
- }
- else if(scope.selectedIndex - 1 < 0)
- {
- scope.selectedIndex = 0;
- scope.$apply();
- }
- }
- };
-
- scope.hoverIn = function(cItem)
- {
- scope.selectedIndex = cItem;
- };
-
-
- //end cato
-
- var outsideClick = function(e) {
- var isElement = $isElement(angular.element(e.target), element, $document);
-
- if(!isElement) {
- scope.toggle();
- scope.$apply();
- }
-
- };
-
- $documentBind.click('isActionsShown', outsideClick, scope);
-
- }
- };
-}]);
-
-angular.module('att.abs.slider', ['att.abs.position'])
- .constant('sliderDefaultOptions', {
- width: 300,
- step: 1,
- precision: 0,
- disabledWidth: 116
- })
- .directive('attSlider', ['sliderDefaultOptions','$position', function(sliderDefaultOptions,$position)
- {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- scope: {
- floor: "=",
- ceiling: "=",
- step: "@",
- precision: "@",
- width: "@",
- textDisplay: "=",
- value: "=",
- ngModelSingle: '=?',
- ngModelLow: '=?',
- ngModelHigh: '=?',
- ngModelDisabled: '=?'
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/slider/slider.html',
- link: function(scope, elem, attr)
- {
- var minOffset, maxOffset, newOffset, offsetRange, valueRange, start_x = 0, disabledRange, disabled, evFlag = false, minValue, maxValue, range, refLow, refHigh, maxPtr, minPtr, singlePtr, getHandles;
- scope.minPtrOffset = 0;
- scope.maxPtrOffset = 0;
- var disableWidth = sliderDefaultOptions.disabledWidth;
- //Get handles
- var obj = elem.children();
- disabledRange = obj[0].children;
- disabledRange = angular.element(disabledRange[0]);
- getHandles = obj[1].children;
- singlePtr = angular.element(getHandles[0]);
- minPtr = angular.element(getHandles[1]);
- maxPtr = angular.element(getHandles[2]);
- disabled = ((attr.ngModelSingle == null) && (attr.ngModelLow == null) && (attr.ngModelHigh == null)) && (attr.ngModelDisabled != null);
- range = (attr.ngModelSingle == null) && ((attr.ngModelLow != null) && (attr.ngModelHigh != null));
- refLow = 'ngModelLow';
- refHigh = 'ngModelHigh';
- if (!range) {
- minPtr.remove();
- maxPtr.remove();
- }
- else {
- singlePtr.remove();
- }
- if (!disabled) {
- disabledRange.remove();
- }
- else {
- scope.disabledStyle = {width: disableWidth + 'px', zIndex: 1};
- scope.handleStyle = {left: disableWidth + 'px'};
- }
- minValue = parseFloat(scope.floor);
- maxValue = parseFloat(scope.ceiling);
- valueRange = maxValue - minValue;
- minOffset = 0;
- if (attr.width !== undefined) {
- maxOffset = attr.width;
- }
- else {
- if (elem[0].clientWidth !== 0) {
- maxOffset = elem[0].clientWidth;
- }
- else {
- maxOffset = sliderDefaultOptions.width;
- }
- }
- offsetRange = maxOffset - minOffset;
- //Key Down Event
- scope.keyDown = function(ev){
- if(ev.keyCode === 39){
- var elemLeft = $position.position(elem).left;
- if (newOffset){
- newOffset = sliderDefaultOptions.step + newOffset;
- }
- else{newOffset = sliderDefaultOptions.step + elemLeft;}
- }
- else if(ev.keyCode === 37){
- var ptrLeft = $position.position(singlePtr).left;
- if(newOffset){
- if (newOffset!==0){
- newOffset = newOffset - sliderDefaultOptions.step ;
- }
- }
- else{
- newOffset = ptrLeft - sliderDefaultOptions.step ;}
- }
- if(newOffset>=0){
- scope.ptrOffset(newOffset);
- }
- };
- //Mouse Down Event
- scope.mouseDown = function(e, ref) {
- scope.ref = ref;
- evFlag = true;
- if (!range){
- if (newOffset)
- {
- start_x = e.clientX - newOffset;
- }
- else {
- start_x = e.clientX;
- }
- } else {
- if (scope.ref === refLow) {
- start_x = e.clientX - scope.minPtrOffset;
- }
- else {
- start_x = e.clientX - scope.maxPtrOffset;
- }
- }
- if (disabled) {
- scope.ref= 'ngModelDisabled';
- scope.disabledStyle = {width: disableWidth + 'px', zIndex: 1};
- }
- };
- // Mouse Move Event
- scope.moveElem = function(ev) {
- if (evFlag) {
- var eventX;
- eventX = ev.clientX;
- newOffset = eventX - start_x;
- scope.ptrOffset(newOffset);
- }
- };
- // Mouse Up Event
- scope.mouseUp = function(ev) {
- evFlag = false;
- minPtr.removeClass('dragging');
- maxPtr.removeClass('dragging');
- singlePtr.removeClass('dragging');
- $(document).off('mousemove');
- };
- //Function to calculate the current PositionValue
- scope.calStep = function(value, precision, step, floor) {
- var decimals, remainder, roundedValue, steppedValue;
- if (floor === null) {
- floor = 0;
- }
- if (step === null) {
- step = 1 / Math.pow(10, precision);
- }
- remainder = (value - floor) % step;
- steppedValue = remainder > (step / 2) ? value + step - remainder : value - remainder;
- decimals = Math.pow(10, precision);
- roundedValue = steppedValue * decimals / decimals;
- return roundedValue.toFixed(precision);
- };
- //Function to calculate Offset Percent
- scope.percentOffset = function(offset) {
- return ((offset - minOffset) / offsetRange) * 100;
- };
- //Function to calculate Offset position
- scope.ptrOffset = function(newOffset){
- var newPercent, newValue;
- newOffset = Math.max(Math.min(newOffset, maxOffset), minOffset);
- newPercent = scope.percentOffset(newOffset);
- newValue = minValue + (valueRange * newPercent / 100.0);
- if (range) {
- var rangeSliderWidth;
- if (scope.ref === refLow) {
- scope.minHandleStyle = {left: newOffset + "px"};
- scope.minNewVal = newValue;
- scope.minPtrOffset = newOffset;
- minPtr.addClass('dragging');
- if (newValue > scope.maxNewVal) {
- scope.ref = refHigh;
- scope.maxNewVal = newValue;
- scope.maxPtrOffset = newOffset;
- maxPtr.addClass('dragging');
- minPtr.removeClass('dragging');
- scope.maxHandleStyle = {left: newOffset + "px"};
- }
- }
- else {
- scope.maxHandleStyle = {left: newOffset + "px"};
- scope.maxNewVal = newValue;
- scope.maxPtrOffset = newOffset;
- maxPtr.addClass('dragging');
- if (newValue < scope.minNewVal) {
- scope.ref = refLow;
- scope.minVal = newValue;
- scope.minPtrOffset = newOffset;
- minPtr.addClass('dragging');
- maxPtr.removeClass('dragging');
- scope.minHandleStyle = {left: newOffset + "px"};
- }
- }
- rangeSliderWidth = parseInt(scope.maxPtrOffset) - parseInt(scope.minPtrOffset);
- scope.rangeStyle = {width: rangeSliderWidth + "px", left: scope.minPtrOffset + "px"};
- }
- else {
- if (disabled && newOffset > disableWidth) {
- scope.rangeStyle = {width: newOffset + "px", zIndex: 0};
- }
- else {
- singlePtr.addClass('dragging');
- scope.rangeStyle = {width: newOffset + "px"};
- }
- scope.handleStyle = {left: newOffset + "px"};
- }
- if ((scope.precision === undefined) || (scope.step === undefined)) {
- scope.precision = sliderDefaultOptions.precision;
- scope.step = sliderDefaultOptions.step;
- }
- newValue = scope.calStep(newValue, parseInt(scope.precision), parseFloat(scope.step), parseFloat(scope.floor));
- scope[scope.ref] = newValue;
- };
- }
- };
- }
- ]).directive('attSliderMin',[function()
- {
- return{
- require: '^attSlider',
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/slider/minContent.html'
- };
- }
- ]).directive('attSliderMax',[function()
- {
- return{
- require: '^attSlider',
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/slider/maxContent.html'
- };
- }
- ]);
-angular.module('att.abs.splitButtonDropdown', ['att.abs.utilities'])
- .directive('attButtonDropdown', ['$document', '$parse', '$documentBind', function($document, $parse, $documentBind) {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/splitButtonDropdown/splitButtonDropdown.html',
- scope: {
- btnText: "@",
- btnType: "@",
- btnLink: "@",
- btnClick: "&"
- },
- link: function(scope, element, attr) {
- scope.isSmall = false;
- scope.isDropDownOpen = false;
- scope.isActionDropdown = false;
-
- if (attr.small === "") {
- scope.isSmall = true;
- }
-
- if (!(scope.btnText)) {
- scope.isActionDropdown = true;
- }
-
- scope.clickFxn = function() {
- if(typeof scope.btnClick === "function" && !scope.btnLink){
- scope.btnClick = $parse(scope.btnClick);
- scope.btnClick();
- }
- };
-
- scope.toggleDropdown = function() {
- if (!(scope.btnType === 'disabled')) {
- scope.isDropDownOpen = !scope.isDropDownOpen;
- }
- };
-
- scope.hideDropdown = function() {
- if (!(scope.btnType === 'disabled')) {
- scope.isDropDownOpen = false;
- }
- };
-
- var outsideClick = function() {
- scope.$apply(function() {
- scope.isDropDownOpen = false;
- });
- };
-
- $documentBind.click('isDropDownOpen', outsideClick, scope);
-
- attr.$observe('btnType', function(val) {
- scope.btnType = val;
- });
- }
- };
-
- }]);
-angular.module('att.abs.splitIconButton', ['att.abs.utilities'])
-.constant('iconStateConstants', {
- MIDDLE: 'middle',
- LEFT: 'left',
- RIGHT: 'right',
- NEXT_TO_DROPDOWN:'next-to-dropdown',
- LEFT_NEXT_TO_DROPDOWN:'left-next-to-dropdown',
- DIR_TYPE: {
- LEFT: 'left',
- RIGHT: 'right',
- BUTTON: 'button'
- },
- KEYBOARD: {
- UP: 38,
- DOWN:40,
- ENTER: 13,
- ESC: 27
- },
- SPLIT_ICON_BTN_EVENT_EMITTER_KEY: 'splitIconButtonTap'
-})
-.directive('expandableLine', ['$document',function($document){
- return {
- restrict: 'EA',
- replace: true,
- priority: 300,
- require: ['^attSplitIconButton', 'expandableLine'],
- controller: ['$scope', function($scope){
- $scope.isActive = false;
- this.setActiveState = function(isActive){
- $scope.isActive = isActive;
- }
-
- this.isActive = $scope.isActive;
- this.dirType = $scope.dirType;
- }],
- template: '<div ng-class="{\'expand-line-container\': !isActive, \'expand-line-container-active\': isActive}"> <div ng-class="{\'hovered-line\':isActive, \'vertical-line\':!isActive}"> </div></div>',
- scope:{
- dirType: '@'
- },
- link: function(scope,element,attr,ctrls){
- var attSplitIconButtonCtrl = ctrls[0];
- var expandableLineCtrl = ctrls[1];
- attSplitIconButtonCtrl.addSubCtrl(expandableLineCtrl);
- }
- }
-}])
-.controller('AttSplitIconCtrl', ['$scope', function($scope){
- this.setType = function(type){
- $scope.type = type;
- };
-
- this.isDropdown = function(isDropdown){
- $scope.isDropdown = isDropdown;
- };
-
- this.dropDownClicked = function(){
- if($scope.dropDownClicked)
- $scope.dropDownClicked();
- }
-
- this.dirType = $scope.dirType;
-
-}])
-.directive('attSplitIcon', ['$document', '$timeout','iconStateConstants','$documentBind','events',
- function($document,$timeout,iconStateConstants,$documentBind, events){
- return {
- restrict: 'EA',
- replace: true,
- priority: 200,
- transclude: true,
- require: ['^attSplitIconButton','attSplitIcon'],
- templateUrl: 'app/scripts/ng_js_att_tpls/splitIconButton/splitIcon.html',
- scope:{
- icon: '@',
- hoverWatch: '=',
- dropDownWatch: '=',
- dirType: '@'
- },
- controller:'AttSplitIconCtrl',
- link: function(scope,element,attr,ctrls){
-
- var attSplitIconButtonCtrl = ctrls[0];
- var attSplitIconCtrl = ctrls[1];
- attSplitIconButtonCtrl.addSubCtrl(attSplitIconCtrl);
-
- scope.iconStateConstants = iconStateConstants;
-
- var currentIndex = 0;
- var isMyElement = false;
- var listElements;
-
- scope.isDropdown = false;
- scope.isDropdownOpen = false;
-
-
- scope.$on(iconStateConstants.SPLIT_ICON_BTN_EVENT_EMITTER_KEY, function(evnt, data){
- if(typeof data == 'boolean' && data){
- scope.dropDownClicked();
-
- /*
- Check if the dropdown is open and if we are selecting one
- of the items, so that when pressing enter it will trigger it.
- */
- if(scope.isDropDownOpen){
- listElements[currentIndex].eq(0).find('a')[0].click();
- }
- }
- else{
- var e = data;
- //Only trigger the keyboard event if the icon button is a dropdown type
- if(scope.isDropdown)
- triggerKeyboardEvents(e);
- }
-
- function triggerKeyboardEvents(e){
- if(e.which == iconStateConstants.KEYBOARD.ESC){
- outsideClick();
- }
- if( e.which == iconStateConstants.KEYBOARD.UP ||
- e.which == iconStateConstants.KEYBOARD.DOWN){
-
- e.preventDefault();
- events.stopPropagation(e);
- //e.stopPropagation();
-
- if(e.which == iconStateConstants.KEYBOARD.DOWN){
- //Dropdown is open and the user taps down again
-
- if(scope.isDropDownOpen){
- //Now we need to go through the rows in the dropdown
- scope.nextItemInDropdown();
- }
- //Dropdown is not open
- else{
- isMyElement = true;
- outsideClick();
- listElementsInit();
- }
- }
- else if(e.which == iconStateConstants.KEYBOARD.UP){
- if(scope.isDropDownOpen){
- scope.previousItemInDropdown();
- }else{
- }
- }
-
- else{
- isMyElement = false;
- outsideClick();
- }
- }else if(e.which == iconStateConstants.KEYBOARD.ENTER){
- if(scope.isDropDownOpen){
- listElementsInit();
- }else{
- }
- }
- }
-
- function listElementsInit(){
- if(listElements == undefined){
- listElements = [];
- var liTemps = element.find('li');
- for(var i = 0; i < liTemps.length; i++){
- listElements.push(liTemps.eq(i));
- }
- listElements[currentIndex].children().eq(0).addClass('selected-item');
- }
- }
-
- });
-
- scope.nextItemInDropdown = function(){
- if(listElements && currentIndex < listElements.length - 1){
- currentIndex++;
- listElements[currentIndex - 1].children().eq(0).removeClass('selected-item');
- listElements[currentIndex].children().eq(0).addClass('selected-item');
- }
- };
-
- scope.previousItemInDropdown = function(){
- if(currentIndex > 0){
- currentIndex--;
- listElements[currentIndex].children().eq(0).addClass('selected-item');
-
- if(currentIndex + 1 < listElements.length)
- listElements[currentIndex + 1].children().eq(0).removeClass('selected-item');
- }
- };
-
- scope.$watch('isIconHovered', function(val){
- scope.hoverWatch = val;
- });
-
- scope.$watch('type', function(val){
-
- function toggleValues(isMiddle,isNextToDropDown,isRight,isLeft,isLeftNextDropdown){
- scope['isMiddle'] = isMiddle;
- scope['isNextToDropDown'] = isNextToDropDown;
- scope['isRight'] = isRight;
- scope['isLeft'] = isLeft;
- scope['isLeftNextDropdown'] = isLeftNextDropdown;
- };
-
- if(val == scope.iconStateConstants.MIDDLE){
- toggleValues(true,false,false,true,false);
- }
- else if(val == scope.iconStateConstants.LEFT){
- toggleValues(false,false,false,true,false);
- }
- else if(val == scope.iconStateConstants.RIGHT){
- toggleValues(false,false,true,false,false);
- }else if(val == scope.iconStateConstants.NEXT_TO_DROPDOWN){
- toggleValues(false,true,true,true,false);
- }else if(val == scope.iconStateConstants.LEFT_NEXT_TO_DROPDOWN){
- toggleValues(false,false,false,true,true);
- }
- });
-
- if(attr.dropDownId && attr.dropDownId != ''){
- scope.dropDownId = attr.dropDownId;
- scope.isDropdown = true;
- }
-
- scope.dropDownClicked = function(){
- isMyElement = true;
- };
-
- scope.toggleDropdown = function(val) {
- if(val != undefined)
- scope.isDropDownOpen=val;
- else
- scope.isDropDownOpen = !scope.isDropDownOpen;
-
- scope.dropDownWatch = scope.isDropDownOpen;
- };
-
- var outsideClick = function(e) {
- if(scope.isDropdown){
- if (isMyElement) {
- isMyElement = false;
- scope.toggleDropdown();
- }else{
- scope.toggleDropdown(false);
- }
- scope.$apply();
- }
- };
-
- $documentBind.click('isDropdown', outsideClick, scope);
- }
- }
-}])
-.controller('AttSplitIconButtonCtrl',['$scope', 'iconStateConstants',function($scope,iconStateConstants){
-
- this.subCtrls = [];
-
- $scope.isLeftLineShown=true;
- $scope.isRightLineShown=true;
- $scope.childrenScopes = [];
-
- var origLeftLineShown = $scope.isLeftLineShown;
- var origRightLineShown = $scope.isRightLineShown;
-
- var that = this;
-
- function getDirIndex(dirType){
- var index = -1;
- for(var c in that.subCtrls){
- var ctrl = that.subCtrls[c];
- if(ctrl.dirType==dirType){
- index = c;
- break;
- }
- }
- return index;
- }
-
- this.addSubCtrl = function(sub){
- this.subCtrls.push(sub);
- };
-
- this.isLeftLineShown = function(isShown){
- if(isShown == undefined)
- return $scope.isLeftLineShown;
- else
- $scope.isLeftLineShown = isShown;
- };
-
- this.isRightLineShown = function(isShown){
- if(isShown == undefined)
- return $scope.isRightLineShown;
- else
- $scope.isRightLineShown = isShown;
- };
-
- this.setLeftLineHover = function(isHovered){
- var leftLineIndex = getDirIndex(iconStateConstants.DIR_TYPE.LEFT);
-
- if($scope.isLeftLineShown){
- if(this.subCtrls[leftLineIndex] && this.subCtrls[leftLineIndex].setActiveState){
- this.subCtrls[leftLineIndex].setActiveState(isHovered);
- }
- }
- };
-
- this.setRightLineHover = function(isHovered){
- var rightLineIndex = getDirIndex(iconStateConstants.DIR_TYPE.RIGHT);
- if($scope.isRightLineShown){
- if(this.subCtrls[rightLineIndex] && this.subCtrls[rightLineIndex].setActiveState){
- this.subCtrls[rightLineIndex].setActiveState(isHovered);
- }
- }
- };
-
- this.toggleLines = function(isHovered,buttonGroupCtrl,buttonCtrl,isDropDownOpen){
-
- var subIconButtons = buttonGroupCtrl.subIconButtons;
- var subIconButtonsLength = subIconButtons.length;
-
- var leftLineIndex = getDirIndex(iconStateConstants.DIR_TYPE.LEFT);
- var rightLineIndex = getDirIndex(iconStateConstants.DIR_TYPE.RIGHT);
-
- function noVerticalLineToggle(){
- for(var i =0; i < subIconButtonsLength; i++){
- if(subIconButtons[i] == buttonCtrl){
- if(i + 1 <= subIconButtonsLength - 1){
- if(subIconButtons[i+1].isLeftLineShown() && subIconButtons[i+1].subCtrls[leftLineIndex]
- && subIconButtons[i+1].subCtrls[leftLineIndex].setActiveState)
- subIconButtons[i+1].subCtrls[leftLineIndex].setActiveState(isHovered);
- }
- if(i - 1 >= 0){
- if(subIconButtons[i-1].isRightLineShown() && subIconButtons[i-1].subCtrls[rightLineIndex]
- && subIconButtons[i-1].subCtrls[rightLineIndex].setActiveState)
- subIconButtons[i-1].subCtrls[rightLineIndex].setActiveState(isHovered);
- }
- break;
- }
- }
- }
-
- if(isDropDownOpen){
- /*
- If the button is next to the dropdown button then just keep the
- buttons left line or its left neighbors right line toggled on
- If the button is the dropdown button don't do anything
- else do things normally witht the button
- */
- if(subIconButtons[subIconButtonsLength-1] == buttonCtrl){
-
- }
- else if(subIconButtons[subIconButtonsLength-2]==buttonCtrl){
- if(subIconButtons[subIconButtonsLength-2].isLeftLineShown())
- subIconButtons[subIconButtonsLength-2].subCtrls[leftLineIndex].setActiveState(isHovered);
- else if(subIconButtonsLength - 3 >= 0){
- if(subIconButtons[subIconButtonsLength-3].isRightLineShown())
- subIconButtons[subIconButtonsLength-3].subCtrls[rightLineIndex].setActiveState(isHovered);
- }
- }else{
-
- noVerticalLineToggle();
-
- if($scope.isLeftLineShown){
- this.subCtrls[leftLineIndex].setActiveState(isHovered);
- }
-
- if($scope.isRightLineShown){
- this.subCtrls[rightLineIndex].setActiveState(isHovered);
- }
- }
- }
- else{
- //Handle Special cases where they aren't showing any vertical lines
- //and the dropdown isn't down
- if(!$scope.isLeftLineShown && !$scope.isRightLineShown){
- noVerticalLineToggle();
- }
-
- if($scope.isLeftLineShown){
- if(this.subCtrls[leftLineIndex].setActiveState)
- this.subCtrls[leftLineIndex].setActiveState(isHovered);
- }
-
- if($scope.isRightLineShown){
- if(this.subCtrls[rightLineIndex].setActiveState)
- this.subCtrls[rightLineIndex].setActiveState(isHovered);
- }
- }
- };
-
- this.setButtonType = function(type){
- var buttonIndex = getDirIndex(iconStateConstants.DIR_TYPE.BUTTON);
- if(this.subCtrls[buttonIndex] && this.subCtrls[buttonIndex].setType)
- this.subCtrls[buttonIndex].setType(type);
- };
-
-}])
-.directive('attSplitIconButton', ['$document', 'iconStateConstants',
- function($document,iconStateConstants){
- return {
- restrict: 'EA',
- replace: true,
- priority: 100,
- transclude: true,
- require: ['^attSplitIconButtonGroup', 'attSplitIconButton'],
- controller: 'AttSplitIconButtonCtrl',
- templateUrl: 'app/scripts/ng_js_att_tpls/splitIconButton/splitIconButton.html',
- scope:{
- icon: '@',
- dropDownId: '@'
- },
- link: function(scope,element,attr,ctrls){
-
-
- var attSplitButtonGroupCtrl = ctrls[0];
- var attSplitIconButtonCtrl = ctrls[1];
-
- attSplitButtonGroupCtrl.addIconButton(attSplitIconButtonCtrl);
-
- element.bind('keydown', function(e){
- //Check if the key is the up or down key
- //if()
- if(e.which == iconStateConstants.KEYBOARD.UP ||
- e.which == iconStateConstants.KEYBOARD.DOWN ||
- e.which == iconStateConstants.KEYBOARD.ENTER ||
- e.which == iconStateConstants.KEYBOARD.ESC ) {
-
- scope.clickHandler();
- scope.$broadcast(iconStateConstants.SPLIT_ICON_BTN_EVENT_EMITTER_KEY, e);
- }
- });
-
- scope.dropDownWatch = false;
-
- scope.iconStateConstants = iconStateConstants;
-
- scope.clickHandler = function(){
- attSplitButtonGroupCtrl.hideLeftLineRightButton(attSplitIconButtonCtrl);
- };
-
- scope.$watch('isHovered', function(val){
- if(val){
- attSplitIconButtonCtrl.toggleLines(val,attSplitButtonGroupCtrl,attSplitIconButtonCtrl,attSplitButtonGroupCtrl.isDropDownOpen);
- }else{
- attSplitIconButtonCtrl.toggleLines(val,attSplitButtonGroupCtrl,attSplitIconButtonCtrl,attSplitButtonGroupCtrl.isDropDownOpen);
- }
- });
-
- scope.$watch('dropDownWatch', function(val){
- attSplitButtonGroupCtrl.isDropDownOpen = val;
- attSplitButtonGroupCtrl.toggleDropdownState(val);
- });
- }
- }
-}])
-.controller('AttSplitIconButtonGroupCtrl', ['$scope','iconStateConstants',function($scope,iconStateConstants){
-
- this.subIconButtons = [];
- this.addIconButton = function(iconButton){
- this.subIconButtons.push(iconButton);
- };
-
- this.isDropDownOpen = false;
-
- this.hideLeftLineRightButton = function(btn){
- var numButtons = this.subIconButtons.length;
- var buttonLeftOfRightMost = this.subIconButtons[numButtons - 2];
- var rightMostButton = this.subIconButtons[numButtons -1];
-
- if (btn != buttonLeftOfRightMost && btn != rightMostButton ){
- rightMostButton.setLeftLineHover(false);
- }
- };
-
- this.toggleDropdownState = function(isDropDownOpen){
-
- var numButtons = this.subIconButtons.length;
-
- if(numButtons > 2){
-
- if(isDropDownOpen){
-
- if(this.subIconButtons[numButtons - 2].isRightLineShown())
- this.subIconButtons[numButtons - 2].setRightLineHover(true);
- else
- this.subIconButtons[numButtons - 1].setLeftLineHover(true);
-
- this.subIconButtons[numButtons - 2].setButtonType(iconStateConstants.NEXT_TO_DROPDOWN);
- }else{
-
- this.subIconButtons[numButtons - 1].setLeftLineHover(false);
- this.subIconButtons[numButtons - 2].setButtonType(iconStateConstants.MIDDLE);
- }
-
- }else{
-
- if(isDropDownOpen){
- this.subIconButtons[0].setRightLineHover(true);
- this.subIconButtons[0].setButtonType(iconStateConstants.LEFT_NEXT_TO_DROPDOWN);
- }else{
- this.subIconButtons[0].setButtonType(iconStateConstants.LEFT);
- }
- }
-
- };
-
-}])
-.directive('attSplitIconButtonGroup', ['$document', '$timeout', 'iconStateConstants' ,function($document,$timeout,iconStateConstants){
- return {
- restrict: 'EA',
- replace: true,
- priority: 50,
- transclude: true,
- require: 'attSplitIconButtonGroup',
- controller: 'AttSplitIconButtonGroupCtrl',
- templateUrl: 'app/scripts/ng_js_att_tpls/splitIconButton/splitIconButtonGroup.html',
- scope:{},
- link: function(scope,element,attr,ctrls){
-
- $timeout(initialize,100);
-
- function initialize(){
-
- var subIconButtonCtrls = ctrls.subIconButtons;
- var leftMostButtonIndex = 0;
- var rightMostButtonIndex =subIconButtonCtrls.length-1;
-
- //left most button config
- subIconButtonCtrls[leftMostButtonIndex].setButtonType(iconStateConstants.LEFT);
- subIconButtonCtrls[leftMostButtonIndex].isLeftLineShown(false);
- subIconButtonCtrls[leftMostButtonIndex].isRightLineShown(true);
-
- //right most button config
- subIconButtonCtrls[rightMostButtonIndex].setButtonType(iconStateConstants.RIGHT);
- subIconButtonCtrls[rightMostButtonIndex].isRightLineShown(false);
- subIconButtonCtrls[rightMostButtonIndex].isLeftLineShown(false);
-
- //middle buttons config
- if(rightMostButtonIndex >= 2){
- var index = 1;
- while(index < rightMostButtonIndex){
- subIconButtonCtrls[index].setButtonType(iconStateConstants.MIDDLE);
- subIconButtonCtrls[index].isRightLineShown(false);
- subIconButtonCtrls[index].isLeftLineShown(false);
- index++;
- }
-
- var skipIndex = 2;
- while(skipIndex <= rightMostButtonIndex){
- if(skipIndex == rightMostButtonIndex){
- subIconButtonCtrls[skipIndex].isLeftLineShown(true);
- }else{
- subIconButtonCtrls[skipIndex].isRightLineShown(true);
- subIconButtonCtrls[skipIndex].isLeftLineShown(true);
- }
- skipIndex = skipIndex + 2;
- }
- }
-
- //reposition the dropdown
- var ulElem = element.find('ul');
- if(ulElem.length > 0){
- var numButtons = rightMostButtonIndex+1;
- if(numButtons > 2){
- var offset = (numButtons)*34-70+(numButtons/1.5) + 0.5;
- var offSetStr = offset+'px';
- angular.element(ulElem).css('left',offSetStr);
- angular.element(ulElem).css('border-top-left-radius','0px');
- }else{
- angular.element(ulElem).css('left','0px');
- }
- }
- }
- }
- }
-}]);
-
-angular.module('att.abs.stepSlider', ['att.abs.position'])
- .constant('sliderConstants', {
- /*
- The MIT License (MIT)
- Copyright (c) 2013 Julien Valéry
- */
- SLIDER: {
- settings: {
- from: 1,
- to: 40,
- step: 1,
- smooth: true,
- limits: true,
- value: "3",
- dimension: "",
- vertical: false
- },
- className: "jslider",
- selector: ".jslider-"
- },
- EVENTS: {
- },
- COLORS: {
- GREEN: 'green',
- BLUE_HIGHLIGHT: 'blue',
- MAGENTA: 'magenta',
- GOLD: 'gold',
- PURPLE: 'purple',
- DARK_BLUE: 'dark-blue',
- REGULAR: 'regular',
- WHITE: 'white'
- }
- })
- .factory('utils', function () {
- /*
- The MIT License (MIT)
- Copyright (c) 2013 Julien Valéry
- */
- return {
- offset: function (elm) {
- var rawDom = elm[0];
- var _x = 0;
- var _y = 0;
- var body = document.documentElement || document.body;
- var scrollX = window.pageXOffset || body.scrollLeft;
- var scrollY = window.pageYOffset || body.scrollTop;
- _x = rawDom.getBoundingClientRect().left + scrollX;
- _y = rawDom.getBoundingClientRect().top + scrollY;
- return {left: _x, top: _y};
- },
- roundUpToScale: function (mousePrc, scale, cutOffWidth, cutOffIndex) {
- var lowerVal;
- var higherVal;
- var newMousePrc;
- var middle;
-
- for (var index = 1; index < scale.length; index++) {
- lowerVal = scale[index - 1];
- higherVal = scale[index];
- middle = ((higherVal - lowerVal) * .5) + lowerVal;
- /*
- Handles a situation where the user clicks close to the start point of
- the slider but the pointer doesn't move
- */
- if ((lowerVal === 0 && mousePrc <= middle) || checkEquality(lowerVal, mousePrc)) {
- newMousePrc = lowerVal;
- break;
- }
- else if (lowerVal < mousePrc && (mousePrc < higherVal ||
- checkEquality(mousePrc, higherVal)))
- {
- newMousePrc = higherVal;
- break;
- }
- }
- //Check if the newMousePrc is <= the cuttOffPoint
- if (cutOffWidth && newMousePrc < cutOffWidth) {
- return scale[cutOffIndex];
- }
- else {
- return newMousePrc;
- }
- /*
- Checks to see if 2 points are so close that they are
- basically equal.
- */
- function checkEquality(point1, point2) {
- var precision = 0.1;
- if (Math.abs(point2 - point1) <= precision) {
- return true;
- }
- return false;
- }
- },
- valueForDifferentScale: function (from, to, prc, prcToValueMapper) {
- var decimalPrc = prc / 100;
- if (decimalPrc === 0) {
- return from;
- }
- return prcToValueMapper[prc];
- },
- getConversionFactorValue: function (value, conversion, firstDimension) {
- /*
- Loop through the conversion array and keep checking the
- startVal
- */
- if (value <= conversion[0].startVal) {
- return{
- scaledVal: value,
- scaledDimension: firstDimension
- };
- }
- var endIndex = 0;
- for (var index in conversion) {
- var c = conversion[index];
- if (value > c.startVal) {
- endIndex = index;
- }
- }
- var scaleFactor = conversion[endIndex].scaleFactor;
- var scaledVal = value / scaleFactor;
- var scaledDimension = conversion[endIndex].dimension;
- return {
- scaledVal: scaledVal,
- scaledDimension: scaledDimension
- };
- }
- };
- })
- .factory('sliderDraggable', ['utils', function (utils) {
- /*
- The MIT License (MIT)
- Copyright (c) 2013 Julien Valéry
- */
- function Draggable() {
- this._init.apply(this, arguments);
- }
- Draggable.prototype.oninit = function () {
- };
- Draggable.prototype.events = function () {
- };
- Draggable.prototype.onmousedown = function () {
- this.ptr.css({position: "absolute"});
- };
- Draggable.prototype.onmousemove = function (evt, x, y) {
- this.ptr.css({left: x, top: y});
- };
- Draggable.prototype.onmouseup = function () {
- };
- Draggable.prototype.isDefault = {
- drag: false,
- clicked: false,
- toclick: true,
- mouseup: false
- };
- Draggable.prototype._init = function () {
- if (arguments.length > 0) {
- this.ptr = arguments[0];
- this.parent = arguments[2];
- if (!this.ptr) {
- return;
- }
- this.is = {};
- angular.extend(this.is, this.isDefault);
- var offset = utils.offset(this.ptr);
- this.d = {
- left: offset.left,
- top: offset.top,
- width: this.ptr[0].clientWidth,
- height: this.ptr[0].clientHeight
- };
- this.oninit.apply(this, arguments);
- this._events();
- }
- };
- Draggable.prototype._getPageCoords = function (event) {
- var value = {};
- if (event.targetTouches && event.targetTouches[0]) {
- value = {x: event.targetTouches[0].pageX, y: event.targetTouches[0].pageY};
- } else {
- value = {x: event.pageX, y: event.pageY};
- }
- return value;
- };
- Draggable.prototype._bindEvent = function (ptr, eventType, handler) {
- if (this.supportTouches_) {
- ptr[0].attachEvent(this.events_[ eventType ], handler);
- }
- else {
- if (ptr.bind) {
- ptr.bind(this.events_[ eventType ], handler);
- }
- }
- };
- Draggable.prototype._events = function () {
- var self = this;
- this.supportTouches_ = 'ontouchend' in document;
- this.events_ = {
- "click": this.supportTouches_ ? "touchstart" : "click",
- "down": this.supportTouches_ ? "touchstart" : "mousedown",
- "move": this.supportTouches_ ? "touchmove" : "mousemove",
- "up": this.supportTouches_ ? "touchend" : "mouseup",
- "mousedown": this.supportTouches_ ? "mousedown" : "mousedown"
- };
- var documentElt = angular.element(window.document);
- this._bindEvent(documentElt, "move", function (event) {
- if (self.is.drag) {
- event.stopPropagation();
- event.preventDefault();
- if (!self.parent.disabled) {
- self._mousemove(event);
- }
- }
- });
- this._bindEvent(documentElt, "down", function (event) {
- if (self.is.drag) {
- event.stopPropagation();
- event.preventDefault();
- }
- });
- this._bindEvent(documentElt, "up", function (event) {
- self._mouseup(event);
- });
- this._bindEvent(this.ptr, "down", function (event) {
- self._mousedown(event);
- return false;
- });
- this._bindEvent(this.ptr, "up", function (event) {
- self._mouseup(event);
- });
- this.events();
- };
- Draggable.prototype._mousedown = function (evt) {
- this.is.drag = true;
- this.is.clicked = false;
- this.is.mouseup = false;
- var coords = this._getPageCoords(evt);
- this.cx = coords.x - this.ptr[0].offsetLeft;
- this.cy = coords.y - this.ptr[0].offsetTop;
- angular.extend(this.d, {
- left: this.ptr[0].offsetLeft,
- top: this.ptr[0].offsetTop,
- width: this.ptr[0].clientWidth,
- height: this.ptr[0].clientHeight
- });
- if (this.outer && this.outer.get(0)) {
- this.outer.css({height: Math.max(this.outer.height(), $(document.body).height()), overflow: "hidden"});
- }
- this.onmousedown(evt);
- };
- Draggable.prototype._mousemove = function (evt) {
- if (this.uid === 0) {
- return;
- }
- this.is.toclick = false;
- var coords = this._getPageCoords(evt);
- this.onmousemove(evt, coords.x - this.cx, coords.y - this.cy);
- };
- Draggable.prototype._mouseup = function (evt) {
- if (this.is.drag) {
- this.is.drag = false;
- if (this.outer && this.outer.get(0)) {
- if ($.browser.mozilla) {
- this.outer.css({overflow: "hidden"});
- } else {
- this.outer.css({overflow: "visible"});
- }
- if ($.browser.msie && $.browser.version === '6.0') {
- this.outer.css({height: "100%"});
- } else {
- this.outer.css({height: "auto"});
- }
- }
- this.onmouseup(evt);
- }
- };
- return Draggable;
- }])
- .factory('sliderPointer', ['sliderDraggable', 'utils', function (Draggable, utils) {
- /*
- The MIT License (MIT)
- Copyright (c) 2013 Julien Valéry
- */
- function SliderPointer() {
- Draggable.apply(this, arguments);
- }
- SliderPointer.prototype = new Draggable();
- SliderPointer.prototype.oninit = function (ptr, id, _constructor) {
- this.uid = id;
- this.parent = _constructor;
- this.value = {};
- this.settings = angular.copy(_constructor.settings);
- };
- SliderPointer.prototype.onmousedown = function (evt) {
- var off = utils.offset(this.parent.domNode);
- var offset = {
- left: off.left,
- top: off.top,
- width: this.parent.domNode[0].clientWidth,
- height: this.parent.domNode[0].clientHeight
- };
- this._parent = {
- offset: offset,
- width: offset.width,
- height: offset.height
- };
- this.ptr.addClass("jslider-pointer-hover");
- this.setIndexOver();
- };
- SliderPointer.prototype.onmousemove = function (evt, x, y) {
- var coords = this._getPageCoords(evt);
- //val is the percent where the slider pointer is located
- var val = this.calc(coords.x);
- if (!this.parent.settings.smooth) {
- val = utils.roundUpToScale(val,
- this.parent.settings.scale,
- this.parent.settings.cutOffWidth,
- this.parent.settings.cutOffIndex);
- }
- var cutOffWidth = this.parent.settings.cutOffWidth;
- if (cutOffWidth && val < cutOffWidth) {
- val = cutOffWidth;
- }
- this._set(val);
- };
- SliderPointer.prototype.onmouseup = function (evt) {
- if (this.settings.callback && angular.isFunction(this.settings.callback)) {
- var val = this.parent.getValue();
- this.settings.callback.call(this.parent, val);
- }
- this.ptr.removeClass("jslider-pointer-hover");
- };
- SliderPointer.prototype.setIndexOver = function () {
- this.parent.setPointersIndex(1);
- this.index(2);
- };
- SliderPointer.prototype.index = function (i) {
- };
- SliderPointer.prototype.limits = function (x) {
- return this.parent.limits(x, this);
- };
- SliderPointer.prototype.calc = function (coords) {
- var diff = coords - this._parent.offset.left;
- var val = this.limits((diff * 100) / this._parent.width);
- return val;
- };
- SliderPointer.prototype.set = function (value, opt_origin) {
- this.value.origin = this.parent.round(value);
- this._set(this.parent.valueToPrc(value, this), opt_origin);
- };
- SliderPointer.prototype._set = function (prc, opt_origin) {
- if (!opt_origin) {
- this.value.origin = this.parent.prcToValue(prc);
- }
- this.value.prc = prc;
- //Sets the location of the SliderPointer
- this.ptr.css({left: prc + '%'});
- this.parent.redraw(this);
- };
- return SliderPointer;
- }])
- .factory('slider', ['sliderPointer', 'sliderConstants', 'utils', function (SliderPointer, sliderConstants, utils) {
- /*
- The MIT License (MIT)
- Copyright (c) 2013 Julien Valéry
- */
- var cutOffDom;
- function Slider() {
- return this.init.apply(this, arguments);
- }
- function changeCutOffWidth(width) {
- cutOffDom.css('width', width);
- }
- ;
- Slider.prototype.changeCutOffWidth = changeCutOffWidth;
- Slider.prototype.init = function (inputNode, templateNode, settings) {
- this.settings = sliderConstants.SLIDER.settings;
- angular.extend(this.settings, angular.copy(settings));
- this.inputNode = inputNode;
- this.inputNode.addClass("ng-hide");
- this.settings.interval = this.settings.to - this.settings.from;
- if (this.settings.calculate && $.isFunction(this.settings.calculate)) {
- this.nice = this.settings.calculate;
- }
- if (this.settings.onstatechange && $.isFunction(this.settings.onstatechange)) {
- this.onstatechange = this.settings.onstatechange;
- }
- this.is = {init: false};
- this.o = {};
- this.create(templateNode);
- };
- Slider.prototype.create = function (templateNode) {
- var $this = this;
- this.domNode = templateNode;
- var off = utils.offset(this.domNode);
- var offset = {
- left: off.left,
- top: off.top,
- width: this.domNode[0].clientWidth,
- height: this.domNode[0].clientHeight
- };
- this.sizes = {domWidth: this.domNode[0].clientWidth, domOffset: offset};
- angular.extend(this.o, {
- pointers: {},
- labels: {
- 0: {
- o: angular.element(this.domNode.find('div')[5])
- },
- 1: {
- o: angular.element(this.domNode.find('div')[6])
- }
- },
- limits: {
- 0: angular.element(this.domNode.find('div')[3]),
- 1: angular.element(this.domNode.find('div')[5])
- }
- });
- angular.extend(this.o.labels[0], {
- value: this.o.labels[0].o.find("span")
- });
- angular.extend(this.o.labels[1], {
- value: this.o.labels[1].o.find("span")
- });
- if (!$this.settings.value.split(";")[1]) {
- this.settings.single = true;
- }
- var domNodeDivs = this.domNode.find('div');
- cutOffDom = angular.element(domNodeDivs[8]);
- if (cutOffDom && cutOffDom.css) {
- cutOffDom.css('width', '0%');
- }
- var pointers = [angular.element(domNodeDivs[1]), angular.element(domNodeDivs[2])];
- angular.forEach(pointers, function (pointer, key) {
- $this.settings = angular.copy($this.settings);
- var value = $this.settings.value.split(';')[key];
- if (value) {
- $this.o.pointers[key] = new SliderPointer(pointer, key, $this);
- var prev = $this.settings.value.split(';')[key - 1];
- if (prev && parseInt(value, 10) < parseInt(prev, 10)) {
- value = prev;
- }
- var value1 = value < $this.settings.from ? $this.settings.from : value;
- value1 = value > $this.settings.to ? $this.settings.to : value;
- $this.o.pointers[key].set(value1, true);
- if (key === 0) {
- $this.domNode.bind('mousedown', $this.clickHandler.apply($this));
- }
- }
- });
- this.o.value = angular.element(this.domNode.find("i")[2]);
- this.is.init = true;
- angular.forEach(this.o.pointers, function (pointer) {
- $this.redraw(pointer);
- });
- };
- Slider.prototype.clickHandler = function () {
- var self = this;
- return function (evt) {
- if (self.disabled) {
- return;
- }
- var className = evt.target.className;
- var targetIdx = 0;
- if (className.indexOf('jslider-pointer-to') > 0) {
- targetIdx = 1;
- }
- var _off = utils.offset(self.domNode);
- var offset = {
- left: _off.left,
- top: _off.top,
- width: self.domNode[0].clientWidth,
- height: self.domNode[0].clientHeight
- };
- targetIdx = 1;
- var targetPtr = self.o.pointers[targetIdx];
- targetPtr._parent = {offset: offset, width: offset.width, height: offset.height};
- targetPtr._mousemove(evt);
- targetPtr.onmouseup();
- return false;
- };
- };
- Slider.prototype.disable = function (bool) {
- this.disabled = bool;
- };
- Slider.prototype.nice = function (value) {
- return value;
- };
- Slider.prototype.onstatechange = function () {
- };
- Slider.prototype.limits = function (x, pointer) {
- if (!this.settings.smooth) {
- var step = this.settings.step * 100 / (this.settings.interval);
- x = Math.round(x / step) * step;
- }
- var another = this.o.pointers[1 - pointer.uid];
- if (another && pointer.uid && x < another.value.prc) {
- x = another.value.prc;
- }
- if (another && !pointer.uid && x > another.value.prc) {
- x = another.value.prc;
- }
- if (x < 0) {
- x = 0;
- }
- if (x > 100) {
- x = 100;
- }
- var val = Math.round(x * 10) / 10;
- return val;
- };
- Slider.prototype.setPointersIndex = function (i) {
- angular.forEach(this.getPointers(), function (pointer, i) {
- pointer.index(i);
- });
- };
- Slider.prototype.getPointers = function () {
- return this.o.pointers;
- };
- Slider.prototype.onresize = function () {
- var self = this;
- this.sizes = {
- domWidth: this.domNode[0].clientWidth,
- domHeight: this.domNode[0].clientHeight,
- domOffset: {
- left: this.domNode[0].offsetLeft,
- top: this.domNode[0].offsetTop,
- width: this.domNode[0].clientWidth,
- height: this.domNode[0].clientHeight
- }
- };
- angular.forEach(this.o.pointers, function (ptr, key) {
- self.redraw(ptr);
- });
- };
- Slider.prototype.update = function () {
- this.onresize();
- this.drawScale();
- };
- Slider.prototype.drawScale = function () {
- };
- Slider.prototype.redraw = function (pointer) {
- if (!this.settings.smooth) {
- var newMousePrc = utils.roundUpToScale(pointer.value.prc,
- this.settings.scale,
- this.settings.cutOffWidth,
- this.settings.cutOffIndex);
- pointer.value.origin = newMousePrc;
- pointer.value.prc = newMousePrc;
- }
-
- if (!this.is.init) {
- return false;
- }
- this.setValue();
- var width = this.o.pointers[1].value.prc;
- var newPos = {left: '0%', width: width + '%'};
- this.o.value.css(newPos);
- var htmlValue = this.nice(pointer.value.origin);
- var scaledDimension = this.settings.firstDimension;
- if (this.settings.stepWithDifferentScale && !this.settings.smooth) {
- htmlValue = utils.valueForDifferentScale(this.settings.from,
- this.settings.to, htmlValue, this.settings.prcToValueMapper);
- }
- //This is the base value before the conversion
- if (this.settings.realtimeCallback && angular.isFunction(this.settings.realtimeCallback)
- && this.settings.cutOffVal !== undefined && pointer.uid === 1) {
- this.settings.realtimeCallback(htmlValue);
- }
- //Need to change this to the correct value for the scale
- if (this.settings.conversion) {
- var conversionObj = utils.getConversionFactorValue(parseInt(htmlValue),
- this.settings.conversion,
- this.settings.firstDimension);
- htmlValue = conversionObj.scaledVal;
- scaledDimension = conversionObj.scaledDimension;
- }
- //Check if we need to round the decimal places
- if (this.settings.decimalPlaces || this.settings.decimalPlaces === 0) {
- if (typeof htmlValue === 'number') {
- htmlValue = htmlValue.toFixed(this.settings.decimalPlaces);
- }
- }
- this.o.labels[pointer.uid].value.html(htmlValue + ' ' + scaledDimension);
- //Top tooltip label
- this.redrawLabels(pointer);
- };
- Slider.prototype.redrawLabels = function (pointer) {
- function setPosition(label, sizes, prc) {
- sizes.margin = -sizes.label / 2;
- var domSize = self.sizes.domWidth;
- var label_left = sizes.border + sizes.margin;
- if (label_left < 0) {
- sizes.margin -= label_left;
- }
- if (sizes.border + sizes.label / 2 > domSize) {
- sizes.margin = 0;
- sizes.right = true;
- } else
- sizes.right = false;
- //Adjust the tooltip location
- sizes.margin = -((label.o[0].clientWidth / 2) - label.o[0].clientWidth / 20);
- label.o.css({left: prc + "%", marginLeft: sizes.margin, right: "auto"});
- if (sizes.right)
- label.o.css({left: "auto", right: 0});
- return sizes;
- }
- var self = this;
- var label = this.o.labels[pointer.uid];
- var prc = pointer.value.prc;
- var sizes = {
- label: label.o[0].offsetWidth,
- right: false,
- border: (prc * domSize) / 100
- };
- var another_label = null;
- var another = null;
- if (!this.settings.single) {
- another = this.o.pointers[1 - pointer.uid];
- another_label = this.o.labels[another.uid];
- switch (pointer.uid) {
- case 0:
- if (sizes.border + sizes.label / 2 > another_label.o[0].offsetLeft - this.sizes.domOffset.left) {
- another_label.o.css({visibility: "hidden"});
- another_label.value.html(this.nice(another.value.origin));
- label.o.css({visibility: "hidden"});
- prc = (another.value.prc - prc) / 2 + prc;
- if (another.value.prc !== pointer.value.prc) {
- label.value.html(this.nice(pointer.value.origin) + "&nbsp;&ndash;&nbsp;" + this.nice(another.value.origin));
- sizes.label = label.o[0].clientWidth;
- sizes.border = (prc * domSize) / 100;
- }
- } else {
- another_label.o.css({visibility: "visible"});
- }
- break;
- case 1:
- if (sizes.border - sizes.label / 2 < another_label.o[0].offsetLeft - this.sizes.domOffset.left + another_label.o[0].clientWidth) {
- another_label.o.css({visibility: "hidden"});
- another_label.value.html(this.nice(another.value.origin));
- label.o.css({visibility: "visible"});
- prc = (prc - another.value.prc) / 2 + another.value.prc;
- if (another.value.prc !== pointer.value.prc) {
- label.value.html(this.nice(another.value.origin) + "&nbsp;&ndash;&nbsp;" + this.nice(pointer.value.origin));
- sizes.label = label.o[0].clientWidth;
- sizes.border = (prc * domSize) / 100;
- }
- } else {
- another_label.o.css({visibility: "visible"});
- }
- break;
- }
- }
- sizes = setPosition(label, sizes, prc);
- var domSize = self.sizes.domWidth;
- //This is the 0th pointer
- if (another_label) {
- sizes = {
- label: another_label.o[0].clientWidth,
- right: false,
- border: (another.value.prc * this.sizes.domWidth) / 100
- };
- sizes = setPosition(another_label, sizes, another.value.prc);
- }
- };
- Slider.prototype.redrawLimits = function () {
- if (this.settings.limits) {
- var limits = [true, true];
- for (var key in this.o.pointers) {
- if (!this.settings.single || key === 0) {
- var pointer = this.o.pointers[key];
- var label = this.o.labels[pointer.uid];
- var label_left = label.o[0].offsetLeft - this.sizes.domOffset.left;
- var limit = this.o.limits[0];
- if (label_left < limit[0].clientWidth)
- limits[0] = false;
- limit = this.o.limits[1];
- if (label_left + label.o[0].clientWidth > this.sizes.domWidth - limit[0].clientWidth)
- limits[1] = false;
- }
- }
- for (var i = 0; i < limits.length; i++) {
- if (limits[i]){
- angular.element(this.o.limits[i]).addClass("animate-show");}
- else{
- angular.element(this.o.limits[i]).addClass("animate-hidde");}
- }
- }
- };
- Slider.prototype.setValue = function () {
- var value = this.getValue();
- this.inputNode.attr("value", value);
- this.onstatechange.call(this, value, this.inputNode);
- };
- Slider.prototype.getValue = function () {
- if (!this.is.init){
- return false;}
- var $this = this;
- var value = "";
- angular.forEach(this.o.pointers, function (pointer, key) {
- if (pointer.value.prc !== undefined && !isNaN(pointer.value.prc)) {
- var pointerPrc = pointer.value.prc;
- var myValue = $this.prcToValue(pointerPrc);
- if (!$this.settings.smooth) {
- var myValue = utils.valueForDifferentScale($this.settings.from,
- $this.settings.to,
- pointerPrc,
- $this.settings.prcToValueMapper);
- }
- value += (key > 0 ? ";" : "") + myValue;
- }
- });
- return value;
- };
- Slider.prototype.getPrcValue = function () {
- if (!this.is.init)
- return false;
- var value = "";
- $.each(this.o.pointers, function (i) {
- if (this.value.prc !== undefined && !isNaN(this.value.prc))
- value += (i > 0 ? ";" : "") + this.value.prc;
- });
- return value;
- };
- Slider.prototype.prcToValue = function (prc) {
- var value;
- if (this.settings.heterogeneity && this.settings.heterogeneity.length > 0) {
- var h = this.settings.heterogeneity;
- var _start = 0;
- var _from = this.settings.from;
- for (var i = 0; i <= h.length; i++) {
- var v;
- if (h[i]){
- v = h[i].split("/");}
- else{
- v = [100, this.settings.to];}
- if (prc >= _start && prc <= v[0]) {
- value = _from + ((prc - _start) * (v[1] - _from)) / (v[0] - _start);
- }
- _start = v[0];
- _from = v[1];
- }
- }
- else {
- value = this.settings.from + (prc * this.settings.interval) / 100;
- }
- var roundedValue = this.round(value);
- return roundedValue;
- };
- Slider.prototype.valueToPrc = function (value, pointer) {
- var prc;
- if (this.settings.heterogeneity && this.settings.heterogeneity.length > 0) {
- var h = this.settings.heterogeneity;
- var _start = 0;
- var _from = this.settings.from;
- for (var i = 0; i <= h.length; i++) {
- var v;
- if (h[i])
- v = h[i].split("/");
- else
- v = [100, this.settings.to];
- if (value >= _from && value <= v[1]) {
- prc = pointer.limits(_start + (value - _from) * (v[0] - _start) / (v[1] - _from));
- }
- _start = v[0];
- _from = v[1];
- }
- } else {
- prc = pointer.limits((value - this.settings.from) * 100 / this.settings.interval);
- }
- return prc;
- };
- Slider.prototype.round = function (value) {
- value = Math.round(value / this.settings.step) * this.settings.step;
- if (this.settings.round){
- value = Math.round(value * Math.pow(10, this.settings.round)) / Math.pow(10, this.settings.round);}
- else{
- value = Math.round(value);}
- return value;
- };
- return Slider;
- }])
- .directive('attStepSlider', [
- '$compile', '$templateCache', '$timeout', '$window', 'slider', 'sliderConstants', 'utils',
- function (compile, templateCache, timeout, win, Slider, sliderConstants, utils) {
- /*
- The MIT License (MIT)
- Copyright (c) 2013 Julien Valéry
- */
- var templateUrl = 'app/scripts/ng_js_att_tpls/stepSlider/attStepSlider.html';
- return {
- restrict: 'AE',
- require: '?ngModel',
- scope: {
- options: '=',
- cutOff: '='
- },
- priority: 1,
- templateUrl: templateUrl,
- link: function (scope, element, attrs, ngModel) {
- if (!ngModel)
- return;
- scope.mainSliderClass = 'step-slider';
- element.after(compile(templateCache.get(templateUrl))(scope, function (clonedElement, scope) {
- scope.tmplElt = clonedElement;
- }));
- ngModel.$render = function () {
- if (ngModel.$viewValue.split && ngModel.$viewValue.split(";").length === 1) {
- ngModel.$viewValue = '0;' + ngModel.$viewValue;
- } else if (typeof (ngModel.$viewValue) === 'number') {
- ngModel.$viewValue = '0;' + ngModel.$viewValue;
- }
- if (!ngModel.$viewValue && ngModel.$viewValue !== 0) {
- return;
- }
- if (typeof (ngModel.$viewValue) === 'number') {
- ngModel.$viewValue = '' + ngModel.$viewValue;
- }
- if (scope.slider) {
- var firstPointer = '0';
- scope.slider.getPointers()[0].set(firstPointer, true);
- if (ngModel.$viewValue.split(";")[1]) {
- var value = ngModel.$viewValue.split(";")[1];
- if (value.length >= 4) {
- value = value.substring(0, 2);
- }
- if (!scope.options.realtime)
- scope.options.callback(parseFloat(ngModel.$viewValue.split(";")[1]));
- scope.slider.getPointers()[1].set(ngModel.$viewValue.split(";")[1], true);
- }
- }
- };
- var init = function () {
- scope.from = '' + scope.options.from;
- scope.to = '' + scope.options.to;
- if (scope.options.calculate && typeof scope.options.calculate === 'function') {
- scope.from = scope.options.calculate(scope.from);
- scope.to = scope.options.calculate(scope.to);
- }
- scope.showDividers = scope.options.showDividers;
- scope.COLORS = sliderConstants.COLORS;
- scope.sliderColor = scope.options.sliderColor;
- if (!scope.sliderColor)
- scope.sliderColor = sliderConstants.COLORS.REGULAR;
- var scaleArray = scope.options.scale;
- //Make a copy of the scaleArray before converting it to percentage for the bars
- var nonPercentScaleArray = [];
- //Create Mapper for the percentage to value
- var prcToValueMapper = {};
- for (var i in scaleArray) {
- var s = scaleArray[i];
- nonPercentScaleArray.push(s);
- }
- function addScaleArrayStartAndEnd() {
- if (scaleArray[0] !== 0) {
- scaleArray.splice(0, 0, 0);
- }
- if (scaleArray[scaleArray.length - 1] !== 100) {
- scaleArray.splice(scaleArray.length, 0, 100);
- }
- }
- function convertScaleArrayToPercentage() {
- if (scaleArray[scaleArray.length - 1] !== scope.options.to) {
- scaleArray.splice(scaleArray.length, 0, scope.options.to);
- }
- for (var i in scaleArray) {
- var fromValueCheck = (scaleArray[i] / scope.options.from);
- var toValueCheck = (scaleArray[i] / scope.options.to);
- var prcValue = ((scaleArray[i] - scope.options.from) / (scope.options.to - scope.options.from)) * 100;
- var realValue = scaleArray[i];
- if (toValueCheck === 1) {
- prcValue = 100;
- }
- else if (fromValueCheck === 1) {
- prcValue = 0;
- }
- scaleArray[i] = prcValue;
- prcToValueMapper['' + prcValue] = realValue;
- }
- }
- if ((scope.options.from !== 0 || scope.options.to !== 100)
- && scope.options.smooth) {
- /*
- scale array is in real values.
- */
- addScaleArrayStartAndEnd();
- scope.options.stepWithDifferentScale = true;
- }
- else if ((scope.options.from !== 0 || scope.options.to !== 100)
- && !scope.options.smooth) {
- /*
- Case for different from and to values other than 0 and 100
- so we have to do some different calculations
- */
- scope.options.stepWithDifferentScale = true;
- convertScaleArrayToPercentage();
- addScaleArrayStartAndEnd();
- }
- else {
- /*
- This is the normal case where the from and to values are 0 and
- 100 respectively.
- */
- //Check that the scale starts at 0 and 100
- convertScaleArrayToPercentage();
- addScaleArrayStartAndEnd();
- }
- var decimalPlaces = 0;
- if (scope.options.decimalPlaces) {
- decimalPlaces = scope.options.decimalPlaces;
- }
- //Modify the endDimension based on whether converison was passed in
- //Also change the toStr value to scale to the last factor
- scope.endDimension = scope.options.dimension;
- if (scope.options.conversion) {
- //Get the dimension of the last conversion
- var lastIndex = scope.options.conversion.length - 1;
- var lastDimension = scope.options.conversion[lastIndex].dimension;
- var lastScaleFactor = scope.options.conversion[lastIndex].scaleFactor;
- scope.endDimension = " " + lastDimension;
-
- var toVal = (scope.to / lastScaleFactor).toFixed(decimalPlaces);
- scope.toStr = toVal;
- } else {
- scope.toStr = scope.options.to;
- }
- var OPTIONS = {
- from: scope.options.from,
- to: scope.options.to,
- step: scope.options.step,
- smooth: scope.options.smooth,
- limits: true,
- stepWithDifferentScale: scope.options.stepWithDifferentScale,
- round: scope.options.round || false,
- value: ngModel.$viewValue,
- scale: scope.options.scale,
- nonPercentScaleArray: nonPercentScaleArray,
- prcToValueMapper: prcToValueMapper,
- firstDimension: scope.options.dimension,
- decimalPlaces: decimalPlaces,
- conversion: scope.options.conversion
- };
- if (angular.isFunction(scope.options.realtime)) {
- OPTIONS.realtimeCallback = function (value) {
- ngModel.$setViewValue(value);
- scope.options.callback(value);
- };
- }
- else {
- OPTIONS.callback = forceApply;
- }
- OPTIONS.calculate = scope.options.calculate || undefined;
- OPTIONS.onstatechange = scope.options.onstatechange || undefined;
- timeout(function () {
- var scaleDiv = scope.tmplElt.find('div')[7];
- if (!OPTIONS.conversion) {
- scope.tmplElt.find('div').eq(6).find('span').eq(0).css('padding-left', '10px');
- scope.tmplElt.find('div').eq(6).find('span').eq(0).css('padding-right', '15px');
- }
- scope.slider = angular.element.slider(element, scope.tmplElt, OPTIONS);
- angular.element(scaleDiv).html(scope.generateScale());
- scope.drawScale(scaleDiv);
- initListener();
- scope.$watch('options.disable', function (val) {
- if (scope.slider) {
- scope.tmplElt.toggleClass('disabled', val);
- scope.slider.disable(val);
- }
- });
- scope.$watch('cutOff', function (cutOffVal) {
- if (cutOffVal && cutOffVal > 0) {
- var cutOffPrc = (cutOffVal - scope.slider.settings.from) / (scope.slider.settings.to -
- scope.slider.settings.from);
- cutOffPrc = cutOffPrc * 100;
- scope.isCutOffSlider = true;
- scope.slider.settings.cutOffWidth = cutOffPrc;
- //cutOffVal is the actual value of the cutoff point
- scope.cutOffVal = cutOffVal;
- if (scope.options.conversion) {
- var convertedVal = utils.getConversionFactorValue(cutOffVal, scope.options.conversion, scope.options.dimension);
- convertedVal.scaledVal = parseFloat(convertedVal.scaledVal).toFixed(scope.options.decimalPlaces);
- scope.cutOffVal = convertedVal.scaledVal + ' ' + convertedVal.scaledDimension;
- }
- scope.slider.settings.cutOffVal = cutOffVal;
- //Calculate the cutOff percentage
- scope.slider.changeCutOffWidth(cutOffPrc + '%');
- var scale = scope.slider.settings.nonPercentScaleArray;
- //Calculate where the cutOff point in relation to the scale array
- for (var i in scale) {
- if (i >= 1) {
- var lowerVal = scale[i - 1];
- var higherVal = scale[i];
- if (cutOffVal > lowerVal && cutOffVal <= higherVal) {
- scope.slider.settings.cutOffIndex = i;
- }
- }
- }
- } else {
- scope.slider.settings.cutOffVal = 0;
- }
- });
- });
- };
- function initListener() {
- angular.element(win).bind('resize', function (event) {
- scope.slider.onresize();
- });
- }
- scope.generateScale = function () {
- if (scope.options.scale && scope.options.scale.length > 0) {
- var str = "";
- var s = scope.options.scale;
- var position = 'left';
- for (var i = 0; i < s.length; i++) {
- if (i !== 0 && i !== s.length - 1) {
- var scaledPosition = ((s[i] - scope.from) / (scope.to - scope.from)) * 100;
- if (scope.options.stepWithDifferentScale && !scope.options.smooth) {
- scaledPosition = s[i];
- }
- str += '<span style="' + position + ': ' + scaledPosition + '%"></span>';
- }
- }
- return str;
- } else
- return "";
- return "";
- };
- scope.drawScale = function (scaleDiv) {
- angular.forEach(angular.element(scaleDiv).find('ins'), function (scaleLabel, key) {
- scaleLabel.style.marginLeft = -scaleLabel.clientWidth / 2;
- });
- };
- var forceApply = function (value) {
- var val = value.split(";")[1];
- scope.$apply(function () {
- ngModel.$setViewValue(parseInt(val));
- });
- if (scope.options.callback) {
- scope.options.callback(parseInt(val));
- }
- };
- scope.$watch('options', function (value) {
- init();
- });
- angular.element.slider = function (inputElement, element, settings) {
- if (!element.data('jslider'))
- element.data('jslider', new Slider(inputElement, element, settings));
- var sliderObj = element.data('jslider');
- return sliderObj;
- };
- }
- };
- }]);
-angular.module('att.abs.steptracker', ['att.abs.transition'])
- .directive('steptracker', ['$timeout', function ($timeout) {
- return {
- // This allows dev's clickHandler to cancel an operation
- priority: 100,
- scope: {
- sdata: "=sdata",
- cstep: "=currentStep",
- clickHandler: '=?',
- disableClick: '=?'
- },
- restrict: 'EA',
- replace: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/steptracker/step-tracker.html',
- link: function (scope, elem) {
- if (scope.disableClick === undefined) {
- scope.disableClick = false;
- }
- $timeout(function () {
- if (scope.cstep < 1) {
- scope.cstep = 1;
- }
- else if (scope.cstep > scope.sdata.length) {
- scope.cstep = scope.sdata.length;
- }
- var divs = elem.find('div');
- var slidertracks = [];
- for (var i in divs) {
- if (divs.eq(i)[0]) {
- var el = divs.eq(i)[0].className;
- if (el.indexOf('track ng-scope') > -1) {
- slidertracks.push(divs.eq(i));
- }
- }
- }
- var currentPage,totalPage,currentTrack = updateCurrentTrack(scope.cstep);
- function updateCurrentTrack(step) {
- // Always return the step-1 because array starts at 0
- return angular.element(slidertracks[step - 1]);
- }
- function updateTrackWidth() {
- if (scope.cstep > 0 && scope.cstep <= scope.sdata.length - 1 && currentPage > 0) {
- var newWidth = ((currentPage / totalPage) * 100) + "%";
- currentTrack = updateCurrentTrack(scope.cstep);
- currentTrack.css('width', newWidth);
- }
- }
- function updatePages() {
- if (scope.cstep <= scope.sdata.length) {
- currentPage = scope.sdata[scope.cstep - 1]['currentPage'];
- totalPage = scope.sdata[scope.cstep - 1]['totalPages'];
- }
- }
- // dynamically add width for steps, depending on the number of steps.
- scope.set_width = function (indexval) {
- var setwidth = (100 / (scope.sdata.length - 1)) + "%";
- // skip last element and add width for all other element
- if ((scope.sdata.length - 1) > indexval) {
- return {'width': setwidth};
- }
- };
- scope.$watch('sdata', function () {
- updatePages();
- var prevStep = scope.cstep;
- // Before anything, ensure currentPage is never below 1
- if (currentPage < 1) {
- currentPage = 1;
- if (scope.cstep !== 1) {
- // Decrease step, current track width is 0%, new step width updates
- scope.cstep--;
- updatePages();
- }
- }
- // Move to next step, reset currentPage, totalPage, and ensure previous steps are completed
- if (currentPage > totalPage) {
- if (scope.cstep > scope.sdata.length - 1) {
- scope.cstep++;
- return;
- } else {
- currentPage = totalPage;
- updateTrackWidth();
- scope.cstep++;
- updatePages();
- updateTrackWidth();
- }
- }
- if (currentPage < 1 && prevStep === scope.cstep) {
- currentPage = 1;
- if (scope.cstep > 1) {
- scope.cstep--;
- scope.sdata[scope.cstep - 1]['currentPage'] = scope.sdata[scope.cstep - 1]['totalPages'];
- scope.sdata[scope.cstep]['currentPage'] = 1;
- }
- }
- updateTrackWidth();
- }, true);
- //add the active class for current step
- scope.activestep = function (index) {
- return (index === scope.cstep - 1);
- };
- //add the done class for finished step
- scope.donesteps = function (index) {
- return (index < scope.cstep - 1);
- };
- //add the last class for final step
- scope.laststep = function (index) {
- return (index === scope.sdata.length - 1);
- };
- scope.isIncomplete = function (index) {
- if (index === scope.cstep - 1) {
- return false;
- }
- if (index >= 0 && index < scope.sdata.length - 1) {
- var step = scope.sdata[index];
- return (step['currentPage'] <= step['totalPages']);
- }
- };
- //click event
- scope.stepclick = function ($event, steps) {
- // If we are decreasing steps, reset all currentPage counts to 1
- if (steps < scope.cstep) {
- for (var i = scope.cstep - 1; i > steps; i--) {
- scope.sdata[i]['currentPage'] = 1;
- }
- scope.sdata[steps]['currentPage']--;
- }
- if (angular.isFunction(scope.clickHandler)) {
- scope.clickHandler($event, steps);
- }
- scope.cstep = steps + 1;
- // In the case we decremented previously from this step, we need to reset currentpage to default
- if (scope.cstep <= scope.sdata.length && scope.sdata[scope.cstep]['currentPage'] < 1) {
- scope.sdata[scope.cstep]['currentPage'] = 1;
- }
- updatePages();
- updateTrackWidth();
- };
- }, 100);
- }
- };
- }
- ])
- .constant('timelineConstants', {
- STEP_TYPE: {
- ALERT: 'alert',
- COMPLETED: 'completed',
- CANCELLED: 'cancelled'
- }
- })
- .controller('AttTimelineCtrl', ['$scope', '$timeout', function ($scope, $timeout) {
- var timelineBarCtrls = [];
- var timelineDotCtrls = [];
- this.numSteps = 0;
- this.isAlternate = function () {
- return $scope.alternate;
- };
- this.addTimelineBarCtrls = function (t) {
- timelineBarCtrls.push(t);
- };
- this.addTimelineDotCtrls = function (b) {
- timelineDotCtrls.push(b);
- };
- $timeout(init, 200);
- function init() {
- function compare(a, b) {
- if (a.order < b.order) {
- return -1;
- }
- if (a.order > b.order) {
- return 1;
- }
- return 0;
- }
- timelineDotCtrls.sort(compare);
- timelineBarCtrls.sort(compare);
- if ($scope.$parent.animate) {
- animateSequence();
- }
- $scope.$watch('trigger', function (val) {
- if (val) {
- $scope.resetTimeline();
- } else {
- $scope.$parent.animate = false;
- }
- });
- }
- function animateSequence() {
- var dotsDuration = .25;
- var timelineBarProgressDuration = .25;
- if (typeof $scope.barAnimateDuration === 'number') {
- timelineBarProgressDuration = $scope.barAnimateDuration;
- }
- var start = createAnimation(0, timelineBarProgressDuration);
- function setToInactiveStates() {
- for (var i in timelineDotCtrls) {
- var dotCtrl = timelineDotCtrls[i];
- if (i % 2 === 0) {
- dotCtrl.unhoveredStateForBelow(.25);
- } else {
- dotCtrl.unhoveredStateForAbove(.25);
- }
- if (dotCtrl.isStop()) {
- break;
- }
- }
- }
- function createAnimation(i, duration) {
- if (i === 0) {
- return function () {
- if (timelineDotCtrls[i + 1].isStop() && timelineDotCtrls[i + 1].isCancelled()) {
- timelineBarCtrls[i].isCancelled(true);
- }
- timelineBarCtrls[i].animate(createAnimation(i + 1, duration), duration);
- };
- } else if (i === timelineBarCtrls.length - 1) {
- return function () {
- //Removes the bolded text from the start
- if (timelineDotCtrls[0].isCurrentStep()) {
- timelineDotCtrls[0].isCurrentStep(false);
- }
- if (timelineDotCtrls[i].isStop()) {
- timelineDotCtrls[i - 1].shrinkAnimate(dotsDuration);
- timelineDotCtrls[i].isCurrentStep(true);
- } else {
- timelineDotCtrls[i - 1].shrinkAnimate(dotsDuration);
- timelineBarCtrls[i].animate(createAnimation(i + 1, duration), duration);
- }
- timelineDotCtrls[i].expandedAnimate(dotsDuration);
- $timeout(function () {
- setToInactiveStates();
- }, 500);
- };
- }
- //End Dot
- else if (i === timelineBarCtrls.length) {
- return function () {
- //Removes the bolded text from the start
- if (timelineDotCtrls[0].isCurrentStep()) {
- timelineDotCtrls[0].isCurrentStep(false);
- }
- timelineDotCtrls[i - 1].shrinkAnimate(dotsDuration);
- timelineDotCtrls[i].expandedAnimate(dotsDuration);
- timelineDotCtrls[i].isCurrentStep(true);
- $timeout(function () {
- setToInactiveStates();
- }, 500);
- };
- }
- else {
- return function () {
- //Removes the bolded text from the start
- if (timelineDotCtrls[0].isCurrentStep()) {
- timelineDotCtrls[0].isCurrentStep(false);
- }
- if (timelineDotCtrls[i].isStop()) {
- timelineDotCtrls[i - 1].shrinkAnimate(dotsDuration);
- timelineDotCtrls[i].expandedAnimate(dotsDuration);
- timelineDotCtrls[i].isCurrentStep(true);
- $timeout(function () {
- setToInactiveStates();
- }, 500);
- } else {
- if (timelineDotCtrls[i + 1].isStop() && timelineDotCtrls[i + 1].isCancelled()) {
- timelineBarCtrls[i].isCancelled(true);
- }
- timelineDotCtrls[i - 1].shrinkAnimate(dotsDuration);
- timelineBarCtrls[i].animate(createAnimation(i + 1, duration), duration);
- timelineDotCtrls[i].expandedAnimate(dotsDuration);
- }
- };
- }
- }
- start();
- }
- }])
- .directive('attTimeline', ['$timeout', '$compile', function ($timeout, $compile) {
- return {
- restrict: 'EA',
- replace: true,
- scope: {
- steps: '=',
- trigger: '=',
- alternate: '=',
- barAnimateDuration: '='
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/steptracker/timeline.html',
- controller: 'AttTimelineCtrl',
- link: function (scope, element, attrs, ctrl) {
- var init = function () {
- var steps = scope.steps;
- var middleSteps = [];
- for (var i = 1; i < steps.length; i++) {
- var aStep = steps[i];
- middleSteps.push(aStep);
- }
- scope.middleSteps = middleSteps;
- //Used in calculating the width of the loading bars
- ctrl.numSteps = steps.length - 1;
- };
- init();
- //Recompile in case of scope changes
- scope.resetTimeline = function () {
- scope.animate = true;
- $compile(element)(scope);
- };
- }
- };
- }])
- .controller('TimelineBarCtrl', ['$scope', function ($scope) {
- this.type = 'timelinebar';
- this.order = parseInt($scope.order);
- this.animate = function (callback, duration) {
- $scope.loadingAnimation(callback, duration);
- };
- this.isCancelled = function (isCancelled) {
- $scope.isCancelled = isCancelled;
- };
- }])
- .directive('timelineBar', ['animation', '$progressBar', function (animation, $progressBar) {
- return {
- restrict: 'EA',
- replace: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/steptracker/timelineBar.html',
- scope: {
- order: '@'
- },
- require: ['^attTimeline', 'timelineBar'],
- controller: 'TimelineBarCtrl',
- link: function (scope, element, attrs, ctrls) {
- var attTimelineCtrl = ctrls[0];
- var timelineBarCtrl = ctrls[1];
- attTimelineCtrl.addTimelineBarCtrls(timelineBarCtrl);
- scope.isCompleted = true;
- var widthPerc = (100 / attTimelineCtrl.numSteps) - 3;
- element.css('width', widthPerc + '%');
- var elem = element.find('div').eq(0);
- animation.set(elem, {opacity: 0.0});
- var updateCallback = function (selfElement) {
- animation.set(elem, {opacity: 1.0});
- animation.set(elem, {
- scaleX: selfElement.progress(),
- transformOrigin: "left"
- });
- };
- scope.loadingAnimation = $progressBar(updateCallback);
- }
- };
- }])
- .controller('TimelineDotCtrl', ['$scope', '$timeout', 'timelineConstants', function ($scope, $timeout, timelineConstants) {
- this.type = 'dot';
- this.order = parseInt($scope.order);
- var self = this;
- $timeout(function () {
- if (self.order !== 0) {
- if (self.order % 2 !== 0) {
- $scope.initializeAboveForAnimation();
- }
- else {
- $scope.initializeBelowForAnimation();
- }
- }
- });
- this.expandedAnimate = function (duration) {
- $scope.setColor();
- $scope.expandedAnimate(duration);
- if (self.order !== 0 && !$scope.isStepsLessThanFive()) {
- if (self.order % 2 !== 0) {
- $scope.expandContentForAbove(duration);
- } else {
- $scope.expandContentForBelow(duration);
- }
- }
- };
- this.unhoveredStateForAbove = function (duration) {
- $scope.unhoveredStateForAbove(duration);
- };
- this.unhoveredStateForBelow = function (duration) {
- $scope.unhoveredStateForBelow(duration);
- };
- this.shrinkAnimate = function (duration) {
- $scope.shrinkAnimate(duration);
- };
- this.setExpanded = function () {
- $scope.setSize(3);
- };
- this.isStop = function () {
- return $scope.isStop;
- };
- this.isCancelled = function () {
- return ($scope.type === timelineConstants.STEP_TYPE.CANCELLED);
- };
- this.isAlert = function () {
- return ($scope.type === timelineConstants.STEP_TYPE.ALERT);
- };
- //Sets the bolded text
- this.isCurrentStep = function (isCurrentStep) {
- if (isCurrentStep !== undefined) {
- $scope.isCurrentStep = isCurrentStep;
- }
- return $scope.isCurrentStep;
- };
- }])
- .directive('timelineDot', ['animation', 'timelineConstants',
- function (animation, timelineConstants) {
- return {
- restrict: 'EA',
- replace: true,
- scope: {
- order: '@',
- title: '@',
- description: '@',
- by: '@',
- date: '@',
- type: '@'
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/steptracker/timelineDot.html',
- require: ['^attTimeline', 'timelineDot'],
- controller: 'TimelineDotCtrl',
- link: function (scope, element, attrs, ctrls) {
- var attTimelineCtrl = ctrls[0];
- var timelineDotCtrl = ctrls[1];
- attTimelineCtrl.addTimelineDotCtrls(timelineDotCtrl);
- scope.numSteps = attTimelineCtrl.numSteps + 1;
- scope.isCurrentStep = false;
- scope.isCompleted = false;
- scope.isStop = false;
- if (scope.type === timelineConstants.STEP_TYPE.ALERT || scope.type === timelineConstants.STEP_TYPE.CANCELLED) {
- scope.isStop = true;
- }
- scope.isInactive = true;
- var divs = element.find('div');
- var biggerCircleElem = divs.eq(0);
- var expandableCircleElem = divs.eq(2);
- var infoboxElem = divs.eq(3);
- var titleElem = divs.eq(5);
- var contentElem = divs.eq(6);
- var dateElem = divs.eq(9);
- function isEmptyStep() {
- if (!scope.description && !scope.by && !scope.date) {
- return true;
- }
- return false;
- }
- scope.isStepsLessThanFive = function () {
- if (scope.numSteps < 5) {
- return true;
- }
- return false;
- };
- scope.titleMouseover = function (num) {
- if (!scope.isStepsLessThanFive() && !isEmptyStep()) {
- if (num === 1 && scope.order % 2 === 0) {
- scope.expandContentForBelow(.25);
- }
- if (num === 2 && scope.order % 2 !== 0) {
- scope.expandContentForAbove(.25);
- }
- }
- };
- scope.titleMouseleave = function () {
- if (scope.order % 2 === 0) {
- scope.unhoveredStateForBelow(.25);
- }
- else {
- scope.unhoveredStateForAbove(.25);
- }
- };
- scope.initializeAboveForAnimation = function () {
- if (!scope.isStepsLessThanFive() && attTimelineCtrl.isAlternate()) {
- animation.set(contentElem, {opacity: 0});
- animation.set(dateElem, {opacity: 0});
- if (!isEmptyStep()) {
- var yOffset = contentElem[0].offsetHeight + dateElem[0].offsetHeight;
- animation.set(titleElem, {'top': yOffset});
- }
- }
- };
- scope.expandContentForAbove = function (duration) {
- if (!scope.isStepsLessThanFive() && attTimelineCtrl.isAlternate()) {
- animation.to(titleElem, duration, {'top': 0});
- animation.to(contentElem, duration, {opacity: 1});
- animation.to(dateElem, duration, {opacity: 1});
- }
- };
- scope.unhoveredStateForAbove = function (duration) {
- if (!scope.isStepsLessThanFive() && attTimelineCtrl.isAlternate()) {
- animation.set(contentElem, {opacity: 0});
- animation.set(dateElem, {opacity: 1});
- var yOffset = contentElem[0].offsetHeight;
- animation.to(titleElem, duration, {'top': yOffset});
- }
- };
- scope.initializeBelowForAnimation = function () {
- if (!scope.isStepsLessThanFive() && attTimelineCtrl.isAlternate()) {
- animation.set(contentElem, {height: '0%', opacity: 0, top: '-20px'});
- animation.set(dateElem, {opacity: 0});
- }
- };
- scope.expandContentForBelow = function (duration) {
- if (!scope.isStepsLessThanFive() && attTimelineCtrl.isAlternate()) {
- animation.set(dateElem, {opacity: 1});
- animation.to(contentElem, duration, {height: 'auto', opacity: 1, top: '0px'});
- }
- };
- scope.unhoveredStateForBelow = function (duration) {
- if (!scope.isStepsLessThanFive() && attTimelineCtrl.isAlternate()) {
- animation.to(contentElem, duration, {height: '0%', opacity: 0, top: '-20px', position: 'relative'});
- animation.set(dateElem, {opacity: 1});
- }
- };
- /*Default Initializaztion*/
- //If the info box is above and the description and date and by are empty then we have do reset its position
- if (isEmptyStep() && (scope.order % 2 !== 0 && attTimelineCtrl.isAlternate())) {
- infoboxElem.css('top', '-47px');
- }
- //Check if the order is odd and set the appropiate above or below and other effects
- if (scope.order % 2 === 0 || !attTimelineCtrl.isAlternate()) {
- scope.isBelowInfoBoxShown = true;
- }
- else {
- scope.isBelowInfoBoxShown = false;
- }
- //modify some css for steps less than 5 and not alternating
- if (scope.isStepsLessThanFive() && !attTimelineCtrl.isAlternate()) {
- animation.set(dateElem, {marginTop: 10});
- }
- //For IE 8 fix
- animation.set(biggerCircleElem, {opacity: '.5'});
- //shrink the expandableCircle to we can expand it later
- animation.set(expandableCircleElem, {opacity: '0.0'});
- animation.set(expandableCircleElem, {scale: .10});
- if (scope.order === 0) {
- animation.set(expandableCircleElem, {opacity: '1.0'});
- animation.set(expandableCircleElem, {scale: 1});
- animation.set(biggerCircleElem, {scale: 3});
- scope.isCurrentStep = true;
- scope.isInactive = false;
- scope.isCompleted = true;
- }
- scope.setColor = function () {
- scope.isInactive = false;
- if (scope.type === timelineConstants.STEP_TYPE.CANCELLED) {
- scope.isCancelled = true;
- }
- else if (scope.type === timelineConstants.STEP_TYPE.ALERT) {
- scope.isAlert = true;
- }
- else {
- scope.isCompleted = true;
- }
- if (!scope.$phase) {
- scope.$apply();
- }
- };
- scope.setSize = function (size) {
- animation.set(biggerCircle, {scale: size});
- };
- scope.setExpandedCircle = function () {
- animation.set(expandableCircleElem, {opacity: '1.0'});
- animation.set(expandableCircleElem, {scale: 1});
- };
- scope.expandedAnimate = function (duration) {
- animation.to(biggerCircleElem, duration, {scale: 3});
- animation.set(expandableCircleElem, {opacity: '1.0'});
- animation.to(expandableCircleElem, duration, {scale: 1});
- };
- scope.shrinkAnimate = function (duration) {
- animation.to(biggerCircleElem, duration, {scale: 1});
- };
- }
- };
- }]);
-angular.module('att.abs.table', ['att.abs.utilities'])
-.constant('tableConfig', {
- //true for descending & false for ascending
- defaultSortPattern: false,
- highlightSearchStringClass: 'tablesorter-search-highlight'
-})
-
-.directive('attTable', ['$filter', function($filter) {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- scope: {
- tableData: "=",
- viewPerPage: "=",
- currentPage: "=",
- totalPage: "=",
- searchCategory: "=",
- searchString: "="
- },
- require: 'attTable',
- templateUrl: 'app/scripts/ng_js_att_tpls/table/attTable.html',
- controller: ['$scope', function($scope) {
- this.headers = [];
- this.currentSortIndex = null;
- this.setIndex = function(headerScope) {
- this.headers.push(headerScope);
- };
- 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.sortData = function(columnIndex, reverse) {
- $scope.$parent.columnIndex = columnIndex;
- $scope.$parent.reverse = reverse;
- this.currentSortIndex = columnIndex;
- $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();
- }
- }
- };
- }],
- link: function(scope, elem, attr, ctrl) {
- scope.searchCriteria = {};
- scope.$watchCollection('tableData', function(value) {
- if(value && !isNaN(value.length)) {
- scope.totalRows = value.length;
- }
- });
- scope.$watch('currentPage', function(val) {
- scope.$parent.currentPage = val;
- });
- scope.$watch('viewPerPage', function(val) {
- scope.$parent.viewPerPage = val;
- });
- 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) {
- scope.$parent.searchCriteria = val;
- scope.totalRows = ($filter('filter')(scope.tableData, val, false)).length;
- scope.currentPage = 1;
- });
- }
- };
-}])
-
-.directive('attTableRow', [function() {
- return {
- restrict: 'EA',
- compile: function (elem, attr) {
- if (attr.type === 'header') {
- elem.find('tr').eq(0).addClass('tablesorter-headerRow');
- } 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 | attLimitTo : viewPerPage : viewPerPage*(currentPage-1)"));
- }
- html.attr('ng-class', "{'alt-row': $even,'normal-row': $odd}");
- elem.append(html);
- }
- }
- };
-}])
-
-.directive('attTableHeader', ['tableConfig', function(tableConfig) {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- scope: {
- sortable: '@',
- defaultSort: '@',
- index: '@key',
- arrowDirection: '=',
- clickFunc: '&'
- },
- require: '^attTable',
- templateUrl: 'app/scripts/ng_js_att_tpls/table/attTableHeader.html',
- link: function(scope, elem, attr, ctrl) {
- var reverse = tableConfig.defaultSortPattern;
- scope.headerName = elem.text();
- scope.sortPattern = null;
- ctrl.setIndex(scope);
-
- scope.$watch('arrowDirection', function(val){
- if(val){
- scope.sortPattern = 'asc';}
- else{
- scope.sortPattern = 'desc';}
- });
-
- 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);
- scope.sortPattern = reverse ? 'desc' : 'asc';
- reverse = !reverse;
- };
- scope.$watch(function() {
- return ctrl.currentSortIndex;
- }, function(value) {
- if (value !== scope.index) {
- scope.sortPattern = null;
- }
- });
- 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 = tableConfig.defaultSortPattern;
- };
- }
- };
-}])
-
-.directive('attTableBody', ['$filter', '$timeout', 'tableConfig', function($filter, $timeout, tableConfig) {
- return {
- restrict: 'EA',
- require: '^attTable',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/table/attTableBody.html',
- link: function (scope, elem, attr, ctrl) {
- var highlightSearchStringClass = tableConfig.highlightSearchStringClass;
- var searchString = "";
- var wrapElement = function (elem) {
- var text = elem.text();
- elem.html('');
- elem.append($filter('highlight')(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);
- }
- }
- };
- $timeout(function () {
- var actualHtml = elem.children();
- scope.$watch(function () {
- return ctrl.getSearchString();
- }, function (val) {
- searchString = val;
- clearWrap(elem);
- if (actualHtml.length > 0) {
- traverse(elem);
- } else {
- wrapElement(elem);
- }
- });
- }, 50);
- }
- };
-}]);
-
-angular.module('att.abs.tabs', [])
- .directive('attTabs', function () {
- return{
- restrict: 'EA',
- transclude: false,
- replace: true,
- scope: {
- tabs: "=title"
- },
- controller: ['$scope', function ($scope) {
- this.getData = function () {
- return $scope.tabs;
- };
- this.onClickTab = function (tab) {
- $scope.currentTab = tab.url;
- return $scope.currentTab;
- };
- this.isActiveTab = function (tab) {
- return (tab === $scope.currentTab);
- };
- }],
- link: function (scope) {
- for (var i = 0; i < scope.tabs.length; i++) {
- if ((scope.tabs[i].selected) && (scope.tabs[i].url)) {
- scope.currentTab = scope.tabs[i].url;
- }
- }
- }
- };
- })
- .directive('floatingTabs', function () {
- return {
- require: '^attTabs',
- restrict: 'EA',
- transclude: false,
- replace: true,
- scope: {
- size: "@"
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/tabs/floatingTabs.html',
- link: function (scope, elem, attr, attTabsCtrl) {
- scope.tabs = attTabsCtrl.getData();
- scope.onClickTab = attTabsCtrl.onClickTab;
- scope.isActiveTab = attTabsCtrl.isActiveTab;
- }
- };
- })
- .directive('simplifiedTabs', function () {
- return {
- require: '^attTabs',
- restrict: 'EA',
- transclude: false,
- replace: true,
- scope: {
- ctab: "=ngModel"
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/tabs/simplifiedTabs.html',
- link: function (scope, elem, attr, attTabsCtrl) {
- scope.tabs = attTabsCtrl.getData();
- scope.clickTab = function (tab) {
- scope.ctab = tab.id;
- return scope.ctab;
- };
- scope.isActive = function (tab) {
- return (tab === scope.ctab);
- };
- }
- };
- })
- .directive('genericTabs', function () {
- return {
- require: '^attTabs',
- restrict: 'EA',
- transclude: false,
- replace: true,
- scope: {
- ctab: "=ngModel"
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/tabs/genericTabs.html',
- link: function (scope, elem, attr, attTabsCtrl) {
- scope.tabs = attTabsCtrl.getData();
- scope.clickTab = function (tab) {
- scope.ctab = tab.id;
- return scope.ctab;
- };
- scope.isActive = function (tab) {
- return (tab === scope.ctab);
- };
- }
- };
- })
- .directive('parentTab', [function () {
- return {
- restrict: 'EA',
- scope: {
- menuItems: '=',
- activeSubMenu: '=',
- activeMenu: '='
- },
- controller: ['$scope', function ($scope) {
- $scope.megaMenu = $scope.menuItems;
- $scope.megaMenuTab;
- $scope.megaMenuHoverTab;
- this.setMenu = function () {
- $scope.menuItems = $scope.megaMenu;
- for (var i = 0; i < $scope.menuItems.length; i++) {
- if ($scope.menuItems[i].active) {
- $scope.activeMenu = $scope.menuItems[i];
- }
- }
- this.setSubMenuStatus(false);
- $scope.$apply();
- };
- this.setActiveMenu = function () {
- if (!($scope.megaMenuTab === "undefined" || $scope.megaMenuTab === null)) {
- $scope.menuItems = [$scope.megaMenuTab];
- $scope.activeMenu = {};
- $scope.activeSubMenu = $scope.megaMenuTab;
- this.setSubMenuStatus(true);
- }
- else {
- setMenuItems();
- }
- $scope.$apply();
- };
- this.setMenuItems = function(){
- for (var i = 0; i < $scope.menuItems.length; i++) {
- $scope.menuItems[i].active = false;
- if ($scope.menuItems[i].subItems){
- for (var j = 0; j < $scope.menuItems[i].subItems.length; j++) {
- $scope.menuItems[i].subItems[j].active = false;
- }
- }
- }
- $scope.menuItems = $scope.megaMenu;
- };
- var checkSubMenuStatus = false;
- this.setSubMenuStatus = function (value) {
- checkSubMenuStatus = value;
- };
- this.getSubMenuStatus = function () {
- return checkSubMenuStatus;
- };
- this.setActiveMenuTab = function (tab) {
- $scope.megaMenuTab = tab;
- };
- this.setActiveMenuHoverTab = function (tab) {
- $scope.megaMenuHoverTab = tab;
- };
- this.setActiveSubMenuTab = function () {
- $scope.megaMenuTab = $scope.megaMenuHoverTab;
- };
- this.resetMenuTab = function () {
- $scope.megaMenuTab = 'undefined';
- };
- }]
- };
- }])
- .directive('parentmenuTabs', [function () {
- return {
- restrict: 'EA',
- transclude: true,
- replace: true,
- scope: {
- megaMenu: '@',
- menuItems: '='
- },
- controller: ['$scope', function ($scope) {
- this.getMenu = function () {
- return $scope.menuItems;
- };
- this.setMenu = function (menuItem) {
- $scope.menuItems = menuItem;
- };
- }],
- templateUrl: 'app/scripts/ng_js_att_tpls/tabs/parentmenuTab.html'
- };
- }])
- .directive('menuTabs', ["$window", "$document", function (win, $document) {
- return {
- restrict: 'EA',
- transclude: true,
- replace: true,
- require: ['^parentTab', '^?parentmenuTabs'],
- scope: {
- activeMenu: "=",
- menuItem: "=",
- subMenu: "@",
- subItemActive: "@"
- },
- templateUrl: function (element, attrs) {
- if (attrs.megaMenu) {
- return 'app/scripts/ng_js_att_tpls/tabs/menuTab.html';
- }
- else {
- return 'app/scripts/ng_js_att_tpls/tabs/submenuTab.html';
- }
- },
- link: function (scope, elem, attr, ctrl) {
- var parentCtrl = ctrl[0];
- var parentmenuCtrl = ctrl[1];
- scope.clickInactive = true;
- scope.showHoverChild = function (e) {
- scope.clickInactive = false;
- scope.hoverChild = ctrl[0].getSubMenuStatus();
- if (e.type === "mouseover" && ctrl[0].getSubMenuStatus())
- {
- scope.showChildren(e);
- }
- };
- scope.showChildren = function (e) {
- scope.parentMenuItems = parentmenuCtrl.getMenu();
- for (var i = 0; i < scope.parentMenuItems.length; i++) {
- scope.parentMenuItems[i].active = false;
- if (scope.parentMenuItems[i].subItems) {
- for (var j = 0; j < scope.parentMenuItems[i].subItems.length; j++) {
- scope.parentMenuItems[i].subItems[j].active = false;
- }
- }
- scope.clickInactive = true;
- }
- scope.menuItem.active = true;
- scope.activeMenu = scope.menuItem;
- e.stopPropagation();
- };
- scope.$watch("subItemActive", function (value) {
- if (value === "true" && scope.subMenu === 'true') {
- parentCtrl.setActiveMenuHoverTab(scope.menuItem);
- }
- });
- scope.showMenuClick = function () {
- parentCtrl.setActiveMenuTab(scope.menuItem);
- };
- scope.showSubMenuClick = function () {
- parentCtrl.setActiveSubMenuTab();
- };
- scope.resetMenu = function () {
- parentCtrl.resetMenuTab();
- };
- function debounce(method, delay) {
- clearTimeout(method._tId);
- method._tId = setTimeout(function () {
- parentCtrl.setMenu();
- }, delay);
- }
- function debounce1(method, delay) {
- clearTimeout(method._tId);
- method._tId = setTimeout(function () {
- parentCtrl.setActiveMenu();
- }, delay);
- }
- $document.bind('scroll', function () {
- if (win.pageYOffset === 0) {
- debounce(parentCtrl.setMenu, 100);
- }
- else if (win.pageYOffset > 1 && win.pageYOffset < 1500) {
- debounce1(parentCtrl.setActiveMenu, 100);
- }
- });
- }
- };
- }]);
-angular.module('att.abs.tagBadges', [])
- .directive('tagBadges', ['$parse', '$timeout', function($parse, $timeout) {
- return {
- restrict: 'EA',
- replace: false,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/tagBadges/tagBadges.html',
- scope: {
- styleType: "@",
- onClose: "&"
- },
- link: function(scope, elem, attr) {
- scope.isSmall = false;
- scope.isIcon = false;
- scope.isColor = false;
- scope.display = true;
- scope.isClosable = false;
- scope.isHighlight = false;
- scope.customColor = false;
-
- if (attr.small === "") {
- scope.isSmall = true;
- }
- if (scope.styleType === "icon") {
- scope.isIcon = true;
- }
- else if (scope.styleType === "color") {
- scope.isColor = true;
- if(attr.color !== undefined && attr.color !== "") {
- scope.customColor = true;
- attr.$observe("color", function(val) {
- scope.border_type_borderColor = val;
- scope.background_type_backgroundColor = val;
- scope.background_type_borderColor = val;
- });
- }
- }
- scope.activeHighlight = function(state){
- if(scope.customColor){
- if(state){
- scope.isHighlight = true;
- }
- else{
- scope.isHighlight = false;
- }
- }
- };
- if (attr.closable === "") {
- scope.isClosable = true;
- scope.closeMe = function() {
- scope.display = false;
- $timeout(function(){
- elem.attr("tabindex", "0");
- elem[0].focus();
- elem.bind('blur', function(){
- elem.remove();
- });
- });
- if(attr['onClose']){
- scope.onClose = $parse(scope.onClose);
- scope.onClose();
- }
- };
- }
- }
- };
- }]);
-angular.module('att.abs.textOverflow', [])
- .constant('textDefaultOptions', {
- width: '50%'
- })
-.directive('attTextOverflow', ['textDefaultOptions','$compile',function(textDefaultOptions,$compile)
-{
- return {
- restrict: 'A',
- link: function(scope, elem, attrs)
- {
- var tooltipText = elem.text();
- elem.addClass('text-ellipsis');
- attrs.$observe('attTextOverflow', function(val){
- if(val){
- elem.css({"width":val});
- }
- else{
- elem.css({"width":textDefaultOptions.width});
- }
- });
- if(!(elem.attr('tooltip'))){
- elem.attr("tooltip", tooltipText);
- elem.attr("tooltip-placement", 'above');
- var newElem = angular.element(elem);
- $compile(newElem)(scope);
- }
- }
- };
-}]);
-
-angular.module('att.abs.toggle', ['angular-gestures', 'att.abs.position'])
- .directive('attToggleTemplate', ['$compile', '$log', '$position', function($compile, $log, $position)
- {
- return{
- restrict: 'A',
- require: 'ngModel',
- transclude: true,
- scope: {
- modelVal: "=ngModel"
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/toggle/demoToggle.html',
- link: function(scope, element, attr) {
- scope.initialDragPosition = 0;
- var dragStatus = 0;
- var switchMovementPath = ($position.offset(element.children().eq(1).children().eq(0)).width -1);
- var updateModelVal = function() {
- if (scope.attrValue === attr.ngTrueValue || scope.attrValue)
- {
- scope.modelVal = false;
- }
- else
- {
- scope.modelVal = true;
- }
- };
- scope.updateModel = function(env){
- {
- if (dragStatus !== 1) {
- updateModelVal();
- dragStatus = 0;
- }
- }
- env.preventDefault();
- };
- scope.drag = function(e) {
- dragStatus = 1;
- if (e.type === 'dragstart') {
- scope.initialDragPosition = $position.position(element.children().eq(1)).left;
-
- element.children().eq(1).addClass('dragging');
- } else if (e.type === 'drag') {
- var left = Math.min(0, Math.max(scope.initialDragPosition + e.gesture.deltaX, -switchMovementPath));
- element.children().eq(1).css({
- left: left + 'px'
- });
- } else if (e.type === 'dragend') {
- var isOn = $position.position(element.children().eq(1)).left > (switchMovementPath*-1)/2;
- element.children().eq(1).removeClass('dragging');
- TweenMax.to(element.children().eq(1), .1, {left: isOn ? 0 : (switchMovementPath*-1), ease: Power4.easeOut,
- onComplete: function(){element.children().eq(1).css({left: ''});
- }});
- if(isOn || (!isOn && e.gesture.direction === "left")){
- updateModelVal();
- }
- dragStatus = 0;
- }
-
- return false;
- };
-
- scope.directiveValue = attr.attToggleTemplate;
- scope.on = attr.trueValue;
- scope.off = attr.falseValue;
- var switchMovementPathPixels = ((switchMovementPath)*-1) + 'px';
- scope.$watch('modelVal', function(newVal) {
- scope.attrValue = newVal;
- if (newVal === attr.ngTrueValue || newVal) {
- element.children().eq(1).css({
- left : '0px'
- });
- element.addClass('att-checkbox--on');
- element.attr("aria-checked", true);
- dragStatus = 0;
- } else {
- element.children().eq(1).css({
- left : switchMovementPathPixels
- });
- element.removeClass('att-checkbox--on');
- element.attr("aria-checked", false);
- dragStatus = 0;
- }
- element.children().eq(1).css({
- left : ''
- });
- });
- }
- };
- }
- ])
-
- .directive('attToggleMain', ['$compile', function($compile)
- {
- return{
- restrict: 'A',
- require: 'ngModel',
- transclude: true,
- replace: true,
- scope: {
- modelValue: "=ngModel",
- trueValue: "=ngTrueValue",
- falseValue: "=ngFalseValue"
- },
- link: function(scope, element, attr) {
- var html = "";
- var attrVal = "";
- element.removeAttr('att-toggle-main');
- scope.on = attr.ngTrueValue;
- scope.off = attr.ngFalseValue;
- scope.largeValue = attr.attToggleMain;
- if (angular.isDefined(attr.ngTrueValue)) {
- html += ' true-value="{{on}}" false-value="{{off}}"';
- }
- if (scope.largeValue !== undefined)
- {
- attrVal += ' ="{{largeValue}}"';
- }
-
- element.css({display:'none'});
- var elm = angular.element('<div role="checkbox" class="att-switch att-switch-alt" ng-class="{\'large\' : largeValue == \'large\'}" ng-model="modelValue"' + html + ' att-toggle-template' + attrVal + '>' + element.prop('outerHTML') + '</div>');
- elm = $compile(elm)(scope);
- element.replaceWith(elm);
- }
- };
- }]
- );
-angular.module('att.abs.tooltip', ['att.abs.position', 'att.abs.utilities', 'ngSanitize'])
- // The default options tooltip and popover.
- .constant('tooltipDefaultOptions', {
- placement: 'above',
- animation: false,
- popupDelay: 0,
- stylett: 'dark',
- appendToBody: true
- })
-
- /**
- * The $tooltip service creates tooltip- and popover-like directives as well as
- * houses global options for them.
- */
- .provider('$tooltip', ['tooltipDefaultOptions', function(tooltipDefaultOptions) {
-
- // Default hide triggers for each show trigger
- var triggerMap = {
- 'mouseenter': 'mouseleave',
- 'click': 'click',
- 'focus': 'blur',
- 'mouseover':'mouseout'
- };
-
- // The options specified to the provider globally.
- var globalOptions = {};
-
- this.options = function(value) {
- angular.extend(globalOptions, value);
- };
-
- /**
- * This allows you to extend the set of trigger mappings available. E.g.:
- *
- * $tooltipProvider.setTriggers( 'openTrigger': 'closeTrigger' );
- */
- this.setTriggers = function(triggers) {
- angular.extend(triggerMap, triggers);
- };
-
- /**
- * This is a helper function for translating camel-case to snake-case.
- */
- function snakeCase(name) {
- var regexp = /[A-Z]/g;
- var separator = '-';
- return name.replace(regexp, function(letter, pos) {
- return (pos ? separator : '') + letter.toLowerCase();
- });
- }
-
- /**
- * Returns the actual instance of the $tooltip service.
- */
- this.$get = ['$window', '$compile', '$timeout', '$parse', '$document', '$position', '$interpolate', function($window, $compile, $timeout, $parse, $document, $position, $interpolate) {
- return function (type, prefix, defaultTriggerShow) {
- var options = angular.extend({}, tooltipDefaultOptions, globalOptions);
- /**
- * Returns an object of show and hide triggers.
- *
- * If a trigger is supplied,
- * it is used to show the tooltip; otherwise, it will use the `trigger`
- * option passed to the `$tooltipProvider.options` method; else it will
- * default to the trigger supplied to this directive factory.
- *
- * The hide trigger is based on the show trigger. If the `trigger` option
- * was passed to the `$tooltipProvider.options` method, it will use the
- * mapped trigger from `triggerMap` or the passed trigger if the map is
- * undefined; otherwise, it uses the `triggerMap` value of the show
- * trigger; else it will just use the show trigger.
- */
- function getTriggers(trigger) {
- var show = trigger || options.trigger || defaultTriggerShow;
- var hide = triggerMap[show] || show;
- return {
- show: show,
- hide: hide
- };
- }
-
- var directiveName = snakeCase(type);
-
- var startSym = $interpolate.startSymbol();
- var endSym = $interpolate.endSymbol();
- var template =
- '<div ' + directiveName + '-popup ' +
- 'title="' + startSym + 'tt_title' + endSym + '" ' +
- 'content="' + startSym + 'tt_content' + endSym + '" ' +
- 'placement="' + startSym + 'tt_placement' + endSym + '" ' +
- 'animation="tt_animation()" ' +
- 'is-open="tt_isOpen" ' +
- 'stylett="' + startSym + 'tt_style' + endSym + '" ' +
- '>' +
- '</div>';
- return {
- restrict: 'EA',
- scope: true,
- link: function (scope, element, attrs) {
- element.attr("tabindex", "0");
- element.bind('mouseenter', function(){
- element.removeAttr("title");
- });
- element.bind('mouseleave', function(){
- element.attr("title", scope.tt_content);
- });
- var tooltip = $compile(template)(scope);
- var transitionTimeout;
- var popupTimeout;
- var $body;
- var appendToBody = angular.isDefined(options.appendToBody) ? options.appendToBody : false;
- var triggers = getTriggers(undefined);
- var hasRegisteredTriggers = false;
- var hasEnableExp = angular.isDefined(attrs[prefix + 'Enable']);
-
- // By default, the tooltip is not open.
- // add ability to start tooltip opened
- scope.tt_isOpen = false;
-
- //Adding a scope watch, to remove the created popup from DOM, incase it is updated outside the provider code.
- scope.$watch('tt_isOpen', function(newVal, oldVal){
- if(newVal !== oldVal && !newVal){
- tooltip.remove();
- }
- });
-
- function toggleTooltipBind() {
- if (!scope.tt_isOpen) {
- showTooltipBind();
- } else {
- hideTooltipBind();
- }
- }
-
- // Show the tooltip with delay if specified, otherwise show it immediately
- function showTooltipBind() {
- tooltip = $compile(template)(scope);
- scope.$digest();
- if (hasEnableExp && !scope.$eval(attrs[prefix + 'Enable'])) {
- return;
- }
- if (scope.tt_popupDelay) {
- popupTimeout = $timeout(show, scope.tt_popupDelay);
- } else {
- scope.$apply(show);
- }
- }
-
- function hideTooltipBind() {
- scope.$apply(function() {
- hide();
- });
- }
-
- // Show the tooltip popup element.
- function show() {
- var position,
- ttWidth,
- ttHeight,
- ttPosition;
-
- // Don't show empty tooltips.
- if (!scope.tt_content) {
- return;
- }
-
- // If there is a pending remove transition, we must cancel it, lest the
- // tooltip be mysteriously removed.
- if (transitionTimeout) {
- $timeout.cancel(transitionTimeout);
- }
-
- // Set the initial positioning.
- tooltip.css({top: 0, left: 0, display: 'block', 'z-index': 9999});
-
- // Now we add it to the DOM because need some info about it. But it's not
- // visible yet anyway.
- if (appendToBody) {
- $body = $body || $document.find('body');
- $body.append(tooltip);
- } else {
- element.after(tooltip);
- }
-
- // Get the position of the directive element.
- position = appendToBody ? $position.offset(element) : $position.position(element);
-
- // Get the height and width of the tooltip so we can center it.
- ttWidth = tooltip.prop('offsetWidth');
- ttHeight = tooltip.prop('offsetHeight');
-
- // Calculate the tooltip's top and left coordinates to center it with
- // this directive.
- var ttArrowOffset = 10;
- switch (scope.tt_placement) {
- case 'right':
- if(appendToBody){
- ttPosition = {
- top: position.top + position.height / 2 - ttHeight / 2,
- left: position.left + position.width
- };
- }else{
- ttPosition = {
- top: position.top + position.height / 2 - ttHeight / 2,
- left: position.left + position.width + ttArrowOffset
- };
- }
- break;
- case 'below':
- if(appendToBody){
- ttPosition = {
- top: position.top + position.height,
- left: position.left + position.width / 2 - ttWidth / 2
- };
- }else{
- ttPosition = {
- top: position.top + position.height + ttArrowOffset,
- left: position.left + position.width / 2 - ttWidth / 2
- };
- }
- break;
- case 'left':
- if(appendToBody){
- ttPosition = {
- top: position.top + position.height / 2 - ttHeight / 2,
- left: position.left - ttWidth
- };
- }else{
- ttPosition = {
- top: position.top + position.height / 2 - ttHeight / 2,
- left: position.left - ttWidth - ttArrowOffset
- };
- }
- break;
- default:
- if(appendToBody){
- ttPosition = {
- top: position.top - ttHeight,
- left: position.left + position.width / 2 - ttWidth / 2
- };
- }else{
- ttPosition = {
- top: position.top - ttHeight - ttArrowOffset,
- left: position.left + position.width / 2 - ttWidth / 2
- };
- }
- break;
- }
-
- ttPosition.top += 'px';
- ttPosition.left += 'px';
-
- // Now set the calculated positioning.
- tooltip.css(ttPosition);
-
- // And show the tooltip.
- scope.tt_isOpen = true;
- }
-
- // Hide the tooltip popup element.
- function hide() {
- // First things first: we don't show it anymore.
- scope.tt_isOpen = false;
-
- //if tooltip is going to be shown after delay, we must cancel this
- $timeout.cancel(popupTimeout);
-
- // And now we remove it from the DOM. However, if we have animation, we
- // need to wait for it to expire beforehand.
- // This is a placeholder for a port of the transitions library.
- if (angular.isDefined(scope.tt_animation) && scope.tt_animation()) {
- transitionTimeout = $timeout(function() {
- tooltip.remove();
- }, 500);
- } else {
- tooltip.remove();
- }
- }
-
- /**
- * Observe the relevant attributes.
- */
- attrs.$observe(type, function(val) {
- if (val) {
- scope.tt_content = val;
- element.attr('title',val);
- } else {
- if (scope.tt_isOpen) {
- hide();
- }
- }
- });
-
- attrs.$observe(prefix + 'Title', function(val) {
- scope.tt_title = val;
- });
-
- attrs.$observe(prefix + 'Placement', function(val) {
- scope.tt_placement = angular.isDefined(val) ? val : options.placement;
- });
-
- attrs.$observe(prefix + 'Style', function(val) {
- scope.tt_style = angular.isDefined(val) ? val : options.stylett;
- });
-
- attrs.$observe(prefix + 'Animation', function(val) {
- scope.tt_animation = angular.isDefined(val) ? $parse(val) : function() {
- return options.animation;
- };
- });
-
- attrs.$observe(prefix + 'PopupDelay', function(val) {
- var delay = parseInt(val, 10);
- scope.tt_popupDelay = !isNaN(delay) ? delay : options.popupDelay;
- });
-
- attrs.$observe(prefix + 'Trigger', function(val) {
-
- if (hasRegisteredTriggers) {
- element.unbind(triggers.show, showTooltipBind);
- element.unbind(triggers.hide, hideTooltipBind);
- }
-
- triggers = getTriggers(val);
-
- if (triggers.show === triggers.hide) {
- element.bind(triggers.show, toggleTooltipBind);
- } else {
- element.bind(triggers.show, showTooltipBind);
- element.bind(triggers.hide, hideTooltipBind);
- }
-
- hasRegisteredTriggers = true;
- });
-
- attrs.$observe(prefix + 'AppendToBody', function(val) {
- appendToBody = angular.isDefined(val) ? $parse(val)(scope) : appendToBody;
- });
-
- // if a tooltip is attached to <body> we need to remove it on
- // location change as its parent scope will probably not be destroyed
- // by the change.
- if (appendToBody) {
- scope.$on('$locationChangeSuccess', function() {
- if (scope.tt_isOpen) {
- hide();
- }
- });
- }
-
- // Make sure tooltip is destroyed and removed.
- scope.$on('$destroy', function() {
- if (scope.tt_isOpen) {
- hide();
- } else {
- tooltip.remove();
- }
- });
- }
- };
- };
- }];
- }])
-
- .directive('tooltipPopup', ['$document', '$documentBind', function($document, $documentBind) {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- scope: {content: '@', placement: '@', animation: '&', isOpen: '=', stylett: '@'},
- templateUrl: 'app/scripts/ng_js_att_tpls/tooltip/tooltip-popup.html',
- link: function(scope, elem) {
- var flag = false;
- scope.$watch("isOpen", function() {
- flag = scope.isOpen;
- });
- elem.bind('click', function (e) {
- e.stopPropagation();
- });
- var outsideClick = function() {
- if (!flag) {
- scope.$apply(function() {
- scope.isOpen = false;
- });
- }
- flag = false;
- };
-
- $documentBind.click('isOpen', outsideClick, scope);
- }
- };
- }])
-
- .directive('tooltip', ['$tooltip', function($tooltip) {
- return $tooltip('tooltip', 'tooltip', 'mouseenter');
- }])
-
- .directive('tooltipCondition', [ '$timeout',function($timeout) {
- return {
- restrict: 'EA',
- replace: true,
- scope:{
- tooltipCondition:"@?"
- },
- template:'<p><span tooltip=\"{{tooltipCondition}}\" ng-if=\"showpop\">{{tooltipCondition}}</span><span id=\"innerElement\" ng-hide=\"showpop\">{{tooltipCondition}}</span></p>',
- link: function(scope, elem, attr){
- scope.showpop=false;
- if(attr.height==='true'){
- $timeout(function () {
- var maxHeight=(elem[0].offsetHeight);
- var elemHeight=elem.children(0)[0].offsetHeight;
- if(elemHeight > maxHeight){
- scope.showpop=true;
- }
- },1000);
- }
- else if(scope.tooltipCondition.length>=25){
- scope.showpop=true;
- }
- }
- };
- }]);
-angular.module('att.abs.treeview', [])
- .directive('treeView', function() {
- return{
- restrict: 'A',
- link: function(scope, elem) {
- var el = elem.children('ul li');
- var list = TweenMax.from(el, .2, {display: 'none', paused: true, reversed: true});
- elem.attr("tabindex","0");
- function toggleBranch() {
- if (list.reversed())
- {
- list.play();
- } else
- {
- list.reverse();
- }
- };
- function toggleTree(e) {
- e.stopPropagation();
- if ($(e.target).attr("tree-view") !== undefined)
- {
- if (elem.hasClass('minus'))
- {
- elem.removeClass('minus');
- }
- else
- {
- elem.addClass('minus');
- }
- toggleBranch();
- }
- }
- elem.on('click', function(e) {
- toggleTree(e);
- });
- elem.on('keypress', function (e) {
- var activeCode = e.keyCode ? e.keyCode : e.charCode;
- var keyCode = [13,32];
- if (keyCode.length > 0 && ((activeCode && keyCode.indexOf(activeCode) > -1))) {
- toggleTree(e);
- e.preventDefault();
- }
- });
- }
- };
- });
-
-angular.module('att.abs.typeAhead', ['att.abs.tagBadges'])
-
- .directive('focusMe',['$timeout', '$parse', function($timeout, $parse) {
- return {
- link: function(scope, element, attrs) {
- var model = $parse(attrs.focusMe);
- scope.$watch(model, function(value) {
- if (value) {
- $timeout(function() {
- element[0].focus();
- scope.inputActive=true;
- });
- }
- });
- element.bind('blur', function() {
- scope.$apply(model.assign(scope, false));
- scope.inputActive=false;
- });
- }
- };
- }])
-
- .directive('typeAhead', ['$timeout', function($timeout) {
- return {
- restrict: 'EA',
- templateUrl: 'app/scripts/ng_js_att_tpls/typeAhead/typeAhead.html',
- replace: true,
- scope: {
- items: '=',
- title: '@',
- subtitle: '@',
- model: '=',
- emailIdList:'=',
- emailMessage:'='
- },
- link: function(scope, elem) {
- scope.lineItems = [];
- scope.filteredListLength = -1;
- scope.filteredList = [];
- scope.inputfocus = false;
-
- scope.setFocus = function() {
- scope.clickFocus = true;
- };
- scope.handleSelection = function(selectedItem,emailItem) {
- scope.lineItems.push(selectedItem);
- scope.emailIdList.push(emailItem);
- scope.model = "";
- scope.current = 0;
- scope.selected = true;
- scope.clickFocus = true;
- };
- scope.theMethodToBeCalled = function(index) {
- var tempArr = scope.lineItems.slice();
- scope.emailIdList.splice(index, 1);
- tempArr.splice(index, 1);
- $timeout(function() {
- scope.lineItems = [];
- scope.$apply();
- scope.lineItems = scope.lineItems.concat(tempArr);
- });
- };
-
- scope.current = 0;
- scope.selected = true;
-
- scope.isCurrent = function(index, itemName,itemEmail,dropdownLength) {
- if (scope.current === index) {
- scope.itemName = itemName;
- scope.itemEmail = itemEmail;
- }
- scope.dropdownLength=dropdownLength;
- return scope.current === index;
- };
-
- scope.setCurrent = function(index) {
- scope.current = index;
- };
-
- scope.selectionIndex = function(evt) {
- if (evt.keyCode === 38 && scope.current > 0) {
- evt.preventDefault();
- scope.current = scope.current - 1;
- scope.isCurrent(scope.current);
- } else if (evt.keyCode === 9) {
- scope.selected = true;
- } else if (evt.keyCode === 13 && scope.dropdownLength!==scope.items.length) {
- scope.handleSelection(scope.itemName,scope.itemEmail);
- } else if ((evt.keyCode === 8 && scope.model.length === 0) || evt.keyCode === 46) {
- scope.theMethodToBeCalled(scope.lineItems.length - 1);
- } else if (evt.keyCode === 40 && scope.current < scope.dropdownLength-1) {
- evt.preventDefault();
- scope.current = scope.current + 1;
- scope.isCurrent(scope.current);
- }
- elem[0].querySelector('.list-scrollable').scrollTop = (scope.current - 1) * 35;
- };
- }
- };
- }]);
-angular.module('att.abs.userMessages', [])
- .constant('messageConstants', {
- TABLE_MESSAGE_TYPES: {
- noMatching: 1,
- errorLoading: 2,
- magnifySearch: 3,
- isLoading: 4},
- USER_MESSAGE_TYPES: {
- success: 1,
- error: 0
- }
- })
- .directive('attTableMessage', ['messageConstants', function(messageConstants) {
- return {
- restrict: 'AE',
- replace: true,
- transclude: true,
- scope: {
- msgType: '=',
- onRefreshClick: '&'
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/userMessages/attTableMessage.html',
- link: function(scope) {
- scope.messageConstants = messageConstants;
- scope.refreshAction = function(evt) {
- scope.onRefreshClick(evt);
- };
- }
- };
- }]).directive('attUserMessage', ['messageConstants', function(messageConstants) {
- return{
- restrict: 'AE',
- replace: true,
- transclude: true,
- scope: {
- thetitle: '=',
- type: '=',
- message: '=',
- trigger: '='
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/userMessages/attUserMessage.html',
- link: function(scope) {
- scope.messageConstants = messageConstants;
- }
- };
- }]);
-angular.module('att.abs.verticalSteptracker', ['ngSanitize'])
- .directive('verticalSteptracker', [ function(){
- return {
- restrict: 'EA',
- transclude: true,
- replace: false,
- scope: {},
- template: '<div class="vertical-nav"><ul ng-transclude class="tickets-list-height"></ul></div>',
- link: function () {}
- };
- }])
- .directive('verticalSteptrackerStep',[ function(){
- return {
- restrict: 'EA',
- transclude: true,
- replace: false,
- scope: {
- type: "=type",
- id: "=id"
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/verticalSteptracker/vertical-step-tracker.html',
- link: function(){}
- };
- }])
- .directive('attAbsLink',[ function(){
- return{
- restrict: 'EA',
- transclude: true,
- replace: false,
- template: '<span ng-transclude class="view-log"></span>'
- };
- }]);
-angular.module('att.abs.videoControls', [])
- .config(['$compileProvider' , function ($compileProvider) {
- $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|javascript):/);
- }])
- .directive('videoControls', [function() {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/videoControls/videoControls.html'
- };
- }])
- .directive('photoControls', [function() {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/videoControls/photoControls.html',
- scope: {
- prevLink: "@",
- nextLink: "@"
- },
- link: function(scope, elem, attr) {
- if(!attr['prevLink']){
- scope.prevLink = 'javascript:void(0)';
- }
- if(!attr['nextLink']){
- scope.nextLink = 'javascript:void(0)';
- }
- scope.links = {
- prevLink : scope.prevLink,
- nextLink : scope.nextLink
- };
- }
- };
- }]);
-angular.module("app/scripts/ng_js_att_tpls/accordion/accordion.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/accordion/accordion.html",
- "<div class=\"att-accordion__group tabpanel\" ng-class=\"{'att-accordion__group att-accordion__group--open':isOpen,'att-accordion__group':!isOpen }\">\n" +
- " <a ng-show=\"showico\" id=\"tab{{index}}\" class=\"toggle-header att-accordion__heading att-accordion__toggle noafter\" aria-selected=\"{{focused}}\" aria-controls=\"panel{{index}}\" ng-class=\"{focus: focused, selected: focused}\" aria-expanded=\"{{isOpen}}\" role=\"tab\" ng-click=\"toggle()\" accordion-transclude=\"heading\" style=\"cursor:pointer; text-decoration:none\">\n" +
- " <span>{{heading}}</span>\n" +
- " <i ng-class=\"{'icon-chevron-down':!isOpen,'icon-chevron-up':isOpen }\" class=\"pull-right\"></i>\n" +
- " </a>\n" +
- " <div ng-show=\"!showico\" ng-class=\"{focus: focused, selected: focused}\" id=\"tab{{index}}\" style=\"text-decoration:none\" accordion-transclude=\"heading\" aria-expanded=\"{{isOpen}}\" role=\"tab\" aria-selected=\"{{focused}}\" aria-controls=\"panel{{index}}\" class=\"toggle-header att-accordion__heading att-accordion__toggle noafter\"><span>{{heading}}</span></div> \n" +
- " <div id=\"panel{{index}}\" aria-labelledby=\"tab{{index}}\" aria-hidden=\"{{!isOpen}}\" role=\"tabpanel\" collapse=\"!isOpen\" class=\"att-accordion__body\" ng-transclude>\n" +
- " </div>\n" +
- " <div class=\"att-accordion__bottom--border\"></div> \n" +
- "</div> ");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/accordion/accordion_alt.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/accordion/accordion_alt.html",
- "<div class=\"att-accordion__group tabpanel\" ng-class=\"{'att-accordion__group att-accordion__group--open':isOpen,'att-accordion__group':!isOpen }\">\n" +
- " <a id=\"tab{{index}}\" class=\"toggle-header att-accordion__heading att-accordion__toggle\" aria-selected=\"{{focused}}\" aria-controls=\"panel{{index}}\" ng-class=\"{focus: focused, selected: focused}\" aria-expanded=\"{{isOpen}}\" role=\"tab\" ng-click=\"toggle()\" accordion-transclude=\"heading\"> \n" +
- " </a>\n" +
- " <span>{{heading}}</span>\n" +
- " <div id<span>{{heading}}</span>=\"panel{{index}}\" aria-labelledby=\"tab{{index}}\" aria-hidden=\"{{!isOpen}}\" role=\"tabpanel\" collapse=\"!isOpen\" class=\"att-accordion__body\" ng-transclude>\n" +
- " </div>\n" +
- "</div> ");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/accordion/attAccord.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/accordion/attAccord.html",
- "<div ng-transclude></div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/accordion/attAccordBody.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/accordion/attAccordBody.html",
- "<div ng-transclude></div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/accordion/attAccordHeader.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/accordion/attAccordHeader.html",
- "<div ng-click=\"clickFunc()\">\n" +
- " <div ng-transclude>\n" +
- " <i class=\"icon-chevron-down\"></i>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/alert/alert.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/alert/alert.html",
- "<div class=\"alert\" ng-class=\"{'alert-success': alertType === 'success', 'alert-warning': alertType === 'warning', 'alert-error': alertType === 'error', 'alert-info': alertType === 'info', 'alert-inplace': showTop !== 'true'}\" ng-show=\"showAlert\" ng-style=\"cssStyle\">\n" +
- " <div class=\"container\">\n" +
- " <a href=\"javascript:void(0)\" alt=\"close\" class=\"close-role\" ng-click=\"close()\" tabindex=\"0\" att-accessibility-click=\"32,13\">Dismiss <i class=\"icon-circle-action-close\"></i></a>\n" +
- " <span ng-transclude> </span>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/colorselector/colorselector.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/colorselector/colorselector.html",
- "<div class=\"att-radio att-color-selector__item\" \n" +
- " ng-class=\"{'att-radio--on': (iconColor === selected)}\">\n" +
- " <div class=\"att-radio__indicator\" tabindex=\"0\" att-accessibility-click=\"32,13\"ng-click=\"selectedcolor(iconColor)\" \n" +
- " ng-style=\"applycolor\" ng-transclude></div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/datepicker/dateFilter.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/datepicker/dateFilter.html",
- "<div class=\"calendar\" ng-class=\"{'monthpicker':mode === 1}\">\n" +
- " <div class=\"select2-container\" ng-class=\"{'select2-container-active select2-dropdown-open': showDropdownList}\" style=\"width: 100%; z-index:0\">\n" +
- " <a tabindex=\"0\" class=\"select2-choice\" href=\"javascript:void(0)\" att-element-focus=\"focusInputButton\" ng-show=\"!showCalendar\" att-accessibility-click=\"13,32\" ng-click=\"showDropdown()\" ng-blur=\"focusInputButton=false\">\n" +
- " <span class=\"select2-chosen\" ng-show=\"!showCalendar\">{{selectedOption}}</span>\n" +
- " <input type=\"text\" ng-show=\"showCalendar\" ng-blur=\"untrackInputChange($event)\" att-input-deny=\"[^0-9\\/-]\" maxlength=\"{{maxLength}}\" ng-model=\"selectedOption\" ng-change=\"getDropdownText()\" />\n" +
- " <abbr class=\"select2-search-choice-close\"></abbr>\n" +
- " <span ng-class=\"{'select2-arrow': mode !== 1, 'calendar-icon': mode === 1}\"><b></b></span>\n" +
- " </a>\n" +
- " <a class=\"select2-choice\" href=\"javascript:void(0)\" ng-show=\"showCalendar\">\n" +
- " <span class=\"select2-chosen\" ng-show=\"!showCalendar\">{{selectedOption}}</span>\n" +
- " <input type=\"text\" ng-show=\"showCalendar\" ng-blur=\"untrackInputChange($event)\" att-input-deny=\"[^0-9\\/-]\" maxlength=\"{{maxLength}}\" ng-model=\"selectedOption\" ng-change=\"getDropdownText()\" />\n" +
- " <abbr class=\"select2-search-choice-close\"></abbr>\n" +
- " <span tabindex=\"0\" ng-class=\"{'select2-arrow': mode !== 1, 'calendar-icon': mode === 1}\" att-accessibility-click=\"13,32\" ng-click=\"showDropdown()\"><b></b></span>\n" +
- " </a>\n" +
- " </div>\n" +
- " <div class=\"select2-drop select2-drop-active select2-display-none\" ng-style=\"{display: (showDropdownList && 'block') || 'none', 'border-radius': showCalendar && '0 0 0 6px'}\" style=\"width: 100%\">\n" +
- " <div id=\"dateFilterList\" att-scrollbar ><ul class=\"select2-results options\" ng-transclude></ul></div>\n" +
- " <ul class=\"select2-results sttings\" style=\"margin-top:0px\">\n" +
- " <li tabindex=\"0\" class=\"select2-result select2-highlighted greyBorder\" ng-class=\"{'select2-result-current': checkCurrentSelection('Custom Single Date')}\" att-accessibility-click=\"13,32\" ng-click=\"selectAdvancedOption('Custom Single Date')\">\n" +
- " <div class=\"select2-result-label\" ng-if=\"mode !== 1\">Custom Single Date...</div>\n" +
- " <div class=\"select2-result-label\" ng-if=\"mode === 1\">Custom single month...</div>\n" +
- " </li>\n" +
- " <li tabindex=\"0\" class=\"select2-result select2-highlighted\" ng-class=\"{'select2-result-current': checkCurrentSelection('Custom Range')}\" att-accessibility-click=\"13,32\" ng-click=\"selectAdvancedOption('Custom Range')\">\n" +
- " <div class=\"select2-result-label\" ng-if=\"mode !== 1\">Custom Range...</div>\n" +
- " <div class=\"select2-result-label\" ng-if=\"mode === 1\">Custom month range...</div>\n" +
- " </li>\n" +
- " <li class=\"select2-result select2-highlighted btnContainer\" ng-style=\"{display: (showCalendar && 'block') || 'none'}\">\n" +
- " <button tabindex=\"0\" ng-blur=\"resetFocus($event)\" att-element-focus=\"focusApplyButton\" att-button=\"\" btn-type=\"{{applyButtonType}}\" size=\"small\" att-accessibility-click=\"13,32\" ng-click=\"apply()\">Apply</button>\n" +
- " <button tabindex=\"0\" att-button=\"\" btn-type=\"secondary\" size=\"small\" att-accessibility-click=\"13,32\" ng-click=\"cancel()\">Cancel</button>\n" +
- " <div>\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" ng-if=\"mode !== 1\" style=\"text-decoration:underline;\" att-accessibility-click=\"13,32\" ng-click=\"clear()\">Clear Dates</a>\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" ng-if=\"mode === 1\" style=\"text-decoration:underline;\" att-accessibility-click=\"13,32\" ng-click=\"clear()\">Clear Months</a>\n" +
- " </div>\n" +
- " </li>\n" +
- " </ul>\n" +
- " </div>\n" +
- " <div class=\"datepicker-wrapper show-right\" ng-style=\"{display: (showCalendar && 'block') || 'none'}\">\n" +
- " <span datepicker ng-blur=\"resetFocus($event)\" att-element-focus=\"focusSingleDateCalendar\" ng-show=\"checkCurrentSelection('Custom Single Date')\"></span>\n" +
- " <span datepicker ng-blur=\"resetFocus($event)\" att-element-focus=\"focusRangeCalendar\" ng-show=\"checkCurrentSelection('Custom Range')\"></span>\n" +
- " </div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/datepicker/dateFilterList.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/datepicker/dateFilterList.html",
- "<li ng-click=\"!disabled && selectOption(fromDate,toDate,caption)\" att-accessibility-click=\"13,32\" ng-class=\"{'select2-result-current': checkCurrentSelection(caption)}\" class=\"select2-result select2-highlighted ng-scope\" tabindex=\"{{!disabled?'0':'-1'}}\">\n" +
- " <div class=\"select2-result-label\" ng-class=\"{'disabled':disabled}\" ng-transclude></div>\n" +
- "</li>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/datepicker/datepicker.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/datepicker/datepicker.html",
- "<ul id=\"datepicker\" class=\"datepicker\" ng-class=\"{'monthpicker': mode === 1}\" aria-hidden=\"false\" role=\"dialog\" tabindex=\"-1\">\n" +
- " <div class=\"datepicker-days\" style=\"display: block;\">\n" +
- " <table class=\"table-condensed\">\n" +
- " <thead>\n" +
- " <tr>\n" +
- " <th id=\"month\" tabindex=\"0\" class=\"datepicker-switch\" colspan=\"{{(mode !== 1) && (currentRows[0].length - 2) || (currentRows[0].length)}}\" style=\"text-align:left\">{{currentTitle}}</th>\n" +
- " <th ng-if=\"mode !== 1\" id=\"prev\" aria-hidden=\"{{!disablePrev && 'false' || 'true'}}\" tabindex=\"{{!disablePrev && '0' || '-1'}}\" att-accessibility-click=\"13,32\" ng-click=\"!disablePrev && move(-1)\">\n" +
- " <div class=\"icons-list\" data-size=\"medium\"><i class=\"icon-arrow-left-circle\" ng-class=\"{'disabled': disablePrev}\"></i>\n" +
- " </div><span class=\"hidden-spoken\">Previous Month</span>\n" +
- " </th>\n" +
- " <th ng-if=\"mode !== 1\" id=\"next\" aria-hidden=\"{{!disableNext && 'false' || 'true'}}\" tabindex=\"{{!disableNext && '0' || '-1'}}\" att-accessibility-click=\"13,32\" ng-click=\"!disableNext && move(1)\">\n" +
- " <div class=\"icons-list\" data-size=\"medium\"><i class=\"icon-arrow-right-circle\" ng-class=\"{'disabled': disableNext}\"></i>\n" +
- " </div><span class=\"hidden-spoken\">Next Month</span>\n" +
- " </th>\n" +
- " </tr>\n" +
- " <tr ng-if=\"labels.length > 0\">\n" +
- " <th id=\"{{label.post}}\" tabindex=\"-1\" class=\"dow weekday\" ng-repeat=\"label in labels\"><span>{{label.pre}}</span><span class=\"hidden-spoken\">{{label.post}}</span></th>\n" +
- " </tr>\n" +
- " </thead>\n" +
- " <tbody>\n" +
- " <tr>\n" +
- " <td id=\"datepickerBody\" att-scrollbar colspan=\"{{currentRows[0].length}}\" style=\"padding: 0px;\">\n" +
- " <table ng-class=\"{'table-condensed': mode === 0, 'monthtable-condensed': mode === 1}\" style=\"padding: 0px;\">\n" +
- " <thead class=\"hidden-spoken\">\n" +
- " <tr ng-show=\"labels.length > 0\">\n" +
- " <th id=\"{{label.post}}\" tabindex=\"-1\" class=\"dow weekday\" ng-repeat=\"label in labels\"><span>{{label.post}}</span></th>\n" +
- " </tr>\n" +
- " </thead>\n" +
- " <tbody>\n" +
- " <tr ng-repeat=\"row in currentRows\">\n" +
- " <td headers=\"{{dt.header}}\" att-element-focus=\"dt.focused\" aria-hidden=\"{{(!dt.oldMonth && !dt.nextMonth && !dt.disabled && 'false') || 'true'}}\" tabindex=\"{{(!dt.oldMonth && !dt.nextMonth && !dt.disabled && '0') || '-1'}}\" ng-repeat=\"dt in row\" class=\"days\" ng-class=\"{'active': dt.selected || dt.from || dt.to, 'from': dt.from, 'to': dt.to, 'range': dt.dateRange, 'prev-month ': dt.oldMonth, 'next-month': dt.nextMonth, 'disabled': dt.disabled, 'today': dt.today, 'weekend': dt.weekend}\" ng-click=\"!dt.selected && !dt.from && !dt.to && !dt.disabled && !dt.oldMonth && !dt.nextMonth && select(dt.date)\" att-accessibility-click=\"13,32\"><span aria-label=\"{{dt.label}}\" class=\"day\">{{dt.label}}</span></td>\n" +
- " </tr>\n" +
- " <tr ng-if=\"mode === 1\" class=\"divider\"><td colspan=\"{{nextRows[0].length}}\"><hr></td></tr>\n" +
- " <tr>\n" +
- " <th id=\"month\" tabindex=\"0\" class=\"datepicker-switch internal\" colspan=\"{{nextRows[0].length}}\" style=\"text-align:left\">{{nextTitle}}</th>\n" +
- " </tr>\n" +
- " <tr ng-repeat=\"row in nextRows\">\n" +
- " <td headers=\"{{dt.header}}\" att-element-focus=\"dt.focused\" aria-hidden=\"{{(!dt.oldMonth && !dt.nextMonth && !dt.disabled && 'false') || 'true'}}\" tabindex=\"{{(!dt.oldMonth && !dt.nextMonth && !dt.disabled && '0') || '-1'}}\" ng-repeat=\"dt in row\" class=\"days\" ng-class=\"{'active': dt.selected || dt.from || dt.to, 'from': dt.from, 'to': dt.to, 'range': dt.dateRange, 'prev-month ': dt.oldMonth, 'next-month': dt.nextMonth, 'disabled': dt.disabled, 'today': dt.today, 'weekend': dt.weekend}\" ng-click=\"!dt.selected && !dt.from && !dt.to && !dt.disabled && !dt.oldMonth && !dt.nextMonth && select(dt.date)\" att-accessibility-click=\"13,32\"><span aria-label=\"{{dt.label}}\" class=\"day\">{{dt.label}}</span></td>\n" +
- " </tr>\n" +
- " </tbody>\n" +
- " </table>\n" +
- " </td>\n" +
- " </tr>\n" +
- " </tbody>\n" +
- " </table>\n" +
- " </div>\n" +
- "</ul>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/datepicker/datepickerPopup.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/datepicker/datepickerPopup.html",
- "<div class=\"calendar\">\n" +
- " <div class=\"box\" ng-class=\"{'active': isOpen}\">\n" +
- " <span ng-transclude></span>\n" +
- " <i class=\"calendar-icon\" tabindex=\"0\" att-accessibility-click=\"13,32\" ng-click=\"toggle()\"></i>\n" +
- " </div>\n" +
- " <div class=\"datepicker-wrapper datepicker-wrapper-display-none\" ng-style=\"{display: (isOpen && 'block') || 'none'}\" aria-hidden=\"false\" role=\"dialog\" tabindex=\"-1\">\n" +
- " <span datepicker></span>\n" +
- " </div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/dividerLines/dividerLines.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/dividerLines/dividerLines.html",
- "<div class=\"divider-container\" ng-class=\"{'divider-container-light': lightContainer}\">\n" +
- " <hr ng-class=\"{'divider-light': lightContainer}\">\n" +
- "</div>\n" +
- "\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/dragdrop/fileUpload.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/dragdrop/fileUpload.html",
- "<label class=\"fileContainer\"><span ng-transclude></span><input type=\"file\" att-file-change></label>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/formField/attFormFieldValidationAlert.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/formField/attFormFieldValidationAlert.html",
- "<div class=\"form-field\" ng-class=\"{'error': errorMessage, 'warning': warningMessage}\">\n" +
- " <label class=\"form-field__label\" ng-class=\"{'form-field__label--show': showLabel, 'form-field__label--hide': hideLabel}\"></label>\n" +
- " <div class=\"form-field-input-container\" ng-transclude></div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/hourpicker/hourpicker.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/hourpicker/hourpicker.html",
- "<div class=\"hourpicker\">\n" +
- " <div class=\"dropdown-width\">\n" +
- " <div ng-model=\"showlist\" class=\"select2-container topDropDownWidth\" ng-class=\"{'select2-dropdown-open select2-container-active': showlist}\" >\n" +
- " <a class=\"select2-choice\" href=\"javascript:void(0)\" id=\"customSelect\" ng-keydown=\"selectOption(selectPrevNextValue($event,options,selectedOption))\" att-accessibility-click=\"13\" ng-click=\"showDropdown()\">\n" +
- " <span class=\"select2-chosen\">{{selectedOption}}</span>\n" +
- " <span class=\"select2-arrow\"><b></b></span>\n" +
- " </a>\n" +
- " </div> \n" +
- " <div class=\"select2-display-none select2-with-searchbox select2-drop-active show-search resultTopWidth\" ng-show=\"showlist\"> \n" +
- " <ul class=\"select2-results resultTopMargin\" > \n" +
- " <li ng-model=\"ListType\" ng-repeat=\"option in options\" att-accessibility-click=\"13\" ng-click=\"selectOption(option,$index)\" class=\"select2-results-dept-0 select2-result select2-result-selectable\"><div class=\"select2-result-label\"><span >{{option}}</span></div></li> \n" +
- " </ul>\n" +
- " </div>\n" +
- " </div>\n" +
- " <div ng-show=\"showDaysSelector\" class=\"customdays-width\">\n" +
- " <div att-divider-lines class=\"divider-margin-f\"></div> \n" +
- " <div class=\"col-md-3 fromto-margin\">\n" +
- " <div>From</div> <br>\n" +
- " <div>To</div>\n" +
- " </div>\n" +
- " <div ng-repeat=\"day in days\">\n" +
- " <div class=\"col-md-3 col-md-days\">\n" +
- " <div class=\"col-md-1 daysselect-margin\">\n" +
- " <input type=\"checkbox\" ng-model=\"daysList[day]\" title=\"Day selection\" att-checkbox ng-change=\"addSelectedValue(day)\"> \n" +
- " </div>\n" +
- " <span>{{day}}</span><br>\n" +
- " \n" +
- " <div class=\"dropDownMarginBottom\">\n" +
- " <div class=\"select2-container topDropDownWidth\" ng-class=\"{'select2-dropdown-open select2-container-active': FrtimeListDay[day]}\" >\n" +
- " <a class=\"select2-choice selectDropDown\" href=\"javascript:void(0)\" tabindex=\"{{daysList[day] ? '0' : '-1'}}\" att-accessibility-click=\"13\" ng-click=\"daysList[day] && showfromDayDropdown(day)\" ng-class=\"{'select2-chosen-disabled':!daysList[day]}\" ng-keydown=\"daysList[day] && selectFromDayOption(day , selectPrevNextValue($event,fromtime,selectedFromOption[day]));daysList[day] && addSelectedValue(day);\">\n" +
- " <span class=\"select2-chosen dropDownMarginRight\" >{{selectedFromOption[day]}} <i ng-if=\"daysList[day]\" ng-class=\"FrtimeListDay[day] ? 'icon-dropdown-up' : 'icon-dropdown-down'\"></i></span>\n" +
- " </a>\n" +
- " </div> \n" +
- " \n" +
- " <div class=\"select2-display-none select2-with-searchbox select2-drop-active show-search resultFromDropDown\" ng-show=\"FrtimeListDay[day]\"> \n" +
- " <ul class=\"select2-results resultTopMargin\" > \n" +
- " <li ng-click=\"selectFromDayOption(day,time.value);addSelectedValue(day);\" ng-repeat=\"time in fromtime\" class=\"select2-results-dept-0 select2-result select2-result-selectable\"><div class=\"select2-result-label\" ng-class=\"{'selectedItemInDropDown': (time.value==selectedFromOption[day])}\"><span >{{time.value}}</span></div></li> \n" +
- " </ul>\n" +
- " </div>\n" +
- " </div>\n" +
- " \n" +
- " <div class=\"dropDownMarginBottom\">\n" +
- " <div class=\"select2-container topDropDownWidth\" ng-class=\"{'select2-dropdown-open select2-container-active': TotimeListDay[day]}\" >\n" +
- " <a class=\"select2-choice selectDropDown\" href=\"javascript:void(0)\" tabindex=\"{{daysList[day] ? '0' : '-1'}}\" att-accessibility-click=\"13\" ng-click=\"daysList[day] && showtoDayDropdown(day)\" ng-class=\"{'select2-chosen-disabled':!daysList[day]}\" ng-keydown=\"daysList[day] && selectToDayOption(day , selectPrevNextValue($event,totime,selectedToOption[day]));daysList[day] && addSelectedValue(day);\">\n" +
- " <span class=\"select2-chosen dropDownMarginRight\">{{selectedToOption[day]}} <i ng-if=\"daysList[day]\" ng-class=\"TotimeListDay[day] ? 'icon-dropdown-up' : 'icon-dropdown-down'\" ></i></span>\n" +
- " </a>\n" +
- " </div>\n" +
- " \n" +
- " <div class=\"select2-display-none select2-with-searchbox select2-drop-active show-search resultToDropDown\" ng-show=\"TotimeListDay[day]\"> \n" +
- " <ul class=\"select2-results resultTopMargin\" > \n" +
- " <li ng-click=\"selectToDayOption(day,time.value);addSelectedValue(day);\" ng-repeat=\"time in totime\" class=\"select2-results-dept-0 select2-result select2-result-selectable\"><div class=\"select2-result-label\" ng-class=\"{'selectedItemInDropDown': (time.value==selectedToOption[day])}\"><span >{{time.value}}</span></div></li> \n" +
- " </ul>\n" +
- " </div>\n" +
- " </div>\n" +
- " </div> \n" +
- " </div> \n" +
- " <div att-divider-lines class=\"divider-margin-s\"></div> \n" +
- " </div>\n" +
- " <div ng-transclude></div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/links/readMore.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/links/readMore.html",
- "<div>\n" +
- " <div ng-bind-html=\"textToDisplay\" ng-class=\"{'att--readMore': readFlag, 'att--readLess': !readFlag}\" ng-style=\"readLinkStyle\"></div>\n" +
- " <span class=\"att--readmore__link\" ng-show=\"readMoreLink\">… <a href=\"#\" ng-click=\"readMore()\" att-accessbility-click=\"32,13\">Read More</a>\n" +
- " </span>\n" +
- "</div>\n" +
- "<span class=\"att--readless__link\" ng-show=\"readLessLink\">\n" +
- " <a href=\"#\" ng-click=\"readLess()\" att-accessbility-click=\"32,13\">Read Less</a>\n" +
- "</span>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/loading/loading.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/loading/loading.html",
- "<div data-progress=\"{{progressStatus}}\" class=\"{{colorClass}}\" ng-class=\"{'att-loading-count':icon == 'count','loading--small':icon == 'small','loading': icon != 'count'}\">\n" +
- " <div class=\"att-loading-circle\" ng-if=\"icon == 'count'\">\n" +
- " <div class=\"att-loading-circle__mask att-loading-circle__full\">\n" +
- " <div class=\"att-loading-circle__fill\"></div>\n" +
- " </div>\n" +
- " <div class=\"att-loading-circle__mask att-loading-circle__half\">\n" +
- " <div class=\"att-loading-circle__fill\"></div>\n" +
- " <div class=\"att-loading-circle__fill att-loading-circle__fix\"></div>\n" +
- " </div>\n" +
- " </div>\n" +
- " <div ng-class=\"{'att-loading-inset':icon == 'count','loading__inside':icon != 'count'}\"><div class=\"att-loading-inset__percentage\" ng-if=\"icon == 'count'\"></div></div>\n" +
- "</div>\n" +
- "\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/modal/backdrop.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/modal/backdrop.html",
- "<div class=\"overlayed\" ng-class=\"{show: animate}\" \n" +
- " ng-style=\"{'z-index': 2000 + index*10,'overflow':'scroll'}\"> \n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/modal/window.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/modal/window.html",
- "<div tabindex=\"-1\" role=\"dialog\" att-element-focus=\"focusModalFlag\" class=\"modals {{ windowClass }}\" ng-class=\"{show: animate}\" \n" +
- " ng-style=\"{'z-index': 2010 + index*10}\" ng-click=\"close($event)\" ng-transclude> \n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/pagination/pagination.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/pagination/pagination.html",
- "<div class=\"pager\">\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" class=\"pager__item--prev\" att-accessibility-click=\"13,32\" ng-click=\"prev($event)\" ng-if=\"currentPage > 1\"><i class=\"icon-arrow-left\"></i> Previous</a>\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" class=\"pager__item pager__item--link\" ng-if=\"totalPages > 7 && currentPage > 3\" att-accessibility-click=\"13,32\" ng-click=\"selectPage(1, $event)\">1</a>\n" +
- " <span class=\"pager__item\" ng-if=\"totalPages > 7 && currentPage > 3\">...</span>\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" class=\"pager__item pager__item--link\" att-element-focus=\"isFocused(page)\" ng-repeat=\"page in pages\" ng-class=\"{'pager__item--active': checkSelectedPage(page)}\" att-accessibility-click=\"13,32\" ng-click=\"selectPage(page, $event)\">{{page}}</a>\n" +
- " <span class=\"pager__item\" ng-if=\"totalPages > 7 && currentPage < totalPages - 2 && showInput !== true\">...</span>\n" +
- " <span ng-show=\"totalPages > 7 && showInput === true\"><input class=\"pager__item--input\" type=\"text\" placeholder=\"...\" maxlength=\"2\" ng-model=\"currentPage\"/></span>\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" class=\"pager__item pager__item--link\" ng-if=\"totalPages > 7 && currentPage < totalPages - 2\" att-accessibility-click=\"13,32\" ng-click=\"selectPage(totalPages, $event)\">{{totalPages}}</a>\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" class=\"pager__item--next\" att-accessibility-click=\"13,32\" ng-click=\"next($event)\" ng-if=\"currentPage < totalPages\">Next <i class=\"icon-arrow-right\"></i></a>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/paneSelector/innerPane.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/paneSelector/innerPane.html",
- "<div class='inner-pane'>\n" +
- " <div ng-transclude>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/paneSelector/paneGroup.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/paneSelector/paneGroup.html",
- "<div class='pane-group'>\n" +
- " <div ng-transclude>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/paneSelector/sidePane.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/paneSelector/sidePane.html",
- "<div class='side-pane'> \n" +
- " <div ng-transclude>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/profileCard/addUser.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/profileCard/addUser.html",
- "<div class=\"col-md-9 profile-card add-user\">\n" +
- " <div class=\"atcenter\">\n" +
- " <div><i class=\"icon-add\"></i></div>\n" +
- " <span>add User</span>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/profileCard/profileCard.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/profileCard/profileCard.html",
- " <div class=\"col-md-9 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-hide=\"image\" class=\"default-img\">{{initials}}</span>\n" +
- " <p class=\"name\" tooltip-condition=\"{{profile.name}}\" height=\"true\"></p>\n" +
- " <p class=\"status\">\n" +
- " <span class=\"status-icon\" ng-class=\"{'icon-green':colorIcon==='green','icon-red':colorIcon==='red','icon-blue':colorIcon==='blue','icon-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" +
- " <p att-text-overflow=\"92%\" tooltip-condition=\"{{profile.userName}}\">{{profile.userName}}</p>\n" +
- " <label>Email</label>\n" +
- " <p att-text-overflow=\"92%\" tooltip-condition=\"{{profile.email}}\">{{profile.email}}</p>\n" +
- " <label>Role</label>\n" +
- " <p att-text-overflow=\"92%\" tooltip-condition=\"{{profile.role}}\">{{profile.role}}</p>\n" +
- " <label>Last Login</label>\n" +
- " <p att-text-overflow=\"92%\" tooltip-condition=\"{{profile.lastLogin}}\">{{profile.lastLogin}}</p>\n" +
- " </div>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/progressBars/progressBars.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/progressBars/progressBars.html",
- "<div class=\"att-progress\">\n" +
- " <div class=\"att-progress-value\">&nbsp;</div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/scrollbar/scrollbar.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/scrollbar/scrollbar.html",
- "<div class=\"scroll-bar\">\n" +
- " <div class=\"scroll-thumb\"></div>\n" +
- "</div>\n" +
- "<div class=\"scroll-viewport\">\n" +
- " <div class=\"scroll-overview\" ng-transclude></div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/search/search.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/search/search.html",
- "<div class=\"select2-container show-search\" ng-class=\"{'select2-dropdown-open': (showlist && !isDisabled),'select2-container-disabled':isDisabled, 'select2-container-active': isact}\" ng-init=\"isact=false;\" style=\"width: 100%;\">\n" +
- " <a href=\"javascript:void(0)\" class=\"select2-choice needsclick\" tabindex=\"0\" ng-click=\"showDropdown()\" ng-class=\"{'select2-chosen-disabled':isDisabled}\" ng-focus=\"isact=true;\" ng-blur=\"isact=false;\">\n" +
- " <span class=\"select2-chosen needsclick\">{{selectedOption}}</span>\n" +
- " <abbr class=\"select2-search-choice-close needsclick\"></abbr>\n" +
- " <span class=\"select2-arrow needsclick\" role=\"presentation\">\n" +
- " <b role=\"presentation\" class=\"needsclick\"></b>\n" +
- " </span>\n" +
- " </a>\n" +
- " <label class=\"select2-offscreen\"></label>\n" +
- " <input class=\"select2-focusser select2-offscreen\" tabindex=\"-1\" type=\"text\" aria-haspopup=\"true\" role=\"button\">\n" +
- "</div>\n" +
- "<div class=\"select2-drop select2-with-searchbox select2-drop-auto-width select2-drop-active\" ng-class=\"{'select2-display-none':(!showlist || isDisabled),'show-search':showSearch}\" style=\"width:100%;z-index: 10\">\n" +
- " <div class=\"select2-search\">\n" +
- " <label class=\"select2-offscreen\"></label>\n" +
- " <input ng-model=\"title\" typeahead=\"c.title for c in cName | filter:$viewValue:startsWith\" type=\"text\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" class=\"select2-input\" role=\"combobox\" aria-\n" +
- "expanded=\"true\" aria-autocomplete=\"list\" placeholder=\"\">\n" +
- " </div>\n" +
- " <ul class=\"select2-results\" role=\"listbox\">\n" +
- " <li ng-show=\"filteredName.length === 0\" class=\"select2-no-results\">No matches found</li>\n" +
- " <li class=\"select2-results-dept-0 select2-result select2-result-selectable\" role=\"presentation\"\n" +
- " ng-model=\"ListType\" ng-show=\"selectMsg && filteredName.length > 0\"\n" +
- " ng-click=\"selectOption(selectMsg, '-1')\"\n" +
- " ng-class=\"{'select2-result-current': selectedOption === selectMsg, 'hovstyle': selectedIndex === -1}\"\n" +
- " ng-mouseover=\"hoverIn(-1)\">\n" +
- " <div ng-if=\"startsWithFilter\" class=\"select2-result-label\" ng-bind-html=\"selectMsg | unsafe\" role=\"option\">\n" +
- " <span class=\"select2-match\" ></span>\n" +
- " </div>\n" +
- " <div ng-if=\"!startsWithFilter\" class=\"select2-result-label\" ng-bind-html=\"selectMsg | highlight:title:className | unsafe\" role=\"option\">\n" +
- " <span class=\"select2-match\" ></span>\n" +
- " </div>\n" +
- " </li>\n" +
- " <li ng-if=\"startsWithFilter\" class=\"select2-results-dept-0 select2-result select2-result-selectable\" role=\"presentation\"\n" +
- " ng-model=\"ListType\" ng-repeat=\"(fIndex, item) in filteredName = (cName | startsWith:title:item)\"\n" +
- " ng-class=\"{'select2-result-current': selectedOption === item.title,'hovstyle': selectedIndex === item.index}\"\n" +
- " ng-click=\"selectOption(item.title,item.index)\"\n" +
- " ng-mouseover=\"hoverIn(item.index)\">\n" +
- " <div class=\"select2-result-label\" ng-bind-html=\"item.title | unsafe\" role=\"option\">\n" +
- " <span class=\"select2-match\" ></span>\n" +
- " </div>\n" +
- " </li>\n" +
- "\n" +
- " <li ng-if=\"!startsWithFilter\" class=\"select2-results-dept-0 select2-result select2-result-selectable\" role=\"presentation\"\n" +
- " ng-model=\"ListType\" ng-repeat=\"(fIndex, item) in filteredName = (cName | filter:title)\"\n" +
- " ng-class=\"{'select2-result-current': selectedOption === item.title,'hovstyle': selectedIndex === item.index}\"\n" +
- " ng-click=\"selectOption(item.title,item.index)\"\n" +
- " ng-mouseover=\"hoverIn(item.index)\"\n" +
- " >\n" +
- " <div class=\"select2-result-label\" ng-bind-html=\"item.title | highlight:title:className | unsafe\" role=\"option\">\n" +
- " <span class=\"select2-match\" ></span>\n" +
- " </div>\n" +
- " </li>\n" +
- "\n" +
- " </ul>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/search/search_2.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/search/search_2.html",
- "<div ng-model=\"showlist\" class=\"select2-container\" ng-class=\"{'select2-dropdown-open select2-container-active': showlist}\" style=\"width: 100%; z-index:0\">\n" +
- " <a tabindex=\"-1\" class=\"select2-choice\" href=\"javascript:void(0)\" ng-click=\"showDropdown()\">\n" +
- " <span class=\"select2-chosen\">{{selectedOption}}</span>\n" +
- " <abbr class=\"select2-search-choice-close\"></abbr>\n" +
- " <span class=\"select2-arrow\"><b></b></span>\n" +
- " </a>\n" +
- " <input type=\"text\" class=\"select2-focusser select2-offscreen\">\n" +
- "</div>\n" +
- "<select ng-model=\"value\" ng-options=\"c.title for c in cName\" class=\"select2-offscreen\"></select>\n" +
- "<div class=\"select2-drop select2-display-none select2-with-searchbox select2-drop-active show-search\" style=\"display: block; width: 100%;\" ng-show=\"showlist\">\n" +
- " <div ng-show=\"showSearch\" class=\"select2-search\">\n" +
- " <input ng-model=\"title\" typeahead=\"c.title for c in cName | filter:$viewValue:startsWith\" type=\"text\" class=\"select2-input\" spellcheck=\"false\" autocapitalize=\"off\" autocorrect=\"off\" autocomplete=\"off\">\n" +
- " </div>\n" +
- " <ul class=\"select2-results\" style=\"margin-top:0px;max-height:205px\">\n" +
- " <li ng-model=\"ListType\" ng-repeat=\"(fIndex, country) in cName | filter:title\" ng-class=\"{'select2-result-current': selectedOption === country.title}\" ng-click=\"selectOption(country.title,country.index)\" class=\"select2-results-dept-0 select2-result select2-result-selectable select2-highlighted\">\n" +
- " <div class=\"select2-result-label\" ng-bind-html=\"country.title | highlight:title:className\"><span class=\"select2-match\"></span>\n" +
- " </div>\n" +
- " </li>\n" +
- " </ul>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/select/select.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/select/select.html",
- "<div class=\"select2-container show-search\" ng-class=\"{'select2-dropdown-open': (showlist && !isDisabled),'select2-container-disabled':isDisabled, 'select2-container-active': isact}\" ng-init=\"isact=false;\" style=\"width: 100%;\">\n" +
- " <a href=\"javascript:void(0)\" class=\"select2-choice needsclick\" tabindex=\"0\" ng-click=\"showDropdown()\" ng-class=\"{'select2-chosen-disabled':isDisabled}\" ng-focus=\"isact=true;\" ng-blur=\"isact=false;\">\n" +
- " <span class=\"select2-chosen needsclick\">{{selectedOption}}</span>\n" +
- " <abbr class=\"select2-search-choice-close needsclick\"></abbr>\n" +
- " <span class=\"select2-arrow needsclick\" role=\"presentation\">\n" +
- " <b role=\"presentation\" class=\"needsclick\"></b>\n" +
- " </span>\n" +
- " </a>\n" +
- " <label class=\"select2-offscreen\"></label>\n" +
- " <input class=\"select2-focusser select2-offscreen\" tabindex=\"-1\" type=\"text\" aria-haspopup=\"true\" role=\"button\">\n" +
- "</div>\n" +
- "<div class=\"select2-drop select2-with-searchbox select2-drop-auto-width select2-drop-active\" ng-class=\"{'select2-display-none':(!showlist || isDisabled),'show-search':showSearch}\" style=\"width:100%;z-index: 10\">\n" +
- " <div class=\"select2-search\">\n" +
- " <label class=\"select2-offscreen\"></label>\n" +
- " <input ng-model=\"title\" typeahead=\"c.title for c in cName | filter:$viewValue:startsWith\" type=\"text\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" class=\"select2-input\" role=\"combobox\" aria-\n" +
- "expanded=\"true\" aria-autocomplete=\"list\" placeholder=\"\">\n" +
- " </div>\n" +
- " <ul class=\"select2-results\" role=\"listbox\">\n" +
- " <li ng-show=\"filteredName.length === 0\" class=\"select2-no-results\">No matches found</li>\n" +
- " <li class=\"select2-results-dept-0 select2-result select2-result-selectable\" role=\"presentation\"\n" +
- " ng-model=\"ListType\" ng-show=\"selectMsg && filteredName.length > 0\"\n" +
- " ng-click=\"selectOption(selectMsg, '-1')\"\n" +
- " ng-class=\"{'select2-result-current': selectedOption === selectMsg, 'hovstyle': selectedIndex === -1}\"\n" +
- " ng-mouseover=\"hoverIn(-1)\">\n" +
- " <div ng-if=\"startsWithFilter\" class=\"select2-result-label\" ng-bind-html=\"selectMsg | unsafe\" role=\"option\">\n" +
- " <span class=\"select2-match\" ></span>\n" +
- " </div>\n" +
- " <div ng-if=\"!startsWithFilter\" class=\"select2-result-label\" ng-bind-html=\"selectMsg | highlight:title:className | unsafe\" role=\"option\">\n" +
- " <span class=\"select2-match\" ></span>\n" +
- " </div>\n" +
- " </li>\n" +
- " <li ng-if=\"startsWithFilter\" class=\"select2-results-dept-0 select2-result select2-result-selectable\" role=\"presentation\"\n" +
- " ng-model=\"ListType\" ng-repeat=\"(fIndex, item) in filteredName = (cName | startsWith:title:item)\"\n" +
- " ng-class=\"{'select2-result-current': selectedOption === item.title,'hovstyle': selectedIndex === item.index}\"\n" +
- " ng-click=\"selectOption(item.title,item.index)\"\n" +
- " ng-mouseover=\"hoverIn(item.index)\">\n" +
- " <div class=\"select2-result-label\" ng-bind-html=\"item.title | unsafe\" role=\"option\">\n" +
- " <span class=\"select2-match\" ></span>\n" +
- " </div>\n" +
- " </li>\n" +
- "\n" +
- " <li ng-if=\"!startsWithFilter\" class=\"select2-results-dept-0 select2-result select2-result-selectable\" role=\"presentation\"\n" +
- " ng-model=\"ListType\" ng-repeat=\"(fIndex, item) in filteredName = (cName | filter:title)\"\n" +
- " ng-class=\"{'select2-result-current': selectedOption === item.title,'hovstyle': selectedIndex === item.index}\"\n" +
- " ng-click=\"selectOption(item.title,item.index)\"\n" +
- " ng-mouseover=\"hoverIn(item.index)\"\n" +
- " >\n" +
- " <div class=\"select2-result-label\" ng-bind-html=\"item.title | highlight:title:className | unsafe\" role=\"option\">\n" +
- " <span class=\"select2-match\" ></span>\n" +
- " </div>\n" +
- " </li>\n" +
- "\n" +
- " </ul>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/select/textDropdown.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/select/textDropdown.html",
- "<div tabindex=\"0\" class=\"text-dropdown\">\n" +
- " <div class=\"dropdown\" ng-class=\"{'not-visible': isActionsShown}\" ng-click=\"toggle()\" >\n" +
- " <span class=\"action--selected\" ng-bind=\"currentAction\"></span>\n" +
- " <i ng-class=\"isActionsShown ? 'icon-dropdown-up' : 'icon-dropdown-down'\"></i>\n" +
- " </div>\n" +
- "\n" +
- " <ul ng-class=\"isActionsShown ? 'actionsOpened' : 'actionsClosed'\" ng-show=\"isActionsShown\">\n" +
- " <li ng-class=\"{'highlight': selectedIndex==$index}\" ng-repeat=\"action in actions track by $index\" ng-click=\"chooseAction($event, action)\" ng-mouseover=\"hoverIn($index)\">{{action}}<i ng-class=\"{'icon-included-checkmark': isCurrentAction(action)}\"></i></li>\n" +
- " </ul>\n" +
- "\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/slider/maxContent.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/slider/maxContent.html",
- "<div class=\"att-slider__label att-slider__label--max att-slider__label--below\" ng-transclude></div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/slider/minContent.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/slider/minContent.html",
- " <div class=\"att-slider__label att-slider__label--min att-slider__label--below\" ng-transclude></div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/slider/slider.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/slider/slider.html",
- "<div class=\"att-slider\" ng-mousemove=\"moveElem($event)\" ng-mouseup=\"mouseUp($event)\">\n" +
- " <div class=\"att-slider__track\">\n" +
- " <div class=\"att-slider__range att-slider__range--disabled\" ng-style=\"disabledStyle\"></div>\n" +
- " <div class=\"att-slider__range\" ng-style=\"rangeStyle\"></div>\n" +
- " </div>\n" +
- " <div class=\"att-slider__handles-container\">\n" +
- " <div class=\"att-slider__handle\" ng-style=\"handleStyle\" ng-mousedown=\"mouseDown($event,'ngModelSingle')\" ng-mousemove=\"moveElem($event)\" ng-mouseup=\"mouseUp($event)\" tabindex=\"0\" ng-keydown=\"keyDown($event,'ngModelSingle')\"></div>\n" +
- " <div class=\"att-slider__handle\" ng-style=\"minHandleStyle\" ng-mousedown=\"mouseDown($event,'ngModelLow')\" ng-mousemove=\"moveElem($event)\" ng-mouseup=\"mouseUp($event)\" tabindex=\"0\" ng-keydown=\"keyDown($event,'ngModelLow')\"></div>\n" +
- " <div class=\"att-slider__handle\" ng-style=\"maxHandleStyle\" ng-mousedown=\"mouseDown($event,'ngModelHigh')\" ng-mousemove=\"moveElem($event)\" ng-mouseup=\"mouseUp($event)\" tabindex=\"0\" ng-keydown=\"keyDown($event,'ngModelHigh')\"></div>\n" +
- " </div>\n" +
- " <div ng-transclude></div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/splitButtonDropdown/splitButtonDropdown.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/splitButtonDropdown/splitButtonDropdown.html",
- "<div class=\" btn-group\" \n" +
- " ng-class=\"{'buttons-dropdown--large':!isSmall, \n" +
- " 'buttons-dropdown--small':isSmall, \n" +
- " 'action-dropdown':isActionDropdown, \n" +
- " 'open':isDropDownOpen}\">\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" class=\"button btn buttons-dropdown__split\" \n" +
- " ng-class=\"{'button--primary':(btnType==undefined || btnType=='primary'), \n" +
- " 'button--secondary':btnType=='secondary', \n" +
- " 'button--disabled':btnType=='disabled', \n" +
- " 'button--small':isSmall}\" \n" +
- " ng-if=\"!isActionDropdown\"\n" +
- " ng-click=\"btnType==='disabled'?undefined:clickFxn()\" att-accessibility-click=\"13,32\">{{btnText}}</a>\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" role=\"button\" aria-label=\"Toggle Dropdown\" class=\"button buttons-dropdown__drop dropdown-toggle\" \n" +
- " ng-class=\"{'button--primary':(btnType==undefined || btnType=='primary'), \n" +
- " 'button--secondary':btnType=='secondary', \n" +
- " 'button--disabled':btnType=='disabled', \n" +
- " 'button--small':isSmall}\" ng-click=\"toggleDropdown()\" att-accessibility-click=\"13,32\"></a>\n" +
- " <ul class=\"dropdown-menu\" ng-click=\"hideDropdown()\" ng-transclude></ul>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/splitIconButton/splitIcon.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/splitIconButton/splitIcon.html",
- "<div class='split-icon-button-container'>\n" +
- "\n" +
- " <div class='split-icon-button' ng-class=\"{'icon-with-chevron': isRight && !isMiddle && !isLeftNextDropdown && !isNextToDropDown, 'split-icon-button-middle':isMiddle, 'split-icon-button-right':isRight, 'split-icon-button-left':isLeft, 'split-icon-button-left-dropdown': isLeftNextDropdown ,'split-icon-button-next-dropdown': isNextToDropDown,'split-icon-button-dropdown': isDropDownOpen,'split-icon-button-hover':isIconHovered || isDropDownOpen}\" ng-mouseover='isIconHovered = true;' ng-mouseleave='isIconHovered = false;' tabindex=\"-1\" att-accessibility-click=\"13,32\" ng-click='dropDownClicked();'>\n" +
- " <a class='{{icon}}' aria-label='{{icon}}' role='button' tabindex=\"0\"></a>\n" +
- " <i ng-if=\"isRight && !isMiddle && !isLeftNextDropdown && !isNextToDropDown\" \n" +
- " ng-class=\"isDropDownOpen ? 'icon-dropdown-up' : 'icon-dropdown-down'\"> </i>\n" +
- " </div> \n" +
- "\n" +
- " <ul ng-if='isDropdown' class='dropdown-menu {{dropDownId}}' ng-show='\n" +
- " isDropDownOpen' ng-click='toggleDropdown(false)' ng-transclude>\n" +
- " </ul>\n" +
- "\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/splitIconButton/splitIconButton.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/splitIconButton/splitIconButton.html",
- "<div>\n" +
- " <div ng-if='isLeftLineShown' dir-type='{{iconStateConstants.DIR_TYPE.LEFT}}' expandable-line></div>\n" +
- " <div ng-click='clickHandler()' att-split-icon icon='{{icon}}' dir-type='{{iconStateConstants.DIR_TYPE.BUTTON}}' hover-watch='isHovered' drop-down-watch='dropDownWatch' drop-down-id='{{dropDownId}}'>\n" +
- " <div ng-transclude>\n" +
- " </div>\n" +
- " </div>\n" +
- " <div ng-if='isRightLineShown' dir-type='{{iconStateConstants.DIR_TYPE.RIGHT}}' expandable-line></div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/splitIconButton/splitIconButtonGroup.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/splitIconButton/splitIconButtonGroup.html",
- "<div ng-transclude>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/stepSlider/attStepSlider.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/stepSlider/attStepSlider.html",
- "<span ng-class=\"mainSliderClass\">\n" +
- " <table>\n" +
- " <tr>\n" +
- " <td>\n" +
- " <div class=\"jslider-bg\">\n" +
- " <i class=\"l\"></i>\n" +
- " <i class=\"r\"></i>\n" +
- " <i class=\"v\" ng-class=\"{'step-slider-green':sliderColor == COLORS.GREEN, 'step-slider-blue': sliderColor == COLORS.BLUE_HIGHLIGHT, 'step-slider-magenta': sliderColor == COLORS.MAGENTA, 'step-slider-gold': sliderColor == COLORS.GOLD, 'step-slider-purple': sliderColor == COLORS.PURPLE, 'step-slider-dark-blue': sliderColor == COLORS.DARK_BLUE, 'step-slider-regular': sliderColor == COLORS.REGULAR, 'step-slider-white': sliderColor == COLORS.WHITE, 'cutoff-slider': isCutOffSlider}\"></i>\n" +
- " </div>\n" +
- " <div class=\"jslider-pointer\" id=\"left-pointer\"></div>\n" +
- " <div class=\"jslider-pointer jslider-pointer-to\" ng-class=\"{'step-slider-green':sliderColor == COLORS.GREEN, 'step-slider-blue': sliderColor == COLORS.BLUE_HIGHLIGHT, 'step-slider-magenta': sliderColor == COLORS.MAGENTA, 'step-slider-gold': sliderColor == COLORS.GOLD, 'step-slider-purple': sliderColor == COLORS.PURPLE, 'step-slider-dark-blue': sliderColor == COLORS.DARK_BLUE, 'step-slider-regular': sliderColor == COLORS.REGULAR, 'step-slider-white':sliderColor == COLORS.WHITE ,'cutoff-slider': isCutOffSlider}\"></div>\n" +
- " <div class=\"jslider-label\"><span ng-bind=\"from\"></span><span ng-bind=\"options.dimension\"></span></div>\n" +
- " <div class=\"jslider-label jslider-label-to\"><span ng-bind=\"toStr\"></span><span ng-bind=\"endDimension\"></span></div>\n" +
- " <div class=\"jslider-value\" id=\"jslider-value-left\"><span></span>{{options.dimension}}</div>\n" +
- " <div class=\"jslider-value jslider-value-to\"><span></span>{{toolTipDimension}}</div>\n" +
- " <div class=\"jslider-scale\" ng-class=\"{'show-dividers': showDividers, 'cutoff-slider-dividers':isCutOffSlider}\">\n" +
- " </div>\n" +
- " <div class=\"jslider-cutoff\">\n" +
- " <div class=\"jslider-label jslider-label-cutoff\">\n" +
- " <span ng-bind=\"cutOffVal\"></span>\n" +
- " </div>\n" +
- " </div>\n" +
- " </td>\n" +
- " </tr>\n" +
- " </table>\n" +
- "</span>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/steptracker/step-tracker.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/steptracker/step-tracker.html",
- "<div class=\"steptracker1\">\n" +
- " <div class=\"steptracker-bg\">\n" +
- " <div class=\"steptracker-track size-onethird\" ng-repeat=\"step in sdata\"\n" +
- " ng-style=\"set_width($index)\"\n" +
- " ng-class=\"{'last':laststep($index),'done':donesteps($index),'active':activestep($index), 'incomplete': isIncomplete($index), 'disabled': disableClick}\">\n" +
- " <div class=\"circle\" tabindex=\"0\"\n" +
- " ng-click=\"stepclick($event, $index);\"\n" +
- " att-accessibility-click=\"13,23\">{{($index) + 1}}<span>{{step.title}}</span></div>\n" +
- " <div ng-if=\"!laststep($index)\" class=\"track\"></div>\n" +
- " </div>\n" +
- " </div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/steptracker/step.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/steptracker/step.html",
- "<div class=\"steptracker1\">\n" +
- " <div class=\"steptracker-bg\">\n" +
- " <div class=\"steptracker-track size-onethird\" \n" +
- " ng-class=\"{'last':laststep($index),'done':donesteps($index),'active':activestep($index)}\">\n" +
- " <div class=\"circle\" tabindex=\"0\" \n" +
- " ng-click=\"stepclick($event, $index);\" \n" +
- " att-accessibility-click=\"13,23\">{{($index) + 1}}<span>{{step.title}}</span></div>\n" +
- " <div ng-if=\"!laststep($index)\" class=\"track\"></div>\n" +
- " </div>\n" +
- " </div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/steptracker/timeline.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/steptracker/timeline.html",
- "<div class='att-timeline'>\n" +
- " <div timeline-dot order='0' title='{{steps[0].title}}' description='{{steps[0].description}}' by='{{steps[0].by}}' date='{{steps[0].date}}' type='{{steps[0].type}}'></div>\n" +
- "\n" +
- " <div ng-repeat=\"m in middleSteps track by $index\">\n" +
- " <div timeline-bar order='{{$index}}'></div>\n" +
- " <div timeline-dot order='{{$index + 1}}' title='{{m.title}}' description='{{m.description}}' by='{{m.by}}' date='{{m.date}}' type='{{m.type}}'>\n" +
- " </div>\n" +
- " </div>\n" +
- "\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/steptracker/timelineBar.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/steptracker/timelineBar.html",
- "<div class='timeline-bar'>\n" +
- " <div class='progress-bar' ng-class=\"{'completed-color':isCompleted,'cancelled-color':isCancelled,'alert-color':isAlert}\">\n" +
- " </div>\n" +
- " <hr></hr>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/steptracker/timelineDot.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/steptracker/timelineDot.html",
- "<div class='timeline-dot'>\n" +
- "\n" +
- " <div class='bigger-circle' ng-class=\"{'completed-color':isCompleted,'cancelled-color':isCancelled,'alert-color':isAlert}\">\n" +
- " </div>\n" +
- "\n" +
- " <div class='inactive-circle'>\n" +
- " </div>\n" +
- "\n" +
- " <div class='expandable-circle' ng-class=\"{'completed-color':isCompleted,'cancelled-color':isCancelled,'alert-color':isAlert}\">\n" +
- " </div>\n" +
- "\n" +
- " <div ng-class=\"{'below-info-box':isBelowInfoBoxShown, 'above-info-box': !isBelowInfoBoxShown}\">\n" +
- " \n" +
- " <div ng-if='isBelowInfoBoxShown' class='vertical-line'>\n" +
- " </div>\n" +
- "\n" +
- " <div class='info-container' ng-init='isContentShown=false'>\n" +
- " <div ng-class=\"{'current-step-title':isCurrentStep, 'title':!isCurrentStep,'completed-color-text':isCompleted,'cancelled-color-text':isCancelled,'alert-color-text':isAlert, 'inactive-color-text':isInactive}\" ng-mouseover='titleMouseover(1)' ng-mouseleave='titleMouseleave()' ng-bind='title' ></div>\n" +
- " <div class='content'>\n" +
- " <div class='description' ng-bind='description'></div>\n" +
- " <div class='submitter' ng-bind='by'></div>\n" +
- " </div>\n" +
- " <div class='date' ng-mouseover='titleMouseover(2)' ng-mouseleave='titleMouseleave()' ng-bind='date'></div>\n" +
- " </div>\n" +
- "\n" +
- " <div ng-if='!isBelowInfoBoxShown' class='vertical-line'>\n" +
- " </div>\n" +
- " </div>\n" +
- "\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/table/attTable.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/table/attTable.html",
- "<table class=\"tablesorter tablesorter-default\" ng-transclude></table>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/table/attTableBody.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/table/attTableBody.html",
- "<td ng-transclude></td>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/table/attTableHeader.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/table/attTableHeader.html",
- "<th tabindex=\"{{sortable !== 'false' && '0' || '-1'}}\" class=\"tablesorter-header\" ng-class=\"{'tablesorter-headerAsc': sortPattern === 'asc', 'tablesorter-headerDesc': sortPattern === 'desc', 'tablesort-sortable': sortable !== 'false', 'sorter-false': sortable === 'false'}\" att-accessibility-click=\"13,32\" ng-click=\"(sortable !== 'false') && sort(); clickFunc && clickFunc()\"><div class=\"tablesorter-header-inner\" ng-transclude></div></th>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/tabs/floatingTabs.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/tabs/floatingTabs.html",
- "<ul ng-class=\"{'tabsbid': size === 'large', 'tabsbid--small': size === 'small'}\">\n" +
- " <li ng-repeat=\"tab in tabs\" ng-class=\"{'tabsbid__item tabsbid__item--active': isActiveTab(tab.url), 'tabsbid__item': !isActiveTab(tab.url)}\" ng-click=\"onClickTab(tab)\">\n" +
- " <a class=\"tabsbid__item-link\" href=\"{{tab.url}}\" tabindex=\"0\" att-accessibility-click=\"32,13\">{{tab.title}}</a>\n" +
- " </li>\n" +
- "</ul>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/tabs/genericTabs.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/tabs/genericTabs.html",
- "<ul ng-class=\"{'tabsbid': size === 'large', 'tabsbid--small': size === 'small'}\">\n" +
- " <li ng-repeat=\"tab in tabs\" ng-class=\"{'tabsbid__item tabsbid__item--active': isActive(tab.id), 'tabsbid__item': !isActive(tab.id),'tabs__item--active': isActive(tab.id)}\" ng-click=\"clickTab(tab)\">\n" +
- " <a class=\"tabsbid__item-link\" href=\"{{tab.url}}\" tabindex=\"0\" att-accessibility-click=\"32,13\">{{tab.title}}</a>\n" +
- " </li>\n" +
- "</ul>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/tabs/menuTab.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/tabs/menuTab.html",
- "<li class=\"megamenu__item\" ng-mouseover=\"showHoverChild($event)\" ng-click=\"showChildren($event);!clickInactive||resetMenu()\" ng-class=\"{'tabs__item--active': menuItem.active==true && !hoverChild==true}\" ng-transclude att-accessibility-click=\"13,32\" tabindex=\"0\"></li>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/tabs/parentmenuTab.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/tabs/parentmenuTab.html",
- "<div ng-class=\"{'megamenu-tabs': megaMenu,'submenu-tabs': !megaMenu}\">\n" +
- " <ul class=\"megamenu__items\" ng-transclude>\n" +
- " </ul>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/tabs/simplifiedTabs.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/tabs/simplifiedTabs.html",
- "<div class=\"simplified-tabs\">\n" +
- "<ul class=\"simplified-tabs__items\">\n" +
- " <li ng-repeat=\"tab in tabs\" class=\"simplified-tabs__item\" ng-class=\"{'tabs__item--active': isActive(tab.id)}\" ng-click=\"clickTab(tab)\" tabindex=\"0\" att-accessibility-click=\"32,13\">{{tab.title}}</li>\n" +
- " <li class=\"tabs__pointer\"></li>\n" +
- "</ul>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/tabs/submenuTab.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/tabs/submenuTab.html",
- "<li class=\"tabsbid__item megamenu__item\" ng-class=\"{'subMenuHover': menuItem.active==true}\" ng-mouseover=\"!subMenu || showChildren($event)\" ng-focus=\"!subMenu ||showChildren($event)\" tabindex=\"{{subMenu=='true'?0:-1}}\" ng-click=\"!subMenu ||showMenuClick() ; subMenu ||showSubMenuClick()\" att-accessibility-click=\"13,32\" ng-transclude>\n" +
- "</li>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/tagBadges/tagBadges.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/tagBadges/tagBadges.html",
- "<div class=\"tags__item\" \n" +
- " ng-class=\"{'tags__item--small':isSmall, \n" +
- " 'tags__item--color':isColor, \n" +
- " 'tags__item--cloud':!isClosable && !isColor,'active':applyActiveClass}\"\n" +
- " ng-if=\"display\" \n" +
- " ng-style=\"{borderColor: border_type_borderColor, background: isHighlight?'#bbb':undefined, color: isHighlight?'#444':undefined }\"\n" +
- " ng-mousedown=\"activeHighlight(true)\" ng-mouseup=\"activeHighlight(false)\">\n" +
- " <i class=\"icon-filter tags__item--icon\" ng-if=\"isIcon\">&nbsp;</i>\n" +
- " <i class=\"tags__item--color-icon\" ng-if=\"isColor\" ng-style=\"{backgroundColor: background_type_backgroundColor, borderColor: background_type_borderColor}\"></i>\n" +
- " <span class=\"tags__item--title\" tabindex=0 aria-label ng-mousedown=\"activeHighlight(true)\" ng-mouseup=\"activeHighlight(false)\" ng-transclude></span>\n" +
- " <a href=\"javascript:void(0)\" title=\"Dismiss Link\" class=\"tags__item--action\" ng-click=\"closeMe();$event.preventDefault()\" ng-if=\"isClosable\"\n" +
- " ng-style=\"{color: (isHighlight && '#444') || '#888' , borderLeft: (isHighlight && '1px solid #444')|| '1px solid #888' }\">\n" +
- " <i class=\"icon-erase\">&nbsp;</i>\n" +
- " </a>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/toggle/demoToggle.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/toggle/demoToggle.html",
- "<span ng-transclude></span>\n" +
- "<div tabindex=\"0\" class=\"att-switch-content\" hm-drag = \"drag($event)\" att-accessibility-click=\"13,32\" ng-click = \"updateModel($event)\" hm-dragstart = \"alert('hello')\" hm-dragend = \"drag($event)\" ng-class=\"{'large' : directiveValue == 'large'}\" style=\"-webkit-user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\">\n" +
- " <div class=\"att-switch-onText\" ng-style=\"\" ng-class=\"{'icon-included-checkmark ico' : on === undefined,'large' : directiveValue == 'large'}\">{{on}}<span class=\"hidden-spoken\">when checked.</span></div>\n" +
- " <div class=\"att-switch-thumb\" tabindex=\"0\" ng-class=\"{'large' : directiveValue == 'large'}\"></div>\n" +
- " <div class=\"att-switch-offText\" ng-class=\"{'icon-erase ico' : on === undefined,'large' : directiveValue == 'large'}\">{{off}}<span class=\"hidden-spoken\">when unchecked.</span></div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/tooltip/tooltip-popup.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/tooltip/tooltip-popup.html",
- "<div class=\"att-tooltip \" \n" +
- " ng-class=\"{ 'att-tooltip--on': isOpen, \n" +
- " 'att-tooltip--dark att-tooltip--dark--hover':stylett=='dark', \n" +
- " 'att-tooltip--light att-tooltip--light--hover':stylett=='light',\n" +
- " 'att-tooltip--left':placement=='left', \n" +
- " 'att-tooltip--above':placement=='above', \n" +
- " 'att-tooltip--right':placement=='right', \n" +
- " 'att-tooltip--below':placement=='below'}\" \n" +
- " ng-bind-html=\"content\" ></div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/typeAhead/typeAhead.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/typeAhead/typeAhead.html",
- "<div class=\"typeahead mainContainerOuter\">\n" +
- " <span class=\"message\">To</span> \n" +
- " <div class='maincontainer' ng-click=\"setFocus()\" ng-class =\"{'typeahed_active':inputActive}\">\n" +
- " <span tag-badges closable ng-repeat =\"lineItem in lineItems track by $index\" on-close=\"theMethodToBeCalled($index)\" >{{lineItem}}</span>\n" +
- " <input type=\"text\" focus-me=\"clickFocus\" id=\"inpute\" aria-label=\"model\" role=\"textfiled\" ng-model=\"model\" ng-keydown=\"selected = false; selectionIndex($event)\"/><br/> \n" +
- " </div>\n" +
- " <div ng-hide=\"!model.length || selected\">\n" +
- " <div class=\"filtercontainer list-scrollable\" ng-show=\"( items | filter:model).length\">\n" +
- " <div class=\"item\" ng-repeat=\"item in items| filter:model track by $index\" ng-click=\"handleSelection(item[title],item[subtitle])\" att-accessibility-click=\"13,32\" style=\"cursor:pointer\" ng-class=\"{active:isCurrent($index,item[title],item[subtitle],( items | filter:model).length)}\" aria-label=\"item[title]\" ng-mouseenter=\"setCurrent($index)\">\n" +
- " <span class=\"title\" >{{item[title]}}</span>\n" +
- " <span class=\"subtitle\">{{item[subtitle]}}</span>\n" +
- " </div> \n" +
- " </div>\n" +
- " </div>\n" +
- " \n" +
- " <div class=\"textAreaEmailContentDiv\">\n" +
- " <span class=\"message\">Message</span>\n" +
- " <textarea rows=\"4\" cols=\"50\" role=\"textarea\" class=\"textAreaEmailContent\" ng-model=\"emailMessage\">To send \n" +
- " a text, picture, or video message1 to an AT&T wireless device from your email:my message.</textarea>\n" +
- " \n" +
- " </div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/userMessages/attTableMessage.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/userMessages/attTableMessage.html",
- "<div class=\"att-table-message\">\n" +
- " <div class=\"message\" ng-if=\"msgType==messageConstants.TABLE_MESSAGE_TYPES.noMatching\">\n" +
- " <div class=\"img-magnify-glass\"></div> \n" +
- " <div>\n" +
- " <div ng-transclude></div>\n" +
- " </div>\n" +
- " </div>\n" +
- " <div class=\"message\" ng-if=\"msgType==messageConstants.TABLE_MESSAGE_TYPES.errorLoading\">\n" +
- " <div class=\"img-oops-exclamation\"></div> \n" +
- " <div>Oops!</div>\n" +
- " <div>The information could not load at this time.</div>\n" +
- " <div>Please <a href=\"javascript:void(0)\" ng-click=\"refreshAction($event)\">refresh the page</a>\n" +
- " </div>\n" +
- " </div>\n" +
- " <div class=\"message\" ng-if=\"msgType==messageConstants.TABLE_MESSAGE_TYPES.magnifySearch\">\n" +
- " <div class=\"img-magnify-glass\"></div>\n" +
- " <div>\n" +
- " <p class=\"title\">Please input values to <br/> begin your search.</p>\n" +
- " </div>\n" +
- " </div>\n" +
- " <div class=\"message loading-message\" ng-if=\"msgType==messageConstants.TABLE_MESSAGE_TYPES.isLoading\">\n" +
- " <div class=\"img-loading-dots\"></div>\n" +
- " <div ng-transclude></div>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/userMessages/attUserMessage.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/userMessages/attUserMessage.html",
- "<div class=\"att-user-message\">\n" +
- " <div ng-class=\"type==messageConstants.USER_MESSAGE_TYPES.error && trigger ? 'message-wrapper-error' : 'hidden'\">\n" +
- " <div class=\"message-icon-error\"> <i class=\"icon-info-alert\"></i> </div>\n" +
- "\n" +
- " <div class=\"message-body-wrapper\">\n" +
- " <div class=\"message-title-error\" ng-if=\"thetitle && thetitle.length > 0\"> <span ng-bind=\"thetitle\"></span> </div>\n" +
- " <div class=\"message-msg\" ng-bind=\"message\" ng-if=\"message && message.length > 0\"> </div>\n" +
- " <div class=\"message-bottom\">\n" +
- " <div ng-transclude></div>\n" +
- " </div>\n" +
- " </div>\n" +
- "\n" +
- " </div>\n" +
- " <div ng-class=\"type==messageConstants.USER_MESSAGE_TYPES.success && trigger ? 'message-wrapper-success' : 'hidden'\">\n" +
- " <div class=\"message-icon-success\"> <i class=\"icon-included-checkmark\"></i> </div>\n" +
- "\n" +
- " <div class=\"message-body-wrapper\">\n" +
- " <div class=\"message-title-success\" ng-if=\"thetitle && thetitle.length > 0\"> <span ng-bind=\"thetitle\"></span> </div>\n" +
- " <div class=\"message-msg\" ng-bind=\"message\" ng-if=\"message && message.length > 0\"> </div>\n" +
- " <div class=\"message-bottom\">\n" +
- " <div ng-transclude></div>\n" +
- " </div>\n" +
- " </div>\n" +
- "\n" +
- " </div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/verticalSteptracker/vertical-step-tracker.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/verticalSteptracker/vertical-step-tracker.html",
- "<li>\n" +
- " <i ng-class=\"{'icon-tickets-active' : type == 'actual' && id =='Active','icon-tickets-referred' : type == 'actual' && id =='Requested Closed','icon-ticket-regular' : type == 'progress' && id =='In Progress','icon-tickets-contested' : type == 'actual' && id =='Contested','icon-tickets-returned' : type == 'actual' && id =='Deferred','icon-tickets-closed' : type == 'actual' && id =='Ready to Close','icon-tickets-cleared' : type == 'actual' && id =='Cleared'}\"></i>\n" +
- " <span ng-transclude></span>\n" +
- "</li>\n" +
- " \n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/videoControls/photoControls.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/videoControls/photoControls.html",
- "<div>\n" +
- " <a title=\"Previous Link\" ng-href=\"{{links.prevLink}}\"><i class=\"icon-arrow-left\">&nbsp;</i></a>\n" +
- " <span ng-transclude></span>\n" +
- " <a title=\"Next Link\" ng-href=\"{{links.nextLink}}\"><i class=\"icon-arrow-right\">&nbsp;</i></a>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/videoControls/videoControls.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/videoControls/videoControls.html",
- "<div class=\"video-player\">\n" +
- " <div class=\"video-player__control video-player__play-button\">\n" +
- " <a class=\"video-player__button gigant-play\" data-toggle-buttons=\"icon-play, icon-pause\" data-target=\"i\"><i class=\"icon-play\"></i></a>\n" +
- " </div>\n" +
- " <div class=\"video-player__control video-player__track\">\n" +
- "\n" +
- " <div class=\"video-player__track--inner\">\n" +
- " <div class=\"video-player__track--loaded\" style=\"width: 75%\"></div>\n" +
- " <div class=\"video-player__track--played\" style=\"width: 40%\">\n" +
- " <div class=\"att-tooltip att-tooltip--on att-tooltip--dark att-tooltip--above video-player__track-tooltip\" ng-transclude></div>\n" +
- " <div class=\"video-player__track-handle\"></div>\n" +
- " </div>\n" +
- " </div>\n" +
- " </div>\n" +
- " <a class=\"video-player__time\" ng-transclude></a>\n" +
- " <div class=\"video-player__control video-player__volume_icon\">\n" +
- " <a class=\"video-player__button\" data-toggle-buttons=\"icon-volume-mute, icon-volume-up\" data-target=\"i\"><i class=\"icon-volume-up\"></i></a>\n" +
- " </div>\n" +
- " <ul class=\"video-player__control video-player__volume\">\n" +
- " <li class=\"video-player__volume-bar video-player__volume-bar--full\">&nbsp;</li>\n" +
- " <li class=\"video-player__volume-bar video-player__volume-bar--full\">&nbsp;</li>\n" +
- " <li class=\"video-player__volume-bar\">&nbsp;</li>\n" +
- " <li class=\"video-player__volume-bar\">&nbsp;</li>\n" +
- " <li class=\"video-player__volume-bar\">&nbsp;</li>\n" +
- " </ul>\n" +
- " <div class=\"video-player__control video-player__toggle-fullscreen-button\">\n" +
- " <a class=\"video-player__button\" data-toggle-buttons=\"icon-full-screen, icon-normal-screen\" data-target=\"i\"><i class=\"icon-full-screen\">&nbsp;</i></a>\n" +
- " </div>\n" +
- "</div>");
-}]);
diff --git a/ecomp-portal-BE/war/static/ebz/angular_js/attHeaderSnippet.js b/ecomp-portal-BE/war/static/ebz/angular_js/attHeaderSnippet.js
deleted file mode 100644
index 2c0dfc37..00000000
--- a/ecomp-portal-BE/war/static/ebz/angular_js/attHeaderSnippet.js
+++ /dev/null
@@ -1,210 +0,0 @@
-/* Popup Box function */
-(function(){
-
- $.fn.popbox = function(options){
- settings = $.extend({
- selector : this.selector,
- open : '.openpopbox',
- box : '.box1',
- arrow : '.arrow',
- arrow_border : '.arrow-border',
- close : '.close'
- }, options);
-
- var methods = {
- open: function(event){
- event.preventDefault();
- var pop = $(this);
- var box = $(this).parent().find(settings['box']);
- box.find(settings['arrow']).css({'left': box.width()/2 - 10 + 46});
- box.find(settings['arrow_border']).css({'left': box.width()/2 - 10 - 63});
- if(box.css('display') == 'block'){
- /* methods.close();
- setTimeout(function(){ $(".btn-panel-vertical,#actionsDropDown").css('z-index','999'); },200);
- // $(".btn-panel-vertical,#actionsDropDown").css('z-index','999');
- if($(window).scrollTop() > 20){
- setTimeout(function(){ $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999'); },200);
- // $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999');
- };*/
- $('.box1').fadeIn('slow');
- } else {
- $('.chatBox').fadeOut('fast');
- $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999');
- if(box.attr('target') == 'auth'){
- box.find(settings['arrow']).css({'left': box.width()/2 + 36});
- box.css({'display': 'block', 'top': 0, 'left': ((pop.parent().parent().width()/2) -box.width()/2 ) - 90});
- }
- else{
- box.find(settings['arrow']).css({'left': box.width()/2 - 42});
- box.css({'display': 'block', 'top': 0, 'left': ((pop.parent().parent().width()/2) -box.width()/2-15 )});
- box.find("#header_login_id").focus();
- box.find('#header_password').val('');
- }
- }
- },
-
- close: function(){
- $(settings['box']).fadeOut("fast");
- }
- };
-
- $(document).bind('keyup', function(event){
- if(event.keyCode == 27){
- setTimeout(function(){ $(".btn-panel-vertical,#actionsDropDown").css('z-index','999'); },200);
- // $(".btn-panel-vertical,#actionsDropDown").css('z-index','999');
- if($(window).scrollTop() > 20){
- // setTimeout(function(){ $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999'); },200);
- $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999');
- };
- methods.close();
- }
- });
- // Close chat-box and popup on clicking out of chat-box
- $(document).bind('click', function(event){
- if(!($(event.target).closest('.chatBox').length || $(event.target).hasClass('chatIcon') || $(event.target).closest(settings['selector']).length)){
- methods.close();
- if ($("#actionsDropDown").css('z-index')=='-999'){
- setTimeout(function(){ $(".btn-panel-vertical,#actionsDropDown").css('z-index','999'); },200);
- }
- if($(window).scrollTop() > 20){
- setTimeout(function(){ $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999'); },200);
- // $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999');
- };
-
- $('.chatBox').fadeOut('fast');
-
- }
- });
-
- return this.each(function(){
-
- $(this).css({'width': $(settings['box']).width()}); // Width needs to be set otherwise popbox will not move when window resized.
- $(settings['open'], this).bind('click', methods.open);
- $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999');
- $(settings['open'], this).parent().find(settings['close']).bind('click', function(event){
- // $(".btn-panel-vertical,#actionsDropDown").css('z-index','999');
- setTimeout(function(){ $(".btn-panel-vertical,#actionsDropDown").css('z-index','999'); },200);
- methods.close();
- });
- });
- }
-
-}).call(this);
-
-
-$('.popbox').popbox();
-
-$(function(){
- var displayName = "";
- if($("#reg-fn-ln-id").length > 0){
- var fnln = $("#reg-fn-ln-id").val().length;
- if(fnln > 0){
- var fnVar = $("#reg-fname-id").val();
- var lnVar = $("#reg-lname-id").val();
- var numChars = 13;
- var nameLen = fnVar.length + lnVar.length + 1; // 1 for space between the first name and the last name
- if(fnVar != " " && lnVar != " "){
- if(nameLen <= numChars){
- displayName = fnVar+" "+lnVar;
- }else if(nameLen <= (numChars * 2)){
- displayName = fnVar+"<br/>"+lnVar;
- }else
- {
- if(fnVar.length < numChars && lnVar.length > numChars){ //Smaller first name and longer last name
- displayName = fnVar+"<br/>"+lnVar.substring(0,numChars-1)+"...";
- }
-
- if(fnVar.length >= numChars ){ //Longer first name
- // 2 = 1 for elipses, 1 for space between the first name and last name
- longLName = numChars - ((fnVar.substring(numChars,fnVar.length)).length + 2);
- displayName = fnVar.substring(0,numChars)+"<br/>"+fnVar.substring(numChars,fnVar.length)+" "+lnVar.substring(0,longLName)+"...";
- }
- }
- }
- else{
- displayName = fnVar+" "+lnVar;
- }
- }
-
- $("#reg-userName").html(displayName);
- }
-});
-
-/* ClickToChat ANONYMOUS FUNCTION DEFINITION *
- * =============================================== *
- * On clicking the chat icon displays the chat box */
-(function(){
-
- var chatbox = $('.chatBox');
-
- // var actionsDropDown = $('#actionsDropDown');
- var methods = {
- open: function(){chatbox.css('display','block');},
- close: function(){chatbox.fadeOut('fast');}
- };
- $('.chatIcon').click(function(){
- if (chatbox.css('display') == 'block'){
- methods.close();
- setTimeout(function(){ $(".btn-panel-vertical,#actionsDropDown").css('z-index','999'); },200);
- // $(".btn-panel-vertical,#actionsDropDown").css('z-index','999');
- if($(window).scrollTop() > 20){
- setTimeout(function(){ $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999'); },200);
- // $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999');
- };
- } else {
- $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999');
- methods.open();
- $(settings['box']).fadeOut("fast");
- }
- });
-
- // Close chat-box on clicking cross icon
- $('.circle_close_chat').click(function(){
- // $(".btn-panel-vertical,#actionsDropDown").css('z-index','999');
- setTimeout(function(){ $(".btn-panel-vertical,#actionsDropDown").css('z-index','999'); },200);
- methods.close();
- if($(window).scrollTop() > 20){
- setTimeout(function(){ $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999'); },200);
- // $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999');
- };
- });
-
- // Close chat-box on Escape key press
- $(document).bind('keyup', function(event){
- if(event.keyCode == 27){
- setTimeout(function(){ $(".btn-panel-vertical,#actionsDropDown").css('z-index','999'); },200);
- methods.close();
- if($(window).scrollTop() > 20){
- setTimeout(function(){ $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999'); },200);
- //$(".btn-panel-vertical,#actionsDropDown").css('z-index','-999');
- };
- }
- });
-
- // Close chat-box on clicking out of chat-box
- // $(document).bind('click', function(event){
-
- // console.log(event.target,"2");
- // if(!($(event.target).closest('.chatBox').length || $(event.target).hasClass('chatIcon'))) {
- // event.preventDefault();
- // // console.log($(event.target).closest(settings['selector']).length);
- // console.log($(event.target).closest('. ').length);
- // console.log($(event.target).hasClass('chatIcon'));
-
-
- // // $(".btn-panel-vertical,#actionsDropDown").css('z-index','999');
- // methods.close();
- // if ($("#actionsDropDown").css('z-index')=='-999') {
- // $(".btn-panel-vertical,#actionsDropDown").css('z-index','999');
- // };
- // // if (flag!="clicked") {
- // // if ($('.box').css('display') == 'block' || $('.chatBox').css('display') == 'block' ){
- // // $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999');
- // // } else {
- // // $(".btn-panel-vertical,#actionsDropDown").css('z-index','999');
- // // }
- // // }
- // }
- // });
-
-})(); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/ebz/angular_js/att_abs_tpls.js b/ecomp-portal-BE/war/static/ebz/angular_js/att_abs_tpls.js
deleted file mode 100644
index 149e93d7..00000000
--- a/ecomp-portal-BE/war/static/ebz/angular_js/att_abs_tpls.js
+++ /dev/null
@@ -1,18514 +0,0 @@
-/*Sandbox version 1.2.51*/
-angular.module("att.abs", ["att.abs.tpls", "att.abs.position","att.abs.transition","att.abs.accordion","att.abs.alert","att.abs.breadCrumbs","att.abs.utilities","att.abs.buttons","att.abs.checkbox","att.abs.colorselector","att.abs.datepicker","att.abs.devNotes","att.abs.dividerLines","att.abs.dragdrop","att.abs.drawer","att.abs.message","att.abs.formField","att.abs.hourpicker","att.abs.iconButtons","att.abs.links","att.abs.loading","att.abs.modal","att.abs.pagination","att.abs.paneSelector","att.abs.profileCard","att.abs.progressBars","att.abs.radio","att.abs.scrollbar","att.abs.search","att.abs.select","att.abs.slider","att.abs.splitButtonDropdown","att.abs.steptracker","att.abs.table","att.abs.tabs","att.abs.tagBadges","att.abs.textOverflow","att.abs.toggle","att.abs.tooltip","att.abs.treeview","att.abs.typeAhead","att.abs.userMessages","att.abs.verticalSteptracker","att.abs.videoControls"]);
-angular.module("att.abs.tpls", ["app/scripts/ng_js_att_tpls/accordion/accordion.html","app/scripts/ng_js_att_tpls/accordion/accordion_alt.html","app/scripts/ng_js_att_tpls/accordion/attAccord.html","app/scripts/ng_js_att_tpls/accordion/attAccordBody.html","app/scripts/ng_js_att_tpls/accordion/attAccordHeader.html","app/scripts/ng_js_att_tpls/alert/alert.html","app/scripts/ng_js_att_tpls/colorselector/colorselector.html","app/scripts/ng_js_att_tpls/datepicker/dateFilter.html","app/scripts/ng_js_att_tpls/datepicker/dateFilterList.html","app/scripts/ng_js_att_tpls/datepicker/datepicker.html","app/scripts/ng_js_att_tpls/datepicker/datepickerPopup.html","app/scripts/ng_js_att_tpls/dividerLines/dividerLines.html","app/scripts/ng_js_att_tpls/dragdrop/fileUpload.html","app/scripts/ng_js_att_tpls/formField/attFormFieldValidationAlert.html","app/scripts/ng_js_att_tpls/hourpicker/hourpicker.html","app/scripts/ng_js_att_tpls/links/readMore.html","app/scripts/ng_js_att_tpls/loading/loading.html","app/scripts/ng_js_att_tpls/modal/backdrop.html","app/scripts/ng_js_att_tpls/modal/window.html","app/scripts/ng_js_att_tpls/pagination/pagination.html","app/scripts/ng_js_att_tpls/paneSelector/innerPane.html","app/scripts/ng_js_att_tpls/paneSelector/paneGroup.html","app/scripts/ng_js_att_tpls/paneSelector/sidePane.html","app/scripts/ng_js_att_tpls/profileCard/addUser.html","app/scripts/ng_js_att_tpls/profileCard/profileCard.html","app/scripts/ng_js_att_tpls/progressBars/progressBars.html","app/scripts/ng_js_att_tpls/scrollbar/scrollbar.html","app/scripts/ng_js_att_tpls/search/search.html","app/scripts/ng_js_att_tpls/search/search_2.html","app/scripts/ng_js_att_tpls/select/select.html","app/scripts/ng_js_att_tpls/select/textDropdown.html","app/scripts/ng_js_att_tpls/slider/attStepSlider.html","app/scripts/ng_js_att_tpls/slider/maxContent.html","app/scripts/ng_js_att_tpls/slider/minContent.html","app/scripts/ng_js_att_tpls/slider/slider.html","app/scripts/ng_js_att_tpls/splitButtonDropdown/splitButtonDropdown.html","app/scripts/ng_js_att_tpls/splitButtonDropdown/splitIcon.html","app/scripts/ng_js_att_tpls/splitButtonDropdown/splitIconButton.html","app/scripts/ng_js_att_tpls/splitButtonDropdown/splitIconButtonGroup.html","app/scripts/ng_js_att_tpls/steptracker/step-tracker.html","app/scripts/ng_js_att_tpls/steptracker/step.html","app/scripts/ng_js_att_tpls/steptracker/timeline.html","app/scripts/ng_js_att_tpls/steptracker/timelineBar.html","app/scripts/ng_js_att_tpls/steptracker/timelineDot.html","app/scripts/ng_js_att_tpls/table/attTable.html","app/scripts/ng_js_att_tpls/table/attTableBody.html","app/scripts/ng_js_att_tpls/table/attTableHeader.html","app/scripts/ng_js_att_tpls/tabs/floatingTabs.html","app/scripts/ng_js_att_tpls/tabs/genericTabs.html","app/scripts/ng_js_att_tpls/tabs/menuTab.html","app/scripts/ng_js_att_tpls/tabs/parentmenuTab.html","app/scripts/ng_js_att_tpls/tabs/simplifiedTabs.html","app/scripts/ng_js_att_tpls/tabs/submenuTab.html","app/scripts/ng_js_att_tpls/tagBadges/tagBadges.html","app/scripts/ng_js_att_tpls/toggle/demoToggle.html","app/scripts/ng_js_att_tpls/tooltip/tooltip-popup.html","app/scripts/ng_js_att_tpls/typeAhead/typeAhead.html","app/scripts/ng_js_att_tpls/userMessages/attTableMessage.html","app/scripts/ng_js_att_tpls/userMessages/attUserMessage.html","app/scripts/ng_js_att_tpls/verticalSteptracker/vertical-step-tracker.html","app/scripts/ng_js_att_tpls/videoControls/photoControls.html","app/scripts/ng_js_att_tpls/videoControls/videoControls.html"]);
-angular.module('att.abs.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)
- };
- }
- };
-}])
-
-.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;
-}]);
-
-/*!
- * 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 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('att.abs.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(event) {
- $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;
-});
-'use strict';
-angular.module('att.abs.accordion', ['att.abs.position','att.abs.transition'])
-.constant('accordionConfig', {
- closeOthers: false
-})
-
-.controller('AccordionController',['$scope', '$attrs', 'accordionConfig', '$log',
- function($scope, $attrs, accordionConfig, $log) {
- // This array keeps track of the accordion groups
- this.groups = [];
- this.index = -1;
-
- // Keep reference to user's scope to properly assign `is-open`
- this.scope = $scope;
- $scope.forceExpand=false;
- // Ensure that all the groups in this accordion are closed, unless close-others explicitly says not to
- this.closeOthers = function(openGroup) {
- var closeOthers = angular.isDefined($attrs.closeOthers) ? $scope.$eval($attrs.closeOthers) : accordionConfig.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.expandAll = function() {
- $scope.forceExpand=true;
- angular.forEach(this.groups, function(group) {
- group.isOpen = true;
- });
- };
-
- this.collapseAll = function() {
- angular.forEach(this.groups, function(group) {
- group.isOpen = false;
- });
- };
- /**
- *
- * function focus
- * @param focusGroup
- */
- this.focus = function(focusGroup) {
- var self = this;
- $log.log("entering focus");
- angular.forEach(this.groups, function(group, index) {
- if (group !== focusGroup) {
- group.focused = false;
- } else {
- self.index = index;
- group.focused = true;
- }
- });
- };
- /**
- *
- * @param blurGroup
- */
- this.blur = function(blurGroup) {
- blurGroup.focused = false;
- this.index = -1;
- $log.log("accordion.blur()", blurGroup);
- };
- /**
- *
- * @param group - the group in current focus
- * @param down - cycling down
- */
- this.cycle = function(group, down, noRecycle) {
- if (!down) {
- if (this.index <= 0 && !noRecycle) {
- this.index = this.groups.length - 1;
- } else {
- this.index--;
- }
- } else {
-
- /*if (this.index === (this.groups.length - 1) && !noRecycle) {
- this.index = 0;
- } else if (this.index === (this.groups.length - 1) && noRecycle) {
- this.index = 0;
- return;
- } else {
- this.index++;
- } */
- if (this.index === (this.groups.length - 1))
- {
- if(noRecycle){
- this.index = 0;
- group.focused = false;
- $scope.$apply();
- return;
- }
- else
- {
- this.index = 0;
- }
- } else {
- this.index++;
- }
-
-
- }
- group.focused = false;
- this.groups[this.index].focused = true;
- $log.log("accordion.cycle()", group, down);
- $log.log("group unfocused", group);
- $log.log("group focused", this.groups[this.index]);
- $scope.$apply();
- };
-
- // This is called from the accordion-group directive to add itself to the accordion
- this.addGroup = function(groupScope) {
- var that = this;
- groupScope.index = this.groups.length;
- groupScope.focused = false;
- this.groups.push(groupScope);
-
- groupScope.$on('$destroy', function(event) {
- that.removeGroup(groupScope);
- });
- };
-
- // This is called from the accordion-group directive when to remove itself
- this.removeGroup = function(group) {
- var index = this.groups.indexOf(group);
- if (index !== -1) {
- this.groups.splice(this.groups.indexOf(group), 1);
- }
- };
-
-}])
-
-// The accordion directive simply sets up the directive controller
-// and adds an accordion CSS class to itself element.
-.directive('accordion', function() {
- return {
- restrict: 'EA',
- controller: 'AccordionController',
- transclude: true,
- replace: false,
- scope: {
- cClass: '@css',
- expandAll:"=?",
- collapseAll:"=?"
- },
- template: '<div class="{{cClass}}" ng-transclude></div>',
- link:function(scope,elem,attribute,ctrl) {
-
- scope.$watch("expandAll", function(value) {
- if (value===true) {
- ctrl.expandAll();
- scope.expandAll=false;
- }
- });
- scope.$watch("collapseAll", function(value) {
- if (value===true) {
- ctrl.collapseAll();
- scope.collapseAll = false;
- }
- });
- }
- };
-})
-
-// The accordion-group directive indicates a block of html that will expand and collapse in an accordion
-.directive('accordionGroup', ['$parse', '$transition', '$scrollTo', '$timeout', '$log', '$position', '$window', function($parse, $transition, $scrollTo, $timeout, $log, $position, $window) {
- return {
- require: ['^accordion', 'accordionGroup'], // We need this directive to be inside an accordion
- restrict: 'EA',
- transclude: true, // It transcludes the contents of the directive into the template
- replace: true, // The element containing the directive will be replaced with the template
- templateUrl:'app/scripts/ng_js_att_tpls/accordion/accordion.html',
- //templateUrl:'app/scripts/ng_js_att_tpls/accordion/accordion_alt.html',
-
- scope: {
- heading: '@',
- isOpen: '=?'
- }, // Create an isolated scope and interpolate the heading attribute onto this scope
- controller:['$scope', function($scope)
- {
- $scope.showico = true;
- this.setHeading = function(element)
- {
- this.heading = element;
- $scope.showico = false;
- };
- this.isIsOpen = function()
- {
- return $scope.isOpen;
- };
- }],
- link: function(scope, element, attrs, ctrl) {
- var accordionCtrl = ctrl[0];
- var accordionGroupCtrl = ctrl[1];
- var keys = {tab: 9, enter: 13, esc: 27, space: 32, pageup: 33, pagedown: 34, end: 35, home: 36, left: 37, up: 38, right: 39, down: 40};
-
- //not a fix
- var tab = element.children().eq(0);
- var panel = element.children().eq(1);
-
- var handleKeydown = function(ev) {
- $log.log("Enter handleKeydown on: ", ev);
- var boolFlag = true;
- switch (ev.keyCode)
- {
- case keys.enter:
- ev.preventDefault();
- scope.toggle();
- scope.$apply();
- break;
- //return true;
- case keys.up:
- case keys.left:
- ev.preventDefault();
- $log.log("cycle up");
- accordionCtrl.cycle(scope, false);
- break;
- //return true;
- case keys.down:
- case keys.right:
- ev.preventDefault();
- $log.log("cycle down");
- accordionCtrl.cycle(scope, true);
- break;
- //return true;
- case keys.tab:
-// if(ev.shiftKey === true)
-// {
-// $log.log("shift with Tab");
-// accordionCtrl.cycle(scope, false);
-// }
-// else
-// {
-// accordionCtrl.cycle(scope, true, true);
-// }
-// break;
- default:
- boolFlag = false;
- break;
- //return false;
- }
- ev.stopPropagation();
- return boolFlag;
- };
-
- var swallowKeypress = function(e) {
- $log.log("keypress", e);
- if (e.altKey) {
- // do nothing
- return true;
- }
- var boolFlag = true;
- switch (e.keyCode)
- {
- case keys.enter:
- case keys.space:
- case keys.left:
- case keys.up:
- case keys.right:
- case keys.down:
- case keys.home:
- case keys.end:
- e.stopPropagation();
- boolFlag = false;
- break;
- //return false;
- case keys.pageup:
- case keys.pagedown:
- // The tab keypress handler must consume pageup and pagedown
- // keypresses to prevent Firefox from switching tabs
- // on ctrl+pageup and ctrl+pagedown
- if (!e.ctrlKey)
- {
- boolFlag = true;
- break;
- //return true;
- }
- e.stopPropagation();
- boolFlag = false;
- break;
- //return false;
- default:
- break;
- }
- return boolFlag;
- //return true;
- };
-
- if(angular.isUndefined(scope.isOpen)) {
- scope.isOpen = false;
- }
-
- panel.bind("keypress", swallowKeypress);
- tab.bind("keydown", handleKeydown);
-
- tab.bind("focus", function(ev) {
- tab.attr("tabindex", "0");
- });
-
- tab.bind("blur", function(ev) {
- if (scope.index !== 0) {
- tab.attr("tabindex", "-1");
- }
- });
-
- accordionCtrl.addGroup(scope);
-
- if (scope.index === 0) {
- tab.attr("tabindex", "0");
- }
-
- accordionGroupCtrl.toggle = scope.toggle = function() {
- scope.isOpen = !scope.isOpen;
- accordionCtrl.focus(scope);
- if (scope.isOpen === true) {
- if (navigator.userAgent.match(/MSIE 8/) === null) {
- // $scrollTo(0, $position.offset(element).top, 0.5);
- }
- }
- return scope.isOpen;
- };
-
- scope.$watch('isOpen', function(value) {
- if (value) {
- accordionCtrl.closeOthers(scope);
- }
- });
-
- scope.$watch("focused", function(value) {
- if (!!value) {
- $timeout(function() {
- tab.attr("tabindex", "0");
- tab[0].focus();
- }, 0);
- }
- });
- }
- };
-}])
-// Use accordion-heading below an accordion-group to provide a heading containing HTML
-// <accordion-group>
-// <accordion-heading>Heading containing HTML - <img src="..."></accordion-heading>
-// </accordion-group>
-//accordionToggle
-.directive('accordionToggle',function(){
- return{
- restrict: 'EA',
- require: '^accordionGroup',
- scope:{
- expandIcon:'@',
- collapseIcon:'@'
- },
- link: function(scope, element, attr, accordionCtrl)
- {
-
- var setIcon = function(isOpen){
- if(scope.expandIcon && scope.collapseIcon)
- {
- if(isOpen){
- element.removeClass(scope.expandIcon);
- element.addClass(scope.collapseIcon);
- }
- else{
- element.removeClass(scope.collapseIcon);
- element.addClass(scope.expandIcon);
- }
- }
- };
-
- element.bind('click', function()
- {
- accordionCtrl.toggle();
- scope.$apply();
- });
-
- scope.$watch(function(){
- return accordionCtrl.isIsOpen();
- }, function(value){
- setIcon(value);
- });
- }
- };
-})
-
-.directive('accordionHeading', function() {
- return {
- restrict: 'EA',
- transclude: true, // Grab the contents to be used as the heading
- template: '', // In effect remove this element!
- //replace: true,
- require: '^accordionGroup',
- compile: function(element, attr, transclude) {
- return function link(scope, element, attr, accordionGroupCtrl) {
- // Pass the heading to the accordion-group controller
- // so that it can be transcluded into the right place in the template
- // [The second parameter to transclude causes the elements to be cloned so that they work in ng-repeat]
- transclude(scope, function(clone) {
- element.append(clone);
- accordionGroupCtrl.setHeading(element);
- });
- };
- }
-
-// compile: function(element, attr, transclude) {
-// return function link(scope, element, attr, accordionGroupCtrl) {
-// // Pass the heading to the accordion-group controller
-// // so that it can be transcluded into the right place in the template
-// // [The second parameter to transclude causes the elements to be cloned so that they work in ng-repeat]
-// accordionGroupCtrl.setHeading(transclude(scope, function() {
-// }));
-// };
-// }
- };
-})
-
-// Use in the accordion-group template to indicate where you want the heading to be transcluded
-// You must provide the property on the accordion-group controller that will hold the transcluded element
-// <div class="accordion-group">
-// <div class="accordion-heading" ><a ... accordion-transclude="heading">...</a></div>
-// ...
-// </div>
-.directive('accordionTransclude', function() {
- return {
- require: '^accordionGroup',
- link: function(scope, element, attr, controller) {
- scope.$watch(function() {
- return controller[attr.accordionTransclude];
- }, function(heading) {
- if (heading) {
- element.find("span").eq(0).prepend(heading);
- }
- });
- }
- };
-})
-
-.directive('attGoTop',['$scrollTo', function($scrollTo){
- return {
- restrict: 'A',
- transclude: false,
- link: function (scope, elem, attrs)
- {
- elem.bind('click', function()
- {
- $scrollTo(0,attrs["attGoTop"]);
- });
- }
-};
-}])
-
-.directive('attGoTo',['$anchorScroll','$location', function($anchorScroll, $location){
- return {
- restrict: 'A',
- transclude: false,
- link: function (scope, elem, attrs)
- {
- elem.bind('click', function()
- {
- var newHash = attrs["attGoTo"];
- if ($location.hash() !== newHash)
- {
- $location.hash(attrs["attGoTo"]);
- }
- else
- {
- $anchorScroll();
- }
- });
- }
- };
-}])
-
-.directive('freeStanding',function(){
- return {
- restrict: 'EA',
- transclude: true,
- replace:true,
- scope:true,
- template: "<div><span class='att-accordion__freestanding' ng-show='showAccordion'></span>\n" +
- "<div class='section-toggle'>\n" +
- "<button class='section-toggle__button' ng-click='fsToggle()'>\n" +
- " {{btnText}}<i style='font-size:0.875rem' ng-class='{\"icon-chevron-up\": showAccordion,\"icon-chevron-down\": !showAccordion, }'></i> \n" +
- "</button>\n" +
- "</div></div>",
- compile: function(element, attr, transclude)
- {
- return function link(scope, elem, attrs)
- {
- scope.content = "";
- transclude(scope, function(clone)
- {
- elem.find("span").append(clone);
- });
- scope.showAccordion = false;
- scope.btnText = scope.showAccordion? attrs.hideMsg:attrs.showMsg;
- scope.fsToggle = function()
- {
- scope.showAccordion = !scope.showAccordion;
- scope.btnText = scope.showAccordion? attrs.hideMsg:attrs.showMsg;
- }
- };
- }
- };
-})
-
-.directive('expanders',function(){
- return{
- restrict: 'EA',
- replace:true,
- transclude:true,
- template:"<div ng-transclude></div>",
- controller: ['$scope',function($scope){
- var bodyScope = null;
- this.setScope = function(scope){
- bodyScope = scope;
- };
- this.toggle = function(){
- bodyScope.isOpen = !bodyScope.isOpen;
- return bodyScope.isOpen;
- };
- }],
-
- link: function(scope, element, attrs, accordionCtrl)
- {
- scope.isOpen = false;
- element.bind('click', function()
- {
- scope.isOpen = !scope.isOpen;
- });
- }
- };
-})
-
-.directive('expanderHeading',function(){
-
- return{
- require:"^expanders",
- restrict: 'EA',
- replace:true,
- transclude:true,
- scope:true,
- template: "<div style='padding:10px !important' ng-transclude></div>"
- };
-
-})
-
-.directive('expanderBody',function(){
-
- return{
- restrict: 'EA',
- require:"^expanders",
- replace:true,
- transclude:true,
- scope:{},
- template: "<div collapse='!isOpen'><div ng-transclude></div></div>",
- link:function(scope, elem, attr, myCtrl){
- scope.isOpen = false;
- myCtrl.setScope(scope);
- }
- };
-})
-
-.directive('expanderToggle',function(){
-
- return{
- restrict: 'EA',
- require:"^expanders",
- scope:{
- expandIcon:'@',
- collapseIcon:'@'
- },
- link: function(scope, element, attr, myCtrl)
- {
- var isOpen=false;
- var setIcon = function(){
- if(scope.expandIcon && scope.collapseIcon)
- {
- if(isOpen) {
- element.removeClass(scope.expandIcon);
- element.addClass(scope.collapseIcon);
- }
- else {
- element.removeClass(scope.collapseIcon);
- element.addClass(scope.expandIcon);
- }
- }
- };
-
- element.bind("keydown", function(e){
- if(e.keyCode === 13)
- {
- scope.toggleit();
- }
- });
-
- element.bind('click', function()
- {
- scope.toggleit();
- });
-
- scope.toggleit = function()
- {
- isOpen = myCtrl.toggle();
- setIcon();
- scope.$apply();
- };
- setIcon();
- }
- };
-})
-
-.directive('collapse', ['$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('collapse');
- 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('collapse');
- };
-
- return {
- link: function(scope, element, attrs) {
-
- // alert(element.css("marginTop"));
- 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');
- }
- }
- }
- });
-
- scope.$watch(attrs.collapse, 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() {
- //element.show();
- 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({'height':'0'}).then(function() {
- doTransition(angular.extend({height:0}, props.closed)).then(function() {
- //element.hide();
- scope.postTransition = false;
- });
- }
- };
- }
- };
-}])
-.directive('attAccord', function(){
- return {
- restrict: 'EA',
- transclude: true,
- replace:true,
- scope: {},
- controller: 'AttAccordCtrl',
- templateUrl: 'app/scripts/ng_js_att_tpls/accordion/attAccordHeader.html',
- link: function(scope,element,attr,ctrls){
- }
- }
-})
-.controller('AttAccordCtrl', ['$scope', function($scope){
-
- this.type='attAccord';
- this.headerCtrl;
- this.bodyCtrl;
- var isOpen = true;
-
- this.toggleBody = function(){
- if(isOpen)
- this.expandBody();
- else
- this.collapseBody();
-
- isOpen = !isOpen;
- };
-
- this.expandBody = function(){
- this.bodyCtrl.expand();
- };
-
- this.collapseBody = function(){
- this.bodyCtrl.collapse();
- }
-
-}])
-.controller('AttAccordHeaderCtrl',['$scope', function($scope){
- this.type='header';
-}])
-.directive('attAccordHeader', function(){
- return {
- restrict: 'EA',
- transclude: true,
- replace:true,
- require:['^attAccord','attAccordHeader'],
- controller: 'AttAccordHeaderCtrl',
- templateUrl: 'app/scripts/ng_js_att_tpls/accordion/attAccordHeader.html',
- link: function(scope,element,attr, ctrls){
- var attAccordCtrl = ctrls[0];
- var attAccordHeaderCtrl = ctrls[1];
- attAccordCtrl.headerCtrl = attAccordHeaderCtrl;
-
- scope.clickFunc = function(){
- attAccordCtrl.toggleBody();
- };
-
- }
- }
-})
-.controller('AttAccordBodyCtrl', ['$scope', function($scope){
- this.type='body';
-
- this.expand = function(){
- $scope.expand();
- };
-
- this.collapse = function(){
- $scope.collapse();
- };
-
-}])
-.directive('attAccordBody', ['$timeout', '$height',function($timeout,$height){
- return {
- restrict: 'EA',
- transclude: true,
- replace:true,
- require: ['^attAccord','attAccordBody'],
- controller: 'AttAccordBodyCtrl',
- templateUrl: 'app/scripts/ng_js_att_tpls/accordion/attAccordBody.html',
- link: function(scope,element,attr,ctrls){
-
- var attAccordCtrl = ctrls[0];
- var attAccordBodyCtrl = ctrls[1];
- attAccordCtrl.bodyCtrl = attAccordBodyCtrl;
-
- var originalHeight;
- $timeout(function(){
- originalHeight = element[0].offsetHeight;
- $height(element,0,0,0);
- });
-
- scope.expand = function(){
- $height(element,0.05,originalHeight,1);
- };
-
- scope.collapse = function(){
- $height(element,0.25,0,0);
- };
-
- }
- }
-}])
-angular.module('att.abs.alert', [])
-.directive('attAlert', [function()
-{
- return {
- restrict: 'EA',
- replace : true,
- transclude : true,
- scope: {
- alertType : "@type",
- showTop : "@topPos",
- showAlert : "="
- },
- templateUrl : 'app/scripts/ng_js_att_tpls/alert/alert.html',
- link: function(scope, elem, attr, ctrl)
- {
- if(scope.showTop === 'true'){
- scope.cssStyle = {'top':'50px'};
- }
- else{
- scope.cssStyle = {'top':'0px'};
- }
- scope.close = function(){
- scope.showAlert = false;
- };
- }
- };
-}]);
-
-angular.module('att.abs.breadCrumbs', [])
- .constant("classConstant",{
- "defaultClass" : "breadcrumbs__link",
- "activeClass": "breadcrumbs__link--active"
- })
-.directive('attCrumb', ['classConstant', function(classConstant)
-{
- return {
- restrict: 'A',
- replace : true,
- transclude : true,
- scope: {},
- link: function(scope, elem, attr, ctrl)
- {
- elem.addClass(classConstant.defaultClass);
- if(attr.attCrumb === 'active'){
- elem.addClass(classConstant.activeClass);
- }
- if(!elem.hasClass('last')){
- elem.append('<i class="breadcrumbs__item"></i>');
- }
- }
- };
-}
-]);
-
-angular.module('att.abs.utilities', [])
-
-.filter('highlight', 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;
- };
-})
-
-.filter('attLimitTo', function() {
- return function(actualArray, _limit, _begin) {
- var finalArray = [];
- var limit = _limit;
- var begin = _begin;
- if(isNaN(begin)) {
- begin = 0;
- }
- if(actualArray && !isNaN(limit)) {
- // finalArray = actualArray.slice(begin, begin+limit);
- //slice is not a function. need to find out why 06/17/2015
- finalArray = actualArray;
- } else {
- finalArray = actualArray;
- }
- return finalArray;
- }
-})
-
-.directive('attInputDeny', [function() {
- return {
- restrict: 'A',
- require: 'ngModel',
- link: function (scope, elem, attr, ctrl) {
- var regexExpression = null;
- attr.$observe('attInputDeny', 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('attAccessibilityClick', [function() {
- return {
- restrict: 'A',
- link: function (scope, elem, attr, ctrl) {
- var keyCode = [];
- attr.$observe('attAccessibilityClick', function (value) {
- if (value) {
- keyCode = value.split(',');
- }
- });
- elem.bind('keydown', function (ev) {
- if(keyCode.length > 0 && ((ev.charCode && keyCode.indexOf(ev.charCode.toString()) > -1) || (ev.keyCode && keyCode.indexOf(ev.keyCode.toString()) > -1) || (ev.which && keyCode.indexOf(ev.which.toString()) > -1))) {
- elem[0].click();
- ev.preventDefault();
- }
- });
- }
- };
-}])
-
-.directive('attElementFocus', [function() {
- return {
- restrict: 'A',
- link: function(scope, elem, attr, ctrl) {
- scope.$watch(attr.attElementFocus, function (value) {
- if (value === true) {
- elem[0].focus();
- }
- });
- }
- };
-}])
-.factory('events', function(){
- var s = function(e){
- if(e.stopPropagation) {
- e.stopPropagation();
- } else {
- e.returnValue = false;
- }
- };
-
- return {
- stopPropagation: s
- };
-})
-.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);
- }
- });
- });
- };
-
- return {
- click: _click
- };
-}]);
-
-(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;
- };
-
- var pad = function (actualString, width, character, direction) { // direction: true for left and false for right
- actualString = actualString || '';
- width = (!isNaN(width) && width) || 0;
- character = character || '';
- direction = (direction !== undefined && direction) || true;
-
- 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;
- };
- }
-})();
-
-angular.module('att.abs.buttons', ['att.abs.position', 'att.abs.utilities'])
-.constant('btnConfig', {
- btnClass: 'button',
- btnPrimaryClass: 'button--primary',
- btnSecondaryClass: 'button--secondary',
- btnDisabledClass: 'button--inactive',
- btnSmallClass: 'button--small'
-})
-.directive('attButton', ['btnConfig', function(btnConfig) {
- return {
- restrict: 'A',
- link: function (scope, element, attrs, ctrl) {
- element.addClass(btnConfig.btnClass);
- if (attrs.size === 'small') {
- element.addClass(btnConfig.btnSmallClass);
- }
- attrs.$observe('btnType', function(value) {
- if (value === 'primary') {
- element.addClass(btnConfig.btnPrimaryClass);
- element.removeClass(btnConfig.btnSecondaryClass);
- element.removeClass(btnConfig.btnDisabledClass);
- element.removeAttr('disabled');
- } else if (value === 'secondary') {
- element.addClass(btnConfig.btnSecondaryClass);
- element.removeClass(btnConfig.btnPrimaryClass);
- element.removeClass(btnConfig.btnDisabledClass);
- element.removeAttr('disabled');
- } else if (value === 'disabled') {
- element.addClass(btnConfig.btnDisabledClass);
- element.removeClass(btnConfig.btnPrimaryClass);
- element.removeClass(btnConfig.btnSecondaryClass);
- element.attr('disabled', 'disabled');
- }
- });
- }
- };
-}])
-.directive('attButtonLoader', [function () {
- return {
- restrict: 'A',
- replace: false,
- scope: {
- size: '@'
- },
- template: '<div ng-class="{\'button--loading\': size === \'large\',\'button--loading__small\': size === \'small\'}"><i></i><i></i><i></i></div>',
- link: function (scope, element, attrs, ctrl) {
- element.addClass('button button--inactive');
- }
- };
-}]).directive('attButtonHero', [function () {
- return {
- restrict: 'A',
- replace: false,
- transclude: true,
- scope: {
- icon: '@'
- },
- template: '<div class="button--hero__inner"><span ng-transclude></span> <i ng-class="{\'icon-arrow-right\': icon === \'arrow-right\',\'icon-cart\': icon === \'cart\'}"></i></div>',
- link: function (scope, element, attrs, ctrl) {
- element.addClass('button button--hero');
- element.attr("tabindex", "0");
- }
- };
-}]).directive('attBtnDropdown',['$document', '$isElement', '$documentBind', function($document, $isElement, $documentBind){
- return {
- restrict: 'EA',
- transclude:true,
- scope:{
- type: "@dropdowntype"
- },
- replace: true,
- template: '<div class="att-btn-dropdown"> <div class="buttons-dropdown--small btn-group" ng-class="{\'open\': isOpen}" ng-click="toggleDropdown($event)"> <button class="button button--secondary button--small buttons-dropdown__drop dropdown-toggle ng-isolate-scope" ng-if="type==\'dots\'"> <div class="circle" ng-click="toggleDropdownCircle($event)"></div> <div class="circle" ng-click="toggleDropdownCircle($event)"></div> <div class="circle" ng-click="toggleDropdownCircle($event)"></div> </button> <button class="button button--secondary button--small buttons-dropdown__drop dropdown-toggle ng-isolate-scope actions-title" ng-if="type==\'actions\'"> Actions </button> <ul ng-class="{\'dropdown-menu dots-dropdwn\':type==\'dots\', \'dropdown-menu actions-dropdwn\':type==\'actions\'}" role="menu"> <div ng-transclude> </div> </ul> </div></div>',
- link: function(scope,element,attrs){
-
- scope.isOpen = false;
-
- var toggle = scope.toggle = function (show) {
- if(show === true || show === false) {
- scope.isOpen = show;
- } else {
- scope.isOpen = !scope.isOpen;
- }
- };
-
- scope.toggleDropdownCircle = function($event){
- toggle(false);
- };
-
- scope.toggleDropdown = function($event){
- toggle();
- };
-
- var outsideClick = function (e) {
- var isElement = $isElement(angular.element(e.target), element, $document);
- if(!isElement) {
- toggle(false);
- scope.$apply();
- }
- };
-
- $documentBind.click('isOpen', outsideClick, scope);
- }
- };
-}]);
-
-angular.module('att.abs.checkbox', [])
-.constant("attCheckboxConfig", {
- activeClass : "att-checkbox--on",
- disabledClass : "att-checkbox--disabled"
-})
-.directive('checkboxLimit', ['$compile', "attCheckboxConfig", function ($compile, attCheckboxConfig) {
-return {
- scope: {
- checkboxLimit:'=',
- selectLimit:'@?',
- maxSelected:'&?'
- },
- restrict: 'A',
- require:'checkboxLimit',
- controller: ['$scope', '$element', '$attrs', function($scope, $element, $attrs)
- {
- $scope.limit=true;
- this.getMaxLimits=function(){
- return $scope.limit;
- };
- this.setMaxLimits=function(value){
- $scope.limit=value;
- };
- this.maxCheckboxSelected=function(){
- $scope.maxSelected();
- };
- }],
- link: function (scope, element, attribute, ctrl) {
- scope.$watch('checkboxLimit', function()
- {
- var countTrue = 0;
- for (var keys in scope.checkboxLimit) {
- if (scope.checkboxLimit.hasOwnProperty(keys)) {
- if (scope.checkboxLimit[keys] === true) {
- countTrue = countTrue + 1;
- }
- }
- };
- if(countTrue>=parseInt(scope.selectLimit)){
- ctrl.setMaxLimits(false);
- }
- else{
- ctrl.setMaxLimits(true);
- }
- }, true);
- }
-};
-}])
-.directive('attCheckbox', ['$compile', "attCheckboxConfig", function ($compile, attCheckboxConfig) {
- return {
- scope: {},
- restrict: 'A',
- require: ['ngModel','^?checkboxLimit'],
- link: function (scope, element, attribute, ctrl) {
- var ngCtrl = ctrl[0];
- var checkboxLimitCtrl = ctrl[1];
- var parentDiv = $compile('<div tabindex="0" role="checkbox" att-accessibility-click="13,32" ng-click="updateModel($event)" class="att-checkbox"></div>')(scope);
- element.css({display:'none'});
- element.wrap(parentDiv);
- element.parent().append('<div class="att-checkbox__indicator"></div>');
- element.parent().attr("title", attribute.title);
- element.parent().attr("id", attribute.id);
- element.removeAttr("id");
- //model -> UI
- ngCtrl.$render = function () {
- var selected = ngCtrl.$modelValue ? true : false;
- element.parent().toggleClass(attCheckboxConfig.activeClass, selected);
- element.parent().attr("aria-checked", selected);
- };
-
- //ui->model
- scope.updateModel = function (evt) {
- if (!scope.disabled) {
- ngCtrl.$setViewValue(element.parent().hasClass(attCheckboxConfig.activeClass) ? false : true);
- if(checkboxLimitCtrl && !(checkboxLimitCtrl.getMaxLimits())){
- if(ngCtrl.$modelValue===false){
- ngCtrl.$render();
- }
- else{
- checkboxLimitCtrl.maxCheckboxSelected();
- ngCtrl.$setViewValue(element.parent().hasClass(attCheckboxConfig.activeClass) ? true : false);
- }
- }
- else{
- ngCtrl.$render();
- }
- }
- evt.preventDefault();
- };
-
- attribute.$observe('disabled', function(val) {
- scope.disabled = (val === true || val === "disabled" || val === "true");
- element.parent().toggleClass(attCheckboxConfig.disabledClass, scope.disabled);
- element.parent().attr("tabindex", scope.disabled ? "-1" : "0");
- });
- }
- };
-}])
-.directive('checkboxGroup', ['$compile',function($compile) {
- return {
- scope:
- {
- checkboxGroup: "=",
- checkboxGroupValue: "=?"
- },
- restrict: 'A',
- link: function(scope, element, attribute, ctrl)
- {
- scope.checkboxState = 'none';
- scope.checkboxGroupValue="indeterminate";
- element.css({display:'none'});
- element.wrap($compile('<div tabindex="0" role="checkbox" att-accessibility-click="13,32" ng-click="updateModel($event)" class="att-checkbox"></div>')(scope));
- element.parent().append('<div class="att-checkbox__indicator"></div>');
- element.parent().attr("title", attribute.title);
- scope.$watch('checkboxState', function(val) {
- if (val === 'all') {
- element.parent().addClass('att-checkbox--on');
- element.parent().removeClass('att-checkbox--indeterminate');
- element.parent().attr("aria-checked", true);
- }
- else if (val === 'none') {
- element.parent().removeClass('att-checkbox--on');
- element.parent().removeClass('att-checkbox--indeterminate');
- element.parent().attr("aria-checked", false);
- }
- else if (val === 'indeterminate') {
- element.parent().removeClass('att-checkbox--on');
- element.parent().addClass('att-checkbox--indeterminate');
- element.parent().attr("aria-checked", true);
- }
- });
-
- scope.updateModel = function(evt)
- {
- if (element.parent().hasClass('att-checkbox--on')) {
- element.parent().removeClass('att-checkbox--on');
- for (var keys in scope.checkboxGroup) {
- if (scope.checkboxGroup.hasOwnProperty(keys)) {
- scope.checkboxGroup[keys] = false;
- }
- };
- }
- else {
- element.parent().addClass('att-checkbox--on');
- for (var keys in scope.checkboxGroup) {
- if (scope.checkboxGroup.hasOwnProperty(keys)) {
- scope.checkboxGroup[keys] = true;
- }
- };
- }
- evt.preventDefault();
- };
- scope.$watch('checkboxGroupValue', function (value) {
- if (value === false) {
- element.parent().removeClass('att-checkbox--on');
- for (var keys in scope.checkboxGroup) {
- if (scope.checkboxGroup.hasOwnProperty(keys)) {
- scope.checkboxGroup[keys] = false;
- }
- };
- }
- else if (value === true){
- element.parent().addClass('att-checkbox--on');
- for (var keys in scope.checkboxGroup) {
- if (scope.checkboxGroup.hasOwnProperty(keys)) {
- scope.checkboxGroup[keys] = true;
- }
- };
- }
- });
- scope.$watch('checkboxGroup', function()
- {
- var countTrue = 0;
- var countFalse = 0;
- var count = 0;
- for (var keys in scope.checkboxGroup) {
- if (scope.checkboxGroup.hasOwnProperty(keys)) {
- count = count + 1;
- if (scope.checkboxGroup[keys] === true) {
- countTrue = countTrue + 1;
- }
- else if (scope.checkboxGroup[keys] === false) {
- countFalse = countFalse + 1;
- }
- }
- };
- if (count === countTrue) {
- scope.checkboxState = "all";
- scope.checkboxGroupValue=true;
- }
- else if (count === countFalse) {
- scope.checkboxState = "none";
- scope.checkboxGroupValue=false;
- }
- else {
- scope.checkboxState = "indeterminate";
- scope.checkboxGroupValue="indeterminate";
- }
- }, true);
- }
- };
-}]);
-
-angular.module('att.abs.colorselector', [])
- .directive('colorSelectorWrapper', [function() {
- return {
- scope: {
- selected: '=',
- iconColor: '@'
- },
- restrict: 'AE',
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/colorselector/colorselector.html',
- link: function(scope, element, attr) {
- scope.applycolor = {'background-color': scope.iconColor};
- scope.selectedcolor = function(iconColor) {
- scope.selected = iconColor;
- };
- }
- };
- }])
- .directive('colorSelector', ['$compile', function($compile) {
- return{
- restrict: 'A',
- scope: {
- colorSelector: '@',
- ngModel: '='
- },
- link: function(scope, element, attr) {
- element.removeAttr('color-selector');
- var wrapcont = angular.element('<color-selector-wrapper selected="ngModel" icon-color="{{colorSelector}}">' + element.prop('outerHTML') + '</color-selector-wrapper>');
- var newWrapcont = $compile(wrapcont)(scope);
- element.replaceWith(newWrapcont);
- }
- };
- }]);
-angular.module('att.abs.datepicker', ['att.abs.position', 'att.abs.utilities'])
-
-.constant('datepickerConfig', {
- dateFormat: 'MM/dd/yyyy',
- dayFormat: 'd',
- monthFormat: 'MMMM',
- yearFormat: 'yyyy',
- dayHeaderFormat: 'EEEE',
- dayTitleFormat: 'MMMM yyyy',
- disableWeekend: false,
- disableSunday: false,
- startingDay: 0,
- minDate: null,
- maxDate: null,
- mode: 0,
- dateFilter: {
- defaultText: 'Select from list'
- },
- datepickerEvalAttributes: ['dateFormat', 'dayFormat', 'monthFormat', 'yearFormat', 'dayHeaderFormat', 'dayTitleFormat', 'disableWeekend', 'disableSunday', 'startingDay', 'mode'],
- datepickerWatchAttributes: ['min', 'max']
-})
-
-.factory('datepickerService', ['datepickerConfig', 'dateFilter', function (datepickerConfig, dateFilter) {
- var setAttributes = function (attr, elem) {
- if (angular.isDefined(attr) && attr !== null && angular.isDefined(elem) && elem !== null) {
- var attributes = datepickerConfig.datepickerEvalAttributes.concat(datepickerConfig.datepickerWatchAttributes);
- 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 = datepickerConfig.datepickerEvalAttributes;
- var watchAttributes = datepickerConfig.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);
- }
- }
- }
- };
-
- var validateDateString = function (dateString, dateFormat) {
- if (dateString && dateFormat) {
- var delimiter;
- if (dateFormat.indexOf('/') !== -1) {
- delimiter = '/';
- } else if (dateFormat.indexOf('-') !== -1) {
- delimiter = '-';
- } else if (dateFormat.indexOf('.') !== -1) {
- delimiter = '.';
- }
-
- var dateStringArray = dateString.split(delimiter);
- var dateFormatArray = dateFormat.split(delimiter);
- if (dateStringArray.length !== dateFormatArray.length) {
- return false;
- }
-
- for (var i = 0; i < dateStringArray.length; i++) {
- dateStringArray[i] = dateStringArray[i].lPad(dateFormatArray[i].length, '0');
- }
- var intermediateDateString = dateStringArray.join(delimiter);
-
- var actualDateString = dateFilter(new Date(intermediateDateString), dateFormat);
- if (intermediateDateString === actualDateString) {
- return true;
- } else {
- return false;
- }
- }
- };
-
- return {
- setAttributes: setAttributes,
- bindScope: bindScope,
- validateDateString: validateDateString
- };
-}])
-
-.controller('DatepickerController', ['$scope', '$attrs', 'dateFilter', 'datepickerConfig', function($scope, $attrs, dateFilter, 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)
- },
- startingDay = getValue($attrs.startingDay, dtConfig.startingDay);
- $scope.mode = getValue($attrs.mode, dtConfig.mode);
-
- $scope.minDate = dtConfig.minDate ? $scope.resetTime(dtConfig.minDate) : null;
- $scope.maxDate = dtConfig.maxDate ? $scope.resetTime(dtConfig.maxDate) : null;
-
- 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;
- }
-
- 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 isToDate(dt) {
- if (dt && angular.isDate($scope.fromDate) && angular.isDate($scope.currentDate) && compare(dt, $scope.currentDate) === 0) {
- return true;
- }
- return false;
- }
-
- function isDateRange(dt) {
- if (dt && angular.isDate($scope.fromDate) && angular.isDate($scope.currentDate) && (compare(dt, $scope.fromDate) >= 0) && (compare(dt, $scope.currentDate) <= 0)) {
- return true;
- }
- return false;
- }
-
- function isWeekend(date) {
- if (dateFilter(date, format.dayHeader) === "Saturday" || dateFilter(date, format.dayHeader) === "Sunday") {
- return true;
- }
- return false;
- }
-
- function isToday(date) {
- if (compare(date, $scope.resetTime(new Date())) === 0) {
- return true;
- }
- return false;
- }
- function isFocused(date) {
- if (date && angular.isDate($scope.focusedDate) && compare(date, $scope.focusedDate) === 0) {
- return true;
- }
- return false;
- }
-
- var isDisabled = this.isDisabled = function(date) {
- 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));
- };
-
- var compare = this.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())) {
- return true;
- }
- else {
- return false;
- }
- }
-
- function isMaxDateAvailable(startDate, endDate) {
- if(($scope.maxDate && $scope.maxDate.getTime() >= startDate.getTime()) && ($scope.maxDate.getTime() <= endDate.getTime())) {
- return true;
- }
- else {
- return false;
- }
- }
-
- function getLabel(label) {
- if (label)
- {
- var labelObj = {
- pre: label.substr(0, 3),
- post: label
- };
- return labelObj;
- }
- return;
- }
-
- function makeDate(date, dayFormat, dayHeaderFormat, isFocused, isSelected, isFromDate, isToDate, isDateRange, isOld, isNew, isDisabled, isToday, isWeekend) {
- return {date: date, label: dateFilter(date, dayFormat), header: dateFilter(date, dayHeaderFormat), focused: !!isFocused, selected: !!isSelected, from: !!isFromDate, to: !!isToDate, dateRange: !!isDateRange, oldMonth: !!isOld, nextMonth: !!isNew, disabled: !!isDisabled, today: !!isToday, weekend: !!isWeekend};
- }
-
- this.modes = [
- {
- name: 'day',
- getVisibleDates: function(date, calendar) {
- 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,
- isFocused(dt),
- isSelected(dt),
- isFromDate(dt),
- isToDate(dt),
- isDateRange(dt),
- (new Date(dt.getFullYear(), dt.getMonth(), 1, 0, 0, 0).getTime() < new Date(year, month, 1, 0, 0, 0).getTime()),
- (new Date(dt.getFullYear(), dt.getMonth(), 1, 0, 0, 0).getTime() > new Date(year, month, 1, 0, 0, 0).getTime()),
- isDisabled(dt),
- isToday(dt),
- isWeekend(dt));
- }
- for (var j = 0; j < 7; j++) {
- labels[j] = getLabel(dateFilter(days[j].date, format.dayHeader));
- }
- if (calendar === 'top') {
- $scope.disablePrevTop = isMinDateAvailable(firstDayOfMonth, lastDayOfMonth);
- $scope.disableNextTop = isMaxDateAvailable(firstDayOfMonth, lastDayOfMonth);
- } else if (calendar === 'bottom') {
- $scope.disablePrevBottom = isMinDateAvailable(firstDayOfMonth, lastDayOfMonth);
- $scope.disableNextBottom = isMaxDateAvailable(firstDayOfMonth, lastDayOfMonth);
- } else {
- $scope.disablePrevTop = $scope.disablePrevBottom = isMinDateAvailable(firstDayOfMonth, lastDayOfMonth);
- $scope.disableNextTop = $scope.disableNextBottom = isMaxDateAvailable(firstDayOfMonth, lastDayOfMonth);
- }
- $scope.disablePrev = $scope.disablePrevTop || $scope.disablePrevBottom;
- $scope.disableNext = $scope.disableNextTop || $scope.disableNextBottom;
- return {objects: days, title: dateFilter(date, format.dayTitle), labels: labels};
- },
- split: 7,
- step: {months: 1}
- },
- {
- name: 'month',
- getVisibleDates: function(date, calendar) {
- var months = new Array(12), labels = [], year = date.getFullYear(), month = date.getMonth();
- for (var i = 0; i < 12; i++) {
- var dt = new Date(year,i,1);
- months[i] = makeDate(dt,
- format.month,
- format.month,
- isFocused(dt),
- isSelected(dt),
- isFromDate(dt),
- isToDate(dt),
- isDateRange(dt),
- false,
- false,
- isDisabled(dt),
- isToday(dt),
- false
- );
- }
- return {objects: months, title: dateFilter(date, format.year), labels: labels};
- },
- split:3,
- step: {years: 1}
- }
- ];
-
-}])
-
-.directive('datepicker', ['$timeout', function ($timeout) {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/datepicker/datepicker.html',
- scope: {
- currentDate: "=?current",
- fromDate: "=?from"
- },
- require: 'datepicker',
- controller: 'DatepickerController',
- link: function(scope, element, attrs, ctrl) {
- var datepickerCtrl = ctrl;
- var selected, calendarSelected = false;
- scope.focusedDate;
-
- scope.resetTime = function(date) {
- 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 dt;
- };
-
- if (attrs.min) {
- scope.$parent.$watch(attrs.min, function(value) {
- scope.minDate = value ? scope.resetTime(value) : null;
- refill();
- });
- }
- if (attrs.max) {
- scope.$parent.$watch(attrs.max, function(value) {
- scope.maxDate = value ? scope.resetTime(value) : null;
- refill();
- });
- }
-
- // 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 selectedCalendar;
- if(scope.mode === 1){
- selected = new Date();
- selectedCalendar = moveMonth(angular.copy(selected), -1);
- } else {
- selectedCalendar = angular.copy(selected);
- }
-
- var currentMode = datepickerCtrl.modes[scope.mode];
- var currentData = currentMode.getVisibleDates(selectedCalendar, 'top');
- scope.currentRows = split(currentData.objects, currentMode.split);
- scope.currentTitle = currentData.title;
- scope.labels = currentData.labels || [];
-
- var nextData = currentMode.getVisibleDates(moveMonth(angular.copy(selectedCalendar), 1), 'bottom');
- scope.nextRows = split(nextData.objects, currentMode.split);
- scope.nextTitle = nextData.title;
- }
- }
-
- scope.select = function(date) {
- calendarSelected = true;
- if(attrs.from) {
- if(!(angular.isDate(scope.fromDate) && angular.isDate(scope.currentDate))) {
- if(angular.isDate(scope.fromDate)) {
- selectCurrentDate(date);
- } else if(!angular.isDate(scope.fromDate)) {
- selectFromDate(date);
- }
- }
- } else {
- selectCurrentDate(date);
- }
- scope.focusedDate = date;
- };
-
- var selectCurrentDate = function(date) {
- var dt = new Date(date.getFullYear(), date.getMonth(), date.getDate());
- scope.currentDate = dt;
- };
-
- var selectFromDate = function(date) {
- var dt = new Date(date.getFullYear(), date.getMonth(), date.getDate());
- scope.fromDate = dt;
- };
-
- var swapDate = function(fromDate, currentDate) {
- selectFromDate(currentDate);
- $timeout(function () {
- calendarSelected = true;
- scope.focusedDate = currentDate;
- selectCurrentDate(fromDate);
- });
- }
- var moveMonth = function(selectedDate, direction) {
- var step = datepickerCtrl.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;
- };
-
- scope.move = function(direction) {
- selected = moveMonth(angular.copy(selected), direction);
- refill();
- };
-
- scope.$watch('currentDate', function (value) {
- if(angular.isDate(value) && !isNaN(value) && datepickerCtrl.isDisabled(value)) {
- scope.currentDate = null;
- return;
- }
- if (attrs.from) {
- if (!isNaN(value) && !isNaN(scope.fromDate) && datepickerCtrl.compare(value, scope.fromDate) < 0) {
- swapDate(scope.fromDate, value);
- return;
- }
- }
- if (calendarSelected) {
- refill();
- calendarSelected = false;
- } else {
- if (angular.isDefined(value) && value !== null) {
- refill(value);
- } else {
- refill();
- }
- }
- scope.focusedDate = undefined;
- });
-
- scope.$watch('fromDate', function (value) {
- if(angular.isDate(value) && !isNaN(value) && datepickerCtrl.isDisabled(value)) {
- scope.fromDate = null;
- return;
- }
- if (attrs.from) {
- if (!isNaN(scope.currentDate) && !isNaN(value) && datepickerCtrl.compare(scope.currentDate, value) < 0) {
- swapDate(value, scope.currentDate);
- return;
- }
- if (calendarSelected) {
- refill();
- calendarSelected = false;
- } else {
- if (angular.isDefined(value) && value !== null) {
- refill(value);
- } else {
- refill();
- }
- }
- }
- scope.focusedDate = undefined;
- });
- }
- };
-}])
-.directive('datepickerPopup', ['$document', 'datepickerService', '$isElement', '$documentBind', function($document, datepickerService, $isElement, $documentBind) {
- var link = function (scope, elem, attr, ctrl) {
- datepickerService.bindScope(attr, scope);
-
- scope.isOpen = false;
-
- var toggle = scope.toggle = function (show) {
- if(show === true || show === false) {
- scope.isOpen = show;
- } else {
- scope.isOpen = !scope.isOpen;
- }
- };
-
- scope.$watch('current', function () {
- toggle(false);
- });
-
- var outsideClick = function (e) {
- var isElement = $isElement(angular.element(e.target), elem, $document);
- if(!isElement) {
- toggle(false);
- scope.$apply();
- }
- };
-
- $documentBind.click('isOpen', outsideClick, scope);
- };
-
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/datepicker/datepickerPopup.html',
- scope: {
- current: "=current"
- },
- compile: function (elem, attr) {
- var wrapperElement = elem.find('span').eq(1);
- wrapperElement.attr('current', 'current');
- datepickerService.setAttributes(attr, wrapperElement);
-
- return link;
- }
- };
-}])
-
-.directive('attDatepicker', ['$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');
- $element.removeAttr('ng-model');
- $element.attr('ng-model', '$parent.current');
- $element.attr('aria-describedby', 'datepicker');
- $element.attr('format-date', dateFormatString);
- $element.attr('att-input-deny', '[^0-9\/-]');
- $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) {
- $log.error("ng-model is required.");
- return; // do nothing if no ng-model
- }
-
- scope.$watch('current', function(value) {
- ctrl.$setViewValue(value);
- });
- ctrl.$render = function() {
- scope.current = ctrl.$viewValue;
- };
- }
- };
-}])
-
-.directive('formatDate', ['dateFilter', 'datepickerService', function(dateFilter, datepickerService) {
- return {
- restrict: 'A',
- require: 'ngModel',
- link: function(scope, elem, attr, ctrl) {
- var formatDate = "";
- attr.$observe('formatDate', function (value) {
- formatDate = value;
- });
- var dateToString = function(value) {
- if (value) {
- ctrl.$setValidity('invalidDate', true);
- return dateFilter(value, formatDate);
- } else {
- ctrl.$setValidity('invalidDate', false);
- return elem.val();
- }
- };
- var stringToDate = function(value) {
- if(datepickerService.validateDateString(value, formatDate)) {
- ctrl.$setValidity('invalidDate', true);
- return new Date(value);
- } else {
- ctrl.$setValidity('invalidDate', false);
- return null;
- }
- };
- ctrl.$formatters.unshift(dateToString);
- ctrl.$parsers.unshift(stringToDate);
- }
- };
-}])
-
-.directive('attDateFilter', ['$document', 'dateFilter', 'datepickerConfig', 'datepickerService', '$isElement', '$documentBind', function($document, dateFilter, datepickerConfig, datepickerService, $isElement, $documentBind) {
-
- var link = function (scope, elem, attr, ctrl) {
- datepickerService.bindScope(attr, scope);
-
- scope.selectedOption = datepickerConfig.dateFilter.defaultText;
- scope.showDropdownList = false;
- scope.showCalendar = false;
- scope.applyButtonType = "disabled";
-
- scope.currentSelection = "";
- var dateFormatString = angular.isDefined(attr.dateFormat) ? scope.$parent.$eval(attr.dateFormat) : datepickerConfig.dateFormat;
- var inputChange = false;
-
-
-
- var showDropdown = scope.showDropdown = function (show) {
- if(show === true || show === false) {
- scope.showDropdownList = show;
- } else {
- scope.showDropdownList = !scope.showDropdownList;
- }
-
- if (!scope.showDropdownList) {
- hideCalendar();
- } else {
- if (scope.currentSelection === 'Custom Single Date' || scope.currentSelection === 'Custom Range') {
- showCalendar();
- }
- }
- };
-
- var resetTime = scope.resetTime = function(date) {
- var dt;
- if (!isNaN(new Date(date))) {
- dt = new Date(date);
- } else {
- return null;
- }
- return new Date(dt.getFullYear(), dt.getMonth(), dt.getDate());
- };
-
- var addDays = scope.addDays = function (date, days) {
- var dt;
- if (!isNaN(new Date(date)) && !isNaN(days)) {
- dt = new Date(date);
- dt.setDate(dt.getDate() + days);
- } else {
- dt = new Date();
- }
- return dt;
- };
- var addMonth = scope.addMonth = function (date, months) {
- var dt;
- if (!isNaN(new Date(date)) && !isNaN(months)) {
- dt = new Date(date);
- dt.setMonth(dt.getMonth() + months);
- } else {
- dt = new Date();
- }
- return dt;
- };
-
- var showCalendar = function() {
- scope.showCalendar = true;
- };
-
- var hideCalendar = function() {
- scope.showCalendar = false;
- if(scope.currentSelection !== 'Custom Single Date' && scope.currentSelection !== 'Custom Range') {
- clear(true);
- }
- };
-
- var setDropdownText = function(value) {
- if(inputChange) {
- return;
- }
-
- var fromDateText = dateFormatString.toUpperCase();
- var currentDateText = dateFormatString.toUpperCase();
-
- if(!isNaN(new Date(scope.fromDate))) {
- fromDateText = dateFilter(scope.fromDate, dateFormatString);
- }
- if(!isNaN(new Date(scope.currentDate))) {
- currentDateText = dateFilter(scope.currentDate, dateFormatString);
- }
-
- if(value === 'Custom Single Date') {
- ctrl.$setValidity('invalidDate', true);
- scope.maxLength = 10;
- scope.selectedOption = currentDateText;
- } else if(value === 'Custom Range') {
- ctrl.$setValidity('invalidDate', true);
- ctrl.$setValidity('invalidDateRange', true);
- scope.maxLength = 21;
- scope.selectedOption = fromDateText + '-' + currentDateText;
- }
- };
-
- scope.getDropdownText = function () {
- inputChange = true;
- var dropdownText = scope.selectedOption;
-
- if (scope.currentSelection === 'Custom Single Date') {
- if (!isNaN(new Date(dropdownText)) && datepickerService.validateDateString(dropdownText, dateFormatString)) {
- ctrl.$setValidity('invalidDate', true);
- scope.fromDate = undefined;
- scope.currentDate = new Date(dropdownText);
- } else {
- ctrl.$setValidity('invalidDate', false);
- clear(true);
- }
- } else if (scope.currentSelection === 'Custom Range') {
- if (dropdownText.indexOf('-') !== -1 && (dropdownText.split('-').length === 2 || dropdownText.split('-').length === 6)) {
- ctrl.$setValidity('invalidDateRange', true);
- var resultDropdownText = dropdownText.split('-');
- if (resultDropdownText.length === 2) {
- resultDropdownText[0] = resultDropdownText[0].trim();
- resultDropdownText[1] = resultDropdownText[1].trim();
- } else if (resultDropdownText.length === 6) {
- var firstDateString = resultDropdownText[0].trim() + '-' + resultDropdownText[1].trim() + '-' + resultDropdownText[2].trim();
- var secondDateString = resultDropdownText[3].trim() + '-' + resultDropdownText[4].trim() + '-' + resultDropdownText[5].trim();
- resultDropdownText[0] = firstDateString;
- resultDropdownText[1] = secondDateString;
- }
-
- if (!isNaN(new Date(resultDropdownText[0])) && !isNaN(new Date(resultDropdownText[1])) && datepickerService.validateDateString(resultDropdownText[0], dateFormatString) && datepickerService.validateDateString(resultDropdownText[1], dateFormatString)) {
- ctrl.$setValidity('invalidDate', true);
- var fromDate = new Date(resultDropdownText[0]);
- var currentDate = new Date(resultDropdownText[1]);
- if(fromDate.getTime() < currentDate.getTime()) {
- ctrl.$setValidity('invalidDateRange', true);
- scope.fromDate = fromDate;
- scope.currentDate = currentDate;
- } else {
- ctrl.$setValidity('invalidDateRange', false);
- clear(true);
- }
- } else {
- ctrl.$setValidity('invalidDate', false);
- clear(true);
- }
- } else {
- ctrl.$setValidity('invalidDateRange', false);
- clear(true);
- }
- }
- };
-
- scope.untrackInputChange = function(ev) {
- inputChange = false;
- };
-
- scope.selectAdvancedOption = function (value) {
- scope.currentSelection = value;
- showCalendar();
- clear();
- scope.$watch('currentDate', function(val) {
- if(!isNaN(new Date(val))) {
- scope.applyButtonType = "primary";
- setDropdownText(value);
- if (!inputChange) {
- scope.focusApplyButton = true;
- }
- }
- });
- scope.$watch('fromDate', function(val) {
- if(!isNaN(new Date(val))) {
- setDropdownText(value);
- }
- });
- if (value === 'Custom Single Date') {
- scope.focusSingleDateCalendar = true;
- } else if (value === 'Custom Range') {
- scope.focusRangeCalendar = true;
- }
- };
-
- scope.resetFocus = function (ev) {
- scope.focusSingleDateCalendar = false;
- scope.focusRangeCalendar = false;
- scope.focusApplyButton = false;
- };
-
- scope.apply = function() {
- scope.dateRange.selection = scope.selectedOption;
- if(!isNaN(new Date(scope.fromDate))) {
- scope.from = scope.fromDate;
- scope.dateRange.from = scope.fromDate;
- } else {
- scope.from = undefined;
- scope.dateRange.from = undefined;
- }
- if(!isNaN(new Date(scope.currentDate))) {
- scope.current = scope.currentDate;
- scope.dateRange.current = scope.currentDate;
- } else {
- scope.current = undefined;
- scope.dateRange.current = undefined;
- }
-
- showDropdown();
- };
-
- scope.$watchCollection(function() {
- return scope.dateRange;
- }, function(value) {
- if(ctrl) {
- var finalDateRange = angular.copy(value);
- ctrl.$setViewValue(finalDateRange);
- }
- });
-
- ctrl.$render = function() {
- if (ctrl.$viewValue) {
- var inputRange = ctrl.$viewValue;
- scope.selectedOption = inputRange.selection;
- scope.fromDate = inputRange.from;
- scope.currentDate = inputRange.current;
- }
- };
-
- scope.cancel = function() {
- scope.currentSelection = "";
- scope.selectedOption = datepickerConfig.dateFilter.defaultText;
- showDropdown();
- };
-
- var clear = scope.clear = function(partial) {
- scope.fromDate = undefined;
- scope.currentDate = undefined;
- scope.applyButtonType = "disabled";
- if(!partial) {
- ctrl.$setValidity('invalidDate', true);
- ctrl.$setValidity('invalidDateRange', true);
- setDropdownText(scope.currentSelection);
- }
- };
-
- var outsideClick = function (e) {
- var isElement = $isElement(angular.element(e.target), elem, $document);
- if(!isElement) {
- showDropdown(false);
- scope.$apply();
- }
- };
-
- $documentBind.click('showDropdownList', outsideClick, scope);
- };
-
- return {
- restrict: 'EA',
- scope: {
- from: '=?from',
- current: "=?current"
- },
- replace: true,
- require: '?ngModel',
- transclude:true,
- templateUrl: 'app/scripts/ng_js_att_tpls/datepicker/dateFilter.html',
- controller:['$scope', '$element', '$attrs',function($scope, $element, $attrs){
- $scope.dateRange = {
- selection: undefined,
- from: undefined,
- current: undefined
- };
- this.selectOption = function (fromDate,toDate,caption) {
- $scope.selectedOption = caption;
- $scope.currentSelection =caption;
- $scope.dateRange.selection = caption;
- $scope.dateRange.current = $scope.resetTime(toDate);
- $scope.dateRange.from = $scope.resetTime(fromDate);
- $scope.showDropdown();
- };
- $scope.checkCurrentSelection=this.checkCurrentSelection = function(value) {
- if(value === $scope.currentSelection) {
- return true;
- }
- return false;
- };
- }],
- compile: function(elem, attr) {
- var singleDateCalendar = elem.find('span').eq(4);
- var rangeCalendar = elem.find('span').eq(5);
- rangeCalendar.attr('from', 'fromDate');
- singleDateCalendar.attr('current', 'currentDate');
- rangeCalendar.attr('current', 'currentDate');
-
- datepickerService.setAttributes(attr, singleDateCalendar);
- datepickerService.setAttributes(attr, rangeCalendar);
-
- return link;
- }
- };
-}])
-.directive('attDateFilterList',function(){
- return{
- restrict:'EA',
- scope:{
- fromDate:'=fromDate',
- toDate:'=toDate',
- caption:'=caption',
- disabled:'=disabled'
- },
- require:'^attDateFilter',
- transclude:true,
- replace:true,
- templateUrl:'app/scripts/ng_js_att_tpls/datepicker/dateFilterList.html',
- link:function(scope,elem,attr,ctrl){
- scope.selectOption=function(fromDate,toDate,caption){
- ctrl.selectOption(fromDate,toDate,caption);
- }
- scope.checkCurrentSelection=ctrl.checkCurrentSelection;
-
- }
- }
-});
-
-angular.module('att.abs.devNotes', [])
-
- .directive('attDevNotes', function() {
- return {
- restrict: 'EA',
- transclude: true,
- scope: {},
-
- controller: function($scope, $element){
- var panes = $scope.panes = [];
- $scope.select = function(pane)
- {
- angular.forEach(panes, function(pane)
- {
- pane.selected = false;
- });
- pane.selected = true;
- };
-
- this.addPane = function(pane) {
- if (panes.length === 0) $scope.select(pane);
- panes.push(pane);
- };
- },
- template:'<div>'+
- '<ul class="tabs">' +
- '<li ng-repeat="pane in panes" ng-class="{active:pane.selected}">'+
- '<a href="javascript:void(0)" ng-click="select(pane)">{{pane.title}}</a>' +
- '</li>' +
- '</ul>' +
- '<div ng-transclude></div>'+
- '</div>',
- replace: true
- };
- })
-
- .directive('pane', function() {
- return {
- require: '^attDevNotes',
- restrict: 'EA',
- transclude: true,
- scope: {
- title: '@'
- },
- link: function(scope, element, attrs, tabsCtrl) {
- tabsCtrl.addPane(scope);
- },
- template:
- '<div class="tab-pane" ng-class="{active: selected}">' +
- '<pre ng-class="{\'language-markup\':title==\'HTML\',\'language-javascript\':title==\'JavaScript\'}" class=" line-numbers">' +
- '<code ng-transclude></code>' +
- '</pre>' +
- '</div>',
- replace: true
- };
- });
-
-angular.module('att.abs.dividerLines', [])
- .directive('attDividerLines', [function()
- {
- return {
- scope: {
- attDividerLines: '@'
- },
- restrict: 'A',
- replace: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/dividerLines/dividerLines.html',
- link: function(scope, element, attribute, ctrl)
- {
- scope.lightContainer = attribute.attDividerLines;
- }
- };
- }]);
-
-angular.module('att.abs.dragdrop', [])
- .directive('attFileDrop', ['$parse', function($parse) {
- return {
- restrict: 'A',
- scope: {
- fileModel : '=',
- onDrop : '&',
- attFileDrop : '&'
- },
- controller: ['$scope', '$attrs', function($scope, $attrs){
- if($attrs.attFileDrop!==""){
- $scope.onDrop=$scope.attFileDrop;
- }
-
- this.onDrop = $scope.onDrop;
- }],
- link: function(scope, element, attr, ctrl) {
-
- element.addClass('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('dragdrop-over');
- return false;
- }
- );
-
- element.bind(
- 'dragenter',
- function(e) {
- // allows us to drop
- if (e.preventDefault) e.preventDefault();
- element.addClass('dragdrop-over');
- return false;
- }
- );
-
- element.bind(
- 'dragleave',
- function(e) {
- element.removeClass('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('dragdrop-over');
-
- if(e.dataTransfer.files && e.dataTransfer.files.length > 0){
- scope.fileModel = e.dataTransfer.files[0];
- scope.$apply();
-
- if(typeof scope.onDrop === "function"){
- scope.onDrop = $parse(scope.onDrop);
- scope.onDrop();
- }
- }
- return false;
- }
- );
- }
- };
- }])
- .directive('attFileLink', [ function() {
- return {
- restrict: 'EA',
- require: '^?attFileDrop',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/dragdrop/fileUpload.html',
- scope: {
- fileModel : '=?',
- onFileSelect : '&',
- attFileLink : '&'
- },
- controller: ['$scope', '$parse', function($scope, $parse){
-
- this.setFileModel= function(fileModel){
- if($scope.takeFileModelFromParent){
- $scope.$parent.fileModel = fileModel;
- $scope.$parent.$apply();
- }
- else{
- $scope.fileModel = fileModel;
- $scope.$apply();
- }
- };
-
- this.callbackFunction= function(){
- if(typeof $scope.onFileSelect === "function"){
- $scope.onFileSelect = $parse($scope.onFileSelect);
- $scope.onFileSelect();
- }
- };
-
- }],
- link: function(scope, element, attr, attFileDropCtrl) {
-
- scope.takeFileModelFromParent = false;
-
- if(!(attr.fileModel)){
- if(attFileDropCtrl){
- scope.takeFileModelFromParent = true;
- }
- }
-
- if(attr.attFileLink!==""){
- scope.onFileSelect=scope.attFileLink;
- }
- else if(!(attr.onFileSelect)){
- if(attFileDropCtrl){
- scope.onFileSelect = attFileDropCtrl.onDrop;
- }
- }
-
- }
- };
- }])
- .directive('attFileChange', ['$parse', function($parse) {
- return {
- restrict: 'A',
- require: '^attFileLink',
- link: function(scope, element, attr, attFileLinkCtrl) {
- element.bind(
- "change",
- function (e) {
- if(e.target.files && e.target.files.length > 0){
- attFileLinkCtrl.setFileModel(e.target.files[0]);
- attFileLinkCtrl.callbackFunction();
- }
- else{
- var strFileName = e.target.value;
- var objFSO = new ActiveXObject("Scripting.FileSystemObject");
-
- attFileLinkCtrl.setFileModel(objFSO.getFile(strFileName));
- attFileLinkCtrl.callbackFunction();
- }
- }
- );
- }
- };
- }]);
-angular.module("att.abs.drawer", [])
-.directive('attDrawer', ['$document', '$timeout', function ($document, $timeout) {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- scope: {
- drawerOpen: "=?",
- drawerAutoClose: "=?"
- },
- template: '<div><div class="att-drawer" ng-transclude></div><div ng-class="{\'drawer-backdrop\':drawerOpen}"></div></div>',
- link: function ($scope, element, attrs) {
- var param = {};
-
- // Override default parameters
- param.side = attrs.drawerSlide || 'top';
- param.speed = attrs.drawerSpeed || '0.25';
- param.size = attrs.drawerSize || '300px';
- param.zindex = attrs.drawerZindex || 1000;
- param.className = attrs.drawerClass || 'att-drawer';
-
- var slider = element.eq(0).children()[0];
- var content = angular.element(slider).children()[0];
-
- slider.className = param.className;
-
- /* Style setup */
- slider.style.transitionDuration = param.speed + 's';
- slider.style.webkitTransitionDuration = param.speed + 's';
- slider.style.zIndex = param.zindex;
- slider.style.position = 'fixed';
- slider.style.width = 0;
- slider.style.height = 0;
- slider.style.transitionProperty = 'width, height';
-
- switch (param.side) {
- case 'right':
- slider.style.height = attrs.drawerCustomHeight || '100%';
- slider.style.top = attrs.drawerCustomTop || '0px';
- slider.style.bottom = attrs.drawerCustomBottom || '0px';
- slider.style.right = attrs.drawerCustomRight || '0px';
- break;
- case 'left':
- slider.style.height = attrs.drawerCustomHeight || '100%';
- slider.style.top = attrs.drawerCustomTop || '0px';
- slider.style.bottom = attrs.drawerCustomBottom || '0px';
- slider.style.left = attrs.drawerCustomLeft || '0px';
- break;
- case 'top':
- slider.style.width = attrs.drawerCustomWidth || '100%';
- slider.style.left = attrs.drawerCustomLeft || '0px';
- slider.style.top = attrs.drawerCustomTop || '0px';
- slider.style.right = attrs.drawerCustomRight || '0px';
- break;
- case 'bottom':
- slider.style.width = attrs.drawerCustomWidth || '100%';
- slider.style.bottom = attrs.drawerCustomBottom || '0px';
- slider.style.left = attrs.drawerCustomLeft || '0px';
- slider.style.right = attrs.drawerCustomRight || '0px';
- break;
- }
-
-
-
- /* Closed */
- function drawerClose(slider, param) {
- if (slider && slider.style.width !== 0 && slider.style.width !== 0){
- content.style.display = 'none';
- switch (param.side){
- case 'right':
- slider.style.width = '0px';
- break;
- case 'left':
- slider.style.width = '0px';
- break;
- case 'top':
- slider.style.height = '0px';
- break;
- case 'bottom':
- slider.style.height = '0px';
- break;
- }
- }
- $scope.drawerOpen = false;
- }
-
- /* Open */
- function drawerOpen(slider, param) {
- if (slider.style.width !== 0 && slider.style.width !== 0){
- switch (param.side){
- case 'right':
- slider.style.width = param.size;
- break;
- case 'left':
- slider.style.width = param.size;
- break;
- case 'top':
- slider.style.height = param.size;
- break;
- case 'bottom':
- slider.style.height = param.size;
- break;
- }
- $timeout(function() {
- content.style.display = 'block';
- },(param.speed * 1000));
-
- }
- }
-
- function isFunction(functionToCheck) {
- var getType = {};
- return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
- }
-
- /*
- * Watchers
- * */
-
- if(attrs.drawerSize) {
- $scope.$watch(function() {
-
- return attrs.drawerSize;
- }, function(newVal,oldVal) {
- param.size = newVal;
-
- if($scope.drawerOpen) {
- drawerOpen(slider,param);
- }
- });
- }
-
- $scope.$watch("drawerOpen", function (value){
- if (!!value) {
- // Open
- drawerOpen(slider,param);
- } else {
- // Close
- drawerClose(slider,param);
- }
- });
-
- // close panel on location change
- if($scope.drawerAutoClose) {
- $scope.$on("$locationChangeStart", function(){
- drawerClose(slider, param);
- if(isFunction($scope.drawerAutoClose)) {
- $scope.drawerAutoClose();
- }
- });
- $scope.$on("$stateChangeStart", function(){
- drawerClose(slider, param);
- if(isFunction($scope.drawerAutoClose)) {
- $scope.drawerAutoClose();
- }
- });
- }
- }
- };
- }
-]);
-angular.module('att.abs.message', [])
-
-.directive('attMessages', [function() {
- return {
- restrict: 'EA',
- scope: true,
- controller: ['$scope', '$element', '$attrs', function($scope, $element, $attrs) {
- $scope.messageType;
- $scope.$watchCollection($attrs['for'], function(errors) {
- for (var key in errors) {
- if (errors[key] === true) {
- $scope.error = key;
- break;
- } else {
- $scope.error = null;
- }
- };
- if ($scope.error === null) {
- $scope.messageType = null;
- $element.removeAttr('message-type');
- }
- });
- this.setMessageType = function(messageType) {
- $scope.messageType = messageType;
- };
- $scope.$watch('messageType', function(value) {
- if (angular.isDefined(value) && value !== null) {
- $element.attr('message-type', value);
- }
- });
- }]
- };
-}])
-
-.directive('attMessage', [function() {
- return {
- restrict: 'EA',
- scope: {},
- require: '^attMessages',
- link: function(scope, elem, attr, ctrl) {
- scope.when = attr.when || attr.attMessage;
- scope.type = attr.type;
- elem.css({display: 'none'});
- scope.$parent.$watch('error', function(value) {
- if (value === scope.when) {
- elem.css({display: 'block'});
- ctrl.setMessageType(scope.type);
- } else {
- elem.css({display: 'none'});
- }
- });
- }
- };
-}]);
-
-angular.module('att.abs.formField', ['att.abs.message'])
-
-.directive('attFormField', [function() {
- return {
- priority: 101,
- restrict: 'A',
- controller: ['$scope', function($scope) {
- }],
- link: function(scope, elem, attr, ctrl) {
- elem.wrap('<div class="form-field"></div>');
- elem.parent().append('<label class="form-field__label">' + attr.placeholder || attr.attFormField + '</label>');
- elem.wrap('<div class="form-field-input-container"></div>');
-
- elem.bind('keyup', function() {
- if (this.value !== '') {
- elem.parent().parent().find('label').addClass('form-field__label--show').removeClass('form-field__label--hide');
- } else {
- elem.parent().parent().find('label').addClass('form-field__label--hide').removeClass('form-field__label--show');
- }
- });
-
- elem.bind('blur', function() {
- if (this.value === '') {
- elem.parent().parent().find('label').removeClass('form-field__label--hide');
- }
- });
- }
- };
-}])
-
-.directive('attFormFieldValidation', ['$compile', '$log', function($compile, $log) {
- return {
- priority: 102,
- scope: {},
- restrict: 'A',
- require: ['?ngModel', '?attFormField'],
- link: function(scope, elem, attr, ctrl) {
- var ngCtrl = ctrl[0];
- var attFormFieldCtrl = ctrl[1];
- scope.valid = "";
-
- if (!ngCtrl) {
- $log.error("att-form-field-validation :: ng-model directive is required.");
- return;
- }
- if (!attFormFieldCtrl) {
- $log.error("att-form-field-validation :: att-form-field directive is required.");
- return;
- }
-
- elem.parent().append($compile(angular.element('<i class="icon-info-alert error" ng-show="valid===false">&nbsp;</i>'))(scope));
- elem.parent().append($compile(angular.element('<i class="icon-info-success success" ng-show="valid===true">&nbsp;</i>'))(scope));
-
- scope.$watch('valid', function(value) {
- if (value === true) {
- elem.parent().parent().addClass('success');
- } else if (value === false) {
- elem.parent().parent().addClass('error');
- } else {
- elem.parent().parent().removeClass('success').removeClass('error');
- }
- });
-
- elem.bind('keyup', function() {
- if (ngCtrl.$valid === true) {
- scope.valid = true;
- } else if (ngCtrl.$invalid === true) {
- scope.valid = false;
- } else {
- scope.valid = "";
- }
- scope.$apply();
- });
- }
- };
-}])
-
-.directive('attFormFieldValidationAlert', ['$timeout', function($timeout) {
- return {
- scope: {},
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/formField/attFormFieldValidationAlert.html',
- link: function(scope, elem, attr, ctrl) {
- scope.showLabel = false;
- scope.hideLabel = false;
- scope.errorMessage = false;
- scope.warningMessage = false;
-
- var checkMessageType = function() {
- if (elem.find('att-messages').attr('message-type') === 'error') {
- scope.errorMessage = true;
- scope.warningMessage = false;
- } else if (elem.find('att-messages').attr('message-type') === 'warning') {
- scope.errorMessage = false;
- scope.warningMessage = true;
- } else {
- scope.errorMessage = false;
- scope.warningMessage = false;
- }
- };
-
- elem.find('label').text(elem.find('input').attr('placeholder'));
- elem.find('input').bind('keyup', function() {
- if (this.value !== '') {
- scope.showLabel = true;
- scope.hideLabel = false;
- } else {
- scope.showLabel = false;
- scope.hideLabel = true;
- }
- checkMessageType();
- scope.$apply();
- });
-
- elem.find('input').bind('blur', function() {
- if (this.value === '') {
- scope.showLabel = false;
- scope.hideLabel = false;
- }
- scope.$apply();
- });
-
- $timeout(function() {
- checkMessageType();
- }, 100);
- }
- };
-}]);
-
-'use strict';
-angular.module('att.abs.hourpicker', ['att.abs.utilities'])
- .constant('hourpickerConfig', {
- days: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
- customOption: 'Custom'
- })
-
- .controller('hourPickerController', ['$scope', function($scope) {
-
- $scope.options = [];
- this.setOptions =
- function(value, fromtime, totime, preselect, uncheckedFromTime,uncheckedToTime) {
-
- $scope.options.push(value);
- if (preselect !== undefined) {
- $scope.preselect = preselect;
- }
-
- if (fromtime !== undefined) {
- $scope.fromtime = fromtime;
- for (var daycount in $scope.days) {
- $scope.FrtimeList[$scope.days[daycount]] = {};
-
- if(uncheckedFromTime !== undefined){
- $scope.FrtimeList[$scope.days[daycount]].value = uncheckedFromTime;
- $scope.selectedFromOption[$scope.days[daycount]] = uncheckedFromTime;
- }else{
- $scope.FrtimeList[$scope.days[daycount]].value = fromtime[0].value;
- $scope.selectedFromOption[$scope.days[daycount]] = fromtime[0].value;
- }
- }
- }
- if (totime !== undefined) {
- $scope.totime = totime;
- for (var daycount in $scope.days) {
- $scope.TotimeList[$scope.days[daycount]] = {};
-
- if(uncheckedToTime !== undefined){
- $scope.TotimeList[$scope.days[daycount]].value = uncheckedToTime;
- $scope.selectedToOption[$scope.days[daycount]] = uncheckedToTime;
- }else{
- $scope.TotimeList[$scope.days[daycount]].value = totime[0].value;
- $scope.selectedToOption[$scope.days[daycount]] = totime[0].value;
- }
- }
- }
-
-
- if(uncheckedFromTime !== undefined)
- $scope.uncheckedFromTime = uncheckedFromTime;
-
- if(uncheckedToTime !== undefined)
- $scope.uncheckedToTime = uncheckedToTime;
- };
- }])
-
- .directive('attHourpickerOption', [function() {
- return {
- restrict: 'EA',
- require: '^attHourpicker',
- scope: {
- option: "=option",
- fromtime: "=fromtime",
- totime: "=totime",
- preselect: "=preselect",
- uncheckedFromTime: "=",
- uncheckedToTime: "="
- },
- link: function(scope, element, attr, ctrl) {
- ctrl.setOptions(scope.option,
- scope.fromtime,
- scope.totime,
- scope.preselect,
- scope.uncheckedFromTime,
- scope.uncheckedToTime);
- }
- };
- }])
-
- .directive('attHourpicker', ["hourpickerConfig", "$document", "$log", "$documentBind", "$timeout", function(hourpickerConfig, $document, $log, $documentBind, $timeout) {
- return{
- require: 'ngModel',
- restrict: 'EA',
- controller: 'hourPickerController',
- transclude: true,
- scope:{
- model: "=ngModel",
- resetFlag: "=?"
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/hourpicker/hourpicker.html',
- link: function(scope, element, attr, ctrl) {
- var flag = false;
- scope.isFromDropDownOpen = false;
- scope.isToDropDownOpen = false;
- var dropDownOpenValue = "";
- var custTime = {};
- scope.days = hourpickerConfig.days;
- scope.daysList = {};
- scope.FrtimeList = {};
- scope.FrtimeListDay = {};
- scope.TotimeListDay = {};
- scope.selectedFromOption = {};
- scope.selectedToOption = {};
- scope.TotimeList = {};
- scope.selectedIndex = 0;
- scope.selectedOption = "Select from list";
- scope.customTime = [];
-
- scope.resetFlag = false;
-
- scope.$watch('resetFlag', function(newVal, oldVal){
- if(newVal !== oldVal){
- if( newVal === true && scope.selectedOption === hourpickerConfig.customOption ){
- //disable and reset all days checkbox
- for (day in scope.daysList) {
- scope.daysList[day] = false;
- scope.addSelectedValue(day);
- }
- scope.preselectUpdateFxn(scope.preselect);
- }
- scope.resetFlag = false;
- }
- });
-
- scope.$watch('selCategory', function(value) {
- if (value){
- ctrl.$setViewValue(value);
- }
- });
- scope.$watch('model', function(value,oldValue) {
- if (value && oldValue && angular.toJson(value) !== angular.toJson(oldValue)) {
- scope.updateData(value)
- }});
-
- scope.updateData = function(value)
- {
- if (value.constructor === Array) {
- scope.showDaysSelector = true;
- scope.selectedOption = hourpickerConfig.customOption;
- for (var arry in value) {
- var day = value[arry].day;
- scope.daysList[day] = true;
-
- for (var fromcount in scope.fromtime) {
- if (scope.fromtime[fromcount].value === value[arry].FromTime) {
- scope.FrtimeList[day].value = scope.fromtime[fromcount].value;
- scope.selectedFromOption[day] = scope.FrtimeList[day].value;
- }
- }
- for (var tocount in scope.totime) {
- if (scope.totime[tocount].value === value[arry].ToTime) {
- scope.TotimeList[day].value = scope.totime[tocount].value;
- scope.selectedToOption[day] = scope.TotimeList[day].value;
- }
- }
- scope.addSelectedValue(day, value[arry].FromTime, value[arry].ToTime);
- //for IE8 Fix
- if (parseInt(arry) + 1 === value.length) {
- break;
- }
- }
- }
- else {
- scope.selectOption(value.day);
- }
- }
-
- scope.$watch('preselect', function(value) {
- scope.preselectUpdateFxn(value);
- });
-
- scope.preselectUpdateFxn = function(value){
- if (value !== undefined) {
-
- if(scope.options){
- value = scope.validatePreselectData(value);
- }
- if (value === "") {
- return;
- }
- scope.updateData(value);
- }
- }
-
- scope.validatePreselectData = function(value)
- {
- if (value.constructor === Array) {
- for (var arry in value) {
- var day = value[arry].day;
- var isDayFound = false;
- var isFrmFound = false;
- var isToFound = false;
- for (var daycount in scope.days) {
- if (scope.days[daycount] === day) {
- isDayFound = true;
- break;
- }
- }
- if (!isDayFound) {
- value.splice(arry, 1);
- continue;
- }
- for (var fromcount in scope.fromtime) {
- if (scope.fromtime[fromcount].value === value[arry].FromTime) {
- isFrmFound = true;
- break;
- }
- }
- if (!isFrmFound) {
- value[arry].FromTime = scope.fromtime[0].value;
- }
- for (var tocount in scope.totime) {
- if (scope.totime[tocount].value === value[arry].ToTime) {
- isToFound = true;
- break;
- }
- }
- if (!isToFound) {
- value[arry].ToTime = scope.totime[0].value;
- }
- //for IE8 Fix
- if (parseInt(arry) + 1 === value.length) {
- break;
- }
- }
- }
- else {
- var isOptionFound = false;
- for (var optcount in scope.options) {
- if (scope.options[optcount] === value.day) {
- isOptionFound = true;
- break;
- }
- }
- if (!isOptionFound) {
- value = "";
- }
- }
- return value;
- };
-
- scope.selectPrevNextValue = function($event, arrayValues, currValue) {
-
- var value;
- var index = 0;
- if ($event.keyCode === 38) {
- value = -1;
- } else if ($event.keyCode === 40) {
- value = 1;
- } else {
- return currValue;
- }
-
- if (arrayValues.indexOf(currValue) !== -1) {
- index = arrayValues.indexOf(currValue) + value;
- } else {
- for (var count in arrayValues) {
- if (arrayValues[count].value === currValue) {
- index = parseInt(count) + value;
- break;
- }
- }
- }
-
- if (index === arrayValues.length) {
- index = index - 1;
- } else if (index === -1) {
- index = index + 1;
- }
-
- $event.preventDefault();
- if (arrayValues[index].value)
- return arrayValues[index].value;
- else
- return arrayValues[index];
- };
-
- scope.showDropdown = function()
- {
- scope.showlist = !scope.showlist;
- flag = !flag;
- };
-
- scope.showfromDayDropdown = function(value)
- {
- //close dropdown if any other From drop down is opened
- for (count in scope.FrtimeListDay) {
- if (count !== value && scope.FrtimeListDay[count] === true) {
- scope.FrtimeListDay[count] = false;
- }
- }
- for (count in scope.TotimeListDay) {
- if (scope.TotimeListDay[count] === true) {
- scope.TotimeListDay[count] = false;
- }
- }
- scope.FrtimeListDay[value] = !scope.FrtimeListDay[value];
- flag = !flag;
- scope.showlist = false;
-
- //save model value so we can close current dropdown on click of other part of the document
- if (scope.FrtimeListDay[value]) {
- scope.isFromDropDownOpen = true;
- dropDownOpenValue = value;
-
- } else {
- scope.isFromDropDownOpen = false;
- }
-
- $timeout(function () {
- if(scope.FrtimeListDay[value]){
- var daysContainerDIV = angular.element(element)[0].querySelector(".customdays-width");
- var containerUL = angular.element(daysContainerDIV.querySelector('.select2-container-active')).parent()[0].querySelector("ul");
- var selectedElemTopPos = angular.element(containerUL.querySelector('.selectedItemInDropDown'))[0].offsetTop;
- angular.element(containerUL)[0].scrollTop = selectedElemTopPos;
- }
- });
-
- };
-
- scope.showtoDayDropdown = function(value)
- {
- //close dropdown if any other To drop down is opened
- for (count in scope.TotimeListDay) {
- if (count !== value && scope.TotimeListDay[count] === true) {
- scope.TotimeListDay[count] = false;
- }
- }
- for (count in scope.FrtimeListDay) {
- if (scope.FrtimeListDay[count] === true) {
- scope.FrtimeListDay[count] = false;
- }
- }
- scope.TotimeListDay[value] = !scope.TotimeListDay[value];
- flag = !flag;
- scope.showlist = false;
-
- //save model value so we can close current dropdown on click of other part of the document
- if (scope.TotimeListDay[value]) {
- scope.isToDropDownOpen = true;
- dropDownOpenValue = value;
-
- } else {
- scope.isToDropDownOpen = false;
- }
-
- $timeout(function () {
- if(scope.FrtimeListDay[value]){
- var daysContainerDIV = angular.element(element)[0].querySelector(".customdays-width");
- var containerUL = angular.element(daysContainerDIV.querySelector('.select2-container-active')).parent()[0].querySelector("ul");
- var selectedElemTopPos = angular.element(containerUL.querySelector('.selectedItemInDropDown'))[0].offsetTop;
- angular.element(containerUL)[0].scrollTop = selectedElemTopPos;
- }
- });
-
- };
-
- scope.selectFromDayOption = function(day, value)
- {
- scope.selectedFromOption[day] = value;
- scope.FrtimeList[day].value = value;
- scope.FrtimeListDay[day] = false;
- scope.isFromDropDownOpen = false;
- };
-
- scope.selectToDayOption = function(day, value)
- {
- scope.selectedToOption[day] = value;
- scope.TotimeList[day].value = value;
- scope.TotimeListDay[day] = false;
- scope.isToDropDownOpen = false;
- };
-
- scope.addSelectedValue = function(value, fromtime, totime)
- {
- if (scope.daysList[value] !== undefined && !scope.daysList[value]) {
-
- for (var count = 0, len = scope.customTime.length; count < len; count++) {
- if (scope.customTime[count].day === value) {
-
- if(scope.uncheckedFromTime)
- scope.selectedFromOption[scope.customTime[count].day] = scope.uncheckedFromTime;
- else
- scope.selectedFromOption[scope.customTime[count].day] = scope.FrtimeList[scope.customTime[count].day].value;
-
- if(scope.uncheckedToTime)
- scope.selectedToOption[scope.customTime[count].day] = scope.uncheckedToTime;
- else
- scope.selectedToOption[scope.customTime[count].day] = scope.TotimeList[scope.customTime[count].day].value;
-
- scope.customTime.splice(count, 1);
- break;
- }
- }
-
- }
- else {
-
- if(scope.selectedFromOption[value] == scope.uncheckedFromTime){
- scope.selectedFromOption[value] = scope.fromtime[0].value;
- fromtime = scope.fromtime[0].value;
- scope.FrtimeList[value].value = scope.fromtime[0].value;
- }
-
- if(scope.selectedToOption[value] == scope.uncheckedToTime){
- scope.selectedToOption[value]= scope.totime[0].value;
- totime = scope.totime[0].value;
- scope.TotimeList[value].value = scope.totime[0].value;
- }
-
- custTime["day"] = value;
- custTime["FromTime"] = scope.FrtimeList[value].value;
- custTime["ToTime"] = scope.TotimeList[value].value;
-
- var count = 0, len = scope.customTime.length;
- for (; count < len; count++) {
- if (scope.customTime[count].day === value) {
- scope.customTime[count].FromTime = custTime["FromTime"];
- scope.customTime[count].ToTime = custTime["ToTime"];
- break;
- }
- }
- if (count === len) {
- var x = angular.copy(custTime);
- scope.customTime.push(x);
- }
- }
- scope.selCategory = scope.customTime;
- };
-
-
- var outsideClick = function(e) {
- if (scope.showlist) {
- scope.$apply(function() {
- scope.showlist = false;
- });
- }
- };
-
- $documentBind.click('showlist', outsideClick, scope);
-
- var outsideClickFromDropdown = function(e) {
- scope.$apply(function() {
- if (scope.isFromDropDownOpen) {
- scope.FrtimeListDay[dropDownOpenValue] = false;
- scope.isFromDropDownOpen = false;
- }
- });
- };
-
- $documentBind.click('isFromDropDownOpen', outsideClickFromDropdown, scope);
-
- var outsideClickToDropdown = function(e) {
- scope.$apply(function() {
- if (scope.isToDropDownOpen) {
- scope.TotimeListDay[dropDownOpenValue] = false;
- scope.isToDropDownOpen = false;
- }
- });
- };
-
- $documentBind.click('isToDropDownOpen', outsideClickToDropdown, scope);
-
- scope.selectOption = function(sItem)
- {
-
- if (sItem === hourpickerConfig.customOption) {
- scope.showDaysSelector = true;
- scope.selCategory = scope.customTime;
- } else {
- scope.showDaysSelector = false;
- var fromTime = /[0-9]\s?am/i.exec(sItem);
- var toTime = /[0-9]\s?pm/i.exec(sItem);
- scope.selCategory = {day: sItem, FromTime: fromTime === null ? 'NA' : fromTime[0], ToTime: toTime === null ? 'NA' : toTime[0]};
- }
-
- scope.showlist = false;
- flag = false;
- scope.selectedOption = sItem;
- };
- }
- };
- }]);
-
-angular.module('att.abs.iconButtons', [])
-
- .constant('buttonConfig', {
- activeClass: 'active--button',
- toggleEvent: 'click'
- })
-
- .directive('attIconBtnRadio', ['buttonConfig', function(buttonConfig) {
- var activeClass = buttonConfig.activeClass || 'active--button';
- var toggleEvent = buttonConfig.toggleEvent || 'click';
-
- return {
- require: 'ngModel',
- link: function(scope, element, attrs, ngModelCtrl) {
-
- element.attr("role","button");
- element.attr("tabindex","0");
- element.append("<span class='hidden-spoken'>"+attrs.attIconBtnRadio+"</span>");
-
- //model -> UI
- ngModelCtrl.$render = function() {
- element.parent().toggleClass(activeClass, angular.equals(ngModelCtrl.$modelValue, attrs.attIconBtnRadio));
- /*if(ngModelCtrl.$modelValue!==undefined){
- if (angular.equals(ngModelCtrl.$modelValue, attrs.attIconBtnRadio)) {
- element.attr("aria-selected", true);
- }
- else {
- element.attr("aria-selected", false);
- }
- }*/
- };
-
- //ui->model
- element.parent().bind(toggleEvent, function() {
- if (!element.parent().hasClass(activeClass)) {
- scope.$apply(function() {
- ngModelCtrl.$setViewValue(attrs.attIconBtnRadio);
- ngModelCtrl.$render();
- });
- }
- });
-
-
- }
- };
- }])
- .directive('attIconBtnCheckbox', ['buttonConfig', function(buttonConfig) {
- var activeClass = buttonConfig.activeClass || 'active--button';
- var toggleEvent = buttonConfig.toggleEvent || 'click';
-
- return {
- require: 'ngModel',
- link: function(scope, element, attrs, ngModelCtrl) {
-
- element.attr("role","button");
- element.attr("tabindex","0");
- element.append("<span class='hidden-spoken'>"+attrs.attIconBtnCheckbox+"</span>");
-
- function getTrueValue() {
- var trueValue = scope.$eval(attrs.btnCheckboxTrue);
- return angular.isDefined(trueValue) ? trueValue : true;
- }
-
- function getFalseValue() {
- var falseValue = scope.$eval(attrs.btnCheckboxFalse);
- return angular.isDefined(falseValue) ? falseValue : false;
- }
-
- //model -> UI
- ngModelCtrl.$render = function() {
- element.parent().toggleClass(activeClass, angular.equals(ngModelCtrl.$modelValue, getTrueValue()));
- /*if(ngModelCtrl.$modelValue!==undefined){
- if ((angular.equals(ngModelCtrl.$modelValue, getTrueValue()))) {
- element.attr("aria-selected", true);
- }
- else {
- element.attr("aria-selected", false);
- }
- }*/
- };
-
- //ui->model
- element.parent().bind(toggleEvent, function() {
- scope.$apply(function() {
- ngModelCtrl.$setViewValue(element.parent().hasClass(activeClass) ? getFalseValue() : getTrueValue());
- ngModelCtrl.$render();
- });
- });
- }
- };
- }]);
-
-angular.module('att.abs.links', [])
- .directive('attLink', ['$compile',function($compile) {
- return {
- restrict: 'A',
- link: function(scope, elem, attr) {
- elem.addClass('link');
- if(!(elem.attr('href'))){
- elem.attr("tabindex", "0");
- }
- }
- };
- }])
- .directive('attLinkVisited', ['$compile',function($compile) {
- return {
- restrict: 'A',
- link: function(scope, elem, attr) {
- elem.addClass('link--visited');
- if(!(elem.attr('href'))){
- elem.attr("tabindex", "0");
- }
- }
- };
- }])
- .directive('attReadmore', ['$timeout',function($timeout) {
- return {
- restrict: 'A',
- scope: {
- lines:"@noOfLines",
- textModel: "=",
- isOpen: "=" //attribute to use readmore inside accordion
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/links/readMore.html',
- link: function(scope, elem, attr, ctrl) {
- var height = 1;
- scope.$watch('textModel', function(val){
- if(!val){
- scope.textToDisplay = '';
- scope.readMoreLink = false;
- scope.readLessLink = false;
- scope.readFlag = false;
- }
- else{
- if (typeof String.prototype.trim !== 'function') {
- String.prototype.trim = function() {
- return this.replace(/^\s+|\s+$/g, '');
- };
- }
- scope.textToDisplay = val.trim();
- scope.readFlag = true;
- $timeout(function() {
- var readElem = elem[0].children[0].children[0];
- if(height===1){
- if(window.getComputedStyle){
- height = parseInt(scope.lines) * parseFloat(window.getComputedStyle(readElem,null).getPropertyValue("height"));
- }
- else {
- height = parseInt(scope.lines) * parseFloat(readElem.currentStyle.height);
- }
- scope.elemHeight = height;
- scope.readLinkStyle = {'height': scope.elemHeight + 'px'};
- }
- });
- scope.readMoreLink = true;
- scope.readLessLink = false;
- }
- });
-
- // Code to use readmore inside accordion
- var parentElem = elem.parent();
- if (parentElem.hasClass('att-accordion__body')) {
- scope.$watch('isOpen', function(val) {
- if (!val) {
- scope.readLess();
- }
- });
- }
-
- scope.readMore = function() {
- scope.readMoreLink = false;
- scope.readLessLink = true;
- scope.readLinkStyle = {'height': 'auto'};
- scope.readFlag = false;
- };
-
- scope.readLess = function() {
- scope.readMoreLink = true;
- scope.readLessLink = false;
- scope.readLinkStyle = {'height': scope.elemHeight + 'px'};
- scope.readFlag = true;
- };
- }
- };
- }])
- .directive('attLinksList', [function() {
- return {
- restrict: 'A',
- controller: function() {
- },
- link: function(scope, elem, attr) {
- elem.addClass('links-list');
- }
- };
- }])
- .directive('attLinksListItem', ['$compile',function($compile) {
- return {
- restrict: 'A',
- require: '^attLinksList',
- link: function(scope, elem, attr, attLinksListCtrl) {
- elem.addClass('links-list__item');
- if(!(elem.attr('href'))){
- elem.attr("tabindex", "0");
- }
- }
- };
- }]);
-'use strict'
-angular.module('att.abs.loading', [])
- .directive('attLoading', [
- function() {
- return {
- restrict: 'A',
- replace: true,
- scope: {
- icon: '@attLoading',
- progressStatus: '=?',
- colorClass: '=?'
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/loading/loading.html',
- link: function(scope, element, attr) {
- var progressvalue = scope.progressStatus;
- scope.progressStatus = Math.min(100, Math.max(0, progressvalue));
- if(navigator.userAgent.indexOf("MSIE 8.")!=-1){
- var shiftX = 0,
- shiftY = scope.progressStatus * 36;
-
- if (element.hasClass('att-loading--blue')) {
- shiftX = -36;
- }
- else if (element.hasClass('att-loading--white')) {
- shiftX = -72;
- }
- //element.eq(1).children().find('att-loading-inset__percentage').html(scope.progressStatus);
- element.css({
- 'background-position-x' : shiftX,
- 'background-position-y' : -shiftY
- });
-
- }
-
- }
- };
- }
- ]);
-
-angular.module('att.abs.modal', [])
-/**
- * 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;
- }
- };
- }
- };
- })
-
-/**
- * A helper directive for the $modal service. It creates a backdrop element.
- */
- .directive('modalBackdrop', ['$timeout', function ($timeout) {
- return {
- restrict: 'EA',
- replace: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/modal/backdrop.html',
- link: function (scope) {
- scope.animate = false;
- //trigger CSS transitions
- $timeout(function () {
- scope.animate = true;
- });
- }
- };
- }])
-
- .directive('modalWindow', ['$modalStack','$timeout','$document', function ($modalStack,$timeout,$document) {
- return {
- restrict: 'EA',
- scope: {
- index: '@'
- },
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/modal/window.html',
- link: function (scope, element, attrs) {
- scope.windowClass = attrs.windowClass || '';
-
-
- $timeout(function () {
- // trigger CSS transitions
- scope.focusModalFlag=true;
- scope.animate = true;
-
- });
- $document.on('focus keydown', function(e) {
- if (e.which ===9) {
- String.prototype.contains = function(it) { return this.indexOf(it) != -1; };
- if (element[0] !== e.target && !element[0].contains( e.target )) {
- element[0].focus();
- }
- }
- });
- scope.close = function (evt) {
- var modal = $modalStack.getTop();
- if (modal && modal.value.backdrop && modal.value.backdrop != 'static' && (evt.target === evt.currentTarget)) {
- // Check if preventDefault exists due to lack of support for IE8
- if (evt.preventDefault) {
- evt.preventDefault();
- evt.stopPropagation();
- } else {
- evt.returnValue = false;
- }
-
- $modalStack.dismiss(modal.key, 'backdrop click');
- }
- };
- }
- };
- }])
-
- .factory('$modalStack', ['$document', '$compile', '$rootScope', '$$stackedMap',
- function ($document, $compile, $rootScope, $$stackedMap) {
-
- var OPENED_MODAL_CLASS = 'modal-open';
-
- var backdropjqLiteEl, backdropDomEl;
- var backdropScope = $rootScope.$new(true);
- 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) {
-
- var body = $document.find('body').eq(0);
- var modalWindow = openedWindows.get(modalInstance).value;
-
- //clean up the stack
- openedWindows.remove(modalInstance);
-
- //remove window DOM element
- modalWindow.modalDomEl.remove();
- body.toggleClass(OPENED_MODAL_CLASS, openedWindows.length() > 0);
-
- //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 body = $document.find('body').eq(0);
-
- if (backdropIndex() >= 0 && !backdropDomEl) {
- backdropjqLiteEl = angular.element('<div modal-backdrop></div>');
- backdropDomEl = $compile(backdropjqLiteEl)(backdropScope);
- body.append(backdropDomEl);
- }
-
- var angularDomEl = angular.element('<div modal-window></div>');
- angularDomEl.attr('window-class', modal.windowClass);
- angularDomEl.attr('index', openedWindows.length() - 1);
- angularDomEl.html(modal.content);
-
- var modalDomEl = $compile(angularDomEl)(modal.scope);
- openedWindows.top().value.modalDomEl = modalDomEl;
- body.append(modalDomEl);
- body.addClass(OPENED_MODAL_CLASS);
- };
-
- $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
- });
-
- }, function resolveError(reason) {
- modalResultDeferred.reject(reason);
- });
-
- templateAndResolvePromise.then(function () {
- modalOpenedDeferred.resolve(true);
- }, function () {
- modalOpenedDeferred.reject(false);
- });
-
- return modalInstance;
- };
-
- return $modal;
- }]
- };
-
- return $modalProvider;
- })
-
-.directive("simpleModal", ["$modal", "$log", '$scrollTo', function($modal, $log, $scrollTo) {
- return {
- restrict: 'EA',
- scope: {
- simpleModal: '@',
- backdrop:'@',
- keyboard:'@',
- modalOk:'&',
- modalCancel:'&',
- windowClass:'@',
- controller:'@'
- },
- 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.simpleModal = elm.attr("href");
- }
- scope.backdrop === "false" ? scope.backdropclick='static':scope.backdropclick=true;
- scope.keyboard === "false" ? scope.keyboardev=false:scope.keyboardev=true;
- $modal.open({
- templateUrl: scope.simpleModal,
- backdrop:scope.backdropclick,
- keyboard:scope.keyboardev,
- windowClass:scope.windowClass,
- controller: scope.controller
- }).result.then(scope.modalOk, scope.modalCancel);
- });
- }
- };
- }]);
-
-angular.module('att.abs.pagination', ['att.abs.utilities'])
-.directive('attPagination', ['$timeout', function($timeout) {
- return {
- restrict: 'EA',
- scope: {
- totalPages: '=',
- currentPage: '=',
- showInput: '=',
- clickHandler: '=?'
- },
- replace: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/pagination/pagination.html',
- link: function(scope, elem, attr, ctrl) {
- scope.focusedPage;
-
- scope.$watch('totalPages', function(value) {
- if(angular.isDefined(value) && value !== null){
- scope.pages = [];
- if (value < 1) {
- scope.totalPages = 1;
- return;
- }
-
- if (value <= 7) {
- for (var i = 1; i <= value; i++) {
- scope.pages.push(i);
- }
- } else if (value > 7) {
- var midVal = Math.ceil(value / 2);
- scope.pages = [midVal - 1, midVal, midVal + 1];
- }
-
- currentPageChanged(1);
- }
- });
-
- scope.$watch('currentPage', function(value) {
- currentPageChanged(value);
- });
-
- function currentPageChanged(value) {
- if (angular.isDefined(value) && value !== null) {
- if (!value) {
- value = 1;
- } else if (!angular.isNumber(value)) {
- value = parseInt(value, 10);
- }
-
- if (value > scope.totalPages) {
- value = scope.totalPages;
- } else if (value < 1) {
- value = 1;
- }
-
- if(scope.currentPage !== value) {
- scope.currentPage = value;
- callbackHandler(scope.currentPage);
- }
-
- if (scope.totalPages > 7) {
- if (value < scope.pages[0] && value > 3) {
- scope.pages = [value, value + 1, value + 2];
- } else if (value > scope.pages[2] && value < scope.totalPages - 2) {
- scope.pages = [value - 2, value - 1, value];
- } else if (value <= 3) {
- scope.pages = [1, 2, 3];
- } else if (value >= scope.totalPages - 2) {
- scope.pages = [scope.totalPages - 2, scope.totalPages - 1, scope.totalPages];
- }
- }
- }
- }
-
- scope.next = function(event) {
- event.preventDefault();
- if (scope.currentPage < scope.totalPages) {
- scope.currentPage += 1;
- callbackHandler(scope.currentPage);
- }
- };
-
- scope.prev = function(event) {
- 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);
- };
-
- var callbackHandler = function(num) {
- if (angular.isFunction(scope.clickHandler))
- {
- scope.clickHandler(num);
- }
- };
-
- scope.checkSelectedPage = function(value) {
- if(scope.currentPage === value) {
- return true;
- }
- return false;
- };
-
- scope.isFocused = function(page) {
- if(scope.focusedPage === page) {
- return true;
- } else {
- return false;
- }
- };
- }
- };
-}]);
-
-angular.module('att.abs.paneSelector',[])
-.constant('paneGroupConstants',{
- SIDE_WIDTH_DEFAULT: '33%',
- INNER_PANE_DEFAULT: '67%',
- SIDE_PANE_ID: 'sidePane',
- NO_DRILL_DOWN: 'none'
-})
-.factory('animation', function(){
- return TweenLite;
-})
-.directive('sideRow', ['$parse',function($parse){
- return {
- restrict: 'A',
- replace:true,
- require: ['^sidePane','^paneGroup'],
- link: function(scope,element,attr,ctrls){
- var sidePaneCtrl = ctrls[0];
- var paneGroupCtrl = ctrls[1];
- if(scope.$first){
- /*
- Reset the sidePaneId array if a new
- set of ngRepeat data appeared
- */
- sidePaneCtrl.sidePaneIds = [];
- }
-
- var paneId =attr['paneId'];
- var drillDownTo = attr['drillDownTo'];
-
- sidePaneCtrl.sidePaneRows.push({'paneId':paneId, 'drillDownTo':drillDownTo});
- element.on('click', function(evnt){
- sidePaneCtrl.currentSelectedRowPaneId = paneId;
- paneGroupCtrl.slideOutPane(paneId,true);
- });
- }
- }
-}])
-.controller('SidePaneCtrl',['$scope', '$element','animation', 'paneGroupConstants',
- function($scope,$element,animation, paneGroupConstants){
-
- this.sidePaneTracker = {};
- this.currentWidth = paneGroupConstants.SIDE_WIDTH_DEFAULT;
- this.paneId = paneGroupConstants.SIDE_PANE_ID;
- this.currentSelectedRowPaneId;
-
- this.drillDownToMapper = {};
-
- this.sidePaneRows = [];
-
- this.init = function(){
-
- var sidePaneRows = this.sidePaneRows;
-
- if(sidePaneRows){
- for(var index in sidePaneRows){
- var paneId = sidePaneRows[index].paneId;
- var drillDownTo = sidePaneRows[index].drillDownTo;
-
- this.drillDownToMapper[paneId] = drillDownTo;
-
- if(index == 0){
- this.currentSelectedRowPaneId = paneId;
- this.sidePaneTracker[paneId] = [];
- }
- }
- }
-
-
- }
-
- this.getSidePanesList = function(){
- return this.sidePaneTracker[this.currentSelectedRowPaneId];
- };
-
- this.addToSidePanesList = function(newPaneId){
- if(this.sidePaneTracker[this.currentSelectedRowPaneId] == undefined)
- this.sidePaneTracker[this.currentSelectedRowPaneId] = [];
- else{
- if(newPaneId)
- this.sidePaneTracker[this.currentSelectedRowPaneId].push(newPaneId);
- }
- };
-
- this.setWidth = function(val){
- if(val)
- this.currentWidth = val;
- animation.set($element,{width:this.currentWidth});
- };
-
- this.resizeWidth = function(val){
- if(val)
- this.currentWidth = val;
- animation.to($element,.5,{width:val});
- };
-
-}])
-.directive('sidePane', ['paneGroupConstants', function(paneGroupConstants){
- return {
- restrict: 'EA',
- transclude: true,
- replace: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/paneSelector/sidePane.html',
- require: ['^paneGroup', 'sidePane'],
- controller: 'SidePaneCtrl',
- scope:{},
- link: function(scope,element,attr, ctrls){
- var paneGroupCtrl = ctrls[0];
- var sidePaneCtrl = ctrls[1];
- paneGroupCtrl.addPaneCtrl(paneGroupConstants.SIDE_PANE_ID, sidePaneCtrl);
- }
- }
-}])
-.directive('drillDownRow', ['$parse', 'paneGroupConstants',function($parse,paneGroupConstants){
- return {
- restrict: 'A',
- replace:true,
- require: ['^innerPane','^paneGroup'],
- link: function(scope,element,attr,ctrls){
- var innerPaneCtrl = ctrls[0];
- var paneGroupCtrl = ctrls[1];
- var sidePaneCtrl = ctrls[2];
-
- element.on('click', function(evnt){
- var drillDownTo = innerPaneCtrl.drillDownTo;
-
- if(innerPaneCtrl.drillDownTo != paneGroupConstants.NO_DRILL_DOWN)
- paneGroupCtrl.slideOutPane(drillDownTo);
- });
- }
- }
-}])
-.controller('InnerPaneCtrl', ['$scope', '$element','animation', 'paneGroupConstants',
- function($scope,$element,animation,paneGroupConstants){
-
- this.paneId = $scope.paneId;
- this.drillDownTo;
- this.currentWidth = paneGroupConstants.INNER_PANE_DEFAULT;
-
- this.setWidth = function(val){
- if(val)
- this.currentWidth = val;
- animation.set($element,{width:this.currentWidth});
- };
-
- this.resizeWidth = function(val,callback){
- animation.to($element,.25,{width:val,onComplete: callback});
- };
-
- this.displayNone = function(){
- animation.set($element, {display:'none'});
- };
-
- this.displayBlock = function(){
- animation.set($element,{display:'block'});
- if(this)
- this.hideRightBorder();
- };
-
- this.floatLeft = function(){
- animation.set($element,{float:'left'});
- };
-
- this.hideLeftBorder = function(){
- animation.set($element, {borderLeftWidth: '0px'});
- };
-
- this.showLeftBorder = function(){
- animation.set($element,{borderLeftWidth: '1px'});
- };
-
- this.hideRightBorder = function(){
- animation.set($element,{borderRightWidth: '0px'});
- };
-
- this.showRightBorder = function(){
- animation.set($element, {borderRightWidth: '1px'});
- };
-
- this.slideFromRight = function(){
- animation.set($element, {float:'right'});
- animation.set($element, {width: this.currentWidth});
- };
-
- this.startOpen = function(){
- return $scope.startOpen;
- };
-
-}])
-.directive('innerPane', function(){
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/paneSelector/innerPane.html',
- require: ['^paneGroup', 'innerPane'],
- controller: 'InnerPaneCtrl',
- scope:{
- paneId:'@'
- },
- link: function(scope,element,attr,ctrls){
-
- if(attr.startOpen == ""){
- scope.startOpen = true;
- }
-
- var paneGroupCtrl = ctrls[0];
- var innerPaneCtrl = ctrls[1];
- paneGroupCtrl.addPaneCtrl(scope.paneId,innerPaneCtrl);
- }
- }
-})
-.controller('PaneGroupCtrl', ['$scope', '$element', 'paneGroupConstants', '$timeout',function($scope,$element,paneGroupConstants,$timeout){
-
- this.panes = {};
- this.accountLevelPaneModel = [];
-
- this.title = $scope.title;
-
- this.init = function(){
- var sidePane = this.panes[paneGroupConstants.SIDE_PANE_ID];
-
- if(sidePane){
-
- sidePane.init();
-
- //Show the other panes that may be set to startOpen
- //numOpen starts at 1 because of the side pane
- var numOpen = 1;
- for(var key in this.panes){
- if(this.panes[key].startOpen && this.panes[key].startOpen())
- numOpen++;
- }
- var width;
- if(numOpen >= 3){
- width = ((100/numOpen)) + '%';
- }
-
-
- if(this.panes[sidePane.currentSelectedRowPaneId])
- {
- if(width){
- sidePane.setWidth(width);
- this.panes[sidePane.currentSelectedRowPaneId].setWidth(width);
- }
- else{
- sidePane.setWidth();
- this.panes[sidePane.currentSelectedRowPaneId].setWidth();
- }
-
- this.panes[sidePane.currentSelectedRowPaneId].displayBlock();
-
- for(var key in this.panes){
- if(key != paneGroupConstants.SIDE_PANE_ID && key != sidePane.currentSelectedRowPaneId)
- this.panes[key].displayNone();
-
- this.panes[key].drillDownTo = sidePane.drillDownToMapper[key];
- }
- }
-
- openOtherPanesOnStart(sidePane, this.panes);
-
- }
-
- function openOtherPanesOnStart(sidePane, panes){
- //Build an array of the panes that need to be out
- var otherPanesStartOpened = [];
- for(var index in sidePane.sidePaneRows){
- var pane = sidePane.sidePaneRows[index];
-
- //Skip the first pane row since we handled it in the begining
- if(index > 0 && panes[pane.paneId].startOpen && panes[pane.paneId].startOpen()){
- otherPanesStartOpened.push(pane);
- //Remember the panes that are opened for the first pane row Index
- sidePane.addToSidePanesList(pane.paneId);
- }
-
- }
-
- if(width){
- for(var index in otherPanesStartOpened){
- var paneId = otherPanesStartOpened[index].paneId;
- var paneCtrl = panes[paneId];
-
- if(paneCtrl && paneCtrl.setWidth && paneCtrl.displayBlock){
- paneCtrl.setWidth(width);
- paneCtrl.displayBlock();
- }
-
- }
- }
-
- }
- }
-
- /*
- Resets all the panels to their original positions at the end of a sidebar click
- By setting the sideBar to its default width
- Setting all panes to float left and displaynone
- Setting the pane that was clicked to default width and slide right
- */
-
- this.resetPanes = function(){
- for(var key in this.panes){
- var pane = this.panes[key];
- if(pane && (pane.paneId != paneGroupConstants.SIDE_PANE_ID)){
- pane.floatLeft();
- pane.displayNone();
- }
- }
-
- if(this.panes[paneGroupConstants.SIDE_PANE_ID])
- this.panes[paneGroupConstants.SIDE_PANE_ID].setWidth(paneGroupConstants.SIDE_WIDTH_DEFAULT);
- };
-
- this.addPaneCtrl = function(paneId,paneCtrl){
- this.panes[paneId] = paneCtrl;
- };
-
- this._slideOutPane = function(paneId,isFromSidePane){
-
- this.resetPanes();
- //Check current side pane stack to see how many panes are already open for that side pane choice
- //then add the new pane that needs to be there
- if(isFromSidePane){
-
- //Check if the side pane id has already been clicked
- var panesList;
-
-
- if(this.panes[paneGroupConstants.SIDE_PANE_ID])
- panesList = this.panes[paneGroupConstants.SIDE_PANE_ID].getSidePanesList();
-
- if(!panesList){
-
- if(this.panes && this.panes[paneGroupConstants.SIDE_PANE_ID] && this.panes[paneId]){
- this.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId = paneId;
- this.panes[paneGroupConstants.SIDE_PANE_ID].addToSidePanesList();
-
- this.panes[paneId].slideFromRight();
- this.panes[paneId].displayBlock();
-
- this.panes[paneId].setWidth(paneGroupConstants.INNER_PANE_DEFAULT);
- }
-
- }else{
- //Restore the panes based on the panelist
- if(panesList.length == 0){
- //Only one pane is out
-
- if(this.panes && this.panes[paneGroupConstants.SIDE_PANE_ID] && this.panes[paneId]){
- this.panes[paneGroupConstants.SIDE_PANE_ID].setWidth(paneGroupConstants.SIDE_WIDTH_DEFAULT);
- this.panes[paneId].displayBlock();
- this.panes[paneId].setWidth(paneGroupConstants.INNER_PANE_DEFAULT);
- }
-
- }else{
-
- if(this.panes && this.panes[paneGroupConstants.SIDE_PANE_ID]){
- //Multiple panes out
- var numPanes = panesList.length + 2;
- var width = ((100/numPanes)) + '%';
- this.panes[paneGroupConstants.SIDE_PANE_ID].setWidth(width);
-
- //Set the sidePanes pane
- //set the panes children list
- if(this.panes && this.panes[this.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId]){
- this.panes[this.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId].displayBlock();
- this.panes[this.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId].setWidth(width);
- }
-
- for(var i in panesList){
- if(this.panes[panesList[i]]){
- this.panes[panesList[i]].displayBlock();
- this.panes[panesList[i]].setWidth(width);
- }
- }
- }
-
- }
- }
-
- }
- else{
-
- //Have to check the paneId that was given and where it is drilling down to
- var isPaneInStack = false;
-
- var stackPaneList
-
- if(this.panes[paneGroupConstants.SIDE_PANE_ID])
- stackPaneList = this.panes[paneGroupConstants.SIDE_PANE_ID].getSidePanesList();
-
- for(var i in stackPaneList){
- var pId = stackPaneList[i];
- if(pId == paneId){
- isPaneInStack = true;
- break;
- }
- }
-
- if(!isPaneInStack){
- if(this.panes[paneGroupConstants.SIDE_PANE_ID])
- this.panes[paneGroupConstants.SIDE_PANE_ID].addToSidePanesList(paneId);
- }
-
- var sidePanesListLength;
-
- if(this.panes[paneGroupConstants.SIDE_PANE_ID])
- sidePanesListLength = this.panes[paneGroupConstants.SIDE_PANE_ID].getSidePanesList().length;
-
- var numPanes = sidePanesListLength + 2;
- var width = ((100/numPanes)) + '%';
-
- if(this.panes[paneGroupConstants.SIDE_PANE_ID])
- this.panes[paneGroupConstants.SIDE_PANE_ID].setWidth(width);
-
- var slideInPaneId;
-
- if(this.panes[paneGroupConstants.SIDE_PANE_ID])
- slideInPaneId = this.panes[paneGroupConstants.SIDE_PANE_ID].getSidePanesList()[sidePanesListLength - 1];
-
- var that = this;
-
- var panesList;
-
- if(that.panes[paneGroupConstants.SIDE_PANE_ID])
- panesList = that.panes[paneGroupConstants.SIDE_PANE_ID].getSidePanesList();
-
- for(var p in panesList){
- var paneId = panesList[p];
- var pane = this.panes[paneId];
- if(paneId != slideInPaneId && pane){
- pane.setWidth(width);
- pane.displayBlock();
- pane.floatLeft();
- }
- }
-
- if(this.panes[this.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId]){
- this.panes[this.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId].displayBlock();
- this.panes[this.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId].showRightBorder();
-
- this.panes[this.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId].resizeWidth(width,function(){
-
- if(that.panes[slideInPaneId] && that.panes[that.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId]){
- that.panes[that.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId].hideRightBorder();
- that.panes[slideInPaneId].setWidth(width);
- that.panes[slideInPaneId].slideFromRight();
- that.panes[slideInPaneId].displayBlock();
- that.panes[slideInPaneId].floatLeft();
- }
-
- });
- }
-
- }
-
- }
-
- this.slideOutPane = function(paneId,isFromSidePane){
- this._slideOutPane(paneId,isFromSidePane);
- };
-
-}])
-.directive('paneGroup', ['$timeout',function($timeout){
- return {
- restrict: 'EA',
- transclude: true,
- replace: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/paneSelector/paneGroup.html',
- scope:{
- },
- controller: 'PaneGroupCtrl',
- link: function(scope,element,attr,ctrl){
-
- $timeout(initialize,100);
-
- function initialize(){
- ctrl.init();
- }
-
- }
- }
-}]);
-angular.module('att.abs.profileCard', [])
-
- .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('profileCard',['$http','$q','profileStatus', function($http,$q,profileStatus) {
- return {
- restrict: 'EA',
- replace:'true',
- templateUrl:function(element, attrs) {
- if(!attrs.addUser){
- return 'app/scripts/ng_js_att_tpls/profileCard/profileCard.html';
- }
- else{
- return 'app/scripts/ng_js_att_tpls/profileCard/addUser.html';
- }
- },
- scope:{
- profile:'='
- },
- link: function(scope, elem, attr){
-
- 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) {
- console.log(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())
- if(scope.profile.state.toUpperCase()===profileStatus.status.LOCKED.status.toUpperCase()){
- scope.profile.lastLogin=scope.profile.state;
- }
- else{
- 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";
- }
- }
- }
- };
- }]);
-angular.module('att.abs.progressBars', [])
-
-.directive('attProgressBar', [ function() {
- return {
- restrict: 'A',
- replace: true,
- templateUrl : 'app/scripts/ng_js_att_tpls/progressBars/progressBars.html'
- };
-}]);
-angular.module('att.abs.radio', [])
- .constant('attRadioConfig', {
- activeClass : "att-radio--on",
- disabledClass : "att-radio--disabled"
- })
-.directive('attRadio', ['$compile','attRadioConfig', function ($compile, attRadioConfig) {
- return {
- scope: {},
- restrict: 'A',
- require: 'ngModel',
- link: function (scope, element, attr, ctrl) {
- var ngCtrl = ctrl;
- var parentDiv = $compile('<div tabindex="0" role="radio" att-accessibility-click="13,32" ng-click="updateModel($event)" class="att-radio"></div>')(scope);
-
- element.wrap(parentDiv);
- element.parent().append('<div class="att-radio__indicator"></div>');
- element.parent().attr("title", attr.title);
- element.attr("tabindex","-1");
-
- ngCtrl.$render = function () {
- var selected = angular.equals(ngCtrl.$modelValue, attr.attRadio);
- element.parent().toggleClass(attRadioConfig.activeClass, selected);
- element.parent().attr("aria-checked", selected)
- };
-
- scope.updateModel = function (evt) {
- var isActive = element.parent().hasClass(attRadioConfig.activeClass);
-
- if (!isActive && !scope.disabled) {
- ngCtrl.$setViewValue(isActive ? null : attr.attRadio);
- ngCtrl.$render();
- }
- evt.preventDefault();
- };
-
- attr.$observe('disabled', function (val) {
- scope.disabled = (val === true || val === "disabled" || val === "true");
- element.parent().toggleClass(attRadioConfig.disabledClass, scope.disabled);
- element.parent().attr("tabindex", scope.disabled ? "-1" : "0");
- });
- }
- };
-}]);
-
-angular.module('att.abs.scrollbar', [])
- .directive('attScrollbar', ['$window', '$timeout', '$parse', '$animate', function ($window, $timeout, $parse, $animate) {
- return {
- restrict: 'A',
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/scrollbar/scrollbar.html',
- controller: ['$scope','$element','$attrs', function($scope, $element, $attrs) {
- var defaults = {
- axis: 'y', // Vertical or horizontal scrollbar? ( x || y ).
- wheel: true, // Enable or disable the mousewheel;
- wheelSpeed: 40, // How many pixels must the mouswheel scroll at a time.
- wheelLock: true, // Lock default scrolling window when there is no more content.
- scrollInvert: false, // Enable invert style scrolling
- trackSize: false, // Set the size of the scrollbar to auto or a fixed number.
- thumbSize: false, // Set the size of the thumb to auto or a fixed number.
- alwaysVisible: true // Set to false to hide the scrollbar if not being used
- };
- var options = $attrs.scrollbar;
- if (options) {
- options = $parse(options)($scope);
- } else {
- options = {};
- }
- this.options = angular.extend({}, defaults, options);
- this._defaults = defaults;
-
- var self = this,
- $body = angular.element(document.querySelectorAll('body')[0]),
- $document = angular.element(document),
- $viewport = angular.element($element[0].querySelectorAll('.scroll-viewport')[0]),
- $overview = angular.element($element[0].querySelectorAll('.scroll-overview')[0]),
- $scrollbar = angular.element($element[0].querySelectorAll('.scroll-bar')[0]),
- $thumb = angular.element($element[0].querySelectorAll('.scroll-thumb')[0]),
- mousePosition = 0,
- isHorizontal = this.options.axis === 'x',
- hasTouchEvents=false,
- wheelEvent = ("onwheel" in document ? "wheel" : // Modern browsers support "wheel"
- document.onmousewheel !== undefined ? "mousewheel" : // Webkit and IE support at least "mousewheel"
- "DOMMouseScroll"), // let's assume that remaining browsers are older Firefox
- sizeLabel = isHorizontal ? 'width' : 'height',
- sizeLabelCap = sizeLabel.charAt(0).toUpperCase() + sizeLabel.slice(1).toLowerCase(),
- posiLabel = isHorizontal ? 'left' : 'top',
- // moveEvent = document.createEvent('HTMLEvents'),
- restoreVisibilityAfterWheel,
- thumbscrolltouch=false,documnetscrolltouch=false;
- if(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {
- hasTouchEvents = true;
- }
-
- //moveEvent.initEvent('move', true, true);
- this.contentPosition = 0;
- this.viewportSize = 0;
- this.contentSize = 0;
- this.contentRatio = 0;
- this.trackSize = 0;
- this.trackRatio = 0;
- this.thumbSize = 0;
- this.thumbPosition = 0;
-
- this.initialize = function() {
- if (!this.options.alwaysVisible) {
- $scrollbar.css('opacity', 0);
- }
- self.update();
- setEvents();
- return self;
- };
-
- this.update = function(scrollTo) {
- this.viewportSize = $viewport.prop('offset' + sizeLabelCap) || 1;
- this.contentSize = $overview.prop('scroll' + sizeLabelCap) || 1;
- this.contentRatio = this.viewportSize / this.contentSize;
- this.trackSize = this.options.trackSize || this.viewportSize;
- this.thumbSize = Math.min(this.trackSize, Math.max(0, (this.options.thumbSize || (this.trackSize * this.contentRatio))));
- this.trackRatio = this.options.thumbSize ? (this.contentSize - this.viewportSize) / (this.trackSize - this.thumbSize) : (this.contentSize / this.trackSize);
- mousePosition = $scrollbar.prop('offsetTop');
-
- $scrollbar.toggleClass('disable', this.contentRatio >= 1 || isNaN(this.contentRatio));
-
- if (!this.options.alwaysVisible && this.contentRatio < 1 && this.viewportSize > 0) {
- //flash the scrollbar when update happens
- $animate.addClass($scrollbar, 'visible').then(function() {
- $animate.removeClass($scrollbar, 'visible');
- $scope.$digest();
- });
- }
-
- if (scrollTo !== null) {
- switch (scrollTo) {
- case 'bottom':
- this.contentPosition = this.contentSize - this.viewportSize;
- break;
- default:
- this.contentPosition = parseInt(scrollTo, 10) || 0;
- }
- }
-
- ensureContentPosition();
- $thumb.css(posiLabel, self.contentPosition / self.trackRatio + 'px');
- $scrollbar.css(sizeLabel, self.trackSize + 'px');
- $thumb.css(sizeLabel, self.thumbSize + 'px');
- $overview.css(posiLabel, -self.contentPosition + 'px');
-
- return this;
- };
- fireEvent = function(obj, evt) {
- var fireOnThis = obj;
- if (document.createEvent) {
- // alert("FF");
- var evtObj = document.createEvent('HTMLEvents');
- evtObj.initEvent(evt, true, false);
- fireOnThis.dispatchEvent(evtObj);
- }
- else if (document.createEventObject) {
- // alert("IE8");
- var evtObj = document.createEventObject();
- fireOnThis.fireEvent('on' + evt, evtObj);
- }
- };
- function ensureContentPosition() {
- // if scrollbar is on, ensure the bottom of the content does not go above the bottom of the viewport
- if (self.contentRatio <= 1 && self.contentPosition > self.contentSize - self.viewportSize) {
- self.contentPosition = self.contentSize - self.viewportSize;
- }
- // if scrollbar is off, ensure the top of the content does not go below the top of the viewport
- else if (self.contentRatio > 1 && self.contentPosition > 0) {
- self.contentPosition = 0;
- }
- }
-
- function setEvents() {
-
- if (hasTouchEvents) {
- $viewport.on('touchstart', touchstart);
- $thumb.on('touchstart', touchstart);
- }
- else {
- $thumb.on('mousedown', start);
- $scrollbar.on('mousedown', drag);
- }
-
- angular.element($window).on('resize', resize);
-
- if (self.options.wheel) {
- $element.on(wheelEvent, wheel);
- }
- }
-
- function resize() {
- self.update();
- }
-
- function touchstart(event) {
- if (1 === event.touches.length) {
- event.stopPropagation();
- start(event.touches[0]);
- }
- }
-
- function start(event) {
- $body.addClass('scroll-no-select');
- $element.addClass('scroll-no-select');
-
- if (!self.options.alwaysVisible) {
- $scrollbar.addClass('visible');
- }
- mousePosition = isHorizontal ? event.clientX : event.clientY;
- self.thumbPosition = parseInt($thumb.css(posiLabel), 10) || 0;
-
- if (hasTouchEvents) {
- documnetscrolltouch=false;
- thumbscrolltouch=false;
- $viewport.on('touchmove', touchdrag);
- $viewport.on('touchend', end);
- $thumb.on('touchmove',touchdragthumb);
- $thumb.on('touchend', end);
- } else {
- $document.on('mousemove', drag);
- $document.on('mouseup', end);
- $thumb.on('mouseup', end);
- }
- }
-
- function wheel(event) {
-
- if (self.contentRatio >= 1) {
- return;
- }
-
- if (!self.options.alwaysVisible) {
- //cancel removing visibility if wheel event is triggered before the timeout
- if (restoreVisibilityAfterWheel) {
- $timeout.cancel(restoreVisibilityAfterWheel);
- }
- $scrollbar.addClass('visible');
-
- restoreVisibilityAfterWheel = $timeout(function() {
- $scrollbar.removeClass('visible');
- }, 100);
- }
-
-
- var evntObj = (event && event.originalEvent) || event || $window.event,
- deltaDir = self.options.axis.toUpperCase(),
- delta = {
- X: evntObj.deltaX,
- Y: evntObj.deltaY
- },
- wheelSpeed = evntObj.deltaMode === 0 ? self.options.wheelSpeed : 1;
-
- if (self.options.scrollInvert) {
- wheelSpeed *= -1;
- }
-
- if (wheelEvent === 'mousewheel') {
- delta.Y = -1 * evntObj.wheelDelta / 40;
- evntObj.wheelDeltaX && (delta.X = -1 * evntObj.wheelDeltaX / 40);
- }
- delta.X *= -1 / wheelSpeed;
- delta.Y *= -1 / wheelSpeed;
-
- var wheelSpeedDelta = delta[deltaDir];
-
- self.contentPosition -= wheelSpeedDelta * self.options.wheelSpeed;
- self.contentPosition = Math.min((self.contentSize - self.viewportSize), Math.max(0, self.contentPosition));
-
-
- //$element[0].dispatchEvent(moveEvent);
- fireEvent($element[0], 'move');
-
- ensureContentPosition();
- $thumb.css(posiLabel, self.contentPosition / self.trackRatio + 'px');
- $overview.css(posiLabel, -self.contentPosition + 'px');
-
- if (self.options.wheelLock || (self.contentPosition !== (self.contentSize - self.viewportSize) && self.contentPosition !== 0)) {
- evntObj.preventDefault();
- }
- }
-
- function touchdrag(event) {
- event.preventDefault();
- documnetscrolltouch=true;
- drag(event.touches[0]);
- }
- function touchdragthumb(event){
- event.preventDefault();
- thumbscrolltouch=true;
- drag(event.touches[0]);
- }
-
- function drag(event) {
-
- if (self.contentRatio >= 1) {
- return;
- }
- var mousePositionNew = isHorizontal ? event.clientX : event.clientY,
- thumbPositionDelta = mousePositionNew - mousePosition;
-
- if ((self.options.scrollInvert && !hasTouchEvents) ||
- (hasTouchEvents && !self.options.scrollInvert))
- {
- thumbPositionDelta = mousePosition - mousePositionNew;
- }
- if(documnetscrolltouch && hasTouchEvents){
- thumbPositionDelta = mousePosition - mousePositionNew;
- }
- if(thumbscrolltouch && hasTouchEvents){
- thumbPositionDelta = mousePositionNew - mousePosition;
- }
- var thumbPositionNew = Math.min((self.trackSize - self.thumbSize), Math.max(0, self.thumbPosition + thumbPositionDelta));
- self.contentPosition = thumbPositionNew * self.trackRatio;
-
-
- // $element[0].dispatchEvent(moveEvent);
- fireEvent($element[0], 'move');
-
- ensureContentPosition();
- $thumb.css(posiLabel, thumbPositionNew + 'px');
- $overview.css(posiLabel, -self.contentPosition + 'px');
- }
-
- function end() {
-
- $body.removeClass('scroll-no-select');
- $element.removeClass('scroll-no-select');
- if (!self.options.alwaysVisible) {
- $scrollbar.removeClass('visible');
- }
- $document.off('mousemove', drag);
- $document.off('mouseup', end);
- $thumb.off('mouseup', end);
- $document.off('touchmove', touchdrag);
- $document.off('ontouchend', end);
- $thumb.off('touchmove',touchdragthumb);
- $thumb.off('touchend', end);
- }
- this.cleanup = function() {
- $viewport.off('touchstart', touchstart);
- $thumb.off('mousedown', start);
- $scrollbar.off('mousedown', drag);
- $thumb.off('touchmove',touchdragthumb);
- $thumb.off('touchend', end);
- angular.element($window).off('resize', resize);
- $element.off(wheelEvent, wheel);
- //ensure scrollbar isn't activated
- self.options.alwaysVisible = true;
- end();
- };
-
- }],
- link: function(scope, iElement, iAttrs, controller) {
- var position = iElement.css('position');
- if (position !== 'relative' && position !== 'absolute') {
- iElement.css('position', 'relative');
- }
- scope.$watch(function() {
- $timeout(function() {
- var $overview = angular.element(iElement[0].querySelectorAll('.scroll-overview')[0]);
- var newValue = $overview.prop('scrollHeight');
- var oldValue = scope.oldValue;
- if (newValue !== oldValue) {
- scope.oldValue = newValue;
- controller.update();
- }
- }, 100, false);
- });
- controller.initialize();
- iElement.on('$destroy', function() {
- controller.cleanup();
- });
- }
- };
-}]);
-(function(){
-var 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 KEY.COMMAND:
- case KEY.SHIFT:
- case KEY.CTRL:
- case KEY.ALT:
- return true;
- }
-
- 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 ~[KEY.UP, KEY.DOWN].indexOf(k);
- },
- isHorizontalMovement: function (k){
- return ~[KEY.LEFT,KEY.RIGHT,KEY.BACKSPACE,KEY.DELETE].indexOf(k);
- }
- };
-
-angular.module('att.abs.search', ['att.abs.utilities', 'att.abs.position', 'att.abs.utilities'])
-
-.directive('attSearch', ["$document", "$filter", "$isElement", '$documentBind', "$timeout", function($document,$filter,$isElement,$documentBind,$timeout){
- return{
- restrict: 'A',
- scope:{cName: '=attSearch'},
- transclude: false,
- replace: false,
- require:'ngModel',
- templateUrl: 'app/scripts/ng_js_att_tpls/search/search.html',
- link: function(scope, element, attr, ctrl) {
-
- scope.selectedIndex = -1;
- scope.selectedOption = attr.placeholder;
- scope.isDisabled = false;
- scope.className = "select2-match";
- scope.showSearch = false;
- scope.showlist = false;
-
- if(attr.placeholderAsOption === "false")
- {
- scope.selectMsg = "";
- }
- else
- {
- scope.selectMsg = attr.placeholder;
- }
-
- if(attr.showInputFilter === "true"){scope.showSearch = true;}
-
- scope.showDropdown = function(){
- if(!(attr.disabled)){
- scope.showlist = !scope.showlist;
- scope.setSelectTop();
- }
- };
-
- element.bind("keydown", function(e){
- if (e.keyCode === KEY.BACKSPACE || e.keyCode === KEY.SPACE || e.keyCode === KEY.ESC || e.keyCode === KEY.ENTER || KEY.isControl(e) || KEY.isVerticalMovement(e.keyCode) || KEY.isHorizontalMovement(e.keyCode) || KEY.isFunctionKey(e.keyCode))
- {
- e.preventDefault();
- e.stopPropagation();
-
- switch (e.keyCode) {
- case KEY.DOWN:
- scope.selectNext();
- break;
- case KEY.UP:
- scope.selectPrev();
- break;
- case KEY.ENTER:
- scope.selectCurrent();
- break;
- case KEY.BACKSPACE:
- scope.title = "";
- scope.$apply();
- break;
- case KEY.SPACE:
- scope.title += " ";
- scope.$apply();
- break;
- case KEY.ESC:
- if(scope.title === "")
- {
- scope.showlist = false;
- scope.$apply();
- }
- else
- {
- scope.title = "";
- scope.$apply();
- }
- break;
- }
- }
- else
- {
- if(scope.showSearch === false && e.keyCode !== 9)
- {
- scope.showlist = true;
- scope.title = scope.title ? scope.title + String.fromCharCode(e.keyCode):String.fromCharCode(e.keyCode);
- scope.$apply();
- }
- else if(e.keyCode === 9)
- {
- scope.showlist = false;
- scope.title = "";
- scope.$apply();
- }
- }
- });
-
- scope.selectOption = function(sTitle,sIndex,keepOpen)
- {
- if(sIndex === -1 || sIndex === "-1"){
- scope.selCategory = "";
- scope.selectedIndex = -1;
- ctrl.$setViewValue("");
- scope.selectedOption = scope.selectMsg;
- }
- else
- {
- scope.selCategory = scope.cName[sIndex];
- scope.selectedIndex = sIndex;
- ctrl.$setViewValue(scope.selCategory);
- scope.selectedOption = scope.selCategory.title;
- }
- scope.title = "";
- if(!keepOpen)
- {
- scope.showlist = false;
- }
- };
-
- if(attr.disabled)
- {
- scope.isDisabled = true;
- }
-
- scope.selectCurrent = function()
- {
- if(scope.showlist === true)
- {
- scope.selectOption(scope.selectMsg,scope.selectedIndex ,false);
- scope.$apply();
- }
- else
- {
- scope.showlist = true;
- scope.setSelectTop();
- scope.$apply();
- }
- };
-
- scope.hoverIn = function(cItem)
- {
- scope.selectedIndex = cItem;
- };
-
- scope.setSelectTop = function()
- {
- $timeout(function ()
- {
- if(scope.showlist ===true)
- {
- var containerUL = angular.element(element)[0].querySelector(".select2-results");
- var selectedElemTopPos = angular.element(containerUL.querySelector('.select2-result-current'))[0].offsetTop;
- angular.element(containerUL)[0].scrollTop = selectedElemTopPos;
- }
- });
- };
-
-
- scope.setCurrentTop = function()
- {
- $timeout(function ()
- {
- if(scope.showlist ===true)
- {
- var containerUL = angular.element(element)[0].querySelector(".select2-results");
- var selectedElemTopPos = angular.element(containerUL.querySelector('.hovstyle'))[0].offsetTop;
- //angular.element(containerUL)[0].scrollTop = selectedElemTopPos;
- if(selectedElemTopPos < (angular.element(containerUL)[0].scrollTop) )
- {
- angular.element(containerUL)[0].scrollTop -= 30;
- }
- else if((selectedElemTopPos + 30) > (angular.element(containerUL)[0].clientHeight))
- {
- angular.element(containerUL)[0].scrollTop += 30;
- }
-
- }
- });
- };
-
- scope.selectNext = function()
- {
- if((scope.selectedIndex + 1) <= (scope.cName.length-1))
- {
- scope.selectedIndex += 1;
- if(scope.showlist === false)
- {
- scope.selectOption(scope.selectMsg,scope.selectedIndex ,false);
- }
- scope.$apply();
- }
- scope.setCurrentTop();
- };
-
- scope.selectPrev = function()
- {
- if((scope.selectedIndex - 1) >= 0)
- {
- scope.selectedIndex -= 1;
- if(scope.showlist === false)
- {
- scope.selectOption(scope.selectMsg,scope.selectedIndex ,false);
- }
- scope.$apply();
- }
- else if(scope.selectedIndex -1 < 0)
- {
- scope.selectedIndex = -1;
- if(scope.showlist === false)
- {
- scope.selectOption(scope.selectMsg,scope.selectedIndex ,false);
- }
- scope.$apply();
- }
- scope.setCurrentTop();
-
- };
-
- scope.updateSelection = function(sItem)
- {
- scope.selectedOption = sItem.title;
- //scope.selectedIndex = -1;
- scope.title = "";
- };
-
- scope.$watch('selCategory',function(value)
- {
- if(value){
- scope.updateSelection(value);
- };
- });
-
- ctrl.$viewChangeListeners.push(function(){
- scope.$eval(attr.ngChange);
- });
-
- ctrl.$render = function(){
- scope.selCategory = ctrl.$viewValue;
- };
-
- var outsideClick = function(e){
- var isElement = $isElement(angular.element(e.target), element, $document);
- if(!isElement) {
- scope.showlist = false;
- scope.$apply();
- }
- };
-
- $documentBind.click('showlist', outsideClick, scope);
- }
- };
-}]);
-}());
-
-(function(){
-var 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 KEY.COMMAND:
- case KEY.SHIFT:
- case KEY.CTRL:
- case KEY.ALT:
- return true;
- }
-
- 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 ~[KEY.UP, KEY.DOWN].indexOf(k);
- },
- isHorizontalMovement: function (k){
- return ~[KEY.LEFT,KEY.RIGHT,KEY.BACKSPACE,KEY.DELETE].indexOf(k);
- }
- };
-
-angular.module('att.abs.select', ['att.abs.utilities', 'att.abs.position', 'att.abs.utilities'])
-
-.filter('startsWith', function() {
- if (typeof String.prototype.startsWith != 'function') {
- // see below for better implementation!
- String.prototype.startsWith = function (str){
- return this.indexOf(str) === 0;
- };
- }
-
- return function(items, searchString) {
- if (searchString === undefined || searchString === "") return items;
-
- var filtered = [];
- angular.forEach(items, function(item) {
- if (item.title.toLowerCase().startsWith(searchString.toLowerCase())) {
- filtered.push(item);
- }
- });
- return filtered;
- };
-})
-
-.directive('attSelect', ["$document", "$filter", "$isElement", '$documentBind', "$timeout", function($document,$filter,$isElement,$documentBind,$timeout){
- return{
- restrict: 'A',
- scope:{cName: '=attSelect'},
- transclude: false,
- replace: false,
- require:'ngModel',
- templateUrl: 'app/scripts/ng_js_att_tpls/select/select.html',
- link: function(scope, element, attr, ctrl) {
-
- scope.selectedIndex = -1;
- scope.selectedOption = attr.placeholder;
- scope.isDisabled = false;
- scope.className = "select2-match";
- scope.showSearch = false;
- scope.showlist = false;
-
- if(attr.placeholderAsOption === "false")
- {
- scope.selectMsg = "";
- }
- else
- {
- scope.selectMsg = attr.placeholder;
- }
-
- if (attr.startsWithFilter === "true" || attr.startsWithFilter === true) {
- scope.startsWithFilter = true;
- }
-
- if(attr.showInputFilter === "true"){scope.showSearch = true;}
-
- scope.showDropdown = function(){
- if(!(attr.disabled)){
- scope.showlist = !scope.showlist;
- scope.setSelectTop();
- }
- };
-
- element.bind("keydown", function(e){
- if (e.keyCode === KEY.BACKSPACE || e.keyCode === KEY.SPACE || e.keyCode === KEY.ESC || e.keyCode === KEY.ENTER || KEY.isControl(e) || KEY.isVerticalMovement(e.keyCode) || KEY.isHorizontalMovement(e.keyCode) || KEY.isFunctionKey(e.keyCode))
- {
- e.preventDefault();
- e.stopPropagation();
-
- switch (e.keyCode) {
- case KEY.DOWN:
- scope.selectNext();
- break;
- case KEY.UP:
- scope.selectPrev();
- break;
- case KEY.ENTER:
- scope.selectCurrent();
- break;
- case KEY.BACKSPACE:
- scope.title = "";
- scope.$apply();
- break;
- case KEY.SPACE:
- scope.title += " ";
- scope.$apply();
- break;
- case KEY.ESC:
- if(scope.title === "")
- {
- scope.showlist = false;
- scope.$apply();
- }
- else
- {
- scope.title = "";
- scope.$apply();
- }
- break;
- }
- }
- else
- {
- if(scope.showSearch === false && e.keyCode !== 9)
- {
- scope.showlist = true;
- scope.title = scope.title ? scope.title + String.fromCharCode(e.keyCode):String.fromCharCode(e.keyCode);
- scope.$apply();
- }
- else if(e.keyCode === 9)
- {
- scope.showlist = false;
- scope.title = "";
- scope.$apply();
- }
- }
- });
-
- scope.selectOption = function(sTitle,sIndex,keepOpen)
- {
- if(sIndex === -1 || sIndex === '-1'){
- scope.selCategory = "";
- scope.selectedIndex = -1;
- ctrl.$setViewValue("");
- scope.selectedOption = scope.selectMsg;
- }
- else
- {
- scope.selCategory = scope.cName[sIndex];
- scope.selectedIndex = sIndex;
- ctrl.$setViewValue(scope.selCategory);
- scope.selectedOption = scope.selCategory.title;
- }
- scope.title = "";
- if(!keepOpen)
- {
- scope.showlist = false;
- }
- };
-
- if(attr.disabled)
- {
- scope.isDisabled = true;
- }
-
- scope.selectCurrent = function()
- {
- if(scope.showlist === true)
- {
- scope.selectOption(scope.selectMsg,scope.selectedIndex ,false);
- scope.$apply();
- }
- else
- {
- scope.showlist = true;
- scope.setSelectTop();
- scope.$apply();
- }
- };
-
- scope.hoverIn = function(cItem)
- {
- scope.selectedIndex = cItem;
- };
-
- scope.setSelectTop = function()
- {
- $timeout(function ()
- {
- if(scope.showlist ===true)
- {
- var containerUL = angular.element(element)[0].querySelector(".select2-results");
- var selectedElemTopPos = angular.element(containerUL.querySelector('.select2-result-current'))[0].offsetTop;
- angular.element(containerUL)[0].scrollTop = selectedElemTopPos;
- }
- });
- };
-
-
- scope.setCurrentTop = function()
- {
- $timeout(function ()
- {
- if(scope.showlist ===true)
- {
- var containerUL = angular.element(element)[0].querySelector(".select2-results");
- var selectedElemTopPos = angular.element(containerUL.querySelector('.hovstyle'))[0].offsetTop;
- //angular.element(containerUL)[0].scrollTop = selectedElemTopPos;
- if(selectedElemTopPos < (angular.element(containerUL)[0].scrollTop) )
- {
- angular.element(containerUL)[0].scrollTop -= 30;
- }
- else if((selectedElemTopPos + 30) > (angular.element(containerUL)[0].clientHeight))
- {
- angular.element(containerUL)[0].scrollTop += 30;
- }
-
- }
- });
- };
-
- scope.selectNext = function()
- {
- if((scope.selectedIndex + 1) <= (scope.cName.length-1))
- {
- scope.selectedIndex += 1;
- if(scope.showlist === false)
- {
- scope.selectOption(scope.selectMsg,scope.selectedIndex ,false);
- }
- scope.$apply();
- }
- scope.setCurrentTop();
- };
-
- scope.selectPrev = function()
- {
- if((scope.selectedIndex - 1) >= 0)
- {
- scope.selectedIndex -= 1;
- if(scope.showlist === false)
- {
- scope.selectOption(scope.selectMsg,scope.selectedIndex ,false);
- }
- scope.$apply();
- }
- else if(scope.selectedIndex -1 < 0)
- {
- scope.selectedIndex = -1;
- if(scope.showlist === false)
- {
- scope.selectOption(scope.selectMsg,scope.selectedIndex ,false);
- }
- scope.$apply();
- }
- scope.setCurrentTop();
-
- };
-
- scope.updateSelection = function(sItem)
- {
- scope.selectedOption = sItem.title;
- //scope.selectedIndex = -1;
- scope.title = "";
- };
-
- scope.$watch('selCategory',function(value)
- {
- if(value){
- scope.updateSelection(value);
- };
- });
-
- ctrl.$viewChangeListeners.push(function(){
- scope.$eval(attr.ngChange);
- });
-
- ctrl.$render = function(){
- scope.selCategory = ctrl.$viewValue;
- };
-
- var outsideClick = function(e){
- var isElement = $isElement(angular.element(e.target), element, $document);
- if(!isElement) {
- scope.showlist = false;
- scope.$apply();
- }
- };
-
- $documentBind.click('showlist', outsideClick, scope);
- }
- };
-}])
-
-.directive('textDropdown', ['$document', '$isElement', '$documentBind', function($document,$isElement,$documentBind) {
- return {
- restrict: 'EA',
- replace: true,
- scope: {
- actions: '=actions',
- defaultAction: '=defaultAction',
- onActionClicked: '=?'
- },
- templateUrl : 'app/scripts/ng_js_att_tpls/select/textDropdown.html',
-
- link: function(scope, element, attr, ctrl) {
- scope.selectedIndex = 0;
- scope.selectedOption = attr.placeholder;
- scope.isDisabled = false;
- scope.isActionsShown = false;
-
- if(scope.defaultAction == undefined)
- {
- scope.currentAction = scope.actions[0];
- scope.selectedIndex = 0;
- } else if (scope.defaultAction != undefined || scope.defaultAction != '') {
- for (var act in scope.actions)
- {
- if (scope.actions[act] === scope.defaultAction)
- {
- scope.currentAction = scope.actions[act];
- scope.selectedIndex = scope.actions.indexOf(act);
- scope.isActionsShown = false;
-
- break;
- }
- }
-
- } else {
- scope.currentAction = scope.actions[0];
- }
-
- scope.toggle = function() {
- scope.isActionsShown = !scope.isActionsShown;
- }
-
- scope.chooseAction = function($event, action){
-
- if ($event != null) {
- scope.currentAction = action;
- scope.selectedIndex = scope.actions.indexOf(action);
-
- }
-
- else {
- scope.currentAction = scope.actions[scope.selectedIndex];
- }
-
- if (angular.isFunction(scope.onActionClicked))
- {
- scope.onActionClicked(scope.currentAction);
- }
-
- scope.toggle();
- }
-
- scope.isCurrentAction = function(action) {
- return (action === scope.currentAction);
- };
-
- // cato
- element.bind("keydown", function(e){
- if (e.which === KEY.ENTER || KEY.isVerticalMovement(e.which) || KEY.isHorizontalMovement(e.which))
- {
- e.preventDefault();
- e.stopPropagation();
- switch (e.keyCode) {
- case KEY.DOWN:
- scope.selectNext();
- break;
- case KEY.UP:
- scope.selectPrev();
- break;
- case KEY.ENTER:
- scope.selectCurrent();
- break;
- case KEY.ESC:
- scope.isActionsShown = false;
- scope.$apply();
- }
- scope.$apply();
- return;
- }
- });
-
- if(attr.disabled)
- {
- scope.isDisabled = true;
- }
-
-
- scope.selectCurrent = function()
- {
- if (scope.selectedIndex < 0)
- {
- scope.selectedIndex = 0;
- }
-
-
- if(!scope.isActionsShown) {
- scope.toggle();
- }
- else {
- scope.chooseAction(null, scope.currentAction);
- }
- };
-
- scope.selectNext = function()
- {
- if(scope.isActionsShown)
- {
- if((scope.selectedIndex + 1) < scope.actions.length)
- {
- scope.selectedIndex += 1;
- scope.$apply();
-
- }
- else{
- scope.selectedIndex = (scope.actions.length - 1);
- scope.$apply();
-
- }
- }
- };
-
- scope.selectPrev = function()
- {
- if(scope.isActionsShown)
- {
- if((scope.selectedIndex - 1) >= 0)
- {
- scope.selectedIndex -= 1;
- scope.$apply();
- }
- else if(scope.selectedIndex - 1 < 0)
- {
- scope.selectedIndex = 0;
- scope.$apply();
- }
- }
- };
-
- scope.hoverIn = function(cItem)
- {
- scope.selectedIndex = cItem;
- };
-
-
- //end cato
-
- var outsideClick = function(e) {
- var isElement = $isElement(angular.element(e.target), element, $document);
-
- if(!isElement) {
- scope.toggle();
- scope.$apply();
- }
-
- };
-
- $documentBind.click('isActionsShown', outsideClick, scope);
-
- }
- };
-}]);
-
-}());
-
-angular.module('att.abs.slider', ['att.abs.position'])
- .constant('sliderDefaultOptions', {
- width: 300,
- step: 1,
- precision: 0,
- disabledWidth: 116,
- })
- .directive('attSlider', ['sliderDefaultOptions','$position', function(sliderDefaultOptions,$position)
- {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- scope: {
- floor: "=", // the minimum possible value
- ceiling: "=", // the maximum possible value
- step: "@", // how wide is each step
- precision: "@", // how many decimal places do we care about
- width: "@", //how wide the bar would be
- textDisplay: "=", // Labels of max and min values to be displayed at front End
- value: "=", // Value of Current Position model
- ngModelSingle: '=?',
- ngModelLow: '=?',
- ngModelHigh: '=?',
- ngModelDisabled: '=?'
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/slider/slider.html',
- link: function(scope, elem, attr, ctrl)
- {
- var minOffset, maxOffset, newOffset, offsetRange, valueRange, start_x = 0, disabledRange, disabled, evFlag = false, minValue, maxValue, range, refLow, refHigh, maxPtr, minPtr, singlePtr, getHandles;
- scope.minPtrOffset = 0;
- scope.maxPtrOffset = 0;
- var disableWidth = sliderDefaultOptions.disabledWidth;
-
- //Get handles
- var obj = elem.children();
- disabledRange = obj[0].children;
- disabledRange = angular.element(disabledRange[0]);
- getHandles = obj[1].children;
- singlePtr = angular.element(getHandles[0]);
- minPtr = angular.element(getHandles[1]);
- maxPtr = angular.element(getHandles[2]);
- disabled = ((attr.ngModelSingle == null) && (attr.ngModelLow == null) && (attr.ngModelHigh == null)) && (attr.ngModelDisabled != null);
- range = (attr.ngModelSingle == null) && ((attr.ngModelLow != null) && (attr.ngModelHigh != null));
- refLow = 'ngModelLow';
- refHigh = 'ngModelHigh';
- if (!range) {
- minPtr.remove();
- maxPtr.remove();
- }
- else {
- singlePtr.remove();
- }
- if (!disabled) {
- disabledRange.remove();
- }
- else {
- scope.disabledStyle = {width: disableWidth + 'px', zIndex: 1};
- scope.handleStyle = {left: disableWidth + 'px'};
- }
- minValue = parseFloat(scope.floor);
- maxValue = parseFloat(scope.ceiling);
- valueRange = maxValue - minValue;
- minOffset = 0;
- if (attr.width !== undefined) {
- maxOffset = attr.width;
- }
- else {
- if (elem[0].clientWidth !== 0) {
- maxOffset = elem[0].clientWidth;
- }
- else {
- maxOffset = sliderDefaultOptions.width;
- }
- }
- offsetRange = maxOffset - minOffset;
-
- //Key Down Event
- scope.keyDown = function(ev){
- if(ev.keyCode == 39){
- var elemLeft = $position.position(elem).left;
- if (newOffset){
- newOffset = sliderDefaultOptions.step + newOffset;
- }
- else{newOffset = sliderDefaultOptions.step + elemLeft;}
- }
- else if(ev.keyCode == 37){
- var ptrLeft = $position.position(singlePtr).left;
- var elemLeft = $position.position(elem).left;
- if(newOffset){
- if (newOffset!=0){
- newOffset = newOffset - sliderDefaultOptions.step ;
- }
- }
- else{
- newOffset = ptrLeft - sliderDefaultOptions.step ;}
- }
-
- if(newOffset>=0){
-
- scope.ptrOffset(newOffset);
- }
-
- };
-
- //Mouse Down Event
- scope.mouseDown = function(e, ref) {
- scope.ref = ref;
- evFlag = true;
- if (!range){
- if (newOffset)
- {
- start_x = e.clientX - newOffset;
-
- }
- else {
- start_x = e.clientX;
- }
- } else {
- if (scope.ref == refLow) {
- start_x = e.clientX - scope.minPtrOffset;
-
- }
- else {
- start_x = e.clientX - scope.maxPtrOffset;
- }
- }
- if (disabled) {
- scope.ref= 'ngModelDisabled';
- scope.disabledStyle = {width: disableWidth + 'px', zIndex: 1};
- }
- };
-
- // Mouse Move Event
- scope.moveElem = function(ev) {
- if (evFlag) {
- var eventX, newPercent, newValue;
- eventX = ev.clientX;
- newOffset = eventX - start_x;
- scope.ptrOffset(newOffset);
- }
- };
-
- // Mouse Up Event
- scope.mouseUp = function(ev) {
- evFlag = false;
- minPtr.removeClass('dragging');
- maxPtr.removeClass('dragging');
- singlePtr.removeClass('dragging');
- $(document).off('mousemove');
- };
-
- //Function to calculate the current PositionValue
- scope.calStep = function(value, precision, step, floor) {
- var decimals, remainder, roundedValue, steppedValue;
- if (floor === null) {
- floor = 0;
- }
- if (step === null) {
- step = 1 / Math.pow(10, precision);
- }
- remainder = (value - floor) % step;
- steppedValue = remainder > (step / 2) ? value + step - remainder : value - remainder;
- decimals = Math.pow(10, precision);
- roundedValue = steppedValue * decimals / decimals;
- return roundedValue.toFixed(precision);
- };
-
- //Function to calculate Offset Percent
- scope.percentOffset = function(offset) {
- return ((offset - minOffset) / offsetRange) * 100;
- };
-
- //Function to calculate Offset position
- scope.ptrOffset = function(newOffset){
- var newPercent, newValue;
- newOffset = Math.max(Math.min(newOffset, maxOffset), minOffset);
- newPercent = scope.percentOffset(newOffset);
- newValue = minValue + (valueRange * newPercent / 100.0);
- if (range) {
- var rangeSliderWidth;
- if (scope.ref == refLow) {
- scope.minHandleStyle = {left: newOffset + "px"};
- scope.minNewVal = newValue;
- scope.minPtrOffset = newOffset;
- minPtr.addClass('dragging');
- if (newValue > scope.maxNewVal) {
- scope.ref = refHigh;
- scope.maxNewVal = newValue;
- scope.maxPtrOffset = newOffset;
- maxPtr.addClass('dragging');
- minPtr.removeClass('dragging');
- scope.maxHandleStyle = {left: newOffset + "px"};
- }
- }
- else {
- scope.maxHandleStyle = {left: newOffset + "px"};
- scope.maxNewVal = newValue;
- scope.maxPtrOffset = newOffset;
- maxPtr.addClass('dragging');
- if (newValue < scope.minNewVal) {
- scope.ref = refLow;
- scope.minVal = newValue;
- scope.minPtrOffset = newOffset;
- minPtr.addClass('dragging');
- maxPtr.removeClass('dragging');
- scope.minHandleStyle = {left: newOffset + "px"};
- }
- }
- rangeSliderWidth = parseInt(scope.maxPtrOffset) - parseInt(scope.minPtrOffset);
- scope.rangeStyle = {width: rangeSliderWidth + "px", left: scope.minPtrOffset + "px"};
- }
- else {
- if (disabled && newOffset > disableWidth) {
- scope.rangeStyle = {width: newOffset + "px", zIndex: 0};
- }
- else {
- singlePtr.addClass('dragging');
- scope.rangeStyle = {width: newOffset + "px"};
- }
- scope.handleStyle = {left: newOffset + "px"};
- }
- if ((scope.precision == undefined) || (scope.step == undefined)) {
- scope.precision = sliderDefaultOptions.precision;
- scope.step = sliderDefaultOptions.step;
- }
- newValue = scope.calStep(newValue, parseInt(scope.precision), parseFloat(scope.step), parseFloat(scope.floor));
- scope[scope.ref] = newValue;
- }
- }
- };
- }
- ]).directive('attSliderMin',[function()
- {
- return{
- require: '^attSlider',
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/slider/minContent.html'
- };
- }
- ]).directive('attSliderMax',[function()
- {
- return{
- require: '^attSlider',
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/slider/maxContent.html'
- };
- }
- ])
-.constant('sliderConstants', {
- /*
- The MIT License (MIT)
- Copyright (c) 2013 Julien Valéry
- */
- SLIDER: {
- settings: {
- from: 1,
- to: 40,
- step: 1,
- smooth: true,
- limits: true,
- value: "3",
- dimension: "",
- vertical: false
- },
- className: "jslider",
- selector: ".jslider-"
- },
- EVENTS: {
- },
- COLORS: {
- GREEN: 'green',
- BLUE_HIGHLIGHT: 'blue',
- MAGENTA: 'magenta',
- GOLD: 'gold',
- PURPLE: 'purple',
- DARK_BLUE: 'dark-blue',
- REGULAR: 'regular',
- WHITE: 'white'
- }
- })
-.factory('utils', function() {
- /*
- The MIT License (MIT)
- Copyright (c) 2013 Julien Valéry
- */
- return {
- offset: function(elm) {
- var rawDom = elm[0];
- var _x = 0;
- var _y = 0;
- var body = document.documentElement || document.body;
- var scrollX = window.pageXOffset || body.scrollLeft;
- var scrollY = window.pageYOffset || body.scrollTop;
- _x = rawDom.getBoundingClientRect().left + scrollX;
- _y = rawDom.getBoundingClientRect().top + scrollY;
- return { left: _x, top:_y };
- },
-
- roundUpToScale: function(mousePrc, scale, cutOffWidth, cutOffIndex){
- var lowerVal;
- var higherVal;
- var newMousePrc;
- var middle;
-
- for(var index = 1;index < scale.length; index++){
- lowerVal = scale[index-1];
- higherVal = scale[index];
-
- middle = ((higherVal - lowerVal)*.5)+lowerVal;
-
- /*
- Handles a situation where the user clicks close to the start point of
- the slider but the pointer doesn't move
- */
-
-
- if(lowerVal == 0 && mousePrc <= middle){
- newMousePrc = lowerVal;
- break;
- }
- else if(checkEquality(lowerVal,mousePrc)){
- newMousePrc = lowerVal;
- break;
- }
- else if(lowerVal < mousePrc && (mousePrc < higherVal ||
- checkEquality(mousePrc,higherVal)))
- {
- newMousePrc = higherVal;
- break;
- }
-
- }
-
- //Check if the newMousePrc is <= the cuttOffPoint
- if(cutOffWidth && newMousePrc < cutOffWidth){
- return scale[cutOffIndex];
- }
- else{
- return newMousePrc;
- }
-
- /*
- Checks to see if 2 points are so close that they are
- basically equal.
- */
-
- function checkEquality(point1, point2){
- var precision = 0.1;
- if( Math.abs(point2 - point1) <= precision)
- return true;
- return false;
- }
- },
-
- valueForDifferentScale: function(from,to,prc,prcToValueMapper){
- var decimalPrc = prc/100;
- if(decimalPrc == 0)
- return from;
-
- return prcToValueMapper[prc];
- },
-
- getConversionFactorValue: function(value, conversion,firstDimension){
- /*
- Loop through the conversion array and keep checking the
- startVal
- */
-
- if(value <= conversion[0].startVal){
- return{
- scaledVal:value,
- scaledDimension:firstDimension
- };
- }
-
-
- var endIndex = 0;
- for(var index in conversion){
- var c = conversion[index];
-
- if(value > c.startVal)
- endIndex = index;
- }
-
- var scaleFactor = conversion[endIndex].scaleFactor;
- var scaledVal = value/scaleFactor;
- var scaledDimension=conversion[endIndex].dimension;
-
- return {
- scaledVal:scaledVal,
- scaledDimension:scaledDimension
- };
-
- }
-
- };
-})
-
-.factory('sliderDraggable', ['utils', function(utils) {
-
- /*
- The MIT License (MIT)
- Copyright (c) 2013 Julien Valéry
- */
-
- function Draggable(){
- this._init.apply( this, arguments );
- }
-
- Draggable.prototype.oninit = function(){
- };
-
- Draggable.prototype.events = function(){
- };
-
- Draggable.prototype.onmousedown = function(){
- this.ptr.css({ position: "absolute" });
- };
-
- Draggable.prototype.onmousemove = function( evt, x, y ){
- this.ptr.css({ left: x, top: y });
- };
-
- Draggable.prototype.onmouseup = function(){};
-
- Draggable.prototype.isDefault = {
- drag: false,
- clicked: false,
- toclick: true,
- mouseup: false
- };
-
- Draggable.prototype._init = function() {
- if( arguments.length > 0 ){
- this.ptr = arguments[0];
- this.parent = arguments[2];
-
- if (!this.ptr)
- return;
-
- this.is = {};
- angular.extend( this.is, this.isDefault );
- var offset = utils.offset(this.ptr);
-
- this.d = {
- left: offset.left,
- top: offset.top,
- width: this.ptr[0].clientWidth,
- height: this.ptr[0].clientHeight
- };
-
- this.oninit.apply( this, arguments );
-
- this._events();
- }
- };
-
- Draggable.prototype._getPageCoords = function( event ){
-
- var value = {};
-
- if( event.targetTouches && event.targetTouches[0] ){
- value= { x: event.targetTouches[0].pageX, y: event.targetTouches[0].pageY };
- } else{
- value= { x: event.pageX, y: event.pageY };
- }
-
-
- return value;
- };
-
- Draggable.prototype._bindEvent = function( ptr, eventType, handler ){
- var self = this;
-
- if( this.supportTouches_ ){
- ptr[0].attachEvent( this.events_[ eventType ], handler);
- }
- else{
- if(ptr.bind){
- ptr.bind( this.events_[ eventType ], handler );
- }
- }
- };
-
- Draggable.prototype._events = function(){
- var self = this;
-
- this.supportTouches_ = 'ontouchend' in document;
- this.events_ = {
- "click": this.supportTouches_ ? "touchstart" : "click",
- "down": this.supportTouches_ ? "touchstart" : "mousedown",
- "move": this.supportTouches_ ? "touchmove" : "mousemove",
- "up" : this.supportTouches_ ? "touchend" : "mouseup",
- "mousedown" : this.supportTouches_ ? "mousedown" : "mousedown"
- };
-
- var documentElt = angular.element(window.document);
-
- this._bindEvent(documentElt, "move", function(event) {
- if(self.is.drag) {
- event.stopPropagation();
- event.preventDefault();
- if (!self.parent.disabled) {
- self._mousemove(event);
- }
- }
- });
- this._bindEvent(documentElt, "down", function(event) {
- if(self.is.drag) {
- event.stopPropagation();
- event.preventDefault();
- }
- });
- this._bindEvent(documentElt, "up", function(event) {
- self._mouseup(event);
- });
-
- this._bindEvent( this.ptr, "down", function(event) {
- self._mousedown( event );
- return false;
- });
- this._bindEvent( this.ptr, "up", function(event) {
- self._mouseup( event );
- });
-
- this.events();
- };
-
- Draggable.prototype._mousedown = function( evt ){
- this.is.drag = true;
- this.is.clicked = false;
- this.is.mouseup = false;
-
- var coords = this._getPageCoords( evt );
- this.cx = coords.x - this.ptr[0].offsetLeft;
- this.cy = coords.y - this.ptr[0].offsetTop;
-
- angular.extend(this.d, {
- left: this.ptr[0].offsetLeft,
- top: this.ptr[0].offsetTop,
- width: this.ptr[0].clientWidth,
- height: this.ptr[0].clientHeight
- });
-
- if( this.outer && this.outer.get(0) ){
- this.outer.css({ height: Math.max(this.outer.height(), $(document.body).height()), overflow: "hidden" });
- }
-
- this.onmousedown( evt );
- };
-
- Draggable.prototype._mousemove = function( evt ){
-
- if(this.uid==0)
- return;
-
- this.is.toclick = false;
- var coords = this._getPageCoords( evt );
- this.onmousemove( evt, coords.x - this.cx, coords.y - this.cy );
- };
-
- Draggable.prototype._mouseup = function( evt ){
- var oThis = this;
-
- if( this.is.drag ){
- this.is.drag = false;
-
- if( this.outer && this.outer.get(0) ) {
-
- if( $.browser.mozilla ){
- this.outer.css({ overflow: "hidden" });
- } else {
- this.outer.css({ overflow: "visible" });
- }
-
- if( $.browser.msie && $.browser.version == '6.0' ){
- this.outer.css({ height: "100%" });
- } else {
- this.outer.css({ height: "auto" });
- }
- }
-
- this.onmouseup( evt );
- }
- };
-
- return Draggable;
- }])
-.factory('sliderPointer', ['sliderDraggable', 'utils', function(Draggable, utils) {
-
- /*
- The MIT License (MIT)
- Copyright (c) 2013 Julien Valéry
- */
- function SliderPointer() {
- Draggable.apply(this, arguments);
- }
-
- SliderPointer.prototype = new Draggable();
-
- SliderPointer.prototype.oninit = function(ptr, id, _constructor) {
- this.uid = id;
- this.parent = _constructor;
- this.value = {};
- this.settings = angular.copy(_constructor.settings);
- };
-
- SliderPointer.prototype.onmousedown = function(evt) {
-
- var off = utils.offset(this.parent.domNode);
-
- var offset = {
- left: off.left,
- top: off.top,
- width: this.parent.domNode[0].clientWidth,
- height: this.parent.domNode[0].clientHeight
- };
-
- this._parent = {
- offset: offset,
- width: offset.width,
- height: offset.height
- };
-
- this.ptr.addClass("jslider-pointer-hover");
- this.setIndexOver();
- };
-
- SliderPointer.prototype.onmousemove = function(evt, x, y) {
- var coords = this._getPageCoords( evt );
-
- //val is the percent where the slider pointer is located
- var val = this.calc(coords.x);
-
- if(!this.parent.settings.smooth){
-
- val = utils.roundUpToScale(val,
- this.parent.settings.scale,
- this.parent.settings.cutOffWidth,
- this.parent.settings.cutOffIndex);
-
- }
-
- var cutOffWidth = this.parent.settings.cutOffWidth;
-
- var valPrc = val + (4/5000);
-
- if(cutOffWidth && val < cutOffWidth)
- val = cutOffWidth;
-
- this._set(val);
- };
-
- SliderPointer.prototype.onmouseup = function(evt) {
-
- if( this.settings.callback && angular.isFunction(this.settings.callback) ){
- var val = this.parent.getValue();
- this.settings.callback.call( this.parent, val);
- }
-
- this.ptr.removeClass("jslider-pointer-hover");
- };
-
- SliderPointer.prototype.setIndexOver = function() {
- this.parent.setPointersIndex(1);
- this.index(2);
- };
-
- SliderPointer.prototype.index = function(i) {
- };
-
- SliderPointer.prototype.limits = function(x) {
- return this.parent.limits(x, this);
- };
-
- SliderPointer.prototype.calc = function(coords) {
- var diff = coords-this._parent.offset.left;
- var val = this.limits( (diff*100)/this._parent.width);
- return val;
- };
-
- SliderPointer.prototype.set = function(value, opt_origin) {
- this.value.origin = this.parent.round(value);
- this._set(this.parent.valueToPrc(value,this), opt_origin);
- };
-
- SliderPointer.prototype._set = function(prc, opt_origin) {
- if(!opt_origin){
- this.value.origin = this.parent.prcToValue(prc);
- }
- this.value.prc = prc;
-
- //Sets the location of the SliderPointer
- this.ptr.css({left:prc+'%'});
- this.parent.redraw(this);
- };
-
- return SliderPointer;
-}])
-.factory('slider', ['sliderPointer', 'sliderConstants', 'utils', function(SliderPointer, sliderConstants, utils) {
-
- /*
- The MIT License (MIT)
- Copyright (c) 2013 Julien Valéry
- */
- var cutOffDom;
-
- function Slider() {
- return this.init.apply( this, arguments );
- }
-
- function changeCutOffWidth(width){
- cutOffDom.css('width',width);
- };
-
- Slider.prototype.changeCutOffWidth = changeCutOffWidth;
-
- Slider.prototype.init = function( inputNode, templateNode, settings ){
- this.settings = sliderConstants.SLIDER.settings;
- angular.extend(this.settings, angular.copy(settings));
-
- this.inputNode = inputNode;
- this.inputNode.addClass("ng-hide");
-
- this.settings.interval = this.settings.to-this.settings.from;
-
- if( this.settings.calculate && $.isFunction( this.settings.calculate ) )
- this.nice = this.settings.calculate;
-
- if( this.settings.onstatechange && $.isFunction( this.settings.onstatechange ) )
- this.onstatechange = this.settings.onstatechange;
-
- this.is = { init: false };
- this.o = {};
-
- this.create(templateNode);
- };
-
- Slider.prototype.create = function(templateNode){
- var $this = this;
-
- this.domNode = templateNode;
-
- var off = utils.offset(this.domNode);
-
- var offset = {
- left: off.left,
- top: off.top,
- width: this.domNode[0].clientWidth,
- height: this.domNode[0].clientHeight
- };
-
- this.sizes = { domWidth: this.domNode[0].clientWidth, domOffset: offset };
-
- angular.extend(this.o, {
- pointers: {},
- labels: {
- 0: {
- o : angular.element(this.domNode.find('div')[5])
- },
- 1: {
- o : angular.element(this.domNode.find('div')[6])
- }
- },
- limits: {
- 0: angular.element(this.domNode.find('div')[3]),
- 1: angular.element(this.domNode.find('div')[5])
- }
- });
-
- angular.extend(this.o.labels[0], {
- value: this.o.labels[0].o.find("span")
- });
-
- angular.extend(this.o.labels[1], {
- value: this.o.labels[1].o.find("span")
- });
-
- if( !$this.settings.value.split(";")[1] ) {
- this.settings.single = true;
- }
-
- var clickPtr;
-
- var domNodeDivs = this.domNode.find('div');
- cutOffDom = angular.element(domNodeDivs[8]);
- if(cutOffDom && cutOffDom.css)
- cutOffDom.css('width','0%');
-
- var pointers = [ angular.element(domNodeDivs[1]), angular.element(domNodeDivs[2]) ];
-
- angular.forEach(pointers, function(pointer, key ) {
- $this.settings = angular.copy($this.settings);
- var value = $this.settings.value.split(';')[key];
- if( value ) {
- $this.o.pointers[key] = new SliderPointer( pointer, key, $this );
-
- var prev = $this.settings.value.split(';')[key-1];
- if( prev && parseInt(value, 10) < parseInt(prev, 10 )) value = prev;
-
- var value1 = value < $this.settings.from ? $this.settings.from : value;
- value1 = value > $this.settings.to ? $this.settings.to : value;
-
- $this.o.pointers[key].set( value1, true );
-
- if (key === 0) {
- $this.domNode.bind('mousedown', $this.clickHandler.apply($this));
- }
- }
- });
-
- this.o.value = angular.element(this.domNode.find("i")[2]);
- this.is.init = true;
-
- angular.forEach(this.o.pointers, function(pointer, key){
- $this.redraw(pointer);
- });
-
- };
-
- Slider.prototype.clickHandler = function() {
-
- var self = this;
-
- return function(evt) {
-
- if (self.disabled)
- return;
-
- var className = evt.target.className;
- var targetIdx = 0;
-
- if (className.indexOf('jslider-pointer-to') > 0) {
- targetIdx = 1;
- }
-
- var _off = utils.offset(self.domNode);
-
- var offset = {
- left: _off.left,
- top: _off.top,
- width: self.domNode[0].clientWidth,
- height: self.domNode[0].clientHeight
- };
-
- targetIdx = 1;
- var targetPtr = self.o.pointers[targetIdx];
-
- targetPtr._parent = { offset: offset, width: offset.width, height: offset.height};
- targetPtr._mousemove(evt);
- targetPtr.onmouseup();
-
- return false;
- };
-
- };
-
- Slider.prototype.disable = function(bool) {
- this.disabled = bool;
- };
-
- Slider.prototype.nice = function( value ){
- return value;
- };
-
- Slider.prototype.onstatechange = function(){};
-
- Slider.prototype.limits = function( x, pointer ){
-
- if( !this.settings.smooth ){
- var step = this.settings.step*100 / ( this.settings.interval );
- x = Math.round( x/step ) * step;
- }
-
- var another = this.o.pointers[1-pointer.uid];
- if( another && pointer.uid && x < another.value.prc )
- x = another.value.prc;
- if( another && !pointer.uid && x > another.value.prc )
- x = another.value.prc;
-
- if( x < 0 ) x = 0;
- if( x > 100 ) x = 100;
-
- var val = Math.round( x*10) / 10;
- return val;
- };
-
- Slider.prototype.setPointersIndex = function( i ){
- angular.forEach(this.getPointers(), function(pointer, i) {
- pointer.index( i );
- });
- };
-
- Slider.prototype.getPointers = function(){
- return this.o.pointers;
- };
-
- Slider.prototype.onresize = function(){
- var self = this;
-
- this.sizes = {
- domWidth: this.domNode[0].clientWidth,
- domHeight: this.domNode[0].clientHeight,
- domOffset: {
- left: this.domNode[0].offsetLeft,
- top: this.domNode[0].offsetTop,
- width: this.domNode[0].clientWidth,
- height: this.domNode[0].clientHeight
- }
- };
-
- angular.forEach(this.o.pointers, function(ptr, key) {
- self.redraw(ptr);
- });
- };
-
- Slider.prototype.update = function(){
- this.onresize();
- this.drawScale();
- };
-
- Slider.prototype.drawScale = function(){
- };
-
- Slider.prototype.redraw = function( pointer ){
-
- if(!this.settings.smooth){
-
- var newMousePrc = utils.roundUpToScale(pointer.value.prc,
- this.settings.scale,
- this.settings.cutOffWidth,
- this.settings.cutOffIndex);
-
- pointer.value.origin = newMousePrc;
- pointer.value.prc = newMousePrc;
- }
-
- if( !this.is.init )
- return false;
-
- this.setValue();
-
- var width = this.o.pointers[1].value.prc;
- var newPos = {left:'0%', width:width + '%'};
-
- this.o.value.css(newPos);
-
- var htmlValue = this.nice(pointer.value.origin);
- var scaledDimension=this.settings.firstDimension;
-
- if(this.settings.stepWithDifferentScale && !this.settings.smooth){
- htmlValue = utils.valueForDifferentScale(this.settings.from,
- this.settings.to,htmlValue, this.settings.prcToValueMapper);
- }
-
- //This is the base value before the conversion
- if( this.settings.realtimeCallback && angular.isFunction(this.settings.realtimeCallback)
- && this.settings.cutOffVal != undefined && pointer.uid == 1){
-
- this.settings.realtimeCallback(htmlValue);
- }
-
- //Need to change this to the correct value for the scale
- if(this.settings.conversion){
- var conversionObj = utils.getConversionFactorValue(parseInt(htmlValue),
- this.settings.conversion,
- this.settings.firstDimension);
-
- htmlValue = conversionObj.scaledVal;
- scaledDimension = conversionObj.scaledDimension;
- }
-
- //Check if we need to round the decimal places
- if(this.settings.decimalPlaces || this.settings.decimalPlaces == 0){
- if(typeof htmlValue == 'number'){
- htmlValue = htmlValue.toFixed(this.settings.decimalPlaces);
- }
- }
-
- this.o.labels[pointer.uid].value.html(htmlValue+' '+scaledDimension);
-
- //Top tooltip label
- this.redrawLabels(pointer);
- };
-
- Slider.prototype.redrawLabels = function( pointer ) {
-
- function setPosition( label, sizes, prc ){
- sizes.margin = -sizes.label/2;
- var domSize = self.sizes.domWidth;
-
- var label_left = sizes.border + sizes.margin;
- if( label_left < 0 )
- sizes.margin -= label_left;
-
- if( sizes.border+sizes.label / 2 > domSize ){
- sizes.margin = 0;
- sizes.right = true;
- } else
- sizes.right = false;
-
- //Adjust the tooltip location
- sizes.margin = -((label.o[0].clientWidth/2) - label.o[0].clientWidth/20);
-
- label.o.css({ left: prc + "%", marginLeft: sizes.margin, right: "auto" });
-
- if( sizes.right )
- label.o.css({ left: "auto", right: 0 });
-
- return sizes;
- }
-
- var self = this;
- var label = this.o.labels[pointer.uid];
- var prc = pointer.value.prc;
-
- var sizes = {
- label: label.o[0].offsetWidth,
- right: false,
- border: ( prc * domSize ) / 100
- };
-
- var another_label = null;
- var another = null;
-
- if (!this.settings.single){
- another = this.o.pointers[1-pointer.uid];
- another_label = this.o.labels[another.uid];
-
- switch( pointer.uid ){
- case 0:
- if( sizes.border+sizes.label / 2 > another_label.o[0].offsetLeft-this.sizes.domOffset.left ){
- another_label.o.css({ visibility: "hidden" });
-
- another_label.value.html( this.nice( another.value.origin ) );
-
- label.o.css({ visibility: "hidden" });
-
- prc = ( another.value.prc - prc ) / 2 + prc;
- if( another.value.prc != pointer.value.prc ){
- label.value.html( this.nice(pointer.value.origin) + "&nbsp;&ndash;&nbsp;" + this.nice(another.value.origin) );
-
- sizes.label = label.o[0].clientWidth;
- sizes.border = ( prc * domSize ) / 100;
- }
- } else {
- another_label.o.css({ visibility: "visible" });
- }
- break;
- case 1:
- if( sizes.border - sizes.label / 2 < another_label.o[0].offsetLeft - this.sizes.domOffset.left + another_label.o[0].clientWidth ){
- another_label.o.css({ visibility: "hidden" });
- another_label.value.html( this.nice(another.value.origin) );
-
- label.o.css({ visibility: "visible" });
-
- prc = ( prc - another.value.prc ) / 2 + another.value.prc;
-
- if( another.value.prc != pointer.value.prc ){
- label.value.html( this.nice(another.value.origin) + "&nbsp;&ndash;&nbsp;" + this.nice(pointer.value.origin) );
- sizes.label = label.o[0].clientWidth;
- sizes.border = ( prc * domSize ) / 100;
- }
- } else {
- another_label.o.css({ visibility: "visible" });
- }
- break;
- }
- }
-
- sizes = setPosition( label, sizes, prc );
-
- var domSize = self.sizes.domWidth;
-
- //This is the 0th pointer
- if( another_label ){
-
- sizes = {
- label: another_label.o[0].clientWidth,
- right: false,
- border: ( another.value.prc * this.sizes.domWidth ) / 100
- };
-
- sizes = setPosition( another_label, sizes, another.value.prc );
- }
- };
-
- Slider.prototype.redrawLimits = function() {
-
- if( this.settings.limits ) {
-
- var limits = [ true, true ];
-
- for( var key in this.o.pointers ){
-
- if( !this.settings.single || key === 0 ){
-
- var pointer = this.o.pointers[key];
- var label = this.o.labels[pointer.uid];
- var label_left = label.o[0].offsetLeft - this.sizes.domOffset.left;
-
- var limit = this.o.limits[0];
- if( label_left < limit[0].clientWidth )
- limits[0] = false;
-
- limit = this.o.limits[1];
- if( label_left + label.o[0].clientWidth > this.sizes.domWidth - limit[0].clientWidth )
- limits[1] = false;
- }
- }
-
- for( var i=0; i < limits.length; i++ ){
- if( limits[i] )
- angular.element(this.o.limits[i]).addClass("animate-show");
- else
- angular.element(this.o.limits[i]).addClass("animate-hidde");
- }
- }
- };
-
- Slider.prototype.setValue = function(){
- var value = this.getValue();
- this.inputNode.attr( "value", value );
- this.onstatechange.call( this, value, this.inputNode );
- };
-
- Slider.prototype.getValue = function(){
- if(!this.is.init)
- return false;
-
- var $this = this;
-
- var value = "";
- angular.forEach( this.o.pointers, function(pointer, key){
- if( pointer.value.prc !== undefined && !isNaN(pointer.value.prc) ) {
-
- var pointerPrc = pointer.value.prc;
-
- var myValue = $this.prcToValue(pointerPrc);
-
- if(!$this.settings.smooth){
- var myValue = utils.valueForDifferentScale($this.settings.from,
- $this.settings.to,
- pointerPrc,
- $this.settings.prcToValueMapper);
- }
-
- value += (key > 0 ? ";" : "") +myValue;
- }
- });
-
-
- return value;
- };
-
- Slider.prototype.getPrcValue = function(){
- if(!this.is.init) return false;
- var $this = this;
-
- var value = "";
- $.each( this.o.pointers, function(i){
- if( this.value.prc !== undefined && !isNaN(this.value.prc) )
- value += (i > 0 ? ";" : "") + this.value.prc;
- });
- return value;
- };
-
- Slider.prototype.prcToValue = function( prc ){
- var value;
- if( this.settings.heterogeneity && this.settings.heterogeneity.length > 0 ){
- var h = this.settings.heterogeneity;
-
- var _start = 0;
- var _from = this.settings.from;
-
- for( var i=0; i <= h.length; i++ ){
- var v;
- if( h[i] )
- v = h[i].split("/");
- else
- v = [100, this.settings.to];
-
- if( prc >= _start && prc <= v[0] ) {
- value = _from + ( (prc-_start) * (v[1]-_from) ) / (v[0]-_start);
- }
-
- _start = v[0];
- _from = v[1];
- }
- }
- else {
- value = this.settings.from + ( prc * this.settings.interval ) / 100;
- }
-
- var roundedValue = this.round(value);
- return roundedValue;
- };
-
- Slider.prototype.valueToPrc = function( value, pointer ){
-
- var prc;
- if( this.settings.heterogeneity && this.settings.heterogeneity.length > 0 ){
- var h = this.settings.heterogeneity;
-
- var _start = 0;
- var _from = this.settings.from;
-
- for (var i=0; i <= h.length; i++) {
- var v;
- if(h[i])
- v = h[i].split("/");
- else
- v = [100, this.settings.to];
-
- if(value >= _from && value <= v[1]){
- prc = pointer.limits(_start + (value-_from)*(v[0]-_start)/(v[1]-_from));
- }
-
- _start = v[0]; _from = v[1];
- }
-
- } else {
- prc = pointer.limits((value-this.settings.from)*100/this.settings.interval);
- }
-
- return prc;
- };
-
- Slider.prototype.round = function( value ){
-
- value = Math.round( value / this.settings.step ) * this.settings.step;
-
- if( this.settings.round )
- value = Math.round( value * Math.pow(10, this.settings.round) ) / Math.pow(10, this.settings.round);
- else
- value = Math.round( value );
- return value;
- };
-
- return Slider;
-
- }])
-.directive('attStepSlider', [
- '$compile', '$templateCache','$timeout', '$window', 'slider', 'sliderConstants','utils',
- function(compile, templateCache, timeout, win, Slider, sliderConstants,utils) {
-
- /*
- The MIT License (MIT)
- Copyright (c) 2013 Julien Valéry
- */
-
- var templateUrl = 'app/scripts/ng_js_att_tpls/slider/attStepSlider.html';
-
- return {
- restrict : 'AE',
- require: '?ngModel',
- scope: {
- options:'=',
- cutOff: '='
- },
- priority: 1,
- templateUrl: templateUrl,
- link : function(scope, element, attrs, ngModel) {
- if(!ngModel) return;
-
- scope.mainSliderClass = 'step-slider';
-
- element.after(compile(templateCache.get(templateUrl))(scope, function(clonedElement, scope) {
- scope.tmplElt = clonedElement;
- }));
-
- ngModel.$render = function () {
- var singleValue = false;
-
- if(ngModel.$viewValue.split && ngModel.$viewValue.split(";").length == 1){
- ngModel.$viewValue = '0;'+ngModel.$viewValue;
- }else if(typeof(ngModel.$viewValue) === 'number'){
- ngModel.$viewValue = '0;'+ngModel.$viewValue;
- }
-
- if (!ngModel.$viewValue && ngModel.$viewValue !== 0) {
- return;
- }
-
- if (typeof(ngModel.$viewValue) === 'number') {
- ngModel.$viewValue = ''+ngModel.$viewValue;
- }
-
- if (scope.slider) {
- var firstPointer ='0';
- var secondPointer =ngModel.$viewValue.split(";")[1];
-
- scope.slider.getPointers()[0].set(firstPointer, true);
-
- if (ngModel.$viewValue.split(";")[1]) {
- var value = ngModel.$viewValue.split(";")[1];
- if(value.length >= 4){
- value = value.substring(0,2);
- }
-
- if(!scope.options.realtime)
- scope.options.callback(parseFloat(ngModel.$viewValue.split(";")[1]));
-
- scope.slider.getPointers()[1].set(ngModel.$viewValue.split(";")[1], true);
- }
- }
- };
-
- var init = function() {
-
- scope.from = ''+scope.options.from;
- scope.to = ''+scope.options.to;
-
- if (scope.options.calculate && typeof scope.options.calculate === 'function') {
- scope.from = scope.options.calculate(scope.from);
- scope.to = scope.options.calculate(scope.to);
- }
-
- scope.showDividers = scope.options.showDividers;
- scope.COLORS = sliderConstants.COLORS;
-
- scope.sliderColor = scope.options.sliderColor;
- if(!scope.sliderColor)
- scope.sliderColor = sliderConstants.COLORS.REGULAR;
-
- var scaleArray = scope.options.scale;
-
-
- //Make a copy of the scaleArray before converting it to percentage for the bars
- var nonPercentScaleArray = [];
-
- //Create Mapper for the percentage to value
- var prcToValueMapper = {};
-
- for(var i in scaleArray){
- var s = scaleArray[i];
- nonPercentScaleArray.push(s);
- }
-
- function addScaleArrayStartAndEnd(){
- if(scaleArray[0] != 0){
- scaleArray.splice(0,0,0);
- }
-
- if(scaleArray[scaleArray.length - 1] != 100){
- scaleArray.splice(scaleArray.length, 0, 100);
- }
- }
-
- function convertScaleArrayToPercentage(){
-
- if(scaleArray[scaleArray.length - 1] != scope.options.to){
- scaleArray.splice(scaleArray.length, 0, scope.options.to);
- }
-
- for(var i in scaleArray){
-
- var fromValueCheck = (scaleArray[i]/scope.options.from);
- var toValueCheck = (scaleArray[i]/scope.options.to);
-
- var prcValue = ( (scaleArray[i] - scope.options.from)/ (scope.options.to - scope.options.from))*100;
- var realValue = scaleArray[i];
-
- if(toValueCheck == 1){
- prcValue = 100;
- }
- else if(fromValueCheck == 1){
- prcValue = 0;
- }
-
- scaleArray[i] = prcValue;
-
- prcToValueMapper[''+prcValue] = realValue;
-
- }
-
- }
-
- if( (scope.options.from != 0 || scope.options.to != 100)
- && scope.options.smooth){
- /*
- scale array is in real values.
- */
- addScaleArrayStartAndEnd();
- scope.options.stepWithDifferentScale = true;
- /*
- for(var i in scaleArray){
- scaleArray[i] = (scaleArray[i]/100)*scope.options.to;
- }
- */
- }
- else if( (scope.options.from != 0 || scope.options.to != 100)
- && !scope.options.smooth){
- /*
- Case for different from and to values other than 0 and 100
- so we have to do some different calculations
- */
- scope.options.stepWithDifferentScale = true;
- convertScaleArrayToPercentage();
- addScaleArrayStartAndEnd();
- }
- else{
- /*
- This is the normal case where the from and to values are 0 and
- 100 respectively.
- */
- //Check that the scale starts at 0 and 100
- convertScaleArrayToPercentage();
- addScaleArrayStartAndEnd();
- }
-
- var decimalPlaces = 0;
- if(scope.options.decimalPlaces){
- decimalPlaces = scope.options.decimalPlaces;
- }
-
- //Modify the endDimension based on whether converison was passed in
- //Also change the toStr value to scale to the last factor
- scope.endDimension = scope.options.dimension;
-
- if(scope.options.conversion){
- //Get the dimension of the last conversion
- var lastIndex = scope.options.conversion.length - 1;
- var lastDimension = scope.options.conversion[lastIndex].dimension;
- var lastScaleFactor = scope.options.conversion[lastIndex].scaleFactor;
- scope.endDimension = " "+lastDimension;
-
- var toVal = (scope.to/lastScaleFactor).toFixed(decimalPlaces);
- scope.toStr = toVal;
- }else{
- scope.toStr = scope.options.to;
- }
-
- var OPTIONS = {
- from: scope.options.from,
- to: scope.options.to,
- step: scope.options.step,
- smooth: scope.options.smooth,
- limits: true,
- stepWithDifferentScale: scope.options.stepWithDifferentScale,
- round: scope.options.round || false,
- value: ngModel.$viewValue,
- scale: scope.options.scale,
- nonPercentScaleArray: nonPercentScaleArray,
- prcToValueMapper: prcToValueMapper,
- firstDimension:scope.options.dimension,
- decimalPlaces: decimalPlaces,
- conversion: scope.options.conversion,
- realtimeCallback: scope.options.callback
- };
-
- if(angular.isFunction(scope.options.realtime)){
- OPTIONS.realtimeCallback = function(value){
- ngModel.$setViewValue(value);
- scope.options.callback(value);
- };
- }
- else{
- OPTIONS.callback = forceApply;
- }
-
- OPTIONS.calculate = scope.options.calculate || undefined;
- OPTIONS.onstatechange = scope.options.onstatechange || undefined;
-
-
- //timeout(function() {
-
- var scaleDiv = scope.tmplElt.find('div')[7];
- if(!OPTIONS.conversion){
-
- scope.tmplElt.find('div').eq(6).find('span').eq(0).css('padding-left', '10px');
- scope.tmplElt.find('div').eq(6).find('span').eq(0).css('padding-right', '15px');
-
- }
-
- scope.slider = angular.element.slider(element, scope.tmplElt, OPTIONS);
- angular.element(scaleDiv).html(scope.generateScale());
- scope.drawScale(scaleDiv);
- initListener();
-
- scope.$watch('options.disable',function(val){
- if (scope.slider) {
- scope.tmplElt.toggleClass('disabled',val);
- scope.slider.disable(val);
- }
- });
-
- scope.$watch('cutOff', function(cutOffVal){
-
-
-
- if(cutOffVal && cutOffVal > 0){
-
- var cutOffPrc = (cutOffVal - scope.slider.settings.from)/(scope.slider.settings.to -
- scope.slider.settings.from);
- cutOffPrc = cutOffPrc*100;
-
- scope.isCutOffSlider = true;
- scope.slider.settings.cutOffWidth = cutOffPrc;
-
- //cutOffVal is the actual value of the cutoff point
- scope.cutOffVal = cutOffVal;
- if(scope.options.conversion){
- var convertedVal = utils.getConversionFactorValue(cutOffVal, scope.options.conversion, scope.options.dimension);
- convertedVal.scaledVal = parseFloat(convertedVal.scaledVal).toFixed(scope.options.decimalPlaces);
- scope.cutOffVal = convertedVal.scaledVal +' '+convertedVal.scaledDimension;
- }
- scope.slider.settings.cutOffVal = cutOffVal;
- //Calculate the cutOff percentage
- scope.slider.changeCutOffWidth(cutOffPrc + '%');
-
- var scale = scope.slider.settings.nonPercentScaleArray;
-
- //Calculate where the cutOff point in relation to the scale array
- for(var i in scale){
- if(i >= 1){
- var lowerVal = scale[i - 1];
- var higherVal = scale[i];
-
- if(cutOffVal > lowerVal && cutOffVal <= higherVal){
- scope.slider.settings.cutOffIndex = i;
- }
-
- }
- }
-
- }else{
- scope.slider.settings.cutOffVal = 0;
- }
-
- });
-
- //});
- };
-
- function initListener() {
- angular.element(win).bind('resize', function(event) {
- scope.slider.onresize();
- });
- }
-
- scope.generateScale = function(){
- if( scope.options.scale && scope.options.scale.length > 0 ){
- var str = "";
- var s = scope.options.scale;
- var position = 'left';
-
- for(var i=0; i < s.length; i++){
- if(i != 0 && i != s.length - 1){
-
- var scaledPosition = ( (s[i] - scope.from)/(scope.to - scope.from))*100;
- if(scope.options.stepWithDifferentScale && !scope.options.smooth){
- scaledPosition = s[i];
- }
- str += '<span style="'+ position + ': ' + scaledPosition+ '%"></span>';
- }
- }
- return str;
- } else return "";
-
- return "";
- };
-
- scope.drawScale = function(scaleDiv){
- angular.forEach(angular.element(scaleDiv).find('ins'), function(scaleLabel, key) {
- scaleLabel.style.marginLeft = - scaleLabel.clientWidth / 2;
- });
- };
-
- var forceApply = function(value) {
- var val = value.split(";")[1];
-
- scope.$apply(function() {
- ngModel.$setViewValue(parseInt(val));
- });
- if (scope.options.callback){
- scope.options.callback(parseInt(val));
- }
-
- };
-
- scope.$watch('options', function(value) {
- init();
- });
-
- angular.element.slider = function( inputElement, element, settings) {
- if(!element.data('jslider'))
- element.data('jslider', new Slider( inputElement, element, settings ));
- var sliderObj = element.data('jslider');
- return sliderObj;
- };
-
- }
- };
-}]);
-angular.module('att.abs.splitButtonDropdown', ['att.abs.utilities'])
- .directive('attButtonDropdown', ['$document', '$parse', '$documentBind', function($document, $parse, $documentBind) {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/splitButtonDropdown/splitButtonDropdown.html',
- scope: {
- btnText: "@",
- btnType: "@",
- btnLink: "@",
- btnClick: "&"
- },
- link: function(scope, element, attr) {
- scope.isSmall = false;
- scope.isDropDownOpen = false;
- scope.isActionDropdown = false;
- var flag = false;
-
- if (attr.small === "") {
- scope.isSmall = true;
- }
-
- if (!(scope.btnText)) {
- scope.isActionDropdown = true;
- }
-
- scope.clickFxn = function() {
- if(typeof scope.btnClick === "function" && !scope.btnLink){
- scope.btnClick = $parse(scope.btnClick);
- scope.btnClick();
- }
- };
-
- scope.toggleDropdown = function() {
- if (!(scope.btnType === 'disabled')) {
- flag = scope.isDropDownOpen = !scope.isDropDownOpen;
- }
- };
-
- scope.showDropdown = function() {
- if (!(scope.btnType === 'disabled')) {
- scope.isDropDownOpen = true;
- flag = true;
- }
- };
-
- scope.hideDropdown = function() {
- if (!(scope.btnType === 'disabled')) {
- scope.isDropDownOpen = false;
- flag = false;
- }
- };
-
- var outsideClick = function(e) {
- if (!flag) {
- scope.$apply(function() {
- scope.isDropDownOpen = false;
- });
- }
- flag = false;
- };
-
- $documentBind.click('isDropDownOpen', outsideClick, scope);
-
- attr.$observe('btnType', function(val) {
- scope.btnType = val;
- });
- }
- };
-
- }])
-.constant('iconStateConstants', {
- MIDDLE: 'middle',
- LEFT: 'left',
- RIGHT: 'right',
- NEXT_TO_DROPDOWN:'next-to-dropdown',
- LEFT_NEXT_TO_DROPDOWN:'left-next-to-dropdown',
- DIR_TYPE: {
- LEFT: 'left',
- RIGHT: 'right',
- BUTTON: 'button'
- },
- KEYBOARD: {
- UP: 38,
- DOWN:40,
- ENTER: 13,
- ESC: 27
- },
- SPLIT_ICON_BTN_EVENT_EMITTER_KEY: 'splitIconButtonTap'
-})
-.directive('expandableLine', ['$document',function($document){
- return {
- restrict: 'EA',
- replace: true,
- priority: 300,
- require: ['^attSplitIconButton', 'expandableLine'],
- controller: ['$scope', function($scope){
- $scope.isActive = false;
- this.setActiveState = function(isActive){
- $scope.isActive = isActive;
- }
-
- this.isActive = $scope.isActive;
- this.dirType = $scope.dirType;
- }],
- template: '<div ng-class="{\'expand-line-container\': !isActive, \'expand-line-container-active\': isActive}"> <div ng-class="{\'hovered-line\':isActive, \'vertical-line\':!isActive}"> </div></div>',
- scope:{
- dirType: '@'
- },
- link: function(scope,element,attr,ctrls){
- var attSplitIconButtonCtrl = ctrls[0];
- var expandableLineCtrl = ctrls[1];
- attSplitIconButtonCtrl.addSubCtrl(expandableLineCtrl);
- }
- }
-}])
-.controller('AttSplitIconCtrl', ['$scope', function($scope){
- this.setType = function(type){
- $scope.type = type;
- };
-
- this.isDropdown = function(isDropdown){
- $scope.isDropdown = isDropdown;
- };
-
- this.dropDownClicked = function(){
- if($scope.dropDownClicked)
- $scope.dropDownClicked();
- }
-
- this.dirType = $scope.dirType;
-
-}])
-.directive('attSplitIcon', ['$document', '$timeout','iconStateConstants','$documentBind','events',
- function($document,$timeout,iconStateConstants,$documentBind, events){
- return {
- restrict: 'EA',
- replace: true,
- priority: 200,
- transclude: true,
- require: ['^attSplitIconButton','attSplitIcon'],
- templateUrl: 'app/scripts/ng_js_att_tpls/splitButtonDropdown/splitIcon.html',
- scope:{
- icon: '@',
- hoverWatch: '=',
- dropDownWatch: '=',
- dirType: '@'
- },
- controller:'AttSplitIconCtrl',
- link: function(scope,element,attr,ctrls){
-
- var attSplitIconButtonCtrl = ctrls[0];
- var attSplitIconCtrl = ctrls[1];
- attSplitIconButtonCtrl.addSubCtrl(attSplitIconCtrl);
-
- scope.iconStateConstants = iconStateConstants;
-
- var currentIndex = 0;
- var isMyElement = false;
- var listElements;
-
- scope.isDropdown = false;
- scope.isDropdownOpen = false;
-
-
- scope.$on(iconStateConstants.SPLIT_ICON_BTN_EVENT_EMITTER_KEY, function(evnt, data){
- if(typeof data == 'boolean' && data){
- scope.dropDownClicked();
-
- /*
- Check if the dropdown is open and if we are selecting one
- of the items, so that when pressing enter it will trigger it.
- */
- if(scope.isDropDownOpen){
- listElements[currentIndex].eq(0).find('a')[0].click();
- }
- }
- else{
- var e = data;
- //Only trigger the keyboard event if the icon button is a dropdown type
- if(scope.isDropdown)
- triggerKeyboardEvents(e);
- }
-
- function triggerKeyboardEvents(e){
- if(e.which == iconStateConstants.KEYBOARD.ESC){
- outsideClick();
- }
- if( e.which == iconStateConstants.KEYBOARD.UP ||
- e.which == iconStateConstants.KEYBOARD.DOWN){
-
- e.preventDefault();
- events.stopPropagation(e);
- //e.stopPropagation();
-
- if(e.which == iconStateConstants.KEYBOARD.DOWN){
- //Dropdown is open and the user taps down again
-
- if(scope.isDropDownOpen){
- //Now we need to go through the rows in the dropdown
- scope.nextItemInDropdown();
- }
- //Dropdown is not open
- else{
- isMyElement = true;
- outsideClick();
- listElementsInit();
- }
- }
- else if(e.which == iconStateConstants.KEYBOARD.UP){
- if(scope.isDropDownOpen){
- scope.previousItemInDropdown();
- }else{
- }
- }
-
- else{
- isMyElement = false;
- outsideClick();
- }
- }else if(e.which == iconStateConstants.KEYBOARD.ENTER){
- if(scope.isDropDownOpen){
- listElementsInit();
- }else{
- }
- }
- }
-
- function listElementsInit(){
- if(listElements == undefined){
- listElements = [];
- var liTemps = element.find('li');
- for(var i = 0; i < liTemps.length; i++){
- listElements.push(liTemps.eq(i));
- }
- listElements[currentIndex].children().eq(0).addClass('selected-item');
- }
- }
-
- });
-
- scope.nextItemInDropdown = function(){
- if(listElements && currentIndex < listElements.length - 1){
- currentIndex++;
- listElements[currentIndex - 1].children().eq(0).removeClass('selected-item');
- listElements[currentIndex].children().eq(0).addClass('selected-item');
- }
- };
-
- scope.previousItemInDropdown = function(){
- if(currentIndex > 0){
- currentIndex--;
- listElements[currentIndex].children().eq(0).addClass('selected-item');
-
- if(currentIndex + 1 < listElements.length)
- listElements[currentIndex + 1].children().eq(0).removeClass('selected-item');
- }
- };
-
- scope.$watch('isIconHovered', function(val){
- scope.hoverWatch = val;
- });
-
- scope.$watch('type', function(val){
-
- function toggleValues(isMiddle,isNextToDropDown,isRight,isLeft,isLeftNextDropdown){
- scope['isMiddle'] = isMiddle;
- scope['isNextToDropDown'] = isNextToDropDown;
- scope['isRight'] = isRight;
- scope['isLeft'] = isLeft;
- scope['isLeftNextDropdown'] = isLeftNextDropdown;
- };
-
- if(val == scope.iconStateConstants.MIDDLE){
- toggleValues(true,false,false,true,false);
- }
- else if(val == scope.iconStateConstants.LEFT){
- toggleValues(false,false,false,true,false);
- }
- else if(val == scope.iconStateConstants.RIGHT){
- toggleValues(false,false,true,false,false);
- }else if(val == scope.iconStateConstants.NEXT_TO_DROPDOWN){
- toggleValues(false,true,true,true,false);
- }else if(val == scope.iconStateConstants.LEFT_NEXT_TO_DROPDOWN){
- toggleValues(false,false,false,true,true);
- }
- });
-
- if(attr.dropDownId && attr.dropDownId != ''){
- scope.dropDownId = attr.dropDownId;
- scope.isDropdown = true;
- }
-
- scope.dropDownClicked = function(){
- isMyElement = true;
- };
-
- scope.toggleDropdown = function(val) {
- if(val != undefined)
- scope.isDropDownOpen=val;
- else
- scope.isDropDownOpen = !scope.isDropDownOpen;
-
- scope.dropDownWatch = scope.isDropDownOpen;
- };
-
- var outsideClick = function(e) {
- if(scope.isDropdown){
- if (isMyElement) {
- isMyElement = false;
- scope.toggleDropdown();
- }else{
- scope.toggleDropdown(false);
- }
- scope.$apply();
- }
- };
-
- $documentBind.click('isDropdown', outsideClick, scope);
- }
- }
-}])
-.controller('AttSplitIconButtonCtrl',['$scope', 'iconStateConstants',function($scope,iconStateConstants){
-
- this.subCtrls = [];
-
- $scope.isLeftLineShown=true;
- $scope.isRightLineShown=true;
- $scope.childrenScopes = [];
-
- var origLeftLineShown = $scope.isLeftLineShown;
- var origRightLineShown = $scope.isRightLineShown;
-
- var that = this;
-
- function getDirIndex(dirType){
- var index = -1;
- for(var c in that.subCtrls){
- var ctrl = that.subCtrls[c];
- if(ctrl.dirType==dirType){
- index = c;
- break;
- }
- }
- return index;
- }
-
- this.addSubCtrl = function(sub){
- this.subCtrls.push(sub);
- };
-
- this.isLeftLineShown = function(isShown){
- if(isShown == undefined)
- return $scope.isLeftLineShown;
- else
- $scope.isLeftLineShown = isShown;
- };
-
- this.isRightLineShown = function(isShown){
- if(isShown == undefined)
- return $scope.isRightLineShown;
- else
- $scope.isRightLineShown = isShown;
- };
-
- this.setLeftLineHover = function(isHovered){
- var leftLineIndex = getDirIndex(iconStateConstants.DIR_TYPE.LEFT);
-
- if($scope.isLeftLineShown){
- if(this.subCtrls[leftLineIndex] && this.subCtrls[leftLineIndex].setActiveState){
- this.subCtrls[leftLineIndex].setActiveState(isHovered);
- }
- }
- };
-
- this.setRightLineHover = function(isHovered){
- var rightLineIndex = getDirIndex(iconStateConstants.DIR_TYPE.RIGHT);
- if($scope.isRightLineShown){
- if(this.subCtrls[rightLineIndex] && this.subCtrls[rightLineIndex].setActiveState){
- this.subCtrls[rightLineIndex].setActiveState(isHovered);
- }
- }
- };
-
- this.toggleLines = function(isHovered,buttonGroupCtrl,buttonCtrl,isDropDownOpen){
-
- var subIconButtons = buttonGroupCtrl.subIconButtons;
- var subIconButtonsLength = subIconButtons.length;
-
- var leftLineIndex = getDirIndex(iconStateConstants.DIR_TYPE.LEFT);
- var rightLineIndex = getDirIndex(iconStateConstants.DIR_TYPE.RIGHT);
-
- function noVerticalLineToggle(){
- for(var i =0; i < subIconButtonsLength; i++){
- if(subIconButtons[i] == buttonCtrl){
- if(i + 1 <= subIconButtonsLength - 1){
- if(subIconButtons[i+1].isLeftLineShown() && subIconButtons[i+1].subCtrls[leftLineIndex]
- && subIconButtons[i+1].subCtrls[leftLineIndex].setActiveState)
- subIconButtons[i+1].subCtrls[leftLineIndex].setActiveState(isHovered);
- }
- if(i - 1 >= 0){
- if(subIconButtons[i-1].isRightLineShown() && subIconButtons[i-1].subCtrls[rightLineIndex]
- && subIconButtons[i-1].subCtrls[rightLineIndex].setActiveState)
- subIconButtons[i-1].subCtrls[rightLineIndex].setActiveState(isHovered);
- }
- break;
- }
- }
- }
-
- if(isDropDownOpen){
- /*
- If the button is next to the dropdown button then just keep the
- buttons left line or its left neighbors right line toggled on
- If the button is the dropdown button don't do anything
- else do things normally witht the button
- */
- if(subIconButtons[subIconButtonsLength-1] == buttonCtrl){
-
- }
- else if(subIconButtons[subIconButtonsLength-2]==buttonCtrl){
- if(subIconButtons[subIconButtonsLength-2].isLeftLineShown())
- subIconButtons[subIconButtonsLength-2].subCtrls[leftLineIndex].setActiveState(isHovered);
- else if(subIconButtonsLength - 3 >= 0){
- if(subIconButtons[subIconButtonsLength-3].isRightLineShown())
- subIconButtons[subIconButtonsLength-3].subCtrls[rightLineIndex].setActiveState(isHovered);
- }
- }else{
-
- noVerticalLineToggle();
-
- if($scope.isLeftLineShown){
- this.subCtrls[leftLineIndex].setActiveState(isHovered);
- }
-
- if($scope.isRightLineShown){
- this.subCtrls[rightLineIndex].setActiveState(isHovered);
- }
- }
- }
- else{
- //Handle Special cases where they aren't showing any vertical lines
- //and the dropdown isn't down
- if(!$scope.isLeftLineShown && !$scope.isRightLineShown){
- noVerticalLineToggle();
- }
-
- if($scope.isLeftLineShown){
- if(this.subCtrls[leftLineIndex].setActiveState)
- this.subCtrls[leftLineIndex].setActiveState(isHovered);
- }
-
- if($scope.isRightLineShown){
- if(this.subCtrls[rightLineIndex].setActiveState)
- this.subCtrls[rightLineIndex].setActiveState(isHovered);
- }
- }
- };
-
- this.setButtonType = function(type){
- var buttonIndex = getDirIndex(iconStateConstants.DIR_TYPE.BUTTON);
- if(this.subCtrls[buttonIndex] && this.subCtrls[buttonIndex].setType)
- this.subCtrls[buttonIndex].setType(type);
- };
-
-}])
-.directive('attSplitIconButton', ['$document', 'iconStateConstants',
- function($document,iconStateConstants){
- return {
- restrict: 'EA',
- replace: true,
- priority: 100,
- transclude: true,
- require: ['^attSplitIconButtonGroup', 'attSplitIconButton'],
- controller: 'AttSplitIconButtonCtrl',
- templateUrl: 'app/scripts/ng_js_att_tpls/splitButtonDropdown/splitIconButton.html',
- scope:{
- icon: '@',
- dropDownId: '@'
- },
- link: function(scope,element,attr,ctrls){
-
-
- var attSplitButtonGroupCtrl = ctrls[0];
- var attSplitIconButtonCtrl = ctrls[1];
-
- attSplitButtonGroupCtrl.addIconButton(attSplitIconButtonCtrl);
-
- element.bind('keydown', function(e){
- //Check if the key is the up or down key
- //if()
- if(e.which == iconStateConstants.KEYBOARD.UP ||
- e.which == iconStateConstants.KEYBOARD.DOWN ||
- e.which == iconStateConstants.KEYBOARD.ENTER ||
- e.which == iconStateConstants.KEYBOARD.ESC ) {
-
- scope.clickHandler();
- scope.$broadcast(iconStateConstants.SPLIT_ICON_BTN_EVENT_EMITTER_KEY, e);
- }
- });
-
- scope.dropDownWatch = false;
-
- scope.iconStateConstants = iconStateConstants;
-
- scope.clickHandler = function(){
- attSplitButtonGroupCtrl.hideLeftLineRightButton(attSplitIconButtonCtrl);
- };
-
- scope.$watch('isHovered', function(val){
- if(val){
- attSplitIconButtonCtrl.toggleLines(val,attSplitButtonGroupCtrl,attSplitIconButtonCtrl,attSplitButtonGroupCtrl.isDropDownOpen);
- }else{
- attSplitIconButtonCtrl.toggleLines(val,attSplitButtonGroupCtrl,attSplitIconButtonCtrl,attSplitButtonGroupCtrl.isDropDownOpen);
- }
- });
-
- scope.$watch('dropDownWatch', function(val){
- attSplitButtonGroupCtrl.isDropDownOpen = val;
- attSplitButtonGroupCtrl.toggleDropdownState(val);
- });
- }
- }
-}])
-.controller('AttSplitIconButtonGroupCtrl', ['$scope','iconStateConstants',function($scope,iconStateConstants){
-
- this.subIconButtons = [];
- this.addIconButton = function(iconButton){
- this.subIconButtons.push(iconButton);
- };
-
- this.isDropDownOpen = false;
-
- this.hideLeftLineRightButton = function(btn){
- var numButtons = this.subIconButtons.length;
- var buttonLeftOfRightMost = this.subIconButtons[numButtons - 2];
- var rightMostButton = this.subIconButtons[numButtons -1];
-
- if (btn != buttonLeftOfRightMost && btn != rightMostButton ){
- rightMostButton.setLeftLineHover(false);
- }
- };
-
- this.toggleDropdownState = function(isDropDownOpen){
-
- var numButtons = this.subIconButtons.length;
-
- if(numButtons > 2){
-
- if(isDropDownOpen){
-
- if(this.subIconButtons[numButtons - 2].isRightLineShown())
- this.subIconButtons[numButtons - 2].setRightLineHover(true);
- else
- this.subIconButtons[numButtons - 1].setLeftLineHover(true);
-
- this.subIconButtons[numButtons - 2].setButtonType(iconStateConstants.NEXT_TO_DROPDOWN);
- }else{
-
- this.subIconButtons[numButtons - 1].setLeftLineHover(false);
- this.subIconButtons[numButtons - 2].setButtonType(iconStateConstants.MIDDLE);
- }
-
- }else{
-
- if(isDropDownOpen){
- this.subIconButtons[0].setRightLineHover(true);
- this.subIconButtons[0].setButtonType(iconStateConstants.LEFT_NEXT_TO_DROPDOWN);
- }else{
- this.subIconButtons[0].setButtonType(iconStateConstants.LEFT);
- }
- }
-
- };
-
-}])
-.directive('attSplitIconButtonGroup', ['$document', '$timeout', 'iconStateConstants' ,function($document,$timeout,iconStateConstants){
- return {
- restrict: 'EA',
- replace: true,
- priority: 50,
- transclude: true,
- require: 'attSplitIconButtonGroup',
- controller: 'AttSplitIconButtonGroupCtrl',
- templateUrl: 'app/scripts/ng_js_att_tpls/splitButtonDropdown/splitIconButtonGroup.html',
- scope:{},
- link: function(scope,element,attr,ctrls){
-
- $timeout(initialize,100);
-
- function initialize(){
-
- var subIconButtonCtrls = ctrls.subIconButtons;
- var leftMostButtonIndex = 0;
- var rightMostButtonIndex =subIconButtonCtrls.length-1;
-
- //left most button config
- subIconButtonCtrls[leftMostButtonIndex].setButtonType(iconStateConstants.LEFT);
- subIconButtonCtrls[leftMostButtonIndex].isLeftLineShown(false);
- subIconButtonCtrls[leftMostButtonIndex].isRightLineShown(true);
-
- //right most button config
- subIconButtonCtrls[rightMostButtonIndex].setButtonType(iconStateConstants.RIGHT);
- subIconButtonCtrls[rightMostButtonIndex].isRightLineShown(false);
- subIconButtonCtrls[rightMostButtonIndex].isLeftLineShown(false);
-
- //middle buttons config
- if(rightMostButtonIndex >= 2){
- var index = 1;
- while(index < rightMostButtonIndex){
- subIconButtonCtrls[index].setButtonType(iconStateConstants.MIDDLE);
- subIconButtonCtrls[index].isRightLineShown(false);
- subIconButtonCtrls[index].isLeftLineShown(false);
- index++;
- }
-
- var skipIndex = 2;
- while(skipIndex <= rightMostButtonIndex){
- if(skipIndex == rightMostButtonIndex){
- subIconButtonCtrls[skipIndex].isLeftLineShown(true);
- }else{
- subIconButtonCtrls[skipIndex].isRightLineShown(true);
- subIconButtonCtrls[skipIndex].isLeftLineShown(true);
- }
- skipIndex = skipIndex + 2;
- }
- }
-
- //reposition the dropdown
- var ulElem = element.find('ul');
- if(ulElem.length > 0){
- var numButtons = rightMostButtonIndex+1;
- if(numButtons > 2){
- var offset = (numButtons)*34-70+(numButtons/1.5) + 0.5;
- var offSetStr = offset+'px';
- angular.element(ulElem).css('left',offSetStr);
- angular.element(ulElem).css('border-top-left-radius','0px');
- }else{
- angular.element(ulElem).css('left','0px');
- }
- }
- }
- }
- }
-}]);
-
-angular.module('att.abs.steptracker', ['att.abs.transition'])
- .directive('steptracker', ['$timeout', function($timeout) {
- return {
- priority: 100, // This allows dev's clickHandler to cancel an operation
- scope: {
- sdata: "=sdata",
- cstep:"=currentStep",
- clickHandler: '=?',
- disableClick: '=?'
- },
- restrict: 'EA',
- replace: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/steptracker/step-tracker.html',
- link: function(scope, elem, attr, ctrl) {
- if (scope.disableClick === undefined) {
- scope.disableClick = false;
- }
-
- $timeout(function() {
- if(scope.cstep < 1){
- scope.cstep = 1;
- }
- else if(scope.cstep > scope.sdata.length){
- scope.cstep = scope.sdata.length;
- }
-
- var divs = elem.find('div');
- var slidertracks = [];
- for(var i in divs){
- if(divs.eq(i)[0]){
- var el = divs.eq(i)[0].className;
- if(el.indexOf('track ng-scope') > -1){
- slidertracks.push(divs.eq(i));
- }
- }
- }
-
- var currentPage;
- var totalPage;
- var currentTrack = updateCurrentTrack(scope.cstep);
-
- function updateCurrentTrack(step) {
- // Always return the step-1 because array starts at 0
- return angular.element(slidertracks[step-1]);
- };
-
- function updateTrackWidth() {
- if (scope.cstep > 0 && scope.cstep <= scope.sdata.length-1 && currentPage > 0) {
- var newWidth = ((currentPage/totalPage)*100) + "%";
- currentTrack = updateCurrentTrack(scope.cstep);
- currentTrack.css('width', newWidth);
- }
- };
-
- function updatePages() {
- if (scope.cstep <= scope.sdata.length) {
- currentPage = scope.sdata[scope.cstep-1]['currentPage'];
- totalPage = scope.sdata[scope.cstep-1]['totalPages'];
- }
- };
-
- // dynamically add width for steps, depending on the number of steps.
- scope.set_width = function(indexval) {
- var setwidth = (100 / (scope.sdata.length - 1)) + "%";
-
- // skip last element and add width for all other element
- if ((scope.sdata.length - 1) > indexval) {
- return {'width': setwidth};
- }
- };
-
- scope.$watch('sdata', function(current, previous) {
- updatePages();
- var prevStep = scope.cstep;
-
- // Before anything, ensure currentPage is never below 1
- if (currentPage < 1) {
- currentPage = 1;
-
- if (scope.cstep != 1) {
- // Decrease step, current track width is 0%, new step width updates
- scope.cstep--;
- updatePages();
- }
- }
- // Move to next step, reset currentPage, totalPage, and ensure previous steps are completed
- if (currentPage > totalPage) {
- if (scope.cstep > scope.sdata.length-1) {
- scope.cstep++;
- return;
- } else {
- currentPage = totalPage;
- updateTrackWidth();
- scope.cstep++;
- updatePages();
- updateTrackWidth();
- }
- }
-
- if (currentPage < 1 && prevStep === scope.cstep) {
- currentPage = 1;
- if (scope.cstep > 1) {
- scope.cstep--;
- scope.sdata[scope.cstep-1]['currentPage'] = scope.sdata[scope.cstep-1]['totalPages'];
- scope.sdata[scope.cstep]['currentPage'] = 1;
- }
- }
-
- updateTrackWidth();
- }, true);
-
-
- //add the active class for current step
- scope.activestep = function(index) {
- if (index === scope.cstep-1)
- return true;
- else
- return false;
- };
- //add the done class for finished step
- scope.donesteps = function(index) {
- if (index < scope.cstep-1)
- return true;
- else
- return false;
- };
- //add the last class for final step
- scope.laststep = function(index) {
- if (index === scope.sdata.length-1)
- return true;
- else
- return false;
- };
-
- scope.isIncomplete = function(index) {
- if (index === scope.cstep-1) return false;
-
- if (index >= 0 && index < scope.sdata.length-1) {
- // If currentPage <= totalPage then return true
- var step = scope.sdata[index];
- if (step['currentPage'] <= step['totalPages']) return true; else return false;
- }
- };
-
- //click event
- scope.stepclick = function($event, steps) {
-
- // If we are decreasing steps, reset all currentPage counts to 1
- if (steps < scope.cstep) {
- for (var i = scope.cstep-1; i > steps; i--) {
- scope.sdata[i]['currentPage'] = 1;
- }
- scope.sdata[steps]['currentPage']--;
- }
-
- if (angular.isFunction(scope.clickHandler)) {
- scope.clickHandler($event, steps);
- }
-
- scope.cstep=steps+1;
-
- // In the case we decremented previously from this step, we need to reset currentpage to default
- if (scope.cstep <= scope.sdata.length && scope.sdata[scope.cstep]['currentPage'] < 1) {
- scope.sdata[scope.cstep]['currentPage'] = 1;
- }
- updatePages();
- updateTrackWidth();
- };
- }, 100);
- }
- };
- }
- ])
-.constant('timelineConstants',{
- STEP_TYPE:{
- ALERT:'alert',
- COMPLETED:'completed',
- CANCELLED: 'cancelled'
- }
-})
-.controller('AttTimelineCtrl' , ['$scope', '$timeout', function($scope,$timeout){
-
- var timelineBarCtrls = [];
- var timelineDotCtrls = [];
-
- this.numSteps = 0;
-
- this.isAlternate = function(){
- return $scope.alternate;
- }
-
- this.addTimelineBarCtrls = function(t){
- timelineBarCtrls.push(t);
- };
-
- this.addTimelineDotCtrls = function(b){
- timelineDotCtrls.push(b);
- };
-
- $timeout(init,200);
-
- function init(){
-
- function compare(a,b) {
- if (a.order < b.order)
- return -1;
- if (a.order > b.order)
- return 1;
- return 0;
- }
-
- timelineDotCtrls.sort(compare);
- timelineBarCtrls.sort(compare);
-
- if($scope.$parent.animate)
- animateSequence();
-
- $scope.$watch('trigger', function(val){
- if(val){
- $scope.resetTimeline();
- }else{
- $scope.$parent.animate = false;
- }
- });
- }
-
- function animateSequence(){
-
- var dotsDuration = .25;
- var timelineBarProgressDuration = .25;
-
- if(typeof $scope.barAnimateDuration == 'number')
- timelineBarProgressDuration = $scope.barAnimateDuration;
-
- var start = createAnimation(0,timelineBarProgressDuration);
-
- function setToInactiveStates(){
-
- for(var i in timelineDotCtrls){
- var dotCtrl = timelineDotCtrls[i];
-
- if(i%2 == 0){
- dotCtrl.unhoveredStateForBelow(.25);
- }else{
- dotCtrl.unhoveredStateForAbove(.25);
- }
-
- if(dotCtrl.isStop())
- break;
- }
-
- }
-
- function createAnimation(i, duration){
- if(i == 0){
- return function(){
- if(timelineDotCtrls[i+1].isStop() && timelineDotCtrls[i+1].isCancelled()){
- timelineBarCtrls[i].isCancelled(true);
- }
- timelineBarCtrls[i].animate(createAnimation(i+1, duration), duration);
- }
- }else if(i == timelineBarCtrls.length - 1){
- return function(){
-
- //Removes the bolded text from the start
- if(timelineDotCtrls[0].isCurrentStep()){
- timelineDotCtrls[0].isCurrentStep(false);
- }
-
- if(timelineDotCtrls[i].isStop()){
- timelineDotCtrls[i-1].shrinkAnimate(dotsDuration);
- timelineDotCtrls[i].isCurrentStep(true);
- }else{
- timelineDotCtrls[i-1].shrinkAnimate(dotsDuration);
- timelineBarCtrls[i].animate(createAnimation(i+1, duration), duration);
- }
-
- timelineDotCtrls[i].expandedAnimate(dotsDuration);
-
- $timeout(function(){
- setToInactiveStates();
- },500);
- }
- }
- //End Dot
- else if(i == timelineBarCtrls.length){
- return function(){
-
- //Removes the bolded text from the start
- if(timelineDotCtrls[0].isCurrentStep()){
- timelineDotCtrls[0].isCurrentStep(false);
- }
-
- timelineDotCtrls[i-1].shrinkAnimate(dotsDuration);
- timelineDotCtrls[i].expandedAnimate(dotsDuration);
- timelineDotCtrls[i].isCurrentStep(true);
-
- $timeout(function(){
- setToInactiveStates();
- },500);
-
- }
- }
- else{
- return function(){
- //Removes the bolded text from the start
- if(timelineDotCtrls[0].isCurrentStep()){
- timelineDotCtrls[0].isCurrentStep(false);
- }
-
- //timelineDotCtrls[i].setColor();
- if(timelineDotCtrls[i].isStop()){
- timelineDotCtrls[i-1].shrinkAnimate(dotsDuration);
- timelineDotCtrls[i].expandedAnimate(dotsDuration);
- timelineDotCtrls[i].isCurrentStep(true);
-
- $timeout(function(){
- setToInactiveStates();
- },500);
-
- }else{
-
- if(timelineDotCtrls[i+1].isStop() && timelineDotCtrls[i+1].isCancelled()){
- timelineBarCtrls[i].isCancelled(true);
- }
-
- timelineDotCtrls[i-1].shrinkAnimate(dotsDuration);
- timelineBarCtrls[i].animate(createAnimation(i+1, duration), duration);
- timelineDotCtrls[i].expandedAnimate(dotsDuration);
- }
-
- }
- }
- }
-
- start();
- }
-
-}])
-.directive('attTimeline', ['$timeout', '$compile', function($timeout,$compile){
- return {
- restrict: 'EA',
- replace: true,
- scope: {
- steps: '=',
- trigger:'=',
- alternate: '=',
- barAnimateDuration: '='
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/steptracker/timeline.html',
- controller: 'AttTimelineCtrl',
- link: function(scope,element,attrs,ctrl){
- var init = function(){
- var tempCtrls = [];
- var steps = scope.steps;
-
- var middleSteps = [];
- for(var i = 1; i < steps.length; i++){
- var aStep = steps[i];
- middleSteps.push(aStep);
- }
-
- scope.middleSteps = middleSteps;
-
- //Used in calculating the width of the loading bars
- ctrl.numSteps = steps.length - 1;
- };
-
- init();
-
- //Recompile in case of scope changes
- scope.resetTimeline = function(){
- scope.animate = true;
- $compile(element)(scope);
- };
- }
- }
-}])
-.controller('TimelineBarCtrl', ['$scope', function($scope){
- this.type = 'timelinebar';
- this.order = parseInt($scope.order);
-
- this.animate = function(callback,duration){
- $scope.loadingAnimation(callback,duration);
- };
-
- this.isCancelled = function(isCancelled){
- $scope.isCancelled = isCancelled;
- }
-
-}])
-.directive('timelineBar', ['animation', '$progressBar', function(animation, $progressBar){
- return {
- restrict: 'EA',
- replace: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/steptracker/timelineBar.html',
- scope: {
- order: '@'
- },
- require: ['^attTimeline', 'timelineBar'],
- controller: 'TimelineBarCtrl',
- link: function(scope,element,attrs, ctrls){
-
- var attTimelineCtrl = ctrls[0];
- var timelineBarCtrl = ctrls[1];
-
- attTimelineCtrl.addTimelineBarCtrls(timelineBarCtrl);
-
- scope.isCompleted = true;
-
- var widthPerc = (100/attTimelineCtrl.numSteps)-3;
-
- element.css('width', widthPerc+'%');
-
- var elem = element.find('div').eq(0);
-
- animation.set(elem, {opacity: 0.0});
-
- var updateCallback = function(selfElement){
- animation.set(elem, {opacity:1.0});
- animation.set(elem,{
- scaleX:selfElement.progress(),
- transformOrigin: "left"
- });
- };
-
- scope.loadingAnimation = $progressBar(updateCallback);
- }
- }
-}])
-.controller('TimelineDotCtrl', ['$scope','$timeout', 'timelineConstants',function($scope,$timeout,timelineConstants){
- this.type = 'dot';
-
- this.order = parseInt($scope.order);
- var self = this;
-
- $timeout(function(){
-
- if(self.order != 0){
- if(self.order %2 != 0){
- $scope.initializeAboveForAnimation();
- }
- else{
- $scope.initializeBelowForAnimation();
- }
- }
-
- });
-
- this.expandedAnimate = function(duration){
-
- $scope.setColor();
- $scope.expandedAnimate(duration);
-
- if(self.order != 0 && !$scope.isStepsLessThanFive()){
- if(self.order % 2 != 0){
- $scope.expandContentForAbove(duration);
- }else{
- $scope.expandContentForBelow(duration);
- }
- }
-
- };
-
- this.unhoveredStateForAbove = function(duration){
- $scope.unhoveredStateForAbove(duration);
- };
-
- this.unhoveredStateForBelow = function(duration){
- $scope.unhoveredStateForBelow(duration);
- };
-
- this.shrinkAnimate = function(duration){
- $scope.shrinkAnimate(duration);
- };
-
- this.setExpanded = function(){
- $scope.setSize(3);
- };
-
- this.isStop = function(){
- return $scope.isStop;
- };
-
- this.isCancelled = function(){
- if($scope.type == timelineConstants.STEP_TYPE.CANCELLED)
- return true;
- else
- return false;
- };
-
- this.isAlert = function(){
- if($scope.type == timelineConstants.STEP_TYPE.ALERT)
- return true;
- else
- return false;
- };
-
- //Sets the bolded text
- this.isCurrentStep = function(isCurrentStep){
- if(isCurrentStep != undefined){
- $scope.isCurrentStep = isCurrentStep;
- }
- return $scope.isCurrentStep;
- };
-
-}])
-.directive('timelineDot', ['$timeout', 'animation', 'timelineConstants',
- function($timeout,animation,timelineConstants){
- return {
- restrict: 'EA',
- replace: true,
- scope:{
- order:'@',
- title:'@',
- description: '@',
- by: '@',
- date: '@',
- type: '@'
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/steptracker/timelineDot.html',
- require: ['^attTimeline', 'timelineDot'],
- controller: 'TimelineDotCtrl',
- link: function(scope,element,attrs,ctrls){
-
- var attTimelineCtrl = ctrls[0];
- var timelineDotCtrl = ctrls[1];
- attTimelineCtrl.addTimelineDotCtrls(timelineDotCtrl);
-
- scope.numSteps = attTimelineCtrl.numSteps + 1;
-
- scope.isCurrentStep = false;
- scope.isCompleted = false;
- scope.isStop = false;
-
- if(scope.type == timelineConstants.STEP_TYPE.ALERT || scope.type == timelineConstants.STEP_TYPE.CANCELLED){
- scope.isStop = true;
- }
-
- scope.isInactive = true;
-
- var divs = element.find('div');
-
- var biggerCircleElem = divs.eq(0);
- var expandableCircleElem = divs.eq(2);
- var infoboxElem = divs.eq(3);
- var titleElem = divs.eq(5);
- var contentElem = divs.eq(6);
- var dateElem = divs.eq(9);
-
-
- function isEmptyStep(){
- if(!scope.description && !scope.by && !scope.date)
- return true;
- return false;
- }
-
- scope.isStepsLessThanFive = function(){
- if(scope.numSteps < 5)
- return true;
- return false;
- }
-
-
-
- scope.titleMouseover=function(num){
-
- if(!scope.isStepsLessThanFive()){
- if(!isEmptyStep()){
- if(num == 1 && scope.order%2 == 0){
- scope.expandContentForBelow(.25);
- }
-
- if(num == 2 && scope.order%2 != 0){
- scope.expandContentForAbove(.25);
- }
- }
- }
-
- };
-
- scope.titleMouseleave = function(num){
- if(scope.order%2 == 0){
- scope.unhoveredStateForBelow(.25);
- }
- else{
- scope.unhoveredStateForAbove(.25);
- }
- };
-
- scope.initializeAboveForAnimation = function(){
- if(!scope.isStepsLessThanFive() && attTimelineCtrl.isAlternate()){
- animation.set(contentElem,{opacity:0});
- animation.set(dateElem,{opacity:0});
-
- if(!isEmptyStep()){
- var yOffset = contentElem[0].offsetHeight + dateElem[0].offsetHeight;
-
- animation.set(titleElem,{'top':yOffset });
- }
- }
- };
-
- scope.expandContentForAbove = function(duration){
-
- if(!scope.isStepsLessThanFive() && attTimelineCtrl.isAlternate()){
- animation.to(titleElem,duration, {'top':0});
- animation.to(contentElem,duration,{opacity:1});
- animation.to(dateElem,duration,{opacity:1});
- }
-
- };
-
- scope.unhoveredStateForAbove = function(duration){
-
- if(!scope.isStepsLessThanFive() && attTimelineCtrl.isAlternate()){
- animation.set(contentElem,{opacity:0});
- animation.set(dateElem,{opacity:1});
- var yOffset = contentElem[0].offsetHeight;
- animation.to(titleElem,duration,{'top':yOffset});
- }
-
- };
-
- scope.initializeBelowForAnimation = function(){
- if(!scope.isStepsLessThanFive() && attTimelineCtrl.isAlternate()){
- animation.set(contentElem,{height:'0%',opacity:0, top:'-20px'});
- animation.set(dateElem,{opacity:0});
- }
- };
-
- scope.expandContentForBelow = function(duration){
-
- if(!scope.isStepsLessThanFive() && attTimelineCtrl.isAlternate()){
- animation.set(dateElem,{opacity:1});
- animation.to(contentElem,duration,{ height:'auto',opacity:1, top:'0px'});
- }
-
- };
-
- scope.unhoveredStateForBelow = function(duration){
-
- if(!scope.isStepsLessThanFive() && attTimelineCtrl.isAlternate()){
- animation.to(contentElem,duration,{height:'0%',opacity:0, top:'-20px', position:'relative'});
- animation.set(dateElem,{opacity:1});
- }
-
- };
-
- /*
- Default Initializaztion
- */
-
- //If the info box is above and the description and date and by are empty then we have do reset its position
- if(isEmptyStep()){
- //IT has to be an alternating version for it to be above
- if(scope.order%2 != 0 && attTimelineCtrl.isAlternate())
- infoboxElem.css('top', '-47px');
- }
-
-
- //Check if the order is odd and set the appropiate above or below and other effects
- //scope.isAboveInfoBoxShown = true;
- if(scope.order%2 == 0 || !attTimelineCtrl.isAlternate()){
- scope.isBelowInfoBoxShown=true;
- }
- else{
- scope.isBelowInfoBoxShown=false;
- }
-
- //modify some css for steps less than 5 and not alternating
- if(scope.isStepsLessThanFive() && !attTimelineCtrl.isAlternate()){
- animation.set(dateElem,{marginTop:10});
- }
-
- //For IE 8 fix
- animation.set(biggerCircleElem,{opacity: '.5'});
-
- //shrink the expandableCircle to we can expand it later
- animation.set(expandableCircleElem, {opacity: '0.0'});
- animation.set(expandableCircleElem, {scale: .10});
-
- if(scope.order == 0){
- animation.set(expandableCircleElem, {opacity: '1.0'});
- animation.set(expandableCircleElem,{scale: 1});
- animation.set(biggerCircleElem,{scale:3});
-
- scope.isCurrentStep = true;
- scope.isInactive=false;
- scope.isCompleted = true;
- }
-
- scope.setColor = function(){
- scope.isInactive=false;
- if(scope.type == timelineConstants.STEP_TYPE.CANCELLED){
- scope.isCancelled=true;
- }
- else if(scope.type == timelineConstants.STEP_TYPE.ALERT){
- scope.isAlert=true;
- }
- else{
- scope.isCompleted = true;
- }
-
- if(!scope.$phase)
- scope.$apply();
- };
-
- scope.setSize = function(size){
- animation.set(biggerCircle,{scale:size});
- };
-
- scope.setExpandedCircle = function(){
- animation.set(expandableCircleElem, {opacity: '1.0'});
- animation.set(expandableCircleElem,{scale: 1});
- };
-
- scope.expandedAnimate = function(duration){
- animation.to(biggerCircleElem,duration,{scale:3});
- animation.set(expandableCircleElem, {opacity: '1.0'});
- animation.to(expandableCircleElem,duration,{scale: 1});
- };
-
- scope.shrinkAnimate = function(duration){
- animation.to(biggerCircleElem,duration,{scale:1});
- };
-
- }
- }
-}]);
-angular.module('att.abs.table', ['att.abs.utilities'])
-.constant('tableConfig', {
- defaultSortPattern: false, //true for descending & false for ascending
- highlightSearchStringClass: 'tablesorter-search-highlight'
-})
-
-.directive('attTable', ['$filter', function($filter) {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- scope: {
- tableData: "=",
- viewPerPage: "=",
- currentPage: "=",
- totalPage: "=",
- searchCategory: "=",
- searchString: "="
- },
- require: 'attTable',
- templateUrl: 'app/scripts/ng_js_att_tpls/table/attTable.html',
- controller: ['$scope', function($scope) {
- this.headers = [];
- this.currentSortIndex = null;
- this.setIndex = function(headerScope) {
- this.headers.push(headerScope);
- };
- 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.sortData = function(columnIndex, reverse) {
- $scope.$parent.columnIndex = columnIndex;
- $scope.$parent.reverse = reverse;
- this.currentSortIndex = columnIndex;
- $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();
- }
- }
- };
- }],
- link: function(scope, elem, attr, ctrl) {
- scope.searchCriteria = {};
- scope.$watchCollection('tableData', function(value) {
- if(value && !isNaN(value.length)) {
- scope.totalRows = value.length;
- }
- });
- scope.$watch('currentPage', function(val) {
- scope.$parent.currentPage = val;
- });
- scope.$watch('viewPerPage', function(val) {
- scope.$parent.viewPerPage = val;
- });
- scope.$watch(function() {
- return scope.totalRows / scope.viewPerPage;
- }, function(value) {
- if(!isNaN(value)) {
- scope.totalPage = Math.ceil(value);
- scope.currentPage = 1;
- }
- });
- var resetSearchCriteria = function() {
- scope.searchCriteria = {};
- };
- scope.$watch('searchCategory', function(value) {
- if (angular.isDefined(value) && value !== null && value !== "" && angular.isDefined(scope.searchString) && scope.searchString !== null && scope.searchString !== "") {
- var index = ctrl.getIndex(value);
- if (index !== null) {
- resetSearchCriteria();
- scope.searchCriteria[index] = scope.searchString;
- } else {
- resetSearchCriteria();
- }
- } else if (angular.isDefined(scope.searchString) && scope.searchString !== null && scope.searchString !== "" && (!angular.isDefined(value) || value === null || value === "")) {
- scope.searchCriteria = {
- $: scope.searchString
- };
- } else {
- resetSearchCriteria();
- }
- });
- scope.$watch('searchString', function(value) {
- if (angular.isDefined(value) && value !== null && value !== "" && angular.isDefined(scope.searchCategory)
- && scope.searchCategory !== null && scope.searchCategory !== "") {
- var index = ctrl.getIndex(scope.searchCategory);
- if (index !== null) {
- resetSearchCriteria();
- scope.searchCriteria[index] = value;
- } else {
- resetSearchCriteria();
- }
- } else if (angular.isDefined(value) && value !== null && value !== ""
- && (!angular.isDefined(scope.searchCategory) || scope.searchCategory === null || scope.searchCategory === ""))
- {
- scope.searchCriteria = {
- $: value
- };
- } else {
- resetSearchCriteria();
- }
- });
- scope.$watchCollection('searchCriteria', function(val) {
- scope.$parent.searchCriteria = val;
- scope.totalRows = ($filter('filter')(scope.tableData, val, false)).length;
- scope.currentPage = 1;
- });
- }
- };
-}])
-
-.directive('attTableRow', [function() {
- return {
- restrict: 'EA',
- compile: function (elem, attr) {
- if (attr.type === 'header') {
- elem.find('tr').eq(0).addClass('tablesorter-headerRow');
- } 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 | attLimitTo : viewPerPage : viewPerPage*(currentPage-1)"));
-
- html.attr('ng-class', "{'alt-row': $even,'normal-row': $odd}");
- elem.append(html);
- }
- }
- };
-}])
-
-.directive('attTableHeader', ['tableConfig', function(tableConfig) {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- scope: {
- sortable: '@',
- defaultSort: '@',
- index: '@key',
- arrowDirection: '=',
- clickFunc: '&'
- },
- require: '^attTable',
- templateUrl: 'app/scripts/ng_js_att_tpls/table/attTableHeader.html',
- link: function(scope, elem, attr, ctrl) {
- var reverse = tableConfig.defaultSortPattern;
- scope.headerName = elem.text();
- scope.sortPattern = null;
- ctrl.setIndex(scope);
-
- scope.$watch('arrowDirection', function(val){
- if(val)
- scope.sortPattern = 'asc';
- else
- scope.sortPattern = 'desc';
- });
-
- scope.$watch(function() {
- return elem.text();
- }, function(value) {
- scope.headerName = value;
- });
- scope.sort = function(sortType) {
- if(sortType === true || sortType === false) {
- reverse = sortType;
- }
- ctrl.sortData(scope.index, reverse);
- scope.sortPattern = reverse ? 'desc' : 'asc';
- reverse = !reverse;
- };
- scope.$watch(function() {
- return ctrl.currentSortIndex;
- }, function(value) {
- if (value !== scope.index) {
- scope.sortPattern = null;
- }
- });
- 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 = tableConfig.defaultSortPattern;
- };
- }
- };
-}])
-
-.directive('attTableBody', ['$filter', '$timeout', 'tableConfig', function($filter, $timeout, tableConfig) {
- return {
- restrict: 'EA',
- require: '^attTable',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/table/attTableBody.html',
- link: function (scope, elem, attr, ctrl) {
- var highlightSearchStringClass = tableConfig.highlightSearchStringClass;
- var searchString = "";
- $timeout(function () {
- var actualHtml = elem.children();
- scope.$watch(function () {
- return ctrl.getSearchString();
- }, function (val) {
- searchString = val;
- clearWrap(elem);
- if (actualHtml.length > 0) {
- traverse(elem);
- } else {
- wrapElement(elem);
- }
- });
- }, 50);
-
- 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 wrapElement = function (elem) {
- var text = elem.text();
- elem.html('');
- elem.append($filter('highlight')(text, searchString, highlightSearchStringClass));
- };
-
- 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);
- }
- }
- };
- }
- };
-}]);
-
-angular.module('att.abs.tabs', [])
- .directive('attTabs', function() {
- return{
- restrict: 'EA',
- transclude: false,
- replace: true,
- scope: {
- tabs: "=title"
- },
- controller: ['$scope', function($scope) {
- this.getData = function() {
- return $scope.tabs;
- };
- this.onClickTab = function(tab) {
-
- return $scope.currentTab = tab.url;
- };
- this.isActiveTab = function(tab) {
- return tab === $scope.currentTab;
- };
- }],
- link: function(scope, elem, attr, ctrl) {
- for (var i = 0; i < scope.tabs.length; i++) {
- if (scope.tabs[i].selected) {
- if (scope.tabs[i].url) {
- scope.currentTab = scope.tabs[i].url;
- }
- }
- }
- }
- };
- })
- .directive('floatingTabs', function() {
- return {
- require: '^attTabs',
- restrict: 'EA',
- transclude: false,
- replace: true,
- scope: {
- size: "@"
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/tabs/floatingTabs.html',
- link: function(scope, elem, attr, attTabsCtrl) {
- scope.tabs = attTabsCtrl.getData();
- scope.onClickTab = attTabsCtrl.onClickTab;
- scope.isActiveTab = attTabsCtrl.isActiveTab;
- }
- };
- })
- .directive('simplifiedTabs', function() {
- return {
- require: '^attTabs',
- restrict: 'EA',
- transclude: false,
- replace: true,
- scope: {
- ctab: "=ngModel"
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/tabs/simplifiedTabs.html',
- link: function(scope, elem, attr, attTabsCtrl) {
- scope.tabs = attTabsCtrl.getData();
- scope.clickTab = function(tab) {
- return scope.ctab = tab.id;
- };
- scope.isActive = function(tab) {
- return tab === scope.ctab;
- };
- }
- };
- })
-
- .directive('genericTabs', function() {
- return {
- require: '^attTabs',
- restrict: 'EA',
- transclude: false,
- replace: true,
- scope: {
- ctab: "=ngModel"
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/tabs/genericTabs.html',
- link: function(scope, elem, attr, attTabsCtrl) {
- scope.tabs = attTabsCtrl.getData();
- scope.clickTab = function(tab) {
- return scope.ctab = tab.id;
- };
- scope.isActive = function(tab) {
- return tab === scope.ctab;
- };
- }
- };
- })
- .directive('parentTab',[ function() {
- return {
- restrict: 'EA',
- scope: {
- menuItems:'=',
- activeSubMenu:'=',
- activeMenu:'='
- },
- controller: ['$scope',function($scope){
- $scope.megaMenu=$scope.menuItems;
- $scope.megaMenuTab;
- $scope.megaMenuHoverTab;
- this.setMenu=function(index){
- $scope.menuItems=$scope.megaMenu;
- for(var i=0; i<$scope.menuItems.length; i++){
- if($scope.menuItems[i].active == true){
- $scope.activeMenu=$scope.menuItems[i];
- };
- };
- this.setSubMenuStatus(false);
-
- $scope.$apply();
- };
- this.setActiveMenu=function(){
- if(!($scope.megaMenuTab=="undefined" || $scope.megaMenuTab==null)){
- $scope.menuItems=[$scope.megaMenuTab];
- $scope.activeMenu={};
- $scope.activeSubMenu=$scope.megaMenuTab;
- this.setSubMenuStatus(true);
- }
- else{
- for(var i=0; i<$scope.menuItems.length; i++){
- ($scope.menuItems[i].active = false);
- if($scope.menuItems[i].subItems)
- for(var j=0; j<$scope.menuItems[i].subItems.length; j++){
- $scope.menuItems[i].subItems[j].active = false;
- };
- };
- $scope.menuItems=$scope.megaMenu;
- }
- $scope.$apply();
- };
- var checkSubMenuStatus = false;
-
- this.setSubMenuStatus = function(value){
- checkSubMenuStatus = value;
- };
- this.getSubMenuStatus = function(){
- return checkSubMenuStatus;
- };
- this.setActiveMenuTab=function(tab){
- $scope.megaMenuTab=tab;
- };
- this.setActiveMenuHoverTab=function(tab){
- $scope.megaMenuHoverTab=tab;
- };
- this.setActiveSubMenuTab=function(){
- $scope.megaMenuTab=$scope.megaMenuHoverTab;
- };
- this.resetMenuTab=function(){
- $scope.megaMenuTab='undefined';
- };
- }]
- }
- }])
- .directive('parentmenuTabs',[ function() {
- return {
- restrict: 'EA',
- transclude: true,
- replace: true,
- scope: {
- megaMenu:'@',
- menuItems:'='
- },
- controller: ['$scope',function($scope){
- this.getMenu=function(){
- return $scope.menuItems;
- };
- this.setMenu=function(menuItem){
- $scope.menuItems=menuItem;
- };
- }],
- templateUrl: 'app/scripts/ng_js_att_tpls/tabs/parentmenuTab.html'
- }
- }])
- .directive('menuTabs',["$window","$document", function(win,$document) {
- return {
- restrict: 'EA',
- transclude: true,
- replace: true,
- require: ['^parentTab', '^?parentmenuTabs'],
- scope: {
- activeMenu:"=",
- menuItem: "=",
- subMenu: "@",
- subItemActive: "@"
- },
- templateUrl:function(element, attrs) {
- if(attrs.megaMenu){
- return 'app/scripts/ng_js_att_tpls/tabs/menuTab.html';
- }
- else{
- return 'app/scripts/ng_js_att_tpls/tabs/submenuTab.html';
- }
- },
- link: function(scope, elem, attr,ctrl) {
- var parentCtrl = ctrl[0];
- var parentmenuCtrl = ctrl[1];
- scope.clickInactive=true;
- scope.showHoverChild = function(e){
- scope.clickInactive=false;
- scope.hoverChild=ctrl[0].getSubMenuStatus();
- if(e.type=="mouseover" && ctrl[0].getSubMenuStatus())
- {
- scope.showChildren(e);
- }
- }
- scope.showChildren = function(e){
- scope.parentMenuItems=parentmenuCtrl.getMenu();
- for(var i=0; i<scope.parentMenuItems.length; i++){
- scope.parentMenuItems[i].active = false;
- if(scope.parentMenuItems[i].subItems){
- for(var j=0; j<scope.parentMenuItems[i].subItems.length; j++){
- scope.parentMenuItems[i].subItems[j].active = false;
- };
- };
- scope.clickInactive=true;
- };
- scope.menuItem.active = true;
- scope.activeMenu=scope.menuItem;
- e.stopPropagation();
- };
- scope.$watch("subItemActive",function(value){
- if(value=="true" && scope.subMenu=='true'){
- parentCtrl.setActiveMenuHoverTab(scope.menuItem);
- }
- });
-
- scope.showMenuClick=function(){
- parentCtrl.setActiveMenuTab(scope.menuItem);
- };
- scope.showSubMenuClick=function(){
- parentCtrl.setActiveSubMenuTab();
- };
- scope.resetMenu=function(){
- parentCtrl.resetMenuTab();
- };
-
- function debounce(method, delay) {
- clearTimeout(method._tId);
- method._tId= setTimeout(function(){
- parentCtrl.setMenu();
- }, delay);
- }
- function debounce1(method, delay) {
- clearTimeout(method._tId);
- method._tId= setTimeout(function(){
- parentCtrl.setActiveMenu();
- }, delay);
- }
- $document.bind('scroll', function() {
- if(win.pageYOffset===0){
- debounce(parentCtrl.setMenu, 100);
- }
- else if(win.pageYOffset>1 && win.pageYOffset<1500){
- debounce1(parentCtrl.setActiveMenu, 100);
- }
- });
- }
- };
- }]);
-angular.module('att.abs.tagBadges', [])
- .directive('tagBadges', ['$parse', '$timeout', function($parse, $timeout) {
- return {
- restrict: 'EA',
- replace: false,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/tagBadges/tagBadges.html',
- scope: {
- styleType: "@",
- onClose: "&"
- },
- link: function(scope, elem, attr, ctrl) {
- scope.isSmall = false;
- scope.isIcon = false;
- scope.isColor = false;
- scope.display = true;
- scope.isClosable = false;
- scope.isHighlight = false;
- scope.customColor = false;
-
- if (attr.small === "") {
- scope.isSmall = true;
- }
-
- if (scope.styleType === "icon") {
- scope.isIcon = true;
- }
- else if (scope.styleType === "color") {
- scope.isColor = true;
- if(attr.color != undefined && attr.color != "") {
- scope.customColor = true;
- attr.$observe("color", function(val) {
- scope.border_type_borderColor = val;
- scope.background_type_backgroundColor = val;
- scope.background_type_borderColor = val;
- });
- }
- }
-
- scope.activeHighlight = function(state){
- if(scope.customColor){
- if(state){
- scope.isHighlight = true;
- }
- else{
- scope.isHighlight = false;
- }
- }
- };
-
- if (attr.closable === "") {
- scope.isClosable = true;
-
- scope.closeMe = function() {
- scope.display = false;
-
- $timeout(function(){
- elem.attr("tabindex", "0");
- elem[0].focus();
- elem.bind('blur', function(){
- elem.remove();
- });
- });
-
- if(attr['onClose']){
- scope.onClose = $parse(scope.onClose);
- scope.onClose();
- }
- };
- }
- }
- }
- }]);
-angular.module('att.abs.textOverflow', [])
- .constant('textDefaultOptions', {
- width: '50%'
- })
-.directive('attTextOverflow', ['textDefaultOptions','$compile',function(textDefaultOptions,$compile)
-{
- return {
- restrict: 'A',
- link: function(scope, elem, attrs, ctrl)
- {
- var tooltipText = elem.text();
- elem.addClass('text-ellipsis');
- attrs.$observe('attTextOverflow', function(val){
- if(val)
- elem.css({"width":val});
- else
- elem.css({"width":textDefaultOptions.width});
- });
- if(!(elem.attr('tooltip'))){
- elem.attr("tooltip", tooltipText);
- elem.attr("tooltip-placement", 'above');
- var newElem = angular.element(elem);
- $compile(newElem)(scope);
- }
- }
- };
-}]);
-
-angular.module('att.abs.toggle', ['angular-gestures', 'att.abs.position'])
- .directive('attToggleTemplate', ['$compile', '$log', '$position', function($compile, $log, $position)
- {
- return{
- restrict: 'A',
- require: 'ngModel',
- transclude: true,
- scope: {
- modelVal: "=ngModel"
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/toggle/demoToggle.html',
- link: function(scope, element, attr, ctrl) {
- var ngCtrl = ctrl;
- scope.initialDragPosition = 0;
- var dragStatus = 0;
- var switchMovementPath = ($position.offset(element.children().eq(1).children().eq(0)).width -1);
- scope.drag = function(e) {
- var self = this;
- dragStatus = 1;
- if (e.type === 'dragstart') {
- scope.initialDragPosition = $position.position(element.children().eq(1)).left;
-
- element.children().eq(1).addClass('dragging');
- } else if (e.type === 'drag') {
- var left = Math.min(0, Math.max(scope.initialDragPosition + e.gesture.deltaX, -switchMovementPath));
- element.children().eq(1).css({
- left: left + 'px'
- });
- } else if (e.type === 'dragend') {
- var isOn = $position.position(element.children().eq(1)).left > (switchMovementPath*-1)/2;
- element.children().eq(1).removeClass('dragging');
- TweenMax.to(element.children().eq(1), .1, {left: isOn ? 0 : (switchMovementPath*-1), ease: Power4.easeOut, onComplete: function(){element.children().eq(1).css({left: ''}) } });
- if(isOn === true){
- updateModelVal();
- }
- else if(isOn === false && e.gesture.direction === "left"){
- updateModelVal();
- }
- dragStatus = 0;
- }
-
- return false;
- };
-
- scope.directiveValue = attr.attToggleTemplate;
- scope.on = attr.trueValue;
- scope.off = attr.falseValue;
- var switchMovementPathPixels = ((switchMovementPath)*-1) + 'px';
- scope.$watch('modelVal', function(newVal) {
- scope.attrValue = newVal;
- if (newVal === attr.ngTrueValue || newVal === true) {
- element.children().eq(1).css({
- left : '0px'
- });
- element.addClass('att-checkbox--on');
- element.attr("aria-checked", true);
- dragStatus = 0;
- } else {
- element.children().eq(1).css({
- left : switchMovementPathPixels
- });
- element.removeClass('att-checkbox--on');
- element.attr("aria-checked", false);
- dragStatus = 0;
- }
- element.children().eq(1).css({
- left : ''
- });
-
- });
-
- var updateModelVal = function() {
- if (scope.attrValue === attr.ngTrueValue || scope.attrValue === true)
- {
- scope.modelVal = false;
- }
- else
- {
- scope.modelVal = true;
- }
- };
- scope.updateModel = function(env){
- {
- if (dragStatus !== 1) {
- updateModelVal();
- dragStatus = 0;
- }
- };
- env.preventDefault();
- };
-
-
- }
- };
- }
-
- ])
-
- .directive('attToggleMain', ['$compile', '$log', function($compile, $log)
- {
- return{
- restrict: 'A',
- require: 'ngModel',
- transclude: true,
- replace: true,
- scope: {
- modelValue: "=ngModel",
- trueValue: "=ngTrueValue",
- falseValue: "=ngFalseValue"
- },
- link: function(scope, element, attr, ctrl) {
- var ngCtrl = ctrl;
- var html = "";
- var attrVal = "";
- element.removeAttr('att-toggle-main');
- scope.on = attr.ngTrueValue;
- scope.off = attr.ngFalseValue;
- scope.largeValue = attr.attToggleMain;
- if (angular.isDefined(attr.ngTrueValue)) {
- html += ' true-value="{{on}}" false-value="{{off}}"';
- }
- if (scope.largeValue !== undefined)
- {
- attrVal += ' ="{{largeValue}}"';
- }
-
- element.css({display:'none'});
- var elm = angular.element('<div role="checkbox" class="att-switch att-switch-alt" ng-class="{\'large\' : largeValue == \'large\'}" ng-model="modelValue"' + html + ' att-toggle-template' + attrVal + '>' + element.prop('outerHTML') + '</div>'); elm = $compile(elm)(scope);
- element.replaceWith(elm);
- }
- };
- }]
- );
-angular.module('att.abs.tooltip', ['att.abs.position', 'att.abs.utilities', 'ngSanitize'])
-
- // The default options tooltip and popover.
- .constant('tooltipDefaultOptions', {
- placement: 'above',
- animation: false,
- popupDelay: 0,
- stylett: 'dark',
- appendToBody: true
- })
-
- /**
- * The $tooltip service creates tooltip- and popover-like directives as well as
- * houses global options for them.
- */
- .provider('$tooltip', ['tooltipDefaultOptions', function(tooltipDefaultOptions) {
-
- // Default hide triggers for each show trigger
- var triggerMap = {
- 'mouseenter': 'mouseleave',
- 'click': 'click',
- 'focus': 'blur',
- 'mouseover':'mouseout'
- };
-
- // The options specified to the provider globally.
- var globalOptions = {};
-
- this.options = function(value) {
- angular.extend(globalOptions, value);
- };
-
- /**
- * This allows you to extend the set of trigger mappings available. E.g.:
- *
- * $tooltipProvider.setTriggers( 'openTrigger': 'closeTrigger' );
- */
- this.setTriggers = function setTriggers(triggers) {
- angular.extend(triggerMap, triggers);
- };
-
- /**
- * This is a helper function for translating camel-case to snake-case.
- */
- function snake_case(name) {
- var regexp = /[A-Z]/g;
- var separator = '-';
- return name.replace(regexp, function(letter, pos) {
- return (pos ? separator : '') + letter.toLowerCase();
- });
- }
-
- /**
- * Returns the actual instance of the $tooltip service.
- */
- this.$get = ['$window', '$compile', '$timeout', '$parse', '$document', '$position', '$interpolate', function($window, $compile, $timeout, $parse, $document, $position, $interpolate) {
- return function $tooltip(type, prefix, defaultTriggerShow) {
- var options = angular.extend({}, tooltipDefaultOptions, globalOptions);
-
- /**
- * Returns an object of show and hide triggers.
- *
- * If a trigger is supplied,
- * it is used to show the tooltip; otherwise, it will use the `trigger`
- * option passed to the `$tooltipProvider.options` method; else it will
- * default to the trigger supplied to this directive factory.
- *
- * The hide trigger is based on the show trigger. If the `trigger` option
- * was passed to the `$tooltipProvider.options` method, it will use the
- * mapped trigger from `triggerMap` or the passed trigger if the map is
- * undefined; otherwise, it uses the `triggerMap` value of the show
- * trigger; else it will just use the show trigger.
- */
- function getTriggers(trigger) {
- var show = trigger || options.trigger || defaultTriggerShow;
- var hide = triggerMap[show] || show;
- return {
- show: show,
- hide: hide
- };
- }
-
- var directiveName = snake_case(type);
-
- var startSym = $interpolate.startSymbol();
- var endSym = $interpolate.endSymbol();
- var template =
- '<div ' + directiveName + '-popup ' +
- 'title="' + startSym + 'tt_title' + endSym + '" ' +
- 'content="' + startSym + 'tt_content' + endSym + '" ' +
- 'placement="' + startSym + 'tt_placement' + endSym + '" ' +
- 'animation="tt_animation()" ' +
- 'is-open="tt_isOpen" ' +
- 'stylett="' + startSym + 'tt_style' + endSym + '" ' +
- '>' +
- '</div>';
-
- return {
- restrict: 'EA',
- scope: true,
- link: function link(scope, element, attrs) {
-
- element.attr("tabindex", "0");
- element.bind('mouseenter', function(){
- element.removeAttr("title");
- });
- element.bind('mouseleave', function(){
- element.attr("title", scope.tt_content);
- });
-
- var tooltip = $compile(template)(scope);
- var transitionTimeout;
- var popupTimeout;
- var $body;
- var appendToBody = angular.isDefined(options.appendToBody) ? options.appendToBody : false;
- var triggers = getTriggers(undefined);
- var hasRegisteredTriggers = false;
- var hasEnableExp = angular.isDefined(attrs[prefix + 'Enable']);
-
- // By default, the tooltip is not open.
- // TODO add ability to start tooltip opened
- scope.tt_isOpen = false;
-
- //Adding a scope watch, to remove the created popup from DOM, incase it is updated outside the provider code.
- scope.$watch('tt_isOpen', function(newVal, oldVal){
- if(newVal !== oldVal){
- if( newVal === false ){
- // remove code
- tooltip.remove();
- }
- }
- });
-
- function toggleTooltipBind() {
- if (!scope.tt_isOpen) {
- showTooltipBind();
- } else {
- hideTooltipBind();
- }
- }
-
- // Show the tooltip with delay if specified, otherwise show it immediately
- function showTooltipBind() {
- tooltip = $compile(template)(scope);
- scope.$digest();
- if (hasEnableExp && !scope.$eval(attrs[prefix + 'Enable'])) {
- return;
- }
- if (scope.tt_popupDelay) {
- popupTimeout = $timeout(show, scope.tt_popupDelay);
- } else {
- scope.$apply(show);
- }
- }
-
- function hideTooltipBind() {
- scope.$apply(function() {
- hide();
- });
- }
-
- // Show the tooltip popup element.
- function show() {
- var position,
- ttWidth,
- ttHeight,
- ttPosition;
-
- // Don't show empty tooltips.
- if (!scope.tt_content) {
- return;
- }
-
- // If there is a pending remove transition, we must cancel it, lest the
- // tooltip be mysteriously removed.
- if (transitionTimeout) {
- $timeout.cancel(transitionTimeout);
- }
-
- // Set the initial positioning.
- tooltip.css({top: 0, left: 0, display: 'block', 'z-index': 9999});
-
- // Now we add it to the DOM because need some info about it. But it's not
- // visible yet anyway.
-
- if (appendToBody) {
- $body = $body || $document.find('body');
- $body.append(tooltip);
- } else {
- element.after(tooltip);
- }
-
- // Get the position of the directive element.
- position = appendToBody ? $position.offset(element) : $position.position(element);
-// alert(JSON.stringify(position));
-
- // Get the height and width of the tooltip so we can center it.
- ttWidth = tooltip.prop('offsetWidth');
- ttHeight = tooltip.prop('offsetHeight');
-
- // Calculate the tooltip's top and left coordinates to center it with
- // this directive.
- var ttArrowOffset = 10;
-
- switch (scope.tt_placement) {
- case 'right':
- if(appendToBody){
- ttPosition = {
- top: position.top + position.height / 2 - ttHeight / 2,
- left: position.left + position.width
- };
- }else{
- ttPosition = {
- top: position.top + position.height / 2 - ttHeight / 2,
- left: position.left + position.width + ttArrowOffset
- };
- }
- break;
- case 'below':
- if(appendToBody){
- ttPosition = {
- top: position.top + position.height,
- left: position.left + position.width / 2 - ttWidth / 2
- };
- }else{
- ttPosition = {
- top: position.top + position.height + ttArrowOffset,
- left: position.left + position.width / 2 - ttWidth / 2
- };
- }
- break;
- case 'left':
- if(appendToBody){
- ttPosition = {
- top: position.top + position.height / 2 - ttHeight / 2,
- left: position.left - ttWidth
- };
- }else{
- ttPosition = {
- top: position.top + position.height / 2 - ttHeight / 2,
- left: position.left - ttWidth - ttArrowOffset
- };
- }
- break;
- default:
- if(appendToBody){
- ttPosition = {
- top: position.top - ttHeight,
- left: position.left + position.width / 2 - ttWidth / 2
- };
- }else{
- ttPosition = {
- top: position.top - ttHeight - ttArrowOffset,
- left: position.left + position.width / 2 - ttWidth / 2
- };
- }
- break;
- }
-
- ttPosition.top += 'px';
- ttPosition.left += 'px';
-
- // Now set the calculated positioning.
- tooltip.css(ttPosition);
-
- // And show the tooltip.
- scope.tt_isOpen = true;
- }
-
- // Hide the tooltip popup element.
- function hide() {
- // First things first: we don't show it anymore.
- scope.tt_isOpen = false;
-
- //if tooltip is going to be shown after delay, we must cancel this
- $timeout.cancel(popupTimeout);
-
- // And now we remove it from the DOM. However, if we have animation, we
- // need to wait for it to expire beforehand.
- // FIXME: this is a placeholder for a port of the transitions library.
- if (angular.isDefined(scope.tt_animation) && scope.tt_animation()) {
- transitionTimeout = $timeout(function() {
- tooltip.remove();
- }, 500);
- } else {
- tooltip.remove();
- }
- }
-
- /**
- * Observe the relevant attributes.
- */
- attrs.$observe(type, function(val) {
- if (val) {
- scope.tt_content = val;
- element.attr('title',val);
- } else {
- if (scope.tt_isOpen) {
- hide();
- }
- }
- });
-
- attrs.$observe(prefix + 'Title', function(val) {
- scope.tt_title = val;
- });
-
- attrs.$observe(prefix + 'Placement', function(val) {
- scope.tt_placement = angular.isDefined(val) ? val : options.placement;
- });
-
- attrs.$observe(prefix + 'Style', function(val) {
- scope.tt_style = angular.isDefined(val) ? val : options.stylett;
- });
-
- attrs.$observe(prefix + 'Animation', function(val) {
- scope.tt_animation = angular.isDefined(val) ? $parse(val) : function() {
- return options.animation;
- };
- });
-
- attrs.$observe(prefix + 'PopupDelay', function(val) {
- var delay = parseInt(val, 10);
- scope.tt_popupDelay = !isNaN(delay) ? delay : options.popupDelay;
- });
-
- attrs.$observe(prefix + 'Trigger', function(val) {
-
- if (hasRegisteredTriggers) {
- element.unbind(triggers.show, showTooltipBind);
- element.unbind(triggers.hide, hideTooltipBind);
- }
-
- triggers = getTriggers(val);
-
- if (triggers.show === triggers.hide) {
- element.bind(triggers.show, toggleTooltipBind);
- } else {
- element.bind(triggers.show, showTooltipBind);
- element.bind(triggers.hide, hideTooltipBind);
- }
-
- hasRegisteredTriggers = true;
- });
-
- attrs.$observe(prefix + 'AppendToBody', function(val) {
- appendToBody = angular.isDefined(val) ? $parse(val)(scope) : appendToBody;
- });
-
- // if a tooltip is attached to <body> we need to remove it on
- // location change as its parent scope will probably not be destroyed
- // by the change.
- if (appendToBody) {
- scope.$on('$locationChangeSuccess', function closeTooltipOnLocationChangeSuccess() {
- if (scope.tt_isOpen) {
- hide();
- }
- });
- }
-
- // Make sure tooltip is destroyed and removed.
- scope.$on('$destroy', function onDestroyTooltip() {
- if (scope.tt_isOpen) {
- hide();
- } else {
- tooltip.remove();
- }
- });
- }
- };
- };
- }];
- }])
-
- .directive('tooltipPopup', ['$document', '$documentBind', function($document, $documentBind) {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- scope: {content: '@', placement: '@', animation: '&', isOpen: '=', stylett: '@'},
- templateUrl: 'app/scripts/ng_js_att_tpls/tooltip/tooltip-popup.html',
- link: function(scope, elem, attr, ctrl) {
- var flag = false;
-
- scope.$watch("isOpen", function(value) {
- flag = scope.isOpen;
- });
-
- elem.bind('click', function (e) {
- e.stopPropagation();
- });
-
- var outsideClick = function(e) {
- if (!flag) {
- scope.$apply(function() {
- scope.isOpen = false;
- });
- }
- flag = false;
- };
-
- $documentBind.click('isOpen', outsideClick, scope);
- }
- };
- }])
-
- .directive('tooltip', ['$tooltip', function($tooltip) {
- return $tooltip('tooltip', 'tooltip', 'mouseenter');
- }])
-
- .directive('tooltipCondition', [ '$timeout',function($timeout) {
- return {
- restrict: 'EA',
- replace: true,
- scope:{
- tooltipCondition:"@?"
- },
- template:'<p><span tooltip=\"{{tooltipCondition}}\" ng-if=\"showpop\">{{tooltipCondition}}</span><span id=\"innerElement\" ng-hide=\"showpop\">{{tooltipCondition}}</span></p>',
- link: function(scope, elem, attr){
- scope.showpop=false;
- if(attr.height==='true'){
- $timeout(function () {
- var maxHeight=(elem[0].offsetHeight);
- var elemHeight=elem.children(0)[0].offsetHeight;
- if(elemHeight > maxHeight){
- scope.showpop=true;
- }
- },1000);
- }
- else if(scope.tooltipCondition.length>=25){
- scope.showpop=true;
- }
-
- }
- };
- }]);
-
-angular.module('att.abs.treeview', [])
- .directive('treeView', function() {
- return{
- restrict: 'A',
- link: function(scope, elem, attrs) {
- var el = elem.children('ul li');
- var list = TweenMax.from(el, .2, {display: 'none', paused: true, reversed: true});
- elem.attr("tabindex","0");
- function toggleBranch() {
- if (list.reversed())
- {
- list.play();
- } else
- {
- list.reverse();
- }
- };
- function toggleTree(e){
- e.stopPropagation();
- if ($(e.target).attr("tree-view") !== undefined)
- {
- if (elem.hasClass('minus'))
- {
- elem.removeClass('minus');
- }
- else
- {
- elem.addClass('minus');
- }
- toggleBranch();
- }
- }
- elem.on('click', function(e) {
- toggleTree(e);
- });
- elem.on('keypress', function (e) {
- var activeCode = e.keyCode ? e.keyCode : e.charCode;
- var keyCode = [13,32];
- if(keyCode.length > 0 && ((activeCode && keyCode.indexOf(activeCode) > -1))) {
- toggleTree(e);
- e.preventDefault();
- }
- });
- }
- };
- });
-
-angular.module('att.abs.typeAhead', ['att.abs.tagBadges'])
-
- .directive('focusMe',['$timeout', '$parse', function($timeout, $parse) {
- return {
- link: function(scope, element, attrs) {
- var model = $parse(attrs.focusMe);
-
- scope.$watch(model, function(value) {
- if (value === true) {
- $timeout(function() {
- element[0].focus();
- scope.inputActive=true;
- });
- }
- });
-
- element.bind('blur', function() {
- scope.$apply(model.assign(scope, false));
- scope.inputActive=false;
- });
- }
- };
- }])
-
- .directive('typeAhead', ['$timeout', function($timeout) {
- return {
- restrict: 'EA',
- templateUrl: 'app/scripts/ng_js_att_tpls/typeAhead/typeAhead.html',
- replace: true,
- scope: {
- items: '=',
- title: '@',
- subtitle: '@',
- model: '=',
- emailIdList:'=',
- emailMessage:'='
- },
- link: function(scope, elem, attrs) {
- scope.lineItems = [];
- scope.filteredListLength = -1;
- scope.filteredList = [];
- scope.inputfocus = false;
-
- scope.setFocus = function() {
- scope.clickFocus = true;
- };
-
- scope.handleSelection = function(selectedItem,emailItem) {
- scope.lineItems.push(selectedItem);
- scope.emailIdList.push(emailItem);
- scope.model = "";
- scope.current = 0;
- scope.selected = true;
- scope.clickFocus = true;
-
- };
-
- scope.theMethodToBeCalled = function(index) {
- var tempArr = scope.lineItems.slice();
- scope.emailIdList.splice(index, 1);
- tempArr.splice(index, 1);
- $timeout(function() {
- scope.lineItems = [];
- scope.$apply();
- scope.lineItems = scope.lineItems.concat(tempArr);
- });
-
- };
-
- scope.current = 0;
- scope.selected = true;
-
- scope.isCurrent = function(index, itemName,itemEmail,dropdownLength) {
- if (scope.current === index) {
- scope.itemName = itemName;
- scope.itemEmail = itemEmail;
- }
-
- scope.dropdownLength=dropdownLength;
- return scope.current === index;
- };
-
- scope.setCurrent = function(index) {
- scope.current = index;
- };
-
- scope.selectionIndex = function(evt) {
-
- if (evt.keyCode === 38 && scope.current > 0) {
- evt.preventDefault();
- scope.current = scope.current - 1;
- scope.isCurrent(scope.current);
- } else if (evt.keyCode === 9) {
- scope.selected = true;
- } else if (evt.keyCode === 13 && scope.dropdownLength!==scope.items.length) {
- scope.handleSelection(scope.itemName,scope.itemEmail);
- } else if (evt.keyCode === 8 && scope.model.length === 0) {
- scope.theMethodToBeCalled(scope.lineItems.length - 1);
- } else if (evt.keyCode === 46) {
- scope.theMethodToBeCalled(scope.lineItems.length - 1);
- } else if (evt.keyCode === 40 && scope.current < scope.dropdownLength-1) {
- evt.preventDefault();
- scope.current = scope.current + 1;
- scope.isCurrent(scope.current);
- }
-
- elem[0].querySelector('.list-scrollable').scrollTop = (scope.current - 1) * 35;
- };
- }
- };
- }]);
-angular.module('att.abs.userMessages',[])
-.constant('messageConstants', {
- TABLE_MESSAGE_TYPES: {
- noMatching: 1,
- errorLoading: 2,
- magnifySearch: 3,
- isLoading: 4
- },
- USER_MESSAGE_TYPES: {
- success: 1,
- error: 0
- }
-})
-.directive('attTableMessage', ['messageConstants',function(messageConstants) {
-
- return {
- restrict: 'AE',
- replace: true,
- transclude: true,
- scope: {
- msgType: '=',
- onRefreshClick: '&'
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/userMessages/attTableMessage.html',
- link: function(scope,elements,attr){
- scope.messageConstants = messageConstants;
- scope.refreshAction= function(evt){
- scope.onRefreshClick(evt);
- };
- }
- };
-}]).directive('attUserMessage', ['messageConstants',function(messageConstants) {
-
- return{
- restrict: 'AE',
- replace: true,
- transclude:true,
- scope: {
- thetitle: '=',
- type: '=',
- message: '=',
- trigger: '='
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/userMessages/attUserMessage.html',
- link: function(scope,element,attrs) {
- scope.messageConstants= messageConstants;
- }
- };
-}]);
-angular.module('att.abs.verticalSteptracker', [])
- .directive('verticalSteptracker', [
- function() {
- return {
- restrict: 'EA',
- transclude: true,
- replace: false,
- scope: {
- },
- template: '<div class="vertical-nav"><ul ng-transclude class="tickets-list-height"></ul></div>',
- link:function(scope,elem,attribute,ctrl) {
-
- }
- };
- }
- ])
- .directive('verticalSteptrackerStep',[
- function() {
- return {
- restrict: 'EA',
- transclude: true,
- replace: false,
- scope: {
- type: "=type",
- id: "=id"
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/verticalSteptracker/vertical-step-tracker.html',
- link: function(scope, elem, attr, ctrl) {
-
-
- }
- };
- }
- ])
-
- .directive('attAbsLink',[function(){
- return{
- restrict: 'EA',
- transclude: true,
- replace: false,
- template: '<span ng-transclude class="view-log"></span>',
- link: function(scope, elem, attr, ctrl) {
-
- }
- };
- }])
-
-
-
-angular.module('att.abs.videoControls', [])
- .config(['$compileProvider' , function ($compileProvider) {
- $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|javascript):/);
- }])
- .directive('videoControls', [function() {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/videoControls/videoControls.html'
- };
- }])
- .directive('photoControls', [function() {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/videoControls/photoControls.html',
- scope: {
- prevLink: "@",
- nextLink: "@"
- },
- link: function(scope, elem, attr, ctrl) {
- if(!attr['prevLink'])
- scope.prevLink = 'javascript:void(0)';
-
- if(!attr['nextLink'])
- scope.nextLink = 'javascript:void(0)';
-
- scope.links = {
- prevLink : scope.prevLink,
- nextLink : scope.nextLink
- }
- }
- };
- }]);
-angular.module("app/scripts/ng_js_att_tpls/accordion/accordion.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/accordion/accordion.html",
- "<div class=\"att-accordion__group tabpanel\" ng-class=\"{'att-accordion__group att-accordion__group--open':isOpen,'att-accordion__group':!isOpen }\">\n" +
- " <a ng-show=\"showico\" id=\"tab{{index}}\" class=\"toggle-header att-accordion__heading att-accordion__toggle noafter\" aria-selected=\"{{focused}}\" aria-controls=\"panel{{index}}\" ng-class=\"{focus: focused, selected: focused}\" aria-expanded=\"{{isOpen}}\" role=\"tab\" ng-click=\"toggle()\" accordion-transclude=\"heading\" style=\"cursor:pointer; text-decoration:none\">\n" +
- " <span>{{heading}}</span>\n" +
- " <i ng-class=\"{'icon-chevron-down':!isOpen,'icon-chevron-up':isOpen }\" class=\"pull-right\"></i>\n" +
- " </a>\n" +
- " <div ng-show=\"!showico\" ng-class=\"{focus: focused, selected: focused}\" id=\"tab{{index}}\" style=\"text-decoration:none\" accordion-transclude=\"heading\" aria-expanded=\"{{isOpen}}\" role=\"tab\" aria-selected=\"{{focused}}\" aria-controls=\"panel{{index}}\" class=\"toggle-header att-accordion__heading att-accordion__toggle noafter\"><span>{{heading}}</span></div> \n" +
- " <div id=\"panel{{index}}\" aria-labelledby=\"tab{{index}}\" aria-hidden=\"{{!isOpen}}\" role=\"tabpanel\" collapse=\"!isOpen\" class=\"att-accordion__body\" ng-transclude>\n" +
- " </div>\n" +
- " <div class=\"att-accordion__bottom--border\"></div> \n" +
- "</div> ");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/accordion/accordion_alt.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/accordion/accordion_alt.html",
- "<div class=\"att-accordion__group tabpanel\" ng-class=\"{'att-accordion__group att-accordion__group--open':isOpen,'att-accordion__group':!isOpen }\">\n" +
- " <a id=\"tab{{index}}\" class=\"toggle-header att-accordion__heading att-accordion__toggle\" aria-selected=\"{{focused}}\" aria-controls=\"panel{{index}}\" ng-class=\"{focus: focused, selected: focused}\" aria-expanded=\"{{isOpen}}\" role=\"tab\" ng-click=\"toggle()\" accordion-transclude=\"heading\"> \n" +
- " </a>\n" +
- " <span>{{heading}}</span>\n" +
- " <div id<span>{{heading}}</span>=\"panel{{index}}\" aria-labelledby=\"tab{{index}}\" aria-hidden=\"{{!isOpen}}\" role=\"tabpanel\" collapse=\"!isOpen\" class=\"att-accordion__body\" ng-transclude>\n" +
- " </div>\n" +
- "</div> ");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/accordion/attAccord.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/accordion/attAccord.html",
- "<div ng-transclude></div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/accordion/attAccordBody.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/accordion/attAccordBody.html",
- "<div ng-transclude></div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/accordion/attAccordHeader.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/accordion/attAccordHeader.html",
- "<div ng-click=\"clickFunc()\">\n" +
- " <div ng-transclude>\n" +
- " <i class=\"icon-chevron-down\"></i>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/alert/alert.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/alert/alert.html",
- "<div class=\"alert\" ng-class=\"{'alert-success': alertType === 'success', 'alert-warning': alertType === 'warning', 'alert-error': alertType === 'error', 'alert-info': alertType === 'info', 'alert-inplace': showTop !== 'true'}\" ng-show=\"showAlert\" ng-style=\"cssStyle\">\n" +
- " <div class=\"container\">\n" +
- " <a href=\"javascript:void(0)\" alt=\"close\" class=\"close-role\" ng-click=\"close()\" tabindex=\"0\" att-accessibility-click=\"32,13\">Dismiss <i class=\"icon-circle-action-close\"></i></a>\n" +
- " <span ng-transclude> </span>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/colorselector/colorselector.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/colorselector/colorselector.html",
- "<div class=\"att-radio att-color-selector__item\" \n" +
- " ng-class=\"{'att-radio--on': (iconColor === selected)}\">\n" +
- " <div class=\"att-radio__indicator\" tabindex=\"0\" att-accessibility-click=\"32,13\"ng-click=\"selectedcolor(iconColor)\" \n" +
- " ng-style=\"applycolor\" ng-transclude></div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/datepicker/dateFilter.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/datepicker/dateFilter.html",
- "<div class=\"calendar\" ng-class=\"{'monthpicker':mode === 1}\">\n" +
- " <div class=\"select2-container\" ng-class=\"{'select2-container-active select2-dropdown-open': showDropdownList}\" style=\"width: 100%; z-index:0\">\n" +
- " <a tabindex=\"0\" class=\"select2-choice\" href=\"javascript:void(0)\" ng-show=\"!showCalendar\" att-accessibility-click=\"13,32\" ng-click=\"showDropdown()\">\n" +
- " <span class=\"select2-chosen\" ng-show=\"!showCalendar\">{{selectedOption}}</span>\n" +
- " <input type=\"text\" ng-show=\"showCalendar\" ng-blur=\"untrackInputChange($event)\" att-input-deny=\"[^0-9\\/-]\" maxlength=\"{{maxLength}}\" ng-model=\"selectedOption\" ng-change=\"getDropdownText()\" />\n" +
- " <abbr class=\"select2-search-choice-close\"></abbr>\n" +
- " <span ng-class=\"{'select2-arrow': mode !== 1, 'calendar-icon': mode === 1}\"><b></b></span>\n" +
- " </a>\n" +
- " <a class=\"select2-choice\" href=\"javascript:void(0)\" ng-show=\"showCalendar\">\n" +
- " <span class=\"select2-chosen\" ng-show=\"!showCalendar\">{{selectedOption}}</span>\n" +
- " <input type=\"text\" ng-show=\"showCalendar\" ng-blur=\"untrackInputChange($event)\" att-input-deny=\"[^0-9\\/-]\" maxlength=\"{{maxLength}}\" ng-model=\"selectedOption\" ng-change=\"getDropdownText()\" />\n" +
- " <abbr class=\"select2-search-choice-close\"></abbr>\n" +
- " <span tabindex=\"0\" ng-class=\"{'select2-arrow': mode !== 1, 'calendar-icon': mode === 1}\" att-accessibility-click=\"13,32\" ng-click=\"showDropdown()\"><b></b></span>\n" +
- " </a>\n" +
- " </div>\n" +
- " <div class=\"select2-drop select2-drop-active select2-display-none\" ng-style=\"{display: (showDropdownList && 'block') || 'none', 'border-radius': showCalendar && '0 0 0 6px'}\" style=\"width: 100%\">\n" +
- " <ul class=\"select2-results options\" style=\"margin-top:0px;height:120px;overflow:auto;\" ng-transclude></ul>\n" +
- " <ul class=\"select2-results sttings\" style=\"margin-top:0px\">\n" +
- " <li tabindex=\"0\" class=\"select2-result select2-highlighted greyBorder\" ng-class=\"{'select2-result-current': checkCurrentSelection('Custom Single Date')}\" att-accessibility-click=\"13,32\" ng-click=\"selectAdvancedOption('Custom Single Date')\">\n" +
- " <div class=\"select2-result-label\" ng-if=\"mode !== 1\">Custom Single Date...</div>\n" +
- " <div class=\"select2-result-label\" ng-if=\"mode === 1\">Custom single month...</div>\n" +
- " </li> \n" +
- " <li tabindex=\"0\" class=\"select2-result select2-highlighted\" ng-class=\"{'select2-result-current': checkCurrentSelection('Custom Range')}\" att-accessibility-click=\"13,32\" ng-click=\"selectAdvancedOption('Custom Range')\">\n" +
- " <div class=\"select2-result-label\" ng-if=\"mode !== 1\">Custom Range...</div>\n" +
- " <div class=\"select2-result-label\" ng-if=\"mode === 1\">Custom month range...</div>\n" +
- " </li>\n" +
- " <li class=\"select2-result select2-highlighted btnContainer\" ng-style=\"{display: (showCalendar && 'block') || 'none'}\">\n" +
- " <button tabindex=\"0\" ng-blur=\"resetFocus($event)\" att-element-focus=\"focusApplyButton\" att-button=\"\" btn-type=\"{{applyButtonType}}\" size=\"small\" att-accessibility-click=\"13,32\" ng-click=\"apply()\">Apply</button>\n" +
- " <button tabindex=\"0\" att-button=\"\" btn-type=\"secondary\" size=\"small\" att-accessibility-click=\"13,32\" ng-click=\"cancel()\">Cancel</button>\n" +
- " <div>\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" ng-if=\"mode !== 1\" style=\"text-decoration:underline;\" att-accessibility-click=\"13,32\" ng-click=\"clear()\">Clear Dates</a>\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" ng-if=\"mode === 1\" style=\"text-decoration:underline;\" att-accessibility-click=\"13,32\" ng-click=\"clear()\">Clear Months</a>\n" +
- " </div>\n" +
- " </li>\n" +
- " </ul>\n" +
- " </div>\n" +
- " <div class=\"datepicker-wrapper show-right\" ng-style=\"{display: (showCalendar && 'block') || 'none'}\">\n" +
- " <span datepicker ng-blur=\"resetFocus($event)\" att-element-focus=\"focusSingleDateCalendar\" ng-show=\"checkCurrentSelection('Custom Single Date')\"></span>\n" +
- " <span datepicker ng-blur=\"resetFocus($event)\" att-element-focus=\"focusRangeCalendar\" ng-show=\"checkCurrentSelection('Custom Range')\"></span>\n" +
- " </div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/datepicker/dateFilterList.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/datepicker/dateFilterList.html",
- "<li ng-click=\"!disabled && selectOption(fromDate,toDate,caption)\" att-accessibility-click=\"13,32\" ng-class=\"{'select2-result-current': checkCurrentSelection(caption)}\" class=\"select2-result select2-highlighted ng-scope\" tabindex=\"{{!disabled?'0':'-1'}}\">\n" +
- " <div class=\"select2-result-label\" ng-class=\"{'disabled':disabled}\" ng-transclude></div>\n" +
- "</li>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/datepicker/datepicker.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/datepicker/datepicker.html",
- "<ul id=\"datepicker\" class=\"datepicker\" ng-class=\"{'monthpicker': mode === 1}\" aria-hidden=\"false\" role=\"dialog\" tabindex=\"-1\">\n" +
- " <div class=\"datepicker-days\" style=\"display: block;\">\n" +
- " <table class=\"table-condensed\">\n" +
- " <thead>\n" +
- " <tr>\n" +
- " <th id=\"month\" tabindex=\"0\" align=\"left\" class=\"datepicker-switch\" colspan=\"{{(mode !== 1) && (currentRows[0].length - 2) || (currentRows[0].length)}}\">{{currentTitle}}</th>\n" +
- " <th ng-if=\"mode !== 1\" id=\"prev\" aria-hidden=\"{{!disablePrev && 'false' || 'true'}}\" tabindex=\"{{!disablePrev && '0' || '-1'}}\" att-accessibility-click=\"13,32\" ng-click=\"!disablePrev && move(-1)\">\n" +
- " <div class=\"icons-list\" data-size=\"medium\"><i class=\"icon-arrow-left-circle\" ng-class=\"{'disabled': disablePrev}\"></i>\n" +
- " </div><span class=\"hidden-spoken\">Previous Month</span>\n" +
- " </th>\n" +
- " <th ng-if=\"mode !== 1\" id=\"next\" aria-hidden=\"{{!disableNext && 'false' || 'true'}}\" tabindex=\"{{!disableNext && '0' || '-1'}}\" att-accessibility-click=\"13,32\" ng-click=\"!disableNext && move(1)\">\n" +
- " <div class=\"icons-list\" data-size=\"medium\"><i class=\"icon-arrow-right-circle\" ng-class=\"{'disabled': disableNext}\"></i>\n" +
- " </div><span class=\"hidden-spoken\">Next Month</span>\n" +
- " </th>\n" +
- " </tr>\n" +
- " <tr ng-if=\"labels.length > 0\">\n" +
- " <th id=\"{{label.post}}\" tabindex=\"-1\" class=\"dow weekday\" ng-repeat=\"label in labels\"><span>{{label.pre}}</span><span class=\"hidden-spoken\">{{label.post}}</span></th>\n" +
- " </tr>\n" +
- " </thead>\n" +
- " <tbody>\n" +
- " <tr>\n" +
- " <td id=\"datepickerBody\" att-scrollbar colspan=\"{{currentRows[0].length}}\" style=\"padding: 0px;\">\n" +
- " <table ng-class=\"{'table-condensed': mode === 0, 'monthtable-condensed': mode === 1}\" style=\"padding: 0px;\">\n" +
- " <tbody>\n" +
- " <tr ng-repeat=\"row in currentRows\">\n" +
- " <td headers=\"{{dt.header}}\" att-element-focus=\"dt.focused\" aria-hidden=\"{{(!dt.oldMonth && !dt.nextMonth && !dt.disabled && 'false') || 'true'}}\" tabindex=\"{{(!dt.oldMonth && !dt.nextMonth && !dt.disabled && '0') || '-1'}}\" ng-repeat=\"dt in row\" class=\"days\" ng-class=\"{'active': dt.selected || dt.from || dt.to, 'from': dt.from, 'to': dt.to, 'range': dt.dateRange, 'prev-month ': dt.oldMonth, 'next-month': dt.nextMonth, 'disabled': dt.disabled, 'today': dt.today, 'weekend': dt.weekend}\" ng-click=\"!dt.selected && !dt.from && !dt.to && !dt.disabled && !dt.oldMonth && !dt.nextMonth && select(dt.date)\" att-accessibility-click=\"13,32\"><span aria-label=\"{{dt.label}}\" class=\"day\">{{dt.label}}</span></td>\n" +
- " </tr>\n" +
- " <tr ng-if=\"mode === 1\" class=\"divider\"><td colspan=\"{{nextRows[0].length}}\"><hr></td></tr>\n" +
- " <tr>\n" +
- " <th id=\"month\" tabindex=\"0\" align=\"left\" class=\"datepicker-switch internal\" colspan=\"{{nextRows[0].length}}\">{{nextTitle}}</th>\n" +
- " </tr>\n" +
- " <tr ng-repeat=\"row in nextRows\">\n" +
- " <td headers=\"{{dt.header}}\" att-element-focus=\"dt.focused\" aria-hidden=\"{{(!dt.oldMonth && !dt.nextMonth && !dt.disabled && 'false') || 'true'}}\" tabindex=\"{{(!dt.oldMonth && !dt.nextMonth && !dt.disabled && '0') || '-1'}}\" ng-repeat=\"dt in row\" class=\"days\" ng-class=\"{'active': dt.selected || dt.from || dt.to, 'from': dt.from, 'to': dt.to, 'range': dt.dateRange, 'prev-month ': dt.oldMonth, 'next-month': dt.nextMonth, 'disabled': dt.disabled, 'today': dt.today, 'weekend': dt.weekend}\" ng-click=\"!dt.selected && !dt.from && !dt.to && !dt.disabled && !dt.oldMonth && !dt.nextMonth && select(dt.date)\" att-accessibility-click=\"13,32\"><span aria-label=\"{{dt.label}}\" class=\"day\">{{dt.label}}</span></td>\n" +
- " </tr>\n" +
- " </tbody>\n" +
- " </table>\n" +
- " </td>\n" +
- " </tr>\n" +
- " </tbody>\n" +
- " </table>\n" +
- " </div>\n" +
- "</ul>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/datepicker/datepickerPopup.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/datepicker/datepickerPopup.html",
- "<div class=\"calendar\">\n" +
- " <div class=\"box\" ng-class=\"{'active': isOpen}\">\n" +
- " <span ng-transclude></span>\n" +
- " <i class=\"calendar-icon\" tabindex=\"0\" att-accessibility-click=\"13,32\" ng-click=\"toggle()\"></i>\n" +
- " </div>\n" +
- " <div class=\"datepicker-wrapper datepicker-wrapper-display-none\" ng-style=\"{display: (isOpen && 'block') || 'none'}\" aria-hidden=\"false\" role=\"dialog\" tabindex=\"-1\">\n" +
- " <span datepicker></span>\n" +
- " </div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/dividerLines/dividerLines.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/dividerLines/dividerLines.html",
- "<div class=\"divider-container\" ng-class=\"{'divider-container-light': lightContainer}\">\n" +
- " <hr ng-class=\"{'divider-light': lightContainer}\">\n" +
- "</div>\n" +
- "\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/dragdrop/fileUpload.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/dragdrop/fileUpload.html",
- "<label class=\"fileContainer\"><span ng-transclude></span><input type=\"file\" att-file-change></label>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/formField/attFormFieldValidationAlert.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/formField/attFormFieldValidationAlert.html",
- "<div class=\"form-field\" ng-class=\"{'error': errorMessage, 'warning': warningMessage}\">\n" +
- " <label class=\"form-field__label\" ng-class=\"{'form-field__label--show': showLabel, 'form-field__label--hide': hideLabel}\"></label>\n" +
- " <div class=\"form-field-input-container\" ng-transclude></div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/hourpicker/hourpicker.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/hourpicker/hourpicker.html",
- "<div class=\"hourpicker\">\n" +
- " <div class=\"dropdown-width\">\n" +
- " <div ng-model=\"showlist\" class=\"select2-container topDropDownWidth\" ng-class=\"{'select2-dropdown-open select2-container-active': showlist}\" >\n" +
- " <a class=\"select2-choice\" href=\"javascript:void(0)\" id=\"customSelect\" ng-keydown=\"selectOption(selectPrevNextValue($event,options,selectedOption))\" att-accessibility-click=\"13\" ng-click=\"showDropdown()\">\n" +
- " <span class=\"select2-chosen\">{{selectedOption}}</span>\n" +
- " <span class=\"select2-arrow\"><b></b></span>\n" +
- " </a>\n" +
- " </div> \n" +
- " <div class=\"select2-display-none select2-with-searchbox select2-drop-active show-search resultTopWidth\" ng-show=\"showlist\"> \n" +
- " <ul class=\"select2-results resultTopMargin\" > \n" +
- " <li ng-model=\"ListType\" ng-repeat=\"option in options\" att-accessibility-click=\"13\" ng-click=\"selectOption(option,$index)\" class=\"select2-results-dept-0 select2-result select2-result-selectable\"><div class=\"select2-result-label\"><span >{{option}}</span></div></li> \n" +
- " </ul>\n" +
- " </div>\n" +
- " </div>\n" +
- " <div ng-show=\"showDaysSelector\" class=\"customdays-width\">\n" +
- " <div att-divider-lines class=\"divider-margin-f\"></div> \n" +
- " <div class=\"col-md-3 fromto-margin\">\n" +
- " <div>From</div> <br>\n" +
- " <div>To</div>\n" +
- " </div>\n" +
- " <div ng-repeat=\"day in days\">\n" +
- " <div class=\"col-md-3 col-md-days\">\n" +
- " <div class=\"col-md-1 daysselect-margin\">\n" +
- " <input type=\"checkbox\" ng-model=\"daysList[day]\" title=\"Day selection\" att-checkbox ng-change=\"addSelectedValue(day)\"> \n" +
- " </div>\n" +
- " <span>{{day}}</span><br>\n" +
- " \n" +
- " <div class=\"dropDownMarginBottom\">\n" +
- " <div class=\"select2-container topDropDownWidth\" ng-class=\"{'select2-dropdown-open select2-container-active': FrtimeListDay[day]}\" >\n" +
- " <a class=\"select2-choice selectDropDown\" href=\"javascript:void(0)\" tabindex=\"{{daysList[day] ? '0' : '-1'}}\" att-accessibility-click=\"13\" ng-click=\"daysList[day] && showfromDayDropdown(day)\" ng-class=\"{'select2-chosen-disabled':!daysList[day]}\" ng-keydown=\"daysList[day] && selectFromDayOption(day , selectPrevNextValue($event,fromtime,selectedFromOption[day]));daysList[day] && addSelectedValue(day);\">\n" +
- " <span class=\"select2-chosen dropDownMarginRight\" >{{selectedFromOption[day]}} <i ng-if=\"daysList[day]\" ng-class=\"FrtimeListDay[day] ? 'icon-dropdown-up' : 'icon-dropdown-down'\"></i></span>\n" +
- " </a>\n" +
- " </div> \n" +
- " \n" +
- " <div class=\"select2-display-none select2-with-searchbox select2-drop-active show-search resultFromDropDown\" ng-show=\"FrtimeListDay[day]\"> \n" +
- " <ul class=\"select2-results resultTopMargin\" > \n" +
- " <li ng-click=\"selectFromDayOption(day,time.value);addSelectedValue(day);\" ng-repeat=\"time in fromtime\" class=\"select2-results-dept-0 select2-result select2-result-selectable\"><div class=\"select2-result-label\" ng-class=\"{'selectedItemInDropDown': (time.value==selectedFromOption[day])}\"><span >{{time.value}}</span></div></li> \n" +
- " </ul>\n" +
- " </div>\n" +
- " </div>\n" +
- " \n" +
- " <div class=\"dropDownMarginBottom\">\n" +
- " <div class=\"select2-container topDropDownWidth\" ng-class=\"{'select2-dropdown-open select2-container-active': TotimeListDay[day]}\" >\n" +
- " <a class=\"select2-choice selectDropDown\" href=\"javascript:void(0)\" tabindex=\"{{daysList[day] ? '0' : '-1'}}\" att-accessibility-click=\"13\" ng-click=\"daysList[day] && showtoDayDropdown(day)\" ng-class=\"{'select2-chosen-disabled':!daysList[day]}\" ng-keydown=\"daysList[day] && selectToDayOption(day , selectPrevNextValue($event,totime,selectedToOption[day]));daysList[day] && addSelectedValue(day);\">\n" +
- " <span class=\"select2-chosen dropDownMarginRight\">{{selectedToOption[day]}} <i ng-if=\"daysList[day]\" ng-class=\"TotimeListDay[day] ? 'icon-dropdown-up' : 'icon-dropdown-down'\" ></i></span>\n" +
- " </a>\n" +
- " </div>\n" +
- " \n" +
- " <div class=\"select2-display-none select2-with-searchbox select2-drop-active show-search resultToDropDown\" ng-show=\"TotimeListDay[day]\"> \n" +
- " <ul class=\"select2-results resultTopMargin\" > \n" +
- " <li ng-click=\"selectToDayOption(day,time.value);addSelectedValue(day);\" ng-repeat=\"time in totime\" class=\"select2-results-dept-0 select2-result select2-result-selectable\"><div class=\"select2-result-label\" ng-class=\"{'selectedItemInDropDown': (time.value==selectedToOption[day])}\"><span >{{time.value}}</span></div></li> \n" +
- " </ul>\n" +
- " </div>\n" +
- " </div>\n" +
- " </div> \n" +
- " </div> \n" +
- " <div att-divider-lines class=\"divider-margin-s\"></div> \n" +
- " </div>\n" +
- " <div ng-transclude></div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/links/readMore.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/links/readMore.html",
- "<div>\n" +
- " <div ng-bind-html=\"textToDisplay\" ng-class=\"{'att--readMore': readFlag, 'att--readLess': !readFlag}\" ng-style=\"readLinkStyle\"></div>\n" +
- " <span class=\"att--readmore__link\" ng-show=\"readMoreLink\">… <a href=\"#\" ng-click=\"readMore()\" att-accessbility-click=\"32,13\">Read More</a>\n" +
- " </span>\n" +
- "</div>\n" +
- "<span class=\"att--readless__link\" ng-show=\"readLessLink\">\n" +
- " <a href=\"#\" ng-click=\"readLess()\" att-accessbility-click=\"32,13\">Read Less</a>\n" +
- "</span>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/loading/loading.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/loading/loading.html",
- "<div data-progress=\"{{progressStatus}}\" class=\"{{colorClass}}\" ng-class=\"{'att-loading-count':icon == 'count','loading--small':icon == 'small','loading': icon != 'count'}\">\n" +
- " <div class=\"att-loading-circle\" ng-if=\"icon == 'count'\">\n" +
- " <div class=\"att-loading-circle__mask att-loading-circle__full\">\n" +
- " <div class=\"att-loading-circle__fill\"></div>\n" +
- " </div>\n" +
- " <div class=\"att-loading-circle__mask att-loading-circle__half\">\n" +
- " <div class=\"att-loading-circle__fill\"></div>\n" +
- " <div class=\"att-loading-circle__fill att-loading-circle__fix\"></div>\n" +
- " </div>\n" +
- " </div>\n" +
- " <div ng-class=\"{'att-loading-inset':icon == 'count','loading__inside':icon != 'count'}\"><div class=\"att-loading-inset__percentage\" ng-if=\"icon == 'count'\"></div></div>\n" +
- "</div>\n" +
- "\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/modal/backdrop.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/modal/backdrop.html",
- "<div class=\"overlayed\" ng-class=\"{show: animate}\" \n" +
- " ng-style=\"{'z-index': 2000 + index*10,'overflow':'scroll'}\"> \n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/modal/window.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/modal/window.html",
- "<div tabindex=\"-1\" role=\"dialog\" att-element-focus=\"focusModalFlag\" class=\"modals {{ windowClass }}\" ng-class=\"{show: animate}\" \n" +
- " ng-style=\"{'z-index': 2010 + index*10}\" ng-click=\"close($event)\" ng-transclude> \n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/pagination/pagination.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/pagination/pagination.html",
- "<div class=\"pager\">\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" class=\"pager__item--prev\" att-accessibility-click=\"13,32\" ng-click=\"prev($event)\" ng-if=\"currentPage > 1\"><i class=\"icon-arrow-left\"></i> Previous</a>\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" class=\"pager__item pager__item--link\" ng-if=\"totalPages > 7 && currentPage > 3\" att-accessibility-click=\"13,32\" ng-click=\"selectPage(1, $event)\">1</a>\n" +
- " <span class=\"pager__item\" ng-if=\"totalPages > 7 && currentPage > 3\">...</span>\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" class=\"pager__item pager__item--link\" att-element-focus=\"isFocused(page)\" ng-repeat=\"page in pages\" ng-class=\"{'pager__item--active': checkSelectedPage(page)}\" att-accessibility-click=\"13,32\" ng-click=\"selectPage(page, $event)\">{{page}}</a>\n" +
- " <span class=\"pager__item\" ng-if=\"totalPages > 7 && currentPage < totalPages - 2 && showInput !== true\">...</span>\n" +
- " <span ng-show=\"totalPages > 7 && showInput === true\"><input class=\"pager__item--input\" type=\"text\" placeholder=\"...\" maxlength=\"2\" ng-model=\"currentPage\"/></span>\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" class=\"pager__item pager__item--link\" ng-if=\"totalPages > 7 && currentPage < totalPages - 2\" att-accessibility-click=\"13,32\" ng-click=\"selectPage(totalPages, $event)\">{{totalPages}}</a>\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" class=\"pager__item--next\" att-accessibility-click=\"13,32\" ng-click=\"next($event)\" ng-if=\"currentPage < totalPages\">Next <i class=\"icon-arrow-right\"></i></a>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/paneSelector/innerPane.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/paneSelector/innerPane.html",
- "<div class='inner-pane'>\n" +
- " <div ng-transclude>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/paneSelector/paneGroup.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/paneSelector/paneGroup.html",
- "<div class='pane-group'>\n" +
- " <div ng-transclude>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/paneSelector/sidePane.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/paneSelector/sidePane.html",
- "<div class='side-pane'> \n" +
- " <div ng-transclude>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/profileCard/addUser.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/profileCard/addUser.html",
- "<div class=\"col-md-9 profile-card add-user\">\n" +
- " <div class=\"atcenter\">\n" +
- " <div><i class=\"icon-add\"></i></div>\n" +
- " <span>add User</span>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/profileCard/profileCard.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/profileCard/profileCard.html",
- "<div class=\"col-md-9 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}}\">\n" +
- " <span ng-hide=\"image\" class=\"default-img\">{{initials}}</span>\n" +
- " <p class=\"name\" tooltip-condition=\"{{profile.name}}\" height=\"true\"></p>\n" +
- " <p class=\"status\">\n" +
- " <span class=\"status-icon\" ng-class=\"{'icon-green':colorIcon==='green','icon-red':colorIcon==='red','icon-blue':colorIcon==='blue','icon-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" +
- " <p att-text-overflow=\"92%\" tooltip-condition=\"{{profile.userName}}\">{{profile.userName}}</p>\n" +
- " <label>Email</label>\n" +
- " <p att-text-overflow=\"92%\" tooltip-condition=\"{{profile.email}}\">{{profile.email}}</p>\n" +
- " <label>Role</label>\n" +
- " <p att-text-overflow=\"92%\" tooltip-condition=\"{{profile.role}}\">{{profile.role}}</p>\n" +
- " <label>Last Login</label>\n" +
- " <p att-text-overflow=\"92%\" tooltip-condition=\"{{profile.lastLogin}}\">{{profile.lastLogin}}</p>\n" +
- " </div>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/progressBars/progressBars.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/progressBars/progressBars.html",
- "<div class=\"att-progress\">\n" +
- " <div class=\"att-progress-value\">&nbsp;</div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/scrollbar/scrollbar.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/scrollbar/scrollbar.html",
- "<div class=\"scroll-bar\">\n" +
- " <div class=\"scroll-thumb\"></div>\n" +
- "</div>\n" +
- "<div class=\"scroll-viewport\">\n" +
- " <div class=\"scroll-overview\" ng-transclude></div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/search/search.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/search/search.html",
- "<div class=\"select2-container show-search\" ng-class=\"{'select2-dropdown-open': (showlist && !isDisabled),'select2-container-disabled':isDisabled, 'select2-container-active': isact}\" ng-init=\"isact=false;\" style=\"width: 100%;\"> \n" +
- " <a href=\"javascript:void(0)\" class=\"select2-choice needsclick\" tabindex=\"0\" ng-click=\"showDropdown()\" ng-class=\"{'select2-chosen-disabled':isDisabled}\" ng-focus=\"isact=true;\" ng-blur=\"isact=false;\"> \n" +
- " <span class=\"select2-chosen needsclick\">{{selectedOption}}</span>\n" +
- " <abbr class=\"select2-search-choice-close needsclick\"></abbr> \n" +
- " <span class=\"select2-arrow needsclick\" role=\"presentation\">\n" +
- " <b role=\"presentation\" class=\"needsclick\"></b>\n" +
- " </span>\n" +
- " </a>\n" +
- " <label class=\"select2-offscreen\"></label>\n" +
- " <input class=\"select2-focusser select2-offscreen\" tabindex=\"-1\" type=\"text\" aria-haspopup=\"true\" role=\"button\">\n" +
- "</div>\n" +
- "<div class=\"select2-drop select2-with-searchbox select2-drop-auto-width select2-drop-active\" ng-class=\"{'select2-display-none':(!showlist || isDisabled),'show-search':showSearch}\" style=\"width:100%;z-index: 10\">\n" +
- " <div class=\"select2-search\"> \n" +
- " <label class=\"select2-offscreen\"></label> \n" +
- " <input ng-model=\"title\" typeahead=\"c.title for c in cName | filter:$viewValue:startsWith\" type=\"text\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" class=\"select2-input\" role=\"combobox\" aria-expanded=\"true\" \n" +
- " aria-autocomplete=\"list\" placeholder=\"\"> \n" +
- " </div> \n" +
- " <ul class=\"select2-results\" role=\"listbox\">\n" +
- " <li ng-show=\"filteredName.length === 0\" class=\"select2-no-results\">No matches found</li>\n" +
- " <li class=\"select2-results-dept-0 select2-result select2-result-selectable\" role=\"presentation\"\n" +
- " ng-model=\"ListType\" ng-show=\"selectMsg && filteredName.length > 0\" \n" +
- " ng-click=\"selectOption(selectMsg, '-1')\" \n" +
- " ng-class=\"{'select2-result-current': selectedOption === selectMsg, 'hovstyle': selectedIndex === -1}\" \n" +
- " ng-mouseover=\"hoverIn(-1)\">\n" +
- " <div class=\"select2-result-label\" ng-bind-html=\"selectMsg | highlight:title:className\" role=\"option\">\n" +
- " <span class=\"select2-match\" ></span>\n" +
- " </div>\n" +
- " </li> \n" +
- " <li class=\"select2-results-dept-0 select2-result select2-result-selectable\" role=\"presentation\"\n" +
- " ng-model=\"ListType\" ng-repeat=\"(fIndex, item) in filteredName = (cName | filter:title)\" \n" +
- " ng-class=\"{'select2-result-current': selectedOption === item.title,'hovstyle': selectedIndex === item.index}\"\n" +
- " ng-click=\"selectOption(item.title,item.index)\"\n" +
- " ng-mouseover=\"hoverIn(item.index)\">\n" +
- " <div class=\"select2-result-label\" ng-bind-html=\"item.title | highlight:title:className\" role=\"option\">\n" +
- " <span class=\"select2-match\" ></span>\n" +
- " </div>\n" +
- " </li>\n" +
- " \n" +
- " </ul>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/search/search_2.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/search/search_2.html",
- "<div ng-model=\"showlist\" class=\"select2-container\" ng-class=\"{'select2-dropdown-open select2-container-active': showlist}\" style=\"width: 100%; z-index:0\">\n" +
- " <a tabindex=\"-1\" class=\"select2-choice\" href=\"javascript:void(0)\" ng-click=\"showDropdown()\">\n" +
- " <span class=\"select2-chosen\">{{selectedOption}}</span>\n" +
- " <abbr class=\"select2-search-choice-close\"></abbr>\n" +
- " <span class=\"select2-arrow\"><b></b></span>\n" +
- " </a>\n" +
- " <input type=\"text\" class=\"select2-focusser select2-offscreen\">\n" +
- "</div>\n" +
- "<select ng-model=\"value\" ng-options=\"c.title for c in cName\" class=\"select2-offscreen\"></select>\n" +
- "<div class=\"select2-drop select2-display-none select2-with-searchbox select2-drop-active show-search\" style=\"display: block; width: 100%;\" ng-show=\"showlist\">\n" +
- " <div ng-show=\"showSearch\" class=\"select2-search\">\n" +
- " <input ng-model=\"title\" typeahead=\"c.title for c in cName | filter:$viewValue:startsWith\" type=\"text\" class=\"select2-input\" spellcheck=\"false\" autocapitalize=\"off\" autocorrect=\"off\" autocomplete=\"off\">\n" +
- " </div>\n" +
- " <ul class=\"select2-results\" style=\"margin-top:0px;max-height:205px\">\n" +
- " <li ng-model=\"ListType\" ng-repeat=\"(fIndex, country) in cName | filter:title\" ng-class=\"{'select2-result-current': selectedOption === country.title}\" ng-click=\"selectOption(country.title,country.index)\" class=\"select2-results-dept-0 select2-result select2-result-selectable select2-highlighted\">\n" +
- " <div class=\"select2-result-label\" ng-bind-html=\"country.title | highlight:title:className\"><span class=\"select2-match\"></span>\n" +
- " </div>\n" +
- " </li>\n" +
- " </ul>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/select/select.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/select/select.html",
- "<div class=\"select2-container show-search\" ng-class=\"{'select2-dropdown-open': (showlist && !isDisabled),'select2-container-disabled':isDisabled, 'select2-container-active': isact}\" ng-init=\"isact=false;\" style=\"width: 100%;\">\n" +
- " <a href=\"javascript:void(0)\" class=\"select2-choice needsclick\" tabindex=\"0\" ng-click=\"showDropdown()\" ng-class=\"{'select2-chosen-disabled':isDisabled}\" ng-focus=\"isact=true;\" ng-blur=\"isact=false;\">\n" +
- " <span class=\"select2-chosen needsclick\">{{selectedOption}}</span>\n" +
- " <abbr class=\"select2-search-choice-close needsclick\"></abbr>\n" +
- " <span class=\"select2-arrow needsclick\" role=\"presentation\">\n" +
- " <b role=\"presentation\" class=\"needsclick\"></b>\n" +
- " </span>\n" +
- " </a>\n" +
- " <label class=\"select2-offscreen\"></label>\n" +
- " <input class=\"select2-focusser select2-offscreen\" tabindex=\"-1\" type=\"text\" aria-haspopup=\"true\" role=\"button\">\n" +
- "</div>\n" +
- "<div class=\"select2-drop select2-with-searchbox select2-drop-auto-width select2-drop-active\" ng-class=\"{'select2-display-none':(!showlist || isDisabled),'show-search':showSearch}\" style=\"width:100%;z-index: 10\">\n" +
- " <div class=\"select2-search\">\n" +
- " <label class=\"select2-offscreen\"></label>\n" +
- " <input ng-model=\"title\" typeahead=\"c.title for c in cName | filter:$viewValue:startsWith\" type=\"text\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" class=\"select2-input\" role=\"combobox\" aria-expanded=\"true\" \n" +
- " aria-autocomplete=\"list\" placeholder=\"\">\n" +
- " </div>\n" +
- " <ul class=\"select2-results\" role=\"listbox\">\n" +
- " <li ng-show=\"filteredName.length === 0\" class=\"select2-no-results\">No matches found</li>\n" +
- " <li class=\"select2-results-dept-0 select2-result select2-result-selectable\" role=\"presentation\"\n" +
- " ng-model=\"ListType\" ng-show=\"selectMsg && filteredName.length > 0\"\n" +
- " ng-click=\"selectOption(selectMsg, '-1')\"\n" +
- " ng-class=\"{'select2-result-current': selectedOption === selectMsg, 'hovstyle': selectedIndex === -1}\"\n" +
- " ng-mouseover=\"hoverIn(-1)\"\n" +
- " >\n" +
- " <div ng-if=\"startsWithFilter\" class=\"select2-result-label\" ng-bind-html=\"selectMsg\" role=\"option\">\n" +
- " <span class=\"select2-match\" ></span>\n" +
- " </div>\n" +
- " <div ng-if=\"!startsWithFilter\" class=\"select2-result-label\" ng-bind-html=\"selectMsg | highlight:title:className\" role=\"option\">\n" +
- " <span class=\"select2-match\" ></span>\n" +
- " </div>\n" +
- " </li>\n" +
- " <li ng-if=\"startsWithFilter\" class=\"select2-results-dept-0 select2-result select2-result-selectable\" role=\"presentation\"\n" +
- " ng-model=\"ListType\" ng-repeat=\"(fIndex, item) in filteredName = (cName | startsWith:title:item)\"\n" +
- " ng-class=\"{'select2-result-current': selectedOption === item.title,'hovstyle': selectedIndex === item.index}\"\n" +
- " ng-click=\"selectOption(item.title,item.index)\"\n" +
- " ng-mouseover=\"hoverIn(item.index)\"\n" +
- " >\n" +
- " <div class=\"select2-result-label\" ng-bind-html=\"item.title\" role=\"option\">\n" +
- " <span class=\"select2-match\" ></span>\n" +
- " </div>\n" +
- " </li>\n" +
- "\n" +
- " <li ng-if=\"!startsWithFilter\" class=\"select2-results-dept-0 select2-result select2-result-selectable\" role=\"presentation\"\n" +
- " ng-model=\"ListType\" ng-repeat=\"(fIndex, item) in filteredName = (cName | filter:title)\"\n" +
- " ng-class=\"{'select2-result-current': selectedOption === item.title,'hovstyle': selectedIndex === item.index}\"\n" +
- " ng-click=\"selectOption(item.title,item.index)\"\n" +
- " ng-mouseover=\"hoverIn(item.index)\"\n" +
- " >\n" +
- " <div class=\"select2-result-label\" ng-bind-html=\"item.title | highlight:title:className\" role=\"option\">\n" +
- " <span class=\"select2-match\" ></span>\n" +
- " </div>\n" +
- " </li>\n" +
- "\n" +
- " </ul>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/select/textDropdown.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/select/textDropdown.html",
- "<div tabindex=\"0\" class=\"text-dropdown\">\n" +
- " <div class=\"dropdown\" ng-class=\"{'not-visible': isActionsShown}\" ng-click=\"toggle()\" >\n" +
- " <span class=\"action--selected\" ng-bind=\"currentAction\"></span>\n" +
- " <i ng-class=\"isActionsShown ? 'icon-dropdown-up' : 'icon-dropdown-down'\"></i>\n" +
- " </div>\n" +
- "\n" +
- " <ul ng-class=\"isActionsShown ? 'actionsOpened' : 'actionsClosed'\" ng-show=\"isActionsShown\">\n" +
- " <li ng-class=\"{'highlight': selectedIndex==$index}\" ng-repeat=\"action in actions track by $index\" ng-click=\"chooseAction($event, action)\" ng-mouseover=\"hoverIn($index)\">{{action}}<i ng-class=\"{'icon-included-checkmark': isCurrentAction(action)}\"></i></li>\n" +
- " </ul>\n" +
- "\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/slider/attStepSlider.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/slider/attStepSlider.html",
- "<span ng-class=\"mainSliderClass\">\n" +
- " <table>\n" +
- " <tr>\n" +
- " <td>\n" +
- " <div class=\"jslider-bg\">\n" +
- " <i class=\"l\"></i>\n" +
- " <i class=\"r\"></i>\n" +
- " <i class=\"v\" ng-class=\"{'step-slider-green':sliderColor == COLORS.GREEN, 'step-slider-blue': sliderColor == COLORS.BLUE_HIGHLIGHT, 'step-slider-magenta': sliderColor == COLORS.MAGENTA, 'step-slider-gold': sliderColor == COLORS.GOLD, 'step-slider-purple': sliderColor == COLORS.PURPLE, 'step-slider-dark-blue': sliderColor == COLORS.DARK_BLUE, 'step-slider-regular': sliderColor == COLORS.REGULAR, 'step-slider-white': sliderColor == COLORS.WHITE, 'cutoff-slider': isCutOffSlider}\"></i>\n" +
- " </div>\n" +
- " <div class=\"jslider-pointer\" id=\"left-pointer\"></div>\n" +
- " <div class=\"jslider-pointer jslider-pointer-to\" ng-class=\"{'step-slider-green':sliderColor == COLORS.GREEN, 'step-slider-blue': sliderColor == COLORS.BLUE_HIGHLIGHT, 'step-slider-magenta': sliderColor == COLORS.MAGENTA, 'step-slider-gold': sliderColor == COLORS.GOLD, 'step-slider-purple': sliderColor == COLORS.PURPLE, 'step-slider-dark-blue': sliderColor == COLORS.DARK_BLUE, 'step-slider-regular': sliderColor == COLORS.REGULAR, 'step-slider-white':sliderColor == COLORS.WHITE ,'cutoff-slider': isCutOffSlider}\"></div>\n" +
- " <div class=\"jslider-label\"><span ng-bind=\"from\"></span><span ng-bind=\"options.dimension\"></span></div>\n" +
- " <div class=\"jslider-label jslider-label-to\"><span ng-bind=\"toStr\"></span><span ng-bind=\"endDimension\"></span></div>\n" +
- " <div class=\"jslider-value\" id=\"jslider-value-left\"><span></span>{{options.dimension}}</div>\n" +
- " <div class=\"jslider-value jslider-value-to\"><span></span>{{toolTipDimension}}</div>\n" +
- " <div class=\"jslider-scale\" ng-class=\"{'show-dividers': showDividers, 'cutoff-slider-dividers':isCutOffSlider}\">\n" +
- " </div>\n" +
- " <div class=\"jslider-cutoff\">\n" +
- " <div class=\"jslider-label jslider-label-cutoff\">\n" +
- " <span ng-bind=\"cutOffVal\"></span>\n" +
- " </div>\n" +
- " </div>\n" +
- " </td>\n" +
- " </tr>\n" +
- " </table>\n" +
- "</span>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/slider/maxContent.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/slider/maxContent.html",
- "<div class=\"att-slider__label att-slider__label--max att-slider__label--below\" ng-transclude></div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/slider/minContent.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/slider/minContent.html",
- "<div class=\"att-slider__label att-slider__label--min att-slider__label--below\" ng-transclude></div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/slider/slider.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/slider/slider.html",
- "<div class=\"att-slider\" ng-mousemove=\"moveElem($event)\" ng-mouseup=\"mouseUp($event)\">\n" +
- " <div class=\"att-slider__track\">\n" +
- " <div class=\"att-slider__range att-slider__range--disabled\" ng-style=\"disabledStyle\"></div>\n" +
- " <div class=\"att-slider__range\" ng-style=\"rangeStyle\"></div>\n" +
- " </div>\n" +
- " <div class=\"att-slider__handles-container\">\n" +
- " <div class=\"att-slider__handle\" ng-style=\"handleStyle\" ng-mousedown=\"mouseDown($event,'ngModelSingle')\" ng-mousemove=\"moveElem($event)\" ng-mouseup=\"mouseUp($event)\" tabindex=\"0\" ng-keydown=\"keyDown($event,'ngModelSingle')\"></div>\n" +
- " <div class=\"att-slider__handle\" ng-style=\"minHandleStyle\" ng-mousedown=\"mouseDown($event,'ngModelLow')\" ng-mousemove=\"moveElem($event)\" ng-mouseup=\"mouseUp($event)\" tabindex=\"0\" ng-keydown=\"keyDown($event,'ngModelLow')\"></div>\n" +
- " <div class=\"att-slider__handle\" ng-style=\"maxHandleStyle\" ng-mousedown=\"mouseDown($event,'ngModelHigh')\" ng-mousemove=\"moveElem($event)\" ng-mouseup=\"mouseUp($event)\" tabindex=\"0\" ng-keydown=\"keyDown($event,'ngModelHigh')\"></div>\n" +
- " </div>\n" +
- " <div ng-transclude></div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/splitButtonDropdown/splitButtonDropdown.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/splitButtonDropdown/splitButtonDropdown.html",
- "<div class=\" btn-group\" \n" +
- " ng-class=\"{'buttons-dropdown--large':!isSmall, \n" +
- " 'buttons-dropdown--small':isSmall, \n" +
- " 'action-dropdown':isActionDropdown, \n" +
- " 'open':isDropDownOpen}\">\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" class=\"button btn buttons-dropdown__split\" \n" +
- " ng-class=\"{'button--primary':(btnType==undefined || btnType=='primary'), \n" +
- " 'button--secondary':btnType=='secondary', \n" +
- " 'button--disabled':btnType=='disabled', \n" +
- " 'button--small':isSmall}\" \n" +
- " ng-if=\"!isActionDropdown\"\n" +
- " ng-click=\"btnType==='disabled'?undefined:clickFxn()\" att-accessibility-click=\"13,32\">{{btnText}}</a>\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" role=\"button\" aria-label=\"Toggle Dropdown\" class=\"button buttons-dropdown__drop dropdown-toggle\" \n" +
- " ng-class=\"{'button--primary':(btnType==undefined || btnType=='primary'), \n" +
- " 'button--secondary':btnType=='secondary', \n" +
- " 'button--disabled':btnType=='disabled', \n" +
- " 'button--small':isSmall}\" ng-click=\"toggleDropdown()\" att-accessibility-click=\"13,32\"></a>\n" +
- " <ul class=\"dropdown-menu\" ng-click=\"hideDropdown()\" ng-transclude></ul>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/splitButtonDropdown/splitIcon.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/splitButtonDropdown/splitIcon.html",
- "<div class='split-icon-button-container'>\n" +
- "\n" +
- " <div class='split-icon-button' ng-class=\"{'icon-with-chevron': isRight && !isMiddle && !isLeftNextDropdown && !isNextToDropDown, 'split-icon-button-middle':isMiddle, 'split-icon-button-right':isRight, 'split-icon-button-left':isLeft, 'split-icon-button-left-dropdown': isLeftNextDropdown ,'split-icon-button-next-dropdown': isNextToDropDown,'split-icon-button-dropdown': isDropDownOpen,'split-icon-button-hover':isIconHovered || isDropDownOpen}\" ng-mouseover='isIconHovered = true;' ng-mouseleave='isIconHovered = false;' tabindex=\"-1\" att-accessibility-click=\"13,32\" ng-click='dropDownClicked();'>\n" +
- " <a class='{{icon}}' aria-label='{{icon}}' role='button' tabindex=\"0\"></a>\n" +
- " <i ng-if=\"isRight && !isMiddle && !isLeftNextDropdown && !isNextToDropDown\" \n" +
- " ng-class=\"isDropDownOpen ? 'icon-dropdown-up' : 'icon-dropdown-down'\"> </i>\n" +
- " </div> \n" +
- "\n" +
- " <ul ng-if='isDropdown' class='dropdown-menu {{dropDownId}}' ng-show='\n" +
- " isDropDownOpen' ng-click='toggleDropdown(false)' ng-transclude>\n" +
- " </ul>\n" +
- "\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/splitButtonDropdown/splitIconButton.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/splitButtonDropdown/splitIconButton.html",
- "<div>\n" +
- " <div ng-if='isLeftLineShown' dir-type='{{iconStateConstants.DIR_TYPE.LEFT}}' expandable-line></div>\n" +
- " <div ng-click='clickHandler()' att-split-icon icon='{{icon}}' dir-type='{{iconStateConstants.DIR_TYPE.BUTTON}}' hover-watch='isHovered' drop-down-watch='dropDownWatch' drop-down-id='{{dropDownId}}'>\n" +
- " <div ng-transclude>\n" +
- " </div>\n" +
- " </div>\n" +
- " <div ng-if='isRightLineShown' dir-type='{{iconStateConstants.DIR_TYPE.RIGHT}}' expandable-line></div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/splitButtonDropdown/splitIconButtonGroup.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/splitButtonDropdown/splitIconButtonGroup.html",
- "<div ng-transclude>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/steptracker/step-tracker.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/steptracker/step-tracker.html",
- "<div class=\"steptracker1\">\n" +
- " <div class=\"steptracker-bg\">\n" +
- " <div class=\"steptracker-track size-onethird\" ng-repeat=\"step in sdata\"\n" +
- " ng-style=\"set_width($index)\"\n" +
- " ng-class=\"{'last':laststep($index),'done':donesteps($index),'active':activestep($index), 'incomplete': isIncomplete($index), 'disabled': disableClick}\">\n" +
- " <div class=\"circle\" tabindex=\"0\"\n" +
- " ng-click=\"stepclick($event, $index);\"\n" +
- " att-accessibility-click=\"13,23\">{{($index) + 1}}<span>{{step.title}}</span></div>\n" +
- " <div ng-if=\"!laststep($index)\" class=\"track\"></div>\n" +
- " </div>\n" +
- " </div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/steptracker/step.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/steptracker/step.html",
- "<div class=\"steptracker1\">\n" +
- " <div class=\"steptracker-bg\">\n" +
- " <div class=\"steptracker-track size-onethird\" \n" +
- " ng-class=\"{'last':laststep($index),'done':donesteps($index),'active':activestep($index)}\">\n" +
- " <div class=\"circle\" tabindex=\"0\" \n" +
- " ng-click=\"stepclick($event, $index);\" \n" +
- " att-accessibility-click=\"13,23\">{{($index) + 1}}<span>{{step.title}}</span></div>\n" +
- " <div ng-if=\"!laststep($index)\" class=\"track\"></div>\n" +
- " </div>\n" +
- " </div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/steptracker/timeline.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/steptracker/timeline.html",
- "<div class='att-timeline'>\n" +
- " <div timeline-dot order='0' title='{{steps[0].title}}' description='{{steps[0].description}}' by='{{steps[0].by}}' date='{{steps[0].date}}' type='{{steps[0].type}}'></div>\n" +
- "\n" +
- " <div ng-repeat=\"m in middleSteps track by $index\">\n" +
- " <div timeline-bar order='{{$index}}'></div>\n" +
- " <div timeline-dot order='{{$index + 1}}' title='{{m.title}}' description='{{m.description}}' by='{{m.by}}' date='{{m.date}}' type='{{m.type}}'>\n" +
- " </div>\n" +
- " </div>\n" +
- "\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/steptracker/timelineBar.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/steptracker/timelineBar.html",
- "<div class='timeline-bar'>\n" +
- " <div class='progress-bar' ng-class=\"{'completed-color':isCompleted,'cancelled-color':isCancelled,'alert-color':isAlert}\">\n" +
- " </div>\n" +
- " <hr></hr>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/steptracker/timelineDot.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/steptracker/timelineDot.html",
- "<div class='timeline-dot'>\n" +
- "\n" +
- " <div class='bigger-circle' ng-class=\"{'completed-color':isCompleted,'cancelled-color':isCancelled,'alert-color':isAlert}\">\n" +
- " </div>\n" +
- "\n" +
- " <div class='inactive-circle'>\n" +
- " </div>\n" +
- "\n" +
- " <div class='expandable-circle' ng-class=\"{'completed-color':isCompleted,'cancelled-color':isCancelled,'alert-color':isAlert}\">\n" +
- " </div>\n" +
- "\n" +
- " <div ng-class=\"{'below-info-box':isBelowInfoBoxShown, 'above-info-box': !isBelowInfoBoxShown}\">\n" +
- " \n" +
- " <div ng-if='isBelowInfoBoxShown' class='vertical-line'>\n" +
- " </div>\n" +
- "\n" +
- " <div class='info-container' ng-init='isContentShown=false'>\n" +
- " <div ng-class=\"{'current-step-title':isCurrentStep, 'title':!isCurrentStep,'completed-color-text':isCompleted,'cancelled-color-text':isCancelled,'alert-color-text':isAlert, 'inactive-color-text':isInactive}\" ng-mouseover='titleMouseover(1)' ng-mouseleave='titleMouseleave(1)' ng-bind='title' ></div>\n" +
- " <div class='content'>\n" +
- " <div class='description' ng-bind='description'></div>\n" +
- " <div class='submitter' ng-bind='by'></div>\n" +
- " </div>\n" +
- " <div class='date' ng-mouseover='titleMouseover(2)' ng-mouseleave='titleMouseleave(2)' ng-bind='date'></div>\n" +
- " </div>\n" +
- "\n" +
- " <div ng-if='!isBelowInfoBoxShown' class='vertical-line'>\n" +
- " </div>\n" +
- " </div>\n" +
- "\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/table/attTable.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/table/attTable.html",
- "<table class=\"tablesorter tablesorter-default\" ng-transclude></table>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/table/attTableBody.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/table/attTableBody.html",
- "<td ng-transclude></td>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/table/attTableHeader.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/table/attTableHeader.html",
- "<th tabindex=\"{{sortable !== 'false' && '0' || '-1'}}\" class=\"tablesorter-header\" ng-class=\"{'tablesorter-headerAsc': sortPattern === 'asc', 'tablesorter-headerDesc': sortPattern === 'desc', 'tablesort-sortable': sortable !== 'false', 'sorter-false': sortable === 'false'}\" att-accessibility-click=\"13,32\" ng-click=\"(sortable !== 'false') && sort(); clickFunc && clickFunc()\"><div class=\"tablesorter-header-inner\" ng-transclude></div></th>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/tabs/floatingTabs.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/tabs/floatingTabs.html",
- "<ul ng-class=\"{'tabsbid': size === 'large', 'tabsbid--small': size === 'small'}\">\n" +
- " <li ng-repeat=\"tab in tabs\" ng-class=\"{'tabsbid__item tabsbid__item--active': isActiveTab(tab.url), 'tabsbid__item': !isActiveTab(tab.url)}\" ng-click=\"onClickTab(tab)\">\n" +
- " <a class=\"tabsbid__item-link\" href=\"{{tab.url}}\" tabindex=\"0\" att-accessibility-click=\"32,13\">{{tab.title}}</a>\n" +
- " </li>\n" +
- "</ul>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/tabs/genericTabs.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/tabs/genericTabs.html",
- "<ul ng-class=\"{'tabsbid': size === 'large', 'tabsbid--small': size === 'small'}\">\n" +
- " <li ng-repeat=\"tab in tabs\" ng-class=\"{'tabsbid__item tabsbid__item--active': isActive(tab.id), 'tabsbid__item': !isActive(tab.id),'tabs__item--active': isActive(tab.id)}\" ng-click=\"clickTab(tab)\">\n" +
- " <a class=\"tabsbid__item-link\" href=\"{{tab.url}}\" tabindex=\"0\" att-accessibility-click=\"32,13\">{{tab.title}}</a>\n" +
- " </li>\n" +
- "</ul>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/tabs/menuTab.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/tabs/menuTab.html",
- "<li class=\"megamenu__item\" ng-mouseover=\"showHoverChild($event)\" ng-click=\"showChildren($event);!clickInactive||resetMenu()\" ng-class=\"{'tabs__item--active': menuItem.active==true && !hoverChild==true}\" ng-transclude att-accessibility-click=\"13,32\" tabindex=\"0\"></li>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/tabs/parentmenuTab.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/tabs/parentmenuTab.html",
- "<div ng-class=\"{'megamenu-tabs': megaMenu,'submenu-tabs': !megaMenu}\">\n" +
- " <ul class=\"megamenu__items\" ng-transclude>\n" +
- " </ul>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/tabs/simplifiedTabs.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/tabs/simplifiedTabs.html",
- "<div class=\"simplified-tabs\">\n" +
- "<ul class=\"simplified-tabs__items\">\n" +
- " <li ng-repeat=\"tab in tabs\" class=\"simplified-tabs__item\" ng-class=\"{'tabs__item--active': isActive(tab.id)}\" ng-click=\"clickTab(tab)\" tabindex=\"0\" att-accessibility-click=\"32,13\">{{tab.title}}</li>\n" +
- " <li class=\"tabs__pointer\"></li>\n" +
- "</ul>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/tabs/submenuTab.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/tabs/submenuTab.html",
- "<li class=\"tabsbid__item megamenu__item\" ng-class=\"{'subMenuHover': menuItem.active==true}\" ng-mouseover=\"!subMenu || showChildren($event)\" ng-focus=\"!subMenu ||showChildren($event)\" tabindex=\"{{subMenu=='true'?0:-1}}\" ng-click=\"!subMenu ||showMenuClick() ; subMenu ||showSubMenuClick()\" att-accessibility-click=\"13,32\" ng-transclude>\n" +
- "</li>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/tagBadges/tagBadges.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/tagBadges/tagBadges.html",
- "<div class=\"tags__item\" \n" +
- " ng-class=\"{'tags__item--small':isSmall, \n" +
- " 'tags__item--color':isColor, \n" +
- " 'tags__item--cloud':!isClosable && !isColor,'active':applyActiveClass}\"\n" +
- " ng-if=\"display\" \n" +
- " ng-style=\"{borderColor: border_type_borderColor, background: isHighlight?'#bbb':undefined, color: isHighlight?'#444':undefined }\"\n" +
- " ng-mousedown=\"activeHighlight(true)\" ng-mouseup=\"activeHighlight(false)\">\n" +
- " <i class=\"icon-filter tags__item--icon\" ng-if=\"isIcon\">&nbsp;</i>\n" +
- " <i class=\"tags__item--color-icon\" ng-if=\"isColor\" ng-style=\"{backgroundColor: background_type_backgroundColor, borderColor: background_type_borderColor}\"></i>\n" +
- " <span class=\"tags__item--title\" tabindex=0 aria-label ng-mousedown=\"activeHighlight(true)\" ng-mouseup=\"activeHighlight(false)\" ng-transclude></span>\n" +
- " <a href=\"javascript:void(0)\" title=\"Dismiss Link\" class=\"tags__item--action\" ng-click=\"closeMe();$event.preventDefault()\" ng-if=\"isClosable\"\n" +
- " ng-style=\"{color: (isHighlight && '#444') || '#888' , borderLeft: (isHighlight && '1px solid #444')|| '1px solid #888' }\">\n" +
- " <i class=\"icon-erase\">&nbsp;</i>\n" +
- " </a>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/toggle/demoToggle.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/toggle/demoToggle.html",
- "<span ng-transclude></span>\n" +
- "<!--<div class=\"att-switch-content\" hm-drag-left = \"dragleft($event)\" hm-drag-right = \"dragright($event)\" hm-dragstart = \"drag($event)\" hm-dragend = \"drag($event)\" ng-class=\"{'large' : directiveValue == 'large'}\" style=\"-webkit-user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\">-->\n" +
- "<div tabindex=\"0\" class=\"att-switch-content\" hm-drag = \"drag($event)\" att-accessibility-click=\"13,32\" ng-click = \"updateModel($event)\" hm-dragstart = \"alert('hello')\" hm-dragend = \"drag($event)\" ng-class=\"{'large' : directiveValue == 'large'}\" style=\"-webkit-user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\">\n" +
- " <div class=\"att-switch-onText\" ng-style=\"\" ng-class=\"{'icon-included-checkmark ico' : on === undefined,'large' : directiveValue == 'large'}\">{{on}}<span class=\"hidden-spoken\">when checked.</span></div>\n" +
- " <div class=\"att-switch-thumb\" tabindex=\"0\" ng-class=\"{'large' : directiveValue == 'large'}\"></div>\n" +
- " <div class=\"att-switch-offText\" ng-class=\"{'icon-erase ico' : on === undefined,'large' : directiveValue == 'large'}\">{{off}}<span class=\"hidden-spoken\">when unchecked.</span></div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/tooltip/tooltip-popup.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/tooltip/tooltip-popup.html",
- "<div class=\"att-tooltip \" \n" +
- " ng-class=\"{ 'att-tooltip--on': isOpen, \n" +
- " 'att-tooltip--dark att-tooltip--dark--hover':stylett=='dark', \n" +
- " 'att-tooltip--light att-tooltip--light--hover':stylett=='light',\n" +
- " 'att-tooltip--left':placement=='left', \n" +
- " 'att-tooltip--above':placement=='above', \n" +
- " 'att-tooltip--right':placement=='right', \n" +
- " 'att-tooltip--below':placement=='below'}\" \n" +
- " ng-bind-html=\"content\" ></div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/typeAhead/typeAhead.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/typeAhead/typeAhead.html",
- "<div class=\"typeahead mainContainerOuter\">\n" +
- " <span class=\"message\">To</span> \n" +
- " <div class='maincontainer' ng-click=\"setFocus()\" ng-class =\"{'typeahed_active':inputActive}\">\n" +
- " <span tag-badges closable ng-repeat =\"lineItem in lineItems track by $index\" on-close=\"theMethodToBeCalled($index)\" >{{lineItem}}</span>\n" +
- " <input type=\"text\" focus-me=\"clickFocus\" id=\"inpute\" aria-label=\"model\" role=\"textfiled\" ng-model=\"model\" ng-keydown=\"selected = false; selectionIndex($event)\"/><br/> \n" +
- " </div>\n" +
- " <div ng-hide=\"!model.length || selected\">\n" +
- " <div class=\"filtercontainer list-scrollable\" ng-show=\"( items | filter:model).length\">\n" +
- " <div class=\"item\" ng-repeat=\"item in items| filter:model track by $index\" ng-click=\"handleSelection(item[title],item[subtitle])\" att-accessibility-click=\"13,32\" style=\"cursor:pointer\" ng-class=\"{active:isCurrent($index,item[title],item[subtitle],( items | filter:model).length)}\" aria-label=\"item[title]\" ng-mouseenter=\"setCurrent($index)\">\n" +
- " <span class=\"title\" >{{item[title]}}</span>\n" +
- " <span class=\"subtitle\">{{item[subtitle]}}</span>\n" +
- " </div> \n" +
- " </div>\n" +
- " </div>\n" +
- " \n" +
- " <div class=\"textAreaEmailContentDiv\">\n" +
- " <span class=\"message\">Message</span>\n" +
- " <textarea rows=\"4\" cols=\"50\" role=\"textarea\" class=\"textAreaEmailContent\" ng-model=\"emailMessage\">To send \n" +
- " a text, picture, or video message1 to an AT&T wireless device from your email:my message.</textarea>\n" +
- " \n" +
- " </div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/userMessages/attTableMessage.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/userMessages/attTableMessage.html",
- "<div class=\"att-table-message\">\n" +
- " <div class=\"message\" ng-if=\"msgType==messageConstants.TABLE_MESSAGE_TYPES.noMatching\">\n" +
- " <div class=\"img-magnify-glass\"></div> \n" +
- " <div>\n" +
- " <div ng-transclude></div>\n" +
- " </div>\n" +
- " </div>\n" +
- " <div class=\"message\" ng-if=\"msgType==messageConstants.TABLE_MESSAGE_TYPES.errorLoading\">\n" +
- " <div class=\"img-oops-exclamation\"></div> \n" +
- " <div>Oops!</div>\n" +
- " <div>The information could not load at this time.</div>\n" +
- " <div>Please <a href=\"javascript:void(0)\" ng-click=\"refreshAction($event)\">refresh the page</a>\n" +
- " </div>\n" +
- " </div>\n" +
- " <div class=\"message\" ng-if=\"msgType==messageConstants.TABLE_MESSAGE_TYPES.magnifySearch\">\n" +
- " <div class=\"img-magnify-glass\"></div>\n" +
- " <div>\n" +
- " <p class=\"title\">Please input values to <br/> begin your search.</p>\n" +
- " </div>\n" +
- " </div>\n" +
- " <div class=\"message loading-message\" ng-if=\"msgType==messageConstants.TABLE_MESSAGE_TYPES.isLoading\">\n" +
- " <div class=\"img-loading-dots\"></div>\n" +
- " <div ng-transclude></div>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/userMessages/attUserMessage.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/userMessages/attUserMessage.html",
- "<div class=\"att-user-message\">\n" +
- " <div ng-class=\"type==messageConstants.USER_MESSAGE_TYPES.error && trigger ? 'message-wrapper-error' : 'hidden'\">\n" +
- " <div class=\"message-icon-error\"> <i class=\"icon-info-alert\"></i> </div>\n" +
- "\n" +
- " <div class=\"message-body-wrapper\">\n" +
- " <div class=\"message-title-error\" ng-if=\"thetitle && thetitle.length > 0\"> <span ng-bind=\"thetitle\"></span> </div>\n" +
- " <div class=\"message-msg\" ng-bind=\"message\" ng-if=\"message && message.length > 0\"> </div>\n" +
- " <div class=\"message-bottom\">\n" +
- " <div ng-transclude></div>\n" +
- " </div>\n" +
- " </div>\n" +
- "\n" +
- " </div>\n" +
- " <div ng-class=\"type==messageConstants.USER_MESSAGE_TYPES.success && trigger ? 'message-wrapper-success' : 'hidden'\">\n" +
- " <div class=\"message-icon-success\"> <i class=\"icon-included-checkmark\"></i> </div>\n" +
- "\n" +
- " <div class=\"message-body-wrapper\">\n" +
- " <div class=\"message-title-success\" ng-if=\"thetitle && thetitle.length > 0\"> <span ng-bind=\"thetitle\"></span> </div>\n" +
- " <div class=\"message-msg\" ng-bind=\"message\" ng-if=\"message && message.length > 0\"> </div>\n" +
- " <div class=\"message-bottom\">\n" +
- " <div ng-transclude></div>\n" +
- " </div>\n" +
- " </div>\n" +
- "\n" +
- " </div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/verticalSteptracker/vertical-step-tracker.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/verticalSteptracker/vertical-step-tracker.html",
- "<li>\n" +
- " <i ng-class=\"{'icon-tickets-active' : type == 'actual' && id =='Active','icon-tickets-referred' : type == 'actual' && id =='Requested Closed','icon-ticket-regular' : type == 'progress' && id =='In Progress','icon-tickets-contested' : type == 'actual' && id =='Contested','icon-tickets-returned' : type == 'actual' && id =='Deferred','icon-tickets-closed' : type == 'actual' && id =='Ready to Close','icon-tickets-cleared' : type == 'actual' && id =='Cleared'}\"></i>\n" +
- " <span ng-transclude></span>\n" +
- "</li>\n" +
- " \n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/videoControls/photoControls.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/videoControls/photoControls.html",
- "<div>\n" +
- " <a title=\"Previous Link\" ng-href=\"{{links.prevLink}}\"><i class=\"icon-arrow-left\">&nbsp;</i></a>\n" +
- " <span ng-transclude></span>\n" +
- " <a title=\"Next Link\" ng-href=\"{{links.nextLink}}\"><i class=\"icon-arrow-right\">&nbsp;</i></a>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/videoControls/videoControls.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/videoControls/videoControls.html",
- "<div class=\"video-player\">\n" +
- " <div class=\"video-player__control video-player__play-button\">\n" +
- " <a class=\"video-player__button gigant-play\" data-toggle-buttons=\"icon-play, icon-pause\" data-target=\"i\"><i class=\"icon-play\"></i></a>\n" +
- " </div>\n" +
- " <div class=\"video-player__control video-player__track\">\n" +
- "\n" +
- " <div class=\"video-player__track--inner\">\n" +
- " <div class=\"video-player__track--loaded\" style=\"width: 75%\"></div>\n" +
- " <div class=\"video-player__track--played\" style=\"width: 40%\">\n" +
- " <div class=\"att-tooltip att-tooltip--on att-tooltip--dark att-tooltip--above video-player__track-tooltip\" ng-transclude></div>\n" +
- " <div class=\"video-player__track-handle\"></div>\n" +
- " </div>\n" +
- " </div>\n" +
- " </div>\n" +
- " <a class=\"video-player__time\" ng-transclude></a>\n" +
- " <div class=\"video-player__control video-player__volume_icon\">\n" +
- " <a class=\"video-player__button\" data-toggle-buttons=\"icon-volume-mute, icon-volume-up\" data-target=\"i\"><i class=\"icon-volume-up\"></i></a>\n" +
- " </div>\n" +
- " <ul class=\"video-player__control video-player__volume\">\n" +
- " <li class=\"video-player__volume-bar video-player__volume-bar--full\">&nbsp;</li>\n" +
- " <li class=\"video-player__volume-bar video-player__volume-bar--full\">&nbsp;</li>\n" +
- " <li class=\"video-player__volume-bar\">&nbsp;</li>\n" +
- " <li class=\"video-player__volume-bar\">&nbsp;</li>\n" +
- " <li class=\"video-player__volume-bar\">&nbsp;</li>\n" +
- " </ul>\n" +
- " <div class=\"video-player__control video-player__toggle-fullscreen-button\">\n" +
- " <a class=\"video-player__button\" data-toggle-buttons=\"icon-full-screen, icon-normal-screen\" data-target=\"i\"><i class=\"icon-full-screen\">&nbsp;</i></a>\n" +
- " </div>\n" +
- "</div>");
-}]);
diff --git a/ecomp-portal-BE/war/static/ebz/angular_js/checklist-model.js b/ecomp-portal-BE/war/static/ebz/angular_js/checklist-model.js
deleted file mode 100644
index 09d8cefb..00000000
--- a/ecomp-portal-BE/war/static/ebz/angular_js/checklist-model.js
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- * Checklist-model
- * AngularJS directive for list of checkboxes
- */
-
-angular.module('checklist-model', [])
-.directive('checklistModel', ['$parse', '$compile', function($parse, $compile) {
- // contains
- function contains(arr, item) {
- if (angular.isArray(arr)) {
- for (var i = 0; i < arr.length; i++) {
- if (angular.equals(arr[i], item)) {
- return true;
- }
- }
- }
- return false;
- }
-
- // add
- function add(arr, item) {
- arr = angular.isArray(arr) ? arr : [];
- for (var i = 0; i < arr.length; i++) {
- if (angular.equals(arr[i], item)) {
- return arr;
- }
- }
- arr.push(item);
- return arr;
- }
-
- // remove
- function remove(arr, item) {
- if (angular.isArray(arr)) {
- for (var i = 0; i < arr.length; i++) {
- if (angular.equals(arr[i], item)) {
- arr.splice(i, 1);
- break;
- }
- }
- }
- return arr;
- }
-
- // http://stackoverflow.com/a/19228302/1458162
- function postLinkFn(scope, elem, attrs) {
- // compile with `ng-model` pointing to `checked`
- $compile(elem)(scope);
-
- // getter / setter for original model
- var getter = $parse(attrs.checklistModel);
- var setter = getter.assign;
-
- // value added to list
- var value = $parse(attrs.checklistValue)(scope.$parent);
-
- // watch UI checked change
- scope.$watch('checked', function(newValue, oldValue) {
- if (newValue === oldValue) {
- return;
- }
- var current = getter(scope.$parent);
- if (newValue === true) {
- setter(scope.$parent, add(current, value));
- } else {
- setter(scope.$parent, remove(current, value));
- }
- });
-
- // watch original model change
- scope.$parent.$watch(attrs.checklistModel, function(newArr, oldArr) {
- scope.checked = contains(newArr, value);
- }, true);
- }
-
- return {
- restrict: 'A',
- priority: 1000,
- terminal: true,
- scope: true,
- compile: function(tElement, tAttrs) {
- if (tElement[0].tagName !== 'INPUT' || tAttrs.type !== 'checkbox') {
- throw 'checklist-model should be applied to `input[type="checkbox"]`.';
- }
-
- if (!tAttrs.checklistValue) {
- throw 'You should provide `checklist-value`.';
- }
-
- // exclude recursion
- tElement.removeAttr('checklist-model');
-
- // local scope var storing individual checkbox model
- tElement.attr('ng-model', 'checked');
-
- return postLinkFn;
- }
- };
-}]);
diff --git a/ecomp-portal-BE/war/static/ebz/angular_js/checklist-model.min.js b/ecomp-portal-BE/war/static/ebz/angular_js/checklist-model.min.js
deleted file mode 100644
index 61be598e..00000000
--- a/ecomp-portal-BE/war/static/ebz/angular_js/checklist-model.min.js
+++ /dev/null
@@ -1 +0,0 @@
-angular.module("checklist-model",[]).directive("checklistModel",["$parse","$compile",function(e,c){function b(g,j){if(angular.isArray(g)){for(var h=0;h<g.length;h++){if(angular.equals(g[h],j)){return true}}}return false}function f(g,j){g=angular.isArray(g)?g:[];for(var h=0;h<g.length;h++){if(angular.equals(g[h],j)){return g}}g.push(j);return g}function a(g,j){if(angular.isArray(g)){for(var h=0;h<g.length;h++){if(angular.equals(g[h],j)){g.splice(h,1);break}}}return g}function d(i,j,h){c(j)(i);var g=e(h.checklistModel);var l=g.assign;var k=e(h.checklistValue)(i.$parent);i.$watch("checked",function(o,m){if(o===m){return}var n=g(i.$parent);if(o===true){l(i.$parent,f(n,k))}else{l(i.$parent,a(n,k))}});i.$parent.$watch(h.checklistModel,function(n,m){i.checked=b(n,k)},true)}return{restrict:"A",priority:1000,terminal:true,scope:true,compile:function(g,h){if(g[0].tagName!=="INPUT"||!g.attr("type","checkbox")){throw'checklist-model should be applied to `input[type="checkbox"]`.'}if(!h.checklistValue){throw"You should provide `checklist-value`."}g.removeAttr("checklist-model");g.attr("ng-model","checked");return d}}}]);
diff --git a/ecomp-portal-BE/war/static/ebz/angular_js/d7100892.modernizr.js b/ecomp-portal-BE/war/static/ebz/angular_js/d7100892.modernizr.js
deleted file mode 100644
index 903f5fae..00000000
--- a/ecomp-portal-BE/war/static/ebz/angular_js/d7100892.modernizr.js
+++ /dev/null
@@ -1 +0,0 @@
-window.Modernizr=function(a,b,c){function d(a){t.cssText=a}function e(a,b){return d(x.join(a+";")+(b||""))}function f(a,b){return typeof a===b}function g(a,b){return!!~(""+a).indexOf(b)}function h(a,b){for(var d in a){var e=a[d];if(!g(e,"-")&&t[e]!==c)return"pfx"==b?e:!0}return!1}function i(a,b,d){for(var e in a){var g=b[a[e]];if(g!==c)return d===!1?a[e]:f(g,"function")?g.bind(d||b):g}return!1}function j(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+z.join(d+" ")+d).split(" ");return f(b,"string")||f(b,"undefined")?h(e,b):(e=(a+" "+A.join(d+" ")+d).split(" "),i(e,b,c))}function k(){o.input=function(c){for(var d=0,e=c.length;e>d;d++)E[c[d]]=!!(c[d]in u);return E.list&&(E.list=!(!b.createElement("datalist")||!a.HTMLDataListElement)),E}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),o.inputtypes=function(a){for(var d,e,f,g=0,h=a.length;h>g;g++)u.setAttribute("type",e=a[g]),d="text"!==u.type,d&&(u.value=v,u.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(e)&&u.style.WebkitAppearance!==c?(q.appendChild(u),f=b.defaultView,d=f.getComputedStyle&&"textfield"!==f.getComputedStyle(u,null).WebkitAppearance&&0!==u.offsetHeight,q.removeChild(u)):/^(search|tel)$/.test(e)||(d=/^(url|email)$/.test(e)?u.checkValidity&&u.checkValidity()===!1:u.value!=v)),D[a[g]]=!!d;return D}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var l,m,n="2.6.3",o={},p=!0,q=b.documentElement,r="modernizr",s=b.createElement(r),t=s.style,u=b.createElement("input"),v=":)",w={}.toString,x=" -webkit- -moz- -o- -ms- ".split(" "),y="Webkit Moz O ms",z=y.split(" "),A=y.toLowerCase().split(" "),B={svg:"http://www.w3.org/2000/svg"},C={},D={},E={},F=[],G=F.slice,H=function(a,c,d,e){var f,g,h,i,j=b.createElement("div"),k=b.body,l=k||b.createElement("body");if(parseInt(d,10))for(;d--;)h=b.createElement("div"),h.id=e?e[d]:r+(d+1),j.appendChild(h);return f=["&#173;",'<style id="s',r,'">',a,"</style>"].join(""),j.id=r,(k?j:l).innerHTML+=f,l.appendChild(j),k||(l.style.background="",l.style.overflow="hidden",i=q.style.overflow,q.style.overflow="hidden",q.appendChild(l)),g=c(j,a),k?j.parentNode.removeChild(j):(l.parentNode.removeChild(l),q.style.overflow=i),!!g},I=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return H("@media "+b+" { #"+r+" { position: absolute; } }",function(b){d="absolute"==(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle).position}),d},J=function(){function a(a,e){e=e||b.createElement(d[a]||"div"),a="on"+a;var g=a in e;return g||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(a,""),g=f(e[a],"function"),f(e[a],"undefined")||(e[a]=c),e.removeAttribute(a))),e=null,g}var d={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return a}(),K={}.hasOwnProperty;m=f(K,"undefined")||f(K.call,"undefined")?function(a,b){return b in a&&f(a.constructor.prototype[b],"undefined")}:function(a,b){return K.call(a,b)},Function.prototype.bind||(Function.prototype.bind=function(a){var b=this;if("function"!=typeof b)throw new TypeError;var c=G.call(arguments,1),d=function(){if(this instanceof d){var e=function(){};e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(G.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(G.call(arguments)))};return d}),C.flexbox=function(){return j("flexWrap")},C.flexboxlegacy=function(){return j("boxDirection")},C.canvas=function(){var a=b.createElement("canvas");return!(!a.getContext||!a.getContext("2d"))},C.canvastext=function(){return!(!o.canvas||!f(b.createElement("canvas").getContext("2d").fillText,"function"))},C.webgl=function(){return!!a.WebGLRenderingContext},C.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:H(["@media (",x.join("touch-enabled),("),r,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=9===a.offsetTop}),c},C.geolocation=function(){return"geolocation"in navigator},C.postmessage=function(){return!!a.postMessage},C.websqldatabase=function(){return!!a.openDatabase},C.indexedDB=function(){return!!j("indexedDB",a)},C.hashchange=function(){return J("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},C.history=function(){return!(!a.history||!history.pushState)},C.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},C.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},C.rgba=function(){return d("background-color:rgba(150,255,150,.5)"),g(t.backgroundColor,"rgba")},C.hsla=function(){return d("background-color:hsla(120,40%,100%,.5)"),g(t.backgroundColor,"rgba")||g(t.backgroundColor,"hsla")},C.multiplebgs=function(){return d("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(t.background)},C.backgroundsize=function(){return j("backgroundSize")},C.borderimage=function(){return j("borderImage")},C.borderradius=function(){return j("borderRadius")},C.boxshadow=function(){return j("boxShadow")},C.textshadow=function(){return""===b.createElement("div").style.textShadow},C.opacity=function(){return e("opacity:.55"),/^0.55$/.test(t.opacity)},C.cssanimations=function(){return j("animationName")},C.csscolumns=function(){return j("columnCount")},C.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return d((a+"-webkit- ".split(" ").join(b+a)+x.join(c+a)).slice(0,-a.length)),g(t.backgroundImage,"gradient")},C.cssreflections=function(){return j("boxReflect")},C.csstransforms=function(){return!!j("transform")},C.csstransforms3d=function(){var a=!!j("perspective");return a&&"webkitPerspective"in q.style&&H("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b){a=9===b.offsetLeft&&3===b.offsetHeight}),a},C.csstransitions=function(){return j("transition")},C.fontface=function(){var a;return H('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&0===g.indexOf(d.split(" ")[0])}),a},C.generatedcontent=function(){var a;return H(["#",r,"{font:0/0 a}#",r,':after{content:"',v,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},C.video=function(){var a=b.createElement("video"),c=!1;try{(c=!!a.canPlayType)&&(c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""))}catch(d){}return c},C.audio=function(){var a=b.createElement("audio"),c=!1;try{(c=!!a.canPlayType)&&(c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,""))}catch(d){}return c},C.localstorage=function(){try{return localStorage.setItem(r,r),localStorage.removeItem(r),!0}catch(a){return!1}},C.sessionstorage=function(){try{return sessionStorage.setItem(r,r),sessionStorage.removeItem(r),!0}catch(a){return!1}},C.webworkers=function(){return!!a.Worker},C.applicationcache=function(){return!!a.applicationCache},C.svg=function(){return!!b.createElementNS&&!!b.createElementNS(B.svg,"svg").createSVGRect},C.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="<svg/>",(a.firstChild&&a.firstChild.namespaceURI)==B.svg},C.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(w.call(b.createElementNS(B.svg,"animate")))},C.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(w.call(b.createElementNS(B.svg,"clipPath")))};for(var L in C)m(C,L)&&(l=L.toLowerCase(),o[l]=C[L](),F.push((o[l]?"":"no-")+l));return o.input||k(),o.addTest=function(a,b){if("object"==typeof a)for(var d in a)m(a,d)&&o.addTest(d,a[d]);else{if(a=a.toLowerCase(),o[a]!==c)return o;b="function"==typeof b?b():b,"undefined"!=typeof p&&p&&(q.className+=" "+(b?"":"no-")+a),o[a]=b}return o},d(""),s=u=null,function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=r.elements;return"string"==typeof a?a.split(" "):a}function e(a){var b=q[a[o]];return b||(b={},p++,a[o]=p,q[p]=b),b}function f(a,c,d){if(c||(c=b),k)return c.createElement(a);d||(d=e(c));var f;return f=d.cache[a]?d.cache[a].cloneNode():n.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),f.canHaveChildren&&!m.test(a)?d.frag.appendChild(f):f}function g(a,c){if(a||(a=b),k)return a.createDocumentFragment();c=c||e(a);for(var f=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)f.createElement(h[g]);return f}function h(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return r.shivMethods?f(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/\w+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(r,b.frag)}function i(a){a||(a=b);var d=e(a);return!r.shivCSS||j||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),k||h(a,d),a}var j,k,l=a.html5||{},m=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,n=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,o="_html5shiv",p=0,q={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",j="hidden"in a,k=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){j=!0,k=!0}}();var r={elements:l.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:l.shivCSS!==!1,supportsUnknownElements:k,shivMethods:l.shivMethods!==!1,type:"default",shivDocument:i,createElement:f,createDocumentFragment:g};a.html5=r,i(b)}(this,b),o._version=n,o._prefixes=x,o._domPrefixes=A,o._cssomPrefixes=z,o.mq=I,o.hasEvent=J,o.testProp=function(a){return h([a])},o.testAllProps=j,o.testStyles=H,o.prefixed=function(a,b,c){return b?j(a,b,c):j(a,"pfx")},q.className=q.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(p?" js "+F.join(" "):""),o}(this,this.document); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/ebz/angular_js/ebiz_keepalive.js b/ecomp-portal-BE/war/static/ebz/angular_js/ebiz_keepalive.js
deleted file mode 100644
index a5947d9d..00000000
--- a/ecomp-portal-BE/war/static/ebz/angular_js/ebiz_keepalive.js
+++ /dev/null
@@ -1,8 +0,0 @@
-function keepAlive(){
- alert("<%=VSPUtils.getEbizKeepAliveURL(request)%>");
- $.ajax({
- dataType: 'jsonp',
- url: "<%=VSPUtils.getEbizKeepAliveURL(request)%>",
- jsonpCallback: 'JsonpCallback'
- });
-} \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/ebz/angular_js/footer.js b/ecomp-portal-BE/war/static/ebz/angular_js/footer.js
deleted file mode 100644
index 4cc2d2a4..00000000
--- a/ecomp-portal-BE/war/static/ebz/angular_js/footer.js
+++ /dev/null
@@ -1,110 +0,0 @@
-var feedbackText, pageAddress;
-(function ( $ ) {
- $(document).on('click', '.feedbackButtonDiv', function (e) {
- $(".feedbackSection").slideToggle(600, function(){
- if($(".feedbackButton").hasClass("closeFeedbackButton")) {
- $(".footerContainer .feedbackButton").html("Feedback<span class='icon-chevron-down'></span>");
- $(".footerContainer .feedbackButton").removeClass("closeFeedbackButton");
- } else {
- $(".footerContainer .feedbackButton").html("Close<span class='icon-chevron-up'></span>");
- $(".footerContainer .feedbackButton").addClass("closeFeedbackButton");
- $(".footerContainer .feedbackText").focus();
- }
-
- });
- });
-
- $(document).on('click', '.closeFeedback', function (e) {
- $(".feedbackSection").slideUp(600, function(){
-
- });
- });
-
- $(document).on('click keypress keyup blur paste','textarea[maxlength]', function(e) {
- var maxlength = $(this).attr('maxlength');
- var val = $(this).val();
-
- if (val.length > maxlength) {
- $(this).val(val.slice(0, maxlength));
- }
- });
-
- $(document).on('click', '.feedbackSubmitButton', function (e) {
- var feedbackTextTemp = $(".feedbackText").val();
- feedbackText = $.trim(feedbackTextTemp);
- var feedbackData = feedbackText;
- if (feedbackText != null && feedbackText != '') {
- $.ajax({
- type: "post",
- contentType :'application/json',
- dataType: 'json',
- data: feedbackData,
- url: "/ebiz/dashboard/feedback/createfeedback",
- success: function (data) {
- if (data.success) {
- $(".feedbackSection").slideUp(600, function() {
- $(".feedbackText").val("");
- $(".footerContainer .feedbackButton").html("Feedback<span class='icon-chevron-down'></span>");
- $(".footerContainer .feedbackButton").removeClass("closeFeedbackButton");
- $(".feedbackButtonDiv").slideUp(600);
- $(".readFeedBackMessage").text(data.feedBackMessage);
- $(".feedbackResultMsg, #feedbackResultDivider").slideDown(600);
- $(".readFeedBackMessage").focus();
- });
- } else if (typeof console == "object") {
-
- }
- },
- error: function () {
-
- }
- });
- } else {
- e.preventDefault();
- if (typeof console == 'object') {
- console.log("Invalid Input String");
- }
- }
-
- });
-
- // Click function definition for OK button in feedback success message
- $(document).on('click', '.feedbackMsgOKButton', function(e) {
- $(".feedbackResultMsg, #feedbackResultDivider").slideUp(600, function(){
- $(".readFeedBackMessage").text("");
- });
- $(".feedbackButtonDiv").slideDown(600, function() {
- $('.feedbackButton').focus();
- });
- });
-
-}( jQuery ));
-
-$(function() {
- var footerHeight = 0,
- footerTop = 0,
- $footer = $("#footer");
-
- positionFooter();
-
-
- function positionFooter() {
-
- footerHeight = $footer.height();
- footerTop = ($(window).scrollTop() + $(window).height() - footerHeight) + "px";
-
- if (($(document.body).height() + footerHeight) < $(window).height()) {
- $footer.addClass('stickyFooter')
- .animate({
- top: footerTop
- }, -1)
- } else {
- $footer.removeClass('stickyFooter');
- }
-
- }
-
- $(window)
- .scroll(positionFooter)
- .resize(positionFooter)
-}); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/ebz/angular_js/footer_new.js b/ecomp-portal-BE/war/static/ebz/angular_js/footer_new.js
deleted file mode 100644
index e2d5afd7..00000000
--- a/ecomp-portal-BE/war/static/ebz/angular_js/footer_new.js
+++ /dev/null
@@ -1,102 +0,0 @@
-var feedbackText, pageAddress;
-(function ( $ ) {
- $(document).on('click', '.feedbackButtonDiv', function (e) {
- $(".feedbackSection").slideToggle(600, function(){
- if($(".feedbackButton").hasClass("closeFeedbackButton")) {
- $(".footerContainer .feedbackButton").html("Feedback<span class='icon-chevron-down'></span>");
- $(".footerContainer .feedbackButton").removeClass("closeFeedbackButton");
- } else {
- $(".footerContainer .feedbackButton").html("Close<span class='icon-chevron-up'></span>");
- $(".footerContainer .feedbackButton").addClass("closeFeedbackButton");
- $(".footerContainer .feedbackText").focus();
- }
-
- });
- });
-
- $(document).on('click', '.closeFeedback', function (e) {
- $(".feedbackSection").slideUp(600, function(){
-
- });
- });
-
- $(document).on('click keypress keyup blur paste','textarea[maxlength]', function(e) {
- var maxlength = $(this).attr('maxlength');
- var val = $(this).val();
-
- if (val.length > maxlength) {
- $(this).val(val.slice(0, maxlength));
- }
- });
-
- $(document).on('click', '.feedbackSubmitButton', function (e) {
- var feedbackTextTemp = $(".feedbackText").val();
- feedbackText = $.trim(feedbackTextTemp);
- pageAddress = window.location.href;
- var feedbackData = {
- commentText: feedbackText,
- sourcePage: pageAddress
- };
- if(feedbackText != null && feedbackText != ''){
- $.ajax({
- type: "post",
- dataType: 'json',
- data: feedbackData,
- url: window.dashboardContext + "/mnm/map/common/saveUserComments.jsp",
- success: function (data) {
- $(".feedbackSection").slideUp(600, function(){
- $(".feedbackText").val("");
- $(".footerContainer .feedbackButton").html("Feedback<span class='icon-chevron-down'></span>");
- $(".footerContainer .feedbackButton").removeClass("closeFeedbackButton");
- $(".feedbackButtonDiv").slideUp(600);
- $(".feedbackResultMsg, #feedbackResultDivider").slideDown(600);
- setTimeout(function() {
- $(".feedbackResultMsg, #feedbackResultDivider").slideUp(600);
- $(".feedbackButtonDiv").slideDown(600);
- }, 3000);
- });
- },
- error: function () {
- console.log("Error Saving Feedback.");
- }
- });
- } else {
- e.preventDefault();
- console.log("Invalid Input String")
- }
-
- });
-}( jQuery ));
-
-$(function() {
- var footerHeight = 0,
- footerTop = 0,
- $footer = $("#footer");
-
- positionFooter();
-
- function positionFooter() {
-
- footerHeight = $footer.height();
- footerTop = ($(window).scrollTop() + $(window).height() - footerHeight) + "px";
-
- if (($(document.body).height() + footerHeight) < $(window).height()) {
- $footer.css({
- position: "absolute",
- left: "0",
- right: "0"
- }).animate({
- top: footerTop
- }, 0)
- } else {
- $footer.css({
- position: "static"
- })
- }
-
- }
-
- $(window)
- .scroll(positionFooter)
- .resize(positionFooter)
-}); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/ebz/angular_js/gestures.js b/ecomp-portal-BE/war/static/ebz/angular_js/gestures.js
deleted file mode 100644
index 8c515d8a..00000000
--- a/ecomp-portal-BE/war/static/ebz/angular_js/gestures.js
+++ /dev/null
@@ -1,1495 +0,0 @@
-/*! Hammer.JS - v1.0.5 - 2013-04-07
- * http://eightmedia.github.com/hammer.js
- *
- * Copyright (c) 2013 Jorik Tangelder <j.tangelder@gmail.com>;
- * Licensed under the MIT license */
-
-(function(window, undefined) {
- 'use strict';
-
-/**
- * Hammer
- * use this to create instances
- * @param {HTMLElement} element
- * @param {Object} options
- * @returns {Hammer.Instance}
- * @constructor
- */
-var Hammer = function(element, options) {
- return new Hammer.Instance(element, options || {});
-};
-
-// default settings
-Hammer.defaults = {
- // add styles and attributes to the element to prevent the browser from doing
- // its native behavior. this doesnt prevent the scrolling, but cancels
- // the contextmenu, tap highlighting etc
- // set to false to disable this
- stop_browser_behavior: {
- // this also triggers onselectstart=false for IE
- userSelect: 'none',
- // this makes the element blocking in IE10 >, you could experiment with the value
- // see for more options this issue; https://github.com/EightMedia/hammer.js/issues/241
- touchAction: 'none',
- touchCallout: 'none',
- contentZooming: 'none',
- userDrag: 'none',
- tapHighlightColor: 'rgba(0,0,0,0)'
- }
-
- // more settings are defined per gesture at gestures.js
-};
-
-// detect touchevents
-Hammer.HAS_POINTEREVENTS = navigator.pointerEnabled || navigator.msPointerEnabled;
-Hammer.HAS_TOUCHEVENTS = ('ontouchstart' in window);
-
-// dont use mouseevents on mobile devices
-Hammer.MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;
-Hammer.NO_MOUSEEVENTS = Hammer.HAS_TOUCHEVENTS && navigator.userAgent.match(Hammer.MOBILE_REGEX);
-
-// eventtypes per touchevent (start, move, end)
-// are filled by Hammer.event.determineEventTypes on setup
-Hammer.EVENT_TYPES = {};
-
-// direction defines
-Hammer.DIRECTION_DOWN = 'down';
-Hammer.DIRECTION_LEFT = 'left';
-Hammer.DIRECTION_UP = 'up';
-Hammer.DIRECTION_RIGHT = 'right';
-
-// pointer type
-Hammer.POINTER_MOUSE = 'mouse';
-Hammer.POINTER_TOUCH = 'touch';
-Hammer.POINTER_PEN = 'pen';
-
-// touch event defines
-Hammer.EVENT_START = 'start';
-Hammer.EVENT_MOVE = 'move';
-Hammer.EVENT_END = 'end';
-
-// hammer document where the base events are added at
-Hammer.DOCUMENT = document;
-
-// plugins namespace
-Hammer.plugins = {};
-
-// if the window events are set...
-Hammer.READY = false;
-
-/**
- * setup events to detect gestures on the document
- */
-function setup() {
- if(Hammer.READY) {
- return;
- }
-
- // find what eventtypes we add listeners to
- Hammer.event.determineEventTypes();
-
- // Register all gestures inside Hammer.gestures
- for(var name in Hammer.gestures) {
- if(Hammer.gestures.hasOwnProperty(name)) {
- Hammer.detection.register(Hammer.gestures[name]);
- }
- }
-
- // Add touch events on the document
- Hammer.event.onTouch(Hammer.DOCUMENT, Hammer.EVENT_MOVE, Hammer.detection.detect);
- Hammer.event.onTouch(Hammer.DOCUMENT, Hammer.EVENT_END, Hammer.detection.detect);
-
- // Hammer is ready...!
- Hammer.READY = true;
-}
-
-/**
- * create new hammer instance
- * all methods should return the instance itself, so it is chainable.
- * @param {HTMLElement} element
- * @param {Object} [options={}]
- * @returns {Hammer.Instance}
- * @constructor
- */
-Hammer.Instance = function(element, options) {
- var self = this;
-
- // setup HammerJS window events and register all gestures
- // this also sets up the default options
- setup();
-
- this.element = element;
-
- // start/stop detection option
- this.enabled = true;
-
- // merge options
- this.options = Hammer.utils.extend(
- Hammer.utils.extend({}, Hammer.defaults),
- options || {});
-
- // add some css to the element to prevent the browser from doing its native behavoir
- if(this.options.stop_browser_behavior) {
- Hammer.utils.stopDefaultBrowserBehavior(this.element, this.options.stop_browser_behavior);
- }
-
- // start detection on touchstart
- Hammer.event.onTouch(element, Hammer.EVENT_START, function(ev) {
- if(self.enabled) {
- Hammer.detection.startDetect(self, ev);
- }
- });
-
- // return instance
- return this;
-};
-
-
-Hammer.Instance.prototype = {
- /**
- * bind events to the instance
- * @param {String} gesture
- * @param {Function} handler
- * @returns {Hammer.Instance}
- */
- on: function onEvent(gesture, handler){
- var gestures = gesture.split(' ');
- for(var t=0; t<gestures.length; t++) {
- this.element.addEventListener(gestures[t], handler, false);
- }
- return this;
- },
-
-
- /**
- * unbind events to the instance
- * @param {String} gesture
- * @param {Function} handler
- * @returns {Hammer.Instance}
- */
- off: function offEvent(gesture, handler){
- var gestures = gesture.split(' ');
- for(var t=0; t<gestures.length; t++) {
- this.element.removeEventListener(gestures[t], handler, false);
- }
- return this;
- },
-
-
- /**
- * trigger gesture event
- * @param {String} gesture
- * @param {Object} eventData
- * @returns {Hammer.Instance}
- */
- trigger: function triggerEvent(gesture, eventData){
- // create DOM event
- var event = Hammer.DOCUMENT.createEvent('Event');
- event.initEvent(gesture, true, true);
- event.gesture = eventData;
-
- // trigger on the target if it is in the instance element,
- // this is for event delegation tricks
- var element = this.element;
- if(Hammer.utils.hasParent(eventData.target, element)) {
- element = eventData.target;
- }
-
- element.dispatchEvent(event);
- return this;
- },
-
-
- /**
- * enable of disable hammer.js detection
- * @param {Boolean} state
- * @returns {Hammer.Instance}
- */
- enable: function enable(state) {
- this.enabled = state;
- return this;
- }
-};
-
-/**
- * this holds the last move event,
- * used to fix empty touchend issue
- * see the onTouch event for an explanation
- * @type {Object}
- */
-var last_move_event = null;
-
-
-/**
- * when the mouse is hold down, this is true
- * @type {Boolean}
- */
-var enable_detect = false;
-
-
-/**
- * when touch events have been fired, this is true
- * @type {Boolean}
- */
-var touch_triggered = false;
-
-
-Hammer.event = {
- /**
- * simple addEventListener
- * @param {HTMLElement} element
- * @param {String} type
- * @param {Function} handler
- */
- bindDom: function(element, type, handler) {
- var types = type.split(' ');
- for(var t=0; t<types.length; t++) {
- element.addEventListener(types[t], handler, false);
- }
- },
-
-
- /**
- * touch events with mouse fallback
- * @param {HTMLElement} element
- * @param {String} eventType like Hammer.EVENT_MOVE
- * @param {Function} handler
- */
- onTouch: function onTouch(element, eventType, handler) {
- var self = this;
-
- this.bindDom(element, Hammer.EVENT_TYPES[eventType], function bindDomOnTouch(ev) {
- var sourceEventType = ev.type.toLowerCase();
-
- // onmouseup, but when touchend has been fired we do nothing.
- // this is for touchdevices which also fire a mouseup on touchend
- if(sourceEventType.match(/mouse/) && touch_triggered) {
- return;
- }
-
- // mousebutton must be down or a touch event
- else if( sourceEventType.match(/touch/) || // touch events are always on screen
- sourceEventType.match(/pointerdown/) || // pointerevents touch
- (sourceEventType.match(/mouse/) && ev.which === 1) // mouse is pressed
- ){
- enable_detect = true;
- }
-
- // we are in a touch event, set the touch triggered bool to true,
- // this for the conflicts that may occur on ios and android
- if(sourceEventType.match(/touch|pointer/)) {
- touch_triggered = true;
- }
-
- // count the total touches on the screen
- var count_touches = 0;
-
- // when touch has been triggered in this detection session
- // and we are now handling a mouse event, we stop that to prevent conflicts
- if(enable_detect) {
- // update pointerevent
- if(Hammer.HAS_POINTEREVENTS && eventType != Hammer.EVENT_END) {
- count_touches = Hammer.PointerEvent.updatePointer(eventType, ev);
- }
- // touch
- else if(sourceEventType.match(/touch/)) {
- count_touches = ev.touches.length;
- }
- // mouse
- else if(!touch_triggered) {
- count_touches = sourceEventType.match(/up/) ? 0 : 1;
- }
-
- // if we are in a end event, but when we remove one touch and
- // we still have enough, set eventType to move
- if(count_touches > 0 && eventType == Hammer.EVENT_END) {
- eventType = Hammer.EVENT_MOVE;
- }
- // no touches, force the end event
- else if(!count_touches) {
- eventType = Hammer.EVENT_END;
- }
-
- // because touchend has no touches, and we often want to use these in our gestures,
- // we send the last move event as our eventData in touchend
- if(!count_touches && last_move_event !== null) {
- ev = last_move_event;
- }
- // store the last move event
- else {
- last_move_event = ev;
- }
-
- // trigger the handler
- handler.call(Hammer.detection, self.collectEventData(element, eventType, ev));
-
- // remove pointerevent from list
- if(Hammer.HAS_POINTEREVENTS && eventType == Hammer.EVENT_END) {
- count_touches = Hammer.PointerEvent.updatePointer(eventType, ev);
- }
- }
-
- //debug(sourceEventType +" "+ eventType);
-
- // on the end we reset everything
- if(!count_touches) {
- last_move_event = null;
- enable_detect = false;
- touch_triggered = false;
- Hammer.PointerEvent.reset();
- }
- });
- },
-
-
- /**
- * we have different events for each device/browser
- * determine what we need and set them in the Hammer.EVENT_TYPES constant
- */
- determineEventTypes: function determineEventTypes() {
- // determine the eventtype we want to set
- var types;
-
- // pointerEvents magic
- if(Hammer.HAS_POINTEREVENTS) {
- types = Hammer.PointerEvent.getEvents();
- }
- // on Android, iOS, blackberry, windows mobile we dont want any mouseevents
- else if(Hammer.NO_MOUSEEVENTS) {
- types = [
- 'touchstart',
- 'touchmove',
- 'touchend touchcancel'];
- }
- // for non pointer events browsers and mixed browsers,
- // like chrome on windows8 touch laptop
- else {
- types = [
- 'touchstart mousedown',
- 'touchmove mousemove',
- 'touchend touchcancel mouseup'];
- }
-
- Hammer.EVENT_TYPES[Hammer.EVENT_START] = types[0];
- Hammer.EVENT_TYPES[Hammer.EVENT_MOVE] = types[1];
- Hammer.EVENT_TYPES[Hammer.EVENT_END] = types[2];
- },
-
-
- /**
- * create touchlist depending on the event
- * @param {Object} ev
- * @param {String} eventType used by the fakemultitouch plugin
- */
- getTouchList: function getTouchList(ev/*, eventType*/) {
- // get the fake pointerEvent touchlist
- if(Hammer.HAS_POINTEREVENTS) {
- return Hammer.PointerEvent.getTouchList();
- }
- // get the touchlist
- else if(ev.touches) {
- return ev.touches;
- }
- // make fake touchlist from mouse position
- else {
- return [{
- identifier: 1,
- pageX: ev.pageX,
- pageY: ev.pageY,
- target: ev.target
- }];
- }
- },
-
-
- /**
- * collect event data for Hammer js
- * @param {HTMLElement} element
- * @param {String} eventType like Hammer.EVENT_MOVE
- * @param {Object} eventData
- */
- collectEventData: function collectEventData(element, eventType, ev) {
- var touches = this.getTouchList(ev, eventType);
-
- // find out pointerType
- var pointerType = Hammer.POINTER_TOUCH;
- if(ev.type.match(/mouse/) || Hammer.PointerEvent.matchType(Hammer.POINTER_MOUSE, ev)) {
- pointerType = Hammer.POINTER_MOUSE;
- }
-
- return {
- center : Hammer.utils.getCenter(touches),
- timeStamp : new Date().getTime(),
- target : ev.target,
- touches : touches,
- eventType : eventType,
- pointerType : pointerType,
- srcEvent : ev,
-
- /**
- * prevent the browser default actions
- * mostly used to disable scrolling of the browser
- */
- preventDefault: function() {
- if(this.srcEvent.preventManipulation) {
- this.srcEvent.preventManipulation();
- }
-
- if(this.srcEvent.preventDefault) {
- this.srcEvent.preventDefault();
- }
- },
-
- /**
- * stop bubbling the event up to its parents
- */
- stopPropagation: function() {
- this.srcEvent.stopPropagation();
- },
-
- /**
- * immediately stop gesture detection
- * might be useful after a swipe was detected
- * @return {*}
- */
- stopDetect: function() {
- return Hammer.detection.stopDetect();
- }
- };
- }
-};
-
-Hammer.PointerEvent = {
- /**
- * holds all pointers
- * @type {Object}
- */
- pointers: {},
-
- /**
- * get a list of pointers
- * @returns {Array} touchlist
- */
- getTouchList: function() {
- var self = this;
- var touchlist = [];
-
- // we can use forEach since pointerEvents only is in IE10
- Object.keys(self.pointers).sort().forEach(function(id) {
- touchlist.push(self.pointers[id]);
- });
- return touchlist;
- },
-
- /**
- * update the position of a pointer
- * @param {String} type Hammer.EVENT_END
- * @param {Object} pointerEvent
- */
- updatePointer: function(type, pointerEvent) {
- if(type == Hammer.EVENT_END) {
- this.pointers = {};
- }
- else {
- pointerEvent.identifier = pointerEvent.pointerId;
- this.pointers[pointerEvent.pointerId] = pointerEvent;
- }
-
- return Object.keys(this.pointers).length;
- },
-
- /**
- * check if ev matches pointertype
- * @param {String} pointerType Hammer.POINTER_MOUSE
- * @param {PointerEvent} ev
- */
- matchType: function(pointerType, ev) {
- if(!ev.pointerType) {
- return false;
- }
-
- var types = {};
- types[Hammer.POINTER_MOUSE] = (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE || ev.pointerType == Hammer.POINTER_MOUSE);
- types[Hammer.POINTER_TOUCH] = (ev.pointerType == ev.MSPOINTER_TYPE_TOUCH || ev.pointerType == Hammer.POINTER_TOUCH);
- types[Hammer.POINTER_PEN] = (ev.pointerType == ev.MSPOINTER_TYPE_PEN || ev.pointerType == Hammer.POINTER_PEN);
- return types[pointerType];
- },
-
-
- /**
- * get events
- */
- getEvents: function() {
- return [
- 'pointerdown MSPointerDown',
- 'pointermove MSPointerMove',
- 'pointerup pointercancel MSPointerUp MSPointerCancel'
- ];
- },
-
- /**
- * reset the list
- */
- reset: function() {
- this.pointers = {};
- }
-};
-
-
-Hammer.utils = {
- /**
- * extend method,
- * also used for cloning when dest is an empty object
- * @param {Object} dest
- * @param {Object} src
- * @parm {Boolean} merge do a merge
- * @returns {Object} dest
- */
- extend: function extend(dest, src, merge) {
- for (var key in src) {
- if(dest[key] !== undefined && merge) {
- continue;
- }
- dest[key] = src[key];
- }
- return dest;
- },
-
-
- /**
- * find if a node is in the given parent
- * used for event delegation tricks
- * @param {HTMLElement} node
- * @param {HTMLElement} parent
- * @returns {boolean} has_parent
- */
- hasParent: function(node, parent) {
- while(node){
- if(node == parent) {
- return true;
- }
- node = node.parentNode;
- }
- return false;
- },
-
-
- /**
- * get the center of all the touches
- * @param {Array} touches
- * @returns {Object} center
- */
- getCenter: function getCenter(touches) {
- var valuesX = [], valuesY = [];
-
- for(var t= 0,len=touches.length; t<len; t++) {
- valuesX.push(touches[t].pageX);
- valuesY.push(touches[t].pageY);
- }
-
- return {
- pageX: ((Math.min.apply(Math, valuesX) + Math.max.apply(Math, valuesX)) / 2),
- pageY: ((Math.min.apply(Math, valuesY) + Math.max.apply(Math, valuesY)) / 2)
- };
- },
-
-
- /**
- * calculate the velocity between two points
- * @param {Number} delta_time
- * @param {Number} delta_x
- * @param {Number} delta_y
- * @returns {Object} velocity
- */
- getVelocity: function getVelocity(delta_time, delta_x, delta_y) {
- return {
- x: Math.abs(delta_x / delta_time) || 0,
- y: Math.abs(delta_y / delta_time) || 0
- };
- },
-
-
- /**
- * calculate the angle between two coordinates
- * @param {Touch} touch1
- * @param {Touch} touch2
- * @returns {Number} angle
- */
- getAngle: function getAngle(touch1, touch2) {
- var y = touch2.pageY - touch1.pageY,
- x = touch2.pageX - touch1.pageX;
- return Math.atan2(y, x) * 180 / Math.PI;
- },
-
-
- /**
- * angle to direction define
- * @param {Touch} touch1
- * @param {Touch} touch2
- * @returns {String} direction constant, like Hammer.DIRECTION_LEFT
- */
- getDirection: function getDirection(touch1, touch2) {
- var x = Math.abs(touch1.pageX - touch2.pageX),
- y = Math.abs(touch1.pageY - touch2.pageY);
-
- if(x >= y) {
- return touch1.pageX - touch2.pageX > 0 ? Hammer.DIRECTION_LEFT : Hammer.DIRECTION_RIGHT;
- }
- else {
- return touch1.pageY - touch2.pageY > 0 ? Hammer.DIRECTION_UP : Hammer.DIRECTION_DOWN;
- }
- },
-
-
- /**
- * calculate the distance between two touches
- * @param {Touch} touch1
- * @param {Touch} touch2
- * @returns {Number} distance
- */
- getDistance: function getDistance(touch1, touch2) {
- var x = touch2.pageX - touch1.pageX,
- y = touch2.pageY - touch1.pageY;
- return Math.sqrt((x*x) + (y*y));
- },
-
-
- /**
- * calculate the scale factor between two touchLists (fingers)
- * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out
- * @param {Array} start
- * @param {Array} end
- * @returns {Number} scale
- */
- getScale: function getScale(start, end) {
- // need two fingers...
- if(start.length >= 2 && end.length >= 2) {
- return this.getDistance(end[0], end[1]) /
- this.getDistance(start[0], start[1]);
- }
- return 1;
- },
-
-
- /**
- * calculate the rotation degrees between two touchLists (fingers)
- * @param {Array} start
- * @param {Array} end
- * @returns {Number} rotation
- */
- getRotation: function getRotation(start, end) {
- // need two fingers
- if(start.length >= 2 && end.length >= 2) {
- return this.getAngle(end[1], end[0]) -
- this.getAngle(start[1], start[0]);
- }
- return 0;
- },
-
-
- /**
- * boolean if the direction is vertical
- * @param {String} direction
- * @returns {Boolean} is_vertical
- */
- isVertical: function isVertical(direction) {
- return (direction == Hammer.DIRECTION_UP || direction == Hammer.DIRECTION_DOWN);
- },
-
-
- /**
- * stop browser default behavior with css props
- * @param {HtmlElement} element
- * @param {Object} css_props
- */
- stopDefaultBrowserBehavior: function stopDefaultBrowserBehavior(element, css_props) {
- var prop,
- vendors = ['webkit','khtml','moz','ms','o',''];
-
- if(!css_props || !element.style) {
- return;
- }
-
- // with css properties for modern browsers
- for(var i = 0; i < vendors.length; i++) {
- for(var p in css_props) {
- if(css_props.hasOwnProperty(p)) {
- prop = p;
-
- // vender prefix at the property
- if(vendors[i]) {
- prop = vendors[i] + prop.substring(0, 1).toUpperCase() + prop.substring(1);
- }
-
- // set the style
- element.style[prop] = css_props[p];
- }
- }
- }
-
- // also the disable onselectstart
- if(css_props.userSelect == 'none') {
- element.onselectstart = function() {
- return false;
- };
- }
- }
-};
-
-Hammer.detection = {
- // contains all registred Hammer.gestures in the correct order
- gestures: [],
-
- // data of the current Hammer.gesture detection session
- current: null,
-
- // the previous Hammer.gesture session data
- // is a full clone of the previous gesture.current object
- previous: null,
-
- // when this becomes true, no gestures are fired
- stopped: false,
-
-
- /**
- * start Hammer.gesture detection
- * @param {Hammer.Instance} inst
- * @param {Object} eventData
- */
- startDetect: function startDetect(inst, eventData) {
- // already busy with a Hammer.gesture detection on an element
- if(this.current) {
- return;
- }
-
- this.stopped = false;
-
- this.current = {
- inst : inst, // reference to HammerInstance we're working for
- startEvent : Hammer.utils.extend({}, eventData), // start eventData for distances, timing etc
- lastEvent : false, // last eventData
- name : '' // current gesture we're in/detected, can be 'tap', 'hold' etc
- };
-
- this.detect(eventData);
- },
-
-
- /**
- * Hammer.gesture detection
- * @param {Object} eventData
- * @param {Object} eventData
- */
- detect: function detect(eventData) {
- if(!this.current || this.stopped) {
- return;
- }
-
- // extend event data with calculations about scale, distance etc
- eventData = this.extendEventData(eventData);
-
- // instance options
- var inst_options = this.current.inst.options;
-
- // call Hammer.gesture handlers
- for(var g=0,len=this.gestures.length; g<len; g++) {
- var gesture = this.gestures[g];
-
- // only when the instance options have enabled this gesture
- if(!this.stopped && inst_options[gesture.name] !== false) {
- // if a handler returns false, we stop with the detection
- if(gesture.handler.call(gesture, eventData, this.current.inst) === false) {
- this.stopDetect();
- break;
- }
- }
- }
-
- // store as previous event event
- if(this.current) {
- this.current.lastEvent = eventData;
- }
-
- // endevent, but not the last touch, so dont stop
- if(eventData.eventType == Hammer.EVENT_END && !eventData.touches.length-1) {
- this.stopDetect();
- }
-
- return eventData;
- },
-
-
- /**
- * clear the Hammer.gesture vars
- * this is called on endDetect, but can also be used when a final Hammer.gesture has been detected
- * to stop other Hammer.gestures from being fired
- */
- stopDetect: function stopDetect() {
- // clone current data to the store as the previous gesture
- // used for the double tap gesture, since this is an other gesture detect session
- this.previous = Hammer.utils.extend({}, this.current);
-
- // reset the current
- this.current = null;
-
- // stopped!
- this.stopped = true;
- },
-
-
- /**
- * extend eventData for Hammer.gestures
- * @param {Object} ev
- * @returns {Object} ev
- */
- extendEventData: function extendEventData(ev) {
- var startEv = this.current.startEvent;
-
- // if the touches change, set the new touches over the startEvent touches
- // this because touchevents don't have all the touches on touchstart, or the
- // user must place his fingers at the EXACT same time on the screen, which is not realistic
- // but, sometimes it happens that both fingers are touching at the EXACT same time
- if(startEv && (ev.touches.length != startEv.touches.length || ev.touches === startEv.touches)) {
- // extend 1 level deep to get the touchlist with the touch objects
- startEv.touches = [];
- for(var i=0,len=ev.touches.length; i<len; i++) {
- startEv.touches.push(Hammer.utils.extend({}, ev.touches[i]));
- }
- }
-
- var delta_time = ev.timeStamp - startEv.timeStamp,
- delta_x = ev.center.pageX - startEv.center.pageX,
- delta_y = ev.center.pageY - startEv.center.pageY,
- velocity = Hammer.utils.getVelocity(delta_time, delta_x, delta_y);
-
- Hammer.utils.extend(ev, {
- deltaTime : delta_time,
-
- deltaX : delta_x,
- deltaY : delta_y,
-
- velocityX : velocity.x,
- velocityY : velocity.y,
-
- distance : Hammer.utils.getDistance(startEv.center, ev.center),
- angle : Hammer.utils.getAngle(startEv.center, ev.center),
- direction : Hammer.utils.getDirection(startEv.center, ev.center),
-
- scale : Hammer.utils.getScale(startEv.touches, ev.touches),
- rotation : Hammer.utils.getRotation(startEv.touches, ev.touches),
-
- startEvent : startEv
- });
-
- return ev;
- },
-
-
- /**
- * register new gesture
- * @param {Object} gesture object, see gestures.js for documentation
- * @returns {Array} gestures
- */
- register: function register(gesture) {
- // add an enable gesture options if there is no given
- var options = gesture.defaults || {};
- if(options[gesture.name] === undefined) {
- options[gesture.name] = true;
- }
-
- // extend Hammer default options with the Hammer.gesture options
- Hammer.utils.extend(Hammer.defaults, options, true);
-
- // set its index
- gesture.index = gesture.index || 1000;
-
- // add Hammer.gesture to the list
- this.gestures.push(gesture);
-
- // sort the list by index
- this.gestures.sort(function(a, b) {
- if (a.index < b.index) {
- return -1;
- }
- if (a.index > b.index) {
- return 1;
- }
- return 0;
- });
-
- return this.gestures;
- }
-};
-
-
-Hammer.gestures = Hammer.gestures || {};
-
-/**
- * Custom gestures
- * ==============================
- *
- * Gesture object
- * --------------------
- * The object structure of a gesture:
- *
- * { name: 'mygesture',
- * index: 1337,
- * defaults: {
- * mygesture_option: true
- * }
- * handler: function(type, ev, inst) {
- * // trigger gesture event
- * inst.trigger(this.name, ev);
- * }
- * }
-
- * @param {String} name
- * this should be the name of the gesture, lowercase
- * it is also being used to disable/enable the gesture per instance config.
- *
- * @param {Number} [index=1000]
- * the index of the gesture, where it is going to be in the stack of gestures detection
- * like when you build an gesture that depends on the drag gesture, it is a good
- * idea to place it after the index of the drag gesture.
- *
- * @param {Object} [defaults={}]
- * the default settings of the gesture. these are added to the instance settings,
- * and can be overruled per instance. you can also add the name of the gesture,
- * but this is also added by default (and set to true).
- *
- * @param {Function} handler
- * this handles the gesture detection of your custom gesture and receives the
- * following arguments:
- *
- * @param {Object} eventData
- * event data containing the following properties:
- * timeStamp {Number} time the event occurred
- * target {HTMLElement} target element
- * touches {Array} touches (fingers, pointers, mouse) on the screen
- * pointerType {String} kind of pointer that was used. matches Hammer.POINTER_MOUSE|TOUCH
- * center {Object} center position of the touches. contains pageX and pageY
- * deltaTime {Number} the total time of the touches in the screen
- * deltaX {Number} the delta on x axis we haved moved
- * deltaY {Number} the delta on y axis we haved moved
- * velocityX {Number} the velocity on the x
- * velocityY {Number} the velocity on y
- * angle {Number} the angle we are moving
- * direction {String} the direction we are moving. matches Hammer.DIRECTION_UP|DOWN|LEFT|RIGHT
- * distance {Number} the distance we haved moved
- * scale {Number} scaling of the touches, needs 2 touches
- * rotation {Number} rotation of the touches, needs 2 touches *
- * eventType {String} matches Hammer.EVENT_START|MOVE|END
- * srcEvent {Object} the source event, like TouchStart or MouseDown *
- * startEvent {Object} contains the same properties as above,
- * but from the first touch. this is used to calculate
- * distances, deltaTime, scaling etc
- *
- * @param {Hammer.Instance} inst
- * the instance we are doing the detection for. you can get the options from
- * the inst.options object and trigger the gesture event by calling inst.trigger
- *
- *
- * Handle gestures
- * --------------------
- * inside the handler you can get/set Hammer.detection.current. This is the current
- * detection session. It has the following properties
- * @param {String} name
- * contains the name of the gesture we have detected. it has not a real function,
- * only to check in other gestures if something is detected.
- * like in the drag gesture we set it to 'drag' and in the swipe gesture we can
- * check if the current gesture is 'drag' by accessing Hammer.detection.current.name
- *
- * @readonly
- * @param {Hammer.Instance} inst
- * the instance we do the detection for
- *
- * @readonly
- * @param {Object} startEvent
- * contains the properties of the first gesture detection in this session.
- * Used for calculations about timing, distance, etc.
- *
- * @readonly
- * @param {Object} lastEvent
- * contains all the properties of the last gesture detect in this session.
- *
- * after the gesture detection session has been completed (user has released the screen)
- * the Hammer.detection.current object is copied into Hammer.detection.previous,
- * this is usefull for gestures like doubletap, where you need to know if the
- * previous gesture was a tap
- *
- * options that have been set by the instance can be received by calling inst.options
- *
- * You can trigger a gesture event by calling inst.trigger("mygesture", event).
- * The first param is the name of your gesture, the second the event argument
- *
- *
- * Register gestures
- * --------------------
- * When an gesture is added to the Hammer.gestures object, it is auto registered
- * at the setup of the first Hammer instance. You can also call Hammer.detection.register
- * manually and pass your gesture object as a param
- *
- */
-
-/**
- * Hold
- * Touch stays at the same place for x time
- * @events hold
- */
-Hammer.gestures.Hold = {
- name: 'hold',
- index: 10,
- defaults: {
- hold_timeout : 500,
- hold_threshold : 1
- },
- timer: null,
- handler: function holdGesture(ev, inst) {
- switch(ev.eventType) {
- case Hammer.EVENT_START:
- // clear any running timers
- clearTimeout(this.timer);
-
- // set the gesture so we can check in the timeout if it still is
- Hammer.detection.current.name = this.name;
-
- // set timer and if after the timeout it still is hold,
- // we trigger the hold event
- this.timer = setTimeout(function() {
- if(Hammer.detection.current.name == 'hold') {
- inst.trigger('hold', ev);
- }
- }, inst.options.hold_timeout);
- break;
-
- // when you move or end we clear the timer
- case Hammer.EVENT_MOVE:
- if(ev.distance > inst.options.hold_threshold) {
- clearTimeout(this.timer);
- }
- break;
-
- case Hammer.EVENT_END:
- clearTimeout(this.timer);
- break;
- }
- }
-};
-
-
-/**
- * Tap/DoubleTap
- * Quick touch at a place or double at the same place
- * @events tap, doubletap
- */
-Hammer.gestures.Tap = {
- name: 'tap',
- index: 100,
- defaults: {
- tap_max_touchtime : 250,
- tap_max_distance : 10,
- tap_always : true,
- doubletap_distance : 20,
- doubletap_interval : 300
- },
- handler: function tapGesture(ev, inst) {
- if(ev.eventType == Hammer.EVENT_END) {
- // previous gesture, for the double tap since these are two different gesture detections
- var prev = Hammer.detection.previous,
- did_doubletap = false;
-
- // when the touchtime is higher then the max touch time
- // or when the moving distance is too much
- if(ev.deltaTime > inst.options.tap_max_touchtime ||
- ev.distance > inst.options.tap_max_distance) {
- return;
- }
-
- // check if double tap
- if(prev && prev.name == 'tap' &&
- (ev.timeStamp - prev.lastEvent.timeStamp) < inst.options.doubletap_interval &&
- ev.distance < inst.options.doubletap_distance) {
- inst.trigger('doubletap', ev);
- did_doubletap = true;
- }
-
- // do a single tap
- if(!did_doubletap || inst.options.tap_always) {
- Hammer.detection.current.name = 'tap';
- inst.trigger(Hammer.detection.current.name, ev);
- }
- }
- }
-};
-
-
-/**
- * Swipe
- * triggers swipe events when the end velocity is above the threshold
- * @events swipe, swipeleft, swiperight, swipeup, swipedown
- */
-Hammer.gestures.Swipe = {
- name: 'swipe',
- index: 40,
- defaults: {
- // set 0 for unlimited, but this can conflict with transform
- swipe_max_touches : 1,
- swipe_velocity : 0.7
- },
- handler: function swipeGesture(ev, inst) {
- if(ev.eventType == Hammer.EVENT_END) {
- // max touches
- if(inst.options.swipe_max_touches > 0 &&
- ev.touches.length > inst.options.swipe_max_touches) {
- return;
- }
-
- // when the distance we moved is too small we skip this gesture
- // or we can be already in dragging
- if(ev.velocityX > inst.options.swipe_velocity ||
- ev.velocityY > inst.options.swipe_velocity) {
- // trigger swipe events
- inst.trigger(this.name, ev);
- inst.trigger(this.name + ev.direction, ev);
- }
- }
- }
-};
-
-
-/**
- * Drag
- * Move with x fingers (default 1) around on the page. Blocking the scrolling when
- * moving left and right is a good practice. When all the drag events are blocking
- * you disable scrolling on that area.
- * @events drag, drapleft, dragright, dragup, dragdown
- */
-Hammer.gestures.Drag = {
- name: 'drag',
- index: 50,
- defaults: {
- drag_min_distance : 10,
- // set 0 for unlimited, but this can conflict with transform
- drag_max_touches : 1,
- // prevent default browser behavior when dragging occurs
- // be careful with it, it makes the element a blocking element
- // when you are using the drag gesture, it is a good practice to set this true
- drag_block_horizontal : false,
- drag_block_vertical : false,
- // drag_lock_to_axis keeps the drag gesture on the axis that it started on,
- // It disallows vertical directions if the initial direction was horizontal, and vice versa.
- drag_lock_to_axis : false,
- // drag lock only kicks in when distance > drag_lock_min_distance
- // This way, locking occurs only when the distance has become large enough to reliably determine the direction
- drag_lock_min_distance : 25
- },
- triggered: false,
- handler: function dragGesture(ev, inst) {
- // current gesture isnt drag, but dragged is true
- // this means an other gesture is busy. now call dragend
- if(Hammer.detection.current.name != this.name && this.triggered) {
- inst.trigger(this.name +'end', ev);
- this.triggered = false;
- return;
- }
-
- // max touches
- if(inst.options.drag_max_touches > 0 &&
- ev.touches.length > inst.options.drag_max_touches) {
- return;
- }
-
- switch(ev.eventType) {
- case Hammer.EVENT_START:
- this.triggered = false;
- break;
-
- case Hammer.EVENT_MOVE:
- // when the distance we moved is too small we skip this gesture
- // or we can be already in dragging
- if(ev.distance < inst.options.drag_min_distance &&
- Hammer.detection.current.name != this.name) {
- return;
- }
-
- // we are dragging!
- Hammer.detection.current.name = this.name;
-
- // lock drag to axis?
- if(Hammer.detection.current.lastEvent.drag_locked_to_axis || (inst.options.drag_lock_to_axis && inst.options.drag_lock_min_distance<=ev.distance)) {
- ev.drag_locked_to_axis = true;
- }
- var last_direction = Hammer.detection.current.lastEvent.direction;
- if(ev.drag_locked_to_axis && last_direction !== ev.direction) {
- // keep direction on the axis that the drag gesture started on
- if(Hammer.utils.isVertical(last_direction)) {
- ev.direction = (ev.deltaY < 0) ? Hammer.DIRECTION_UP : Hammer.DIRECTION_DOWN;
- }
- else {
- ev.direction = (ev.deltaX < 0) ? Hammer.DIRECTION_LEFT : Hammer.DIRECTION_RIGHT;
- }
- }
-
- // first time, trigger dragstart event
- if(!this.triggered) {
- inst.trigger(this.name +'start', ev);
- this.triggered = true;
- }
-
- // trigger normal event
- inst.trigger(this.name, ev);
-
- // direction event, like dragdown
- inst.trigger(this.name + ev.direction, ev);
-
- // block the browser events
- if( (inst.options.drag_block_vertical && Hammer.utils.isVertical(ev.direction)) ||
- (inst.options.drag_block_horizontal && !Hammer.utils.isVertical(ev.direction))) {
- ev.preventDefault();
- }
- break;
-
- case Hammer.EVENT_END:
- // trigger dragend
- if(this.triggered) {
- inst.trigger(this.name +'end', ev);
- }
-
- this.triggered = false;
- break;
- }
- }
-};
-
-
-/**
- * Transform
- * User want to scale or rotate with 2 fingers
- * @events transform, pinch, pinchin, pinchout, rotate
- */
-Hammer.gestures.Transform = {
- name: 'transform',
- index: 45,
- defaults: {
- // factor, no scale is 1, zoomin is to 0 and zoomout until higher then 1
- transform_min_scale : 0.01,
- // rotation in degrees
- transform_min_rotation : 1,
- // prevent default browser behavior when two touches are on the screen
- // but it makes the element a blocking element
- // when you are using the transform gesture, it is a good practice to set this true
- transform_always_block : false
- },
- triggered: false,
- handler: function transformGesture(ev, inst) {
- // current gesture isnt drag, but dragged is true
- // this means an other gesture is busy. now call dragend
- if(Hammer.detection.current.name != this.name && this.triggered) {
- inst.trigger(this.name +'end', ev);
- this.triggered = false;
- return;
- }
-
- // atleast multitouch
- if(ev.touches.length < 2) {
- return;
- }
-
- // prevent default when two fingers are on the screen
- if(inst.options.transform_always_block) {
- ev.preventDefault();
- }
-
- switch(ev.eventType) {
- case Hammer.EVENT_START:
- this.triggered = false;
- break;
-
- case Hammer.EVENT_MOVE:
- var scale_threshold = Math.abs(1-ev.scale);
- var rotation_threshold = Math.abs(ev.rotation);
-
- // when the distance we moved is too small we skip this gesture
- // or we can be already in dragging
- if(scale_threshold < inst.options.transform_min_scale &&
- rotation_threshold < inst.options.transform_min_rotation) {
- return;
- }
-
- // we are transforming!
- Hammer.detection.current.name = this.name;
-
- // first time, trigger dragstart event
- if(!this.triggered) {
- inst.trigger(this.name +'start', ev);
- this.triggered = true;
- }
-
- inst.trigger(this.name, ev); // basic transform event
-
- // trigger rotate event
- if(rotation_threshold > inst.options.transform_min_rotation) {
- inst.trigger('rotate', ev);
- }
-
- // trigger pinch event
- if(scale_threshold > inst.options.transform_min_scale) {
- inst.trigger('pinch', ev);
- inst.trigger('pinch'+ ((ev.scale < 1) ? 'in' : 'out'), ev);
- }
- break;
-
- case Hammer.EVENT_END:
- // trigger dragend
- if(this.triggered) {
- inst.trigger(this.name +'end', ev);
- }
-
- this.triggered = false;
- break;
- }
- }
-};
-
-
-/**
- * Touch
- * Called as first, tells the user has touched the screen
- * @events touch
- */
-Hammer.gestures.Touch = {
- name: 'touch',
- index: -Infinity,
- defaults: {
- // call preventDefault at touchstart, and makes the element blocking by
- // disabling the scrolling of the page, but it improves gestures like
- // transforming and dragging.
- // be careful with using this, it can be very annoying for users to be stuck
- // on the page
- prevent_default: false,
-
- // disable mouse events, so only touch (or pen!) input triggers events
- prevent_mouseevents: false
- },
- handler: function touchGesture(ev, inst) {
- if(inst.options.prevent_mouseevents && ev.pointerType == Hammer.POINTER_MOUSE) {
- ev.stopDetect();
- return;
- }
-
- if(inst.options.prevent_default) {
- ev.preventDefault();
- }
-
- if(ev.eventType == Hammer.EVENT_START) {
- inst.trigger(this.name, ev);
- }
- }
-};
-
-
-/**
- * Release
- * Called as last, tells the user has released the screen
- * @events release
- */
-Hammer.gestures.Release = {
- name: 'release',
- index: Infinity,
- handler: function releaseGesture(ev, inst) {
- if(ev.eventType == Hammer.EVENT_END) {
- inst.trigger(this.name, ev);
- }
- }
-};
-
-// node export
-if(typeof module === 'object' && typeof module.exports === 'object'){
- module.exports = Hammer;
-}
-// just window export
-else {
- window.Hammer = Hammer;
-
- // requireJS module definition
- if(typeof window.define === 'function' && window.define.amd) {
- window.define('hammer', [], function() {
- return Hammer;
- });
- }
-}
-})(this);
-'use strict';
-
-angular.module('angular-gestures', []);
-
-/**
- * Inspired by AngularJS' implementation of "click dblclick mousedown..."
- *
- * This ties in the Hammer 1.0.0 events to attributes like:
- *
- * hm-tap="add_something()" hm-swipe="remove_something()"
- *
- * and also has support for Hammer options with:
- *
- * hm-tap-opts="{hold: false}"
- *
- * or any other of the "hm-event" listed underneath.
- */
-var HGESTURES = {
- hmDoubleTap : 'doubletap',
- hmDragstart : 'dragstart',
- hmDrag : 'drag',
- hmDragUp : 'dragup',
- hmDragDown : 'dragdown',
- hmDragLeft : 'dragleft',
- hmDragRight : 'dragright',
- hmDragend : 'dragend',
- hmHold : 'hold',
- hmPinch : 'pinch',
- hmPinchIn : 'pinchin',
- hmPinchOut : 'pinchout',
- hmRelease : 'release',
- hmRotate : 'rotate',
- hmSwipe : 'swipe',
- hmSwipeUp : 'swipeup',
- hmSwipeDown : 'swipedown',
- hmSwipeLeft : 'swipeleft',
- hmSwipeRight : 'swiperight',
- hmTap : 'tap',
- hmTouch : 'touch',
- hmTransformstart : 'transformstart',
- hmTransform : 'transform',
- hmTransformend : 'transformend'
-};
-
-var VERBOSE = false;
-
-angular.forEach(HGESTURES, function(eventName, directiveName) {
- angular.module('angular-gestures').directive(
- directiveName,
- ['$parse', '$log', '$timeout', function($parse, $log, $timeout) {
- return function(scope, element, attr) {
- var hammertime, handler;
- attr.$observe(directiveName, function(value) {
- var fn = $parse(value);
- var opts = $parse(attr[directiveName + 'Opts'])
- (scope, {});
- hammertime = new Hammer(element[0], opts);
- handler = function(event) {
- if (VERBOSE) {
- $log.debug('angular-gestures: %s',
- eventName);
- }
- $timeout(function() {
- fn(scope, { $event : event });
- }, 0);
- };
- hammertime.on(eventName, handler);
- });
- scope.$on('$destroy', function() {
- hammertime.off(eventName, handler);
- });
- };
- }]);
-});
diff --git a/ecomp-portal-BE/war/static/ebz/angular_js/ng_base.js b/ecomp-portal-BE/war/static/ebz/angular_js/ng_base.js
deleted file mode 100644
index f864525c..00000000
--- a/ecomp-portal-BE/war/static/ebz/angular_js/ng_base.js
+++ /dev/null
@@ -1,4 +0,0 @@
-!function(a,b){function c(a){var b=a.length,c=kb.type(a);return kb.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||"function"!==c&&(0===b||"number"==typeof b&&b>0&&b-1 in a)}function d(a){var b=zb[a]={};return kb.each(a.match(mb)||[],function(a,c){b[c]=!0}),b}function e(a,c,d,e){if(kb.acceptData(a)){var f,g,h=kb.expando,i=a.nodeType,j=i?kb.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||d!==b||"string"!=typeof c)return k||(k=i?a[h]=bb.pop()||kb.guid++:h),j[k]||(j[k]=i?{}:{toJSON:kb.noop}),("object"==typeof c||"function"==typeof c)&&(e?j[k]=kb.extend(j[k],c):j[k].data=kb.extend(j[k].data,c)),g=j[k],e||(g.data||(g.data={}),g=g.data),d!==b&&(g[kb.camelCase(c)]=d),"string"==typeof c?(f=g[c],null==f&&(f=g[kb.camelCase(c)])):f=g,f}}function f(a,b,c){if(kb.acceptData(a)){var d,e,f=a.nodeType,g=f?kb.cache:a,i=f?a[kb.expando]:kb.expando;if(g[i]){if(b&&(d=c?g[i]:g[i].data)){kb.isArray(b)?b=b.concat(kb.map(b,kb.camelCase)):b in d?b=[b]:(b=kb.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;for(;e--;)delete d[b[e]];if(c?!h(d):!kb.isEmptyObject(d))return}(c||(delete g[i].data,h(g[i])))&&(f?kb.cleanData([a],!0):kb.support.deleteExpando||g!=g.window?delete g[i]:g[i]=null)}}}function g(a,c,d){if(d===b&&1===a.nodeType){var e="data-"+c.replace(Bb,"-$1").toLowerCase();if(d=a.getAttribute(e),"string"==typeof d){try{d="true"===d?!0:"false"===d?!1:"null"===d?null:+d+""===d?+d:Ab.test(d)?kb.parseJSON(d):d}catch(f){}kb.data(a,c,d)}else d=b}return d}function h(a){var b;for(b in a)if(("data"!==b||!kb.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function i(){return!0}function j(){return!1}function k(){try{return Y.activeElement}catch(a){}}function l(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}function m(a,b,c){if(kb.isFunction(b))return kb.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return kb.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(Qb.test(b))return kb.filter(b,a,c);b=kb.filter(b,a)}return kb.grep(a,function(a){return kb.inArray(a,b)>=0!==c})}function n(a){var b=Ub.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function o(a,b){return kb.nodeName(a,"table")&&kb.nodeName(1===b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function p(a){return a.type=(null!==kb.find.attr(a,"type"))+"/"+a.type,a}function q(a){var b=ec.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function r(a,b){for(var c,d=0;null!=(c=a[d]);d++)kb._data(c,"globalEval",!b||kb._data(b[d],"globalEval"))}function s(a,b){if(1===b.nodeType&&kb.hasData(a)){var c,d,e,f=kb._data(a),g=kb._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)kb.event.add(b,c,h[c][d])}g.data&&(g.data=kb.extend({},g.data))}}function t(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!kb.support.noCloneEvent&&b[kb.expando]){e=kb._data(b);for(d in e.events)kb.removeEvent(b,d,e.handle);b.removeAttribute(kb.expando)}"script"===c&&b.text!==a.text?(p(b).text=a.text,q(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),kb.support.html5Clone&&a.innerHTML&&!kb.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&bc.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}function u(a,c){var d,e,f=0,g=typeof a.getElementsByTagName!==W?a.getElementsByTagName(c||"*"):typeof a.querySelectorAll!==W?a.querySelectorAll(c||"*"):b;if(!g)for(g=[],d=a.childNodes||a;null!=(e=d[f]);f++)!c||kb.nodeName(e,c)?g.push(e):kb.merge(g,u(e,c));return c===b||c&&kb.nodeName(a,c)?kb.merge([a],g):g}function v(a){bc.test(a.type)&&(a.defaultChecked=a.checked)}function w(a,b){if(b in a)return b;for(var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=yc.length;e--;)if(b=yc[e]+c,b in a)return b;return d}function x(a,b){return a=b||a,"none"===kb.css(a,"display")||!kb.contains(a.ownerDocument,a)}function y(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=kb._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&x(d)&&(f[g]=kb._data(d,"olddisplay",C(d.nodeName)))):f[g]||(e=x(d),(c&&"none"!==c||!e)&&kb._data(d,"olddisplay",e?c:kb.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function z(a,b,c){var d=rc.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function A(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=kb.css(a,c+xc[f],!0,e)),d?("content"===c&&(g-=kb.css(a,"padding"+xc[f],!0,e)),"margin"!==c&&(g-=kb.css(a,"border"+xc[f]+"Width",!0,e))):(g+=kb.css(a,"padding"+xc[f],!0,e),"padding"!==c&&(g+=kb.css(a,"border"+xc[f]+"Width",!0,e)));return g}function B(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=kc(a),g=kb.support.boxSizing&&"border-box"===kb.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=lc(a,b,f),(0>e||null==e)&&(e=a.style[b]),sc.test(e))return e;d=g&&(kb.support.boxSizingReliable||e===a.style[b]),e=parseFloat(e)||0}return e+A(a,b,c||(g?"border":"content"),d,f)+"px"}function C(a){var b=Y,c=uc[a];return c||(c=D(a,b),"none"!==c&&c||(jc=(jc||kb("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(b.documentElement),b=(jc[0].contentWindow||jc[0].contentDocument).document,b.write("<!doctype html><html><body>"),b.close(),c=D(a,b),jc.detach()),uc[a]=c),c}function D(a,b){var c=kb(b.createElement(a)).appendTo(b.body),d=kb.css(c[0],"display");return c.remove(),d}function E(a,b,c,d){var e;if(kb.isArray(b))kb.each(b,function(b,e){c||Ac.test(a)?d(a,e):E(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==kb.type(b))d(a,b);else for(e in b)E(a+"["+e+"]",b[e],c,d)}function F(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(mb)||[];if(kb.isFunction(c))for(;d=f[e++];)"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function G(a,b,c,d){function e(h){var i;return f[h]=!0,kb.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||g||f[j]?g?!(i=j):void 0:(b.dataTypes.unshift(j),e(j),!1)}),i}var f={},g=a===Rc;return e(b.dataTypes[0])||!f["*"]&&e("*")}function H(a,c){var d,e,f=kb.ajaxSettings.flatOptions||{};for(e in c)c[e]!==b&&((f[e]?a:d||(d={}))[e]=c[e]);return d&&kb.extend(!0,a,d),a}function I(a,c,d){for(var e,f,g,h,i=a.contents,j=a.dataTypes;"*"===j[0];)j.shift(),f===b&&(f=a.mimeType||c.getResponseHeader("Content-Type"));if(f)for(h in i)if(i[h]&&i[h].test(f)){j.unshift(h);break}if(j[0]in d)g=j[0];else{for(h in d){if(!j[0]||a.converters[h+" "+j[0]]){g=h;break}e||(e=h)}g=g||e}return g?(g!==j[0]&&j.unshift(g),d[g]):void 0}function J(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];for(f=k.shift();f;)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}function K(){try{return new a.XMLHttpRequest}catch(b){}}function L(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function M(){return setTimeout(function(){$c=b}),$c=kb.now()}function N(a,b,c){for(var d,e=(ed[b]||[]).concat(ed["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function O(a,b,c){var d,e,f=0,g=dd.length,h=kb.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$c||M(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:kb.extend({},b),opts:kb.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$c||M(),duration:c.duration,tweens:[],createTween:function(b,c){var d=kb.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(P(k,j.opts.specialEasing);g>f;f++)if(d=dd[f].call(j,a,k,j.opts))return d;return kb.map(k,N,j),kb.isFunction(j.opts.start)&&j.opts.start.call(a,j),kb.fx.timer(kb.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function P(a,b){var c,d,e,f,g;for(c in a)if(d=kb.camelCase(c),e=b[d],f=a[c],kb.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=kb.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Q(a,b,c){var d,e,f,g,h,i,j=this,k={},l=a.style,m=a.nodeType&&x(a),n=kb._data(a,"fxshow");c.queue||(h=kb._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,j.always(function(){j.always(function(){h.unqueued--,kb.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[l.overflow,l.overflowX,l.overflowY],"inline"===kb.css(a,"display")&&"none"===kb.css(a,"float")&&(kb.support.inlineBlockNeedsLayout&&"inline"!==C(a.nodeName)?l.zoom=1:l.display="inline-block")),c.overflow&&(l.overflow="hidden",kb.support.shrinkWrapBlocks||j.always(function(){l.overflow=c.overflow[0],l.overflowX=c.overflow[1],l.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ad.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(m?"hide":"show"))continue;k[d]=n&&n[d]||kb.style(a,d)}if(!kb.isEmptyObject(k)){n?"hidden"in n&&(m=n.hidden):n=kb._data(a,"fxshow",{}),f&&(n.hidden=!m),m?kb(a).show():j.done(function(){kb(a).hide()}),j.done(function(){var b;kb._removeData(a,"fxshow");for(b in k)kb.style(a,b,k[b])});for(d in k)g=N(m?n[d]:0,d,j),d in n||(n[d]=g.start,m&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function R(a,b,c,d,e){return new R.prototype.init(a,b,c,d,e)}function S(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=xc[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function T(a){return kb.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}var U,V,W=typeof b,X=a.location,Y=a.document,Z=Y.documentElement,$=a.jQuery,_=a.$,ab={},bb=[],cb="1.10.2",db=bb.concat,eb=bb.push,fb=bb.slice,gb=bb.indexOf,hb=ab.toString,ib=ab.hasOwnProperty,jb=cb.trim,kb=function(a,b){return new kb.fn.init(a,b,V)},lb=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,mb=/\S+/g,nb=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ob=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,pb=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,qb=/^[\],:{}\s]*$/,rb=/(?:^|:|,)(?:\s*\[)+/g,sb=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,tb=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,ub=/^-ms-/,vb=/-([\da-z])/gi,wb=function(a,b){return b.toUpperCase()},xb=function(a){(Y.addEventListener||"load"===a.type||"complete"===Y.readyState)&&(yb(),kb.ready())},yb=function(){Y.addEventListener?(Y.removeEventListener("DOMContentLoaded",xb,!1),a.removeEventListener("load",xb,!1)):(Y.detachEvent("onreadystatechange",xb),a.detachEvent("onload",xb))};kb.fn=kb.prototype={jquery:cb,constructor:kb,init:function(a,c,d){var e,f;if(!a)return this;if("string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:ob.exec(a),!e||!e[1]&&c)return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a);if(e[1]){if(c=c instanceof kb?c[0]:c,kb.merge(this,kb.parseHTML(e[1],c&&c.nodeType?c.ownerDocument||c:Y,!0)),pb.test(e[1])&&kb.isPlainObject(c))for(e in c)kb.isFunction(this[e])?this[e](c[e]):this.attr(e,c[e]);return this}if(f=Y.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return d.find(a);this.length=1,this[0]=f}return this.context=Y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):kb.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),kb.makeArray(a,this))},selector:"",length:0,toArray:function(){return fb.call(this)},get:function(a){return null==a?this.toArray():0>a?this[this.length+a]:this[a]},pushStack:function(a){var b=kb.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return kb.each(this,a,b)},ready:function(a){return kb.ready.promise().done(a),this},slice:function(){return this.pushStack(fb.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},map:function(a){return this.pushStack(kb.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:eb,sort:[].sort,splice:[].splice},kb.fn.init.prototype=kb.fn,kb.extend=kb.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;for("boolean"==typeof h&&(k=h,h=arguments[1]||{},i=2),"object"==typeof h||kb.isFunction(h)||(h={}),j===i&&(h=this,--i);j>i;i++)if(null!=(f=arguments[i]))for(e in f)a=h[e],d=f[e],h!==d&&(k&&d&&(kb.isPlainObject(d)||(c=kb.isArray(d)))?(c?(c=!1,g=a&&kb.isArray(a)?a:[]):g=a&&kb.isPlainObject(a)?a:{},h[e]=kb.extend(k,g,d)):d!==b&&(h[e]=d));return h},kb.extend({expando:"jQuery"+(cb+Math.random()).replace(/\D/g,""),noConflict:function(b){return a.$===kb&&(a.$=_),b&&a.jQuery===kb&&(a.jQuery=$),kb},isReady:!1,readyWait:1,holdReady:function(a){a?kb.readyWait++:kb.ready(!0)},ready:function(a){if(a===!0?!--kb.readyWait:!kb.isReady){if(!Y.body)return setTimeout(kb.ready);kb.isReady=!0,a!==!0&&--kb.readyWait>0||(U.resolveWith(Y,[kb]),kb.fn.trigger&&kb(Y).trigger("ready").off("ready"))}},isFunction:function(a){return"function"===kb.type(a)},isArray:Array.isArray||function(a){return"array"===kb.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return null==a?String(a):"object"==typeof a||"function"==typeof a?ab[hb.call(a)]||"object":typeof a},isPlainObject:function(a){var c;if(!a||"object"!==kb.type(a)||a.nodeType||kb.isWindow(a))return!1;try{if(a.constructor&&!ib.call(a,"constructor")&&!ib.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(d){return!1}if(kb.support.ownLast)for(c in a)return ib.call(a,c);for(c in a);return c===b||ib.call(a,c)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||Y;var d=pb.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=kb.buildFragment([a],b,e),e&&kb(e).remove(),kb.merge([],d.childNodes))},parseJSON:function(b){return a.JSON&&a.JSON.parse?a.JSON.parse(b):null===b?b:"string"==typeof b&&(b=kb.trim(b),b&&qb.test(b.replace(sb,"@").replace(tb,"]").replace(rb,"")))?new Function("return "+b)():void kb.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||"string"!=typeof c)return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return d&&d.documentElement&&!d.getElementsByTagName("parsererror").length||kb.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&kb.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(ub,"ms-").replace(vb,wb)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,d){var e,f=0,g=a.length,h=c(a);if(d){if(h)for(;g>f&&(e=b.apply(a[f],d),e!==!1);f++);else for(f in a)if(e=b.apply(a[f],d),e===!1)break}else if(h)for(;g>f&&(e=b.call(a[f],f,a[f]),e!==!1);f++);else for(f in a)if(e=b.call(a[f],f,a[f]),e===!1)break;return a},trim:jb&&!jb.call(" ")?function(a){return null==a?"":jb.call(a)}:function(a){return null==a?"":(a+"").replace(nb,"")},makeArray:function(a,b){var d=b||[];return null!=a&&(c(Object(a))?kb.merge(d,"string"==typeof a?[a]:a):eb.call(d,a)),d},inArray:function(a,b,c){var d;if(b){if(gb)return gb.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=c.length,e=a.length,f=0;if("number"==typeof d)for(;d>f;f++)a[e++]=c[f];else for(;c[f]!==b;)a[e++]=c[f++];return a.length=e,a},grep:function(a,b,c){var d,e=[],f=0,g=a.length;for(c=!!c;g>f;f++)d=!!b(a[f],f),c!==d&&e.push(a[f]);return e},map:function(a,b,d){var e,f=0,g=a.length,h=c(a),i=[];if(h)for(;g>f;f++)e=b(a[f],f,d),null!=e&&(i[i.length]=e);else for(f in a)e=b(a[f],f,d),null!=e&&(i[i.length]=e);return db.apply([],i)},guid:1,proxy:function(a,c){var d,e,f;return"string"==typeof c&&(f=a[c],c=a,a=f),kb.isFunction(a)?(d=fb.call(arguments,2),e=function(){return a.apply(c||this,d.concat(fb.call(arguments)))},e.guid=a.guid=a.guid||kb.guid++,e):b},access:function(a,c,d,e,f,g,h){var i=0,j=a.length,k=null==d;if("object"===kb.type(d)){f=!0;for(i in d)kb.access(a,c,i,d[i],!0,g,h)}else if(e!==b&&(f=!0,kb.isFunction(e)||(h=!0),k&&(h?(c.call(a,e),c=null):(k=c,c=function(a,b,c){return k.call(kb(a),c)})),c))for(;j>i;i++)c(a[i],d,h?e:e.call(a[i],i,c(a[i],d)));return f?a:k?c.call(a):j?c(a[0],d):g},now:function(){return(new Date).getTime()},swap:function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e}}),kb.ready.promise=function(b){if(!U)if(U=kb.Deferred(),"complete"===Y.readyState)setTimeout(kb.ready);else if(Y.addEventListener)Y.addEventListener("DOMContentLoaded",xb,!1),a.addEventListener("load",xb,!1);else{Y.attachEvent("onreadystatechange",xb),a.attachEvent("onload",xb);var c=!1;try{c=null==a.frameElement&&Y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!kb.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}yb(),kb.ready()}}()}return U.promise(b)},kb.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){ab["[object "+b+"]"]=b.toLowerCase()}),V=kb(Y),function(a,b){function c(a,b,c,d){var e,f,g,h,i,j,k,l,o,p;if((b?b.ownerDocument||b:O)!==G&&F(b),b=b||G,c=c||[],!a||"string"!=typeof a)return c;if(1!==(h=b.nodeType)&&9!==h)return[];if(I&&!d){if(e=tb.exec(a))if(g=e[1]){if(9===h){if(f=b.getElementById(g),!f||!f.parentNode)return c;if(f.id===g)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(g))&&M(b,f)&&f.id===g)return c.push(f),c}else{if(e[2])return ab.apply(c,b.getElementsByTagName(a)),c;if((g=e[3])&&x.getElementsByClassName&&b.getElementsByClassName)return ab.apply(c,b.getElementsByClassName(g)),c}if(x.qsa&&(!J||!J.test(a))){if(l=k=N,o=b,p=9===h&&a,1===h&&"object"!==b.nodeName.toLowerCase()){for(j=m(a),(k=b.getAttribute("id"))?l=k.replace(wb,"\\$&"):b.setAttribute("id",l),l="[id='"+l+"'] ",i=j.length;i--;)j[i]=l+n(j[i]);o=nb.test(a)&&b.parentNode||b,p=j.join(",")}if(p)try{return ab.apply(c,o.querySelectorAll(p)),c}catch(q){}finally{k||b.removeAttribute("id")}}}return v(a.replace(jb,"$1"),b,c,d)}function d(){function a(c,d){return b.push(c+=" ")>z.cacheLength&&delete a[b.shift()],a[c]=d}var b=[];return a}function e(a){return a[N]=!0,a}function f(a){var b=G.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function g(a,b){for(var c=a.split("|"),d=a.length;d--;)z.attrHandle[c[d]]=b}function h(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||X)-(~a.sourceIndex||X);if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function i(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function j(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function k(a){return e(function(b){return b=+b,e(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function l(){}function m(a,b){var d,e,f,g,h,i,j,k=S[a+" "];if(k)return b?0:k.slice(0);for(h=a,i=[],j=z.preFilter;h;){(!d||(e=lb.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),d=!1,(e=mb.exec(h))&&(d=e.shift(),f.push({value:d,type:e[0].replace(jb," ")}),h=h.slice(d.length));for(g in z.filter)!(e=rb[g].exec(h))||j[g]&&!(e=j[g](e))||(d=e.shift(),f.push({value:d,type:g,matches:e}),h=h.slice(d.length));if(!d)break}return b?h.length:h?c.error(a):S(a,i).slice(0)}function n(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function o(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=Q++;return b.first?function(b,c,f){for(;b=b[d];)if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=P+" "+f;if(g){for(;b=b[d];)if((1===b.nodeType||e)&&a(b,c,g))return!0}else for(;b=b[d];)if(1===b.nodeType||e)if(j=b[N]||(b[N]={}),(i=j[d])&&i[0]===k){if((h=i[1])===!0||h===y)return h===!0}else if(i=j[d]=[k],i[1]=a(b,c,g)||y,i[1]===!0)return!0}}function p(a){return a.length>1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function q(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function r(a,b,c,d,f,g){return d&&!d[N]&&(d=r(d)),f&&!f[N]&&(f=r(f,g)),e(function(e,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=e||u(b||"*",h.nodeType?[h]:h,[]),r=!a||!e&&b?p:q(p,m,a,h,i),s=c?f||(e?a:o||d)?[]:g:r;if(c&&c(r,s,h,i),d)for(j=q(s,n),d(j,[],h,i),k=j.length;k--;)(l=j[k])&&(s[n[k]]=!(r[n[k]]=l));if(e){if(f||a){if(f){for(j=[],k=s.length;k--;)(l=s[k])&&j.push(r[k]=l);f(null,s=[],j,i)}for(k=s.length;k--;)(l=s[k])&&(j=f?cb.call(e,l):m[k])>-1&&(e[j]=!(g[j]=l))}}else s=q(s===g?s.splice(o,s.length):s),f?f(null,g,s,i):ab.apply(g,s)})}function s(a){for(var b,c,d,e=a.length,f=z.relative[a[0].type],g=f||z.relative[" "],h=f?1:0,i=o(function(a){return a===b},g,!0),j=o(function(a){return cb.call(b,a)>-1},g,!0),k=[function(a,c,d){return!f&&(d||c!==D)||((b=c).nodeType?i(a,c,d):j(a,c,d))}];e>h;h++)if(c=z.relative[a[h].type])k=[o(p(k),c)];else{if(c=z.filter[a[h].type].apply(null,a[h].matches),c[N]){for(d=++h;e>d&&!z.relative[a[d].type];d++);return r(h>1&&p(k),h>1&&n(a.slice(0,h-1).concat({value:" "===a[h-2].type?"*":""})).replace(jb,"$1"),c,d>h&&s(a.slice(h,d)),e>d&&s(a=a.slice(d)),e>d&&n(a))}k.push(c)}return p(k)}function t(a,b){var d=0,f=b.length>0,g=a.length>0,h=function(e,h,i,j,k){var l,m,n,o=[],p=0,r="0",s=e&&[],t=null!=k,u=D,v=e||g&&z.find.TAG("*",k&&h.parentNode||h),w=P+=null==u?1:Math.random()||.1;for(t&&(D=h!==G&&h,y=d);null!=(l=v[r]);r++){if(g&&l){for(m=0;n=a[m++];)if(n(l,h,i)){j.push(l);break}t&&(P=w,y=++d)}f&&((l=!n&&l)&&p--,e&&s.push(l))}if(p+=r,f&&r!==p){for(m=0;n=b[m++];)n(s,o,h,i);if(e){if(p>0)for(;r--;)s[r]||o[r]||(o[r]=$.call(j));o=q(o)}ab.apply(j,o),t&&!e&&o.length>0&&p+b.length>1&&c.uniqueSort(j)}return t&&(P=w,D=u),s};return f?e(h):h}function u(a,b,d){for(var e=0,f=b.length;f>e;e++)c(a,b[e],d);return d}function v(a,b,c,d){var e,f,g,h,i,j=m(a);if(!d&&1===j.length){if(f=j[0]=j[0].slice(0),f.length>2&&"ID"===(g=f[0]).type&&x.getById&&9===b.nodeType&&I&&z.relative[f[1].type]){if(b=(z.find.ID(g.matches[0].replace(xb,yb),b)||[])[0],!b)return c;a=a.slice(f.shift().value.length)}for(e=rb.needsContext.test(a)?0:f.length;e--&&(g=f[e],!z.relative[h=g.type]);)if((i=z.find[h])&&(d=i(g.matches[0].replace(xb,yb),nb.test(f[0].type)&&b.parentNode||b))){if(f.splice(e,1),a=d.length&&n(f),!a)return ab.apply(c,d),c;break}}return C(a,j)(d,b,!I,c,nb.test(a)),c}var w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N="sizzle"+-new Date,O=a.document,P=0,Q=0,R=d(),S=d(),T=d(),U=!1,V=function(a,b){return a===b?(U=!0,0):0},W=typeof b,X=1<<31,Y={}.hasOwnProperty,Z=[],$=Z.pop,_=Z.push,ab=Z.push,bb=Z.slice,cb=Z.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},db="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",eb="[\\x20\\t\\r\\n\\f]",fb="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",gb=fb.replace("w","w#"),hb="\\["+eb+"*("+fb+")"+eb+"*(?:([*^$|!~]?=)"+eb+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+gb+")|)|)"+eb+"*\\]",ib=":("+fb+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+hb.replace(3,8)+")*)|.*)\\)|)",jb=new RegExp("^"+eb+"+|((?:^|[^\\\\])(?:\\\\.)*)"+eb+"+$","g"),lb=new RegExp("^"+eb+"*,"+eb+"*"),mb=new RegExp("^"+eb+"*([>+~]|"+eb+")"+eb+"*"),nb=new RegExp(eb+"*[+~]"),ob=new RegExp("="+eb+"*([^\\]'\"]*)"+eb+"*\\]","g"),pb=new RegExp(ib),qb=new RegExp("^"+gb+"$"),rb={ID:new RegExp("^#("+fb+")"),CLASS:new RegExp("^\\.("+fb+")"),TAG:new RegExp("^("+fb.replace("w","w*")+")"),ATTR:new RegExp("^"+hb),PSEUDO:new RegExp("^"+ib),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+eb+"*(even|odd|(([+-]|)(\\d*)n|)"+eb+"*(?:([+-]|)"+eb+"*(\\d+)|))"+eb+"*\\)|)","i"),bool:new RegExp("^(?:"+db+")$","i"),needsContext:new RegExp("^"+eb+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+eb+"*((?:-\\d)?\\d*)"+eb+"*\\)|)(?=[^-]|$)","i")},sb=/^[^{]+\{\s*\[native \w/,tb=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ub=/^(?:input|select|textarea|button)$/i,vb=/^h\d$/i,wb=/'|\\/g,xb=new RegExp("\\\\([\\da-f]{1,6}"+eb+"?|("+eb+")|.)","ig"),yb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{ab.apply(Z=bb.call(O.childNodes),O.childNodes),Z[O.childNodes.length].nodeType}catch(zb){ab={apply:Z.length?function(a,b){_.apply(a,bb.call(b))}:function(a,b){for(var c=a.length,d=0;a[c++]=b[d++];);a.length=c-1}}}B=c.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},x=c.support={},F=c.setDocument=function(a){var b=a?a.ownerDocument||a:O,c=b.defaultView;return b!==G&&9===b.nodeType&&b.documentElement?(G=b,H=b.documentElement,I=!B(b),c&&c.attachEvent&&c!==c.top&&c.attachEvent("onbeforeunload",function(){F()}),x.attributes=f(function(a){return a.className="i",!a.getAttribute("className")}),x.getElementsByTagName=f(function(a){return a.appendChild(b.createComment("")),!a.getElementsByTagName("*").length}),x.getElementsByClassName=f(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),x.getById=f(function(a){return H.appendChild(a).id=N,!b.getElementsByName||!b.getElementsByName(N).length}),x.getById?(z.find.ID=function(a,b){if(typeof b.getElementById!==W&&I){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},z.filter.ID=function(a){var b=a.replace(xb,yb);return function(a){return a.getAttribute("id")===b}}):(delete z.find.ID,z.filter.ID=function(a){var b=a.replace(xb,yb);return function(a){var c=typeof a.getAttributeNode!==W&&a.getAttributeNode("id");return c&&c.value===b}}),z.find.TAG=x.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==W?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},z.find.CLASS=x.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==W&&I?b.getElementsByClassName(a):void 0},K=[],J=[],(x.qsa=sb.test(b.querySelectorAll))&&(f(function(a){a.innerHTML="<select><option selected=''></option></select>",a.querySelectorAll("[selected]").length||J.push("\\["+eb+"*(?:value|"+db+")"),a.querySelectorAll(":checked").length||J.push(":checked")}),f(function(a){var c=b.createElement("input");c.setAttribute("type","hidden"),a.appendChild(c).setAttribute("t",""),a.querySelectorAll("[t^='']").length&&J.push("[*^$]="+eb+"*(?:''|\"\")"),a.querySelectorAll(":enabled").length||J.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),J.push(",.*:")})),(x.matchesSelector=sb.test(L=H.webkitMatchesSelector||H.mozMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&f(function(a){x.disconnectedMatch=L.call(a,"div"),L.call(a,"[s!='']:x"),K.push("!=",ib)}),J=J.length&&new RegExp(J.join("|")),K=K.length&&new RegExp(K.join("|")),M=sb.test(H.contains)||H.compareDocumentPosition?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},V=H.compareDocumentPosition?function(a,c){if(a===c)return U=!0,0;var d=c.compareDocumentPosition&&a.compareDocumentPosition&&a.compareDocumentPosition(c);return d?1&d||!x.sortDetached&&c.compareDocumentPosition(a)===d?a===b||M(O,a)?-1:c===b||M(O,c)?1:E?cb.call(E,a)-cb.call(E,c):0:4&d?-1:1:a.compareDocumentPosition?-1:1}:function(a,c){var d,e=0,f=a.parentNode,g=c.parentNode,i=[a],j=[c];if(a===c)return U=!0,0;if(!f||!g)return a===b?-1:c===b?1:f?-1:g?1:E?cb.call(E,a)-cb.call(E,c):0;if(f===g)return h(a,c);for(d=a;d=d.parentNode;)i.unshift(d);for(d=c;d=d.parentNode;)j.unshift(d);for(;i[e]===j[e];)e++;return e?h(i[e],j[e]):i[e]===O?-1:j[e]===O?1:0},b):G},c.matches=function(a,b){return c(a,null,null,b)},c.matchesSelector=function(a,b){if((a.ownerDocument||a)!==G&&F(a),b=b.replace(ob,"='$1']"),!(!x.matchesSelector||!I||K&&K.test(b)||J&&J.test(b)))try{var d=L.call(a,b);if(d||x.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return c(b,G,null,[a]).length>0},c.contains=function(a,b){return(a.ownerDocument||a)!==G&&F(a),M(a,b)},c.attr=function(a,c){(a.ownerDocument||a)!==G&&F(a);var d=z.attrHandle[c.toLowerCase()],e=d&&Y.call(z.attrHandle,c.toLowerCase())?d(a,c,!I):b;return e===b?x.attributes||!I?a.getAttribute(c):(e=a.getAttributeNode(c))&&e.specified?e.value:null:e},c.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},c.uniqueSort=function(a){var b,c=[],d=0,e=0;if(U=!x.detectDuplicates,E=!x.sortStable&&a.slice(0),a.sort(V),U){for(;b=a[e++];)b===a[e]&&(d=c.push(e));for(;d--;)a.splice(c[d],1)}return a},A=c.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=A(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d];d++)c+=A(b);return c},z=c.selectors={cacheLength:50,createPseudo:e,match:rb,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(xb,yb),a[3]=(a[4]||a[5]||"").replace(xb,yb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||c.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&c.error(a[0]),a},PSEUDO:function(a){var c,d=!a[5]&&a[2];return rb.CHILD.test(a[0])?null:(a[3]&&a[4]!==b?a[2]=a[4]:d&&pb.test(d)&&(c=m(d,!0))&&(c=d.indexOf(")",d.length-c)-d.length)&&(a[0]=a[0].slice(0,c),a[2]=d.slice(0,c)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(xb,yb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=R[a+" "];return b||(b=new RegExp("(^|"+eb+")"+a+"("+eb+"|$)"))&&R(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==W&&a.getAttribute("class")||"")})},ATTR:function(a,b,d){return function(e){var f=c.attr(e,a);return null==f?"!="===b:b?(f+="","="===b?f===d:"!="===b?f!==d:"^="===b?d&&0===f.indexOf(d):"*="===b?d&&f.indexOf(d)>-1:"$="===b?d&&f.slice(-d.length)===d:"~="===b?(" "+f+" ").indexOf(d)>-1:"|="===b?f===d||f.slice(0,d.length+1)===d+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;
-return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){for(;p;){for(l=b;l=l[p];)if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){for(k=q[N]||(q[N]={}),j=k[a]||[],n=j[0]===P&&j[1],m=j[0]===P&&j[2],l=n&&q.childNodes[n];l=++n&&l&&l[p]||(m=n=0)||o.pop();)if(1===l.nodeType&&++m&&l===b){k[a]=[P,n,m];break}}else if(s&&(j=(b[N]||(b[N]={}))[a])&&j[0]===P)m=j[1];else for(;(l=++n&&l&&l[p]||(m=n=0)||o.pop())&&((h?l.nodeName.toLowerCase()!==r:1!==l.nodeType)||!++m||(s&&((l[N]||(l[N]={}))[a]=[P,m]),l!==b)););return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var d,f=z.pseudos[a]||z.setFilters[a.toLowerCase()]||c.error("unsupported pseudo: "+a);return f[N]?f(b):f.length>1?(d=[a,a,"",b],z.setFilters.hasOwnProperty(a.toLowerCase())?e(function(a,c){for(var d,e=f(a,b),g=e.length;g--;)d=cb.call(a,e[g]),a[d]=!(c[d]=e[g])}):function(a){return f(a,0,d)}):f}},pseudos:{not:e(function(a){var b=[],c=[],d=C(a.replace(jb,"$1"));return d[N]?e(function(a,b,c,e){for(var f,g=d(a,null,e,[]),h=a.length;h--;)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:e(function(a){return function(b){return c(a,b).length>0}}),contains:e(function(a){return function(b){return(b.textContent||b.innerText||A(b)).indexOf(a)>-1}}),lang:e(function(a){return qb.test(a||"")||c.error("unsupported lang: "+a),a=a.replace(xb,yb).toLowerCase(),function(b){var c;do if(c=I?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===H},focus:function(a){return a===G.activeElement&&(!G.hasFocus||G.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeName>"@"||3===a.nodeType||4===a.nodeType)return!1;return!0},parent:function(a){return!z.pseudos.empty(a)},header:function(a){return vb.test(a.nodeName)},input:function(a){return ub.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||b.toLowerCase()===a.type)},first:k(function(){return[0]}),last:k(function(a,b){return[b-1]}),eq:k(function(a,b,c){return[0>c?c+b:c]}),even:k(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:k(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:k(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:k(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},z.pseudos.nth=z.pseudos.eq;for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})z.pseudos[w]=i(w);for(w in{submit:!0,reset:!0})z.pseudos[w]=j(w);l.prototype=z.filters=z.pseudos,z.setFilters=new l,C=c.compile=function(a,b){var c,d=[],e=[],f=T[a+" "];if(!f){for(b||(b=m(a)),c=b.length;c--;)f=s(b[c]),f[N]?d.push(f):e.push(f);f=T(a,t(e,d))}return f},x.sortStable=N.split("").sort(V).join("")===N,x.detectDuplicates=U,F(),x.sortDetached=f(function(a){return 1&a.compareDocumentPosition(G.createElement("div"))}),f(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||g("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),x.attributes&&f(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||g("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),f(function(a){return null==a.getAttribute("disabled")})||g(db,function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&d.specified?d.value:a[b]===!0?b.toLowerCase():null}),kb.find=c,kb.expr=c.selectors,kb.expr[":"]=kb.expr.pseudos,kb.unique=c.uniqueSort,kb.text=c.getText,kb.isXMLDoc=c.isXML,kb.contains=c.contains}(a);var zb={};kb.Callbacks=function(a){a="string"==typeof a?zb[a]||d(a):kb.extend({},a);var c,e,f,g,h,i,j=[],k=!a.once&&[],l=function(b){for(e=a.memory&&b,f=!0,h=i||0,i=0,g=j.length,c=!0;j&&g>h;h++)if(j[h].apply(b[0],b[1])===!1&&a.stopOnFalse){e=!1;break}c=!1,j&&(k?k.length&&l(k.shift()):e?j=[]:m.disable())},m={add:function(){if(j){var b=j.length;!function d(b){kb.each(b,function(b,c){var e=kb.type(c);"function"===e?a.unique&&m.has(c)||j.push(c):c&&c.length&&"string"!==e&&d(c)})}(arguments),c?g=j.length:e&&(i=b,l(e))}return this},remove:function(){return j&&kb.each(arguments,function(a,b){for(var d;(d=kb.inArray(b,j,d))>-1;)j.splice(d,1),c&&(g>=d&&g--,h>=d&&h--)}),this},has:function(a){return a?kb.inArray(a,j)>-1:!(!j||!j.length)},empty:function(){return j=[],g=0,this},disable:function(){return j=k=e=b,this},disabled:function(){return!j},lock:function(){return k=b,e||m.disable(),this},locked:function(){return!k},fireWith:function(a,b){return!j||f&&!k||(b=b||[],b=[a,b.slice?b.slice():b],c?k.push(b):l(b)),this},fire:function(){return m.fireWith(this,arguments),this},fired:function(){return!!f}};return m},kb.extend({Deferred:function(a){var b=[["resolve","done",kb.Callbacks("once memory"),"resolved"],["reject","fail",kb.Callbacks("once memory"),"rejected"],["notify","progress",kb.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return kb.Deferred(function(c){kb.each(b,function(b,f){var g=f[0],h=kb.isFunction(a[b])&&a[b];e[f[1]](function(){var a=h&&h.apply(this,arguments);a&&kb.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[g+"With"](this===d?c.promise():this,h?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?kb.extend(a,d):d}},e={};return d.pipe=d.then,kb.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b,c,d,e=0,f=fb.call(arguments),g=f.length,h=1!==g||a&&kb.isFunction(a.promise)?g:0,i=1===h?a:kb.Deferred(),j=function(a,c,d){return function(e){c[a]=this,d[a]=arguments.length>1?fb.call(arguments):e,d===b?i.notifyWith(c,d):--h||i.resolveWith(c,d)}};if(g>1)for(b=new Array(g),c=new Array(g),d=new Array(g);g>e;e++)f[e]&&kb.isFunction(f[e].promise)?f[e].promise().done(j(e,d,f)).fail(i.reject).progress(j(e,c,b)):--h;return h||i.resolveWith(d,f),i.promise()}}),kb.support=function(b){var c,d,e,f,g,h,i,j,k,l=Y.createElement("div");if(l.setAttribute("className","t"),l.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",c=l.getElementsByTagName("*")||[],d=l.getElementsByTagName("a")[0],!d||!d.style||!c.length)return b;f=Y.createElement("select"),h=f.appendChild(Y.createElement("option")),e=l.getElementsByTagName("input")[0],d.style.cssText="top:1px;float:left;opacity:.5",b.getSetAttribute="t"!==l.className,b.leadingWhitespace=3===l.firstChild.nodeType,b.tbody=!l.getElementsByTagName("tbody").length,b.htmlSerialize=!!l.getElementsByTagName("link").length,b.style=/top/.test(d.getAttribute("style")),b.hrefNormalized="/a"===d.getAttribute("href"),b.opacity=/^0.5/.test(d.style.opacity),b.cssFloat=!!d.style.cssFloat,b.checkOn=!!e.value,b.optSelected=h.selected,b.enctype=!!Y.createElement("form").enctype,b.html5Clone="<:nav></:nav>"!==Y.createElement("nav").cloneNode(!0).outerHTML,b.inlineBlockNeedsLayout=!1,b.shrinkWrapBlocks=!1,b.pixelPosition=!1,b.deleteExpando=!0,b.noCloneEvent=!0,b.reliableMarginRight=!0,b.boxSizingReliable=!0,e.checked=!0,b.noCloneChecked=e.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!h.disabled;try{delete l.test}catch(m){b.deleteExpando=!1}e=Y.createElement("input"),e.setAttribute("value",""),b.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),b.radioValue="t"===e.value,e.setAttribute("checked","t"),e.setAttribute("name","t"),g=Y.createDocumentFragment(),g.appendChild(e),b.appendChecked=e.checked,b.checkClone=g.cloneNode(!0).cloneNode(!0).lastChild.checked,l.attachEvent&&(l.attachEvent("onclick",function(){b.noCloneEvent=!1}),l.cloneNode(!0).click());for(k in{submit:!0,change:!0,focusin:!0})l.setAttribute(i="on"+k,"t"),b[k+"Bubbles"]=i in a||l.attributes[i].expando===!1;l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",b.clearCloneStyle="content-box"===l.style.backgroundClip;for(k in kb(b))break;return b.ownLast="0"!==k,kb(function(){var c,d,e,f="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",g=Y.getElementsByTagName("body")[0];g&&(c=Y.createElement("div"),c.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",g.appendChild(c).appendChild(l),l.innerHTML="<table><tr><td></td><td>t</td></tr></table>",e=l.getElementsByTagName("td"),e[0].style.cssText="padding:0;margin:0;border:0;display:none",j=0===e[0].offsetHeight,e[0].style.display="",e[1].style.display="none",b.reliableHiddenOffsets=j&&0===e[0].offsetHeight,l.innerHTML="",l.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",kb.swap(g,null!=g.style.zoom?{zoom:1}:{},function(){b.boxSizing=4===l.offsetWidth}),a.getComputedStyle&&(b.pixelPosition="1%"!==(a.getComputedStyle(l,null)||{}).top,b.boxSizingReliable="4px"===(a.getComputedStyle(l,null)||{width:"4px"}).width,d=l.appendChild(Y.createElement("div")),d.style.cssText=l.style.cssText=f,d.style.marginRight=d.style.width="0",l.style.width="1px",b.reliableMarginRight=!parseFloat((a.getComputedStyle(d,null)||{}).marginRight)),typeof l.style.zoom!==W&&(l.innerHTML="",l.style.cssText=f+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=3===l.offsetWidth,l.style.display="block",l.innerHTML="<div></div>",l.firstChild.style.width="5px",b.shrinkWrapBlocks=3!==l.offsetWidth,b.inlineBlockNeedsLayout&&(g.style.zoom=1)),g.removeChild(c),c=l=e=d=null)}),c=f=g=h=d=e=null,b}({});var Ab=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,Bb=/([A-Z])/g;kb.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?kb.cache[a[kb.expando]]:a[kb.expando],!!a&&!h(a)},data:function(a,b,c){return e(a,b,c)},removeData:function(a,b){return f(a,b)},_data:function(a,b,c){return e(a,b,c,!0)},_removeData:function(a,b){return f(a,b,!0)},acceptData:function(a){if(a.nodeType&&1!==a.nodeType&&9!==a.nodeType)return!1;var b=a.nodeName&&kb.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),kb.fn.extend({data:function(a,c){var d,e,f=null,h=0,i=this[0];if(a===b){if(this.length&&(f=kb.data(i),1===i.nodeType&&!kb._data(i,"parsedAttrs"))){for(d=i.attributes;h<d.length;h++)e=d[h].name,0===e.indexOf("data-")&&(e=kb.camelCase(e.slice(5)),g(i,e,f[e]));kb._data(i,"parsedAttrs",!0)}return f}return"object"==typeof a?this.each(function(){kb.data(this,a)}):arguments.length>1?this.each(function(){kb.data(this,a,c)}):i?g(i,a,kb.data(i,a)):null},removeData:function(a){return this.each(function(){kb.removeData(this,a)})}}),kb.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=kb._data(a,b),c&&(!d||kb.isArray(c)?d=kb._data(a,b,kb.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=kb.queue(a,b),d=c.length,e=c.shift(),f=kb._queueHooks(a,b),g=function(){kb.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return kb._data(a,c)||kb._data(a,c,{empty:kb.Callbacks("once memory").add(function(){kb._removeData(a,b+"queue"),kb._removeData(a,c)})})}}),kb.fn.extend({queue:function(a,c){var d=2;return"string"!=typeof a&&(c=a,a="fx",d--),arguments.length<d?kb.queue(this[0],a):c===b?this:this.each(function(){var b=kb.queue(this,a,c);kb._queueHooks(this,a),"fx"===a&&"inprogress"!==b[0]&&kb.dequeue(this,a)})},dequeue:function(a){return this.each(function(){kb.dequeue(this,a)})},delay:function(a,b){return a=kb.fx?kb.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){var d,e=1,f=kb.Deferred(),g=this,h=this.length,i=function(){--e||f.resolveWith(g,[g])};for("string"!=typeof a&&(c=a,a=b),a=a||"fx";h--;)d=kb._data(g[h],a+"queueHooks"),d&&d.empty&&(e++,d.empty.add(i));return i(),f.promise(c)}});var Cb,Db,Eb=/[\t\r\n\f]/g,Fb=/\r/g,Gb=/^(?:input|select|textarea|button|object)$/i,Hb=/^(?:a|area)$/i,Ib=/^(?:checked|selected)$/i,Jb=kb.support.getSetAttribute,Kb=kb.support.input;kb.fn.extend({attr:function(a,b){return kb.access(this,kb.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){kb.removeAttr(this,a)})},prop:function(a,b){return kb.access(this,kb.prop,a,b,arguments.length>1)},removeProp:function(a){return a=kb.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g=0,h=this.length,i="string"==typeof a&&a;if(kb.isFunction(a))return this.each(function(b){kb(this).addClass(a.call(this,b,this.className))});if(i)for(b=(a||"").match(mb)||[];h>g;g++)if(c=this[g],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(Eb," "):" ")){for(f=0;e=b[f++];)d.indexOf(" "+e+" ")<0&&(d+=e+" ");c.className=kb.trim(d)}return this},removeClass:function(a){var b,c,d,e,f,g=0,h=this.length,i=0===arguments.length||"string"==typeof a&&a;if(kb.isFunction(a))return this.each(function(b){kb(this).removeClass(a.call(this,b,this.className))});if(i)for(b=(a||"").match(mb)||[];h>g;g++)if(c=this[g],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(Eb," "):"")){for(f=0;e=b[f++];)for(;d.indexOf(" "+e+" ")>=0;)d=d.replace(" "+e+" "," ");c.className=a?kb.trim(d):""}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(kb.isFunction(a)?function(c){kb(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c)for(var b,d=0,e=kb(this),f=a.match(mb)||[];b=f[d++];)e.hasClass(b)?e.removeClass(b):e.addClass(b);else(c===W||"boolean"===c)&&(this.className&&kb._data(this,"__className__",this.className),this.className=this.className||a===!1?"":kb._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(Eb," ").indexOf(b)>=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];{if(arguments.length)return e=kb.isFunction(a),this.each(function(c){var f;1===this.nodeType&&(f=e?a.call(this,c,kb(this).val()):a,null==f?f="":"number"==typeof f?f+="":kb.isArray(f)&&(f=kb.map(f,function(a){return null==a?"":a+""})),d=kb.valHooks[this.type]||kb.valHooks[this.nodeName.toLowerCase()],d&&"set"in d&&d.set(this,f,"value")!==b||(this.value=f))});if(f)return d=kb.valHooks[f.type]||kb.valHooks[f.nodeName.toLowerCase()],d&&"get"in d&&(c=d.get(f,"value"))!==b?c:(c=f.value,"string"==typeof c?c.replace(Fb,""):null==c?"":c)}}}),kb.extend({valHooks:{option:{get:function(a){var b=kb.find.attr(a,"value");return null!=b?b:a.text}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(kb.support.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&kb.nodeName(c.parentNode,"optgroup"))){if(b=kb(c).val(),f)return b;g.push(b)}return g},set:function(a,b){for(var c,d,e=a.options,f=kb.makeArray(b),g=e.length;g--;)d=e[g],(d.selected=kb.inArray(kb(d).val(),f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}},attr:function(a,c,d){var e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return typeof a.getAttribute===W?kb.prop(a,c,d):(1===g&&kb.isXMLDoc(a)||(c=c.toLowerCase(),e=kb.attrHooks[c]||(kb.expr.match.bool.test(c)?Db:Cb)),d===b?e&&"get"in e&&null!==(f=e.get(a,c))?f:(f=kb.find.attr(a,c),null==f?b:f):null!==d?e&&"set"in e&&(f=e.set(a,d,c))!==b?f:(a.setAttribute(c,d+""),d):void kb.removeAttr(a,c))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(mb);if(f&&1===a.nodeType)for(;c=f[e++];)d=kb.propFix[c]||c,kb.expr.match.bool.test(c)?Kb&&Jb||!Ib.test(c)?a[d]=!1:a[kb.camelCase("default-"+c)]=a[d]=!1:kb.attr(a,c,""),a.removeAttribute(Jb?c:d)},attrHooks:{type:{set:function(a,b){if(!kb.support.radioValue&&"radio"===b&&kb.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return g=1!==h||!kb.isXMLDoc(a),g&&(c=kb.propFix[c]||c,f=kb.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&null!==(e=f.get(a,c))?e:a[c]},propHooks:{tabIndex:{get:function(a){var b=kb.find.attr(a,"tabindex");return b?parseInt(b,10):Gb.test(a.nodeName)||Hb.test(a.nodeName)&&a.href?0:-1}}}}),Db={set:function(a,b,c){return b===!1?kb.removeAttr(a,c):Kb&&Jb||!Ib.test(c)?a.setAttribute(!Jb&&kb.propFix[c]||c,c):a[kb.camelCase("default-"+c)]=a[c]=!0,c}},kb.each(kb.expr.match.bool.source.match(/\w+/g),function(a,c){var d=kb.expr.attrHandle[c]||kb.find.attr;kb.expr.attrHandle[c]=Kb&&Jb||!Ib.test(c)?function(a,c,e){var f=kb.expr.attrHandle[c],g=e?b:(kb.expr.attrHandle[c]=b)!=d(a,c,e)?c.toLowerCase():null;return kb.expr.attrHandle[c]=f,g}:function(a,c,d){return d?b:a[kb.camelCase("default-"+c)]?c.toLowerCase():null}}),Kb&&Jb||(kb.attrHooks.value={set:function(a,b,c){return kb.nodeName(a,"input")?void(a.defaultValue=b):Cb&&Cb.set(a,b,c)}}),Jb||(Cb={set:function(a,c,d){var e=a.getAttributeNode(d);return e||a.setAttributeNode(e=a.ownerDocument.createAttribute(d)),e.value=c+="","value"===d||c===a.getAttribute(d)?c:b}},kb.expr.attrHandle.id=kb.expr.attrHandle.name=kb.expr.attrHandle.coords=function(a,c,d){var e;return d?b:(e=a.getAttributeNode(c))&&""!==e.value?e.value:null},kb.valHooks.button={get:function(a,c){var d=a.getAttributeNode(c);return d&&d.specified?d.value:b},set:Cb.set},kb.attrHooks.contenteditable={set:function(a,b,c){Cb.set(a,""===b?!1:b,c)}},kb.each(["width","height"],function(a,b){kb.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),kb.support.hrefNormalized||kb.each(["href","src"],function(a,b){kb.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),kb.support.style||(kb.attrHooks.style={get:function(a){return a.style.cssText||b},set:function(a,b){return a.style.cssText=b+""}}),kb.support.optSelected||(kb.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),kb.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){kb.propFix[this.toLowerCase()]=this}),kb.support.enctype||(kb.propFix.enctype="encoding"),kb.each(["radio","checkbox"],function(){kb.valHooks[this]={set:function(a,b){return kb.isArray(b)?a.checked=kb.inArray(kb(a).val(),b)>=0:void 0}},kb.support.checkOn||(kb.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var Lb=/^(?:input|select|textarea)$/i,Mb=/^key/,Nb=/^(?:mouse|contextmenu)|click/,Ob=/^(?:focusinfocus|focusoutblur)$/,Pb=/^([^.]*)(?:\.(.+)|)$/;kb.event={global:{},add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q,r=kb._data(a);if(r){for(d.handler&&(j=d,d=j.handler,f=j.selector),d.guid||(d.guid=kb.guid++),(h=r.events)||(h=r.events={}),(l=r.handle)||(l=r.handle=function(a){return typeof kb===W||a&&kb.event.triggered===a.type?b:kb.event.dispatch.apply(l.elem,arguments)},l.elem=a),c=(c||"").match(mb)||[""],i=c.length;i--;)g=Pb.exec(c[i])||[],o=q=g[1],p=(g[2]||"").split(".").sort(),o&&(k=kb.event.special[o]||{},o=(f?k.delegateType:k.bindType)||o,k=kb.event.special[o]||{},m=kb.extend({type:o,origType:q,data:e,handler:d,guid:d.guid,selector:f,needsContext:f&&kb.expr.match.needsContext.test(f),namespace:p.join(".")},j),(n=h[o])||(n=h[o]=[],n.delegateCount=0,k.setup&&k.setup.call(a,e,p,l)!==!1||(a.addEventListener?a.addEventListener(o,l,!1):a.attachEvent&&a.attachEvent("on"+o,l))),k.add&&(k.add.call(a,m),m.handler.guid||(m.handler.guid=d.guid)),f?n.splice(n.delegateCount++,0,m):n.push(m),kb.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=kb.hasData(a)&&kb._data(a);if(q&&(k=q.events)){for(b=(b||"").match(mb)||[""],j=b.length;j--;)if(h=Pb.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=kb.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=k[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;f--;)g=m[f],!e&&p!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||kb.removeEvent(a,n,q.handle),delete k[n])}else for(n in k)kb.event.remove(a,n+b[j],c,d,!0);kb.isEmptyObject(k)&&(delete q.handle,kb._removeData(a,"events"))}},trigger:function(c,d,e,f){var g,h,i,j,k,l,m,n=[e||Y],o=ib.call(c,"type")?c.type:c,p=ib.call(c,"namespace")?c.namespace.split("."):[];if(i=l=e=e||Y,3!==e.nodeType&&8!==e.nodeType&&!Ob.test(o+kb.event.triggered)&&(o.indexOf(".")>=0&&(p=o.split("."),o=p.shift(),p.sort()),h=o.indexOf(":")<0&&"on"+o,c=c[kb.expando]?c:new kb.Event(o,"object"==typeof c&&c),c.isTrigger=f?2:3,c.namespace=p.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,c.result=b,c.target||(c.target=e),d=null==d?[c]:kb.makeArray(d,[c]),k=kb.event.special[o]||{},f||!k.trigger||k.trigger.apply(e,d)!==!1)){if(!f&&!k.noBubble&&!kb.isWindow(e)){for(j=k.delegateType||o,Ob.test(j+o)||(i=i.parentNode);i;i=i.parentNode)n.push(i),l=i;l===(e.ownerDocument||Y)&&n.push(l.defaultView||l.parentWindow||a)}for(m=0;(i=n[m++])&&!c.isPropagationStopped();)c.type=m>1?j:k.bindType||o,g=(kb._data(i,"events")||{})[c.type]&&kb._data(i,"handle"),g&&g.apply(i,d),g=h&&i[h],g&&kb.acceptData(i)&&g.apply&&g.apply(i,d)===!1&&c.preventDefault();if(c.type=o,!f&&!c.isDefaultPrevented()&&(!k._default||k._default.apply(n.pop(),d)===!1)&&kb.acceptData(e)&&h&&e[o]&&!kb.isWindow(e)){l=e[h],l&&(e[h]=null),kb.event.triggered=o;try{e[o]()}catch(q){}kb.event.triggered=b,l&&(e[h]=l)}return c.result}},dispatch:function(a){a=kb.event.fix(a);var c,d,e,f,g,h=[],i=fb.call(arguments),j=(kb._data(this,"events")||{})[a.type]||[],k=kb.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){for(h=kb.event.handlers.call(this,a,j),c=0;(f=h[c++])&&!a.isPropagationStopped();)for(a.currentTarget=f.elem,g=0;(e=f.handlers[g++])&&!a.isImmediatePropagationStopped();)(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,d=((kb.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),d!==b&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()));return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,c){var d,e,f,g,h=[],i=c.delegateCount,j=a.target;if(i&&j.nodeType&&(!a.button||"click"!==a.type))for(;j!=this;j=j.parentNode||this)if(1===j.nodeType&&(j.disabled!==!0||"click"!==a.type)){for(f=[],g=0;i>g;g++)e=c[g],d=e.selector+" ",f[d]===b&&(f[d]=e.needsContext?kb(d,this).index(j)>=0:kb.find(d,this,null,[j]).length),f[d]&&f.push(e);f.length&&h.push({elem:j,handlers:f})}return i<c.length&&h.push({elem:this,handlers:c.slice(i)}),h},fix:function(a){if(a[kb.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];for(g||(this.fixHooks[e]=g=Nb.test(e)?this.mouseHooks:Mb.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new kb.Event(f),b=d.length;b--;)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||Y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,c){var d,e,f,g=c.button,h=c.fromElement;return null==a.pageX&&null!=c.clientX&&(e=a.target.ownerDocument||Y,f=e.documentElement,d=e.body,a.pageX=c.clientX+(f&&f.scrollLeft||d&&d.scrollLeft||0)-(f&&f.clientLeft||d&&d.clientLeft||0),a.pageY=c.clientY+(f&&f.scrollTop||d&&d.scrollTop||0)-(f&&f.clientTop||d&&d.clientTop||0)),!a.relatedTarget&&h&&(a.relatedTarget=h===a.target?c.toElement:h),a.which||g===b||(a.which=1&g?1:2&g?3:4&g?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==k()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===k()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return kb.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return kb.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){a.result!==b&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=kb.extend(new kb.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?kb.event.trigger(e,null,b):kb.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},kb.removeEvent=Y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===W&&(a[d]=null),a.detachEvent(d,c))},kb.Event=function(a,b){return this instanceof kb.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?i:j):this.type=a,b&&kb.extend(this,b),this.timeStamp=a&&a.timeStamp||kb.now(),void(this[kb.expando]=!0)):new kb.Event(a,b)},kb.Event.prototype={isDefaultPrevented:j,isPropagationStopped:j,isImmediatePropagationStopped:j,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=i,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=i,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=i,this.stopPropagation()}},kb.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){kb.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!kb.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),kb.support.submitBubbles||(kb.event.special.submit={setup:function(){return kb.nodeName(this,"form")?!1:void kb.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=kb.nodeName(c,"input")||kb.nodeName(c,"button")?c.form:b;d&&!kb._data(d,"submitBubbles")&&(kb.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),kb._data(d,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&kb.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return kb.nodeName(this,"form")?!1:void kb.event.remove(this,"._submit")}}),kb.support.changeBubbles||(kb.event.special.change={setup:function(){return Lb.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(kb.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),kb.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),kb.event.simulate("change",this,a,!0)})),!1):void kb.event.add(this,"beforeactivate._change",function(a){var b=a.target;Lb.test(b.nodeName)&&!kb._data(b,"changeBubbles")&&(kb.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||kb.event.simulate("change",this.parentNode,a,!0)}),kb._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return kb.event.remove(this,"._change"),!Lb.test(this.nodeName)}}),kb.support.focusinBubbles||kb.each({focus:"focusin",blur:"focusout"},function(a,b){var c=0,d=function(a){kb.event.simulate(b,a.target,kb.event.fix(a),!0)};kb.event.special[b]={setup:function(){0===c++&&Y.addEventListener(a,d,!0)},teardown:function(){0===--c&&Y.removeEventListener(a,d,!0)}}}),kb.fn.extend({on:function(a,c,d,e,f){var g,h;if("object"==typeof a){"string"!=typeof c&&(d=d||c,c=b);for(g in a)this.on(g,c,d,a[g],f);return this}if(null==d&&null==e?(e=c,d=c=b):null==e&&("string"==typeof c?(e=d,d=b):(e=d,d=c,c=b)),e===!1)e=j;else if(!e)return this;return 1===f&&(h=e,e=function(a){return kb().off(a),h.apply(this,arguments)},e.guid=h.guid||(h.guid=kb.guid++)),this.each(function(){kb.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){var e,f;if(a&&a.preventDefault&&a.handleObj)return e=a.handleObj,kb(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler),this;if("object"==typeof a){for(f in a)this.off(f,c,a[f]);return this}return(c===!1||"function"==typeof c)&&(d=c,c=b),d===!1&&(d=j),this.each(function(){kb.event.remove(this,a,d,c)})},trigger:function(a,b){return this.each(function(){kb.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?kb.event.trigger(a,b,c,!0):void 0}});var Qb=/^.[^:#\[\.,]*$/,Rb=/^(?:parents|prev(?:Until|All))/,Sb=kb.expr.match.needsContext,Tb={children:!0,contents:!0,next:!0,prev:!0};kb.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(kb(a).filter(function(){for(b=0;e>b;b++)if(kb.contains(d[b],this))return!0}));for(b=0;e>b;b++)kb.find(a,d[b],c);return c=this.pushStack(e>1?kb.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},has:function(a){var b,c=kb(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(kb.contains(this,c[b]))return!0})},not:function(a){return this.pushStack(m(this,a||[],!0))},filter:function(a){return this.pushStack(m(this,a||[],!1))},is:function(a){return!!m(this,"string"==typeof a&&Sb.test(a)?kb(a):a||[],!1).length},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=Sb.test(a)||"string"!=typeof a?kb(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&kb.find.matchesSelector(c,a))){c=f.push(c);break}return this.pushStack(f.length>1?kb.unique(f):f)},index:function(a){return a?"string"==typeof a?kb.inArray(this[0],kb(a)):kb.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){var c="string"==typeof a?kb(a,b):kb.makeArray(a&&a.nodeType?[a]:a),d=kb.merge(this.get(),c);return this.pushStack(kb.unique(d))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),kb.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null
-},parents:function(a){return kb.dir(a,"parentNode")},parentsUntil:function(a,b,c){return kb.dir(a,"parentNode",c)},next:function(a){return l(a,"nextSibling")},prev:function(a){return l(a,"previousSibling")},nextAll:function(a){return kb.dir(a,"nextSibling")},prevAll:function(a){return kb.dir(a,"previousSibling")},nextUntil:function(a,b,c){return kb.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return kb.dir(a,"previousSibling",c)},siblings:function(a){return kb.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return kb.sibling(a.firstChild)},contents:function(a){return kb.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:kb.merge([],a.childNodes)}},function(a,b){kb.fn[a]=function(c,d){var e=kb.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=kb.filter(d,e)),this.length>1&&(Tb[a]||(e=kb.unique(e)),Rb.test(a)&&(e=e.reverse())),this.pushStack(e)}}),kb.extend({filter:function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?kb.find.matchesSelector(d,a)?[d]:[]:kb.find.matches(a,kb.grep(b,function(a){return 1===a.nodeType}))},dir:function(a,c,d){for(var e=[],f=a[c];f&&9!==f.nodeType&&(d===b||1!==f.nodeType||!kb(f).is(d));)1===f.nodeType&&e.push(f),f=f[c];return e},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}});var Ub="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Vb=/ jQuery\d+="(?:null|\d+)"/g,Wb=new RegExp("<(?:"+Ub+")[\\s/>]","i"),Xb=/^\s+/,Yb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Zb=/<([\w:]+)/,$b=/<tbody/i,_b=/<|&#?\w+;/,ac=/<(?:script|style|link)/i,bc=/^(?:checkbox|radio)$/i,cc=/checked\s*(?:[^=]|=\s*.checked.)/i,dc=/^$|\/(?:java|ecma)script/i,ec=/^true\/(.*)/,fc=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,gc={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:kb.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},hc=n(Y),ic=hc.appendChild(Y.createElement("div"));gc.optgroup=gc.option,gc.tbody=gc.tfoot=gc.colgroup=gc.caption=gc.thead,gc.th=gc.td,kb.fn.extend({text:function(a){return kb.access(this,function(a){return a===b?kb.text(this):this.empty().append((this[0]&&this[0].ownerDocument||Y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=o(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=o(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?kb.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||kb.cleanData(u(c)),c.parentNode&&(b&&kb.contains(c.ownerDocument,c)&&r(u(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){for(1===a.nodeType&&kb.cleanData(u(a,!1));a.firstChild;)a.removeChild(a.firstChild);a.options&&kb.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return kb.clone(this,a,b)})},html:function(a){return kb.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return 1===c.nodeType?c.innerHTML.replace(Vb,""):b;if(!("string"!=typeof a||ac.test(a)||!kb.support.htmlSerialize&&Wb.test(a)||!kb.support.leadingWhitespace&&Xb.test(a)||gc[(Zb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(Yb,"<$1></$2>");try{for(;e>d;d++)c=this[d]||{},1===c.nodeType&&(kb.cleanData(u(c,!1)),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=kb.map(this,function(a){return[a.nextSibling,a.parentNode]}),b=0;return this.domManip(arguments,function(c){var d=a[b++],e=a[b++];e&&(d&&d.parentNode!==e&&(d=this.nextSibling),kb(this).remove(),e.insertBefore(c,d))},!0),b?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b,c){a=db.apply([],a);var d,e,f,g,h,i,j=0,k=this.length,l=this,m=k-1,n=a[0],o=kb.isFunction(n);if(o||!(1>=k||"string"!=typeof n||kb.support.checkClone)&&cc.test(n))return this.each(function(d){var e=l.eq(d);o&&(a[0]=n.call(this,d,e.html())),e.domManip(a,b,c)});if(k&&(i=kb.buildFragment(a,this[0].ownerDocument,!1,!c&&this),d=i.firstChild,1===i.childNodes.length&&(i=d),d)){for(g=kb.map(u(i,"script"),p),f=g.length;k>j;j++)e=i,j!==m&&(e=kb.clone(e,!0,!0),f&&kb.merge(g,u(e,"script"))),b.call(this[j],e,j);if(f)for(h=g[g.length-1].ownerDocument,kb.map(g,q),j=0;f>j;j++)e=g[j],dc.test(e.type||"")&&!kb._data(e,"globalEval")&&kb.contains(h,e)&&(e.src?kb._evalUrl(e.src):kb.globalEval((e.text||e.textContent||e.innerHTML||"").replace(fc,"")));i=d=null}return this}}),kb.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){kb.fn[a]=function(a){for(var c,d=0,e=[],f=kb(a),g=f.length-1;g>=d;d++)c=d===g?this:this.clone(!0),kb(f[d])[b](c),eb.apply(e,c.get());return this.pushStack(e)}}),kb.extend({clone:function(a,b,c){var d,e,f,g,h,i=kb.contains(a.ownerDocument,a);if(kb.support.html5Clone||kb.isXMLDoc(a)||!Wb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ic.innerHTML=a.outerHTML,ic.removeChild(f=ic.firstChild)),!(kb.support.noCloneEvent&&kb.support.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||kb.isXMLDoc(a)))for(d=u(f),h=u(a),g=0;null!=(e=h[g]);++g)d[g]&&t(e,d[g]);if(b)if(c)for(h=h||u(a),d=d||u(f),g=0;null!=(e=h[g]);g++)s(e,d[g]);else s(a,f);return d=u(f,"script"),d.length>0&&r(d,!i&&u(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,l=a.length,m=n(b),o=[],p=0;l>p;p++)if(f=a[p],f||0===f)if("object"===kb.type(f))kb.merge(o,f.nodeType?[f]:f);else if(_b.test(f)){for(h=h||m.appendChild(b.createElement("div")),i=(Zb.exec(f)||["",""])[1].toLowerCase(),k=gc[i]||gc._default,h.innerHTML=k[1]+f.replace(Yb,"<$1></$2>")+k[2],e=k[0];e--;)h=h.lastChild;if(!kb.support.leadingWhitespace&&Xb.test(f)&&o.push(b.createTextNode(Xb.exec(f)[0])),!kb.support.tbody)for(f="table"!==i||$b.test(f)?"<table>"!==k[1]||$b.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;e--;)kb.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j);for(kb.merge(o,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=m.lastChild}else o.push(b.createTextNode(f));for(h&&m.removeChild(h),kb.support.appendChecked||kb.grep(u(o,"input"),v),p=0;f=o[p++];)if((!d||-1===kb.inArray(f,d))&&(g=kb.contains(f.ownerDocument,f),h=u(m.appendChild(f),"script"),g&&r(h),c))for(e=0;f=h[e++];)dc.test(f.type||"")&&c.push(f);return h=null,m},cleanData:function(a,b){for(var c,d,e,f,g=0,h=kb.expando,i=kb.cache,j=kb.support.deleteExpando,k=kb.event.special;null!=(c=a[g]);g++)if((b||kb.acceptData(c))&&(e=c[h],f=e&&i[e])){if(f.events)for(d in f.events)k[d]?kb.event.remove(c,d):kb.removeEvent(c,d,f.handle);i[e]&&(delete i[e],j?delete c[h]:typeof c.removeAttribute!==W?c.removeAttribute(h):c[h]=null,bb.push(e))}},_evalUrl:function(a){return kb.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),kb.fn.extend({wrapAll:function(a){if(kb.isFunction(a))return this.each(function(b){kb(this).wrapAll(a.call(this,b))});if(this[0]){var b=kb(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(kb.isFunction(a)?function(b){kb(this).wrapInner(a.call(this,b))}:function(){var b=kb(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=kb.isFunction(a);return this.each(function(c){kb(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){kb.nodeName(this,"body")||kb(this).replaceWith(this.childNodes)}).end()}});var jc,kc,lc,mc=/alpha\([^)]*\)/i,nc=/opacity\s*=\s*([^)]*)/,oc=/^(top|right|bottom|left)$/,pc=/^(none|table(?!-c[ea]).+)/,qc=/^margin/,rc=new RegExp("^("+lb+")(.*)$","i"),sc=new RegExp("^("+lb+")(?!px)[a-z%]+$","i"),tc=new RegExp("^([+-])=("+lb+")","i"),uc={BODY:"block"},vc={position:"absolute",visibility:"hidden",display:"block"},wc={letterSpacing:0,fontWeight:400},xc=["Top","Right","Bottom","Left"],yc=["Webkit","O","Moz","ms"];kb.fn.extend({css:function(a,c){return kb.access(this,function(a,c,d){var e,f,g={},h=0;if(kb.isArray(c)){for(f=kc(a),e=c.length;e>h;h++)g[c[h]]=kb.css(a,c[h],!1,f);return g}return d!==b?kb.style(a,c,d):kb.css(a,c)},a,c,arguments.length>1)},show:function(){return y(this,!0)},hide:function(){return y(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){x(this)?kb(this).show():kb(this).hide()})}}),kb.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=lc(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":kb.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var f,g,h,i=kb.camelCase(c),j=a.style;if(c=kb.cssProps[i]||(kb.cssProps[i]=w(j,i)),h=kb.cssHooks[c]||kb.cssHooks[i],d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];if(g=typeof d,"string"===g&&(f=tc.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(kb.css(a,c)),g="number"),!(null==d||"number"===g&&isNaN(d)||("number"!==g||kb.cssNumber[i]||(d+="px"),kb.support.clearCloneStyle||""!==d||0!==c.indexOf("background")||(j[c]="inherit"),h&&"set"in h&&(d=h.set(a,d,e))===b)))try{j[c]=d}catch(k){}}},css:function(a,c,d,e){var f,g,h,i=kb.camelCase(c);return c=kb.cssProps[i]||(kb.cssProps[i]=w(a.style,i)),h=kb.cssHooks[c]||kb.cssHooks[i],h&&"get"in h&&(g=h.get(a,!0,d)),g===b&&(g=lc(a,c,e)),"normal"===g&&c in wc&&(g=wc[c]),""===d||d?(f=parseFloat(g),d===!0||kb.isNumeric(f)?f||0:g):g}}),a.getComputedStyle?(kc=function(b){return a.getComputedStyle(b,null)},lc=function(a,c,d){var e,f,g,h=d||kc(a),i=h?h.getPropertyValue(c)||h[c]:b,j=a.style;return h&&(""!==i||kb.contains(a.ownerDocument,a)||(i=kb.style(a,c)),sc.test(i)&&qc.test(c)&&(e=j.width,f=j.minWidth,g=j.maxWidth,j.minWidth=j.maxWidth=j.width=i,i=h.width,j.width=e,j.minWidth=f,j.maxWidth=g)),i}):Y.documentElement.currentStyle&&(kc=function(a){return a.currentStyle},lc=function(a,c,d){var e,f,g,h=d||kc(a),i=h?h[c]:b,j=a.style;return null==i&&j&&j[c]&&(i=j[c]),sc.test(i)&&!oc.test(c)&&(e=j.left,f=a.runtimeStyle,g=f&&f.left,g&&(f.left=a.currentStyle.left),j.left="fontSize"===c?"1em":i,i=j.pixelLeft+"px",j.left=e,g&&(f.left=g)),""===i?"auto":i}),kb.each(["height","width"],function(a,b){kb.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&pc.test(kb.css(a,"display"))?kb.swap(a,vc,function(){return B(a,b,d)}):B(a,b,d):void 0},set:function(a,c,d){var e=d&&kc(a);return z(a,c,d?A(a,b,d,kb.support.boxSizing&&"border-box"===kb.css(a,"boxSizing",!1,e),e):0)}}}),kb.support.opacity||(kb.cssHooks.opacity={get:function(a,b){return nc.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=kb.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===kb.trim(f.replace(mc,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=mc.test(f)?f.replace(mc,e):f+" "+e)}}),kb(function(){kb.support.reliableMarginRight||(kb.cssHooks.marginRight={get:function(a,b){return b?kb.swap(a,{display:"inline-block"},lc,[a,"marginRight"]):void 0}}),!kb.support.pixelPosition&&kb.fn.position&&kb.each(["top","left"],function(a,b){kb.cssHooks[b]={get:function(a,c){return c?(c=lc(a,b),sc.test(c)?kb(a).position()[b]+"px":c):void 0}}})}),kb.expr&&kb.expr.filters&&(kb.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!kb.support.reliableHiddenOffsets&&"none"===(a.style&&a.style.display||kb.css(a,"display"))},kb.expr.filters.visible=function(a){return!kb.expr.filters.hidden(a)}),kb.each({margin:"",padding:"",border:"Width"},function(a,b){kb.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+xc[d]+b]=f[d]||f[d-2]||f[0];return e}},qc.test(a)||(kb.cssHooks[a+b].set=z)});var zc=/%20/g,Ac=/\[\]$/,Bc=/\r?\n/g,Cc=/^(?:submit|button|image|reset|file)$/i,Dc=/^(?:input|select|textarea|keygen)/i;kb.fn.extend({serialize:function(){return kb.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=kb.prop(this,"elements");return a?kb.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!kb(this).is(":disabled")&&Dc.test(this.nodeName)&&!Cc.test(a)&&(this.checked||!bc.test(a))}).map(function(a,b){var c=kb(this).val();return null==c?null:kb.isArray(c)?kb.map(c,function(a){return{name:b.name,value:a.replace(Bc,"\r\n")}}):{name:b.name,value:c.replace(Bc,"\r\n")}}).get()}}),kb.param=function(a,c){var d,e=[],f=function(a,b){b=kb.isFunction(b)?b():null==b?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(c===b&&(c=kb.ajaxSettings&&kb.ajaxSettings.traditional),kb.isArray(a)||a.jquery&&!kb.isPlainObject(a))kb.each(a,function(){f(this.name,this.value)});else for(d in a)E(d,a[d],c,f);return e.join("&").replace(zc,"+")},kb.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){kb.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),kb.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var Ec,Fc,Gc=kb.now(),Hc=/\?/,Ic=/#.*$/,Jc=/([?&])_=[^&]*/,Kc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Lc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mc=/^(?:GET|HEAD)$/,Nc=/^\/\//,Oc=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Pc=kb.fn.load,Qc={},Rc={},Sc="*/".concat("*");try{Fc=X.href}catch(Tc){Fc=Y.createElement("a"),Fc.href="",Fc=Fc.href}Ec=Oc.exec(Fc.toLowerCase())||[],kb.fn.load=function(a,c,d){if("string"!=typeof a&&Pc)return Pc.apply(this,arguments);var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),kb.isFunction(c)?(d=c,c=b):c&&"object"==typeof c&&(g="POST"),h.length>0&&kb.ajax({url:a,type:g,dataType:"html",data:c}).done(function(a){f=arguments,h.html(e?kb("<div>").append(kb.parseHTML(a)).find(e):a)}).complete(d&&function(a,b){h.each(d,f||[a.responseText,b,a])}),this},kb.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){kb.fn[b]=function(a){return this.on(b,a)}}),kb.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Fc,type:"GET",isLocal:Lc.test(Ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Sc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":kb.parseJSON,"text xml":kb.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?H(H(a,kb.ajaxSettings),b):H(kb.ajaxSettings,a)},ajaxPrefilter:F(Qc),ajaxTransport:F(Rc),ajax:function(a,c){function d(a,c,d,e){var f,l,s,t,v,x=c;2!==u&&(u=2,i&&clearTimeout(i),k=b,h=e||"",w.readyState=a>0?4:0,f=a>=200&&300>a||304===a,d&&(t=I(m,w,d)),t=J(m,t,w,f),f?(m.ifModified&&(v=w.getResponseHeader("Last-Modified"),v&&(kb.lastModified[g]=v),v=w.getResponseHeader("etag"),v&&(kb.etag[g]=v)),204===a||"HEAD"===m.type?x="nocontent":304===a?x="notmodified":(x=t.state,l=t.data,s=t.error,f=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),w.status=a,w.statusText=(c||x)+"",f?p.resolveWith(n,[l,x,w]):p.rejectWith(n,[w,x,s]),w.statusCode(r),r=b,j&&o.trigger(f?"ajaxSuccess":"ajaxError",[w,m,f?l:s]),q.fireWith(n,[w,x]),j&&(o.trigger("ajaxComplete",[w,m]),--kb.active||kb.event.trigger("ajaxStop")))}"object"==typeof a&&(c=a,a=b),c=c||{};var e,f,g,h,i,j,k,l,m=kb.ajaxSetup({},c),n=m.context||m,o=m.context&&(n.nodeType||n.jquery)?kb(n):kb.event,p=kb.Deferred(),q=kb.Callbacks("once memory"),r=m.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!l)for(l={};b=Kc.exec(h);)l[b[1].toLowerCase()]=b[2];b=l[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?h:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(m.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>u)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return k&&k.abort(b),d(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,m.url=((a||m.url||Fc)+"").replace(Ic,"").replace(Nc,Ec[1]+"//"),m.type=c.method||c.type||m.method||m.type,m.dataTypes=kb.trim(m.dataType||"*").toLowerCase().match(mb)||[""],null==m.crossDomain&&(e=Oc.exec(m.url.toLowerCase()),m.crossDomain=!(!e||e[1]===Ec[1]&&e[2]===Ec[2]&&(e[3]||("http:"===e[1]?"80":"443"))===(Ec[3]||("http:"===Ec[1]?"80":"443")))),m.data&&m.processData&&"string"!=typeof m.data&&(m.data=kb.param(m.data,m.traditional)),G(Qc,m,c,w),2===u)return w;j=m.global,j&&0===kb.active++&&kb.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!Mc.test(m.type),g=m.url,m.hasContent||(m.data&&(g=m.url+=(Hc.test(g)?"&":"?")+m.data,delete m.data),m.cache===!1&&(m.url=Jc.test(g)?g.replace(Jc,"$1_="+Gc++):g+(Hc.test(g)?"&":"?")+"_="+Gc++)),m.ifModified&&(kb.lastModified[g]&&w.setRequestHeader("If-Modified-Since",kb.lastModified[g]),kb.etag[g]&&w.setRequestHeader("If-None-Match",kb.etag[g])),(m.data&&m.hasContent&&m.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",m.contentType),w.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+Sc+"; q=0.01":""):m.accepts["*"]);for(f in m.headers)w.setRequestHeader(f,m.headers[f]);if(m.beforeSend&&(m.beforeSend.call(n,w,m)===!1||2===u))return w.abort();v="abort";for(f in{success:1,error:1,complete:1})w[f](m[f]);if(k=G(Rc,m,c,w)){w.readyState=1,j&&o.trigger("ajaxSend",[w,m]),m.async&&m.timeout>0&&(i=setTimeout(function(){w.abort("timeout")},m.timeout));try{u=1,k.send(s,d)}catch(x){if(!(2>u))throw x;d(-1,x)}}else d(-1,"No Transport");return w},getJSON:function(a,b,c){return kb.get(a,b,c,"json")},getScript:function(a,c){return kb.get(a,b,c,"script")}}),kb.each(["get","post"],function(a,c){kb[c]=function(a,d,e,f){return kb.isFunction(d)&&(f=f||e,e=d,d=b),kb.ajax({url:a,type:c,dataType:f,data:d,success:e})}}),kb.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return kb.globalEval(a),a}}}),kb.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),kb.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=Y.head||kb("head")[0]||Y.documentElement;return{send:function(b,e){c=Y.createElement("script"),c.async=!0,a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,b){(b||!c.readyState||/loaded|complete/.test(c.readyState))&&(c.onload=c.onreadystatechange=null,c.parentNode&&c.parentNode.removeChild(c),c=null,b||e(200,"success"))},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(b,!0)}}}});var Uc=[],Vc=/(=)\?(?=&|$)|\?\?/;kb.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Uc.pop()||kb.expando+"_"+Gc++;return this[a]=!0,a}}),kb.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.jsonp!==!1&&(Vc.test(c.url)?"url":"string"==typeof c.data&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vc.test(c.data)&&"data");return i||"jsonp"===c.dataTypes[0]?(f=c.jsonpCallback=kb.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,i?c[i]=c[i].replace(Vc,"$1"+f):c.jsonp!==!1&&(c.url+=(Hc.test(c.url)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||kb.error(f+" was not called"),h[0]},c.dataTypes[0]="json",g=a[f],a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,Uc.push(f)),h&&kb.isFunction(g)&&g(h[0]),h=g=b}),"script"):void 0});var Wc,Xc,Yc=0,Zc=a.ActiveXObject&&function(){var a;for(a in Wc)Wc[a](b,!0)};kb.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&K()||L()}:K,Xc=kb.ajaxSettings.xhr(),kb.support.cors=!!Xc&&"withCredentials"in Xc,Xc=kb.support.ajax=!!Xc,Xc&&kb.ajaxTransport(function(c){if(!c.crossDomain||kb.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();if(c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async),c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),c.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l;try{if(d&&(e||4===i.readyState))if(d=b,g&&(i.onreadystatechange=kb.noop,Zc&&delete Wc[g]),e)4!==i.readyState&&i.abort();else{l={},h=i.status,j=i.getAllResponseHeaders(),"string"==typeof i.responseText&&(l.text=i.responseText);try{k=i.statusText}catch(m){k=""}h||!c.isLocal||c.crossDomain?1223===h&&(h=204):h=l.text?200:404}}catch(n){e||f(-1,n)}l&&f(h,k,l,j)},c.async?4===i.readyState?setTimeout(d):(g=++Yc,Zc&&(Wc||(Wc={},kb(a).unload(Zc)),Wc[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(b,!0)}}}});var $c,_c,ad=/^(?:toggle|show|hide)$/,bd=new RegExp("^(?:([+-])=|)("+lb+")([a-z%]*)$","i"),cd=/queueHooks$/,dd=[Q],ed={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bd.exec(b),f=e&&e[3]||(kb.cssNumber[a]?"":"px"),g=(kb.cssNumber[a]||"px"!==f&&+d)&&bd.exec(kb.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,kb.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};kb.Animation=kb.extend(O,{tweener:function(a,b){kb.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ed[c]=ed[c]||[],ed[c].unshift(b)},prefilter:function(a,b){b?dd.unshift(a):dd.push(a)}}),kb.Tween=R,R.prototype={constructor:R,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(kb.cssNumber[c]?"":"px")},cur:function(){var a=R.propHooks[this.prop];return a&&a.get?a.get(this):R.propHooks._default.get(this)},run:function(a){var b,c=R.propHooks[this.prop];return this.pos=b=this.options.duration?kb.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):R.propHooks._default.set(this),this}},R.prototype.init.prototype=R.prototype,R.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=kb.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){kb.fx.step[a.prop]?kb.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[kb.cssProps[a.prop]]||kb.cssHooks[a.prop])?kb.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},R.propHooks.scrollTop=R.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},kb.each(["toggle","show","hide"],function(a,b){var c=kb.fn[b];kb.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(S(b,!0),a,d,e)}}),kb.fn.extend({fadeTo:function(a,b,c,d){return this.filter(x).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=kb.isEmptyObject(a),f=kb.speed(b,c,d),g=function(){var b=O(this,kb.extend({},a),f);(e||kb._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,c,d){var e=function(a){var b=a.stop;delete a.stop,b(d)};return"string"!=typeof a&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,c=null!=a&&a+"queueHooks",f=kb.timers,g=kb._data(this);if(c)g[c]&&g[c].stop&&e(g[c]);else for(c in g)g[c]&&g[c].stop&&cd.test(c)&&e(g[c]);for(c=f.length;c--;)f[c].elem!==this||null!=a&&f[c].queue!==a||(f[c].anim.stop(d),b=!1,f.splice(c,1));(b||!d)&&kb.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=kb._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=kb.timers,g=d?d.length:0;for(c.finish=!0,kb.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),kb.each({slideDown:S("show"),slideUp:S("hide"),slideToggle:S("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){kb.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),kb.speed=function(a,b,c){var d=a&&"object"==typeof a?kb.extend({},a):{complete:c||!c&&b||kb.isFunction(a)&&a,duration:a,easing:c&&b||b&&!kb.isFunction(b)&&b};return d.duration=kb.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in kb.fx.speeds?kb.fx.speeds[d.duration]:kb.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){kb.isFunction(d.old)&&d.old.call(this),d.queue&&kb.dequeue(this,d.queue)},d},kb.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},kb.timers=[],kb.fx=R.prototype.init,kb.fx.tick=function(){var a,c=kb.timers,d=0;for($c=kb.now();d<c.length;d++)a=c[d],a()||c[d]!==a||c.splice(d--,1);c.length||kb.fx.stop(),$c=b},kb.fx.timer=function(a){a()&&kb.timers.push(a)&&kb.fx.start()},kb.fx.interval=13,kb.fx.start=function(){_c||(_c=setInterval(kb.fx.tick,kb.fx.interval))},kb.fx.stop=function(){clearInterval(_c),_c=null},kb.fx.speeds={slow:600,fast:200,_default:400},kb.fx.step={},kb.expr&&kb.expr.filters&&(kb.expr.filters.animated=function(a){return kb.grep(kb.timers,function(b){return a===b.elem}).length}),kb.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){kb.offset.setOffset(this,a,b)});var c,d,e={top:0,left:0},f=this[0],g=f&&f.ownerDocument;if(g)return c=g.documentElement,kb.contains(c,f)?(typeof f.getBoundingClientRect!==W&&(e=f.getBoundingClientRect()),d=T(g),{top:e.top+(d.pageYOffset||c.scrollTop)-(c.clientTop||0),left:e.left+(d.pageXOffset||c.scrollLeft)-(c.clientLeft||0)}):e},kb.offset={setOffset:function(a,b,c){var d=kb.css(a,"position");"static"===d&&(a.style.position="relative");var e,f,g=kb(a),h=g.offset(),i=kb.css(a,"top"),j=kb.css(a,"left"),k=("absolute"===d||"fixed"===d)&&kb.inArray("auto",[i,j])>-1,l={},m={};k?(m=g.position(),e=m.top,f=m.left):(e=parseFloat(i)||0,f=parseFloat(j)||0),kb.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(l.top=b.top-h.top+e),null!=b.left&&(l.left=b.left-h.left+f),"using"in b?b.using.call(a,l):g.css(l)}},kb.fn.extend({position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===kb.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),kb.nodeName(a[0],"html")||(c=a.offset()),c.top+=kb.css(a[0],"borderTopWidth",!0),c.left+=kb.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-kb.css(d,"marginTop",!0),left:b.left-c.left-kb.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||Z;a&&!kb.nodeName(a,"html")&&"static"===kb.css(a,"position");)a=a.offsetParent;return a||Z})}}),kb.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);kb.fn[a]=function(e){return kb.access(this,function(a,e,f){var g=T(a);return f===b?g?c in g?g[c]:g.document.documentElement[e]:a[e]:void(g?g.scrollTo(d?kb(g).scrollLeft():f,d?f:kb(g).scrollTop()):a[e]=f)},a,e,arguments.length,null)}}),kb.each({Height:"height",Width:"width"},function(a,c){kb.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){kb.fn[e]=function(e,f){var g=arguments.length&&(d||"boolean"!=typeof e),h=d||(e===!0||f===!0?"margin":"border");return kb.access(this,function(c,d,e){var f;return kb.isWindow(c)?c.document.documentElement["client"+a]:9===c.nodeType?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?kb.css(c,d,h):kb.style(c,d,e,h)},c,g?e:b,g,null)}})}),kb.fn.size=function(){return this.length},kb.fn.andSelf=kb.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=kb:(a.jQuery=a.$=kb,"function"==typeof define&&define.amd&&define("jquery",[],function(){return kb}))}(window),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top()),"function"==typeof h&&(h=f.bottom());var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;this.affixed!==i&&(this.unpin&&this.$element.css("top",""),this.affixed=i,this.unpin="bottom"==i?e.top-d:null,this.$element.removeClass(b.RESET).addClass("affix"+(i?"-"+i:"")),"bottom"==i&&this.$element.offset({top:document.body.offsetHeight-h-this.$element.height()}))}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";
-this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#\w/.test(e)&&a(e);return f&&f.length&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parents(".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),function(a){function b(a){return"object"==typeof a?a:{top:a,left:a}}var c=a.scrollTo=function(b,c,d){a(window).scrollTo(b,c,d)};c.defaults={axis:"xy",duration:parseFloat(a.fn.jquery)>=1.3?0:1,limit:!0},c.window=function(){return a(window)._scrollable()},a.fn._scrollable=function(){return this.map(function(){var b=this,c=!b.nodeName||-1!=a.inArray(b.nodeName.toLowerCase(),["iframe","#document","html","body"]);if(!c)return b;var d=(b.contentWindow||b).document||b.ownerDocument||b;return/webkit/i.test(navigator.userAgent)||"BackCompat"==d.compatMode?d.body:d.documentElement})},a.fn.scrollTo=function(d,e,f){return"object"==typeof e&&(f=e,e=0),"function"==typeof f&&(f={onAfter:f}),"max"==d&&(d=9e9),f=a.extend({},c.defaults,f),e=e||f.duration,f.queue=f.queue&&f.axis.length>1,f.queue&&(e/=2),f.offset=b(f.offset),f.over=b(f.over),this._scrollable().each(function(){function g(a){j.animate(l,e,f.easing,a&&function(){a.call(this,k,f)})}if(null!=d){var h,i=this,j=a(i),k=d,l={},m=j.is("html,body");switch(typeof k){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(k)){k=b(k);break}if(k=a(k,this),!k.length)return;case"object":(k.is||k.style)&&(h=(k=a(k)).offset())}a.each(f.axis.split(""),function(a,b){var d="x"==b?"Left":"Top",e=d.toLowerCase(),n="scroll"+d,o=i[n],p=c.max(i,b);if(h)l[n]=h[e]+(m?0:o-j.offset()[e]),f.margin&&(l[n]-=parseInt(k.css("margin"+d))||0,l[n]-=parseInt(k.css("border"+d+"Width"))||0),l[n]+=f.offset[e]||0,f.over[e]&&(l[n]+=k["x"==b?"width":"height"]()*f.over[e]);else{var q=k[e];l[n]=q.slice&&"%"==q.slice(-1)?parseFloat(q)/100*p:q}f.limit&&/^\d+$/.test(l[n])&&(l[n]=l[n]<=0?0:Math.min(l[n],p)),!a&&f.queue&&(o!=l[n]&&g(f.onAfterFirst),delete l[n])}),g(f.onAfter)}}).end()},c.max=function(b,c){var d="x"==c?"Width":"Height",e="scroll"+d;if(!a(b).is("html,body"))return b[e]-a(b)[d.toLowerCase()]();var f="client"+d,g=b.ownerDocument.documentElement,h=b.ownerDocument.body;return Math.max(g[e],h[e])-Math.min(g[f],h[f])}}(jQuery),function(a){function b(b,c,d){var e=c.hash.slice(1),f=document.getElementById(e)||document.getElementsByName(e)[0];if(f){b&&b.preventDefault();var g=a(d.target);if(!(d.lock&&g.is(":animated")||d.onBefore&&d.onBefore(b,f,g)===!1)){if(d.stop&&g._scrollable().stop(!0),d.hash){var h=d.offset;h=h&&h.top||h||0;var i=f.id==e?"id":"name",j=a("<a> </a>").attr(i,e).css({position:"absolute",top:a(window).scrollTop()+h,left:a(window).scrollLeft()});f[i]="",a("body").prepend(j),location=c.hash,j.remove(),f[i]=e}g.scrollTo(f,d).trigger("notify.serialScroll",[f])}}}var c=location.href.replace(/#.*/,""),d=a.localScroll=function(b){a("body").localScroll(b)};d.defaults={duration:1e3,axis:"y",event:"click",stop:!0,target:window,reset:!0},d.hash=function(c){if(location.hash){if(c=a.extend({},d.defaults,c),c.hash=!1,c.reset){var e=c.duration;delete c.duration,a(c.target).scrollTo(0,c),c.duration=e}b(0,location,c)}},a.fn.localScroll=function(e){function f(){return!(!this.href||!this.hash||this.href.replace(this.hash,"")!=c||e.filter&&!a(this).is(e.filter))}return e=a.extend({},d.defaults,e),e.lazy?this.bind(e.event,function(c){var d=a([c.target,c.target.parentNode]).filter(f)[0];d&&b(c,d,e)}):this.find("a,area").filter(f).bind(e.event,function(a){b(a,this,e)}).end().end()}}(jQuery),function(){if(navigator.appVersion.indexOf("MSIE 8")>0){var a=Array.prototype.slice;Array.prototype.slice=function(){if(this instanceof Array)return a.apply(this,arguments);for(var b=[],c=arguments.length>=1?arguments[0]:0,d=arguments.length>=2?arguments[1]:this.length,e=c;d>e;e++)b.push(this[e]);return b},"function"!=typeof Array.prototype.forEach&&(Array.prototype.forEach=function(a){for(var b=0;b<this.length;b++)a.apply(this,[this[b],b,this])})}}();var self="undefined"!=typeof window?window:{},Prism=function(){var a=/\blang(?:uage)?-(?!\*)(\w+)\b/i,b=self.Prism={util:{type:function(a){return Object.prototype.toString.call(a).match(/\[object (\w+)\]/)[1]},clone:function(a){var c=b.util.type(a);switch(c){case"Object":var d={};for(var e in a)a.hasOwnProperty(e)&&(d[e]=b.util.clone(a[e]));return d;case"Array":return a.slice()}return a}},languages:{extend:function(a,c){var d=b.util.clone(b.languages[a]);for(var e in c)d[e]=c[e];return d},insertBefore:function(a,c,d,e){e=e||b.languages;var f=e[a],g={};for(var h in f)if(f.hasOwnProperty(h)){if(h==c)for(var i in d)d.hasOwnProperty(i)&&(g[i]=d[i]);g[h]=f[h]}return e[a]=g},DFS:function(a,c){for(var d in a)c.call(a,d,a[d]),"Object"===b.util.type(a)&&b.languages.DFS(a[d],c)}},highlightAll:function(a,c){for(var d,e=document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'),f=0;d=e[f++];)b.highlightElement(d,a===!0,c)},highlightElement:function(d,e,f){for(var g,h,i=d;i&&!a.test(i.className);)i=i.parentNode;if(i&&(g=(i.className.match(a)||[,""])[1],h=b.languages[g]),h){d.className=d.className.replace(a,"").replace(/\s+/g," ")+" language-"+g,i=d.parentNode,/pre/i.test(i.nodeName)&&(i.className=i.className.replace(a,"").replace(/\s+/g," ")+" language-"+g);var j=d.textContent;if(j){j=j.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ");var k={element:d,language:g,grammar:h,code:j};if(b.hooks.run("before-highlight",k),e&&self.Worker){var l=new Worker(b.filename);l.onmessage=function(a){k.highlightedCode=c.stringify(JSON.parse(a.data),g),b.hooks.run("before-insert",k),k.element.innerHTML=k.highlightedCode,f&&f.call(k.element),b.hooks.run("after-highlight",k)},l.postMessage(JSON.stringify({language:k.language,code:k.code}))}else k.highlightedCode=b.highlight(k.code,k.grammar,k.language),b.hooks.run("before-insert",k),k.element.innerHTML=k.highlightedCode,f&&f.call(d),b.hooks.run("after-highlight",k)}}},highlight:function(a,d,e){return c.stringify(b.tokenize(a,d),e)},tokenize:function(a,c){var d=b.Token,e=[a],f=c.rest;if(f){for(var g in f)c[g]=f[g];delete c.rest}a:for(var g in c)if(c.hasOwnProperty(g)&&c[g]){var h=c[g],i=h.inside,j=!!h.lookbehind,k=0;h=h.pattern||h;for(var l=0;l<e.length;l++){var m=e[l];if(e.length>a.length)break a;if(!(m instanceof d)){h.lastIndex=0;var n=h.exec(m);if(n){j&&(k=n[1].length);var o=n.index-1+k,n=n[0].slice(k),p=n.length,q=o+p,r=m.slice(0,o+1),s=m.slice(q+1),t=[l,1];r&&t.push(r);var u=new d(g,i?b.tokenize(n,i):n);t.push(u),s&&t.push(s),Array.prototype.splice.apply(e,t)}}}}return e},hooks:{all:{},add:function(a,c){var d=b.hooks.all;d[a]=d[a]||[],d[a].push(c)},run:function(a,c){var d=b.hooks.all[a];if(d&&d.length)for(var e,f=0;e=d[f++];)e(c)}}},c=b.Token=function(a,b){this.type=a,this.content=b};if(c.stringify=function(a,d,e){if("string"==typeof a)return a;if("[object Array]"==Object.prototype.toString.call(a))return a.map(function(b){return c.stringify(b,d,a)}).join("");var f={type:a.type,content:c.stringify(a.content,d,e),tag:"span",classes:["token",a.type],attributes:{},language:d,parent:e};"comment"==f.type&&(f.attributes.spellcheck="true"),b.hooks.run("wrap",f);var g="";for(var h in f.attributes)g+=h+'="'+(f.attributes[h]||"")+'"';return"<"+f.tag+' class="'+f.classes.join(" ")+'" '+g+">"+f.content+"</"+f.tag+">"},!self.document)return self.addEventListener?(self.addEventListener("message",function(a){var c=JSON.parse(a.data),d=c.language,e=c.code;self.postMessage(JSON.stringify(b.tokenize(e,b.languages[d]))),self.close()},!1),self.Prism):self.Prism;var d=document.getElementsByTagName("script");return d=d[d.length-1],d&&(b.filename=d.src,document.addEventListener&&!d.hasAttribute("data-manual")&&document.addEventListener("DOMContentLoaded",b.highlightAll)),self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),Prism.languages.markup={comment:/&lt;!--[\w\W]*?-->/g,prolog:/&lt;\?.+?\?>/,doctype:/&lt;!DOCTYPE.+?>/,cdata:/&lt;!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/&lt;\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|[^\s'">=]+))?\s*)*\/?>/gi,inside:{tag:{pattern:/^&lt;\/?[\w:-]+/i,inside:{punctuation:/^&lt;\/?/,namespace:/^[\w-]+?:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/gi,inside:{punctuation:/=|>|"/g}},punctuation:/\/?>/g,"attr-name":{pattern:/[\w:-]+/g,inside:{namespace:/^[\w-]+?:/}}}},entity:/&amp;#?[\da-z]{1,8};/gi},Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&amp;/,"&"))}),Prism.languages.css={comment:/\/\*[\w\W]*?\*\//g,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*{))/gi,inside:{punctuation:/[;:]/g}},url:/url\((["']?).*?\1\)/gi,selector:/[^\{\}\s][^\{\};]*(?=\s*\{)/g,property:/(\b|\B)[\w-]+(?=\s*:)/gi,string:/("|')(\\?.)*?\1/g,important:/\B!important\b/gi,ignore:/&(lt|gt|amp);/gi,punctuation:/[\{\};:]/g},Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{style:{pattern:/(&lt;|<)style[\w\W]*?(>|&gt;)[\w\W]*?(&lt;|<)\/style(>|&gt;)/gi,inside:{tag:{pattern:/(&lt;|<)style[\w\W]*?(>|&gt;)|(&lt;|<)\/style(>|&gt;)/gi,inside:Prism.languages.markup.tag.inside},rest:Prism.languages.css}}}),Prism.languages.clike={comment:{pattern:/(^|[^\\])(\/\*[\w\W]*?\*\/|(^|[^:])\/\/.*?(\r?\n|$))/g,lookbehind:!0},string:/("|')(\\?.)*?\1/g,"class-name":{pattern:/((?:(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/gi,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/g,"boolean":/\b(true|false)\b/g,"function":{pattern:/[a-z0-9_]+\(/gi,inside:{punctuation:/\(/}},number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?)\b/g,operator:/[-+]{1,2}|!|&lt;=?|>=?|={1,3}|(&amp;){1,2}|\|?\||\?|\*|\/|\~|\^|\%/g,ignore:/&(lt|gt|amp);/gi,punctuation:/[{}[\];(),.:]/g},Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(var|let|if|else|while|do|for|return|in|instanceof|function|get|set|new|with|typeof|try|throw|catch|finally|null|break|continue|this)\b/g,number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?|NaN|-?Infinity)\b/g}),Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/g,lookbehind:!0}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/(&lt;|<)script[\w\W]*?(>|&gt;)[\w\W]*?(&lt;|<)\/script(>|&gt;)/gi,inside:{tag:{pattern:/(&lt;|<)script[\w\W]*?(>|&gt;)|(&lt;|<)\/script(>|&gt;)/gi,inside:Prism.languages.markup.tag.inside},rest:Prism.languages.javascript}}}),function(){if(self.Prism&&self.document&&document.querySelector){var a={js:"javascript",html:"markup",svg:"markup"};Array.prototype.slice.call(document.querySelectorAll("pre[data-src]")).forEach(function(b){var c=b.getAttribute("data-src"),d=(c.match(/\.(\w+)$/)||[,""])[1],e=a[d]||d,f=document.createElement("code");f.className="language-"+e,b.textContent="",f.textContent="Loading…",b.appendChild(f);var g=new XMLHttpRequest;g.open("GET",c,!0),g.onreadystatechange=function(){4==g.readyState&&(g.status<400&&g.responseText?(f.textContent=g.responseText,Prism.highlightElement(f)):f.textContent=g.status>=400?"✖ Error "+g.status+" while fetching file: "+g.statusText:"✖ Error: File does not exist or is empty")},g.send(null)})}}(),Prism.hooks.add("after-highlight",function(a){var b=a.element.parentNode;if(b&&/pre/i.test(b.nodeName)&&-1!==b.className.indexOf("line-numbers")){var c,d=1+a.code.split("\n").length;lines=new Array(d),lines=lines.join("<span></span>"),c=document.createElement("span"),c.className="line-numbers-rows",c.innerHTML=lines,b.hasAttribute("data-start")&&(b.style.counterReset="linenumber "+(parseInt(b.getAttribute("data-start"),10)-1)),a.element.appendChild(c)}}),function(a){function b(){function b(c,d,e){var f,g=a("<li>"),h=a("<a>");if(h.attr({href:"#"+c}),h.text(d.attr("title")?d.attr("title"):d.text()),e&&e.length){f=a("<ul>",{"class":"nav"});for(var i=0;i<e.length;i++){var j=a(e[i]);f.append(b(j.attr("id"),j))}}return g.append(h),h.after(f),f&&f.find("ul").each(function(){a(this).height(a(this).outerHeight()).hide()}),g}var c=a("#sidebar-nav");a("section").each(function(){var d=a(this);c.append(b(d.attr("id"),d.find("h2:first"),d.find(".section-row h3[id], .section-row h4[id]")))}),a("#sidebar-nav > li").on("activate",function(){a(this).find(".nav").show()}).on("deactivate",function(){a(this).find(".nav").hide()})}function c(){a.localScroll({offset:-110,duration:200,filter:":not([data-tabs] a)"})}a(function(){b(),c(),a("body").scrollspy({target:".sidebar",offset:100}).css("opacity",1)})}(jQuery,window,document,void 0); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/ebz/angular_js/ui-charts-tpls.js b/ecomp-portal-BE/war/static/ebz/angular_js/ui-charts-tpls.js
deleted file mode 100644
index 41d1bf6c..00000000
--- a/ecomp-portal-BE/war/static/ebz/angular_js/ui-charts-tpls.js
+++ /dev/null
@@ -1,3909 +0,0 @@
-/*Sandbox version 0.0.41a*/
-angular.module("att.charts", ["att.charts.tpls", "att.charts.utilities","att.charts.areachartD3","att.charts.barchartD3","att.charts.coschartD3","att.charts.coschartwithbarD3","att.charts.cosdeletionD3","att.charts.cosmultichartD3","att.charts.donutD3","att.charts.donutFusion","att.charts.horseshoeD3","att.charts.radialguageD3","att.charts.stackedBarchart","att.charts.stackedareachart"]);
-angular.module("att.charts.tpls", ["template/areachartD3/attAreaChartD3.html","template/barchartD3/attBarChartD3.html","template/coschartD3/attCosd3Chart.html","template/coschartwithbarD3/attCosBarD3Chart.html","template/cosmultichartD3/attCosmultid3Chart.html","template/donutD3/attDonutd3Chart.html","template/donutFusion/attDonutfusionChart.html","template/horseshoeD3/attHorseshoeD3Chart.html","template/stackedBarchart/stackedBarchart.html","template/stackedareachart/stackedAreaChart.html"]);
-angular.module('att.charts.utilities', [])
- .factory('$extendObj', [function () {
- var _extendDeep = function (dst) {
- angular.forEach(arguments, function (obj) {
- if (obj !== dst) {
- angular.forEach(obj, function (value, key) {
- if (dst[key] && dst[key].constructor && dst[key].constructor === Object) {
- _extendDeep(dst[key], value);
- } else {
- dst[key] = value;
- }
- });
- }
- });
- return dst;
- };
- return {
- extendDeep: _extendDeep
-
- };
- }]);
-
-angular.module('att.charts.areachartD3', ['att.charts.utilities'])
- .constant("areaChartConfig",
- {
- "chartcolor": {
- "areaChartColor": ["#bff1ec", "#bbf0eb", "#00c7b2"],
- "lineChartColor": ["#444444", "#444444"],
- "overageColor": ["#b8509e"]
- },
- "gridLineColor": "#808080",
- "lineCurveType": 'cardinal',
- "yAxisMaxTicks": 4,
- "chartHeight": "200",
- "dataType": "GB",
- "lineStroke": 3,
- "opacityOnHover": "0.5",
- "circleRadius": 3.5,
- "yearLabelPos": [5, -5],
- "tooltipTopMargin": 105,
- "tooltipLeftMargin": 28,
- "amountKDivision": 1000,
- "amountKText": "K",
- "amountMDivision": 1000000,
- "amountMText": "M"
- })
- .directive('attAreaChart', ['areaChartConfig', '$extendObj', '$timeout', function (areaChartConfig, $extendObj, $timeout) {
- return {
- restrict: 'A',
- scope: {
- chartData: '=',
- chartColor: "=",
- legendLabel: "=",
- refreshChart: "=",
- chartConfig: "="
- },
- templateUrl: "template/areachartD3/attAreaChartD3.html",
- replace: true,
- controller: ['$scope', '$attrs', function ($scope, $attrs) {
- if (angular.isDefined($scope.chartConfig)) {
- areaChartConfig = $extendObj.extendDeep(areaChartConfig, $scope.chartConfig);
- }
- $scope.dataType = areaChartConfig.dataType;
- $scope.chartID = $attrs.id;
- }],
- link: function (scope, element, attrs, ctrl) {
- scope.tooltipFlag = false;
- scope.overageFlag = false;
- scope.underageFlag = false;
- var startColor, stopColor, lineColor, xAxisticks, dataObj, margin = {top: 30, right: 15, bottom: 30, left: 40},
- width = parseInt(attrs.chartWidth, 10),
- height = areaChartConfig.chartHeight,
- parseDate = d3.time.format("%d-%b-%Y").parse,
- tooltipFormat = d3.time.format("%B-%Y"),
- labelFormat = d3.time.format("%Y");
- var legendColors = [];
- legendColors = (scope.chartColor) ? scope.chartColor : areaChartConfig.chartcolor;
- startColor = legendColors.areaChartColor[0];
- stopColor = legendColors.areaChartColor[1];
- lineColor = legendColors.lineChartColor[0];
- scope.areaLegendColor = legendColors.areaChartColor[2];
- scope.lineLegendColor = legendColors.lineChartColor[1];
- scope.overageLegend = legendColors.overageColor[0];
- var oldIE = navigator.userAgent.toLowerCase().indexOf('msie 8.0') !== -1;
- scope.addLegendColor = function (id) {
- var bgColor = null;
- switch (id) {
- case 0:
- bgColor = {"background-color": scope.areaLegendColor, "border-radius": "100%"};
- break;
- case 1:
- bgColor = {"background-color": scope.lineLegendColor};
- break;
- case 2:
- bgColor = {"background-color": scope.overageLegend, "border-radius": "100%"};
- break;
- }
- return bgColor;
- };
-
- attrs.$observe('legendRequired', function (val) {
- if (val === 'true') {
- scope.showLegend = true;
- }
- else {
- scope.showLegend = false;
- }
- });
-
- scope.$watch('refreshChart', function (value) {
- if (value === false) {
- return;
- }
- if (angular.isDefined(scope.chartConfig)) {
- areaChartConfig = $extendObj.extendDeep(areaChartConfig, scope.chartConfig);
- }
- d3.select("svg#" + attrs.id).remove();
- d3.selectAll("svg#" + attrs.id + " > *").remove();
- d3.selectAll("div#areaChartContainer" + " > div").remove();
- xAxisticks = scope.chartData.length;
- dataObj = scope.chartData;
- var yearLabel = '', monthArr = {}, isSingleMonth, singleMonthName;
-
- // On selecting same month in From and To dropdowns, User should be getting graph
- if (dataObj.length === 1) {
- isSingleMonth = true;
- var tmp1 = "01-" + dataObj[0].month;
- var tmp = parseDate(tmp1);
- singleMonthName = tmp.toString().split(" ")[1];
- tmp.setMonth(tmp.getMonth() + 1);
- var nextMonth = tmp.toString().split(" ")[1] + "-" + tmp.getFullYear();
- dataObj.push({month: nextMonth, usage: dataObj[0].usage, available: dataObj[0].available, usageDataType: dataObj[0].usageDataType, availableDataType: dataObj[0].availableDataType});
- }
-
- dataObj.forEach(function (d) {
- var tmp = "01-" + d.month;
- d.numericMonth = parseDate(tmp);
- d.usage = +d.usage;
- d.available = +d.available;
- monthArr[labelFormat(d.numericMonth)] = labelFormat(d.numericMonth);
- });
-
- for (var key in monthArr) {
- var label = monthArr[key];
- if (!yearLabel) {
- yearLabel = label;
- }
- else {
- if (!isSingleMonth) {
- yearLabel = yearLabel + "-" + label;
- }
- }
- }
-
- //X-Axis Range
- var xRange = d3.time.scale()
- .range([0, width]);
-
- //Y-Axis Range
- var yRange = d3.scale.linear()
- .range([height, 0]);
-
- //X-Axis Domain
- xRange.domain(d3.extent(dataObj, function (d) {
- return d.numericMonth;
- }));
-
- //Y-Axis Domain
- var yDomainData = [], yAxisData = [];
- for (var b = 0; b < dataObj.length; b++) {
- var usageVal = Math.round(parseInt(dataObj[b].usage, 10) / areaChartConfig.yAxisMaxTicks);
- var availableVal = Math.round(parseInt(dataObj[b].available, 10) / areaChartConfig.yAxisMaxTicks);
- var val;
- if (usageVal > availableVal) {
- val = usageVal;
- }
- else {
- val = availableVal;
- }
- var Calc = Math.ceil((val / Math.pow(10, ("" + val).length - 1))) * (areaChartConfig.yAxisMaxTicks) * Math.pow(10, ("" + val).length - 1);
- yDomainData.push({'yAxisVal': Calc});
- }
-
- //Y-Axis Domain
- yRange.domain([0, d3.max(yDomainData, function (d) {
- return (d.yAxisVal);
- })]);
-
- var yTick = d3.max(yDomainData, function (d) {
- return d.yAxisVal;
- });
-
- yTick = yTick / areaChartConfig.yAxisMaxTicks;
- for (var x = 0; x <= areaChartConfig.yAxisMaxTicks; x++) {
- yAxisData.push(yTick * x);
- }
- var formatData = function (d) {
- if (d >= areaChartConfig.amountMDivision) {
- return d / areaChartConfig.amountMDivision + areaChartConfig.amountMText;
- } else if (d >= areaChartConfig.amountKDivision) {
- return d / areaChartConfig.amountKDivision + areaChartConfig.amountKText;
- } else {
- return d;
- }
- };
- var xAxis = d3.svg.axis().scale(xRange).orient("bottom").tickFormat(d3.time.format('%b')).ticks(d3.time.months);
- var yAxis = d3.svg.axis().scale(yRange).orient("left").tickValues(yAxisData).ticks(areaChartConfig.yAxisMaxTicks).tickFormat(formatData);
-
- //Draw Line
- var line = d3.svg.line()
- .x(function (d) {
- return xRange(d.numericMonth);
- })
- .y(function (d) {
- return yRange(d.available);
- }).interpolate(areaChartConfig.lineCurveType);
-
- //Draw Area
- var area = d3.svg.area()
- .x(function (d) {
- return xRange(d.numericMonth);
- })
- .y0(height)
- .y1(function (d) {
- return yRange(d.usage);
- }).interpolate(areaChartConfig.lineCurveType);
-
- //Plot Chart
- var drawChart = d3.select("#areaChartContainer")
- .append("svg")
- .attr("id", attrs.id)
- .data(dataObj)
- .attr("width", width + margin.left + margin.right)
- .attr("height", parseInt(height, 10) + parseInt(margin.top, 10) + parseInt(margin.bottom, 10))
- .append("g")
- .attr("transform", "translate(" + margin.left + "," + margin.top + ")");
-
- //Apply gradients
- if (!oldIE) {
- var svgDefs = drawChart.append("defs")
- .append("linearGradient")
- .attr("id", "areaGradient")
- .attr('x1', '0%').attr('y1', '0%')
- .attr('x2', '0%').attr('y2', '100%');
-
- //Fill gradient
- svgDefs.append('stop')
- .attr('stop-color', startColor)
- .attr("offset", "0%")
- .attr("stop-opacity", "1");
- svgDefs.append('stop')
- .attr('stop-color', stopColor)
- .attr("offset", "100%")
- .attr("stop-opacity", "1");
- }
-
- //Draw X Axis
- drawChart.append("g")
- .attr("class", "x axis")
- .attr("transform", "translate(0," + height + ")")
- .call(xAxis).selectAll("text")
- .attr("dy", "1.2em");
-
-
- if (isSingleMonth) {
- drawChart.selectAll('.x.axis').selectAll('.tick').selectAll('text')[1][0].textContent = singleMonthName;
- }
-
- //Plot Area
- var areaPath = drawChart.append("path")
- .datum(dataObj)
- .attr("class", "area")
- .attr("d", area).style("fill", "url(#areaGradient)").append("title").text(function () {
- return scope.legendLabel[0].series;
- });
-
- var newDataObj = dataObj;
- if (isSingleMonth) {
- newDataObj = dataObj.slice(0, 1);
- }
-
- //Draw Data Points for Area Chart
- var circle = drawChart.selectAll(".dot")
- .data(newDataObj)
- .enter().append("circle")
- .attr("class", "dot")
- .attr("transform", "translate(" + (isSingleMonth === true) * width / 2 + ",0)")
- .style("fill", function (d) {
- if (d.usage > d.available) {
- return scope.overageLegend;
- }
- else {
- return scope.areaLegendColor;
- }
- })
- .attr("r", areaChartConfig.circleRadius)
- .attr("cx", function (d) {
- return xRange(d.numericMonth);
- })
- .attr("cy", function (d) {
- return yRange(d.usage);
- }).on("mouseover", function (d) {
- var offsetX = Math.ceil(d3.select(this).attr("cx"));
- show_tooltip_grid_line(d3.select(this).attr("cx"), "circle", "cx");
- var offsetY = Math.round(d3.select(this).attr("cy"));
- d3.select('svg#' + attrs.id).style("fill-opacity", areaChartConfig.opacityOnHover);
- mouseOver(d, offsetX - 3, offsetY - 3);
- }).on("mouseout", function () {
- hide_tooltip_grid_line(d3.select(this).attr("cx"), "circle", "cx");
- d3.select('svg#' + attrs.id).style("fill-opacity", "1");
- scope.tooltipFlag = false;
- scope.$apply();
- });
- circle.append('desc').append('title').text(function (d) {
- return(addTitle(d));
- });
-
- //Draw Line Chart
- drawChart.append("path")
- .attr("class", "line")
- .style("stroke", lineColor)
- //.style("stroke-dasharray", (areaChartConfig.lineStroke, areaChartConfig.lineStroke))
- .attr("d", line(dataObj)).append("title").text(function () {
- return scope.legendLabel[1].series;
- });
-
- //Draw data points for Line Chart
- if (!oldIE) {
- var squaredot = drawChart.selectAll(".square-dot")
- .data(newDataObj).enter().append("rect")
- .attr("transform", "translate(" + (isSingleMonth === true) * width / 2 + ",0)")
- .style("fill", scope.lineLegendColor)
- .attr("class", "square-dot")
- .attr("x", function (d) {
- var tmp = xRange(d.numericMonth);
- tmp = tmp - 2.5;
- return tmp;
- })
- .attr("y", function (d) {
- var tmp = yRange(d.available);
- tmp = tmp - 2.5;
- return tmp;
- })
- .attr("width", "5px")
- .attr("height", "5px")
- .on("mouseover", function (d) {
- var offsetX = Math.ceil(d3.select(this).attr("x"));
- show_tooltip_grid_line(d3.select(this).attr("x"), "rect", "x");
- var offsetY = Math.round(d3.select(this).attr("y"));
- d3.select('svg#' + attrs.id).style("fill-opacity", areaChartConfig.opacityOnHover);
- mouseOver(d, offsetX, offsetY);
- }).on("mouseout", function () {
- hide_tooltip_grid_line(d3.select(this).attr("x"), "rect", "x");
- d3.select('svg#' + attrs.id).style("fill-opacity", "1");
- scope.tooltipFlag = false;
- scope.$apply();
- });
- squaredot.append('desc').append('title').text(function (d) {
- return(addTitle(d));
- });
- }
- else {
- areaPath.style("fill", startColor);
- var squareDot = drawChart.selectAll(".square-dot")
- .data(newDataObj).enter().append("circle")
- .attr("class", "square-dot")
- .attr("transform", "translate(" + (isSingleMonth === true) * width / 2 + ",0)")
- .style("fill", scope.areaLegendColor)
- .attr("r", areaChartConfig.circleRadius)
- .attr("cx", function (d) {
- return xRange(d.numericMonth);
- })
- .attr("cy", function (d) {
- return yRange(d.available);
- }).on("mouseover", function (d) {
- var offsetX = Math.ceil(d3.select(this).attr("cx"));
- var offsetY = Math.round(d3.select(this).attr("cy"));
- show_tooltip_grid_line(d3.select(this).attr("cx"), "circle", "cx");
- d3.select('svg#' + attrs.id).style("fill-opacity", areaChartConfig.opacityOnHover);
- mouseOver(d, offsetX, offsetY);
- }).on("mouseout", function () {
- hide_tooltip_grid_line(d3.select(this).attr("cx"), "circle", "cx");
- d3.select('svg#' + attrs.id).style("fill-opacity", "1");
- scope.tooltipFlag = false;
- scope.$apply();
- });
- squareDot.append('desc').append('title').text(function (d) {
- return(addTitle(d));
- });
- }
-
- //Draw Y Axis
- var yAxisNodes = drawChart.append("g")
- .attr("class", "y axis").attr("id", "yAxisId")
- .call(yAxis);
-
- yAxisNodes.selectAll("text")
- .attr("id", function (d, i) {
- return ("yAxisText" + i);
- });
-
- //Append Year Label
- yAxisNodes.append("text")
- .attr("transform", "rotate(0)")
- .attr("y", areaChartConfig.yearLabelPos[1])
- .attr("x", areaChartConfig.yearLabelPos[0]).attr("class", "yearLabel")
- .text(yearLabel);
- //Remove minimum value label form Y Axis
- drawChart.select("#yAxisText0").remove();
-
- // Draw the x Grid lines
- drawChart.append("g")
- .attr("class", "grid")
- .attr("id", "xGrid")
- .attr("transform", "translate(" + (isSingleMonth === true) * width / 2 + ",0)")
- .call(make_x_axis()
- .tickSize(-height, 0)
- .tickFormat(""));
-
- // function for the x grid lines
- function make_x_axis() {
- return d3.svg.axis()
- .scale(xRange)
- .orient("top")
- .tickFormat(d3.time.format('%b')).ticks(d3.time.months);
- }
-
- //drawChart.select("#xGrid").selectAll("line").style("stroke", areaChartConfig.gridLineColor);
- drawChart.select("#xGrid").selectAll("line").style("stroke", "none");
- drawChart.select("#xGrid").selectAll("line")
- .attr("id", function (d, i) {
- return ("xAxisLine" + i);
- });
-
- //Add title for NVDA screen reader
- function addTitle(d) {
- return (tooltipFormat(d.numericMonth) + "Used" + d.usage + d.usageDataType + "Available" + d.available + d.availableDataType);
- }
-
- //Show Gridline on Mouse Hover
- function show_tooltip_grid_line(offsetX, shape, attr) {
- try {
- for (var i = 0; i < xAxisticks; i++) {
- var circle = drawChart.selectAll(shape);
- if (circle[0][i].getAttribute(attr) === offsetX) {
- drawChart.select("#xAxisLine" + i).style("stroke", areaChartConfig.gridLineColor);
- }
- }
- } catch (e) {
- }
- }
-
- //Hide Gridline on Mouse Hover
- function hide_tooltip_grid_line(offsetX, shape, attr) {
- try {
- for (var i = 0; i < xAxisticks; i++) {
- var circle = drawChart.selectAll(shape);
- if (circle[0][i].getAttribute(attr) === offsetX) {
- drawChart.select("#xAxisLine" + i).style("stroke", "transparent");
- }
- }
- } catch (e) {
- }
- }
-
- //Mouse Hover
- function mouseOver(d, offsetX, offsetY) {
- scope.underageFlag = false;
- scope.overageFlag = false;
- if (d.usage > d.available) {
- scope.overageFlag = true;
- }
- if (d.usage < d.available) {
- scope.underageFlag = true;
- }
- scope.dataPoint = {"xData": tooltipFormat(d.numericMonth).replace('-', ' '), "dataUsed": d.usage, "dataAvailable": d.available, "overage": d.overage, "usageDataType": d.usageDataType, "availableDataType": d.availableDataType, "underage": d.underage};
- scope.$apply();
- $timeout(function () {
- offsetY = offsetY - areaChartConfig.tooltipTopMargin;
- var tooltipEl = element.children().eq(2);
- var tooltipWidth = tooltipEl[0].offsetWidth;
- if (isSingleMonth) {
- offsetX = offsetX - (tooltipWidth / 2) + areaChartConfig.tooltipLeftMargin + (width / 2);
- } else {
- offsetX = offsetX - (tooltipWidth / 2) + areaChartConfig.tooltipLeftMargin;
- }
- scope.tooltipStyle = {"left": offsetX + "px", "top": offsetY + "px"};
- scope.tooltipFlag = true;
- },0);
- }
- scope.refreshChart = false;
- });
- }
- };
- }])
- .filter('filterInput', function () {
- return function (input) {
- return input.replace(/ +/g, "").toLowerCase();
- };
- });
-angular.module('att.charts.barchartD3', ['att.charts.utilities'])
-
- .constant("BarChartD3Config",
- {
- "barChartColor": "#0081C2",
- "gridLineColor": "#808080",
- "yaxisGridLineColor": "#000000",
- "margin": {
- top : 40,
- right: 20,
- bottom: 30,
- left: 40
- },
- "attributes": {
- "userName": "name",
- "phoneNumber": "phoneNumber",
- "charges": "charges"
- },
- "yAxisMaxTicks": 4,
- "chartHeight": 160,
- "amountFormat" : "$0,000",
- "amountKDivision" : 1000,
- "amountKText" : "K",
- "amountMDivision" : 1000000,
- "amountMText" : "M",
- "xAxistickSize":0,
- "tooltipTopMargin":69,
- "tooltipLeftMargin":59,
- "xAxisTextTopMargin":15,
- "xAxisTextLeftMargin":7,
- "barChartSize":25,
- "barHoverOpacity":0.2
- })
-
- .directive('attBarChart', ['BarChartD3Config','$extendObj', function(BarChartD3Config,$extendObj) {
- return {
- restrict: 'A',
- scope: {
- chartData: '=',
- chartConfig: '=',
- refreshChart: "="
- },
- templateUrl: "template/barchartD3/attBarChartD3.html",
- replace: true,
- link: function(scope, element, attrs, ctrl) {
-
- scope.$watch('refreshChart', function() {
- if (angular.isDefined(scope.chartConfig)) {
- BarChartD3Config = $extendObj.extendDeep(BarChartD3Config, scope.chartConfig);
- }
-
- var width = parseInt(attrs.chartWidth, 10),
- chartColor = BarChartD3Config.barChartColor,
- height = BarChartD3Config.chartHeight,
- userName = BarChartD3Config.attributes.userName,
- charges = BarChartD3Config.attributes.charges,
- phoneNumber = BarChartD3Config.attributes.phoneNumber,
- formatCharges = d3.format(BarChartD3Config.amountFormat),
- isSingleDataObj = false, padding = 20;
- var barChartData, yDomainData = [],yAxisData = [];
- scope.tooltipFlag = false;
- var compare = function compare(a, b) {
- if (parseInt(a[charges], 10) > parseInt(b[charges], 10)) {
- return -1;
- }
- if (parseInt(a[charges], 10) < parseInt(b[charges], 10)) {
- return 1;
- }
- return 0;
- };
-
-
- d3.select("svg#" + attrs.id).remove();
- d3.selectAll("svg#" + attrs.id + " > *").remove();
- d3.selectAll("div#barChartContainer" + " > div").remove();
-
- barChartData = scope.chartData.sort(compare);
- barChartData = barChartData.slice(0,BarChartD3Config.barChartSize);
- if (barChartData.length === 1) {
- isSingleDataObj = true;
- }
- var x = d3.scale.ordinal().rangeBands([0, width]);
-
- var y = d3.scale.linear()
- .range([height, 0]);
-
- x.domain(barChartData.map(function(d, i) {
- return i + 1;
- }));
-
- for(var b=0; b < barChartData.length; b++){
- var val = Math.round(parseInt(barChartData[b].charges, 10)/BarChartD3Config.yAxisMaxTicks);
- var Calc = Math.ceil((val / Math.pow(10, ("" + val).length - 1))) * (BarChartD3Config.yAxisMaxTicks) * Math.pow(10, ("" + val).length - 1);
- yDomainData.push({'yAxisVal':Calc});
- }
-
- //Y-Axis Domain
- y.domain([0, d3.max(yDomainData, function(d) {
- return (d.yAxisVal);
- })]);
-
- var yTick = d3.max(yDomainData, function(d) {return d.yAxisVal;});
-
- yTick = yTick/BarChartD3Config.yAxisMaxTicks;
- for(var z = 0; z <= BarChartD3Config.yAxisMaxTicks; z++){
- yAxisData.push(yTick * z);
- }
- var formatMoney = function(d) {
- if (d >= BarChartD3Config.amountMDivision) {
- return "$" + d / BarChartD3Config.amountMDivision + BarChartD3Config.amountMText;
- } else if (d >= BarChartD3Config.amountKDivision) {
- return "$" + d / BarChartD3Config.amountKDivision + BarChartD3Config.amountKText;
- } else {
- return "$" + d;
- }
- };
-
- var xAxis = d3.svg.axis()
- .scale(x)
- .orient("bottom")
- .tickSize(BarChartD3Config.xAxistickSize);
-
- var yAxis = d3.svg.axis().scale(y).orient("left").tickValues(yAxisData).ticks(BarChartD3Config.yAxisMaxTicks).tickFormat(formatMoney);
-
- var svg = d3.select("#barChartContainer")
- .append("svg")
- .attr("id", attrs.id)
- .attr("width", width + BarChartD3Config.margin.left + BarChartD3Config.margin.right)
- .attr("height", height + BarChartD3Config.margin.top + BarChartD3Config.margin.bottom)
- .append("g")
- .attr("transform", "translate(" + BarChartD3Config.margin.left + "," + BarChartD3Config.margin.top + ")");
-
- svg.append("g")
- .attr("class", "x axis")
- .attr("transform", "translate(" + -Math.ceil((x(2) - x(1)) / 2 - BarChartD3Config.xAxisTextTopMargin) + "," + (height + BarChartD3Config.xAxisTextLeftMargin) + ")")
- .call(xAxis);
-
- var formatPhNumber = function(phoneNum) {
- if (phoneNum.indexOf("-") === -1) {
- return phoneNum.substr(0, 3) + '-' + phoneNum.substr(3, 3) + '-' + phoneNum.substr(6);
- } else {
- return phoneNum;
- }
- };
-
- var rectBarGroup = svg.append("g")
- .attr("class", "group").attr("id", function (d, i) {
- return ("barGroup" + i);
- }).attr("transform", "translate(" + (isSingleDataObj === true? ((width / 2) + 11):10) + ",0)");
-
- var rectBars = rectBarGroup.selectAll(".bar")
- .data(barChartData)
- .enter().append("rect")
- .attr("style", "fill:" + chartColor)
- .attr("class", "bar")
- .attr("x", function(d, i) {
- return Math.round(x(i + 1));
- })
- .attr("width", 10)
- .attr("y", function(d) {
- return y(d[charges]);
- })
- .attr("height", function(d) {
- return (height - y(d[charges]));
- })
- .on("mouseover", function(d) {
- var offsetX = Math.round(d3.select(this).attr("x"));
- show_tooltip_grid_line(offsetX);
- var offsetY = Math.round(d3.select(this).attr("y"));
- svg.select(".grid").selectAll("line").style("stroke", "transparent");
- svg.selectAll(".bar").style("fill-opacity",BarChartD3Config.barHoverOpacity);
- d3.select(this).style("fill-opacity","1");
- mouseOver(d, offsetX, offsetY);
- })
- .on("mouseout", function() {
- var offsetX = Math.round(d3.select(this).attr("x"));
- hide_tooltip_grid_line(offsetX);
- scope.tooltipFlag = false;
- svg.select(".grid").selectAll("line").style("stroke", BarChartD3Config.gridLineColor);
- svg.selectAll(".bar").style("fill-opacity","1");
- scope.$apply();
- });
- rectBars.append('desc').append('title').text(function(d){ return (d[userName] + "-- Wireless Number" + formatPhNumber(d[phoneNumber]) + "Charges-" + d[charges]);});
-
- var yAxisNodes = svg.append("g")
- .attr("class", "y axis")
- .call(yAxis);
-
- yAxisNodes.selectAll("text")
- .attr("id", function(d, i) {
- return ("yAxisText" + i);
- });
-
- yAxisNodes.selectAll("line")
- .attr("id", function(d, i) {
- return ("yAxisLine" + i);
- });
-
- //Remove minimum value label form Y Axis
- d3.select("#yAxisText0").remove();
- d3.select("#yAxisLine0").remove();
- yAxisNodes.select("path").remove();
-
- // Draw the y Grid lines
- svg.append("g")
- .attr("class", "grid")
- .attr("transform", "translate(0,0)")
- .call(make_y_axis()
- .tickSize(-width + x(2) - x(1), 0, 0)
- .tickFormat(""));
- svg.select(".grid").selectAll("line").style("stroke", BarChartD3Config.gridLineColor);
- // function for the y grid lines
- function make_y_axis() {
- return d3.svg.axis()
- .scale(y)
- .orient("left")
- .ticks(BarChartD3Config.yAxisMaxTicks).tickValues(yAxisData);
- }
- // Draw the x Grid lines
- svg.append("g")
- .attr("class", "grid").attr("id", "xGrid")
- .call(make_x_axis()
- .tickSize(-height , 0)
- .tickFormat("")).selectAll("line").attr("transform", "translate(" + -Math.ceil((x(2) - x(1)) / 2 - BarChartD3Config.xAxisTextTopMargin) + ",0)")
- .attr("id", function (d, i) {
- return ("xAxisLine" + i);
- });
-
-
- // function for the x grid lines
- function make_x_axis() {
- return d3.svg.axis()
- .scale(x)
- .orient("top")
- .ticks(BarChartD3Config.yAxisMaxTicks)
- ;
- }
- svg.select("#xGrid").selectAll("line")
- .attr("id", function(d, i) {
- return ("xAxisLine" + i);
- });
-
- function show_tooltip_grid_line(offsetX){
- for (var i = 0; i < barChartData.length; i++) {
- if(Math.round(x(i+1))===offsetX){
- svg.select("#xAxisLine"+i).style("stroke", BarChartD3Config.yaxisGridLineColor);
- }
- }
- }
-
- function hide_tooltip_grid_line(offsetX){
- for (var i = 0; i < barChartData.length; i++) {
- if(Math.round(x(i+1))===offsetX){
- svg.select("#xAxisLine"+i).style("stroke", "transparent");
- }
- }
- }
- function mouseOver(d, offsetX, offsetY) {
- offsetY = offsetY - BarChartD3Config.tooltipTopMargin;
- if (isSingleDataObj) {
- offsetX = offsetX - BarChartD3Config.tooltipLeftMargin + (width / 2);
- } else {
- offsetX = offsetX - BarChartD3Config.tooltipLeftMargin;
- }
- scope.tooltipFlag = true;
- scope.tooltipStyle = {"left": offsetX + "px", "top": offsetY + "px"};
- scope.dataPoint = {"name": d[userName], "phoneNumber": formatPhNumber(d[phoneNumber]), "charges": formatCharges(d[charges])};
- scope.$apply();
- }
- scope.refreshChart = false;
- });
- }
- };
- }]);
-angular.module('att.charts.coschartD3', ['att.charts.utilities'])
- .constant("CosChartD3Config",
- {
- "chartcolor": {
- "paletteColors": ["#097cb5", "#FEFFF7"] //default color options for rendering chart baseColor and NeedleColor,
-
- },
- "defaultcenterlabel": "COS 1",
- "defaultcentercategory": "Real Time",
- "zoomLevel": "25",
- "doughnutratio": 20,
- "legendreqd": "false",
- "animduration": "300",
- "legendposition": "top",
- "centerTextValueDy": "0",
- "centerTextValueDx": "0",
- "centerTextPercentDx": "20",
- "centerTextPercentDy": "-10",
- "centerTextLabelDy": "20",
- "centerTextLabelDx": "0",
- "arcOverMargin": 5
- })
- .directive('attCosd3Chart', ['CosChartD3Config', '$timeout','$extendObj', function (CosChartD3Config, $timeout,$extendObj) {
- return {
- restrict: 'A',
- scope: {
- chartConfig: '=',
- initVal: '='
- },
- templateUrl: 'template/coschartD3/attCosd3Chart.html',
- transclude: true,
- replace: true,
- controller: ['$scope', '$attrs', function ($scope, $attrs) {
- if (angular.isDefined($scope.chartConfig)) {
- CosChartD3Config = $extendObj.extendDeep(CosChartD3Config, $scope.chartConfig);
- }
- var legendColor = [];
- legendColor = CosChartD3Config.chartcolor.paletteColors;
- $scope.addLegendColor = function () {
- return {"color": legendColor[0]};
- };
- $scope.chartID = $attrs.id;
- if (!angular.isDefined($attrs.legendRequired)) {
- $scope.legendRequired = CosChartD3Config.legendreqd;
- } else {
- $scope.legendRequired = $attrs.legendRequired;
- }
- if (!angular.isDefined($attrs.legendPosition)) {
- $scope.legendPosition = CosChartD3Config.legendposition;
- } else {
- $scope.legendPosition = $attrs.legendPosition;
- }
- }],
- link: function (scope, element, attrs) {
- // var radius = Math.min(attrs.chartWidth, attrs.chartHeight) / 2,
- var color = d3.scale.ordinal().range(CosChartD3Config.chartcolor.paletteColors),
- zoom = parseInt(CosChartD3Config.zoomLevel, 0),data,
- margin = {// optionally set margins
- top: zoom,
- right: zoom,
- bottom: zoom,
- left: zoom
- },
- width = attrs.chartWidth,
- height = attrs.chartHeight,
- radius = Math.min(
- width - (margin.left + margin.right),
- height - (margin.top + margin.bottom)) / 2;
- scope.LegendLabel = CosChartD3Config.defaultcenterlabel;
- scope.LegendCategory = CosChartD3Config.defaultcentercategory;
- scope.$watch('initVal', function (value) {
- if(!angular.isDefined(scope.initVal)){
- return;
- }
- d3.select("svg#" + attrs.id).remove();
- d3.selectAll("svg#" + attrs.id + " > *").remove();
- var cosval = parseInt(scope.initVal.value, 10);
- scope.cosval = cosval + "%";
- if(cosval>100){
- data = [
- {"name": "cos1", "value": 100},
- {"name": "rest", "value": 0}
- ];
- }else{
- data = [
- {"name": "cos1", "value": cosval},
- {"name": "rest", "value": 100 - (parseInt(cosval, 10))}
- ];
- }
- var sliderpercent = parseInt(cosval, 10);
- if (angular.isDefined(sliderpercent)) {
- sliderpercent = 0;
- }
- element[0].querySelector('.cosd3Container').setAttribute('id', attrs.id);
- // build chart
- var svg = d3.select(".cosd3Container#" + attrs.id)
- .attr("style", "height: " + attrs.chartHeight + "px;")
- .append("svg")
- .attr("id", attrs.id)
- .attr("width", "100%")
- .attr("height", "100%")
- .attr('viewBox', '0 0 ' + Math.min(width, height) + ' ' + Math.min(width, height))
- .attr('preserveAspectRatio', 'xMinYMin')
- .append("g")
- .attr("transform", "translate(" + Math.min(width, height) / 2 + "," + Math.min(width, height) / 2 + ")");
- // set radius
- var arc = d3.svg.arc()
- .innerRadius(radius - CosChartD3Config.doughnutratio)
- .outerRadius(radius);
- // set hovered radius
- var arcOver = d3.svg.arc()
- .innerRadius(radius - CosChartD3Config.doughnutratio)
- .outerRadius(radius + CosChartD3Config.arcOverMargin);
-
- // add center text element
- var centerTextValue = svg.append("text")
- .attr("y", CosChartD3Config.centerTextValueDy)
- .attr("x", CosChartD3Config.centerTextValueDx)
- .attr("class", "coschartcenterValue");
- var centerTextPercent = svg.append("text")
- .attr("x", CosChartD3Config.centerTextPercentDx)
- .attr("y", CosChartD3Config.centerTextPercentDy)
- .attr("class", "coschartcenterPercent");
- var centerTextLabel = svg.append("text")
- .attr("y", CosChartD3Config.centerTextLabelDy)
- .attr("x", CosChartD3Config.centerTextLabelDx)
- .attr("class", "coschartcenterLabel");
- centerTextValue.text(cosval);
- centerTextPercent.text("%");
- centerTextLabel.text(CosChartD3Config.defaultcenterlabel + "(" + CosChartD3Config.defaultcentercategory + ")");
-
- var pie = d3.layout.pie()
- .sort(null)
- .startAngle(3.2 * Math.PI)
- .endAngle(5.2 * Math.PI)
- .value(function (d) {
- return d.value;
- });
-
- // set chart attributes and bind hover events
- var g = svg.selectAll(".arc")
- .data(pie(data))
- .enter()
- .append("g")
- .attr("class", "arc")
- .attr("id", function (d, i) {
- return "cosarc-" + i;
- })
- .style("cursor", "pointer");
-
- g.append("path")
- .style("fill", function (d) {
- return color(d.data.name);
- })
- .attr("id", function (d, i) {
- return "cospath-" + i;
- })
- .on("mouseover", function (d) {
- d3.select(this).transition()
- .duration(CosChartD3Config.animduration)
- .attr("d", arcOver);
- })
- .on("mouseout", function (d) {
- d3.select(this).transition()
- .duration(CosChartD3Config.animduration)
- .attr("d", arc);
- })
- .transition()
- .ease("exp")
- .duration(0)
- .attrTween("d", tweenPie);
-
- // animate function
- function tweenPie(b) {
- var i = d3.interpolate({
- startAngle: 2.1 * Math.PI,
- endAngle: 2.1 * Math.PI
- }, b);
- return function (t) {
- return arc(i(t));
- };
- }
- if(cosval>0 && cosval<100){
- d3.select(".cosd3Container path#cospath-1").style('stroke', 'black');
- }
-
-
-
- });
- }
- };
- }]);
-angular.module('att.charts.coschartwithbarD3', ['att.charts.utilities'])
-.constant("CosChartWithBarD3Config",
- {
- "chartcolor": {
- "paletteColors": ["#0574ac", "#44c8f5", "#4ca90c", "#da0081", "#ff9900", "#81017e"], //["#097cb5", "#FEFFF7"], //default color options for rendering chart baseColor and NeedleColor,
- "zeroColor": "#ffffff",
- "borderColor": "#666666"
- },
- "zoomLevel": "25",
- "doughnutratio": 20,
- "barreqd": "true",
- "barHeight": 50,
- "barWidth": 150,
- "barCornerRadius": 9,
- //"barTextValueDy": "250",
- //"barTextValueDx": "0",
- //"barTextPercentDx": "20",
- //"barTextPercentDy": "-250",
- //"barTextLabelDy": "60",
- //"barTextLabelDx": "-80",
- //"defaultbarlabel": "CoS 2V/CoS 2/CoS 3/CoS 4/CoS 5",
- "animduration": "300",
- "centerText": {
- 'defaultCenterLabel': 'COS 1',
- 'defaultCenterCategory': 'Real Time',
- 'textValueDy': '0',
- 'textValueDx': '0',
- 'textPercentDx': '20',
- 'textPercentDy': '-10',
- 'textLabelDx': '0',
- 'textLabelDy': '20',
- 'color': '#666666',
- 'size': '36px',
- 'font': 'omnes_att_light'
- },
- "centerTextValueDy": "0",
- "centerTextValueDx": "0",
- "centerTextPercentDx": "20",
- "centerTextPercentDy": "-10",
- "centerTextLabelDy": "20",
- "centerTextLabelDx": "0",
- "arcOverMargin": 5
- })
-.directive('attCosBarD3Chart', ['CosChartWithBarD3Config', '$timeout','$extendObj', function (CosChartWithBarD3Config, $timeout,$extendObj) {return {
- restrict: 'A',
- scope: {
- chartConfig: '=',
- chartData: '=',
- totalCos: '=',
- remainingCos: '=',
- mouseOver: '=?'
- },
- templateUrl: 'template/coschartwithbarD3/attCosBarD3Chart.html',
- transclude: true,
- replace: true,
- controller: ['$scope', '$attrs', function ($scope, $attrs) {
- if (angular.isDefined($scope.chartConfig)) {
- CosChartWithBarD3Config = $extendObj.extendDeep(CosChartWithBarD3Config, $scope.chartConfig);
- }
-
- $scope.chartID = $attrs.id;
- if (!angular.isDefined($attrs.barRequired)) {
- $scope.barRequired = CosChartWithBarD3Config.barreqd;
- } else {
- $scope.barRequired = $attrs.barRequired;
- }
-
- }],
- link: function (scope, element, attrs) {
- /*
- x: x-coordinate
- y: y-coordinate
- w: width
- h: height
- r: corner radius
- tl: top_left rounded?
- tr: top_right rounded?
- bl: bottom_left rounded?
- br: bottom_right rounded?
- */
- function rounded_rect(x, y, w, h, r, tl, tr, bl, br) {
- var retval;
- retval = "M" + (x + r) + "," + y;
- retval += "h" + (w - 2*r);
- if (tr) { retval += "a" + r + "," + r + " 0 0 1 " + r + "," + r; }
- else { retval += "h" + r; retval += "v" + r; }
- retval += "v" + (h - 2*r);
- if (br) { retval += "a" + r + "," + r + " 0 0 1 " + -r + "," + r; }
- else { retval += "v" + r; retval += "h" + -r; }
- retval += "h" + (2*r - w);
- if (bl) { retval += "a" + r + "," + r + " 0 0 1 " + -r + "," + -r; }
- else { retval += "h" + -r; retval += "v" + -r; }
- retval += "v" + (2*r - h);
- if (tl) { retval += "a" + r + "," + r + " 0 0 1 " + r + "," + -r; }
- else { retval += "v" + -r; retval += "h" + r; }
- retval += "z";
- return retval;
- }
-
- var radScale = d3.scale.linear().domain([0, 100]).range([0, 2 * Math.PI]);
-
-
- var zoom = parseInt(CosChartWithBarD3Config.zoomLevel, 0),data,
- margin = {// optionally set margins
- top: zoom,
- right: zoom,
- bottom: zoom,
- left: zoom
- },
- width = attrs.chartWidth,
- height = attrs.chartHeight,
- radius = Math.min(
- width - (margin.left + margin.right),
- height - (margin.top + margin.bottom)) / 2;
-
-
- scope.$watchCollection('chartData', function (value) {
- var j = 0; // index for for-loops
-
- if(!angular.isDefined(scope.chartData) || scope.chartData.length < 1){
- return;
- }
-
- d3.select("svg#" + attrs.id).remove();
- d3.selectAll("svg#" + attrs.id + " > *").remove();
-
- // SnickrBar
- d3.select("svg#" + scope.snickrbarId).remove();
- d3.selectAll("svg#" + scope.snickrbarId + " > *").remove();
-
- var cosval = scope.chartData[0];
- var remainingCosVal = 0, restCosVal = 0;
-
- for(j = 1; j < scope.chartData.length; j++)
- {
- remainingCosVal += parseInt(scope.chartData[j], 10); //parseInt allows strings to be passed in
- }
- restCosVal = 100 - cosval - remainingCosVal;
- scope.totalCos = cosval + remainingCosVal;
- scope.remainingCos = remainingCosVal;
-
- var data = angular.copy(scope.chartData);
- if (angular.isDefined(restCosVal)) {
- data.push(restCosVal);
- }
-
- element[0].querySelector('.cosd3Container').setAttribute('id', attrs.id);
- // build chart
- var svg = d3.select(".cosd3Container#" + attrs.id)
- .attr("style", "height: " + attrs.chartHeight + "px;")
- .append("svg")
- .attr("id", attrs.id)
- .attr("width", "100%")
- .attr("height", "100%")
- .attr('viewBox', '0 0 ' + Math.min(width, height) + ' ' + Math.min(width, height))
- .attr('preserveAspectRatio', 'xMinYMin')
- .append("g")
- .attr("transform", "translate(" + Math.min(width, height) / 2 + "," + Math.min(width, height) / 2 + ")");
-
- scope.snickrbarId = attrs.id + 'snickrbar';
- var snickrbar = d3.select(".snickrBar")
- .attr('style', 'margin-left:' + Math.floor(CosChartWithBarD3Config.barWidth/3) + ';')
- .style({'background-color': CosChartWithBarD3Config.chartcolor.zeroColor, 'width': CosChartWithBarD3Config.barWidth + 'px', 'border': '1px solid #777', 'border-radius': '10px'})
- .append("svg")
- .attr("id", scope.snickrbarId)
- .attr("width", CosChartWithBarD3Config.barWidth + "px")
- .attr("height", CosChartWithBarD3Config.barHeight + "px")
- .append("g");
-
- // set radius
- var arc = d3.svg.arc()
- .innerRadius(radius - CosChartWithBarD3Config.doughnutratio)
- .outerRadius(radius);
-
- // set hovered radius
- var arcOver = d3.svg.arc()
- .innerRadius(radius - CosChartWithBarD3Config.doughnutratio)
- .outerRadius(radius + CosChartWithBarD3Config.arcOverMargin);
-
- // add center text element
- var centerTextValue = svg.append("text")
- .attr("y", CosChartWithBarD3Config.centerText.textValueDy)
- .attr("x", CosChartWithBarD3Config.centerText.textValueDx)
- .attr("class", "coschartcenterValue");
- var centerTextPercent = svg.append("text")
- .attr("x", CosChartWithBarD3Config.centerText.textPercentDx)
- .attr("y", CosChartWithBarD3Config.centerText.textPercentDy)
- .attr("class", "coschartcenterPercent");
- var centerTextLabel = svg.append("text")
- .attr("y", CosChartWithBarD3Config.centerText.textLabelDy)
- .attr("x", CosChartWithBarD3Config.centerText.textLabelDx)
- .attr("class", "coschartcenterLabel");
- centerTextValue.text(cosval);
- centerTextPercent.text("%");
- centerTextLabel.text(CosChartWithBarD3Config.centerText.defaultCenterLabel + "(" + CosChartWithBarD3Config.centerText.defaultCenterCategory + ")");
-
- var scale = function(d) {
- if (d <= 0) {
- return 0;
- } else {
- var r = (d * CosChartWithBarD3Config.barWidth) / 100;
- if (isNaN(r)) { r = 0; }
- else if (!isFinite(r)) { r = CosChartWithBarD3Config.barWidth; }
-
- return r;
- }
- };
-
- // Only executed when totalCos is 0
- if (cosval <= 0) {
- arc.startAngle(0).endAngle(2 * Math.PI); //just radians
- svg.append("path")
- .attr("d", arc)
- .attr("fill", CosChartWithBarD3Config.chartcolor.zeroColor)
- .style("stroke", CosChartWithBarD3Config.chartcolor.borderColor)
- .style("stroke-width", 1);
- } else {
-
- // JVM: This code is temp for just snicker's bar release
- var temp = 100-data[0];
- var newData = [];
- newData.push({'value':data[0]});
- newData.push({'value':temp});
-
- /*for(j = 0; j < data.length; j++) {
- var obj = angular.extend({}, data[j]);
- obj.value = data[j];
- newData.push(obj);
- }*/
-
-
- //======================================================
-
-
- var pie = d3.layout.pie()
- .sort(null)
- .value(function (d,index) {
- var r = d.value;
- if (d.value <= 0) { r = 0; }
- return r;
- });
-
- // set chart attributes and bind hover events
- var g = svg.selectAll(".arc")
- .data(pie(newData))
- .enter()
- .append("g")
- .attr("class", "arc")
- .attr("id", function (d, i) {
- return "cosarc-" + i;
- })
- .style("cursor", "pointer");
-
- g.append("path")
- .style("fill", function (d, i) {
- if (i === CosChartWithBarD3Config.chartcolor.paletteColors.length || i === newData.length-1 || d.data.value === 0) {
- return CosChartWithBarD3Config.chartcolor.zeroColor;
- }
-
- return CosChartWithBarD3Config.chartcolor.paletteColors[i];
- })
- .style("stroke", "white")
- .style("stroke-width", function(d,index) { if (cosval >= 100) { return 0; } else { return 1; } })
- .attr("id", function (d, i) {
- return "cospath-" + i;
- })
- .on("mouseover", function (d, index) {
- if (index < newData.length-1) {
- d3.select(this).transition()
- .duration(CosChartWithBarD3Config.animduration)
- .attr("d", arcOver);
- }
- })
- .on("mouseout", function (d, index) {
- if (index < newData.length-1) {
- d3.select(this).transition()
- .duration(CosChartWithBarD3Config.animduration)
- .attr("d", arc);
- }
- })
- .transition()
- .ease("exp")
- .duration(0)
- .attrTween("d", tweenPie);
- } // end of else
-
- if (!CosChartWithBarD3Config.barreqd) { return; }
- var snickrData = [];
- var d = scope.chartData.slice(1, scope.chartData.length);
- for (j = 0; j < d.length; j++) {
- if (d[j] !== 0) {
- var obj = {};
- obj.data = d[j];
- obj.color = CosChartWithBarD3Config.chartcolor.paletteColors[j+1];
- snickrData.push(obj);
- }
- }
-
- var prevWidth = 0;
- var nextX = function(d, i) {
- if (i === 0) {
- prevWidth = scale(d);
- return 0;
- } else {
- var p = prevWidth;
- prevWidth += scale(d);
- return p;
- }
- };
-
- var rect = snickrbar.selectAll("path")
- .data(snickrData)
- .enter()
- .append("path")
- .style("fill", function(d, i) {
- if (i >= CosChartWithBarD3Config.chartcolor.paletteColors.length || d.data === 0) {
- return CosChartWithBarD3Config.chartcolor.zeroColor;
- }
-
- return d.color;
- })
- .attr("d", function(d, index) {
- if (index === 0) {
- // Left rounded rectangle
- return rounded_rect(nextX(d.data, index), 0, scale(d.data), CosChartWithBarD3Config.barHeight, CosChartWithBarD3Config.barCornerRadius, true, false, true, false);
- } else if (index === snickrData.length-1 && remainingCosVal >= 100) {
- // Right rounded rectangle
- return rounded_rect(nextX(d.data, index), 0, scale(d.data), CosChartWithBarD3Config.barHeight, CosChartWithBarD3Config.barCornerRadius, false, true, false, true);
- } else {
- console.log('normal rect at ' + index);
- return rounded_rect(nextX(d.data, index), 0, scale(d.data), CosChartWithBarD3Config.barHeight, 0, false, false, false, false);
- }
- });
-
- if (remainingCosVal === 0) {
- snickrbar.attr("fill", CosChartWithBarD3Config.chartcolor.zeroColor);
- }
-
- // add bar text element
- /*var snickerText = d3.select('.snickrBar svg')
- .append("g")
- .style("fill", "black");
-
- var barTextValue = snickerText.append("text")
- .attr("y", CosChartWithBarD3Config.barTextValueDy)
- .attr("x", CosChartWithBarD3Config.barTextValueDx)
- .attr("class", "coschartbarcenterValue");
- var barTextPercent = snickerText.append("text")
- .attr("x", CosChartWithBarD3Config.barTextPercentDx)
- .attr("y", CosChartWithBarD3Config.centerTextPercentDy)
- .attr("class", "coschartbarcenterPercent");
- var barTextLabel = snickerText.append("text")
- .attr("y", CosChartWithBarD3Config.barTextLabelDy)
- .attr("x", CosChartWithBarD3Config.barTextLabelDx)
- .attr("class", "coschartbarcenterLabel");
- barTextValue.text(cosval);
- barTextPercent.text("%");
- barTextLabel.text(CosChartWithBarD3Config.defaultbarlabel);*/
-
-
-
- // animate function
- function tweenPie(b) {
- var i = d3.interpolate({
- startAngle: 2.1 * Math.PI,
- endAngle: 2.1 * Math.PI
- }, b);
- return function (t) {
- return arc(i(t));
- };
- }
-
- scope.$watch('mouseOver', function(val) {
- if (!angular.isDefined(scope.mouseOver)) { return; }
- var id = scope.mouseOver.split('-')[1];
- if (scope.mouseOver.split('-')[0] === 'true') {
- if (id === '0') {
- d3.select("#cospath-" + id).transition()
- .duration(CosChartWithBarD3Config.animduration)
- .attr("d", arcOver);
- } else {
- for (var i = 0; i < newData.length-1; i++) {
- d3.select("#cospath-" + (i+1)).transition()
- .duration(CosChartWithBarD3Config.animduration)
- .attr("d", arcOver);
- }
- }
- } else {
- if (id === '0') {
- d3.select("#cospath-" + id).transition()
- .duration(CosChartWithBarD3Config.animduration)
- .attr("d", arc);
- } else {
- for (j = 0; j < newData.length-1; j++) {
- d3.select("#cospath-" + (j+1)).transition()
- .duration(CosChartWithBarD3Config.animduration)
- .attr("d", arc);
- }
- }
- }
- });
-
- });
-
- }
- };
- }]);
-angular.module('att.charts.cosdeletionD3', ['att.charts.utilities'])
- .constant("CosdeletionD3Config",
- {
- "chartcolor": {
- "MaxBandwidthReached": "#d3d3d3",
- "ZeroBandwidthSelected": "#FEFFF7",
- "RemainingBandwidthColor": "#ffffff",
- "RemainingBandwidthStrokeColor": "#d3d3d3",
- "RemainingBandwidthStrokeWidth": 1.5,
- "UsedBandwidthColor": "#0574AC",
- "UsedBandwidthStrokeColor":"#efefef", //white
- "UsedBandwidthStrokeWidth":"1"
- },
- "defaultcenterlabel": "Kbps",
- "zoomLevel": "10",
- "doughnutratio": 21,
- "animduration": "300",
- "guageStartAngle":4,
- "guageEndAngle":8.56,
- "legendreqd": "false",
- "initduration": "1000",
- "legendposition": "top",
- "centerTextLabelDy": "20",
- "centerTextValueDy": "0",
- "centerTextValueDx": "-30",
- "centerTextLabelDx": "-10",
- "maxbandwidthTextDx": "25",
- "maxbandwidthTextDy": "70",
- "arcOverMargin": 5
- })
- .directive('attCosdeletiond3Chart', ['CosdeletionD3Config', '$timeout','$extendObj', function(CosdeletionD3Config, $timeout,$extendObj) {
- return {
- restrict: 'A',
- scope: {
- maxValue: '=',
- chartData: '=',
- chartConfig: '=',
- resetChart: '=',
- removeArcs: '='
- },
- controller: ['$scope', '$attrs', function($scope, $attrs) {
- if (angular.isDefined($scope.chartConfig)) {
- CosdeletionD3Config = $extendObj.extendDeep(CosdeletionD3Config, $scope.chartConfig);
- }
-
- }],
- link: function(scope, element, attrs) {
- var zoom = parseInt(CosdeletionD3Config.zoomLevel, 0),
- margin = {// optionally set margins
- top: zoom,
- right: zoom,
- bottom: zoom,
- left: zoom
- },
- width = attrs.chartWidth,
- height = attrs.chartHeight,
- radius = Math.min(
- width - (margin.left + margin.right),
- height - (margin.top + margin.bottom)) / 2,arcPath;
- // set radius
- var arc = d3.svg.arc()
- .innerRadius(radius - CosdeletionD3Config.doughnutratio)
- .outerRadius(radius);
- var arcOver = d3.svg.arc()
- .innerRadius(radius - CosdeletionD3Config.doughnutratio)
- .outerRadius(radius + CosdeletionD3Config.arcOverMargin);
-
- // Browser onresize event
- window.onresize = function() {
- scope.$apply();
- };
- scope.$watch('resetChart', function(newValue, oldValue) {
- if(scope.resetChart === true){
- scope.resetChart = false;
- return;
- }
- return scope.render(newValue, oldValue);
- });
- scope.render = function(newValue, oldValue) {
- d3.select("svg#" + attrs.id).remove();
- d3.selectAll("svg#" + attrs.id + " > *").remove();
- if (!scope.chartData)
- {
- return;
- }
- var data=angular.copy(scope.chartData);
- data=data.reverse();
- var totalBandwidth=0,totalUsed=0,remainingBandwidth=0,dynamicColorRange=[],noCheckBoxSelected=true,selectedBandwidth=0,selectedElem=[];
- if (angular.isDefined(scope.maxValue)) {
- totalBandwidth = parseInt(scope.maxValue, 0);
- }
- for (var j = 0; j < data.length; j++) {
- totalUsed = (totalUsed + parseInt(data[j].value, 0));
- if(angular.equals(data[j].status, true)){
- noCheckBoxSelected=false;
- selectedBandwidth=selectedBandwidth+data[j].value;
-
- data[j].value=0;
- dynamicColorRange.push(CosdeletionD3Config.chartcolor.MaxBandwidthReached);
-
- }else{
- selectedElem.push({index: data[j].id, value: data[j].value});
- dynamicColorRange.push(CosdeletionD3Config.chartcolor.UsedBandwidthColor);
- }
- }
- if(scope.removeArcs){
- while(data.length > 0) {
- data.pop();
- }
- dynamicColorRange=[];
- data.push({name: "totalUsed", value: totalUsed-selectedBandwidth,id:"totalUsed"});
- dynamicColorRange.push(CosdeletionD3Config.chartcolor.UsedBandwidthColor);
- scope.removeArcs=false;
- }
- if(totalUsed>0 && totalUsed<totalBandwidth){
- remainingBandwidth=totalBandwidth-totalUsed;
- if(!noCheckBoxSelected){
- data.push({name: "selectedBandwidth", value: selectedBandwidth,id:"selectedBandwidth"});
- dynamicColorRange.push(CosdeletionD3Config.chartcolor.MaxBandwidthReached);
- }
- data.push({name: "remaining", value: remainingBandwidth,id:"remaining"});
- dynamicColorRange.push(CosdeletionD3Config.chartcolor.RemainingBandwidthColor);
- }
- element[0].setAttribute('id', attrs.id);
- var svg = d3.select(element[0])
- .attr("style", "height: " + attrs.chartHeight + "px;")
- .append("svg")
- .attr("id", attrs.id)
- .attr("radius", radius)
- .attr("width", attrs.chartWidth)
- .attr("height", attrs.chartHeight)
- .attr('viewBox', '0 0 ' + Math.min(width, height) + ' ' + Math.min(width, height))
- .attr('preserveAspectRatio', 'xMinYMin')
- .append("g")
- .attr("transform", "translate(" + Math.min(width, height) / 2 + "," + Math.min(width, height) / 2 + ")");
-
- var centerTextValue = svg.append("text")
- .attr("y", CosdeletionD3Config.centerTextValueDy)
- .attr("x", CosdeletionD3Config.centerTextValueDx)
- .attr("class", "cosdeletioncenterValue");
- var centerTextLabel = svg.append("text")
- .attr("y", CosdeletionD3Config.centerTextLabelDy)
- .attr("x", CosdeletionD3Config.centerTextLabelDx)
- .attr("class", "cosdeletioncenterLabel");
- var maxbandwidthText = svg.append("text")
- .attr("y", CosdeletionD3Config.maxbandwidthTextDy)
- .attr("x", CosdeletionD3Config.maxbandwidthTextDx)
- .attr("class", "cosdeletionmaxbandwidthText");
-
- var color = d3.scale.ordinal().range(dynamicColorRange);
- centerTextValue.text(totalUsed-selectedBandwidth);
- centerTextLabel.text(CosdeletionD3Config.defaultcenterlabel);
- maxbandwidthText.text(totalBandwidth + " " + CosdeletionD3Config.defaultcenterlabel);
-
- var pie = d3.layout.pie()
- .sort(null)
- .startAngle(CosdeletionD3Config.guageStartAngle)
- .endAngle(CosdeletionD3Config.guageEndAngle)
- .value(function(d) {
- return d.value;
- });
-
- var g = svg.selectAll(".arc")
- .data(pie(data))
- .enter()
- .append("g")
- .attr("class", "arc")
- .attr("id", function(d, i) {
- return "cosdeletionarc-" + d.data.id;
- })
- .style("cursor", "pointer");
-
- arcPath = g.append("path")
- .style("fill", function(d) {
- return color(d.data.name);
- }).attr("id", function(d, i) {
- return "cosdeletionpath-" + d.data.id;
- })
- .transition()
- .ease("exp")
- .duration(0)
- .attrTween("d", tweenPie);
-
- arcPath = arcPath[0];
- for (var i = 0; i < arcPath.length; i++) {
- var id = arcPath[i].id;
- if (id !== 'cosdeletionpath-remaining' && id !== 'cosdeletionpath-selectedBandwidth') {
- d3.select("path#" + id).transition().attr("d", arcOver);
- }
- }
-
- if (remainingBandwidth > 0) {
- if(angular.isDefined(newValue) && angular.isDefined(oldValue)){
- for (var k = 0; k < selectedElem.length; k++) {
- var index =selectedElem[k].index;
- d3.select("path#cosdeletionpath-" + index).style('stroke', CosdeletionD3Config.chartcolor.UsedBandwidthStrokeColor).style("stroke-width", CosdeletionD3Config.chartcolor.UsedBandwidthStrokeWidth);
- }
- }
- d3.select("#" + attrs.id + " path#cosdeletionpath-remaining").style('stroke', CosdeletionD3Config.chartcolor.RemainingBandwidthStrokeColor).style("stroke-width", CosdeletionD3Config.chartcolor.RemainingBandwidthStrokeWidth);
- }
- };
-
- function tweenPie(b) {
- var i = d3.interpolate({
- startAngle: 2.1 * Math.PI,
- endAngle: 2.1 * Math.PI
- }, b);
- return function(t) {
- return arc(i(t));
- };
- }
- }
- };
- }]);
-angular.module('att.charts.cosmultichartD3', ['att.charts.utilities'])
- .constant("CosMultiChartD3Config",
- {
- "chartcolor": {
- "paletteColors": ["#44c6f7", "#4ba90b", "#d70e80", "#ff9900", "#81017e", "#cccccc"], //default color options for rendering chart baseColor and NeedleColor,
- "zeroTicketColor": ["#d3d3d3"]
- },
- "defaultcenterlabel": "CoS",
- "defaultcentercategory": "2V/2/3/4/5",
- "zoomLevel": "25",
- "doughnutratio": 20,
- "animduration": "300",
- "legendreqd": "false",
- "initduration": "1000",
- "legendposition": "top",
- "centerTextValueDy": "0",
- "centerTextValueDx": "0",
- "centerTextPercentDx": "22",
- "centerTextPercentDy": "-8",
- "centerTextLabelDy": "20",
- "centerTextLabelDx": "0",
- "arcOverMargin": 5
- })
- .directive('attCosmultid3Chart', ['CosMultiChartD3Config', '$timeout','$extendObj', function (CosMultiChartD3Config, $timeout,$extendObj) {
- return {
- restrict: 'A',
- scope: {
- chartData: '=',
- chartConfig: '='
- },
- templateUrl: 'template/cosmultichartD3/attCosmultid3Chart.html',
- transclude: true,
- replace: true,
- controller: ['$scope', '$attrs', function ($scope, $attrs) {
-
- if (angular.isDefined($scope.chartConfig)) {
- CosMultiChartD3Config = $extendObj.extendDeep(CosMultiChartD3Config, $scope.chartConfig);
- }
-
- $scope.addLegendColor = function (id, item) {
- return {"color": CosMultiChartD3Config.chartcolor.paletteColors[id]};
- };
-
- $scope.chartID = $attrs.id;
- if (!angular.isDefined($attrs.legendRequired)) {
- $scope.legendRequired = CosMultiChartD3Config.legendreqd;
- } else {
- $scope.legendRequired = $attrs.legendRequired;
- }
- if (!angular.isDefined($attrs.legendPosition)) {
- $scope.legendPosition = CosMultiChartD3Config.legendposition;
- } else {
- $scope.legendPosition = $attrs.legendPosition;
- }
- }],
- link: function (scope, element, attrs) {
- var zoom = parseInt(CosMultiChartD3Config.zoomLevel, 0),
- pi = Math.PI,
- margin = {// optionally set margins
- top: zoom,
- right: zoom,
- bottom: zoom,
- left: zoom
- },
- width = attrs.chartWidth,
- height = attrs.chartHeight,
- radius = Math.min(
- width - (margin.left + margin.right),
- height - (margin.top + margin.bottom)) / 2;
-
- function renderChart() {
- var color = d3.scale.ordinal().range(CosMultiChartD3Config.chartcolor.paletteColors);
- d3.select("svg#" + attrs.id).remove();
- d3.selectAll("svg#" + attrs.id + " > *").remove();
- var totalCosVal = 0, remainingCosVal;
- for (var j = 0; j < scope.chartData.length; j++) {
- var chartObj = scope.chartData[j];
- totalCosVal = (totalCosVal + parseInt(chartObj.value, 10));
- }
- remainingCosVal = 100 - parseInt(totalCosVal, 10);
- var data = angular.copy(scope.chartData);
- if (angular.isDefined(remainingCosVal)) {
- data.push({name: "rest", value: remainingCosVal});
- }
- element[0].querySelector('.cosmultid3Container').setAttribute('id', attrs.id);
- // build chart
- var svg = d3.select(".cosmultid3Container#" + attrs.id)
- .attr("style", "height: " + attrs.chartHeight + "px;")
- .append("svg")
- .attr("id", attrs.id)
- .attr("width", "100%")
- .attr("height", "100%")
- .attr('viewBox', '0 0 ' + Math.min(width, height) + ' ' + Math.min(width, height))
- .attr('preserveAspectRatio', 'xMinYMin')
- .append("g")
- .attr("transform", "translate(" + Math.min(width, height) / 2 + "," + Math.min(width, height) / 2 + ")");
- // set radius
- var arc = d3.svg.arc()
- .innerRadius(radius - CosMultiChartD3Config.doughnutratio)
- .outerRadius(radius);
- // set hovered radius
- var arcOver = d3.svg.arc()
- .innerRadius(radius - CosMultiChartD3Config.doughnutratio)
- .outerRadius(radius + CosMultiChartD3Config.arcOverMargin);
- // add center text element
- var centerTextValue = svg.append("text")
- .attr("y", CosMultiChartD3Config.centerTextValueDy)
- .attr("x", CosMultiChartD3Config.centerTextValueDx)
- .attr("class", "cosmultichartcenterValue");
- var centerTextPercent = svg.append("text")
- .attr("x", CosMultiChartD3Config.centerTextPercentDx)
- .attr("y", CosMultiChartD3Config.centerTextPercentDy)
- .attr("class", "cosmultichartcenterPercent");
- var centerTextLabel = svg.append("text")
- .attr("y", CosMultiChartD3Config.centerTextLabelDy)
- .attr("x", CosMultiChartD3Config.centerTextLabelDx)
- .attr("class", "cosmultichartcenterLabel");
- centerTextValue.text(totalCosVal);
- centerTextPercent.text("%");
- centerTextLabel.text(CosMultiChartD3Config.defaultcenterlabel +" " + CosMultiChartD3Config.defaultcentercategory);
-
- if (totalCosVal <= 0) {
- arc.startAngle(0).endAngle(2 * pi); //just radians
- svg.append("path")
- .attr("d", arc)
- .attr("fill", CosMultiChartD3Config.chartcolor.zeroTicketColor);
- } else {
- var pie = d3.layout.pie()
- .sort(null)
- .startAngle(3.2 * Math.PI)
- .endAngle(5.2 * Math.PI)
- .value(function (d) {
- return d.value;
- });
-
- var g = svg.selectAll(".arc")
- .data(pie(data))
- .enter()
- .append("g")
- .attr("class", "arc")
- .attr("id", function (d, i) {
- return "cosmultiarc-" + i;
- })
- .style("cursor", "pointer");
-
- g.append("path")
- .style("fill", function (d) {
- return color(d.data.name);
- })
- .attr("id", function (d, i) {
- return "cosmultipath-" + i;
- })
- .style("stroke", "white")
- .style("stroke-width", 1)
- .on("mouseover", function (d) {
- d3.select(this).transition()
- .duration(CosMultiChartD3Config.animduration)
- .attr("d", arcOver);
- })
- .on("mouseout", function (d) {
- d3.select(this).transition()
- .duration(CosMultiChartD3Config.animduration)
- .attr("d", arc);
- })
- .transition()
- .ease("exp")
- .duration(0)
- .attrTween("d", tweenPie);
-
-
- }
- function tweenPie(b) {
- var i = d3.interpolate({
- startAngle: 2.1 * Math.PI,
- endAngle: 2.1 * Math.PI
- }, b);
- return function (t) {
- return arc(i(t));
- };
- }
- }
-
- scope.$watch('chartConfig', function(value) {
- if (angular.isDefined(scope.chartConfig)) {
- CosMultiChartD3Config = $extendObj.extendDeep(CosMultiChartD3Config, scope.chartConfig);
- }
-
- renderChart();
- }, true);
-
- scope.$watch('chartData', function (value) {
- renderChart();
- });
- }
- };
- }]);
-angular.module('att.charts.donutD3', ['att.charts.utilities'])
- .constant("DonutChartD3Config",
- {
- "chartcolor": {
- "paletteColors": ["#676767", "#96B1D0", "#0B2477", "#FF9900", "#81017D", "#B6BF00", "#DA0081", "#00C7B2"], //default color options for rendering chart
- "zeroTicketColor": ["#d3d3d3"],
- "centerTicketCountHoverColor":["#0574AC"]
- },
- "zoomlevel": "25",
- "defaultcenterlabel": "Total",
- "donutratio": "1.5",
- "initduration": "1000",
- "animduration": "300",
- "legendreqd": "false",
- "legendposition": "right",
- "centerTextLabelDy": "20",
- "clipMargin": "400",
- "arcOverMargin":10
- })
- .directive('attDonutd3Chart', ['DonutChartD3Config', '$timeout','$extendObj', function (DonutChartD3Config, $timeout,$extendObj) {
- return {
- restrict: 'A',
- scope: {
- chartData: '=',
- chartColor: '=',
- chartConfig: '=',
- refreshChart: '=',
- onclickcallback: '&',
- legendclickcallback: '&',
- centerclickcallback: '&'
- },
- templateUrl: 'template/donutD3/attDonutd3Chart.html',
- transclude: true,
- replace: true,
- controller: ['$scope', '$attrs', function ($scope, $attrs) {
- if (angular.isDefined($scope.chartConfig)) {
- DonutChartD3Config = $extendObj.extendDeep(DonutChartD3Config,$scope.chartConfig);
- }
- var legendColors = [];
- legendColors = ($scope.chartColor) ? $scope.chartColor : DonutChartD3Config.chartcolor.paletteColors;
- $scope.addLegendColor = function (id, item) {
- if (item.value > 0) {
- return {"color": legendColors[id]};
- } else {
- return {"color": DonutChartD3Config.chartcolor.zeroTicketColor};
- }
- };
- $scope.chartID = $attrs.id;
- if (!angular.isDefined($attrs.legendRequired)) {
- $scope.legendRequired = DonutChartD3Config.legendreqd;
- } else {
- $scope.legendRequired = $attrs.legendRequired;
- }
- if (!angular.isDefined($attrs.legendPosition)) {
- $scope.legendPosition = DonutChartD3Config.legendposition;
- } else {
- $scope.legendPosition = $attrs.legendPosition;
- }
- $scope.addStyle = function (elem) {
- if ($scope.legendRequired && angular.isDefined($scope.legendPosition)) {
- if ($attrs.legendPosition === "right") {
- return "floatLeft";
- } else {
- if (elem === 'chartLegend')
- {
- return "floatLeft";
- }
- else
- {
- return "floatRight";
- }
- }
- } else {
- return "floatLeft";
- }
- };
- }],
- link: function (scope, element, attrs) {
- scope.$watch('refreshChart', function () {
- if (angular.isDefined(scope.refreshChart)) {
- if (scope.refreshChart !== true)
- {
- return;
- } else {
- for (var j = 0; j < scope.chartData.length; j++) {
- var chartObj =scope.chartData[j];
- var className = (chartObj.name).replace(/ /g, "").toUpperCase();
- angular.element(document.querySelector("[chart-legend-id=" + className + "]")).removeClass("active");
- }
-
- }
-
- }
-
- if (angular.isDefined(scope.chartConfig)) {
- DonutChartD3Config = $extendObj.extendDeep(DonutChartD3Config, scope.chartConfig);
- }
- d3.select("svg#" + attrs.id).remove();
- d3.selectAll("svg#" + attrs.id + " > *").remove();
- var selectedPath = "",
- lastSelected,
- pi = Math.PI;
- var zoom = parseInt(DonutChartD3Config.zoomlevel, 0),
- coloroptions = (scope.chartColor) ? scope.chartColor : DonutChartD3Config.chartcolor.paletteColors,
- defaultcenterlabel = DonutChartD3Config.defaultcenterlabel,
- totalcount = 0,
- margin = {// optionally set margins
- top: zoom,
- right: zoom,
- bottom: zoom,
- left: zoom
- },
- // set height and width plus margin so zoomed area is not clipped
- /* width = parseInt(attrs.chartWidth, 0) - (margin.left + margin.right),
- height = parseInt(attrs.chartHeight, 0) - (margin.top + margin.bottom),
- radius = Math.min(
- width - (margin.left + margin.right),
- height - (margin.top + margin.bottom)) / 2,*/
- width = attrs.chartWidth,
- height = attrs.chartHeight,
- radius = Math.min(
- width - (margin.left + margin.right),
- height - (margin.top + margin.bottom)) / 2,
- color = d3.scale.ordinal().range(coloroptions);
- if (angular.isDefined(scope.chartData)) {
- for (var i in scope.chartData) {
- if (angular.isDefined(scope.chartData[i].value)) {
- totalcount = (totalcount + parseInt(scope.chartData[i].value, 10));
- }
- }
- }
-
- var data=[];
- for (var z = 0; z < scope.chartData.length; z++) {
- var chartElem =scope.chartData[z];
- if(chartElem.value <= 0){
- data.push({index: z, value: chartElem.value});
- }
- }
- var chartStyle = d3.select(".chartContainer#" + attrs.id)
- .attr("style");
- var chart = d3.select(".chartContainer#" + attrs.id)
- .attr("style", "height: " + attrs.chartHeight + "px;width:" + attrs.chartWidth + "px;")
- .append("svg")
- .attr("id", attrs.id)
- .attr("width", '100%')
- .attr("height", '100%')
- .attr('viewBox', '0 0 ' + Math.min(width, height) + ' ' + Math.min(width, height))
- .attr('preserveAspectRatio', 'xMinYMin')
- .append("g")
- .attr("transform", "translate(" + Math.min(width, height) / 2 + "," + Math.min(width, height) / 2 + ")");
- // set radius
- var arc = d3.svg.arc()
- .innerRadius(radius / DonutChartD3Config.donutratio)
- .outerRadius(radius);
- // add center text element
- var centerTextValue = chart.append("text")
- .attr("class", "donutcenterValue")
- .attr("id", attrs.id + "count")
- .on("click", function (d) {
- var value = d3.select("g > text#" + attrs.id + "count").text();
- var label = d3.select("g > text#" + attrs.id + "category").text();
- if (angular.isDefined(scope.onclickcallback)) {
- scope.centerclickcallback({count: value, category: label});
- }
- });
- var centerTextLabel = chart.append("text")
- .attr("y", DonutChartD3Config.centerTextLabelDy)
- .attr("class", "donutcenterLabel")
- .attr("id", attrs.id + "category");
-
- centerTextValue.text(totalcount);
- centerTextLabel.text(defaultcenterlabel);
- if (totalcount <= 0) {
- arc.startAngle(0).endAngle(2 * pi); //just radians
- chart.append("path")
- .attr("d", arc)
- .attr("fill", DonutChartD3Config.chartcolor.zeroTicketColor);
- } else {
- // set hovered radius
- var arcOver = d3.svg.arc()
- .innerRadius(radius / DonutChartD3Config.donutratio)
- .outerRadius(radius + DonutChartD3Config.arcOverMargin);
- var pie = d3.layout.pie()
- .sort(null)
- .startAngle(1.1 * Math.PI)
- .endAngle(3.1 * Math.PI)
- .value(function (d) {
- return d.value;
- });
- var g = chart.selectAll(".arc")
- .data(pie(scope.chartData))
- .enter()
- .append("g")
- .attr("class", "arc")
- .style("cursor", "pointer");
- // set fill color and animate tween
- g.append("path")
- .style("fill", function (d) {
- return color(d.data.name);
- })
- .attr("path-id",function (d, i) {
- return "b-" + i;
- })
- .style("stroke", "white")
- .style("stroke-width", 1)
- .on("mouseover", function (d) {
- d3.select(this).transition()
- .duration(DonutChartD3Config.animduration)
- .attr("d", arcOver);
-
- centerTextValue.text(d3.select(this).datum().data.value);
- centerTextLabel.text(d3.select(this).datum().data.name);
- var className = d3.select(this).datum().data.name.replace(/ /g, "").toUpperCase();
- angular.element(document.querySelector("[chart-legend-id=" + className + "]")).addClass("active");
- })
- .on("mouseout", function (d) {
- if (!this.getAttribute("clicked")) {
- d3.select(this).transition()
- .duration(DonutChartD3Config.animduration)
- .attr("d", arc);
- if (selectedPath.length === 0) {
- centerTextValue.text(totalcount);
- centerTextLabel.text(defaultcenterlabel);
- } else {
- centerTextValue.text(selectedPath.datum().data.value);
- centerTextLabel.text(selectedPath.datum().data.name);
- }
- var className = d3.select(this).datum().data.name.replace(/ /g, "").toUpperCase();
- angular.element(document.querySelector("[chart-legend-id=" + className + "]")).removeClass("active");
- } else if (angular.isDefined(lastSelected) && lastSelected!=="") {
- lastSelected.transition()
- .duration(DonutChartD3Config.animduration)
- .attr("d", arc);
- if (angular.isDefined(lastSelected)) {
- var prevclassName = lastSelected.datum().data.name.replace(/ /g, "").toUpperCase();
- angular.element(document.querySelector("[chart-legend-id=" + prevclassName + "]")).removeClass("active");
- }
- }
- })
- .on("click", function (d, i) {
- if (angular.isDefined(scope.onclickcallback)) {
- scope.onclickcallback({name: d3.select(this).datum().data.name, value: d3.select(this).datum().data.value});
- }
- if (!this.getAttribute("clicked")) {
- this.setAttribute("clicked", "clicked");
- if (selectedPath !== "") {
- lastSelected = selectedPath;
- selectedPath[0][0].removeAttribute("clicked");
- }
- selectedPath = d3.select(this);
- } else {
- if (this.getAttribute("path-id") === selectedPath.attr("path-id")) {
- selectedPath[0][0].removeAttribute("clicked");
- selectedPath = "";
- }
- }
-
- })
- .transition()
- .ease("exp")
- .duration(DonutChartD3Config.initduration)
- .attrTween("d", tweenPie);
- // animate function
- scope.legendMouseOver = function (item, id, e) {
- selectedId="b-"+id;
- if (item.value > 0) {
- scope.LegendClass = "";
- this.LegendClass = "active";
- centerTextValue.text(item.value);
- centerTextLabel.text(item.name);
- d3.selectAll(".chartContainer#"+attrs.id+" "+"path").each(function(d, i) {
- if(this.getAttribute("path-id")==selectedId){
- d3.select(this).transition()
- .duration(DonutChartD3Config.animduration)
- .attr("d", arcOver);
- }
- });
-
- d3.select("#TicketGraphcount").style('fill',DonutChartD3Config.chartcolor.centerTicketCountHoverColor);
- }
- };
- scope.legendMouseLeave = function (item, id, e) {
- selectedId="b-"+id;
- hoveredLegendItem=this;
- if (item.value > 0) {
- if (selectedPath.length === 0) {
- centerTextValue.text(totalcount);
- centerTextLabel.text(defaultcenterlabel);
- } else {
- centerTextValue.text(selectedPath.datum().data.value);
- centerTextLabel.text(selectedPath.datum().data.name);
- }
- d3.selectAll(".chartContainer#"+attrs.id+" "+"path").each(function(d, i) {
- if(this.getAttribute("path-id")==selectedId){
- if(this.getAttribute("clicked")===null){
- hoveredLegendItem.LegendClass = "";
- d3.select(this).transition().duration(DonutChartD3Config.animduration).attr("d", arc);
- }
- }
- });
- d3.select("#TicketGraphcount").style('fill', "#000");
-
- }
- };
- }
- function tweenPie(b) {
- var i = d3.interpolate({
- startAngle: 1.1 * Math.PI,
- endAngle: 1.1 * Math.PI
- }, b);
- return function (t) {
- return arc(i(t));
- };
- }
- $timeout(function () {
- var h = element.find("ul")[0].clientHeight,
- fHeight = (parseInt(height, 10) - h),
- className = scope.addStyle('chartContainer');
- fHeight = (fHeight < 0) ? 0 : fHeight;
- angular.element(element[0].querySelector('.chartContainer')).addClass(className);
- angular.element(element[0].querySelector(".chartLegend")).css({
- "margin-top": (fHeight / 2) + "px"
- });
- }, 200);
- for (var k = 0; k < data.length; k++) {
- var index =data[k].index;
- var zeroValIndex="b-"+index;
- if(data[k].value <= 0){
- removeStrokelines(zeroValIndex);
- }
-
- }
-
- function removeStrokelines(zeroValIndex){
- d3.selectAll(".chartContainer#"+attrs.id+" "+"path").each(function(d, i) {
- if(this.getAttribute("path-id")==zeroValIndex){
- d3.select(this).style('stroke', "").style("stroke-width", "");
- }
- });
- }
- scope.refreshChart = false;
- });
-
- }
- };
- }])
- .filter('filterData', function () {
- return function (input) {
- return input.replace(/ /g, "").toUpperCase();
- };
- });
-angular.module('att.charts.donutFusion', [])
- .constant("DonutChartFusionConfig",
- {
- "chart": {
- "caption": "Tickets",
- "startingAngle": 0,
- "theme": "fist",
- "captionPadding": "0",
- "paletteColors": "#FF0066,#00CCFF,#00CC66,#6699FF,#000099,#660066,#FF6600,#4D4D4D", //default color options for rendering chart
- "enableSmartLabels": "0",
- "enableMultiSlicing": "1",
- "donutRadius": "65",
- "pieRadius": "110",
- "showLabels": "0",
- "showValues": "0",
- "showBorder": "0",
- "showpercentintooltip": "0",
- "bgcolor": "#FFFFFF",
- "defaultCenterLabel": "Total",
- "showshadow": 0,
- "centerLabel": "$value $label",
- "plotHoverEffect": 1,
- "plotBorderHoverDashGap": "50",
- "enableRotation": "0",
- "baseFont": "Arial",
- "baseFontColor": "#666666",
- "use3DLighting": "0",
- "numbersuffix": "",
- "defaultAnimation": "0",
- "showValuesOnHover": 0
- }
- })
- .directive('attDonutfusionChart', ['DonutChartFusionConfig', '$timeout', function (DonutChartFusionConfig, $timeout) {
- 'use strict';
- return {
- restrict: 'A',
- scope: {
- chartData: '=',
- onclickcallback: '&'
- },
- templateUrl: 'template/donutFusion/attDonutfusionChart.html',
- transclude: true,
- replace: true,
- link: function (scope, element, attrs, controller, transclude) {
- var totalItems = 0;
- if (angular.isDefined(scope.chartData)) {
- for (var i in scope.chartData) {
- if(angular.isDefined(scope.chartData[i].value)){
- totalItems = (totalItems + parseInt(scope.chartData[i].value, 10));
- }
- }
- }
- DonutChartFusionConfig.data = scope.chartData;
- var donutChartDataSource = DonutChartFusionConfig;
- var defaultCenterLabelText;
- defaultCenterLabelText = totalItems + ' ' + DonutChartFusionConfig.chart.defaultCenterLabel;
- donutChartDataSource.chart.defaultCenterLabel = defaultCenterLabelText;
-
- var initChart = function () {
- FusionCharts.ready(function () {
- var donutChart = new FusionCharts({
- type: 'doughnut2d',
- renderAt: "donutFusionChart",
- //width: '100%',
- width: attrs.chartWidth,
- height: attrs.chartHeight,
- dataFormat: 'json',
- dataSource: donutChartDataSource,
- events: {
- //dataPlotRollOver event is raised whenever you hover over a data plot (column, anchor of line or area, pie etc.)
- "dataPlotRollOver": function (evtObj, argumentsObject) {
- var selectedLabelArr = argumentsObject.toolText.split(",");
- var className = selectedLabelArr[0].replace(/ /g, "").toUpperCase();
- angular.element(document.querySelector("[chart-legend-id=" + className + "_fusion" + "]")).addClass("active");
- },
- "dataPlotRollOut": function (evtObj, argObj) {
- var selectedLabelArr = argObj.toolText.split(",");
- var className = selectedLabelArr[0].replace(/ /g, "").toUpperCase();
- angular.element(document.querySelector("[chart-legend-id=" + className + "_fusion" + "]")).removeClass("active");
- },
- "dataPlotClick": function (evtObj, argObj) {
- if(angular.isDefined(scope.onclickcallback)){
- scope.onclickcallback({evtObj:evtObj, argObj:argObj});
- }
- }
- }
- });
- donutChart.render();
- DonutChartFusionConfig.chart.defaultCenterLabel = DonutChartFusionConfig.chart.defaultCenterLabel;
- });
- };
- initChart();
- $timeout(function () {
- var w = element.find("ul")[0].clientHeight,
- fWidth = (parseInt(attrs.chartHeight, 10) - w);
- element.find("ul").css("margin-top", (fWidth / 2) + "px");
-
- }, 200);
- },
- controller: function ($scope, $element, $attrs) {
- var legendColors = [];
- legendColors = DonutChartFusionConfig.chart.paletteColors.split(",");
- $scope.addLegendColor = function (id) {
- return {"color": legendColors[id]};
- };
- $scope.legendRequired = $attrs.legendRequired;
-
- $scope.addStyle = function (elem) {
- if ($scope.legendRequired && angular.isDefined($attrs.legendPosition)) {
- if ($attrs.legendPosition === "right") {
- if (elem === 'chartLegend')
- {
- return {"float": "left"};
- }
- else
- {
- return {"float": "left"};
- }
- } else {
- if (elem === 'chartLegend')
- {
- return {"float": "left"};
- }
- else
- {
- return {"float": "right"};
- }
- }
- } else {
- return {"float": "left"};
- }
- };
- }
- };
- }])
- .filter('filterData', function () {
- return function (input) {
- return input.replace(/ /g, "").toUpperCase();
- };
- });
-angular.module('att.charts.horseshoeD3', ['att.charts.utilities'])
- .constant("HorseShoeChartD3Config",
- {
- "chartcolor": {
- "paletteColors": ["#1072b8", "#FEFFF7"], //default color options for rendering chart baseColor and NeedleColor,
- "paletteBorderColors": ["#1072b8", "#000"]
- },
- "defaultcenterlabel": "COS 1",
- "defaultcentercategory": "Real Time",
- "animduration": 500,
- "legendreqd": "false",
- "legendposition": "top",
- "centerTextLabelDy": "20"
- })
- .directive('attHorseshoed3Chart', ['HorseShoeChartD3Config', '$timeout','$extendObj', function (HorseShoeChartD3Config, $timeout,$extendObj) {
- return {
- restrict: 'A',
- scope: {
- chartConfig: '=',
- initVal: '=',
- horseShoeId: '@'
- },
- templateUrl: 'template/horseshoeD3/attHorseshoeD3Chart.html',
- transclude: true,
- replace: true,
- controller: ['$scope', '$attrs',function ($scope, $attrs) {
- if (angular.isDefined($scope.chartConfig)) {
- HorseShoeChartD3Config = $extendObj.extendDeep(HorseShoeChartD3Config, $scope.chartConfig);
- }
- var legendColor = [];
- legendColor = HorseShoeChartD3Config.chartcolor.paletteColors;
- $scope.addLegendColor = function () {
- return {"color": legendColor[0]};
- };
- if (!angular.isDefined($attrs.legendRequired)) {
- $scope.legendRequired = HorseShoeChartD3Config.legendreqd;
- } else {
- $scope.legendRequired = $attrs.legendRequired;
- }
- if (!angular.isDefined($attrs.legendPosition)) {
- $scope.legendPosition = HorseShoeChartD3Config.legendposition;
- } else {
- $scope.legendPosition = $attrs.legendPosition;
- }
- }],
- link: function (scope, element, attrs) {
- var radius = Math.min(attrs.chartWidth, attrs.chartHeight) / 2;
- scope.LegendLabel = HorseShoeChartD3Config.defaultcenterlabel;
- scope.LegendCategory = HorseShoeChartD3Config.defaultcentercategory;
- var duration = HorseShoeChartD3Config.animduration,
- guageVal = parseInt(scope.initVal.value, 10);
- scope.guageVal = guageVal + "%";
- var dataset = {
- lower: calcPercent(0),
- upper: calcPercent(guageVal)
- },
- pie = d3.layout.pie().sort(null),
- format = d3.format(".0%");
- var arc = d3.svg.arc()
- .innerRadius(radius - 20)
- .outerRadius(radius)
- .startAngle(function (d) {
- return d.startAngle + 2.6 * Math.PI / 2;
- })
- .endAngle(function (d) {
- return d.endAngle + 2.6 * Math.PI / 2;
- });
-
- element[0].querySelector('.horseshoed3Container').setAttribute('id', scope.horseShoeId);
-
- var svg = d3.select(".horseshoed3Container#" + scope.horseShoeId)
- .attr("style", "height: " + attrs.chartHeight + "px;")
- .append("svg")
- .attr("id", scope.horseShoeId)
- .attr("width", "100%")
- .attr("height", "100%")
- .attr('viewBox', '0 0 ' + Math.min(attrs.chartWidth, attrs.chartHeight) + ' ' + Math.min(attrs.chartWidth, attrs.chartHeight))
- .attr('preserveAspectRatio', 'xMinYMin')
- .append("g")
- .attr("transform", "translate(" + Math.min(attrs.chartWidth, attrs.chartHeight) / 2 + "," + Math.min(attrs.chartWidth, attrs.chartHeight) / 2 + ")");
- var path = svg.selectAll("path")
- .data(pie(dataset.lower))
- .enter().append("path")
- .attr("class", function (d, i) {
- return "color" + i;
- })
- .attr("fill", HorseShoeChartD3Config.chartcolor.paletteColors[1])
- .attr("stroke", HorseShoeChartD3Config.chartcolor.paletteBorderColors[1])
- .attr("d", arc)
- .each(function (d) {
- this._current = d;
- }); // store the initial values
- // add center text element
- var centerTextValue = svg.append("text")
- .attr("class", "horseshoecenterValue");
- var centerTextLabel = svg.append("text")
- .attr("y", HorseShoeChartD3Config.centerTextLabelDy)
- .attr("class", "horseshoecenterLabel");
- if (typeof (guageVal) === "string") {
- centerTextValue.text(guageVal);
- centerTextLabel.text(HorseShoeChartD3Config.defaultcenterlabel + "(" + HorseShoeChartD3Config.defaultcentercategory + ")");
- }
- else {
- var progress = 0;
- var timeout = setTimeout(function () {
- clearTimeout(timeout);
- path = path.data(pie(dataset.upper)); // update the data
- path.transition().duration(duration).attrTween("d", function (a, index) {
- angular.element(this)
- .attr("fill", HorseShoeChartD3Config.chartcolor.paletteColors[index])
- .attr("stroke", HorseShoeChartD3Config.chartcolor.paletteBorderColors[index]);
-
- var i = d3.interpolate(this._current, a);
- var i2 = d3.interpolate(progress, guageVal);
- this._current = i(0);
- return function (t) {
- centerTextValue.text(format(i2(t) / 100));
- centerTextLabel.text(HorseShoeChartD3Config.defaultcenterlabel + "(" + HorseShoeChartD3Config.defaultcentercategory + ")");
- return arc(i(t));
- };
- }); // redraw the arcs
-
- }, 200);
- }
- scope.$watch('initVal', function (value) {
- scope.guageVal = value.value + "%";
- path.data(pie(calcPercent(value.value)));
- path.transition().duration(duration).attrTween("d", function (a, index) {
- angular.element(this)
- .attr("fill", HorseShoeChartD3Config.chartcolor.paletteColors[index])
- .attr("stroke", HorseShoeChartD3Config.chartcolor.paletteBorderColors[index]);
-
- var i = d3.interpolate(this._current, a);
- var i2 = d3.interpolate(progress, value.value);
- this._current = i(0);
- return function (t) {
- centerTextValue.text(format(i2(t) / 100));
- centerTextLabel.text(HorseShoeChartD3Config.defaultcenterlabel + "(" + HorseShoeChartD3Config.defaultcentercategory + ")");
- return arc(i(t));
- };
- }); // redraw the arcs
-
- });
- function calcPercent(guageVal) {
- return [guageVal, 100 - guageVal];
- }
-
- }
- };
- }]);
-angular.module('att.charts.radialguageD3', ['att.charts.utilities'])
- .constant("RadialGuageChartD3Config",
- {
- "chartcolor": {
- "MaxBandwidthReached": ["#efefef"],
- "ZeroBandwidthSelected": ["#FEFFF7"],
- "RemainingBandwidthColor": ["#FEFFF7"],
- "RemainingBandwidthStrokeColor": ["#000000"],
- "UsedBandwidthColor": ["#1072b8"],
- "MouseOverArcFillColor": ["#0091d9"],
- "RemainingBandwidthStrokeWidth":1,
- "UsedBandwidthStrokeWidth":1,
- "UsedBandwidthStrokeColor":["#efefef"]
- },
- "defaultcenterlabel": "Kbps",
- "maxAllowedUnitsLabel": "Kbps",
- "zoomLevel": "25",
- "doughnutratio": 20,
- "animduration": "300",
- "guageStartAngle":4,
- "guageEndAngle":8.56,
- "legendreqd": "false",
- "legendposition": "top",
- "centerTextLabelDy": "20",
- "centerTextValueDy": "0",
- "centerTextValueDx": "0",
- "centerTextLabelDx": "0",
- "maxbandwidthTextDx": "65",
- "maxbandwidthTextDy": "100",
- "arcOverMargin": 5
- })
- .directive('attRadialguaged3Chart', ['RadialGuageChartD3Config', '$timeout','$extendObj', function(RadialGuageChartD3Config, $timeout,$extendObj) {
- return {
- restrict: 'A',
- scope: {
- maxValue: '=',
- chartData: '=',
- chartConfig: '=',
- resetChart: '=',
- mouseOver: '=?'
- },
- controller: ['$scope', '$attrs', function($scope, $attrs) {
- if (angular.isDefined($scope.chartConfig)) {
- RadialGuageChartD3Config = $extendObj.extendDeep(RadialGuageChartD3Config, $scope.chartConfig);
- }
-
- }],
- link: function(scope, element, attrs) {
- var zoom = parseInt(RadialGuageChartD3Config.zoomLevel, 0),
- margin = {// optionally set margins
- top: zoom,
- right: zoom,
- bottom: zoom,
- left: zoom
- },
- width = attrs.chartWidth,
- height = attrs.chartHeight,
- radius = Math.min(
- width - (margin.left + margin.right),
- height - (margin.top + margin.bottom)) / 2;
- // set radius
- var arc = d3.svg.arc()
- .innerRadius(radius - RadialGuageChartD3Config.doughnutratio)
- .outerRadius(radius);
- // set hovered radius
- var arcOver = d3.svg.arc()
- .innerRadius(radius - RadialGuageChartD3Config.doughnutratio)
- .outerRadius(radius + RadialGuageChartD3Config.arcOverMargin);
- // Browser onresize event
- window.onresize = function() {
- scope.$apply();
- };
-
- scope.$watch('mouseOver', function(val) {
- if (!angular.isDefined(scope.mouseOver)) { return; }
- var id = parseInt(scope.mouseOver.split('-')[1], 10);
- if (scope.mouseOver.split('-')[0] === 'true') {
- d3.select('path#radialguagepath-' + (id)).transition()
- .duration(parseInt(RadialGuageChartD3Config.animduration,10))
- .attr('d', arcOver);
-
- } else {
- d3.select('path#radialguagepath-' + (id)).transition()
- .duration(parseInt(RadialGuageChartD3Config.animduration,10))
- .attr('d', arc);
- }
- });
-
- scope.$watch('resetChart', function() {
- if (angular.isDefined(scope.resetChart)) {
- if (angular.isDefined(scope.chartData)) {
- scope.render(scope.chartData, scope.chartData);
- }
- scope.resetChart = false;
- }
- });
- scope.$watch('chartData', function(newValue, oldValue) {
- return scope.render(newValue, oldValue);
- }, true);
- scope.render = function(newValue, oldValue) {
- d3.select("svg#" + attrs.id).remove();
- d3.selectAll("svg#" + attrs.id + " > *").remove();
- if (!scope.chartData)
- {
- return;
- }
- var color, selectedSlider, totalBandwidth = 0, totalUsed = 0, remainingBandwidth = 0;
- if (angular.isDefined(scope.maxValue)) {
- totalBandwidth = parseInt(scope.maxValue, 0);
- }
- angular.forEach(newValue, function(val, key) {
- totalUsed = (totalUsed + parseInt(val.value, 10));
- if (newValue[key].value !== oldValue[key].value) {
- selectedSlider = key;
- }
- });
- var data = angular.copy(scope.chartData);
- if (totalUsed < totalBandwidth) {
- remainingBandwidth = totalBandwidth - parseInt(totalUsed, 0);
- data.push({name: "remaining", value: remainingBandwidth});
- }
- element[0].setAttribute('id', attrs.id);
- var svg = d3.select(element[0])
- .attr("style", "height: " + attrs.chartHeight + "px;")
- .append("svg")
- .attr("id", attrs.id)
- .attr("width", "100%")
- .attr("height", "100%")
- .attr('viewBox', '0 0 ' + Math.min(width, height) + ' ' + Math.min(width, height))
- .attr('preserveAspectRatio', 'xMinYMin')
- .append("g")
- .attr("transform", "translate(" + Math.min(width, height) / 2 + "," + Math.min(width, height) / 2 + ")");
-
- var centerTextValue = svg.append("text")
- .attr("y", RadialGuageChartD3Config.centerTextValueDy)
- .attr("x", RadialGuageChartD3Config.centerTextValueDx)
- .attr("class", "radialguagecenterValue");
- var centerTextLabel = svg.append("text")
- .attr("y", RadialGuageChartD3Config.centerTextLabelDy)
- .attr("x", RadialGuageChartD3Config.centerTextLabelDx)
- .attr("class", "radialguagecenterLabel");
- var maxbandwidthText = svg.append("text")
- .attr("y", RadialGuageChartD3Config.maxbandwidthTextDy)
- .attr("x", RadialGuageChartD3Config.maxbandwidthTextDx)
- .attr("class", "radialmaxbandwidthText");
- if (totalUsed > totalBandwidth) {
- totalUsed = totalBandwidth;
- data = [
- {
- name: "totalUsed",
- value: "100"
- }
- ];
- color = d3.scale.ordinal().range(RadialGuageChartD3Config.chartcolor.MaxBandwidthReached);
- } else if (totalUsed <= 0) {
- data = [
- {
- name: "totalUnUsed",
- value: "100"
- }
- ];
- color = d3.scale.ordinal().range(RadialGuageChartD3Config.chartcolor.ZeroBandwidthSelected);
-
- } else {
- var Colorpalette = [];
- if (newValue === oldValue) {
- data = [
- {
- name: "totalUsed",
- value: totalUsed
- }
- ];
- if (remainingBandwidth > 0) {
- data.push({name: "remaining", value: remainingBandwidth});
- }
- }
- for (var j = 0; j < data.length - 1; j++) {
- Colorpalette[j] = RadialGuageChartD3Config.chartcolor.UsedBandwidthColor;
- }
- if (remainingBandwidth > 0) {
- Colorpalette.push(RadialGuageChartD3Config.chartcolor.RemainingBandwidthColor);
- }
- color = d3.scale.ordinal().range(Colorpalette);
- }
-
- centerTextValue.text(totalUsed);
- centerTextLabel.text(RadialGuageChartD3Config.defaultcenterlabel);
- maxbandwidthText.text(totalBandwidth + " " + RadialGuageChartD3Config.maxAllowedUnitsLabel);
- var pie = d3.layout.pie()
- .sort(null)
- .startAngle(RadialGuageChartD3Config.guageStartAngle)
- .endAngle(RadialGuageChartD3Config.guageEndAngle)
- .value(function(d) {
- return d.value;
- });
-
- var g = svg.selectAll(".arc")
- .data(pie(data))
- .enter()
- .append("g")
- .attr("class", "arc")
- .attr("id", function(d, i) {
- return "radialguagearc-" + i;
- })
- .style("cursor", "pointer");
-
- if (newValue === oldValue) {
- g.append("path")
- .style("fill", function(d) {
- return color(d.data.name);
- })
- .attr("id", function(d, i) {
- return "radialguagepath-" + i;
- })
- .transition()
- .ease("exp")
- .duration(0)
- .attrTween("d", tweenPie);
- } else {
- g.append("path")
- .style("fill", function(d) {
- return color(d.data.name);
- })
- .attr("id", function(d, i) {
- return "radialguagepath-" + i;
- })
- .style("stroke", RadialGuageChartD3Config.chartcolor.RemainingBandwidthColor)
- .style("stroke-width", RadialGuageChartD3Config.chartcolor.UsedBandwidthStrokeWidth)
- .transition()
- .ease("exp")
- .duration(0)
- .attrTween("d", tweenPie);
- }
- if (totalUsed === totalBandwidth || remainingBandwidth > 0) {
- var count = data.length - 1;
- d3.select("#" + attrs.id + " path#radialguagepath-" + count).style('stroke', RadialGuageChartD3Config.chartcolor.RemainingBandwidthStrokeColor).style("stroke-width", RadialGuageChartD3Config.chartcolor.RemainingBandwidthStrokeWidth);
- }
- if (angular.isDefined(selectedSlider) && remainingBandwidth > 0) {
-
- d3.select("#" + attrs.id + " path#radialguagepath-" + selectedSlider).transition()
- .duration(RadialGuageChartD3Config.animduration)
- .attr("d", arcOver);
- d3.select("#" + attrs.id + " path#radialguagepath-" + selectedSlider).style('fill', RadialGuageChartD3Config.chartcolor.MouseOverArcFillColor);
- }
- function tweenPie(b) {
- var i = d3.interpolate({
- startAngle: 2.1 * Math.PI,
- endAngle: 2.1 * Math.PI
- }, b);
- return function(t) {
- return arc(i(t));
- };
- }
-
- };
-
-
- }
- };
- }]);
-angular.module('att.charts.stackedBarchart', ['att.charts.utilities'])
- .constant("stackBarChartConfig",
- {
- "chartcolor": ["#B2B2B2", "#00CC00"],
- "gridLineColor": "#CCCCCC",
- "yAxisMaxTicks": 4,
- "chartHeight": "200",
- "chartOpacity": 0.3,
- "amountKDivision": 1000,
- "amountKText": "K",
- "amountMDivision": 1000000,
- "amountMText": "M",
- "yearLabelPos": {"x": 10, "y": 15},
- "tooltipTopMargin": 110,
- "tooltipLeftMargin": 54,
- "margin": {
- top: 20,
- right: 80,
- bottom: 30,
- left: 52
- }
- })
- .directive('stackedBarChart', ['stackBarChartConfig', '$extendObj', '$timeout', function (stackBarChartConfig, $extendObj, $timeout) {
- return {
- restrict: 'A',
- scope: {
- chartData: '=',
- legendRequired: "=",
- refreshChart: "=",
- chartConfig: "="
- },
- templateUrl: "template/stackedBarchart/stackedBarchart.html",
- replace: true,
- controller: ['$scope', '$attrs', function ($scope, $attrs) {
- if (angular.isDefined($scope.chartConfig)) {
- stackBarChartConfig = $extendObj.extendDeep(stackBarChartConfig, $scope.chartConfig);
- }
- $scope.chartID = $attrs.id;
- $scope.legendColors = stackBarChartConfig.chartcolor;
- $scope.addLegendColor = function (id) {
- var bgColor = null;
- bgColor = {"background-color": $scope.legendColors[id]};
- return bgColor;
- };
- }],
- link: function (scope, element, attrs, ctrl) {
- scope.tooltipFlag = false;
- var dataObj, idx = 0, xAxisTicks, margin = stackBarChartConfig.margin,
- width = parseInt(attrs.chartWidth, 10),
- height = parseInt(stackBarChartConfig.chartHeight, 10),
- padding = 20,
- parseDate = d3.time.format("%d-%b-%Y").parse,
- tooltipFormat = d3.time.format("%B-%Y"),
- labelFormat = d3.time.format("%Y");
- attrs.$observe('legendRequired', function (val) {
- if (val === 'true') {
- scope.showLegend = true;
- }
- else {
- scope.showLegend = false;
- }
- });
- scope.$watch('refreshChart', function (value) {
- if (value === false) {
- return;
- }
-
- if (angular.isDefined(scope.chartConfig)) {
- stackBarChartConfig = $extendObj.extendDeep(stackBarChartConfig, scope.chartConfig);
- }
-
- d3.select("svg#" + attrs.id).remove();
- d3.selectAll("svg#" + attrs.id + " > *").remove();
- d3.selectAll("div#stackBarChartContainer" + " > div").remove();
- if (scope.chartData[0].values.length === 0) {
- scope.refreshChart = false;
- return;
- }
-
- var xMonth = [], yDomainData = [], yAxisData = [], yValue = [], tempData = [], tooltipData = {}, yearArr = {}, isSingleMonth = false;
-
- //X-Axis Range
- var xRange = d3.time.scale().range([padding, width - padding * 2]);
-
- //Y-Axis Range
- var yRange = d3.scale.linear().range([height - padding, padding]);
-
- dataObj = scope.chartData;
-
- dataObj.forEach(function (data) {
- var obj = data.values;
- xAxisTicks = obj.length;
- if (obj.length == 1) {
- isSingleMonth = true;
- }
- obj.forEach(function (d) {
- var tmp = "01-" + d.month;
- d.numericMonth = parseDate(tmp);
- yValue.push({'value': +d.value});
- d.value = +d.value;
- xMonth.push({'numericMonth': d.numericMonth});
- });
- });
-
- //ToolTip Data
- for (var z = 0; z < dataObj.length; z++) {
- var tempSeries = dataObj[z].series;
- for (var j = 0; j < dataObj[z].values.length; j++) {
- var months = dataObj[z].values[j].month;
- var tempVal = dataObj[z].values[j].value;
- var percent = dataObj[z].values[j].percent;
- tempData.push({"month": months, "series": tempSeries, "value": tempVal, "percent": percent});
- }
- }
-
- for (var k = 0; k < tempData.length; k++) {
- var seriesName = tempData[k].series;
- var seriesVal = tempData[k].value;
- var seriesPer = tempData[k].percent;
- var tempObj = tooltipData[tempData[k].month];
- if (!(tempObj)) {
- tempObj = [];
- tooltipData[tempData[k].month] = tempObj;
- tooltipData[tempData[k].month]['seriesPer'] = seriesPer;
- }
- tempObj.push({seriesName: seriesName, seriesVal: seriesVal});
- }
-
- //X-Axis Domain
- xRange.domain(d3.extent(xMonth, function (d) {
- return d.numericMonth;
- }));
-
- for (var b = 0; b < tempData.length; b++) {
- var val = Math.round(parseInt(tempData[b].value, 10) / stackBarChartConfig.yAxisMaxTicks);
- var Calc = Math.ceil((val / Math.pow(10, ("" + val).length - 1))) * (stackBarChartConfig.yAxisMaxTicks) * Math.pow(10, ("" + val).length - 1);
- yDomainData.push({'yAxisVal': Calc});
- }
-
- //Y-Axis Domain
- yRange.domain([0, d3.max(yDomainData, function (d) {
- return (d.yAxisVal);
- })]);
-
- var yTick = d3.max(yDomainData, function (d) {
- return d.yAxisVal;
- });
-
- yTick = yTick / stackBarChartConfig.yAxisMaxTicks;
- for (var x = 0; x <= stackBarChartConfig.yAxisMaxTicks; x++) {
- yAxisData.push(yTick * x);
- }
-
- var formatMoney = function (d) {
- if (d >= stackBarChartConfig.amountMDivision) {
- return d / stackBarChartConfig.amountMDivision + stackBarChartConfig.amountMText;
- } else if (d >= stackBarChartConfig.amountKDivision) {
- return d / stackBarChartConfig.amountKDivision + stackBarChartConfig.amountKText;
- } else {
- return d;
- }
- };
- var xAxis = d3.svg.axis().scale(xRange).orient("bottom").tickFormat(d3.time.format('%b')).ticks(d3.time.months);
- var xAxisGrid = d3.svg.axis().scale(xRange).orient("top").ticks(d3.time.months).tickFormat('').tickSize(-height + 2 * padding, 0);
-
- var yAxis = d3.svg.axis().scale(yRange).orient("left").tickValues(yAxisData).ticks(stackBarChartConfig.yAxisMaxTicks).tickFormat(formatMoney);
- var yAxisGrid = d3.svg.axis().scale(yRange).orient("left").tickValues(yAxisData).ticks(stackBarChartConfig.yAxisMaxTicks).tickSize(-width, 0, 0);
-
-
- //Calculate values for Stack
- var stack = d3.layout.stack()
- .values(function (d) {
- return d.values;
- })
- .x(function (d) {
- return d.numericMonth;
- })
- .y(function (d) {
- return d.value;
- });
-
- //Plot Chart
- var drawBarChart = d3.select("#stackBarChartContainer")
- .append("svg")
- .attr("id", attrs.id)
- .data(dataObj)
- .attr("width", width + margin.left + margin.right)
- .attr("height", parseInt(height, 10) + parseInt(margin.top, 10) + parseInt(margin.bottom, 10))
- .append("g")
- .attr("transform", "translate(" + margin.left + "," + margin.top + ")");
-
- //Draw X Axis
- drawBarChart.append("g")
- .attr("class", "x axis")
- .attr("transform", "translate(0," + (height - padding) + ")")
- .call(xAxis);
-
- if (isSingleMonth) {
- drawBarChart.select(".x").select(".tick").attr("transform", "translate(" + (isSingleMonth === true) * (width / 2 + 20) + ",0)");
- }
-
- //Draw Y Grid Lines
- var yGrid = drawBarChart.append("g")
- .attr("class", "grid").attr("id", "stackBarYGrid")
- .attr("transform", "translate(0,0)")
- .call(yAxisGrid);
- yGrid.selectAll("line").style("stroke", stackBarChartConfig.gridLineColor);
- yGrid.selectAll("text").remove();
-
- //Plot Bars for multiple Stacks
- var barGroup = drawBarChart.selectAll(".group")
- .data(stack(dataObj))
- .enter().append("g")
- .attr("class", "group").attr("id", function (d, i) {
- return ("stackBar" + i);
- })
- .attr("transform", "translate(" + (isSingleMonth === true) * width / 2 + ",0)");
-
- barGroup.append("title").text(function (d) {
- return d.series;
- });
-
- var bars = barGroup.selectAll("rect")
- .data(function (d) {
- return d.values;
- })
- .enter().append("rect")
- .attr("class", "bar")
- .attr("x", function (d) {
- return (xRange(d.numericMonth) - 10);
- })
- .attr("y", function (d) {
- return yRange(d.value);
- })
- .attr("width", "20")
- .attr("height", function (d) {
- return ((height - yRange(d.value)) - padding);
- }).on("mouseover", function (d) {
- var offsetX = d3.select(this).attr("x");
- var offsetY = d3.select(this).attr("y");
- show_tooltip_grid_line(offsetX, "x");
- drawBarChart.selectAll(".bar").style("fill-opacity", stackBarChartConfig.chartOpacity);
- d3.select(this).style("fill-opacity", "1");
- mouseOver(d, offsetX, offsetY);
- }).on("mouseout", function () {
- hide_tooltip_grid_line(d3.select(this).attr("x"), "x");
- scope.tooltipFlag = false;
- drawBarChart.selectAll(".bar").style("fill-opacity", "1");
- scope.$apply();
- });
-
- bars.append('desc').append('title').text(function (d) {
- var nvdaObj = tooltipData[d.month];
- return (addTitle(nvdaObj, d));
- });
-
- //Fill color in Bars
- for (var a = 0; a < dataObj.length; a++) {
- var rectBars = drawBarChart.select('#stackBar' + a).selectAll('rect');
- rectBars.attr('fill', scope.legendColors[a]).attr("fill-opacity", "1");
- }
-
- // Draw the x Grid lines
- var xGrid = drawBarChart.append("g")
- .attr("class", "grid").attr("id", "stackBarXGrid")
- .attr("transform", "translate(" + (isSingleMonth === true) * width / 2 + ",0)")
- .call(xAxisGrid);
-
- xGrid.selectAll("line").attr("transform", "translate(" + -Math.ceil((xRange(2) - xRange(1)) / 2) + "," + padding + ")")
- .attr("id", function (d, i) {
- return ("xGridLine" + i);
- });
-
- //Draw dual Y axis on change of Year
- var yAxisObj = dataObj[0].values, yAxisIdx = 0;
- for (var i = 0; i < yAxisObj.length; i++) {
- var tmpObj = [];
-
- tmpObj.push({"year": labelFormat(yAxisObj[i].numericMonth), "transform": xRange(yAxisObj[i].numericMonth)});
- if (!yearArr[labelFormat(yAxisObj[i].numericMonth)]) {
- yearArr[labelFormat(yAxisObj[i].numericMonth)] = tmpObj;
- }
- }
- for (var key in yearArr) {
- var obj = yearArr[key];
- var yAxisNodes = drawBarChart.append("g")
- .attr("class", "y axis").attr("id", yAxisId(yAxisIdx))
- .attr("transform", "translate(" + (obj[0].transform - padding) + ",0)")
- .call(yAxis);
-
- yAxisNodes.selectAll("text").attr('class', 'ticktext');
-
- //Append Year Label
- yAxisNodes.append("text")
- .attr("transform", "rotate(0)")
- .attr("y", stackBarChartConfig.yearLabelPos.y)
- .attr("x", stackBarChartConfig.yearLabelPos.x)
- .text(obj[0].year).attr("class", "yearLabel");
- yAxisIdx++;
- }
-
- function yAxisId(yAxisIdx) {
- return ("yAxis" + yAxisIdx);
- }
-
- //function to select first element
- d3.selection.prototype.first = function () {
- return d3.select(this[0][0]);
- };
-
- //Remove minimum value label form Y Axis
- var tickLabels = d3.select("#yAxis0").selectAll('.ticktext');
- //tickLabels.first().remove();
- d3.select("#yAxis1").selectAll('.ticktext').remove();
-
- //Add title for NVDA screen reader
- function addTitle(nvdaObj, d) {
- var temp = "";
- for (var y = 0; y < nvdaObj.length; y++) {
- temp = temp + nvdaObj[y].seriesName + nvdaObj[y].seriesVal;
- }
- return (tooltipFormat(d.numericMonth) + "--" + temp + "Retainibility Percentage" + nvdaObj.seriesPer);
- }
-
- //MouseOver Event
- function mouseOver(d, offsetX, offsetY) {
- for (var key in tooltipData) {
- if (key == d.month) {
- scope.stackDataPoint = tooltipData[key];
- break;
- }
- }
- scope.monthPoint = {"xData": tooltipFormat(d.numericMonth).replace('-', ' ')};
- scope.$apply();
- $timeout(function () {
- offsetY = offsetY - stackBarChartConfig.tooltipTopMargin;
- var tooltipEl = element.children().eq(2);
- var tooltipWidth = tooltipEl[0].offsetWidth;
- if (isSingleMonth) {
- offsetX = offsetX - (tooltipWidth / 2) + stackBarChartConfig.tooltipLeftMargin + (width / 2);
- } else {
- offsetX = offsetX - (tooltipWidth / 2) + stackBarChartConfig.tooltipLeftMargin;
- }
- scope.tooltipStyle = {"left": offsetX + "px", "top": offsetY + "px"};
- scope.tooltipFlag = true;
- }, 0);
- }
-
- //Show Grid Line on Over
- function show_tooltip_grid_line(offsetX, attr) {
- var dataLength;
- dataLength = scope.chartData[0].values.length;
- for (var i = 0; i < dataLength; i++) {
- var bar = drawBarChart.selectAll(".bar");
- if (bar[0][i].getAttribute(attr) === offsetX) {
- drawBarChart.select("#xGridLine" + i).style("stroke", stackBarChartConfig.gridLineColor);
- }
- }
- }
-
- //Hide Grid Line
- function hide_tooltip_grid_line(offsetX, attr) {
- var dataLength;
- dataLength = scope.chartData[0].values.length;
- for (var i = 0; i < dataLength; i++) {
- var bar = drawBarChart.selectAll(".bar");
- if (bar[0][i].getAttribute(attr) === offsetX) {
- drawBarChart.select("#xGridLine" + i).style("stroke", "transparent");
- }
- }
- }
- scope.refreshChart = false;
- });
- }
- };
- }])
- .filter('filterInput', function () {
- return function (input) {
- return input.replace(/ +/g, "").toLowerCase();
- };
- });
-angular.module('att.charts.stackedareachart', ['att.charts.utilities'])
- .constant("stackChartConfig",
- {
- "chartcolor": ["#9966FF", "#E68A2E", "#4DDB4D"],
- "gridLineColor": "#808080",
- "lineCurveType": 'linear',
- "yAxisMaxTicks": 4,
- "chartHeight": "200",
- "shapes": ['circle', 'rect', 'triangle'],
- "shapeSize": [3, 5, 6],
- "chartOpacity": 0.6,
- "yearLabelPos": {"x": 8, "y": -5},
- "tooltipTopMargin": 100,
- "tooltipLeftMargin": 42,
- "yAxisUnitRange": 500000,
- "margin": {
- top: 30,
- right: 80,
- bottom: 30,
- left: 52
- }
- })
- .directive('stackedAreaChart', ['stackChartConfig','$extendObj','$timeout', function (stackChartConfig,$extendObj,$timeout) {
- return {
- restrict: 'A',
- scope: {
- chartData: '=',
- legendRequired: "=",
- refreshChart: "=",
- chartConfig: "="
- },
- templateUrl: "template/stackedareachart/stackedAreaChart.html",
- replace: true,
- controller: ['$scope', '$attrs', function ($scope, $attrs) {
- var extendDeep = function extendDeep(dst) {
- angular.forEach(arguments, function(obj) {
- if (obj !== dst) {
- angular.forEach(obj, function(value, key) {
- if (dst[key] && dst[key].constructor && dst[key].constructor === Object) {
- extendDeep(dst[key], value);
- } else {
- dst[key] = value;
- }
- });
- }
- });
- return dst;
- };
- if (angular.isDefined($scope.chartConfig)) {
- stackChartConfig = $extendObj.extendDeep(stackChartConfig, $scope.chartConfig);
- }
- $scope.chartID = $attrs.id;
- $scope.legendColors = stackChartConfig.chartcolor;
- $scope.legendTooltipColors = angular.copy(stackChartConfig.chartcolor).reverse();
- $scope.addLegendColor = function (id) {
- var bgColor = null;
- switch (id) {
- case 0:
- bgColor = {"background-color": $scope.legendColors[id], "border-radius": "100%"};
- break;
- case 1:
- bgColor = {"background-color": $scope.legendColors[id]};
- break;
- case 2:
- bgColor = {"width": "0", "height": "0", "border-left": "8px solid transparent", "border-right": "8px solid transparent", "border-bottom-style": "solid", "border-bottom-width": "8px", "border-bottom-color": $scope.legendColors[id]};
- break;
- }
- return bgColor;
- };
- $scope.addToolTipLegendColor = function (id) {
- var bgColor = null;
- switch (id) {
- case 2:
- bgColor = {"background-color": $scope.legendTooltipColors[id], "border-radius": "100%"};
- break;
- case 1:
- bgColor = {"background-color": $scope.legendTooltipColors[id]};
- break;
- case 0:
- bgColor = {"width": "0", "height": "0", "border-left": "6px solid transparent", "border-right": "6px solid transparent", "border-bottom-style": "solid", "border-bottom-width": "12px", "border-bottom-color": $scope.legendTooltipColors[id]};
- break;
- }
- return bgColor;
- };
- }],
- link: function (scope, element, attrs, ctrl) {
- scope.tooltipFlag = false;
- var dataObj, idx = 0, xAxisTicks, margin = stackChartConfig.margin,
- width = parseInt(attrs.chartWidth, 10),
- height = stackChartConfig.chartHeight,
- parseDate = d3.time.format("%d-%b-%Y").parse,
- tooltipFormat = d3.time.format("%B-%Y"),
- labelFormat = d3.time.format("%Y");
- attrs.$observe('legendRequired', function (val) {
- if (val === 'true') {
- scope.showLegend = true;
- }
- else {
- scope.showLegend = false;
- }
- });
- scope.$watch('refreshChart', function (value) {
- if (value === false) {
- return;
- }
- if (angular.isDefined(scope.chartConfig)) {
- stackChartConfig = $extendObj.extendDeep(stackChartConfig, scope.chartConfig);
- }
- d3.select("svg#" + attrs.id).remove();
- d3.selectAll("svg#" + attrs.id + " > *").remove();
- d3.selectAll("div#stackChartContainer" + " > div").remove();
- if (scope.chartData[0].values.length === 0) {
- scope.refreshChart = false;
- return;
- }
-
- var xMonth = [], yValue = [], tempData = [], tooltipData = {}, yearArr = {}, yearLabel = '', isSingleMonth = false, singleMonthName, currencyFormat = 'K';
-
- //X-Axis Range
- var xRange = d3.time.scale()
- .range([0, width]);
-
- //Y-Axis Range
- var yRange = d3.scale.linear()
- .range([height, 0]);
-
- dataObj = scope.chartData;
-
- // On selecting same month in From and To dropdowns, User should be getting graph
- if (dataObj[0].values.length === 1) {
- isSingleMonth = true;
- dataObj.forEach(function (data) {
- var tmp1 = "01-" + data.values[0].month;
- var tmp = parseDate(tmp1);
- singleMonthName = tmp.toString().split(" ")[1];
- tmp.setMonth(tmp.getMonth() + 1);
- var nextMonth = tmp.toString().split(" ")[1] + "-" + tmp.getFullYear();
- data.values.push({month: nextMonth, value: data.values[0].value});
- });
- }
-
- dataObj.forEach(function (data) {
- var obj = data.values;
- xAxisTicks = obj.length;
- obj.forEach(function (d) {
- var tmp = "01-" + d.month;
- d.numericMonth = parseDate(tmp);
- yValue.push({'value': +d.value});
- d.value = +d.value;
- xMonth.push({'numericMonth': d.numericMonth});
- if (d.value > stackChartConfig.yAxisUnitRange) {
- currencyFormat = 'M';
- }
- });
- });
-
- //ToolTip Data
- for (var z = 0; z < dataObj.length; z++) {
- var tempSeries = dataObj[z].series;
- for (var j = 0; j < dataObj[z].values.length; j++) {
- var months = dataObj[z].values[j].month;
- var tempVal = dataObj[z].values[j].value;
- tempData.push({"month": months, "series": tempSeries, "value": tempVal});
- }
- }
- for (var k = 0; k < tempData.length; k++) {
- var seriesName = tempData[k].series;
- var seriesVal = tempData[k].value;
- var tempObj = tooltipData[tempData[k].month];
- if (!(tempObj)) {
- tempObj = [];
- tooltipData[tempData[k].month] = tempObj;
- }
- tempObj.push({seriesName: seriesName, seriesVal: seriesVal});
- }
- for (var d in tooltipData) {
- var tooltipObj = tooltipData[d];
- var temp = 0, monthTotalVal = 0;
- for (var y = 0; y < tooltipObj.length; y++) {
- temp = parseFloat(tooltipObj[y].seriesVal);
- monthTotalVal = monthTotalVal + temp;
- tooltipObj['total'] = monthTotalVal;
- }
- }
- var yDomainData = [],yAxisData = [],yTicksData = [];
- for (var month in tooltipData) {
- yDomainData.push({"total": tooltipData[month].total});
- }
-
- //Format yAxis Labels
- var formatCurrency = function (d) {
- if (currencyFormat === 'M') {
- return "$" + d / 1000000 + "M";
- } else {
- return "$" + d / 1000 + "K";
- }
- };
-
- //X-Axis Domain
- xRange.domain(d3.extent(xMonth, function (d) {
- return d.numericMonth;
- }));
-
- for (var b = 0; b < yDomainData.length; b++) {
- var val = Math.round(parseInt(yDomainData[b].total, 10) / stackChartConfig.yAxisMaxTicks);
- var Calc = Math.ceil((val / Math.pow(10, ("" + val).length - 1))) * (stackChartConfig.yAxisMaxTicks) * Math.pow(10, ("" + val).length - 1);
- yAxisData.push({'yAxisVal': Calc});
- }
-
- //Y-Axis Domain
- yRange.domain([0, d3.max(yAxisData, function (d) {
- return (d.yAxisVal);
- })]);
-
- var yTick = d3.max(yAxisData, function (d) {
- return d.yAxisVal;
- });
-
- yTick = yTick / stackChartConfig.yAxisMaxTicks;
- for (var c = 0; c <= stackChartConfig.yAxisMaxTicks; c++) {
- yTicksData.push(yTick * c);
- }
-
- var xAxis = d3.svg.axis().scale(xRange).orient("bottom").tickFormat(d3.time.format('%b')).ticks(d3.time.months);
- var yAxis = d3.svg.axis().scale(yRange).orient("left").tickValues(yTicksData).ticks(stackChartConfig.yAxisMaxTicks).tickFormat(formatCurrency);
- var yAxisGrid = d3.svg.axis().scale(yRange).orient("left").tickValues(yTicksData).ticks(stackChartConfig.yAxisMaxTicks).tickSize(-width, 0, 0);
-
- //Calculate values for Stack
- var stack = d3.layout.stack()
- .values(function (d) {
- return d.values;
- })
- .x(function (d) {
- return d.numericMonth;
- })
- .y(function (d) {
- return d.value;
- });
-
- //Draw Area
- var area = d3.svg.area()
- .x(function (d) {
- return xRange(d.numericMonth);
- })
- .y0(function (d) {
- return yRange(d.y0);
- })
- .y1(function (d) {
- return yRange(d.y0 + d.y);
- }).interpolate(stackChartConfig.lineCurveType);
-
- //Plot Chart
- var drawChart = d3.select("#stackChartContainer")
- .append("svg")
- .attr("id", attrs.id)
- .data(dataObj)
- .attr("width", width + margin.left + margin.right)
- .attr("height", parseInt(height, 10) + parseInt(margin.top, 10) + parseInt(margin.bottom, 10))
- .append("g")
- .attr("transform", "translate(" + margin.left + "," + margin.top + ")");
-
- //Draw X Axis
- drawChart.append("g")
- .attr("class", "x axis")
- .attr("transform", "translate(0," + height + ")")
- .call(xAxis);
-
- //Plot Area for multiple Stacks
- drawChart.selectAll(".layer")
- .data(stack(dataObj))
- .enter().append("path")
- .attr("class", "layer")
- .attr("d", function (d) {
- return area(d.values);
- }).style("fill", function (d, i) {
- return scope.legendColors[i];
- }).style("opacity", stackChartConfig.chartOpacity).style("stroke", "#ddd").append("title")
- .text(function (d) {
- return d.series;
- });
-
- //Draw dual Y axis on change of Year
- var yAxisObj = dataObj[0].values, yAxisIdx = 0;
- for (var i = 0; i < yAxisObj.length; i++) {
- var tmpObj = [];
- tmpObj.push({"year": labelFormat(yAxisObj[i].numericMonth), "transform": xRange(yAxisObj[i].numericMonth)});
- if (!yearArr[labelFormat(yAxisObj[i].numericMonth)]) {
- yearArr[labelFormat(yAxisObj[i].numericMonth)] = tmpObj;
- }
- }
- for (var key in yearArr) {
- var obj = yearArr[key];
- var yAxisNodes = drawChart.append("g")
- .attr("class", "y axis").attr("id", yAxisId(yAxisIdx))
- .attr("transform", "translate(" + obj[0].transform + ",0)")
- .call(yAxis);
-
- yAxisNodes.selectAll("text").attr('class', 'ticktext');
- //Append Year Label
- yAxisNodes.append("text")
- .attr("transform", "rotate(0)")
- .attr("y", stackChartConfig.yearLabelPos.y)
- .attr("x", stackChartConfig.yearLabelPos.x)
- .text(obj[0].year).attr("class", "yearLabel");
- yAxisIdx++;
- }
-
- //Remove next year Y axis in case of single Month selection
- if (isSingleMonth) {
- d3.select("#yAxisId1").remove();
- }
-
- function yAxisId(yAxisIdx) {
- return ("yAxisId" + yAxisIdx);
- }
-
- //function to select first element
- d3.selection.prototype.first = function () {
- return d3.select(this[0][0]);
- };
-
- //Remove minimum value label form Y Axis
- var tickLabels = d3.select("#yAxisId0").selectAll('.ticktext');
- tickLabels.first().remove();
- d3.select("#yAxisId1").selectAll('.ticktext').remove();
-
- if (isSingleMonth) {
- drawChart.selectAll('.x.axis').selectAll('.tick').selectAll('text')[1][0].textContent = singleMonthName;
- }
-
- //Append Data Points
- for (var x = 0; x < dataObj.length; x++) {
- drawChart.append('g').attr('id', "pathId" + x).attr("transform", "translate(" + (isSingleMonth === true) * width / 2 + ",0)");
- if (idx >= stackChartConfig.shapes.length) {
- idx = 0;
- }
- var shape = stackChartConfig.shapes[idx], shapeToAppend;
- if (shape == 'rect' || shape == 'triangle') {
- shapeToAppend = 'polygon';
- }
- else {
- shapeToAppend = 'circle';
- }
-
- var newDataObj;
- if (isSingleMonth) {
- newDataObj = dataObj[x].values.slice(0, 1);
- } else {
- newDataObj = dataObj[x].values;
- }
-
- var dataPoints = drawChart.select('#pathId' + x).selectAll(shapeToAppend)
- .data(newDataObj)
- .enter()
- .append(shapeToAppend)
- .attr('class', shape);
- drawShapes(shape, dataPoints);
- idx++;
- }
-
- //Fill color in dataPoints
- for (var a = 0; a <= dataObj.length; a++) {
- var Dots = drawChart.selectAll('.' + stackChartConfig.shapes[a]);
- Dots.attr('fill', scope.legendColors[a]);
- }
-
- //function to draw multiple shapes for Data Points
- function drawShapes(shape, dataPoints) {
- switch (shape) {
- case 'circle':
- var circle = dataPoints.attr("cx", function (d) {
- return xRange(d.numericMonth);
- }).attr("cy", function (d) {
- return yRange(d.y + d.y0);
- }).attr("r", stackChartConfig.shapeSize[0]).on("mouseover", function (d) {
- show_tooltip_grid_line(d3.select(this).attr("cx"), "circle", "cx");
- var offsetX = Math.ceil(d3.select(this).attr("cx"));
- var offsetY = Math.round(d3.select(this).attr("cy"));
- d3.selectAll('svg#' + attrs.id + " " + "path").style("fill-opacity", stackChartConfig.chartOpacity);
- d3.selectAll('svg#' + attrs.id + " " + "polygon").style("fill-opacity", stackChartConfig.chartOpacity);
- d3.selectAll('svg#' + attrs.id + " " + "circle").style("fill-opacity", stackChartConfig.chartOpacity);
- mouseOver(d, offsetX, offsetY);
- }).on("mouseout", function () {
- hide_tooltip_grid_line(d3.select(this).attr("cx"), "circle", "cx");
- d3.selectAll('svg#' + attrs.id + " " + "path").style("fill-opacity", 1);
- d3.selectAll('svg#' + attrs.id + " " + "polygon").style("fill-opacity", 1);
- d3.selectAll('svg#' + attrs.id + " " + "circle").style("fill-opacity", 1);
- scope.tooltipFlag = false;
- scope.$apply();
- });
- circle.append('desc').append('title').text(function (d) {
- var nvdaObj = tooltipData[d.month];
- return (addTitle(nvdaObj, d));
- });
- break;
- case 'rect':
- var rect = dataPoints.attr("points", function (d) {
- var x = parseInt(xRange(d.numericMonth), 10);
- x = x + (stackChartConfig.shapeSize[1] / 2);
- var y = parseInt(yRange(d.y + d.y0), 10);
- y = y - (stackChartConfig.shapeSize[1] / 2);
- var x1 = parseInt((x - stackChartConfig.shapeSize[1]), 10);
- var y1 = y;
- var x2 = x1;
- var y2 = parseInt((y1 + stackChartConfig.shapeSize[1]), 10);
- var x3 = x;
- var y3 = y2;
- var tmp = x2 + "," + y2 + " " + x3 + "," + y3 + " " + x + "," + y + " " + x1 + "," + y1;
- return tmp;
- }).attr('x', function (d) {
- return xRange(d.numericMonth);
- }).attr('y', function (d) {
- return yRange(d.y + d.y0);
- }).on("mouseover", function (d) {
- show_tooltip_grid_line(d3.select(this).attr("x"), "rect", "x");
- var offsetX = Math.ceil(d3.select(this).attr("x"));
- var offsetY = Math.round(d3.select(this).attr("y"));
- d3.selectAll('svg#' + attrs.id + " " + "path").style("fill-opacity", stackChartConfig.chartOpacity);
- d3.selectAll('svg#' + attrs.id + " " + "polygon").style("fill-opacity", stackChartConfig.chartOpacity);
- d3.selectAll('svg#' + attrs.id + " " + "circle").style("fill-opacity", stackChartConfig.chartOpacity);
- mouseOver(d, offsetX, offsetY);
- }).on("mouseout", function () {
- hide_tooltip_grid_line(d3.select(this).attr("x"), "rect", "x");
- d3.selectAll('svg#' + attrs.id + " " + "path").style("fill-opacity", 1);
- d3.selectAll('svg#' + attrs.id + " " + "polygon").style("fill-opacity", 1);
- d3.selectAll('svg#' + attrs.id + " " + "circle").style("fill-opacity", 1);
- scope.tooltipFlag = false;
- scope.$apply();
- });
- rect.append('desc').append('title').text(function (d) {
- var nvdaObj = tooltipData[d.month];
- return (addTitle(nvdaObj, d));
- });
- break;
- case 'triangle':
- var triangle = dataPoints.attr("points", function (d) {
- var x = parseInt(xRange(d.numericMonth), 10);
- var y = parseInt(yRange(d.y + d.y0), 10);
- var x1 = parseInt((x - stackChartConfig.shapeSize[2]), 10);
- var y1 = parseInt((y - stackChartConfig.shapeSize[2]), 10);
- var x2 = parseInt((x + stackChartConfig.shapeSize[2]), 10);
- var y2 = y1;
- var tmp = x1 + "," + y1 + " " + x + "," + y + " " + x2 + "," + y2;
- return tmp;
- }).attr("transform", function (d) {
- var x = parseInt(xRange(d.numericMonth), 10);
- var y = parseInt(yRange(d.y + d.y0), 10);
- y = y - 2;
- var tmp = "rotate(180," + x + "," + y + ")";
- return tmp;
- }).attr('x', function (d) {
- return xRange(d.numericMonth);
- }).attr('y', function (d) {
- return yRange(d.y + d.y0);
- }).on("mouseover", function (d) {
- show_tooltip_grid_line(d3.select(this).attr("x"), "triangle", "x");
- var offsetX = Math.ceil(d3.select(this).attr("x"));
- var offsetY = Math.round(d3.select(this).attr("y"));
- d3.selectAll('svg#' + attrs.id + " " + "path").style("fill-opacity", stackChartConfig.chartOpacity);
- d3.selectAll('svg#' + attrs.id + " " + "polygon").style("fill-opacity", stackChartConfig.chartOpacity);
- d3.selectAll('svg#' + attrs.id + " " + "circle").style("fill-opacity", stackChartConfig.chartOpacity);
- mouseOver(d, offsetX, offsetY);
- }).on("mouseout", function () {
- hide_tooltip_grid_line(d3.select(this).attr("x"), "triangle", "x");
- d3.selectAll('svg#' + attrs.id + " " + "path").style("fill-opacity", 1);
- d3.selectAll('svg#' + attrs.id + " " + "polygon").style("fill-opacity", 1);
- d3.selectAll('svg#' + attrs.id + " " + "circle").style("fill-opacity", 1);
- scope.tooltipFlag = false;
- scope.$apply();
- });
- triangle.append('desc').append('title').text(function (d) {
- var nvdaObj = tooltipData[d.month];
- return (addTitle(nvdaObj, d));
- });
- break;
- }
- }
-
- //Draw Grid Lines
- drawChart.append("g")
- .attr("class", "grid")
- .attr("id", "yStackGrid")
- .attr("transform", "translate(0,0)")
- .call(yAxisGrid)
- .selectAll("text").remove();
-
- // Draw the x Grid lines
- drawChart.append("g")
- .attr("class", "grid")
- .attr("id", "xGrid")
- .attr("transform", "translate(" + (isSingleMonth === true) * width / 2 + ",0)")
- .call(make_x_axis()
- .tickSize(-height, 0)
- .tickFormat(""));
-
- // function for the x grid lines
- function make_x_axis() {
- return d3.svg.axis()
- .scale(xRange)
- .orient("top")
- .tickFormat(d3.time.format('%b')).ticks(d3.time.months);
- }
-
- drawChart.select("#xGrid").selectAll("line").style("stroke", "none");
- drawChart.select("#xGrid").selectAll("line")
- .attr("id", function (d, i) {
- return ("xAxisLine" + i);
- });
- //Add title for NVDA screen reader
- function addTitle(nvdaObj, d) {
- var temp = "";
- for (var y = 0; y < nvdaObj.length; y++) {
- temp = temp + nvdaObj[y].seriesName + nvdaObj[y].seriesVal;
- }
- return (tooltipFormat(d.numericMonth) + "--" + temp + "Total Charges" + nvdaObj.total);
- }
-
- //Show Grid Lines on Mouse Hover
- function show_tooltip_grid_line(offsetX, shape, attr) {
- try {
- var dataLength;
- if (isSingleMonth) {
- dataLength = 1;
- } else {
- dataLength = scope.chartData[0].values.length;
- }
-
- for (var i = 0; i < dataLength; i++) {
- var circle = drawChart.selectAll("." + shape);
- if (circle[0][i].getAttribute(attr) === offsetX) {
- drawChart.select("#xAxisLine" + i).style("stroke", stackChartConfig.gridLineColor);
- }
- }
- } catch (e) {
- }
- }
-
- //Hide grid Lines
- function hide_tooltip_grid_line(offsetX, shape, attr) {
- try {
- var dataLength;
- if (isSingleMonth) {
- dataLength = 1;
- } else {
- dataLength = scope.chartData[0].values.length;
- }
-
- for (var i = 0; i < dataLength; i++) {
- var circle = drawChart.selectAll("." + shape);
- if (circle[0][i].getAttribute(attr) === offsetX) {
- drawChart.select("#xAxisLine" + i).style("stroke", "transparent");
- }
- }
- } catch (e) {
- }
- }
-
- //MouseOver Event
- function mouseOver(d, offsetX, offsetY) {
- for (var key in tooltipData) {
- if (key == d.month) {
- var data = angular.copy(tooltipData);
- scope.stackDataPoint = data[key].reverse();
- break;
- }
- }
- var tmp = 0, monthTotalVal = 0;
- for (var b = 0; b < scope.stackDataPoint.length; b++) {
- tmp = parseFloat(scope.stackDataPoint[b].seriesVal);
- monthTotalVal = monthTotalVal + tmp;
- }
- scope.total = monthTotalVal;
- scope.stackDataPoint.total = monthTotalVal;
-
- scope.monthPoint = {"xData": tooltipFormat(d.numericMonth).replace('-', ' ')};
- scope.$apply();
- $timeout(function(){
- offsetY = offsetY - stackChartConfig.tooltipTopMargin;
- var tooltipEl = element.children().eq(2);
- var tooltipWidth = tooltipEl[0].offsetWidth;
- if (isSingleMonth) {
- offsetX = offsetX - (tooltipWidth/2) + stackChartConfig.tooltipLeftMargin + (width / 2);
- } else {
- offsetX = offsetX - (tooltipWidth/2) + stackChartConfig.tooltipLeftMargin;
- }
- scope.tooltipStyle = {"left": offsetX + "px", "top": offsetY + "px"};
- scope.tooltipFlag = true;
- },0);
-
-
-
-
- }
- //fix for removing upper text if it is below to year label
-// try {
-// var lastTickPostion = drawChart.selectAll('#yAxisId0').selectAll('.tick')[0].length - 1;
-// var lastGridPos = drawChart.select("#yStackGrid").selectAll('.tick')[0].length - 1;
-// var val = drawChart.selectAll('#yAxisId0').selectAll('.tick')[0][lastTickPostion].attributes.transform.value.split(',')[1].split(')')[0];
-// if (val < 20) {
-// drawChart.selectAll('#yAxisId0').selectAll('text')[0][lastTickPostion - 1].remove();
-// drawChart.select("#yStackGrid").selectAll('.tick')[0][lastGridPos].remove();
-// }
-// } catch (e) {
-// }
- scope.refreshChart = false;
- });
- }
- };
- }])
- .filter('filterInput', function () {
- return function (input) {
- return input.replace(/ +/g, "").toLowerCase();
- };
- });
-angular.module("template/areachartD3/attAreaChartD3.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("template/areachartD3/attAreaChartD3.html",
- "<div class=\"areaChartD3\">\n" +
- " <ul class=\"legendsList\" ng-show=\"showLegend\">\n" +
- " <li ng-repeat=\"label in legendLabel\" id=\"{{label.series|filterInput}}\">\n" +
- " <i class=\"legend-icon\" ng-style=\"addLegendColor($index)\"></i>{{label.series}}\n" +
- " </li>\n" +
- " </ul>\n" +
- " <div id=\"areaChartContainer\">\n" +
- " </div>\n" +
- " <div ng-class=\"{'tooltip--on': tooltipFlag,'tooltip': !tooltipFlag}\" ng-style=\"tooltipStyle\">\n" +
- " <span class=\"title\">{{dataPoint.xData}}</span>\n" +
- " <p>\n" +
- " <span class=\"alignLeft\"><i class=\"legend-icon\" ng-style=\"addLegendColor(1)\"></i>Available</span>\n" +
- " <span class=\"alignRight\">{{dataPoint.dataAvailable}} <span>{{dataPoint.usageDataType}}</span></span>\n" +
- " </p>\n" +
- " <div style=\"clear:both\"></div> \n" +
- " <p>\n" +
- " <span class=\"alignLeft\"><i class=\"legend-icon\" ng-style=\"addLegendColor(0)\"></i>Used</span>\n" +
- " <span class=\"alignRight\">{{dataPoint.dataUsed}} <span>{{dataPoint.availableDataType}}</span></span>\n" +
- " </p>\n" +
- " <div style=\"clear:both\"></div>\n" +
- " <p ng-show=\"overageFlag\">\n" +
- " <span class=\"alignLeft\"><i class=\"legend-icon\" ng-style=\"addLegendColor(2)\"></i>Overage</span> \n" +
- " <span class=\"alignRight\">{{dataPoint.overage}}</span>\n" +
- " </p>\n" +
- " <div style=\"clear:both\"></div>\n" +
- " <p ng-show=\"underageFlag\">\n" +
- " <span class=\"alignLeft\">Buffer</span> \n" +
- " <span class=\"alignRight\">{{dataPoint.underage}}</span>\n" +
- " </p>\n" +
- " <div style=\"clear:both\"></div>\n" +
- " <span class=\"tooltipArrow\"></span>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("template/barchartD3/attBarChartD3.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("template/barchartD3/attBarChartD3.html",
- "<div class=\"barChartD3\">\n" +
- " <div id=\"barChartContainer\">\n" +
- " <span class=\"tooltip\" ng-class=\"{'tooltip--on': tooltipFlag}\" ng-show=\"tooltipFlag\" ng-style=\"tooltipStyle\">\n" +
- " <span class=\"title\">{{dataPoint.name}}</span>\n" +
- " <span><span class=\"alignText\">Wireless number</span><span style=\"float:right\">{{dataPoint.phoneNumber}}</span></span>\n" +
- " <span><span class=\"alignText\">Charges</span><span style=\"float:right\">{{dataPoint.charges}}</span></span>\n" +
- " <span class=\"tooltipArrow\"></span>\n" +
- " </span>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("template/coschartD3/attCosd3Chart.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("template/coschartD3/attCosd3Chart.html",
- "<div class=\"attCosd3Chart\">\n" +
- " <div class=\"chartLegend\" ng-if=\"legendPosition == 'top' && legendRequired\">\n" +
- " <ul>\n" +
- " <li ng-style=\"addLegendColor()\">\n" +
- " <div>\n" +
- " <span class=\"LegendLabel\">{{LegendLabel}}</span> <span class=\"LegendCategory\">{{LegendCategory}}</span> <span class=\"legendItemValue\">({{cosval}})</span>\n" +
- " </div>\n" +
- " </li>\n" +
- " </ul>\n" +
- " </div>\n" +
- " <div id={{chartID}} class=\"cosd3Container\"></div>\n" +
- " <div class=\"chartLegend\" ng-if=\"legendPosition == 'bottom' && legendRequired\">\n" +
- " <ul>\n" +
- " <li ng-style=\"addLegendColor()\">\n" +
- " <div>\n" +
- " <span class=\"LegendLabel\">{{LegendLabel}}</span> <span class=\"LegendCategory\">{{LegendCategory}}</span> <span class=\"legendItemValue\">({{cosval}})</span>\n" +
- " </div>\n" +
- " </li>\n" +
- " </ul>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("template/coschartwithbarD3/attCosBarD3Chart.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("template/coschartwithbarD3/attCosBarD3Chart.html",
- "<div class=\"attCosWithBard3Chart\">\n" +
- " <div id={{chartID}} class=\"cosd3Container\"></div>\n" +
- " <div id={{snickrbarId}} class=\"snickrBar\" ng-if=\"barRequired\"></div>\n" +
- "</div>");
-}]);
-
-angular.module("template/cosmultichartD3/attCosmultid3Chart.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("template/cosmultichartD3/attCosmultid3Chart.html",
- "<div class=\"attCosmultid3Chart\">\n" +
- " <div class=\"chartLegend\" ng-if=\"legendPosition == 'top' && legendRequired\">\n" +
- " <ul>\n" +
- " <li ng-repeat=\"item in chartData\" ng-style=\"addLegendColor($index,item)\" chart-legend-id=\"{{item.name}}\">\n" +
- " <div>\n" +
- " <span class=\"LegendLabel\">{{item.name}}</span> <span class=\"LegendCategory\">{{item.category}}</span> <span class=\"legendItemValue\">({{item.value}}%)</span>\n" +
- " </div>\n" +
- " </li>\n" +
- " </ul>\n" +
- " </div>\n" +
- " <div id={{chartID}} class=\"cosmultid3Container\"></div>\n" +
- " <div class=\"chartLegend\" ng-if=\"legendPosition == 'bottom' && legendRequired\">\n" +
- " <ul>\n" +
- " <li ng-repeat=\"item in chartData\" ng-style=\"addLegendColor($index,item)\" chart-legend-id=\"{{item.name}}\">\n" +
- " <div>\n" +
- " <span class=\"LegendLabel\">{{item.name}}</span> <span class=\"LegendCategory\">{{item.category}}</span> <span class=\"legendItemValue\">({{item.value}}%)</span>\n" +
- " </div>\n" +
- " </li>\n" +
- " </ul>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("template/donutD3/attDonutd3Chart.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("template/donutD3/attDonutd3Chart.html",
- "<div class=\"attDonutd3Chart\">\n" +
- " <div id={{chartID}} class=\"chartContainer\" ng-class=\"addStyle('chartContainer')\"></div>\n" +
- " <div ng-show=\"legendRequired\" chartLegend class=\"chartLegend\" ng-class=\"addStyle('chartLegend')\">\n" +
- " <ul>\n" +
- " <li ng-repeat=\"item in chartData\" ng-style=\"addLegendColor($index,item)\" chart-legend-id=\"{{item.name|filterData}}\" ng-mouseover=\"legendMouseOver(item,$index,$event)\" ng-mouseleave=\"legendMouseLeave(item,$index,$event)\" ng-class=\"LegendClass\" ng-click=\"legendclickcallback({name:item.name , value:item.value})\">\n" +
- " <div ng-class=\"{'emptyticket-category': item.value ===0}\" >\n" +
- " <span class=\"legendItemName\">{{item.name}}</span> <span class=\"legendItemValue\">({{item.value}})</span>\n" +
- " </div>\n" +
- " </li>\n" +
- " </ul>\n" +
- " </div>\n" +
- " <div style=\"clear: both;\"></div>\n" +
- "</div>");
-}]);
-
-angular.module("template/donutFusion/attDonutfusionChart.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("template/donutFusion/attDonutfusionChart.html",
- "<div class=\"attDonutfusionChart\">\n" +
- " <div id=\"donutFusionChart\" chartContainer class=\"chartContainer\" ng-style=\"addStyle('chartContainer')\"></div>\n" +
- " <div ng-show=\"legendRequired\" chartLegend class=\"chartLegend\" ng-style=\"addStyle('chartLegend')\">\n" +
- " <ul>\n" +
- " <li ng-repeat=\"item in chartData\" ng-show=\"item.value > 0\" ng-style=\"addLegendColor($index)\">\n" +
- " <div chart-legend-id=\"{{item.name|filterData}}_fusion\">\n" +
- " <span class=\"legendItemName\">{{item.name}}</span> <span class=\"legendItemValue\">({{item.value}})</span>\n" +
- " </div>\n" +
- " </li>\n" +
- " </ul>\n" +
- " </div>\n" +
- " <div style=\"clear: both;\">\n" +
- " </div>\n" +
- "</div> ");
-}]);
-
-angular.module("template/horseshoeD3/attHorseshoeD3Chart.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("template/horseshoeD3/attHorseshoeD3Chart.html",
- "<div class=\"attHorseshoed3Chart\">\n" +
- " <div class=\"chartLegend\" ng-if=\"legendPosition == 'top' && legendRequired\">\n" +
- " <ul>\n" +
- " <li ng-style=\"addLegendColor()\">\n" +
- " <div>\n" +
- " <span class=\"LegendLabel\">{{LegendLabel}}</span> <span class=\"LegendCategory\">{{LegendCategory}}</span> <span class=\"legendItemValue\">({{guageVal}})</span>\n" +
- " </div>\n" +
- " </li>\n" +
- " </ul>\n" +
- " </div>\n" +
- " <div class=\"horseshoed3Container\"></div>\n" +
- " <div class=\"chartLegend\" ng-if=\"legendPosition == 'bottom' && legendRequired\">\n" +
- " <ul>\n" +
- " <li ng-style=\"addLegendColor()\">\n" +
- " <div>\n" +
- " <span class=\"LegendLabel\">{{LegendLabel}}</span> <span class=\"LegendCategory\">{{LegendCategory}}</span> <span class=\"legendItemValue\">({{guageVal}})</span>\n" +
- " </div>\n" +
- " </li>\n" +
- " </ul>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("template/stackedBarchart/stackedBarchart.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("template/stackedBarchart/stackedBarchart.html",
- "<div class=\"stackedBarChart\">\n" +
- " <ul class=\"legendsList\" ng-show=\"showLegend\">\n" +
- " <li ng-repeat=\"label in chartData\" id=\"{{label.series|filterInput}}\">\n" +
- " <i class=\"legend-icon\" ng-style=\"addLegendColor($index)\"></i>{{label.series}}\n" +
- " </li>\n" +
- " </ul>\n" +
- " <div id=\"stackBarChartContainer\"></div>\n" +
- " <div ng-class=\"{'tooltip--on': tooltipFlag,'tooltip': !tooltipFlag}\" ng-style=\"tooltipStyle\">\n" +
- " <span class=\"title\">{{monthPoint.xData}}</span>\n" +
- " <div ng-repeat=\"label in stackDataPoint\">\n" +
- " <p>\n" +
- " <span class=\"alignLeft\"><i class=\"legend-icon-stackedchart\" ng-style=\"addLegendColor($index)\"></i>{{label.seriesName}}</span>\n" +
- " <span class=\"alignRight\">{{label.seriesVal| number:0}}</span>\n" +
- " </p> \n" +
- "\n" +
- " <div style=\"clear:both\"></div>\n" +
- " </div>\n" +
- " <p>\n" +
- " <span class=\"alignLeft\"><i class=\"legend-icon-stackedchart\"></i>Retainability percentage</span>\n" +
- " <span class=\"alignRight\">{{stackDataPoint.seriesPer}}</span>\n" +
- "\n" +
- " </p>\n" +
- " <div style=\"clear:both\"></div>\n" +
- " <span class=\"tooltipArrow\"></span>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("template/stackedareachart/stackedAreaChart.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("template/stackedareachart/stackedAreaChart.html",
- "<div class=\"stackedAreaChart\">\n" +
- " <ul class=\"legendsList\" ng-show=\"showLegend\">\n" +
- " <li ng-repeat=\"label in chartData\" id=\"{{label.series|filterInput}}\">\n" +
- " <i class=\"legend-icon\" ng-style=\"addLegendColor($index)\"></i>{{label.series}}\n" +
- " </li>\n" +
- " </ul>\n" +
- " <div id=\"stackChartContainer\"></div>\n" +
- " <div ng-class=\"{'tooltip--on': tooltipFlag,'tooltip': !tooltipFlag}\" ng-style=\"tooltipStyle\">\n" +
- " <span class=\"title\">{{monthPoint.xData}}</span>\n" +
- " <div ng-repeat=\"label in stackDataPoint\">\n" +
- " <p>\n" +
- " <span class=\"alignLeft\"><i class=\"legend-icon-stackedchart\" ng-style=\"addToolTipLegendColor($index)\"></i>{{label.seriesName}}</span>\n" +
- " <span class=\"alignRight\">{{label.seriesVal| currency}}</span>\n" +
- " </p>\n" +
- " <div style=\"clear:both\"></div> \n" +
- " </div>\n" +
- " <p>\n" +
- " <span class=\"alignLeft\">Total charges</span>\n" +
- " <span class=\"alignRight\">{{stackDataPoint.total| currency}}</span>\n" +
- " </p>\n" +
- " <div style=\"clear:both\"></div>\n" +
- " <span class=\"tooltipArrow\"></span>\n" +
- " </div>\n" +
- "</div>");
-}]);
diff --git a/ecomp-portal-BE/war/static/ebz/attSessionTimeoutModal.css b/ecomp-portal-BE/war/static/ebz/attSessionTimeoutModal.css
deleted file mode 100644
index 6bb2d00e..00000000
--- a/ecomp-portal-BE/war/static/ebz/attSessionTimeoutModal.css
+++ /dev/null
@@ -1,1562 +0,0 @@
-.hide {
- display: none;
-}
-.show {
- display: block;
-}
-.modal-backdrop {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- background-color: #000000;
-}
-.modal-backdrop.fade {
- opacity: 0;
-}
-.modal-backdrop,
-.modal-backdrop.fade.in {
- opacity: 0.8;
- filter: alpha(opacity=80);
-}
-#reg-sessionModalPopupWindow.modal {
- position: fixed;
- top: 10%;
- left: 50%;
- width: 400px;
- margin-left: -200px;
- background-color: #ffffff;
- border: 1px solid #999;
- border: 1px solid rgba(0, 0, 0, 0.3);
- *border: 1px solid #999;
- /* IE6-7 */
-
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
- -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
- -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
- box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
- -webkit-background-clip: padding-box;
- -moz-background-clip: padding-box;
- background-clip: padding-box;
- outline: none;
- bottom: auto;
- overflow: visible;
- overflow-y: visible;
-}
-#reg-sessionModalPopupWindow.modal.fade {
- -webkit-transition: opacity 0.3s linear, top 0.3s ease-out;
- -moz-transition: opacity 0.3s linear, top 0.3s ease-out;
- -o-transition: opacity 0.3s linear, top 0.3s ease-out;
- transition: opacity 0.3s linear, top 0.3s ease-out;
- top: -25%;
-}
-#reg-sessionModalPopupWindow.modal.fade.in {
- top: 10%;
-}
-#reg-sessionModalPopupWindow .modal-header {
- padding: 9px 15px;
- border-bottom: 1px solid #eee;
-}
-#reg-sessionModalPopupWindow .modal-header .close {
- margin-top: 2px;
-}
-#reg-sessionModalPopupWindow .modal-header h3 {
- margin: 0;
- line-height: 30px;
-}
-#reg-sessionModalPopupWindow .modal-body {
- position: relative;
- overflow-y: auto;
- max-height: 400px;
- padding: 15px;
-}
-#reg-sessionModalPopupWindow .modal-form {
- margin-bottom: 0;
-}
-#reg-sessionModalPopupWindow .modal-footer {
- padding: 14px 15px 15px;
- margin-bottom: 0;
- text-align: right;
- background-color: #f5f5f5;
- border-top: 1px solid #ddd;
- -webkit-border-radius: 0 0 6px 6px;
- -moz-border-radius: 0 0 6px 6px;
- border-radius: 0 0 6px 6px;
- -webkit-box-shadow: inset 0 1px 0 #ffffff;
- -moz-box-shadow: inset 0 1px 0 #ffffff;
- box-shadow: inset 0 1px 0 #ffffff;
- *zoom: 1;
-}
-#reg-sessionModalPopupWindow .modal-footer:before,
-#reg-sessionModalPopupWindow .modal-footer:after {
- display: table;
- content: "";
- line-height: 0;
-}
-#reg-sessionModalPopupWindow .modal-footer:after {
- clear: both;
-}
-#reg-sessionModalPopupWindow .modal-footer .btn + .btn {
- margin-left: 5px;
- margin-bottom: 0;
-}
-#reg-sessionModalPopupWindow .modal-footer .btn-group .btn + .btn {
- margin-left: -1px;
-}
-#reg-sessionModalPopupWindow .modal-footer .btn-block + .btn-block {
- margin-left: 0;
-}
-/*
-input{
- color: #444444;
- font-family: clearviewattregular;
- font-size: 12px;
- //line-height: 48px;
- width: 190px;
- height: 22px;
- background: none repeat scroll 0 0 #FFFFFF;
-
-}
-input:focus {
- border:1px solid #199ddf!important;
- //box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(82, 168, 236, 0.6);
- outline: 0 none;
- box-shadow:none!important;
- }
- input:hover{
- border:1px solid #BBBBBB;
- //box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(82, 168, 236, 0.6);
- outline: 0 none;
- box-shadow:none!important;
- }
-*/
-.button-black {
- border-radius: 6px;
- /*-webkit-transition: background 0.3s ease-in-out 0s;
- -moz-transition: background 0.3s ease-in-out 0s;
- transition: background 0.3s ease-in-out 0s;*/
-
- width: 94px;
- height: 30px;
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- background: #444444;
- font-family: clearviewattregular;
- font-size: 14px;
- line-height: 15px;
- color: #FFFFFF;
- margin-top: 40px;
- margin-left: 14px;
- border: none!important;
-}
-#reg-sessionModalPopupWindow {
- min-height: 492px;
- height: auto;
- width: 400px;
- box-shadow: 0 8px 10px rgba(0, 0, 0, 0.25);
- -webkit-box-shadow: 0 8px 10px rgba(0, 0, 0, 0.25);
- -moz-box-shadow: 0 8px 10px rgba(0, 0, 0, 0.25);
-}
-#reg-sessionModalPopupWindow form {
- margin: 0px !important;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle1 {
- height: 150px;
- background-color: #067ab4;
- clear: both;
- width: 400px;
- box-shadow: 0 8px 10px rgba(0, 0, 0, 0.25);
- -webkit-box-shadow: 0 8px 10px rgba(0, 0, 0, 0.25);
- -moz-box-shadow: 0 8px 10px rgba(0, 0, 0, 0.25);
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle1 .reg-info-sprite {
- background-image: url("../images/common/session-timeout/information_spritesheet.png");
- background-position: 0 0;
- background-repeat: no-repeat;
- display: block;
- height: 56px;
- width: 56px;
- margin-top: 47px;
- float: left;
- margin-left: 172px;
- text-decoration: underline;
-}
-#reg-sessionModalPopupWindow .reg-login-error-msg-box {
- color: #ff4539;
- cursor: default;
- display: block !important;
- font-size: 12px;
- height: auto;
- line-height: 20px;
- padding: 10px;
- text-align: left;
- width: auto;
- z-index: 100;
-}
-#reg-sessionModalPopupWindow .reg-login-error-msg-box a {
- cursor: pointer;
- color: #FFFFFF;
- text-decoration: underline;
-}
-#reg-sessionModalPopupWindow .reg-custom-errorIcon {
- background: url('../images/common/form-validation/red-error-icon.png') no-repeat !important;
- clear: both;
- display: block;
- float: left;
- height: 14px;
- margin: 10px 10px 0px 10px;
- width: 15px;
- z-index: 100;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 {
- min-height: 342px;
- width: 400px;
- height: auto;
- background-color: #ffffff;
- clear: both;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 .reg-sessionModalTimeOut {
- clear: both;
- height: auto;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 .reg-sessionModalTimeOut .reg-sessionTimeOut {
- clear: both;
- padding-top: 42px;
- width: 100%;
- padding-left: 50px;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 .reg-sessionModalTimeOut .reg-sessionTimeOut .reg-TimeOut {
- color: #444444;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 .reg-sessionModalTimeOut .reg-sessionLoggedOut {
- clear: both;
- margin: 0 auto;
- padding-top: 6px;
- padding-left: 0px;
- padding-right: 0px;
- text-align: center;
- padding-bottom: 6px;
- white-space: nowrap;
- line-height: initial;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 .reg-sessionModalTimeOut .reg-sessionLoggedOut .reg-LogOut {
- margin: 0px;
- text-transform: none;
- font-family: clearviewatt_ltbold;
- font-size: 14px;
- font-weight: 100;
- color: #444444;
- /*line-height: 20px;*/
-
- white-space: nowrap;
- line-height: initial;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 .reg-sessionModalTimeOut .reg-sessionExpired {
- clear: both;
- margin-top: 0px;
- padding-left: 50px;
- padding-right: 40px;
- line-height: initial;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 .reg-sessionModalTimeOut .reg-sessionExpired .reg-Expired {
- margin: 0px;
- text-transform: none;
- font-family: clearviewattregular;
- font-size: 14px;
- line-height: 10px;
- font-weight: 100;
- color: #444444;
- line-height: initial;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 .reg-valid {
- clear: both;
- text-align: center;
- height: auto;
- padding: 0px 0px 0px 0px;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 .reg-valid .error-msg-box {
- background-color: #FF4539;
- border-radius: 3px 3px 3px 3px;
- color: #FFFFFF;
- font-size: 12px;
- height: 35px;
- line-height: 35px;
- margin-left: 100px;
- margin-top: 15px;
- width: 200px;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 #reg-login {
- float: left;
- padding-left: 99px;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 #reg-login .reg-username {
- clear: both;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 #reg-login .reg-username #reg-emailLogin {
- background: url("../images/icon-username.png") no-repeat scroll 10px center #fafafa ! important;
- font-size: 12px !important;
- background: none repeat scroll 0 0 #FAFAFA;
- border: 1px solid #D3D3D3 !important;
- border-radius: 3px;
- color: #444444;
- font-family: clearviewattregular;
- -ms-transition: all 0.3s ease-in-out;
- transition: border 0.3s ease-in-out;
- box-shadow: none !important;
- padding-left: 10px;
- height: 35px;
- margin-top: 15px;
- padding: 8px 10px 10px 36px;
- width: 300px;
- margin-bottom: 0px;
- border-radius: 0px !important;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 #reg-login .reg-username #reg-emailLogin:hover {
- border: 1px solid #BBBBBB !important;
- z-index: 90;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 #reg-login .reg-username #reg-emailLogin:focus {
- border: 1px solid #199DDF !important;
- box-shadow: none;
- -webkit-box-shadow: none;
- outline: 0;
- z-index: 100;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 #reg-login .reg-password {
- clear: both;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 #reg-login .reg-password #reg-userPassword {
- background: url("../images/icon-password.png") no-repeat scroll 10px center #fafafa ! important;
- background: none repeat scroll 0 0 #FAFAFA;
- border: 1px solid #D3D3D3 !important;
- border-radius: 3px;
- color: #444444;
- font-family: clearviewattregular;
- -ms-transition: all 0.3s ease-in-out;
- transition: border 0.3s ease-in-out;
- box-shadow: none !important;
- padding-left: 10px;
- display: block;
- font-size: 12px !important;
- height: 35px;
- margin-bottom: 0px;
- margin-top: -10px;
- padding: 8px 10px 10px 36px;
- width: 300px;
- border-radius: 0px !important;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 #reg-login .reg-password #reg-userPassword:hover {
- border: 1px solid #BBBBBB !important;
- z-index: 90;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 #reg-login .reg-password #reg-userPassword:focus {
- border: 1px solid #199DDF !important;
- box-shadow: none;
- -webkit-box-shadow: none;
- outline: 0;
- z-index: 100;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 .reg-cancel-login {
- width: 100%;
- clear: both;
- height: 130px;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 .reg-cancel-login #reg-cancelBtn {
- float: left;
- margin-left: 65px;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 .reg-cancel-login #reg-cancelBtn .button-black {
- /*-webkit-transition: background 0.3s ease-in-out 0s;
- -moz-transition: background 0.3s ease-in-out 0s;
- transition: background 0.3s ease-in-out 0s;*/
-
- width: 97px;
- height: 30px;
- line-height: 15px;
- margin-top: 40px;
- margin-left: 17px;
- float: left;
- padding: 8px 17px !important;
- box-sizing: border-box;
- -moz-box-sizing: border-box;
- border: 0 none;
- border-radius: 6px;
- color: #FFFFFF !important;
- cursor: pointer;
- display: inline-block;
- font-size: 14px;
- line-height: 1;
- position: relative;
- text-align: center;
- transition: background-color 0.3s ease-out 0s;
- vertical-align: middle;
- padding: 8px 20px 8px 20px;
- height: auto;
- text-decoration: none !important;
- valign: middle;
- outline: none;
- background-color: #666666;
- color: #FFFFFF;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 .reg-cancel-login #reg-cancelBtn .button-black:hover {
- background-color: #BBBBBB;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 .reg-cancel-login #reg-cancelBtn .button-black:active {
- background-color: #666666;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 .reg-cancel-login #reg-loginBtn {
- float: left;
- margin-left: 25px;
- /* .button-active:hover{
- -webkit-transition: background 0.3s ease-in-out 0s;
- -moz-transition: background 0.3s ease-in-out 0s;
- transition: background 0.3s ease-in-out 0s;
- border-radius:6px;
- width:94px;
- height:30px;
- -webkit-border-radius:6px;
- -moz-border-radius:6px;
- background:#199DDF;
- font-family: clearviewattregular;
- font-size: 14px;
- line-height: 15px;
- color: #FFFFFF;
- margin-top: 48px;
- margin-left: 14px;
- border:none;
- }
- .button-active:active{
- -webkit-transition: background 0.3s ease-in-out 0s;
- -moz-transition: background 0.3s ease-in-out 0s;
- transition: background 0.3s ease-in-out 0s;
- border-radius:6px;
- width:94px;
- height:30px;
- -webkit-border-radius:6px;
- -moz-border-radius:6px;
- background:#069ab4;
- font-family: clearviewattregular;
- font-size: 14px;
- line-height: 15px;
- color: #7cc6ff;
- margin-top: 48px;
- margin-left: 14px;
- border:none;
- } */
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 .reg-cancel-login #reg-loginBtn .button-disable {
- width: 94px;
- height: 30px;
- line-height: 15px;
- pointer-events: none;
- margin-top: 40px;
- padding: 8px 17px !important;
- box-sizing: border-box;
- -moz-box-sizing: border-box;
- background-color: #666666;
- border: 0 none;
- border-radius: 6px;
- color: #FFFFFF !important;
- display: inline-block;
- font-size: 14px;
- line-height: 1;
- position: relative;
- text-align: center;
- transition: background-color 0.3s ease-out 0s;
- vertical-align: middle;
- padding: 8px 20px 8px 20px;
- height: auto;
- text-decoration: none !important;
- valign: middle;
- outline: none;
- background-color: #DDDDDD;
- color: #999 !important;
- cursor: pointer;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 .reg-cancel-login #reg-loginBtn .button-disable:hover {
- background-color: #DDDDDD;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 .reg-cancel-login #reg-loginBtn .button-disable:active {
- background-color: #DDDDDD;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 .reg-cancel-login #reg-loginBtn .button-active {
- width: 94px;
- height: 30px;
- line-height: 15px;
- margin-top: 40px;
- border: none;
- padding: 8px 17px !important;
- box-sizing: border-box;
- -moz-box-sizing: border-box;
- background-color: #666666;
- border: 0 none;
- border-radius: 6px;
- cursor: pointer;
- display: inline-block;
- font-size: 14px;
- line-height: 1;
- position: relative;
- text-align: center;
- transition: background-color 0.3s ease-out 0s;
- vertical-align: middle;
- padding: 8px 20px 8px 20px;
- height: auto;
- text-decoration: none !important;
- valign: middle;
- outline: none;
- background-color: #067AB4;
- border-color: #3580BD;
- color: #FFFFFF !important;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 .reg-cancel-login #reg-loginBtn .button-active:hover {
- background-color: #199DDF;
-}
-#reg-sessionModalPopupWindow .reg-sessionModalRectangle2 .reg-cancel-login #reg-loginBtn .button-active:active {
- background-color: #3278B1;
- border-color: #28618D;
-}
-form#formID {
- padding: 0px ! important;
-}
-.top-sub-menu {
- width: 24.9%;
- float: left;
- height: 50px;
- background: #ffffff;
- text-align: center;
-}
-.top-sub-menu-border {
- border-width: 0 0.1em 0 0;
- border-color: #e7e5e6;
- border-style: solid;
-}
-.top-sub-menu-span {
- color: #067AB4;
- font-family: clearviewatt_ltregular ! important;
- font-size: 18px;
- position: relative;
- top: 16px;
- left: 80px;
-}
-.inputCheckBox {
- float: left;
- margin-top: 14px;
- margin-right: 10px;
-}
-/*
-.labelBeforeClick {
- //background-image: url("/registration/web/images/sprite_20px.png");
- background-image: url("../images/sprite_20px.png");
- background-position: 43px 1px;
- display: inline-block;
- height: 20px;
- vertical-align: middle;
- width: 23px;
-}
-*/
-.labelAfterClick {
- background-image: none;
- display: inline-block;
- vertical-align: middle;
-}
-.global-checkbox {
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
- filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0 )";
- filter: alpha(opacity = 0);
- -moz-opacity: 0;
- -khtml-opacity: 0;
- opacity: 0;
- position: relative;
- background-color: #f8f8f8;
- border-color: #f8f8f8;
- outline-width: 0px;
- outline: none;
-}
-.business-center-sprite-account-balance {
- background-image: url("../images/common/session-timeout/sprite_businesscenter_benefits.png");
- background-position: -1px 1px;
- display: inline-block;
- height: 20px;
- vertical-align: middle;
- width: 30px;
-}
-.font-format {
- text-transform: none;
- clear: both;
- height: 45px;
- color: #067AB4;
- font-family: clearviewattregular ! important;
- font-size: 25px;
-}
-.login-label {
- width: 88px;
- font-size: 10px;
- color: #444;
-}
-.login-textBox {
- background: url("../images/common/session-timeout/exclamation-error.png") no-repeat scroll 266px #ffffff ! important;
- border: 1px solid #AAAAAA;
- border-radius: 4px 4px 4px 4px;
- background-color: #E7E5E6 ! important;
- color: #676767;
- font-family: 'clearviewattregular';
- font-size: 12px;
- height: 18px;
- line-height: 18px;
- margin: 1px 0;
- padding: 4px 4px 4px 5px;
- position: relative;
- vertical-align: middle;
- border-color: #b10b3b ! important;
- -webkit-box-shadow: inset 0px 0px 3px #b10b3b, 0px 0px 3px #b10b3b ! important;
- -moz-box-shadow: inset 0px 0px 3px #b10b3b, 0px 0px 3px #b10b3b ! important;
- box-shadow: inset 0px 0px 3px #b10b3b, 0px 0px 3px #b10b3b ! important;
- -webkit-transition: border linear 0.2s, box-shadow linear 0.2s ! important;
- -moz-transition: border linear 0.2s, box-shadow linear 0.2s ! important;
- -o-transition: border linear 0.2s, box-shadow linear 0.2s ! important;
- transition: border linear 0.2s, box-shadow linear 0.2s ! important;
-}
-input:-webkit-autofill {
- color: #E7E5E6 ! important;
-}
-.horizontal-border {
- background: none repeat scroll 0 0 #E7E5E6;
- float: left;
- height: 1.25px;
- margin-bottom: 5px;
- margin-top: 5px;
- width: 157px;
-}
-.error-class {
- font-size: 10px;
- color: #b30a3c;
-}
-.server-side-error {
- background-color: #F7E6EC;
- border: 1px solid #D6A7B7;
- color: #B30A3C;
- font-size: 10px;
- height: 23px;
- padding-left: 15px;
- margin-bottom: 15px;
- padding-top: 10px;
- border-radius: 3px 3px 3px 3px;
-}
-.login-placeholder {
- position: relative;
-}
-.login-error-msg-box {
- position: relative;
- font-size: 12px;
- color: #FFFFFF;
- background-color: #ff4539;
- height: auto;
- width: 190px;
- margin: -1px 0px 0px 3px;
- border-radius: 0 0 4px 4px;
- z-index: 100;
- padding: 12px 9px 10px 8px!important;
- line-height: 15px;
- cursor: default;
-}
-.login-error-msg-box a {
- cursor: pointer;
- color: #FFFFFF;
- text-decoration: underline;
-}
-.center-error-msg-box {
- position: relative;
- font-size: 12px;
- color: #FFFFFF;
- background-color: #ff4539;
- height: auto;
- width: 187px;
- margin-top: -2px;
- margin-left: 3px;
- border-radius: 0px 0px 4px 4px;
- z-index: 100;
- padding: 7px 10px 5px 10px;
- text-align: center;
- line-height: 15px;
- cursor: default;
-}
-.login-warning-msg-box {
- position: relative;
- font-size: 12px;
- color: #444444;
- background-color: #fcb134;
- height: auto;
- width: 190px;
- margin-top: -1px;
- margin-left: 3px;
- border-radius: 0 0 4px 4px;
- z-index: 100;
- padding: 8px 9px 7px 8px!important;
- line-height: 15px;
- cursor: default;
-}
-.login-warning-msg-box a {
- cursor: pointer;
- color: #444444;
- text-decoration: underline;
-}
-.custom-errorIcon {
- background: url(../common/images/common/form-validation/red-error-icon.png) no-repeat !important;
- height: 14px;
- width: 15px;
- position: absolute;
- top: 10px;
- left: 182px;
- z-index: 100;
- padding-top: 12px;
-}
-.custom-warningIcon {
- background: url(../common/images/common/form-validation/orange-LockedOut-icon.png) no-repeat !important;
- height: 14px;
- width: 15px;
- position: absolute;
- top: 8px;
- left: 182px;
- z-index: 100;
-}
-.header_login_field_border_warning {
- border: 1px solid #fcb134!important;
-}
-.header_login_field_3sides_warning {
- border: 1px solid #fcb134!important;
-}
-.header_login_field_border_error {
- border: 1px solid #ff4539!important;
-}
-#ajaxLoaderLoginPage {
- padding-left: 100px;
-}
-/* Registration Input Login Text and Password */
-.regFormInputLoginText,
-.regFormInputLoginPassword {
- display: block;
- /* this breaks relative positioning */
-
- width: 162px;
- height: 15px;
- color: #444444;
- padding: 10px;
- font-size: 12px;
- background: no-repeat scroll 100% -22px #fafafa;
-}
-.header-login-button {
- height: 20px;
- min-width: 10px !important;
- box-shadow: none;
- /* width:65px !important; */
-
-}
-#formID #header_login_title {
- font-family: omnes_attlight;
- font-size: 18px;
- color: #444;
- margin-top: 25px;
-}
-#formID #emailLogin {
- display: block;
- /* this breaks relative positioning */
-
- width: 162px;
- height: 15px;
- padding: 10px;
- font-size: 12px;
- background: no-repeat scroll 100% -22px #fafafa;
- background: none repeat scroll 0 0 #FAFAFA;
- border: 1px solid #D3D3D3;
- border-radius: 3px;
- color: #444444;
- font-family: clearviewattregular;
- -ms-transition: all 0.3s ease-in-out;
- transition: border 0.3s ease-in-out;
- box-shadow: none !important;
- border-radius: 3px 3px 0px 0px ! important;
- margin-top: 13px;
- margin-left: 3px;
- height: 14px!important;
- width: 165px!important;
- background: url("../images/icon-username.png") no-repeat scroll 7px 9px #fafafa ! important;
- padding-left: 30px;
- line-height: 13px !important;
-}
-#formID #emailLogin:hover {
- border: 1px solid #BBBBBB;
- z-index: 90;
-}
-#formID #emailLogin:focus {
- border: 1px solid #199DDF !important;
- box-shadow: none;
- -webkit-box-shadow: none;
- outline: 0;
- z-index: 100;
-}
-#formID #userPassword {
- display: block;
- /* this breaks relative positioning */
-
- width: 162px;
- height: 15px;
- padding: 10px;
- font-size: 12px;
- background: no-repeat scroll 100% -22px #fafafa;
- background: none repeat scroll 0 0 #FAFAFA;
- border: 1px solid #D3D3D3;
- border-radius: 3px;
- color: #444444;
- font-family: clearviewattregular;
- -ms-transition: all 0.3s ease-in-out;
- transition: border 0.3s ease-in-out;
- box-shadow: none !important;
- border-radius: 0px 0px 3px 3px ! important;
- margin-top: -9px;
- margin-left: 3px;
- margin-bottom: 0px;
- height: 14px!important;
- width: 165px!important;
- background: url("../images/common/session-timeout/icon-password.png") no-repeat scroll 7px 9px #fafafa ! important;
- padding-left: 30px;
- line-height: 13px !important;
-}
-#formID #userPassword:hover {
- border: 1px solid #BBBBBB;
- z-index: 90;
-}
-#formID #userPassword:focus {
- border: 1px solid #199DDF !important;
- box-shadow: none;
- -webkit-box-shadow: none;
- outline: 0;
- z-index: 100;
-}
-#formID #login_block {
- margin-top: 14px;
- height: 30px;
- margin-left: 3px;
-}
-#formID #login_block #login-btn {
- padding: 8px 17px !important;
- box-sizing: border-box;
- -moz-box-sizing: border-box;
- background-color: #666666;
- border: 0 none;
- border-radius: 6px;
- cursor: pointer;
- display: inline-block;
- font-size: 14px;
- line-height: 1;
- position: relative;
- text-align: center;
- transition: background-color 0.3s ease-out 0s;
- vertical-align: middle;
- padding: 8px 20px 8px 20px;
- height: auto;
- text-decoration: none !important;
- valign: middle;
- outline: none;
- background-color: #067AB4;
- border-color: #3580BD;
- color: #FFFFFF !important;
- height: 30px !important;
- min-width: 60px;
- min-width: 80px!important;
- padding: 8px 0px 8px 0px !important;
-}
-#formID #login_block #login-btn:hover {
- background-color: #199DDF;
-}
-#formID #login_block #login-btn:active {
- background-color: #3278B1;
- border-color: #28618D;
-}
-#formID #remember_me_component {
- margin-top: 14px;
- margin-left: 4px;
-}
-#formID #remember_me_component #rememberme_header_label {
- margin-top: 4px;
-}
-#formID #remember_me_component .text-input {
- font-size: 12px !important;
- padding: 0px;
- margin-left: 6px;
-}
-#formID #remember_me_component #remember-me {
- color: #666;
-}
-#formID #forgot_username_component {
- clear: both;
- text-align: left;
- padding-top: 48px;
- padding-bottom: 30px;
- padding-left: 3px;
-}
-#formID #forgot_username_component .regular {
- font-family: clearviewattregular;
- font-size: 12px;
- color: #444444;
-}
-#formID #forgot_username_component .link {
- font-family: clearviewattregular;
- font-size: 12px;
- color: #067ab4;
-}
-.login-top-backImage {
- background-image: url('../images/bg-login-final.jpg');
- height: 648px;
- background-position: 74% 104%;
- padding-left: 18px;
- padding-top: 0px;
-}
-.login-buss-center {
- font-family: omnes_attlight;
- text-transform: none;
- clear: both;
- line-height: 50px;
- padding-top: 80px;
- padding-bottom: 30px;
- font-size: 48px;
- text-align: start;
- color: #444444;
-}
-.login-userid-error {
- height: 70px;
- width: 180px;
- border-radius: 0px 0px 0px 0px;
- position: relative;
- left: 113px;
- top: -110px;
-}
-.login-password-error {
- height: 70px;
- width: 182px;
- border-radius: 0px 0px 0px 0px;
- display: none;
- position: relative;
- left: 112px;
- top: -110px;
-}
-.login-submit {
- height: 25px;
- width: 275px ! important;
-}
-.bui-reg-font {
- font-size: 25px;
- font-family: omnes_attmedium_italic ! important;
-}
-.bui-reg-lowerDiv-right {
- float: right;
- width: 70%;
-}
-.bui-reg-lowerDiv {
- padding-top: 60px;
- padding-bottom: 20px;
- height: 230px;
- background-color: #f2f2f2;
-}
-.bui-reg-lowerDiv .bui-reg-lowerDiv-content {
- height: inherit;
- width: 980px;
- margin: 0 auto;
-}
-.bui-reg-row-1-1 {
- float: left;
- width: 100%;
-}
-.bui-reg-f-12 {
- font-size: 12px;
-}
-.bui-reg-fr {
- float: right;
-}
-.bui-reg-w-75p {
- width: 75%;
-}
-.bui-reg-fl {
- float: left;
-}
-.bui-reg-login-btn {
- height: 25px;
- width: 230px;
- font-size: 11px;
- font-style: bold;
-}
-.bui-reg-err-popup {
- float: left;
- margin-left: 100px;
- margin-top: -27px;
- height: 40px;
-}
-.bui-reg-lowerDiv-right {
- width: 610px;
- margin: -4px 29px 0px 0px;
-}
-.bui-reg-new-customer {
- float: left;
- width: 260px;
- padding-left: 30px;
-}
-.bui-reg-new-customer-desc {
- margin-left: 2px;
- padding-top: 20px;
- line-height: 18px;
- font-family: 'clearviewattregular';
- font-size: 12px;
-}
-#reg_button_temp {
- margin: 0px 0px 0px 0px;
- width: 250px;
-}
-.bui-reg-fast,
-.bui-reg-new-customer-label {
- font-family: arial;
- font-size: 24px;
- color: #067ab4;
- margin: -3px 0px 0px 29px;
-}
-.bui-reg-fast h3,
-.bui-reg-new-customer-label h3 {
- color: #067ab4;
- margin-left: -28px;
-}
-.bui-reg-btn-hero {
- padding: 8px 17px !important;
- box-sizing: border-box;
- -moz-box-sizing: border-box;
- background-color: #666666;
- border: 0 none;
- border-radius: 6px;
- color: #FFFFFF !important;
- cursor: pointer;
- display: inline-block;
- font-size: 14px;
- line-height: 1;
- position: relative;
- text-align: center;
- transition: background-color 0.3s ease-out 0s;
- vertical-align: middle;
- padding: 8px 20px 8px 20px;
- text-decoration: none !important;
- valign: middle;
- outline: none;
- background-color: #EF6F00;
- color: #FFFFFF;
- margin-left: 1px;
- width: 200px;
- height: auto;
-}
-.bui-reg-btn-hero:hover {
- background-color: #FCB314;
-}
-.bui-reg-btn-hero:active {
- background-color: #FF7200;
-}
-.bui-m-t-25 {
- margin-top: 35px !important;
- margin-left: 3px !important;
-}
-.bui-global-btn {
- padding: 8px 17px !important;
-}
-.bui-reg-column-1 {
- float: left;
- margin-top: 31px;
- margin-right: 72px;
- width: 240px;
-}
-.bui-reg-column-1 .bui-reg-account-balance .bui-reg-account-balance-pic {
- margin: 3px 0px 0px 2px;
- float: left;
- background-image: url("../images/common/session-timeout/sprite_businesscenter_benefits.png");
- background-position: -1px 1px;
- display: inline-block;
- height: 20px;
- vertical-align: middle;
- width: 30px;
- background-position: 107px -1px;
- height: 27px !important;
- width: 26px !important;
-}
-.bui-reg-column-1 .bui-reg-account-balance .bui-reg-account-balance-desc {
- color: #444444;
- font-family: clearviewattregular ! important;
- font-size: 12px;
- padding-left: 57px;
- width: 220px;
- line-height: 15px !important;
-}
-.bui-reg-column-1 .bui-reg-account-balance .att-global-fonts-content-copy {
- line-height: 15px !important;
-}
-.bui-reg-column-1 .bui-reg-changeTV {
- margin-top: 25px;
-}
-.bui-reg-column-1 .bui-reg-changeTV .bui-reg-changeTV-pic {
- margin-top: 5px;
- float: left;
- background-image: url("../images/common/session-timeout/sprite_businesscenter_benefits.png");
- background-position: -1px 1px;
- display: inline-block;
- height: 20px;
- vertical-align: middle;
- width: 30px;
- background-position: 82px 0px;
- height: 28px !important;
- width: 30px !important;
-}
-.bui-reg-column-1 .bui-reg-changeTV .bui-reg-changeTV-desc {
- color: #444444;
- font-family: clearviewattregular ! important;
- font-size: 12px;
- padding-left: 58px;
- width: 210px;
- margin-top: -3px;
- line-height: 15px !important;
-}
-.bui-reg-column-1 .bui-reg-changeTV .att-global-fonts-content-copy {
- line-height: 15px !important;
-}
-.bui-reg-column-2 {
- float: left;
- margin-top: 29px;
- width: 240px;
-}
-.bui-reg-column-2 .bui-reg-networkManagement .bui-reg-networkManagement-pic {
- margin: 5px 0px 0px -1px;
- float: left;
- background-image: url("../images/common/session-timeout/sprite_businesscenter_benefits.png");
- background-position: -1px 1px;
- display: inline-block;
- height: 20px;
- vertical-align: middle;
- width: 30px;
- background-position: 52px 0px;
- height: 28px !important;
- width: 27px !important;
-}
-.bui-reg-column-2 .bui-reg-networkManagement .bui-reg-networkManagement-desc {
- color: #444444;
- font-family: clearviewattregular ! important;
- font-size: 12px;
- padding: 2px 0px 0px 54px;
- width: 190px;
- line-height: 15px !important;
-}
-.bui-reg-column-2 .bui-reg-networkManagement .att-global-fonts-content-copy {
- line-height: 15px !important;
-}
-.bui-reg-column-2 .bui-reg-minutes-text-data {
- margin-top: 37px;
-}
-.bui-reg-column-2 .bui-reg-minutes-text-data .bui-reg-minutes-text-data-pic {
- margin: 3px 0px 0px -1px;
- float: left;
- background-image: url("../images/common/session-timeout/sprite_businesscenter_benefits.png");
- background-position: -1px 1px;
- display: inline-block;
- height: 20px;
- vertical-align: middle;
- width: 30px;
- background-position: 24px 0px;
- height: 28px !important;
- width: 25px !important;
-}
-.bui-reg-column-2 .bui-reg-minutes-text-data .bui-reg-minutes-text-data-pic .clearfix {
- clear: both;
-}
-.bui-reg-column-2 .bui-reg-minutes-text-data .bui-reg-minutes-text-data-pic .header-custom-errorIcon {
- background: url(../common/images/common/form-validation/red-error-icon.png) no-repeat !important;
- height: 14px;
- width: 14px;
- position: absolute;
- top: 10px;
- left: 200px;
- z-index: 100;
- padding-top: 12px;
-}
-.bui-reg-column-2 .bui-reg-minutes-text-data .bui-reg-minutes-text-data-pic .header-custom-warningIcon {
- background: url(../images/common/form-validation/orange-LockedOut-icon.png) no-repeat !important;
- clear: both;
- display: block;
- float: left;
- height: 14px;
- margin: 10px 10px 0px 10px;
- width: 15px;
- z-index: 100;
-}
-.bui-reg-column-2 .bui-reg-minutes-text-data .bui-reg-minutes-text-data-pic .header-login-error-msg-box {
- position: relative;
- font-size: 13px;
- color: #FFF;
- background-color: #ff4539;
- height: auto;
- width: 190px;
- margin-top: -1px;
- border-radius: 0 0 4px 4px;
- z-index: 100;
- padding: 8px 5px 7px 5px!important;
- line-height: 15px;
- cursor: default;
- margin-left: 25px;
- text-align: left;
-}
-.bui-reg-column-2 .bui-reg-minutes-text-data .bui-reg-minutes-text-data-pic .header-login-error-msg-box a {
- cursor: pointer;
- color: #FFF;
- text-decoration: underline;
- vertical-align: 3px;
-}
-.bui-reg-column-2 .bui-reg-minutes-text-data .bui-reg-minutes-text-data-pic .header-login-warning-msg-box {
- position: relative;
- font-size: 12px;
- color: #fcb134;
- height: 60px;
- width: 190px;
- margin-top: 0px;
- z-index: 100;
- line-height: 15px;
- cursor: default;
- margin-left: 25px;
- text-align: left;
- margin-left: 76px;
- display: inline-block !important;
-}
-.bui-reg-column-2 .bui-reg-minutes-text-data .bui-reg-minutes-text-data-pic .header-fields-req-msg-box {
- position: relative;
- font-size: 12px;
- color: #FFF;
- background-color: #ff4539;
- height: auto;
- width: 190px;
- margin-top: -1px;
- border-radius: 0 0 4px 4px;
- z-index: 100;
- padding: 8px 5px 7px 5px!important;
- line-height: 15px;
- cursor: default;
- margin-left: 25px;
- text-align: center;
-}
-.bui-reg-column-2 .bui-reg-minutes-text-data .bui-reg-minutes-text-data-desc {
- color: #444444;
- font-family: clearviewattregular ! important;
- font-size: 12px;
- padding: 1px 0px 0px 55px;
- width: 210px;
- line-height: 15px !important;
-}
-.bui-reg-column-2 .bui-reg-minutes-text-data .att-global-fonts-content-copy {
- line-height: 15px !important;
-}
-.clearfix {
- clear: both;
-}
-.header-custom-errorIcon {
- background: url(../common/images/common/form-validation/red-error-icon.png) no-repeat !important;
- height: 14px;
- width: 14px;
- position: absolute;
- top: 10px;
- left: 200px;
- z-index: 100;
- padding-top: 12px;
-}
-.header-custom-warningIcon {
- background: url(../images/common/form-validation/orange-warning-icon.png) no-repeat !important;
- clear: both;
- display: block;
- float: left;
- height: 14px;
- margin: 10px 10px 0px 10px;
- width: 14px;
- z-index: 100;
-}
-.header-login-error-msg-box {
- position: relative;
- font-size: 13px;
- color: #FFF;
- background-color: #ff4539;
- height: auto;
- width: 190px;
- margin-top: -1px;
- border-radius: 0 0 4px 4px;
- z-index: 100;
- padding: 8px 5px 7px 5px!important;
- line-height: 15px;
- cursor: default;
- margin-left: 25px;
- text-align: left;
-}
-.header-login-error-msg-box a {
- cursor: pointer;
- color: #FFF;
- text-decoration: underline;
-}
-.header-login-warning-msg-box {
- color: #fcb134;
- cursor: default;
- display: block !important;
- font-size: 12px;
- height: auto;
- line-height: 20px;
- padding: 10px;
- text-align: left;
- width: auto;
- z-index: 100;
-}
-.header-fields-req-msg-box {
- position: relative;
- font-size: 12px;
- color: #FFF;
- background-color: #ff4539;
- height: auto;
- width: 190px;
- margin-top: -1px;
- border-radius: 0 0 4px 4px;
- z-index: 100;
- padding: 8px 5px 7px 5px!important;
- line-height: 15px;
- cursor: default;
- margin-left: 25px;
- text-align: center;
-}
-.bui-global-btn {
- box-sizing: border-box;
- -moz-box-sizing: border-box;
- background-color: #666666;
- border: 0 none;
- border-radius: 6px;
- color: #FFFFFF !important;
- cursor: pointer;
- display: inline-block;
- font-size: 14px;
- line-height: 1;
- position: relative;
- text-align: center;
- transition: background-color 0.3s ease-out 0s;
- vertical-align: middle;
- padding: 8px 20px 8px 20px;
- height: auto;
- text-decoration: none !important;
- valign: middle;
- outline: none;
-}
-.bui-global-btn-small {
- height: 30px !important;
- min-width: 60px;
-}
-.bui-global-btn-primary {
- background-color: #067AB4;
- border-color: #3580BD;
- color: #FFFFFF !important;
-}
-.bui-global-btn-primary:hover {
- background-color: #199DDF;
-}
-.bui-global-btn-primary:active {
- background-color: #3278B1;
- border-color: #28618D;
-}
-.bui-global-btn-hero {
- background-color: #EF6F00;
- color: #FFFFFF;
-}
-.bui-global-btn-hero:hover {
- background-color: #FCB314;
-}
-.bui-global-btn-hero:active {
- background-color: #FF7200;
-}
-.bui-global-btn-secondary {
- background-color: #666666;
- color: #FFFFFF;
-}
-.bui-global-btn-secondary:hover {
- background-color: #BBBBBB;
-}
-.bui-global-btn-secondary:active {
- background-color: #666666;
-}
-.bui-global-btn-disabled {
- background-color: #DDDDDD;
- color: #999 !important;
- cursor: pointer;
-}
-.bui-global-btn-disabled:hover {
- background-color: #DDDDDD;
-}
-.bui-global-btn-disabled:active {
- background-color: #DDDDDD;
-}
-.loadingIconImage {
- background-image: url('../images/common/session-timeout/LazyScrollPlaceholder.gif');
- background-repeat: no-repeat;
- /* make the background image appear only once */
-
- background-position: center 4px;
- /* equivalent to 'top left' */
-
- background-size: 24px 24px;
- vertical-align: middle;
- /* align the text vertically centered */
-
- display: inline-block;
-}
-.loadingIconImage:hover {
- background-color: #067AB4 !important;
-}
-/* ***** Global Fonts ******* */
-.att-global-fonts-common {
- margin: 0px;
- text-transform: none;
-}
-h2.att-global-fonts {
- margin: 0px;
- text-transform: none;
- font-family: omnes_attlight;
- font-size: 36px;
- line-height: 36px;
- font-weight: 100;
- letter-spacing: -1px;
-}
-.att-global-fonts-modal-header {
- margin: 0px;
- text-transform: none;
- font-family: clearviewatt_ltbold;
- font-size: 14px;
- font-weight: 100;
-}
-.att-global-fonts-modal-content {
- margin: 0px;
- text-transform: none;
- font-family: clearviewattregular;
- font-size: 14px;
- line-height: 10px;
- font-weight: 100;
-}
-/* ***** Global Transitions ******* */
-.bui-global-transitions-focus {
- border: 1px solid #199DDF !important;
- box-shadow: none;
- -webkit-box-shadow: none;
- outline: 0;
- z-index: 100;
-}
-.bui-global-transitions-hover {
- border: 1px solid #BBBBBB;
- z-index: 90;
-}
-.bui-global-transitions-hover-important {
- border: 1px solid #BBBBBB !important;
- z-index: 90;
-}
-.bui-global-transitions-login-page {
- background: none repeat scroll 0 0 #FAFAFA;
- border: 1px solid #D3D3D3;
- border-radius: 3px;
- color: #444444;
- font-family: clearviewattregular;
- -ms-transition: all 0.3s ease-in-out;
- transition: border 0.3s ease-in-out;
- box-shadow: none !important;
-}
-.bui-global-transitions-login-page:hover {
- border: 1px solid #BBBBBB;
- z-index: 90;
-}
-.bui-global-transitions-login-page:focus {
- border: 1px solid #199DDF !important;
- box-shadow: none;
- -webkit-box-shadow: none;
- outline: 0;
- z-index: 100;
-}
-.bui-global-transitions {
- background: none repeat scroll 0 0 #FAFAFA;
- border: 1px solid #D3D3D3 !important;
- border-radius: 3px;
- color: #444444;
- font-family: clearviewattregular;
- -ms-transition: all 0.3s ease-in-out;
- transition: border 0.3s ease-in-out;
- box-shadow: none !important;
-}
-.bui-global-transitions:hover {
- border: 1px solid #BBBBBB !important;
- z-index: 90;
-}
-.bui-global-transitions:focus {
- border: 1px solid #199DDF !important;
- box-shadow: none;
- -webkit-box-shadow: none;
- outline: 0;
- z-index: 100;
-}
-.bui-global-transitions-disabled {
- background: none repeat scroll 0 0 #F2F2F2;
- border: 1px solid #D3D3D3 !important;
- border-radius: 3px;
- color: #444444;
- font-family: clearviewattregular;
- box-shadow: none !important;
-}
-.bui-global-form-fields {
- background: none repeat scroll 0 0 #FAFAFA;
- border: 1px solid #D3D3D3 !important;
- border-radius: 3px;
- color: #444444;
- font-family: clearviewattregular;
- -ms-transition: all 0.3s ease-in-out;
- transition: border 0.3s ease-in-out;
- box-shadow: none !important;
- padding-left: 10px;
-}
-.bui-global-form-fields:hover {
- border: 1px solid #BBBBBB !important;
- z-index: 90;
-}
-.bui-global-form-fields:focus {
- border: 1px solid #199DDF !important;
- box-shadow: none;
- -webkit-box-shadow: none;
- outline: 0;
- z-index: 100;
-}
-.bui-global-form-fields-disabled {
- background: none repeat scroll 0 0 #F2F2F2;
- border: 1px solid #D3D3D3 !important;
- border-radius: 3px;
- color: #444444;
- font-family: clearviewattregular;
- box-shadow: none !important;
- padding-left: 10px;
-}
-.custom-button-top-warning {
- padding-top: 10px;
-}
-.custom-button-top-locked {
- margin-top: 60px;
- padding-top: 45px;
-}
-.custom-top-modal {
- margin-top: -65px;
-}
-.custom-button-top-pending {
- margin-top: 100px;
- padding-top: 25px;
-}
-.custom-button-top-deactivate {
- padding-top: 40px;
-}
-.reg-sessionTimeOut-custom {
- padding-top: 20px !important;
-}
-.reg-message-border-custom {
- margin-top: -20px !important;
-}
diff --git a/ecomp-portal-BE/war/static/ebz/dashboardBase.css b/ecomp-portal-BE/war/static/ebz/dashboardBase.css
deleted file mode 100644
index 56d6774b..00000000
--- a/ecomp-portal-BE/war/static/ebz/dashboardBase.css
+++ /dev/null
@@ -1,5798 +0,0 @@
-/* Generated by F12 developer tools. This might not be an accurate representation of the original source file */
-@import url( globalFonts.css );
-@font-face {
- font-family: clearviewatt;
- src: url(clearviewatt/clvatt-book-webfont.eot?#iefix) format("embedded-opentype"), url(clearviewatt/clvatt-book-webfont.woff) format("woff"), url(clearviewatt/clvatt-book-webfont.ttf) format("truetype"), url(clearviewatt/clvatt-book-webfont.svg#clearviewattregular) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: clearviewattregular;
- src: url(clearviewatt/clvatt-book-webfont.eot?#iefix) format("embedded-opentype"), url(clearviewatt/clvatt-book-webfont.woff) format("woff"), url(clearviewatt/clvatt-book-webfont.ttf) format("truetype"), url(clearviewatt/clvatt-book-webfont.svg#clearviewattregular) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: clearviewatt_italic;
- src: url(./webfonts/clvatt-book_ital-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/clvatt-book_ital-webfont.woff) format("woff"), url(./webfonts/clvatt-book_ital-webfont.ttf) format("truetype"), url(./webfonts/clvatt-book_ital-webfont.svg#clearviewattitalic) format("svg");
- font-weight: normal;
- font-style: italic;
-}
-@font-face {
- font-family: clearviewatt_lt;
- src: url(./webfonts/clvatt-light-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/clvatt-light-webfont.woff) format("woff"), url(./webfonts/clvatt-light-webfont.ttf) format("truetype"), url(./webfonts/clvatt-light-webfont.svg#clearviewatt_ltregular) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: clearviewattlight_italic;
- src: url(./webfonts/clvatt-light_ital-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/clvatt-light_ital-webfont.woff) format("woff"), url(./webfonts/clvatt-light_ital-webfont.ttf) format("truetype"), url(./webfonts/clvatt-light_ital-webfont.svg#clearviewatt_ltitalic) format("svg");
- font-weight: normal;
- font-style: italic;
-}
-@font-face {
- font-family: clearviewatt_ltbold;
- src: url(clearviewatt/clvatt-bold-webfont.eot?#iefix) format("embedded-opentype"), url(clearviewatt/clvatt-bold-webfont.woff) format("woff"), url(clearviewatt/clvatt-bold-webfont.ttf) format("truetype"), url(clearviewatt/clvatt-bold-webfont.svg#clearviewatt_ltbold) format("svg");
- font-weight: bold;
- font-style: normal;
-}
-@font-face {
- font-family: clearviewatt_ltbold_italic;
- src: url(./webfonts/clvatt-bold_ital-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/clvatt-bold_ital-webfont.woff) format("woff"), url(./webfonts/clvatt-bold_ital-webfont.ttf) format("truetype"), url(./webfonts/clvatt-bold_ital-webfont.svg#clearviewatt_ltbold_italic) format("svg");
- font-weight: bold;
- font-style: italic;
-}
-@font-face {
- font-family: omnes_attlight;
- src: url(./webfonts/omnesatt-light-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-light-webfont.woff) format("woff"), url(./webfonts/omnesatt-light-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-light-webfont.svg#omnes_attlight) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: omnes_attlight_italic;
- src: url(./webfonts/omnesatt-lightitalic-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-lightitalic-webfont.woff) format("woff"), url(./webfonts/omnesatt-lightitalic-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-lightitalic-webfont.svg#omnes_attlight_italic) format("svg");
- font-weight: normal;
- font-style: italic;
-}
-@font-face {
- font-family: omnes_attmedium;
- src: url(./webfonts/omnesatt-medium-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-medium-webfont.woff) format("woff"), url(./webfonts/omnesatt-medium-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-medium-webfont.svg#omnes_attmedium) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: omnes_attmedium_italic;
- src: url(./webfonts/omnesatt-mediumitalic-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-mediumitalic-webfont.woff) format("woff"), url(./webfonts/omnesatt-mediumitalic-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-mediumitalic-webfont.svg#omnes_attmedium_italic) format("svg");
- font-weight: normal;
- font-style: italic;
-}
-@font-face {
- font-family: omnes_attregular;
- src: url(./webfonts/omnesatt-regular-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-regular-webfont.woff) format("woff"), url(./webfonts/omnesatt-regular-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-regular-webfont.svg#omnes_att_regularregular) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: omnes_attregular_italic;
- src: url(./webfonts/omnesatt-regularitalic-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-regularitalic-webfont.woff) format("woff"), url(./webfonts/omnesatt-regularitalic-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-regularitalic-webfont.svg#omnes_attregular_italic) format("svg");
- font-weight: normal;
- font-style: italic;
-}
-@font-face {
- font-family: radio_attregular;
- src: url(./webfonts/radioatt-regular-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/radioatt-regular-webfont.woff) format("woff"), url(./webfonts/radioatt-regular-webfont.ttf) format("truetype"), url(./webfonts/radioatt-regular-webfont.svg#radio_attregular) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: atticons;
- src: url(./webfonts/atticons.eot?#iefix) format("embedded-opentype"), url(./webfonts/atticons.woff) format("woff"), url(./webfonts/atticons.ttf) format("truetype"), url(./webfonts/atticons.svg#atticons) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: clearviewatt;
- src: url(clearviewatt/clvatt-book-webfont.eot?#iefix) format("embedded-opentype"), url(clearviewatt/clvatt-book-webfont.woff) format("woff"), url(clearviewatt/clvatt-book-webfont.ttf) format("truetype"), url(clearviewatt/clvatt-book-webfont.svg#clearviewattregular) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: clearviewattregular;
- src: url(clearviewatt/clvatt-book-webfont.eot?#iefix) format("embedded-opentype"), url(clearviewatt/clvatt-book-webfont.woff) format("woff"), url(clearviewatt/clvatt-book-webfont.ttf) format("truetype"), url(clearviewatt/clvatt-book-webfont.svg#clearviewattregular) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: clearviewatt_italic;
- src: url(./webfonts/clvatt-book_ital-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/clvatt-book_ital-webfont.woff) format("woff"), url(./webfonts/clvatt-book_ital-webfont.ttf) format("truetype"), url(./webfonts/clvatt-book_ital-webfont.svg#clearviewattitalic) format("svg");
- font-weight: normal;
- font-style: italic;
-}
-@font-face {
- font-family: clearviewatt_lt;
- src: url(./webfonts/clvatt-light-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/clvatt-light-webfont.woff) format("woff"), url(./webfonts/clvatt-light-webfont.ttf) format("truetype"), url(./webfonts/clvatt-light-webfont.svg#clearviewatt_ltregular) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: clearviewattlight_italic;
- src: url(./webfonts/clvatt-light_ital-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/clvatt-light_ital-webfont.woff) format("woff"), url(./webfonts/clvatt-light_ital-webfont.ttf) format("truetype"), url(./webfonts/clvatt-light_ital-webfont.svg#clearviewatt_ltitalic) format("svg");
- font-weight: normal;
- font-style: italic;
-}
-@font-face {
- font-family: clearviewatt_ltbold;
- src: url(clearviewatt/clvatt-bold-webfont.eot?#iefix) format("embedded-opentype"), url(clearviewatt/clvatt-bold-webfont.woff) format("woff"), url(clearviewatt/clvatt-bold-webfont.ttf) format("truetype"), url(clearviewatt/clvatt-bold-webfont.svg#clearviewatt_ltbold) format("svg");
- font-weight: bold;
- font-style: normal;
-}
-@font-face {
- font-family: clearviewatt_ltbold_italic;
- src: url(./webfonts/clvatt-bold_ital-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/clvatt-bold_ital-webfont.woff) format("woff"), url(./webfonts/clvatt-bold_ital-webfont.ttf) format("truetype"), url(./webfonts/clvatt-bold_ital-webfont.svg#clearviewatt_ltbold_italic) format("svg");
- font-weight: bold;
- font-style: italic;
-}
-@font-face {
- font-family: omnes_attlight;
- src: url(./webfonts/omnesatt-light-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-light-webfont.woff) format("woff"), url(./webfonts/omnesatt-light-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-light-webfont.svg#omnes_attlight) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: omnes_attlight_italic;
- src: url(./webfonts/omnesatt-lightitalic-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-lightitalic-webfont.woff) format("woff"), url(./webfonts/omnesatt-lightitalic-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-lightitalic-webfont.svg#omnes_attlight_italic) format("svg");
- font-weight: normal;
- font-style: italic;
-}
-@font-face {
- font-family: omnes_attmedium;
- src: url(./webfonts/omnesatt-medium-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-medium-webfont.woff) format("woff"), url(./webfonts/omnesatt-medium-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-medium-webfont.svg#omnes_attmedium) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: omnes_attmedium_italic;
- src: url(./webfonts/omnesatt-mediumitalic-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-mediumitalic-webfont.woff) format("woff"), url(./webfonts/omnesatt-mediumitalic-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-mediumitalic-webfont.svg#omnes_attmedium_italic) format("svg");
- font-weight: normal;
- font-style: italic;
-}
-@font-face {
- font-family: omnes_attregular;
- src: url(./webfonts/omnesatt-regular-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-regular-webfont.woff) format("woff"), url(./webfonts/omnesatt-regular-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-regular-webfont.svg#omnes_att_regularregular) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: omnes_attregular_italic;
- src: url(./webfonts/omnesatt-regularitalic-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-regularitalic-webfont.woff) format("woff"), url(./webfonts/omnesatt-regularitalic-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-regularitalic-webfont.svg#omnes_attregular_italic) format("svg");
- font-weight: normal;
- font-style: italic;
-}
-@font-face {
- font-family: radio_attregular;
- src: url(./webfonts/radioatt-regular-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/radioatt-regular-webfont.woff) format("woff"), url(./webfonts/radioatt-regular-webfont.ttf) format("truetype"), url(./webfonts/radioatt-regular-webfont.svg#radio_attregular) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: atticons;
- src: url(./webfonts/atticons.eot?#iefix) format("embedded-opentype"), url(./webfonts/atticons.woff) format("woff"), url(./webfonts/atticons.ttf) format("truetype"), url(./webfonts/atticons.svg#atticons) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-article {
- display: block;
-}
-aside {
- display: block;
-}
-details {
- display: block;
-}
-figcaption {
- display: block;
-}
-figure {
- display: block;
-}
-footer {
- display: block;
-}
-header {
- display: block;
-}
-hgroup {
- display: block;
-}
-nav {
- display: block;
-}
-section {
- display: block;
-}
-summary {
- display: block;
-}
-audio {
- display: inline-block;
-}
-canvas {
- display: inline-block;
-}
-video {
- display: inline-block;
-}
-audio:not([controls]) {
- height: 0px; display: none;
-}
-[hidden] {
- display: none;
-}
-html {
- font-size: 100%; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
-}
-html {
- font-family: sans-serif;
-}
-button {
- font-family: sans-serif;
-}
-input {
- font-family: sans-serif;
-}
-select {
- font-family: sans-serif;
-}
-textarea {
- font-family: sans-serif;
-}
-body {
- margin: 0px;
-}
-a:focus {
- outline: dotted thin;
-}
-a:active {
- outline: 0px;
-}
-a:hover {
- outline: 0px;
-}
-h1 {
- margin: 0.67em 0px; font-size: 2em;
-}
-h2 {
- margin: 0.83em 0px; font-size: 1.5em;
-}
-h3 {
- margin: 1em 0px; font-size: 1.17em;
-}
-h4 {
- margin: 1.33em 0px; font-size: 1em;
-}
-h5 {
- margin: 1.67em 0px; font-size: 0.83em;
-}
-h6 {
- margin: 2.33em 0px; font-size: 0.75em;
-}
-abbr[title] {
- border-bottom-color: currentColor; border-bottom-width: 1px; border-bottom-style: dotted;
-}
-b {
- font-weight: bold;
-}
-strong {
- font-weight: bold;
-}
-blockquote {
- margin: 1em 40px;
-}
-dfn {
- font-style: italic;
-}
-mark {
- background: rgb(255, 255, 0); color: rgb(0, 0, 0);
-}
-p {
- margin: 1em 0px;
-}
-pre {
- margin: 1em 0px;
-}
-code {
- font-family: monospace, serif; font-size: 1em; _font-family: "courier new", monospace;
-}
-kbd {
- font-family: monospace, serif; font-size: 1em; _font-family: "courier new", monospace;
-}
-pre {
- font-family: monospace, serif; font-size: 1em; _font-family: "courier new", monospace;
-}
-samp {
- font-family: monospace, serif; font-size: 1em; _font-family: "courier new", monospace;
-}
-pre {
- white-space: pre-wrap; -ms-word-wrap: break-word;
-}
-q {
- quotes: none;
-}
-q::before {
- content: none;
-}
-q::after {
- content: none;
-}
-small {
- font-size: 80%;
-}
-sub {
- line-height: 0; font-size: 75%; vertical-align: baseline; position: relative;
-}
-sup {
- line-height: 0; font-size: 75%; vertical-align: baseline; position: relative;
-}
-sup {
- top: -0.5em;
-}
-sub {
- bottom: -0.25em;
-}
-dl {
- margin: 1em 0px;
-}
-menu {
- margin: 1em 0px;
-}
-ol {
- margin: 1em 0px;
-}
-ul {
- margin: 1em 0px;
-}
-dd {
- margin: 0px 0px 0px 40px;
-}
-menu {
- padding: 0px 0px 0px 40px;
-}
-ol {
- padding: 0px 0px 0px 40px;
-}
-ul {
- padding: 0px 0px 0px 40px;
-}
-nav ul {
- list-style: none;
-}
-nav ol {
- list-style: none;
-}
-img {
- border: 0px currentColor; -ms-interpolation-mode: bicubic;
-}
-svg:not(:root) {
- overflow: hidden;
-}
-figure {
- margin: 0px;
-}
-form {
- margin: 0px;
-}
-fieldset {
- margin: 0px 2px; padding: 0.35em 0.62em 0.75em; border: 1px solid rgb(192, 192, 192);
-}
-legend {
- padding: 0px; border: 0px currentColor; white-space: normal;
-}
-button {
- margin: 0px; font-size: 100%; vertical-align: baseline;
-}
-input {
- margin: 0px; font-size: 100%; vertical-align: baseline;
-}
-select {
- margin: 0px; font-size: 100%; vertical-align: baseline;
-}
-textarea {
- margin: 0px; font-size: 100%; vertical-align: baseline;
-}
-button {
- line-height: normal;
-}
-input {
- line-height: normal;
-}
-button {
- cursor: pointer; -webkit-appearance: button;
-}
-html input[type='button'] {
- cursor: pointer; -webkit-appearance: button;
-}
-input[type='reset'] {
- cursor: pointer; -webkit-appearance: button;
-}
-input[type='submit'] {
- cursor: pointer; -webkit-appearance: button;
-}
-button[disabled] {
- cursor: default;
-}
-input[disabled] {
- cursor: default;
-}
-input[type='checkbox'] {
- padding: 0px; box-sizing: border-box;
-}
-input[type='radio'] {
- padding: 0px; box-sizing: border-box;
-}
-input[type='search'] {
- box-sizing: content-box; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; -webkit-appearance: textfield;
-}
-textarea {
- overflow: auto; vertical-align: top;
-}
-table {
- border-collapse: collapse; border-spacing: 0;
-}
-.bui-m-all-5 {
- margin: 5px;
-}
-.bui-m-all-10 {
- margin: 10px;
-}
-.bui-m-all-15 {
- margin: 15px;
-}
-.bui-m-all-20 {
- margin: 20px;
-}
-.bui-m-all-25 {
- margin: 25px;
-}
-.bui-m-all-30 {
- margin: 30px;
-}
-.bui-m-all-35 {
- margin: 35px;
-}
-.bui-m-all-40 {
- margin: 40px;
-}
-.bui-m-all-45 {
- margin: 5px;
-}
-.bui-m-all-50 {
- margin: 50px;
-}
-.bui-m-all-55 {
- margin: 55px;
-}
-.bui-m-all-60 {
- margin: 60px;
-}
-.bui-m-all-65 {
- margin: 65px;
-}
-.bui-m-all-70 {
- margin: 70px;
-}
-.bui-m-all-75 {
- margin: 75px;
-}
-.bui-m-all-80 {
- margin: 80px;
-}
-.bui-m-all-85 {
- margin: 85px;
-}
-.bui-m-all-90 {
- margin: 90px;
-}
-.bui-m-all-95 {
- margin: 95px;
-}
-.bui-m-all-100 {
- margin: 100px;
-}
-.bui-m-tb-5 {
- margin-top: 5px; margin-bottom: 5px;
-}
-.bui-m-tb-10 {
- margin-top: 10px; margin-bottom: 10px;
-}
-.bui-m-tb-15 {
- margin-top: 15px; margin-bottom: 15px;
-}
-.bui-m-tb-20 {
- margin-top: 20px; margin-bottom: 20px;
-}
-.bui-m-tb-25 {
- margin-top: 25px; margin-bottom: 25px;
-}
-.bui-m-tb-30 {
- margin-top: 30px; margin-bottom: 30px;
-}
-.bui-m-tb-35 {
- margin-top: 35px; margin-bottom: 35px;
-}
-.bui-m-tb-40 {
- margin-top: 40px; margin-bottom: 40px;
-}
-.bui-m-tb-45 {
- margin-top: 45px; margin-bottom: 45px;
-}
-.bui-m-tb-50 {
- margin-top: 50px; margin-bottom: 50px;
-}
-.bui-m-tb-55 {
- margin-top: 55px; margin-bottom: 55px;
-}
-.bui-m-tb-60 {
- margin-top: 60px; margin-bottom: 60px;
-}
-.bui-m-tb-65 {
- margin-top: 65px; margin-bottom: 65px;
-}
-.bui-m-tb-70 {
- margin-top: 70px; margin-bottom: 70px;
-}
-.bui-m-tb-75 {
- margin-top: 75px; margin-bottom: 75px;
-}
-.bui-m-tb-80 {
- margin-top: 80px; margin-bottom: 80px;
-}
-.bui-m-tb-85 {
- margin-top: 85px; margin-bottom: 85px;
-}
-.bui-m-tb-90 {
- margin-top: 90px; margin-bottom: 90px;
-}
-.bui-m-tb-95 {
- margin-top: 95px; margin-bottom: 95px;
-}
-.bui-m-tb-100 {
- margin-top: 100px; margin-bottom: 100px;
-}
-.bui-m-lr-5 {
- margin-right: 5px; margin-left: 5px;
-}
-.bui-m-lr-10 {
- margin-right: 10px; margin-left: 10px;
-}
-.bui-m-lr-15 {
- margin-right: 15px; margin-left: 15px;
-}
-.bui-m-lr-20 {
- margin-right: 20px; margin-left: 20px;
-}
-.bui-m-lr-25 {
- margin-right: 25px; margin-left: 25px;
-}
-.bui-m-lr-30 {
- margin-right: 30px; margin-left: 30px;
-}
-.bui-m-lr-35 {
- margin-right: 35px; margin-left: 35px;
-}
-.bui-m-lr-40 {
- margin-right: 40px; margin-left: 40px;
-}
-.bui-m-lr-45 {
- margin-right: 45px; margin-left: 45px;
-}
-.bui-m-lr-50 {
- margin-right: 50px; margin-left: 50px;
-}
-.bui-m-lr-55 {
- margin-right: 55px; margin-left: 55px;
-}
-.bui-m-lr-60 {
- margin-right: 60px; margin-left: 60px;
-}
-.bui-m-lr-65 {
- margin-right: 65px; margin-left: 65px;
-}
-.bui-m-lr-70 {
- margin-right: 70px; margin-left: 70px;
-}
-.bui-m-lr-75 {
- margin-right: 75px; margin-left: 75px;
-}
-.bui-m-lr-80 {
- margin-right: 80px; margin-left: 80px;
-}
-.bui-m-lr-85 {
- margin-right: 85px; margin-left: 85px;
-}
-.bui-m-lr-90 {
- margin-right: 90px; margin-left: 90px;
-}
-.bui-m-lr-95 {
- margin-right: 95px; margin-left: 95px;
-}
-.bui-m-lr-100 {
- margin-right: 100px; margin-left: 100px;
-}
-.bui-m-t-5 {
- margin-top: 5px;
-}
-.bui-m-t-10 {
- margin-top: 10px;
-}
-.bui-m-t-15 {
- margin-top: 15px;
-}
-.bui-m-t-20 {
- margin-top: 20px;
-}
-.bui-m-t-25 {
- margin-top: 25px;
-}
-.bui-m-t-30 {
- margin-top: 30px;
-}
-.bui-m-t-35 {
- margin-top: 35px;
-}
-.bui-m-t-40 {
- margin-top: 40px;
-}
-.bui-m-t-45 {
- margin-top: 45px;
-}
-.bui-m-t-50 {
- margin-top: 50px;
-}
-.bui-m-t-55 {
- margin-top: 55px;
-}
-.bui-m-t-60 {
- margin-top: 60px;
-}
-.bui-m-t-65 {
- margin-top: 65px;
-}
-.bui-m-t-70 {
- margin-top: 70px;
-}
-.bui-m-t-75 {
- margin-top: 75px;
-}
-.bui-m-t-80 {
- margin-top: 80px;
-}
-.bui-m-t-85 {
- margin-top: 85px;
-}
-.bui-m-t-90 {
- margin-top: 90px;
-}
-.bui-m-t-95 {
- margin-top: 95px;
-}
-.bui-m-t-100 {
- margin-top: 100px;
-}
-.bui-m-t-105 {
- margin-top: 105px;
-}
-.bui-m-t-130 {
- margin-top: 130px;
-}
-.bui-m-b-5 {
- margin-bottom: 5px;
-}
-.bui-m-b-10 {
- margin-bottom: 10px;
-}
-.bui-m-b-15 {
- margin-bottom: 15px;
-}
-.bui-m-b-20 {
- margin-bottom: 20px;
-}
-.bui-m-b-25 {
- margin-bottom: 25px;
-}
-.bui-m-b-30 {
- margin-bottom: 30px;
-}
-.bui-m-b-35 {
- margin-bottom: 35px;
-}
-.bui-m-b-40 {
- margin-bottom: 40px;
-}
-.bui-m-b-45 {
- margin-bottom: 45px;
-}
-.bui-m-b-50 {
- margin-bottom: 50px;
-}
-.bui-m-b-55 {
- margin-bottom: 55px;
-}
-.bui-m-b-60 {
- margin-bottom: 60px;
-}
-.bui-m-b-65 {
- margin-bottom: 65px;
-}
-.bui-m-b-70 {
- margin-bottom: 70px;
-}
-.bui-m-b-75 {
- margin-bottom: 75px;
-}
-.bui-m-b-80 {
- margin-bottom: 80px;
-}
-.bui-m-b-85 {
- margin-bottom: 85px;
-}
-.bui-m-b-90 {
- margin-bottom: 90px;
-}
-.bui-m-b-95 {
- margin-bottom: 95px;
-}
-.bui-m-b-100 {
- margin-bottom: 100px;
-}
-.bui-m-l-5 {
- margin-left: 5px;
-}
-.bui-m-l-10 {
- margin-left: 10px;
-}
-.bui-m-l-15 {
- margin-left: 15px;
-}
-.bui-m-l-20 {
- margin-left: 20px;
-}
-.bui-m-l-25 {
- margin-left: 25px;
-}
-.bui-m-l-30 {
- margin-left: 30px;
-}
-.bui-m-l-35 {
- margin-left: 35px;
-}
-.bui-m-l-40 {
- margin-left: 40px;
-}
-.bui-m-l-45 {
- margin-left: 45px;
-}
-.bui-m-l-50 {
- margin-left: 50px;
-}
-.bui-m-l-55 {
- margin-left: 55px;
-}
-.bui-m-l-60 {
- margin-left: 60px;
-}
-.bui-m-l-65 {
- margin-left: 65px;
-}
-.bui-m-l-70 {
- margin-left: 70px;
-}
-.bui-m-l-75 {
- margin-left: 75px;
-}
-.bui-m-l-80 {
- margin-left: 80px;
-}
-.bui-m-l-85 {
- margin-left: 85px;
-}
-.bui-m-l-90 {
- margin-left: 90px;
-}
-.bui-m-l-95 {
- margin-left: 95px;
-}
-.bui-m-l-100 {
- margin-left: 100px;
-}
-.bui-m-r-5 {
- margin-right: 5px;
-}
-.bui-m-r-10 {
- margin-right: 10px;
-}
-.bui-m-r-15 {
- margin-right: 15px;
-}
-.bui-m-r-20 {
- margin-right: 20px;
-}
-.bui-m-r-25 {
- margin-right: 25px;
-}
-.bui-m-r-30 {
- margin-right: 30px;
-}
-.bui-m-r-35 {
- margin-right: 35px;
-}
-.bui-m-r-40 {
- margin-right: 40px;
-}
-.bui-m-r-45 {
- margin-right: 45px;
-}
-.bui-m-r-50 {
- margin-right: 50px;
-}
-.bui-m-r-55 {
- margin-right: 55px;
-}
-.bui-m-r-60 {
- margin-right: 60px;
-}
-.bui-m-r-65 {
- margin-right: 65px;
-}
-.bui-m-r-70 {
- margin-right: 70px;
-}
-.bui-m-r-75 {
- margin-right: 75px;
-}
-.bui-m-r-80 {
- margin-right: 80px;
-}
-.bui-m-r-85 {
- margin-right: 85px;
-}
-.bui-m-r-90 {
- margin-right: 90px;
-}
-.bui-m-r-95 {
- margin-right: 95px;
-}
-.bui-m-r-100 {
- margin-right: 100px;
-}
-.bui-p-all-5 {
- padding: 5px;
-}
-.bui-p-all-10 {
- padding: 10px;
-}
-.bui-p-all-15 {
- padding: 15px;
-}
-.bui-p-all-20 {
- padding: 20px;
-}
-.bui-p-all-25 {
- padding: 25px;
-}
-.bui-p-all-30 {
- padding: 30px;
-}
-.bui-p-all-35 {
- padding: 35px;
-}
-.bui-p-all-40 {
- padding: 40px;
-}
-.bui-p-all-45 {
- padding: 45px;
-}
-.bui-p-all-50 {
- padding: 50px;
-}
-.bui-p-all-55 {
- padding: 55px;
-}
-.bui-p-all-60 {
- padding: 60px;
-}
-.bui-p-all-65 {
- padding: 65px;
-}
-.bui-p-all-70 {
- padding: 70px;
-}
-.bui-p-all-75 {
- padding: 75px;
-}
-.bui-p-all-80 {
- padding: 80px;
-}
-.bui-p-all-85 {
- padding: 85px;
-}
-.bui-p-all-90 {
- padding: 90px;
-}
-.bui-p-all-95 {
- padding: 95px;
-}
-.bui-p-all-100 {
- padding: 100px;
-}
-.bui-p-tb-5 {
- padding-top: 5px; padding-bottom: 5px;
-}
-.bui-p-tb-10 {
- padding-top: 10px; padding-bottom: 10px;
-}
-.bui-p-tb-15 {
- padding-top: 15px; padding-bottom: 15px;
-}
-.bui-p-tb-20 {
- padding-top: 20px; padding-bottom: 20px;
-}
-.bui-p-tb-25 {
- padding-top: 25px; padding-bottom: 25px;
-}
-.bui-p-tb-30 {
- padding-top: 30px; padding-bottom: 30px;
-}
-.bui-p-tb-35 {
- padding-top: 35px; padding-bottom: 35px;
-}
-.bui-p-tb-40 {
- padding-top: 40px; padding-bottom: 40px;
-}
-.bui-p-tb-45 {
- padding-top: 45px; padding-bottom: 45px;
-}
-.bui-p-tb-50 {
- padding-top: 50px; padding-bottom: 50px;
-}
-.bui-p-tb-55 {
- padding-top: 55px; padding-bottom: 55px;
-}
-.bui-p-tb-60 {
- padding-top: 60px; padding-bottom: 60px;
-}
-.bui-p-tb-65 {
- padding-top: 65px; padding-bottom: 65px;
-}
-.bui-p-tb-70 {
- padding-top: 70px; padding-bottom: 70px;
-}
-.bui-p-tb-75 {
- padding-top: 75px; padding-bottom: 75px;
-}
-.bui-p-tb-80 {
- padding-top: 80px; padding-bottom: 80px;
-}
-.bui-p-tb-85 {
- padding-top: 85px; padding-bottom: 85px;
-}
-.bui-p-tb-90 {
- padding-top: 90px; padding-bottom: 90px;
-}
-.bui-p-tb-95 {
- padding-top: 95px; padding-bottom: 95px;
-}
-.bui-p-tb-100 {
- padding-top: 100px; padding-bottom: 100px;
-}
-.bui-p-lr-5 {
- padding-right: 5px; padding-left: 5px;
-}
-.bui-p-lr-10 {
- padding-right: 10px; padding-left: 10px;
-}
-.bui-p-lr-15 {
- padding-right: 15px; padding-left: 15px;
-}
-.bui-p-lr-20 {
- padding-right: 20px; padding-left: 20px;
-}
-.bui-p-lr-25 {
- padding-right: 25px; padding-left: 25px;
-}
-.bui-p-lr-30 {
- padding-right: 30px; padding-left: 30px;
-}
-.bui-p-lr-35 {
- padding-right: 35px; padding-left: 35px;
-}
-.bui-p-lr-40 {
- padding-right: 40px; padding-left: 40px;
-}
-.bui-p-lr-45 {
- padding-right: 45px; padding-left: 45px;
-}
-.bui-p-lr-50 {
- padding-right: 50px; padding-left: 50px;
-}
-.bui-p-lr-55 {
- padding-right: 55px; padding-left: 55px;
-}
-.bui-p-lr-60 {
- padding-right: 60px; padding-left: 60px;
-}
-.bui-p-lr-65 {
- padding-right: 65px; padding-left: 65px;
-}
-.bui-p-lr-70 {
- padding-right: 70px; padding-left: 70px;
-}
-.bui-p-lr-75 {
- padding-right: 75px; padding-left: 75px;
-}
-.bui-p-lr-80 {
- padding-right: 80px; padding-left: 80px;
-}
-.bui-p-lr-85 {
- padding-right: 85px; padding-left: 85px;
-}
-.bui-p-lr-90 {
- padding-right: 90px; padding-left: 90px;
-}
-.bui-p-lr-95 {
- padding-right: 95px; padding-left: 95px;
-}
-.bui-p-lr-100 {
- padding-right: 100px; padding-left: 100px;
-}
-.bui-p-t-5 {
- padding-top: 5px;
-}
-.bui-p-t-10 {
- padding-top: 10px;
-}
-.bui-p-t-15 {
- padding-top: 15px;
-}
-.bui-p-t-20 {
- padding-top: 20px;
-}
-.bui-p-t-25 {
- padding-top: 25px;
-}
-.bui-p-t-30 {
- padding-top: 30px;
-}
-.bui-p-t-35 {
- padding-top: 35px;
-}
-.bui-p-t-40 {
- padding-top: 40px;
-}
-.bui-p-t-45 {
- padding-top: 45px;
-}
-.bui-p-t-50 {
- padding-top: 50px;
-}
-.bui-p-t-55 {
- padding-top: 55px;
-}
-.bui-p-t-60 {
- padding-top: 60px;
-}
-.bui-p-t-65 {
- padding-top: 65px;
-}
-.bui-p-t-70 {
- padding-top: 70px;
-}
-.bui-p-t-75 {
- padding-top: 75px;
-}
-.bui-p-t-80 {
- padding-top: 80px;
-}
-.bui-p-t-85 {
- padding-top: 85px;
-}
-.bui-p-t-90 {
- padding-top: 90px;
-}
-.bui-p-t-95 {
- padding-top: 95px;
-}
-.bui-p-t-100 {
- padding-top: 100px;
-}
-.bui-p-b-5 {
- padding-bottom: 5px;
-}
-.bui-p-b-10 {
- padding-bottom: 10px;
-}
-.bui-p-b-11 {
- padding-bottom: 11px;
-}
-.bui-p-b-12 {
- padding-bottom: 12px;
-}
-.bui-p-b-13 {
- padding-bottom: 13px;
-}
-.bui-p-b-14 {
- padding-bottom: 14px;
-}
-.bui-p-b-15 {
- padding-bottom: 15px;
-}
-.bui-p-b-20 {
- padding-bottom: 20px;
-}
-.bui-p-b-25 {
- padding-bottom: 25px;
-}
-.bui-p-b-30 {
- padding-bottom: 30px;
-}
-.bui-p-b-35 {
- padding-bottom: 35px;
-}
-.bui-p-b-40 {
- padding-bottom: 40px;
-}
-.bui-p-b-45 {
- padding-bottom: 45px;
-}
-.bui-p-b-50 {
- padding-bottom: 50px;
-}
-.bui-p-b-55 {
- padding-bottom: 55px;
-}
-.bui-p-b-60 {
- padding-bottom: 60px;
-}
-.bui-p-b-65 {
- padding-bottom: 65px;
-}
-.bui-p-b-70 {
- padding-bottom: 70px;
-}
-.bui-p-b-75 {
- padding-bottom: 75px;
-}
-.bui-p-b-80 {
- padding-bottom: 80px;
-}
-.bui-p-b-85 {
- padding-bottom: 85px;
-}
-.bui-p-b-90 {
- padding-bottom: 90px;
-}
-.bui-p-b-95 {
- padding-bottom: 95px;
-}
-.bui-p-b-100 {
- padding-bottom: 100px;
-}
-.bui-p-l-5 {
- padding-left: 5px;
-}
-.bui-p-l-10 {
- padding-left: 10px;
-}
-.bui-p-l-15 {
- padding-left: 15px;
-}
-.bui-p-l-20 {
- padding-left: 20px;
-}
-.bui-p-l-25 {
- padding-left: 25px;
-}
-.bui-p-l-30 {
- padding-left: 30px;
-}
-.bui-p-l-35 {
- padding-left: 35px;
-}
-.bui-p-l-40 {
- padding-left: 40px;
-}
-.bui-p-l-45 {
- padding-left: 45px;
-}
-.bui-p-l-50 {
- padding-left: 50px;
-}
-.bui-p-l-55 {
- padding-left: 55px;
-}
-.bui-p-l-60 {
- padding-left: 60px;
-}
-.bui-p-l-65 {
- padding-left: 65px;
-}
-.bui-p-l-70 {
- padding-left: 70px;
-}
-.bui-p-l-75 {
- padding-left: 75px;
-}
-.bui-p-l-80 {
- padding-left: 80px;
-}
-.bui-p-l-85 {
- padding-left: 85px;
-}
-.bui-p-l-90 {
- padding-left: 90px;
-}
-.bui-p-l-95 {
- padding-left: 95px;
-}
-.bui-p-l-100 {
- padding-left: 100px;
-}
-.bui-p-r-5 {
- padding-right: 5px;
-}
-.bui-p-r-10 {
- padding-right: 10px;
-}
-.bui-p-r-15 {
- padding-right: 15px;
-}
-.bui-p-r-20 {
- padding-right: 20px;
-}
-.bui-p-r-25 {
- padding-right: 25px;
-}
-.bui-p-r-30 {
- padding-right: 30px;
-}
-.bui-p-r-35 {
- padding-right: 35px;
-}
-.bui-p-r-40 {
- padding-right: 40px;
-}
-.bui-p-r-45 {
- padding-right: 45px;
-}
-.bui-p-r-50 {
- padding-right: 50px;
-}
-.bui-p-r-55 {
- padding-right: 55px;
-}
-.bui-p-r-60 {
- padding-right: 60px;
-}
-.bui-p-r-65 {
- padding-right: 65px;
-}
-.bui-p-r-70 {
- padding-right: 70px;
-}
-.bui-p-r-75 {
- padding-right: 75px;
-}
-.bui-p-r-80 {
- padding-right: 80px;
-}
-.bui-p-r-85 {
- padding-right: 85px;
-}
-.bui-p-r-90 {
- padding-right: 90px;
-}
-.bui-p-r-95 {
- padding-right: 95px;
-}
-.bui-p-r-100 {
- padding-right: 100px;
-}
-.bui-w-5-percent {
- width: 5% !important;
-}
-.bui-w-10-percent {
- width: 10% !important;
-}
-.bui-w-11-percent {
- width: 11% !important;
-}
-.bui-w-12-percent {
- width: 12% !important;
-}
-.bui-w-13-percent {
- width: 13% !important;
-}
-.bui-w-14-percent {
- width: 14% !important;
-}
-.bui-w-15-percent {
- width: 15% !important;
-}
-.bui-w-20-percent {
- width: 20% !important;
-}
-.bui-w-21-percent {
- width: 21% !important;
-}
-.bui-w-22-percent {
- width: 22% !important;
-}
-.bui-w-23-percent {
- width: 23% !important;
-}
-.bui-w-24-percent {
- width: 24% !important;
-}
-.bui-w-25-percent {
- width: 25% !important;
-}
-.bui-w-30-percent {
- width: 30% !important;
-}
-.bui-w-31-percent {
- width: 31% !important;
-}
-.bui-w-32-percent {
- width: 32% !important;
-}
-.bui-w-33-percent {
- width: 33% !important;
-}
-.bui-w-34-percent {
- width: 34% !important;
-}
-.bui-w-35-percent {
- width: 35% !important;
-}
-.bui-w-40-percent {
- width: 40% !important;
-}
-.bui-w-45-percent {
- width: 45% !important;
-}
-.bui-w-50-percent {
- width: 50% !important;
-}
-.bui-w-51-percent {
- width: 51% !important;
-}
-.bui-w-52-percent {
- width: 52% !important;
-}
-.bui-w-53-percent {
- width: 53% !important;
-}
-.bui-w-54-percent {
- width: 54% !important;
-}
-.bui-w-55-percent {
- width: 55% !important;
-}
-.bui-w-56-percent {
- width: 56% !important;
-}
-.bui-w-57-percent {
- width: 57% !important;
-}
-.bui-w-58-percent {
- width: 58% !important;
-}
-.bui-w-59-percent {
- width: 59% !important;
-}
-.bui-w-60-percent {
- width: 60% !important;
-}
-.bui-w-65-percent {
- width: 65% !important;
-}
-.bui-w-70-percent {
- width: 70% !important;
-}
-.bui-w-75-percent {
- width: 75% !important;
-}
-.bui-w-80-percent {
- width: 80% !important;
-}
-.bui-w-85-percent {
- width: 85% !important;
-}
-.bui-w-90-percent {
- width: 90% !important;
-}
-.bui-w-95-percent {
- width: 95% !important;
-}
-.bui-w-100-percent {
- width: 100% !important;
-}
-.bui-table {
- display: table;
-}
-.bui-table-row {
- display: table-row;
-}
-.bui-table-cell {
- display: table-cell;
-}
-.bui-table-column {
- display: table-column;
-}
-.bui-table-colgroup {
-
-}
-.bui-table-hdr-grp {
- display: table-header-group;
-}
-.bui-table-row-grp {
- display: table-row-group;
-}
-.bui-table-footer-grp {
- display: table-footer-group;
-}
-.bui-table-caption {
- display: table-caption;
-}
-.bui-icon-sprite-18 {
- width: 18px; height: 18px; vertical-align: middle; display: inline-block; background-image: url("../images/icons-18-spritesheet-and-hover.png");
-}
-.bui-icon-plus {
-
-}
-.bui-icon-plus-hover {
- background-position: 0px -18px;
-}
-.bui-icon-minus {
- background-position: -36px 0px;
-}
-.bui-icon-minus-hover {
- background-position: -36px -18px;
-}
-.bui-icon-delete {
- background-position: -72px 0px;
-}
-.bui-icon-delete-hover {
- background-position: -72px -18px;
-}
-.bui-icon-arrow-r {
- background-position: -108px 0px;
-}
-.bui-icon-arrow-r-hover {
- background-position: -108px -18px;
-}
-.bui-icon-arrow-l {
- background-position: -144px 0px;
-}
-.bui-icon-arrow-l-hover {
- background-position: -144px -18px;
-}
-.bui-icon-arrow-u {
- background-position: -180px 0px;
-}
-.bui-icon-arrow-u-hover {
- background-position: -180px -18px;
-}
-.bui-icon-arrow-d {
- background-position: -216px 0px;
-}
-.bui-icon-arrow-d-hover {
- background-position: -216px -18px;
-}
-.bui-icon-check {
- background-position: -252px 0px;
-}
-.bui-icon-check-hover {
- background-position: -252px -18px;
-}
-.bui-icon-gear {
- background-position: -288px 0px;
-}
-.bui-icon-gear-hover {
- background-position: -288px -18px;
-}
-.bui-icon-refresh {
- background-position: -324px 0px;
-}
-.bui-icon-refresh-hover {
- background-position: -324px -18px;
-}
-.bui-icon-forward {
- background-position: -360px 0px;
-}
-.bui-icon-forward-hover {
- background-position: -360px -18px;
-}
-.bui-icon-back {
- background-position: -396px 0px;
-}
-.bui-icon-back-hover {
- background-position: -396px -18px;
-}
-.bui-icon-grid {
- background-position: -432px 0px;
-}
-.bui-icon-grid-hover {
- background-position: -432px -18px;
-}
-.bui-icon-star {
- background-position: -468px 0px;
-}
-.bui-icon-star-hover {
- background-position: -468px -18px;
-}
-.bui-icon-alert {
- background-position: -504px 0px;
-}
-.bui-icon-alert {
- background-position: -504px -18px;
-}
-.bui-icon-info {
- background-position: -540px 0px;
-}
-.bui-icon-info-hover {
- background-position: -540px -18px;
-}
-.bui-icon-home {
- background-position: -576px 0px;
-}
-.bui-icon-home-hover {
- background-position: -576px -18px;
-}
-.bui-icon-search {
- background-position: -612px 0px;
-}
-.bui-icon-searchfield::after {
- background-position: -612px 0px;
-}
-.bui-icon-search-hover {
- background-position: -612px -18px;
-}
-.bui-icon-searchfield::after {
- background-position: -612px -18px;
-}
-.bui-icon-checkbox-off {
- background-position: -684px 0px;
-}
-.bui-icon-checkbox-off-hover {
- background-position: -684px -18px;
-}
-.bui-icon-checkbox-on {
- background-position: -648px 0px;
-}
-.bui-icon-checkbox-on-hover {
- background-position: -648px -18px;
-}
-.bui-icon-radio-off {
- background-position: -756px 0px;
-}
-.bui-icon-radio-off-hover {
- background-position: -756px -18px;
-}
-.bui-icon-radio-on {
- background-position: -720px 0px;
-}
-.bui-icon-radio-on-hover {
- background-position: -720px -18px;
-}
-.bui-icon-activity {
- background-position: -792px 0px;
-}
-.bui-icon-activity-hover {
- background-position: -792px -18px;
-}
-.bui-icon-notification {
- background-position: -828px 0px;
-}
-.bui-icon-notification-hover {
- background-position: -828px -18px;
-}
-.bui-icon-order {
- background-position: -859px 0px;
-}
-.bui-icon-order-hover {
- background-position: -859px -18px;
-}
-.bui-icon-sprite-25 {
- width: 25px; height: 25px; vertical-align: middle; display: inline-block; background-image: url("../images/icons_spritesheet_25.png");
-}
-.bui-icon-arrow-up-green {
-
-}
-.bui-icon-question-yellow {
- background-position: -26px 0px;
-}
-.bui-icon-exclaimation-pink {
- background-position: -52px 0px;
-}
-.bui-icon-bullet-point {
- background-position: -78px 0px;
-}
-.bui-icon-ok-status {
- background-position: -104px 0px;
-}
-.bui-icon-circle {
- background-position: -130px 0px;
-}
-.bui-icon-circle-hover {
- background-position: -130px -26px;
-}
-.bui-icon-number {
- background-position: -156px 0px;
-}
-.bui-icon-number-hover {
- background-position: -156px -26px;
-}
-.bui-icon-ticket {
- background-position: -182px 0px;
-}
-.bui-icon-ticket-hover {
- background-position: -182px -26px;
-}
-.bui-icon-maintenance {
- background-position: -208px 0px;
-}
-.bui-icon-maintenance-hover {
- background-position: -208px -26px;
-}
-.bui-icon-outage {
- background-position: -234px 0px;
-}
-.bui-icon-outage-hover {
- background-position: -234px -26px;
-}
-.bui-icon-profile {
- background-position: -260px 0px;
-}
-.bui-icon-profile-hover {
- background-position: -260px -26px;
-}
-.bui-icon-ticket-green {
- background-position: -286px 0px;
-}
-.bui-icon-maintenance-green {
- background-position: -312px 0px;
-}
-.bui-icon-outage-red {
- background-position: -338px 0px;
-}
-.bui-icon-solid-arrow-down {
- background-position: -650px 0px;
-}
-.bui-icon-solid-arrow-up {
- background-position: -650px -26px;
-}
-.bui-icon-sprite-db-menu {
- width: 35px; height: 35px; vertical-align: middle; display: inline-block; background-image: url("../images/sprite_dashboard_2nd_nav_35x35.png");
-}
-.bui-icon-dashboard {
-
-}
-.bui-icon-service {
- background-position: -36px 0px;
-}
-.bui-icon-account {
- background-position: -72px 0px;
-}
-.bui-icon-billing {
- background-position: -108px 0px;
-}
-.bui-icon-b-tool {
- background-position: -144px 0px;
-}
-.bui-icon-help {
- background-position: -180px 0px;
-}
-.bui-icon-sprite-overview {
- width: 14px; height: 14px; vertical-align: middle; display: inline-block; background-image: url("../images/sprite_dashboard_overview_widget_14x14.png");
-}
-.bui-icon-alarm-critical {
-
-}
-.bui-icon-alarm-congestion {
- background-position: -15px 0px;
-}
-.bui-icon-alarm-ack {
- background-position: -30px 0px;
-}
-.bui-icon-alarm-clear {
- background-position: -45px 0px;
-}
-.bui-icon-ticket-normal {
- background-position: -60px 0px;
-}
-.bui-icon-ticket-clear {
- background-position: -75px 0px;
-}
-.bui-icon-sprite-wireless {
- width: 30px; height: 30px; vertical-align: middle; display: inline-block; background-image: url("../images/sprite_dashboard_wireless_widget_30x30.png");
-}
-.bui-icon-wireless-upgrade {
-
-}
-.bui-icon-wireless-overage {
- background-position: -31px 0px;
-}
-.bui-icon-wireless-request {
- background-position: -62px 0px;
-}
-.bui-icon-sprite-social-media {
- width: 17px; height: 17px; vertical-align: middle; display: inline-block; background-image: url("../images/sprite_social_icons_17x17.png");
-}
-.bui-icon-sm-fb {
-
-}
-.bui-icon-sm-twitter {
- background-position: -18px 0px;
-}
-.bui-icon-sm-linkedin {
- background-position: -36px 0px;
-}
-.bui-icon-sm-rss {
- background-position: -54px 0px;
-}
-.bui-icon-sm-share {
- background-position: -72px 0px;
-}
-.bui-icon-sm-netvibe {
- background-position: -90px 0px;
-}
-.bui-icon-sprite-top-nav {
- width: 27px; height: 27px; vertical-align: middle; display: inline-block; background-image: url("../images/sprite_topnav_icons_27x27.png");
-}
-.bui-icon-top-chat {
-
-}
-.bui-icon-top-email {
- background-position: -28px 0px;
-}
-.bui-icon-top-cart {
- background-position: -56px 0px;
-}
-.bui-icon-top-account {
- background-position: -84px 0px;
-}
-.bui-icon-sprite-network {
- width: 19px; height: 19px; vertical-align: middle; display: inline-block; background-image: url("../images/sprites_network_icons_19x19.png");
-}
-.bui-icon-network-fullscreen {
-
-}
-.bui-icon-network-mapview {
- background-position: -20px 0px;
-}
-.bui-icon-network-tabview {
- background-position: -40px 0px;
-}
-.bui-icon-network-listview {
- background-position: -60px 0px;
-}
-.bui-icon-sprite-af-type {
- width: 18px; height: 18px; vertical-align: middle; display: inline-block; background-image: url("../images/sprites_activity_feed_type_icons_18x18.png");
-}
-.bui-icon-af-type-order {
-
-}
-.bui-icon-af-type-notification {
- background-position: -19px 0px;
-}
-.bui-icon-af-type-maintenance {
- background-position: -38px 0px;
-}
-.bui-icon-af-type-account {
- background-position: -57px 0px;
-}
-.bui-icon-sprite-activity-status {
- width: 31px; height: 31px; vertical-align: middle; display: inline-block; background-image: url("../images/sprites_activity_status_icons_31x31.png");
-}
-.bui-icon-activity-status-all {
-
-}
-.bui-icon-activity-status-alarm {
- background-position: -32px 0px;
-}
-.bui-icon-activity-status-order {
- background-position: -64px 0px;
-}
-.bui-icon-activity-status-maintenance {
- background-position: -96px 0px;
-}
-.bui-icon-activity-status-account {
- background-position: -128px 0px;
-}
-.bui-icon-activity-status-notification {
- background-position: -160px 0px;
-}
-.bui-icon-sprite-20 {
- width: 20px; height: 20px; vertical-align: middle; display: inline-block; background-image: url("../images/sprite_20px.png");
-}
-.bui-icon-arrow-d {
-
-}
-.bui-icon-arrow-u {
- background-position: -21px 0px;
-}
-.bui-icon-arrow-r {
- background-position: -42px 0px;
-}
-.bui-icon-social-f {
- background-position: -63px 0px;
-}
-.bui-icon-social-t {
- background-position: -84px 0px;
-}
-.bui-icon-social-in {
- background-position: -105px 0px;
-}
-.bui-icon-social-in {
- background-position: -126px 0px;
-}
-.bui-icon-social-rss {
- background-position: -147px 0px;
-}
-.bui-icon-social-share {
- background-position: -168px 0px;
-}
-.bui-icon-social-netvibe {
- background-position: -189px 0px;
-}
-.bui-icon-af-order {
- background-position: -210px 0px;
-}
-.bui-icon-af-notification {
- background-position: -231px 0px;
-}
-.bui-icon-af-maintenance {
- background-position: -252px 0px;
-}
-.bui-icon-af-account {
- background-position: -273px 0px;
-}
-.bui-icon-view-full-screen {
- background-position: -294px 0px;
-}
-.bui-icon-view-map {
- background-position: -315px 0px;
-}
-.bui-icon-view-tab {
- background-position: -336px 0px;
-}
-.bui-icon-view-list {
- background-position: -357px 0px;
-}
-.bui-icon-view-list-detail {
- background-position: -378px 0px;
-}
-.bui-icon-sprite-50 {
- width: 50px; height: 50px; vertical-align: middle; display: inline-block; background-image: url("../images/sprite_db_sub_menu_50x50.png");
-}
-.bui-icon-db-home {
-
-}
-.bui-icon-db-home-hover {
- background-position: 0px -51px;
-}
-.bui-icon-db-mobility {
- background-position: -51px 0px;
-}
-.bui-icon-db-mobility-hover {
- background-position: -51px -51px;
-}
-.bui-icon-db-ebilling {
- background-position: -102px 0px;
-}
-.bui-icon-db-ebilling-hover {
- background-position: -102px -51px;
-}
-.bui-icon-db-network {
- background-position: -153px 0px;
-}
-.bui-icon-db-network-hover {
- background-position: -153px -51px;
-}
-.bui-icon-db-activity {
- background-position: -204px 0px;
-}
-.bui-icon-db-activity-hover {
- background-position: -204px -51px;
-}
-.bui-icon-db-map {
- background-position: -255px 0px;
-}
-.bui-icon-db-map-hover {
- background-position: -255px -51px;
-}
-.bui-icon-db-analytic {
- background-position: -306px 0px;
-}
-.bui-icon-db-analytic-hover {
- background-position: -306px -51px;
-}
-.bui-icon-db-more-app {
- background-position: -357px 0px;
-}
-.bui-icon-db-more-app-hover {
- background-position: -357px -51px;
-}
-.bui-icon-sprite-14 {
- width: 14px; height: 18px; vertical-align: middle; display: inline-block; background-image: url("../images/icons/att_login_icon.png");
-}
-.bui-icon-acct-mgmt {
-
-}
-.bui-icon-sprite-mega-menu-item {
- width: 65px; height: 65px; vertical-align: middle; display: inline-block;
-}
-.bui-icon-mega-menu-item {
-
-}
-.bui-icon-mega-menu-item-hover {
- background-position: 0px -66px;
-}
-.bui-icon-sprite-8 {
- width: 8px; height: 8px; vertical-align: middle; display: inline-block; background-image: url("../images/icons/arrow_icon_sprite.png"); background-repeat: no-repeat;
-}
-.bui-icon-sprite-8-delete {
-
-}
-.bui-icon-sprite-8-arrow-d {
- background-position: 0px -9px;
-}
-.bui-icon-sprite-8-arrow-r {
- background-position: 0px -18px;
-}
-.bui-icon-sprite-8-arrow-white-d {
- background-position: 0px -27px;
-}
-.bui-icon-sprite-8-arrow-white-r {
- background-position: 0px -36px;
-}
-.voice-plan-sprite {
- background: url("../images/icons/voice_plan_sprite.png") no-repeat 0px 0px; width: 52px; height: 40px; vertical-align: middle; display: inline-block;
-}
-.voice-plan-sprite-anyminute {
-
-}
-.voice-plan-sprite-rollover {
- background-position: -53px 0px;
-}
-.voice-plan-sprite-m2m {
- background-position: -106px 0px;
-}
-.voice-plan-sprite-night-n-weekend {
- background-position: -159px 0px;
-}
-.voice-plan-sprite-add-min {
- background-position: -212px 0px;
-}
-.data-plan-sprite {
- background: url("../images/icons/data_plan_sprite.png") no-repeat 0px 0px; width: 52px; height: 40px; vertical-align: middle; display: inline-block;
-}
-.data-plan-sprite-data {
-
-}
-.data-plan-sprite-addln-data {
- background-position: -53px 0px;
-}
-.data-plan-sprite-canadian-data {
- background-position: -106px 0px;
-}
-.data-plan-sprite-intl-data {
- background-position: -159px 0px;
-}
-.data-plan-sprite-enterp-lvl {
- background-position: -212px 0px;
-}
-.form-element-sprite {
- background: url("../images/icons/form_element_sprite.png") no-repeat 0px 0px; width: 28px; height: 28px; vertical-align: middle; display: inline-block;
-}
-.form-element-sprite-radio {
- background-position: 0px -29px;
-}
-.form-element-sprite-radio-on {
-
-}
-.form-element-sprite-checkbox {
- background-position: -29px 0px;
-}
-.form-element-sprite-checkbox-on {
- background-position: -29px -29px;
-}
-.shopping-cart-sprite {
- background: url("../images/icons/shopping_cart_15x15.png") no-repeat 0px 0px; width: 15px; height: 15px; vertical-align: middle; display: inline-block;
-}
-.sc-device {
-
-}
-.sc-voice {
- background-position: -16px 0px;
-}
-.sc-data {
- background-position: -32px 0px;
-}
-.sc-add-on {
- background-position: -48px 0px;
-}
-.sc-accessory {
- background-position: -64px 0px;
-}
-.sc-remove {
- background-position: -80px 0px;
-}
-.basic-sprite {
- background: url("../images/icons/basic_sprite_10x10.png") no-repeat 0px 0px; width: 10px; height: 10px; vertical-align: middle; display: inline-block;
-}
-.basic-arrow-u {
-
-}
-.basic-arrow-d {
- background-position: 0px -11px;
-}
-.card-types-sprite {
- background: url("../images/icons/card_types_sprite.png") no-repeat 0px 0px; width: 51px; height: 32px; vertical-align: middle; display: inline-block;
-}
-.visa {
- background-position: 0px -32px;
-}
-.active.visa {
-
-}
-.visa-active {
-
-}
-.master-card {
- background-position: -52px -32px;
-}
-.active.master-card {
- background-position: -52px 0px;
-}
-.master-card-active {
- background-position: -52px 0px;
-}
-.discover {
- background-position: -156px -32px;
-}
-.active.discover {
- background-position: -156px 0px;
-}
-.discover-active {
- background-position: -156px 0px;
-}
-.amex-active {
- background-position: -104px 0px;
-}
-.amex {
- background-position: -104px -32px;
-}
-.active.amex {
- background-position: -104px 0px;
-}
-.services-sprite {
- background: url("../images/icons/services_sprite_30x30.png") no-repeat 0px 0px; width: 31px; height: 30px; vertical-align: middle; display: inline-block;
-}
-.close-icon {
- background-position: 0px -32px;
-}
-.wireless-icon {
- background-position: -31px -32px;
-}
-.internet-icon {
- background-position: -62px -32px; height: 31px;
-}
-.device-features-sprite {
- background: url("../images/icons/feature_sprite.png") no-repeat 0px 0px rgba(0, 0, 0, 0); width: 18px; height: 13px; vertical-align: middle; display: inline-block;
-}
-.device-display-icon {
- background-position: -1px -4px;
-}
-.device-processor-icon {
- background-position: -39px -3px;
-}
-.device-cam-icon {
- background-position: -19px -4px;
-}
-.device-4g-icon {
- background-position: -58px -3px;
-}
-.bui-grid-a {
-
-}
-.bui-grid-b {
-
-}
-.bui-grid-c {
-
-}
-.bui-grid-d {
-
-}
-.bui-grid-e {
-
-}
-.bui-block-a {
- margin: 0px; padding: 0px; border: 0px currentColor; float: left; min-height: 1px; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box;
-}
-.bui-block-b {
- margin: 0px; padding: 0px; border: 0px currentColor; float: left; min-height: 1px; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box;
-}
-.bui-block-c {
- margin: 0px; padding: 0px; border: 0px currentColor; float: left; min-height: 1px; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box;
-}
-.bui-block-d {
- margin: 0px; padding: 0px; border: 0px currentColor; float: left; min-height: 1px; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box;
-}
-.bui-block-e {
- margin: 0px; padding: 0px; border: 0px currentColor; float: left; min-height: 1px; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box;
-}
-.bui-block-1 {
- margin: 0px; padding: 0px; border: 0px currentColor; float: left; min-height: 1px; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box;
-}
-.bui-block-2 {
- margin: 0px; padding: 0px; border: 0px currentColor; float: left; min-height: 1px; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box;
-}
-.bui-block-3 {
- margin: 0px; padding: 0px; border: 0px currentColor; float: left; min-height: 1px; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box;
-}
-.bui-block-4 {
- margin: 0px; padding: 0px; border: 0px currentColor; float: left; min-height: 1px; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box;
-}
-.bui-block-5 {
- margin: 0px; padding: 0px; border: 0px currentColor; float: left; min-height: 1px; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box;
-}
-.bui-grid-a .bui-block-a {
- width: 50%; clear: left;
-}
-.bui-grid-2 .bui-block-a {
- width: 50%; clear: left;
-}
-.bui-grid-a .bui-block-b {
- width: 50%;
-}
-.bui-grid-2 .bui-block-b {
- width: 50%;
-}
-.bui-grid-a .bui-block-1 {
- width: 50%; clear: left;
-}
-.bui-grid-2 .bui-block-1 {
- width: 50%; clear: left;
-}
-.bui-grid-a .bui-block-2 {
- width: 50%;
-}
-.bui-grid-2 .bui-block-2 {
- width: 50%;
-}
-.bui-grid-a .bui-column {
- width: 50%;
-}
-.bui-grid-2 .bui-column {
- width: 50%;
-}
-.bui-grid-b .bui-block-a {
- width: 33.33%; clear: left;
-}
-.bui-grid-3 .bui-block-a {
- width: 33.33%; clear: left;
-}
-.bui-grid-b .bui-block-b {
- width: 33.33%;
-}
-.bui-grid-3 .bui-block-b {
- width: 33.33%;
-}
-.bui-grid-b .bui-block-c {
- width: 33.33%;
-}
-.bui-grid-3 .bui-block-c {
- width: 33.33%;
-}
-.bui-grid-b .bui-block-1 {
- width: 33.33%; clear: left;
-}
-.bui-grid-3 .bui-block-1 {
- width: 33.33%; clear: left;
-}
-.bui-grid-b .bui-block-2 {
- width: 33.33%;
-}
-.bui-grid-3 .bui-block-2 {
- width: 33.33%;
-}
-.bui-grid-b .bui-block-3 {
- width: 33.33%;
-}
-.bui-grid-3 .bui-block-3 {
- width: 33.33%;
-}
-.bui-grid-b .bui-column {
- width: 33.33%;
-}
-.bui-grid-3 .bui-column {
- width: 33.33%;
-}
-.bui-grid-c .bui-block-a {
- width: 25%; clear: left;
-}
-.bui-grid-4 .bui-block-a {
- width: 25%; clear: left;
-}
-.bui-grid-c .bui-block-b {
- width: 25%;
-}
-.bui-grid-4 .bui-block-b {
- width: 25%;
-}
-.bui-grid-c .bui-block-c {
- width: 25%;
-}
-.bui-grid-4 .bui-block-c {
- width: 25%;
-}
-.bui-grid-c .bui-block-d {
- width: 25%;
-}
-.bui-grid-4 .bui-block-d {
- width: 25%;
-}
-.bui-grid-c .bui-block-1 {
- width: 25%; clear: left;
-}
-.bui-grid-4 .bui-block-1 {
- width: 25%; clear: left;
-}
-.bui-grid-c .bui-block-2 {
- width: 25%;
-}
-.bui-grid-4 .bui-block-2 {
- width: 25%;
-}
-.bui-grid-c .bui-block-3 {
- width: 25%;
-}
-.bui-grid-4 .bui-block-3 {
- width: 25%;
-}
-.bui-grid-c .bui-block-4 {
- width: 25%;
-}
-.bui-grid-4 .bui-block-4 {
- width: 25%;
-}
-.bui-grid-c .bui-column {
- width: 25%;
-}
-.bui-grid-4 .bui-column {
- width: 25%;
-}
-.bui-grid-d .bui-block-a {
- width: 20%; clear: left;
-}
-.bui-grid-5 .bui-block-a {
- width: 20%; clear: left;
-}
-.bui-grid-d .bui-block-b {
- width: 20%;
-}
-.bui-grid-5 .bui-block-b {
- width: 20%;
-}
-.bui-grid-d .bui-block-c {
- width: 20%;
-}
-.bui-grid-5 .bui-block-c {
- width: 20%;
-}
-.bui-grid-d .bui-block-d {
- width: 20%;
-}
-.bui-grid-5 .bui-block-d {
- width: 20%;
-}
-.bui-grid-d .bui-block-e {
- width: 20%;
-}
-.bui-grid-5 .bui-block-e {
- width: 20%;
-}
-.bui-grid-d .bui-block-1 {
- width: 20%; clear: left;
-}
-.bui-grid-5 .bui-block-1 {
- width: 20%; clear: left;
-}
-.bui-grid-d .bui-block-2 {
- width: 20%;
-}
-.bui-grid-5 .bui-block-2 {
- width: 20%;
-}
-.bui-grid-d .bui-block-3 {
- width: 20%;
-}
-.bui-grid-5 .bui-block-3 {
- width: 20%;
-}
-.bui-grid-d .bui-block-4 {
- width: 20%;
-}
-.bui-grid-5 .bui-block-4 {
- width: 20%;
-}
-.bui-grid-d .bui-block-5 {
- width: 20%;
-}
-.bui-grid-5 .bui-block-5 {
- width: 20%;
-}
-.bui-grid-d .bui-column {
- width: 20%;
-}
-.bui-grid-5 .bui-column {
- width: 20%;
-}
-.ir {
- border: 0px currentColor; overflow: hidden; background-color: transparent;
-}
-.ir::before {
- width: 0px; height: 100%; display: block; content: "";
-}
-.hidden {
- display: none !important; visibility: hidden;
-}
-.visuallyhidden {
- margin: -1px; padding: 0px; border: 0px currentColor; width: 1px; height: 1px; overflow: hidden; position: absolute; clip: rect(0px, 0px, 0px, 0px);
-}
-.focusable.visuallyhidden:active {
- margin: 0px; width: auto; height: auto; overflow: visible; position: static; clip: auto;
-}
-.focusable.visuallyhidden:focus {
- margin: 0px; width: auto; height: auto; overflow: visible; position: static; clip: auto;
-}
-.invisible {
- visibility: hidden;
-}
-.clearfix::before {
- display: table; content: " ";
-}
-.clearfix::after {
- display: table; content: " ";
-}
-.clearfix::after {
- clear: both;
-}
-.clearfix {
-
-}
-.bui-full-width {
- width: 100%;
-}
-.bui-full-height {
- height: 100%;
-}
-.bui-display-none {
- display: none;
-}
-[data-icon]::before {
- text-transform: none; line-height: 1; font-family: "atticons"; font-variant: normal; font-weight: normal; content: attr(data-icon); speak: none; -webkit-font-smoothing: antialiased;
-}
-[class^='icon-'] {
- text-transform: none; line-height: 1; font-family: "atticons"; font-style: normal; font-variant: normal; font-weight: normal; speak: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
-}
-[class*=' icon-'] {
- text-transform: none; line-height: 1; font-family: "atticons"; font-style: normal; font-variant: normal; font-weight: normal; speak: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
-}
-.icon-wireless-outline::before {
- content: "\e600";
-}
-.icon-wireless-dashboard::before {
- content: "\e601";
-}
-.icon-website-hosting-outline::before {
- content: "\e602";
-}
-.icon-volume-up::before {
- content: "\e603";
-}
-.icon-volume-mute::before {
- content: "\e604";
-}
-.icon-volume-down::before {
- content: "\e605";
-}
-.icon-video::before {
- content: "\e606";
-}
-.icon-video-tutorials::before {
- content: "\e607";
-}
-.icon-video-tutorials-outline::before {
- content: "\e608";
-}
-.icon-video-outline::before {
- content: "\e609";
-}
-.icon-user::before {
- content: "\e60a";
-}
-.icon-user-small::before {
- content: "\e60b";
-}
-.icon-user-outline::before {
- content: "\e60c";
-}
-.icon-user-large-outline::before {
- content: "\e60d";
-}
-.icon-upgrades::before {
- content: "\e60e";
-}
-.icon-upgrades-outline::before {
- content: "\e60f";
-}
-.icon-unlimited-nights-weekends-outline::before {
- content: "\e610";
-}
-.icon-unlimited-minutes-outline::before {
- content: "\e611";
-}
-.icon-unlimited-messaging-outline::before {
- content: "\e612";
-}
-.icon-unlimited-m2m-outline::before {
- content: "\e613";
-}
-.icon-unlimited-calling::before {
- content: "\e614";
-}
-.icon-tv-packages-outline::before {
- content: "\e615";
-}
-.icon-travel-minutes-outline::before {
- content: "\e616";
-}
-.icon-trash::before {
- content: "\e617";
-}
-.icon-tollfree-outline::before {
- content: "\e618";
-}
-.icon-tiles::before {
- content: "\e619";
-}
-.icon-tiles-small::before {
- content: "\e61a";
-}
-.icon-tickets::before {
- content: "\e61b";
-}
-.icon-tickets-returned::before {
- content: "\e61c";
-}
-.icon-tickets-referred::before {
- content: "\e61d";
-}
-.icon-tickets-outline::before {
- content: "\e61e";
-}
-.icon-tickets-open::before {
- content: "\e61f";
-}
-.icon-tickets-escalate::before {
- content: "\e620";
-}
-.icon-tickets-contested::before {
- content: "\e621";
-}
-.icon-tickets-closed::before {
- content: "\e622";
-}
-.icon-tickets-cleared::before {
- content: "\e623";
-}
-.icon-tickets-arquived::before {
- content: "\e624";
-}
-.icon-tickets-active::before {
- content: "\e625";
-}
-.icon-technical-specifications::before {
- content: "\e626";
-}
-.icon-tech-support::before {
- content: "\e627";
-}
-.icon-tech-support-outline::before {
- content: "\e628";
-}
-.icon-tablet::before {
- content: "\e629";
-}
-.icon-tablet-outline::before {
- content: "\e62a";
-}
-.icon-support::before {
- content: "\e62b";
-}
-.icon-support-outline::before {
- content: "\e62c";
-}
-.icon-star::before {
- content: "\e62d";
-}
-.icon-sort::before {
- content: "\e62e";
-}
-.icon-social-outline::before {
- content: "\e62f";
-}
-.icon-smartphone::before {
- content: "\e630";
-}
-.icon-smartphone-outline::before {
- content: "\e631";
-}
-.icon-signout-outline::before {
- content: "\e632";
-}
-.icon-sign-out::before {
- content: "\e633";
-}
-.icon-shop::before {
- content: "\e634";
-}
-.icon-shop-outline::before {
- content: "\e635";
-}
-.icon-shared-outline::before {
- content: "\e636";
-}
-.icon-shared-minutes-outline::before {
- content: "\e637";
-}
-.icon-share::before {
- content: "\e638";
-}
-.icon-settings::before {
- content: "\e639";
-}
-.icon-send-invoice-outline::before {
- content: "\e63a";
-}
-.icon-see-more::before {
- content: "\e63b";
-}
-.icon-see-less::before {
- content: "\e63c";
-}
-.icon-search::before {
- content: "\e63d";
-}
-.icon-search-small::before {
- content: "\e63e";
-}
-.icon-screen-calls-outline::before {
- content: "\e63f";
-}
-.icon-save-time-outline::before {
- content: "\e640";
-}
-.icon-saas-enablement-outline::before {
- content: "\e641";
-}
-.icon-s-beam::before {
- content: "\e642";
-}
-.icon-s-beam-outline::before {
- content: "\e643";
-}
-.icon-rollover-outline::before {
- content: "\e644";
-}
-.icon-rollover-minutes::before {
- content: "\e645";
-}
-.icon-reviews-outline::before {
- content: "\e646";
-}
-.icon-reports::before {
- content: "\e647";
-}
-.icon-reports-outline::before {
- content: "\e648";
-}
-.icon-recommendation-tool::before {
- content: "\e649";
-}
-.icon-receivers-outline::before {
- content: "\e64a";
-}
-.icon-productivity-outline::before {
- content: "\e64b";
-}
-.icon-print::before {
- content: "\e64c";
-}
-.icon-plus::before {
- content: "\e64d";
-}
-.icon-plus-outline::before {
- content: "\e64e";
-}
-.icon-play::before {
- content: "\e64f";
-}
-.icon-platform-as-service-outline::before {
- content: "\e650";
-}
-.icon-plans::before {
- content: "\e651";
-}
-.icon-plans-outline::before {
- content: "\e652";
-}
-.icon-pie-chart::before {
- content: "\e653";
-}
-.icon-photos::before {
- content: "\e654";
-}
-.icon-photos-outline::before {
- content: "\e655";
-}
-.icon-phone-data-outline::before {
- content: "\e656";
-}
-.icon-payments::before {
- content: "\e657";
-}
-.icon-payments-outline::before {
- content: "\e658";
-}
-.icon-pause::before {
- content: "\e659";
-}
-.icon-password::before {
- content: "\e65a";
-}
-.icon-password-outline::before {
- content: "\e65b";
-}
-.icon-overview::before {
- content: "\e65c";
-}
-.icon-overview-small::before {
- content: "\e65d";
-}
-.icon-overages::before {
- content: "\e65e";
-}
-.icon-overages-outline::before {
- content: "\e65f";
-}
-.icon-outage-outline::before {
- content: "\e660";
-}
-.icon-orders::before {
- content: "\e661";
-}
-.icon-orders-outline::before {
- content: "\e662";
-}
-.icon-optional-applications-outline::before {
- content: "\e663";
-}
-.icon-office-at-hand-outline::before {
- content: "\e664";
-}
-.icon-offers::before {
- content: "\e665";
-}
-.icon-offers-outline::before {
- content: "\e666";
-}
-.icon-notifications::before {
- content: "\e667";
-}
-.icon-notifications-outline::before {
- content: "\e668";
-}
-.icon-normal-screen::before {
- content: "\e669";
-}
-.icon-nights-weekends-outline::before {
- content: "\e66a";
-}
-.icon-new-requests-outline::before {
- content: "\e66b";
-}
-.icon-network::before {
- content: "\e66c";
-}
-.icon-network-dashboard::before {
- content: "\e66d";
-}
-.icon-netbook::before {
- content: "\e66e";
-}
-.icon-netbook-outline::before {
- content: "\e66f";
-}
-.icon-music::before {
- content: "\e670";
-}
-.icon-music-video::before {
- content: "\e671";
-}
-.icon-music-video-outline::before {
- content: "\e672";
-}
-.icon-music-outline::before {
- content: "\e673";
-}
-.icon-modem::before {
- content: "\e674";
-}
-.icon-modem-outline::before {
- content: "\e675";
-}
-.icon-mobile-insurance::before {
- content: "\e676";
-}
-.icon-mobile-insurance-outline::before {
- content: "\e677";
-}
-.icon-mobile-2-mobile-outline::before {
- content: "\e678";
-}
-.icon-missed-calls-outline::before {
- content: "\e679";
-}
-.icon-minutes::before {
- content: "\e67a";
-}
-.icon-minutes-outline::before {
- content: "\e67b";
-}
-.icon-messaging::before {
- content: "\e67c";
-}
-.icon-messaging-toolkit-outline::before {
- content: "\e67d";
-}
-.icon-messaging-outline::before {
- content: "\e67e";
-}
-.icon-messaging-email::before {
- content: "\e67f";
-}
-.icon-messaging-email-outline::before {
- content: "\e680";
-}
-.icon-message-small::before {
- content: "\e681";
-}
-.icon-maintenance::before {
- content: "\e682";
-}
-.icon-location-pin::before {
- content: "\e683";
-}
-.icon-location-pin-small::before {
- content: "\e684";
-}
-.icon-local-search::before {
- content: "\e685";
-}
-.icon-local-long-distance-outline::before {
- content: "\e686";
-}
-.icon-list::before {
- content: "\e687";
-}
-.icon-learn::before {
- content: "\e688";
-}
-.icon-learn-outline::before {
- content: "\e689";
-}
-.icon-laptop::before {
- content: "\e68a";
-}
-.icon-landline::before {
- content: "\e68b";
-}
-.icon-landline-outline::before {
- content: "\e68c";
-}
-.icon-invoices::before {
- content: "\e68d";
-}
-.icon-invoices-outline::before {
- content: "\e68e";
-}
-.icon-inventory::before {
- content: "\e68f";
-}
-.icon-intranet-outline::before {
- content: "\e690";
-}
-.icon-interpreter::before {
- content: "\e691";
-}
-.icon-interpreter-outline::before {
- content: "\e692";
-}
-.icon-internet::before {
- content: "\e693";
-}
-.icon-internet-outline::before {
- content: "\e694";
-}
-.icon-internet-24-outline::before {
- content: "\e695";
-}
-.icon-internet-18-outline::before {
- content: "\e696";
-}
-.icon-international-outline::before {
- content: "\e697";
-}
-.icon-international-long-distance-outline::before {
- content: "\e698";
-}
-.icon-international-data-outline::before {
- content: "\e699";
-}
-.icon-installation-outline::before {
- content: "\e69a";
-}
-.icon-information::before {
- content: "\e69b";
-}
-.icon-info-success::before {
- content: "\e69c";
-}
-.icon-info-alert::before {
- content: "\e69d";
-}
-.icon-info-alert-outline::before {
- content: "\e69e";
-}
-.icon-included-checkmark::before {
- content: "\e69f";
-}
-.icon-included-checkmark-outline::before {
- content: "\e6a0";
-}
-.icon-hotspot::before {
- content: "\e6a1";
-}
-.icon-hotspot-outline::before {
- content: "\e6a2";
-}
-.icon-hotspot-access-outline::before {
- content: "\e6a3";
-}
-.icon-home::before {
- content: "\e6a4";
-}
-.icon-help::before {
- content: "\e6a5";
-}
-.icon-help-outline::before {
- content: "\e6a6";
-}
-.icon-hd::before {
- content: "\e6a7";
-}
-.icon-hd-outline::before {
- content: "\e6a8";
-}
-.icon-hamburger::before {
- content: "\e6a9";
-}
-.icon-group-outline::before {
- content: "\e6aa";
-}
-.icon-gps::before {
- content: "\e6ab";
-}
-.icon-gps-outline::before {
- content: "\e6ac";
-}
-.icon-go-paperless-email-outline::before {
- content: "\e6ad";
-}
-.icon-global-messaging-outline::before {
- content: "\e6ae";
-}
-.icon-gamepad-outline::before {
- content: "\e6af";
-}
-.icon-game-devices::before {
- content: "\e6b0";
-}
-.icon-full-screen::before {
- content: "\e6b1";
-}
-.icon-forward-calls-outline::before {
- content: "\e6b2";
-}
-.icon-forum::before {
- content: "\e6b3";
-}
-.icon-forum-outline::before {
- content: "\e6b4";
-}
-.icon-filter::before {
- content: "\e6b5";
-}
-.icon-extras::before {
- content: "\e6b6";
-}
-.icon-extras-outline::before {
- content: "\e6b7";
-}
-.icon-erase::before {
- content: "\e6b8";
-}
-.icon-envelope::before {
- content: "\e6b9";
-}
-.icon-envelope-outline::before {
- content: "\e6ba";
-}
-.icon-enterprise-messaging-outline::before {
- content: "\e6bb";
-}
-.icon-edit::before {
- content: "\e6bc";
-}
-.icon-duplicate::before {
- content: "\e6bd";
-}
-.icon-dropdown-up::before {
- content: "\e6be";
-}
-.icon-dropdown-down::before {
- content: "\e6bf";
-}
-.icon-download::before {
- content: "\e6c0";
-}
-.icon-download-outline::before {
- content: "\e6c1";
-}
-.icon-disputes::before {
- content: "\e6c2";
-}
-.icon-detailed-billing::before {
- content: "\e6c3";
-}
-.icon-detailed-billing-outline::before {
- content: "\e6c4";
-}
-.icon-desktop-outline::before {
- content: "\e6c5";
-}
-.icon-data::before {
- content: "\e6c6";
-}
-.icon-data-outline::before {
- content: "\e6c7";
-}
-.icon-data-additional-outline::before {
- content: "\e6c8";
-}
-.icon-compare::before {
- content: "\e6c9";
-}
-.icon-cloud-storage-outline::before {
- content: "\e6ca";
-}
-.icon-cloud-outline::before {
- content: "\e6cb";
-}
-.icon-cloud-computing-outline::before {
- content: "\e6cc";
-}
-.icon-cloud-backup::before {
- content: "\e6cd";
-}
-.icon-cloud-backup-outline::before {
- content: "\e6ce";
-}
-.icon-circle-information-outline::before {
- content: "\e6cf";
-}
-.icon-circle-action-plus-outline::before {
- content: "\e6d0";
-}
-.icon-circle-action-minus-outline::before {
- content: "\e6d1";
-}
-.icon-circle-action-empty::before {
- content: "\e6d2";
-}
-.icon-circle-action-delete-outline::before {
- content: "\e6d3";
-}
-.icon-circle-action-close::before {
- content: "\e6d4";
-}
-.icon-circle-action-check-outline::before {
- content: "\e6d5";
-}
-.icon-circle-action-remove::before {
- content: "\e6d6";
-}
-.icon-circle-action-add::before {
- content: "\e6d7";
-}
-.icon-chip-outline::before {
- content: "\e6d8";
-}
-.icon-chevron-up::before {
- content: "\e6d9";
-}
-.icon-chevron-right::before {
- content: "\e6da";
-}
-.icon-chevron-left::before {
- content: "\e6db";
-}
-.icon-chevron-down::before {
- content: "\e6dc";
-}
-.icon-checkbox-checkmark::before {
- content: "\e6dd";
-}
-.icon-chat::before {
- content: "\e6de";
-}
-.icon-chat-small::before {
- content: "\e6df";
-}
-.icon-case-studies::before {
- content: "\e6e0";
-}
-.icon-cart::before {
- content: "\e6e1";
-}
-.icon-cart-small::before {
- content: "\e6e2";
-}
-.icon-camera::before {
- content: "\e6e3";
-}
-.icon-camera-outline::before {
- content: "\e6e4";
-}
-.icon-calendar-outline::before {
- content: "\e6e5";
-}
-.icon-business::before {
- content: "\e6e6";
-}
-.icon-business-tv::before {
- content: "\e6e7";
-}
-.icon-business-tv-outline::before {
- content: "\e6e8";
-}
-.icon-business-tv-additional-packs-outline::before {
- content: "\e6e9";
-}
-.icon-business-outline::before {
- content: "\e6ea";
-}
-.icon-business-center::before {
- content: "\e6eb";
-}
-.icon-business-center-outline::before {
- content: "\e6ec";
-}
-.icon-bundles::before {
- content: "\e6ed";
-}
-.icon-bundles-outline::before {
- content: "\e6ee";
-}
-.icon-billing::before {
- content: "\e6ef";
-}
-.icon-billing-history-outline::before {
- content: "\e6f0";
-}
-.icon-billing-dashboard::before {
- content: "\e6f1";
-}
-.icon-bd-maps::before {
- content: "\e6f2";
-}
-.icon-basicphone::before {
- content: "\e6f3";
-}
-.icon-basicphone-outline::before {
- content: "\e6f4";
-}
-.icon-barcode-outline::before {
- content: "\e6f5";
-}
-.icon-bar-chart-vertical::before {
- content: "\e6f6";
-}
-.icon-bar-chart-horizontal::before {
- content: "\e6f7";
-}
-.icon-arrow-up::before {
- content: "\e6f8";
-}
-.icon-arrow-up-right::before {
- content: "\e6f9";
-}
-.icon-arrow-up-left::before {
- content: "\e6fa";
-}
-.icon-arrow-up-circle::before {
- content: "\e6fb";
-}
-.icon-arrow-right::before {
- content: "\e6fc";
-}
-.icon-arrow-right-circle::before {
- content: "\e6fd";
-}
-.icon-arrow-left::before {
- content: "\e6fe";
-}
-.icon-arrow-left-circle::before {
- content: "\e6ff";
-}
-.icon-arrow-down::before {
- content: "\e700";
-}
-.icon-arrow-down-right::before {
- content: "\e701";
-}
-.icon-arrow-down-left::before {
- content: "\e702";
-}
-.icon-arrow-down-circle::before {
- content: "\e703";
-}
-.icon-arrow-double-right::before {
- content: "\e704";
-}
-.icon-arrow-double-left::before {
- content: "\e705";
-}
-.icon-apps-media::before {
- content: "\e706";
-}
-.icon-apps-media-outline::before {
- content: "\e707";
-}
-.icon-apps-marketplace::before {
- content: "\e708";
-}
-.icon-apps-marketplace-outline::before {
- content: "\e709";
-}
-.icon-analytics::before {
- content: "\e70a";
-}
-.icon-alt-media-subscription-outline::before {
- content: "\e70b";
-}
-.icon-all-locations::before {
- content: "\e70c";
-}
-.icon-all-devices::before {
- content: "\e70d";
-}
-.icon-all-devices-outline::before {
- content: "\e70e";
-}
-.icon-alarms::before {
- content: "\e70f";
-}
-.icon-alarms-outline::before {
- content: "\e710";
-}
-.icon-address-ip-outline::before {
- content: "\e711";
-}
-.icon-addons::before {
- content: "\e712";
-}
-.icon-addons-outline::before {
- content: "\e713";
-}
-.icon-additional-services::before {
- content: "\e714";
-}
-.icon-additional-minutes-outline::before {
- content: "\e715";
-}
-.icon-add-widget::before {
- content: "\e716";
-}
-.icon-activity-feed::before {
- content: "\e717";
-}
-.icon-accessories::before {
- content: "\e718";
-}
-.icon-accessories-outline::before {
- content: "\e719";
-}
-.icon-foundation-account::before {
- content: "\e71a";
-}
-.icon-billing-account::before {
- content: "\e71b";
-}
-.icon-infinite::before {
- content: "\e71c";
-}
-.icon-social-business-community::before {
- content: "\e71d";
-}
-.icon-social-facebook::before {
- content: "\e71e";
-}
-.icon-social-feed::before {
- content: "\e71f";
-}
-.icon-social-google-plus::before {
- content: "\e720";
-}
-.icon-social-linkedin::before {
- content: "\e721";
-}
-.icon-social-network-exchange::before {
- content: "\e722";
-}
-.icon-social-twitter-bird::before {
- content: "\e723";
-}
-.icon-social-twitter::before {
- content: "\e724";
-}
-.icon-social-youtube::before {
- content: "\e725";
-}
-.icon-blocked::before {
- content: "\e726";
-}
-.icon-talk-text::before {
- content: "\e727";
-}
-.icon-blocked::before {
- content: "\e726";
-}
-.icon-group::before {
- content: "\e72c";
-}
-.icon-group-create::before {
- content: "\e72b";
-}
-.clearfix {
-
-}
-.clearfix::before {
- line-height: 0; display: table; content: "";
-}
-.clearfix::after {
- line-height: 0; display: table; content: "";
-}
-.clearfix::after {
- clear: both;
-}
-.bui-form-horizontal .control-group {
- margin-bottom: 0px;
-}
-.bui-form-horizontal .control-group::before {
- line-height: 0; display: table; content: "";
-}
-.bui-form-horizontal .control-group::after {
- line-height: 0; display: table; content: "";
-}
-.bui-form-horizontal .control-group::after {
- clear: both;
-}
-.bui-form-horizontal .control-group .control-label {
- width: 30%; text-align: left !important; padding-top: 5px; float: left; display: inline-block;
-}
-.bui-form-horizontal .control-group .controls {
- width: 65%; margin-left: 5%; display: inline-block;
-}
-.bui-form-horizontal .control-group :first-child.controls {
-
-}
-.bui-form-horizontal .help-block {
- margin-bottom: 0px;
-}
-.bui-form-horizontal input + .help-block {
- margin-top: 10px;
-}
-.bui-form-horizontal select + .help-block {
- margin-top: 10px;
-}
-.bui-form-horizontal textarea + .help-block {
- margin-top: 10px;
-}
-.bui-form-horizontal .uneditable-input + .help-block {
- margin-top: 10px;
-}
-.bui-form-horizontal .input-prepend + .help-block {
- margin-top: 10px;
-}
-.bui-form-horizontal .input-append + .help-block {
- margin-top: 10px;
-}
-.bui-form-horizontal .form-actions {
- padding-left: 100px;
-}
-form.form-generic .form-row-wpr {
- margin-bottom: 20px;
-}
-form.form-generic .form-row-wpr .form-row label.form-label {
- color: rgb(68, 68, 68); font-family: "clearviewatt"; font-size: 12px; font-weight: normal; margin-bottom: 0px; display: block;
-}
-.popbox {
- margin: 0px auto; position: relative;
-}
-.popbox .collapse {
- position: relative;
-}
-.popbox .collapse .box {
- background: rgb(255, 255, 255); border-radius: 5px; border: 1px solid rgb(187, 187, 187); display: none; position: absolute; box-shadow: 0px 0px 15px #999;
-}
-.popbox .collapse .box a.close {
- color: red; font-family: arial; font-size: 12px; text-decoration: underline;
-}
-.popbox .collapse .box .arrow {
- left: 1px; top: -10px; width: 0px; height: 0px; border-right-color: transparent; border-bottom-color: rgb(255, 255, 255); border-left-color: transparent; border-right-width: 11px; border-bottom-width: 11px; border-left-width: 11px; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; position: absolute; z-index: 1001;
-}
-.popbox .collapse .box .arrow-border {
- top: -12px; width: 0px; height: 0px; border-right-color: transparent; border-bottom-color: rgb(187, 187, 187); border-left-color: transparent; border-right-width: 11px; border-bottom-width: 11px; border-left-width: 11px; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; position: absolute; z-index: 1000;
-}
-.popbox .open {
-
-}
-.bui-global-btn {
- padding: 8px 20px; border-radius: 6px; border: 0px currentColor; transition:background-color 0.3s ease-out; height: auto; text-align: center; color: rgb(255, 255, 255) !important; line-height: 1; font-size: 14px; text-decoration: none !important; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; box-sizing: border-box; background-color: rgb(102, 102, 102); -moz-box-sizing: border-box; valign: middle;
-}
-.bui-global-btn-small {
- height: 30px !important; min-width: 60px;
-}
-.bui-global-btn-primary {
- border-color: rgb(53, 128, 189); color: rgb(255, 255, 255) !important; background-color: rgb(6, 122, 180);
-}
-.bui-global-btn-primary:hover {
- background-color: rgb(25, 157, 223);
-}
-.bui-global-btn-primary:active {
- border-color: rgb(40, 97, 141); background-color: rgb(50, 120, 177);
-}
-.bui-global-btn-hero {
- color: rgb(255, 255, 255); background-color: rgb(239, 111, 0);
-}
-.bui-global-btn-hero:hover {
- background-color: rgb(252, 179, 20);
-}
-.bui-global-btn-hero:active {
- background-color: rgb(255, 114, 0);
-}
-.bui-global-btn-secondary {
- color: rgb(255, 255, 255); background-color: rgb(102, 102, 102);
-}
-.bui-global-btn-secondary:hover {
- background-color: rgb(187, 187, 187);
-}
-.bui-global-btn-secondary:active {
- background-color: rgb(102, 102, 102);
-}
-.bui-global-btn-disabled {
- color: rgb(153, 153, 153) !important; cursor: pointer; background-color: rgb(221, 221, 221);
-}
-.bui-global-btn-disabled:hover {
- background-color: rgb(221, 221, 221);
-}
-.bui-global-btn-disabled:active {
- background-color: rgb(221, 221, 221);
-}
-.bui-global-links {
- transition:0.3s ease-in-out; color: rgb(6, 122, 180); text-decoration: none;
-}
-.bui-global-links:hover {
- color: rgb(25, 157, 223); text-decoration: underline;
-}
-.bui-global-links:active {
- text-decoration: none; coloe: #199ddf;
-}
-.att-global-fonts-common {
- margin: 0px; text-transform: none;
-}
-.att-global-fonts-popup-header {
- margin: 0px; text-transform: none; line-height: 10px; font-family: clearviewatt_ltbold; font-size: 11px; font-weight: 100;
-}
-.att-global-fonts-popup-content {
- margin: 0px; text-transform: none; line-height: 15px; font-family: clearviewattregular; font-size: 14px;
-}
-a.reg-logout-btn {
- padding: 8px 20px; border-radius: 6px; border: currentColor !important; transition:background-color 0.3s ease-out; width: 94px !important; height: auto; text-align: center; color: rgb(255, 255, 255) !important; line-height: 1; font-family: clearviewattregular; font-size: 14px; text-decoration: none !important; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; box-sizing: border-box; background-color: rgb(102, 102, 102); -moz-box-sizing: border-box; valign: middle;
-}
-a.reg-logout-btn:hover {
- background-color: rgb(187, 187, 187);
-}
-a.reg-logout-btn:active {
- background-color: rgb(102, 102, 102);
-}
-ul.reg-Details-table > li {
- line-height: 0px !important;
-}
-ul.reg-Details-table {
- margin: 0px; padding: 0px;
-}
-#reg-header-snippet {
- width: inherit; height: auto; overflow: hidden; clear: both; background-color: rgb(250, 250, 250);
-}
-#reg-header-snippet .reg-profilePicture {
- padding: 20px 20px 17px; width: 109px; margin-bottom: 0px; border-right-color: rgb(211, 211, 211); border-right-width: 1px; border-right-style: solid; float: left; background-color: rgb(250, 250, 250);
-}
-#reg-header-snippet .reg-profilePicture #reg-profileImage {
- width: 100%; clear: both; margin-left: 15px;
-}
-#reg-header-snippet .reg-profilePicture #reg-myprofile-link {
- text-align: left; margin-top: 18px;
-}
-#reg-header-snippet .reg-profilePicture #reg-myprofile-link a {
- transition:0.3s ease-in-out; color: rgb(6, 122, 180); line-height: 15px; padding-left: 21px; font-size: 14px; text-decoration: none;
-}
-#reg-header-snippet .reg-profilePicture #reg-myprofile-link a:hover {
- color: rgb(25, 157, 223); text-decoration: underline;
-}
-#reg-header-snippet .reg-profilePicture #reg-myprofile-link a:active {
- text-decoration: none; coloe: #199ddf;
-}
-#reg-header-snippet .reg-profilePicture #reg-companyProfile-link {
- margin-top: 14px;
-}
-#reg-header-snippet .reg-profilePicture #reg-companyProfile-link a {
- transition:0.3s ease-in-out; color: rgb(6, 122, 180); line-height: 15px; font-size: 14px; text-decoration: none;
-}
-#reg-header-snippet .reg-profilePicture #reg-companyProfile-link a:hover {
- color: rgb(25, 157, 223); text-decoration: underline;
-}
-#reg-header-snippet .reg-profilePicture #reg-companyProfile-link a:active {
- text-decoration: none; coloe: #199ddf;
-}
-#reg-header-snippet .reg-profilePicture #reg-logout-div {
- margin-top: 38px;
-}
-#reg-header-snippet .reg-profilePicture #reg-logout-div form.reg-logoutForm {
- margin: 0px;
-}
-#reg-header-snippet .reg-profileDetails {
- padding: 11px 20px 20px; width: 199px; margin-bottom: 0px; border-bottom-width: 0px; float: left; min-height: 220px; background-color: rgb(255, 255, 255);
-}
-#reg-header-snippet .reg-profileDetails .reg-userName-table {
- height: 70px; display: table; min-height: 70px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userName-table #reg-userName-table-row {
- text-align: left; clear: both; display: table-row; min-height: inherit;
-}
-#reg-header-snippet .reg-profileDetails .reg-userName-table #reg-userName-table-row #reg-userName-table-cell {
- height: inherit; vertical-align: middle; display: table-cell; -ms-word-wrap: break-word; min-height: inherit;
-}
-#reg-header-snippet .reg-profileDetails .reg-userName-table #reg-userName-table-row #reg-userName-table-cell #reg-userName {
- width: 8em; color: rgb(68, 68, 68); overflow: hidden; font-weight: normal; float: left; white-space: normal;
-}
-#reg-header-snippet .reg-profileDetails .reg-userEmail-label {
- text-align: left; clear: both; margin-top: 21px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userEmail-label .reg-userEmail-label-spn {
- margin: 0px; color: rgb(68, 68, 68); text-transform: none; line-height: 10px; font-family: clearviewatt_ltbold; font-size: 11px; font-weight: 100;
-}
-#reg-header-snippet .reg-profileDetails .reg-userEmail-value {
- text-align: left; clear: both; margin-top: 5px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userEmail-value .reg-userEmail-value-spn {
- margin: 0px; color: rgb(102, 102, 102); text-transform: none; line-height: 15px; font-family: clearviewattregular; font-size: 14px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userRole-label {
- text-align: left; clear: both; margin-top: 20px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userRole-label .reg-userRole-label-spn {
- margin: 0px; color: rgb(68, 68, 68); text-transform: none; line-height: 10px; font-family: clearviewatt_ltbold; font-size: 11px; font-weight: 100;
-}
-#reg-header-snippet .reg-profileDetails .reg-userRole-value {
- text-align: left; clear: both; margin-top: 6px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userRole-value .reg-userRole-value-spn {
- margin: 0px; color: rgb(102, 102, 102); text-transform: none; line-height: 15px; font-family: clearviewattregular; font-size: 14px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userCompany-label {
- text-align: left; clear: both; margin-top: 19px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userCompany-label .reg-userCompany-spn {
- margin: 0px; color: rgb(68, 68, 68); text-transform: none; line-height: 10px; font-family: clearviewatt_ltbold; font-size: 11px; font-weight: 100;
-}
-#reg-header-snippet .reg-profileDetails .reg-userCompany-value {
- text-align: left; clear: both; margin-top: 5px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userCompany-value .reg-userCompany-spn {
- margin: 0px; color: rgb(102, 102, 102); text-transform: none; line-height: 15px; font-family: clearviewattregular; font-size: 14px; -ms-word-wrap: break-word;
-}
-.bui-global-transitions-hover {
- border: 1px solid rgb(187, 187, 187); z-index: 90;
-}
-.bui-global-transitions-focus {
- outline: 0px; border: 1px solid rgb(25, 157, 223) !important; z-index: 100; box-shadow: none; -webkit-box-shadow: none;
-}
-.bui-global-transitions-login-page {
- background: 0px 0px rgb(250, 250, 250); border-radius: 3px; border: 1px solid rgb(211, 211, 211); transition:border 0.3s ease-in-out; color: rgb(68, 68, 68); font-family: clearviewattregular; box-shadow: none !important;
-}
-.bui-global-transitions-login-page:hover {
- border: 1px solid rgb(187, 187, 187); z-index: 90;
-}
-.bui-global-transitions-login-page:focus {
- outline: 0px; border: 1px solid rgb(25, 157, 223) !important; z-index: 100; box-shadow: none; -webkit-box-shadow: none;
-}
-li#anchor ul.column {
- display: none;
-}
-li#anchor:hover ul.column {
- display: block;
-}
-.login-icon {
- width: 27px; height: 27px; vertical-align: middle; display: inline-block; background-image: url("../images/common/header/login-icon.png"); background-repeat: no-repeat;
-}
-.bui-reg-one-line-layout * {
- display: inline-block;
-}
-.popbox {
- margin: 0px auto; text-align: center; position: relative;
-}
-.collapse {
- position: relative;
-}
-.box {
- background: rgb(255, 255, 255); border: 1px solid rgb(187, 187, 187); width: auto; height: auto; display: none; position: relative; z-index: 1000; min-width: 260px; box-shadow: 0px 4px 4px rgba(0,0,0,0.25);
-}
-.box * {
- box-sizing: content-box; -webkit-box-sizing: content-box; -moz-box-sizing: content-box;
-}
-.box ::after {
- box-sizing: content-box; -webkit-box-sizing: content-box; -moz-box-sizing: content-box;
-}
-.box ::before {
- box-sizing: content-box; -webkit-box-sizing: content-box; -moz-box-sizing: content-box;
-}
-.box a.close {
- color: red; font-family: arial; font-size: 12px; text-decoration: underline;
-}
-.box .arrow {
- left: 1px; top: -8px; width: 0px; height: 0px; border-right-color: transparent; border-bottom-color: rgb(255, 255, 255); border-left-color: transparent; border-right-width: 8px; border-bottom-width: 8px; border-left-width: 8px; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; position: absolute; z-index: 1001;
-}
-.standard-input-error-msg-class {
- background: url("../images/common/header/exclamation-error.png") no-repeat 337px rgb(231, 229, 230) !important;
-}
-.box-form {
- padding-top: 10px; padding-bottom: 0px; padding-left: 16px;
-}
-.control-text-popup {
- border-radius: 3px 3px 0px 0px !important; width: 200px !important;
-}
-.control-label-password {
- line-height: 10px !important; padding-top: 3px !important;
-}
-.control-label-checkbox {
- line-height: 15px; padding-top: 5px;
-}
-.placeholder-class {
- color: rgb(139, 139, 139) !important;
-}
-.forgot-userid-password {
- font-size: 10px !important; font-weight: normal !important;
-}
-.header-login-label {
- color: rgb(255, 255, 255); font-size: 13px; maxlength: 10;
-}
-.ellipsis-header-name {
- overflow: hidden; padding-top: 0px; margin-top: 0px; white-space: nowrap; -ms-text-overflow: ellipsis; max-width: 100px; ms-text-overflow: ellipsis;
-}
-#generic-image {
- padding: 100px; background-image: url("../images/common/header/placerimage.jpg"); background-repeat: no-repeat;
-}
-.bui-reg-horizontal-rule {
- width: 100%; height: 1.25px; clear: both; background-color: rgb(231, 230, 230);
-}
-.bui-reg-horizontal-rule-margin {
- margin-top: 20px; margin-bottom: 20px;
-}
-.password-horizontal-rule-margin {
- margin-top: 5px; margin-bottom: 5px;
-}
-.requiredInformation {
- font-size: 11px;
-}
-.header-login-window {
- height: 100px;
-}
-.header-login-window-image {
- padding: 18px;
-}
-.header-login-window-name {
- line-height: 1.5em; overflow: hidden; padding-top: 18px; padding-right: 18px; font-family: clearviewatt_ltbold; font-size: 16px;
-}
-.header-login-window-role {
- font-family: clearviewattregular; font-size: 12px;
-}
-.header-login-window-logout {
- background: rgb(231, 229, 230); height: 27px; line-height: 27px; font-family: clearviewatt_ltbold; font-size: 11px; z-index: 10001;
-}
-.header-login-window-logout a {
- color: rgb(103, 103, 103);
-}
-.header-login-name {
- width: auto; line-height: 50px; padding-right: 23px; padding-left: 3px; float: left; cursor: pointer;
-}
-.error-msg-box {
- border-radius: 3px; width: 200px; height: 35px; color: rgb(255, 255, 255); line-height: 35px; font-size: 12px; margin-top: 15px; margin-left: 30px; background-color: rgb(255, 69, 57);
-}
-.header_login_field_border_error {
- background: url("../images/common/header/icon-error.png") no-repeat 118px rgb(255, 255, 255) !important; border: 1px solid rgb(255, 69, 57) !important; z-index: 100;
-}
-.header_login_field_border_error:hover {
- border: 1px solid rgb(255, 69, 57) !important;
-}
-.header_login_field_3sides_error {
- background: url("../images/common/header/icon-error.png") no-repeat 118px rgb(255, 255, 255) !important; border-right-color: rgb(255, 69, 57) !important; border-bottom-color: rgb(255, 69, 57) !important; border-left-color: rgb(255, 69, 57) !important; border-right-width: 1px !important; border-bottom-width: 1px !important; border-left-width: 1px !important; border-right-style: solid !important; border-bottom-style: solid !important; border-left-style: solid !important;
-}
-.header_login_field_3sides_error:hover {
- border: 1px solid rgb(255, 69, 57) !important;
-}
-.header_login_field_wrapper_border_error {
- background: url("../images/common/header/icon-error.png") no-repeat 118px rgb(255, 255, 255) !important;
-}
-.error-msg-class {
- background: url("../images/common/header/exclamation-error.png") no-repeat 178px rgb(255, 255, 255) !important; border-color: rgb(177, 11, 59) !important; color: rgb(179, 10, 60) !important; font-size: 10px; box-shadow: inset 0px 0px 3px #b10b3b, 0px 0px 3px #b10b3b !important;
-}
-.regFormInputLoginText {
- background: no-repeat 100% -22px rgb(250, 250, 250); padding: 10px; width: 200px; height: 20px; color: rgb(68, 68, 68); font-size: 12px; display: block;
-}
-.regFormInputLoginPassword {
- background: no-repeat 100% -22px rgb(250, 250, 250); padding: 10px; width: 200px; height: 20px; color: rgb(68, 68, 68); font-size: 12px; display: block;
-}
-.header-login-button {
- height: 20px; min-width: 10px !important; box-shadow: none;
-}
-#headerLoginFormID #header_login_title {
- color: rgb(68, 68, 68); font-family: clearviewattregular; font-size: 14px; margin-top: 25px;
-}
-#headerLoginFormID #header_login_id {
- background: url("../images/common/header/icon-username.png") no-repeat 10px rgb(250, 250, 250) !important; padding: 10px 10px 10px 36px; border-radius: 3px 3px 0px 0px !important; border: 1px solid rgb(211, 211, 211); transition:border 0.3s ease-in-out; width: 200px; height: 32px; color: rgb(68, 68, 68); font-family: clearviewattregular; font-size: 12px; margin-top: 15px; margin-bottom: 10px !important; margin-left: 30px; display: block; box-shadow: none !important;
-}
-#headerLoginFormID #header_login_id:hover {
- border: 1px solid rgb(187, 187, 187); z-index: 90;
-}
-#headerLoginFormID #header_login_id:focus {
- outline: 0px; border: 1px solid rgb(25, 157, 223) !important; z-index: 100; box-shadow: none; -webkit-box-shadow: none;
-}
-#headerLoginFormID #header_password {
- background: url("../images/common/header/icon-password.png") no-repeat 10px rgb(250, 250, 250) !important; padding: 10px 10px 10px 36px; border-radius: 0px 0px 3px 3px !important; border: 1px solid rgb(211, 211, 211); transition:border 0.3s ease-in-out; width: 200px; height: 32px; color: rgb(68, 68, 68); font-family: clearviewattregular; font-size: 12px; margin-top: -11px; margin-bottom: 0px; margin-left: 30px; display: block; box-shadow: none !important;
-}
-#headerLoginFormID #header_password:hover {
- border: 1px solid rgb(187, 187, 187); z-index: 90;
-}
-#headerLoginFormID #header_password:focus {
- outline: 0px; border: 1px solid rgb(25, 157, 223) !important; z-index: 100; box-shadow: none; -webkit-box-shadow: none;
-}
-#headerLoginFormID #header_login_block {
- height: 30px; margin-top: 15px;
-}
-#headerLoginFormID #header_login_block #header_login_button {
- padding: 8px 20px; border-radius: 6px; border: 0px rgb(53, 128, 189); transition:background-color 0.3s ease-out; width: 80px; height: 30px !important; text-align: center; color: rgb(255, 255, 255) !important; line-height: 1; font-size: 14px; text-decoration: none !important; margin-left: 25px; vertical-align: middle; float: left; display: inline-block; position: relative; cursor: pointer; min-width: 60px; box-sizing: border-box; background-color: rgb(6, 122, 180); -moz-box-sizing: border-box; valign: middle;
-}
-#headerLoginFormID #header_login_block #header_login_button:hover {
- background-color: rgb(25, 157, 223);
-}
-#headerLoginFormID #header_login_block #header_login_button:active {
- border-color: rgb(40, 97, 141); background-color: rgb(50, 120, 177);
-}
-#headerLoginFormID #remember_me_component {
- padding-left: 30px; margin-top: 11px;
-}
-#headerLoginFormID #remember_me_component #rememberme_header_label {
- margin-top: 4px;
-}
-#headerLoginFormID #remember_me_component #remember-me {
- color: rgb(102, 102, 102); font-family: clearviewattregular; font-size: 12px; font-weight: normal;
-}
-#headerLoginFormID #forgot_username_component {
- text-align: left; padding-top: 30px; padding-bottom: 30px; padding-left: 30px; clear: both;
-}
-#headerLoginFormID #forgot_username_component .regular {
- color: rgb(68, 68, 68); font-family: clearviewattregular; font-size: 12px;
-}
-#headerLoginFormID #forgot_username_component .link {
- color: rgb(6, 122, 180); font-family: clearviewattregular; font-size: 12px;
-}
-.footerContainer {
- background: 0px 0px rgb(6, 122, 180); margin: 0px auto; width: 100%;
-}
-.footerContainer .footerWrapper {
- margin: 0px auto; width: 980px; padding-bottom: 25px; background-color: rgb(6, 122, 180);
-}
-.footerContainer .footerWrapper .footerItem {
- margin: auto; width: 980px; height: 60px; color: rgb(255, 255, 255); line-height: 1; overflow: hidden; font-family: clearviewatt; font-size: 12px;
-}
-.footerContainer .footerWrapper .footerItem .divider {
- width: 100px; margin-top: 10px; margin-bottom: 10px; border-bottom-color: rgb(255, 255, 255); border-bottom-width: 1px; border-bottom-style: solid;
-}
-.footerContainer .footerWrapper .footerItem .customerSupport {
- width: 160px; margin-left: 30px; float: left;
-}
-.footerContainer .footerWrapper .footerItem .customerSupport .customerHelp {
- font-size: 14px; margin-top: 45px; margin-bottom: 20px;
-}
-.footerContainer .footerWrapper .footerItem .customerSupport a {
- color: rgb(255, 255, 255) !important;
-}
-.footerContainer .footerWrapper .footerItem .customerSupport a:hover {
- text-decoration: none;
-}
-.footerContainer .footerWrapper .footerItem .legalInfo {
- width: 160px; float: left;
-}
-.footerContainer .footerWrapper .footerItem .legalInfo .legal {
- font-size: 14px; margin-top: 45px; margin-bottom: 20px;
-}
-.footerContainer .footerWrapper .footerItem .legalInfo a {
- color: rgb(255, 255, 255) !important;
-}
-.footerContainer .footerWrapper .footerItem .legalInfo a:hover {
- text-decoration: none;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection {
- width: 295px; float: left;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeSave {
- font-size: 14px; margin-top: 45px; margin-bottom: 20px;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeToSection {
- overflow: hidden; margin-top: 15px;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeToSection .emailAddress {
- width: 170px; float: left;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeToSection .emailAddress input {
- padding: 5px 10px 5px 5px; width: 152px; color: rgb(255, 255, 255) !important; background-color: rgb(6, 122, 180);
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeToSection .subscribeBtn {
- border-radius: 1px 5px 5px 1px; top: 1px; width: 95px; height: 30px; text-align: center; right: 7px; color: rgb(6, 122, 180); font-size: 14px; vertical-align: middle; float: left; position: relative; cursor: pointer; background-color: rgb(255, 255, 255);
-}
-.footerContainer .footerWrapper .footerItem .socialMedia {
- margin-left: 0px; float: left;
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .followAtt {
- font-size: 14px; margin-top: 45px; margin-bottom: 20px;
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .socialFeeds {
- margin-top: 20px; margin-left: -8px;
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .socialFeeds span {
- margin: 0px; padding: 5px; font-size: 30px;
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .socialFeeds span a {
- margin: 0px; padding: 0px; color: rgb(255, 255, 255);
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .socialFeeds span a:hover {
- text-decoration: none;
-}
-.footerContainer .footerWrapper .dividerBottom {
- margin: auto; width: 920px; border-bottom-color: rgb(255, 255, 255); border-bottom-width: 1px; border-bottom-style: solid;
-}
-.footerContainer .footerWrapper .feedbackSection {
- margin: auto; width: 920px; display: none;
-}
-.footerContainer .footerWrapper .feedbackSection .dividerTop {
- margin: auto; width: 920px; border-bottom-color: rgb(255, 255, 255); border-bottom-width: 1px; border-bottom-style: solid;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent {
- margin: 30px auto;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent #feedbackForm {
- height: 120px;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent .feedbackInfo {
- width: 270px; color: rgb(255, 255, 255); font-family: clearviewatt; font-size: 12px; margin-top: -5px; margin-right: 30px; float: left;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent .feedbackTextSection .feedbackText {
- padding: 10px; border-radius: 5px; border: 1px solid rgb(255, 255, 255); width: 500px; height: 100px; color: rgb(255, 255, 255); font-family: clearviewatt; font-size: 14px; float: left; cursor: text; background-color: rgb(6, 122, 180); resize: none;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent .feedbackTextSection .feedbackSubmitButton {
- padding: 5px; border-radius: 5px; border: currentColor; width: 82px; color: rgb(6, 122, 180); font-family: clearviewatt; font-size: 14px; margin-top: 92px; margin-left: 16px; cursor: pointer; background-color: rgb(255, 255, 255);
-}
-.footerContainer .footerWrapper .feedbackResultMsg {
- margin: 0px auto; width: 980px; text-align: center; color: rgb(255, 255, 255); line-height: 70px; font-family: clearviewatt; font-size: 18px; display: none;
-}
-.footerContainer .footerWrapper .feedbackResultMsg #feedbackMsgCheck {
- font-size: 20px; margin-right: 20px;
-}
-.footerContainer .footerWrapper #feedbackResultDivider {
- display: none;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv {
- margin: auto; max-width: 110px;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv .feedbackButton {
- background: rgb(255, 255, 255); margin: -1px auto auto; padding: 5px 10px; border-radius: 0px 0px 5px 5px; border: currentColor; color: rgb(6, 122, 180); font-family: clearviewatt; font-size: 14px; cursor: pointer;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv .closeFeedbackButton {
- background: rgb(255, 255, 255); margin: -1px auto auto; padding: 5px 10px; border-radius: 0px 0px 5px 5px; border: currentColor; color: rgb(6, 122, 180); font-family: clearviewatt; font-size: 14px; cursor: pointer;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv .feedbackButton span {
- padding-left: 10px; background-image: none;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv .closeFeedbackButton span {
- padding-left: 10px; background-image: none;
-}
-.footerContainer .footerWrapper .attFooterInfo {
- margin: auto; width: 980px; color: rgb(255, 255, 255); overflow: hidden; font-family: clearviewatt; font-size: 12px;
-}
-.footerContainer .footerWrapper .attFooterInfo a {
- margin: 0px; padding: 0px; color: rgb(255, 255, 255); text-decoration: underline;
-}
-.footerContainer .footerWrapper .attFooterInfo .footerLastSection {
- overflow: hidden; margin-top: 40px;
-}
-.footerContainer .footerWrapper .attFooterInfo span {
- padding-right: 5px; padding-left: 3px; border-right-color: rgb(255, 255, 255); border-right-width: 1px; border-right-style: solid;
-}
-.footerContainer .footerWrapper .attFooterInfo span:last-child {
- border: currentColor;
-}
-.footerContainer .footerWrapper .attFooterInfo .attLogo {
- background: url("../images/common/footer/footer-attolympiclogo.png") repeat-x 0px 0px; width: 150px; height: 77px; margin-right: 0px; margin-left: 17px; float: left;
-}
-.footerContainer .footerWrapper .attFooterInfo .attQuality {
- background: url("../images/common/footer/footer-consumerinfo.png") repeat-x 0px 0px; top: -5px; width: 79px; height: 82px; margin-right: 103px; float: left; position: relative;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise {
- width: 64%; float: right;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise .privacyPolicy {
- margin-top: 17px;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise .privacyPolicy a {
- text-decoration: underline;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise .privacyPolicy a span {
- padding: 0px;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise .privacyPolicy a:hover {
- text-decoration: underline;
-}
-[data-icon]::before {
- text-transform: none; line-height: 1; font-family: "atticons"; font-variant: normal; font-weight: normal; content: attr(data-icon); speak: none; -webkit-font-smoothing: antialiased;
-}
-[class^='icon-'] {
- text-transform: none; line-height: 1; font-family: "atticons"; font-style: normal; font-variant: normal; font-weight: normal; speak: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
-}
-[class*=' icon-'] {
- text-transform: none; line-height: 1; font-family: "atticons"; font-style: normal; font-variant: normal; font-weight: normal; speak: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
-}
-.icon-wireless-outline::before {
- content: "\e600";
-}
-.icon-wireless-dashboard::before {
- content: "\e601";
-}
-.icon-website-hosting-outline::before {
- content: "\e602";
-}
-.icon-volume-up::before {
- content: "\e603";
-}
-.icon-volume-mute::before {
- content: "\e604";
-}
-.icon-volume-down::before {
- content: "\e605";
-}
-.icon-video::before {
- content: "\e606";
-}
-.icon-video-tutorials::before {
- content: "\e607";
-}
-.icon-video-tutorials-outline::before {
- content: "\e608";
-}
-.icon-video-outline::before {
- content: "\e609";
-}
-.icon-user::before {
- content: "\e60a";
-}
-.icon-user-small::before {
- content: "\e60b";
-}
-.icon-user-outline::before {
- content: "\e60c";
-}
-.icon-user-large-outline::before {
- content: "\e60d";
-}
-.icon-upgrades::before {
- content: "\e60e";
-}
-.icon-upgrades-outline::before {
- content: "\e60f";
-}
-.icon-unlimited-nights-weekends-outline::before {
- content: "\e610";
-}
-.icon-unlimited-minutes-outline::before {
- content: "\e611";
-}
-.icon-unlimited-messaging-outline::before {
- content: "\e612";
-}
-.icon-unlimited-m2m-outline::before {
- content: "\e613";
-}
-.icon-unlimited-calling::before {
- content: "\e614";
-}
-.icon-tv-packages-outline::before {
- content: "\e615";
-}
-.icon-travel-minutes-outline::before {
- content: "\e616";
-}
-.icon-trash::before {
- content: "\e617";
-}
-.icon-tollfree-outline::before {
- content: "\e618";
-}
-.icon-tiles::before {
- content: "\e619";
-}
-.icon-tiles-small::before {
- content: "\e61a";
-}
-.icon-tickets::before {
- content: "\e61b";
-}
-.icon-tickets-returned::before {
- content: "\e61c";
-}
-.icon-tickets-referred::before {
- content: "\e61d";
-}
-.icon-tickets-outline::before {
- content: "\e61e";
-}
-.icon-tickets-open::before {
- content: "\e61f";
-}
-.icon-tickets-escalate::before {
- content: "\e620";
-}
-.icon-tickets-contested::before {
- content: "\e621";
-}
-.icon-tickets-closed::before {
- content: "\e622";
-}
-.icon-tickets-cleared::before {
- content: "\e623";
-}
-.icon-tickets-arquived::before {
- content: "\e624";
-}
-.icon-tickets-active::before {
- content: "\e625";
-}
-.icon-technical-specifications::before {
- content: "\e626";
-}
-.icon-tech-support::before {
- content: "\e627";
-}
-.icon-tech-support-outline::before {
- content: "\e628";
-}
-.icon-tablet::before {
- content: "\e629";
-}
-.icon-tablet-outline::before {
- content: "\e62a";
-}
-.icon-support::before {
- content: "\e62b";
-}
-.icon-support-outline::before {
- content: "\e62c";
-}
-.icon-star::before {
- content: "\e62d";
-}
-.icon-sort::before {
- content: "\e62e";
-}
-.icon-social-outline::before {
- content: "\e62f";
-}
-.icon-smartphone::before {
- content: "\e630";
-}
-.icon-smartphone-outline::before {
- content: "\e631";
-}
-.icon-signout-outline::before {
- content: "\e632";
-}
-.icon-sign-out::before {
- content: "\e633";
-}
-.icon-shop::before {
- content: "\e634";
-}
-.icon-shop-outline::before {
- content: "\e635";
-}
-.icon-shared-outline::before {
- content: "\e636";
-}
-.icon-shared-minutes-outline::before {
- content: "\e637";
-}
-.icon-share::before {
- content: "\e638";
-}
-.icon-settings::before {
- content: "\e639";
-}
-.icon-send-invoice-outline::before {
- content: "\e63a";
-}
-.icon-see-more::before {
- content: "\e63b";
-}
-.icon-see-less::before {
- content: "\e63c";
-}
-.icon-search::before {
- content: "\e63d";
-}
-.icon-search-small::before {
- content: "\e63e";
-}
-.icon-screen-calls-outline::before {
- content: "\e63f";
-}
-.icon-save-time-outline::before {
- content: "\e640";
-}
-.icon-saas-enablement-outline::before {
- content: "\e641";
-}
-.icon-s-beam::before {
- content: "\e642";
-}
-.icon-s-beam-outline::before {
- content: "\e643";
-}
-.icon-rollover-outline::before {
- content: "\e644";
-}
-.icon-rollover-minutes::before {
- content: "\e645";
-}
-.icon-reviews-outline::before {
- content: "\e646";
-}
-.icon-reports::before {
- content: "\e647";
-}
-.icon-reports-outline::before {
- content: "\e648";
-}
-.icon-recommendation-tool::before {
- content: "\e649";
-}
-.icon-receivers-outline::before {
- content: "\e64a";
-}
-.icon-productivity-outline::before {
- content: "\e64b";
-}
-.icon-print::before {
- content: "\e64c";
-}
-.icon-plus::before {
- content: "\e64d";
-}
-.icon-plus-outline::before {
- content: "\e64e";
-}
-.icon-play::before {
- content: "\e64f";
-}
-.icon-platform-as-service-outline::before {
- content: "\e650";
-}
-.icon-plans::before {
- content: "\e651";
-}
-.icon-plans-outline::before {
- content: "\e652";
-}
-.icon-pie-chart::before {
- content: "\e653";
-}
-.icon-photos::before {
- content: "\e654";
-}
-.icon-photos-outline::before {
- content: "\e655";
-}
-.icon-phone-data-outline::before {
- content: "\e656";
-}
-.icon-payments::before {
- content: "\e657";
-}
-.icon-payments-outline::before {
- content: "\e658";
-}
-.icon-pause::before {
- content: "\e659";
-}
-.icon-password::before {
- content: "\e65a";
-}
-.icon-password-outline::before {
- content: "\e65b";
-}
-.icon-overview::before {
- content: "\e65c";
-}
-.icon-overview-small::before {
- content: "\e65d";
-}
-.icon-overages::before {
- content: "\e65e";
-}
-.icon-overages-outline::before {
- content: "\e65f";
-}
-.icon-outage-outline::before {
- content: "\e660";
-}
-.icon-orders::before {
- content: "\e661";
-}
-.icon-orders-outline::before {
- content: "\e662";
-}
-.icon-optional-applications-outline::before {
- content: "\e663";
-}
-.icon-office-at-hand-outline::before {
- content: "\e664";
-}
-.icon-offers::before {
- content: "\e665";
-}
-.icon-offers-outline::before {
- content: "\e666";
-}
-.icon-notifications::before {
- content: "\e667";
-}
-.icon-notifications-outline::before {
- content: "\e668";
-}
-.icon-normal-screen::before {
- content: "\e669";
-}
-.icon-nights-weekends-outline::before {
- content: "\e66a";
-}
-.icon-new-requests-outline::before {
- content: "\e66b";
-}
-.icon-network::before {
- content: "\e66c";
-}
-.icon-network-dashboard::before {
- content: "\e66d";
-}
-.icon-netbook::before {
- content: "\e66e";
-}
-.icon-netbook-outline::before {
- content: "\e66f";
-}
-.icon-music::before {
- content: "\e670";
-}
-.icon-music-video::before {
- content: "\e671";
-}
-.icon-music-video-outline::before {
- content: "\e672";
-}
-.icon-music-outline::before {
- content: "\e673";
-}
-.icon-modem::before {
- content: "\e674";
-}
-.icon-modem-outline::before {
- content: "\e675";
-}
-.icon-mobile-insurance::before {
- content: "\e676";
-}
-.icon-mobile-insurance-outline::before {
- content: "\e677";
-}
-.icon-mobile-2-mobile-outline::before {
- content: "\e678";
-}
-.icon-missed-calls-outline::before {
- content: "\e679";
-}
-.icon-minutes::before {
- content: "\e67a";
-}
-.icon-minutes-outline::before {
- content: "\e67b";
-}
-.icon-messaging::before {
- content: "\e67c";
-}
-.icon-messaging-toolkit-outline::before {
- content: "\e67d";
-}
-.icon-messaging-outline::before {
- content: "\e67e";
-}
-.icon-messaging-email::before {
- content: "\e67f";
-}
-.icon-messaging-email-outline::before {
- content: "\e680";
-}
-.icon-message-small::before {
- content: "\e681";
-}
-.icon-maintenance::before {
- content: "\e682";
-}
-.icon-location-pin::before {
- content: "\e683";
-}
-.icon-location-pin-small::before {
- content: "\e684";
-}
-.icon-local-search::before {
- content: "\e685";
-}
-.icon-local-long-distance-outline::before {
- content: "\e686";
-}
-.icon-list::before {
- content: "\e687";
-}
-.icon-learn::before {
- content: "\e688";
-}
-.icon-learn-outline::before {
- content: "\e689";
-}
-.icon-laptop::before {
- content: "\e68a";
-}
-.icon-landline::before {
- content: "\e68b";
-}
-.icon-landline-outline::before {
- content: "\e68c";
-}
-.icon-invoices::before {
- content: "\e68d";
-}
-.icon-invoices-outline::before {
- content: "\e68e";
-}
-.icon-inventory::before {
- content: "\e68f";
-}
-.icon-intranet-outline::before {
- content: "\e690";
-}
-.icon-interpreter::before {
- content: "\e691";
-}
-.icon-interpreter-outline::before {
- content: "\e692";
-}
-.icon-internet::before {
- content: "\e693";
-}
-.icon-internet-outline::before {
- content: "\e694";
-}
-.icon-internet-24-outline::before {
- content: "\e695";
-}
-.icon-internet-18-outline::before {
- content: "\e696";
-}
-.icon-international-outline::before {
- content: "\e697";
-}
-.icon-international-long-distance-outline::before {
- content: "\e698";
-}
-.icon-international-data-outline::before {
- content: "\e699";
-}
-.icon-installation-outline::before {
- content: "\e69a";
-}
-.icon-information::before {
- content: "\e69b";
-}
-.icon-info-success::before {
- content: "\e69c";
-}
-.icon-info-alert::before {
- content: "\e69d";
-}
-.icon-info-alert-outline::before {
- content: "\e69e";
-}
-.icon-included-checkmark::before {
- content: "\e69f";
-}
-.icon-included-checkmark-outline::before {
- content: "\e6a0";
-}
-.icon-hotspot::before {
- content: "\e6a1";
-}
-.icon-hotspot-outline::before {
- content: "\e6a2";
-}
-.icon-hotspot-access-outline::before {
- content: "\e6a3";
-}
-.icon-home::before {
- content: "\e6a4";
-}
-.icon-help::before {
- content: "\e6a5";
-}
-.icon-help-outline::before {
- content: "\e6a6";
-}
-.icon-hd::before {
- content: "\e6a7";
-}
-.icon-hd-outline::before {
- content: "\e6a8";
-}
-.icon-hamburger::before {
- content: "\e6a9";
-}
-.icon-group-outline::before {
- content: "\e6aa";
-}
-.icon-gps::before {
- content: "\e6ab";
-}
-.icon-gps-outline::before {
- content: "\e6ac";
-}
-.icon-go-paperless-email-outline::before {
- content: "\e6ad";
-}
-.icon-global-messaging-outline::before {
- content: "\e6ae";
-}
-.icon-gamepad-outline::before {
- content: "\e6af";
-}
-.icon-game-devices::before {
- content: "\e6b0";
-}
-.icon-full-screen::before {
- content: "\e6b1";
-}
-.icon-forward-calls-outline::before {
- content: "\e6b2";
-}
-.icon-forum::before {
- content: "\e6b3";
-}
-.icon-forum-outline::before {
- content: "\e6b4";
-}
-.icon-filter::before {
- content: "\e6b5";
-}
-.icon-extras::before {
- content: "\e6b6";
-}
-.icon-extras-outline::before {
- content: "\e6b7";
-}
-.icon-erase::before {
- content: "\e6b8";
-}
-.icon-envelope::before {
- content: "\e6b9";
-}
-.icon-envelope-outline::before {
- content: "\e6ba";
-}
-.icon-enterprise-messaging-outline::before {
- content: "\e6bb";
-}
-.icon-edit::before {
- content: "\e6bc";
-}
-.icon-duplicate::before {
- content: "\e6bd";
-}
-.icon-dropdown-up::before {
- content: "\e6be";
-}
-.icon-dropdown-down::before {
- content: "\e6bf";
-}
-.icon-download::before {
- content: "\e6c0";
-}
-.icon-download-outline::before {
- content: "\e6c1";
-}
-.icon-disputes::before {
- content: "\e6c2";
-}
-.icon-detailed-billing::before {
- content: "\e6c3";
-}
-.icon-detailed-billing-outline::before {
- content: "\e6c4";
-}
-.icon-desktop-outline::before {
- content: "\e6c5";
-}
-.icon-data::before {
- content: "\e6c6";
-}
-.icon-data-outline::before {
- content: "\e6c7";
-}
-.icon-data-additional-outline::before {
- content: "\e6c8";
-}
-.icon-compare::before {
- content: "\e6c9";
-}
-.icon-cloud-storage-outline::before {
- content: "\e6ca";
-}
-.icon-cloud-outline::before {
- content: "\e6cb";
-}
-.icon-cloud-computing-outline::before {
- content: "\e6cc";
-}
-.icon-cloud-backup::before {
- content: "\e6cd";
-}
-.icon-cloud-backup-outline::before {
- content: "\e6ce";
-}
-.icon-circle-information-outline::before {
- content: "\e6cf";
-}
-.icon-circle-action-plus-outline::before {
- content: "\e6d0";
-}
-.icon-circle-action-minus-outline::before {
- content: "\e6d1";
-}
-.icon-circle-action-empty::before {
- content: "\e6d2";
-}
-.icon-circle-action-delete-outline::before {
- content: "\e6d3";
-}
-.icon-circle-action-close::before {
- content: "\e6d4";
-}
-.icon-circle-action-check-outline::before {
- content: "\e6d5";
-}
-.icon-circle-action-remove::before {
- content: "\e6d6";
-}
-.icon-circle-action-add::before {
- content: "\e6d7";
-}
-.icon-chip-outline::before {
- content: "\e6d8";
-}
-.icon-chevron-up::before {
- content: "\e6d9";
-}
-.icon-chevron-right::before {
- content: "\e6da";
-}
-.icon-chevron-left::before {
- content: "\e6db";
-}
-.icon-chevron-down::before {
- content: "\e6dc";
-}
-.icon-checkbox-checkmark::before {
- content: "\e6dd";
-}
-.icon-chat::before {
- content: "\e6de";
-}
-.icon-chat-small::before {
- content: "\e6df";
-}
-.icon-case-studies::before {
- content: "\e6e0";
-}
-.icon-cart::before {
- content: "\e6e1";
-}
-.icon-cart-small::before {
- content: "\e6e2";
-}
-.icon-camera::before {
- content: "\e6e3";
-}
-.icon-camera-outline::before {
- content: "\e6e4";
-}
-.icon-calendar-outline::before {
- content: "\e6e5";
-}
-.icon-business::before {
- content: "\e6e6";
-}
-.icon-business-tv::before {
- content: "\e6e7";
-}
-.icon-business-tv-outline::before {
- content: "\e6e8";
-}
-.icon-business-tv-additional-packs-outline::before {
- content: "\e6e9";
-}
-.icon-business-outline::before {
- content: "\e6ea";
-}
-.icon-business-center::before {
- content: "\e6eb";
-}
-.icon-business-center-outline::before {
- content: "\e6ec";
-}
-.icon-bundles::before {
- content: "\e6ed";
-}
-.icon-bundles-outline::before {
- content: "\e6ee";
-}
-.icon-billing::before {
- content: "\e6ef";
-}
-.icon-billing-history-outline::before {
- content: "\e6f0";
-}
-.icon-billing-dashboard::before {
- content: "\e6f1";
-}
-.icon-bd-maps::before {
- content: "\e6f2";
-}
-.icon-basicphone::before {
- content: "\e6f3";
-}
-.icon-basicphone-outline::before {
- content: "\e6f4";
-}
-.icon-barcode-outline::before {
- content: "\e6f5";
-}
-.icon-bar-chart-vertical::before {
- content: "\e6f6";
-}
-.icon-bar-chart-horizontal::before {
- content: "\e6f7";
-}
-.icon-arrow-up::before {
- content: "\e6f8";
-}
-.icon-arrow-up-right::before {
- content: "\e6f9";
-}
-.icon-arrow-up-left::before {
- content: "\e6fa";
-}
-.icon-arrow-up-circle::before {
- content: "\e6fb";
-}
-.icon-arrow-right::before {
- content: "\e6fc";
-}
-.icon-arrow-right-circle::before {
- content: "\e6fd";
-}
-.icon-arrow-left::before {
- content: "\e6fe";
-}
-.icon-arrow-left-circle::before {
- content: "\e6ff";
-}
-.icon-arrow-down::before {
- content: "\e700";
-}
-.icon-arrow-down-right::before {
- content: "\e701";
-}
-.icon-arrow-down-left::before {
- content: "\e702";
-}
-.icon-arrow-down-circle::before {
- content: "\e703";
-}
-.icon-arrow-double-right::before {
- content: "\e704";
-}
-.icon-arrow-double-left::before {
- content: "\e705";
-}
-.icon-apps-media::before {
- content: "\e706";
-}
-.icon-apps-media-outline::before {
- content: "\e707";
-}
-.icon-apps-marketplace::before {
- content: "\e708";
-}
-.icon-apps-marketplace-outline::before {
- content: "\e709";
-}
-.icon-analytics::before {
- content: "\e70a";
-}
-.icon-alt-media-subscription-outline::before {
- content: "\e70b";
-}
-.icon-all-locations::before {
- content: "\e70c";
-}
-.icon-all-devices::before {
- content: "\e70d";
-}
-.icon-all-devices-outline::before {
- content: "\e70e";
-}
-.icon-alarms::before {
- content: "\e70f";
-}
-.icon-alarms-outline::before {
- content: "\e710";
-}
-.icon-address-ip-outline::before {
- content: "\e711";
-}
-.icon-addons::before {
- content: "\e712";
-}
-.icon-addons-outline::before {
- content: "\e713";
-}
-.icon-additional-services::before {
- content: "\e714";
-}
-.icon-additional-minutes-outline::before {
- content: "\e715";
-}
-.icon-add-widget::before {
- content: "\e716";
-}
-.icon-activity-feed::before {
- content: "\e717";
-}
-.icon-accessories::before {
- content: "\e718";
-}
-.icon-accessories-outline::before {
- content: "\e719";
-}
-.icon-foundation-account::before {
- content: "\e71a";
-}
-.icon-billing-account::before {
- content: "\e71b";
-}
-.icon-infinite::before {
- content: "\e71c";
-}
-.icon-social-business-community::before {
- content: "\e71d";
-}
-.icon-social-facebook::before {
- content: "\e71e";
-}
-.icon-social-feed::before {
- content: "\e71f";
-}
-.icon-social-google-plus::before {
- content: "\e720";
-}
-.icon-social-linkedin::before {
- content: "\e721";
-}
-.icon-social-network-exchange::before {
- content: "\e722";
-}
-.icon-social-twitter-bird::before {
- content: "\e723";
-}
-.icon-social-twitter::before {
- content: "\e724";
-}
-.icon-social-youtube::before {
- content: "\e725";
-}
-.icon-blocked::before {
- content: "\e726";
-}
-.icon-talk-text::before {
- content: "\e727";
-}
-.icon-blocked::before {
- content: "\e726";
-}
-.icon-group::before {
- content: "\e72c";
-}
-.icon-group-create::before {
- content: "\e72b";
-}
-.headerContainer {
- left: 0px; top: 0px; width: 100%; color: rgb(255, 255, 255); line-height: 50px; position: fixed; z-index: 999; background-color: rgb(6, 122, 180);
-}
-.headerContentContainer {
- margin: auto; width: 980px; height: 50px;
-}
-.headerContentContainer .primaryMenuContainer {
- font-family: clearviewatt; font-size: 18px;
-}
-.headerContentContainer .primaryMenuContainer .linkToRegistration {
- color: rgb(255, 255, 255); float: right;
-}
-.headerContentContainer .primaryMenuContainer .ATTLogo {
- background: url("../images/common/header/attLogo.png") no-repeat -10px -10px; width: 36px; height: 36px; margin-top: 7px; margin-right: 35px; margin-left: 29px; float: left;
-}
-.headerContentContainer .primaryMenuContainer .attHomeContainer {
- float: left; cursor: pointer;
-}
-.headerContentContainer .primaryMenuContainer .attHomeContainer .businessCenterR {
- font-family: clearviewatt_ltbold; margin-right: 4px; margin-left: 2px; float: left;
-}
-.headerContentContainer .primaryMenuContainer .attHomeContainer .businessCenterR a {
- color: rgb(255, 255, 255); font-family: clearviewatt_ltbold; font-size: 18px; text-decoration: none;
-}
-.headerContentContainer .primaryMenuContainer .attHomeContainer .businessCenterR a:hover {
- color: rgb(191, 231, 251); text-decoration: none;
-}
-.headerContentContainer .primaryMenuContainer .attHomeContainer .businessCenterR a:active {
- color: rgb(191, 231, 251); text-decoration: none;
-}
-.headerContentContainer .primaryMenuContainer .attHomeContainer .businessCenterR:hover {
- margin-top: -2px;
-}
-.headerContentContainer .primaryMenuContainer .attHomeContainer .businessCenterR:active {
- margin-top: -2px;
-}
-.headerContentContainer .primaryMenuContainer .primaryMenuOptionsContainer .primaryMenuOptionLink {
- color: rgb(255, 255, 255); font-family: clearviewatt; font-size: 18px; text-decoration: none; margin-left: 30px; float: left; cursor: pointer;
-}
-.headerContentContainer .primaryMenuContainer .primaryMenuOptionsContainer .primaryMenuOptionLink:hover {
- color: rgb(191, 231, 251); text-decoration: none; margin-top: -2px;
-}
-.headerContentContainer .primaryMenuContainer .primaryMenuOptionsContainer .primaryMenuOptionLink:focus {
- color: rgb(191, 231, 251); text-decoration: none; margin-top: -2px;
-}
-.headerContentContainer .primaryMenuContainer .primaryMenuOptionsContainer .primaryMenuOptionLink:active {
- color: rgb(191, 231, 251); text-decoration: none; margin-top: -2px;
-}
-.headerContentContainer .primaryMenuContainer .pageNameContainer .pageName {
- color: rgb(255, 255, 255); font-family: clearviewatt_ltbold; font-size: 18px; text-decoration: none; margin-left: 30px; float: left; cursor: pointer;
-}
-.headerContentContainer .primaryMenuContainer .pageNameContainer .pageName:hover {
- color: rgb(191, 231, 251); text-decoration: none; margin-top: -2px;
-}
-.headerContentContainer .primaryMenuContainer .pageNameContainer .pageName:active {
- color: rgb(191, 231, 251); text-decoration: none; margin-top: -2px;
-}
-.headerContentContainer .primaryMenuContainer .selectedOptionIndicator {
- border-width: 0px 8px 8px; border-style: solid; border-color: transparent transparent rgb(255, 255, 255); width: 0px; height: 0px; margin-top: 43px; position: absolute;
-}
-.headerContentContainer .primaryMenuContainer .loginIcon {
- background: url("") no-repeat -10px -41px; width: 16px; height: 21px; color: rgb(255, 255, 255); line-height: 50px; font-size: 18px; margin-top: 14px; margin-right: 10px; float: left; position: relative; cursor: pointer;
-}
-.headerContentContainer .primaryMenuContainer .loginIcon:hover {
- background-position: -10px -10px; margin-top: 12px;
-}
-.headerContentContainer .primaryMenuContainer .loginIcon:focus {
- background-position: -10px -10px; margin-top: 12px;
-}
-.headerContentContainer .primaryMenuContainer .icon-cart {
- background-position: -1000px; color: rgb(255, 255, 255); line-height: 50px; font-size: 18px; margin-right: 34px; float: left; position: relative; cursor: pointer;
-}
-.headerContentContainer .primaryMenuContainer .icon-cart:hover {
- color: rgb(191, 231, 251); margin-top: -2px;
-}
-.headerContentContainer .primaryMenuContainer .headerIconContainer {
- height: 50px; float: right; position: relative;
-}
-.headerContentContainer .primaryMenuContainer .headerIconContainer .loginName {
- line-height: 50px; font-family: clearviewatt; font-size: 12px; margin-right: 31px; float: left; position: relative;
-}
-.headerContentContainer .primaryMenuContainer .headerIconContainer .chatIcon {
- background: url("../images/common/header/att-chat-sprite.png") no-repeat -10px -39px; width: 18px; height: 19px; color: rgb(255, 255, 255); line-height: 50px; margin-top: 16px; margin-right: 32px; float: left; position: relative; cursor: pointer;
-}
-.headerContentContainer .primaryMenuContainer .headerIconContainer .chatIcon:hover {
- background-position: -10px -10px; margin-top: 14px;
-}
-.headerContentContainer .primaryMenuContainer .headerIconContainer .chatIcon:focus {
- background-position: -10px -10px; margin-top: 14px;
-}
-.headerContentContainer .primaryMenuContainer .headerIconContainer .searchIcon {
- background-position: -1000px; color: rgb(255, 255, 255); line-height: 50px; margin-right: 31px; float: left; position: relative; cursor: pointer;
-}
-.headerContentContainer .primaryMenuContainer .headerIconContainer .searchIcon:hover {
- color: rgb(191, 231, 251); margin-top: -2px;
-}
-.selectedPrimaryMenuOption {
- color: rgb(255, 255, 255); font-family: clearviewatt_ltbold !important;
-}
-.secondaryMenuContainer {
- width: 100%; height: 50px; color: rgb(102, 102, 102); line-height: 50px; font-family: clearviewatt; font-size: 16px; margin-top: 50px; margin-bottom: 50px; border-bottom-color: rgb(221, 221, 221); border-bottom-width: 1px; border-bottom-style: solid; float: left; background-color: rgb(255, 255, 255);
-}
-.secondaryMenuContainer .secondaryMenuContentContainer {
- margin: auto; width: 980px;
-}
-.secondaryMenuContainer .secondaryMenuContentContainer .secondaryMenuOption {
- overflow: hidden; float: left; cursor: pointer;
-}
-.secondaryMenuContainer .secondaryMenuContentContainer .secondaryMenuOption .selectionDiv {
- top: -4px; height: 4px; position: relative; background-color: rgb(6, 122, 180);
-}
-.secondaryMenuContainer .secondaryMenuContentContainer .secondaryMenuOption .secondaryMenuOptionLink {
- outline: 0px; color: rgb(102, 102, 102); text-decoration: none;
-}
-.secondaryMenuContainer .secondaryMenuContentContainer .secondaryMenuOption .secondaryMenuOptionLink:hover {
- font-family: clearviewatt_ltbold; font-size: 16px; text-decoration: none;
-}
-.secondaryMenuContainer .secondaryMenuContentContainer .secondaryMenuOption .secondaryMenuOptionLink:focus {
- font-family: clearviewatt_ltbold; font-size: 16px; text-decoration: none;
-}
-.selectedSecondaryMenuOption {
- font-family: clearviewatt_ltbold; font-size: 16px;
-}
-.homePageNameHighlight {
- font-family: clearviewatt_ltbold; font-size: 16px;
-}
-.megaMenuContainer {
- width: 100%; overflow: auto; margin-top: 101px; position: fixed; z-index: 3000; min-height: 140px; max-height: 500px; opacity: 1; background-color: rgb(255, 255, 255);
-}
-.megaMenuContentContainer {
- margin: auto; width: 980px;
-}
-.megaMenuContentContainer .megaMenuTable {
- width: 980px;
-}
-.megaMenuContentContainer .megaMenuTable .megaMenuRow .categoryContainerColumn {
- vertical-align: top;
-}
-.megaMenuContentContainer .megaMenuTable .megaMenuRow .categoryContainerColumn .categoryContainer {
- margin-bottom: 32px; float: left;
-}
-.megaMenuContentContainer .megaMenuTable .megaMenuRow .categoryContainerColumn .categoryContainer .categoryTitle {
- color: rgb(68, 68, 68); font-family: clearviewatt_ltbold; font-size: 14px; margin-top: 36px; margin-bottom: 22px;
-}
-.megaMenuContentContainer .megaMenuTable .megaMenuRow .categoryContainerColumn .categoryContainer .categoryOptionLink {
- outline: 0px; color: rgb(68, 68, 68); font-family: clearviewatt; font-size: 12px; text-decoration: none; margin-bottom: 13px;
-}
-.megaMenuContentContainer .megaMenuTable .megaMenuRow .categoryContainerColumn .categoryContainer .categoryOptionLink:hover {
- color: rgb(25, 157, 223); text-decoration: none;
-}
-.megaMenuContentContainer .megaMenuTable .megaMenuRow .categoryContainerColumn .categoryContainer .categoryOptionLink:focus {
- color: rgb(25, 157, 223); text-decoration: none;
-}
-.megaMenuContentContainer .megaMenuTable .megaMenuRow .categoryContainerColumn .categoryContainer .categoryOptionLink:active {
- color: rgb(25, 157, 223); text-decoration: none;
-}
-.megaMenuContentContainer .megaMenuTable .megaMenuSecondRow .categoryTitle {
- margin-top: 4px !important;
-}
-.addMargin {
- margin-top: 50px;
-}
-.contents {
- padding-top: 100px;
-}
-.megaMenuContentContainer .megaMenuTable li {
- float: left;
-}
-.megaMenuContentContainer ul {
- margin: 0px;
-}
-.headerContainer .secondaryMenuContainer {
- margin: 0px;
-}
-.unselectable {
- -ms-user-select: none; -webkit-user-select: none; -moz-user-select: none; -o-user-select: none; user-select: none; -khtml-user-select: none;
-}
-.chatBox {
- background: rgb(242, 242, 242); border: 1px solid rgb(187, 187, 187); top: 50px; width: 250px; right: 30px; display: none; position: absolute; z-index: 1000; min-height: 145px; box-sizing: border-box; box-shadow: 0px 4px 4px rgba(0,0,0,0.25); -webkit-box-sizing: border-box; -moz-box-sizing: border-box;
-}
-.chatBox .arrow {
- left: 233px; top: -8px; width: 0px; height: 0px; border-right-color: transparent; border-bottom-color: rgb(255, 255, 255); border-left-color: transparent; border-right-width: 8px; border-bottom-width: 8px; border-left-width: 8px; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; position: absolute; z-index: 1001;
-}
-.chatBox-header {
- padding: 0px 25px; width: 250px; height: 85px; position: relative; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box;
-}
-.chatBox-heading {
- left: 25px; top: 18px; color: rgb(68, 68, 68); line-height: 28px; font-family: omnes_attlight; font-size: 24px; position: absolute;
-}
-.chatBox-question {
- left: 25px; top: 53px; color: rgb(68, 68, 68); line-height: 16.8px; font-family: clearviewatt; font-size: 13px; position: absolute;
-}
-.circle_close_chat {
- top: 22px; right: 20px; color: rgb(68, 68, 68); font-size: 14px; position: absolute; cursor: pointer;
-}
-.chatBox-body {
- padding: 0px 15px; width: 250px; color: rgb(68, 68, 68); font-size: 12px; position: relative; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box;
-}
-.chat-option {
- height: 35px; line-height: 45px; margin-bottom: 10px; position: relative;
-}
-.chat-option .hr-chatbox {
- margin: 10px 0px; padding: 0px; border: 0px currentColor !important; width: inherit; height: 1px; display: block;
-}
-.chat-icon-info {
- top: 15px; right: 6px; font-size: 16px; position: absolute;
-}
-.chat-option > span {
- left: 10px; top: 0px; position: absolute; cursor: pointer;
-}
-.chat-option > span {
- left: 10px; top: 0px; position: absolute;
-}
-.chat-option > span:hover {
- color: rgb(6, 122, 180);
-}
-.footerContainer {
- background: 0px 0px rgb(6, 122, 180); margin: 0px auto; width: 100%;
-}
-.footerContainer .footerWrapper {
- margin: 0px auto; width: 980px; padding-bottom: 25px; background-color: rgb(6, 122, 180);
-}
-.footerContainer .footerWrapper .footerItem {
- margin: auto; width: 980px; height: 60px; color: rgb(255, 255, 255); line-height: 1; overflow: hidden; font-family: clearviewatt; font-size: 12px;
-}
-.footerContainer .footerWrapper .footerItem .divider {
- width: 100px; margin-top: 10px; margin-bottom: 10px; border-bottom-color: rgb(255, 255, 255); border-bottom-width: 1px; border-bottom-style: solid;
-}
-.footerContainer .footerWrapper .footerItem .customerSupport {
- width: 160px; margin-left: 30px; float: left;
-}
-.footerContainer .footerWrapper .footerItem .customerSupport .customerHelp {
- font-size: 14px; margin-top: 45px; margin-bottom: 20px;
-}
-.footerContainer .footerWrapper .footerItem .customerSupport a {
- color: rgb(255, 255, 255) !important;
-}
-.footerContainer .footerWrapper .footerItem .customerSupport a:hover {
- text-decoration: none;
-}
-.footerContainer .footerWrapper .footerItem .legalInfo {
- width: 160px; float: left;
-}
-.footerContainer .footerWrapper .footerItem .legalInfo .legal {
- font-size: 14px; margin-top: 45px; margin-bottom: 20px;
-}
-.footerContainer .footerWrapper .footerItem .legalInfo a {
- color: rgb(255, 255, 255) !important;
-}
-.footerContainer .footerWrapper .footerItem .legalInfo a:hover {
- text-decoration: none;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection {
- width: 295px; float: left;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeSave {
- font-size: 14px; margin-top: 45px; margin-bottom: 20px;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeToSection {
- overflow: hidden; margin-top: 15px;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeToSection .emailAddress {
- width: 170px; float: left;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeToSection .emailAddress input {
- padding: 5px 10px 5px 5px; width: 152px; color: rgb(255, 255, 255) !important; background-color: rgb(6, 122, 180);
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeToSection .subscribeBtn {
- border-radius: 1px 5px 5px 1px; top: 1px; width: 95px; height: 30px; text-align: center; right: 7px; color: rgb(6, 122, 180); font-size: 14px; vertical-align: middle; float: left; position: relative; cursor: pointer; background-color: rgb(255, 255, 255);
-}
-.footerContainer .footerWrapper .footerItem .socialMedia {
- margin-left: 0px; float: left;
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .followAtt {
- font-size: 14px; margin-top: 45px; margin-bottom: 20px;
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .socialFeeds {
- margin-top: 20px; margin-left: -8px;
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .socialFeeds span {
- margin: 0px; padding: 5px; font-size: 30px;
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .socialFeeds span a {
- margin: 0px; padding: 0px; color: rgb(255, 255, 255);
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .socialFeeds span a:hover {
- text-decoration: none;
-}
-.footerContainer .footerWrapper .dividerBottom {
- margin: auto; width: 920px; border-bottom-color: rgb(255, 255, 255); border-bottom-width: 1px; border-bottom-style: solid;
-}
-.footerContainer .footerWrapper .feedbackSection {
- margin: auto; width: 920px; display: none;
-}
-.footerContainer .footerWrapper .feedbackSection .dividerTop {
- margin: auto; width: 920px; border-bottom-color: rgb(255, 255, 255); border-bottom-width: 1px; border-bottom-style: solid;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent {
- margin: 30px auto;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent #feedbackForm {
- height: 120px;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent .feedbackInfo {
- width: 270px; color: rgb(255, 255, 255); font-family: clearviewatt; font-size: 12px; margin-top: -5px; margin-right: 30px; float: left;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent .feedbackTextSection .feedbackText {
- padding: 10px; border-radius: 5px; border: 1px solid rgb(255, 255, 255); width: 500px; height: 100px; color: rgb(255, 255, 255); font-family: clearviewatt; font-size: 14px; float: left; cursor: text; background-color: rgb(6, 122, 180); resize: none;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent .feedbackTextSection .feedbackSubmitButton {
- padding: 5px; border-radius: 5px; border: currentColor; width: 82px; color: rgb(6, 122, 180); font-family: clearviewatt; font-size: 14px; margin-top: 92px; margin-left: 16px; cursor: pointer; background-color: rgb(255, 255, 255);
-}
-.footerContainer .footerWrapper .feedbackResultMsg {
- margin: 0px auto; width: 980px; text-align: center; color: rgb(255, 255, 255); line-height: 70px; font-family: clearviewatt; font-size: 18px; display: none;
-}
-.footerContainer .footerWrapper .feedbackResultMsg #feedbackMsgCheck {
- font-size: 20px; margin-right: 20px;
-}
-.footerContainer .footerWrapper #feedbackResultDivider {
- display: none;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv {
- margin: auto; max-width: 110px;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv .feedbackButton {
- background: rgb(255, 255, 255); margin: -1px auto auto; padding: 5px 10px; border-radius: 0px 0px 5px 5px; border: currentColor; color: rgb(6, 122, 180); font-family: clearviewatt; font-size: 14px; cursor: pointer;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv .closeFeedbackButton {
- background: rgb(255, 255, 255); margin: -1px auto auto; padding: 5px 10px; border-radius: 0px 0px 5px 5px; border: currentColor; color: rgb(6, 122, 180); font-family: clearviewatt; font-size: 14px; cursor: pointer;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv .feedbackButton span {
- padding-left: 10px; background-image: none;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv .closeFeedbackButton span {
- padding-left: 10px; background-image: none;
-}
-.footerContainer .footerWrapper .attFooterInfo {
- margin: auto; width: 980px; color: rgb(255, 255, 255); overflow: hidden; font-family: clearviewatt; font-size: 12px;
-}
-.footerContainer .footerWrapper .attFooterInfo a {
- margin: 0px; padding: 0px; color: rgb(255, 255, 255); text-decoration: underline;
-}
-.footerContainer .footerWrapper .attFooterInfo .footerLastSection {
- overflow: hidden; margin-top: 40px;
-}
-.footerContainer .footerWrapper .attFooterInfo span {
- padding-right: 5px; padding-left: 3px; border-right-color: rgb(255, 255, 255); border-right-width: 1px; border-right-style: solid;
-}
-.footerContainer .footerWrapper .attFooterInfo span:last-child {
- border: currentColor;
-}
-.footerContainer .footerWrapper .attFooterInfo .attLogo {
- background: url("../images/common/footer/footer-attolympiclogo.png") repeat-x 0px 0px; width: 150px; height: 77px; margin-right: 0px; margin-left: 17px; float: left;
-}
-.footerContainer .footerWrapper .attFooterInfo .attQuality {
- background: url("../images/common/footer/footer-consumerinfo.png") repeat-x 0px 0px; top: -5px; width: 79px; height: 82px; margin-right: 103px; float: left; position: relative;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise {
- width: 64%; float: right;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise .privacyPolicy {
- margin-top: 17px;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise .privacyPolicy a {
- text-decoration: underline;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise .privacyPolicy a span {
- padding: 0px;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise .privacyPolicy a:hover {
- text-decoration: underline;
-}
-html {
- color: rgb(68, 68, 68);
-}
-button {
- color: rgb(68, 68, 68);
-}
-input {
- color: rgb(68, 68, 68);
-}
-select {
- color: rgb(68, 68, 68);
-}
-textarea {
- color: rgb(68, 68, 68);
-}
-body {
- line-height: 1.4; font-family: Arial, Helvetica, sans-serif; font-size: 12px;
-}
-::selection {
- background: rgb(6, 122, 180); color: rgb(255, 255, 255) !important; text-shadow: none;
-}
-hr {
- border-width: 1px 0px 0px; border-style: solid none none; border-color: rgb(227, 227, 227) currentColor currentColor; margin: 10px 0px; padding: 0px; height: 1px; display: block;
-}
-img {
- vertical-align: middle;
-}
-fieldset {
- margin: 0px; padding: 0px; border: 0px currentColor;
-}
-textarea {
- resize: vertical;
-}
-.chromeframe {
- background: rgb(242, 242, 242); margin: 2px 0px; padding: 2px 0px; color: rgb(68, 68, 68);
-}
-body {
- background: 0px 0px rgb(242, 242, 242); margin: 0px; padding: 0px; outline: 0px; border: 0px currentColor; text-align: left; color: rgb(68, 68, 68); line-height: 1.4; font-family: "clearviewatt"; font-size: 12px; font-weight: normal; vertical-align: baseline; white-space: normal;
-}
-p {
- margin-bottom: 15px;
-}
-a {
- color: rgb(6, 122, 180); font-family: inherit; text-decoration: none; display: inline-block; cursor: pointer;
-}
-a:hover {
- color: rgb(25, 157, 223); text-decoration: none; outline-style: none; outline-color: invert;
-}
-a:active {
- color: rgb(124, 198, 255); text-decoration: none; outline-style: none; outline-color: invert;
-}
-a:focus {
- text-decoration: none; outline-style: none; outline-color: invert;
-}
-sup {
- top: -0.4em; color: inherit; font-family: inherit; font-size: 0.6em; vertical-align: baseline; position: relative;
-}
-img {
- vertical-align: middle;
-}
-span {
- color: inherit; line-height: inherit; font-family: inherit; font-size: inherit;
-}
-.bui-text-color {
- color: rgb(68, 68, 68);
-}
-.bui-active-text-color {
- color: rgb(6, 122, 180);
-}
-.bui-highlight-text-color {
- color: rgb(128, 128, 128);
-}
-.bui-link-text-color {
- color: rgb(6, 122, 180);
-}
-.bui-promotion-text-color {
- color: rgb(254, 137, 7);
-}
-.bui-bold {
- font-family: "clearviewatt"; font-weight: bold;
-}
-.bui-italic {
- font-family: "clearviewatt"; font-style: italic;
-}
-.bui-bold-italic {
- font-family: "clearviewatt"; font-style: italic; font-weight: bold;
-}
-.bui-light {
- font-family: "clearviewatt_lt"; font-weight: normal;
-}
-.bui-light-italic {
- font-family: "clearviewatt_lt"; font-style: italic; font-weight: normal;
-}
-.bui-omnes-light {
- font-family: "omnes_attlight"; font-weight: normal;
-}
-.bui-omnes-light-italic {
- font-family: "omnes_attlight"; font-style: italic; font-weight: normal;
-}
-.bui-omnes-med {
- font-family: "omnes_attmedium"; font-weight: normal;
-}
-.bui-omnes-med-italic {
- font-family: "omnes_attmedium"; font-style: italic; font-weight: normal;
-}
-.bui-omnes-reg {
- font-family: "omnes_attregular"; font-weight: normal;
-}
-.bui-omnes-reg-italic {
- font-family: "omnes_attregular"; font-style: italic; font-weight: normal;
-}
-.bui-default-background-color {
- background-color: rgb(242, 242, 242);
-}
-.bui-content-background-color {
- background-color: rgb(255, 255, 255);
-}
-.bui-font-title {
- font-family: "clearviewatt"; font-weight: bold;
-}
-.bui-font-subtitle {
- font-family: "clearviewatt"; font-weight: bold;
-}
-.bui-letter-space {
- letter-spacing: 3px !important;
-}
-.bui-h1-size {
- font-size: 42px;
-}
-.bui-h2-size {
- font-size: 30px;
-}
-.bui-h3-size {
- font-size: 21px;
-}
-.bui-h4-size {
- font-size: 15px;
-}
-.bui-h5-size {
- font-size: 13px;
-}
-.bui-h6-size {
- font-size: 11px;
-}
-.bui-f10-size {
- font-size: 10px;
-}
-.bui-f11-size {
- font-size: 11px;
-}
-.bui-f12-size {
- font-size: 12px;
-}
-.bui-f14-size {
- font-size: 14px;
-}
-.bui-f16-size {
- font-size: 16px;
-}
-.bui-f18-size {
- font-size: 18px;
-}
-.bui-f20-size {
- font-size: 20px;
-}
-.bui-f26-size {
- font-size: 26px;
-}
-.bui-f32-size {
- font-size: 32px;
-}
-.bui-f36-size {
- font-size: 36px;
-}
-.bui-f50-size {
- font-size: 50px;
-}
-.bui-f60-size {
- font-size: 60px;
-}
-.bui-lh-5 {
- line-height: 5px;
-}
-.bui-lh-10 {
- line-height: 10px;
-}
-.bui-lh-15 {
- line-height: 15px;
-}
-.bui-lh-20 {
- line-height: 20px;
-}
-.bui-lh-25 {
- line-height: 25px;
-}
-.bui-lh-30 {
- line-height: 30px;
-}
-.bui-lh-35 {
- line-height: 35px;
-}
-.bui-lh-40 {
- line-height: 40px;
-}
-.bui-lh-45 {
- line-height: 45px;
-}
-.bui-lh-50 {
- line-height: 50px;
-}
-.bui-lh-55 {
- line-height: 55px;
-}
-.bui-lh-60 {
- line-height: 60px;
-}
-.bui-lh-65 {
- line-height: 65px;
-}
-.bui-lh-70 {
- line-height: 70px;
-}
-.bui-lh-75 {
- line-height: 75px;
-}
-.bui-lh-80 {
- line-height: 80px;
-}
-.bui-lh-85 {
- line-height: 85px;
-}
-.bui-lh-90 {
- line-height: 90px;
-}
-.bui-lh-95 {
- line-height: 95px;
-}
-.bui-lh-100 {
- line-height: 100px;
-}
-h1 {
- margin: 0px; font-size: 42px;
-}
-.bui-h1 {
- margin: 0px; font-size: 42px;
-}
-h2 {
- font-size: 30px;
-}
-.bui-h2 {
- font-size: 30px;
-}
-h3 {
- font-size: 21px;
-}
-.bui-h3 {
- font-size: 21px;
-}
-h4 {
- font-size: 15px;
-}
-.bui-h4 {
- font-size: 15px;
-}
-h5 {
- font-size: 13px;
-}
-.bui-h5 {
- font-size: 13px;
-}
-h6 {
- font-size: 11px;
-}
-.bui-h6 {
- font-size: 11px;
-}
-h1 {
- margin: 0px; color: rgb(68, 68, 68); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold;
-}
-h2 {
- margin: 0px; color: rgb(68, 68, 68); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold;
-}
-h3 {
- margin: 0px; color: rgb(68, 68, 68); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold;
-}
-h4 {
- margin: 0px; color: rgb(68, 68, 68); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold;
-}
-h5 {
- margin: 0px; color: rgb(68, 68, 68); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold;
-}
-h6 {
- margin: 0px; color: rgb(68, 68, 68); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold;
-}
-.ui-base-h1 {
- margin: 0px; color: rgb(68, 68, 68); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold;
-}
-.ui-base-h2 {
- margin: 0px; color: rgb(68, 68, 68); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold;
-}
-.bui-h3 {
- margin: 0px; color: rgb(68, 68, 68); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold;
-}
-.bui-h4 {
- margin: 0px; color: rgb(68, 68, 68); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold;
-}
-.bui-h5 {
- margin: 0px; color: rgb(68, 68, 68); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold;
-}
-.bui-h6 {
- margin: 0px; color: rgb(68, 68, 68); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold;
-}
-textarea:-ms-input-placeholder {
- color: rgb(187, 187, 187);
-}
-input[type='text']:-ms-input-placeholder {
- color: rgb(187, 187, 187);
-}
-input[type='password']:-ms-input-placeholder {
- color: rgb(187, 187, 187);
-}
-input[type='email']:-ms-input-placeholder {
- color: rgb(187, 187, 187);
-}
-input[type='search']:-ms-input-placeholder {
- color: rgb(187, 187, 187);
-}
-label {
- width: 100%; color: rgb(68, 68, 68); font-family: "clearviewatt"; font-size: 12px; font-weight: bold; display: block;
-}
-input[type='text'] {
- background: 0px 0px rgb(239, 238, 238); margin: 1px 0px; padding: 4px 4px 4px 5px; border-radius: 4px; border: 1px solid rgb(231, 230, 230); width: 100%; height: 18px; color: rgb(68, 68, 68); line-height: 18px; font-family: "clearviewatt"; font-size: 12px; vertical-align: middle; display: block; position: relative; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); box-shadow: none; -webkit-border-radius: 4px; -moz-border-radius: 4px; -ms-border-radius: 4px; -o-border-radius: 4px; -webkit-box-shadow: none; -moz-box-shadow: none;
-}
-input[type='email'] {
- background: 0px 0px rgb(239, 238, 238); margin: 1px 0px; padding: 4px 4px 4px 5px; border-radius: 4px; border: 1px solid rgb(231, 230, 230); width: 100%; height: 18px; color: rgb(68, 68, 68); line-height: 18px; font-family: "clearviewatt"; font-size: 12px; vertical-align: middle; display: block; position: relative; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); box-shadow: none; -webkit-border-radius: 4px; -moz-border-radius: 4px; -ms-border-radius: 4px; -o-border-radius: 4px; -webkit-box-shadow: none; -moz-box-shadow: none;
-}
-input[type='password'] {
- background: 0px 0px rgb(239, 238, 238); margin: 1px 0px; padding: 4px 4px 4px 5px; border-radius: 4px; border: 1px solid rgb(231, 230, 230); width: 100%; height: 18px; color: rgb(68, 68, 68); line-height: 18px; font-family: "clearviewatt"; font-size: 12px; vertical-align: middle; display: block; position: relative; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); box-shadow: none; -webkit-border-radius: 4px; -moz-border-radius: 4px; -ms-border-radius: 4px; -o-border-radius: 4px; -webkit-box-shadow: none; -moz-box-shadow: none;
-}
-select {
- background: 0px 0px rgb(239, 238, 238); margin: 1px 0px; padding: 4px 4px 4px 5px; border-radius: 4px; border: 1px solid rgb(231, 230, 230); width: 100%; height: 18px; color: rgb(68, 68, 68); line-height: 18px; font-family: "clearviewatt"; font-size: 12px; vertical-align: middle; display: block; position: relative; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); box-shadow: none; -webkit-border-radius: 4px; -moz-border-radius: 4px; -ms-border-radius: 4px; -o-border-radius: 4px; -webkit-box-shadow: none; -moz-box-shadow: none;
-}
-textarea {
- background: 0px 0px rgb(239, 238, 238); margin: 1px 0px; padding: 4px 4px 4px 5px; border-radius: 4px; border: 1px solid rgb(231, 230, 230); width: 100%; height: 18px; color: rgb(68, 68, 68); line-height: 18px; font-family: "clearviewatt"; font-size: 12px; vertical-align: middle; display: block; position: relative; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); box-shadow: none; -webkit-border-radius: 4px; -moz-border-radius: 4px; -ms-border-radius: 4px; -o-border-radius: 4px; -webkit-box-shadow: none; -moz-box-shadow: none;
-}
-input[type='search'] {
- background: url("../images/chosen-sprite.png") no-repeat 100% -22px rgb(239, 238, 238); margin: 1px 0px; padding: 4px 4px 4px 5px; border-radius: 4px; border: 1px solid rgb(170, 170, 170); width: 100%; height: 18px; color: rgb(68, 68, 68); line-height: 18px; font-family: "clearviewatt"; font-size: 12px; vertical-align: middle; display: block; position: relative; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); box-shadow: none; -webkit-border-radius: 4px; -moz-border-radius: 4px; -ms-border-radius: 4px; -o-border-radius: 4px; -webkit-box-shadow: none; -moz-box-shadow: none;
-}
-input[type='checkbox']:focus {
- outline: 0px; text-decoration: none;
-}
-input[type='checkbox'] {
- background: 0px 0px rgb(239, 238, 238); margin: 1px 0px; padding: 4px 4px 4px 5px; border: currentColor; width: 100%; height: 18px; color: rgb(68, 68, 68); line-height: 18px; font-family: "clearviewatt"; font-size: 12px; vertical-align: middle; display: block; min-width: 15px; box-shadow: none; -webkit-box-shadow: none; -moz-box-shadow: none;
-}
-input[type='radio'] {
- background: 0px 0px rgb(239, 238, 238); margin: 1px 0px; padding: 4px 4px 4px 5px; border: currentColor; width: 100%; height: 18px; color: rgb(68, 68, 68); line-height: 18px; font-family: "clearviewatt"; font-size: 12px; vertical-align: middle; display: block; min-width: 10px; opacity: 0; box-shadow: none; -webkit-box-shadow: none; -moz-box-shadow: none;
-}
-.bui-input-search-top {
- background: url("../images/chosen-sprite-white.png") no-repeat 100% -22px rgb(6, 122, 180) !important; margin: 1px 0px; padding: 4px 4px 4px 5px; border-radius: 4px; border: 1px solid rgb(170, 170, 170) !important; width: 100%; height: 18px; color: rgb(255, 255, 255) !important; line-height: 18px; font-family: "clearviewatt"; font-size: 12px; vertical-align: middle; display: block; position: relative; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); box-shadow: none; -webkit-border-radius: 4px; -moz-border-radius: 4px; -ms-border-radius: 4px; -o-border-radius: 4px; -webkit-box-shadow: none; -moz-box-shadow: none;
-}
-.chzn-container {
- font-size: 12px;
-}
-.chzn-container .chzn-drop {
- background: rgb(255, 255, 255); border: 1px solid rgb(170, 170, 170); z-index: 1010;
-}
-.chzn-container .chzn-results .highlighted {
- color: rgb(255, 255, 255); background-color: rgb(6, 122, 180);
-}
-.chzn-container .chzn-results .result-selected {
- color: rgb(255, 255, 255); background-color: rgb(6, 122, 180);
-}
-.chzn-container .chzn-results:hover .result-selected {
- color: rgb(68, 68, 68) !important;
-}
-.chzn-container .chzn-results:hover .highlighted {
- color: rgb(255, 255, 255) !important; background-color: rgb(6, 122, 180);
-}
-.chzn-container-single .chzn-single {
- border-radius: 4px; border: 1px solid rgb(170, 170, 170); height: 26px; color: rgb(68, 68, 68); line-height: 26px; position: relative; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); background-clip: padding-box; background-color: rgb(255, 255, 255); -moz-background-clip: padding-box; -webkit-background-clip: padding-box; -webkit-border-radius: 4px; -moz-border-radius: 4px; -ms-border-radius: 4px; -o-border-radius: 4px; -pie-background: ease-in-out-gradient(left, #ffffff, #ffffff);
-}
-.chzn-container-single .chzn-default {
- color: rgb(68, 68, 68);
-}
-.chzn-container-single .chzn-search input {
- height: 18px; line-height: 18px; background-color: rgb(255, 255, 255);
-}
-.chzn-container-multi .chzn-choices {
- background-color: rgb(255, 255, 255);
-}
-.chosen-container-single .chosen-search input[type='text'] {
- padding: 4px 20px 4px 5px !important; width: 100% !important;
-}
-.chosen-container {
- border-radius: 4px;
-}
-ul {
- list-style: none; margin: 0px; padding: 0px;
-}
-.bui-button {
- margin: 0px; padding: 8px 20px; border-radius: 6px; border: 0px currentColor; text-align: center; color: rgb(255, 255, 255); line-height: 1; font-family: "clearviewatt"; font-size: 14px; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 60px; background-color: rgb(6, 122, 180); -webkit-border-radius: 6px; -moz-border-radius: 6px; -ms-border-radius: 6px; -o-border-radius: 6px;
-}
-.bui-button:hover {
- transition:background-color 0.3s ease-in-out; background-color: rgb(62, 145, 186); -webkit-transition: background-color 0.3s ease-in-out; -moz-transition: background-color 0.3s ease-in-out; -o-transition: opacity 0.3s ease-in-out;
-}
-.bui-button:focus {
- background-color: rgb(76, 200, 243);
-}
-.bui-button:active {
- background-color: rgb(25, 157, 223);
-}
-.bui-button-grey {
- background: rgb(163, 163, 163); margin: 0px; padding: 8px 20px; border-radius: 6px; border: 0px currentColor; text-align: center; color: rgb(255, 255, 255); line-height: 1; font-family: "clearviewatt"; font-size: 14px; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 60px; -webkit-border-radius: 6px; -moz-border-radius: 6px; -ms-border-radius: 6px; -o-border-radius: 6px; -pie-background: ease-in-out-gradient(top, #a3a3a3, #a3a3a3);
-}
-.bui-button-disable {
- background: rgb(163, 163, 163); margin: 0px; padding: 8px 20px; border-radius: 6px; border: 0px currentColor; text-align: center; color: rgb(255, 255, 255); line-height: 1; font-family: "clearviewatt"; font-size: 14px; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: default; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 60px; -webkit-border-radius: 6px; -moz-border-radius: 6px; -ms-border-radius: 6px; -o-border-radius: 6px; -pie-background: ease-in-out-gradient(top, #a3a3a3, #a3a3a3);
-}
-.bui-button-small {
- margin: 0px; padding: 8px 20px; border-radius: 6px; border: 0px currentColor; text-align: center; color: rgb(255, 255, 255); line-height: 1; font-family: "clearviewatt"; font-size: 14px; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 60px; background-color: rgb(6, 122, 180); -webkit-border-radius: 6px; -moz-border-radius: 6px; -ms-border-radius: 6px; -o-border-radius: 6px;
-}
-.bui-button-small:hover {
- transition:background-color 0.3s ease-in-out; background-color: rgb(62, 145, 186); -webkit-transition: background-color 0.3s ease-in-out; -moz-transition: background-color 0.3s ease-in-out; -o-transition: opacity 0.3s ease-in-out;
-}
-.bui-button-small:focus {
- background-color: rgb(76, 200, 243);
-}
-.bui-button-small:active {
- background-color: rgb(25, 157, 223);
-}
-.bui-button-small-disable {
- background: rgb(163, 163, 163); margin: 0px; padding: 8px 20px; border-radius: 6px; border: 0px currentColor; text-align: center; color: rgb(255, 255, 255); line-height: 1; font-family: "clearviewatt"; font-size: 14px; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: default; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 60px; -webkit-border-radius: 6px; -moz-border-radius: 6px; -ms-border-radius: 6px; -o-border-radius: 6px; -pie-background: ease-in-out-gradient(top, #a3a3a3, #a3a3a3);
-}
-.bui-button-large {
- margin: 0px; padding: 11px 30px; border-radius: 6px; border: 0px currentColor; text-align: center; color: rgb(255, 255, 255); line-height: 1; font-family: "clearviewatt"; font-size: 18px; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 100px; background-color: rgb(6, 122, 180); -webkit-border-radius: 6px; -moz-border-radius: 6px; -ms-border-radius: 6px; -o-border-radius: 6px;
-}
-.bui-button-large:hover {
- transition:background-color 0.3s ease-in-out; background-color: rgb(62, 145, 186); -webkit-transition: background-color 0.3s ease-in-out; -moz-transition: background-color 0.3s ease-in-out; -o-transition: opacity 0.3s ease-in-out;
-}
-.bui-button-large:focus {
- background-color: rgb(76, 200, 243);
-}
-.bui-button-large:active {
- background-color: rgb(25, 157, 223);
-}
-.bui-button-large-disable {
- background: rgb(163, 163, 163); margin: 0px; padding: 11px 30px; border-radius: 6px; border: 0px currentColor; text-align: center; color: rgb(255, 255, 255); line-height: 1; font-family: "clearviewatt"; font-size: 18px; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: default; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 100px; -webkit-border-radius: 6px; -moz-border-radius: 6px; -ms-border-radius: 6px; -o-border-radius: 6px; -pie-background: ease-in-out-gradient(top, #a3a3a3, #a3a3a3);
-}
-.bui-button-orange-small {
- margin: 0px; padding: 8px 20px; border-radius: 6px; border: 0px currentColor; text-align: center; color: rgb(255, 255, 255); line-height: 1; font-family: "clearviewatt"; font-size: 14px; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 60px; background-color: rgb(239, 111, 0); -webkit-border-radius: 6px; -moz-border-radius: 6px; -ms-border-radius: 6px; -o-border-radius: 6px;
-}
-.bui-button-orange-small:hover {
- transition:background-color 0.3s ease-in-out; background-color: rgb(252, 179, 20); -webkit-transition: background-color 0.3s ease-in-out; -moz-transition: background-color 0.3s ease-in-out; -o-transition: opacity 0.3s ease-in-out;
-}
-.bui-button-orange-small:focus {
- background-color: rgb(252, 179, 20);
-}
-.bui-button-orange-small:active {
- background-color: rgb(252, 179, 20);
-}
-.bui-button-orange {
- margin: 0px; padding: 8px 20px; border-radius: 6px; border: 0px currentColor; text-align: center; color: rgb(255, 255, 255); line-height: 1; font-family: "clearviewatt"; font-size: 14px; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 60px; background-color: rgb(239, 111, 0); -webkit-border-radius: 6px; -moz-border-radius: 6px; -ms-border-radius: 6px; -o-border-radius: 6px;
-}
-.bui-button-orange:hover {
- transition:background-color 0.3s ease-in-out; background-color: rgb(252, 179, 20); -webkit-transition: background-color 0.3s ease-in-out; -moz-transition: background-color 0.3s ease-in-out; -o-transition: opacity 0.3s ease-in-out;
-}
-.bui-button-orange:focus {
- background-color: rgb(252, 179, 20);
-}
-.bui-button-orange:active {
- background-color: rgb(252, 179, 20);
-}
-.bui-button-orange-large {
- margin: 0px; padding: 11px 30px; border-radius: 6px; border: 0px currentColor; text-align: center; color: rgb(255, 255, 255); line-height: 1; font-family: "clearviewatt"; font-size: 18px; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 100px; background-color: rgb(239, 111, 0); -webkit-border-radius: 6px; -moz-border-radius: 6px; -ms-border-radius: 6px; -o-border-radius: 6px;
-}
-.bui-button-orange-large:hover {
- transition:background-color 0.3s ease-in-out; background-color: rgb(252, 179, 20); -webkit-transition: background-color 0.3s ease-in-out; -moz-transition: background-color 0.3s ease-in-out; -o-transition: opacity 0.3s ease-in-out;
-}
-.bui-button-orange-large:focus {
- background-color: rgb(252, 179, 20);
-}
-.bui-button-orange-large:active {
- background-color: rgb(252, 179, 20);
-}
-.bui-button-orange-rectangle {
- margin: 0px; padding: 12px; border: 0px currentColor; text-align: center; color: rgb(255, 255, 255); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold; text-decoration: none; vertical-align: middle; display: inline-block; cursor: pointer; min-width: 60px; background-color: rgb(239, 111, 0);
-}
-.bui-button-orange-rectangle:hover {
- color: rgb(252, 179, 20);
-}
-.bui-button-orange-rectangle:active {
- color: rgb(252, 179, 20);
-}
-.bui-disabled-button-rectangle {
- margin: 0px; padding: 12px; border: 0px currentColor; text-align: center; color: rgb(255, 255, 255); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold; text-decoration: none; vertical-align: middle; display: inline-block; cursor: default; min-width: 60px; background-color: rgb(163, 163, 163);
-}
-.bui-btn-fixed {
- margin: 0px; padding: 2px 20px; border-radius: 6px; border: 0px currentColor; text-align: center; color: rgb(255, 255, 255); line-height: 1; font-family: "clearviewatt"; font-size: 14px; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 60px; background-color: rgb(6, 122, 180); -webkit-border-radius: 6px; -moz-border-radius: 6px; -ms-border-radius: 6px; -o-border-radius: 6px;
-}
-.bui-btn-fixed:hover {
- transition:background-color 0.3s ease-in-out; background-color: rgb(62, 145, 186); -webkit-transition: background-color 0.3s ease-in-out; -moz-transition: background-color 0.3s ease-in-out; -o-transition: opacity 0.3s ease-in-out;
-}
-.bui-btn-fixed:focus {
- background-color: rgb(76, 200, 243);
-}
-.bui-btn-fixed:active {
- background-color: rgb(25, 157, 223);
-}
-.bui-button-rectangle {
- background: padding-box rgb(6, 122, 180); margin: 0px; padding: 4px 12px; text-align: center; color: rgb(255, 255, 255); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 20px; box-shadow: 1px 1px 1px #199ddf; -moz-background-clip: padding-box; -webkit-background-clip: padding-box; -webkit-box-shadow: 1px 1px 1px #199ddf; -moz-box-shadow: 1px 1px 1px #199ddf; -pie-background: ease-in-out-gradient(top, #199ddf, #067ab4);
-}
-.bui-button-rectangle:hover {
- background: rgb(62, 145, 186); position: relative; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); -pie-background: ease-in-out-gradient(top, #3e91ba, #3e91ba);
-}
-.bui-button-right-rounded-corner {
- background: padding-box rgb(6, 122, 180); margin: 3px 0px; padding: 2px 8px; border-radius: 0px 6px 6px 0px; text-align: center; color: rgb(255, 255, 255); line-height: 1.4; font-family: "clearviewatt"; font-size: 9px; font-weight: bold; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 60px; box-shadow: 1px 1px 1px #199ddf; -moz-background-clip: padding-box; -webkit-background-clip: padding-box; -webkit-border-radius: 0 6px 6px 0; -moz-border-radius: 0 6px 6px 0; -ms-border-radius: 0 6px 6px 0; -o-border-radius: 0 6px 6px 0; -webkit-box-shadow: 1px 1px 1px #199ddf; -moz-box-shadow: 1px 1px 1px #199ddf; -pie-background: ease-in-out-gradient(top, #199ddf, #067ab4);
-}
-.bui-button-right-rounded-corner:hover {
- background: rgb(62, 145, 186); position: relative; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); -pie-background: ease-in-out-gradient(top, #3e91ba, #3e91ba);
-}
-.bui-button-left-rounded-corner {
- background: padding-box rgb(6, 122, 180); margin: 3px 0px; padding: 2px 8px; border-radius: 6px 0px 0px 6px; text-align: center; color: rgb(255, 255, 255); line-height: 1.4; font-family: "clearviewatt"; font-size: 9px; font-weight: bold; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 60px; box-shadow: 1px 1px 1px #199ddf; -moz-background-clip: padding-box; -webkit-background-clip: padding-box; -webkit-border-radius: 6px 0 0 6px; -moz-border-radius: 6px 0 0 6px; -ms-border-radius: 6px 0 0 6px; -o-border-radius: 6px 0 0 6px; -webkit-box-shadow: 1px 1px 1px #199ddf; -moz-box-shadow: 1px 1px 1px #199ddf; -pie-background: ease-in-out-gradient(top, #199ddf, #067ab4);
-}
-.bui-button-left-rounded-corner:hover {
- background: rgb(62, 145, 186); position: relative; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); -pie-background: ease-in-out-gradient(top, #3e91ba, #3e91ba);
-}
-.bui-icon-18 {
- margin: 0px; padding: 1px; border-radius: 18px; width: 18px; height: 18px; vertical-align: middle; display: inline-block; position: relative; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); background-image: url("../images/icons-18-spritesheet-and-hover.png"); background-size: 891px 36px; background-color: rgb(248, 248, 248); -webkit-border-radius: 18px; -moz-border-radius: 18px; -ms-border-radius: 18px; -o-border-radius: 18px; -moz-background-size: 891px 36px; -o-background-size: 891px 36px; -webkit-background-size: 891px 36px;
-}
-.bui-float-right {
- float: right;
-}
-.bui-float-left {
- float: left;
-}
-.bui-clearfix {
- clear: both; display: table; content: "";
-}
-.bui-force-float-left {
- float: left !important;
-}
-.bui-force-float-right {
- float: right !important;
-}
-.bui-force-display-block {
- display: block !important;
-}
-.bui-force-display-inline {
- display: inline !important;
-}
-.bui-text-align-left {
- text-align: left;
-}
-.bui-text-align-center {
- text-align: center;
-}
-.bui-text-align-right {
- text-align: right;
-}
-.bui-vertical-align-top {
- vertical-align: top;
-}
-.bui-vertical-align-middle {
- vertical-align: middle;
-}
-.bui-vertical-align-bottom {
- vertical-align: bottom;
-}
-.bui-display-block {
- display: block;
-}
-.bui-display-inline-block {
- display: inline-block;
-}
-form label {
- color: rgb(68, 68, 68); font-size: 12px; -ms-user-select: none; -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-touch-callout: none; -khtml-user-select: none;
-}
-@media only screen and (max-device-width:480px) and (min-device-width:320px)
-{
-.bui-screen-width {
- width: 100%;
-}
-}
-@media only screen and (min-width:321px)
-{
-.bui-screen-width {
- width: 100%;
-}
-}
-@media only screen and (max-width:320px)
-{
-.bui-screen-width {
- width: 100%;
-}
-}
-@media only screen and (max-device-width:1024px) and (min-device-width:768px)
-{
-.bui-screen-width {
- width: 100%;
-}
-}
-@media only screen and (orientation:landscape) and (max-device-width:1024px) and (min-device-width:768px)
-{
-.bui-screen-width {
- margin: 0px auto !important; width: 980px;
-}
-}
-@media only screen and (orientation:portrait) and (max-device-width:1024px) and (min-device-width:768px)
-{
-.bui-screen-width {
- width: 100%;
-}
-}
-@media only screen and (min-width:1224px)
-{
-.bui-screen-width {
- margin: 0px auto !important; width: 980px;
-}
-}
-@media only screen and (min-width:1824px)
-{
-.bui-screen-width {
- margin: 0px auto !important; width: 980px;
-}
-}
-@media not all, not all
-{
-.bui-screen-width {
- margin: 0px auto !important; width: 980px;
-}
-}
diff --git a/ecomp-portal-BE/war/static/ebz/dashboardBase_changed.css b/ecomp-portal-BE/war/static/ebz/dashboardBase_changed.css
deleted file mode 100644
index d0e8ce8b..00000000
--- a/ecomp-portal-BE/war/static/ebz/dashboardBase_changed.css
+++ /dev/null
@@ -1,5803 +0,0 @@
-/* Generated by F12 developer tools. This might not be an accurate representation of the original source file */
-/*@import url( globalFonts.css );
-@font-face {
- font-family: clearviewatt;
- src: url(./webfonts/clvatt-book-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/clvatt-book-webfont.woff) format("woff"), url(./webfonts/clvatt-book-webfont.ttf) format("truetype"), url(./webfonts/clvatt-book-webfont.svg#clearviewattregular) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: clearviewattregular;
- src: url(./webfonts/clvatt-book-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/clvatt-book-webfont.woff) format("woff"), url(./webfonts/clvatt-book-webfont.ttf) format("truetype"), url(./webfonts/clvatt-book-webfont.svg#clearviewattregular) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: clearviewatt_italic;
- src: url(./webfonts/clvatt-book_ital-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/clvatt-book_ital-webfont.woff) format("woff"), url(./webfonts/clvatt-book_ital-webfont.ttf) format("truetype"), url(./webfonts/clvatt-book_ital-webfont.svg#clearviewattitalic) format("svg");
- font-weight: normal;
- font-style: italic;
-}
-@font-face {
- font-family: clearviewatt_lt;
- src: url(./webfonts/clvatt-light-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/clvatt-light-webfont.woff) format("woff"), url(./webfonts/clvatt-light-webfont.ttf) format("truetype"), url(./webfonts/clvatt-light-webfont.svg#clearviewatt_ltregular) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: clearviewattlight_italic;
- src: url(./webfonts/clvatt-light_ital-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/clvatt-light_ital-webfont.woff) format("woff"), url(./webfonts/clvatt-light_ital-webfont.ttf) format("truetype"), url(./webfonts/clvatt-light_ital-webfont.svg#clearviewatt_ltitalic) format("svg");
- font-weight: normal;
- font-style: italic;
-}
-@font-face {
- font-family: clearviewatt_ltbold;
- src: url(./webfonts/clvatt-bold-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/clvatt-bold-webfont.woff) format("woff"), url(./webfonts/clvatt-bold-webfont.ttf) format("truetype"), url(./webfonts/clvatt-bold-webfont.svg#clearviewatt_ltbold) format("svg");
- font-weight: bold;
- font-style: normal;
-}
-@font-face {
- font-family: clearviewatt_ltbold_italic;
- src: url(./webfonts/clvatt-bold_ital-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/clvatt-bold_ital-webfont.woff) format("woff"), url(./webfonts/clvatt-bold_ital-webfont.ttf) format("truetype"), url(./webfonts/clvatt-bold_ital-webfont.svg#clearviewatt_ltbold_italic) format("svg");
- font-weight: bold;
- font-style: italic;
-}
-@font-face {
- font-family: omnes_attlight;
- src: url(./webfonts/omnesatt-light-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-light-webfont.woff) format("woff"), url(./webfonts/omnesatt-light-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-light-webfont.svg#omnes_attlight) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: omnes_attlight_italic;
- src: url(./webfonts/omnesatt-lightitalic-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-lightitalic-webfont.woff) format("woff"), url(./webfonts/omnesatt-lightitalic-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-lightitalic-webfont.svg#omnes_attlight_italic) format("svg");
- font-weight: normal;
- font-style: italic;
-}
-@font-face {
- font-family: omnes_attmedium;
- src: url(./webfonts/omnesatt-medium-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-medium-webfont.woff) format("woff"), url(./webfonts/omnesatt-medium-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-medium-webfont.svg#omnes_attmedium) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: omnes_attmedium_italic;
- src: url(./webfonts/omnesatt-mediumitalic-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-mediumitalic-webfont.woff) format("woff"), url(./webfonts/omnesatt-mediumitalic-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-mediumitalic-webfont.svg#omnes_attmedium_italic) format("svg");
- font-weight: normal;
- font-style: italic;
-}
-@font-face {
- font-family: omnes_attregular;
- src: url(./webfonts/omnesatt-regular-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-regular-webfont.woff) format("woff"), url(./webfonts/omnesatt-regular-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-regular-webfont.svg#omnes_att_regularregular) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: omnes_attregular_italic;
- src: url(./webfonts/omnesatt-regularitalic-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-regularitalic-webfont.woff) format("woff"), url(./webfonts/omnesatt-regularitalic-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-regularitalic-webfont.svg#omnes_attregular_italic) format("svg");
- font-weight: normal;
- font-style: italic;
-}
-@font-face {
- font-family: radio_attregular;
- src: url(./webfonts/radioatt-regular-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/radioatt-regular-webfont.woff) format("woff"), url(./webfonts/radioatt-regular-webfont.ttf) format("truetype"), url(./webfonts/radioatt-regular-webfont.svg#radio_attregular) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: atticons;
- src: url(./webfonts/atticons.eot?#iefix) format("embedded-opentype"), url(./webfonts/atticons.woff) format("woff"), url(./webfonts/atticons.ttf) format("truetype"), url(./webfonts/atticons.svg#atticons) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: clearviewatt;
- src: url(./webfonts/clvatt-book-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/clvatt-book-webfont.woff) format("woff"), url(./webfonts/clvatt-book-webfont.ttf) format("truetype"), url(./webfonts/clvatt-book-webfont.svg#clearviewattregular) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: clearviewattregular;
- src: url(./webfonts/clvatt-book-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/clvatt-book-webfont.woff) format("woff"), url(./webfonts/clvatt-book-webfont.ttf) format("truetype"), url(./webfonts/clvatt-book-webfont.svg#clearviewattregular) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: clearviewatt_italic;
- src: url(./webfonts/clvatt-book_ital-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/clvatt-book_ital-webfont.woff) format("woff"), url(./webfonts/clvatt-book_ital-webfont.ttf) format("truetype"), url(./webfonts/clvatt-book_ital-webfont.svg#clearviewattitalic) format("svg");
- font-weight: normal;
- font-style: italic;
-}
-@font-face {
- font-family: clearviewatt_lt;
- src: url(./webfonts/clvatt-light-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/clvatt-light-webfont.woff) format("woff"), url(./webfonts/clvatt-light-webfont.ttf) format("truetype"), url(./webfonts/clvatt-light-webfont.svg#clearviewatt_ltregular) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: clearviewattlight_italic;
- src: url(./webfonts/clvatt-light_ital-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/clvatt-light_ital-webfont.woff) format("woff"), url(./webfonts/clvatt-light_ital-webfont.ttf) format("truetype"), url(./webfonts/clvatt-light_ital-webfont.svg#clearviewatt_ltitalic) format("svg");
- font-weight: normal;
- font-style: italic;
-}
-@font-face {
- font-family: clearviewatt_ltbold;
- src: url(./webfonts/clvatt-bold-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/clvatt-bold-webfont.woff) format("woff"), url(./webfonts/clvatt-bold-webfont.ttf) format("truetype"), url(./webfonts/clvatt-bold-webfont.svg#clearviewatt_ltbold) format("svg");
- font-weight: bold;
- font-style: normal;
-}
-@font-face {
- font-family: clearviewatt_ltbold_italic;
- src: url(./webfonts/clvatt-bold_ital-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/clvatt-bold_ital-webfont.woff) format("woff"), url(./webfonts/clvatt-bold_ital-webfont.ttf) format("truetype"), url(./webfonts/clvatt-bold_ital-webfont.svg#clearviewatt_ltbold_italic) format("svg");
- font-weight: bold;
- font-style: italic;
-}
-@font-face {
- font-family: omnes_attlight;
- src: url(./webfonts/omnesatt-light-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-light-webfont.woff) format("woff"), url(./webfonts/omnesatt-light-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-light-webfont.svg#omnes_attlight) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: omnes_attlight_italic;
- src: url(./webfonts/omnesatt-lightitalic-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-lightitalic-webfont.woff) format("woff"), url(./webfonts/omnesatt-lightitalic-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-lightitalic-webfont.svg#omnes_attlight_italic) format("svg");
- font-weight: normal;
- font-style: italic;
-}
-@font-face {
- font-family: omnes_attmedium;
- src: url(./webfonts/omnesatt-medium-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-medium-webfont.woff) format("woff"), url(./webfonts/omnesatt-medium-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-medium-webfont.svg#omnes_attmedium) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: omnes_attmedium_italic;
- src: url(./webfonts/omnesatt-mediumitalic-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-mediumitalic-webfont.woff) format("woff"), url(./webfonts/omnesatt-mediumitalic-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-mediumitalic-webfont.svg#omnes_attmedium_italic) format("svg");
- font-weight: normal;
- font-style: italic;
-}
-@font-face {
- font-family: omnes_attregular;
- src: url(./webfonts/omnesatt-regular-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-regular-webfont.woff) format("woff"), url(./webfonts/omnesatt-regular-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-regular-webfont.svg#omnes_att_regularregular) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: omnes_attregular_italic;
- src: url(./webfonts/omnesatt-regularitalic-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-regularitalic-webfont.woff) format("woff"), url(./webfonts/omnesatt-regularitalic-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-regularitalic-webfont.svg#omnes_attregular_italic) format("svg");
- font-weight: normal;
- font-style: italic;
-}
-@font-face {
- font-family: radio_attregular;
- src: url(./webfonts/radioatt-regular-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/radioatt-regular-webfont.woff) format("woff"), url(./webfonts/radioatt-regular-webfont.ttf) format("truetype"), url(./webfonts/radioatt-regular-webfont.svg#radio_attregular) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: atticons;
- src: url(./webfonts/atticons.eot?#iefix) format("embedded-opentype"), url(./webfonts/atticons.woff) format("woff"), url(./webfonts/atticons.ttf) format("truetype"), url(./webfonts/atticons.svg#atticons) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-article {
- display: block;
-}
-aside {
- display: block;
-}
-details {
- display: block;
-}
-figcaption {
- display: block;
-}
-figure {
- display: block;
-}
-footer {
- display: block;
-}
-header {
- display: block;
-}
-hgroup {
- display: block;
-}
-nav {
- display: block;
-}
-section {
- display: block;
-}
-summary {
- display: block;
-}
-audio {
- display: inline-block;
-}
-canvas {
- display: inline-block;
-}
-video {
- display: inline-block;
-}
-audio:not([controls]) {
- height: 0px; display: none;
-}
-[hidden] {
- display: none;
-}
-html {
- font-size: 100%; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
-}
-html {
- font-family: sans-serif;
-}
-button {
- font-family: sans-serif;
-}
-input {
- font-family: sans-serif;
-}
-select {
- font-family: sans-serif;
-}
-textarea {
- font-family: sans-serif;
-}
-body {
- margin: 0px;
-}
-a:focus {
- outline: dotted thin;
-}
-a:active {
- outline: 0px;
-}
-a:hover {
- outline: 0px;
-}
-h1 {
- margin: 0.67em 0px; font-size: 2em;
-}
-h2 {
- margin: 0.83em 0px; font-size: 1.5em;
-}
-h3 {
- margin: 1em 0px; font-size: 1.17em;
-}
-h4 {
- margin: 1.33em 0px; font-size: 1em;
-}
-h5 {
- margin: 1.67em 0px; font-size: 0.83em;
-}
-h6 {
- margin: 2.33em 0px; font-size: 0.75em;
-}
-abbr[title] {
- border-bottom-color: currentColor; border-bottom-width: 1px; border-bottom-style: dotted;
-}
-b {
- font-weight: bold;
-}
-strong {
- font-weight: bold;
-}
-blockquote {
- margin: 1em 40px;
-}
-dfn {
- font-style: italic;
-}
-mark {
- background: rgb(255, 255, 0); color: rgb(0, 0, 0);
-}
-p {
- margin: 1em 0px;
-}
-pre {
- margin: 1em 0px;
-}
-code {
- font-family: monospace, serif; font-size: 1em; _font-family: "courier new", monospace;
-}
-kbd {
- font-family: monospace, serif; font-size: 1em; _font-family: "courier new", monospace;
-}
-pre {
- font-family: monospace, serif; font-size: 1em; _font-family: "courier new", monospace;
-}
-samp {
- font-family: monospace, serif; font-size: 1em; _font-family: "courier new", monospace;
-}
-pre {
- white-space: pre-wrap; -ms-word-wrap: break-word;
-}
-q {
- quotes: none;
-}
-q::before {
- content: none;
-}
-q::after {
- content: none;
-}
-small {
- font-size: 80%;
-}
-sub {
- line-height: 0; font-size: 75%; vertical-align: baseline; position: relative;
-}
-sup {
- line-height: 0; font-size: 75%; vertical-align: baseline; position: relative;
-}
-sup {
- top: -0.5em;
-}
-sub {
- bottom: -0.25em;
-}
-dl {
- margin: 1em 0px;
-}
-menu {
- margin: 1em 0px;
-}
-ol {
- margin: 1em 0px;
-}
-ul {
- margin: 1em 0px;
-}
-dd {
- margin: 0px 0px 0px 40px;
-}
-menu {
- padding: 0px 0px 0px 40px;
-}
-ol {
- padding: 0px 0px 0px 40px;
-}
-ul {
- padding: 0px 0px 0px 40px;
-}
-nav ul {
- list-style: none;
-}
-nav ol {
- list-style: none;
-}
-img {
- border: 0px currentColor; -ms-interpolation-mode: bicubic;
-}
-svg:not(:root) {
- overflow: hidden;
-}
-figure {
- margin: 0px;
-}
-form {
- margin: 0px;
-}
-fieldset {
- margin: 0px 2px; padding: 0.35em 0.62em 0.75em; border: 1px solid rgb(192, 192, 192);
-}
-legend {
- padding: 0px; border: 0px currentColor; white-space: normal;
-}
-button {
- margin: 0px; font-size: 100%; vertical-align: baseline;
-}
-input {
- margin: 0px; font-size: 100%; vertical-align: baseline;
-}
-select {
- margin: 0px; font-size: 100%; vertical-align: baseline;
-}
-textarea {
- margin: 0px; font-size: 100%; vertical-align: baseline;
-}
-button {
- line-height: normal;
-}
-input {
- line-height: normal;
-}
-button {
- cursor: pointer; -webkit-appearance: button;
-}
-html input[type='button'] {
- cursor: pointer; -webkit-appearance: button;
-}
-input[type='reset'] {
- cursor: pointer; -webkit-appearance: button;
-}
-input[type='submit'] {
- cursor: pointer; -webkit-appearance: button;
-}
-button[disabled] {
- cursor: default;
-}
-input[disabled] {
- cursor: default;
-}
-input[type='checkbox'] {
- padding: 0px; box-sizing: border-box;
-}
-input[type='radio'] {
- padding: 0px; box-sizing: border-box;
-}
-input[type='search'] {
- box-sizing: content-box; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; -webkit-appearance: textfield;
-}
-textarea {
- overflow: auto; vertical-align: top;
-}
-table {
- border-collapse: collapse; border-spacing: 0;
-}
-.bui-m-all-5 {
- margin: 5px;
-}
-.bui-m-all-10 {
- margin: 10px;
-}
-.bui-m-all-15 {
- margin: 15px;
-}
-.bui-m-all-20 {
- margin: 20px;
-}
-.bui-m-all-25 {
- margin: 25px;
-}
-.bui-m-all-30 {
- margin: 30px;
-}
-.bui-m-all-35 {
- margin: 35px;
-}
-.bui-m-all-40 {
- margin: 40px;
-}
-.bui-m-all-45 {
- margin: 5px;
-}
-.bui-m-all-50 {
- margin: 50px;
-}
-.bui-m-all-55 {
- margin: 55px;
-}
-.bui-m-all-60 {
- margin: 60px;
-}
-.bui-m-all-65 {
- margin: 65px;
-}
-.bui-m-all-70 {
- margin: 70px;
-}
-.bui-m-all-75 {
- margin: 75px;
-}
-.bui-m-all-80 {
- margin: 80px;
-}
-.bui-m-all-85 {
- margin: 85px;
-}
-.bui-m-all-90 {
- margin: 90px;
-}
-.bui-m-all-95 {
- margin: 95px;
-}
-.bui-m-all-100 {
- margin: 100px;
-}
-.bui-m-tb-5 {
- margin-top: 5px; margin-bottom: 5px;
-}
-.bui-m-tb-10 {
- margin-top: 10px; margin-bottom: 10px;
-}
-.bui-m-tb-15 {
- margin-top: 15px; margin-bottom: 15px;
-}
-.bui-m-tb-20 {
- margin-top: 20px; margin-bottom: 20px;
-}
-.bui-m-tb-25 {
- margin-top: 25px; margin-bottom: 25px;
-}
-.bui-m-tb-30 {
- margin-top: 30px; margin-bottom: 30px;
-}
-.bui-m-tb-35 {
- margin-top: 35px; margin-bottom: 35px;
-}
-.bui-m-tb-40 {
- margin-top: 40px; margin-bottom: 40px;
-}
-.bui-m-tb-45 {
- margin-top: 45px; margin-bottom: 45px;
-}
-.bui-m-tb-50 {
- margin-top: 50px; margin-bottom: 50px;
-}
-.bui-m-tb-55 {
- margin-top: 55px; margin-bottom: 55px;
-}
-.bui-m-tb-60 {
- margin-top: 60px; margin-bottom: 60px;
-}
-.bui-m-tb-65 {
- margin-top: 65px; margin-bottom: 65px;
-}
-.bui-m-tb-70 {
- margin-top: 70px; margin-bottom: 70px;
-}
-.bui-m-tb-75 {
- margin-top: 75px; margin-bottom: 75px;
-}
-.bui-m-tb-80 {
- margin-top: 80px; margin-bottom: 80px;
-}
-.bui-m-tb-85 {
- margin-top: 85px; margin-bottom: 85px;
-}
-.bui-m-tb-90 {
- margin-top: 90px; margin-bottom: 90px;
-}
-.bui-m-tb-95 {
- margin-top: 95px; margin-bottom: 95px;
-}
-.bui-m-tb-100 {
- margin-top: 100px; margin-bottom: 100px;
-}
-.bui-m-lr-5 {
- margin-right: 5px; margin-left: 5px;
-}
-.bui-m-lr-10 {
- margin-right: 10px; margin-left: 10px;
-}
-.bui-m-lr-15 {
- margin-right: 15px; margin-left: 15px;
-}
-.bui-m-lr-20 {
- margin-right: 20px; margin-left: 20px;
-}
-.bui-m-lr-25 {
- margin-right: 25px; margin-left: 25px;
-}
-.bui-m-lr-30 {
- margin-right: 30px; margin-left: 30px;
-}
-.bui-m-lr-35 {
- margin-right: 35px; margin-left: 35px;
-}
-.bui-m-lr-40 {
- margin-right: 40px; margin-left: 40px;
-}
-.bui-m-lr-45 {
- margin-right: 45px; margin-left: 45px;
-}
-.bui-m-lr-50 {
- margin-right: 50px; margin-left: 50px;
-}
-.bui-m-lr-55 {
- margin-right: 55px; margin-left: 55px;
-}
-.bui-m-lr-60 {
- margin-right: 60px; margin-left: 60px;
-}
-.bui-m-lr-65 {
- margin-right: 65px; margin-left: 65px;
-}
-.bui-m-lr-70 {
- margin-right: 70px; margin-left: 70px;
-}
-.bui-m-lr-75 {
- margin-right: 75px; margin-left: 75px;
-}
-.bui-m-lr-80 {
- margin-right: 80px; margin-left: 80px;
-}
-.bui-m-lr-85 {
- margin-right: 85px; margin-left: 85px;
-}
-.bui-m-lr-90 {
- margin-right: 90px; margin-left: 90px;
-}
-.bui-m-lr-95 {
- margin-right: 95px; margin-left: 95px;
-}
-.bui-m-lr-100 {
- margin-right: 100px; margin-left: 100px;
-}
-.bui-m-t-5 {
- margin-top: 5px;
-}
-.bui-m-t-10 {
- margin-top: 10px;
-}
-.bui-m-t-15 {
- margin-top: 15px;
-}
-.bui-m-t-20 {
- margin-top: 20px;
-}
-.bui-m-t-25 {
- margin-top: 25px;
-}
-.bui-m-t-30 {
- margin-top: 30px;
-}
-.bui-m-t-35 {
- margin-top: 35px;
-}
-.bui-m-t-40 {
- margin-top: 40px;
-}
-.bui-m-t-45 {
- margin-top: 45px;
-}
-.bui-m-t-50 {
- margin-top: 50px;
-}
-.bui-m-t-55 {
- margin-top: 55px;
-}
-.bui-m-t-60 {
- margin-top: 60px;
-}
-.bui-m-t-65 {
- margin-top: 65px;
-}
-.bui-m-t-70 {
- margin-top: 70px;
-}
-.bui-m-t-75 {
- margin-top: 75px;
-}
-.bui-m-t-80 {
- margin-top: 80px;
-}
-.bui-m-t-85 {
- margin-top: 85px;
-}
-.bui-m-t-90 {
- margin-top: 90px;
-}
-.bui-m-t-95 {
- margin-top: 95px;
-}
-.bui-m-t-100 {
- margin-top: 100px;
-}
-.bui-m-t-105 {
- margin-top: 105px;
-}
-.bui-m-t-130 {
- margin-top: 130px;
-}
-.bui-m-b-5 {
- margin-bottom: 5px;
-}
-.bui-m-b-10 {
- margin-bottom: 10px;
-}
-.bui-m-b-15 {
- margin-bottom: 15px;
-}
-.bui-m-b-20 {
- margin-bottom: 20px;
-}
-.bui-m-b-25 {
- margin-bottom: 25px;
-}
-.bui-m-b-30 {
- margin-bottom: 30px;
-}
-.bui-m-b-35 {
- margin-bottom: 35px;
-}
-.bui-m-b-40 {
- margin-bottom: 40px;
-}
-.bui-m-b-45 {
- margin-bottom: 45px;
-}
-.bui-m-b-50 {
- margin-bottom: 50px;
-}
-.bui-m-b-55 {
- margin-bottom: 55px;
-}
-.bui-m-b-60 {
- margin-bottom: 60px;
-}
-.bui-m-b-65 {
- margin-bottom: 65px;
-}
-.bui-m-b-70 {
- margin-bottom: 70px;
-}
-.bui-m-b-75 {
- margin-bottom: 75px;
-}
-.bui-m-b-80 {
- margin-bottom: 80px;
-}
-.bui-m-b-85 {
- margin-bottom: 85px;
-}
-.bui-m-b-90 {
- margin-bottom: 90px;
-}
-.bui-m-b-95 {
- margin-bottom: 95px;
-}
-.bui-m-b-100 {
- margin-bottom: 100px;
-}
-.bui-m-l-5 {
- margin-left: 5px;
-}
-.bui-m-l-10 {
- margin-left: 10px;
-}
-.bui-m-l-15 {
- margin-left: 15px;
-}
-.bui-m-l-20 {
- margin-left: 20px;
-}
-.bui-m-l-25 {
- margin-left: 25px;
-}
-.bui-m-l-30 {
- margin-left: 30px;
-}
-.bui-m-l-35 {
- margin-left: 35px;
-}
-.bui-m-l-40 {
- margin-left: 40px;
-}
-.bui-m-l-45 {
- margin-left: 45px;
-}
-.bui-m-l-50 {
- margin-left: 50px;
-}
-.bui-m-l-55 {
- margin-left: 55px;
-}
-.bui-m-l-60 {
- margin-left: 60px;
-}
-.bui-m-l-65 {
- margin-left: 65px;
-}
-.bui-m-l-70 {
- margin-left: 70px;
-}
-.bui-m-l-75 {
- margin-left: 75px;
-}
-.bui-m-l-80 {
- margin-left: 80px;
-}
-.bui-m-l-85 {
- margin-left: 85px;
-}
-.bui-m-l-90 {
- margin-left: 90px;
-}
-.bui-m-l-95 {
- margin-left: 95px;
-}
-.bui-m-l-100 {
- margin-left: 100px;
-}
-.bui-m-r-5 {
- margin-right: 5px;
-}
-.bui-m-r-10 {
- margin-right: 10px;
-}
-.bui-m-r-15 {
- margin-right: 15px;
-}
-.bui-m-r-20 {
- margin-right: 20px;
-}
-.bui-m-r-25 {
- margin-right: 25px;
-}
-.bui-m-r-30 {
- margin-right: 30px;
-}
-.bui-m-r-35 {
- margin-right: 35px;
-}
-.bui-m-r-40 {
- margin-right: 40px;
-}
-.bui-m-r-45 {
- margin-right: 45px;
-}
-.bui-m-r-50 {
- margin-right: 50px;
-}
-.bui-m-r-55 {
- margin-right: 55px;
-}
-.bui-m-r-60 {
- margin-right: 60px;
-}
-.bui-m-r-65 {
- margin-right: 65px;
-}
-.bui-m-r-70 {
- margin-right: 70px;
-}
-.bui-m-r-75 {
- margin-right: 75px;
-}
-.bui-m-r-80 {
- margin-right: 80px;
-}
-.bui-m-r-85 {
- margin-right: 85px;
-}
-.bui-m-r-90 {
- margin-right: 90px;
-}
-.bui-m-r-95 {
- margin-right: 95px;
-}
-.bui-m-r-100 {
- margin-right: 100px;
-}
-.bui-p-all-5 {
- padding: 5px;
-}
-.bui-p-all-10 {
- padding: 10px;
-}
-.bui-p-all-15 {
- padding: 15px;
-}
-.bui-p-all-20 {
- padding: 20px;
-}
-.bui-p-all-25 {
- padding: 25px;
-}
-.bui-p-all-30 {
- padding: 30px;
-}
-.bui-p-all-35 {
- padding: 35px;
-}
-.bui-p-all-40 {
- padding: 40px;
-}
-.bui-p-all-45 {
- padding: 45px;
-}
-.bui-p-all-50 {
- padding: 50px;
-}
-.bui-p-all-55 {
- padding: 55px;
-}
-.bui-p-all-60 {
- padding: 60px;
-}
-.bui-p-all-65 {
- padding: 65px;
-}
-.bui-p-all-70 {
- padding: 70px;
-}
-.bui-p-all-75 {
- padding: 75px;
-}
-.bui-p-all-80 {
- padding: 80px;
-}
-.bui-p-all-85 {
- padding: 85px;
-}
-.bui-p-all-90 {
- padding: 90px;
-}
-.bui-p-all-95 {
- padding: 95px;
-}
-.bui-p-all-100 {
- padding: 100px;
-}
-.bui-p-tb-5 {
- padding-top: 5px; padding-bottom: 5px;
-}
-.bui-p-tb-10 {
- padding-top: 10px; padding-bottom: 10px;
-}
-.bui-p-tb-15 {
- padding-top: 15px; padding-bottom: 15px;
-}
-.bui-p-tb-20 {
- padding-top: 20px; padding-bottom: 20px;
-}
-.bui-p-tb-25 {
- padding-top: 25px; padding-bottom: 25px;
-}
-.bui-p-tb-30 {
- padding-top: 30px; padding-bottom: 30px;
-}
-.bui-p-tb-35 {
- padding-top: 35px; padding-bottom: 35px;
-}
-.bui-p-tb-40 {
- padding-top: 40px; padding-bottom: 40px;
-}
-.bui-p-tb-45 {
- padding-top: 45px; padding-bottom: 45px;
-}
-.bui-p-tb-50 {
- padding-top: 50px; padding-bottom: 50px;
-}
-.bui-p-tb-55 {
- padding-top: 55px; padding-bottom: 55px;
-}
-.bui-p-tb-60 {
- padding-top: 60px; padding-bottom: 60px;
-}
-.bui-p-tb-65 {
- padding-top: 65px; padding-bottom: 65px;
-}
-.bui-p-tb-70 {
- padding-top: 70px; padding-bottom: 70px;
-}
-.bui-p-tb-75 {
- padding-top: 75px; padding-bottom: 75px;
-}
-.bui-p-tb-80 {
- padding-top: 80px; padding-bottom: 80px;
-}
-.bui-p-tb-85 {
- padding-top: 85px; padding-bottom: 85px;
-}
-.bui-p-tb-90 {
- padding-top: 90px; padding-bottom: 90px;
-}
-.bui-p-tb-95 {
- padding-top: 95px; padding-bottom: 95px;
-}
-.bui-p-tb-100 {
- padding-top: 100px; padding-bottom: 100px;
-}
-.bui-p-lr-5 {
- padding-right: 5px; padding-left: 5px;
-}
-.bui-p-lr-10 {
- padding-right: 10px; padding-left: 10px;
-}
-.bui-p-lr-15 {
- padding-right: 15px; padding-left: 15px;
-}
-.bui-p-lr-20 {
- padding-right: 20px; padding-left: 20px;
-}
-.bui-p-lr-25 {
- padding-right: 25px; padding-left: 25px;
-}
-.bui-p-lr-30 {
- padding-right: 30px; padding-left: 30px;
-}
-.bui-p-lr-35 {
- padding-right: 35px; padding-left: 35px;
-}
-.bui-p-lr-40 {
- padding-right: 40px; padding-left: 40px;
-}
-.bui-p-lr-45 {
- padding-right: 45px; padding-left: 45px;
-}
-.bui-p-lr-50 {
- padding-right: 50px; padding-left: 50px;
-}
-.bui-p-lr-55 {
- padding-right: 55px; padding-left: 55px;
-}
-.bui-p-lr-60 {
- padding-right: 60px; padding-left: 60px;
-}
-.bui-p-lr-65 {
- padding-right: 65px; padding-left: 65px;
-}
-.bui-p-lr-70 {
- padding-right: 70px; padding-left: 70px;
-}
-.bui-p-lr-75 {
- padding-right: 75px; padding-left: 75px;
-}
-.bui-p-lr-80 {
- padding-right: 80px; padding-left: 80px;
-}
-.bui-p-lr-85 {
- padding-right: 85px; padding-left: 85px;
-}
-.bui-p-lr-90 {
- padding-right: 90px; padding-left: 90px;
-}
-.bui-p-lr-95 {
- padding-right: 95px; padding-left: 95px;
-}
-.bui-p-lr-100 {
- padding-right: 100px; padding-left: 100px;
-}
-.bui-p-t-5 {
- padding-top: 5px;
-}
-.bui-p-t-10 {
- padding-top: 10px;
-}
-.bui-p-t-15 {
- padding-top: 15px;
-}
-.bui-p-t-20 {
- padding-top: 20px;
-}
-.bui-p-t-25 {
- padding-top: 25px;
-}
-.bui-p-t-30 {
- padding-top: 30px;
-}
-.bui-p-t-35 {
- padding-top: 35px;
-}
-.bui-p-t-40 {
- padding-top: 40px;
-}
-.bui-p-t-45 {
- padding-top: 45px;
-}
-.bui-p-t-50 {
- padding-top: 50px;
-}
-.bui-p-t-55 {
- padding-top: 55px;
-}
-.bui-p-t-60 {
- padding-top: 60px;
-}
-.bui-p-t-65 {
- padding-top: 65px;
-}
-.bui-p-t-70 {
- padding-top: 70px;
-}
-.bui-p-t-75 {
- padding-top: 75px;
-}
-.bui-p-t-80 {
- padding-top: 80px;
-}
-.bui-p-t-85 {
- padding-top: 85px;
-}
-.bui-p-t-90 {
- padding-top: 90px;
-}
-.bui-p-t-95 {
- padding-top: 95px;
-}
-.bui-p-t-100 {
- padding-top: 100px;
-}
-.bui-p-b-5 {
- padding-bottom: 5px;
-}
-.bui-p-b-10 {
- padding-bottom: 10px;
-}
-.bui-p-b-11 {
- padding-bottom: 11px;
-}
-.bui-p-b-12 {
- padding-bottom: 12px;
-}
-.bui-p-b-13 {
- padding-bottom: 13px;
-}
-.bui-p-b-14 {
- padding-bottom: 14px;
-}
-.bui-p-b-15 {
- padding-bottom: 15px;
-}
-.bui-p-b-20 {
- padding-bottom: 20px;
-}
-.bui-p-b-25 {
- padding-bottom: 25px;
-}
-.bui-p-b-30 {
- padding-bottom: 30px;
-}
-.bui-p-b-35 {
- padding-bottom: 35px;
-}
-.bui-p-b-40 {
- padding-bottom: 40px;
-}
-.bui-p-b-45 {
- padding-bottom: 45px;
-}
-.bui-p-b-50 {
- padding-bottom: 50px;
-}
-.bui-p-b-55 {
- padding-bottom: 55px;
-}
-.bui-p-b-60 {
- padding-bottom: 60px;
-}
-.bui-p-b-65 {
- padding-bottom: 65px;
-}
-.bui-p-b-70 {
- padding-bottom: 70px;
-}
-.bui-p-b-75 {
- padding-bottom: 75px;
-}
-.bui-p-b-80 {
- padding-bottom: 80px;
-}
-.bui-p-b-85 {
- padding-bottom: 85px;
-}
-.bui-p-b-90 {
- padding-bottom: 90px;
-}
-.bui-p-b-95 {
- padding-bottom: 95px;
-}
-.bui-p-b-100 {
- padding-bottom: 100px;
-}
-.bui-p-l-5 {
- padding-left: 5px;
-}
-.bui-p-l-10 {
- padding-left: 10px;
-}
-.bui-p-l-15 {
- padding-left: 15px;
-}
-.bui-p-l-20 {
- padding-left: 20px;
-}
-.bui-p-l-25 {
- padding-left: 25px;
-}
-.bui-p-l-30 {
- padding-left: 30px;
-}
-.bui-p-l-35 {
- padding-left: 35px;
-}
-.bui-p-l-40 {
- padding-left: 40px;
-}
-.bui-p-l-45 {
- padding-left: 45px;
-}
-.bui-p-l-50 {
- padding-left: 50px;
-}
-.bui-p-l-55 {
- padding-left: 55px;
-}
-.bui-p-l-60 {
- padding-left: 60px;
-}
-.bui-p-l-65 {
- padding-left: 65px;
-}
-.bui-p-l-70 {
- padding-left: 70px;
-}
-.bui-p-l-75 {
- padding-left: 75px;
-}
-.bui-p-l-80 {
- padding-left: 80px;
-}
-.bui-p-l-85 {
- padding-left: 85px;
-}
-.bui-p-l-90 {
- padding-left: 90px;
-}
-.bui-p-l-95 {
- padding-left: 95px;
-}
-.bui-p-l-100 {
- padding-left: 100px;
-}
-.bui-p-r-5 {
- padding-right: 5px;
-}
-.bui-p-r-10 {
- padding-right: 10px;
-}
-.bui-p-r-15 {
- padding-right: 15px;
-}
-.bui-p-r-20 {
- padding-right: 20px;
-}
-.bui-p-r-25 {
- padding-right: 25px;
-}
-.bui-p-r-30 {
- padding-right: 30px;
-}
-.bui-p-r-35 {
- padding-right: 35px;
-}
-.bui-p-r-40 {
- padding-right: 40px;
-}
-.bui-p-r-45 {
- padding-right: 45px;
-}
-.bui-p-r-50 {
- padding-right: 50px;
-}
-.bui-p-r-55 {
- padding-right: 55px;
-}
-.bui-p-r-60 {
- padding-right: 60px;
-}
-.bui-p-r-65 {
- padding-right: 65px;
-}
-.bui-p-r-70 {
- padding-right: 70px;
-}
-.bui-p-r-75 {
- padding-right: 75px;
-}
-.bui-p-r-80 {
- padding-right: 80px;
-}
-.bui-p-r-85 {
- padding-right: 85px;
-}
-.bui-p-r-90 {
- padding-right: 90px;
-}
-.bui-p-r-95 {
- padding-right: 95px;
-}
-.bui-p-r-100 {
- padding-right: 100px;
-}
-.bui-w-5-percent {
- width: 5% !important;
-}
-.bui-w-10-percent {
- width: 10% !important;
-}
-.bui-w-11-percent {
- width: 11% !important;
-}
-.bui-w-12-percent {
- width: 12% !important;
-}
-.bui-w-13-percent {
- width: 13% !important;
-}
-.bui-w-14-percent {
- width: 14% !important;
-}
-.bui-w-15-percent {
- width: 15% !important;
-}
-.bui-w-20-percent {
- width: 20% !important;
-}
-.bui-w-21-percent {
- width: 21% !important;
-}
-.bui-w-22-percent {
- width: 22% !important;
-}
-.bui-w-23-percent {
- width: 23% !important;
-}
-.bui-w-24-percent {
- width: 24% !important;
-}
-.bui-w-25-percent {
- width: 25% !important;
-}
-.bui-w-30-percent {
- width: 30% !important;
-}
-.bui-w-31-percent {
- width: 31% !important;
-}
-.bui-w-32-percent {
- width: 32% !important;
-}
-.bui-w-33-percent {
- width: 33% !important;
-}
-.bui-w-34-percent {
- width: 34% !important;
-}
-.bui-w-35-percent {
- width: 35% !important;
-}
-.bui-w-40-percent {
- width: 40% !important;
-}
-.bui-w-45-percent {
- width: 45% !important;
-}
-.bui-w-50-percent {
- width: 50% !important;
-}
-.bui-w-51-percent {
- width: 51% !important;
-}
-.bui-w-52-percent {
- width: 52% !important;
-}
-.bui-w-53-percent {
- width: 53% !important;
-}
-.bui-w-54-percent {
- width: 54% !important;
-}
-.bui-w-55-percent {
- width: 55% !important;
-}
-.bui-w-56-percent {
- width: 56% !important;
-}
-.bui-w-57-percent {
- width: 57% !important;
-}
-.bui-w-58-percent {
- width: 58% !important;
-}
-.bui-w-59-percent {
- width: 59% !important;
-}
-.bui-w-60-percent {
- width: 60% !important;
-}
-.bui-w-65-percent {
- width: 65% !important;
-}
-.bui-w-70-percent {
- width: 70% !important;
-}
-.bui-w-75-percent {
- width: 75% !important;
-}
-.bui-w-80-percent {
- width: 80% !important;
-}
-.bui-w-85-percent {
- width: 85% !important;
-}
-.bui-w-90-percent {
- width: 90% !important;
-}
-.bui-w-95-percent {
- width: 95% !important;
-}
-.bui-w-100-percent {
- width: 100% !important;
-}
-.bui-table {
- display: table;
-}
-.bui-table-row {
- display: table-row;
-}
-.bui-table-cell {
- display: table-cell;
-}
-.bui-table-column {
- display: table-column;
-}
-.bui-table-colgroup {
-
-}
-.bui-table-hdr-grp {
- display: table-header-group;
-}
-.bui-table-row-grp {
- display: table-row-group;
-}
-.bui-table-footer-grp {
- display: table-footer-group;
-}
-.bui-table-caption {
- display: table-caption;
-}
-.bui-icon-sprite-18 {
- width: 18px; height: 18px; vertical-align: middle; display: inline-block; background-image: url("../images/icons-18-spritesheet-and-hover.png");
-}
-.bui-icon-plus {
-
-}
-.bui-icon-plus-hover {
- background-position: 0px -18px;
-}
-.bui-icon-minus {
- background-position: -36px 0px;
-}
-.bui-icon-minus-hover {
- background-position: -36px -18px;
-}
-.bui-icon-delete {
- background-position: -72px 0px;
-}
-.bui-icon-delete-hover {
- background-position: -72px -18px;
-}
-.bui-icon-arrow-r {
- background-position: -108px 0px;
-}
-.bui-icon-arrow-r-hover {
- background-position: -108px -18px;
-}
-.bui-icon-arrow-l {
- background-position: -144px 0px;
-}
-.bui-icon-arrow-l-hover {
- background-position: -144px -18px;
-}
-.bui-icon-arrow-u {
- background-position: -180px 0px;
-}
-.bui-icon-arrow-u-hover {
- background-position: -180px -18px;
-}
-.bui-icon-arrow-d {
- background-position: -216px 0px;
-}
-.bui-icon-arrow-d-hover {
- background-position: -216px -18px;
-}
-.bui-icon-check {
- background-position: -252px 0px;
-}
-.bui-icon-check-hover {
- background-position: -252px -18px;
-}
-.bui-icon-gear {
- background-position: -288px 0px;
-}
-.bui-icon-gear-hover {
- background-position: -288px -18px;
-}
-.bui-icon-refresh {
- background-position: -324px 0px;
-}
-.bui-icon-refresh-hover {
- background-position: -324px -18px;
-}
-.bui-icon-forward {
- background-position: -360px 0px;
-}
-.bui-icon-forward-hover {
- background-position: -360px -18px;
-}
-.bui-icon-back {
- background-position: -396px 0px;
-}
-.bui-icon-back-hover {
- background-position: -396px -18px;
-}
-.bui-icon-grid {
- background-position: -432px 0px;
-}
-.bui-icon-grid-hover {
- background-position: -432px -18px;
-}
-.bui-icon-star {
- background-position: -468px 0px;
-}
-.bui-icon-star-hover {
- background-position: -468px -18px;
-}
-.bui-icon-alert {
- background-position: -504px 0px;
-}
-.bui-icon-alert {
- background-position: -504px -18px;
-}
-.bui-icon-info {
- background-position: -540px 0px;
-}
-.bui-icon-info-hover {
- background-position: -540px -18px;
-}
-.bui-icon-home {
- background-position: -576px 0px;
-}
-.bui-icon-home-hover {
- background-position: -576px -18px;
-}
-.bui-icon-search {
- background-position: -612px 0px;
-}
-.bui-icon-searchfield::after {
- background-position: -612px 0px;
-}
-.bui-icon-search-hover {
- background-position: -612px -18px;
-}
-.bui-icon-searchfield::after {
- background-position: -612px -18px;
-}
-.bui-icon-checkbox-off {
- background-position: -684px 0px;
-}
-.bui-icon-checkbox-off-hover {
- background-position: -684px -18px;
-}
-.bui-icon-checkbox-on {
- background-position: -648px 0px;
-}
-.bui-icon-checkbox-on-hover {
- background-position: -648px -18px;
-}
-.bui-icon-radio-off {
- background-position: -756px 0px;
-}
-.bui-icon-radio-off-hover {
- background-position: -756px -18px;
-}
-.bui-icon-radio-on {
- background-position: -720px 0px;
-}
-.bui-icon-radio-on-hover {
- background-position: -720px -18px;
-}
-.bui-icon-activity {
- background-position: -792px 0px;
-}
-.bui-icon-activity-hover {
- background-position: -792px -18px;
-}
-.bui-icon-notification {
- background-position: -828px 0px;
-}
-.bui-icon-notification-hover {
- background-position: -828px -18px;
-}
-.bui-icon-order {
- background-position: -859px 0px;
-}
-.bui-icon-order-hover {
- background-position: -859px -18px;
-}
-.bui-icon-sprite-25 {
- width: 25px; height: 25px; vertical-align: middle; display: inline-block; background-image: url("../images/icons_spritesheet_25.png");
-}
-.bui-icon-arrow-up-green {
-
-}
-.bui-icon-question-yellow {
- background-position: -26px 0px;
-}
-.bui-icon-exclaimation-pink {
- background-position: -52px 0px;
-}
-.bui-icon-bullet-point {
- background-position: -78px 0px;
-}
-.bui-icon-ok-status {
- background-position: -104px 0px;
-}
-.bui-icon-circle {
- background-position: -130px 0px;
-}
-.bui-icon-circle-hover {
- background-position: -130px -26px;
-}
-.bui-icon-number {
- background-position: -156px 0px;
-}
-.bui-icon-number-hover {
- background-position: -156px -26px;
-}
-.bui-icon-ticket {
- background-position: -182px 0px;
-}
-.bui-icon-ticket-hover {
- background-position: -182px -26px;
-}
-.bui-icon-maintenance {
- background-position: -208px 0px;
-}
-.bui-icon-maintenance-hover {
- background-position: -208px -26px;
-}
-.bui-icon-outage {
- background-position: -234px 0px;
-}
-.bui-icon-outage-hover {
- background-position: -234px -26px;
-}
-.bui-icon-profile {
- background-position: -260px 0px;
-}
-.bui-icon-profile-hover {
- background-position: -260px -26px;
-}
-.bui-icon-ticket-green {
- background-position: -286px 0px;
-}
-.bui-icon-maintenance-green {
- background-position: -312px 0px;
-}
-.bui-icon-outage-red {
- background-position: -338px 0px;
-}
-.bui-icon-solid-arrow-down {
- background-position: -650px 0px;
-}
-.bui-icon-solid-arrow-up {
- background-position: -650px -26px;
-}
-.bui-icon-sprite-db-menu {
- width: 35px; height: 35px; vertical-align: middle; display: inline-block; background-image: url("../images/sprite_dashboard_2nd_nav_35x35.png");
-}
-.bui-icon-dashboard {
-
-}
-.bui-icon-service {
- background-position: -36px 0px;
-}
-.bui-icon-account {
- background-position: -72px 0px;
-}
-.bui-icon-billing {
- background-position: -108px 0px;
-}
-.bui-icon-b-tool {
- background-position: -144px 0px;
-}
-.bui-icon-help {
- background-position: -180px 0px;
-}
-.bui-icon-sprite-overview {
- width: 14px; height: 14px; vertical-align: middle; display: inline-block; background-image: url("../images/sprite_dashboard_overview_widget_14x14.png");
-}
-.bui-icon-alarm-critical {
-
-}
-.bui-icon-alarm-congestion {
- background-position: -15px 0px;
-}
-.bui-icon-alarm-ack {
- background-position: -30px 0px;
-}
-.bui-icon-alarm-clear {
- background-position: -45px 0px;
-}
-.bui-icon-ticket-normal {
- background-position: -60px 0px;
-}
-.bui-icon-ticket-clear {
- background-position: -75px 0px;
-}
-.bui-icon-sprite-wireless {
- width: 30px; height: 30px; vertical-align: middle; display: inline-block; background-image: url("../images/sprite_dashboard_wireless_widget_30x30.png");
-}
-.bui-icon-wireless-upgrade {
-
-}
-.bui-icon-wireless-overage {
- background-position: -31px 0px;
-}
-.bui-icon-wireless-request {
- background-position: -62px 0px;
-}
-.bui-icon-sprite-social-media {
- width: 17px; height: 17px; vertical-align: middle; display: inline-block; background-image: url("../images/sprite_social_icons_17x17.png");
-}
-.bui-icon-sm-fb {
-
-}
-.bui-icon-sm-twitter {
- background-position: -18px 0px;
-}
-.bui-icon-sm-linkedin {
- background-position: -36px 0px;
-}
-.bui-icon-sm-rss {
- background-position: -54px 0px;
-}
-.bui-icon-sm-share {
- background-position: -72px 0px;
-}
-.bui-icon-sm-netvibe {
- background-position: -90px 0px;
-}
-.bui-icon-sprite-top-nav {
- width: 27px; height: 27px; vertical-align: middle; display: inline-block; background-image: url("../images/sprite_topnav_icons_27x27.png");
-}
-.bui-icon-top-chat {
-
-}
-.bui-icon-top-email {
- background-position: -28px 0px;
-}
-.bui-icon-top-cart {
- background-position: -56px 0px;
-}
-.bui-icon-top-account {
- background-position: -84px 0px;
-}
-.bui-icon-sprite-network {
- width: 19px; height: 19px; vertical-align: middle; display: inline-block; background-image: url("../images/sprites_network_icons_19x19.png");
-}
-.bui-icon-network-fullscreen {
-
-}
-.bui-icon-network-mapview {
- background-position: -20px 0px;
-}
-.bui-icon-network-tabview {
- background-position: -40px 0px;
-}
-.bui-icon-network-listview {
- background-position: -60px 0px;
-}
-.bui-icon-sprite-af-type {
- width: 18px; height: 18px; vertical-align: middle; display: inline-block; background-image: url("../images/sprites_activity_feed_type_icons_18x18.png");
-}
-.bui-icon-af-type-order {
-
-}
-.bui-icon-af-type-notification {
- background-position: -19px 0px;
-}
-.bui-icon-af-type-maintenance {
- background-position: -38px 0px;
-}
-.bui-icon-af-type-account {
- background-position: -57px 0px;
-}
-.bui-icon-sprite-activity-status {
- width: 31px; height: 31px; vertical-align: middle; display: inline-block; background-image: url("../images/sprites_activity_status_icons_31x31.png");
-}
-.bui-icon-activity-status-all {
-
-}
-.bui-icon-activity-status-alarm {
- background-position: -32px 0px;
-}
-.bui-icon-activity-status-order {
- background-position: -64px 0px;
-}
-.bui-icon-activity-status-maintenance {
- background-position: -96px 0px;
-}
-.bui-icon-activity-status-account {
- background-position: -128px 0px;
-}
-.bui-icon-activity-status-notification {
- background-position: -160px 0px;
-}
-.bui-icon-sprite-20 {
- width: 20px; height: 20px; vertical-align: middle; display: inline-block; background-image: url("../images/sprite_20px.png");
-}
-.bui-icon-arrow-d {
-
-}
-.bui-icon-arrow-u {
- background-position: -21px 0px;
-}
-.bui-icon-arrow-r {
- background-position: -42px 0px;
-}
-.bui-icon-social-f {
- background-position: -63px 0px;
-}
-.bui-icon-social-t {
- background-position: -84px 0px;
-}
-.bui-icon-social-in {
- background-position: -105px 0px;
-}
-.bui-icon-social-in {
- background-position: -126px 0px;
-}
-.bui-icon-social-rss {
- background-position: -147px 0px;
-}
-.bui-icon-social-share {
- background-position: -168px 0px;
-}
-.bui-icon-social-netvibe {
- background-position: -189px 0px;
-}
-.bui-icon-af-order {
- background-position: -210px 0px;
-}
-.bui-icon-af-notification {
- background-position: -231px 0px;
-}
-.bui-icon-af-maintenance {
- background-position: -252px 0px;
-}
-.bui-icon-af-account {
- background-position: -273px 0px;
-}
-.bui-icon-view-full-screen {
- background-position: -294px 0px;
-}
-.bui-icon-view-map {
- background-position: -315px 0px;
-}
-.bui-icon-view-tab {
- background-position: -336px 0px;
-}
-.bui-icon-view-list {
- background-position: -357px 0px;
-}
-.bui-icon-view-list-detail {
- background-position: -378px 0px;
-}
-.bui-icon-sprite-50 {
- width: 50px; height: 50px; vertical-align: middle; display: inline-block; background-image: url("../images/sprite_db_sub_menu_50x50.png");
-}
-.bui-icon-db-home {
-
-}
-.bui-icon-db-home-hover {
- background-position: 0px -51px;
-}
-.bui-icon-db-mobility {
- background-position: -51px 0px;
-}
-.bui-icon-db-mobility-hover {
- background-position: -51px -51px;
-}
-.bui-icon-db-ebilling {
- background-position: -102px 0px;
-}
-.bui-icon-db-ebilling-hover {
- background-position: -102px -51px;
-}
-.bui-icon-db-network {
- background-position: -153px 0px;
-}
-.bui-icon-db-network-hover {
- background-position: -153px -51px;
-}
-.bui-icon-db-activity {
- background-position: -204px 0px;
-}
-.bui-icon-db-activity-hover {
- background-position: -204px -51px;
-}
-.bui-icon-db-map {
- background-position: -255px 0px;
-}
-.bui-icon-db-map-hover {
- background-position: -255px -51px;
-}
-.bui-icon-db-analytic {
- background-position: -306px 0px;
-}
-.bui-icon-db-analytic-hover {
- background-position: -306px -51px;
-}
-.bui-icon-db-more-app {
- background-position: -357px 0px;
-}
-.bui-icon-db-more-app-hover {
- background-position: -357px -51px;
-}
-.bui-icon-sprite-14 {
- width: 14px; height: 18px; vertical-align: middle; display: inline-block; background-image: url("../images/icons/att_login_icon.png");
-}
-.bui-icon-acct-mgmt {
-
-}
-.bui-icon-sprite-mega-menu-item {
- width: 65px; height: 65px; vertical-align: middle; display: inline-block;
-}
-.bui-icon-mega-menu-item {
-
-}
-.bui-icon-mega-menu-item-hover {
- background-position: 0px -66px;
-}
-.bui-icon-sprite-8 {
- width: 8px; height: 8px; vertical-align: middle; display: inline-block; background-image: url("../images/icons/arrow_icon_sprite.png"); background-repeat: no-repeat;
-}
-.bui-icon-sprite-8-delete {
-
-}
-.bui-icon-sprite-8-arrow-d {
- background-position: 0px -9px;
-}
-.bui-icon-sprite-8-arrow-r {
- background-position: 0px -18px;
-}
-.bui-icon-sprite-8-arrow-white-d {
- background-position: 0px -27px;
-}
-.bui-icon-sprite-8-arrow-white-r {
- background-position: 0px -36px;
-}
-.voice-plan-sprite {
- background: url("../images/icons/voice_plan_sprite.png") no-repeat 0px 0px; width: 52px; height: 40px; vertical-align: middle; display: inline-block;
-}
-.voice-plan-sprite-anyminute {
-
-}
-.voice-plan-sprite-rollover {
- background-position: -53px 0px;
-}
-.voice-plan-sprite-m2m {
- background-position: -106px 0px;
-}
-.voice-plan-sprite-night-n-weekend {
- background-position: -159px 0px;
-}
-.voice-plan-sprite-add-min {
- background-position: -212px 0px;
-}
-.data-plan-sprite {
- background: url("../images/icons/data_plan_sprite.png") no-repeat 0px 0px; width: 52px; height: 40px; vertical-align: middle; display: inline-block;
-}
-.data-plan-sprite-data {
-
-}
-.data-plan-sprite-addln-data {
- background-position: -53px 0px;
-}
-.data-plan-sprite-canadian-data {
- background-position: -106px 0px;
-}
-.data-plan-sprite-intl-data {
- background-position: -159px 0px;
-}
-.data-plan-sprite-enterp-lvl {
- background-position: -212px 0px;
-}
-.form-element-sprite {
- background: url("../images/icons/form_element_sprite.png") no-repeat 0px 0px; width: 28px; height: 28px; vertical-align: middle; display: inline-block;
-}
-.form-element-sprite-radio {
- background-position: 0px -29px;
-}
-.form-element-sprite-radio-on {
-
-}
-.form-element-sprite-checkbox {
- background-position: -29px 0px;
-}
-.form-element-sprite-checkbox-on {
- background-position: -29px -29px;
-}
-.shopping-cart-sprite {
- background: url("../images/icons/shopping_cart_15x15.png") no-repeat 0px 0px; width: 15px; height: 15px; vertical-align: middle; display: inline-block;
-}
-.sc-device {
-
-}
-.sc-voice {
- background-position: -16px 0px;
-}
-.sc-data {
- background-position: -32px 0px;
-}
-.sc-add-on {
- background-position: -48px 0px;
-}
-.sc-accessory {
- background-position: -64px 0px;
-}
-.sc-remove {
- background-position: -80px 0px;
-}
-.basic-sprite {
- background: url("../images/icons/basic_sprite_10x10.png") no-repeat 0px 0px; width: 10px; height: 10px; vertical-align: middle; display: inline-block;
-}
-.basic-arrow-u {
-
-}
-.basic-arrow-d {
- background-position: 0px -11px;
-}
-.card-types-sprite {
- background: url("../images/icons/card_types_sprite.png") no-repeat 0px 0px; width: 51px; height: 32px; vertical-align: middle; display: inline-block;
-}
-.visa {
- background-position: 0px -32px;
-}
-.active.visa {
-
-}
-.visa-active {
-
-}
-.master-card {
- background-position: -52px -32px;
-}
-.active.master-card {
- background-position: -52px 0px;
-}
-.master-card-active {
- background-position: -52px 0px;
-}
-.discover {
- background-position: -156px -32px;
-}
-.active.discover {
- background-position: -156px 0px;
-}
-.discover-active {
- background-position: -156px 0px;
-}
-.amex-active {
- background-position: -104px 0px;
-}
-.amex {
- background-position: -104px -32px;
-}
-.active.amex {
- background-position: -104px 0px;
-}
-.services-sprite {
- background: url("../images/icons/services_sprite_30x30.png") no-repeat 0px 0px; width: 31px; height: 30px; vertical-align: middle; display: inline-block;
-}
-.close-icon {
- background-position: 0px -32px;
-}
-.wireless-icon {
- background-position: -31px -32px;
-}
-.internet-icon {
- background-position: -62px -32px; height: 31px;
-}
-.device-features-sprite {
- background: url("../images/icons/feature_sprite.png") no-repeat 0px 0px rgba(0, 0, 0, 0); width: 18px; height: 13px; vertical-align: middle; display: inline-block;
-}
-.device-display-icon {
- background-position: -1px -4px;
-}
-.device-processor-icon {
- background-position: -39px -3px;
-}
-.device-cam-icon {
- background-position: -19px -4px;
-}
-.device-4g-icon {
- background-position: -58px -3px;
-}
-.bui-grid-a {
-
-}
-.bui-grid-b {
-
-}
-.bui-grid-c {
-
-}
-.bui-grid-d {
-
-}
-.bui-grid-e {
-
-}
-.bui-block-a {
- margin: 0px; padding: 0px; border: 0px currentColor; float: left; min-height: 1px; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box;
-}
-.bui-block-b {
- margin: 0px; padding: 0px; border: 0px currentColor; float: left; min-height: 1px; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box;
-}
-.bui-block-c {
- margin: 0px; padding: 0px; border: 0px currentColor; float: left; min-height: 1px; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box;
-}
-.bui-block-d {
- margin: 0px; padding: 0px; border: 0px currentColor; float: left; min-height: 1px; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box;
-}
-.bui-block-e {
- margin: 0px; padding: 0px; border: 0px currentColor; float: left; min-height: 1px; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box;
-}
-.bui-block-1 {
- margin: 0px; padding: 0px; border: 0px currentColor; float: left; min-height: 1px; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box;
-}
-.bui-block-2 {
- margin: 0px; padding: 0px; border: 0px currentColor; float: left; min-height: 1px; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box;
-}
-.bui-block-3 {
- margin: 0px; padding: 0px; border: 0px currentColor; float: left; min-height: 1px; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box;
-}
-.bui-block-4 {
- margin: 0px; padding: 0px; border: 0px currentColor; float: left; min-height: 1px; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box;
-}
-.bui-block-5 {
- margin: 0px; padding: 0px; border: 0px currentColor; float: left; min-height: 1px; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box;
-}
-.bui-grid-a .bui-block-a {
- width: 50%; clear: left;
-}
-.bui-grid-2 .bui-block-a {
- width: 50%; clear: left;
-}
-.bui-grid-a .bui-block-b {
- width: 50%;
-}
-.bui-grid-2 .bui-block-b {
- width: 50%;
-}
-.bui-grid-a .bui-block-1 {
- width: 50%; clear: left;
-}
-.bui-grid-2 .bui-block-1 {
- width: 50%; clear: left;
-}
-.bui-grid-a .bui-block-2 {
- width: 50%;
-}
-.bui-grid-2 .bui-block-2 {
- width: 50%;
-}
-.bui-grid-a .bui-column {
- width: 50%;
-}
-.bui-grid-2 .bui-column {
- width: 50%;
-}
-.bui-grid-b .bui-block-a {
- width: 33.33%; clear: left;
-}
-.bui-grid-3 .bui-block-a {
- width: 33.33%; clear: left;
-}
-.bui-grid-b .bui-block-b {
- width: 33.33%;
-}
-.bui-grid-3 .bui-block-b {
- width: 33.33%;
-}
-.bui-grid-b .bui-block-c {
- width: 33.33%;
-}
-.bui-grid-3 .bui-block-c {
- width: 33.33%;
-}
-.bui-grid-b .bui-block-1 {
- width: 33.33%; clear: left;
-}
-.bui-grid-3 .bui-block-1 {
- width: 33.33%; clear: left;
-}
-.bui-grid-b .bui-block-2 {
- width: 33.33%;
-}
-.bui-grid-3 .bui-block-2 {
- width: 33.33%;
-}
-.bui-grid-b .bui-block-3 {
- width: 33.33%;
-}
-.bui-grid-3 .bui-block-3 {
- width: 33.33%;
-}
-.bui-grid-b .bui-column {
- width: 33.33%;
-}
-.bui-grid-3 .bui-column {
- width: 33.33%;
-}
-.bui-grid-c .bui-block-a {
- width: 25%; clear: left;
-}
-.bui-grid-4 .bui-block-a {
- width: 25%; clear: left;
-}
-.bui-grid-c .bui-block-b {
- width: 25%;
-}
-.bui-grid-4 .bui-block-b {
- width: 25%;
-}
-.bui-grid-c .bui-block-c {
- width: 25%;
-}
-.bui-grid-4 .bui-block-c {
- width: 25%;
-}
-.bui-grid-c .bui-block-d {
- width: 25%;
-}
-.bui-grid-4 .bui-block-d {
- width: 25%;
-}
-.bui-grid-c .bui-block-1 {
- width: 25%; clear: left;
-}
-.bui-grid-4 .bui-block-1 {
- width: 25%; clear: left;
-}
-.bui-grid-c .bui-block-2 {
- width: 25%;
-}
-.bui-grid-4 .bui-block-2 {
- width: 25%;
-}
-.bui-grid-c .bui-block-3 {
- width: 25%;
-}
-.bui-grid-4 .bui-block-3 {
- width: 25%;
-}
-.bui-grid-c .bui-block-4 {
- width: 25%;
-}
-.bui-grid-4 .bui-block-4 {
- width: 25%;
-}
-.bui-grid-c .bui-column {
- width: 25%;
-}
-.bui-grid-4 .bui-column {
- width: 25%;
-}
-.bui-grid-d .bui-block-a {
- width: 20%; clear: left;
-}
-.bui-grid-5 .bui-block-a {
- width: 20%; clear: left;
-}
-.bui-grid-d .bui-block-b {
- width: 20%;
-}
-.bui-grid-5 .bui-block-b {
- width: 20%;
-}
-.bui-grid-d .bui-block-c {
- width: 20%;
-}
-.bui-grid-5 .bui-block-c {
- width: 20%;
-}
-.bui-grid-d .bui-block-d {
- width: 20%;
-}
-.bui-grid-5 .bui-block-d {
- width: 20%;
-}
-.bui-grid-d .bui-block-e {
- width: 20%;
-}
-.bui-grid-5 .bui-block-e {
- width: 20%;
-}
-.bui-grid-d .bui-block-1 {
- width: 20%; clear: left;
-}
-.bui-grid-5 .bui-block-1 {
- width: 20%; clear: left;
-}
-.bui-grid-d .bui-block-2 {
- width: 20%;
-}
-.bui-grid-5 .bui-block-2 {
- width: 20%;
-}
-.bui-grid-d .bui-block-3 {
- width: 20%;
-}
-.bui-grid-5 .bui-block-3 {
- width: 20%;
-}
-.bui-grid-d .bui-block-4 {
- width: 20%;
-}
-.bui-grid-5 .bui-block-4 {
- width: 20%;
-}
-.bui-grid-d .bui-block-5 {
- width: 20%;
-}
-.bui-grid-5 .bui-block-5 {
- width: 20%;
-}
-.bui-grid-d .bui-column {
- width: 20%;
-}
-.bui-grid-5 .bui-column {
- width: 20%;
-}
-.ir {
- border: 0px currentColor; overflow: hidden; background-color: transparent;
-}
-.ir::before {
- width: 0px; height: 100%; display: block; content: "";
-}
-.hidden {
- display: none !important; visibility: hidden;
-}
-.visuallyhidden {
- margin: -1px; padding: 0px; border: 0px currentColor; width: 1px; height: 1px; overflow: hidden; position: absolute; clip: rect(0px, 0px, 0px, 0px);
-}
-.focusable.visuallyhidden:active {
- margin: 0px; width: auto; height: auto; overflow: visible; position: static; clip: auto;
-}
-.focusable.visuallyhidden:focus {
- margin: 0px; width: auto; height: auto; overflow: visible; position: static; clip: auto;
-}
-.invisible {
- visibility: hidden;
-}
-.clearfix::before {
- display: table; content: " ";
-}
-.clearfix::after {
- display: table; content: " ";
-}
-.clearfix::after {
- clear: both;
-}
-.clearfix {
-
-}
-.bui-full-width {
- width: 100%;
-}
-.bui-full-height {
- height: 100%;
-}
-.bui-display-none {
- display: none;
-}
-[data-icon]::before {
- text-transform: none; line-height: 1; font-family: "atticons"; font-variant: normal; font-weight: normal; content: attr(data-icon); speak: none; -webkit-font-smoothing: antialiased;
-}
-[class^='icon-'] {
- text-transform: none; line-height: 1; font-family: "atticons"; font-style: normal; font-variant: normal; font-weight: normal; speak: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
-}
-[class*=' icon-'] {
- text-transform: none; line-height: 1; font-family: "atticons"; font-style: normal; font-variant: normal; font-weight: normal; speak: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
-}
-.icon-wireless-outline::before {
- content: "\e600";
-}
-.icon-wireless-dashboard::before {
- content: "\e601";
-}
-.icon-website-hosting-outline::before {
- content: "\e602";
-}
-.icon-volume-up::before {
- content: "\e603";
-}
-.icon-volume-mute::before {
- content: "\e604";
-}
-.icon-volume-down::before {
- content: "\e605";
-}
-.icon-video::before {
- content: "\e606";
-}
-.icon-video-tutorials::before {
- content: "\e607";
-}
-.icon-video-tutorials-outline::before {
- content: "\e608";
-}
-.icon-video-outline::before {
- content: "\e609";
-}
-.icon-user::before {
- content: "\e60a";
-}
-.icon-user-small::before {
- content: "\e60b";
-}
-.icon-user-outline::before {
- content: "\e60c";
-}
-.icon-user-large-outline::before {
- content: "\e60d";
-}
-.icon-upgrades::before {
- content: "\e60e";
-}
-.icon-upgrades-outline::before {
- content: "\e60f";
-}
-.icon-unlimited-nights-weekends-outline::before {
- content: "\e610";
-}
-.icon-unlimited-minutes-outline::before {
- content: "\e611";
-}
-.icon-unlimited-messaging-outline::before {
- content: "\e612";
-}
-.icon-unlimited-m2m-outline::before {
- content: "\e613";
-}
-.icon-unlimited-calling::before {
- content: "\e614";
-}
-.icon-tv-packages-outline::before {
- content: "\e615";
-}
-.icon-travel-minutes-outline::before {
- content: "\e616";
-}
-.icon-trash::before {
- content: "\e617";
-}
-.icon-tollfree-outline::before {
- content: "\e618";
-}
-.icon-tiles::before {
- content: "\e619";
-}
-.icon-tiles-small::before {
- content: "\e61a";
-}
-.icon-tickets::before {
- content: "\e61b";
-}
-.icon-tickets-returned::before {
- content: "\e61c";
-}
-.icon-tickets-referred::before {
- content: "\e61d";
-}
-.icon-tickets-outline::before {
- content: "\e61e";
-}
-.icon-tickets-open::before {
- content: "\e61f";
-}
-.icon-tickets-escalate::before {
- content: "\e620";
-}
-.icon-tickets-contested::before {
- content: "\e621";
-}
-.icon-tickets-closed::before {
- content: "\e622";
-}
-.icon-tickets-cleared::before {
- content: "\e623";
-}
-.icon-tickets-arquived::before {
- content: "\e624";
-}
-.icon-tickets-active::before {
- content: "\e625";
-}
-.icon-technical-specifications::before {
- content: "\e626";
-}
-.icon-tech-support::before {
- content: "\e627";
-}
-.icon-tech-support-outline::before {
- content: "\e628";
-}
-.icon-tablet::before {
- content: "\e629";
-}
-.icon-tablet-outline::before {
- content: "\e62a";
-}
-.icon-support::before {
- content: "\e62b";
-}
-.icon-support-outline::before {
- content: "\e62c";
-}
-.icon-star::before {
- content: "\e62d";
-}
-.icon-sort::before {
- content: "\e62e";
-}
-.icon-social-outline::before {
- content: "\e62f";
-}
-.icon-smartphone::before {
- content: "\e630";
-}
-.icon-smartphone-outline::before {
- content: "\e631";
-}
-.icon-signout-outline::before {
- content: "\e632";
-}
-.icon-sign-out::before {
- content: "\e633";
-}
-.icon-shop::before {
- content: "\e634";
-}
-.icon-shop-outline::before {
- content: "\e635";
-}
-.icon-shared-outline::before {
- content: "\e636";
-}
-.icon-shared-minutes-outline::before {
- content: "\e637";
-}
-.icon-share::before {
- content: "\e638";
-}
-.icon-settings::before {
- content: "\e639";
-}
-.icon-send-invoice-outline::before {
- content: "\e63a";
-}
-.icon-see-more::before {
- content: "\e63b";
-}
-.icon-see-less::before {
- content: "\e63c";
-}
-.icon-search::before {
- content: "\e63d";
-}
-.icon-search-small::before {
- content: "\e63e";
-}
-.icon-screen-calls-outline::before {
- content: "\e63f";
-}
-.icon-save-time-outline::before {
- content: "\e640";
-}
-.icon-saas-enablement-outline::before {
- content: "\e641";
-}
-.icon-s-beam::before {
- content: "\e642";
-}
-.icon-s-beam-outline::before {
- content: "\e643";
-}
-.icon-rollover-outline::before {
- content: "\e644";
-}
-.icon-rollover-minutes::before {
- content: "\e645";
-}
-.icon-reviews-outline::before {
- content: "\e646";
-}
-.icon-reports::before {
- content: "\e647";
-}
-.icon-reports-outline::before {
- content: "\e648";
-}
-.icon-recommendation-tool::before {
- content: "\e649";
-}
-.icon-receivers-outline::before {
- content: "\e64a";
-}
-.icon-productivity-outline::before {
- content: "\e64b";
-}
-.icon-print::before {
- content: "\e64c";
-}
-.icon-plus::before {
- content: "\e64d";
-}
-.icon-plus-outline::before {
- content: "\e64e";
-}
-.icon-play::before {
- content: "\e64f";
-}
-.icon-platform-as-service-outline::before {
- content: "\e650";
-}
-.icon-plans::before {
- content: "\e651";
-}
-.icon-plans-outline::before {
- content: "\e652";
-}
-.icon-pie-chart::before {
- content: "\e653";
-}
-.icon-photos::before {
- content: "\e654";
-}
-.icon-photos-outline::before {
- content: "\e655";
-}
-.icon-phone-data-outline::before {
- content: "\e656";
-}
-.icon-payments::before {
- content: "\e657";
-}
-.icon-payments-outline::before {
- content: "\e658";
-}
-.icon-pause::before {
- content: "\e659";
-}
-.icon-password::before {
- content: "\e65a";
-}
-.icon-password-outline::before {
- content: "\e65b";
-}
-.icon-overview::before {
- content: "\e65c";
-}
-.icon-overview-small::before {
- content: "\e65d";
-}
-.icon-overages::before {
- content: "\e65e";
-}
-.icon-overages-outline::before {
- content: "\e65f";
-}
-.icon-outage-outline::before {
- content: "\e660";
-}
-.icon-orders::before {
- content: "\e661";
-}
-.icon-orders-outline::before {
- content: "\e662";
-}
-.icon-optional-applications-outline::before {
- content: "\e663";
-}
-.icon-office-at-hand-outline::before {
- content: "\e664";
-}
-.icon-offers::before {
- content: "\e665";
-}
-.icon-offers-outline::before {
- content: "\e666";
-}
-.icon-notifications::before {
- content: "\e667";
-}
-.icon-notifications-outline::before {
- content: "\e668";
-}
-.icon-normal-screen::before {
- content: "\e669";
-}
-.icon-nights-weekends-outline::before {
- content: "\e66a";
-}
-.icon-new-requests-outline::before {
- content: "\e66b";
-}
-.icon-network::before {
- content: "\e66c";
-}
-.icon-network-dashboard::before {
- content: "\e66d";
-}
-.icon-netbook::before {
- content: "\e66e";
-}
-.icon-netbook-outline::before {
- content: "\e66f";
-}
-.icon-music::before {
- content: "\e670";
-}
-.icon-music-video::before {
- content: "\e671";
-}
-.icon-music-video-outline::before {
- content: "\e672";
-}
-.icon-music-outline::before {
- content: "\e673";
-}
-.icon-modem::before {
- content: "\e674";
-}
-.icon-modem-outline::before {
- content: "\e675";
-}
-.icon-mobile-insurance::before {
- content: "\e676";
-}
-.icon-mobile-insurance-outline::before {
- content: "\e677";
-}
-.icon-mobile-2-mobile-outline::before {
- content: "\e678";
-}
-.icon-missed-calls-outline::before {
- content: "\e679";
-}
-.icon-minutes::before {
- content: "\e67a";
-}
-.icon-minutes-outline::before {
- content: "\e67b";
-}
-.icon-messaging::before {
- content: "\e67c";
-}
-.icon-messaging-toolkit-outline::before {
- content: "\e67d";
-}
-.icon-messaging-outline::before {
- content: "\e67e";
-}
-.icon-messaging-email::before {
- content: "\e67f";
-}
-.icon-messaging-email-outline::before {
- content: "\e680";
-}
-.icon-message-small::before {
- content: "\e681";
-}
-.icon-maintenance::before {
- content: "\e682";
-}
-.icon-location-pin::before {
- content: "\e683";
-}
-.icon-location-pin-small::before {
- content: "\e684";
-}
-.icon-local-search::before {
- content: "\e685";
-}
-.icon-local-long-distance-outline::before {
- content: "\e686";
-}
-.icon-list::before {
- content: "\e687";
-}
-.icon-learn::before {
- content: "\e688";
-}
-.icon-learn-outline::before {
- content: "\e689";
-}
-.icon-laptop::before {
- content: "\e68a";
-}
-.icon-landline::before {
- content: "\e68b";
-}
-.icon-landline-outline::before {
- content: "\e68c";
-}
-.icon-invoices::before {
- content: "\e68d";
-}
-.icon-invoices-outline::before {
- content: "\e68e";
-}
-.icon-inventory::before {
- content: "\e68f";
-}
-.icon-intranet-outline::before {
- content: "\e690";
-}
-.icon-interpreter::before {
- content: "\e691";
-}
-.icon-interpreter-outline::before {
- content: "\e692";
-}
-.icon-internet::before {
- content: "\e693";
-}
-.icon-internet-outline::before {
- content: "\e694";
-}
-.icon-internet-24-outline::before {
- content: "\e695";
-}
-.icon-internet-18-outline::before {
- content: "\e696";
-}
-.icon-international-outline::before {
- content: "\e697";
-}
-.icon-international-long-distance-outline::before {
- content: "\e698";
-}
-.icon-international-data-outline::before {
- content: "\e699";
-}
-.icon-installation-outline::before {
- content: "\e69a";
-}
-.icon-information::before {
- content: "\e69b";
-}
-.icon-info-success::before {
- content: "\e69c";
-}
-.icon-info-alert::before {
- content: "\e69d";
-}
-.icon-info-alert-outline::before {
- content: "\e69e";
-}
-.icon-included-checkmark::before {
- content: "\e69f";
-}
-.icon-included-checkmark-outline::before {
- content: "\e6a0";
-}
-.icon-hotspot::before {
- content: "\e6a1";
-}
-.icon-hotspot-outline::before {
- content: "\e6a2";
-}
-.icon-hotspot-access-outline::before {
- content: "\e6a3";
-}
-.icon-home::before {
- content: "\e6a4";
-}
-.icon-help::before {
- content: "\e6a5";
-}
-.icon-help-outline::before {
- content: "\e6a6";
-}
-.icon-hd::before {
- content: "\e6a7";
-}
-.icon-hd-outline::before {
- content: "\e6a8";
-}
-.icon-hamburger::before {
- content: "\e6a9";
-}
-.icon-group-outline::before {
- content: "\e6aa";
-}
-.icon-gps::before {
- content: "\e6ab";
-}
-.icon-gps-outline::before {
- content: "\e6ac";
-}
-.icon-go-paperless-email-outline::before {
- content: "\e6ad";
-}
-.icon-global-messaging-outline::before {
- content: "\e6ae";
-}
-.icon-gamepad-outline::before {
- content: "\e6af";
-}
-.icon-game-devices::before {
- content: "\e6b0";
-}
-.icon-full-screen::before {
- content: "\e6b1";
-}
-.icon-forward-calls-outline::before {
- content: "\e6b2";
-}
-.icon-forum::before {
- content: "\e6b3";
-}
-.icon-forum-outline::before {
- content: "\e6b4";
-}
-.icon-filter::before {
- content: "\e6b5";
-}
-.icon-extras::before {
- content: "\e6b6";
-}
-.icon-extras-outline::before {
- content: "\e6b7";
-}
-.icon-erase::before {
- content: "\e6b8";
-}
-.icon-envelope::before {
- content: "\e6b9";
-}
-.icon-envelope-outline::before {
- content: "\e6ba";
-}
-.icon-enterprise-messaging-outline::before {
- content: "\e6bb";
-}
-.icon-edit::before {
- content: "\e6bc";
-}
-.icon-duplicate::before {
- content: "\e6bd";
-}
-.icon-dropdown-up::before {
- content: "\e6be";
-}
-.icon-dropdown-down::before {
- content: "\e6bf";
-}
-.icon-download::before {
- content: "\e6c0";
-}
-.icon-download-outline::before {
- content: "\e6c1";
-}
-.icon-disputes::before {
- content: "\e6c2";
-}
-.icon-detailed-billing::before {
- content: "\e6c3";
-}
-.icon-detailed-billing-outline::before {
- content: "\e6c4";
-}
-.icon-desktop-outline::before {
- content: "\e6c5";
-}
-.icon-data::before {
- content: "\e6c6";
-}
-.icon-data-outline::before {
- content: "\e6c7";
-}
-.icon-data-additional-outline::before {
- content: "\e6c8";
-}
-.icon-compare::before {
- content: "\e6c9";
-}
-.icon-cloud-storage-outline::before {
- content: "\e6ca";
-}
-.icon-cloud-outline::before {
- content: "\e6cb";
-}
-.icon-cloud-computing-outline::before {
- content: "\e6cc";
-}
-.icon-cloud-backup::before {
- content: "\e6cd";
-}
-.icon-cloud-backup-outline::before {
- content: "\e6ce";
-}
-.icon-circle-information-outline::before {
- content: "\e6cf";
-}
-.icon-circle-action-plus-outline::before {
- content: "\e6d0";
-}
-.icon-circle-action-minus-outline::before {
- content: "\e6d1";
-}
-.icon-circle-action-empty::before {
- content: "\e6d2";
-}
-.icon-circle-action-delete-outline::before {
- content: "\e6d3";
-}
-.icon-circle-action-close::before {
- content: "\e6d4";
-}
-.icon-circle-action-check-outline::before {
- content: "\e6d5";
-}
-.icon-circle-action-remove::before {
- content: "\e6d6";
-}
-.icon-circle-action-add::before {
- content: "\e6d7";
-}
-.icon-chip-outline::before {
- content: "\e6d8";
-}
-.icon-chevron-up::before {
- content: "\e6d9";
-}
-.icon-chevron-right::before {
- content: "\e6da";
-}
-.icon-chevron-left::before {
- content: "\e6db";
-}
-.icon-chevron-down::before {
- content: "\e6dc";
-}
-.icon-checkbox-checkmark::before {
- content: "\e6dd";
-}
-.icon-chat::before {
- content: "\e6de";
-}
-.icon-chat-small::before {
- content: "\e6df";
-}
-.icon-case-studies::before {
- content: "\e6e0";
-}
-.icon-cart::before {
- content: "\e6e1";
-}
-.icon-cart-small::before {
- content: "\e6e2";
-}
-.icon-camera::before {
- content: "\e6e3";
-}
-.icon-camera-outline::before {
- content: "\e6e4";
-}
-.icon-calendar-outline::before {
- content: "\e6e5";
-}
-.icon-business::before {
- content: "\e6e6";
-}
-.icon-business-tv::before {
- content: "\e6e7";
-}
-.icon-business-tv-outline::before {
- content: "\e6e8";
-}
-.icon-business-tv-additional-packs-outline::before {
- content: "\e6e9";
-}
-.icon-business-outline::before {
- content: "\e6ea";
-}
-.icon-business-center::before {
- content: "\e6eb";
-}
-.icon-business-center-outline::before {
- content: "\e6ec";
-}
-.icon-bundles::before {
- content: "\e6ed";
-}
-.icon-bundles-outline::before {
- content: "\e6ee";
-}
-.icon-billing::before {
- content: "\e6ef";
-}
-.icon-billing-history-outline::before {
- content: "\e6f0";
-}
-.icon-billing-dashboard::before {
- content: "\e6f1";
-}
-.icon-bd-maps::before {
- content: "\e6f2";
-}
-.icon-basicphone::before {
- content: "\e6f3";
-}
-.icon-basicphone-outline::before {
- content: "\e6f4";
-}
-.icon-barcode-outline::before {
- content: "\e6f5";
-}
-.icon-bar-chart-vertical::before {
- content: "\e6f6";
-}
-.icon-bar-chart-horizontal::before {
- content: "\e6f7";
-}
-.icon-arrow-up::before {
- content: "\e6f8";
-}
-.icon-arrow-up-right::before {
- content: "\e6f9";
-}
-.icon-arrow-up-left::before {
- content: "\e6fa";
-}
-.icon-arrow-up-circle::before {
- content: "\e6fb";
-}
-.icon-arrow-right::before {
- content: "\e6fc";
-}
-.icon-arrow-right-circle::before {
- content: "\e6fd";
-}
-.icon-arrow-left::before {
- content: "\e6fe";
-}
-.icon-arrow-left-circle::before {
- content: "\e6ff";
-}
-.icon-arrow-down::before {
- content: "\e700";
-}
-.icon-arrow-down-right::before {
- content: "\e701";
-}
-.icon-arrow-down-left::before {
- content: "\e702";
-}
-.icon-arrow-down-circle::before {
- content: "\e703";
-}
-.icon-arrow-double-right::before {
- content: "\e704";
-}
-.icon-arrow-double-left::before {
- content: "\e705";
-}
-.icon-apps-media::before {
- content: "\e706";
-}
-.icon-apps-media-outline::before {
- content: "\e707";
-}
-.icon-apps-marketplace::before {
- content: "\e708";
-}
-.icon-apps-marketplace-outline::before {
- content: "\e709";
-}
-.icon-analytics::before {
- content: "\e70a";
-}
-.icon-alt-media-subscription-outline::before {
- content: "\e70b";
-}
-.icon-all-locations::before {
- content: "\e70c";
-}
-.icon-all-devices::before {
- content: "\e70d";
-}
-.icon-all-devices-outline::before {
- content: "\e70e";
-}
-.icon-alarms::before {
- content: "\e70f";
-}
-.icon-alarms-outline::before {
- content: "\e710";
-}
-.icon-address-ip-outline::before {
- content: "\e711";
-}
-.icon-addons::before {
- content: "\e712";
-}
-.icon-addons-outline::before {
- content: "\e713";
-}
-.icon-additional-services::before {
- content: "\e714";
-}
-.icon-additional-minutes-outline::before {
- content: "\e715";
-}
-.icon-add-widget::before {
- content: "\e716";
-}
-.icon-activity-feed::before {
- content: "\e717";
-}
-.icon-accessories::before {
- content: "\e718";
-}
-.icon-accessories-outline::before {
- content: "\e719";
-}
-.icon-foundation-account::before {
- content: "\e71a";
-}
-.icon-billing-account::before {
- content: "\e71b";
-}
-.icon-infinite::before {
- content: "\e71c";
-}
-.icon-social-business-community::before {
- content: "\e71d";
-}
-.icon-social-facebook::before {
- content: "\e71e";
-}
-.icon-social-feed::before {
- content: "\e71f";
-}
-.icon-social-google-plus::before {
- content: "\e720";
-}
-.icon-social-linkedin::before {
- content: "\e721";
-}
-.icon-social-network-exchange::before {
- content: "\e722";
-}
-.icon-social-twitter-bird::before {
- content: "\e723";
-}
-.icon-social-twitter::before {
- content: "\e724";
-}
-.icon-social-youtube::before {
- content: "\e725";
-}
-.icon-blocked::before {
- content: "\e726";
-}
-.icon-talk-text::before {
- content: "\e727";
-}
-.icon-blocked::before {
- content: "\e726";
-}
-.icon-group::before {
- content: "\e72c";
-}
-.icon-group-create::before {
- content: "\e72b";
-}
-.clearfix {
-
-}
-.clearfix::before {
- line-height: 0; display: table; content: "";
-}
-.clearfix::after {
- line-height: 0; display: table; content: "";
-}
-.clearfix::after {
- clear: both;
-}
-.bui-form-horizontal .control-group {
- margin-bottom: 0px;
-}
-.bui-form-horizontal .control-group::before {
- line-height: 0; display: table; content: "";
-}
-.bui-form-horizontal .control-group::after {
- line-height: 0; display: table; content: "";
-}
-.bui-form-horizontal .control-group::after {
- clear: both;
-}
-.bui-form-horizontal .control-group .control-label {
- width: 30%; text-align: left !important; padding-top: 5px; float: left; display: inline-block;
-}
-.bui-form-horizontal .control-group .controls {
- width: 65%; margin-left: 5%; display: inline-block;
-}
-.bui-form-horizontal .control-group :first-child.controls {
-
-}
-.bui-form-horizontal .help-block {
- margin-bottom: 0px;
-}
-.bui-form-horizontal input + .help-block {
- margin-top: 10px;
-}
-.bui-form-horizontal select + .help-block {
- margin-top: 10px;
-}
-.bui-form-horizontal textarea + .help-block {
- margin-top: 10px;
-}
-.bui-form-horizontal .uneditable-input + .help-block {
- margin-top: 10px;
-}
-.bui-form-horizontal .input-prepend + .help-block {
- margin-top: 10px;
-}
-.bui-form-horizontal .input-append + .help-block {
- margin-top: 10px;
-}
-.bui-form-horizontal .form-actions {
- padding-left: 100px;
-}
-form.form-generic .form-row-wpr {
- margin-bottom: 20px;
-}
-form.form-generic .form-row-wpr .form-row label.form-label {
- color: rgb(68, 68, 68); font-family: "clearviewatt"; font-size: 12px; font-weight: normal; margin-bottom: 0px; display: block;
-}
-.popbox {
- margin: 0px auto; position: relative;
-}
-.popbox .collapse {
- position: relative;
-}
-.popbox .collapse .box {
- background: rgb(255, 255, 255); border-radius: 5px; border: 1px solid rgb(187, 187, 187); display: none; position: absolute; box-shadow: 0px 0px 15px #999;
-}
-.popbox .collapse .box a.close {
- color: red; font-family: arial; font-size: 12px; text-decoration: underline;
-}
-.popbox .collapse .box .arrow {
- left: 1px; top: -10px; width: 0px; height: 0px; border-right-color: transparent; border-bottom-color: rgb(255, 255, 255); border-left-color: transparent; border-right-width: 11px; border-bottom-width: 11px; border-left-width: 11px; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; position: absolute; z-index: 1001;
-}
-.popbox .collapse .box .arrow-border {
- top: -12px; width: 0px; height: 0px; border-right-color: transparent; border-bottom-color: rgb(187, 187, 187); border-left-color: transparent; border-right-width: 11px; border-bottom-width: 11px; border-left-width: 11px; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; position: absolute; z-index: 1000;
-}
-.popbox .open {
-
-}
-.bui-global-btn {
- padding: 8px 20px; border-radius: 6px; border: 0px currentColor; transition:background-color 0.3s ease-out; height: auto; text-align: center; color: rgb(255, 255, 255) !important; line-height: 1; font-size: 14px; text-decoration: none !important; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; box-sizing: border-box; background-color: rgb(102, 102, 102); -moz-box-sizing: border-box; valign: middle;
-}
-.bui-global-btn-small {
- height: 30px !important; min-width: 60px;
-}
-.bui-global-btn-primary {
- border-color: rgb(53, 128, 189); color: rgb(255, 255, 255) !important; background-color: rgb(6, 122, 180);
-}
-.bui-global-btn-primary:hover {
- background-color: rgb(25, 157, 223);
-}
-.bui-global-btn-primary:active {
- border-color: rgb(40, 97, 141); background-color: rgb(50, 120, 177);
-}
-.bui-global-btn-hero {
- color: rgb(255, 255, 255); background-color: rgb(239, 111, 0);
-}
-.bui-global-btn-hero:hover {
- background-color: rgb(252, 179, 20);
-}
-.bui-global-btn-hero:active {
- background-color: rgb(255, 114, 0);
-}
-.bui-global-btn-secondary {
- color: rgb(255, 255, 255); background-color: rgb(102, 102, 102);
-}
-.bui-global-btn-secondary:hover {
- background-color: rgb(187, 187, 187);
-}
-.bui-global-btn-secondary:active {
- background-color: rgb(102, 102, 102);
-}
-.bui-global-btn-disabled {
- color: rgb(153, 153, 153) !important; cursor: pointer; background-color: rgb(221, 221, 221);
-}
-.bui-global-btn-disabled:hover {
- background-color: rgb(221, 221, 221);
-}
-.bui-global-btn-disabled:active {
- background-color: rgb(221, 221, 221);
-}
-.bui-global-links {
- transition:0.3s ease-in-out; color: rgb(6, 122, 180); text-decoration: none;
-}
-.bui-global-links:hover {
- color: rgb(25, 157, 223); text-decoration: underline;
-}
-.bui-global-links:active {
- text-decoration: none; coloe: #199ddf;
-}
-.att-global-fonts-common {
- margin: 0px; text-transform: none;
-}
-.att-global-fonts-popup-header {
- margin: 0px; text-transform: none; line-height: 10px; font-family: clearviewatt_ltbold; font-size: 11px; font-weight: 100;
-}
-.att-global-fonts-popup-content {
- margin: 0px; text-transform: none; line-height: 15px; font-family: clearviewattregular; font-size: 14px;
-}
-a.reg-logout-btn {
- padding: 8px 20px; border-radius: 6px; border: currentColor !important; transition:background-color 0.3s ease-out; width: 94px !important; height: auto; text-align: center; color: rgb(255, 255, 255) !important; line-height: 1; font-family: clearviewattregular; font-size: 14px; text-decoration: none !important; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; box-sizing: border-box; background-color: rgb(102, 102, 102); -moz-box-sizing: border-box; valign: middle;
-}
-a.reg-logout-btn:hover {
- background-color: rgb(187, 187, 187);
-}
-a.reg-logout-btn:active {
- background-color: rgb(102, 102, 102);
-}
-ul.reg-Details-table > li {
- line-height: 0px !important;
-}
-ul.reg-Details-table {
- margin: 0px; padding: 0px;
-}
-#reg-header-snippet {
- width: inherit; height: auto; overflow: hidden; clear: both; background-color: rgb(250, 250, 250);
-}
-#reg-header-snippet .reg-profilePicture {
- padding: 20px 20px 17px; width: 109px; margin-bottom: 0px; border-right-color: rgb(211, 211, 211); border-right-width: 1px; border-right-style: solid; float: left; background-color: rgb(250, 250, 250);
-}
-#reg-header-snippet .reg-profilePicture #reg-profileImage {
- width: 100%; clear: both; margin-left: 15px;
-}
-#reg-header-snippet .reg-profilePicture #reg-myprofile-link {
- text-align: left; margin-top: 18px;
-}
-#reg-header-snippet .reg-profilePicture #reg-myprofile-link a {
- transition:0.3s ease-in-out; color: rgb(6, 122, 180); line-height: 15px; padding-left: 21px; font-size: 14px; text-decoration: none;
-}
-#reg-header-snippet .reg-profilePicture #reg-myprofile-link a:hover {
- color: rgb(25, 157, 223); text-decoration: underline;
-}
-#reg-header-snippet .reg-profilePicture #reg-myprofile-link a:active {
- text-decoration: none; coloe: #199ddf;
-}
-#reg-header-snippet .reg-profilePicture #reg-companyProfile-link {
- margin-top: 14px;
-}
-#reg-header-snippet .reg-profilePicture #reg-companyProfile-link a {
- transition:0.3s ease-in-out; color: rgb(6, 122, 180); line-height: 15px; font-size: 14px; text-decoration: none;
-}
-#reg-header-snippet .reg-profilePicture #reg-companyProfile-link a:hover {
- color: rgb(25, 157, 223); text-decoration: underline;
-}
-#reg-header-snippet .reg-profilePicture #reg-companyProfile-link a:active {
- text-decoration: none; coloe: #199ddf;
-}
-#reg-header-snippet .reg-profilePicture #reg-logout-div {
- margin-top: 38px;
-}
-#reg-header-snippet .reg-profilePicture #reg-logout-div form.reg-logoutForm {
- margin: 0px;
-}
-#reg-header-snippet .reg-profileDetails {
- padding: 11px 20px 20px; width: 199px; margin-bottom: 0px; border-bottom-width: 0px; float: left; min-height: 220px; background-color: rgb(255, 255, 255);
-}
-#reg-header-snippet .reg-profileDetails .reg-userName-table {
- height: 70px; display: table; min-height: 70px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userName-table #reg-userName-table-row {
- text-align: left; clear: both; display: table-row; min-height: inherit;
-}
-#reg-header-snippet .reg-profileDetails .reg-userName-table #reg-userName-table-row #reg-userName-table-cell {
- height: inherit; vertical-align: middle; display: table-cell; -ms-word-wrap: break-word; min-height: inherit;
-}
-#reg-header-snippet .reg-profileDetails .reg-userName-table #reg-userName-table-row #reg-userName-table-cell #reg-userName {
- width: 8em; color: rgb(68, 68, 68); overflow: hidden; font-weight: normal; float: left; white-space: normal;
-}
-#reg-header-snippet .reg-profileDetails .reg-userEmail-label {
- text-align: left; clear: both; margin-top: 21px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userEmail-label .reg-userEmail-label-spn {
- margin: 0px; color: rgb(68, 68, 68); text-transform: none; line-height: 10px; font-family: clearviewatt_ltbold; font-size: 11px; font-weight: 100;
-}
-#reg-header-snippet .reg-profileDetails .reg-userEmail-value {
- text-align: left; clear: both; margin-top: 5px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userEmail-value .reg-userEmail-value-spn {
- margin: 0px; color: rgb(102, 102, 102); text-transform: none; line-height: 15px; font-family: clearviewattregular; font-size: 14px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userRole-label {
- text-align: left; clear: both; margin-top: 20px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userRole-label .reg-userRole-label-spn {
- margin: 0px; color: rgb(68, 68, 68); text-transform: none; line-height: 10px; font-family: clearviewatt_ltbold; font-size: 11px; font-weight: 100;
-}
-#reg-header-snippet .reg-profileDetails .reg-userRole-value {
- text-align: left; clear: both; margin-top: 6px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userRole-value .reg-userRole-value-spn {
- margin: 0px; color: rgb(102, 102, 102); text-transform: none; line-height: 15px; font-family: clearviewattregular; font-size: 14px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userCompany-label {
- text-align: left; clear: both; margin-top: 19px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userCompany-label .reg-userCompany-spn {
- margin: 0px; color: rgb(68, 68, 68); text-transform: none; line-height: 10px; font-family: clearviewatt_ltbold; font-size: 11px; font-weight: 100;
-}
-#reg-header-snippet .reg-profileDetails .reg-userCompany-value {
- text-align: left; clear: both; margin-top: 5px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userCompany-value .reg-userCompany-spn {
- margin: 0px; color: rgb(102, 102, 102); text-transform: none; line-height: 15px; font-family: clearviewattregular; font-size: 14px; -ms-word-wrap: break-word;
-}
-.bui-global-transitions-hover {
- border: 1px solid rgb(187, 187, 187); z-index: 90;
-}
-.bui-global-transitions-focus {
- outline: 0px; border: 1px solid rgb(25, 157, 223) !important; z-index: 100; box-shadow: none; -webkit-box-shadow: none;
-}
-.bui-global-transitions-login-page {
- background: 0px 0px rgb(250, 250, 250); border-radius: 3px; border: 1px solid rgb(211, 211, 211); transition:border 0.3s ease-in-out; color: rgb(68, 68, 68); font-family: clearviewattregular; box-shadow: none !important;
-}
-.bui-global-transitions-login-page:hover {
- border: 1px solid rgb(187, 187, 187); z-index: 90;
-}
-.bui-global-transitions-login-page:focus {
- outline: 0px; border: 1px solid rgb(25, 157, 223) !important; z-index: 100; box-shadow: none; -webkit-box-shadow: none;
-}
-li#anchor ul.column {
- display: none;
-}
-li#anchor:hover ul.column {
- display: block;
-}
-.login-icon {
- width: 27px; height: 27px; vertical-align: middle; display: inline-block; background-image: url("../images/common/header/login-icon.png"); background-repeat: no-repeat;
-}
-.bui-reg-one-line-layout * {
- display: inline-block;
-}
-.popbox {
- margin: 0px auto; text-align: center; position: relative;
-}
-.collapse {
- position: relative;
-}
-.box {
- background: rgb(255, 255, 255); border: 1px solid rgb(187, 187, 187); width: auto; height: auto; display: none; position: relative; z-index: 1000; min-width: 260px; box-shadow: 0px 4px 4px rgba(0,0,0,0.25);
-}
-.box * {
- box-sizing: content-box; -webkit-box-sizing: content-box; -moz-box-sizing: content-box;
-}
-.box ::after {
- box-sizing: content-box; -webkit-box-sizing: content-box; -moz-box-sizing: content-box;
-}
-.box ::before {
- box-sizing: content-box; -webkit-box-sizing: content-box; -moz-box-sizing: content-box;
-}
-.box a.close {
- color: red; font-family: arial; font-size: 12px; text-decoration: underline;
-}
-.box .arrow {
- left: 1px; top: -8px; width: 0px; height: 0px; border-right-color: transparent; border-bottom-color: rgb(255, 255, 255); border-left-color: transparent; border-right-width: 8px; border-bottom-width: 8px; border-left-width: 8px; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; position: absolute; z-index: 1001;
-}
-.standard-input-error-msg-class {
- background: url("../images/common/header/exclamation-error.png") no-repeat 337px rgb(231, 229, 230) !important;
-}
-.box-form {
- padding-top: 10px; padding-bottom: 0px; padding-left: 16px;
-}
-.control-text-popup {
- border-radius: 3px 3px 0px 0px !important; width: 200px !important;
-}
-.control-label-password {
- line-height: 10px !important; padding-top: 3px !important;
-}
-.control-label-checkbox {
- line-height: 15px; padding-top: 5px;
-}
-.placeholder-class {
- color: rgb(139, 139, 139) !important;
-}
-.forgot-userid-password {
- font-size: 10px !important; font-weight: normal !important;
-}
-.header-login-label {
- color: rgb(255, 255, 255); font-size: 13px; maxlength: 10;
-}
-.ellipsis-header-name {
- overflow: hidden; padding-top: 0px; margin-top: 0px; white-space: nowrap; -ms-text-overflow: ellipsis; max-width: 100px; ms-text-overflow: ellipsis;
-}
-#generic-image {
- padding: 100px; background-image: url("../images/common/header/placerimage.jpg"); background-repeat: no-repeat;
-}
-.bui-reg-horizontal-rule {
- width: 100%; height: 1.25px; clear: both; background-color: rgb(231, 230, 230);
-}
-.bui-reg-horizontal-rule-margin {
- margin-top: 20px; margin-bottom: 20px;
-}
-.password-horizontal-rule-margin {
- margin-top: 5px; margin-bottom: 5px;
-}
-.requiredInformation {
- font-size: 11px;
-}
-.header-login-window {
- height: 100px;
-}
-.header-login-window-image {
- padding: 18px;
-}
-.header-login-window-name {
- line-height: 1.5em; overflow: hidden; padding-top: 18px; padding-right: 18px; font-family: clearviewatt_ltbold; font-size: 16px;
-}
-.header-login-window-role {
- font-family: clearviewattregular; font-size: 12px;
-}
-.header-login-window-logout {
- background: rgb(231, 229, 230); height: 27px; line-height: 27px; font-family: clearviewatt_ltbold; font-size: 11px; z-index: 10001;
-}
-.header-login-window-logout a {
- color: rgb(103, 103, 103);
-}
-.header-login-name {
- width: auto; line-height: 50px; padding-right: 23px; padding-left: 3px; float: left; cursor: pointer;
-}
-.error-msg-box {
- border-radius: 3px; width: 200px; height: 35px; color: rgb(255, 255, 255); line-height: 35px; font-size: 12px; margin-top: 15px; margin-left: 30px; background-color: rgb(255, 69, 57);
-}
-.header_login_field_border_error {
- background: url("../images/common/header/icon-error.png") no-repeat 118px rgb(255, 255, 255) !important; border: 1px solid rgb(255, 69, 57) !important; z-index: 100;
-}
-.header_login_field_border_error:hover {
- border: 1px solid rgb(255, 69, 57) !important;
-}
-.header_login_field_3sides_error {
- background: url("../images/common/header/icon-error.png") no-repeat 118px rgb(255, 255, 255) !important; border-right-color: rgb(255, 69, 57) !important; border-bottom-color: rgb(255, 69, 57) !important; border-left-color: rgb(255, 69, 57) !important; border-right-width: 1px !important; border-bottom-width: 1px !important; border-left-width: 1px !important; border-right-style: solid !important; border-bottom-style: solid !important; border-left-style: solid !important;
-}
-.header_login_field_3sides_error:hover {
- border: 1px solid rgb(255, 69, 57) !important;
-}
-.header_login_field_wrapper_border_error {
- background: url("../images/common/header/icon-error.png") no-repeat 118px rgb(255, 255, 255) !important;
-}
-.error-msg-class {
- background: url("../images/common/header/exclamation-error.png") no-repeat 178px rgb(255, 255, 255) !important; border-color: rgb(177, 11, 59) !important; color: rgb(179, 10, 60) !important; font-size: 10px; box-shadow: inset 0px 0px 3px #b10b3b, 0px 0px 3px #b10b3b !important;
-}
-.regFormInputLoginText {
- background: no-repeat 100% -22px rgb(250, 250, 250); padding: 10px; width: 200px; height: 20px; color: rgb(68, 68, 68); font-size: 12px; display: block;
-}
-.regFormInputLoginPassword {
- background: no-repeat 100% -22px rgb(250, 250, 250); padding: 10px; width: 200px; height: 20px; color: rgb(68, 68, 68); font-size: 12px; display: block;
-}
-.header-login-button {
- height: 20px; min-width: 10px !important; box-shadow: none;
-}
-#headerLoginFormID #header_login_title {
- color: rgb(68, 68, 68); font-family: clearviewattregular; font-size: 14px; margin-top: 25px;
-}
-#headerLoginFormID #header_login_id {
- background: url("../images/common/header/icon-username.png") no-repeat 10px rgb(250, 250, 250) !important; padding: 10px 10px 10px 36px; border-radius: 3px 3px 0px 0px !important; border: 1px solid rgb(211, 211, 211); transition:border 0.3s ease-in-out; width: 200px; height: 32px; color: rgb(68, 68, 68); font-family: clearviewattregular; font-size: 12px; margin-top: 15px; margin-bottom: 10px !important; margin-left: 30px; display: block; box-shadow: none !important;
-}
-#headerLoginFormID #header_login_id:hover {
- border: 1px solid rgb(187, 187, 187); z-index: 90;
-}
-#headerLoginFormID #header_login_id:focus {
- outline: 0px; border: 1px solid rgb(25, 157, 223) !important; z-index: 100; box-shadow: none; -webkit-box-shadow: none;
-}
-#headerLoginFormID #header_password {
- background: url("../images/common/header/icon-password.png") no-repeat 10px rgb(250, 250, 250) !important; padding: 10px 10px 10px 36px; border-radius: 0px 0px 3px 3px !important; border: 1px solid rgb(211, 211, 211); transition:border 0.3s ease-in-out; width: 200px; height: 32px; color: rgb(68, 68, 68); font-family: clearviewattregular; font-size: 12px; margin-top: -11px; margin-bottom: 0px; margin-left: 30px; display: block; box-shadow: none !important;
-}
-#headerLoginFormID #header_password:hover {
- border: 1px solid rgb(187, 187, 187); z-index: 90;
-}
-#headerLoginFormID #header_password:focus {
- outline: 0px; border: 1px solid rgb(25, 157, 223) !important; z-index: 100; box-shadow: none; -webkit-box-shadow: none;
-}
-#headerLoginFormID #header_login_block {
- height: 30px; margin-top: 15px;
-}
-#headerLoginFormID #header_login_block #header_login_button {
- padding: 8px 20px; border-radius: 6px; border: 0px rgb(53, 128, 189); transition:background-color 0.3s ease-out; width: 80px; height: 30px !important; text-align: center; color: rgb(255, 255, 255) !important; line-height: 1; font-size: 14px; text-decoration: none !important; margin-left: 25px; vertical-align: middle; float: left; display: inline-block; position: relative; cursor: pointer; min-width: 60px; box-sizing: border-box; background-color: rgb(6, 122, 180); -moz-box-sizing: border-box; valign: middle;
-}
-#headerLoginFormID #header_login_block #header_login_button:hover {
- background-color: rgb(25, 157, 223);
-}
-#headerLoginFormID #header_login_block #header_login_button:active {
- border-color: rgb(40, 97, 141); background-color: rgb(50, 120, 177);
-}
-#headerLoginFormID #remember_me_component {
- padding-left: 30px; margin-top: 11px;
-}
-#headerLoginFormID #remember_me_component #rememberme_header_label {
- margin-top: 4px;
-}
-#headerLoginFormID #remember_me_component #remember-me {
- color: rgb(102, 102, 102); font-family: clearviewattregular; font-size: 12px; font-weight: normal;
-}
-#headerLoginFormID #forgot_username_component {
- text-align: left; padding-top: 30px; padding-bottom: 30px; padding-left: 30px; clear: both;
-}
-#headerLoginFormID #forgot_username_component .regular {
- color: rgb(68, 68, 68); font-family: clearviewattregular; font-size: 12px;
-}
-#headerLoginFormID #forgot_username_component .link {
- color: rgb(6, 122, 180); font-family: clearviewattregular; font-size: 12px;
-}
-*/
-.footerContainer {
- background: 0px 0px rgb(6, 122, 180); margin: 0px auto; width: 100%;
-}
-.footerContainer .footerWrapper {
- margin: 0px auto; width: 980px; padding-bottom: 25px; background-color: rgb(6, 122, 180);
-}
-.footerContainer .footerWrapper .footerItem {
- margin: auto; width: 980px; height: 60px; color: rgb(255, 255, 255); line-height: 1; overflow: hidden; font-family: clearviewatt; font-size: 12px;
-}
-.footerContainer .footerWrapper .footerItem .divider {
- width: 100px; margin-top: 10px; margin-bottom: 10px; border-bottom-color: rgb(255, 255, 255); border-bottom-width: 1px; border-bottom-style: solid;
-}
-.footerContainer .footerWrapper .footerItem .customerSupport {
- width: 160px; margin-left: 30px; float: left;
-}
-.footerContainer .footerWrapper .footerItem .customerSupport .customerHelp {
- font-size: 14px; margin-top: 45px; margin-bottom: 20px;
-}
-.footerContainer .footerWrapper .footerItem .customerSupport a {
- color: rgb(255, 255, 255) !important;
-}
-.footerContainer .footerWrapper .footerItem .customerSupport a:hover {
- text-decoration: none;
-}
-.footerContainer .footerWrapper .footerItem .legalInfo {
- width: 160px; float: left;
-}
-.footerContainer .footerWrapper .footerItem .legalInfo .legal {
- font-size: 14px; margin-top: 45px; margin-bottom: 20px;
-}
-.footerContainer .footerWrapper .footerItem .legalInfo a {
- color: rgb(255, 255, 255) !important;
-}
-.footerContainer .footerWrapper .footerItem .legalInfo a:hover {
- text-decoration: none;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection {
- width: 295px; float: left;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeSave {
- font-size: 14px; margin-top: 45px; margin-bottom: 20px;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeToSection {
- overflow: hidden; margin-top: 15px;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeToSection .emailAddress {
- width: 170px; float: left;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeToSection .emailAddress input {
- padding: 5px 10px 5px 5px; width: 152px; color: rgb(255, 255, 255) !important; background-color: rgb(6, 122, 180);
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeToSection .subscribeBtn {
- border-radius: 1px 5px 5px 1px; top: 1px; width: 95px; height: 30px; text-align: center; right: 7px; color: rgb(6, 122, 180); font-size: 14px; vertical-align: middle; float: left; position: relative; cursor: pointer; background-color: rgb(255, 255, 255);
-}
-.footerContainer .footerWrapper .footerItem .socialMedia {
- margin-left: 0px; float: left;
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .followAtt {
- font-size: 14px; margin-top: 45px; margin-bottom: 20px;
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .socialFeeds {
- margin-top: 20px; margin-left: -8px;
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .socialFeeds span {
- margin: 0px; padding: 5px; font-size: 30px;
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .socialFeeds span a {
- margin: 0px; padding: 0px; color: rgb(255, 255, 255);
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .socialFeeds span a:hover {
- text-decoration: none;
-}
-.footerContainer .footerWrapper .dividerBottom {
- margin: auto; width: 920px; border-bottom-color: rgb(255, 255, 255); border-bottom-width: 1px; border-bottom-style: solid;
-}
-.footerContainer .footerWrapper .feedbackSection {
- margin: auto; width: 920px; display: none;
-}
-.footerContainer .footerWrapper .feedbackSection .dividerTop {
- margin: auto; width: 920px; border-bottom-color: rgb(255, 255, 255); border-bottom-width: 1px; border-bottom-style: solid;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent {
- margin: 30px auto;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent #feedbackForm {
- height: 120px;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent .feedbackInfo {
- width: 270px; color: rgb(255, 255, 255); font-family: clearviewatt; font-size: 12px; margin-top: -5px; margin-right: 30px; float: left;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent .feedbackTextSection .feedbackText {
- padding: 10px; border-radius: 5px; border: 1px solid rgb(255, 255, 255); width: 500px; height: 100px; color: rgb(255, 255, 255); font-family: clearviewatt; font-size: 14px; float: left; cursor: text; background-color: rgb(6, 122, 180); resize: none;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent .feedbackTextSection .feedbackSubmitButton {
- padding: 5px; border-radius: 5px; border: currentColor; width: 82px; color: rgb(6, 122, 180); font-family: clearviewatt; font-size: 14px; margin-top: 92px; margin-left: 16px; cursor: pointer; background-color: rgb(255, 255, 255);
-}
-.footerContainer .footerWrapper .feedbackResultMsg {
- margin: 0px auto; width: 980px; text-align: center; color: rgb(255, 255, 255); line-height: 70px; font-family: clearviewatt; font-size: 18px; display: none;
-}
-.footerContainer .footerWrapper .feedbackResultMsg #feedbackMsgCheck {
- font-size: 20px; margin-right: 20px;
-}
-.footerContainer .footerWrapper #feedbackResultDivider {
- display: none;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv {
- margin: auto; max-width: 110px;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv .feedbackButton {
- background: rgb(255, 255, 255); margin: -1px auto auto; padding: 5px 10px; border-radius: 0px 0px 5px 5px; border: currentColor; color: rgb(6, 122, 180); font-family: arial; font-size: 14px; cursor: pointer;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv .closeFeedbackButton {
- background: rgb(255, 255, 255); margin: -1px auto auto; padding: 5px 10px; border-radius: 0px 0px 5px 5px; border: currentColor; color: rgb(6, 122, 180); font-family: arial; font-size: 14px; cursor: pointer;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv .feedbackButton span {
- padding-left: 10px; background-image: none;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv .closeFeedbackButton span {
- padding-left: 10px; background-image: none;
-}
-.footerContainer .footerWrapper .attFooterInfo {
- margin: auto; width: 980px; color: rgb(255, 255, 255); overflow: hidden; font-family: arial; font-size: 12px;
-}
-.footerContainer .footerWrapper .attFooterInfo a {
- margin: 0px; padding: 0px; color: rgb(255, 255, 255); text-decoration: underline;
-}
-.footerContainer .footerWrapper .attFooterInfo .footerLastSection {
- overflow: hidden; margin-top: 40px;
-}
-.footerContainer .footerWrapper .attFooterInfo span {
- padding-right: 5px; padding-left: 3px; border-right-color: rgb(255, 255, 255); border-right-width: 1px; border-right-style: solid;
-}
-.footerContainer .footerWrapper .attFooterInfo span:last-child {
- border: currentColor;
-}
-.footerContainer .footerWrapper .attFooterInfo .attLogo {
- background: url("../images/common/footer/footer-attolympiclogo.png") repeat-x 0px 0px; width: 150px; height: 77px; margin-right: 0px; margin-left: 17px; float: left;
-}
-.footerContainer .footerWrapper .attFooterInfo .attQuality {
- background: url("../images/common/footer/footer-consumerinfo.png") repeat-x 0px 0px; top: -5px; width: 79px; height: 82px; margin-right: 103px; float: left; position: relative;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise {
- width: 64%; float: right;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise .privacyPolicy {
- margin-top: 17px;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise .privacyPolicy a {
- text-decoration: underline;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise .privacyPolicy a span {
- padding: 0px;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise .privacyPolicy a:hover {
- text-decoration: underline;
-}
-/*
-[data-icon]::before {
- text-transform: none; line-height: 1; font-family: "atticons"; font-variant: normal; font-weight: normal; content: attr(data-icon); speak: none; -webkit-font-smoothing: antialiased;
-}
-[class^='icon-'] {
- text-transform: none; line-height: 1; font-family: "atticons"; font-style: normal; font-variant: normal; font-weight: normal; speak: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
-}
-[class*=' icon-'] {
- text-transform: none; line-height: 1; font-family: "atticons"; font-style: normal; font-variant: normal; font-weight: normal; speak: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
-}
-.icon-wireless-outline::before {
- content: "\e600";
-}
-.icon-wireless-dashboard::before {
- content: "\e601";
-}
-.icon-website-hosting-outline::before {
- content: "\e602";
-}
-.icon-volume-up::before {
- content: "\e603";
-}
-.icon-volume-mute::before {
- content: "\e604";
-}
-.icon-volume-down::before {
- content: "\e605";
-}
-.icon-video::before {
- content: "\e606";
-}
-.icon-video-tutorials::before {
- content: "\e607";
-}
-.icon-video-tutorials-outline::before {
- content: "\e608";
-}
-.icon-video-outline::before {
- content: "\e609";
-}
-.icon-user::before {
- content: "\e60a";
-}
-.icon-user-small::before {
- content: "\e60b";
-}
-.icon-user-outline::before {
- content: "\e60c";
-}
-.icon-user-large-outline::before {
- content: "\e60d";
-}
-.icon-upgrades::before {
- content: "\e60e";
-}
-.icon-upgrades-outline::before {
- content: "\e60f";
-}
-.icon-unlimited-nights-weekends-outline::before {
- content: "\e610";
-}
-.icon-unlimited-minutes-outline::before {
- content: "\e611";
-}
-.icon-unlimited-messaging-outline::before {
- content: "\e612";
-}
-.icon-unlimited-m2m-outline::before {
- content: "\e613";
-}
-.icon-unlimited-calling::before {
- content: "\e614";
-}
-.icon-tv-packages-outline::before {
- content: "\e615";
-}
-.icon-travel-minutes-outline::before {
- content: "\e616";
-}
-.icon-trash::before {
- content: "\e617";
-}
-.icon-tollfree-outline::before {
- content: "\e618";
-}
-.icon-tiles::before {
- content: "\e619";
-}
-.icon-tiles-small::before {
- content: "\e61a";
-}
-.icon-tickets::before {
- content: "\e61b";
-}
-.icon-tickets-returned::before {
- content: "\e61c";
-}
-.icon-tickets-referred::before {
- content: "\e61d";
-}
-.icon-tickets-outline::before {
- content: "\e61e";
-}
-.icon-tickets-open::before {
- content: "\e61f";
-}
-.icon-tickets-escalate::before {
- content: "\e620";
-}
-.icon-tickets-contested::before {
- content: "\e621";
-}
-.icon-tickets-closed::before {
- content: "\e622";
-}
-.icon-tickets-cleared::before {
- content: "\e623";
-}
-.icon-tickets-arquived::before {
- content: "\e624";
-}
-.icon-tickets-active::before {
- content: "\e625";
-}
-.icon-technical-specifications::before {
- content: "\e626";
-}
-.icon-tech-support::before {
- content: "\e627";
-}
-.icon-tech-support-outline::before {
- content: "\e628";
-}
-.icon-tablet::before {
- content: "\e629";
-}
-.icon-tablet-outline::before {
- content: "\e62a";
-}
-.icon-support::before {
- content: "\e62b";
-}
-.icon-support-outline::before {
- content: "\e62c";
-}
-.icon-star::before {
- content: "\e62d";
-}
-.icon-sort::before {
- content: "\e62e";
-}
-.icon-social-outline::before {
- content: "\e62f";
-}
-.icon-smartphone::before {
- content: "\e630";
-}
-.icon-smartphone-outline::before {
- content: "\e631";
-}
-.icon-signout-outline::before {
- content: "\e632";
-}
-.icon-sign-out::before {
- content: "\e633";
-}
-.icon-shop::before {
- content: "\e634";
-}
-.icon-shop-outline::before {
- content: "\e635";
-}
-.icon-shared-outline::before {
- content: "\e636";
-}
-.icon-shared-minutes-outline::before {
- content: "\e637";
-}
-.icon-share::before {
- content: "\e638";
-}
-.icon-settings::before {
- content: "\e639";
-}
-.icon-send-invoice-outline::before {
- content: "\e63a";
-}
-.icon-see-more::before {
- content: "\e63b";
-}
-.icon-see-less::before {
- content: "\e63c";
-}
-.icon-search::before {
- content: "\e63d";
-}
-.icon-search-small::before {
- content: "\e63e";
-}
-.icon-screen-calls-outline::before {
- content: "\e63f";
-}
-.icon-save-time-outline::before {
- content: "\e640";
-}
-.icon-saas-enablement-outline::before {
- content: "\e641";
-}
-.icon-s-beam::before {
- content: "\e642";
-}
-.icon-s-beam-outline::before {
- content: "\e643";
-}
-.icon-rollover-outline::before {
- content: "\e644";
-}
-.icon-rollover-minutes::before {
- content: "\e645";
-}
-.icon-reviews-outline::before {
- content: "\e646";
-}
-.icon-reports::before {
- content: "\e647";
-}
-.icon-reports-outline::before {
- content: "\e648";
-}
-.icon-recommendation-tool::before {
- content: "\e649";
-}
-.icon-receivers-outline::before {
- content: "\e64a";
-}
-.icon-productivity-outline::before {
- content: "\e64b";
-}
-.icon-print::before {
- content: "\e64c";
-}
-.icon-plus::before {
- content: "\e64d";
-}
-.icon-plus-outline::before {
- content: "\e64e";
-}
-.icon-play::before {
- content: "\e64f";
-}
-.icon-platform-as-service-outline::before {
- content: "\e650";
-}
-.icon-plans::before {
- content: "\e651";
-}
-.icon-plans-outline::before {
- content: "\e652";
-}
-.icon-pie-chart::before {
- content: "\e653";
-}
-.icon-photos::before {
- content: "\e654";
-}
-.icon-photos-outline::before {
- content: "\e655";
-}
-.icon-phone-data-outline::before {
- content: "\e656";
-}
-.icon-payments::before {
- content: "\e657";
-}
-.icon-payments-outline::before {
- content: "\e658";
-}
-.icon-pause::before {
- content: "\e659";
-}
-.icon-password::before {
- content: "\e65a";
-}
-.icon-password-outline::before {
- content: "\e65b";
-}
-.icon-overview::before {
- content: "\e65c";
-}
-.icon-overview-small::before {
- content: "\e65d";
-}
-.icon-overages::before {
- content: "\e65e";
-}
-.icon-overages-outline::before {
- content: "\e65f";
-}
-.icon-outage-outline::before {
- content: "\e660";
-}
-.icon-orders::before {
- content: "\e661";
-}
-.icon-orders-outline::before {
- content: "\e662";
-}
-.icon-optional-applications-outline::before {
- content: "\e663";
-}
-.icon-office-at-hand-outline::before {
- content: "\e664";
-}
-.icon-offers::before {
- content: "\e665";
-}
-.icon-offers-outline::before {
- content: "\e666";
-}
-.icon-notifications::before {
- content: "\e667";
-}
-.icon-notifications-outline::before {
- content: "\e668";
-}
-.icon-normal-screen::before {
- content: "\e669";
-}
-.icon-nights-weekends-outline::before {
- content: "\e66a";
-}
-.icon-new-requests-outline::before {
- content: "\e66b";
-}
-.icon-network::before {
- content: "\e66c";
-}
-.icon-network-dashboard::before {
- content: "\e66d";
-}
-.icon-netbook::before {
- content: "\e66e";
-}
-.icon-netbook-outline::before {
- content: "\e66f";
-}
-.icon-music::before {
- content: "\e670";
-}
-.icon-music-video::before {
- content: "\e671";
-}
-.icon-music-video-outline::before {
- content: "\e672";
-}
-.icon-music-outline::before {
- content: "\e673";
-}
-.icon-modem::before {
- content: "\e674";
-}
-.icon-modem-outline::before {
- content: "\e675";
-}
-.icon-mobile-insurance::before {
- content: "\e676";
-}
-.icon-mobile-insurance-outline::before {
- content: "\e677";
-}
-.icon-mobile-2-mobile-outline::before {
- content: "\e678";
-}
-.icon-missed-calls-outline::before {
- content: "\e679";
-}
-.icon-minutes::before {
- content: "\e67a";
-}
-.icon-minutes-outline::before {
- content: "\e67b";
-}
-.icon-messaging::before {
- content: "\e67c";
-}
-.icon-messaging-toolkit-outline::before {
- content: "\e67d";
-}
-.icon-messaging-outline::before {
- content: "\e67e";
-}
-.icon-messaging-email::before {
- content: "\e67f";
-}
-.icon-messaging-email-outline::before {
- content: "\e680";
-}
-.icon-message-small::before {
- content: "\e681";
-}
-.icon-maintenance::before {
- content: "\e682";
-}
-.icon-location-pin::before {
- content: "\e683";
-}
-.icon-location-pin-small::before {
- content: "\e684";
-}
-.icon-local-search::before {
- content: "\e685";
-}
-.icon-local-long-distance-outline::before {
- content: "\e686";
-}
-.icon-list::before {
- content: "\e687";
-}
-.icon-learn::before {
- content: "\e688";
-}
-.icon-learn-outline::before {
- content: "\e689";
-}
-.icon-laptop::before {
- content: "\e68a";
-}
-.icon-landline::before {
- content: "\e68b";
-}
-.icon-landline-outline::before {
- content: "\e68c";
-}
-.icon-invoices::before {
- content: "\e68d";
-}
-.icon-invoices-outline::before {
- content: "\e68e";
-}
-.icon-inventory::before {
- content: "\e68f";
-}
-.icon-intranet-outline::before {
- content: "\e690";
-}
-.icon-interpreter::before {
- content: "\e691";
-}
-.icon-interpreter-outline::before {
- content: "\e692";
-}
-.icon-internet::before {
- content: "\e693";
-}
-.icon-internet-outline::before {
- content: "\e694";
-}
-.icon-internet-24-outline::before {
- content: "\e695";
-}
-.icon-internet-18-outline::before {
- content: "\e696";
-}
-.icon-international-outline::before {
- content: "\e697";
-}
-.icon-international-long-distance-outline::before {
- content: "\e698";
-}
-.icon-international-data-outline::before {
- content: "\e699";
-}
-.icon-installation-outline::before {
- content: "\e69a";
-}
-.icon-information::before {
- content: "\e69b";
-}
-.icon-info-success::before {
- content: "\e69c";
-}
-.icon-info-alert::before {
- content: "\e69d";
-}
-.icon-info-alert-outline::before {
- content: "\e69e";
-}
-.icon-included-checkmark::before {
- content: "\e69f";
-}
-.icon-included-checkmark-outline::before {
- content: "\e6a0";
-}
-.icon-hotspot::before {
- content: "\e6a1";
-}
-.icon-hotspot-outline::before {
- content: "\e6a2";
-}
-.icon-hotspot-access-outline::before {
- content: "\e6a3";
-}
-.icon-home::before {
- content: "\e6a4";
-}
-.icon-help::before {
- content: "\e6a5";
-}
-.icon-help-outline::before {
- content: "\e6a6";
-}
-.icon-hd::before {
- content: "\e6a7";
-}
-.icon-hd-outline::before {
- content: "\e6a8";
-}
-.icon-hamburger::before {
- content: "\e6a9";
-}
-.icon-group-outline::before {
- content: "\e6aa";
-}
-.icon-gps::before {
- content: "\e6ab";
-}
-.icon-gps-outline::before {
- content: "\e6ac";
-}
-.icon-go-paperless-email-outline::before {
- content: "\e6ad";
-}
-.icon-global-messaging-outline::before {
- content: "\e6ae";
-}
-.icon-gamepad-outline::before {
- content: "\e6af";
-}
-.icon-game-devices::before {
- content: "\e6b0";
-}
-.icon-full-screen::before {
- content: "\e6b1";
-}
-.icon-forward-calls-outline::before {
- content: "\e6b2";
-}
-.icon-forum::before {
- content: "\e6b3";
-}
-.icon-forum-outline::before {
- content: "\e6b4";
-}
-.icon-filter::before {
- content: "\e6b5";
-}
-.icon-extras::before {
- content: "\e6b6";
-}
-.icon-extras-outline::before {
- content: "\e6b7";
-}
-.icon-erase::before {
- content: "\e6b8";
-}
-.icon-envelope::before {
- content: "\e6b9";
-}
-.icon-envelope-outline::before {
- content: "\e6ba";
-}
-.icon-enterprise-messaging-outline::before {
- content: "\e6bb";
-}
-.icon-edit::before {
- content: "\e6bc";
-}
-.icon-duplicate::before {
- content: "\e6bd";
-}
-.icon-dropdown-up::before {
- content: "\e6be";
-}
-.icon-dropdown-down::before {
- content: "\e6bf";
-}
-.icon-download::before {
- content: "\e6c0";
-}
-.icon-download-outline::before {
- content: "\e6c1";
-}
-.icon-disputes::before {
- content: "\e6c2";
-}
-.icon-detailed-billing::before {
- content: "\e6c3";
-}
-.icon-detailed-billing-outline::before {
- content: "\e6c4";
-}
-.icon-desktop-outline::before {
- content: "\e6c5";
-}
-.icon-data::before {
- content: "\e6c6";
-}
-.icon-data-outline::before {
- content: "\e6c7";
-}
-.icon-data-additional-outline::before {
- content: "\e6c8";
-}
-.icon-compare::before {
- content: "\e6c9";
-}
-.icon-cloud-storage-outline::before {
- content: "\e6ca";
-}
-.icon-cloud-outline::before {
- content: "\e6cb";
-}
-.icon-cloud-computing-outline::before {
- content: "\e6cc";
-}
-.icon-cloud-backup::before {
- content: "\e6cd";
-}
-.icon-cloud-backup-outline::before {
- content: "\e6ce";
-}
-.icon-circle-information-outline::before {
- content: "\e6cf";
-}
-.icon-circle-action-plus-outline::before {
- content: "\e6d0";
-}
-.icon-circle-action-minus-outline::before {
- content: "\e6d1";
-}
-.icon-circle-action-empty::before {
- content: "\e6d2";
-}
-.icon-circle-action-delete-outline::before {
- content: "\e6d3";
-}
-.icon-circle-action-close::before {
- content: "\e6d4";
-}
-.icon-circle-action-check-outline::before {
- content: "\e6d5";
-}
-.icon-circle-action-remove::before {
- content: "\e6d6";
-}
-.icon-circle-action-add::before {
- content: "\e6d7";
-}
-.icon-chip-outline::before {
- content: "\e6d8";
-}
-.icon-chevron-up::before {
- content: "\e6d9";
-}
-.icon-chevron-right::before {
- content: "\e6da";
-}
-.icon-chevron-left::before {
- content: "\e6db";
-}
-.icon-chevron-down::before {
- content: "\e6dc";
-}
-.icon-checkbox-checkmark::before {
- content: "\e6dd";
-}
-.icon-chat::before {
- content: "\e6de";
-}
-.icon-chat-small::before {
- content: "\e6df";
-}
-.icon-case-studies::before {
- content: "\e6e0";
-}
-.icon-cart::before {
- content: "\e6e1";
-}
-.icon-cart-small::before {
- content: "\e6e2";
-}
-.icon-camera::before {
- content: "\e6e3";
-}
-.icon-camera-outline::before {
- content: "\e6e4";
-}
-.icon-calendar-outline::before {
- content: "\e6e5";
-}
-.icon-business::before {
- content: "\e6e6";
-}
-.icon-business-tv::before {
- content: "\e6e7";
-}
-.icon-business-tv-outline::before {
- content: "\e6e8";
-}
-.icon-business-tv-additional-packs-outline::before {
- content: "\e6e9";
-}
-.icon-business-outline::before {
- content: "\e6ea";
-}
-.icon-business-center::before {
- content: "\e6eb";
-}
-.icon-business-center-outline::before {
- content: "\e6ec";
-}
-.icon-bundles::before {
- content: "\e6ed";
-}
-.icon-bundles-outline::before {
- content: "\e6ee";
-}
-.icon-billing::before {
- content: "\e6ef";
-}
-.icon-billing-history-outline::before {
- content: "\e6f0";
-}
-.icon-billing-dashboard::before {
- content: "\e6f1";
-}
-.icon-bd-maps::before {
- content: "\e6f2";
-}
-.icon-basicphone::before {
- content: "\e6f3";
-}
-.icon-basicphone-outline::before {
- content: "\e6f4";
-}
-.icon-barcode-outline::before {
- content: "\e6f5";
-}
-.icon-bar-chart-vertical::before {
- content: "\e6f6";
-}
-.icon-bar-chart-horizontal::before {
- content: "\e6f7";
-}
-.icon-arrow-up::before {
- content: "\e6f8";
-}
-.icon-arrow-up-right::before {
- content: "\e6f9";
-}
-.icon-arrow-up-left::before {
- content: "\e6fa";
-}
-.icon-arrow-up-circle::before {
- content: "\e6fb";
-}
-.icon-arrow-right::before {
- content: "\e6fc";
-}
-.icon-arrow-right-circle::before {
- content: "\e6fd";
-}
-.icon-arrow-left::before {
- content: "\e6fe";
-}
-.icon-arrow-left-circle::before {
- content: "\e6ff";
-}
-.icon-arrow-down::before {
- content: "\e700";
-}
-.icon-arrow-down-right::before {
- content: "\e701";
-}
-.icon-arrow-down-left::before {
- content: "\e702";
-}
-.icon-arrow-down-circle::before {
- content: "\e703";
-}
-.icon-arrow-double-right::before {
- content: "\e704";
-}
-.icon-arrow-double-left::before {
- content: "\e705";
-}
-.icon-apps-media::before {
- content: "\e706";
-}
-.icon-apps-media-outline::before {
- content: "\e707";
-}
-.icon-apps-marketplace::before {
- content: "\e708";
-}
-.icon-apps-marketplace-outline::before {
- content: "\e709";
-}
-.icon-analytics::before {
- content: "\e70a";
-}
-.icon-alt-media-subscription-outline::before {
- content: "\e70b";
-}
-.icon-all-locations::before {
- content: "\e70c";
-}
-.icon-all-devices::before {
- content: "\e70d";
-}
-.icon-all-devices-outline::before {
- content: "\e70e";
-}
-.icon-alarms::before {
- content: "\e70f";
-}
-.icon-alarms-outline::before {
- content: "\e710";
-}
-.icon-address-ip-outline::before {
- content: "\e711";
-}
-.icon-addons::before {
- content: "\e712";
-}
-.icon-addons-outline::before {
- content: "\e713";
-}
-.icon-additional-services::before {
- content: "\e714";
-}
-.icon-additional-minutes-outline::before {
- content: "\e715";
-}
-.icon-add-widget::before {
- content: "\e716";
-}
-.icon-activity-feed::before {
- content: "\e717";
-}
-.icon-accessories::before {
- content: "\e718";
-}
-.icon-accessories-outline::before {
- content: "\e719";
-}
-.icon-foundation-account::before {
- content: "\e71a";
-}
-.icon-billing-account::before {
- content: "\e71b";
-}
-.icon-infinite::before {
- content: "\e71c";
-}
-.icon-social-business-community::before {
- content: "\e71d";
-}
-.icon-social-facebook::before {
- content: "\e71e";
-}
-.icon-social-feed::before {
- content: "\e71f";
-}
-.icon-social-google-plus::before {
- content: "\e720";
-}
-.icon-social-linkedin::before {
- content: "\e721";
-}
-.icon-social-network-exchange::before {
- content: "\e722";
-}
-.icon-social-twitter-bird::before {
- content: "\e723";
-}
-.icon-social-twitter::before {
- content: "\e724";
-}
-.icon-social-youtube::before {
- content: "\e725";
-}
-.icon-blocked::before {
- content: "\e726";
-}
-.icon-talk-text::before {
- content: "\e727";
-}
-.icon-blocked::before {
- content: "\e726";
-}
-.icon-group::before {
- content: "\e72c";
-}
-.icon-group-create::before {
- content: "\e72b";
-}
-*/
-.headerContainer {
- left: 0px; top: 0px; width: 100%; color: rgb(255, 255, 255); line-height: 50px; position: fixed; z-index: 999; background-color: rgb(6, 122, 180);
-}
-.headerContentContainer {
- margin: auto; width: 980px; height: 50px;
-}
-.headerContentContainer .primaryMenuContainer {
- font-family: arial; font-size: 18px;
-}
-.headerContentContainer .primaryMenuContainer .linkToRegistration {
- color: rgb(255, 255, 255); float: right;
-}
-.headerContentContainer .primaryMenuContainer .ATTLogo {
- background: url("../images/common/header/attLogo.png") no-repeat -10px -10px; width: 36px; height: 36px; margin-top: 7px; margin-right: 35px; margin-left: 29px; float: left;
-}
-.headerContentContainer .primaryMenuContainer .attHomeContainer {
- float: left; cursor: pointer;
-}
-.headerContentContainer .primaryMenuContainer .attHomeContainer .businessCenterR {
- font-family: clearviewatt_ltbold; margin-right: 4px; margin-left: 2px; float: left;
-}
-.headerContentContainer .primaryMenuContainer .attHomeContainer .businessCenterR a {
- color: rgb(255, 255, 255); font-family: clearviewatt_ltbold; font-size: 18px; text-decoration: none;
-}
-.headerContentContainer .primaryMenuContainer .attHomeContainer .businessCenterR a:hover {
- color: rgb(191, 231, 251); text-decoration: none;
-}
-.headerContentContainer .primaryMenuContainer .attHomeContainer .businessCenterR a:active {
- color: rgb(191, 231, 251); text-decoration: none;
-}
-.headerContentContainer .primaryMenuContainer .attHomeContainer .businessCenterR:hover {
- margin-top: -2px;
-}
-.headerContentContainer .primaryMenuContainer .attHomeContainer .businessCenterR:active {
- margin-top: -2px;
-}
-.headerContentContainer .primaryMenuContainer .primaryMenuOptionsContainer .primaryMenuOptionLink {
- color: rgb(255, 255, 255); font-family: arial; font-size: 18px; text-decoration: none; margin-left: 30px; float: left; cursor: pointer;
-}
-.headerContentContainer .primaryMenuContainer .primaryMenuOptionsContainer .primaryMenuOptionLink:hover {
- color: rgb(191, 231, 251); text-decoration: none; margin-top: -2px;
-}
-.headerContentContainer .primaryMenuContainer .primaryMenuOptionsContainer .primaryMenuOptionLink:focus {
- color: rgb(191, 231, 251); text-decoration: none; margin-top: -2px;
-}
-.headerContentContainer .primaryMenuContainer .primaryMenuOptionsContainer .primaryMenuOptionLink:active {
- color: rgb(191, 231, 251); text-decoration: none; margin-top: -2px;
-}
-.headerContentContainer .primaryMenuContainer .pageNameContainer .pageName {
- color: rgb(255, 255, 255); font-family: clearviewatt_ltbold; font-size: 18px; text-decoration: none; margin-left: 30px; float: left; cursor: pointer;
-}
-.headerContentContainer .primaryMenuContainer .pageNameContainer .pageName:hover {
- color: rgb(191, 231, 251); text-decoration: none; margin-top: -2px;
-}
-.headerContentContainer .primaryMenuContainer .pageNameContainer .pageName:active {
- color: rgb(191, 231, 251); text-decoration: none; margin-top: -2px;
-}
-.headerContentContainer .primaryMenuContainer .selectedOptionIndicator {
- border-width: 0px 8px 8px; border-style: solid; border-color: transparent transparent rgb(255, 255, 255); width: 0px; height: 0px; margin-top: 43px; position: absolute;
-}
-.headerContentContainer .primaryMenuContainer .loginIcon {
- background: url("") no-repeat -10px -41px; width: 16px; height: 21px; color: rgb(255, 255, 255); line-height: 50px; font-size: 18px; margin-top: 14px; margin-right: 10px; float: left; position: relative; cursor: pointer;
-}
-.headerContentContainer .primaryMenuContainer .loginIcon:hover {
- background-position: -10px -10px; margin-top: 12px;
-}
-.headerContentContainer .primaryMenuContainer .loginIcon:focus {
- background-position: -10px -10px; margin-top: 12px;
-}
-.headerContentContainer .primaryMenuContainer .icon-cart {
- background-position: -1000px; color: rgb(255, 255, 255); line-height: 50px; font-size: 18px; margin-right: 34px; float: left; position: relative; cursor: pointer;
-}
-.headerContentContainer .primaryMenuContainer .icon-cart:hover {
- color: rgb(191, 231, 251); margin-top: -2px;
-}
-.headerContentContainer .primaryMenuContainer .headerIconContainer {
- height: 50px; float: right; position: relative;
-}
-.headerContentContainer .primaryMenuContainer .headerIconContainer .loginName {
- line-height: 50px; font-family: arial; font-size: 12px; margin-right: 31px; float: left; position: relative;
-}
-.headerContentContainer .primaryMenuContainer .headerIconContainer .chatIcon {
- background: url("../images/common/header/att-chat-sprite.png") no-repeat -10px -39px; width: 18px; height: 19px; color: rgb(255, 255, 255); line-height: 50px; margin-top: 16px; margin-right: 32px; float: left; position: relative; cursor: pointer;
-}
-.headerContentContainer .primaryMenuContainer .headerIconContainer .chatIcon:hover {
- background-position: -10px -10px; margin-top: 14px;
-}
-.headerContentContainer .primaryMenuContainer .headerIconContainer .chatIcon:focus {
- background-position: -10px -10px; margin-top: 14px;
-}
-.headerContentContainer .primaryMenuContainer .headerIconContainer .searchIcon {
- background-position: -1000px; color: rgb(255, 255, 255); line-height: 50px; margin-right: 31px; float: left; position: relative; cursor: pointer;
-}
-.headerContentContainer .primaryMenuContainer .headerIconContainer .searchIcon:hover {
- color: rgb(191, 231, 251); margin-top: -2px;
-}
-.selectedPrimaryMenuOption {
- color: rgb(255, 255, 255); font-family: clearviewatt_ltbold !important;
-}
-.secondaryMenuContainer {
- width: 100%; height: 50px; color: rgb(102, 102, 102); line-height: 50px; font-family: arial; font-size: 16px; margin-top: 50px; margin-bottom: 50px; border-bottom-color: rgb(221, 221, 221); border-bottom-width: 1px; border-bottom-style: solid; float: left; background-color: rgb(255, 255, 255);
-}
-.secondaryMenuContainer .secondaryMenuContentContainer {
- margin: auto; width: 980px;
-}
-.secondaryMenuContainer .secondaryMenuContentContainer .secondaryMenuOption {
- overflow: hidden; float: left; cursor: pointer;
-}
-.secondaryMenuContainer .secondaryMenuContentContainer .secondaryMenuOption .selectionDiv {
- top: -4px; height: 4px; position: relative; background-color: rgb(6, 122, 180);
-}
-.secondaryMenuContainer .secondaryMenuContentContainer .secondaryMenuOption .secondaryMenuOptionLink {
- outline: 0px; color: rgb(102, 102, 102); text-decoration: none;
-}
-.secondaryMenuContainer .secondaryMenuContentContainer .secondaryMenuOption .secondaryMenuOptionLink:hover {
- font-family: clearviewatt_ltbold; font-size: 16px; text-decoration: none;
-}
-.secondaryMenuContainer .secondaryMenuContentContainer .secondaryMenuOption .secondaryMenuOptionLink:focus {
- font-family: clearviewatt_ltbold; font-size: 16px; text-decoration: none;
-}
-.selectedSecondaryMenuOption {
- font-family: clearviewatt_ltbold; font-size: 16px;
-}
-.homePageNameHighlight {
- font-family: clearviewatt_ltbold; font-size: 16px;
-}
-.megaMenuContainer {
- width: 100%; overflow: auto; margin-top: 101px; position: fixed; z-index: 3000; min-height: 140px; max-height: 500px; opacity: 1; background-color: rgb(255, 255, 255);
-}
-.megaMenuContentContainer {
- margin: auto; width: 980px;
-}
-.megaMenuContentContainer .megaMenuTable {
- width: 980px;
-}
-.megaMenuContentContainer .megaMenuTable .megaMenuRow .categoryContainerColumn {
- vertical-align: top;
-}
-.megaMenuContentContainer .megaMenuTable .megaMenuRow .categoryContainerColumn .categoryContainer {
- margin-bottom: 32px; float: left;
-}
-.megaMenuContentContainer .megaMenuTable .megaMenuRow .categoryContainerColumn .categoryContainer .categoryTitle {
- color: rgb(68, 68, 68); font-family: clearviewatt_ltbold; font-size: 14px; margin-top: 36px; margin-bottom: 22px;
-}
-.megaMenuContentContainer .megaMenuTable .megaMenuRow .categoryContainerColumn .categoryContainer .categoryOptionLink {
- outline: 0px; color: rgb(68, 68, 68); font-family: clearviewatt; font-size: 12px; text-decoration: none; margin-bottom: 13px;
-}
-.megaMenuContentContainer .megaMenuTable .megaMenuRow .categoryContainerColumn .categoryContainer .categoryOptionLink:hover {
- color: rgb(25, 157, 223); text-decoration: none;
-}
-.megaMenuContentContainer .megaMenuTable .megaMenuRow .categoryContainerColumn .categoryContainer .categoryOptionLink:focus {
- color: rgb(25, 157, 223); text-decoration: none;
-}
-.megaMenuContentContainer .megaMenuTable .megaMenuRow .categoryContainerColumn .categoryContainer .categoryOptionLink:active {
- color: rgb(25, 157, 223); text-decoration: none;
-}
-.megaMenuContentContainer .megaMenuTable .megaMenuSecondRow .categoryTitle {
- margin-top: 4px !important;
-}
-.addMargin {
- margin-top: 50px;
-}
-.contents {
- padding-top: 100px;
-}
-.megaMenuContentContainer .megaMenuTable li {
- float: left;
-}
-.megaMenuContentContainer ul {
- margin: 0px;
-}
-.headerContainer .secondaryMenuContainer {
- margin: 0px;
-}
-.unselectable {
- -ms-user-select: none; -webkit-user-select: none; -moz-user-select: none; -o-user-select: none; user-select: none; -khtml-user-select: none;
-}
-.chatBox {
- background: rgb(242, 242, 242); border: 1px solid rgb(187, 187, 187); top: 50px; width: 250px; right: 30px; display: none; position: absolute; z-index: 1000; min-height: 145px; box-sizing: border-box; box-shadow: 0px 4px 4px rgba(0,0,0,0.25); -webkit-box-sizing: border-box; -moz-box-sizing: border-box;
-}
-.chatBox .arrow {
- left: 233px; top: -8px; width: 0px; height: 0px; border-right-color: transparent; border-bottom-color: rgb(255, 255, 255); border-left-color: transparent; border-right-width: 8px; border-bottom-width: 8px; border-left-width: 8px; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; position: absolute; z-index: 1001;
-}
-.chatBox-header {
- padding: 0px 25px; width: 250px; height: 85px; position: relative; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box;
-}
-.chatBox-heading {
- left: 25px; top: 18px; color: rgb(68, 68, 68); line-height: 28px; font-family: omnes_attlight; font-size: 24px; position: absolute;
-}
-.chatBox-question {
- left: 25px; top: 53px; color: rgb(68, 68, 68); line-height: 16.8px; font-family: arial; font-size: 13px; position: absolute;
-}
-.circle_close_chat {
- top: 22px; right: 20px; color: rgb(68, 68, 68); font-size: 14px; position: absolute; cursor: pointer;
-}
-.chatBox-body {
- padding: 0px 15px; width: 250px; color: rgb(68, 68, 68); font-size: 12px; position: relative; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box;
-}
-.chat-option {
- height: 35px; line-height: 45px; margin-bottom: 10px; position: relative;
-}
-.chat-option .hr-chatbox {
- margin: 10px 0px; padding: 0px; border: 0px currentColor !important; width: inherit; height: 1px; display: block;
-}
-.chat-icon-info {
- top: 15px; right: 6px; font-size: 16px; position: absolute;
-}
-.chat-option > span {
- left: 10px; top: 0px; position: absolute; cursor: pointer;
-}
-.chat-option > span {
- left: 10px; top: 0px; position: absolute;
-}
-.chat-option > span:hover {
- color: rgb(6, 122, 180);
-}
-.footerContainer {
- background: 0px 0px rgb(6, 122, 180); margin: 0px auto; width: 100%;
-}
-.footerContainer .footerWrapper {
- margin: 0px auto; width: 980px; padding-bottom: 25px; background-color: rgb(6, 122, 180);
-}
-.footerContainer .footerWrapper .footerItem {
- margin: auto; width: 980px; height: 60px; color: rgb(255, 255, 255); line-height: 1; overflow: hidden; font-family: arial; font-size: 12px;
-}
-.footerContainer .footerWrapper .footerItem .divider {
- width: 100px; margin-top: 10px; margin-bottom: 10px; border-bottom-color: rgb(255, 255, 255); border-bottom-width: 1px; border-bottom-style: solid;
-}
-.footerContainer .footerWrapper .footerItem .customerSupport {
- width: 160px; margin-left: 30px; float: left;
-}
-.footerContainer .footerWrapper .footerItem .customerSupport .customerHelp {
- font-size: 14px; margin-top: 45px; margin-bottom: 20px;
-}
-.footerContainer .footerWrapper .footerItem .customerSupport a {
- color: rgb(255, 255, 255) !important;
-}
-.footerContainer .footerWrapper .footerItem .customerSupport a:hover {
- text-decoration: none;
-}
-.footerContainer .footerWrapper .footerItem .legalInfo {
- width: 160px; float: left;
-}
-.footerContainer .footerWrapper .footerItem .legalInfo .legal {
- font-size: 14px; margin-top: 45px; margin-bottom: 20px;
-}
-.footerContainer .footerWrapper .footerItem .legalInfo a {
- color: rgb(255, 255, 255) !important;
-}
-.footerContainer .footerWrapper .footerItem .legalInfo a:hover {
- text-decoration: none;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection {
- width: 295px; float: left;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeSave {
- font-size: 14px; margin-top: 45px; margin-bottom: 20px;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeToSection {
- overflow: hidden; margin-top: 15px;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeToSection .emailAddress {
- width: 170px; float: left;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeToSection .emailAddress input {
- padding: 5px 10px 5px 5px; width: 152px; color: rgb(255, 255, 255) !important; background-color: rgb(6, 122, 180);
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeToSection .subscribeBtn {
- border-radius: 1px 5px 5px 1px; top: 1px; width: 95px; height: 30px; text-align: center; right: 7px; color: rgb(6, 122, 180); font-size: 14px; vertical-align: middle; float: left; position: relative; cursor: pointer; background-color: rgb(255, 255, 255);
-}
-.footerContainer .footerWrapper .footerItem .socialMedia {
- margin-left: 0px; float: left;
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .followAtt {
- font-size: 14px; margin-top: 45px; margin-bottom: 20px;
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .socialFeeds {
- margin-top: 20px; margin-left: -8px;
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .socialFeeds span {
- margin: 0px; padding: 5px; font-size: 30px;
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .socialFeeds span a {
- margin: 0px; padding: 0px; color: rgb(255, 255, 255);
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .socialFeeds span a:hover {
- text-decoration: none;
-}
-.footerContainer .footerWrapper .dividerBottom {
- margin: auto; width: 920px; border-bottom-color: rgb(255, 255, 255); border-bottom-width: 1px; border-bottom-style: solid;
-}
-.footerContainer .footerWrapper .feedbackSection {
- margin: auto; width: 920px; display: none;
-}
-.footerContainer .footerWrapper .feedbackSection .dividerTop {
- margin: auto; width: 920px; border-bottom-color: rgb(255, 255, 255); border-bottom-width: 1px; border-bottom-style: solid;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent {
- margin: 30px auto;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent #feedbackForm {
- height: 120px;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent .feedbackInfo {
- width: 270px; color: rgb(255, 255, 255); font-family: arial; font-size: 12px; margin-top: -5px; margin-right: 30px; float: left;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent .feedbackTextSection .feedbackText {
- padding: 10px; border-radius: 5px; border: 1px solid rgb(255, 255, 255); width: 500px; height: 100px; color: rgb(255, 255, 255); font-family: arial; font-size: 14px; float: left; cursor: text; background-color: rgb(6, 122, 180); resize: none;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent .feedbackTextSection .feedbackSubmitButton {
- padding: 5px; border-radius: 5px; border: currentColor; width: 82px; color: rgb(6, 122, 180); font-family: arial; font-size: 14px; margin-top: 92px; margin-left: 16px; cursor: pointer; background-color: rgb(255, 255, 255);
-}
-.footerContainer .footerWrapper .feedbackResultMsg {
- margin: 0px auto; width: 980px; text-align: center; color: rgb(255, 255, 255); line-height: 70px; font-family: arial; font-size: 18px; display: none;
-}
-.footerContainer .footerWrapper .feedbackResultMsg #feedbackMsgCheck {
- font-size: 20px; margin-right: 20px;
-}
-.footerContainer .footerWrapper #feedbackResultDivider {
- display: none;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv {
- margin: auto; max-width: 110px;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv .feedbackButton {
- background: rgb(255, 255, 255); margin: -1px auto auto; padding: 5px 10px; border-radius: 0px 0px 5px 5px; border: currentColor; color: rgb(6, 122, 180); font-family: arial; font-size: 14px; cursor: pointer;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv .closeFeedbackButton {
- background: rgb(255, 255, 255); margin: -1px auto auto; padding: 5px 10px; border-radius: 0px 0px 5px 5px; border: currentColor; color: rgb(6, 122, 180); font-family: arial; font-size: 14px; cursor: pointer;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv .feedbackButton span {
- padding-left: 10px; background-image: none;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv .closeFeedbackButton span {
- padding-left: 10px; background-image: none;
-}
-.footerContainer .footerWrapper .attFooterInfo {
- margin: auto; width: 980px; color: rgb(255, 255, 255); overflow: hidden; font-family: arial; font-size: 12px;
-}
-.footerContainer .footerWrapper .attFooterInfo a {
- margin: 0px; padding: 0px; color: rgb(255, 255, 255); text-decoration: underline;
-}
-.footerContainer .footerWrapper .attFooterInfo .footerLastSection {
- overflow: hidden; margin-top: 40px;
-}
-.footerContainer .footerWrapper .attFooterInfo span {
- padding-right: 5px; padding-left: 3px; border-right-color: rgb(255, 255, 255); border-right-width: 1px; border-right-style: solid;
-}
-.footerContainer .footerWrapper .attFooterInfo span:last-child {
- border: currentColor;
-}
-.footerContainer .footerWrapper .attFooterInfo .attLogo {
- background: url("../images/common/footer/footer-attolympiclogo.png") repeat-x 0px 0px; width: 150px; height: 77px; margin-right: 0px; margin-left: 17px; float: left;
-}
-.footerContainer .footerWrapper .attFooterInfo .attQuality {
- background: url("../images/common/footer/footer-consumerinfo.png") repeat-x 0px 0px; top: -5px; width: 79px; height: 82px; margin-right: 103px; float: left; position: relative;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise {
- width: 64%; float: right;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise .privacyPolicy {
- margin-top: 17px;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise .privacyPolicy a {
- text-decoration: underline;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise .privacyPolicy a span {
- padding: 0px;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise .privacyPolicy a:hover {
- text-decoration: underline;
-}
-/*
-html {
- color: rgb(68, 68, 68);
-}
-button {
- color: rgb(68, 68, 68);
-}
-input {
- color: rgb(68, 68, 68);
-}
-select {
- color: rgb(68, 68, 68);
-}
-textarea {
- color: rgb(68, 68, 68);
-}
-body {
- line-height: 1.4; font-family: Arial, Helvetica, sans-serif; font-size: 12px;
-}
-::selection {
- background: rgb(6, 122, 180); color: rgb(255, 255, 255) !important; text-shadow: none;
-}
-hr {
- border-width: 1px 0px 0px; border-style: solid none none; border-color: rgb(227, 227, 227) currentColor currentColor; margin: 10px 0px; padding: 0px; height: 1px; display: block;
-}
-img {
- vertical-align: middle;
-}
-fieldset {
- margin: 0px; padding: 0px; border: 0px currentColor;
-}
-textarea {
- resize: vertical;
-}
-.chromeframe {
- background: rgb(242, 242, 242); margin: 2px 0px; padding: 2px 0px; color: rgb(68, 68, 68);
-}
-body {
- background: 0px 0px rgb(242, 242, 242); margin: 0px; padding: 0px; outline: 0px; border: 0px currentColor; text-align: left; color: rgb(68, 68, 68); line-height: 1.4; font-family: "clearviewatt"; font-size: 12px; font-weight: normal; vertical-align: baseline; white-space: normal;
-}
-p {
- margin-bottom: 15px;
-}
-a {
- color: rgb(6, 122, 180); font-family: inherit; text-decoration: none; display: inline-block; cursor: pointer;
-}
-a:hover {
- color: rgb(25, 157, 223); text-decoration: none; outline-style: none; outline-color: invert;
-}
-a:active {
- color: rgb(124, 198, 255); text-decoration: none; outline-style: none; outline-color: invert;
-}
-a:focus {
- text-decoration: none; outline-style: none; outline-color: invert;
-}
-sup {
- top: -0.4em; color: inherit; font-family: inherit; font-size: 0.6em; vertical-align: baseline; position: relative;
-}
-img {
- vertical-align: middle;
-}
-span {
- color: inherit; line-height: inherit; font-family: inherit; font-size: inherit;
-}
-.bui-text-color {
- color: rgb(68, 68, 68);
-}
-.bui-active-text-color {
- color: rgb(6, 122, 180);
-}
-.bui-highlight-text-color {
- color: rgb(128, 128, 128);
-}
-.bui-link-text-color {
- color: rgb(6, 122, 180);
-}
-.bui-promotion-text-color {
- color: rgb(254, 137, 7);
-}
-.bui-bold {
- font-family: "clearviewatt"; font-weight: bold;
-}
-.bui-italic {
- font-family: "clearviewatt"; font-style: italic;
-}
-.bui-bold-italic {
- font-family: "clearviewatt"; font-style: italic; font-weight: bold;
-}
-.bui-light {
- font-family: "clearviewatt_lt"; font-weight: normal;
-}
-.bui-light-italic {
- font-family: "clearviewatt_lt"; font-style: italic; font-weight: normal;
-}
-.bui-omnes-light {
- font-family: "omnes_attlight"; font-weight: normal;
-}
-.bui-omnes-light-italic {
- font-family: "omnes_attlight"; font-style: italic; font-weight: normal;
-}
-.bui-omnes-med {
- font-family: "omnes_attmedium"; font-weight: normal;
-}
-.bui-omnes-med-italic {
- font-family: "omnes_attmedium"; font-style: italic; font-weight: normal;
-}
-.bui-omnes-reg {
- font-family: "omnes_attregular"; font-weight: normal;
-}
-.bui-omnes-reg-italic {
- font-family: "omnes_attregular"; font-style: italic; font-weight: normal;
-}
-.bui-default-background-color {
- background-color: rgb(242, 242, 242);
-}
-.bui-content-background-color {
- background-color: rgb(255, 255, 255);
-}
-.bui-font-title {
- font-family: "clearviewatt"; font-weight: bold;
-}
-.bui-font-subtitle {
- font-family: "clearviewatt"; font-weight: bold;
-}
-.bui-letter-space {
- letter-spacing: 3px !important;
-}
-.bui-h1-size {
- font-size: 42px;
-}
-.bui-h2-size {
- font-size: 30px;
-}
-.bui-h3-size {
- font-size: 21px;
-}
-.bui-h4-size {
- font-size: 15px;
-}
-.bui-h5-size {
- font-size: 13px;
-}
-.bui-h6-size {
- font-size: 11px;
-}
-.bui-f10-size {
- font-size: 10px;
-}
-.bui-f11-size {
- font-size: 11px;
-}
-.bui-f12-size {
- font-size: 12px;
-}
-.bui-f14-size {
- font-size: 14px;
-}
-.bui-f16-size {
- font-size: 16px;
-}
-.bui-f18-size {
- font-size: 18px;
-}
-.bui-f20-size {
- font-size: 20px;
-}
-.bui-f26-size {
- font-size: 26px;
-}
-.bui-f32-size {
- font-size: 32px;
-}
-.bui-f36-size {
- font-size: 36px;
-}
-.bui-f50-size {
- font-size: 50px;
-}
-.bui-f60-size {
- font-size: 60px;
-}
-.bui-lh-5 {
- line-height: 5px;
-}
-.bui-lh-10 {
- line-height: 10px;
-}
-.bui-lh-15 {
- line-height: 15px;
-}
-.bui-lh-20 {
- line-height: 20px;
-}
-.bui-lh-25 {
- line-height: 25px;
-}
-.bui-lh-30 {
- line-height: 30px;
-}
-.bui-lh-35 {
- line-height: 35px;
-}
-.bui-lh-40 {
- line-height: 40px;
-}
-.bui-lh-45 {
- line-height: 45px;
-}
-.bui-lh-50 {
- line-height: 50px;
-}
-.bui-lh-55 {
- line-height: 55px;
-}
-.bui-lh-60 {
- line-height: 60px;
-}
-.bui-lh-65 {
- line-height: 65px;
-}
-.bui-lh-70 {
- line-height: 70px;
-}
-.bui-lh-75 {
- line-height: 75px;
-}
-.bui-lh-80 {
- line-height: 80px;
-}
-.bui-lh-85 {
- line-height: 85px;
-}
-.bui-lh-90 {
- line-height: 90px;
-}
-.bui-lh-95 {
- line-height: 95px;
-}
-.bui-lh-100 {
- line-height: 100px;
-}
-h1 {
- margin: 0px; font-size: 42px;
-}
-.bui-h1 {
- margin: 0px; font-size: 42px;
-}
-h2 {
- font-size: 30px;
-}
-.bui-h2 {
- font-size: 30px;
-}
-h3 {
- font-size: 21px;
-}
-.bui-h3 {
- font-size: 21px;
-}
-h4 {
- font-size: 15px;
-}
-.bui-h4 {
- font-size: 15px;
-}
-h5 {
- font-size: 13px;
-}
-.bui-h5 {
- font-size: 13px;
-}
-h6 {
- font-size: 11px;
-}
-.bui-h6 {
- font-size: 11px;
-}
-h1 {
- margin: 0px; color: rgb(68, 68, 68); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold;
-}
-h2 {
- margin: 0px; color: rgb(68, 68, 68); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold;
-}
-h3 {
- margin: 0px; color: rgb(68, 68, 68); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold;
-}
-h4 {
- margin: 0px; color: rgb(68, 68, 68); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold;
-}
-h5 {
- margin: 0px; color: rgb(68, 68, 68); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold;
-}
-h6 {
- margin: 0px; color: rgb(68, 68, 68); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold;
-}
-.ui-base-h1 {
- margin: 0px; color: rgb(68, 68, 68); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold;
-}
-.ui-base-h2 {
- margin: 0px; color: rgb(68, 68, 68); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold;
-}
-.bui-h3 {
- margin: 0px; color: rgb(68, 68, 68); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold;
-}
-.bui-h4 {
- margin: 0px; color: rgb(68, 68, 68); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold;
-}
-.bui-h5 {
- margin: 0px; color: rgb(68, 68, 68); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold;
-}
-.bui-h6 {
- margin: 0px; color: rgb(68, 68, 68); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold;
-}
-textarea:-ms-input-placeholder {
- color: rgb(187, 187, 187);
-}
-input[type='text']:-ms-input-placeholder {
- color: rgb(187, 187, 187);
-}
-input[type='password']:-ms-input-placeholder {
- color: rgb(187, 187, 187);
-}
-input[type='email']:-ms-input-placeholder {
- color: rgb(187, 187, 187);
-}
-input[type='search']:-ms-input-placeholder {
- color: rgb(187, 187, 187);
-}
-label {
- width: 100%; color: rgb(68, 68, 68); font-family: "clearviewatt"; font-size: 12px; font-weight: bold; display: block;
-}
-input[type='text'] {
- background: 0px 0px rgb(239, 238, 238); margin: 1px 0px; padding: 4px 4px 4px 5px; border-radius: 4px; border: 1px solid rgb(231, 230, 230); width: 100%; height: 18px; color: rgb(68, 68, 68); line-height: 18px; font-family: "clearviewatt"; font-size: 12px; vertical-align: middle; display: block; position: relative; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); box-shadow: none; -webkit-border-radius: 4px; -moz-border-radius: 4px; -ms-border-radius: 4px; -o-border-radius: 4px; -webkit-box-shadow: none; -moz-box-shadow: none;
-}
-input[type='email'] {
- background: 0px 0px rgb(239, 238, 238); margin: 1px 0px; padding: 4px 4px 4px 5px; border-radius: 4px; border: 1px solid rgb(231, 230, 230); width: 100%; height: 18px; color: rgb(68, 68, 68); line-height: 18px; font-family: "clearviewatt"; font-size: 12px; vertical-align: middle; display: block; position: relative; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); box-shadow: none; -webkit-border-radius: 4px; -moz-border-radius: 4px; -ms-border-radius: 4px; -o-border-radius: 4px; -webkit-box-shadow: none; -moz-box-shadow: none;
-}
-input[type='password'] {
- background: 0px 0px rgb(239, 238, 238); margin: 1px 0px; padding: 4px 4px 4px 5px; border-radius: 4px; border: 1px solid rgb(231, 230, 230); width: 100%; height: 18px; color: rgb(68, 68, 68); line-height: 18px; font-family: "clearviewatt"; font-size: 12px; vertical-align: middle; display: block; position: relative; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); box-shadow: none; -webkit-border-radius: 4px; -moz-border-radius: 4px; -ms-border-radius: 4px; -o-border-radius: 4px; -webkit-box-shadow: none; -moz-box-shadow: none;
-}
-select {
- background: 0px 0px rgb(239, 238, 238); margin: 1px 0px; padding: 4px 4px 4px 5px; border-radius: 4px; border: 1px solid rgb(231, 230, 230); width: 100%; height: 18px; color: rgb(68, 68, 68); line-height: 18px; font-family: "clearviewatt"; font-size: 12px; vertical-align: middle; display: block; position: relative; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); box-shadow: none; -webkit-border-radius: 4px; -moz-border-radius: 4px; -ms-border-radius: 4px; -o-border-radius: 4px; -webkit-box-shadow: none; -moz-box-shadow: none;
-}
-textarea {
- background: 0px 0px rgb(239, 238, 238); margin: 1px 0px; padding: 4px 4px 4px 5px; border-radius: 4px; border: 1px solid rgb(231, 230, 230); width: 100%; height: 18px; color: rgb(68, 68, 68); line-height: 18px; font-family: "clearviewatt"; font-size: 12px; vertical-align: middle; display: block; position: relative; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); box-shadow: none; -webkit-border-radius: 4px; -moz-border-radius: 4px; -ms-border-radius: 4px; -o-border-radius: 4px; -webkit-box-shadow: none; -moz-box-shadow: none;
-}
-input[type='search'] {
- background: url("../images/chosen-sprite.png") no-repeat 100% -22px rgb(239, 238, 238); margin: 1px 0px; padding: 4px 4px 4px 5px; border-radius: 4px; border: 1px solid rgb(170, 170, 170); width: 100%; height: 18px; color: rgb(68, 68, 68); line-height: 18px; font-family: "clearviewatt"; font-size: 12px; vertical-align: middle; display: block; position: relative; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); box-shadow: none; -webkit-border-radius: 4px; -moz-border-radius: 4px; -ms-border-radius: 4px; -o-border-radius: 4px; -webkit-box-shadow: none; -moz-box-shadow: none;
-}
-input[type='checkbox']:focus {
- outline: 0px; text-decoration: none;
-}
-input[type='checkbox'] {
- background: 0px 0px rgb(239, 238, 238); margin: 1px 0px; padding: 4px 4px 4px 5px; border: currentColor; width: 100%; height: 18px; color: rgb(68, 68, 68); line-height: 18px; font-family: "clearviewatt"; font-size: 12px; vertical-align: middle; display: block; min-width: 15px; box-shadow: none; -webkit-box-shadow: none; -moz-box-shadow: none;
-}
-input[type='radio'] {
- background: 0px 0px rgb(239, 238, 238); margin: 1px 0px; padding: 4px 4px 4px 5px; border: currentColor; width: 100%; height: 18px; color: rgb(68, 68, 68); line-height: 18px; font-family: "clearviewatt"; font-size: 12px; vertical-align: middle; display: block; min-width: 10px; opacity: 0; box-shadow: none; -webkit-box-shadow: none; -moz-box-shadow: none;
-}
-.bui-input-search-top {
- background: url("../images/chosen-sprite-white.png") no-repeat 100% -22px rgb(6, 122, 180) !important; margin: 1px 0px; padding: 4px 4px 4px 5px; border-radius: 4px; border: 1px solid rgb(170, 170, 170) !important; width: 100%; height: 18px; color: rgb(255, 255, 255) !important; line-height: 18px; font-family: "clearviewatt"; font-size: 12px; vertical-align: middle; display: block; position: relative; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); box-shadow: none; -webkit-border-radius: 4px; -moz-border-radius: 4px; -ms-border-radius: 4px; -o-border-radius: 4px; -webkit-box-shadow: none; -moz-box-shadow: none;
-}
-.chzn-container {
- font-size: 12px;
-}
-.chzn-container .chzn-drop {
- background: rgb(255, 255, 255); border: 1px solid rgb(170, 170, 170); z-index: 1010;
-}
-.chzn-container .chzn-results .highlighted {
- color: rgb(255, 255, 255); background-color: rgb(6, 122, 180);
-}
-.chzn-container .chzn-results .result-selected {
- color: rgb(255, 255, 255); background-color: rgb(6, 122, 180);
-}
-.chzn-container .chzn-results:hover .result-selected {
- color: rgb(68, 68, 68) !important;
-}
-.chzn-container .chzn-results:hover .highlighted {
- color: rgb(255, 255, 255) !important; background-color: rgb(6, 122, 180);
-}
-.chzn-container-single .chzn-single {
- border-radius: 4px; border: 1px solid rgb(170, 170, 170); height: 26px; color: rgb(68, 68, 68); line-height: 26px; position: relative; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); background-clip: padding-box; background-color: rgb(255, 255, 255); -moz-background-clip: padding-box; -webkit-background-clip: padding-box; -webkit-border-radius: 4px; -moz-border-radius: 4px; -ms-border-radius: 4px; -o-border-radius: 4px; -pie-background: ease-in-out-gradient(left, #ffffff, #ffffff);
-}
-.chzn-container-single .chzn-default {
- color: rgb(68, 68, 68);
-}
-.chzn-container-single .chzn-search input {
- height: 18px; line-height: 18px; background-color: rgb(255, 255, 255);
-}
-.chzn-container-multi .chzn-choices {
- background-color: rgb(255, 255, 255);
-}
-.chosen-container-single .chosen-search input[type='text'] {
- padding: 4px 20px 4px 5px !important; width: 100% !important;
-}
-.chosen-container {
- border-radius: 4px;
-}
-ul {
- list-style: none; margin: 0px; padding: 0px;
-}
-.bui-button {
- margin: 0px; padding: 8px 20px; border-radius: 6px; border: 0px currentColor; text-align: center; color: rgb(255, 255, 255); line-height: 1; font-family: "clearviewatt"; font-size: 14px; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 60px; background-color: rgb(6, 122, 180); -webkit-border-radius: 6px; -moz-border-radius: 6px; -ms-border-radius: 6px; -o-border-radius: 6px;
-}
-.bui-button:hover {
- transition:background-color 0.3s ease-in-out; background-color: rgb(62, 145, 186); -webkit-transition: background-color 0.3s ease-in-out; -moz-transition: background-color 0.3s ease-in-out; -o-transition: opacity 0.3s ease-in-out;
-}
-.bui-button:focus {
- background-color: rgb(76, 200, 243);
-}
-.bui-button:active {
- background-color: rgb(25, 157, 223);
-}
-.bui-button-grey {
- background: rgb(163, 163, 163); margin: 0px; padding: 8px 20px; border-radius: 6px; border: 0px currentColor; text-align: center; color: rgb(255, 255, 255); line-height: 1; font-family: "clearviewatt"; font-size: 14px; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 60px; -webkit-border-radius: 6px; -moz-border-radius: 6px; -ms-border-radius: 6px; -o-border-radius: 6px; -pie-background: ease-in-out-gradient(top, #a3a3a3, #a3a3a3);
-}
-.bui-button-disable {
- background: rgb(163, 163, 163); margin: 0px; padding: 8px 20px; border-radius: 6px; border: 0px currentColor; text-align: center; color: rgb(255, 255, 255); line-height: 1; font-family: "clearviewatt"; font-size: 14px; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: default; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 60px; -webkit-border-radius: 6px; -moz-border-radius: 6px; -ms-border-radius: 6px; -o-border-radius: 6px; -pie-background: ease-in-out-gradient(top, #a3a3a3, #a3a3a3);
-}
-.bui-button-small {
- margin: 0px; padding: 8px 20px; border-radius: 6px; border: 0px currentColor; text-align: center; color: rgb(255, 255, 255); line-height: 1; font-family: "clearviewatt"; font-size: 14px; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 60px; background-color: rgb(6, 122, 180); -webkit-border-radius: 6px; -moz-border-radius: 6px; -ms-border-radius: 6px; -o-border-radius: 6px;
-}
-.bui-button-small:hover {
- transition:background-color 0.3s ease-in-out; background-color: rgb(62, 145, 186); -webkit-transition: background-color 0.3s ease-in-out; -moz-transition: background-color 0.3s ease-in-out; -o-transition: opacity 0.3s ease-in-out;
-}
-.bui-button-small:focus {
- background-color: rgb(76, 200, 243);
-}
-.bui-button-small:active {
- background-color: rgb(25, 157, 223);
-}
-.bui-button-small-disable {
- background: rgb(163, 163, 163); margin: 0px; padding: 8px 20px; border-radius: 6px; border: 0px currentColor; text-align: center; color: rgb(255, 255, 255); line-height: 1; font-family: "clearviewatt"; font-size: 14px; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: default; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 60px; -webkit-border-radius: 6px; -moz-border-radius: 6px; -ms-border-radius: 6px; -o-border-radius: 6px; -pie-background: ease-in-out-gradient(top, #a3a3a3, #a3a3a3);
-}
-.bui-button-large {
- margin: 0px; padding: 11px 30px; border-radius: 6px; border: 0px currentColor; text-align: center; color: rgb(255, 255, 255); line-height: 1; font-family: "clearviewatt"; font-size: 18px; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 100px; background-color: rgb(6, 122, 180); -webkit-border-radius: 6px; -moz-border-radius: 6px; -ms-border-radius: 6px; -o-border-radius: 6px;
-}
-.bui-button-large:hover {
- transition:background-color 0.3s ease-in-out; background-color: rgb(62, 145, 186); -webkit-transition: background-color 0.3s ease-in-out; -moz-transition: background-color 0.3s ease-in-out; -o-transition: opacity 0.3s ease-in-out;
-}
-.bui-button-large:focus {
- background-color: rgb(76, 200, 243);
-}
-.bui-button-large:active {
- background-color: rgb(25, 157, 223);
-}
-.bui-button-large-disable {
- background: rgb(163, 163, 163); margin: 0px; padding: 11px 30px; border-radius: 6px; border: 0px currentColor; text-align: center; color: rgb(255, 255, 255); line-height: 1; font-family: "clearviewatt"; font-size: 18px; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: default; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 100px; -webkit-border-radius: 6px; -moz-border-radius: 6px; -ms-border-radius: 6px; -o-border-radius: 6px; -pie-background: ease-in-out-gradient(top, #a3a3a3, #a3a3a3);
-}
-.bui-button-orange-small {
- margin: 0px; padding: 8px 20px; border-radius: 6px; border: 0px currentColor; text-align: center; color: rgb(255, 255, 255); line-height: 1; font-family: "clearviewatt"; font-size: 14px; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 60px; background-color: rgb(239, 111, 0); -webkit-border-radius: 6px; -moz-border-radius: 6px; -ms-border-radius: 6px; -o-border-radius: 6px;
-}
-.bui-button-orange-small:hover {
- transition:background-color 0.3s ease-in-out; background-color: rgb(252, 179, 20); -webkit-transition: background-color 0.3s ease-in-out; -moz-transition: background-color 0.3s ease-in-out; -o-transition: opacity 0.3s ease-in-out;
-}
-.bui-button-orange-small:focus {
- background-color: rgb(252, 179, 20);
-}
-.bui-button-orange-small:active {
- background-color: rgb(252, 179, 20);
-}
-.bui-button-orange {
- margin: 0px; padding: 8px 20px; border-radius: 6px; border: 0px currentColor; text-align: center; color: rgb(255, 255, 255); line-height: 1; font-family: "clearviewatt"; font-size: 14px; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 60px; background-color: rgb(239, 111, 0); -webkit-border-radius: 6px; -moz-border-radius: 6px; -ms-border-radius: 6px; -o-border-radius: 6px;
-}
-.bui-button-orange:hover {
- transition:background-color 0.3s ease-in-out; background-color: rgb(252, 179, 20); -webkit-transition: background-color 0.3s ease-in-out; -moz-transition: background-color 0.3s ease-in-out; -o-transition: opacity 0.3s ease-in-out;
-}
-.bui-button-orange:focus {
- background-color: rgb(252, 179, 20);
-}
-.bui-button-orange:active {
- background-color: rgb(252, 179, 20);
-}
-.bui-button-orange-large {
- margin: 0px; padding: 11px 30px; border-radius: 6px; border: 0px currentColor; text-align: center; color: rgb(255, 255, 255); line-height: 1; font-family: "clearviewatt"; font-size: 18px; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 100px; background-color: rgb(239, 111, 0); -webkit-border-radius: 6px; -moz-border-radius: 6px; -ms-border-radius: 6px; -o-border-radius: 6px;
-}
-.bui-button-orange-large:hover {
- transition:background-color 0.3s ease-in-out; background-color: rgb(252, 179, 20); -webkit-transition: background-color 0.3s ease-in-out; -moz-transition: background-color 0.3s ease-in-out; -o-transition: opacity 0.3s ease-in-out;
-}
-.bui-button-orange-large:focus {
- background-color: rgb(252, 179, 20);
-}
-.bui-button-orange-large:active {
- background-color: rgb(252, 179, 20);
-}
-.bui-button-orange-rectangle {
- margin: 0px; padding: 12px; border: 0px currentColor; text-align: center; color: rgb(255, 255, 255); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold; text-decoration: none; vertical-align: middle; display: inline-block; cursor: pointer; min-width: 60px; background-color: rgb(239, 111, 0);
-}
-.bui-button-orange-rectangle:hover {
- color: rgb(252, 179, 20);
-}
-.bui-button-orange-rectangle:active {
- color: rgb(252, 179, 20);
-}
-.bui-disabled-button-rectangle {
- margin: 0px; padding: 12px; border: 0px currentColor; text-align: center; color: rgb(255, 255, 255); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold; text-decoration: none; vertical-align: middle; display: inline-block; cursor: default; min-width: 60px; background-color: rgb(163, 163, 163);
-}
-.bui-btn-fixed {
- margin: 0px; padding: 2px 20px; border-radius: 6px; border: 0px currentColor; text-align: center; color: rgb(255, 255, 255); line-height: 1; font-family: "clearviewatt"; font-size: 14px; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 60px; background-color: rgb(6, 122, 180); -webkit-border-radius: 6px; -moz-border-radius: 6px; -ms-border-radius: 6px; -o-border-radius: 6px;
-}
-.bui-btn-fixed:hover {
- transition:background-color 0.3s ease-in-out; background-color: rgb(62, 145, 186); -webkit-transition: background-color 0.3s ease-in-out; -moz-transition: background-color 0.3s ease-in-out; -o-transition: opacity 0.3s ease-in-out;
-}
-.bui-btn-fixed:focus {
- background-color: rgb(76, 200, 243);
-}
-.bui-btn-fixed:active {
- background-color: rgb(25, 157, 223);
-}
-.bui-button-rectangle {
- background: padding-box rgb(6, 122, 180); margin: 0px; padding: 4px 12px; text-align: center; color: rgb(255, 255, 255); line-height: 1.4; font-family: "clearviewatt"; font-weight: bold; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 20px; box-shadow: 1px 1px 1px #199ddf; -moz-background-clip: padding-box; -webkit-background-clip: padding-box; -webkit-box-shadow: 1px 1px 1px #199ddf; -moz-box-shadow: 1px 1px 1px #199ddf; -pie-background: ease-in-out-gradient(top, #199ddf, #067ab4);
-}
-.bui-button-rectangle:hover {
- background: rgb(62, 145, 186); position: relative; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); -pie-background: ease-in-out-gradient(top, #3e91ba, #3e91ba);
-}
-.bui-button-right-rounded-corner {
- background: padding-box rgb(6, 122, 180); margin: 3px 0px; padding: 2px 8px; border-radius: 0px 6px 6px 0px; text-align: center; color: rgb(255, 255, 255); line-height: 1.4; font-family: "clearviewatt"; font-size: 9px; font-weight: bold; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 60px; box-shadow: 1px 1px 1px #199ddf; -moz-background-clip: padding-box; -webkit-background-clip: padding-box; -webkit-border-radius: 0 6px 6px 0; -moz-border-radius: 0 6px 6px 0; -ms-border-radius: 0 6px 6px 0; -o-border-radius: 0 6px 6px 0; -webkit-box-shadow: 1px 1px 1px #199ddf; -moz-box-shadow: 1px 1px 1px #199ddf; -pie-background: ease-in-out-gradient(top, #199ddf, #067ab4);
-}
-.bui-button-right-rounded-corner:hover {
- background: rgb(62, 145, 186); position: relative; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); -pie-background: ease-in-out-gradient(top, #3e91ba, #3e91ba);
-}
-.bui-button-left-rounded-corner {
- background: padding-box rgb(6, 122, 180); margin: 3px 0px; padding: 2px 8px; border-radius: 6px 0px 0px 6px; text-align: center; color: rgb(255, 255, 255); line-height: 1.4; font-family: "clearviewatt"; font-size: 9px; font-weight: bold; text-decoration: none; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); min-width: 60px; box-shadow: 1px 1px 1px #199ddf; -moz-background-clip: padding-box; -webkit-background-clip: padding-box; -webkit-border-radius: 6px 0 0 6px; -moz-border-radius: 6px 0 0 6px; -ms-border-radius: 6px 0 0 6px; -o-border-radius: 6px 0 0 6px; -webkit-box-shadow: 1px 1px 1px #199ddf; -moz-box-shadow: 1px 1px 1px #199ddf; -pie-background: ease-in-out-gradient(top, #199ddf, #067ab4);
-}
-.bui-button-left-rounded-corner:hover {
- background: rgb(62, 145, 186); position: relative; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); -pie-background: ease-in-out-gradient(top, #3e91ba, #3e91ba);
-}
-.bui-icon-18 {
- margin: 0px; padding: 1px; border-radius: 18px; width: 18px; height: 18px; vertical-align: middle; display: inline-block; position: relative; -ms-behavior: url(/browsebuy/web/css/pie/PIE.htc); background-image: url("../images/icons-18-spritesheet-and-hover.png"); background-size: 891px 36px; background-color: rgb(248, 248, 248); -webkit-border-radius: 18px; -moz-border-radius: 18px; -ms-border-radius: 18px; -o-border-radius: 18px; -moz-background-size: 891px 36px; -o-background-size: 891px 36px; -webkit-background-size: 891px 36px;
-}
-.bui-float-right {
- float: right;
-}
-.bui-float-left {
- float: left;
-}
-.bui-clearfix {
- clear: both; display: table; content: "";
-}
-.bui-force-float-left {
- float: left !important;
-}
-.bui-force-float-right {
- float: right !important;
-}
-.bui-force-display-block {
- display: block !important;
-}
-.bui-force-display-inline {
- display: inline !important;
-}
-.bui-text-align-left {
- text-align: left;
-}
-.bui-text-align-center {
- text-align: center;
-}
-.bui-text-align-right {
- text-align: right;
-}
-.bui-vertical-align-top {
- vertical-align: top;
-}
-.bui-vertical-align-middle {
- vertical-align: middle;
-}
-.bui-vertical-align-bottom {
- vertical-align: bottom;
-}
-.bui-display-block {
- display: block;
-}
-.bui-display-inline-block {
- display: inline-block;
-}
-form label {
- color: rgb(68, 68, 68); font-size: 12px; -ms-user-select: none; -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-touch-callout: none; -khtml-user-select: none;
-}
-@media only screen and (max-device-width:480px) and (min-device-width:320px)
-{
-.bui-screen-width {
- width: 100%;
-}
-}
-@media only screen and (min-width:321px)
-{
-.bui-screen-width {
- width: 100%;
-}
-}
-@media only screen and (max-width:320px)
-{
-.bui-screen-width {
- width: 100%;
-}
-}
-@media only screen and (max-device-width:1024px) and (min-device-width:768px)
-{
-.bui-screen-width {
- width: 100%;
-}
-}
-@media only screen and (orientation:landscape) and (max-device-width:1024px) and (min-device-width:768px)
-{
-.bui-screen-width {
- margin: 0px auto !important; width: 980px;
-}
-}
-@media only screen and (orientation:portrait) and (max-device-width:1024px) and (min-device-width:768px)
-{
-.bui-screen-width {
- width: 100%;
-}
-}
-@media only screen and (min-width:1224px)
-{
-.bui-screen-width {
- margin: 0px auto !important; width: 980px;
-}
-}
-@media only screen and (min-width:1824px)
-{
-.bui-screen-width {
- margin: 0px auto !important; width: 980px;
-}
-}
-@media not all, not all
-{
-.bui-screen-width {
- margin: 0px auto !important; width: 980px;
-}
-}
-*/ \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/ebz/ebz_header.css b/ecomp-portal-BE/war/static/ebz/ebz_header.css
deleted file mode 100644
index eaf9c61d..00000000
--- a/ecomp-portal-BE/war/static/ebz/ebz_header.css
+++ /dev/null
@@ -1,607 +0,0 @@
-.navbar {
- display: none;
-}
-.navbar-fixed-bottom .dropdown .caret {
- border-top-color: currentColor; border-bottom-color: rgb(0, 0, 0); border-top-width: 0px; border-bottom-width: 4px; border-top-style: dotted; border-bottom-style: solid; content: "";
-}
-.navbar-fixed-bottom .dropdown .dropdown-menu {
- top: auto; bottom: 100%; margin-bottom: 1px;
-}
-@media all and (min-width:768px)
-{
-.navbar-right .dropdown-menu {
- left: auto; right: 0px;
-}
-}
-.navbar {
- margin-bottom: 20px; min-height: 50px;
-}
-.navbar::after {
- display: table; content: " ";
-}
-.navbar::before {
- display: table; content: " ";
-}
-.navbar::after {
- clear: both;
-}
-@media all and (min-width:768px)
-{
-.navbar {
- border-radius: 6px;
-}
-}
-.navbar-header::after {
- display: table; content: " ";
-}
-.navbar-header::before {
- display: table; content: " ";
-}
-.navbar-header::after {
- clear: both;
-}
-@media all and (min-width:768px)
-{
-.navbar-header {
- float: left;
-}
-}
-.navbar-collapse {
- padding-right: 10px; padding-left: 10px; border-top-color: transparent; border-top-width: 1px; border-top-style: solid; -ms-overflow-x: visible; max-height: 340px; box-shadow: inset 0px 1px 0px rgba(255,255,255,0.1); -webkit-overflow-scrolling: touch;
-}
-.navbar-collapse::after {
- display: table; content: " ";
-}
-.navbar-collapse::before {
- display: table; content: " ";
-}
-.navbar-collapse::after {
- clear: both;
-}
-.in.navbar-collapse {
- -ms-overflow-y: auto;
-}
-@media all and (min-width:768px)
-{
-.navbar-collapse {
- width: auto; border-top-color: currentColor; border-top-width: 0px; border-top-style: none; box-shadow: none;
-}
-.collapse.navbar-collapse {
- height: auto !important; overflow: visible !important; padding-bottom: 0px; display: block !important;
-}
-.in.navbar-collapse {
- -ms-overflow-y: auto;
-}
-.navbar-collapse :first-child.navbar-left.navbar-nav {
- margin-left: -10px;
-}
-.navbar-collapse :last-child.navbar-right.navbar-nav {
- margin-right: -10px;
-}
-.navbar-collapse :last-child.navbar-text {
- margin-right: 0px;
-}
-}
-.container > .navbar-collapse {
- margin-right: -10px; margin-left: -10px;
-}
-.container > .navbar-header {
- margin-right: -10px; margin-left: -10px;
-}
-@media all and (min-width:768px)
-{
-.container > .navbar-collapse {
- margin-right: 0px; margin-left: 0px;
-}
-.container > .navbar-header {
- margin-right: 0px; margin-left: 0px;
-}
-}
-.navbar-static-top {
- border-width: 0px 0px 1px; z-index: 1000;
-}
-@media all and (min-width:768px)
-{
-.navbar-static-top {
- border-radius: 0px;
-}
-}
-.navbar-fixed-bottom {
- left: 0px; right: 0px; position: fixed; z-index: 1030;
-}
-.navbar-fixed-top {
- left: 0px; right: 0px; position: fixed; z-index: 1030;
-}
-@media all and (min-width:768px)
-{
-.navbar-fixed-bottom {
- border-radius: 0px;
-}
-.navbar-fixed-top {
- border-radius: 0px;
-}
-}
-.navbar-fixed-top {
- border-width: 0px 0px 1px; top: 0px;
-}
-.navbar-fixed-bottom {
- border-width: 1px 0px 0px; bottom: 0px; margin-bottom: 0px;
-}
-.navbar-brand {
- float: left;
-}
-.navbar-brand:focus {
- text-decoration: none;
-}
-.navbar-brand:hover {
- text-decoration: none;
-}
-@media all and (min-width:768px)
-{
-.navbar > .container .navbar-brand {
- margin-left: -10px;
-}
-}
-.navbar-toggle {
- padding: 9px 10px; border-radius: 6px; border: 1px solid transparent; margin-top: 8px; margin-right: 10px; margin-bottom: 8px; float: right; position: relative; background-color: transparent;
-}
-.navbar-toggle .icon-bar {
- border-radius: 1px; width: 22px; height: 2px; display: block;
-}
-.navbar-toggle .icon-bar + .icon-bar {
- margin-top: 4px;
-}
-@media all and (min-width:768px)
-{
-.navbar-toggle {
- display: none;
-}
-}
-.navbar-nav {
- margin: 7.5px -10px;
-}
-.navbar-nav > li > a {
- line-height: 20px; padding-top: 10px; padding-bottom: 10px;
-}
-@media all and (max-width:767px)
-{
-.navbar-nav .open .dropdown-menu {
- border: 0px currentColor; width: auto; margin-top: 0px; float: none; position: static; box-shadow: none; background-color: transparent;
-}
-.navbar-nav .open .dropdown-menu .dropdown-header {
- padding: 5px 15px 5px 25px;
-}
-.navbar-nav .open .dropdown-menu > li > a {
- padding: 5px 15px 5px 25px;
-}
-.navbar-nav .open .dropdown-menu > li > a {
- line-height: 20px;
-}
-.navbar-nav .open .dropdown-menu > li > a:focus {
- background-image: none;
-}
-.navbar-nav .open .dropdown-menu > li > a:hover {
- background-image: none;
-}
-}
-@media all and (min-width:768px)
-{
-.navbar-nav {
- margin: 0px; float: left;
-}
-.navbar-nav > li {
- float: left;
-}
-.navbar-nav > li > a {
- padding-top: 15px; padding-bottom: 15px;
-}
-}
-@media all and (min-width:768px)
-{
-.navbar-left {
- float: left !important;
-}
-.navbar-right {
- float: right !important;
-}
-}
-.navbar-form {
- margin: 8px -10px; padding: 10px; border-top-color: transparent; border-bottom-color: transparent; border-top-width: 1px; border-bottom-width: 1px; border-top-style: solid; border-bottom-style: solid; box-shadow: inset 0px 1px 0px rgba(255,255,255,0.1), 0px 1px 0px rgba(255,255,255,0.1); -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);
-}
-@media all and (max-width:767px)
-{
-.navbar-form .form-group {
- margin-bottom: 5px;
-}
-}
-@media all and (min-width:768px)
-{
-.navbar-form {
- border: 0px currentColor; width: auto; padding-top: 0px; padding-bottom: 0px; margin-right: 0px; margin-left: 0px; box-shadow: none; -webkit-box-shadow: none;
-}
-}
-.navbar-nav > li > .dropdown-menu {
- margin-top: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px;
-}
-.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
- border-bottom-right-radius: 0px; border-bottom-left-radius: 0px;
-}
-.pull-right.navbar-nav > li > .dropdown-menu {
- left: auto; right: 0px;
-}
-.navbar-nav > li > .pull-right.dropdown-menu {
- left: auto; right: 0px;
-}
-.navbar-btn {
- margin-top: 8px; margin-bottom: 8px;
-}
-.navbar-text {
- margin-top: 15px; margin-bottom: 15px; float: left;
-}
-@media all and (min-width:768px)
-{
-.navbar-text {
- margin-right: 10px; margin-left: 10px;
-}
-}
-.navbar-default {
- border-color: rgb(231, 231, 231); background-color: rgb(248, 248, 248);
-}
-.navbar-default .navbar-brand {
- color: rgb(119, 119, 119);
-}
-.navbar-default .navbar-brand:focus {
- color: rgb(94, 94, 94); background-color: transparent;
-}
-.navbar-default .navbar-brand:hover {
- color: rgb(94, 94, 94); background-color: transparent;
-}
-.navbar-default .navbar-nav > li > a {
- color: rgb(119, 119, 119);
-}
-.navbar-default .navbar-text {
- color: rgb(119, 119, 119);
-}
-.navbar-default .navbar-nav > li > a:focus {
- color: rgb(51, 51, 51); background-color: transparent;
-}
-.navbar-default .navbar-nav > li > a:hover {
- color: rgb(51, 51, 51); background-color: transparent;
-}
-.navbar-default .navbar-nav > .active > a {
- color: rgb(85, 85, 85); background-color: rgb(231, 231, 231);
-}
-.navbar-default .navbar-nav > .active > a:focus {
- color: rgb(85, 85, 85); background-color: rgb(231, 231, 231);
-}
-.navbar-default .navbar-nav > .active > a:hover {
- color: rgb(85, 85, 85); background-color: rgb(231, 231, 231);
-}
-.navbar-default .navbar-nav > .disabled > a {
- color: rgb(204, 204, 204); background-color: transparent;
-}
-.navbar-default .navbar-nav > .disabled > a:focus {
- color: rgb(204, 204, 204); background-color: transparent;
-}
-.navbar-default .navbar-nav > .disabled > a:hover {
- color: rgb(204, 204, 204); background-color: transparent;
-}
-.navbar-default .navbar-toggle {
- border-color: rgb(221, 221, 221);
-}
-.navbar-default .navbar-toggle:focus {
- background-color: rgb(221, 221, 221);
-}
-.navbar-default .navbar-toggle:hover {
- background-color: rgb(221, 221, 221);
-}
-.navbar-default .navbar-toggle .icon-bar {
- background-color: rgb(204, 204, 204);
-}
-.navbar-default .navbar-collapse {
- border-color: rgb(231, 231, 231);
-}
-.navbar-default .navbar-form {
- border-color: rgb(231, 231, 231);
-}
-.navbar-default .navbar-nav > .dropdown > a:focus .caret {
- border-top-color: rgb(51, 51, 51); border-bottom-color: rgb(51, 51, 51);
-}
-.navbar-default .navbar-nav > .dropdown > a:hover .caret {
- border-top-color: rgb(51, 51, 51); border-bottom-color: rgb(51, 51, 51);
-}
-.navbar-default .navbar-nav > .open > a {
- color: rgb(85, 85, 85); background-color: rgb(231, 231, 231);
-}
-.navbar-default .navbar-nav > .open > a:focus {
- color: rgb(85, 85, 85); background-color: rgb(231, 231, 231);
-}
-.navbar-default .navbar-nav > .open > a:hover {
- color: rgb(85, 85, 85); background-color: rgb(231, 231, 231);
-}
-.navbar-default .navbar-nav > .open > a .caret {
- border-top-color: rgb(85, 85, 85); border-bottom-color: rgb(85, 85, 85);
-}
-.navbar-default .navbar-nav > .open > a:focus .caret {
- border-top-color: rgb(85, 85, 85); border-bottom-color: rgb(85, 85, 85);
-}
-.navbar-default .navbar-nav > .open > a:hover .caret {
- border-top-color: rgb(85, 85, 85); border-bottom-color: rgb(85, 85, 85);
-}
-.navbar-default .navbar-nav > .dropdown > a .caret {
- border-top-color: rgb(119, 119, 119); border-bottom-color: rgb(119, 119, 119);
-}
-@media all and (max-width:767px)
-{
-.navbar-default .navbar-nav .open .dropdown-menu > li > a {
- color: rgb(119, 119, 119);
-}
-.navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
- color: rgb(51, 51, 51); background-color: transparent;
-}
-.navbar-default .navbar-nav .open .dropdown-menu > li > a:hover {
- color: rgb(51, 51, 51); background-color: transparent;
-}
-.navbar-default .navbar-nav .open .dropdown-menu > .active > a {
- color: rgb(85, 85, 85); background-color: rgb(231, 231, 231);
-}
-.navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
- color: rgb(85, 85, 85); background-color: rgb(231, 231, 231);
-}
-.navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover {
- color: rgb(85, 85, 85); background-color: rgb(231, 231, 231);
-}
-.navbar-default .navbar-nav .open .dropdown-menu > .disabled > a {
- color: rgb(204, 204, 204); background-color: transparent;
-}
-.navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {
- color: rgb(204, 204, 204); background-color: transparent;
-}
-.navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover {
- color: rgb(204, 204, 204); background-color: transparent;
-}
-}
-.navbar-default .navbar-link {
- color: rgb(119, 119, 119);
-}
-.navbar-default .navbar-link:hover {
- color: rgb(51, 51, 51);
-}
-.navbar-inverse {
- border-color: rgb(9, 9, 9); background-color: rgb(34, 34, 34);
-}
-.navbar-inverse .navbar-brand {
- color: rgb(153, 153, 153);
-}
-.navbar-inverse .navbar-brand:focus {
- color: rgb(255, 255, 255); background-color: transparent;
-}
-.navbar-inverse .navbar-brand:hover {
- color: rgb(255, 255, 255); background-color: transparent;
-}
-.navbar-inverse .navbar-nav > li > a {
- color: rgb(153, 153, 153);
-}
-.navbar-inverse .navbar-text {
- color: rgb(153, 153, 153);
-}
-.navbar-inverse .navbar-nav > li > a:focus {
- color: rgb(255, 255, 255); background-color: transparent;
-}
-.navbar-inverse .navbar-nav > li > a:hover {
- color: rgb(255, 255, 255); background-color: transparent;
-}
-.navbar-inverse .navbar-nav > .active > a {
- color: rgb(255, 255, 255); background-color: rgb(9, 9, 9);
-}
-.navbar-inverse .navbar-nav > .active > a:focus {
- color: rgb(255, 255, 255); background-color: rgb(9, 9, 9);
-}
-.navbar-inverse .navbar-nav > .active > a:hover {
- color: rgb(255, 255, 255); background-color: rgb(9, 9, 9);
-}
-.navbar-inverse .navbar-nav > .disabled > a {
- color: rgb(68, 68, 68); background-color: transparent;
-}
-.navbar-inverse .navbar-nav > .disabled > a:focus {
- color: rgb(68, 68, 68); background-color: transparent;
-}
-.navbar-inverse .navbar-nav > .disabled > a:hover {
- color: rgb(68, 68, 68); background-color: transparent;
-}
-.navbar-inverse .navbar-toggle {
- border-color: rgb(51, 51, 51);
-}
-.navbar-inverse .navbar-toggle:focus {
- background-color: rgb(51, 51, 51);
-}
-.navbar-inverse .navbar-toggle:hover {
- background-color: rgb(51, 51, 51);
-}
-.navbar-inverse .navbar-toggle .icon-bar {
- background-color: rgb(255, 255, 255);
-}
-.navbar-inverse .navbar-collapse {
- border-color: rgb(16, 16, 16);
-}
-.navbar-inverse .navbar-form {
- border-color: rgb(16, 16, 16);
-}
-.navbar-inverse .navbar-nav > .open > a {
- color: rgb(255, 255, 255); background-color: rgb(9, 9, 9);
-}
-.navbar-inverse .navbar-nav > .open > a:focus {
- color: rgb(255, 255, 255); background-color: rgb(9, 9, 9);
-}
-.navbar-inverse .navbar-nav > .open > a:hover {
- color: rgb(255, 255, 255); background-color: rgb(9, 9, 9);
-}
-.navbar-inverse .navbar-nav > .dropdown > a:hover .caret {
- border-top-color: rgb(255, 255, 255); border-bottom-color: rgb(255, 255, 255);
-}
-.navbar-inverse .navbar-nav > .dropdown > a .caret {
- border-top-color: rgb(153, 153, 153); border-bottom-color: rgb(153, 153, 153);
-}
-.navbar-inverse .navbar-nav > .open > a .caret {
- border-top-color: rgb(255, 255, 255); border-bottom-color: rgb(255, 255, 255);
-}
-.navbar-inverse .navbar-nav > .open > a:focus .caret {
- border-top-color: rgb(255, 255, 255); border-bottom-color: rgb(255, 255, 255);
-}
-.navbar-inverse .navbar-nav > .open > a:hover .caret {
- border-top-color: rgb(255, 255, 255); border-bottom-color: rgb(255, 255, 255);
-}
-@media all and (max-width:767px)
-{
-.navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {
- border-color: rgb(9, 9, 9);
-}
-.navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
- color: rgb(153, 153, 153);
-}
-.navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
- color: rgb(255, 255, 255); background-color: transparent;
-}
-.navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover {
- color: rgb(255, 255, 255); background-color: transparent;
-}
-.navbar-inverse .navbar-nav .open .dropdown-menu > .active > a {
- color: rgb(255, 255, 255); background-color: rgb(9, 9, 9);
-}
-.navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {
- color: rgb(255, 255, 255); background-color: rgb(9, 9, 9);
-}
-.navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover {
- color: rgb(255, 255, 255); background-color: rgb(9, 9, 9);
-}
-.navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a {
- color: rgb(68, 68, 68); background-color: transparent;
-}
-.navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {
- color: rgb(68, 68, 68); background-color: transparent;
-}
-.navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover {
- color: rgb(68, 68, 68); background-color: transparent;
-}
-}
-.navbar-inverse .navbar-link {
- color: rgb(153, 153, 153);
-}
-.navbar-inverse .navbar-link:hover {
- color: rgb(255, 255, 255);
-}
-.navbar {
- background: rgb(0, 0, 0); border-radius: 0px; border: 0px currentColor; left: 0px; top: 0px; height: 50px; right: 0px; color: rgb(248, 248, 248); font-size: 0.75rem; position: fixed; z-index: 2000;
-}
-.navbar-brand {
- background: url("images/7c6bc6a4.logo.png") no-repeat 0px; padding: 0px 0px 0px 40px; color: rgb(248, 248, 248); line-height: 50px; font-size: 0.75rem; font-weight: 400; margin-left: 0px !important; display: block;
-}
-.nav {
- list-style: none; margin: 0px; padding: 0px;
-}
-.navbar li {
- margin: 0px; float: left;
-}
-.navbar li:first-child {
- margin-left: 0px;
-}
-.navbar li > a {
- padding: 0px 10px; height: 50px; color: rgb(187, 187, 187); line-height: 50px; display: block; box-sizing: border-box; -moz-box-sizing: border-box;
-}
-.navbar li.active > a {
- border-bottom-color: rgb(252, 65, 30); border-bottom-width: 4px; border-bottom-style: solid;
-}
-.navbar li > a:focus {
- background-color: rgb(24, 24, 24);
-}
-.navbar li > a:hover {
- background-color: rgb(24, 24, 24);
-}
-.navbar li.active > a {
- color: rgb(248, 248, 248);
-}
-.navbar li > a:hover {
- color: rgb(248, 248, 248);
-}
-.navbar .dropdown {
- margin: 0px 0px 0px 10px; position: relative;
-}
-.navbar .dropdown:hover > a {
- transition:none; background-color: rgb(71, 71, 71); -webkit-transition: none; -moz-transition: none;
-}
-.navbar .dropdown:hover .dropdown-menu {
- display: block;
-}
-.navbar .dropdown-menu {
- list-style: none; margin: 0px; padding: 0px; border-radius: 0px; border: 0px currentColor; display: none; position: absolute; min-width: 120px;
-}
-.pull-right .dropdown-menu {
- left: auto; top: 100%; right: 0px; background-color: rgb(71, 71, 71);
-}
-.navbar .dropdown-menu li {
- margin: 0px; width: 100%; float: none; display: block;
-}
-.navbar .dropdown-menu li a:hover {
- background-color: rgb(252, 65, 30);
-}
-.modals {
- left: 50%; top: 50%; margin-top: -200px; margin-left: -190px; display: none; position: fixed; z-index: 100;
-}
-.modal__informative {
- background: rgb(242, 242, 242); padding: 35px; border-radius: 5px; border: 1px solid rgb(230, 230, 230); width: 380px; box-shadow: 0px 2px 5px 0px #bebebe;
-}
-.modal__warning {
- background: rgb(242, 242, 242); padding: 35px; border-radius: 5px; border: 1px solid rgb(230, 230, 230); width: 380px; box-shadow: 0px 2px 5px 0px #bebebe;
-}
-.modal__informative {
- color: rgb(21, 123, 178);
-}
-.modal__informative .modal__header--icon {
- background: url("images/304303dd.icon-informative-modal.png") no-repeat center;
-}
-.modal__warning {
- color: rgb(237, 111, 32);
-}
-.modal__warning .modal__header--icon {
- background: url("images/fff33e38.icon-warning-modal.png") no-repeat center;
-}
-.modal__header {
- display: inline-table; position: relative;
-}
-.modal__header h2 {
- margin: 0px; width: 220px; display: inline-block;
-}
-.modal__header .modal__header--icon {
- width: 110px; height: 65px; bottom: 0px; display: inline-block; position: absolute;
-}
-.modal__header .modal__header--close {
- top: -24px; right: -112px; color: rgb(136, 136, 136); font-size: 28px; position: absolute; cursor: pointer;
-}
-.modal__header .modal__header--close:hover {
- color: rgb(68, 68, 68);
-}
-.modal__content {
- color: rgb(0, 0, 0); padding-top: 8px;
-}
-.modal__footer {
- padding-top: 35px;
-}
-.modal__footer a {
- margin-right: 5px;
-}
-.modal-open {
- padding-right: 17px;
-}
-.modal-open .navbar {
- padding-right: 17px;
-}
-.navbar .body-color-selector > a {
- color: rgb(111, 111, 111);
-}
-.navbar .body-color-selector-item {
- padding: 0px 10px; height: 50px; box-sizing: border-box; -moz-box-sizing: border-box;
-}
-.navbar .body-color-selector-color {
- border-radius: 100%; width: 25px; height: 25px; text-indent: -9999px; margin-top: 12px; float: right; background-color: rgb(218, 218, 218);
-}
-
diff --git a/ecomp-portal-BE/war/static/ebz/fn-ebz.css b/ecomp-portal-BE/war/static/ebz/fn-ebz.css
deleted file mode 100644
index 02e488f6..00000000
--- a/ecomp-portal-BE/war/static/ebz/fn-ebz.css
+++ /dev/null
@@ -1,1344 +0,0 @@
-@CHARSET "ISO-8859-1";
-
-*{
- font-family: arial;
-}
-
-/* html, body {
- overflow:auto
-} */
-div.fn-ebz-container{
- position:relative;
- display:inline-block;
- margin-top:4px;
- padding-bottom: 16px;
-}
-div.fn-ebz-small-container{
- position:relative;
- display:inline-block;
- margin-top:4px;
- padding-bottom: 16px;
- height:30px;
-}
-
-.myDivBackground div {
- font-family: clearviewatt;
- font-size: 11px;
- font-weight: normal;
- background:rgb(242, 242, 242);
- }
-.myGrid tr.z-row td.z-row-inner{
- border: 0px rgb(242, 242, 242);
- border-right: 0px solid transparent;
- padding: 0px;
-}
-.myGrid tr.z-row-over>td.z-row-inner>.z-row-cnt {
- color: #00547A;
-}
-
-.ebz-radioDiv{
- border: 1px solid #8FB9D0;
- padding:10px;"
-}
-/**************************************************************************************/
-/**************************** following is for button**********************************/
-/**************************************************************************************/
-.fn-ebz-btn, .fn-ebz-btn.std{
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
- height: 40px;
- padding-left: 30px;
- padding-right: 30px;
- font-size: 18px;
- text-align: center;
- border: 0px;
- cursor: pointer;
- color: rgba(255,255,255,1);
- margin-top:5px;
- margin-bottom:5px;
-}
-.fn-ebz-btn.sm {
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
- height: 30px;
- padding-left: 20px;
- padding-right: 20px;
- font-size: 12px;
- text-align: center;
- border: 0px;
- cursor: pointer;
- color: rgba(255,255,255,1);
-}
-.fn-ebz-btn.primary{
- background-color: #067AB4;
-}
-.fn-ebz-btn.footer{
- color: #067AB4;
-}
-.fn-ebz-btn:hover {
- background-color: rgba(0,145,217,1) !important;
-}
-.fn-ebz-btn:active {
- background-color: rgba(57,176,236,1) !important;
-}
-.fn-ebz-btn:disabled {
- background-color: rgba(211, 211, 211, 1) !important;
- color: rgba(170, 170, 170, 1);
- cursor: initial;
-}
-.fn-ebz-btn:focus {
- outline-offset:2px; /* not supported in IE */
- outline: rgba(57,176,236,1) solid 1px;
-}
-.fn-ebz-btn.loading{
- color: transparent !important;
- background:url("../images/fn-ebz-css/processing.gif") no-repeat;
- background-position: center;
- background-color: rgba(211, 211, 211, 1) !important;
-}
-.fn-ebz-btn.directional::after{
- content: " \2192";
- vertical-align: middle;
-}
-
-/*************************************************************************************/
-/**************************** following is for label**********************************/
-/*************************************************************************************/
-/*-----------------------------------------------------------------------------------*/
-/*---- font-size rules for label, specify top attr when change font size of label ---*/
-/*------------------------------ top: -(font-size)px --------------------------------*/
-/*-----------------------------------------------------------------------------------*/
-label.fn-ebz-text-label,label.fn-ebz-select-label{
- position: absolute;
- color: #444444;
- left:0px;
- top: -5px;
- white-space:nowrap;
- font-family :arial;
- /*font-size: 12px;*/
- font-size: .75rem;
-}
-label.fn-ebz-radiobtn-label {
- background-image: url(../images/fn-ebz-css/radio_btn.png);
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
-}
-
-/*************************************************************************************/
-/**************************** following is for text field ****************************/
-/*************************************************************************************/
-input[type="password"].fn-ebz-text{
-
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
- margin-top:8px;
- height:30px;
- width:250px;
- border: 1px solid gray;
- font-size: .875rem;
- /*font-size: 11px;*/
- /*font-weight: bold;*/
- padding-left: 10px;
-
-}
-input[type="text"].fn-ebz-text{
- width:210px;
- margin-right:20px;
-}
-input[type="text"].fn-ebz-text:hover{
- border: 1px solid black;
-}
-input[type="text"].fn-ebz-text:hover + label.fn-ebz-text-label{
- color: black;
-}
-input[type="text"].fn-ebz-text:focus{
- outline: 0;
- border: 1px solid rgba(57,176,236,1);
-}
-input[type="text"].fn-ebz-text:focus + label.fn-ebz-text-label{
- color: rgba(57,176,236,1);
-}
-input[type="text"].fn-ebz-text:disabled{
- background-color: LightGray;
-}
-input[type="text"].fn-ebz-text:disabled + label.fn-ebz-text-label{
- color: LightGray;
-}
-input[type="text"].fn-ebz-text:hover:disabled{
- border: 1px solid gray;
-}
-input[type="text"].fn-ebz-text:hover:disabled + label.fn-ebz-text-label{
- color: LightGray;
-}
-input[type="text"].fn-ebz-text.small{
- width:30px;
- height:20px;
-}
-input[type="text"].fn-ebz-text.medium-width{
- width:60px;
-}
-input[type="text"].fn-ebz-text.large{
- width:350px;
-}
-input[type="text"].fn-ebz-text.medium{
- width:200px;
- height:29px;
- margin-top:0;
- padding-top: 10px;
- padding-right: 10px;
- padding-bottom: 10px;
- padding-left: 10px;
-}
-
-input[type="text"].fn-ebz-text.search{
- width:200px;
- height:30px;
- padding-top: 10px;
- padding-right: 10px;
- padding-bottom: 10px;
- padding-left: 10px;
-}
-input[type="text"].fn-ebz-text.normal{
- width:250px;
- height:30px;
- padding-top: 10px;
- padding-right: 10px;
- padding-bottom: 10px;
- padding-left: 10px;
-}
-/********************************************************************************/
-/************************ following is for errors and valid *********************/
-/********************************************************************************/
-.fn-ebz-error{
- border: 1px solid red !important;
-}
-.fn-ebz-errorGeneric{
- border: 1px solid red !important;
-}
-.fn-ebz-errorGeneric + label.fn-ebz-text-label::after,.fn-ebz-errorGeneric + label.fn-ebz-select-label::after{
- content: url("../images/fn-ebz-css/error_sign_generic.png");
- baseline-shift: -2px;
- margin-left: 10px;
-}
-.fn-ebz-validInput{
- border: 1px solid green !important;
-}
-.fn-ebz-validInput + label.fn-ebz-text-label::after{
- content: url("../images/fn-ebz-css/warning_sign.png") url("../images/fn-ebz-css/10px_space.png") url("../images/fn-ebz-css/valid_check.png");
- baseline-shift: -2px;
- margin-left:5px;
- margin-right:5px;
-}
-.fn-ebz-validInput + label.fn-ebz-select-label{
- color: green;
-}
-.fn-ebz-validInput + label.fn-ebz-select-label::after{
- content: url("../images/fn-ebz-css/valid_check.png");
- baseline-shift: -2px;
- margin-left:10px;
-}
-
-/*************************************************************************************************/
-/************************************* Following is for tooltips *********************************/
-/*************************************************************************************************/
-span.fn-ebz-tooltip,span.fn-ebz-tooltip.south{
- position: absolute;
- height: 30px;
- top: 90%;
- left: 0%;
- line-height: 30px;
- text-align: center;
- visibility:hidden;
- border-radius: 6px;
- padding-left:10px;
- padding-right:10px;
- opacity: 0.7;
- z-index: 999;
- font-weight:bold;
- font-size: 14px;
- color: #000000;
- background: #FFFFFF;
- box-shadow: 0px 6px 6px gray;
- border: 2px solid #EEEEEE;
- text-align: center;
- white-space:nowrap;
-}
-span.fn-ebz-tooltip::before,span.fn-ebz-tooltip.south::before{
- content: '';
- position: absolute;
- bottom: 100%;
- left: 14px;
- margin-left: -12px;
- width: 0; height: 0;
- border-bottom: 12px solid #EEEEEE;
- border-right: 12px solid transparent;
- border-left: 12px solid transparent;
-}
-span.fn-ebz-tooltip::after,span.fn-ebz-tooltip.south::after {
- content: '';
- position: absolute;
- bottom: 99%;
- left: 14px;
- margin-left: -8px;
- width: 0; height: 0;
- border-bottom: 8px solid #FFFFFF;
- border-right: 8px solid transparent;
- border-left: 8px solid transparent;
-}
-span.fn-ebz-tooltip:hover{
- border: 2px solid Darkgray;
-}
-span.fn-ebz-tooltip:hover.south::before{
- border-bottom: 12px solid Darkgray;
-}
-span.fn-ebz-tooltip:hover.south::after{
- border-bottom: 8px solid white;
-}
-span.fn-ebz-tooltip:hover.north::before{
- border-top: 12px solid Darkgray;
-}
-span.fn-ebz-tooltip:hover.north::after{
- border-top: 8px solid white;
-}
-span.fn-ebz-tooltip.north{
- top: -70%;
-}
-span.fn-ebz-tooltip.north::before{
- top: 100%;
- border-top: 12px solid #EEEEEE;
- border-bottom: 0;
-}
-span.fn-ebz-tooltip.north::after{
- top: 100%;
- border-top: 8px solid #FFFFFF;
- border-bottom: 0;
-}
-
-span.fn-ebz-tooltip.error {
- color: #FFFFFF;
- padding-left:30px;
- background: url("../images/fn-ebz-css/error_sign_spec.png") no-repeat ;
- background-position: 10px 7px;
- background-color: #FF0000;
- border: 0;
-}
-span.fn-ebz-tooltip.error::before,span.fn-ebz-tooltip.warning:before {
- border: 0;
-}
-span.fn-ebz-tooltip.error.south::after {
- border-bottom: 8px solid #FF0000 !important;
-}
-span.fn-ebz-tooltip.error.north::after {
- border-top: 8px solid #FF0000 !important;
-}
-span.fn-ebz-tooltip.warning {
- color: black;
- padding-left:30px;
- background: url("../images/fn-ebz-css/warning_sign.png") no-repeat ;
- background-position: 10px 7px;
- background-color: orange;
- border: 0;
-}
-span.fn-ebz-tooltip.warning.south::after {
- border-bottom: 8px solid orange !important;
-}
-span.fn-ebz-tooltip.warning.north::after {
- border-bottom: 8px solid orange !important;
-}
-
-/*************************************************************************************************/
-/************************************* Following is for Dropdown *********************************/
-/*************************************************************************************************/
-select.fn-ebz-dropdown::-ms-expand {
- display:none;
-}
-select.fn-ebz-dropdown{
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
- -webkit-appearance: none; /* not supported in IE */
- -moz-appearance: none; /* not supported in IE */
- appearance: none; /* not supported in IE */
- height: 30px;
- width:200px;
- padding-left:10px;
- padding-right:30px;
- background:url(../images/fn-ebz-css/down_arrow.png) no-repeat right;
- background-color:white;
- color:gray;
- margin-top:8px;
- font-size:12px;
-}
-select.fn-ebz-dropdown:hover{
- border: 1px solid black;
- color:black;
-}
-select.fn-ebz-dropdown:hover + label.fn-ebz-select-label{
- color:black;
-
-}
-select.fn-ebz-dropdown:focus{
- outline: 0;
- color:black;
- border: 1px solid rgba(0,145,217,1);
- background: url(../images/fn-ebz-css/up_arrow.png) no-repeat right;
-}
-select.fn-ebz-dropdown:focus + label.fn-ebz-select-label{
- color: rgba(0,145,217,1);
-}
-
-select.fn-ebz-dropdown.medium{
- width:150px;
- height:29px;
- margin:auto;
-
- padding-right: 10px;
-
- padding-left: 10px;
-}
-
-select.fn-ebz-dropdown.large{
- height: 36px;
- font-size:14px;
-}
-
-.mydropdown{
- color:gray;
- /*font-size:11px;*/
- font-size: .875rem;
-}
-select.fn-ebz-dropdown.search{
- width:200px;
- height:30px;
- margin:auto;
- padding:0px;
-}
-/*************************************************************************************************/
-/********************************* following is for radio button *********************************/
-/*************************************************************************************************/
-div.fn-ebz-container>input[type=radio],input[type=radio].fn-ebz-radiobtn {
- display: none;
-}
-div.fn-ebz-container>input[type=radio]+label.fn-ebz-radiobtn-label,input[type=radio].fn-ebz-radiobtn+label.fn-ebz-radiobtn-label {
- background-image: url(../images/fn-ebz-css/radio_btn.png);
- padding-left: 32px;
- height: 30px;
- display: block;
- line-height: 30px;
- background-repeat: no-repeat;
- background-position: 0 0px;
- font-size: 16px;
- vertical-align: middle;
- cursor: pointer;
- opacity: 0.8;
-}
-div.fn-ebz-container>input[type=radio]+label.fn-ebz-radiobtn-label:hover, input[type=radio].fn-ebz-radiobtn+label.fn-ebz-radiobtn-label:hover{
- opacity: 1;
-}
-div.fn-ebz-container>input[type=radio]:checked+label.fn-ebz-radiobtn-label,input[type=radio].fn-ebz-radiobtn:checked+label.fn-ebz-radiobtn-label {
- background-image: url(../images/fn-ebz-css/radio_btn.png);
- background-position: 0 -30px;
-}
-div.fn-ebz-container>input[type=radio]:disabled+label.fn-ebz-radiobtn-label,input[type=radio].fn-ebz-radiobtn:disabled+label.fn-ebz-radiobtn-label {
- -webkit-filter: grayscale(100%);
- opacity: 0.5;
- cursor: default;
-}
-label.fn-ebz-radiobtn-label:active {
- background-position: 0 -60px !important;
- color:rgba(0,145,217,1);
-}
-div.fn-ebz-container>input[type=radio].fn-ebz-error+label.fn-ebz-radiobtn-label,input[type=radio].fn-ebz-radiobtn.fn-ebz-error+label.fn-ebz-radiobtn-label{
- background-position: 0 -90px;
-}
-div.fn-ebz-container>input[type=radio].fn-ebz-errorGeneric+label.fn-ebz-radiobtn-label,input[type=radio].fn-ebz-radiobtn.fn-ebz-errorGeneric+label.fn-ebz-radiobtn-label{
- background-position: 0 -90px;
-}
-
-
-
-/*************************************************************************************************/
-/********************************* following is header and footer *********************************/
-/*************************************************************************************************/
-
- .ebz_footer {
- /*clear: both;*/
- border-width: 0px 1px 0px 1px; border-style:
- solid; border-color: #959595;
- font-family: inherit;
- font-size: 12px;
- padding: 10px 10px 30px 10px;
- /* background: rgba(6, 124, 180, 0.82) !important; */
- background: #067AB4;
- color: white;
- }
-
- .ebz_header {
- border-width: 0px 1px 0px 1px; border-style:
- solid;
- border-color: #959595;
- font-size: 12px;
- font-family: inherit;
- }
-
- .ebz_header.level1 {
- background: #226485;
- color: white;
- }
-
- .ebz_header.level2 {
- background: #067AB4;
- padding: 10px 10px 15px 10px;
- color: white;
- font-size: 20px;
- }
-
- .ebz_header.level3 {
- background: white;
- padding: 10px 10px 10px 10px;
- color: black;
- }
-
-/*************************************************************************************************/
-/********************************* following is for grid in user page ****************************/
-/*************************************************************************************************/
- .heading1{
- font-family: omnes_att_light ;
- font-size: 36px;
- color: #444444;
- margin:0;
- padding:0;
- font-weight: normal;
- }
-
- .heading2{
- font-family: omnes_att_light ;
- font-size: 24px;
- color: #444444;
- margin:0;
- padding:0;
- font-weight: normal;
- }
-
- .heading3{
- font-family: omnes_att_light ;
- font-size: 16px;
- color: #444444;
- margin:0;
- padding:0;
- font-weight: bold;
- }
-
- .fn-ebz-grid.limited-size{
- padding:0;
- margin:0;
- min-height:40px;
- max-width: 940px;
- max-height: 900px;
- }
- .fn-ebz-grid tr.z-row td.z-row-inner, tr.z-row .z-cell {
- border:0 white;
- background: rgb(242,242,242);
- }
-
- .fn-ebz-grid tr.z-grid-odd td.z-row-inner, tr.z-grid-odd .z-cell, tr.z-grid-odd {
- background: rgb(255,255,255);
- }
-
- .fn-ebz-grid .z-grid-header-bg {
-
- background-image: none;
- }
-
-/* .fn-ebz-grid tr.z-grid-odd .z-row-over{
- background: rgb(107,166,191);
- } */
-
- .fn-ebz-grid .z-column-cnt, .z-row-cnt{
- font-size: 13px;
- font-weight: normal;
- color: black;
- }
-
- .fn-ebz-grid .z-column-cnt{
- text-align: left;
- }
-
- .fn-ebz-grid .z-label{
- font-size: 12px;
- font-weight: normal;
- word-wrap: break-word;
- white-space: pre-wrap;
- }
-
- .fn-ebz-grid .z-grid-header th.z-column div.z-column-cnt{
- white-space: pre-wrap;
- color: white;
- backgroud: grey;
- }
- .fn-ebz-grid div.z-grid-header th.z-column, div.z-grid-header th.z-auxheader{
- background: rgb(102,102,102) repeat-x 0 0 !important;
- background-image: none !important;
- background-color:grey;
- border-color: grey;
- height: 40px;
- }
-
- .fn-ebz-grid tr.z-row-over > td.z-row-inner {
- border-color:lightgrey;
- }
- .fn-ebz-grid tr.z-row-over > td.z-row-inner, tr.z-row-over > .z-cell {
- background-color: lightgrey ;
- }
- .fn-ebz-grid .z-row-cnt {
- color: black;
- }
-
- .fn-ebz-grid tr.z-row-over > td.z-row-inner > .z-row-cnt{
- color: black;
- }
-
- .fn-ebz-btn.grid-btn{
- margin:auto;
- }
- .fn-ebz-grid .z-toolbarbutton-cnt{
- padding: 8px 2px;
- margin: auto;
- }
-
- .z-button-os, .z-label, .z-button, .z-radio-cnt, .z-checkbox-cnt, .z-loading, .z-toolbarbutton-cnt, .z-button tr td {
- font-family: arial;
- }
- .fn-ebz-btn.z-button tr td {
- color: rgba(255,255,255,1);
- }
- .fn-ebz-btn.grid-btn.z-toolbarbutton-over .z-toolbarbutton-cnt , .fn-ebz-btn.z-button .z-button-tm, .z-button .z-button-bm, .fn-ebz-btn.z-button .z-button-cm,
- .z-button .z-button-tl, .fn-ebz-btn.z-button .z-button-tr, .fn-ebz-btn.z-button .z-button-bl, .z-button .z-button-br, .fn-ebz-btn.z-button .z-button-cl, .fn-ebz-btn.z-button .z-button-cr{
- background-image: none;
- }
- .fn-ebz-btn.z-button .z-button-cm{
- padding:0;
- }
-
- .fn-ebz-btn.grid-btn.z-toolbarbutton-over .z-toolbarbutton-body{
- border: 0px;
- }
- .fn-ebz-pop-up{
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
- border-style: solid;
- border-width: 1px;
- max-width:360px;
- }
-
- .fn-ebz-pop-up .z-label{
- margin:0;
- padding:0;
- white-space: pre-wrap;
- }
- .fn-ebz-pop-up.success{
- border-color: #4CA90C;
- }
-
- .fn-ebz-pop-up.warning-unsuccess{
- border-color: #FF9900;
- }
- .fn-ebz-pop-up .heading, .fn-ebz-pop-up .heading .z-label{
- font-family:Calibri;
- font-size: 16px;
- font-weight:bold;
- white-space: pre-wrap;
- }
- .fn-ebz-pop-up.success .heading, .fn-ebz-pop-up.success .heading .z-label{
- color: #4CA90C
- }
- .fn-ebz-pop-up.warning-unsuccess .heading, .fn-ebz-pop-up.warning-unsuccess .heading .z-label{
- color: #FF9900;
- }
-
- .fn-ebz-pop-up.success .text-content{
- background-image:url('../images/vsp_check_sign.jpg');
- }
- .fn-ebz-pop-up.warning-unsuccess .text-content{
- background-image:url('../images/vsp_warning_sign.jpg');
- }
- .fn-ebz-pop-up .text-content{
- background-repeat:no-repeat;
- background-position:15px center;
- background-size: 30px 30px;
- margin:0;
- padding: 10px 20px 16px 60px;
-
- }
- .fn-ebz-pop-up{
- background-color: #FFF;
- opacity:0.95;
- }
- a.fn-ebz-link{
- font-family: Calibri;
- text-decoration: none;
- color: grey;
- font-size: 18px;
- }
- a.fn-ebz-link:hover{
- color: rgb(6, 122, 180);
- cursor: pointer;
- }
-
- .hide, .show{
- width: 100%;
- height: 100%;
- }
-
- a.collapsibleArrow{
- width: 30px;
- height: 30px;
- margin-left: 10px;
- }
-
- .fn-ebz-grid .z-column-unassigned-Image{
- width: 7px;
- height: 7px;
- }
-
-/*************************************************************************************************/
-/********************************* following is for info label ***********************************/
-/*************************************************************************************************/
-
- .fn-ebz-info-label {
- display: inline-block;
- width: 300px;
- color: black;
- padding-left:30px;
- background: url("../images/info_blue.jpg") no-repeat;
- background-position:top left;
- }
-
-/*************************************************************************************************/
-/********************************* following is for ListBox ****************************/
-/*************************************************************************************************/
-
- /*To change the header color to gray*/
- .mylistbox .z-listbox-header tr.z-listhead,.mylistheader .z-listbox-header tr.z-auxhead {
- background: rgb(102,102,102) repeat-x 0 0 !important;
- background-image: none !important;
- }
- .mylistbox .z-listheader-sort-asc .z-listheader-sort-img, .z-listheader-sort-dsc .z-listheader-sort-img {
- background-position: 0 0;
- background-repeat: no-repeat;
- background-image:none;
- }
- .mylistbox tr.z-listbox-odd {
-
- background: rgb(255,255,255);
- }
- .mylistbox .z-listitem{
- background: rgb(242,242,242);
- }
- .mylistbox .z-listitem-over {
- background-color: rgb(107,166,191) !important;
- border: none;
- cursor: pointer;
- text-shadow: 1px 1px 1px #59ACC1;
- }
-
- .mylistbox .z-listbox-header-bg{
- background-image: none ;
- }
-
- .mylistbox div.z-listheader-cnt {
- color: white;
- }
- div.z-listbox {
- overflow: hidden;
- zoom: 1;
- background: #FFF;
- border: none;
- background-image: none;
- }
- .mylistbox .z-listcell-cnt {
- font-size: 13px;
- font-family: arial;
-
- }
-
- div.ebz-listbox {
- height:350px;
- border:1px solid black;
- overflow:auto ;
- border-radius: 6px;
- border-color:rgb(105, 138, 154);
- background-color: rgb(255, 255, 255);
- padding:10px;
- -webkit-border-radius: 10px;
- -moz-border-radius: 10px;
- }
-
-/*************************************************************************************************/
-/********************************* following is for butto on LocationPhoneNosList ****************************/
-/*************************************************************************************************/
-
- .myComboboxTextbox .z-combobox .z-combobox-inp{
- border: 1px solid #E6E6E6; border-top-color: #B2B2B2; border-right: 0; padding: 2px;
- border-radius: 6px 0 0 2px; -moz-border-radius: 2px 0 0 2px; -webkit-border-radius: 6px 0 0 2px; height: 25px;
- }
- .myzkBtn{
- color:gray; -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; height: 32px; width:32px; background:white; margin-top:8px;
- }
- .myTextbox{
- padding-left: 8px; border-radius: 6px; height: 30px; width: 150px;
- }
-/*************************************************************************************************/
-/********************************* following is for Dashboard ****************************/
-/*************************************************************************************************/
- .ebz_dashboard .z-panel-br,.ebz_dashboard .z-panel-cr,.ebz_dashboard .z-panel-cl,.ebz_dashboard .z-panel-hr,.ebz_dashboard .z-panel-tr,.ebz_dashboard .z-panel-hl{
- background-image: none;
- background-color: white;
- color: white;
- }
- .ebz_dashboard .z-panel-hm .z-panel-header,.ebz_dashboard .z-panel-header {
- background-image: none;
- background-color: white;
- font-size: 15px;
- font-weight: bold;
- color: grey;
- font-family:arial;
- }
- .ebz_dashboard .z-panel-hl{
- border-bottom:0px;
- }
- .ebz_dashboard .z-panelchildren{
- border:0px;
- }
-
- .ebz_dashboard .z-panel-shadow{
- box-shadow: 0 2px 5px 0 #bebebe;
- border:3px solid rgb(242,242,242);
- }
-
- .ebz_dashboard .search_panel_span{
- font-size:12px;
- }
- .mypanel .z-panel-br,.mypanel .z-panel-cr,.mypanel .z-panel-cl,.mypanel .z-panel-hr,.mypanel .z-panel-tr,.mypanel .z-panel-hl
- {
- background-image: none;
- background-color: grey;
- color: white;
- }
-
- .mypanel .z-panel-hm .z-panel-header,.mypanel .z-panel-header {
- background-image: none;
- background-color: grey;
- font-size: 15px;
- font-weight: bold;
- color: white;
- }
-
- .adashboard {
- color: grey;
- text-decoration: none;
- font-size: 14px;
- font-family: arial;
- }
-
- .adashboard:hover {
- color: rgb(6, 122, 180);
- }
-
- .horizontal-label{
- font-size:12px;
- }
-
- .myDashboard iframe {
- position: relative;
- height: 100%;
- width: 100%;
- background:rgb(242, 242, 242);
- border:none;
- }
-
- .myDashboard .a {
- color: grey !important;
- font-family: Calibri;
- text-decoration: none;
- font-size: 18px;
- }
-
- .myDashboard .a:hover {
- color: rgb(6, 122, 180);
- }
-
- .fn-ebz-info{
- width:500px
- }
-
-
- .myDashboard .z-panel-hm .z-panel-header, .myDashboard .z-panel-header {
- background-image: none;
- background-color: grey;
- font-size: 15px;
- font-weight: bold;
- }
- .myDashboard .z-window-overlapped-cnt-noborder{
- padding:0px;
- }
-
- .fn_ebz_dashboard_search_dd .select2-container .select2-choice{
- height:30px;
- border-top-right-radius: 0px;
- border-bottom-right-radius: 0px;
- border: 1px solid #D3D3D3;
- z-index:0;
- }
- .fn_ebz_dashboard_search_dd .select2-container .select2-chosen{
- line-height:30px;
- }
-
- .fn_ebz_dashboard_search_dd .select2-container .select2-choice .select2-arrow b:after, .select2-container.select2-container-disabled .select2-choice .select2-arrow b:after{
- height:30px;
- line-height:30px;
- }
- .fn_ebz_dashboard_search_dd .select2-results{
- margin: -4px 0 0;
- }
- .fn_ebz_dashboard_search_dd .select2-dropdown-open .select2-choice{
- border-top-right-radius:0 !important;
- }
- .fn_ebz_dashboard_search_dd .select2-container .select2-choice .select2-arrow{
- border-top-right-radius:0 !important;
- }
- .fn_ebz_dashboard_search_button .button {
- padding:6px;
- border-bottom-left-radius:0px;
- border-top-left-radius:0px;
- }
- .fn_ebz_dashboard_input{
- background:white !important;
- border-radius:0 0 0 0 !important;
- font-family:arial !important;
- height:30px !important; border-left-width: 0px !important;
- padding-bottom: 9px !important;
- }
-/*************************************************************************************************/
-/********************************* following is for location Manage ****************************/
-/*************************************************************************************************/
-
- .ebz_location_manage tr.z-listitem-seld .z-listcell-cnt,.ebz_location_manage tr.z-listitem-over-seld .z-listcell-cnt,.ebz_location_manage tr.z-listitem-over .z-listcell-cnt{
- color:black;
- }
- .ebz_location_manage div.z-listbox-header th.z-auxheader{
- border:none;
- }
- .ebz_location_manage div.z-listbox-header div.z-auxheader-cnt{
- padding-bottom:0;
- }
- .ebz_location_manage div.z-listbox-footer .z-listfooter,.ebz_location_manage div.z-listbox-footer{
- background: none;
- border:none;
- }
- .ebz_location_manage div.z-listbox-footer table {
- margin:0;
- }
-
-/*************************************************************************************************/
-/********************************* following is for CallFowardAdd ****************************/
-/*************************************************************************************************/
-
-.myhlayout .z-hlayout-inner {
- vertical-align: middle;
-}
-
-.myhlayout{
- position:relative; left:55px;
-}
-
-/* div.tile{
- display: table-cell;
- position: relative;
- height:50%;
- border: 1px solid grey;
- border-radius: 15px;
-}
-div.tile-content{
- margin: 0;
- padding: 20px 20px 100px 20px;
- height:100%;
-}
-div.tile.without_save_btn .tile-content{
- padding-bottom: 20px;
-}
-div.detail{
- padding-left:5%;
- width: 100%;
- height:100%;
- display: table;
- table-layout: fixed;
- border-spacing: 5px;
-}
-div.detail-row{
- display:table-row;
- width:100%;
- height:100%;
-} */
-.right-bottom{
- position:absolute;
- right:20px;
- top:40px;
-}
-
-.lred .tags__item--color.tags__item .tags__item--color-icon{
- background:red;
- border-color: red;
- z-index:0;
-}
-.lred .tags__item.tags__item--color{
- border:none;
-}
-.lred .tags__item.tags__item--color:active{
- background:none;
-}
-
-.lgreen .tags__item--color.tags__item .tags__item--color-icon{
- background:#118817;
- border-color: #118817;
- z-index:0;
-}
-.lgreen .tags__item.tags__item--color{
- border:none;
-}
-.lgreen .tags__item.tags__item--color:active{
- background:none;
-}
-
-
-ul.tab {
- list-style: none;
- padding: 0;
- margin: 0;
-}
-ul.tab li {
- float: left;
- border: 1px solid #000;
- border-bottom-width: 0;
- margin: 3px 3px 0px 3px;
- padding: 5px 5px 0px 5px;
- background-color: #CCC;
- color: #696969;
- cursor: pointer;
-}
-ul.tab li.active {
- background-color: #FFF;
- color: #000;
-}
-
-a.info-link:before {
- content: url(../images/info_blue.jpg);
- margin: 0;
-}
-
-table.tableSection {
- display: table;
- width: 100%;
-}
-table.tableSection thead, table.tableSection tbody {
- float: left;
- width: 100%;
-}
-table.tableSection tbody {
- overflow: auto;
- overflow-x: hidden;
-}
-table.tableSection tr {
- width: 100%;
- display: table;
- text-align: left;
-}
-
-.custom-file-input::-webkit-file-upload-button {
- visibility: hidden;
-}
-.custom-file-input::before {
- content: 'Browse';
- background-color: #067AB4;
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
- display: inline-block;
- height: 30px;
- padding-left: 10px;
- padding-right: 10px;
- padding-top:5px;
- font-size: 14px;
- text-align: center;
- border: 0px;
- cursor: pointer;
- color: rgba(255,255,255,1);
- margin-top:5px;
- margin-bottom:5px;
- margin_right:5px
-}
-.custom-file-input:hover::before {
- border-color: black;
-}
-.custom-file-input:active::before {
- background: -webkit-linear-gradient(top, #e3e3e3, #f9f9f9);
-}
-
-.ebz_menu_anchorMenuDiv{
- position:absolute;
- display:none;
- margin-top: 0px;
- background-color: white;
- width: 955px;
- border: 1px solid;
- border-right: 0px; color: rgb(211, 211, 211);
-
-}
-.ebz_menu_anchorMenuDiv2{
- background-color: white;
- width: 130px;
- display: true;
- border: 1px solid;
- color: rgb(211, 211, 211);
- float:right;
- margin-top: -29px;
- box-shadow: 10px 10px 5px #888888;
- height:94vh;
- position:relative;
- z-index:1;
- border-radius: 8px;
-}
-.ebz_menu_anchorHead2{
-
- font-size:18px;
-}
-.ebz_menu_meunIcon_div{
- width:1029px;
- position:relative;
- z-index:2;
-}
-
-.ebz_menu_anchorMenu_div{
- width:1230px;
-}
-.ebz_menu_anchorIcon{
- margin-top:10px;
- font-size: 35px;
-}
-.ebz_menu_anchorIcon2{
- font-size: 35px;
-}
-.ebz_menu_anchorIconAndHead{
- float:left; margin-left:40px; width:125px; height:95px;
-}
-.ebz_menu_anchorIconAndHead2{
- margin-top:20px;
- margin-bottom:20px;
-}
-.ebz_menu_userItems {
- text-transform: none;
- line-height: 10px;
- font-weight: 100;
- color: black;
-}
-
-.ebz_menu_userItemsValue {
- color: #666666;
-}
-.ebz_menu_secondLevelOption{
- font-size: 18px; color: #666666; margin-left:auto; margin-right:auto; float: left;
-}
-
-.ebz_menu_thirdLevelOptionHeader a{
- color: black;
- font-weight: bold;
- font-size: 12px;
-
-}
-.ebz_menu_thirdLevelOptionHeader{
- margin-top: 25px;
- float: left;
- width: 180px;
-}
-.ebz_menu_userMenuInfoDiv{
- margin-top: -252px;
- background-color: white;
- margin-left:auto;
- height: 252px;
- width: 207px;
- display: block;
- border: 1px solid;
- color: rgb(211, 211, 211);
-}
-.ebz_menu_userMenuLogoutDiv{
- margin-top: 0px; margin-left:441px; background-color: rgb(250, 250, 250); height: 252px; width: 125px; display: true; border: 1px solid; border-right: 0px; color: rgb(211, 211, 211);
-}
-
-.ebz_menu_navBtn a {
- position: relative;
- font-size: 18px;
- color: white;
- font-size: 18px;
- -webkit-transition-property: position, color; /* Safari */
- -webkit-transition-duration: 5s; /* Safari */
- transition-property: position, color;
- transition-duration: 5s;
-}
-.ebz_menu_navBtn a:hover {
- position: relative;
- bottom: 2px;
- color: rgb(191, 213, 224);
-}
-
-.ebz_search_directory_phone_detail .phoneDetail{
- display: inline-block;
- margin-left:20px;
- margin-bottom:20px;
-}
-
-.ebz_search_directory_phone_detail .phoneDetailInside .colsize{
- width:180px;
- height:45px;
- padding:0px;
-}
-.ebz_search_directory_phone_detail .phoneDetailInside{
- border: 1px solid;
- width:400px;
- height:250px;
- background:white;
-}
-
-.ebz_search_button{
- color:gray; -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; height: 32px; width:32px; background:white;
- background-repeat: no-repeat; background-position: center; margin-top:0px;
-}
-.ebz_helpfulInfo{
- border-style: solid;
- border-width: 1px;
- margin-bottom:50px;
-}
-.ebz_helpfulInfo .helpfulInfoContent{
- margin-left:10px;
- margin-top:10px;
-}
-.ebz_helpfulInfo .helpfulInfoTable{
- width:340px;
- margin-left:10px;
- display:inline-flex;
-}
-.ebz_helpfulInfo .helpfulInfoTableHeight{
- height:250px;;
-}
-
-.ebz_bulk_edit{
- margin-top:20px;
-}
-.ebz_bulk_edit .content{
- margin-top:20px;
-}
-.form-field, .form-field-input-container {
-width: 210px !important;
-margin-right:20px;
-}
-.form-field__square .select2-container .select2-choice, .form-field__square select, .form-field__square {
- -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0;
-}
-.form-field__square.left_round_border .select2-container .select2-choice, .form-field__square.left_round_border select, .form-field__square.left_round_border div, .form-field__glued.form-field__square.left_round_border input[type="text"]{
- -webkit-border-radius: 5px 0px 0px 5px; -moz-border-radius:5px 0px 0px 5px; border-radius: 5px 0px 0px 5px;
-}
-.form-field__square.right_round_border .select2-container .select2-choice, .form-field__square.right_round_border select, .form-field__square.right_round_border div, .form-field__glued.form-field__square.right_round_border input[type="text"]{
- -webkit-border-radius: 0px 5px 5px 0px; -moz-border-radius:0px 5px 5px 0px; border-radius: 0px 5px 5px 0px;
-}
-.form-field__glued.form-field__square{
- margin-right:-5px;
-}
-.form-field__glued.form-field__square{
- vertical-align:top;
-}
-.form-field__glued.form-field__square input[type=text], .form-field__glued.form-field__square select {
- margin-top:0;
-}
-div.hide-password-placeholder>div.form-field>label.form-field__label.form-field__label--show, div.hide-password-placeholder>div.form-field>label.form-field__label.form-field__label--hide{
- visibility: hidden;
-}
-.col-md-18.content div.fn-ebz-container {
- margin-top:14px;
-}
-.col-md-18.content div.fixed-in-row{
- position:fixed; top:115px; z-index:95; width:725px;
-}
-.col-md-18.content div.fixed-in-row {
- text-align:right;
-}
-.col-md-18.content .size-onefourth, .form-field__glued.size-onefourth{
- width: 25%;
-}
-
-.voiceAndCalllog{
- display:none;
- position: relative;
- margin-left:5px;
-}
-
-.loadingId{
- position: fixed;
- top: 50%;
- right: 50%;
- z-index: 101;
-}
-
-.login-btn {
- cursor: pointer;
- background: #d97b34;
- background-image: -webkit-linear-gradient(top, #d97b34, #b8632b);
- background-image: -moz-linear-gradient(top, #d97b34, #b8632b);
- background-image: -ms-linear-gradient(top, #d97b34, #b8632b);
- background-image: -o-linear-gradient(top, #d97b34, #b8632b);
- background-image: linear-gradient(to bottom, #d97b34, #b8632b);
- -webkit-border-radius: 7;
- -moz-border-radius: 7;
- border-radius: 7px;
- font-family: Arial;
- color: #ffffff;
- font-size: 13px;
- padding: 4px 10px 4px 10px;
- text-decoration: none;
-}
-
-.login-btn:hover {
- background: #db9444;
- background-image: -webkit-linear-gradient(top, #db9444, #ba853a);
- background-image: -moz-linear-gradient(top, #db9444, #ba853a);
- background-image: -ms-linear-gradient(top, #db9444, #ba853a);
- background-image: -o-linear-gradient(top, #db9444, #ba853a);
- background-image: linear-gradient(to bottom, #db9444, #ba853a);
- text-decoration: none;
-}
-
-
-#messagingDashboard .widgetBody{border:1px solid #d3d3d3;overflow:hidden}
-#messagingDashboard .widgetHeader{height:50px !important;border:1px solid #d3d3d3;border-bottom:0;background-color:#e5e5e5;padding-right:20px;width:100%;white-space:nowrap;text-overflow:ellipsis;z-index:1;-webkit-border-radius:2px 2px 0 0;-moz-border-radius:2px 2px 0 0;-ms-border-radius:2px 2px 0 0;-o-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;behavior:url(/ebiz/dashboard/web/common/css/pie/PIE.htc );position:relative}
-#messagingDashboard .widgetHeader .widgetHeaderContent{line-height:44px;font-family:clearviewatt;font-size:18px;color:#444}
-#messagingDashboard .widgetHeader .widgetSubHeaderContent{position:absolute;top:29.5px;left:18px;font-family:clearviewatt;font-size:12px;color:#444}
-
-#messagingDashboard input[type="text"].fn-ebz-text{
- width:150px;
- margin-top:0;
- }
- #messagingDashboard div.without_save_btn{
- display: table-cell;
-}
-
-#messagingDashboard .content-summary{
- margin-top:20px;
- margin-right:50px;
-}
-} \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/ebz/footer_new.css b/ecomp-portal-BE/war/static/ebz/footer_new.css
deleted file mode 100644
index 9e98cb57..00000000
--- a/ecomp-portal-BE/war/static/ebz/footer_new.css
+++ /dev/null
@@ -1,310 +0,0 @@
-/* Please include base.less file to make this footer work*/
-/*font family*/
-.footerContainer {
- background: none repeat scroll 0 0 #067AB4;
- width: 100%;
- margin: 0 auto;
- background-color: #067AB4;
- position: static;
-}
-.footerContainer.stickyFooter {
- position: absolute;
- left: 0;
- right: 0;
-}
-.footerContainer .footerWrapper {
- width: 980px;
- padding-bottom: 25px;
- margin: 0 auto;
- background-color: #067AB4;
-}
-.footerContainer .footerWrapper .footerItem {
- width: 980px;
- height: 60px;
- line-height: 1;
- margin: auto;
- overflow: hidden;
- font-family: clearviewatt;
- font-size: 12px;
- color: #ffffff;
-}
-.footerContainer .footerWrapper .footerItem .divider {
- border-bottom: 1px solid #ffffff;
- margin-top: 10px;
- margin-bottom: 10px;
- width: 100px;
-}
-.footerContainer .footerWrapper .footerItem .customerSupport {
- float: left;
- width: 160px;
- margin-left: 30px;
-}
-.footerContainer .footerWrapper .footerItem .customerSupport .customerHelp {
- font-size: 14px;
- margin-bottom: 20px;
- margin-top: 45px;
-}
-.footerContainer .footerWrapper .footerItem .customerSupport a {
- color: #ffffff !important;
-}
-.footerContainer .footerWrapper .footerItem .customerSupport a:hover {
- text-decoration: none;
-}
-.footerContainer .footerWrapper .footerItem .legalInfo {
- float: left;
- width: 160px;
-}
-.footerContainer .footerWrapper .footerItem .legalInfo .legal {
- font-size: 14px;
- margin-bottom: 20px;
- margin-top: 45px;
-}
-.footerContainer .footerWrapper .footerItem .legalInfo a {
- color: #ffffff !important;
-}
-.footerContainer .footerWrapper .footerItem .legalInfo a:hover {
- text-decoration: none;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection {
- float: left;
- width: 295px;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeSave {
- font-size: 14px;
- margin-bottom: 20px;
- margin-top: 45px;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeToSection {
- margin-top: 15px;
- overflow: hidden;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeToSection .emailAddress {
- float: left;
- width: 170px;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeToSection .emailAddress input {
- background-color: #067AB4;
- color: #FFFFFF !important;
- width: 152px;
- padding: 5px 10px 5px 5px;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeToSection .subscribeBtn {
- background-color: #FFFFFF;
- border-radius: 1px 5px 5px 1px;
- color: #067AB4;
- cursor: pointer;
- float: left;
- font-size: 14px;
- height: 30px;
- position: relative;
- right: 7px;
- text-align: center;
- top: 1px;
- vertical-align: middle;
- width: 95px;
-}
-.footerContainer .footerWrapper .footerItem .socialMedia {
- float: left;
- margin-left: 0px;
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .followAtt {
- font-size: 14px;
- margin-bottom: 20px;
- margin-top: 45px;
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .socialFeeds {
- margin-left: -8px;
- margin-top: 20px;
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .socialFeeds span {
- font-size: 30px;
- margin: 0;
- padding: 5px;
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .socialFeeds span a {
- color: #ffffff;
- margin: 0;
- padding: 0;
- /*width: 30px;*/
-
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .socialFeeds span a:hover {
- text-decoration: none;
-}
-.footerContainer .footerWrapper .dividerBottom {
- border-bottom: 1px solid #ffffff;
- margin: auto;
- width: 920px;
-}
-.footerContainer .footerWrapper .feedbackSection {
- margin: auto;
- width: 920px;
- display: none;
-}
-.footerContainer .footerWrapper .feedbackSection .dividerTop {
- border-bottom: 1px solid #ffffff;
- margin: auto;
- width: 920px;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent {
- margin: 30px auto;
- height: 240px;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent #feedbackForm {
- height: 120px;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent .feedbackInfo {
- margin-right: 30px;
- width: 270px;
- font-family: clearviewatt;
- font-size: 12px;
- color: #FFFFFF;
- float: left;
- margin-top: -5px;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent .feedbackTextSection .feedbackText {
- width: 620px;
- height: 170px;
- border: 1px solid #FFFFFF;
- background-color: #067AB4;
- border-radius: 5px;
- font-family: clearviewatt;
- font-size: 14px;
- cursor: text;
- color: #FFFFFF;
- float: left;
- padding: 10px;
- resize: none;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent .feedbackTextSection .feedbackSubmitButton {
- width: 82px;
- background-color: #FFFFFF;
- margin-left: 16px;
- padding: 5px;
- border-radius: 5px;
- color: #067AB4;
- cursor: pointer;
- font-family: clearviewatt;
- font-size: 14px;
- border: none;
- margin-top: 10px;
- margin-right: 0px;
- float: right;
-}
-.footerContainer .footerWrapper .feedbackResultMsg {
- font-family: clearviewatt;
- font-size: 18px;
- color: #FFFFFF;
- line-height: 70px;
- width: 980px;
- text-align: center;
- margin: 0 auto;
- display: none;
-}
-.footerContainer .footerWrapper .feedbackResultMsg #feedbackMsgCheck {
- margin-right: 20px;
- font-size: 20px;
-}
-.footerContainer .footerWrapper .feedbackResultMsg .feedbackMsgOKButton {
- width: 82px;
- height: 30px;
- line-height: 0px;
- background-color: #FFFFFF;
- margin-left: 16px;
- padding: 5px;
- border-radius: 5px;
- color: #067AB4;
- cursor: pointer;
- font-family: clearviewatt;
- font-size: 14px;
- border: none;
- margin-top: 20px;
- margin-right: 30px;
- float: right;
-}
-.footerContainer .footerWrapper #feedbackResultDivider {
- display: none;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv {
- margin: auto;
- max-width: 110px;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv .feedbackButton,
-.footerContainer .footerWrapper .feedbackButtonDiv .closeFeedbackButton {
- background-color: #FFFFFF;
- background: #FFFFFF;
- margin: -1px auto auto;
- padding: 5px 10px;
- border-radius: 0 0 5px 5px;
- color: #067AB4;
- cursor: pointer;
- border: none;
- font-family: clearviewatt;
- font-size: 14px;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv .feedbackButton span,
-.footerContainer .footerWrapper .feedbackButtonDiv .closeFeedbackButton span {
- padding-left: 10px;
- background-image: none;
-}
-.footerContainer .footerWrapper .attFooterInfo {
- margin: auto;
- width: 980px;
- overflow: hidden;
- font-family: clearviewatt;
- font-size: 12px;
- color: #ffffff;
-}
-.footerContainer .footerWrapper .attFooterInfo a {
- color: #ffffff;
- margin: 0;
- padding: 0;
- text-decoration: underline;
-}
-.footerContainer .footerWrapper .attFooterInfo .footerLastSection {
- margin-top: 40px;
- width: 980px;
- overflow: hidden;
-}
-.footerContainer .footerWrapper .attFooterInfo span {
- border-right: 1px solid #ffffff;
- padding-left: 3px;
- padding-right: 5px;
-}
-.footerContainer .footerWrapper .attFooterInfo span:last-child {
- border: none;
-}
-.footerContainer .footerWrapper .attFooterInfo .attLogo {
- background: url("images/footer-attolympiclogo.png") repeat-x scroll 0 0 transparent;
- width: 150px;
- height: 77px;
- margin-left: 17px;
- margin-right: 0;
- float: left;
-}
-.footerContainer .footerWrapper .attFooterInfo .attQuality {
- background: url("../images/common/footer/footer-consumerinfo.png") repeat-x scroll 0 0 transparent;
- margin-right: 103px;
- float: left;
- width: 79px;
- height: 82px;
- position: relative;
- top: -5px;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise {
- float: right;
- width: 68%;
- margin-right: 30px;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise .privacyPolicy {
- margin-top: 17px;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise .privacyPolicy a {
- text-decoration: underline;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise .privacyPolicy a span {
- padding: 0px;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise .privacyPolicy a:hover {
- text-decoration: underline;
-}
diff --git a/ecomp-portal-BE/war/static/ebz/globalFonts.css b/ecomp-portal-BE/war/static/ebz/globalFonts.css
deleted file mode 100644
index 1c48c31e..00000000
--- a/ecomp-portal-BE/war/static/ebz/globalFonts.css
+++ /dev/null
Binary files differ
diff --git a/ecomp-portal-BE/war/static/ebz/header_new.css b/ecomp-portal-BE/war/static/ebz/header_new.css
deleted file mode 100644
index 702f529a..00000000
--- a/ecomp-portal-BE/war/static/ebz/header_new.css
+++ /dev/null
@@ -1,1781 +0,0 @@
-/* Generated by F12 developer tools. This might not be an accurate representation of the original source file */
-@font-face {
- font-family: clearviewatt;
- src: url(sandbox/styles/clearviewatt/clvatt-book-webfont.eot?#iefix) format("embedded-opentype"), url(sandbox/styles/clearviewatt/clvatt-book-webfont.woff) format("woff"), url(sandbox/styles/clearviewatt/clvatt-book-webfont.ttf) format("truetype"), url(sandbox/styles/clearviewatt/clvatt-book-webfont.svg#clearviewattregular) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: clearviewattregular;
- src: url(sandbox/styles/clearviewatt/clvatt-book-webfont.eot?#iefix) format("embedded-opentype"), url(sandbox/styles/clearviewatt/clvatt-book-webfont.woff) format("woff"), url(clearviewatt/clvatt-book-webfont.ttf) format("truetype"), url(clearviewatt/clvatt-book-webfont.svg#clearviewattregular) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: clearviewatt_italic;
- src: url(./webfonts/clvatt-book_ital-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/clvatt-book_ital-webfont.woff) format("woff"), url(./webfonts/clvatt-book_ital-webfont.ttf) format("truetype"), url(./webfonts/clvatt-book_ital-webfont.svg#clearviewattitalic) format("svg");
- font-weight: normal;
- font-style: italic;
-}
-@font-face {
- font-family: clearviewatt_lt;
- src: url(./webfonts/clvatt-light-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/clvatt-light-webfont.woff) format("woff"), url(./webfonts/clvatt-light-webfont.ttf) format("truetype"), url(./webfonts/clvatt-light-webfont.svg#clearviewatt_ltregular) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: clearviewattlight_italic;
- src: url(./webfonts/clvatt-light_ital-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/clvatt-light_ital-webfont.woff) format("woff"), url(./webfonts/clvatt-light_ital-webfont.ttf) format("truetype"), url(./webfonts/clvatt-light_ital-webfont.svg#clearviewatt_ltitalic) format("svg");
- font-weight: normal;
- font-style: italic;
-}
-@font-face {
- font-family: clearviewatt_ltbold;
- src: url(sandbox/styles/clearviewatt/clearviewatt-bold-webfont.eot?#iefix) format("embedded-opentype"), url(sandbox/styles/clearviewatt/clearviewatt-bold-webfont.woff) format("woff"), url(sandbox/styles/clearviewatt/clearviewatt-bold-webfont.ttf) format("truetype"), url(sandbox/styles/clearviewatt/clearviewatt-bold-webfont.svg#clearviewatt_ltbold) format("svg");
- font-weight: bold;
- font-style: normal;
-}
-@font-face {
- font-family: clearviewatt_ltbold_italic;
- src: url(./webfonts/clvatt-bold_ital-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/clvatt-bold_ital-webfont.woff) format("woff"), url(./webfonts/clvatt-bold_ital-webfont.ttf) format("truetype"), url(./webfonts/clvatt-bold_ital-webfont.svg#clearviewatt_ltbold_italic) format("svg");
- font-weight: bold;
- font-style: italic;
-}
-@font-face {
- font-family: omnes_attlight;
- src: url(omnesatt/omnesatt-light-webfont.eot?#iefix) format("embedded-opentype"), url(omnesatt/omnesatt-light-webfont.woff) format("woff"), url(omnesatt/omnesatt-light-webfont.ttf) format("truetype"), url(omnesatt/omnesatt-light-webfont.svg#omnes_attlight) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: omnes_attlight_italic;
- src: url(./webfonts/omnesatt-lightitalic-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-lightitalic-webfont.woff) format("woff"), url(./webfonts/omnesatt-lightitalic-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-lightitalic-webfont.svg#omnes_attlight_italic) format("svg");
- font-weight: normal;
- font-style: italic;
-}
-@font-face {
- font-family: omnes_attmedium;
- src: url(./webfonts/omnesatt-medium-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-medium-webfont.woff) format("woff"), url(./webfonts/omnesatt-medium-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-medium-webfont.svg#omnes_attmedium) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: omnes_attmedium_italic;
- src: url(./webfonts/omnesatt-mediumitalic-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-mediumitalic-webfont.woff) format("woff"), url(./webfonts/omnesatt-mediumitalic-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-mediumitalic-webfont.svg#omnes_attmedium_italic) format("svg");
- font-weight: normal;
- font-style: italic;
-}
-@font-face {
- font-family: omnes_attregular;
- src: url(./webfonts/omnesatt-regular-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-regular-webfont.woff) format("woff"), url(./webfonts/omnesatt-regular-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-regular-webfont.svg#omnes_att_regularregular) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: omnes_attregular_italic;
- src: url(./webfonts/omnesatt-regularitalic-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/omnesatt-regularitalic-webfont.woff) format("woff"), url(./webfonts/omnesatt-regularitalic-webfont.ttf) format("truetype"), url(./webfonts/omnesatt-regularitalic-webfont.svg#omnes_attregular_italic) format("svg");
- font-weight: normal;
- font-style: italic;
-}
-@font-face {
- font-family: radio_attregular;
- src: url(./webfonts/radioatt-regular-webfont.eot?#iefix) format("embedded-opentype"), url(./webfonts/radioatt-regular-webfont.woff) format("woff"), url(./webfonts/radioatt-regular-webfont.ttf) format("truetype"), url(./webfonts/radioatt-regular-webfont.svg#radio_attregular) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: atticons;
- src: url(icons/fonts/atticons.eot?#iefix) format("embedded-opentype"), url(icons/fonts/atticons.woff) format("woff"), url(icons/fonts/atticons.ttf) format("truetype"), url(icons/fonts/atticons.svg#atticons) format("svg");
- font-weight: normal;
- font-style: normal;
-}
-.bui-global-btn {
- padding: 8px 20px; border-radius: 6px; border: 0px currentColor; transition:background-color 0.3s ease-out; height: auto; text-align: center; color: rgb(255, 255, 255) !important; line-height: 1; font-size: 14px; text-decoration: none !important; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; box-sizing: border-box; background-color:;
-}
-.bui-global-btn-small {
- height: 30px !important; min-width: 60px;
-}
-.bui-global-btn-primary {
- border-color: rgb(53, 128, 189); color: rgb(255, 255, 255) !important; background-color: rgb(6, 122, 180);
-}
-.bui-global-btn-primary:hover {
- background-color: rgb(25, 157, 223);
-}
-.bui-global-btn-primary:active {
- border-color: rgb(40, 97, 141); background-color: rgb(50, 120, 177);
-}
-.bui-global-btn-hero {
- color: rgb(255, 255, 255); background-color: rgb(239, 111, 0);
-}
-.bui-global-btn-hero:hover {
- background-color: rgb(252, 179, 20);
-}
-.bui-global-btn-hero:active {
- background-color: rgb(255, 114, 0);
-}
-.bui-global-btn-secondary {
- color: rgb(255, 255, 255); background-color: rgb(102, 102, 102);
-}
-.bui-global-btn-secondary:hover {
- background-color: rgb(187, 187, 187);
-}
-.bui-global-btn-secondary:active {
- background-color: rgb(102, 102, 102);
-}
-.bui-global-btn-disabled {
- color: rgb(153, 153, 153) !important; cursor: pointer; background-color: rgb(221, 221, 221);
-}
-.bui-global-btn-disabled:hover {
- background-color: rgb(221, 221, 221);
-}
-.bui-global-btn-disabled:active {
- background-color: rgb(221, 221, 221);
-}
-.bui-global-links {
- transition:0.3s ease-in-out; color: rgb(6, 122, 180); text-decoration: none;
-}
-.bui-global-links:hover {
- color: rgb(25, 157, 223); text-decoration: underline;
-}
-.bui-global-links:active {
- text-decoration: none; coloe: #199ddf;
-}
-.att-global-fonts-common {
- margin: 0px; text-transform: none;
-}
-.att-global-fonts-popup-header {
- margin: 0px; text-transform: none; line-height: 10px; font-family: clearviewatt_ltbold; font-size: 11px; font-weight: 100;
-}
-.att-global-fonts-popup-content {
- margin: 0px; text-transform: none; line-height: 15px; font-family: clearviewattregular; font-size: 14px;
-}
-a.reg-logout-btn {
- padding: 8px 20px; border-radius: 6px; border: currentColor !important; transition:background-color 0.3s ease-out; width: 94px !important; height: auto; text-align: center; color: rgb(255, 255, 255) !important; line-height: 1; font-family: clearviewattregular; font-size: 14px; text-decoration: none !important; vertical-align: middle; display: inline-block; position: relative; cursor: pointer; box-sizing: border-box; background-color: rgb(102, 102, 102); -moz-box-sizing: border-box; valign: middle;
-}
-a.reg-logout-btn:hover {
- background-color: rgb(187, 187, 187);
-}
-a.reg-logout-btn:active {
- background-color: rgb(102, 102, 102);
-}
-ul.reg-Details-table > li {
- line-height: 0px !important;
-}
-ul.reg-Details-table {
- margin: 0px; padding: 0px;
-}
-#reg-header-snippet {
- width: inherit; height: auto; overflow: hidden; clear: both; background-color: rgb(250, 250, 250);
-}
-#reg-header-snippet .reg-profilePicture {
- padding: 20px 20px 17px; width: 109px; margin-bottom: 0px; border-right-color: rgb(211, 211, 211); border-right-width: 1px; border-right-style: solid; float: left; background-color: rgb(250, 250, 250);
-}
-#reg-header-snippet .reg-profilePicture #reg-profileImage {
- width: 100%; clear: both; margin-left: 15px;
-}
-#reg-header-snippet .reg-profilePicture #reg-myprofile-link {
- text-align: left; margin-top: 18px;
-}
-#reg-header-snippet .reg-profilePicture #reg-myprofile-link a {
- transition:0.3s ease-in-out; color: rgb(6, 122, 180); line-height: 15px; padding-left: 21px; font-size: 14px; text-decoration: none;
-}
-#reg-header-snippet .reg-profilePicture #reg-myprofile-link a:hover {
- color: rgb(25, 157, 223); text-decoration: underline;
-}
-#reg-header-snippet .reg-profilePicture #reg-myprofile-link a:active {
- text-decoration: none; coloe: #199ddf;
-}
-#reg-header-snippet .reg-profilePicture #reg-companyProfile-link {
- margin-top: 14px;
-}
-#reg-header-snippet .reg-profilePicture #reg-companyProfile-link a {
- transition:0.3s ease-in-out; color: rgb(6, 122, 180); line-height: 15px; font-size: 14px; text-decoration: none;
-}
-#reg-header-snippet .reg-profilePicture #reg-companyProfile-link a:hover {
- color: rgb(25, 157, 223); text-decoration: underline;
-}
-#reg-header-snippet .reg-profilePicture #reg-companyProfile-link a:active {
- text-decoration: none; coloe: #199ddf;
-}
-#reg-header-snippet .reg-profilePicture #reg-logout-div {
- margin-top: 38px;
-}
-#reg-header-snippet .reg-profilePicture #reg-logout-div form.reg-logoutForm {
- margin: 0px;
-}
-#reg-header-snippet .reg-profileDetails {
- padding: 11px 20px 20px; width: 199px; margin-bottom: 0px; border-bottom-width: 0px; float: left; min-height: 220px; background-color: rgb(255, 255, 255);
-}
-#reg-header-snippet .reg-profileDetails .reg-userName-table {
- height: 70px; display: table; min-height: 70px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userName-table #reg-userName-table-row {
- text-align: left; clear: both; display: table-row; min-height: inherit;
-}
-#reg-header-snippet .reg-profileDetails .reg-userName-table #reg-userName-table-row #reg-userName-table-cell {
- height: inherit; vertical-align: middle; display: table-cell; -ms-word-wrap: break-word; min-height: inherit;
-}
-#reg-header-snippet .reg-profileDetails .reg-userName-table #reg-userName-table-row #reg-userName-table-cell #reg-userName {
- width: 8em; color: rgb(68, 68, 68); overflow: hidden; font-weight: normal; float: left; white-space: normal;
-}
-#reg-header-snippet .reg-profileDetails .reg-userEmail-label {
- text-align: left; clear: both; margin-top: 21px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userEmail-label .reg-userEmail-label-spn {
- margin: 0px; color: rgb(68, 68, 68); text-transform: none; line-height: 10px; font-family: clearviewatt_ltbold; font-size: 11px; font-weight: 100;
-}
-#reg-header-snippet .reg-profileDetails .reg-userEmail-value {
- text-align: left; clear: both; margin-top: 5px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userEmail-value .reg-userEmail-value-spn {
- margin: 0px; color: rgb(102, 102, 102); text-transform: none; line-height: 15px; font-family: clearviewattregular; font-size: 14px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userRole-label {
- text-align: left; clear: both; margin-top: 20px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userRole-label .reg-userRole-label-spn {
- margin: 0px; color: rgb(68, 68, 68); text-transform: none; line-height: 10px; font-family: clearviewatt_ltbold; font-size: 11px; font-weight: 100;
-}
-#reg-header-snippet .reg-profileDetails .reg-userRole-value {
- text-align: left; clear: both; margin-top: 6px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userRole-value .reg-userRole-value-spn {
- margin: 0px; color: rgb(102, 102, 102); text-transform: none; line-height: 15px; font-family: clearviewattregular; font-size: 14px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userCompany-label {
- text-align: left; clear: both; margin-top: 19px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userCompany-label .reg-userCompany-spn {
- margin: 0px; color: rgb(68, 68, 68); text-transform: none; line-height: 10px; font-family: clearviewatt_ltbold; font-size: 11px; font-weight: 100;
-}
-#reg-header-snippet .reg-profileDetails .reg-userCompany-value {
- text-align: left; clear: both; margin-top: 5px;
-}
-#reg-header-snippet .reg-profileDetails .reg-userCompany-value .reg-userCompany-spn {
- margin: 0px; color: rgb(102, 102, 102); text-transform: none; line-height: 15px; font-family: clearviewattregular; font-size: 14px; -ms-word-wrap: break-word;
-}
-.bui-global-transitions-hover {
- border: 1px solid rgb(187, 187, 187); z-index: 90;
-}
-.bui-global-transitions-focus {
- outline: 0px; border: 1px solid rgb(25, 157, 223) !important; z-index: 100; box-shadow: none; -webkit-box-shadow: none;
-}
-.bui-global-transitions-login-page {
- background: 0px 0px rgb(250, 250, 250); border-radius: 3px; border: 1px solid rgb(211, 211, 211); transition:border 0.3s ease-in-out; color: rgb(68, 68, 68); font-family: clearviewattregular; box-shadow: none !important;
-}
-.bui-global-transitions-login-page:hover {
- border: 1px solid rgb(187, 187, 187); z-index: 90;
-}
-.bui-global-transitions-login-page:focus {
- outline: 0px; border: 1px solid rgb(25, 157, 223) !important; z-index: 100; box-shadow: none; -webkit-box-shadow: none;
-}
-li#anchor ul.column {
- display: none;
-}
-li#anchor:hover ul.column {
- display: block;
-}
-.login-icon {
- width: 27px; height: 27px; vertical-align: middle; display: inline-block; background-image: url("../images/common/header/login-icon.png"); background-repeat: no-repeat;
-}
-.bui-reg-one-line-layout * {
- display: inline-block;
-}
-.popbox {
- margin: 0px auto; text-align: center; position: relative;
-}
-.collapse {
- position: relative;
-}
-.box {
- background: rgb(255, 255, 255); border: 1px solid rgb(187, 187, 187); width: auto; height: auto; display: none; position: relative; z-index: 0; min-width: 260px;
-}
-.box * {
- box-sizing: content-box; -webkit-box-sizing: content-box; -moz-box-sizing: content-box;
-}
-.box ::after {
- box-sizing: content-box; -webkit-box-sizing: content-box; -moz-box-sizing: content-box;
-}
-.box ::before {
- box-sizing: content-box; -webkit-box-sizing: content-box; -moz-box-sizing: content-box;
-}
-.box a.close {
- color: red; font-family: arial; font-size: 12px; text-decoration: underline;
-}
-.box .arrow {
- left: 1px; top: -8px; width: 0px; height: 0px; border-right-color: transparent; border-bottom-color: rgb(255, 255, 255); border-left-color: transparent; border-right-width: 8px; border-bottom-width: 8px; border-left-width: 8px; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; position: absolute; z-index: 1001;
-}
-.standard-input-error-msg-class {
- background: url("../images/common/header/exclamation-error.png") no-repeat 337px rgb(231, 229, 230) !important;
-}
-.box-form {
- padding-top: 10px; padding-bottom: 0px; padding-left: 16px;
-}
-.control-text-popup {
- border-radius: 3px 3px 0px 0px !important; width: 200px !important;
-}
-.control-label-password {
- line-height: 10px !important; padding-top: 3px !important;
-}
-.control-label-checkbox {
- line-height: 15px; padding-top: 5px;
-}
-.placeholder-class {
- color: rgb(139, 139, 139) !important;
-}
-.forgot-userid-password {
- font-size: 10px !important; font-weight: normal !important;
-}
-.header-login-label {
- color: rgb(255, 255, 255); font-size: 13px; maxlength: 10;
-}
-.ellipsis-header-name {
- overflow: hidden; padding-top: 0px; margin-top: 0px; white-space: nowrap; -ms-text-overflow: ellipsis; max-width: 100px; ms-text-overflow: ellipsis;
-}
-#generic-image {
- padding: 100px; background-image: url("../images/common/header/placerimage.jpg"); background-repeat: no-repeat;
-}
-.bui-reg-horizontal-rule {
- width: 100%; height: 1.25px; clear: both; background-color: rgb(231, 230, 230);
-}
-.bui-reg-horizontal-rule-margin {
- margin-top: 20px; margin-bottom: 20px;
-}
-.password-horizontal-rule-margin {
- margin-top: 5px; margin-bottom: 5px;
-}
-.requiredInformation {
- font-size: 11px;
-}
-.header-login-window {
- height: 100px;
-}
-.header-login-window-image {
- padding: 18px;
-}
-.header-login-window-name {
- line-height: 1.5em; overflow: hidden; padding-top: 18px; padding-right: 18px; font-family: clearviewatt_ltbold; font-size: 16px;
-}
-.header-login-window-role {
- font-family: clearviewattregular; font-size: 12px;
-}
-.header-login-window-logout {
- background: rgb(231, 229, 230); height: 27px; line-height: 27px; font-family: clearviewatt_ltbold; font-size: 11px; z-index: 10001;
-}
-.header-login-window-logout a {
- color: rgb(103, 103, 103);
-}
-.header-login-name {
- width: auto; line-height: 50px; padding-right: 23px; padding-left: 3px; float: left; cursor: pointer;
-}
-.error-msg-box {
- border-radius: 3px; width: 200px; height: 35px; color: rgb(255, 255, 255); line-height: 35px; font-size: 12px; margin-top: 15px; margin-left: 30px; background-color: rgb(255, 69, 57);
-}
-.header_login_field_border_error {
- background: url("../images/common/header/icon-error.png") no-repeat 118px rgb(255, 255, 255) !important; border: 1px solid rgb(255, 69, 57) !important; z-index: 100;
-}
-.header_login_field_border_error:hover {
- border: 1px solid rgb(255, 69, 57) !important;
-}
-.header_login_field_3sides_error {
- background: url("../images/common/header/icon-error.png") no-repeat 118px rgb(255, 255, 255) !important; border-right-color: rgb(255, 69, 57) !important; border-bottom-color: rgb(255, 69, 57) !important; border-left-color: rgb(255, 69, 57) !important; border-right-width: 1px !important; border-bottom-width: 1px !important; border-left-width: 1px !important; border-right-style: solid !important; border-bottom-style: solid !important; border-left-style: solid !important;
-}
-.header_login_field_3sides_error:hover {
- border: 1px solid rgb(255, 69, 57) !important;
-}
-.header_login_field_wrapper_border_error {
- background: url("../images/common/header/icon-error.png") no-repeat 118px rgb(255, 255, 255) !important;
-}
-.error-msg-class {
- background: url("../images/common/header/exclamation-error.png") no-repeat 178px rgb(255, 255, 255) !important; border-color: rgb(177, 11, 59) !important; color: rgb(179, 10, 60) !important; font-size: 10px; box-shadow: inset 0px 0px 3px #b10b3b, 0px 0px 3px #b10b3b !important;
-}
-.regFormInputLoginText {
- background: no-repeat 100% -22px rgb(250, 250, 250); padding: 10px; width: 200px; height: 20px; color: rgb(68, 68, 68); font-size: 12px; display: block;
-}
-.regFormInputLoginPassword {
- background: no-repeat 100% -22px rgb(250, 250, 250); padding: 10px; width: 200px; height: 20px; color: rgb(68, 68, 68); font-size: 12px; display: block;
-}
-.header-login-button {
- height: 20px; min-width: 10px !important; box-shadow: none;
-}
-#headerLoginFormID #header_login_title {
- color: rgb(68, 68, 68); font-family: clearviewattregular; font-size: 14px; margin-top: 25px;
-}
-#headerLoginFormID #header_login_id {
- background: url("../images/common/header/icon-username.png") no-repeat 10px rgb(250, 250, 250) !important; padding: 10px 10px 10px 36px; border-radius: 3px 3px 0px 0px !important; border: 1px solid rgb(211, 211, 211); transition:border 0.3s ease-in-out; width: 200px; height: 32px; color: rgb(68, 68, 68); font-family: clearviewattregular; font-size: 12px; margin-top: 15px; margin-bottom: 10px !important; margin-left: 30px; display: block; box-shadow: none !important;
-}
-#headerLoginFormID #header_login_id:hover {
- border: 1px solid rgb(187, 187, 187); z-index: 90;
-}
-#headerLoginFormID #header_login_id:focus {
- outline: 0px; border: 1px solid rgb(25, 157, 223) !important; z-index: 100; box-shadow: none; -webkit-box-shadow: none;
-}
-#headerLoginFormID #header_password {
- background: url("../images/common/header/icon-password.png") no-repeat 10px rgb(250, 250, 250) !important; padding: 10px 10px 10px 36px; border-radius: 0px 0px 3px 3px !important; border: 1px solid rgb(211, 211, 211); transition:border 0.3s ease-in-out; width: 200px; height: 32px; color: rgb(68, 68, 68); font-family: clearviewattregular; font-size: 12px; margin-top: -11px; margin-bottom: 0px; margin-left: 30px; display: block; box-shadow: none !important;
-}
-#headerLoginFormID #header_password:hover {
- border: 1px solid rgb(187, 187, 187); z-index: 90;
-}
-#headerLoginFormID #header_password:focus {
- outline: 0px; border: 1px solid rgb(25, 157, 223) !important; z-index: 100; box-shadow: none; -webkit-box-shadow: none;
-}
-#headerLoginFormID #header_login_block {
- height: 30px; margin-top: 15px;
-}
-#headerLoginFormID #header_login_block #header_login_button {
- padding: 8px 20px; border-radius: 6px; border: 0px rgb(53, 128, 189); transition:background-color 0.3s ease-out; width: 80px; height: 30px !important; text-align: center; color: rgb(255, 255, 255) !important; line-height: 1; font-size: 14px; text-decoration: none !important; margin-left: 25px; vertical-align: middle; float: left; display: inline-block; position: relative; cursor: pointer; min-width: 60px; box-sizing: border-box; background-color: rgb(6, 122, 180); -moz-box-sizing: border-box; valign: middle;
-}
-#headerLoginFormID #header_login_block #header_login_button:hover {
- background-color: rgb(25, 157, 223);
-}
-#headerLoginFormID #header_login_block #header_login_button:active {
- border-color: rgb(40, 97, 141); background-color: rgb(50, 120, 177);
-}
-#headerLoginFormID #remember_me_component {
- padding-left: 30px; margin-top: 11px;
-}
-#headerLoginFormID #remember_me_component #rememberme_header_label {
- margin-top: 4px;
-}
-#headerLoginFormID #remember_me_component #remember-me {
- color: rgb(102, 102, 102); font-family: clearviewattregular; font-size: 12px; font-weight: normal;
-}
-#headerLoginFormID #forgot_username_component {
- text-align: left; padding-top: 30px; padding-bottom: 30px; padding-left: 30px; clear: both;
-}
-#headerLoginFormID #forgot_username_component .regular {
- color: rgb(68, 68, 68); font-family: clearviewattregular; font-size: 12px;
-}
-#headerLoginFormID #forgot_username_component .link {
- color: rgb(6, 122, 180); font-family: clearviewattregular; font-size: 12px;
-}
-.footerContainer {
- background: 0px 0px rgb(6, 122, 180); margin: 0px auto; width: 100%;
-}
-.footerContainer .footerWrapper {
- margin: 0px auto; width: 100%; padding-bottom: 25px; background-color: rgb(6, 122, 180);
-}
-.footerContainer .footerWrapper .footerItem {
- margin: auto; width: 100%; height: 60px; color: rgb(255, 255, 255); line-height: 1; overflow: hidden; font-family: arial; font-size: 12px;
-}
-.footerContainer .footerWrapper .footerItem .divider {
- width: 100px; margin-top: 10px; margin-bottom: 10px; border-bottom-color: rgb(255, 255, 255); border-bottom-width: 1px; border-bottom-style: solid;
-}
-.footerContainer .footerWrapper .footerItem .customerSupport {
- width: 160px; margin-left: 30px; float: left;
-}
-.footerContainer .footerWrapper .footerItem .customerSupport .customerHelp {
- font-size: 14px; margin-top: 45px; margin-bottom: 20px;
-}
-.footerContainer .footerWrapper .footerItem .customerSupport a {
- color: rgb(255, 255, 255) !important;
-}
-.footerContainer .footerWrapper .footerItem .customerSupport a:hover {
- text-decoration: none;
-}
-.footerContainer .footerWrapper .footerItem .legalInfo {
- width: 160px; float: left;
-}
-.footerContainer .footerWrapper .footerItem .legalInfo .legal {
- font-size: 14px; margin-top: 45px; margin-bottom: 20px;
-}
-.footerContainer .footerWrapper .footerItem .legalInfo a {
- color: rgb(255, 255, 255) !important;
-}
-.footerContainer .footerWrapper .footerItem .legalInfo a:hover {
- text-decoration: none;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection {
- width: 295px; float: left;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeSave {
- font-size: 14px; margin-top: 45px; margin-bottom: 20px;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeToSection {
- overflow: hidden; margin-top: 15px;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeToSection .emailAddress {
- width: 170px; float: left;
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeToSection .emailAddress input {
- padding: 5px 10px 5px 5px; width: 152px; color: rgb(255, 255, 255) !important; background-color: rgb(6, 122, 180);
-}
-.footerContainer .footerWrapper .footerItem .subscribeSection .subscribeToSection .subscribeBtn {
- border-radius: 1px 5px 5px 1px; top: 1px; width: 95px; height: 30px; text-align: center; right: 7px; color: rgb(6, 122, 180); font-size: 14px; vertical-align: middle; float: left; position: relative; cursor: pointer; background-color: rgb(255, 255, 255);
-}
-.footerContainer .footerWrapper .footerItem .socialMedia {
- margin-left: 0px; float: left;
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .followAtt {
- font-size: 14px; margin-top: 45px; margin-bottom: 20px;
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .socialFeeds {
- margin-top: 20px; margin-left: -8px;
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .socialFeeds span {
- margin: 0px; padding: 5px; font-size: 30px;
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .socialFeeds span a {
- margin: 0px; padding: 0px; color: rgb(255, 255, 255);
-}
-.footerContainer .footerWrapper .footerItem .socialMedia .socialFeeds span a:hover {
- text-decoration: none;
-}
-.footerContainer .footerWrapper .dividerBottom {
- margin: auto; width: 920px; border-bottom-color: rgb(255, 255, 255); border-bottom-width: 1px; border-bottom-style: solid;
-}
-.footerContainer .footerWrapper .feedbackSection {
- margin: auto; width: 920px; display: none;
-}
-.footerContainer .footerWrapper .feedbackSection .dividerTop {
- margin: auto; width: 920px; border-bottom-color: rgb(255, 255, 255); border-bottom-width: 1px; border-bottom-style: solid;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent {
- margin: 30px auto;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent #feedbackForm {
- height: 120px;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent .feedbackInfo {
- width: 270px; color: rgb(255, 255, 255); font-family: arial; font-size: 12px; margin-top: -5px; margin-right: 30px; float: left;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent .feedbackTextSection .feedbackText {
- padding: 10px; border-radius: 5px; border: 1px solid rgb(255, 255, 255); width: 500px; height: 100px; color: rgb(255, 255, 255); font-family: arial; font-size: 14px; float: left; cursor: text; background-color: rgb(6, 122, 180); resize: none;
-}
-.footerContainer .footerWrapper .feedbackSection .feedbackContent .feedbackTextSection .feedbackSubmitButton {
- padding: 5px; border-radius: 5px; border: currentColor; width: 82px; color: rgb(6, 122, 180); font-family: arial; font-size: 14px; margin-top: 92px; margin-left: 16px; cursor: pointer; background-color: rgb(255, 255, 255);
-}
-.footerContainer .footerWrapper .feedbackResultMsg {
- margin: 0px auto; width: 100%; text-align: center; color: rgb(255, 255, 255); line-height: 70px; font-family: arial; font-size: 18px; display: none;
-}
-.footerContainer .footerWrapper .feedbackResultMsg #feedbackMsgCheck {
- font-size: 20px; margin-right: 20px;
-}
-.footerContainer .footerWrapper #feedbackResultDivider {
- display: none;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv {
- margin: auto; max-width: 110px;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv .feedbackButton {
- background: rgb(255, 255, 255); margin: -1px auto auto; padding: 5px 10px; border-radius: 0px 0px 5px 5px; border: currentColor; color: rgb(6, 122, 180); font-family: arial; font-size: 14px; cursor: pointer;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv .closeFeedbackButton {
- background: rgb(255, 255, 255); margin: -1px auto auto; padding: 5px 10px; border-radius: 0px 0px 5px 5px; border: currentColor; color: rgb(6, 122, 180); font-family: arial; font-size: 14px; cursor: pointer;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv .feedbackButton span {
- padding-left: 10px; background-image: none;
-}
-.footerContainer .footerWrapper .feedbackButtonDiv .closeFeedbackButton span {
- padding-left: 10px; background-image: none;
-}
-.footerContainer .footerWrapper .attFooterInfo {
- margin: auto; width: 100%; color: rgb(255, 255, 255); overflow: hidden; font-family: arial; font-size: 12px;
-}
-.footerContainer .footerWrapper .attFooterInfo a {
- margin: 0px; padding: 0px; color: rgb(255, 255, 255); text-decoration: underline;
-}
-.footerContainer .footerWrapper .attFooterInfo .footerLastSection {
- overflow: hidden; margin-top: 40px;
-}
-.footerContainer .footerWrapper .attFooterInfo span {
- padding-right: 5px; padding-left: 3px; border-right-color: rgb(255, 255, 255); border-right-width: 1px; border-right-style: solid;
-}
-.footerContainer .footerWrapper .attFooterInfo span:last-child {
- border: currentColor;
-}
-.footerContainer .footerWrapper .attFooterInfo .attLogo {
- background: url("images/footer-attolympiclogo.png") repeat-x 0px 0px; width: 150px; height: 77px; margin-right: 0px; margin-left: 17px; float: left;
-}
-.footerContainer .footerWrapper .attFooterInfo .attQuality {
- background: url("../images/common/footer/footer-consumerinfo.png") repeat-x 0px 0px; top: -5px; width: 79px; height: 82px; margin-right: 103px; float: left; position: relative;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise {
- width: 64%; float: right;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise .privacyPolicy {
- margin-top: 17px;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise .privacyPolicy a {
- text-decoration: underline;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise .privacyPolicy a span {
- padding: 0px;
-}
-.footerContainer .footerWrapper .attFooterInfo .attAdvertise .privacyPolicy a:hover {
- text-decoration: underline;
-}
-[data-icon]::before {
- text-transform: none; line-height: 1; font-family: "atticons"; font-variant: normal; font-weight: normal; content: attr(data-icon); speak: none; -webkit-font-smoothing: antialiased;
-}
-[class^='icon-'] {
- text-transform: none; line-height: 1; font-family: "atticons"; font-style: normal; font-variant: normal; font-weight: normal; speak: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
-}
-[class*=' icon-'] {
- text-transform: none; line-height: 1; font-family: "atticons"; font-style: normal; font-variant: normal; font-weight: normal; speak: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
-}
-.icon-wireless-outline::before {
- content: "\e600";
-}
-.icon-wireless-dashboard::before {
- content: "\e601";
-}
-.icon-website-hosting-outline::before {
- content: "\e602";
-}
-.icon-volume-up::before {
- content: "\e603";
-}
-.icon-volume-mute::before {
- content: "\e604";
-}
-.icon-volume-down::before {
- content: "\e605";
-}
-.icon-video::before {
- content: "\e606";
-}
-.icon-video-tutorials::before {
- content: "\e607";
-}
-.icon-video-tutorials-outline::before {
- content: "\e608";
-}
-.icon-video-outline::before {
- content: "\e609";
-}
-.icon-user::before {
- content: "\e60a";
-}
-.icon-user-small::before {
- content: "\e60b";
-}
-.icon-user-outline::before {
- content: "\e60c";
-}
-.icon-user-large-outline::before {
- content: "\e60d";
-}
-.icon-upgrades::before {
- content: "\e60e";
-}
-.icon-upgrades-outline::before {
- content: "\e60f";
-}
-.icon-unlimited-nights-weekends-outline::before {
- content: "\e610";
-}
-.icon-unlimited-minutes-outline::before {
- content: "\e611";
-}
-.icon-unlimited-messaging-outline::before {
- content: "\e612";
-}
-.icon-unlimited-m2m-outline::before {
- content: "\e613";
-}
-.icon-unlimited-calling::before {
- content: "\e614";
-}
-.icon-tv-packages-outline::before {
- content: "\e615";
-}
-.icon-travel-minutes-outline::before {
- content: "\e616";
-}
-.icon-trash::before {
- content: "\e617";
-}
-.icon-tollfree-outline::before {
- content: "\e618";
-}
-.icon-tiles::before {
- content: "\e619";
-}
-.icon-tiles-small::before {
- content: "\e61a";
-}
-.icon-tickets::before {
- content: "\e61b";
-}
-.icon-tickets-returned::before {
- content: "\e61c";
-}
-.icon-tickets-referred::before {
- content: "\e61d";
-}
-.icon-tickets-outline::before {
- content: "\e61e";
-}
-.icon-tickets-open::before {
- content: "\e61f";
-}
-.icon-tickets-escalate::before {
- content: "\e620";
-}
-.icon-tickets-contested::before {
- content: "\e621";
-}
-.icon-tickets-closed::before {
- content: "\e622";
-}
-.icon-tickets-cleared::before {
- content: "\e623";
-}
-.icon-tickets-arquived::before {
- content: "\e624";
-}
-.icon-tickets-active::before {
- content: "\e625";
-}
-.icon-technical-specifications::before {
- content: "\e626";
-}
-.icon-tech-support::before {
- content: "\e627";
-}
-.icon-tech-support-outline::before {
- content: "\e628";
-}
-.icon-tablet::before {
- content: "\e629";
-}
-.icon-tablet-outline::before {
- content: "\e62a";
-}
-.icon-support::before {
- content: "\e62b";
-}
-.icon-support-outline::before {
- content: "\e62c";
-}
-.icon-star::before {
- content: "\e62d";
-}
-.icon-sort::before {
- content: "\e62e";
-}
-.icon-social-outline::before {
- content: "\e62f";
-}
-.icon-smartphone::before {
- content: "\e630";
-}
-.icon-smartphone-outline::before {
- content: "\e631";
-}
-.icon-signout-outline::before {
- content: "\e632";
-}
-.icon-sign-out::before {
- content: "\e633";
-}
-.icon-shop::before {
- content: "\e634";
-}
-.icon-shop-outline::before {
- content: "\e635";
-}
-.icon-shared-outline::before {
- content: "\e636";
-}
-.icon-shared-minutes-outline::before {
- content: "\e637";
-}
-.icon-share::before {
- content: "\e638";
-}
-.icon-settings::before {
- content: "\e639";
-}
-.icon-send-invoice-outline::before {
- content: "\e63a";
-}
-.icon-see-more::before {
- content: "\e63b";
-}
-.icon-see-less::before {
- content: "\e63c";
-}
-.icon-search::before {
- content: "\e63d";
-}
-.icon-search-small::before {
- content: "\e63e";
-}
-.icon-screen-calls-outline::before {
- content: "\e63f";
-}
-.icon-save-time-outline::before {
- content: "\e640";
-}
-.icon-saas-enablement-outline::before {
- content: "\e641";
-}
-.icon-s-beam::before {
- content: "\e642";
-}
-.icon-s-beam-outline::before {
- content: "\e643";
-}
-.icon-rollover-outline::before {
- content: "\e644";
-}
-.icon-rollover-minutes::before {
- content: "\e645";
-}
-.icon-reviews-outline::before {
- content: "\e646";
-}
-.icon-reports::before {
- content: "\e647";
-}
-.icon-reports-outline::before {
- content: "\e648";
-}
-.icon-recommendation-tool::before {
- content: "\e649";
-}
-.icon-receivers-outline::before {
- content: "\e64a";
-}
-.icon-productivity-outline::before {
- content: "\e64b";
-}
-.icon-print::before {
- content: "\e64c";
-}
-.icon-plus::before {
- content: "\e64d";
-}
-.icon-plus-outline::before {
- content: "\e64e";
-}
-.icon-play::before {
- content: "\e64f";
-}
-.icon-platform-as-service-outline::before {
- content: "\e650";
-}
-.icon-plans::before {
- content: "\e651";
-}
-.icon-plans-outline::before {
- content: "\e652";
-}
-.icon-pie-chart::before {
- content: "\e653";
-}
-.icon-photos::before {
- content: "\e654";
-}
-.icon-photos-outline::before {
- content: "\e655";
-}
-.icon-phone-data-outline::before {
- content: "\e656";
-}
-.icon-payments::before {
- content: "\e657";
-}
-.icon-payments-outline::before {
- content: "\e658";
-}
-.icon-pause::before {
- content: "\e659";
-}
-.icon-password::before {
- content: "\e65a";
-}
-.icon-password-outline::before {
- content: "\e65b";
-}
-.icon-overview::before {
- content: "\e65c";
-}
-.icon-overview-small::before {
- content: "\e65d";
-}
-.icon-overages::before {
- content: "\e65e";
-}
-.icon-overages-outline::before {
- content: "\e65f";
-}
-.icon-outage-outline::before {
- content: "\e660";
-}
-.icon-orders::before {
- content: "\e661";
-}
-.icon-orders-outline::before {
- content: "\e662";
-}
-.icon-optional-applications-outline::before {
- content: "\e663";
-}
-.icon-office-at-hand-outline::before {
- content: "\e664";
-}
-.icon-offers::before {
- content: "\e665";
-}
-.icon-offers-outline::before {
- content: "\e666";
-}
-.icon-notifications::before {
- content: "\e667";
-}
-.icon-notifications-outline::before {
- content: "\e668";
-}
-.icon-normal-screen::before {
- content: "\e669";
-}
-.icon-nights-weekends-outline::before {
- content: "\e66a";
-}
-.icon-new-requests-outline::before {
- content: "\e66b";
-}
-.icon-network::before {
- content: "\e66c";
-}
-.icon-network-dashboard::before {
- content: "\e66d";
-}
-.icon-netbook::before {
- content: "\e66e";
-}
-.icon-netbook-outline::before {
- content: "\e66f";
-}
-.icon-music::before {
- content: "\e670";
-}
-.icon-music-video::before {
- content: "\e671";
-}
-.icon-music-video-outline::before {
- content: "\e672";
-}
-.icon-music-outline::before {
- content: "\e673";
-}
-.icon-modem::before {
- content: "\e674";
-}
-.icon-modem-outline::before {
- content: "\e675";
-}
-.icon-mobile-insurance::before {
- content: "\e676";
-}
-.icon-mobile-insurance-outline::before {
- content: "\e677";
-}
-.icon-mobile-2-mobile-outline::before {
- content: "\e678";
-}
-.icon-missed-calls-outline::before {
- content: "\e679";
-}
-.icon-minutes::before {
- content: "\e67a";
-}
-.icon-minutes-outline::before {
- content: "\e67b";
-}
-.icon-messaging::before {
- content: "\e67c";
-}
-.icon-messaging-toolkit-outline::before {
- content: "\e67d";
-}
-.icon-messaging-outline::before {
- content: "\e67e";
-}
-.icon-messaging-email::before {
- content: "\e67f";
-}
-.icon-messaging-email-outline::before {
- content: "\e680";
-}
-.icon-message-small::before {
- content: "\e681";
-}
-.icon-maintenance::before {
- content: "\e682";
-}
-.icon-location-pin::before {
- content: "\e683";
-}
-.icon-location-pin-small::before {
- content: "\e684";
-}
-.icon-local-search::before {
- content: "\e685";
-}
-.icon-local-long-distance-outline::before {
- content: "\e686";
-}
-.icon-list::before {
- content: "\e687";
-}
-.icon-learn::before {
- content: "\e688";
-}
-.icon-learn-outline::before {
- content: "\e689";
-}
-.icon-laptop::before {
- content: "\e68a";
-}
-.icon-landline::before {
- content: "\e68b";
-}
-.icon-landline-outline::before {
- content: "\e68c";
-}
-.icon-invoices::before {
- content: "\e68d";
-}
-.icon-invoices-outline::before {
- content: "\e68e";
-}
-.icon-inventory::before {
- content: "\e68f";
-}
-.icon-intranet-outline::before {
- content: "\e690";
-}
-.icon-interpreter::before {
- content: "\e691";
-}
-.icon-interpreter-outline::before {
- content: "\e692";
-}
-.icon-internet::before {
- content: "\e693";
-}
-.icon-internet-outline::before {
- content: "\e694";
-}
-.icon-internet-24-outline::before {
- content: "\e695";
-}
-.icon-internet-18-outline::before {
- content: "\e696";
-}
-.icon-international-outline::before {
- content: "\e697";
-}
-.icon-international-long-distance-outline::before {
- content: "\e698";
-}
-.icon-international-data-outline::before {
- content: "\e699";
-}
-.icon-installation-outline::before {
- content: "\e69a";
-}
-.icon-information::before {
- content: "\e69b";
-}
-.icon-info-success::before {
- content: "\e69c";
-}
-.icon-info-alert::before {
- content: "\e69d";
-}
-.icon-info-alert-outline::before {
- content: "\e69e";
-}
-.icon-included-checkmark::before {
- content: "\e69f";
-}
-.icon-included-checkmark-outline::before {
- content: "\e6a0";
-}
-.icon-hotspot::before {
- content: "\e6a1";
-}
-.icon-hotspot-outline::before {
- content: "\e6a2";
-}
-.icon-hotspot-access-outline::before {
- content: "\e6a3";
-}
-.icon-home::before {
- content: "\e6a4";
-}
-.icon-help::before {
- content: "\e6a5";
-}
-.icon-help-outline::before {
- content: "\e6a6";
-}
-.icon-hd::before {
- content: "\e6a7";
-}
-.icon-hd-outline::before {
- content: "\e6a8";
-}
-.icon-hamburger::before {
- content: "\e6a9";
-}
-.icon-group-outline::before {
- content: "\e6aa";
-}
-.icon-gps::before {
- content: "\e6ab";
-}
-.icon-gps-outline::before {
- content: "\e6ac";
-}
-.icon-go-paperless-email-outline::before {
- content: "\e6ad";
-}
-.icon-global-messaging-outline::before {
- content: "\e6ae";
-}
-.icon-gamepad-outline::before {
- content: "\e6af";
-}
-.icon-game-devices::before {
- content: "\e6b0";
-}
-.icon-full-screen::before {
- content: "\e6b1";
-}
-.icon-forward-calls-outline::before {
- content: "\e6b2";
-}
-.icon-forum::before {
- content: "\e6b3";
-}
-.icon-forum-outline::before {
- content: "\e6b4";
-}
-.icon-filter::before {
- content: "\e6b5";
-}
-.icon-extras::before {
- content: "\e6b6";
-}
-.icon-extras-outline::before {
- content: "\e6b7";
-}
-.icon-erase::before {
- content: "\e6b8";
-}
-.icon-envelope::before {
- content: "\e6b9";
-}
-.icon-envelope-outline::before {
- content: "\e6ba";
-}
-.icon-enterprise-messaging-outline::before {
- content: "\e6bb";
-}
-.icon-edit::before {
- content: "\e6bc";
-}
-.icon-duplicate::before {
- content: "\e6bd";
-}
-.icon-dropdown-up::before {
- content: "\e6be";
-}
-.icon-dropdown-down::before {
- content: "\e6bf";
-}
-.icon-download::before {
- content: "\e6c0";
-}
-.icon-download-outline::before {
- content: "\e6c1";
-}
-.icon-disputes::before {
- content: "\e6c2";
-}
-.icon-detailed-billing::before {
- content: "\e6c3";
-}
-.icon-detailed-billing-outline::before {
- content: "\e6c4";
-}
-.icon-desktop-outline::before {
- content: "\e6c5";
-}
-.icon-data::before {
- content: "\e6c6";
-}
-.icon-data-outline::before {
- content: "\e6c7";
-}
-.icon-data-additional-outline::before {
- content: "\e6c8";
-}
-.icon-compare::before {
- content: "\e6c9";
-}
-.icon-cloud-storage-outline::before {
- content: "\e6ca";
-}
-.icon-cloud-outline::before {
- content: "\e6cb";
-}
-.icon-cloud-computing-outline::before {
- content: "\e6cc";
-}
-.icon-cloud-backup::before {
- content: "\e6cd";
-}
-.icon-cloud-backup-outline::before {
- content: "\e6ce";
-}
-.icon-circle-information-outline::before {
- content: "\e6cf";
-}
-.icon-circle-action-plus-outline::before {
- content: "\e6d0";
-}
-.icon-circle-action-minus-outline::before {
- content: "\e6d1";
-}
-.icon-circle-action-empty::before {
- content: "\e6d2";
-}
-.icon-circle-action-delete-outline::before {
- content: "\e6d3";
-}
-.icon-circle-action-close::before {
- content: "\e6d4";
-}
-.icon-circle-action-check-outline::before {
- content: "\e6d5";
-}
-.icon-circle-action-remove::before {
- content: "\e6d6";
-}
-.icon-circle-action-add::before {
- content: "\e6d7";
-}
-.icon-chip-outline::before {
- content: "\e6d8";
-}
-.icon-chevron-up::before {
- content: "\e6d9";
-}
-.icon-chevron-right::before {
- content: "\e6da";
-}
-.icon-chevron-left::before {
- content: "\e6db";
-}
-.icon-chevron-down::before {
- content: "\e6dc";
-}
-.icon-checkbox-checkmark::before {
- content: "\e6dd";
-}
-.icon-chat::before {
- content: "\e6de";
-}
-.icon-chat-small::before {
- content: "\e6df";
-}
-.icon-case-studies::before {
- content: "\e6e0";
-}
-.icon-cart::before {
- content: "\e6e1";
-}
-.icon-cart-small::before {
- content: "\e6e2";
-}
-.icon-camera::before {
- content: "\e6e3";
-}
-.icon-camera-outline::before {
- content: "\e6e4";
-}
-.icon-calendar-outline::before {
- content: "\e6e5";
-}
-.icon-business::before {
- content: "\e6e6";
-}
-.icon-business-tv::before {
- content: "\e6e7";
-}
-.icon-business-tv-outline::before {
- content: "\e6e8";
-}
-.icon-business-tv-additional-packs-outline::before {
- content: "\e6e9";
-}
-.icon-business-outline::before {
- content: "\e6ea";
-}
-.icon-business-center::before {
- content: "\e6eb";
-}
-.icon-business-center-outline::before {
- content: "\e6ec";
-}
-.icon-bundles::before {
- content: "\e6ed";
-}
-.icon-bundles-outline::before {
- content: "\e6ee";
-}
-.icon-billing::before {
- content: "\e6ef";
-}
-.icon-billing-history-outline::before {
- content: "\e6f0";
-}
-.icon-billing-dashboard::before {
- content: "\e6f1";
-}
-.icon-bd-maps::before {
- content: "\e6f2";
-}
-.icon-basicphone::before {
- content: "\e6f3";
-}
-.icon-basicphone-outline::before {
- content: "\e6f4";
-}
-.icon-barcode-outline::before {
- content: "\e6f5";
-}
-.icon-bar-chart-vertical::before {
- content: "\e6f6";
-}
-.icon-bar-chart-horizontal::before {
- content: "\e6f7";
-}
-.icon-arrow-up::before {
- content: "\e6f8";
-}
-.icon-arrow-up-right::before {
- content: "\e6f9";
-}
-.icon-arrow-up-left::before {
- content: "\e6fa";
-}
-.icon-arrow-up-circle::before {
- content: "\e6fb";
-}
-.icon-arrow-right::before {
- content: "\e6fc";
-}
-.icon-arrow-right-circle::before {
- content: "\e6fd";
-}
-.icon-arrow-left::before {
- content: "\e6fe";
-}
-.icon-arrow-left-circle::before {
- content: "\e6ff";
-}
-.icon-arrow-down::before {
- content: "\e700";
-}
-.icon-arrow-down-right::before {
- content: "\e701";
-}
-.icon-arrow-down-left::before {
- content: "\e702";
-}
-.icon-arrow-down-circle::before {
- content: "\e703";
-}
-.icon-arrow-double-right::before {
- content: "\e704";
-}
-.icon-arrow-double-left::before {
- content: "\e705";
-}
-.icon-apps-media::before {
- content: "\e706";
-}
-.icon-apps-media-outline::before {
- content: "\e707";
-}
-.icon-apps-marketplace::before {
- content: "\e708";
-}
-.icon-apps-marketplace-outline::before {
- content: "\e709";
-}
-.icon-analytics::before {
- content: "\e70a";
-}
-.icon-alt-media-subscription-outline::before {
- content: "\e70b";
-}
-.icon-all-locations::before {
- content: "\e70c";
-}
-.icon-all-devices::before {
- content: "\e70d";
-}
-.icon-all-devices-outline::before {
- content: "\e70e";
-}
-.icon-alarms::before {
- content: "\e70f";
-}
-.icon-alarms-outline::before {
- content: "\e710";
-}
-.icon-address-ip-outline::before {
- content: "\e711";
-}
-.icon-addons::before {
- content: "\e712";
-}
-.icon-addons-outline::before {
- content: "\e713";
-}
-.icon-additional-services::before {
- content: "\e714";
-}
-.icon-additional-minutes-outline::before {
- content: "\e715";
-}
-.icon-add-widget::before {
- content: "\e716";
-}
-.icon-activity-feed::before {
- content: "\e717";
-}
-.icon-accessories::before {
- content: "\e718";
-}
-.icon-accessories-outline::before {
- content: "\e719";
-}
-.icon-foundation-account::before {
- content: "\e71a";
-}
-.icon-billing-account::before {
- content: "\e71b";
-}
-.headerContainer {
- left: 0px; top: 0px; width: 100%; color: rgb(255, 255, 255); line-height: 50px; position: fixed; z-index: 999; background-color: rgb(6, 122, 180);
-}
-.icon-infinite::before {
- content: "\e71c";
-}
-.headerContentContainer .primaryMenuContainer {
- font-family: arial; font-size: 18px;
-}
-.icon-social-business-community::before {
- content: "\e71d";
-}
-.icon-social-facebook::before {
- content: "\e71e";
-}
-.icon-social-feed::before {
- content: "\e71f";
-}
-.icon-social-google-plus::before {
- content: "\e720";
-}
-.icon-social-linkedin::before {
- content: "\e721";
-}
-.icon-social-network-exchange::before {
- content: "\e722";
-}
-.icon-social-twitter-bird::before {
- content: "\e723";
-}
-.icon-social-twitter::before {
- content: "\e724";
-}
-.icon-social-youtube::before {
- content: "\e725";
-}
-.icon-blocked::before {
- content: "\e726";
-}
-.icon-talk-text::before {
- content: "\e727";
-}
-.icon-blocked::before {
- content: "\e726";
-}
-.icon-group::before {
- content: "\e72c";
-}
-.icon-group-create::before {
- content: "\e72b";
-}
-.headerContentContainer {
- margin: auto; width: 100%; height: 50px; margin-top:5px;
-}
-.headerContentContainer .primaryMenuContainer .linkToRegistration {
- color: rgb(255, 255, 255); float: right;
-}
-.headerContentContainer .primaryMenuContainer .ATTLogo {
- background: url("../images/common/header/attLogo.png") no-repeat -10px -10px; width: 36px; height: 36px; margin-top: 7px; margin-right: 35px; margin-left: 10px; float: left;
-}
-.headerContentContainer .primaryMenuContainer .attHomeContainer {
- float: left; cursor: pointer;
-}
-.headerContentContainer .primaryMenuContainer .attHomeContainer .businessCenterR {
- font-family: clearviewatt_ltbold; margin-right: 4px; margin-left: 2px; float: left;
-}
-.headerContentContainer .primaryMenuContainer .attHomeContainer .businessCenterR a {
- color: rgb(255, 255, 255); font-family: clearviewatt_ltbold; font-size: 18px; text-decoration: none;
-}
-.headerContentContainer .primaryMenuContainer .attHomeContainer .businessCenterR a:hover {
- color: rgb(191, 231, 251); text-decoration: none;
-}
-.headerContentContainer .primaryMenuContainer .attHomeContainer .businessCenterR a:active {
- color: rgb(191, 231, 251); text-decoration: none;
-}
-.headerContentContainer .primaryMenuContainer .attHomeContainer .businessCenterR:hover {
- margin-top: -2px;
-}
-.headerContentContainer .primaryMenuContainer .attHomeContainer .businessCenterR:active {
- margin-top: -2px;
-}
-.headerContentContainer .primaryMenuContainer .primaryMenuOptionsContainer .primaryMenuOptionLink {
- color: rgb(255, 255, 255); font-family: clearviewatt; font-size: 18px; text-decoration: none; margin-left: 30px; float: left; cursor: pointer;
-}
-.headerContentContainer .primaryMenuContainer .primaryMenuOptionsContainer .primaryMenuOptionLink:hover {
- color: rgb(191, 231, 251); text-decoration: none; margin-top: -2px;
-}
-.headerContentContainer .primaryMenuContainer .primaryMenuOptionsContainer .primaryMenuOptionLink:focus {
- color: rgb(191, 231, 251); text-decoration: none; margin-top: -2px;
-}
-.headerContentContainer .primaryMenuContainer .primaryMenuOptionsContainer .primaryMenuOptionLink:active {
- color: rgb(191, 231, 251); text-decoration: none; margin-top: -2px;
-}
-.headerContentContainer .primaryMenuContainer .pageNameContainer .pageName {
- color: rgb(255, 255, 255); font-family: clearviewatt_ltbold; font-size: 18px; text-decoration: none; margin-left: 30px; float: left; cursor: pointer;
-}
-.headerContentContainer .primaryMenuContainer .pageNameContainer .pageName:hover {
- color: rgb(191, 231, 251); text-decoration: none; margin-top: -2px;
-}
-.headerContentContainer .primaryMenuContainer .pageNameContainer .pageName:active {
- color: rgb(191, 231, 251); text-decoration: none; margin-top: -2px;
-}
-.headerContentContainer .primaryMenuContainer .selectedOptionIndicator {
- border-width: 0px 8px 8px; border-style: solid; border-color: transparent transparent rgb(255, 255, 255); width: 0px; height: 0px; margin-top: 43px; position: absolute;
-}
-.headerContentContainer .primaryMenuContainer .loginIcon {
- background: url("") no-repeat -10px -41px; width: 16px; height: 21px; color: rgb(255, 255, 255); line-height: 50px; font-size: 18px; margin-top: 14px; margin-right: 10px; float: left; position: relative; cursor: pointer;
-}
-.headerContentContainer .primaryMenuContainer .loginIcon:hover {
- background-position: -10px -10px; margin-top: 12px;
-}
-.headerContentContainer .primaryMenuContainer .loginIcon:focus {
- background-position: -10px -10px; margin-top: 12px;
-}
-.headerContentContainer .primaryMenuContainer .icon-cart {
- background-position: -1000px; color: rgb(255, 255, 255); line-height: 50px; font-size: 18px; margin-right: 34px; float: left; position: relative; cursor: pointer;
-}
-.headerContentContainer .primaryMenuContainer .icon-cart:hover {
- color: rgb(191, 231, 251); margin-top: -2px;
-}
-.headerContentContainer .primaryMenuContainer .headerIconContainer {
- height: 50px; float: right; position: relative;
-}
-.headerContentContainer .primaryMenuContainer .headerIconContainer .loginName {
- line-height: 50px; font-family: clearviewatt; font-size: 12px; margin-right: 31px; float: left; position: relative;
-}
-.headerContentContainer .primaryMenuContainer .headerIconContainer .chatIcon {
- background: url("../images/common/header/att-chat-sprite.png") no-repeat -10px -39px; width: 18px; height: 19px; color: rgb(255, 255, 255); line-height: 50px; margin-top: 16px; margin-right: 32px; float: left; position: relative; cursor: pointer;
-}
-.headerContentContainer .primaryMenuContainer .headerIconContainer .chatIcon:hover {
- background-position: -10px -10px; margin-top: 14px;
-}
-.headerContentContainer .primaryMenuContainer .headerIconContainer .chatIcon:focus {
- background-position: -10px -10px; margin-top: 14px;
-}
-.headerContentContainer .primaryMenuContainer .headerIconContainer .searchIcon {
- background-position: -1000px; color: rgb(255, 255, 255); line-height: 50px; margin-right: 31px; float: left; position: relative; cursor: pointer;
-}
-.headerContentContainer .primaryMenuContainer .headerIconContainer .searchIcon:hover {
- color: rgb(191, 231, 251); margin-top: -2px;
-}
-.selectedPrimaryMenuOption {
- color: rgb(255, 255, 255); font-family: clearviewatt_ltbold !important;
-}
-.secondaryMenuContainer {
- width: 100%; height: 50px; color: rgb(102, 102, 102); line-height: 50px; font-family: clearviewatt; font-size: 16px; margin-top: 50px; margin-bottom: 50px; border-bottom-color: rgb(221, 221, 221); border-bottom-width: 1px; border-bottom-style: solid; float: left; background-color: rgb(255, 255, 255);
-}
-.secondaryMenuContainer .secondaryMenuContentContainer {
- margin: auto; width: 100%;
-}
-.secondaryMenuContainer .secondaryMenuContentContainer .secondaryMenuOption {
- overflow: hidden; float: left; cursor: pointer;
-}
-.secondaryMenuContainer .secondaryMenuContentContainer .secondaryMenuOption .selectionDiv {
- top: -4px; height: 4px; position: relative; background-color: rgb(6, 122, 180);
-}
-.secondaryMenuContainer .secondaryMenuContentContainer .secondaryMenuOption .secondaryMenuOptionLink {
- outline: 0px; color: rgb(102, 102, 102); text-decoration: none;
-}
-.secondaryMenuContainer .secondaryMenuContentContainer .secondaryMenuOption .secondaryMenuOptionLink:hover {
- font-family: clearviewatt_ltbold; font-size: 16px; text-decoration: none;
-}
-.secondaryMenuContainer .secondaryMenuContentContainer .secondaryMenuOption .secondaryMenuOptionLink:focus {
- font-family: clearviewatt_ltbold; font-size: 16px; text-decoration: none;
-}
-.secondaryMenuContainer .secondaryMenuContentContainer .secondaryMenuOption .thirdMenuOptionLink {
- outline: 0px; color: rgb(102, 102, 102); text-decoration: none;
-}
-.secondaryMenuContainer .secondaryMenuContentContainer .secondaryMenuOption .thirdMenuOptionLink:hover {
- font-family: clearviewatt_ltbold; font-size: 16px; text-decoration: none;
-}
-.secondaryMenuContainer .secondaryMenuContentContainer .secondaryMenuOption .thirdMenuOptionLink:focus {
- font-family: clearviewatt_ltbold; font-size: 16px; text-decoration: none;
-}
-.selectedSecondaryMenuOption {
- font-family: clearviewatt_ltbold; font-size: 16px;
-}
-.homePageNameHighlight {
- font-family: clearviewatt_ltbold; font-size: 16px;
-}
-.megaMenuContainer {
- width: 100%; overflow: auto; margin-top: 101px; position: fixed; z-index: 3000; min-height: 140px; max-height: 500px; opacity: 1; background-color: rgb(255, 255, 255);
-}
-.megaMenuContentContainer {
- margin: auto; width: 100%;
-}
-.megaMenuContentContainer .megaMenuTable {
- width: 100%;
-}
-.megaMenuContentContainer .megaMenuTable .megaMenuRow .categoryContainerColumn {
- vertical-align: top;
-}
-.megaMenuContentContainer .megaMenuTable .megaMenuRow .categoryContainerColumn .categoryContainer {
- margin-bottom: 32px; float: left;
-}
-.megaMenuContentContainer .megaMenuTable .megaMenuRow .categoryContainerColumn .categoryContainer .categoryTitle {
- color: rgb(68, 68, 68); font-family: clearviewatt_ltbold; font-size: 14px; margin-top: 36px; margin-bottom: 22px;
-}
-.megaMenuContentContainer .megaMenuTable .megaMenuRow .categoryContainerColumn .categoryContainer .categoryOptionLink {
- outline: 0px; color: rgb(68, 68, 68); font-family: clearviewatt; font-size: 12px; text-decoration: none; margin-bottom: 13px;
-}
-.megaMenuContentContainer .megaMenuTable .megaMenuRow .categoryContainerColumn .categoryContainer .categoryOptionLink:hover {
- color: rgb(25, 157, 223); text-decoration: none;
-}
-.megaMenuContentContainer .megaMenuTable .megaMenuRow .categoryContainerColumn .categoryContainer .categoryOptionLink:focus {
- color: rgb(25, 157, 223); text-decoration: none;
-}
-.megaMenuContentContainer .megaMenuTable .megaMenuRow .categoryContainerColumn .categoryContainer .categoryOptionLink:active {
- color: rgb(25, 157, 223); text-decoration: none;
-}
-.megaMenuContentContainer .megaMenuTable .megaMenuSecondRow .categoryTitle {
- margin-top: 4px !important;
-}
-.addMargin {
- margin-top: 50px;
-}
-.contents {
- padding-top: 100px;
-}
-.megaMenuContentContainer .megaMenuTable li {
- float: left;
-}
-.megaMenuContentContainer ul {
- margin: 0px;
-}
-.headerContainer .secondaryMenuContainer {
- margin: 0px;
-}
-.unselectable {
- -ms-user-select: none; -webkit-user-select: none; -moz-user-select: none; -o-user-select: none; user-select: none; -khtml-user-select: none;
-}
-.chatBox {
- background: rgb(242, 242, 242); border: 1px solid rgb(187, 187, 187); top: 50px; width: 250px; right: 30px; display: none; position: absolute; z-index: 1000; min-height: 145px; box-sizing: border-box; box-shadow: 0px 4px 4px rgba(0,0,0,0.25); -webkit-box-sizing: border-box; -moz-box-sizing: border-box;
-}
-.chatBox .arrow {
- left: 233px; top: -8px; width: 0px; height: 0px; border-right-color: transparent; border-bottom-color: rgb(255, 255, 255); border-left-color: transparent; border-right-width: 8px; border-bottom-width: 8px; border-left-width: 8px; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; position: absolute; z-index: 1001;
-}
-.chatBox-header {
- padding: 0px 25px; width: 250px; height: 85px; position: relative; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box;
-}
-.chatBox-heading {
- left: 25px; top: 18px; color: rgb(68, 68, 68); line-height: 28px; font-family: omnes_attlight; font-size: 24px; position: absolute;
-}
-.chatBox-question {
- left: 25px; top: 53px; color: rgb(68, 68, 68); line-height: 16.8px; font-family: clearviewatt; font-size: 13px; position: absolute;
-}
-.circle_close_chat {
- top: 22px; right: 20px; color: rgb(68, 68, 68); font-size: 14px; position: absolute; cursor: pointer;
-}
-.chatBox-body {
- padding: 0px 15px; width: 250px; color: rgb(68, 68, 68); font-size: 12px; position: relative; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box;
-}
-.chat-option {
- height: 35px; line-height: 45px; margin-bottom: 10px; position: relative;
-}
-.chat-option .hr-chatbox {
- margin: 10px 0px; padding: 0px; border: 0px currentColor !important; width: inherit; height: 1px; display: block;
-}
-.chat-icon-info {
- top: 15px; right: 6px; font-size: 16px; position: absolute;
-}
-.chat-option > span {
- left: 10px; top: 0px; position: absolute; cursor: pointer;
-}
-.chat-option > span {
- left: 10px; top: 0px; position: absolute;
-}
-.chat-option > span:hover {
- color: rgb(6, 122, 180);
-}
-
-.box1 {
- min-width: 260px;
- /* min-height:165px; */
-
- height: auto;
- width: auto;
- z-index: 1000;
- display: none;
- background: #FFF;
- border: solid 1px #BBBBBB;
- /* border-radius:5px; */
-
- box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
- position: relative;
-}
-.box1 *,
-.box1 :after,
-.box1 :before {
- -webkit-box-sizing: content-box;
- -moz-box-sizing: content-box;
- box-sizing: content-box;
-}
-.box1 a.close {
- color: red;
- font-size: 12px;
- font-family: arial;
- text-decoration: underline;
-}
-.box1 .arrow {
- width: 0;
- height: 0;
- border-left: 8px solid transparent;
- border-right: 8px solid transparent;
- border-bottom: 8px solid #FFF;
- position: absolute;
- left: 1px;
- top: -8px;
- z-index: 1001;
-}
-.headerContentContainer .primaryMenuContainer .headerIconContainer .popbox .box1 ul {
- margin-left: 0px;
-}
diff --git a/ecomp-portal-BE/war/static/ebz/js/attHeaderSnippet.js b/ecomp-portal-BE/war/static/ebz/js/attHeaderSnippet.js
deleted file mode 100644
index 2c0dfc37..00000000
--- a/ecomp-portal-BE/war/static/ebz/js/attHeaderSnippet.js
+++ /dev/null
@@ -1,210 +0,0 @@
-/* Popup Box function */
-(function(){
-
- $.fn.popbox = function(options){
- settings = $.extend({
- selector : this.selector,
- open : '.openpopbox',
- box : '.box1',
- arrow : '.arrow',
- arrow_border : '.arrow-border',
- close : '.close'
- }, options);
-
- var methods = {
- open: function(event){
- event.preventDefault();
- var pop = $(this);
- var box = $(this).parent().find(settings['box']);
- box.find(settings['arrow']).css({'left': box.width()/2 - 10 + 46});
- box.find(settings['arrow_border']).css({'left': box.width()/2 - 10 - 63});
- if(box.css('display') == 'block'){
- /* methods.close();
- setTimeout(function(){ $(".btn-panel-vertical,#actionsDropDown").css('z-index','999'); },200);
- // $(".btn-panel-vertical,#actionsDropDown").css('z-index','999');
- if($(window).scrollTop() > 20){
- setTimeout(function(){ $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999'); },200);
- // $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999');
- };*/
- $('.box1').fadeIn('slow');
- } else {
- $('.chatBox').fadeOut('fast');
- $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999');
- if(box.attr('target') == 'auth'){
- box.find(settings['arrow']).css({'left': box.width()/2 + 36});
- box.css({'display': 'block', 'top': 0, 'left': ((pop.parent().parent().width()/2) -box.width()/2 ) - 90});
- }
- else{
- box.find(settings['arrow']).css({'left': box.width()/2 - 42});
- box.css({'display': 'block', 'top': 0, 'left': ((pop.parent().parent().width()/2) -box.width()/2-15 )});
- box.find("#header_login_id").focus();
- box.find('#header_password').val('');
- }
- }
- },
-
- close: function(){
- $(settings['box']).fadeOut("fast");
- }
- };
-
- $(document).bind('keyup', function(event){
- if(event.keyCode == 27){
- setTimeout(function(){ $(".btn-panel-vertical,#actionsDropDown").css('z-index','999'); },200);
- // $(".btn-panel-vertical,#actionsDropDown").css('z-index','999');
- if($(window).scrollTop() > 20){
- // setTimeout(function(){ $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999'); },200);
- $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999');
- };
- methods.close();
- }
- });
- // Close chat-box and popup on clicking out of chat-box
- $(document).bind('click', function(event){
- if(!($(event.target).closest('.chatBox').length || $(event.target).hasClass('chatIcon') || $(event.target).closest(settings['selector']).length)){
- methods.close();
- if ($("#actionsDropDown").css('z-index')=='-999'){
- setTimeout(function(){ $(".btn-panel-vertical,#actionsDropDown").css('z-index','999'); },200);
- }
- if($(window).scrollTop() > 20){
- setTimeout(function(){ $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999'); },200);
- // $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999');
- };
-
- $('.chatBox').fadeOut('fast');
-
- }
- });
-
- return this.each(function(){
-
- $(this).css({'width': $(settings['box']).width()}); // Width needs to be set otherwise popbox will not move when window resized.
- $(settings['open'], this).bind('click', methods.open);
- $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999');
- $(settings['open'], this).parent().find(settings['close']).bind('click', function(event){
- // $(".btn-panel-vertical,#actionsDropDown").css('z-index','999');
- setTimeout(function(){ $(".btn-panel-vertical,#actionsDropDown").css('z-index','999'); },200);
- methods.close();
- });
- });
- }
-
-}).call(this);
-
-
-$('.popbox').popbox();
-
-$(function(){
- var displayName = "";
- if($("#reg-fn-ln-id").length > 0){
- var fnln = $("#reg-fn-ln-id").val().length;
- if(fnln > 0){
- var fnVar = $("#reg-fname-id").val();
- var lnVar = $("#reg-lname-id").val();
- var numChars = 13;
- var nameLen = fnVar.length + lnVar.length + 1; // 1 for space between the first name and the last name
- if(fnVar != " " && lnVar != " "){
- if(nameLen <= numChars){
- displayName = fnVar+" "+lnVar;
- }else if(nameLen <= (numChars * 2)){
- displayName = fnVar+"<br/>"+lnVar;
- }else
- {
- if(fnVar.length < numChars && lnVar.length > numChars){ //Smaller first name and longer last name
- displayName = fnVar+"<br/>"+lnVar.substring(0,numChars-1)+"...";
- }
-
- if(fnVar.length >= numChars ){ //Longer first name
- // 2 = 1 for elipses, 1 for space between the first name and last name
- longLName = numChars - ((fnVar.substring(numChars,fnVar.length)).length + 2);
- displayName = fnVar.substring(0,numChars)+"<br/>"+fnVar.substring(numChars,fnVar.length)+" "+lnVar.substring(0,longLName)+"...";
- }
- }
- }
- else{
- displayName = fnVar+" "+lnVar;
- }
- }
-
- $("#reg-userName").html(displayName);
- }
-});
-
-/* ClickToChat ANONYMOUS FUNCTION DEFINITION *
- * =============================================== *
- * On clicking the chat icon displays the chat box */
-(function(){
-
- var chatbox = $('.chatBox');
-
- // var actionsDropDown = $('#actionsDropDown');
- var methods = {
- open: function(){chatbox.css('display','block');},
- close: function(){chatbox.fadeOut('fast');}
- };
- $('.chatIcon').click(function(){
- if (chatbox.css('display') == 'block'){
- methods.close();
- setTimeout(function(){ $(".btn-panel-vertical,#actionsDropDown").css('z-index','999'); },200);
- // $(".btn-panel-vertical,#actionsDropDown").css('z-index','999');
- if($(window).scrollTop() > 20){
- setTimeout(function(){ $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999'); },200);
- // $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999');
- };
- } else {
- $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999');
- methods.open();
- $(settings['box']).fadeOut("fast");
- }
- });
-
- // Close chat-box on clicking cross icon
- $('.circle_close_chat').click(function(){
- // $(".btn-panel-vertical,#actionsDropDown").css('z-index','999');
- setTimeout(function(){ $(".btn-panel-vertical,#actionsDropDown").css('z-index','999'); },200);
- methods.close();
- if($(window).scrollTop() > 20){
- setTimeout(function(){ $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999'); },200);
- // $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999');
- };
- });
-
- // Close chat-box on Escape key press
- $(document).bind('keyup', function(event){
- if(event.keyCode == 27){
- setTimeout(function(){ $(".btn-panel-vertical,#actionsDropDown").css('z-index','999'); },200);
- methods.close();
- if($(window).scrollTop() > 20){
- setTimeout(function(){ $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999'); },200);
- //$(".btn-panel-vertical,#actionsDropDown").css('z-index','-999');
- };
- }
- });
-
- // Close chat-box on clicking out of chat-box
- // $(document).bind('click', function(event){
-
- // console.log(event.target,"2");
- // if(!($(event.target).closest('.chatBox').length || $(event.target).hasClass('chatIcon'))) {
- // event.preventDefault();
- // // console.log($(event.target).closest(settings['selector']).length);
- // console.log($(event.target).closest('. ').length);
- // console.log($(event.target).hasClass('chatIcon'));
-
-
- // // $(".btn-panel-vertical,#actionsDropDown").css('z-index','999');
- // methods.close();
- // if ($("#actionsDropDown").css('z-index')=='-999') {
- // $(".btn-panel-vertical,#actionsDropDown").css('z-index','999');
- // };
- // // if (flag!="clicked") {
- // // if ($('.box').css('display') == 'block' || $('.chatBox').css('display') == 'block' ){
- // // $(".btn-panel-vertical,#actionsDropDown").css('z-index','-999');
- // // } else {
- // // $(".btn-panel-vertical,#actionsDropDown").css('z-index','999');
- // // }
- // // }
- // }
- // });
-
-})(); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/ebz/js/footer.js b/ecomp-portal-BE/war/static/ebz/js/footer.js
deleted file mode 100644
index 4cc2d2a4..00000000
--- a/ecomp-portal-BE/war/static/ebz/js/footer.js
+++ /dev/null
@@ -1,110 +0,0 @@
-var feedbackText, pageAddress;
-(function ( $ ) {
- $(document).on('click', '.feedbackButtonDiv', function (e) {
- $(".feedbackSection").slideToggle(600, function(){
- if($(".feedbackButton").hasClass("closeFeedbackButton")) {
- $(".footerContainer .feedbackButton").html("Feedback<span class='icon-chevron-down'></span>");
- $(".footerContainer .feedbackButton").removeClass("closeFeedbackButton");
- } else {
- $(".footerContainer .feedbackButton").html("Close<span class='icon-chevron-up'></span>");
- $(".footerContainer .feedbackButton").addClass("closeFeedbackButton");
- $(".footerContainer .feedbackText").focus();
- }
-
- });
- });
-
- $(document).on('click', '.closeFeedback', function (e) {
- $(".feedbackSection").slideUp(600, function(){
-
- });
- });
-
- $(document).on('click keypress keyup blur paste','textarea[maxlength]', function(e) {
- var maxlength = $(this).attr('maxlength');
- var val = $(this).val();
-
- if (val.length > maxlength) {
- $(this).val(val.slice(0, maxlength));
- }
- });
-
- $(document).on('click', '.feedbackSubmitButton', function (e) {
- var feedbackTextTemp = $(".feedbackText").val();
- feedbackText = $.trim(feedbackTextTemp);
- var feedbackData = feedbackText;
- if (feedbackText != null && feedbackText != '') {
- $.ajax({
- type: "post",
- contentType :'application/json',
- dataType: 'json',
- data: feedbackData,
- url: "/ebiz/dashboard/feedback/createfeedback",
- success: function (data) {
- if (data.success) {
- $(".feedbackSection").slideUp(600, function() {
- $(".feedbackText").val("");
- $(".footerContainer .feedbackButton").html("Feedback<span class='icon-chevron-down'></span>");
- $(".footerContainer .feedbackButton").removeClass("closeFeedbackButton");
- $(".feedbackButtonDiv").slideUp(600);
- $(".readFeedBackMessage").text(data.feedBackMessage);
- $(".feedbackResultMsg, #feedbackResultDivider").slideDown(600);
- $(".readFeedBackMessage").focus();
- });
- } else if (typeof console == "object") {
-
- }
- },
- error: function () {
-
- }
- });
- } else {
- e.preventDefault();
- if (typeof console == 'object') {
- console.log("Invalid Input String");
- }
- }
-
- });
-
- // Click function definition for OK button in feedback success message
- $(document).on('click', '.feedbackMsgOKButton', function(e) {
- $(".feedbackResultMsg, #feedbackResultDivider").slideUp(600, function(){
- $(".readFeedBackMessage").text("");
- });
- $(".feedbackButtonDiv").slideDown(600, function() {
- $('.feedbackButton').focus();
- });
- });
-
-}( jQuery ));
-
-$(function() {
- var footerHeight = 0,
- footerTop = 0,
- $footer = $("#footer");
-
- positionFooter();
-
-
- function positionFooter() {
-
- footerHeight = $footer.height();
- footerTop = ($(window).scrollTop() + $(window).height() - footerHeight) + "px";
-
- if (($(document.body).height() + footerHeight) < $(window).height()) {
- $footer.addClass('stickyFooter')
- .animate({
- top: footerTop
- }, -1)
- } else {
- $footer.removeClass('stickyFooter');
- }
-
- }
-
- $(window)
- .scroll(positionFooter)
- .resize(positionFooter)
-}); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/ebz/sandbox/att-abs-tpls.js b/ecomp-portal-BE/war/static/ebz/sandbox/att-abs-tpls.js
deleted file mode 100644
index d29fbdd4..00000000
--- a/ecomp-portal-BE/war/static/ebz/sandbox/att-abs-tpls.js
+++ /dev/null
@@ -1,20451 +0,0 @@
-/**
-* FileName att-style-guide
-* Version 2.17.0
-* Build number 5c64ecd381d5984c483cdfaa078a1890
-* Date 11/23/2015
-*/
-
-(function(angular, window){
-angular.module("att.abs", ["att.abs.tpls", "att.abs.utilities","att.abs.position","att.abs.transition","att.abs.accordion","att.abs.alert","att.abs.boardStrip","att.abs.breadCrumbs","att.abs.buttons","att.abs.checkbox","att.abs.colorselector","att.abs.datepicker","att.abs.devNotes","att.abs.dividerLines","att.abs.dragdrop","att.abs.drawer","att.abs.message","att.abs.formField","att.abs.hourpicker","att.abs.iconButtons","att.abs.links","att.abs.loading","att.abs.modal","att.abs.pagination","att.abs.paneSelector","att.abs.tooltip","att.abs.popOvers","att.abs.profileCard","att.abs.progressBars","att.abs.radio","att.abs.scrollbar","att.abs.search","att.abs.select","att.abs.slider","att.abs.splitButtonDropdown","att.abs.splitIconButton","att.abs.stepSlider","att.abs.steptracker","att.abs.table","att.abs.tableMessages","att.abs.tabs","att.abs.tagBadges","att.abs.textOverflow","att.abs.toggle","att.abs.treeview","att.abs.typeAhead","att.abs.verticalSteptracker","att.abs.videoControls"]);
-angular.module("att.abs.tpls", ["app/scripts/ng_js_att_tpls/accordion/accordion.html","app/scripts/ng_js_att_tpls/accordion/accordion_alt.html","app/scripts/ng_js_att_tpls/accordion/attAccord.html","app/scripts/ng_js_att_tpls/accordion/attAccordBody.html","app/scripts/ng_js_att_tpls/accordion/attAccordHeader.html","app/scripts/ng_js_att_tpls/alert/alert.html","app/scripts/ng_js_att_tpls/boardStrip/attAddBoard.html","app/scripts/ng_js_att_tpls/boardStrip/attBoard.html","app/scripts/ng_js_att_tpls/boardStrip/attBoardStrip.html","app/scripts/ng_js_att_tpls/buttons/buttonDropdown.html","app/scripts/ng_js_att_tpls/colorselector/colorselector.html","app/scripts/ng_js_att_tpls/datepicker/dateFilter.html","app/scripts/ng_js_att_tpls/datepicker/dateFilterList.html","app/scripts/ng_js_att_tpls/datepicker/datepicker.html","app/scripts/ng_js_att_tpls/datepicker/datepickerPopup.html","app/scripts/ng_js_att_tpls/dividerLines/dividerLines.html","app/scripts/ng_js_att_tpls/dragdrop/fileUpload.html","app/scripts/ng_js_att_tpls/formField/attFormFieldValidationAlert.html","app/scripts/ng_js_att_tpls/formField/attFormFieldValidationAlertPrv.html","app/scripts/ng_js_att_tpls/formField/creditCardImage.html","app/scripts/ng_js_att_tpls/formField/cvcSecurityImg.html","app/scripts/ng_js_att_tpls/hourpicker/hourpicker.html","app/scripts/ng_js_att_tpls/links/readMore.html","app/scripts/ng_js_att_tpls/loading/loading.html","app/scripts/ng_js_att_tpls/modal/backdrop.html","app/scripts/ng_js_att_tpls/modal/tabbedItem.html","app/scripts/ng_js_att_tpls/modal/tabbedOverlayItem.html","app/scripts/ng_js_att_tpls/modal/window.html","app/scripts/ng_js_att_tpls/pagination/pagination.html","app/scripts/ng_js_att_tpls/paneSelector/innerPane.html","app/scripts/ng_js_att_tpls/paneSelector/paneGroup.html","app/scripts/ng_js_att_tpls/paneSelector/sidePane.html","app/scripts/ng_js_att_tpls/tooltip/tooltip-popup.html","app/scripts/ng_js_att_tpls/popOvers/popOvers.html","app/scripts/ng_js_att_tpls/profileCard/addUser.html","app/scripts/ng_js_att_tpls/profileCard/profileCard.html","app/scripts/ng_js_att_tpls/progressBars/progressBars.html","app/scripts/ng_js_att_tpls/scrollbar/scrollbar.html","app/scripts/ng_js_att_tpls/search/search.html","app/scripts/ng_js_att_tpls/select/select.html","app/scripts/ng_js_att_tpls/select/textDropdown.html","app/scripts/ng_js_att_tpls/slider/maxContent.html","app/scripts/ng_js_att_tpls/slider/minContent.html","app/scripts/ng_js_att_tpls/slider/slider.html","app/scripts/ng_js_att_tpls/splitButtonDropdown/splitButtonDropdown.html","app/scripts/ng_js_att_tpls/splitButtonDropdown/splitButtonDropdownItem.html","app/scripts/ng_js_att_tpls/splitIconButton/splitIcon.html","app/scripts/ng_js_att_tpls/splitIconButton/splitIconButton.html","app/scripts/ng_js_att_tpls/splitIconButton/splitIconButtonGroup.html","app/scripts/ng_js_att_tpls/stepSlider/attStepSlider.html","app/scripts/ng_js_att_tpls/steptracker/step-tracker.html","app/scripts/ng_js_att_tpls/steptracker/step.html","app/scripts/ng_js_att_tpls/steptracker/timeline.html","app/scripts/ng_js_att_tpls/steptracker/timelineBar.html","app/scripts/ng_js_att_tpls/steptracker/timelineDot.html","app/scripts/ng_js_att_tpls/table/attTable.html","app/scripts/ng_js_att_tpls/table/attTableBody.html","app/scripts/ng_js_att_tpls/table/attTableHeader.html","app/scripts/ng_js_att_tpls/tableMessages/attTableMessage.html","app/scripts/ng_js_att_tpls/tableMessages/attUserMessage.html","app/scripts/ng_js_att_tpls/tabs/floatingTabs.html","app/scripts/ng_js_att_tpls/tabs/genericTabs.html","app/scripts/ng_js_att_tpls/tabs/menuTab.html","app/scripts/ng_js_att_tpls/tabs/parentmenuTab.html","app/scripts/ng_js_att_tpls/tabs/simplifiedTabs.html","app/scripts/ng_js_att_tpls/tabs/submenuTab.html","app/scripts/ng_js_att_tpls/tagBadges/tagBadges.html","app/scripts/ng_js_att_tpls/toggle/demoToggle.html","app/scripts/ng_js_att_tpls/typeAhead/typeAhead.html","app/scripts/ng_js_att_tpls/verticalSteptracker/vertical-step-tracker.html","app/scripts/ng_js_att_tpls/videoControls/photoControls.html","app/scripts/ng_js_att_tpls/videoControls/videoControls.html"]);
-angular.module('att.abs.utilities', [])
-
-.filter('unsafe',[ '$sce', function ($sce) {
- return function(val){
- return $sce.trustAsHtml(val);
- };
-}])
-
-.filter('highlight', 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;
- };
-})
-
-.filter('attLimitTo', function() {
- return function(actualArray, _limit, _begin) {
- var finalArray = [];
- var limit = _limit;
- var begin = _begin;
- if(isNaN(begin)) {
- begin = 0;
- }
- if(actualArray && !isNaN(limit)) {
- finalArray = actualArray.slice(begin, begin+limit);
- } else {
- finalArray = actualArray;
- }
- return finalArray;
- };
-})
-
-.filter('startsWith', function() {
- if (typeof String.prototype.startsWith !== 'function') {
- // see below for better implementation!
- String.prototype.startsWith = function (str){
- return this.indexOf(str) === 0;
- };
- }
-
- return function(items, searchString) {
- if (searchString === undefined || searchString === "") {
- return items;
- }
-
- var filtered = [];
- angular.forEach(items, function(item) {
- if (item.title.toLowerCase().startsWith(searchString.toLowerCase())) {
- filtered.push(item);
- }
- });
- return filtered;
- };
-})
-
-.directive('attInputDeny', [function() {
- return {
- restrict: 'A',
- require: 'ngModel',
- link: function (scope, elem, attr, ctrl) {
- var regexExpression = null;
- attr.$observe('attInputDeny', 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('attAccessibilityClick', [function() {
- return {
- restrict: 'A',
- link: function (scope, elem, attr) {
- var keyCode = [];
- attr.$observe('attAccessibilityClick', function (value) {
- if (value) {
- keyCode = value.split(',');
- }
- });
- elem.bind('keydown', 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('attElementFocus', [function() {
- return {
- restrict: 'A',
- link: function(scope, elem, attr) {
- scope.$watch(attr.attElementFocus, function (value) {
- if (value) {
- elem[0].focus();
- }
- });
- }
- };
-}])
-
-.directive('focusOn', ['$timeout',
- function ($timeout) {
- var checkDirectivePrerequisites = function (attrs) {
- if (!attrs.focusOn && attrs.focusOn !== '') {
- throw 'FocusOnCondition missing attribute to evaluate';
- }
- };
- return {
- restrict: 'A',
- link: function (scope, element, attrs) {
- checkDirectivePrerequisites(attrs);
-
- scope.$watch(attrs.focusOn, function (currentValue) {
- if(currentValue) {
- $timeout(function () {
- element[0].focus();
- });
- }
- });
- }
- };
- }
-])
-.constant('whenScrollEndsConstants', {
- 'threshold': 100,
- 'width': 0,
- 'height': 0
-})
-.directive('whenScrollEnds', function(whenScrollEndsConstants, $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) || whenScrollEndsConstants.threshold;
-
- if (!attrs.axis || attrs.axis === '') {
- $log.warn('axis attribute must be defined for whenScrollEnds.');
- return;
- }
-
- if (attrs.axis === 'x') {
- visibleWidth = parseInt(attrs.width, 10) || whenScrollEndsConstants.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.whenScrollEnds);
- }
- });
- } else if (attrs.axis === 'y') {
- visibleHeight = parseInt(attrs.height, 10) || whenScrollEndsConstants.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.whenScrollEnds);
- }
- });
- }
- }
- };
-})
-
-.directive("validImei", function(){
- return {
- restrict: 'A',
- require: 'ngModel',
- link: function(scope, ele, attrs, ctrl)
- {
- ctrl.$parsers.unshift(function(value)
- {
- if(value){
- scope.valid = false;
- if (!isNaN(value) && value.length === 15)
- {
- var sumImeiVal = 0;
- var posIMEI = [];
- for (var imeiIndex=0; imeiIndex<15; imeiIndex++)
- {
- posIMEI[imeiIndex] = parseInt(value.substring(imeiIndex,imeiIndex + 1),10);
- if (imeiIndex % 2 !== 0)
- {
- posIMEI[imeiIndex] = parseInt((posIMEI[imeiIndex] * 2),10);
- }
- if (posIMEI[imeiIndex] > 9)
- {
- posIMEI[imeiIndex] = parseInt((posIMEI[imeiIndex] % 10),10) + parseInt((posIMEI[imeiIndex] / 10),10);
- }
- sumImeiVal=sumImeiVal+parseInt((posIMEI[imeiIndex]),10);
- }
-
- if((sumImeiVal % 10) === 0)
- {
- scope.valid = true;
- }
- else
- {
- scope.valid = false;
- }
- }
- else
- {
- scope.valid = false;
- }
- ctrl.$setValidity('invalidImei', scope.valid);
- }
- return scope.valid ? value : undefined;
- });
- }
- };
-})
-
-.directive("togglePassword", function(){
- return{
- restrict:'A',
- transclude:false,
- link: function(scope, element, attr, ctrl)
- {
- element.bind("click", function()
- {
- var ipwd = attr.togglePassword;
- element[0].innerHTML = element[0].innerHTML === "Show" ? "Hide" : "Show";
- var e = angular.element(document.querySelector('#' + ipwd))[0].type;
- angular.element(document.querySelector('#' + ipwd))[0].type = e === "password"? "text" : "password";
-
- });
-
- }
- };
-})
-
-.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 _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,
- event: _event
- };
-}])
-
-.factory('DOMHelper', function() {
-
- function isTabable(node) {
- var element = angular.element(node);
- var hasTabindex = (parseInt(element.attr('tabindex'), 10) >= 0) ? true : false;
- var tagName = element[0].tagName.toUpperCase();
-
- if (hasTabindex || tagName === 'A' || tagName === 'INPUT' || tagName === 'TEXTAREA') {
- return !(element[0].disabled || element[0].readOnly);
- }
- return false;
- }
-
- function isValidChild(child) {
- return child.nodeType == 1 && child.nodeName != 'SCRIPT' && child.nodeName != 'STYLE';
- }
-
- function traverse(obj) {
- var obj = obj || document.getElementsByTagName('body')[0];
- if (isValidChild(obj) && isTabable(obj)) {
- return obj;
- }
- if (obj.hasChildNodes()) {
- var child = obj.firstChild;
- while(child) {
- var res = traverse(child);
- if(res){
- return res;
- }
- else{
- child = child.nextSibling;
- }
- }
- }
- else{
- return undefined;
- }
- }
-
- 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);
- };
-
- return {
- firstTabableElement: _firstTabableElement
- };
-})
-
-.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);
- }
- };
-})
-
-.factory('keyMapAc', function(){
- return {
- keys:{ "32":" ", "33":"!", "34":"\"", "35":"#", "36":"$", "37":"%", "38":"&", "39":"'"
- , "40":"(", "41":")", "42":"*", "43":"+", "44":",", "45":"-", "46":".", "47":"\/", "58":":"
- , "59":";", "60":"<", "61":"=", "62":">", "63":"?", "64":"@", "91":"[", "92":"\\", "93":"]"
- , "94":"^", "95":"_", "96":"`", "123":"{", "124":"|", "125":"}", "126":"~"
- },
- keyRange:{"startNum":"48","endNum":"57","startSmallLetters":"97","endSmallLetters":"122"
- ,"startCapitalLetters":"65","endCapitalLetters":"90"},
- allowedKeys:{TAB:8, BACKSPACE:9, DELETE:16}
- };
-})
-
-.factory('$attElementDetach', function () {
- var _detach = function (element) {
- if (element && element.parentNode) {
- element.parentNode.removeChild(element);
- }
- };
- return _detach;
-})
-
-.factory('$ieVersion', function () {
- var ie = null;
-
- var loadIEVersion = function () {
- var isIE10 = (eval("/*@cc_on!@*/false") && document.documentMode === 10);
- if (isIE10) {
- return 10;
- }
- var v = 3,
- div = document.createElement('div'),
- all = div.getElementsByTagName('i');
- do {
- div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->';
- } while (all[0]);
- return v > 4 ? v : undefined;
- };
-
- return function () {
- if (ie===null) {
- ie = loadIEVersion();
- }
- return ie;
- };
-});
-(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;
- };
- }
-})();
-
-angular.module('att.abs.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)
- };
- }
- };
-}])
-
-.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;
- });
- }
- };
-}]);
-
-/*!
- * 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 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('att.abs.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('att.abs.accordion', ['att.abs.utilities', 'att.abs.position', 'att.abs.transition'])
-.constant('accordionConfig', {
- closeOthers: false
-}).controller('AccordionController', ['$scope', '$attrs', 'accordionConfig', '$log',
-function ($scope, $attrs, accordionConfig, $log) {
-// This array keeps track of the accordion groups
-this.groups = [];
-this.index = -1;
-// Keep reference to user's scope to properly assign `is-open`
-this.scope = $scope;
-$scope.forceExpand = false;
-// Ensure that all the groups in this accordion are closed, unless close-others explicitly says not to
-this.closeOthers = function (openGroup) {
- var closeOthers = angular.isDefined($attrs.closeOthers) ? $scope.$eval($attrs.closeOthers) : accordionConfig.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.expandAll = function () {
- $scope.forceExpand = true;
- angular.forEach(this.groups, function (group) {
- group.isOpen = true;
- });
-};
-this.collapseAll = function () {
- angular.forEach(this.groups, function (group) {
- group.isOpen = false;
- });
-};
-/**function focus @param focusGroup */
-this.focus = function (focusGroup) {
- var self = this;
- angular.forEach(this.groups, function (group, index) {
- if (group !== focusGroup) {
- group.focused = false;
- } else {
- self.index = index;
- group.focused = true;
- }
- });
-};
-/** @param blurGroup*/
-this.blur = function (blurGroup) {
- blurGroup.focused = false;
- this.index = -1;
- $log.log("accordion.blur()", blurGroup);
-};
-/** @param group - the group in current focus @param down - cycling down */
-this.cycle = function (group, down, noRecycle) {
- if (!down) {
- if (this.index <= 0 && !noRecycle) {
- this.index = this.groups.length - 1;
- } else {
- this.index--;
- }
- } else {
- if (this.index === (this.groups.length - 1))
- {
- if (noRecycle) {
- this.index = 0;
- group.focused = false;
- $scope.$apply();
- return;
- }
- else
- {
- this.index = 0;
- }
- } else {
- this.index++;
- }
- }
-
- group.focused = false;
- this.groups[this.index].setFocus = true;
- this.groups[this.index].focused = true;
- $scope.$apply();
-};
-// This is called from the accordion-group directive to add itself to the accordion
-this.addGroup = function (groupScope) {
- var that = this;
- groupScope.index = this.groups.length;
- groupScope.focused = false;
- this.groups.push(groupScope);
-
- if(this.groups.length > 0){
- this.index = 0;
- }
-
- groupScope.$on('$destroy', function () {
- that.removeGroup(groupScope);
- });
-};
-// This is called from the accordion-group directive when to remove itself
-this.removeGroup = function (group) {
- var index = this.groups.indexOf(group);
- if (index !== -1) {
- this.groups.splice(this.groups.indexOf(group), 1);
- }
-};
-}])
-//The accordion directive simply sets up the directive controller and adds an accordion CSS class to itself element.
-.directive('accordion', function () {
- return {
- restrict: 'EA',
- controller: 'AccordionController',
- transclude: true,
- replace: false,
- scope: {
- cClass: '@css',
- expandAll: "=?",
- collapseAll: "=?"
- },
- template: '<div class="{{cClass}}" ng-transclude></div>',
- link: function (scope, elem, attribute, ctrl) {
- scope.$watch("expandAll", function (value) {
- if (value) {
- ctrl.expandAll();
- scope.expandAll = false;
- }
- });
- scope.$watch("collapseAll", function (value) {
- if (value) {
- ctrl.collapseAll();
- scope.collapseAll = false;
- }
- });
- }
- };
-})
-//The accordion-group directive indicates a block of html that will expand and collapse in an accordion
-.directive('accordionGroup', [ function () {
- return {
- // We need this directive to be inside an accordion
- require: ['^accordion', 'accordionGroup'],
- restrict: 'EA',
- // It transcludes the contents of the directive into the template
- transclude: true,
- // The element containing the directive will be replaced with the template
- replace: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/accordion/accordion.html',
- scope: {
- // Create an isolated scope and interpolate the heading attribute onto this scope
- heading: '@',
- isOpen: '=?'
- },
- controller: ['$scope', function ($scope)
- {
- $scope.showicon = true;
- this.setHeading = function (element)
- {
- this.heading = element;
- $scope.showicon = false;
- };
- this.isIsOpen = function ()
- {
- return $scope.isOpen;
- };
- }],
- link: function (scope, element, attrs, ctrl) {
- var accordionCtrl = ctrl[0];
- var accordionGroupCtrl = ctrl[1];
- var keys = {tab: 9, enter: 13, esc: 27, space: 32, pageup: 33, pagedown: 34, end: 35, home: 36, left: 37, up: 38, right: 39, down: 40};
- //not a fix
- var tab = element.children().eq(0);
- var parentHyperLink=attrs.parentLink;
- scope.setFocus = false;
- scope.childLength = attrs.childLength;
- scope.headingIconClass = attrs.imageSource;
-
- var handleKeydown = function (ev) {
- var boolFlag = true;
- switch (ev.keyCode)
- {
- case keys.enter:
- ev.preventDefault();
- scope.toggle();
- scope.$apply();
- break;
- case keys.up:
- case keys.left:
- ev.preventDefault();
- accordionCtrl.cycle(scope, false);
- break;
- case keys.down:
- case keys.right:
- ev.preventDefault();
- accordionCtrl.cycle(scope, true);
- break;
- default:
- boolFlag = false;
- break;
- }
- ev.stopPropagation();
- return boolFlag;
- };
-
- if (angular.isUndefined(scope.isOpen)) {
- scope.isOpen = false;
- }
-
- tab.bind("keydown", handleKeydown);
-
- accordionCtrl.addGroup(scope);
-
- if (scope.index === 0) {
- scope.focused = true;
- }
-
- accordionGroupCtrl.toggle = scope.toggle = function () {
- /* if the menu item has children, toggle/expand child menu of this item */
- if (scope.childLength>0) {
- scope.isOpen = !scope.isOpen;
- accordionCtrl.focus(scope);
- return scope.isOpen;
- }
- /* if the menu item does not have children, redirect to parent action URL*/
- else {
- window.location.href = parentHyperLink;
- }
-
- };
-
- scope.$watch('isOpen', function (value) {
- if (value) {
- accordionCtrl.closeOthers(scope);
- }
- });
-
- scope.$watch("focused", function (value) {
- if (!!value) {
- tab.attr("tabindex", "0");
- if(scope.setFocus){
- tab[0].focus();
- }
- }
- else{
- scope.setFocus = false;
- tab.attr("tabindex", "-1");
- }
- });
- }
- };
- }])
-//Use accordion-heading below an accordion-group to provide a heading containing HTML
-//<accordion-group>
-//<accordion-heading>Heading containing HTML - <img src="..."></accordion-heading>
-//</accordion-group>
-.directive('accordionToggle', function () {
- return{
- restrict: 'EA',
- require: '^accordionGroup',
- scope: {
- expandIcon: '@',
- collapseIcon: '@'
- },
- link: function (scope, element, attr, accordionCtrl)
- {
- var setIcon = function (isOpen) {
- if (scope.expandIcon && scope.collapseIcon)
- {
- if (isOpen) {
- element.removeClass(scope.expandIcon);
- element.addClass(scope.collapseIcon);
- }
- else {
- element.removeClass(scope.collapseIcon);
- element.addClass(scope.expandIcon);
- }
- }
- };
- element.bind('click', function ()
- {
- accordionCtrl.toggle();
- scope.$apply();
- });
- scope.$watch(function () {
- return accordionCtrl.isIsOpen();
- }, function (value) {
- setIcon(value);
- });
- }
- };
-}).directive('accordionHeading', function () {
-return {
-restrict: 'EA',
-transclude: true,
-template: '',
-require: '^accordionGroup',
-compile: function (element, attr, transclude) {
- var link = function (scope, element, attr, accordionGroupCtrl) {
- // Pass the heading to the accordion-group controller
- // so that it can be transcluded into the right place in the template
- // [The second parameter to transclude causes the elements to be cloned so that they work in ng-repeat]
- transclude(scope, function (clone) {
- element.append(clone);
- accordionGroupCtrl.setHeading(element);
- });
- };
- return link;
-}
-};
-})
-// Use in the accordion-group template to indicate where you want the heading to be transcluded
-// You must provide the property on the accordion-group controller that will hold the transcluded element
- .directive('accordionTransclude', function () {
- return {
- require: '^accordionGroup',
- link: function (scope, element, attr, controller) {
- scope.$watch(function () {
- return controller[attr.accordionTransclude];
- }, function (heading) {
- if (heading) {
- element.find("span").eq(0).prepend(heading);
- }
- });
- }
- };
- })
- .directive('attGoTop', ['$scrollTo', function ($scrollTo) {
- return {
- restrict: 'A',
- transclude: false,
- link: function (scope, elem, attrs)
- {
- elem.bind('click', function ()
- {
- $scrollTo(0, attrs["attGoTop"]);
- });
- }
- };
- }])
- .directive('attGoTo', ['$anchorScroll', '$location', function ($anchorScroll, $location) {
- return {
- restrict: 'A',
- transclude: false,
- link: function (scope, elem, attrs)
- {
- elem.bind('click', function ()
- {
- var newHash = attrs["attGoTo"];
- if ($location.hash() !== newHash)
- {
- $location.hash(attrs["attGoTo"]);
- }
- else
- {
- $anchorScroll();
- }
- });
- }
- };
- }])
- .directive('freeStanding', function () {
- return {
- restrict: 'EA',
- transclude: true,
- replace: true,
- scope: true,
- template: "<div><span class='att-accordion__freestanding' ng-show='showAccordion'></span>\n" +
- "<div class='section-toggle'>\n" +
- "<button class='section-toggle__button' ng-click='fsToggle()'>\n" +
- " {{btnText}}<i style='font-size:0.875rem' ng-class='{\"icon-chevron-up\": showAccordion,\"icon-chevron-down\": !showAccordion, }'></i> \n" +
- "</button>\n" +
- "</div></div>",
- compile: function (element, attr, transclude)
- {
- var link = function (scope, elem, attrs) {
- scope.content = "";
- transclude(scope, function (clone)
- {
- elem.find("span").append(clone);
- });
- scope.showAccordion = false;
- scope.btnText = scope.showAccordion ? attrs.hideMsg : attrs.showMsg;
- scope.fsToggle = function ()
- {
- scope.showAccordion = !scope.showAccordion;
- scope.btnText = scope.showAccordion ? attrs.hideMsg : attrs.showMsg;
- };
- };
- return link;
- }
- };
- }).directive('expanders', function () {
- return{
- restrict: 'EA',
- replace: true,
- transclude: true,
- template: "<div ng-transclude></div>",
- controller: ['$scope', function ($scope){
- var bodyScope = null;
- this.setScope = function (scope) {
- bodyScope = scope;
- };
- this.toggle = function () {
- $scope.isOpen = bodyScope.isOpen = !bodyScope.isOpen;
- return bodyScope.isOpen;
- };
- }],
- link: function (scope)
- {
- scope.isOpen = false;
- }
- };
-}).directive('expanderHeading', function () {
- return{
- require: "^expanders",
- restrict: 'EA',
- replace: true,
- transclude: true,
- scope: true,
- template: "<div style='padding:10px !important' ng-transclude></div>"
- };
-}).directive('expanderBody', function () {
- return{
- restrict: 'EA',
- require: "^expanders",
- replace: true,
- transclude: true,
- scope: {},
- template: "<div collapse='!isOpen'><div ng-transclude></div></div>",
- link: function (scope, elem, attr, myCtrl) {
- scope.isOpen = false;
- myCtrl.setScope(scope);
- }
- };
-}).directive('expanderToggle', function () {
- return{
- restrict: 'EA',
- require: "^expanders",
- scope: {
- expandIcon: '@',
- collapseIcon: '@'
- },
- link: function (scope, element, attr, myCtrl)
- {
- var isOpen = false;
- var setIcon = function () {
- if (scope.expandIcon && scope.collapseIcon)
- {
- if (isOpen) {
- element.removeClass(scope.expandIcon);
- element.addClass(scope.collapseIcon);
- }
- else {
- element.removeClass(scope.collapseIcon);
- element.addClass(scope.expandIcon);
- }
- }
- };
- element.bind("keydown", function (e) {
- if (e.keyCode === 13)
- {
- scope.toggleit();
- }
- });
- element.bind('click', function ()
- {
- scope.toggleit();
- });
- scope.toggleit = function ()
- {
- isOpen = myCtrl.toggle();
- setIcon();
- scope.$apply();
- };
- setIcon();
- }
- };
-}).directive('collapse', ['$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('collapse');
- 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 :-/
- element.addClass('collapse');
- };
- return {
- link: function (scope, element, attrs) {
- var isCollapsed;
- var initialAnimSkip = true;
- scope.$watch(function () {
- return element[0].scrollHeight;
- }, function () {
- //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 && !isCollapsed) {
- if (initialAnimSkip) {
- fixUpHeight(scope, element, element[0].scrollHeight + 'px');
- } else {
- fixUpHeight(scope, element, 'auto');
- }
- }
- });
- 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(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;
- });
- }
- };
- scope.$watch(attrs.collapse, function (value) {
- if (value) {
- collapse();
- } else {
- expand();
- }
- });
- }
- };
- }])
- .directive('attAccord', function () {
- return {
- restrict: 'EA',
- transclude: true,
- replace: true,
- scope: {},
- controller: 'AttAccordCtrl',
- templateUrl: 'app/scripts/ng_js_att_tpls/accordion/attAccordHeader.html'
- };
- })
- .controller('AttAccordCtrl', [function () {
- this.type = 'attAccord';
- this.headerCtrl;
- this.bodyCtrl;
- var isOpen = true;
- this.toggleBody = function () {
- if (isOpen) {
- this.expandBody();
- }
- else {
- this.collapseBody();
- }
- isOpen = !isOpen;
- };
- this.expandBody = function () {
- this.bodyCtrl.expand();
- };
- this.collapseBody = function () {
- this.bodyCtrl.collapse();
- };
- }])
- .controller('AttAccordHeaderCtrl', [function () {
- this.type = 'header';
- }])
- .directive('attAccordHeader', ['keymap', 'events', function (keymap, events) {
- return {
- restrict: 'EA',
- transclude: true,
- replace: true,
- require: ['^attAccord', 'attAccordHeader'],
- controller: 'AttAccordHeaderCtrl',
- templateUrl: 'app/scripts/ng_js_att_tpls/accordion/attAccordHeader.html',
- link: function (scope, element, attr, ctrls) {
- var attAccordCtrl = ctrls[0];
- var attAccordHeaderCtrl = ctrls[1];
- attAccordCtrl.headerCtrl = attAccordHeaderCtrl;
- var tab = element.children().eq(0);
-
- scope.clickFunc = function () {
- attAccordCtrl.toggleBody();
- };
-
- var handleKeydown = function (ev) {
- var boolFlag = true;
- switch (ev.keyCode)
- {
- case keymap.KEY.ENTER:
- ev.preventDefault();
- scope.clickFunc();
- scope.$apply();
- break;
- default:
- boolFlag = false;
- break;
- }
- ev.stopPropagation();
- return boolFlag;
- };
-
- if (angular.isUndefined(scope.isOpen)) {
- scope.isOpen = false;
- }
-
- tab.bind("keydown", handleKeydown);
- }
- };
- }])
- .controller('AttAccordBodyCtrl', ['$scope', function ($scope) {
- this.type = 'body';
- this.expand = function () {
- $scope.expand();
- };
- this.collapse = function () {
- $scope.collapse();
- };
- }])
- .directive('attAccordBody', ['$timeout', '$height', function ($timeout, $height) {
- return {
- restrict: 'EA',
- transclude: true,
- replace: true,
- require: ['^attAccord', 'attAccordBody'],
- controller: 'AttAccordBodyCtrl',
- templateUrl: 'app/scripts/ng_js_att_tpls/accordion/attAccordBody.html',
- link: function (scope, element, attr, ctrls) {
- var attAccordCtrl = ctrls[0];
- var attAccordBodyCtrl = ctrls[1];
- attAccordCtrl.bodyCtrl = attAccordBodyCtrl;
- var originalHeight;
- $timeout(function () {
- originalHeight = element[0].offsetHeight;
- $height(element, 0, 0, 0);
- });
- scope.expand = function () {
- $height(element, 0.05, originalHeight, 1);
- };
- scope.collapse = function () {
- $height(element, 0.25, 0, 0);
- };
- }
- };
- }]);
-angular.module('att.abs.alert', [])
-.directive('attAlert', [function()
-{
- return {
- restrict:'EA',
- replace : true,
- transclude : true,
- scope: {
- alertType : "@type",
- showTop : "@topPos",
- showAlert : "="
- },
- templateUrl : 'app/scripts/ng_js_att_tpls/alert/alert.html',
- link: function(scope)
- {
- if(scope.showTop === 'true'){
- scope.cssStyle = {'top':'50px'};
- }
- else{
- scope.cssStyle = {'top':'0px'};
- }
- scope.close = function(){
- scope.showAlert = false;
- };
- }
- };
-}]);
-
-angular.module('att.abs.boardStrip', ['att.abs.utilities'])
-.constant('BoardStripConfig', {
- 'maxVisibleBoards': 4,
- 'boardsToScroll': 1,
- /* These parameters are non-configurable and remain unaltered, until there is a change in corresponding SCSS */
- 'boardLength': 140,
- 'boardMargin': 15
-})
-.directive('attBoard', [function() {
- return {
- restrict: 'AE',
- replace: true,
- transclude: true,
- require: '^attBoardStrip',
- scope : {
- boardIndex : '=',
- boardLabel : '='
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/boardStrip/attBoard.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);
- }
- };
- scope.isInView = function(boardIndex) {
- return parentCtrl.isInView(boardIndex);
- };
- }
- };
-}])
-.directive('attBoardStrip', ['BoardStripConfig', '$timeout', '$ieVersion', function(BoardStripConfig, $timeout, $ieVersion) {
- return {
- restrict: 'AE',
- replace: true,
- transclude: true,
- scope: {
- currentIndex: '=selectedIndex',
- boardsMasterArray : '=',
- onAddBoard : '&?'
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/boardStrip/attBoardStrip.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();
- };
-
-
- if ($scope.currentIndex > 0) {
- var index = $scope.currentIndex;
- this.resetBoardStrip();
- if (index > $scope.boardsMasterArray.length) {
- $scope.currentIndex = $scope.boardsMasterArray.length-1;
- } else {
- $scope.currentIndex = index;
- }
- } else {
- this.resetBoardStrip();
- }
-
-
- this.getCurrentIndex = function() {
- return $scope.currentIndex;
- };
- this.setCurrentIndex = function(indx) {
- $scope.currentIndex = indx;
- };
-
- this.isInView = function(index) {
- return (index <= this.maxVisibleIndex && index >= this.minVisibleIndex);
- };
-
- this.getBoardsMasterArrayLength = function() {
- return $scope.boardsMasterArray.length;
- };
- },
- link: function(scope, element, attrs, ctrl) {
- var ieVersion = $ieVersion();
-
- var oldTimeout;
- var animationTimeout = 1000;
-
- if(ieVersion && ieVersion < 10) {
- animationTimeout = 0;
- }
-
- 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 updateBoardsTabIndex = function(boardArray, minViewIndex, maxViewIndex) {
- for (var i = 0; i < boardArray.length; i++) {
- angular.element(boardArray[i]).attr('tabindex', '-1');
- }
- for (var i = minViewIndex; i <= maxViewIndex; i++) {
- angular.element(boardArray[i]).attr('tabindex', '0');
- }
- };
-
- 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('[att-board]');
- if(currentBoardArray.length !== 0) {
-
- 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(){
- currentBoardArray[0].focus();
- }, animationTimeout);
- }
- else{
- currentBoardArray[0].focus();
- }
- }
- else{
- element[0].querySelector('div.boardstrip-item--add').focus();
- }
-
- angular.element(element[0].querySelector(".boardstrip-container")).css({"width": getBoardstripContainerWidth(ctrl.getBoardsMasterArrayLength()) + "px"});
- });
- }
- /* When a board is added */
- else {
- 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 oldContainerAdjustment = angular.element(element[0].querySelector(".boardstrip-container"))[0].style.left;
- var containerAdjustment = calculateAndGetBoardstripContainerAdjustment();
- var currentBoardArray = element[0].querySelectorAll('[att-board]');
- if(oldContainerAdjustment !== containerAdjustment+'px') {
- angular.element(element[0].querySelector(".boardstrip-container")).css({"left": containerAdjustment + "px"});
-
- $timeout.cancel(oldTimeout);
- oldTimeout = $timeout(function(){
- currentBoardArray[currentBoardArray.length-1].focus();
- }, animationTimeout);
- }
- else{
- currentBoardArray[currentBoardArray.length-1].focus();
- }
- /* Update tabindecies to ensure keyboard navigation behaves correctly */
- updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);
- });
- }
- }
- });
-
- 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('[att-board]');
-
- /* Remove tabindex from non-visible boards */
- updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);
-
- if (!(scope.isNextBoard())) {
- try {
- currentBoardArray[currentBoardArray.length-1].focus();
- } catch(e) {}
- }
- }, 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('[att-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);
- };
- }
- };
-}])
-.directive('attAddBoard', ['BoardStripConfig', '$parse', '$timeout', function(BoardStripConfig, $parse, $timeout) {
- return {
- restrict: 'AE',
- replace: true,
- require: '^attBoardStrip',
- scope : {
- onAddBoard : '&?'
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/boardStrip/attAddBoard.html',
- link: function(scope, element, attrs, ctrls) {
- var parentCtrl = ctrls;
- scope.addBoard = function() {
- if (attrs['onAddBoard'] ) {
- scope.onAddBoard = $parse(scope.onAddBoard);
- scope.onAddBoard();
- }
- };
- }
- };
-}])
-.directive('attBoardNavigation', ['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(el).attr('tabindex')) >= 0){
- el1.focus();
- }
- }
- break;
- default:
- break;
- }
- });
- }
- };
-}]);
-
-angular.module('att.abs.breadCrumbs', [])
- .constant("classConstant",{
- "defaultClass" : "breadcrumbs__link",
- "activeClass": "breadcrumbs__link--active"
- })
- .directive('attCrumb', ['classConstant', function(classConstant) {
- return {
- restrict: 'A',
- link: function(scope, elem, attr) {
- elem.addClass(classConstant.defaultClass);
- if(attr.attCrumb === 'active'){
- elem.addClass(classConstant.activeClass);
- }
- if(!elem.hasClass('last')){
- elem.after('<i class="breadcrumbs__item"></i>');
- }
- }
- };
- }
-]);
-angular.module('att.abs.buttons', ['att.abs.position', 'att.abs.utilities'])
- .constant('btnConfig', {
- btnClass: 'button',
- btnPrimaryClass: 'button--primary',
- btnSecondaryClass: 'button--secondary',
- btnDisabledClass: 'button--inactive',
- btnSmallClass: 'button--small'
- })
- .directive('attButton', ['btnConfig', function (btnConfig) {
- return {
- restrict: 'A',
- link: function (scope, element, attrs) {
- element.addClass(btnConfig.btnClass);
- if (attrs.size === 'small') {
- element.addClass(btnConfig.btnSmallClass);
- }
- attrs.$observe('btnType', function (value) {
- if (value === 'primary') {
- element.addClass(btnConfig.btnPrimaryClass);
- element.removeClass(btnConfig.btnSecondaryClass);
- element.removeClass(btnConfig.btnDisabledClass);
- element.removeAttr('disabled');
- } else if (value === 'secondary') {
- element.addClass(btnConfig.btnSecondaryClass);
- element.removeClass(btnConfig.btnPrimaryClass);
- element.removeClass(btnConfig.btnDisabledClass);
- element.removeAttr('disabled');
- } else if (value === 'disabled') {
- element.addClass(btnConfig.btnDisabledClass);
- element.removeClass(btnConfig.btnPrimaryClass);
- element.removeClass(btnConfig.btnSecondaryClass);
- element.attr('disabled', 'disabled');
- }
- });
- }
- };
- }])
- .directive('attButtonLoader', [function () {
- return {
- restrict: 'A',
- replace: false,
- scope: {
- size: '@'
- },
- template: '<div ng-class="{\'button--loading\': size === \'large\',\'button--loading__small\': size === \'small\'}"><i></i><i class="second__loader"></i><i></i></div>',
- link: function (scope, element) {
- element.addClass('button button--inactive');
- }
- };
- }])
- .directive('attButtonHero', [function () {
- return {
- restrict: 'A',
- replace: false,
- transclude: true,
- scope: {
- icon: '@'
- },
- template: '<div class="button--hero__inner"><span ng-transclude></span> <i ng-class="{\'icon-arrow-right\': icon === \'arrow-right\',\'icon-cart\': icon === \'cart\'}"></i></div>',
- link: function (scope, element) {
- element.addClass('button button--hero');
- element.attr("tabindex", "0");
- }
- };
- }])
- .directive('attBtnDropdown', ['$document', '$timeout', '$isElement', '$documentBind', 'keymap', 'events', function ($document, $timeout, $isElement, $documentBind, keymap, events) {
- return {
- restrict: 'EA',
- scope: {
- type: "@dropdowntype"
- },
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/buttons/buttonDropdown.html',
- link: function (scope, element) {
- scope.isOpen = false;
- var currentIndex = -1;
- // Capture all the li elements after compilation
- var list = [], button = undefined;
- $timeout(function() {
- list = element.find('li');
- button = element.find('button')[0];
- }, 10);
- var toggle = scope.toggle = function (show) {
- if (angular.isUndefined(show) || show === '') {
- scope.isOpen = !scope.isOpen;
- }
- else {
- scope.isOpen = show;
- }
- };
- var selectNext = function() {
- if (currentIndex+1 < list.length) {
- currentIndex++;
- list[currentIndex].focus();
- }
- };
- var selectPrev = function() {
- if (currentIndex-1 >= 0) {
- currentIndex--;
- list[currentIndex].focus();
- }
- };
- element.bind("keydown", function($event) {
- var keyCode = $event.keyCode;
- if (keymap.isAllowedKey(keyCode) || keymap.isControl($event) || keymap.isFunctionKey($event)) {
- switch (keyCode) {
- case keymap.KEY.ENTER:
- if (currentIndex > 0) {
- button.focus();
- scope.$apply();
- }
- break;
- case keymap.KEY.ESC:
- toggle(false);
- currentIndex = -1;
- button.focus();
- scope.$apply();
- break;
- case keymap.KEY.DOWN:
- selectNext();
- scope.$apply();
- events.preventDefault($event);
- events.stopPropagation($event);
- break;
- case keymap.KEY.UP:
- selectPrev();
- scope.$apply();
- events.preventDefault($event);
- events.stopPropagation($event);
- break;
- default:
- break;
- }
- } else if (keyCode === keymap.KEY.TAB) {
- toggle(false);
- currentIndex = -1;
- scope.$apply();
- }
- });
- var outsideClick = function (e) {
- var isElement = $isElement(angular.element(e.target), element, $document);
- if (!isElement) {
- toggle(false);
- currentIndex = -1;
- for (var i = 0; i < list.length; i++) {
- angular.element(list[i]).removeClass('selected');
- }
- button.focus();
- scope.$apply();
- }
- };
- $documentBind.click('isOpen', outsideClick, scope);
- }
- };
- }]);
-angular.module('att.abs.checkbox', [])
-.constant("attCheckboxConfig", {
- activeClass : "att-checkbox--on",
- disabledClass : "att-checkbox--disabled"
-})
-.directive('checkboxLimit', function () {
-return {
- scope: {
- checkboxLimit:'=',
- selectLimit:'@?',
- maxSelected:'&?'
- },
- restrict: 'A',
- require:'checkboxLimit',
- controller: ['$scope',function($scope)
- {
- $scope.limit=true;
- this.getMaxLimits=function(){
- return $scope.limit;
- };
- this.setMaxLimits=function(value){
- $scope.limit=value;
- };
- this.maxCheckboxSelected=function(){
- $scope.maxSelected();
- };
- }],
- link: function (scope, element, attribute, ctrl) {
- scope.$watch('checkboxLimit', function()
- {
- var countTrue = 0;
- for (var keys in scope.checkboxLimit) {
- if (scope.checkboxLimit.hasOwnProperty(keys) && scope.checkboxLimit[keys]) {
- countTrue = countTrue + 1;
- }
- };
- if(countTrue>=parseInt(scope.selectLimit)){
- ctrl.setMaxLimits(false);
- }
- else{
- ctrl.setMaxLimits(true);
- }
- }, true);
- }
-};
-})
-.directive('attCheckbox', ['$compile', "attCheckboxConfig", function ($compile, attCheckboxConfig) {
- return {
- scope: {},
- restrict: 'A',
- require: ['ngModel','^?checkboxLimit'],
- link: function (scope, element, attribute, ctrl) {
- var ngCtrl = ctrl[0];
- var checkboxLimitCtrl = ctrl[1];
- var parentDiv = $compile('<div tabindex="0" role="checkbox" att-accessibility-click="13,32" aria-label="Checkbox" ng-click="updateModel($event)" class="att-checkbox"></div>')(scope);
- element.css({display:'none'});
- element.wrap(parentDiv);
- element.parent().append('<div class="att-checkbox__indicator"></div>');
- element.parent().attr("title", attribute.title);
- element.parent().attr("aria-label", attribute.title);
- element.parent().attr("id", attribute.id);
- element.removeAttr("id");
- //element.removeAttr("title");
- //model -> UI
- ngCtrl.$render = function () {
- var selected = ngCtrl.$modelValue ? true : false;
- element.parent().toggleClass(attCheckboxConfig.activeClass, selected);
- element.parent().attr("aria-checked", selected);
- };
-
- //ui->model
- scope.updateModel = function (evt) {
- if (!scope.disabled) {
- ngCtrl.$setViewValue(element.parent().hasClass(attCheckboxConfig.activeClass) ? false : true);
- if(checkboxLimitCtrl && !(checkboxLimitCtrl.getMaxLimits())){
- if(!ngCtrl.$modelValue){
- ngCtrl.$render();
- }
- else{
- checkboxLimitCtrl.maxCheckboxSelected();
- ngCtrl.$setViewValue(element.parent().hasClass(attCheckboxConfig.activeClass) ? true : false);
- }
- }
- else{
- ngCtrl.$render();
- }
- }
- evt.preventDefault();
- };
-
- attribute.$observe('disabled', function(val) {
- scope.disabled = (val || val === "disabled" || val === "true");
- element.parent().toggleClass(attCheckboxConfig.disabledClass, scope.disabled);
- element.parent().attr("tabindex", scope.disabled ? "-1" : "0");
- });
- }
- };
-}])
-.directive('checkboxGroup', ['$compile',function($compile) {
- return {
- scope:{
- checkboxGroup: "=",
- checkboxGroupValue: "=?"
- },
- restrict: 'A',
- link: function(scope, element, attribute){
- scope.checkboxState = 'none';
- if (scope.checkboxGroupValue === undefined) {
- scope.checkboxGroupValue = "indeterminate";
- }
- element.css({display:'none'});
- element.wrap($compile('<div tabindex="0" role="checkbox" att-accessibility-click="13,32" ng-click="updateModel($event)" class="att-checkbox"></div>')(scope));
- element.parent().append('<div class="att-checkbox__indicator"></div>');
- element.parent().attr("title", attribute.title);
- element.parent().attr("aria-label", attribute.title);
- scope.$watch('checkboxState', function(val) {
- if (val === 'all') {
- element.parent().addClass('att-checkbox--on');
- element.parent().removeClass('att-checkbox--indeterminate');
- element.parent().attr("aria-checked", true);
- }
- else if (val === 'none') {
- element.parent().removeClass('att-checkbox--on');
- element.parent().removeClass('att-checkbox--indeterminate');
- element.parent().attr("aria-checked", false);
- }
- else if (val === 'indeterminate') {
- element.parent().removeClass('att-checkbox--on');
- element.parent().addClass('att-checkbox--indeterminate');
- element.parent().attr("aria-checked", true);
- }
- });
- scope.updateModel = function(evt){
- if (element.parent().hasClass('att-checkbox--on')) {
- element.parent().removeClass('att-checkbox--on');
- for (var keys in scope.checkboxGroup) {
- if (scope.checkboxGroup.hasOwnProperty(keys)) {
- scope.checkboxGroup[keys] = false;
- }
- };
- }
- else {
- element.parent().addClass('att-checkbox--on');
- for (var key in scope.checkboxGroup) {
- if (scope.checkboxGroup.hasOwnProperty(key)) {
- scope.checkboxGroup[key] = true;
- }
- };
- }
- evt.preventDefault();
- };
- scope.$watch('checkboxGroupValue', function (value) {
- if (value===false) {
- element.parent().removeClass('att-checkbox--on');
- for (var keys in scope.checkboxGroup) {
- if (scope.checkboxGroup.hasOwnProperty(keys)) {
- scope.checkboxGroup[keys] = false;
- }
- };
- }
- else if (value === true){
- element.parent().addClass('att-checkbox--on');
- for (var key in scope.checkboxGroup) {
- if (scope.checkboxGroup.hasOwnProperty(key)) {
- scope.checkboxGroup[key] = true;
- }
- };
- }
- });
- scope.$watch('checkboxGroup', function(){
- var countTrue = 0;
- var countFalse = 0;
- var count = 0;
- for (var keys in scope.checkboxGroup) {
- if (scope.checkboxGroup.hasOwnProperty(keys)) {
- count = count + 1;
- if (scope.checkboxGroup[keys]) {
- countTrue = countTrue + 1;
- }
- else if (!scope.checkboxGroup[keys]) {
- countFalse = countFalse + 1;
- }
- }
- };
- if (count === countTrue) {
- scope.checkboxState = "all";
- scope.checkboxGroupValue=true;
- }
- else if (count === countFalse) {
- scope.checkboxState = "none";
- scope.checkboxGroupValue=false;
- }
- else {
- scope.checkboxState = "indeterminate";
- scope.checkboxGroupValue="indeterminate";
- }
- }, true);
- }
- };
-}]);
-
-angular.module('att.abs.colorselector', [])
- .directive('colorSelectorWrapper', [function() {
- return {
- scope: {
- selected: '=',
- iconColor: '@'
-
- },
- restrict: 'AE',
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/colorselector/colorselector.html',
- link: function(scope) {
- scope.applycolor = {'background-color': scope.iconColor};
- scope.selectedcolor = function(iconColor) {
- scope.selected = iconColor;
- };
- }
- };
- }])
- .directive('colorSelector', ['$compile', function($compile) {
- return{
- restrict: 'A',
- scope: {
- colorSelector: '@',
- ngModel: '='
- },
- link: function(scope, element, attr) {
- element.removeAttr('color-selector');
- var colorTitle = attr.title;
- var wrapcont = angular.element('<color-selector-wrapper selected="ngModel" title="' + colorTitle + '" icon-color="{{colorSelector}}">' + element.prop('outerHTML') + '</color-selector-wrapper>');
- var newWrapcont = $compile(wrapcont)(scope);
- element.replaceWith(newWrapcont);
- }
- };
- }]);
-angular.module('att.abs.datepicker', ['att.abs.position', 'att.abs.utilities'])
-
-.constant('datepickerConfig', {
- dateFormat: 'MM/dd/yyyy',
- dayFormat: 'd',
- monthFormat: 'MMMM',
- yearFormat: 'yyyy',
- dayHeaderFormat: 'EEEE',
- dayTitleFormat: 'MMMM yyyy',
- disableWeekend: false,
- disableSunday: false,
- startingDay: 0,
- minDate: null,
- maxDate: null,
- mode: 0,
- dateFilter: {
- defaultText: 'Select from list'
- },
- datepickerEvalAttributes: ['dateFormat', 'dayFormat', 'monthFormat', 'yearFormat', 'dayHeaderFormat', 'dayTitleFormat', 'disableWeekend', 'disableSunday', 'startingDay', 'mode'],
- datepickerWatchAttributes: ['min', 'max']
-})
-
-.factory('datepickerService', ['datepickerConfig', 'dateFilter', function (datepickerConfig, dateFilter) {
- var setAttributes = function (attr, elem) {
- if (angular.isDefined(attr) && attr !== null && angular.isDefined(elem) && elem !== null) {
- var attributes = datepickerConfig.datepickerEvalAttributes.concat(datepickerConfig.datepickerWatchAttributes);
- 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 = datepickerConfig.datepickerEvalAttributes;
- var watchAttributes = datepickerConfig.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);
- }
- }
- }
- };
-
- var validateDateString = function (dateString, dateFormat) {
- if (dateString && dateFormat) {
- var delimiter;
- if (dateFormat.indexOf('/') !== -1) {
- delimiter = '/';
- } else if (dateFormat.indexOf('-') !== -1) {
- delimiter = '-';
- } else if (dateFormat.indexOf('.') !== -1) {
- delimiter = '.';
- }
-
- var dateStringArray = dateString.split(delimiter);
- var dateFormatArray = dateFormat.split(delimiter);
- if (dateStringArray.length !== dateFormatArray.length) {
- return false;
- }
-
- for (var i = 0; i < dateStringArray.length; i++) {
- dateStringArray[i] = dateStringArray[i].lPad(dateFormatArray[i].length, '0');
- }
- var intermediateDateString = dateStringArray.join(delimiter);
-
- var actualDateString = dateFilter(new Date(intermediateDateString), dateFormat);
- return intermediateDateString === actualDateString;
- }
- };
-
- return {
- setAttributes: setAttributes,
- bindScope: bindScope,
- validateDateString: validateDateString
- };
-}])
-
-.controller('DatepickerController', ['$scope', '$attrs', 'dateFilter', 'datepickerConfig', function($scope, $attrs, dateFilter, 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)
- },
- startingDay = getValue($attrs.startingDay, dtConfig.startingDay);
- $scope.mode = getValue($attrs.mode, dtConfig.mode);
-
- $scope.minDate = dtConfig.minDate ? $scope.resetTime(dtConfig.minDate) : null;
- $scope.maxDate = dtConfig.maxDate ? $scope.resetTime(dtConfig.maxDate) : null;
-
- 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 = [];
- var current = startDate, i = 0;
- while (i < n) {
- dates[i++] = new Date(current);
- current.setDate(current.getDate() + 1);
- }
- return dates;
- }
-
- var compare = this.compare = function(date1, date2) {
- return (new Date(date1.getFullYear(), date1.getMonth(), date1.getDate()) - new Date(date2.getFullYear(), date2.getMonth(), date2.getDate()));
- };
-
- 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 isToDate(dt) {
- if (dt && angular.isDate($scope.fromDate) && angular.isDate($scope.currentDate) && compare(dt, $scope.currentDate) === 0) {
- return true;
- }
- return false;
- }
-
- function isDateRange(dt) {
- if (dt && angular.isDate($scope.fromDate) && angular.isDate($scope.currentDate) && (compare(dt, $scope.fromDate) >= 0) && (compare(dt, $scope.currentDate) <= 0)) {
- return true;
- }
- return false;
- }
-
- function isWeekend(date) {
- if (dateFilter(date, format.dayHeader) === "Saturday" || dateFilter(date, format.dayHeader) === "Sunday") {
- return true;
- }
- return false;
- }
-
- function isToday(date) {
- if (compare(date, $scope.resetTime(new Date())) === 0) {
- return true;
- }
- return false;
- }
- function isFocused(date) {
- if (date && angular.isDate($scope.focusedDate) && compare(date, $scope.focusedDate) === 0) {
- return true;
- }
- return false;
- }
-
- var isDisabled = this.isDisabled = function(date) {
- 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));
- };
-
-
- function isMinDateAvailable(startDate, endDate) {
- return ($scope.minDate && $scope.minDate.getTime() >= startDate.getTime()) && ($scope.minDate.getTime() <= endDate.getTime());
- }
-
- function isMaxDateAvailable(startDate, endDate) {
- return ($scope.maxDate && $scope.maxDate.getTime() >= startDate.getTime()) && ($scope.maxDate.getTime() <= endDate.getTime());
- }
-
- function getLabel(label) {
- if (label)
- {
- var labelObj = {
- pre: label.substr(0, 3),
- post: label
- };
- return labelObj;
- }
- return;
- }
- function makeDate(dateobj) {
- return {date: dateobj.date, label: dateFilter(dateobj.date, dateobj.formatDay), header: dateFilter(dateobj.date, dateobj.formatHeader), focused: !!dateobj.isFocused, selected: !!dateobj.isSelected, from: !!dateobj.isFromDate, to: !!dateobj.isToDate, dateRange: !!dateobj.isDateRange, oldMonth: !!dateobj.oldMonth, nextMonth: !!dateobj.newMonth, disabled: !!dateobj.isDisabled, today: !!dateobj.isToday, weekend: !!dateobj.isWeakend};
- }
-
- this.modes = [
- {
- name: 'day',
- getVisibleDates: function(date, calendar) {
- 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 = [];
- for (var i = 0; i < numDates; i++) {
- var dt = new Date(days[i]);
- days[i] = makeDate({date:dt,
- formatDay:format.day,
- formatHeader:format.dayHeader,
- isFocused:isFocused(dt),
- isSelected:isSelected(dt),
- isFromDate:isFromDate(dt),
- isToDate:isToDate(dt),
- isDateRange:isDateRange(dt),
- oldMonth:(new Date(dt.getFullYear(), dt.getMonth(), 1, 0, 0, 0).getTime() < new Date(year, month, 1, 0, 0, 0).getTime()),
- newMonth:(new Date(dt.getFullYear(), dt.getMonth(), 1, 0, 0, 0).getTime() > new Date(year, month, 1, 0, 0, 0).getTime()),
- isDisabled:isDisabled(dt),
- isToday:isToday(dt),
- isWeakend:isWeekend(dt)});
- }
- for (var j = 0; j < 7; j++) {
- labels[j] = getLabel(dateFilter(days[j].date, format.dayHeader));
- }
- if (calendar === 'top') {
- $scope.disablePrevTop = isMinDateAvailable(firstDayOfMonth, lastDayOfMonth);
- $scope.disableNextTop = isMaxDateAvailable(firstDayOfMonth, lastDayOfMonth);
- } else if (calendar === 'bottom') {
- $scope.disablePrevBottom = isMinDateAvailable(firstDayOfMonth, lastDayOfMonth);
- $scope.disableNextBottom = isMaxDateAvailable(firstDayOfMonth, lastDayOfMonth);
- } else {
- $scope.disablePrevTop = $scope.disablePrevBottom = isMinDateAvailable(firstDayOfMonth, lastDayOfMonth);
- $scope.disableNextTop = $scope.disableNextBottom = isMaxDateAvailable(firstDayOfMonth, lastDayOfMonth);
- }
- $scope.disablePrev = $scope.disablePrevTop || $scope.disablePrevBottom;
- $scope.disableNext = $scope.disableNextTop || $scope.disableNextBottom;
- 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({date:dt,
- formatDay:format.month,
- formatHeader:format.month,
- isFocused:isFocused(dt),
- isSelected:isSelected(dt),
- isFromDate:isFromDate(dt),
- isToDate:isToDate(dt),
- isDateRange:isDateRange(dt),
- oldMonth:false,
- newMonth:false,
- isDisabled:isDisabled(dt),
- isToday:isToday(dt),
- isWeakend:false});
- }
- return {objects: months, title: dateFilter(date, format.year), labels: labels};
- },
- split:3,
- step: {years: 1}
- }
- ];
-
-}])
-
-.directive('datepicker', ['$timeout', function ($timeout) {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/datepicker/datepicker.html',
- scope: {
- currentDate: "=?current",
- fromDate: "=?from"
- },
- require: 'datepicker',
- controller: 'DatepickerController',
- link: function(scope, element, attrs, ctrl) {
- var datepickerCtrl = ctrl;
- var selected, calendarSelected = false;
- scope.focusedDate;
-
- scope.resetTime = function(date) {
- 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 dt;
- };
-
- if (attrs.min) {
- scope.$parent.$watch(attrs.min, function(value) {
- scope.minDate = value ? scope.resetTime(value) : null;
- refill();
- });
- }
- if (attrs.max) {
- scope.$parent.$watch(attrs.max, function(value) {
- scope.maxDate = value ? scope.resetTime(value) : null;
- refill();
- });
- }
-
- // 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 = datepickerCtrl.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){
- selected = new Date();
- selectedCalendar = moveMonth(angular.copy(selected), -1);
- } else {
- selectedCalendar = angular.copy(selected);
- }
-
- var currentMode = datepickerCtrl.modes[scope.mode];
- var currentData = currentMode.getVisibleDates(selectedCalendar, 'top');
- scope.currentRows = split(currentData.objects, currentMode.split);
- scope.currentTitle = currentData.title;
- scope.labels = currentData.labels || [];
-
- var nextData = currentMode.getVisibleDates(moveMonth(angular.copy(selectedCalendar), 1), 'bottom');
- scope.nextRows = split(nextData.objects, currentMode.split);
- scope.nextTitle = nextData.title;
- }
- }
-
- var selectCurrentDate = function(date) {
- var dt = new Date(date.getFullYear(), date.getMonth(), date.getDate());
- scope.currentDate = dt;
- };
-
- var selectFromDate = function(date) {
- var dt = new Date(date.getFullYear(), date.getMonth(), date.getDate());
- scope.fromDate = dt;
- };
-
- scope.select = function(date) {
- calendarSelected = true;
- if(attrs.from) {
- if(!(angular.isDate(scope.fromDate) && angular.isDate(scope.currentDate))) {
- if(angular.isDate(scope.fromDate)) {
- selectCurrentDate(date);
- } else if(!angular.isDate(scope.fromDate)) {
- selectFromDate(date);
- }
- }
- } else {
- selectCurrentDate(date);
- }
- scope.focusedDate = date;
- };
-
- var swapDate = function(fromDate, currentDate) {
- selectFromDate(currentDate);
- $timeout(function () {
- calendarSelected = true;
- scope.focusedDate = currentDate;
- selectCurrentDate(fromDate);
- });
- };
-
- scope.move = function(direction) {
- selected = moveMonth(angular.copy(selected), direction);
- refill();
- };
-
- scope.$watch('currentDate', function (value) {
- if(angular.isDate(value) && !isNaN(value) && datepickerCtrl.isDisabled(value)) {
- scope.currentDate = null;
- return;
- }
-
- if (attrs.from && !isNaN(value) && !isNaN(scope.fromDate) && datepickerCtrl.compare(value, scope.fromDate) < 0) {
- swapDate(scope.fromDate, value);
- return;
- }
-
- if (calendarSelected) {
- refill();
- calendarSelected = false;
- } else {
- if (angular.isDefined(value) && value !== null) {
- refill(value);
- } else {
- refill();
- }
- }
- scope.focusedDate = undefined;
- });
-
- scope.$watch('fromDate', function (value) {
- if(angular.isDate(value) && !isNaN(value) && datepickerCtrl.isDisabled(value)) {
- scope.fromDate = null;
- return;
- }
- if (attrs.from) {
- if (!isNaN(scope.currentDate) && !isNaN(value) && datepickerCtrl.compare(scope.currentDate, value) < 0) {
- swapDate(value, scope.currentDate);
- return;
- }
- if (calendarSelected) {
- refill();
- calendarSelected = false;
- } else {
- if (angular.isDefined(value) && value !== null) {
- refill(value);
- } else {
- refill();
- }
- }
- }
- scope.focusedDate = undefined;
- });
- }
- };
-}])
-.directive('datepickerPopup', ['$document', 'datepickerService', '$isElement', '$documentBind', function($document, datepickerService, $isElement, $documentBind) {
- var link = function (scope, elem, attr) {
- datepickerService.bindScope(attr, scope);
-
- scope.isOpen = false;
-
- var toggle = scope.toggle = function (show) {
- if(show === true || show === false) {
- scope.isOpen = show;
- } else {
- scope.isOpen = !scope.isOpen;
- }
- };
-
- scope.$watch('current', function () {
- toggle(false);
- });
-
- var outsideClick = function (e) {
- var isElement = $isElement(angular.element(e.target), elem, $document);
- if(!isElement) {
- toggle(false);
- scope.$apply();
- }
- };
-
- $documentBind.click('isOpen', outsideClick, scope);
- };
-
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/datepicker/datepickerPopup.html',
- scope: {
- current: "=current"
- },
- compile: function (elem, attr) {
- var wrapperElement = elem.find('span').eq(1);
- wrapperElement.attr('current', 'current');
- datepickerService.setAttributes(attr, wrapperElement);
-
- return link;
- }
- };
-}])
-
-.directive('attDatepicker', ['$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');
- $element.removeAttr('ng-model');
- $element.attr('ng-model', '$parent.current');
- $element.attr('aria-describedby', 'datepicker');
- $element.attr('format-date', dateFormatString);
- $element.attr('att-input-deny', '[^0-9\/-]');
- $element.attr('maxlength', 10);
- $element.attr('readonly', 'readonly'); //Trinity for CATO
- 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;
- };
- }
- };
-}])
-
-.directive('formatDate', ['dateFilter', 'datepickerService', function(dateFilter, datepickerService) {
- return {
- restrict: 'A',
- require: 'ngModel',
- link: function(scope, elem, attr, ctrl) {
- var formatDate = "";
- attr.$observe('formatDate', function (value) {
- formatDate = value;
- });
- var dateToString = function(value) {
- if (value) {
- ctrl.$setValidity('invalidDate', true);
- return dateFilter(value, formatDate);
- } else {
- ctrl.$setValidity('invalidDate', false);
- return elem.val();
- }
- };
- var stringToDate = function(value) {
- if(datepickerService.validateDateString(value, formatDate)) {
- ctrl.$setValidity('invalidDate', true);
- return new Date(value);
- } else {
- ctrl.$setValidity('invalidDate', false);
- return null;
- }
- };
- ctrl.$formatters.unshift(dateToString);
- ctrl.$parsers.unshift(stringToDate);
- }
- };
-}])
-
-.directive('attDateFilter', ['$document', 'dateFilter', 'datepickerConfig', 'datepickerService', '$isElement', '$documentBind', function($document, dateFilter, datepickerConfig, datepickerService, $isElement, $documentBind) {
-
- var link = function (scope, elem, attr, ctrl) {
- datepickerService.bindScope(attr, scope);
-
- scope.selectedOption = datepickerConfig.dateFilter.defaultText;
- scope.showDropdownList = false;
- scope.showCalendar = false;
- scope.applyButtonType = "disabled";
-
- scope.currentSelection = "";
- var dateFormatString = angular.isDefined(attr.dateFormat) ? scope.$parent.$eval(attr.dateFormat) : datepickerConfig.dateFormat;
- var inputChange = false;
-
- var setDropdownText = function(value) {
- if(inputChange) {
- return;
- }
-
- var fromDateText = dateFormatString.toUpperCase();
- var currentDateText = dateFormatString.toUpperCase();
-
- if(!isNaN(new Date(scope.fromDate))) {
- fromDateText = dateFilter(scope.fromDate, dateFormatString);
- }
- if(!isNaN(new Date(scope.currentDate))) {
- currentDateText = dateFilter(scope.currentDate, dateFormatString);
- }
-
- if(value === 'Custom Single Date') {
- ctrl.$setValidity('invalidDate', true);
- scope.maxLength = 10;
- scope.selectedOption = currentDateText;
- } else if(value === 'Custom Range') {
- ctrl.$setValidity('invalidDate', true);
- ctrl.$setValidity('invalidDateRange', true);
- scope.maxLength = 21;
- scope.selectedOption = fromDateText + '-' + currentDateText;
- }
- };
-
- var clear = scope.clear = function(partial) {
- scope.fromDate = undefined;
- scope.currentDate = undefined;
- scope.applyButtonType = "disabled";
- if(!partial) {
- ctrl.$setValidity('invalidDate', true);
- ctrl.$setValidity('invalidDateRange', true);
- setDropdownText(scope.currentSelection);
- }
- };
-
- var showCalendar = function() {
- scope.showCalendar = true;
- };
-
- var hideCalendar = function() {
- scope.showCalendar = false;
- if(scope.currentSelection !== 'Custom Single Date' && scope.currentSelection !== 'Custom Range') {
- clear(true);
- }
- };
-
- var showDropdown = scope.showDropdown = function (show) {
- if(show === true || show === false) {
- scope.showDropdownList = show;
- } else {
- scope.showDropdownList = !scope.showDropdownList;
- }
-
- if (!scope.showDropdownList) {
- scope.focusInputButton = true;
- hideCalendar();
- } else {
- if (scope.currentSelection === 'Custom Single Date' || scope.currentSelection === 'Custom Range') {
- showCalendar();
- }
- }
- };
-
- scope.resetTime = function(date) {
- var dt;
- if (!isNaN(new Date(date))) {
- dt = new Date(date);
- } else {
- return null;
- }
- return new Date(dt.getFullYear(), dt.getMonth(), dt.getDate());
- };
-
- scope.getDropdownText = function () {
- inputChange = true;
- var dropdownText = scope.selectedOption;
-
- if (scope.currentSelection === 'Custom Single Date') {
- if (!isNaN(new Date(dropdownText)) && datepickerService.validateDateString(dropdownText, dateFormatString)) {
- ctrl.$setValidity('invalidDate', true);
- scope.fromDate = undefined;
- scope.currentDate = new Date(dropdownText);
- } else {
- ctrl.$setValidity('invalidDate', false);
- clear(true);
- }
- } else if (scope.currentSelection === 'Custom Range') {
- if (dropdownText.indexOf('-') !== -1 && (dropdownText.split('-').length === 2 || dropdownText.split('-').length === 6)) {
- ctrl.$setValidity('invalidDateRange', true);
- var resultDropdownText = dropdownText.split('-');
- if (resultDropdownText.length === 2) {
- resultDropdownText[0] = resultDropdownText[0].trim();
- resultDropdownText[1] = resultDropdownText[1].trim();
- } else if (resultDropdownText.length === 6) {
- var firstDateString = resultDropdownText[0].trim() + '-' + resultDropdownText[1].trim() + '-' + resultDropdownText[2].trim();
- var secondDateString = resultDropdownText[3].trim() + '-' + resultDropdownText[4].trim() + '-' + resultDropdownText[5].trim();
- resultDropdownText[0] = firstDateString;
- resultDropdownText[1] = secondDateString;
- }
-
- if (!isNaN(new Date(resultDropdownText[0])) && !isNaN(new Date(resultDropdownText[1])) && datepickerService.validateDateString(resultDropdownText[0], dateFormatString) && datepickerService.validateDateString(resultDropdownText[1], dateFormatString)) {
- ctrl.$setValidity('invalidDate', true);
- var fromDate = new Date(resultDropdownText[0]);
- var currentDate = new Date(resultDropdownText[1]);
- if(fromDate.getTime() < currentDate.getTime()) {
- ctrl.$setValidity('invalidDateRange', true);
- scope.fromDate = fromDate;
- scope.currentDate = currentDate;
- } else {
- ctrl.$setValidity('invalidDateRange', false);
- clear(true);
- }
- } else {
- ctrl.$setValidity('invalidDate', false);
- clear(true);
- }
- } else {
- ctrl.$setValidity('invalidDateRange', false);
- clear(true);
- }
- }
- };
-
- scope.untrackInputChange = function() {
- inputChange = false;
- };
-
- scope.selectAdvancedOption = function (value, notClearFlag) {
- scope.currentSelection = value;
- if(!notClearFlag){
- clear();
- showCalendar();
- }
- scope.$watch('currentDate', function(val) {
- if(!isNaN(new Date(val))) {
- scope.applyButtonType = "primary";
- setDropdownText(value);
- if (!inputChange) {
- scope.focusApplyButton = true;
- }
- }
- });
- scope.$watch('fromDate', function(val) {
- if(!isNaN(new Date(val))) {
- setDropdownText(value);
- }
- });
- if (value === 'Custom Single Date') {
- scope.focusSingleDateCalendar = true;
- } else if (value === 'Custom Range') {
- scope.focusRangeCalendar = true;
- }
- };
-
- scope.resetFocus = function () {
- scope.focusSingleDateCalendar = false;
- scope.focusRangeCalendar = false;
- scope.focusApplyButton = false;
- };
-
- scope.apply = function() {
- scope.dateRange.selection = scope.selectedOption;
- if(!isNaN(new Date(scope.fromDate))) {
- scope.from = scope.fromDate;
- scope.dateRange.from = scope.fromDate;
- } else {
- scope.from = undefined;
- scope.dateRange.from = undefined;
- }
- if(!isNaN(new Date(scope.currentDate))) {
- scope.current = scope.currentDate;
- scope.dateRange.current = scope.currentDate;
- } else {
- scope.current = undefined;
- scope.dateRange.current = undefined;
- }
-
- showDropdown();
- };
-
- scope.$watchCollection(function() {
- return scope.dateRange;
- }, function(value) {
- if(ctrl) {
- var finalDateRange = angular.copy(value);
- ctrl.$setViewValue(finalDateRange);
- }
- });
-
- ctrl.$render = function () {
- if (ctrl.$viewValue) {
- var inputRange = ctrl.$viewValue;
- scope.selectedOption = inputRange.selection;
- scope.fromDate = inputRange.from;
- scope.currentDate = inputRange.current;
- if (scope.fromDate !== undefined && scope.currentDate !== undefined) {
- scope.selectAdvancedOption('Custom Range', true);
- scope.dateRange.from = scope.fromDate;
- scope.dateRange.current = scope.currentDate;
- } else if (scope.currentDate !== undefined) {
- scope.selectAdvancedOption('Custom Single Date', true);
- scope.dateRange.from = undefined;
- scope.dateRange.current = scope.currentDate;
- }
- }
- };
-
- scope.cancel = function() {
- scope.currentSelection = "";
- scope.selectedOption = datepickerConfig.dateFilter.defaultText;
- showDropdown();
- };
-
- var outsideClick = function (e) {
- var isElement = $isElement(angular.element(e.target), elem, $document);
- if(!isElement) {
- scope.cancel();
- scope.$apply();
- }
- };
- $documentBind.click('showDropdownList', outsideClick, scope);
- };
-
- return {
- restrict: 'EA',
- scope: {
- from: '=?from',
- current: "=?current"
- },
- replace: true,
- require: '?ngModel',
- transclude:true,
- templateUrl: 'app/scripts/ng_js_att_tpls/datepicker/dateFilter.html',
- controller:['$scope', '$element', '$attrs',function($scope){
- $scope.dateRange = {
- selection: undefined,
- from: undefined,
- current: undefined
- };
- this.selectOption = function (fromDate,toDate,caption) {
- $scope.selectedOption = caption;
- $scope.currentSelection =caption;
- $scope.dateRange.selection = caption;
- $scope.dateRange.current = $scope.resetTime(toDate);
- $scope.dateRange.from = $scope.resetTime(fromDate);
- $scope.showDropdown();
- };
- $scope.checkCurrentSelection=this.checkCurrentSelection = function(value) {
- if(value === $scope.currentSelection) {
- return true;
- }
- return false;
- };
- }],
- compile: function(elem, attr) {
- var singleDateCalendar = elem.find('span').eq(4);
- var rangeCalendar = elem.find('span').eq(5);
- rangeCalendar.attr('from', 'fromDate');
- singleDateCalendar.attr('current', 'currentDate');
- rangeCalendar.attr('current', 'currentDate');
- datepickerService.setAttributes(attr, singleDateCalendar);
- datepickerService.setAttributes(attr, rangeCalendar);
-
- return link;
- }
- };
-}])
-.directive('attDateFilterList',function(){
- return{
- restrict:'EA',
- scope:{
- fromDate:'=fromDate',
- toDate:'=toDate',
- caption:'=caption',
- disabled:'=disabled'
- },
- require:'^attDateFilter',
- transclude:true,
- replace:true,
- templateUrl:'app/scripts/ng_js_att_tpls/datepicker/dateFilterList.html',
- link:function(scope,elem,attr,ctrl){
- scope.selectOption=function(fromDate,toDate,caption){
- ctrl.selectOption(fromDate,toDate,caption);
- };
- scope.checkCurrentSelection=ctrl.checkCurrentSelection;
- }
- };
-});
-angular.module('att.abs.devNotes', [])
-
- .directive('attDevNotes', function() {
- return {
- restrict: 'EA',
- transclude: true,
- scope: {},
- controller: function($scope){
- var panes = $scope.panes = [];
- $scope.select = function(pane)
- {
- angular.forEach(panes, function(pane)
- {
- pane.selected = false;
- });
- pane.selected = true;
- };
- this.addPane = function(pane) {
- if (panes.length === 0) {
- $scope.select(pane);
- }
- panes.push(pane);
- };
- },
- template:'<div>'+
- '<ul class="tabs">' +
- '<li ng-repeat="pane in panes" ng-class="{active:pane.selected}">'+
- '<a href="javascript:void(0)" ng-click="select(pane)">{{pane.title}}</a>' +
- '</li>' +
- '</ul>' +
- '<div ng-transclude></div>'+
- '</div>',
- replace: true
- };
- })
-
- .directive('pane', function() {
- return {
- require: '^attDevNotes',
- restrict: 'EA',
- transclude: true,
- scope: {
- title: '@'
- },
- link: function(scope, element, attrs, tabsCtrl) {
- tabsCtrl.addPane(scope);
- },
- template:
- '<div class="tab-pane" ng-class="{active: selected}">' +
- '<pre ng-class="{\'language-markup\':title==\'HTML\',\'language-javascript\':title==\'JavaScript\',\'language-json\':title==\'JSON\'}" class=" line-numbers">' +
- '<code ng-transclude></code>' +
- '</pre>' +
- '</div>',
- replace: true
- };
- });
-
-angular.module('att.abs.dividerLines', [])
- .directive('attDividerLines', [function()
- {
- return {
- scope: {
- attDividerLines: '@'
- },
- restrict: 'A',
- replace: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/dividerLines/dividerLines.html',
- link: function(scope, element, attribute)
- {
- scope.lightContainer = attribute.attDividerLines;
- }
- };
- }]);
-
-angular.module('att.abs.dragdrop', [])
- .directive('attFileDrop', ['$parse', function($parse) {
- return {
- restrict: 'A',
- scope: {
- fileModel : '=',
- onDrop : '&',
- attFileDrop : '&'
- },
- controller: ['$scope', '$attrs', function($scope, $attrs){
- if($attrs.attFileDrop!==""){
- $scope.onDrop=$scope.attFileDrop;
- }
- this.onDrop = $scope.onDrop;
- }],
- link: function(scope, element) {
- element.addClass('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('dragdrop-over');
- return false;
- }
- );
- element.bind(
- 'dragenter',
- function(e) {
- // allows us to drop
- if (e.preventDefault) {
- e.preventDefault();
- }
- element.addClass('dragdrop-over');
- return false;
- }
- );
- element.bind(
- 'dragleave',
- function() {
- element.removeClass('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('dragdrop-over');
- if(e.dataTransfer.files && e.dataTransfer.files.length > 0){
- scope.fileModel = e.dataTransfer.files[0];
- scope.$apply();
- if(typeof scope.onDrop === "function"){
- scope.onDrop = $parse(scope.onDrop);
- scope.onDrop();
- }
- }
- return false;
- }
- );
- }
- };
- }])
- .directive('attFileLink', [ function() {
- return {
- restrict: 'EA',
- require: '^?attFileDrop',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/dragdrop/fileUpload.html',
- scope: {
- fileModel : '=?',
- onFileSelect : '&',
- attFileLink : '&'
- },
- controller: ['$scope', '$parse', function($scope, $parse){
- this.setFileModel= function(fileModel){
- if($scope.takeFileModelFromParent){
- $scope.$parent.fileModel = fileModel;
- $scope.$parent.$apply();
- }
- else{
- $scope.fileModel = fileModel;
- $scope.$apply();
- }
- };
- this.callbackFunction= function(){
- if(typeof $scope.onFileSelect === "function"){
- $scope.onFileSelect = $parse($scope.onFileSelect);
- $scope.onFileSelect();
- }
- };
-
- }],
- link: function(scope, element, attr, attFileDropCtrl) {
- scope.takeFileModelFromParent = false;
- if(!(attr.fileModel) && attFileDropCtrl){
- scope.takeFileModelFromParent = true;
- }
- if(attr.attFileLink!==""){
- scope.onFileSelect=scope.attFileLink;
- }
- else if(!(attr.onFileSelect) && attFileDropCtrl){
- scope.onFileSelect = attFileDropCtrl.onDrop;
- }
- }
- };
- }])
- .directive('attFileChange', ['$log','$rootScope',function($log,$rootScope) {
- return {
- restrict: 'A',
- require: '^attFileLink',
- link: function(scope, element, attr, attFileLinkCtrl) {
- element.bind('change',changeFileModel);
- function changeFileModel(e) {
- if (e.target.files && e.target.files.length > 0) {
- attFileLinkCtrl.setFileModel(e.target.files[0]);
- attFileLinkCtrl.callbackFunction();
- }
- else {
- var strFileName = e.target.value;
- try {
- var objFSO = new ActiveXObject("Scripting.FileSystemObject");
- attFileLinkCtrl.setFileModel(objFSO.getFile(strFileName));
- attFileLinkCtrl.callbackFunction();
- }
- catch (e) {
- var errMsg = "Error: Please follow the guidelines of Drag and Drop component on Sandbox demo page.";
- $log.error(errMsg);
- $rootScope.$broadcast('att-file-link-failure', errMsg);
- }
- }
- }
- }
- };
- }]);
-angular.module("att.abs.drawer", ['att.abs.utilities'])
-.directive('attDrawer', ['$document', '$timeout', 'DOMHelper', function ($document, $timeout, DOMHelper) {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- scope: {
- drawerOpen: "=?",
- drawerAutoClose: "&?"
- },
- template: '<div><div class="att-drawer" ng-transclude></div><div ng-class="{\'drawer-backdrop\':drawerOpen}"></div></div>',
- link: function ($scope, element, attrs) {
- var param = {};
- // First Element in Drawer component
- var firstElement = undefined;
- // Element drawer is toggled from
- var drawerLaunchingElement = undefined;
- // Override default parameters
- param.side = attrs.drawerSlide || 'top';
- param.speed = attrs.drawerSpeed || '0.25';
- param.size = attrs.drawerSize || '300px';
- param.zindex = attrs.drawerZindex || 1000;
- param.className = attrs.drawerClass || 'att-drawer';
- var slider = element.eq(0).children()[0];
- var content = angular.element(slider).children()[0];
- slider.className = param.className;
- /* Style setup */
- slider.style.transitionDuration = param.speed + 's';
- slider.style.webkitTransitionDuration = param.speed + 's';
- slider.style.zIndex = param.zindex;
- slider.style.position = 'fixed';
- slider.style.width = 0;
- slider.style.height = 0;
- slider.style.transitionProperty = 'width, height';
- if(param.side==='right'){
- slider.style.height = attrs.drawerCustomHeight || '100%';
- slider.style.top = attrs.drawerCustomTop || '0px';
- slider.style.bottom = attrs.drawerCustomBottom || '0px';
- slider.style.right = attrs.drawerCustomRight || '0px';
- }else if(param.side==='left'){ /*Added this part for ECOM*/
- slider.style.height = attrs.drawerCustomHeight || '100%';
- slider.style.top = attrs.drawerCustomTop || '0px';
- slider.style.bottom = attrs.drawerCustomBottom || '0px';
- slider.style.left = attrs.drawerCustomRight || '0px';
- }
- else if(param.side==='top' || param.side==='bottom'){
- slider.style.width = attrs.drawerCustomWidth || '100%';
- slider.style.left = attrs.drawerCustomLeft || '0px';
- slider.style.top = attrs.drawerCustomTop || '0px';
- slider.style.right = attrs.drawerCustomRight || '0px';
- }
- $timeout(function() {
- firstElement = DOMHelper.firstTabableElement(element[0]);
- }, 10, false);
- /* Closed */
- function drawerClose(slider, param) {
- if (slider && slider.style.width !== 0 && slider.style.height !== 0){
- content.style.display = 'none';
- if(param.side==='right' || param.side==='left'){
- slider.style.width = '0px';
- }
- else if(param.side==='top' || param.side==='bottom'){
- slider.style.height = '0px';
- }
- }
- $scope.drawerOpen = false;
- // Shift focus
- if (angular.isDefined(drawerLaunchingElement) && drawerLaunchingElement != null) {
- drawerLaunchingElement.focus();
- }
- }
- /* Open */
- function drawerOpen(slider, param) {
- // Before opening drawer, find the focused element
- drawerLaunchingElement = document.activeElement;
- if (slider.style.width !== 0 && slider.style.height !== 0){
- if(param.side==='right' || param.side==='left'){
- slider.style.width = param.size;
- }
- else if(param.side==='top' || param.side==='bottom'){
- slider.style.height = param.size;
- }
- $timeout(function() {
- content.style.display = 'block';
- // Shift focus
- if (angular.isDefined(firstElement) && firstElement != null) {
- firstElement.focus();
- }
- },(param.speed * 1000));
- }
- }
- function isFunction(functionToCheck) {
- var getType = {};
- return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
- }
- /*
- * Watchers
- * */
- if(attrs.drawerSize) {
- $scope.$watch(function() {
- return attrs.drawerSize;
- }, function(newVal) {
- param.size = newVal;
- if($scope.drawerOpen) {
- drawerOpen(slider,param);
- }
- });
- }
- $scope.$watch("drawerOpen", function (value){
- if (!!value) {
- // Open
- drawerOpen(slider,param);
- } else {
- // Close
- drawerClose(slider,param);
- }
- });
- // close panel on location change
- if($scope.drawerAutoClose()) {
- $scope.$on("$locationChangeStart", function(){
- drawerClose(slider, param);
- if(isFunction($scope.drawerAutoClose())) {
- $scope.drawerAutoClose();
- }
- });
- $scope.$on("$stateChangeStart", function(){
- drawerClose(slider, param);
- if(isFunction($scope.drawerAutoClose)) {
- $scope.drawerAutoClose();
- }
- });
- }
- }
- };
- }
-]);
-angular.module('att.abs.message', [])
-
-.directive('attMessages', [function() {
- return {
- restrict: 'EA',
- scope: {
- messageType: '=?'
- },
- controller: ['$scope', '$element', '$attrs', function($scope, $element, $attrs) {
- $scope.messageScope = [];
- this.registerScope = function(messageScope) {
- $scope.messageScope.push(messageScope);
- };
- $scope.$parent.$watchCollection($attrs['for'], function(errors) {
- for (var key in errors) {
- if (errors[key]) {
- $scope.error = key;
- break;
- } else {
- $scope.error = null;
- }
- }
- for (var i = 0; i < $scope.messageScope.length; i++) {
- if($scope.messageScope[i].when === $scope.error) {
- $scope.messageScope[i].show();
- $scope.setMessageType($scope.messageScope[i].type);
- } else {
- $scope.messageScope[i].hide();
- }
- }
- if($scope.error === null) {
- $scope.setMessageType(null);
- }
- });
- $scope.setMessageType = this.setMessageType = function(messageType) {
- if($attrs.messageType) {
- $scope.messageType = messageType;
- }
- };
- }]
- };
-}])
-
-.directive('attMessage', [function() {
- return {
- restrict: 'EA',
- scope: {},
- require: '^attMessages',
- link: function(scope, elem, attr, ctrl) {
- ctrl.registerScope(scope);
- elem.attr('role', 'alert'); //Trinity CATO
- scope.when = attr.when || attr.attMessage;
- scope.type = attr.type;
- scope.show = function() {
- elem.css({display: 'block'});
- };
- scope.hide = function() {
- elem.css({display: 'none'});
- };
- scope.hide();
- }
- };
-}]);
-
-angular.module('att.abs.formField', ['att.abs.message', 'att.abs.utilities'])
-.directive('attFormField', [function() {
- return {
- priority: 101,
- restrict: 'A',
- controller:function() {
- },
- link: function(scope, elem, attr) {
- elem.wrap('<div class="form-field"></div>');
- elem.parent().append('<label class="form-field__label">' + attr.placeholder || attr.attFormField + '</label>');
- elem.wrap('<div class="form-field-input-container"></div>');
-
- elem.bind('keyup', function() {
- if (this.value !== '') {
- elem.parent().parent().find('label').addClass('form-field__label--show').removeClass('form-field__label--hide');
- } else {
- elem.parent().parent().find('label').addClass('form-field__label--hide').removeClass('form-field__label--show');
- }
- });
-
- elem.bind('blur', function() {
- if (this.value === '') {
- elem.parent().parent().find('label').removeClass('form-field__label--hide');
- }
- });
- }
- };
-}])
-.directive('attFormFieldValidation', ['$compile', '$log', function($compile, $log) {
- return {
- priority: 102,
- scope: {},
- restrict: 'A',
- require: ['?ngModel', '?attFormField'],
- link: function(scope, elem, attr, ctrl) {
- var ngCtrl = ctrl[0];
- var attFormFieldCtrl = ctrl[1];
- scope.valid = "";
- if (!ngCtrl) {
- $log.error("att-form-field-validation :: ng-model directive is required.");
- return;
- }
- if (!attFormFieldCtrl) {
- $log.error("att-form-field-validation :: att-form-field directive is required.");
- return;
- }
-
- elem.parent().append($compile(angular.element('<i class="icon-info-alert error" ng-show="valid===false">&nbsp;</i>'))(scope));
- elem.parent().append($compile(angular.element('<i class="icon-info-success success" ng-show="valid===true">&nbsp;</i>'))(scope));
-
- scope.$watch('valid', function(value) {
- if (value) {
- elem.parent().parent().addClass('success');
- } else if (value === false) {
- elem.parent().parent().addClass('error');
- } else {
- elem.parent().parent().removeClass('success').removeClass('error');
- }
- });
-
- elem.bind('keyup', function() {
- if (ngCtrl.$valid) {
- scope.valid = true;
- } else if (ngCtrl.$invalid) {
- scope.valid = false;
- } else {
- scope.valid = "";
- }
- scope.$apply();
- });
- }
- };
-}])
-.directive('attFormFieldValidationAlert', ['$timeout', function($timeout) {
- return {
- scope: {
- messageType: '=?'
- },
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/formField/attFormFieldValidationAlert.html',
- link: function(scope, elem, attr, ctrl) {
- scope.showLabel = false;
- scope.hideLabel = false;
- scope.errorMessage = false;
- scope.warningMessage = false;
- var checkMessageType = function() {
- var messageType = scope.messageType;
- if (messageType === 'error') {
- scope.errorMessage = true;
- scope.warningMessage = false;
- } else if (messageType === 'warning') {
- scope.errorMessage = false;
- scope.warningMessage = true;
- } else {
- scope.errorMessage = false;
- scope.warningMessage = false;
- }
- };
- var oldIE = navigator.userAgent.toLowerCase().indexOf('msie 8.0') !== -1;
- elem.find('label').text(elem.find('input').attr('placeholder'));
- elem.find('input').bind('keyup', function() {
- if (this.value !== '') {
- scope.showLabel = true;
- scope.hideLabel = false;
- if (oldIE) {
- elem.find('label').css({top: '-20px'});
- }
- } else {
- scope.showLabel = false;
- scope.hideLabel = true;
- if (oldIE) {
- elem.find('label').css({top: '0px'});
- }
- }
- checkMessageType();
- scope.$apply();
- });
-
- elem.find('input').bind('blur', function() {
- if (this.value === '') {
- scope.showLabel = false;
- scope.hideLabel = false;
- }
- scope.$apply();
- });
- $timeout(function() {
- checkMessageType();
- }, 100);
- }
- };
-}])
-.constant("CoreFormsUiConfig", {
- phoneMask: '(___) ___-____'
- })
-.directive('attPhoneMask', ['$parse', 'CoreFormsUiConfig', function($parse, CoreFormsUiConfig) {
- return {
- require: 'ngModel',
- scope: {
- ngModel: '='
- },
- link: function(scope, iElement, iAttrs, ctrl) {
- var B = navigator.userAgent.toLowerCase(), C = B.indexOf("android") > -1,
- oldIE = B.indexOf('msie 8.0') !== -1;;
- var A = '';
- var validPhoneNumber = false;
- if (C) {
- A = "__________";
- }
- else {
- A = CoreFormsUiConfig.phoneMask;
- }
- iElement.attr("maxlength", A.length);
- var checkValidity = function(unmaskedValue) {
- var valid = false;
- if (unmaskedValue){
- valid = (unmaskedValue.length === 10);}
- ctrl.$setValidity('invalidPhoneNumber', validPhoneNumber);
- ctrl.$setValidity('mask', valid);
- return valid;
- };
-
- var handleKeyup = function() {
- var E,D = ctrl.$modelValue;
- if (!D.length) {
- return;
- }
- var L, K, G, J, I;
- J = [];
- G = A.split("");
- I = G.length;
- L = D.substring(0, A.length);
- K = D.replace(/[^0-9]/g, "").split("");
- for (E = 0; E < I; E++) {
- J.push(G[E] === "_" ? K.shift() : G[E]);
- if (K.length === 0) {
- break;
- }
- }
- D = J.join("");
- if (D === '('){
- D = '';}
- ctrl.$setViewValue(D);
- ctrl.$render();
- return D;
- };
-
-
- // 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 !== 8 && e.which !== 9 && e.which !== 46 && e.which !== 13 && e.which !== 37 && e.which !== 39 &&
- // Allow: Ctrl+V/v
- (e.ctrlKey !== true && (e.which !== '118' || e.which !== '86'))&&
- // Allow: Ctrl+C/c
- (e.ctrlKey !== true && (e.which !== '99' || e.which !== '67'))&&
- // Allow: Ctrl+X/x
- (e.ctrlKey !== true && (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;
- }
- }
- 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(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);
- return clean;
- };
-
- //to handle reading the model and formatting it
- var formatter = function(fromModelView) {
- var input = '';
- checkValidity(fromModelView);
- if (fromModelView){
- input = handleKeyup();}
- return input;
- };
- ctrl.$parsers.push(parser);
- ctrl.$formatters.push(formatter);
- iElement.bind('keyup', handleKeyup);
- iElement.bind('keydown', handlePress);
- iElement.bind('input', function(e){
- handleKeyup(e);
- handlePress(e);
- });
- }
- };
-}])
-.constant('validationTypeInt', {
- validationNum: {'number':'1','text':'2','email':'3'}
- })
-.directive('attFormFieldPrv', [ 'keyMapAc', 'validationTypeInt', function( keyMapAc, validationTypeInt ) {
- return {
- priority: 101,
- restrict: 'AE',
- controller:['$scope', function($scope) {
- this.showHideErrorMessage = function ( booleanValue ){
- if( $scope.$$prevSibling != null && angular.isDefined( $scope.$$prevSibling )
- && angular.isDefined( $scope.$$prevSibling.hideErrorMsg ) ){
- $scope.$$prevSibling.hideErrorMsg = booleanValue;
- $scope.$apply();
- }
- };
- this.findAllowedCharactor = function( keyCode ){
- var keyMapSc = keyMapAc.keys;
- if( angular.isDefined( $scope.allowedSpecialCharacters )
- && angular.isDefined( $scope.allowedSpecialCharacters.length )
- && $scope.allowedSpecialCharacters.length > 0 ){
- var allowedCharList = $scope.allowedSpecialCharacters;
- var charFound = false;
- for( var i=0 ; i < allowedCharList.length ; i++){
- if( allowedCharList[i] === keyMapSc[keyCode] ){
- charFound = true;
- break;
- }
- }
- return charFound;
- }else{
- return false;
- }
- };
- this.validateText = function( validationType, allowedChars, validationInput, outputSpecialChars ){
- if( angular.isDefined( allowedChars ) && allowedChars.length === 0 ){
- var expAlphanumeric = /^[a-zA-Z0-9]*$/i;
- return expAlphanumeric.test( validationInput );
- }else{
- var expAlphanumericSpecialChar = '^[a-zA-Z0-9' + outputSpecialChars + ']*$';
- var regularExp = new RegExp( expAlphanumericSpecialChar, 'i' );
- return regularExp.test( validationInput );
- }
- };
- this.validateNumber = function( validationType, allowedChars, validationInput, outputSpecialChars ){
- if( angular.isDefined( allowedChars ) && allowedChars.length === 0 ){
- var expNumber = /^[0-9\.]+$/;
- return expNumber.test( validationInput );
- }else{
- var expNumberSpecial = '^[0-9\.' + outputSpecialChars + ']*$';
- var regularExp = new RegExp( expNumberSpecial, 'i' );
- return regularExp.test( validationInput );
- }
- };
- this.validateEmail = function( validationType, allowedChars, validationInput, outputSpecialChars ){
- if( angular.isDefined( allowedChars ) && allowedChars.length === 0 ){
- var expEmail = /(([a-zA-Z0-9\-?\.?]+)@(([a-zA-Z0-9\-_]+\.)+)([a-z]{2,3}))+$/;
- return expEmail.test( validationInput );
- }else{
- var expEmailSpecial = '(([a-z' + outputSpecialChars + 'A-Z0-9\-?\.?]+)@(([a-z'
- + outputSpecialChars + 'A-Z0-9\-_]+\.)+)([' + outputSpecialChars + 'a-z]{2,3}))+$';
- var regularExp = new RegExp( expEmailSpecial, 'i' );
- return regularExp.test( validationInput );
- }
- };
- this.validateInput = function( validationType, allowedChars, validationInput ){
- var outputSpecialChars = '';
- var result = false;
- if( angular.isDefined( allowedChars ) && angular.isDefined( allowedChars.length )
- && allowedChars.length > 0 ){
- for( var i = 0; i < allowedChars.length; i++){
- outputSpecialChars += '\\'+allowedChars[i];
- }
- }
- switch ( validationTypeInt.validationNum[ validationType ] ) {
- case validationTypeInt.validationNum["text"]:
- result = this.validateText( validationType, allowedChars, validationInput, outputSpecialChars );
- break;
- case validationTypeInt.validationNum["number"]:
- result = this.validateNumber( validationType, allowedChars, validationInput, outputSpecialChars );
- break;
- case validationTypeInt.validationNum["email"]:
- result = this.validateEmail( validationType, allowedChars, validationInput, outputSpecialChars );
- break;
- default:
- break;
- }
- return result;
- };
- }],
- link: function(scope, elem, attr ) {
- elem.parent().prepend('<label class="form-field__label">' + attr.placeholder + '</label>');
- elem.wrap('<div class="form-field-input-container"></div>');
- elem.parent().parent().find('label').addClass('form-field__label--show');
- }
- };
-}])
-.directive('attFormFieldValidationPrv', [ 'keyMapAc','validationTypeInt' , function( keyMapAc, validationTypeInt ) {
- return {
- priority: 202,
- scope: {
- validationType: '=',
- allowedChars: '='
- },
- restrict: 'A',
- require: ['?ngModel', '^attFormFieldPrv'],
- link: function(scope, elem, attr, ctrl) {
- var attFormFieldCtrl = ctrl[1];
- elem.bind('keyup', function() {
- /* email validation has tobe done on keyup */
- if( attFormFieldCtrl.validateInput( scope.validationType, scope.allowedChars, elem[0].value ) ){
- attFormFieldCtrl.showHideErrorMessage(false);
- }
- else{
- attFormFieldCtrl.showHideErrorMessage(true);
- }
- });
- var keyMapSc = keyMapAc.keyRange;
- var allowedKeys = keyMapAc.allowedKeys;
- var validateTextCode = function( charFound,event ){
- var resultOne = (event.which < keyMapSc['startNum'] || event.which > keyMapSc['endNum'] );
- var resultTwo = (event.which < keyMapSc['startCapitalLetters'] || event.which > keyMapSc['endCapitalLetters'] );
- var resultThree = (event.which < keyMapSc['startSmallLetters'] || event.which > keyMapSc['endSmallLetters'] );
- var result = ( resultOne && resultTwo && resultThree );
- return ( result && ( !charFound ) );
- };
- var validateNumberCode = function( charFound,event ){
- return ( ( event.which < keyMapSc['startNum'] || event.which > keyMapSc['endNum'] ) && ( !charFound ) );
- };
- var validateEmailCode = function( charFound,event ){
- var condOne = String.fromCharCode( event.which ) !== '-' && String.fromCharCode( event.which ) !== '_';
- var condTwo = String.fromCharCode( event.which ) !== '@' && String.fromCharCode( event.which ) !== '.';
- var ifAllowedChars = condOne && condTwo;
- var ifCharRange = validateTextCode( charFound,event );
- return ( ( !charFound ) && ifAllowedChars && ifCharRange );
- };
- var validateSwitch = function( validationTypeSwitch, charFound, event ){
- switch ( validationTypeSwitch ) {
- case validationTypeInt.validationNum["text"]:
- /* 97-122 65-90 48-57 if keyCode is outside range of alphanumeric chars and not found in list then prevent */
- if( validateTextCode( charFound, event ) ){
- return true;
- }
- break;
- case validationTypeInt.validationNum["number"]:
- /* if key code is outside number range and notfound then prevent */
- if( validateNumberCode( charFound, event ) ){
- return true;
- }
- break;
- case validationTypeInt.validationNum["email"]:
- /* if keyCode is outside charactor/number range and not _-@. then prevent */
- if( validateEmailCode( charFound, event ) ){
- return true;
- }
- break;
- default:
- break;
- }
- return false;
- };
- /* key stroke prevention has to be happen on numeric and alphanumeric fields */
- elem.bind('keypress', function( event ){
- if(!(event.which)){
- if(event.keyCode){
- event.which = event.keyCode;
- }
- else if(event.charCode){
- event.which = event.charCode;
- }
- }
- var charFound = attFormFieldCtrl.findAllowedCharactor( event.which );
- var insideCondOne = ( angular.isDefined( scope.validationType ) && scope.validationType !== '');
- var insideCondTwo = ( event.which !== allowedKeys['TAB']
- && event.which !== allowedKeys['BACKSPACE'] && event.which!== allowedKeys['DELETE'] );
- var goInside = insideCondOne && insideCondTwo;
- if( goInside && validateSwitch( validationTypeInt.validationNum[ scope.validationType ], charFound, event ) ){
- event.preventDefault();
- }
- });
- }
- };
-}])
-.directive('attFormFieldValidationAlertPrv', [ function() {
- return {
- restrict: 'A',
- scope : { errorMessage : '=' },
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/formField/attFormFieldValidationAlertPrv.html',
- link: function( scope ) {
- scope.errorMessage = scope.errorMessage;
- if( angular.isDefined( scope.$parent.hideErrorMsg ) ){
- scope.hideErrorMsg = scope.$parent.hideErrorMsg;
- }
- else{
- scope.hideErrorMsg = true;
- }
- }
- };
-}])
-//Credit card validation directives starts here
-.factory('Cards', [function() {
- var defaultFormat = /(\d{1,4})/g;
- var defaultInputFormat = /(?:^|\s)(\d{4})$/;
- var cards = [
- {
- type: 'discover',
- pattern: /^(6011|65|64[4-9]|622)/,
- format: defaultFormat,
- inputFormat: defaultInputFormat,
- length: [16],
- cvcLength: [3],
- cvcSecurityImg: 'visaI',
- zipLength: [5],
- luhn: true
- },
- {
- type: 'mc',
- pattern: /^5[1-5]/,
- format: defaultFormat,
- inputFormat: defaultInputFormat,
- length: [16],
- cvcLength: [3],
- cvcSecurityImg: 'visaI',
- zipLength: [5],
- luhn: true
- },
- {
- type: 'amex',
- pattern: /^3[47]/,
- format: /(\d{1,4})(\d{1,6})?(\d{1,5})?/,
- inputFormat: /^(\d{4}|\d{4}\s\d{6})$/,
- length: [15],
- cvcLength: [4],
- cvcSecurityImg: 'amexI',
- zipLength: [5],
- luhn: true
- },
- {
- type: 'visa',
- pattern: /^4/,
- format: defaultFormat,
- inputFormat: defaultInputFormat,
- length: [16],
- cvcLength: [3],
- cvcSecurityImg: 'visaI',
- zipLength: [5],
- luhn: true
- }
- ];
-
- var _fromNumber = function(num) {
- var card, i, len;
-
- num = (num + '').replace(/\D/g, '');
-
- for (i = 0, len = cards.length; i < len; i++) {
-
- card = cards[i];
-
- if (card.pattern.test(num)) {
- return card;
- }
-
- }
- };
-
- var _fromType = function(type) {
- var card, i, len;
-
- for (i = 0, len = cards.length; i < len; i++) {
-
- card = cards[i];
-
- if (card.type === type) {
- return card;
- }
-
- }
- };
-
- return {
- fromNumber: function(val) {
- return _fromNumber(val);
- },
- fromType: function(val) {
- return _fromType(val);
- },
- defaultFormat: function() {
- return defaultFormat;
- },
- defaultInputFormat: function() {
- return defaultInputFormat;
- }
- };
-
- }])
-.factory('_Validate', ['Cards', '$parse', function(Cards, $parse) {
- var __indexOf = [].indexOf || function(item)
- {
- for (var i = 0, l = this.length; i < l; i++)
- {
- if (i in this && this[i] === item)
- {
- return i;
- }
- }
- return -1;
- };
-
- var _luhnCheck = function(num) {
- var digit, digits, odd, sum, i, len;
-
- odd = true;
- sum = 0;
- digits = (num + '').split('').reverse();
-
- for (i = 0, len = digits.length; i < len; i++) {
-
- digit = digits[i];
- digit = parseInt(digit, 10);
-
- if ((odd = !odd)) {
- digit *= 2;
- }
-
- if (digit > 9) {
- digit -= 9;
- }
-
- sum += digit;
-
- }
-
- return sum % 10 === 0;
- };
-
- var _validators = {};
-
- _validators['cvc'] = function(cvc, ctrl, scope, attr) {
- var ref, ref1;
-
- // valid if empty - let ng-required handle empty
- if ((angular.isUndefined(cvc)) || (cvc === null) || (cvc.length === 0))
- {
- return true;
- }
-
- if (!/^\d+$/.test(cvc)) {
- return false;
- }
-
- var type;
- if (attr.paymentsTypeModel) {
- var typeModel = $parse(attr.paymentsTypeModel);
- type = typeModel(scope);
- }
-
- if (type)
- {
- ref1 = Cards.fromType(type);
- return (ref = cvc.length, __indexOf.call((ref1 !== null) ? ref1.cvcLength : void 0, ref)) >= 0;
- }
- else
- {
- return cvc.length >= 3 && cvc.length <= 4;
- }
- };
- _validators['zip'] = function(zip, ctrl, scope, attr) {
- var ref, ref1;
-
- // valid if empty - let ng-required handle empty
- if ((angular.isUndefined(zip)) || (zip === null) || (zip.length === 0))
- {
- return true;
- }
-
- if (!/^\d+$/.test(zip)) {
- return false;
- }
-
- var type;
- if (attr.paymentsTypeModel) {
- var typeModel = $parse(attr.paymentsTypeModel);
- type = typeModel(scope);
- }
- if (type)
- {
- ref1 = Cards.fromType(type);
- return (ref = zip.length, __indexOf.call(ref1 !== null ? ref1.zipLength : void 0, ref)) >= 0;
- }
- else
- {
- return zip.length < 6;
- }
- };
- _validators['card'] = function(num, ctrl, scope, attr) {
- var card, ref, typeModel;
-
- if (attr.paymentsTypeModel) {
- typeModel = $parse(attr.paymentsTypeModel);
- }
-
- var clearCard = function() {
- if (typeModel) {
- typeModel.assign(scope, null);
- }
- ctrl.$card = null;
- };
-
- // valid if empty - let ng-required handle empty
- if ((angular.isUndefined(num)) || (num === null) || (num.length === 0)) {
- clearCard();
- return true;
- }
-
- num = (num + '').replace(/\s+|-/g, '');
-
- if (!/^\d+$/.test(num)) {
- clearCard();
- return false;
- }
-
- card = Cards.fromNumber(num);
- if (!card) {
- clearCard();
- return false;
- }
- ctrl.$card = angular.copy(card);
-
- if (typeModel) {
- typeModel.assign(scope, card.type);
- }
-
- ret = (ref = num.length, __indexOf.call(card.length, ref) >= 0) && (card.luhn === false || _luhnCheck(num));
- return ret;
- };
- return function(type, val, ctrl, scope, attr) {
- if (!_validators[type]) {
-
- types = Object.keys(_validators);
-
- errstr = 'Unknown type for validation: "' + type + '". ';
- errstr += 'Should be one of: "' + types.join('", "') + '"';
-
- throw errstr;
- }
- return _validators[type](val, ctrl, scope, attr);
- };
- }])
-.factory('_ValidateWatch', ['_Validate', function(_Validate) {
-
- var _validatorWatches = {};
-
- _validatorWatches['cvc'] = function(type, ctrl, scope, attr) {
- if (attr.paymentsTypeModel) {
- scope.$watch(attr.paymentsTypeModel, function(newVal, oldVal) {
- if (newVal !== oldVal) {
- var valid = _Validate(type, ctrl.$modelValue, ctrl, scope, attr);
- ctrl.$setValidity(type, valid);
- }
- });
- }
- };
- _validatorWatches['zip'] = function(type, ctrl, scope, attr) {
- if (attr.paymentsTypeModel) {
- scope.$watch(attr.paymentsTypeModel, function(newVal, oldVal) {
- if (newVal !== oldVal) {
- var valid = _Validate(type, ctrl.$modelValue, ctrl, scope, attr);
- ctrl.$setValidity(type, valid);
- }
- });
- }
- };
- return function(type, ctrl, scope, attr) {
- if (_validatorWatches[type]) {
- return _validatorWatches[type](type, ctrl, scope, attr);
- }
- };
- }])
-.directive('validateCard', ['$window', '_Validate', '_ValidateWatch', function($window, _Validate, _ValidateWatch) {
- return {
- restrict: 'A',
- require: 'ngModel',
- link: function(scope, elem, attr, ctrl) {
-
- var type = attr.validateCard;
- _ValidateWatch(type, ctrl, scope, attr);
- var validateFn = function(val) {
- var valid = _Validate(type, val, ctrl, scope, attr);
- ctrl.$setValidity(type, valid);
- if (type === 'card')
- {
- if (ctrl.$card === null)
- {
- if ((val == null) || (val === "") || (val === ''))
- {
- scope.invalidCardError = '';
- scope.invalidCard = "";
- }
- else if (val.length >= 1)
- {
- scope.invalidCardError = 'error';
- scope.invalidCard = "The number entered is not a recognized credit card number.";
- }
- }
- else
- {
- if (!valid)
- {
- if (ctrl.$card.length.indexOf(val.length) >= 0)
- {
- scope.invalidCardError = 'error';
- scope.invalidCard = "The number entered is not a recognized credit card number.";
- }
- else
- {
- scope.invalidCardError = '';
- scope.invalidCard = "";
- }
- }
- else
- {
- scope.invalidCardError = '';
- scope.invalidCard = "";
- }
- }
- elem.bind("blur", function()
- {
- if ((!valid) || (ctrl.$card === null))
- {
- scope.invalidCardError = 'error';
- scope.invalidCard = "The number entered is not a recognized credit card number.";
- }
- else
- {
- scope.invalidCardError = '';
- scope.invalidCard = "";
- }
- });
- }
- return valid ? val : undefined;
- };
- ctrl.$formatters.push(validateFn);
- ctrl.$parsers.push(validateFn);
- }
- };
- }])
-.directive('creditCardImage', function() {
- return{
- templateUrl: 'app/scripts/ng_js_att_tpls/formField/creditCardImage.html',
- replace: false,
- transclude: false,
- link: function(scope, element, attr)
- {
- scope.$watch(attr.creditCardImage, function(newVal, oldVal)
- {
- if (newVal !== oldVal)
- {
- scope.cvc = '';
- if (!angular.isUndefined(newVal) && newVal !== null)
- {
- scope.newValCCI = 'show-' + newVal;
- }
- if (newVal === null)
- {
- scope.newValCCI = '';
- }
- }
- });
- }
- };
-})
-.directive('securityCodeImage', ['$document', function($document) {
- return{
- templateUrl: 'app/scripts/ng_js_att_tpls/formField/cvcSecurityImg.html',
- replace: false,
- transclude: false,
- link: function(scope, element, attr)
- {
- scope.$watch(attr.securityCodeImage, function(newVal, oldVal)
- {
- if (newVal !== oldVal)
- {
- if (!angular.isUndefined(newVal) && newVal !== null)
- {
- if (newVal === 'amexI')
- {
- scope.newValI = 'ccv2-security-amex';
- scope.newValIAlt = "The 4 digit CVC security code is on the front of the card.";
- scope.cvcPlaceholder = "4 digits";
- scope.cvcMaxlength = 4;
- }
- else if (newVal === 'visaI')
- {
- scope.newValI = 'ccv2-security';
- scope.newValIAlt = "The CVC security code is on the back of your card right after the credit card number.";
- scope.cvcPlaceholder = "3 digits";
- scope.cvcMaxlength = 3;
- }
- }
- if (newVal === null)
- {
- scope.newValI = 'ccv2-security';
- scope.cvcPlaceholder = "3 digits";
- scope.cvcMaxlength = 3;
- scope.newValIAlt = "The CVC security code is on the back of your card right after the credit card number.";
- }
-
- }
- });
- element.bind("click", function(ev) {
- ev.preventDefault();
- if (element.find("button").hasClass("active")) {
- element.find("button").removeClass("active");
- }
- else {
- element.find("button").addClass("active");
- }
- });
-
- var window = angular.element($document);
- window.bind("click", function(ev) {
- var targetClassname = ev.target.className;
- if ((targetClassname !== "btn btn-alt btn-tooltip active")) {
- if (element.find("button").hasClass("active")) {
- element.find("button").removeClass("active");
- }
- }
-
- });
- }
- };
- }]);
-
-angular.module('att.abs.hourpicker', ['att.abs.utilities'])
- .constant('hourpickerConfig', {
- days: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
- customOption: 'Custom'
- })
-
-.controller('hourPickerController', ['$scope', function ($scope) {
-
- $scope.options = [];
- this.setOptions = function (value, fromtime, totime, preselect, uncheckedFromTime, uncheckedToTime) {
- $scope.options.push(value);
-
- if (preselect !== undefined) {
- $scope.preselect = preselect;
- }
-
- var daycount;
-
- if (fromtime !== undefined) {
- $scope.fromtime = fromtime;
- for (daycount in $scope.days) {
- if ($scope.days.hasOwnProperty(daycount)) {
- $scope.FrtimeList[$scope.days[daycount]] = {};
- if (uncheckedFromTime !== undefined) {
- $scope.FrtimeList[$scope.days[daycount]].value = uncheckedFromTime;
- $scope.selectedFromOption[$scope.days[daycount]] = uncheckedFromTime;
- } else {
- $scope.FrtimeList[$scope.days[daycount]].value = fromtime[0].value;
- $scope.selectedFromOption[$scope.days[daycount]] = fromtime[0].value;
- }
- }
- }
- }
- if (totime !== undefined) {
- $scope.totime = totime;
- for (daycount in $scope.days) {
- if ($scope.days.hasOwnProperty(daycount)) {
- $scope.TotimeList[$scope.days[daycount]] = {};
- if (uncheckedToTime !== undefined) {
- $scope.TotimeList[$scope.days[daycount]].value = uncheckedToTime;
- $scope.selectedToOption[$scope.days[daycount]] = uncheckedToTime;
- } else {
- $scope.TotimeList[$scope.days[daycount]].value = totime[0].value;
- $scope.selectedToOption[$scope.days[daycount]] = totime[0].value;
- }
- $scope.showToTimeErrorDay[$scope.days[daycount]] = false;
- }
- }
- }
-
- if (uncheckedFromTime !== undefined) {
- $scope.uncheckedFromTime = uncheckedFromTime;
- }
- if (uncheckedToTime !== undefined) {
- $scope.uncheckedToTime = uncheckedToTime;
- }
- };
-
- this.getSelectedOption = function () {
- return $scope.selectedOption;
- };
-
- this.setToTimeErrorDay = function (day, flag) {
- $scope.showToTimeErrorDay[day] = flag;
- };
-}])
-
-.directive('attHourpickerOption', [function () {
- return {
- restrict: 'EA',
- require: '^attHourpicker',
- scope: {
- option: "=option",
- fromtime: "=fromtime",
- totime: "=totime",
- preselect: "=preselect",
- uncheckedFromTime: "=",
- uncheckedToTime: "="
- },
- link: function (scope, element, attr, ctrl) {
- ctrl.setOptions(scope.option,
- scope.fromtime,
- scope.totime,
- scope.preselect,
- scope.uncheckedFromTime,
- scope.uncheckedToTime);
- }
- };
-}])
-
-.directive('attHourpicker', ["hourpickerConfig", "$document", "$log", "$documentBind", "$timeout", function (hourpickerConfig, $document, $log, $documentBind, $timeout) {
- return {
- require: 'ngModel',
- restrict: 'EA',
- controller: 'hourPickerController',
- transclude: true,
- scope: {
- model: "=ngModel",
- resetFlag: "=?"
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/hourpicker/hourpicker.html',
- link: function (scope, element, attr, ctrl) {
- var flag = false;
- scope.isFromDropDownOpen = false;
- scope.isToDropDownOpen = false;
- var dropDownOpenValue = "";
- var custTime = {};
- scope.days = hourpickerConfig.days;
- scope.daysList = {};
- scope.FrtimeList = {};
- scope.FrtimeListDay = {};
- scope.TotimeListDay = {};
- scope.selectedFromOption = {};
- scope.selectedToOption = {};
- scope.TotimeList = {};
- scope.selectedIndex = 0;
- scope.selectedOption = "Select from list";
- scope.customTime = [];
-
- scope.resetFlag = false;
- scope.showToTimeErrorDay = {};
- scope.validatedCustomPreselect = [];
-
- scope.$watch('resetFlag', function (newVal, oldVal) {
- if (newVal !== oldVal) {
- if (newVal && scope.selectedOption === hourpickerConfig.customOption) {
- //disable and reset all days checkbox
- for (day in scope.daysList) {
- if (scope.daysList.hasOwnProperty(day)) {
- scope.daysList[day] = false;
- scope.addSelectedValue(day);
- }
- }
- scope.preselectUpdateFxn(scope.preselect);
- }
- scope.resetFlag = false;
- }
- });
-
- scope.$watch('selCategory', function (value) {
- if (value) {
- ctrl.$setViewValue(value);
- }
- }, true);
-
- scope.updateData = function (value) {
- if (value.constructor === Array) {
- scope.showDaysSelector = true;
- scope.selectedOption = hourpickerConfig.customOption;
- for (var arry in value) {
- if (value.hasOwnProperty(arry)) {
- var day = value[arry].day;
-
- if (typeof value[arry].preEnabled === 'boolean' && value[arry].preEnabled) {
- scope.daysList[day] = true;
- } else {
- scope.daysList[day] = false;
- }
-
- for (var fromcount in scope.fromtime) {
- if (scope.fromtime[fromcount].value === value[arry].FromTime && !scope.uncheckedFromTime) {
- scope.FrtimeList[day].value = scope.fromtime[fromcount].value;
- scope.selectedFromOption[day] = scope.FrtimeList[day].value;
- }
- }
- for (var tocount in scope.totime) {
- if (scope.totime[tocount].value === value[arry].ToTime && !scope.uncheckedToTime) {
- scope.TotimeList[day].value = scope.totime[tocount].value;
- scope.selectedToOption[day] = scope.TotimeList[day].value;
- }
- }
-
- scope.addSelectedValue(day, value[arry].FromTime, value[arry].ToTime);
-
- //for IE8 Fix
- if (parseInt(arry) + 1 === value.length) {
- break;
- }
- }
- }
- } else {
- scope.selectOption(value.day);
- }
- };
-
- scope.$watch('preselect', function (value) {
- scope.preselectUpdateFxn(value);
- });
-
- scope.preselectUpdateFxn = function (value) {
- if (value !== undefined) {
- if (scope.options) {
- value = scope.validatePreselectData(value);
- }
- if (value === "") {
- return;
- }
- scope.updateData(value);
- }
- };
-
- scope.validatePreselectData = function (value) {
- if (value.constructor === Array) {
- for (var arry in value) {
- if (value.hasOwnProperty(arry)) {
- var day = value[arry].day;
- var isDayFound = false;
- var isFrmFound = false;
- var isToFound = false;
- for (var daycount in scope.days) {
- if (scope.days[daycount] === day) {
- isDayFound = true;
- break;
- }
- }
- if (!isDayFound) {
- value.splice(arry, 1);
- continue;
- }
- for (var fromcount in scope.fromtime) {
- if (scope.fromtime[fromcount].value === value[arry].FromTime) {
- isFrmFound = true;
- break;
- }
- }
- if (!isFrmFound) {
- value[arry].FromTime = scope.fromtime[0].value;
- }
- for (var tocount in scope.totime) {
- if (scope.totime[tocount].value === value[arry].ToTime) {
- isToFound = true;
- break;
- }
- }
- if (!isToFound) {
- value[arry].ToTime = scope.totime[0].value;
- }
-
- if (typeof value[arry].preEnabled === 'boolean' && value[arry].preEnabled) {
- value[arry].preEnabled = true;
- } else {
- value[arry].preEnabled = false;
- }
-
- scope.validatedCustomPreselect[day] = {};
- scope.validatedCustomPreselect[day].FromTime = value[arry].FromTime;
- scope.validatedCustomPreselect[day].ToTime = value[arry].ToTime;
-
- //for IE8 Fix
- if (parseInt(arry) + 1 === value.length) {
- break;
- }
- }
- }
- } else {
- var isOptionFound = false;
- for (var optcount in scope.options) {
- if (scope.options[optcount] === value.day) {
- isOptionFound = true;
- break;
- }
- }
- if (!isOptionFound) {
- value = "";
- }
- }
- return value;
- };
-
- scope.selectPrevNextValue = function ($event, arrayValues, currValue) {
-
- var value;
- var index = 0;
- if ($event.keyCode === 38) {
- value = -1;
- } else if ($event.keyCode === 40) {
- value = 1;
- } else {
- return currValue;
- }
-
- if (arrayValues.indexOf(currValue) !== -1) {
- index = arrayValues.indexOf(currValue) + value;
- } else {
- for (var count in arrayValues) {
- if (arrayValues[count].value === currValue) {
- index = parseInt(count) + value;
- break;
- }
- }
- }
-
- if (index === arrayValues.length) {
- index = index - 1;
- } else if (index === -1) {
- index = index + 1;
- }
-
- $event.preventDefault();
- if (arrayValues[index].value) {
- return arrayValues[index].value;
- } else {
- return arrayValues[index];
- }
- };
-
- scope.showDropdown = function () {
- scope.showlist = !scope.showlist;
- flag = !flag;
- };
-
- scope.showfromDayDropdown = function (value) {
- //close dropdown if any other From drop down is opened
- for (count in scope.FrtimeListDay) {
- if (count !== value && scope.FrtimeListDay[count]) {
- scope.FrtimeListDay[count] = false;
- }
- }
- for (count in scope.TotimeListDay) {
- if (scope.TotimeListDay[count]) {
- scope.TotimeListDay[count] = false;
- }
- }
- scope.FrtimeListDay[value] = !scope.FrtimeListDay[value];
- flag = !flag;
- scope.showlist = false;
-
- //save model value so we can close current dropdown on click of other part of the document
- if (scope.FrtimeListDay[value]) {
- scope.isFromDropDownOpen = true;
- dropDownOpenValue = value;
- } else {
- scope.isFromDropDownOpen = false;
- }
-
- $timeout(function () {
- if (scope.FrtimeListDay[value]) {
- var daysContainerDIV = angular.element(element)[0].querySelector(".customdays-width");
- var containerUL = angular.element(daysContainerDIV.querySelector('.select2-container-active')).parent()[0].querySelector("ul");
- var selectedElemTopPos = angular.element(containerUL.querySelector('.selectedItemInDropDown'))[0].offsetTop;
- angular.element(containerUL)[0].scrollTop = selectedElemTopPos;
- }
- });
- };
-
- scope.showtoDayDropdown = function (value) {
- //close dropdown if any other To drop down is opened
- for (count in scope.TotimeListDay) {
- if (count !== value && scope.TotimeListDay[count]) {
- scope.TotimeListDay[count] = false;
- }
- }
- for (count in scope.FrtimeListDay) {
- if (scope.FrtimeListDay[count]) {
- scope.FrtimeListDay[count] = false;
- }
- }
- scope.TotimeListDay[value] = !scope.TotimeListDay[value];
- flag = !flag;
- scope.showlist = false;
-
- //save model value so we can close current dropdown on click of other part of the document
- if (scope.TotimeListDay[value]) {
- scope.isToDropDownOpen = true;
- dropDownOpenValue = value;
-
- } else {
- scope.isToDropDownOpen = false;
- }
-
- $timeout(function () {
- if (scope.TotimeListDay[value]) {
- var daysContainerDIV = angular.element(element)[0].querySelector(".customdays-width");
- var containerUL = angular.element(daysContainerDIV.querySelector('.select2-container-active')).parent()[0].querySelector("ul");
- var selectedElemTopPos = angular.element(containerUL.querySelector('.selectedItemInDropDown'))[0].offsetTop;
- angular.element(containerUL)[0].scrollTop = selectedElemTopPos;
- }
- });
- };
-
- scope.selectFromDayOption = function (day, value) {
- scope.selectedFromOption[day] = value;
- scope.FrtimeList[day].value = value;
- scope.FrtimeListDay[day] = false;
- scope.isFromDropDownOpen = false;
- };
-
- scope.selectToDayOption = function (day, value) {
- scope.selectedToOption[day] = value;
- scope.TotimeList[day].value = value;
- scope.TotimeListDay[day] = false;
- scope.isToDropDownOpen = false;
- };
-
- scope.addSelectedValue = function (value, fromtime, totime) {
- var count, len;
- if (scope.daysList[value] !== undefined && !scope.daysList[value]) {
- for (count = 0, len = scope.customTime.length; count < len; count++) {
- if (scope.customTime[count].day === value) {
- if (scope.uncheckedFromTime) {
- scope.selectedFromOption[scope.customTime[count].day] = scope.uncheckedFromTime;
- } else {
- scope.selectedFromOption[scope.customTime[count].day] = scope.FrtimeList[scope.customTime[count].day].value;
- }
-
- if (scope.uncheckedToTime) {
- scope.selectedToOption[scope.customTime[count].day] = scope.uncheckedToTime;
- } else {
- scope.selectedToOption[scope.customTime[count].day] = scope.TotimeList[scope.customTime[count].day].value;
- }
-
- scope.customTime.splice(count, 1);
- break;
- }
- }
- } else {
- if (scope.selectedFromOption[value] === scope.uncheckedFromTime) {
-
- if (angular.isDefined(scope.validatedCustomPreselect[value])) {
- scope.selectedFromOption[value] = scope.validatedCustomPreselect[value].FromTime;
- fromtime = scope.validatedCustomPreselect[value].FromTime;
- scope.FrtimeList[value].value = scope.validatedCustomPreselect[value].FromTime;
- } else {
- scope.selectedFromOption[value] = scope.fromtime[0].value;
- fromtime = scope.fromtime[0].value;
- scope.FrtimeList[value].value = scope.fromtime[0].value;
- }
-
- }
-
- if (scope.selectedToOption[value] === scope.uncheckedToTime) {
-
- if (angular.isDefined(scope.validatedCustomPreselect[value])) {
- scope.selectedToOption[value] = scope.validatedCustomPreselect[value].ToTime;
- totime = scope.validatedCustomPreselect[value].ToTime;
- scope.TotimeList[value].value = scope.validatedCustomPreselect[value].ToTime;
- } else {
- scope.selectedToOption[value] = scope.totime[0].value;
- totime = scope.totime[0].value;
- scope.TotimeList[value].value = scope.totime[0].value;
- }
- }
-
- custTime["day"] = value;
- custTime["FromTime"] = scope.FrtimeList[value].value;
- custTime["ToTime"] = scope.TotimeList[value].value;
-
- for (count = 0, len = scope.customTime.length; count < len; count++) {
- if (scope.customTime[count].day === value) {
- scope.customTime[count].FromTime = custTime["FromTime"];
- scope.customTime[count].ToTime = custTime["ToTime"];
- break;
- }
- }
- if (count === len) {
- var x = angular.copy(custTime);
- scope.customTime.push(x);
- }
- }
- scope.selCategory = scope.customTime;
- };
-
-
- var outsideClick = function () {
- if (scope.showlist) {
- scope.$apply(function () {
- scope.showlist = false;
- });
- }
- };
-
- $documentBind.click('showlist', outsideClick, scope);
-
- var outsideClickFromDropdown = function () {
- scope.$apply(function () {
- if (scope.isFromDropDownOpen) {
- scope.FrtimeListDay[dropDownOpenValue] = false;
- scope.isFromDropDownOpen = false;
- }
- });
- };
-
- $documentBind.click('isFromDropDownOpen', outsideClickFromDropdown, scope);
-
- var outsideClickToDropdown = function () {
- scope.$apply(function () {
- if (scope.isToDropDownOpen) {
- scope.TotimeListDay[dropDownOpenValue] = false;
- scope.isToDropDownOpen = false;
- }
- });
- };
-
- $documentBind.click('isToDropDownOpen', outsideClickToDropdown, scope);
-
- scope.selectOption = function (sItem) {
-
- if (sItem === hourpickerConfig.customOption) {
- scope.showDaysSelector = true;
- scope.selCategory = scope.customTime;
- } else {
- scope.showDaysSelector = false;
- var fromTime = /[0-9]\s?am/i.exec(sItem);
- var toTime = /[0-9]\s?pm/i.exec(sItem);
- scope.selCategory = {
- day: sItem,
- FromTime: fromTime === null ? 'NA' : fromTime[0],
- ToTime: toTime === null ? 'NA' : toTime[0]
- };
- }
-
- scope.showlist = false;
- flag = false;
- scope.selectedOption = sItem;
- };
- }
- };
-}])
-
-.directive('attHourpickerValidator', ['hourpickerConfig', function (hourpickerConfig) {
- return {
- restrict: 'A',
- require: ['attHourpicker', 'ngModel'],
- link: function (scope, element, attr, ctrl) {
-
- var attHourpickerCtrl = ctrl[0];
- var ngModelCtrl = ctrl[1];
-
- //required format [h:MM tt] like '1:10 PM'
- var convertTimeStrngToMilitaryFormat = function (time) {
- var hours = Number(time.match(/^(\d+)/)[1]);
- var minutes = Number(time.match(/:(\d+)/)[1]);
- var AMPM = (time.match(/\s(.*)$/)[1]).toUpperCase();
- if (AMPM === 'PM' && hours < 12) {
- hours = hours + 12;
- }
- if (AMPM === 'AM' && hours === 12) {
- hours = hours - 12;
- }
- var sHours = hours.toString();
- var sMinutes = minutes.toString();
- if (hours < 10) {
- sHours = '0' + sHours;
- }
- if (minutes < 10) {
- sMinutes = '0' + sMinutes;
- }
- return parseInt(sHours + sMinutes, 10);
- };
-
- var compareTimeStrings = function (fromTimeString, toTimeString) {
- var fromMilitaryTime = convertTimeStrngToMilitaryFormat(fromTimeString);
- var toMilitaryTime = convertTimeStrngToMilitaryFormat(toTimeString);
- return (toMilitaryTime - fromMilitaryTime);
- };
-
- var validateCustomData = function (finalDataModal) {
-
- if (attHourpickerCtrl.getSelectedOption() === hourpickerConfig.customOption) {
-
- var errorDaysCount = 0;
-
- for (var item in finalDataModal) {
- if (finalDataModal.hasOwnProperty(item)) {
- if (compareTimeStrings(finalDataModal[item].FromTime, finalDataModal[item].ToTime) <= 0) {
- attHourpickerCtrl.setToTimeErrorDay(finalDataModal[item].day, true);
- errorDaysCount++;
- } else {
- attHourpickerCtrl.setToTimeErrorDay(finalDataModal[item].day, false);
- }
- }
- }
-
- if (errorDaysCount > 0) {
- //validation error
- ngModelCtrl.$setValidity('validationStatus', false);
- return [];
- } else {
- //validation successful
- ngModelCtrl.$setValidity('validationStatus', true);
- return finalDataModal;
- }
- } else {
- //default case no validation
- ngModelCtrl.$setValidity('validationStatus', true);
- return finalDataModal;
- }
-
- };
-
- ngModelCtrl.$parsers.unshift(validateCustomData);
- }
- };
-}]);
-angular.module('att.abs.iconButtons', [])
- .constant('buttonConfig', {
- activeClass: 'active--button',
- toggleEvent: 'click'
- })
- .directive('attIconBtnRadio', ['buttonConfig', function(buttonConfig) {
- var activeClass = buttonConfig.activeClass || 'active--button';
- var toggleEvent = buttonConfig.toggleEvent || 'click';
- return {
- require: 'ngModel',
- link: function(scope, element, attrs, ngModelCtrl) {
- element.attr("tabindex","0");
- element.append("<span class='hidden-spoken'>"+attrs.attIconBtnRadio+"</span>");
- //model -> UI
- ngModelCtrl.$render = function() {
- element.parent().toggleClass(activeClass, angular.equals(ngModelCtrl.$modelValue, attrs.attIconBtnRadio));
- };
- //ui->model
- element.parent().bind(toggleEvent, function() {
- if (!element.parent().hasClass(activeClass)) {
- scope.$apply(function() {
- ngModelCtrl.$setViewValue(attrs.attIconBtnRadio);
- ngModelCtrl.$render();
- });
- }
- });
- }
- };
- }])
- .directive('attIconBtnCheckbox', ['buttonConfig', function(buttonConfig) {
- var activeClass = buttonConfig.activeClass || 'active--button';
- var toggleEvent = buttonConfig.toggleEvent || 'click';
- return {
- require: 'ngModel',
- link: function(scope, element, attrs, ngModelCtrl) {
- element.attr("tabindex","0");
- element.append("<span class='hidden-spoken'>"+attrs.attIconBtnCheckbox+"</span>");
- function getTrueValue() {
- var trueValue = scope.$eval(attrs.btnCheckboxTrue);
- return angular.isDefined(trueValue) ? trueValue : true;
- }
- function getFalseValue() {
- var falseValue = scope.$eval(attrs.btnCheckboxFalse);
- return angular.isDefined(falseValue) ? falseValue : false;
- }
- //model -> UI
- ngModelCtrl.$render = function() {
- element.parent().toggleClass(activeClass, angular.equals(ngModelCtrl.$modelValue, getTrueValue()));
- };
- //ui->model
- element.parent().bind(toggleEvent, function() {
- scope.$apply(function() {
- ngModelCtrl.$setViewValue(element.parent().hasClass(activeClass) ? getFalseValue() : getTrueValue());
- ngModelCtrl.$render();
- });
- });
- }
- };
- }]);
-
-angular.module('att.abs.links', ['ngSanitize'])
- .directive('attLink', [function() {
- return {
- restrict: 'A',
- link: function(scope, elem) {
- elem.addClass('link');
- if(!(elem.attr('href'))){
- elem.attr("tabindex", "0");
- }
- }
- };
- }])
- .directive('attLinkVisited', [function() {
- return {
- restrict: 'A',
- link: function(scope, elem) {
- elem.addClass('link--visited');
- if(!(elem.attr('href'))){
- elem.attr("tabindex", "0");
- }
- }
- };
- }])
- .directive('attReadmore', ['$timeout',function($timeout) {
- return {
- restrict: 'A',
- scope: {
- lines:"@noOfLines",
- textModel: "=",
- //attribute to use readmore inside accordion
- isOpen: "="
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/links/readMore.html',
- link: function(scope, elem) {
- var height = 1;
- scope.$watch('textModel', function(val){
- if(!val){
- scope.textToDisplay = '';
- scope.readMoreLink = false;
- scope.readLessLink = false;
- scope.readFlag = false;
- }
- else{
- if (typeof String.prototype.trim !== 'function') {
- String.prototype.trim = function() {
- return this.replace(/^\s+|\s+$/g, '');
- };
- }
- scope.textToDisplay = val.trim();
- scope.readFlag = true;
- $timeout(function() {
- var readElem = elem[0].children[0].children[0];
- if(height===1){
- if(window.getComputedStyle){
- height = parseInt(scope.lines) * parseFloat(window.getComputedStyle(readElem,null).getPropertyValue("height"));
- }
- else {
- height = parseInt(scope.lines) * parseFloat(readElem.currentStyle.height);
- }
- scope.elemHeight = height;
- scope.readLinkStyle = {'height': scope.elemHeight + 'px'};
- }
- });
- scope.readMoreLink = true;
- scope.readLessLink = false;
- }
- });
- // Code to use readmore inside accordion
- var parentElem = elem.parent();
- if (parentElem.hasClass('att-accordion__body')) {
- scope.$watch('isOpen', function(val) {
- if (!val) {
- scope.readMoreLink = true;
- scope.readLessLink = false;
- scope.readLinkStyle = {'height': scope.elemHeight + 'px'};
- scope.readFlag = true;
- }
- });
- }
- scope.readMore = function() {
- scope.readMoreLink = false;
- scope.readLessLink = true;
- scope.readLinkStyle = {'height': 'auto'};
- scope.readFlag = false;
- var moreLink = angular.element(elem).children().eq(1).find('a')[0];
- $timeout(function()
- {
- moreLink.focus();
- });
- };
- scope.readLess = function() {
- scope.readMoreLink = true;
- scope.readLessLink = false;
- scope.readLinkStyle = {'height': scope.elemHeight + 'px'};
- scope.readFlag = true;
- var readLessLink = angular.element(elem).children().eq(0).find('a')[0];
- $timeout(function()
- {
- readLessLink.focus();
- });
- };
- }
- };
- }])
- .directive('attLinksList', [function() {
- return {
- restrict: 'A',
- controller: function() {
- },
- link: function(scope, elem) {
- elem.addClass('links-list');
- }
- };
- }])
- .directive('attLinksListItem', [function() {
- return {
- restrict: 'A',
- require: '^attLinksList',
- link: function(scope, elem) {
- elem.addClass('links-list__item');
- if(!(elem.attr('href'))){
- elem.attr("tabindex", "0");
- }
- }
- };
- }]);
-angular.module('att.abs.loading', [])
- .directive('attLoading', ['$window',function($window) {
- return {
- restrict: 'A',
- replace: true,
- scope: {
- icon: '@attLoading',
- progressStatus: '=?',
- colorClass: '=?'
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/loading/loading.html',
- link: function(scope, element) {
- var progressvalue = scope.progressStatus;
- scope.progressStatus = Math.min(100, Math.max(0, progressvalue));
- if($window.navigator.userAgent.indexOf("MSIE 8.")!==-1){
- var shiftX = 0, shiftY = scope.progressStatus * 36;
- element.css({
- 'background-position-x' : shiftX,
- 'background-position-y' : -shiftY
- });
- }
- }
- };
- }]);
-angular.module('att.abs.modal', ['att.abs.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;
- }
- };
- }
- };
- })
-
-/**
- * A helper directive for the $modal service. It creates a backdrop element.
- */
- .directive('modalBackdrop', ['$timeout', function ($timeout) {
- return {
- restrict: 'EA',
- replace: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/modal/backdrop.html',
- link: function (scope) {
- scope.animate = false;
- //trigger CSS transitions
- $timeout(function () {
- scope.animate = true;
- });
- }
- };
- }])
-
- .directive('modalWindow', ['$modalStack','$timeout','$document', function ($modalStack,$timeout,$document) {
- return {
- restrict: 'EA',
- scope: {
- index: '@',
- modalTitle: '@?'
- },
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/modal/window.html',
- link: function (scope, element, attrs) {
- scope.windowClass = attrs.windowClass || '';
- if (attrs['modalTitle'] && attrs['modalTitle']!=="") {
- element[0].setAttribute('aria-label', attrs['modalTitle']);
- element[0].removeAttribute('modal-title');
- }
- $timeout(function () {
- // trigger CSS transitions
- scope.focusModalFlag = true;
- scope.animate = true;
- });
- $document.on('focus keydown', function(e){
- if (e.which ===9) {
- String.prototype.contains = function(it) {
- return this.indexOf(it) !== -1;
- };
- if (element[0] !== e.target && !element[0].contains( e.target )) {
- element[0].focus();
- }
- }
- });
- scope.close = function (evt) {
- var modal = $modalStack.getTop();
- if (modal && modal.value.backdrop && modal.value.backdrop != 'static' && (evt.target === evt.currentTarget)) {
- // Check if preventDefault exists due to lack of support for IE8
- if (evt.preventDefault) {
- evt.preventDefault();
- evt.stopPropagation();
- } else {
- evt.returnValue = false;
- }
- $modalStack.dismiss(modal.key, 'backdrop click');
- }
- };
- }
- };
- }])
-
- .factory('$modalStack', ['$document', '$compile', '$rootScope', '$$stackedMap', 'events', 'keymap',
- function ($document, $compile, $rootScope, $$stackedMap, events, keymap) {
- var OPENED_MODAL_CLASS = 'modal-open';
- var backdropjqLiteEl, backdropDomEl;
- var backdropScope = $rootScope.$new(true);
- var openedWindows = $$stackedMap.createNew();
- var $modalStack = {};
- var modalLaunchingElement = undefined;
- 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) {
-
- var body = $document.find('body').eq(0);
- var html = $document.find('html').eq(0);
- var modalWindow = openedWindows.get(modalInstance).value;
- //clean up the stack
- openedWindows.remove(modalInstance);
- ////remove window DOM element
- modalWindow.modalDomEl.remove();
- body.toggleClass(OPENED_MODAL_CLASS, openedWindows.length() > 0);
- html.css({overflow: 'scroll'});
-
- //remove backdrop if no longer needed
- if (backdropDomEl && backdropIndex() == -1) {
- backdropDomEl.remove();
- backdropDomEl = undefined;
- }
- //destroy scope
- modalWindow.modalScope.$destroy();
-
- // Shift focus
- if (angular.isDefined(modalLaunchingElement) && modalLaunchingElement != null) {
- modalLaunchingElement.focus();
- }
- }
- $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);
- });
- }
- } else if (evt.keyCode === keymap.KEY.BACKSPACE) {
- var doPrevent = false;
- var d = evt.srcElement || evt.target;
- var type;
- if (d.type === undefined) {
- doPrevent = true;
- } else if (d.tagName.toUpperCase() === 'INPUT' &&
- ( (type = d.type.toUpperCase()) === 'TEXT' ||
- type === 'PASSWORD' ||
- type === 'FILE' ||
- type === 'SEARCH' ||
- type === 'EMAIL' ||
- type === 'NUMBER' ||
- type === 'DATE' ||
- type === 'TEL' ||
- type === 'URL' ||
- type === 'TIME')
- || d.tagName.toUpperCase() === 'TEXTAREA') {
- doPrevent = d.readOnly || d.disabled;
- } else {
- doPrevent = true;
- }
- if (doPrevent) {
- events.preventDefault(evt);
- }
- }
- });
-
- $modalStack.open = function (modalInstance, modal) {
- openedWindows.add(modalInstance, {
- deferred: modal.deferred,
- modalScope: modal.scope,
- backdrop: modal.backdrop,
- keyboard: modal.keyboard
- });
-
- //Before opening modal, find the focused element
- modalLaunchingElement = document.activeElement;
-
- var body = $document.find('body').eq(0);
- var html = $document.find('html').eq(0);
-
- if (backdropIndex() >= 0 && !backdropDomEl) {
- backdropjqLiteEl = angular.element('<div modal-backdrop></div>');
- backdropDomEl = $compile(backdropjqLiteEl)(backdropScope);
- body.append(backdropDomEl);
- }
- var angularDomEl = angular.element('<div modal-window></div>');
- angularDomEl.attr('window-class', modal.windowClass);
- angularDomEl.attr('index', openedWindows.length() - 1);
- angularDomEl.attr('modal-title', modal.modalTitle);
- angularDomEl.html(modal.content);
-
- var modalDomEl = $compile(angularDomEl)(modal.scope);
- openedWindows.top().value.modalDomEl = modalDomEl;
- body.append(modalDomEl);
- body.addClass(OPENED_MODAL_CLASS);
- html.css({overflow: 'hidden'});
- };
-
- $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: {
- //can be also false or 'static'
- backdrop: true,
- 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) {
- 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(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,
- modalTitle: modalOptions.modalTitle
- });
-
- }, function(reason) {
- modalResultDeferred.reject(reason);
- });
-
- templateAndResolvePromise.then(function () {
- modalOpenedDeferred.resolve(true);
- }, function () {
- modalOpenedDeferred.reject(false);
- });
-
- return modalInstance;
- };
-
- return $modal;
- }]
- };
-
- return $modalProvider;
- })
-
-.directive("simpleModal", ["$modal", function($modal) {
- return {
- restrict: 'EA',
- scope: {
- simpleModal: '@',
- backdrop:'@',
- keyboard:'@',
- modalOk:'&',
- modalCancel:'&',
- windowClass:'@',
- controller:'@',
- modalTitle: '@?'
- },
- link: function(scope, elm) {
- elm.bind('click', function(ev) {
- ev.preventDefault();
- if (angular.isDefined(elm.attr("href")) && elm.attr("href") !== "") {
- scope.simpleModal = elm.attr("href");
- }
-
- scope.backdrop === "false" ? scope.backdropclick = 'static' : scope.backdropclick = true;
- scope.keyboard === "false" ? scope.keyboardev = false : scope.keyboardev = true;
-
- $modal.open({
- templateUrl: scope.simpleModal,
- backdrop:scope.backdropclick,
- keyboard:scope.keyboardev,
- windowClass:scope.windowClass,
- controller: scope.controller,
- modalTitle: scope.modalTitle
- }).result.then(scope.modalOk, scope.modalCancel);
- });
- }
- };
- }])
-
-.directive('tabbedItem', ['$modal', '$log',function ($modal, $log){
- return {
- restrict: 'AE',
- replace: true,
- scope: {
- items: "=items",
- controller: "@",
- templateId:"@",
- modalTitle: '@?'
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/modal/tabbedItem.html',
- controller: ['$scope', '$rootScope', '$attrs', function ($scope) {
- $scope.clickTab = function (index) {
- for (var i = 0; i < $scope.items.length; i++) {
- if (i === index) {
- $scope.items[i].isTabOpen = true;
- $scope.items[i].showData = true;
- }
- else {
- $scope.items[i].isTabOpen = false;
- $scope.items[i].showData = false;
- }
- }
- var modalInstance = $modal.open({
- templateUrl: $scope.templateId,
- controller: $scope.controller,
- windowClass: 'tabbedOverlay_modal',
- modalTitle: $scope.modalTitle,
- resolve: {
- items: function () {
- return $scope.items;
- }
- }
- });
- modalInstance.result.then(function (selectedItem) {
- $scope.selected = selectedItem;
- }, function () {
- $log.info('Modal dismissed at: ' + new Date());
- });
- };
- $scope.isActiveTab = function (index) {
- return $scope.items && $scope.items[index] && $scope.items[index].isTabOpen;
- };
- }]
- };
-}])
-
-.directive('tabbedOverlay', [function () {
- return {
- restrict: 'AE',
- replace: true,
- scope: {
- items: "="
- },
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/modal/tabbedOverlayItem.html',
- controller: ['$scope', function ($scope) {
- $scope.clickTab = function (index) {
- for (var i = 0; i < $scope.items.length; i++) {
- if (i === index) {
- $scope.items[i].isTabOpen = true;
- $scope.items[i].showData = true;
- }
- else {
- $scope.items[i].isTabOpen = false;
- $scope.items[i].showData = false;
- }
- }
- };
- $scope.isActiveTab = function (index) {
- return $scope.items && $scope.items[index] && $scope.items[index].isTabOpen;
- };
- }]
- };
-}]);
-angular.module('att.abs.pagination', ['att.abs.utilities'])
-.directive('attPagination', [ function() {
- return {
- restrict: 'EA',
- scope: {
- totalPages: '=',
- currentPage: '=',
- showInput: '=',
- clickHandler: '=?'
- },
- replace: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/pagination/pagination.html',
- link: function(scope) {
- scope.focusedPage;
- scope.$watch('totalPages', function(value) {
- if(angular.isDefined(value) && value !== null){
- scope.pages = [];
- if (value < 1) {
- scope.totalPages = 1;
- return;
- }
- if (value <= 7) {
- for (var i = 1; i <= value; i++) {
- scope.pages.push(i);
- }
- } else if (value > 7) {
- var midVal = Math.ceil(value / 2);
- scope.pages = [midVal - 1, midVal, midVal + 1];
- }
- currentPageChanged(1);
- }
- });
- scope.$watch('currentPage', function(value) {
- currentPageChanged(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 > 7) {
- if (value < scope.pages[0] && value > 3) {
- scope.pages = [value, value + 1, value + 2];
- } else if (value > scope.pages[2] && value < scope.totalPages - 2) {
- scope.pages = [value - 2, value - 1, value];
- } else if (value <= 3) {
- scope.pages = [1, 2, 3];
- } else if (value >= scope.totalPages - 2) {
- scope.pages = [scope.totalPages - 2, scope.totalPages - 1, scope.totalPages];
- }
- }
- }
- }
- scope.next = function(event) {
- event.preventDefault();
- if (scope.currentPage < scope.totalPages) {
- scope.currentPage += 1;
- callbackHandler(scope.currentPage);
- }
- };
- scope.prev = function(event) {
- 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;
- };
- }
- };
-}]);
-
-angular.module('att.abs.paneSelector',['att.abs.utilities'])
-.constant('paneGroupConstants',{
- SIDE_WIDTH_DEFAULT: '33%',
- INNER_PANE_DEFAULT: '67%',
- SIDE_PANE_ID: 'sidePane',
- NO_DRILL_DOWN: 'none'
-})
-.factory('animation', function(){
- return TweenLite;
-}).directive('attPaneAccessibility',['keymap','$window',function(keymap,$window) {
- return{
- restrict: 'A',
- require: ['^?sidePane','^?innerPane'],
- link: function (scope, elem,attr,ctrl) {
- var sidepaneCtrl = ctrl[0],innerPaneCtrl = ctrl[1],ieFlag=false;
- scope.ie = (function () {
- var undef,v = 3,div = document.createElement('div'),
- all = div.getElementsByTagName('i');
- while (
- div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i>< ![endif]-->',
- all[0]
- );
- return v > 4 ? v : undef;
- }());
- if(scope.ie === 8){
- ieFlag = true;
- }
- else{
- ieFlag = false;
- }
- elem.bind('keydown',function(ev){
- if (keymap.isAllowedKey(ev.keyCode) || keymap.isControl(ev) || keymap.isFunctionKey(ev)) {
- ev.preventDefault();
- ev.stopPropagation();
- var el;
- switch (ev.keyCode) {
- case keymap.KEY.DOWN:
- el = angular.element(elem[0])[0];
- if(el && el.nextElementSibling){
- el.nextElementSibling.focus();
- }
- /*IE8 fix*/
- if(ieFlag){
- do {
- if (el && el.nextSibling){
- el = el.nextSibling;
- }
- else{
- break;
- }
- } while (el && el.tagName !== 'DIV');
- el.focus();
- }
- break;
- case keymap.KEY.UP:
- el = angular.element(elem[0])[0];
- if(el && el.previousElementSibling){
- el.previousElementSibling.focus();
- }
- /*IE8 fix*/
- if(ieFlag){
- do {
- if (el && el.previousSibling){
- el = el.previousSibling;
- }
- else{
- break;
- }
- } while (el && el.tagName !== 'DIV');
- el.focus();
- }
- break;
- case keymap.KEY.RIGHT:
- if(angular.isDefined(sidepaneCtrl)){
- el = sidepaneCtrl.getElement()[0];
- }
- if(angular.isDefined(innerPaneCtrl)){
- el = innerPaneCtrl.getElement()[0];
- }
- do {
- if (el && el.nextElementSibling){
- el = el.nextElementSibling;
- }
- else{
- break;
- }
- }while(window.getComputedStyle(el, null).getPropertyValue("display") === 'none');
- /*IE8 fix*/
- if(ieFlag){
- do {
- if (el && el.nextSibling){
- el = el.nextSibling;
- }
- else{
- break;
- }
- }while ((el && el.tagName == 'DIV') && el.currentStyle['display'] == 'none');
- }
- if (el){
- el.querySelector("[att-pane-accessibility]").focus();
- }
- break;
- case keymap.KEY.LEFT:
- if(angular.isDefined(sidepaneCtrl)){
- el = sidepaneCtrl.getElement()[0];
- }
- if(angular.isDefined(innerPaneCtrl)){
- el = innerPaneCtrl.getElement()[0];
- }
- do {
- if (el && el.previousElementSibling){
- el = el.previousElementSibling;
- }
- else{
- break;
- }
- }while (window.getComputedStyle(el, null).getPropertyValue("display") == 'none');
-
- /*IE8 fix*/
- if(ieFlag){
- do {
- if (el && el.previousSibling){
- el = el.previousSibling;
- }
- else{
- break;
- }
- }while((el && el.tagName == 'DIV') && el.currentStyle['display'] == 'none');
- }
- if (el){
- el.querySelector("[att-pane-accessibility]").focus();
- }
- break;
- default:
- break;
- }
- }
- });
- }
- };
-}])
-.directive('sideRow', [function(){
- return {
- restrict: 'A',
- replace:true,
- require: ['^sidePane','^paneGroup'],
- link: function(scope,element,attr,ctrls){
- var sidePaneCtrl = ctrls[0];
- var paneGroupCtrl = ctrls[1];
- if(scope.$first){
- /*
- Reset the sidePaneId array if a new
- set of ngRepeat data appeared
- */
- sidePaneCtrl.sidePaneIds = [];
- }
- var paneId =attr['paneId'];
- var drillDownTo = attr['drillDownTo'];
- sidePaneCtrl.sidePaneRows.push({'paneId':paneId, 'drillDownTo':drillDownTo});
- element.on('click', function(){
- sidePaneCtrl.currentSelectedRowPaneId = paneId;
- paneGroupCtrl.slideOutPane(paneId,true);
- });
- }
- };
-}])
-.controller('SidePaneCtrl',['$scope', '$element','animation', 'paneGroupConstants',
- function($scope,$element,animation, paneGroupConstants){
- this.getElement = function(){
- return $element;
- };
- this.sidePaneTracker = {};
- this.currentWidth = paneGroupConstants.SIDE_WIDTH_DEFAULT;
- this.paneId = paneGroupConstants.SIDE_PANE_ID;
- this.currentSelectedRowPaneId;
- this.drillDownToMapper = {};
- this.sidePaneRows = [];
- this.init = function(){
- var sidePaneRows = this.sidePaneRows;
- if(sidePaneRows){
- for(var index in sidePaneRows){
- if (sidePaneRows.hasOwnProperty(index)) {
- var paneId = sidePaneRows[index].paneId;
- var drillDownTo = sidePaneRows[index].drillDownTo;
- this.drillDownToMapper[paneId] = drillDownTo;
- if(index == 0){
- this.currentSelectedRowPaneId = paneId;
- this.sidePaneTracker[paneId] = [];
- }
- }
- }
- }
- };
- this.getSidePanesList = function(){
- return this.sidePaneTracker[this.currentSelectedRowPaneId];
- };
- this.addToSidePanesList = function(newPaneId){
- if(this.sidePaneTracker[this.currentSelectedRowPaneId] === undefined){
- this.sidePaneTracker[this.currentSelectedRowPaneId] = [];
- }
- else if(newPaneId){
- this.sidePaneTracker[this.currentSelectedRowPaneId].push(newPaneId);
- }
- };
- this.setWidth = function(val){
- if(val){
- this.currentWidth = val;
- }
- animation.set($element,{width:this.currentWidth});
- };
- this.resizeWidth = function(val){
- if(val){
- this.currentWidth = val;
- }
- animation.to($element,.5,{width:val});
- };
-
-}])
-.directive('sidePane', ['paneGroupConstants', function(paneGroupConstants){
- return {
- restrict: 'EA',
- transclude: true,
- replace: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/paneSelector/sidePane.html',
- require: ['^paneGroup', 'sidePane'],
- controller: 'SidePaneCtrl',
- scope:{},
- link: function(scope,element,attr, ctrls){
- var paneGroupCtrl = ctrls[0];
- var sidePaneCtrl = ctrls[1];
- paneGroupCtrl.addPaneCtrl(paneGroupConstants.SIDE_PANE_ID, sidePaneCtrl);
- }
- };
-}])
-.directive('drillDownRow', ['$parse', 'paneGroupConstants',function($parse,paneGroupConstants){
- return {
- restrict: 'A',
- replace:true,
- require: ['^innerPane','^paneGroup'],
- link: function(scope,element,attr,ctrls){
- var innerPaneCtrl = ctrls[0];
- var paneGroupCtrl = ctrls[1];
- element.on('click', function(){
- var drillDownTo = innerPaneCtrl.drillDownTo;
- if(innerPaneCtrl.drillDownTo !== paneGroupConstants.NO_DRILL_DOWN){
- paneGroupCtrl.slideOutPane(drillDownTo);
- }
- element[0].focus();
- });
- }
- };
-}])
-.controller('InnerPaneCtrl', ['$scope', '$element','animation', 'paneGroupConstants',
- function($scope,$element,animation,paneGroupConstants){
- this.getElement = function(){
- return $element;
- };
- this.paneId = $scope.paneId;
- this.drillDownTo;
- this.currentWidth = paneGroupConstants.INNER_PANE_DEFAULT;
- this.setWidth = function(val){
- if(val){
- this.currentWidth = val;
- }
- animation.set($element,{width:this.currentWidth});
- };
- this.resizeWidth = function(val,callback){
- animation.to($element,.25,{width:val,onComplete: callback});
- };
- this.displayNone = function(){
- animation.set($element, {display:'none'});
- };
- this.displayBlock = function(){
- animation.set($element,{display:'block'});
- if(this){
- this.hideRightBorder();
- }
- };
- this.floatLeft = function(){
- animation.set($element,{float:'left'});
- };
- this.hideLeftBorder = function(){
- animation.set($element, {borderLeftWidth: '0px'});
- };
- this.showLeftBorder = function(){
- animation.set($element,{borderLeftWidth: '1px'});
- };
- this.hideRightBorder = function(){
- animation.set($element,{borderRightWidth: '0px'});
- };
- this.showRightBorder = function(){
- animation.set($element, {borderRightWidth: '1px'});
- };
- this.slideFromRight = function(){
- animation.set($element, {float:'right'});
- animation.set($element, {width: this.currentWidth});
- };
- this.startOpen = function(){
- return $scope.startOpen;
- };
-}])
-.directive('innerPane', function(){
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/paneSelector/innerPane.html',
- require: ['^paneGroup', 'innerPane'],
- controller: 'InnerPaneCtrl',
- scope:{
- paneId:'@'
- },
- link: function(scope,element,attr,ctrls){
- if(attr.startOpen === ""){
- scope.startOpen = true;
- }
- var paneGroupCtrl = ctrls[0];
- var innerPaneCtrl = ctrls[1];
- paneGroupCtrl.addPaneCtrl(scope.paneId,innerPaneCtrl);
- }
- };
-})
-.controller('PaneGroupCtrl', ['$scope', '$element', 'paneGroupConstants',function($scope,$element,paneGroupConstants){
- this.panes = {};
- this.accountLevelPaneModel = [];
- this.title = $scope.title;
- this.init = function(){
- var sidePane = this.panes[paneGroupConstants.SIDE_PANE_ID];
- if(sidePane){
- sidePane.init();
-
- //Show the other panes that may be set to startOpen
- //numOpen starts at 1 because of the side pane
- var numOpen = 1;
- var key;
- for(key in this.panes){
- if(this.panes[key].startOpen && this.panes[key].startOpen()){
- numOpen++;
- }
- }
- var width;
- if(numOpen >= 3){
- width = ((100/numOpen)) + '%';
- }
- if(this.panes[sidePane.currentSelectedRowPaneId])
- {
- if(width){
- sidePane.setWidth(width);
- this.panes[sidePane.currentSelectedRowPaneId].setWidth(width);
- }
- else{
- sidePane.setWidth();
- this.panes[sidePane.currentSelectedRowPaneId].setWidth();
- }
- this.panes[sidePane.currentSelectedRowPaneId].displayBlock();
- for(key in this.panes){
- if(key !== paneGroupConstants.SIDE_PANE_ID && key !== sidePane.currentSelectedRowPaneId){
- this.panes[key].displayNone();
- }
- this.panes[key].drillDownTo = sidePane.drillDownToMapper[key];
- }
- }
- openOtherPanesOnStart(sidePane, this.panes);
- }
-
- function openOtherPanesOnStart(sidePane, panes){
- //Build an array of the panes that need to be out
- var otherPanesStartOpened = [];
- var index;
- for(index in sidePane.sidePaneRows){
- if (sidePane.sidePaneRows.hasOwnProperty(index)) {
- var pane = sidePane.sidePaneRows[index];
-
- //Skip the first pane row since we handled it in the begining
- if(index > 0 && panes[pane.paneId].startOpen && panes[pane.paneId].startOpen()){
- otherPanesStartOpened.push(pane);
- //Remember the panes that are opened for the first pane row Index
- sidePane.addToSidePanesList(pane.paneId);
- }
- }
- }
-
- if(width){
- for(index in otherPanesStartOpened){
- if (otherPanesStartOpened.hasOwnProperty(index)) {
- var paneId = otherPanesStartOpened[index].paneId;
- var paneCtrl = panes[paneId];
- if(paneCtrl && paneCtrl.setWidth && paneCtrl.displayBlock){
- paneCtrl.setWidth(width);
- paneCtrl.displayBlock();
- }
- }
- }
- }
-
- }
- };
-
- /*
- Resets all the panels to their original positions at the end of a sidebar click
- By setting the sideBar to its default width
- Setting all panes to float left and displaynone
- Setting the pane that was clicked to default width and slide right
- */
-
- this.resetPanes = function(){
- for(var key in this.panes){
- if(this.panes.hasOwnProperty(key)){
- var pane = this.panes[key];
- if(pane && (pane.paneId !== paneGroupConstants.SIDE_PANE_ID)){
- pane.floatLeft();
- pane.displayNone();
- }
- }
- }
-
- if(this.panes[paneGroupConstants.SIDE_PANE_ID]){
- this.panes[paneGroupConstants.SIDE_PANE_ID].setWidth(paneGroupConstants.SIDE_WIDTH_DEFAULT);
- }
- };
-
- this.addPaneCtrl = function(paneId,paneCtrl){
- this.panes[paneId] = paneCtrl;
- };
-
- this._slideOutPane = function(paneId,isFromSidePane){
- this.resetPanes();
- //Check current side pane stack to see how many panes are already open for that side pane choice
- //then add the new pane that needs to be there
- var panesList;
- if(isFromSidePane){
-
- //Check if the side pane id has already been clicked
- if(this.panes[paneGroupConstants.SIDE_PANE_ID]){
- panesList = this.panes[paneGroupConstants.SIDE_PANE_ID].getSidePanesList();
- }
- if(!panesList){
- if(this.panes && this.panes[paneGroupConstants.SIDE_PANE_ID] && this.panes[paneId]){
- this.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId = paneId;
- this.panes[paneGroupConstants.SIDE_PANE_ID].addToSidePanesList();
-
- this.panes[paneId].slideFromRight();
- this.panes[paneId].displayBlock();
-
- this.panes[paneId].setWidth(paneGroupConstants.INNER_PANE_DEFAULT);
- }
- }
- else if(this.panes && this.panes[paneGroupConstants.SIDE_PANE_ID]){
- //Restore the panes based on the panelist
- if(panesList.length === 0 && this.panes[paneId]){
- //Only one pane is out
- this.panes[paneGroupConstants.SIDE_PANE_ID].setWidth(paneGroupConstants.SIDE_WIDTH_DEFAULT);
- this.panes[paneId].displayBlock();
- this.panes[paneId].setWidth(paneGroupConstants.INNER_PANE_DEFAULT);
- }
- else{
- //Multiple panes out
- var numPanes = panesList.length + 2;
- var width = ((100/numPanes)) + '%';
- this.panes[paneGroupConstants.SIDE_PANE_ID].setWidth(width);
-
- //Set the sidePanes pane
- //set the panes children list
- if(this.panes[this.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId]){
- this.panes[this.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId].displayBlock();
- this.panes[this.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId].setWidth(width);
- }
- for(var i in panesList){
- if(this.panes[panesList[i]]){
- this.panes[panesList[i]].displayBlock();
- this.panes[panesList[i]].setWidth(width);
- }
- }
- }
- }
- }
- else{
-
- //Have to check the paneId that was given and where it is drilling down to
- var isPaneInStack = false;
- var stackPaneList;
- if(this.panes[paneGroupConstants.SIDE_PANE_ID]){
- stackPaneList = this.panes[paneGroupConstants.SIDE_PANE_ID].getSidePanesList();
- }
- for(var j in stackPaneList){
- if(stackPaneList.hasOwnProperty(j)){
- var pId = stackPaneList[j];
- if(pId === paneId){
- isPaneInStack = true;
- break;
- }
- }
- }
- if(!isPaneInStack && this.panes[paneGroupConstants.SIDE_PANE_ID]){
- this.panes[paneGroupConstants.SIDE_PANE_ID].addToSidePanesList(paneId);
- }
- var sidePanesListLength;
- if(this.panes[paneGroupConstants.SIDE_PANE_ID]){
- sidePanesListLength = this.panes[paneGroupConstants.SIDE_PANE_ID].getSidePanesList().length;
- }
- var numberPanes = sidePanesListLength + 2;
- var widthToSet = ((100/numberPanes)) + '%';
- if(this.panes[paneGroupConstants.SIDE_PANE_ID]){
- this.panes[paneGroupConstants.SIDE_PANE_ID].setWidth(widthToSet);
- }
- var slideInPaneId;
-
- if(this.panes[paneGroupConstants.SIDE_PANE_ID]){
- slideInPaneId = this.panes[paneGroupConstants.SIDE_PANE_ID].getSidePanesList()[sidePanesListLength - 1];
- }
-
- var that = this;
-
- if(that.panes[paneGroupConstants.SIDE_PANE_ID]){
- panesList = that.panes[paneGroupConstants.SIDE_PANE_ID].getSidePanesList();
- }
-
- for(var p in panesList){
- if(panesList.hasOwnProperty(p)){
- var paneListPaneId = panesList[p];
- var pane = this.panes[paneListPaneId];
- if(paneListPaneId !== slideInPaneId && pane){
- pane.setWidth(widthToSet);
- pane.displayBlock();
- pane.floatLeft();
- }
- }
- }
-
- if(this.panes[this.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId]){
- this.panes[this.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId].displayBlock();
- this.panes[this.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId].showRightBorder();
-
- this.panes[this.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId].resizeWidth(widthToSet,function(){
-
- if(that.panes[slideInPaneId] && that.panes[that.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId]){
- that.panes[that.panes[paneGroupConstants.SIDE_PANE_ID].currentSelectedRowPaneId].hideRightBorder();
- that.panes[slideInPaneId].setWidth(widthToSet);
- that.panes[slideInPaneId].slideFromRight();
- that.panes[slideInPaneId].displayBlock();
- that.panes[slideInPaneId].floatLeft();
- }
-
- });
- }
- }
- };
-
- this.slideOutPane = function(paneId,isFromSidePane){
- this._slideOutPane(paneId,isFromSidePane);
- };
-}])
-.directive('paneGroup', ['$timeout',function($timeout){
- return {
- restrict: 'EA',
- transclude: true,
- replace: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/paneSelector/paneGroup.html',
- scope:{
- },
- controller: 'PaneGroupCtrl',
- link: function(scope,element,attr,ctrl){
- $timeout(initialize,100);
- function initialize(){
- ctrl.init();
- }
- }
- };
-}]);
-angular.module('att.abs.tooltip', ['att.abs.position', 'att.abs.utilities', 'ngSanitize'])
- // The default options tooltip and popover.
- .constant('tooltipDefaultOptions', {
- placement: 'above',
- animation: false,
- popupDelay: 0,
- stylett: 'dark',
- appendToBody: true
- })
-
- /**
- * The $tooltip service creates tooltip- and popover-like directives as well as
- * houses global options for them.
- */
- .provider('$tooltip', ['tooltipDefaultOptions', function(tooltipDefaultOptions) {
-
- // Default hide triggers for each show trigger
- var triggerMap = {
- 'mouseenter': 'mouseleave',
- 'click': 'click',
- 'focus': 'blur',
- 'mouseover':'mouseout'
- };
-
- // The options specified to the provider globally.
- var globalOptions = {};
-
- this.options = function(value) {
- angular.extend(globalOptions, value);
- };
-
- /**
- * This allows you to extend the set of trigger mappings available. E.g.:
- *
- * $tooltipProvider.setTriggers( 'openTrigger': 'closeTrigger' );
- */
- this.setTriggers = function(triggers) {
- angular.extend(triggerMap, triggers);
- };
-
- /**
- * This is a helper function for translating camel-case to snake-case.
- */
- function snakeCase(name) {
- var regexp = /[A-Z]/g;
- var separator = '-';
- return name.replace(regexp, function(letter, pos) {
- return (pos ? separator : '') + letter.toLowerCase();
- });
- }
-
- /**
- * Returns the actual instance of the $tooltip service.
- */
- this.$get = ['$window', '$compile', '$timeout', '$parse', '$document', '$position', '$interpolate', '$attElementDetach', function($window, $compile, $timeout, $parse, $document, $position, $interpolate, $attElementDetach) {
- return function (type, prefix, defaultTriggerShow) {
- var options = angular.extend({}, tooltipDefaultOptions, globalOptions);
- /**
- * Returns an object of show and hide triggers.
- *
- * If a trigger is supplied,
- * it is used to show the tooltip; otherwise, it will use the `trigger`
- * option passed to the `$tooltipProvider.options` method; else it will
- * default to the trigger supplied to this directive factory.
- *
- * The hide trigger is based on the show trigger. If the `trigger` option
- * was passed to the `$tooltipProvider.options` method, it will use the
- * mapped trigger from `triggerMap` or the passed trigger if the map is
- * undefined; otherwise, it uses the `triggerMap` value of the show
- * trigger; else it will just use the show trigger.
- */
- function getTriggers(trigger) {
- var show = trigger || options.trigger || defaultTriggerShow;
- var hide = triggerMap[show] || show;
- return {
- show: show,
- hide: hide
- };
- }
-
- var directiveName = snakeCase(type);
-
- var startSym = $interpolate.startSymbol();
- var endSym = $interpolate.endSymbol();
-
- return {
- restrict: 'EA',
- scope: true,
- link: function (scope, element, attrs) {
- /* Allows a developer to force element to be non-tabable */
- if (!element.attr('tabindex')) {
- element.attr('tabindex', '0');
- }
-
- var isElementHovered = false;
- element.bind('mouseenter', function(){
- isElementHovered = true;
- element.removeAttr('title');
- });
- element.bind('mouseleave', function(){
- isElementHovered = false;
- // setTooltipAriaLabel();
- });
-
- /* We store our attributes on our scope so any user of $tooltip service can access attributes */
- scope.parentAttrs = attrs;
- var template =
- '<div ' + directiveName + '-popup ' +
- 'title="' + startSym + 'tt_title' + endSym + '" ' +
- 'content="' + startSym + 'tt_content' + endSym + '" ' +
- 'placement="' + startSym + 'tt_placement' + endSym + '" ' +
- 'animation="tt_animation()" ' +
- 'is-open="tt_isOpen" ' +
- 'stylett="' + startSym + 'tt_style' + endSym + '" ' +
- '>' +
- '</div>';
-
- var tooltip = $compile(template)(scope);
- var transitionTimeout;
- var popupTimeout;
- var $body;
- var appendToBody = angular.isDefined(options.appendToBody) ? options.appendToBody : false;
- var triggers = getTriggers(undefined);
- var hasRegisteredTriggers = false;
- var hasEnableExp = angular.isDefined(attrs[prefix + 'Enable']);
- var tooltipOffset = 0;
- var tooltipAriaLabelDefined = false;
-
- // By default, the tooltip is not open.
- // add ability to start tooltip opened
- scope.tt_isOpen = false;
-
- //Adding a scope watch, to remove the created popup from DOM, incase it is updated outside the provider code.
- scope.$watch('tt_isOpen', function(newVal, oldVal){
- if(newVal !== oldVal && !newVal){
- $attElementDetach(tooltip[0]);
- }
- });
-
- function toggleTooltipBind() {
- if (!scope.tt_isOpen) {
- showTooltipBind();
- } else {
- hideTooltipBind();
- }
- }
-
- // Show the tooltip with delay if specified, otherwise show it immediately
- function showTooltipBind() {
- if (hasEnableExp && !scope.$eval(attrs[prefix + 'Enable'])) {
- return;
- }
- if (scope.tt_popupDelay) {
- popupTimeout = $timeout(show, scope.tt_popupDelay);
- } else {
- scope.$apply(show);
- }
- }
-
- function hideTooltipBind() {
- scope.$apply(function() {
- hide();
- });
- }
-
- // Show the tooltip popup element.
- function show() {
- var position,
- ttWidth,
- ttHeight,
- ttPosition;
-
- // Don't show empty tooltips.
- if (!scope.tt_content) {
- return;
- }
-
- // If there is a pending remove transition, we must cancel it, lest the
- // tooltip be mysteriously removed.
- if (transitionTimeout) {
- $timeout.cancel(transitionTimeout);
- }
-
- // Set the initial positioning.
- tooltip.css({top: 0, left: 0, display: 'block', 'z-index': 9999});
-
- // Now we add it to the DOM because need some info about it. But it's not
- // visible yet anyway.
- if (appendToBody) {
- $body = $body || $document.find('body');
- $body.append(tooltip);
- } else {
- element.after(tooltip);
- }
-
- // Get the position of the directive element.
- position = appendToBody ? $position.offset(element) : $position.position(element);
-
- // Get the height and width of the tooltip so we can center it.
- ttWidth = tooltip.prop('offsetWidth');
- ttHeight = tooltip.prop('offsetHeight');
-
- // Calculate the tooltip's top and left coordinates to center it with
- // this directive.
- var ttArrowOffset = 10;
- switch (scope.tt_placement) {
- case 'right':
- if(appendToBody){
- ttPosition = {
- top: position.top + position.height / 2 - ttHeight / 2,
- left: (position.left + position.width) + tooltipOffset
- };
- }else{
- ttPosition = {
- top: position.top + position.height / 2 - ttHeight / 2,
- left: (position.left + position.width + ttArrowOffset) + tooltipOffset
- };
- }
- break;
- case 'below':
- if(appendToBody){
- ttPosition = {
- top: (position.top + position.height) + tooltipOffset,
- left: position.left + position.width / 2 - ttWidth / 2
- };
- }else{
- ttPosition = {
- top: (position.top + position.height + ttArrowOffset) + tooltipOffset,
- left: position.left + position.width / 2 - ttWidth / 2
- };
- }
- break;
- case 'left':
- if(appendToBody){
- ttPosition = {
- top: position.top + position.height / 2 - ttHeight / 2,
- left: (position.left - ttWidth) - tooltipOffset
- };
- }else{
- ttPosition = {
- top: position.top + position.height / 2 - ttHeight / 2,
- left: (position.left - ttWidth - ttArrowOffset) - tooltipOffset
- };
- }
- break;
- default:
- if(appendToBody){
- ttPosition = {
- top: (position.top - ttHeight) - tooltipOffset,
- left: position.left + position.width / 2 - ttWidth / 2
- };
- }else{
- ttPosition = {
- top: (position.top - ttHeight - ttArrowOffset) - tooltipOffset,
- left: position.left + position.width / 2 - ttWidth / 2
- };
- }
- break;
- }
-
- ttPosition.top += 'px';
- ttPosition.left += 'px';
-
- // Now set the calculated positioning.
- tooltip.css(ttPosition);
-
- // And show the tooltip.
- scope.tt_isOpen = true;
- }
-
- // Hide the tooltip popup element.
- function hide() {
- // First things first: we don't show it anymore.
- scope.tt_isOpen = false;
-
- //if tooltip is going to be shown after delay, we must cancel this
- $timeout.cancel(popupTimeout);
-
- // And now we remove it from the DOM. However, if we have animation, we
- // need to wait for it to expire beforehand.
- // This is a placeholder for a port of the transitions library.
- if (angular.isDefined(scope.tt_animation) && scope.tt_animation()) {
- transitionTimeout = $timeout(function() {
- $attElementDetach(tooltip[0]);
- }, 500);
- } else {
- $attElementDetach(tooltip[0]);
- }
- }
-
- function setTooltipAriaLabel() {
- element.removeAttr('title');
- if(!isElementHovered){
- if (tooltipAriaLabelDefined) {
- element.attr('title', scope.tooltipAriaLabel);
- } else {
- element.attr('title', scope.tt_content);
- }
- }
- }
-
- /**
- * Observe the relevant attributes.
- */
- attrs.$observe(type, function(val) {
- if (val) {
- scope.tt_content = val;
- // setTooltipAriaLabel();
- } else {
- if (scope.tt_isOpen) {
- hide();
- }
- }
- });
-
- attrs.$observe(prefix + 'Title', function(val) {
- scope.tt_title = val;
- });
-
- attrs.$observe(prefix + 'Placement', function(val) {
- scope.tt_placement = angular.isDefined(val) ? val : options.placement;
- });
-
- attrs.$observe(prefix + 'Style', function(val) {
- scope.tt_style = angular.isDefined(val) ? val : options.stylett;
- });
-
- attrs.$observe(prefix + 'Animation', function(val) {
- scope.tt_animation = angular.isDefined(val) ? $parse(val) : function() {
- return options.animation;
- };
- });
-
- attrs.$observe(prefix + 'PopupDelay', function(val) {
- var delay = parseInt(val, 10);
- scope.tt_popupDelay = !isNaN(delay) ? delay : options.popupDelay;
- });
-
- attrs.$observe(prefix + 'Trigger', function(val) {
-
- if (hasRegisteredTriggers) {
- element.unbind(triggers.show, showTooltipBind);
- element.unbind(triggers.hide, hideTooltipBind);
- }
-
- triggers = getTriggers(val);
-
- /* This fixes issue in which a click on input field with trigger as focus
- causes focus to fire following click thus making tooltip flash. */
- if (triggers.show === 'focus') {
- element.bind('focus', showTooltipBind);
- element.bind('blur', hideTooltipBind);
- element.bind('click', function(e) {
- e.stopPropagation();
- });
- } else if (triggers.show === triggers.hide) {
- element.bind(triggers.show, toggleTooltipBind);
- } else {
- element.bind(triggers.show, showTooltipBind);
- element.bind(triggers.hide, hideTooltipBind);
- }
-
- hasRegisteredTriggers = true;
- });
-
- attrs.$observe(prefix + 'AppendToBody', function (val) {
- appendToBody = angular.isDefined(val) ? $parse(val)(scope) : appendToBody;
- });
-
- attrs.$observe(prefix + 'Offset', function (val) {
- tooltipOffset = angular.isDefined(val) ? parseInt(val, 10) : 0;
- });
-
- attrs.$observe(prefix + 'AriaLabel', function (val) {
- if (angular.isDefined(val)) {
- scope.tooltipAriaLabel = val;
- tooltipAriaLabelDefined = true;
- } else {
- tooltipAriaLabelDefined = false;
- }
- setTooltipAriaLabel();
- });
-
- // if a tooltip is attached to <body> we need to remove it on
- // location change as its parent scope will probably not be destroyed
- // by the change.
- if (appendToBody) {
- scope.$on('$locationChangeSuccess', function() {
- if (scope.tt_isOpen) {
- hide();
- }
- });
- }
-
- // Make sure tooltip is destroyed and removed.
- scope.$on('$destroy', function() {
- if (scope.tt_isOpen) {
- hide();
- } else {
- tooltip.remove();
- }
- });
- }
- };
- };
- }];
- }])
-
- .directive('tooltipPopup', ['$document', '$documentBind', function($document, $documentBind) {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- scope: {content: '@', placement: '@', animation: '&', isOpen: '=', stylett: '@'},
- templateUrl: 'app/scripts/ng_js_att_tpls/tooltip/tooltip-popup.html',
- link: function(scope, elem) {
- scope.$watch("isOpen", function() {
- scope.isOpen;
- });
- elem.bind('click', function (e) {
- e.stopPropagation();
- });
- var outsideClick = function() {
- scope.$apply(function() {
- scope.isOpen = false;
- });
- };
-
- $documentBind.event('click', 'isOpen', outsideClick, scope, true, 10);
- }
- };
- }])
-
- .directive('tooltip', ['$tooltip', function($tooltip) {
- return $tooltip('tooltip', 'tooltip', 'mouseenter');
- }])
-
- .directive('tooltipCondition', [ '$timeout',function($timeout) {
- return {
- restrict: 'EA',
- replace: true,
- scope:{
- tooltipCondition:"@?"
- },
- template:'<p><span tooltip=\"{{tooltipCondition}}\" ng-if=\"showpop\">{{tooltipCondition}}</span><span id=\"innerElement\" ng-hide=\"showpop\">{{tooltipCondition}}</span></p>',
- link: function(scope, elem, attr){
- scope.showpop=false;
- if(attr.height==='true'){
- $timeout(function () {
- var maxHeight=(elem[0].offsetHeight);
- var elemHeight=elem.children(0)[0].offsetHeight;
- if(elemHeight > maxHeight){
- scope.showpop=true;
- }
- });
- }
- else if(scope.tooltipCondition.length>=25){
- scope.showpop=true;
- }
- }
- };
- }]);
-angular.module('att.abs.popOvers', ['att.abs.tooltip', 'att.abs.utilities', 'ngSanitize'])
- .directive('popover', ['$tooltip', function($tooltip) {
- return $tooltip('popover', 'popover', 'click');
- }])
- .directive('popoverPopup', ['$document', '$documentBind', '$timeout', 'events', 'DOMHelper', function($document, $documentBind, $timeout, events, DOMHelper) {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/popOvers/popOvers.html',
- scope: {content: '@', placement: '@', animation: '&', isOpen: '=', stylett: '@'},
- link: function(scope, elem, attr, ctrl) {
-
- scope.closeable = false;
- try {
- scope.closeable = scope.$parent.parentAttrs['closeable'] === '' ? true : false;
- } catch (e) {}
-
- /* Before opening modal, find the focused element */
- var launchingElement = undefined,
- firstTabableElement = undefined;
-
- var outsideClick = function(evt) {
- scope.$apply(function() {
- scope.isOpen = false;
- });
- };
- var escKeydown = function(evt) {
- if (evt.which === 27 || evt.keyCode === 27) {
- console.log('ESC was pressed!');
- scope.$apply(function() {
- scope.isOpen = false;
- });
- }
- };
-
- $timeout(function() {
- firstTabableElement = DOMHelper.firstTabableElement(elem);
- }, 10, false);
-
- scope.$watch('isOpen', function(value) {
- if (scope.isOpen) {
- launchingElement = document.activeElement;
- /* Focus on first tabbable element */
- if (angular.isDefined(firstTabableElement)) {
- try {
- firstTabableElement.focus();
- } catch(e) {}
- }
- } else {
- if (angular.isDefined(launchingElement)) {
- try {
- launchingElement.focus();
- } catch (e) {} /* IE8 will throw exception */
- }
- }
- });
-
- scope.$watch("stylett", function(value) {
- scope.popOverStyle = value;
- });
-
- scope.$watch("placement", function(value) {
- scope.popOverPlacement = value;
- });
-
- scope.closeMe = function(){
- scope.isOpen = false;
- };
-
- elem.bind('click', function (e) {
- events.stopPropagation(e);
- });
-
- $documentBind.event('click', 'isOpen', outsideClick, scope, true, 10);
- $documentBind.event('keydown', 'isOpen', escKeydown, scope, true, 10);
- }
- };
- }]);
-
-angular.module('att.abs.profileCard', [])
- .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('profileCard',['$http','$q','profileStatus', function($http,$q,profileStatus) {
- return {
- restrict: 'EA',
- replace:'true',
- templateUrl:function(element, attrs){
- if(!attrs.addUser){
- return 'app/scripts/ng_js_att_tpls/profileCard/profileCard.html';
- }
- else{
- return 'app/scripts/ng_js_att_tpls/profileCard/addUser.html';
- }
- },
- scope:{
- profile:'='
- },
- link: function(scope, elem, attr){
- 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";
- }
- }
- }
- };
- }]);
-angular.module('att.abs.progressBars', [])
-
-.directive('attProgressBar', [function(){
- return {
- restrict: 'A',
- replace: true,
- templateUrl : 'app/scripts/ng_js_att_tpls/progressBars/progressBars.html'
- };
-}]);
-angular.module('att.abs.radio', [])
- .constant('attRadioConfig', {
- activeClass : "att-radio--on",
- disabledClass : "att-radio--disabled"
- })
-.directive('attRadio', ['$compile','attRadioConfig', function ($compile, attRadioConfig) {
- return {
- scope: {},
- restrict: 'A',
- require: 'ngModel',
- link: function (scope, element, attr, ctrl) {
- var ngCtrl = ctrl;
- scope.radioVal='';
- var parentDiv = angular.element('<div att-accessibility-click="13,32" ng-click="updateModel($event)" class="att-radio"></div>');
- element.attr("value",attr.attRadio);
- element.removeAttr("att-radio");
- element.removeAttr("title");
- element.attr("ng-model","radioVal");
- parentDiv.append(element.prop('outerHTML'));
- parentDiv.append('<div class="att-radio__indicator"></div>');
- parentDiv.attr("title", attr.title);
-
- var elm = parentDiv.prop('outerHTML');
- elm = $compile(elm)(scope);
- element = element.replaceWith(elm);
- var radioElm = elm.find("input");
-
- radioElm.on('focus', function() {
- elm.css("outline","2px solid #5E9ED6");
- // elm.css("outline","-mos-focus-ring-color auto 5px");
- elm.css("outline","-webkit-focus-ring-color auto 5px");
-
- });
- radioElm.on('blur', function() {
- elm.css("outline","none");
- });
-
- ngCtrl.$render = function () {
- scope.radioVal = ngCtrl.$modelValue;
- var selected = angular.equals(ngCtrl.$modelValue, attr.attRadio);
- elm.toggleClass(attRadioConfig.activeClass, selected);
- };
-
- scope.updateModel = function () {
- radioElm[0].focus();
- var isActive = elm.hasClass(attRadioConfig.activeClass);
-
- if (!isActive && !scope.disabled) {
- ngCtrl.$setViewValue(isActive ? null : attr.attRadio);
- ngCtrl.$render();
- }
- };
-
- attr.$observe('disabled', function (val) {
- scope.disabled = (val || val === "disabled" || val === "true");
- if (scope.disabled){
- elm.addClass(attRadioConfig.disabledClass);
- elm.attr("tabindex", "-1");
- }else {
- elm.removeClass(attRadioConfig.disabledClass);
- elm.attr("tabindex", "0");
- }
- });
- }
- };
-}]);
-angular.module('att.abs.scrollbar', ['att.abs.position'])
-
-.constant('attScrollbarConstant', {
- defaults: {
- // Vertical or horizontal scrollbar? ( x || y ).
- axis: 'y',
- // Whether navigation pane is required of not.
- navigation: false,
- // Enable or disable the mousewheel.
- wheel: true,
- // How many pixels must the mouswheel scroll at a time.
- wheelSpeed: 40,
- // Lock default scrolling window when there is no more content.
- wheelLock: true,
- //// Enable invert style scrolling
- scrollInvert: false,
- // Set the size of the scrollbar to auto or a fixed number.
- trackSize: false,
- // Set the size of the thumb to auto or a fixed number.
- thumbSize: false,
- // Set to false to hide the scrollbar if not being used
- alwaysVisible: true
- }
-})
-
-.directive('attScrollbar', ['$window', '$timeout', '$parse', '$animate', 'attScrollbarConstant', '$position', function ($window, $timeout, $parse, $animate, attScrollbarConstant, $position) {
- return {
- restrict: 'A',
- scope: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/scrollbar/scrollbar.html',
- controller: ['$scope', '$element', '$attrs', function ($scope, $element, $attrs) {
- var defaults = {
- axis: $attrs.attScrollbar || attScrollbarConstant.defaults.axis,
- navigation: $attrs.navigation || attScrollbarConstant.defaults.navigation,
- wheel: attScrollbarConstant.defaults.wheel,
- wheelSpeed: attScrollbarConstant.defaults.wheelSpeed,
- wheelLock: attScrollbarConstant.defaults.wheelLock,
- scrollInvert: attScrollbarConstant.defaults.scrollInvert,
- trackSize: attScrollbarConstant.defaults.trackSize,
- thumbSize: attScrollbarConstant.defaults.thumbSize,
- alwaysVisible: attScrollbarConstant.defaults.alwaysVisible
- };
- var options = $attrs.scrollbar;
- if (options) {
- options = $parse(options)($scope);
- } else {
- options = {};
- }
- this.options = angular.extend({}, defaults, options);
- this._defaults = defaults;
-
- var self = this,
- $body = angular.element(document.querySelectorAll('body')[0]),
- $document = angular.element(document),
- $viewport = angular.element($element[0].querySelectorAll('.scroll-viewport')[0]),
- $overview = angular.element($element[0].querySelectorAll('.scroll-overview')[0]),
- $scrollbar = angular.element($element[0].querySelectorAll('.scroll-bar')[0]),
- $thumb = angular.element($element[0].querySelectorAll('.scroll-thumb')[0]),
- mousePosition = 0,
- isHorizontal = this.options.axis === 'x',
- hasTouchEvents = false,
- // Modern browsers support "wheel"
- wheelEvent = ("onwheel" in document ? "wheel" :
- // Webkit and IE support at least "mousewheel"
- document.onmousewheel !== undefined ? "mousewheel" :
- // let's assume that remaining browsers are older Firefox
- "DOMMouseScroll"),
- sizeLabel = isHorizontal ? 'width' : 'height',
- sizeLabelCap = sizeLabel.charAt(0).toUpperCase() + sizeLabel.slice(1).toLowerCase(),
- posiLabel = isHorizontal ? 'left' : 'top',
- // moveEvent = document.createEvent('HTMLEvents'),
- restoreVisibilityAfterWheel,
- thumbscrolltouch = false,
- documnetscrolltouch = false;
- if (('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {
- hasTouchEvents = true;
- }
-
- //moveEvent.initEvent('move', true, true);
- this.contentPosition = 0;
- this.viewportSize = 0;
- this.contentSize = 0;
- this.contentRatio = 0;
- this.trackSize = 0;
- this.trackRatio = 0;
- this.thumbSize = 0;
- this.thumbPosition = 0;
-
- this.initialize = function () {
- if (!this.options.alwaysVisible) {
- $scrollbar.css('opacity', 0);
- }
- self.update();
- setEvents();
- return self;
- };
-
- this.setSizeData = function () {
- this.viewportSize = $viewport.prop('offset' + sizeLabelCap) || 1;
- this.contentSize = $overview.prop('scroll' + sizeLabelCap) || 1;
- this.contentRatio = this.viewportSize / this.contentSize;
- this.trackSize = this.options.trackSize || this.viewportSize;
- this.thumbSize = Math.min(this.trackSize, Math.max(0, (this.options.thumbSize || (this.trackSize * this.contentRatio))));
- this.trackRatio = this.options.thumbSize ? (this.contentSize - this.viewportSize) / (this.trackSize - this.thumbSize) : (this.contentSize / this.trackSize);
- };
-
- this.update = function (scrollTo) {
- self.setSizeData();
- mousePosition = $scrollbar.prop('offsetTop');
-
- $scrollbar.toggleClass('disable', this.contentRatio >= 1 || isNaN(this.contentRatio));
-
- if (!this.options.alwaysVisible && this.contentRatio < 1 && this.viewportSize > 0) {
- //flash the scrollbar when update happens
- $animate.addClass($scrollbar, 'visible').then(function () {
- $animate.removeClass($scrollbar, 'visible');
- $scope.$digest();
- });
- }
-
- if (scrollTo !== null) {
- if (scrollTo === 'bottom') {
- this.contentPosition = this.contentSize - this.viewportSize;
- } else {
- this.contentPosition = parseInt(scrollTo, 10) || 0;
- }
- }
-
- ensureContentPosition();
- $thumb.css(posiLabel, self.contentPosition / self.trackRatio + 'px');
- $scrollbar.css(sizeLabel, self.trackSize + 'px');
- $thumb.css(sizeLabel, self.thumbSize + 'px');
- $overview.css(posiLabel, -self.contentPosition + 'px');
-
- return this;
- };
-
- fireEvent = function (obj, evt) {
- var fireOnThis = obj;
- var evtObj;
- if (document.createEvent) {
- // alert("FF");
- evtObj = document.createEvent('HTMLEvents');
- evtObj.initEvent(evt, true, false);
- fireOnThis.dispatchEvent(evtObj);
- } else if (document.createEventObject) {
- // alert("IE8");
- evtObj = document.createEventObject();
- fireOnThis.fireEvent('on' + evt, evtObj);
- }
- };
-
- function ensureContentPosition() {
- // if scrollbar is on, ensure the bottom of the content does not go above the bottom of the viewport
- if (self.contentRatio <= 1 && self.contentPosition > self.contentSize - self.viewportSize) {
- self.contentPosition = self.contentSize - self.viewportSize;
- }
- // if scrollbar is off, ensure the top of the content does not go below the top of the viewport
- else if (self.contentRatio > 1 && self.contentPosition > 0) {
- self.contentPosition = 0;
- }
-
- if (self.contentPosition <= 0) {
- $scope.prevAvailable = false;
- } else {
- $scope.prevAvailable = true;
- }
-
- if (self.contentPosition >= (self.contentSize - self.viewportSize)) {
- $scope.nextAvailable = false;
- } else {
- $scope.nextAvailable = true;
- }
- }
-
- function setEvents() {
- if (hasTouchEvents) {
- $viewport.on('touchstart', touchstart);
- $thumb.on('touchstart', touchstart);
- } else {
- $thumb.on('mousedown', start);
- $scrollbar.on('mousedown', drag);
- }
-
- angular.element($window).on('resize', resize);
-
- if (self.options.wheel) {
- $element.on(wheelEvent, wheel);
- }
- }
-
- function resize() {
- self.update();
- }
-
- function touchstart(event) {
- if (1 === event.touches.length) {
- event.stopPropagation();
- start(event.touches[0]);
- }
- }
-
- function start(event) {
- $body.addClass('scroll-no-select');
- $element.addClass('scroll-no-select');
-
- if (!self.options.alwaysVisible) {
- $scrollbar.addClass('visible');
- }
- mousePosition = isHorizontal ? event.clientX : event.clientY;
- self.thumbPosition = parseInt($thumb.css(posiLabel), 10) || 0;
-
- if (hasTouchEvents) {
- documnetscrolltouch = false;
- thumbscrolltouch = false;
- $viewport.on('touchmove', touchdrag);
- $viewport.on('touchend', end);
- $thumb.on('touchmove', touchdragthumb);
- $thumb.on('touchend', end);
- } else {
- $document.on('mousemove', drag);
- $document.on('mouseup', end);
- $thumb.on('mouseup', end);
- }
- }
-
- function wheel(event) {
- if (self.contentRatio >= 1) {
- return;
- }
-
- if (!self.options.alwaysVisible) {
- //cancel removing visibility if wheel event is triggered before the timeout
- if (restoreVisibilityAfterWheel) {
- $timeout.cancel(restoreVisibilityAfterWheel);
- }
- $scrollbar.addClass('visible');
-
- restoreVisibilityAfterWheel = $timeout(function () {
- $scrollbar.removeClass('visible');
- }, 100);
- }
-
- var evntObj = (event && event.originalEvent) || event || $window.event,
- deltaDir = self.options.axis.toUpperCase(),
- delta = {
- X: evntObj.deltaX || 0,
- Y: evntObj.deltaY || 0
- },
- wheelSpeed = evntObj.deltaMode === 0 ? self.options.wheelSpeed : 1;
-
- if (self.options.scrollInvert) {
- wheelSpeed *= -1;
- }
-
- if (wheelEvent === 'mousewheel') {
- delta.Y = -1 * evntObj.wheelDelta / 40;
- if (evntObj.wheelDeltaX) {
- delta.X = -1 * evntObj.wheelDeltaX / 40;
- }
- }
- delta.X *= -1 / wheelSpeed;
- delta.Y *= -1 / wheelSpeed;
-
- var wheelSpeedDelta = delta[deltaDir];
-
- self.contentPosition -= wheelSpeedDelta * self.options.wheelSpeed;
- self.contentPosition = Math.min((self.contentSize - self.viewportSize), Math.max(0, self.contentPosition));
-
- fireEvent($element[0], 'move');
-
- ensureContentPosition();
- $thumb.css(posiLabel, self.contentPosition / self.trackRatio + 'px');
- $overview.css(posiLabel, -self.contentPosition + 'px');
-
- if (self.options.wheelLock || (self.contentPosition !== (self.contentSize - self.viewportSize) && self.contentPosition !== 0)) {
- evntObj.preventDefault();
- }
-
- $scope.$apply();
- }
-
- function touchdrag(event) {
- event.preventDefault();
- documnetscrolltouch = true;
- drag(event.touches[0]);
- }
-
- function touchdragthumb(event) {
- event.preventDefault();
- thumbscrolltouch = true;
- drag(event.touches[0]);
- }
-
- function drag(event) {
- if (self.contentRatio >= 1) {
- return;
- }
-
- var mousePositionNew = isHorizontal ? event.clientX : event.clientY,
- thumbPositionDelta = mousePositionNew - mousePosition;
-
- if ((self.options.scrollInvert && !hasTouchEvents) ||
- (hasTouchEvents && !self.options.scrollInvert)) {
- thumbPositionDelta = mousePosition - mousePositionNew;
- }
- if (documnetscrolltouch && hasTouchEvents) {
- thumbPositionDelta = mousePosition - mousePositionNew;
- }
- if (thumbscrolltouch && hasTouchEvents) {
- thumbPositionDelta = mousePositionNew - mousePosition;
- }
- var thumbPositionNew = Math.min((self.trackSize - self.thumbSize), Math.max(0, self.thumbPosition + thumbPositionDelta));
- self.contentPosition = thumbPositionNew * self.trackRatio;
-
- fireEvent($element[0], 'move');
-
- ensureContentPosition();
- $thumb.css(posiLabel, thumbPositionNew + 'px');
- $overview.css(posiLabel, -self.contentPosition + 'px');
-
- $scope.$apply();
- }
-
- $scope.customScroll = function (direction) {
- if (self.contentRatio >= 1) {
- return;
- }
-
- var customScrollDelta;
- var viewportDimension = $position.position($viewport);
-
- if (isHorizontal) {
- customScrollDelta = viewportDimension.width;
- } else {
- customScrollDelta = viewportDimension.height;
- }
-
- if (direction) {
- self.contentPosition += customScrollDelta;
- } else {
- self.contentPosition -= customScrollDelta;
- }
- self.contentPosition = Math.min((self.contentSize - self.viewportSize), Math.max(0, self.contentPosition));
-
- fireEvent($element[0], 'move');
-
- ensureContentPosition();
- $thumb.css(posiLabel, self.contentPosition / self.trackRatio + 'px');
- $overview.css(posiLabel, -self.contentPosition + 'px');
- };
-
- function end() {
- $body.removeClass('scroll-no-select');
- $element.removeClass('scroll-no-select');
- if (!self.options.alwaysVisible) {
- $scrollbar.removeClass('visible');
- }
- $document.off('mousemove', drag);
- $document.off('mouseup', end);
- $thumb.off('mouseup', end);
- $document.off('touchmove', touchdrag);
- $document.off('ontouchend', end);
- $thumb.off('touchmove', touchdragthumb);
- $thumb.off('touchend', end);
- }
-
- this.cleanup = function () {
- $viewport.off('touchstart', touchstart);
- $thumb.off('mousedown', start);
- $scrollbar.off('mousedown', drag);
- $thumb.off('touchmove', touchdragthumb);
- $thumb.off('touchend', end);
- angular.element($window).off('resize', resize);
- $element.off(wheelEvent, wheel);
- //ensure scrollbar isn't activated
- self.options.alwaysVisible = true;
- end();
- };
- }],
- link: function (scope, iElement, iAttrs, controller) {
- scope.navigation = controller.options.navigation;
- scope.viewportHeight = iAttrs.viewportHeight;
- scope.viewportWidth = iAttrs.viewportWidth;
- scope.scrollbarAxis = controller.options.axis;
- if (scope.scrollbarAxis === 'x') {
- iElement.addClass('horizontal');
- } else if (scope.scrollbarAxis === 'y') {
- iElement.addClass('vertical');
- }
-
- var position = iElement.css('position');
- if (position !== 'relative' && position !== 'absolute') {
- iElement.css('position', 'relative');
- }
-
- scope.$watch(function () {
- $timeout(refreshScrollbar, 100, false);
- });
-
- var refreshScrollbar = function () {
- var $overview = angular.element(iElement[0].querySelectorAll('.scroll-overview')[0]);
- var newValue = $overview.prop('scrollHeight');
- var oldValue = scope.oldValue;
- if (newValue !== oldValue) {
- scope.oldValue = newValue;
- controller.update();
- }
- };
-
- controller.initialize();
- iElement.on('$destroy', function () {
- controller.cleanup();
- });
- }
- };
-}]);
-
-angular.module('att.abs.search', ['att.abs.utilities', 'att.abs.position', 'att.abs.utilities'])
-.directive('attSearch', ['$document', '$filter', '$isElement', '$documentBind', '$timeout', '$log', 'keymap', function($document, $filter, $isElement, $documentBind, $timeout, $log, keymap){
- return{
- restrict: 'A',
- scope:{cName: '=attSearch'},
- transclude: false,
- replace: false,
- require:'ngModel',
- templateUrl: 'app/scripts/ng_js_att_tpls/search/search.html',
- link: function(scope, element, attr, ctrl) {
- scope.selectedIndex = -1;
- scope.selectedOption = attr.placeholder;
- scope.isDisabled = false;
- scope.className = "select2-match";
- scope.showSearch = false;
- scope.showlist = false;
-
- // This is used to jump to elements in list
- var search = '';
- // This is used to ensure searches only persist so many ms.
- var prevSearchDate = new Date();
- // This is used to shift focus back after closing dropdown
- var dropdownElement = undefined;
- // Used to ensure focus on dropdown elements
- var list = [];
- $timeout(function() {
- list = element.find('li');
- }, 10);
-
- $log.warn('attSearch is deprecated, please use attSelect instead. This component will be removed by version 2.7.')
- //scope.noFilter = true;
- if (attr.noFilter || attr.noFilter === 'true') {
- scope.noFilter = true;
- } else {
- scope.noFilter = false;
- }
- if (attr.placeholderAsOption === 'false') {
- //scope.selectMsg = '';
- scope.selectedOption = attr.placeholder;
- } else {
- scope.selectMsg = attr.placeholder;
- }
- if (attr.startsWithFilter || attr.startsWithFilter === 'true') {
- scope.startsWithFilter = true;
- }
- if (attr.showInputFilter === 'true') {
- scope.showSearch = false;
- $log.warn('showInputFilter functionality has been removed from the library.');
- // This is deprecated
- }
- if (attr.disabled) {
- scope.isDisabled = true;
- }
- dropdownElement = angular.element(element).children().eq(0).find('a')[0];
- var prevIndex = 0;
- var selectOptionFromSearch = function() {
- if (!scope.noFilter) {
- return;
- }
-
- // Find next element that matches search criteria.
- // If no element is found, loop to beginning and search.
- var criteria = search;
- var i = 0;
- for (i = prevIndex; i < scope.cName.length; i++) {
- // Need to ensure we keep searching until all startsWith have passed before looping
- if (scope.cName[i].title.startsWith(criteria) && i !== scope.selectedIndex) {
- scope.selectOption(scope.cName[i], i, scope.showlist);
- prevIndex = i;
- search = '';
- break;
- }
- }
- if ((i >= scope.cName.length || !scope.cName[i+1].title.startsWith(criteria)) && prevIndex > 0) {
- prevIndex = 0;
- }
- };
- scope.showDropdown = function() {
- if (!(attr.disabled)) {
- scope.showlist = !scope.showlist;
- scope.setSelectTop();
- }
- };
- element.bind('keydown', function(e) {
- if (keymap.isAllowedKey(e.keyCode) || keymap.isControl(e) || keymap.isFunctionKey(e)) {
- e.preventDefault();
- e.stopPropagation();
-
- switch (e.keyCode) {
- case keymap.KEY.DOWN:
- scope.selectNext();
- break;
- case keymap.KEY.UP:
- scope.selectPrev();
- search = '';
- break;
- case keymap.KEY.ENTER:
- scope.selectCurrent();
- search = '';
- break;
- case keymap.KEY.BACKSPACE:
- scope.title = '';
- search = '';
- scope.$apply();
- break;
- case keymap.KEY.SPACE:
- if (!scope.noFilter) {
- scope.title += ' ';
- }
- scope.$apply();
- break;
- case keymap.KEY.ESC:
- if (scope.title === '' || scope.title === undefined) {
- scope.showlist = false;
- dropdownElement.focus();
- scope.$apply();
- } else {
- scope.title = '';
- scope.$apply();
- }
- if (scope.noFilter) {
- search = '';
- dropdownElement.focus();
- scope.showlist = false;
- }
- break;
- default:
- break;
- }
- } else {
- if (e.keyCode !== 9)
- {
- if (!scope.noFilter) {
- scope.showlist = true;
- scope.title = scope.title ? scope.title + String.fromCharCode(e.keyCode) : String.fromCharCode(e.keyCode);
- } else {
- var date = new Date();
- var delta = Math.abs(prevSearchDate.getMilliseconds() - date.getMilliseconds());
- prevSearchDate = date;
- if (delta > 100) {
- search = '';
- }
- search = search ? search + String.fromCharCode(e.keyCode) : String.fromCharCode(e.keyCode);
- if (search.length > 2) {
- search = search.substring(0, 2);
- }
- selectOptionFromSearch();
- }
- scope.$apply();
- } else if (e.keyCode === 9) {
- scope.showlist = false;
- scope.title = '';
- scope.$apply();
- }
- }
- });
- scope.selectOption = function(sTitle, sIndex, keepOpen) {
- if (sIndex === -1 || sIndex === '-1') {
- scope.selCategory = '';
- scope.selectedIndex = -1;
- ctrl.$setViewValue('');
- if(attr.placeholderAsOption !== 'false')
- {
- scope.selectedOption = scope.selectMsg;
- }
- } else {
- scope.selCategory = scope.cName[sIndex];
- scope.selectedIndex = sIndex;
- ctrl.$setViewValue(scope.selCategory);
- scope.selectedOption = scope.selCategory.title;
- if (angular.isDefined(list[sIndex])) {
- list[sIndex].focus();
- }
- }
- scope.title = '';
- if (!keepOpen) {
- scope.showlist = false;
- dropdownElement.focus();
- }
- scope.$apply();
- };
- scope.selectCurrent = function() {
- if (scope.showlist) {
- scope.selectOption(scope.selectMsg, scope.selectedIndex, false);
- scope.$apply();
- } else {
- scope.showlist = true;
- scope.setSelectTop();
- scope.$apply();
- }
- };
- scope.hoverIn = function(cItem) {
- scope.selectedIndex = cItem;
- scope.focusme();
- };
- scope.setSelectTop = function() {
- $timeout(function() {
- if (scope.showlist && !scope.noFilter)
- {
- var containerUL = angular.element(element)[0].querySelector(".select2-results");
- if(angular.element(containerUL.querySelector('.select2-result-current'))[0])
- {
- var selectedElemTopPos = angular.element(containerUL.querySelector('.select2-result-current'))[0].offsetTop;
- }
- angular.element(containerUL)[0].scrollTop = selectedElemTopPos;
- }
- });
- };
- scope.setCurrentTop = function() {
- $timeout(function() {
- if (scope.showlist) {
- var containerUL = angular.element(element)[0].querySelector(".select2-results");
- if(angular.element(containerUL.querySelector('.hovstyle'))[0])
- {
- var selectedElemTopPos = angular.element(containerUL.querySelector('.hovstyle'))[0].offsetTop;
- }
- if (selectedElemTopPos < (angular.element(containerUL)[0].scrollTop)) {
- angular.element(containerUL)[0].scrollTop -= 30;
- } else if ((selectedElemTopPos + 30) > (angular.element(containerUL)[0].clientHeight)) {
- angular.element(containerUL)[0].scrollTop += 30;
- }
-
- }
- });
- };
- scope.selectNext = function() {
- if ((scope.selectedIndex + 1) <= (scope.cName.length - 1)) {
- scope.selectedIndex += 1;
- if (!scope.showlist) {
- scope.selectOption(scope.selectMsg, scope.selectedIndex, false);
- }
- scope.focusme();
- scope.$apply();
- }
- scope.setCurrentTop();
- };
- scope.selectPrev = function() {
- if ((scope.selectedIndex - 1) >= 0) {
- scope.selectedIndex -= 1;
- if (!scope.showlist) {
- scope.selectOption(scope.selectMsg, scope.selectedIndex, false);
- }
- scope.focusme();
- scope.$apply();
- } else if (scope.selectedIndex - 1 < 0) {
- // If placeholderAsOption is true or undefined (default), ensure we can select it on up key.
- if (attr.placeholderAsOption === undefined || attr.placeholderAsOption === 'true') {
- scope.selectedIndex = -1;
- } else {
- scope.selectedIndex = 0;
- }
- if (!scope.showlist) {
- scope.selectOption(scope.selectMsg, scope.selectedIndex, false);
- }
- scope.focusme();
- scope.$apply();
- }
- scope.setCurrentTop();
- };
- scope.updateSelection = function(sItem) {
- scope.selectedOption = sItem.title;
- scope.title = "";
- };
- scope.focusme = function() {
- $timeout(function() {
- var list = angular.element(element).find('ul').find('li');
- var index = scope.selectedIndex + 2;
- if (scope.noFilter) {
- index = scope.selectedIndex;
- }
- if (angular.isDefined(list[index])) {
- list[index].focus();
- }
- });
- };
- scope.$watch('selCategory', function(value) {
- if (value) {
- scope.updateSelection(value);
- };
- });
- ctrl.$viewChangeListeners.push(function() {
- scope.$eval(attr.ngChange);
- });
- ctrl.$render = function() {
- scope.selCategory = ctrl.$viewValue;
- };
- var outsideClick = function(e) {
- var isElement = $isElement(angular.element(e.target), element, $document);
- if (!isElement) {
- scope.showlist = false;
- dropdownElement.focus();
- scope.$apply();
- }
- };
- $documentBind.click('showlist', outsideClick, scope);
- }
- };
-}]);
-angular.module('att.abs.select', ['att.abs.utilities', 'att.abs.position', 'att.abs.utilities'])
-.directive('attSelect', ["$document", "$filter", "$isElement", '$documentBind', '$timeout', 'keymap', '$log', function($document, $filter, $isElement, $documentBind, $timeout, keymap, $log) {
- return {
- restrict: 'A',
- scope: {
- cName: '=attSelect'
- },
- transclude: false,
- replace: false,
- require: 'ngModel',
- templateUrl: 'app/scripts/ng_js_att_tpls/select/select.html',
- link: function(scope, element, attr, ctrl) {
- scope.selectedIndex = -1;
- scope.selectedOption = attr.placeholder;
- scope.isDisabled = false;
- scope.className = "select2-match";
- scope.showSearch = false;
- scope.showlist = false;
- scope.titleName = attr.titlename;
- scope.$watch('ngModel', function() {
- // console.log('sv:', ctrl.$modelValue);
- });
-
- // This is used to jump to elements in list
- var search = '';
- // This is used to ensure searches only persist so many ms.
- var prevSearchDate = new Date();
- // This is used to shift focus back after closing dropdown
- var dropdownElement = undefined;
- // Used to ensure focus on dropdown elements
- var list = [];
- $timeout(function() {
- list = element.find('li');
- }, 10);
- //scope.noFilter = true;
- if (attr.noFilter || attr.noFilter === 'true') {
- scope.noFilter = true;
- } else {
- scope.noFilter = false;
- }
- if (attr.placeholderAsOption === 'false') {
- scope.selectedOption = attr.placeholder;
- } else {
- scope.selectMsg = attr.placeholder;
- }
- if (attr.startsWithFilter || attr.startsWithFilter === 'true') {
- scope.startsWithFilter = true;
- }
- if (attr.showInputFilter === 'true') {
- scope.showSearch = false;
- /* This is deprecated */
- $log.warn('showInputFilter functionality has been removed from the library.');
- }
- if (attr.disabled) {
- scope.isDisabled = true;
- }
- var getFilterType = function() {
- if (scope.startsWithFilter) {
- return 'startsWith';
- } else {
- return 'filter';
- }
- };
- dropdownElement = angular.element(element).children().eq(0).find('span')[0];
- var prevIndex = 0;
- var selectOptionFromSearch = function() {
- if (!scope.noFilter) {
- return;
- }
-
- // Find next element that matches search criteria.
- // If no element is found, loop to beginning and search.
- var criteria = search;
- var i = 0;
- for (i = prevIndex; i < scope.cName.length; i++) {
- // Need to ensure we keep searching until all startsWith have passed before looping
- if (scope.cName[i].title.startsWith(criteria) && i !== scope.selectedIndex) {
- scope.selectOption(scope.cName[i], i, scope.showlist);
- prevIndex = i;
- search = '';
- break;
- }
- }
- if ((i >= scope.cName.length || !scope.cName[i+1].title.startsWith(criteria)) && prevIndex > 0) {
- prevIndex = 0;
- }
- };
- scope.showDropdown = function() {
- if (!(attr.disabled)) {
- scope.showlist = !scope.showlist;
- scope.setSelectTop();
- /* Ensure selected element is focused upon opening dropdown */
- scope.focusme();
- }
- };
- element.bind('keydown', function(e) {
- if (keymap.isAllowedKey(e.keyCode) || keymap.isControl(e) || keymap.isFunctionKey(e)) {
- e.preventDefault();
- e.stopPropagation();
-
- switch (e.keyCode) {
- case keymap.KEY.DOWN:
- scope.selectNext();
- break;
- case keymap.KEY.UP:
- scope.selectPrev();
- search = '';
- break;
- case keymap.KEY.ENTER:
- scope.selectCurrent();
- search = '';
- break;
- case keymap.KEY.BACKSPACE:
- scope.title = '';
- search = '';
- scope.$apply();
- break;
- case keymap.KEY.SPACE:
- if (!scope.noFilter) {
- scope.title += ' ';
- }
- scope.$apply();
- break;
- case keymap.KEY.ESC:
- if (scope.title === '' || scope.title === undefined) {
- scope.showlist = false;
- dropdownElement.focus();
- scope.$apply();
- } else {
- scope.title = '';
- scope.$apply();
- }
- if (scope.noFilter) {
- search = '';
- dropdownElement.focus();
- scope.showlist = false;
- }
- break;
- default:
- break;
- }
- } else {
- if (e.keyCode !== keymap.KEY.TAB)
- {
- if (!scope.noFilter) {
- scope.showlist = true;
- scope.title = scope.title ? scope.title + String.fromCharCode(e.keyCode) : String.fromCharCode(e.keyCode);
-
- /* Perform index correction */
- if (scope.title != '') {
- var filteredArray = $filter(getFilterType())(scope.cName, scope.title);
-
- for (var i = 0; i < filteredArray.length; i++) {
- for (var j = 0; j < scope.cName.length; j++) {
- if (!angular.isDefined(scope.cName[scope.selectedIndex])) {
- break;
- }
- if (filteredArray[i]['title'] === scope.cName[scope.selectedIndex]['title']) {
- scope.selectedIndex = i;
- scope.focusme();
- break;
- }
- }
- }
- }
- } else {
- var date = new Date();
- var delta = Math.abs(prevSearchDate.getMilliseconds() - date.getMilliseconds());
- prevSearchDate = date;
- if (delta > 100) {
- search = '';
- }
- search = search ? search + String.fromCharCode(e.keyCode) : String.fromCharCode(e.keyCode);
- if (search.length > 2) {
- search = search.substring(0, 2);
- }
- selectOptionFromSearch();
- }
- scope.$apply();
- } else if (e.keyCode === keymap.KEY.TAB) {
- scope.showlist = false;
- scope.title = '';
- scope.$apply();
- }
- }
- });
- scope.selectOption = function(sTitle, sIndex, keepOpen) {
-
- if (sIndex === -1 || sIndex === '-1') {
- scope.selCategory = '';
- scope.selectedIndex = -1;
- ctrl.$setViewValue('');
- if(attr.placeholderAsOption !== 'false')
- {
- scope.selectedOption = scope.selectMsg;
- }
- }
- else {
- /* Apply filter here to remap the selected index and shift focus*/
- if (scope.title != '') {
- var filteredArray = $filter(getFilterType())(scope.cName, scope.title);
-
- if (angular.isDefined(filteredArray) && angular.isDefined(filteredArray[sIndex]))
- {
- for (var i = 0; i < scope.cName.length; i++) {
- if (filteredArray[sIndex]['title'] === scope.cName[i]['title']) {
- sIndex = i;
- break;
- }
- }
- }
- }
- scope.selCategory = scope.cName[sIndex];
- scope.selectedIndex = sIndex;
- ctrl.$setViewValue(scope.selCategory);
- scope.selectedOption = scope.selCategory.title;
- ctrl.$render();
-
- $timeout(function(){
- if (angular.isDefined(list[sIndex])) {
- try{
- list[index].focus();
- } catch (e) {} /* IE8 will throw exception if display:none or not in DOM */
- }
- });
- }
- scope.title = '';
- if (!keepOpen) {
- scope.showlist = false;
- dropdownElement.focus();
- }
- };
- scope.selectCurrent = function() {
- if (scope.showlist) {
- scope.selectOption(scope.selectMsg,scope.selectedIndex,false);
- } else {
- scope.showlist = true;
- scope.setSelectTop();
- }
- scope.$apply();
- };
- scope.hoverIn = function(cItem) {
- scope.selectedIndex = cItem;
- scope.focusme();
- };
- scope.setSelectTop = function() {
- $timeout(function() {
- if (scope.showlist && !scope.noFilter)
- {
- var containerUL = angular.element(element)[0].querySelector(".select2-results");
- if(angular.element(containerUL.querySelector('.select2-result-current'))[0])
- {
- var selectedElemTopPos = angular.element(containerUL.querySelector('.select2-result-current'))[0].offsetTop;
- }
- angular.element(containerUL)[0].scrollTop = selectedElemTopPos;
- }
- });
- };
- scope.setCurrentTop = function() {
- $timeout(function() {
- if (scope.showlist) {
- var containerUL = angular.element(element)[0].querySelector(".select2-results");
- if(angular.element(containerUL.querySelector('.hovstyle'))[0])
- {
- var selectedElemTopPos = angular.element(containerUL.querySelector('.hovstyle'))[0].offsetTop;
- }
- if (selectedElemTopPos < (angular.element(containerUL)[0].scrollTop)) {
- angular.element(containerUL)[0].scrollTop -= 30;
- } else if ((selectedElemTopPos + 30) > (angular.element(containerUL)[0].clientHeight)) {
- angular.element(containerUL)[0].scrollTop += 30;
- }
-
- }
- });
- };
- scope.selectNext = function() {
- var length = scope.cName.length;
-
- if ((scope.selectedIndex + 1) <= (scope.cName.length - 1)) {
- scope.selectedIndex += 1;
- var nextDisabled = scope.cName[scope.selectedIndex].disabled;
- if (nextDisabled) {
- scope.selectedIndex += 1;
- }
- if (!scope.showlist) {
- scope.selectOption(scope.selectMsg, scope.selectedIndex,false);
- }
- scope.focusme();
- scope.$apply();
- }
- scope.setCurrentTop();
- };
- scope.selectPrev = function() {
- if ((scope.selectedIndex - 1) >= 0) {
- scope.selectedIndex -= 1;
- var prevDisabled = scope.cName[scope.selectedIndex].disabled;
- if (prevDisabled) {
- scope.selectedIndex -= 1;
- }
- if (!scope.showlist) {
- scope.selectOption(scope.selectMsg, scope.selectedIndex,false);
- }
- scope.focusme();
- scope.$apply();
- } else if (scope.selectedIndex - 1 < 0) {
- // If placeholderAsOption is true or undefined (default), ensure we can select it on up key.
- if (attr.placeholderAsOption === undefined || attr.placeholderAsOption === 'true') {
- if(attr.placeholder === undefined ){
- scope.selectedIndex = 0;
- }
- else{
- scope.selectedIndex = -1;
- }
- } else {
- scope.selectedIndex = 0;
- }
- if (!scope.showlist) {
- scope.selectOption(scope.selectMsg, scope.selectedIndex,false);
- }
- scope.focusme();
- scope.$apply();
- }
- scope.setCurrentTop();
- };
- scope.updateSelection = function(sItem) {
- scope.selectedOption = sItem.title;
- scope.title = '';
-
- if (sItem.index < 0) {
- scope.selectOption(scope.selectMsg, sItem.index, scope.showlist);
- }
- };
- scope.focusme = function() {
- $timeout(function() {
- var list = angular.element(element).find('ul').find('li');
- var index = scope.selectedIndex + 2;
- if (scope.noFilter) {
- index = scope.selectedIndex;
- }
- if (angular.isDefined(list[index])) {
- try {
- list[index].focus();
- } catch (e) {} /* IE8 will throw exception if display:none or not in DOM */
- }
- });
- };
- scope.$watch('selCategory', function(value) {
- if (value) {
- scope.updateSelection(value);
- };
- });
- ctrl.$viewChangeListeners.push(function() {
- scope.$eval(attr.ngChange);
- });
- ctrl.$render = function() {
- scope.selCategory = ctrl.$viewValue;
- };
- var outsideClick = function(e) {
- var isElement = $isElement(angular.element(e.target), element, $document);
- if (!isElement) {
- scope.showlist = false;
- dropdownElement.focus();
- scope.$apply();
- }
- };
- $documentBind.click('showlist', outsideClick, scope);
- }
- };
-}])
-.directive('textDropdown', ['$document', '$isElement', '$documentBind', "keymap", function($document, $isElement, $documentBind, keymap) {
- return {
- restrict: 'EA',
- replace: true,
- scope: {
- actions: '=actions',
- defaultAction: '=defaultAction',
- onActionClicked: '=?'
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/select/textDropdown.html',
- link: function(scope, element, attr) {
- scope.selectedIndex = 0;
- scope.selectedOption = attr.placeholder;
- scope.isDisabled = false;
- scope.isActionsShown = false;
- var dropdownElement = undefined;
- if (attr.disabled) {
- scope.isDisabled = true;
- }
-
- dropdownElement = element.find('div')[0];
-
- // Set default Action
- if (!angular.isDefined(scope.defaultAction)) {
- scope.currentAction = scope.actions[0];
- scope.selectedIndex = 0;
- } else if (angular.isDefined(scope.defaultAction) || scope.defaultAction !== '') {
- for (var act in scope.actions) {
- if (scope.actions[act] === scope.defaultAction) {
- scope.currentAction = scope.actions[act];
- scope.selectedIndex = scope.actions.indexOf(act);
- scope.isActionsShown = false;
- break;
- }
- }
- } else {
- scope.currentAction = scope.actions[0];
- }
- scope.toggle = function() {
- scope.isActionsShown = !scope.isActionsShown;
- };
- scope.chooseAction = function($event, action, $index) {
- if ($event != null) {
- scope.currentAction = action;
- scope.selectedIndex = $index;
- } else {
- scope.currentAction = scope.actions[scope.selectedIndex];
- }
- if (angular.isFunction(scope.onActionClicked)) {
- scope.onActionClicked(scope.currentAction);
- }
- scope.toggle();
- };
- scope.isCurrentAction = function(action) {
- return (action === scope.currentAction);
- };
- element.bind("keydown", function(e) {
- if (keymap.isAllowedKey(e.keyCode) || keymap.isControl(e) || keymap.isFunctionKey(e)) {
- e.preventDefault();
- e.stopPropagation();
- switch (e.keyCode) {
- case keymap.KEY.DOWN:
- scope.selectNext();
- break;
- case keymap.KEY.UP:
- scope.selectPrev();
- break;
- case keymap.KEY.ENTER:
- scope.selectCurrent();
- break;
- case keymap.KEY.ESC:
- scope.isActionsShown = false;
- dropdownElement.focus();
- scope.$apply();
- break;
- default:
- break;
- }
- scope.$apply();
- return;
- } else if (e.keyCode === keymap.KEY.TAB) {
- scope.isActionsShown = false;
- scope.$apply();
- }
- });
- scope.selectCurrent = function() {
- if (scope.selectedIndex < 0) {
- scope.selectedIndex = 0;
- }
- if (!scope.isActionsShown) {
- scope.toggle();
- } else {
- scope.chooseAction(null, scope.currentAction);
- }
- };
- scope.selectNext = function() {
- if (scope.isActionsShown) {
- if ((scope.selectedIndex + 1) < scope.actions.length) {
- scope.selectedIndex += 1;
- } else {
- scope.selectedIndex = (scope.actions.length - 1);
- }
- scope.$apply();
- }
- };
- scope.selectPrev = function() {
- if (scope.isActionsShown) {
- if ((scope.selectedIndex - 1) >= 0) {
- scope.selectedIndex -= 1;
- } else if (scope.selectedIndex - 1 < 0) {
- scope.selectedIndex = 0;
- }
- scope.$apply();
- }
- };
- scope.hoverIn = function(cItem) {
- scope.selectedIndex = cItem;
- };
- //end cato
- var outsideClick = function(e) {
- var isElement = $isElement(angular.element(e.target), element, $document);
- if (!isElement) {
- scope.toggle();
- scope.$apply();
- }
- };
- $documentBind.click('isActionsShown', outsideClick, scope);
- }
- };
-}]);
-angular.module('att.abs.slider', ['att.abs.position'])
- .constant('sliderDefaultOptions', {
- width: 300,
- step: 1,
- precision: 0,
- disabledWidth: 116
- })
- .directive('attSlider', ['sliderDefaultOptions','$position','$document', function(sliderDefaultOptions,$position,$document)
- {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- scope: {
- floor: "=",
- ceiling: "=",
- step: "@",
- precision: "@",
- width: "@",
- textDisplay: "=",
- value: "=",
- ngModelSingle: '=?',
- ngModelLow: '=?',
- ngModelHigh: '=?',
- ngModelDisabled: '=?'
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/slider/slider.html',
- link: function(scope, elem, attr)
- {
- var minOffset, maxOffset, newOffset, newOffset1, newOffset2, offsetRange, valueRange, start_x = 0, disabledRange, disabled, evFlag = false, minValue, maxValue, range, refLow, refHigh, maxPtr, minPtr, singlePtr, getHandles;
- scope.minPtrOffset = 0;
- scope.maxPtrOffset = 0;
- var disableWidth = sliderDefaultOptions.disabledWidth;
- //Get handles
- var obj = elem.children();
- disabledRange = obj[0].children;
- disabledRange = angular.element(disabledRange[0]);
- getHandles = obj[1].children;
- singlePtr = angular.element(getHandles[0]);
- minPtr = angular.element(getHandles[1]);
- maxPtr = angular.element(getHandles[2]);
- disabled = ((attr.ngModelSingle == null) && (attr.ngModelLow == null) && (attr.ngModelHigh == null)) && (attr.ngModelDisabled != null);
- range = (attr.ngModelSingle == null) && ((attr.ngModelLow != null) && (attr.ngModelHigh != null));
- refLow = 'ngModelLow';
- refHigh = 'ngModelHigh';
- if (!range) {
- minPtr.remove();
- maxPtr.remove();
- }
- else {
- singlePtr.remove();
- }
- if (!disabled) {
- disabledRange.remove();
- }
- else {
- scope.disabledStyle = {width: disableWidth + 'px', zIndex: 1};
- scope.handleStyle = {left: disableWidth + 'px'};
- }
- minValue = parseFloat(scope.floor);
- maxValue = parseFloat(scope.ceiling);
- valueRange = maxValue - minValue;
- minOffset = 0;
- if (attr.width !== undefined) {
- maxOffset = attr.width;
- }
- else {
- if (elem[0].clientWidth !== 0) {
- maxOffset = elem[0].clientWidth;
- }
- else {
- maxOffset = sliderDefaultOptions.width;
- }
- }
- offsetRange = maxOffset - minOffset;
- //Key Down Event
- scope.keyDown = function(ev){
- if(ev.keyCode === 39){
- var elemLeft = $position.position(elem).left;
- if (newOffset){
- if(scope.ref === "ngModelLow"){
- newOffset1 = sliderDefaultOptions.step + newOffset1;
- newOffset = newOffset1;
- }
- else if(scope.ref === "ngModelHigh"){
- newOffset2 = sliderDefaultOptions.step + newOffset2;
- newOffset = newOffset2;
- }
- else{newOffset = sliderDefaultOptions.step + newOffset;}
- }
- else {
- if(range &&scope.ref === "ngModelLow"){
- return;
- }
- else {
- newOffset = sliderDefaultOptions.step + elemLeft;
- newOffset1 = newOffset2 = newOffset;
- }
- }
- }
- else if(ev.keyCode === 37){
- var ptrLeft = $position.position(singlePtr).left;
- if(newOffset){
- if (!(newOffset<=0)){
- if(scope.ref === "ngModelLow"){
- newOffset1 = newOffset1 - sliderDefaultOptions.step;
- newOffset = newOffset1;
- }
- else if(scope.ref === "ngModelHigh"){
- newOffset2 = newOffset2 - sliderDefaultOptions.step;
- newOffset = newOffset2;
- }
- else {
- newOffset = newOffset - sliderDefaultOptions.step;
- newOffset1 = newOffset2 = newOffset;
- }
- }
- }
- else {
- newOffset = ptrLeft - sliderDefaultOptions.step;
- }
- }
- if(newOffset>=0){
- scope.ptrOffset(newOffset);
- }
- };
- //Mouse Down Event
- scope.mouseDown = function(e, ref) {
- scope.ref = ref;
- evFlag = true;
- if (!range){
- if (newOffset)
- {
- start_x = e.clientX - newOffset;
- }
- else {
- start_x = e.clientX;
- }
- } else {
- if (scope.ref === refLow) {
- start_x = e.clientX - scope.minPtrOffset;
- }
- else {
- start_x = e.clientX - scope.maxPtrOffset;
- }
- }
- if (disabled) {
- scope.ref= 'ngModelDisabled';
- scope.disabledStyle = {width: disableWidth + 'px', zIndex: 1};
- }
- };
- // Mouse Move Event
- scope.moveElem = function(ev) {
- if (evFlag) {
- var eventX;
- eventX = ev.clientX;
- newOffset = eventX - start_x;
- scope.ptrOffset(newOffset);
- }
- };
- scope.focus=function(ev,ref){
- console.log(ref);
- scope.ref=ref;
- }
- // Mouse Up Event
- scope.mouseUp = function(ev) {
- evFlag = false;
- minPtr.removeClass('dragging');
- maxPtr.removeClass('dragging');
- singlePtr.removeClass('dragging');
- $document.off('mousemove');
- };
- // key Up Event
- scope.keyUp = function(ev) {
- evFlag = false;
- minPtr.removeClass('dragging');
- maxPtr.removeClass('dragging');
- singlePtr.removeClass('dragging');
- $document.off('mousemove');
- };
- //Function to calculate the current PositionValue
- scope.calStep = function(value, precision, step, floor) {
- var decimals, remainder, roundedValue, steppedValue;
- if (floor === null) {
- floor = 0;
- }
- if (step === null) {
- step = 1 / Math.pow(10, precision);
- }
- remainder = (value - floor) % step;
- steppedValue = remainder > (step / 2) ? value + step - remainder : value - remainder;
- decimals = Math.pow(10, precision);
- roundedValue = steppedValue * decimals / decimals;
- return roundedValue.toFixed(precision);
- };
- //Function to calculate Offset Percent
- scope.percentOffset = function(offset) {
- return ((offset - minOffset) / offsetRange) * 100;
- };
- //Function to calculate Offset position
- scope.ptrOffset = function(newOffset){
- var newPercent, newValue;
- newOffset = Math.max(Math.min(newOffset, maxOffset), minOffset);
- newPercent = scope.percentOffset(newOffset);
- newValue = minValue + (valueRange * newPercent / 100.0);
- if (range) {
- var rangeSliderWidth;
- if (scope.ref === refLow) {
- scope.minHandleStyle = {left: newOffset + "px"};
- scope.minNewVal = newValue;
- scope.minPtrOffset = newOffset;
- minPtr.addClass('dragging');
- if (newValue > scope.maxNewVal) {
- scope.ref = refHigh;
- maxPtr[0].focus();
- scope.maxNewVal = newValue;
- scope.maxPtrOffset = newOffset;
- maxPtr.addClass('dragging');
- minPtr.removeClass('dragging');
- scope.maxHandleStyle = {left: newOffset + "px"};
- }
- }
- else {
- scope.maxHandleStyle = {left: newOffset + "px"};
- scope.maxNewVal = newValue;
- scope.maxPtrOffset = newOffset;
- maxPtr.addClass('dragging');
- if (newValue < scope.minNewVal) {
- scope.ref = refLow;
- minPtr[0].focus();
- scope.minVal = newValue;
- scope.minPtrOffset = newOffset;
- minPtr.addClass('dragging');
- maxPtr.removeClass('dragging');
- scope.minHandleStyle = {left: newOffset + "px"};
- }
- }
- rangeSliderWidth = parseInt(scope.maxPtrOffset) - parseInt(scope.minPtrOffset);
- scope.rangeStyle = {width: rangeSliderWidth + "px", left: scope.minPtrOffset + "px"};
- }
- else {
- if (disabled && newOffset > disableWidth) {
- scope.rangeStyle = {width: newOffset + "px", zIndex: 0};
- }
- else {
- singlePtr.addClass('dragging');
- scope.rangeStyle = {width: newOffset + "px"};
- }
- scope.handleStyle = {left: newOffset + "px"};
- }
- if ((scope.precision === undefined) || (scope.step === undefined)) {
- scope.precision = sliderDefaultOptions.precision;
- scope.step = sliderDefaultOptions.step;
- }
- newValue = scope.calStep(newValue, parseInt(scope.precision), parseFloat(scope.step), parseFloat(scope.floor));
- scope[scope.ref] = newValue;
- };
- }
- };
- }
- ]).directive('attSliderMin',[function()
- {
- return{
- require: '^attSlider',
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/slider/minContent.html'
- };
- }
- ]).directive('attSliderMax',[function()
- {
- return{
- require: '^attSlider',
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/slider/maxContent.html'
- };
- }
- ]);
-angular.module('att.abs.splitButtonDropdown', ['att.abs.utilities','att.abs.position'])
- .directive('attButtonDropdown', ['$document', '$parse', '$documentBind', '$timeout','$isElement', function ($document, $parse, $documentBind, $timeout,$isElement) {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/splitButtonDropdown/splitButtonDropdown.html',
- scope: {
- btnText: "@",
- btnType: "@",
- btnLink: "@",
- btnClick: "&",
- toggleTitle:"@",
- },
- controller: ['$scope', '$element', function ($scope, $element) {
-
- this.cSelected = 0;
- this.closeAndFocusDropdown = function () {
- if ($scope.isDropDownOpen) {
- $scope.$apply(function () {
- $scope.isDropDownOpen = false;
- angular.element($element[0].querySelector('a.dropdown-toggle'))[0].focus();
- });
- }
- };
-
- this.focusNext = function () {
- this.cSelected = this.cSelected + 1 >= this.childScopes.length ?($scope.cycleSelection === true ? 0 : this.childScopes.length-1): this.cSelected +1;
- this.childScopes[this.cSelected].sFlag = true;
- this.resetFlag(this.cSelected);
- };
-
- this.focusPrev = function () {
- this.cSelected = this.cSelected -1 < 0 ? ($scope.cycleSelection === true ? this.childScopes.length-1 : 0) : this.cSelected - 1 ;
- this.childScopes[this.cSelected].sFlag = true;
- this.resetFlag(this.cSelected);
- };
-
- this.childScopes = [];
- this.registerScope = function(childScope)
- {
- this.childScopes.push(childScope);
- };
-
- this.resetFlag = function(index){
- for(var i=0; i < this.childScopes.length; i++)
- {
- if(i !== index)
- {
- this.childScopes[i].sFlag = false;
- }
- }
- };
-
- }],
- link: function (scope, element, attr) {
- scope.isSmall = attr.small === "" ? true : false;
- scope.multiselect = attr.multiselect === ""? true : false;
- scope.cycleSelection = attr.cycleSelection === "" ? true : false;
- scope.isDropDownOpen = false;
- scope.isActionDropdown = false;
-
- if (!(scope.btnText)) {
- scope.isActionDropdown = true;
- }
-
- scope.clickFxn = function () {
- if (typeof scope.btnClick === "function" && !scope.btnLink) {
- scope.btnClick = $parse(scope.btnClick);
- scope.btnClick();
- }
- if(scope.multiselect === true)
- {
- scope.isDropDownOpen = false;
- }
- };
-
- scope.toggleDropdown = function () {
- if (!(scope.btnType === 'disabled')) {
- scope.isDropDownOpen = !scope.isDropDownOpen;
- if (scope.isDropDownOpen) {
- $timeout(function () {
- angular.element(element[0].querySelector('li'))[0].focus();
- });
- }
- }
- };
-
- scope.btnTypeSelector = function (directiveValue, attrValue) {
- if (directiveValue !== "") {
- scope.btnTypeFinal = directiveValue;
- } else {
- scope.btnTypeFinal = attrValue;
- }
- };
-
- var outsideClick = function(e) {
- var isElement = $isElement(angular.element(e.target), element.find('ul').eq(0), $document);
- if (!isElement) {
- scope.isDropDownOpen = false;
- scope.$apply();
- }
- };
-
- $documentBind.click('isDropDownOpen', outsideClick, scope);
-
- attr.$observe('btnType', function (val) {
- scope.btnType = val;
- });
- attr.$observe('attButtonDropdown', function (val) {
- attr.attButtonDropdown = val;
- scope.btnTypeSelector(attr.attButtonDropdown, scope.btnType);
- });
- }
- };
-
- }])
-
-.directive('attButtonDropdownItem', ['$location','keymap', function ($location,keymap) {
- return {
- restrict: 'EA',
- require: ['^attButtonDropdown','?ngModel'],
- replace: true,
- transclude: true,
- templateUrl:'app/scripts/ng_js_att_tpls/splitButtonDropdown/splitButtonDropdownItem.html', scope: {
- itemLink: "@"
- },
- link: function (scope, element, attr, ctrl) {
- var rootLink = angular.element(element[0].querySelector('a'));
- scope.sFlag = false;
- ctrl[0].registerScope(scope);
- var clickOnLink = function () {
- if (scope.itemLinkFinal) {
- $location.url(scope.itemLinkFinal);
- }
- };
-
- if(ctrl[1]){
- scope.isSelected = ctrl[1].$viewValue;
- }else{
- scope.isSelected = false;
- }
-
- element.bind('keydown', function(e) {
- if (keymap.isAllowedKey(e.keyCode) || keymap.isControl(e) || keymap.isFunctionKey(e)) {
- e.preventDefault();
- e.stopPropagation();
- switch (e.keyCode) {
- case keymap.KEY.DOWN:
- ctrl[0].focusNext();
- break;
- case keymap.KEY.UP:
- ctrl[0].focusPrev();
- break;
- case keymap.KEY.ENTER:
- scope.selectItem();
- break;
- case keymap.KEY.ESC:
- ctrl[0].closeAndFocusDropdown();
- break;
- default:
- break;
- }
-
- }
- scope.$apply();
- });
-
- scope.selectItem = function()
- {
- if(ctrl[1]){
- scope.$evalAsync(function(){ctrl[1].$setViewValue(!ctrl[1].$viewValue)});
- }
- };
-
- }
- };
- }]);
-
-angular.module('att.abs.splitIconButton', ['att.abs.utilities'])
-.constant('iconStateConstants', {
- MIDDLE: 'middle',
- LEFT: 'left',
- RIGHT: 'right',
- NEXT_TO_DROPDOWN:'next-to-dropdown',
- LEFT_NEXT_TO_DROPDOWN:'left-next-to-dropdown',
- DIR_TYPE: {
- LEFT: 'left',
- RIGHT: 'right',
- BUTTON: 'button'
- },
- SPLIT_ICON_BTN_EVENT_EMITTER_KEY: 'splitIconButtonTap'
-})
-.directive('expandableLine', [function(){
- return {
- restrict: 'EA',
- replace: true,
- priority: 300,
- require: ['^attSplitIconButton', 'expandableLine'],
- controller: ['$scope', function($scope){
- $scope.isActive = false;
- this.setActiveState = function(isActive){
- $scope.isActive = isActive;
- };
- this.isActive = $scope.isActive;
- this.dirType = $scope.dirType;
- }],
- template: '<div ng-class="{\'expand-line-container\': !isActive, \'expand-line-container-active\': isActive}"> <div ng-class="{\'hovered-line\':isActive, \'vertical-line\':!isActive}"> </div></div>',
- scope:{
- dirType: '@'
- },
- link: function(scope,element,attr,ctrls) {
- var attSplitIconButtonCtrl = ctrls[0];
- var expandableLineCtrl = ctrls[1];
- attSplitIconButtonCtrl.addSubCtrl(expandableLineCtrl);
- }
- };
-}])
-.controller('AttSplitIconCtrl', ['$scope', function($scope){
- this.setType = function(type){
- $scope.type = type;
- };
- this.isDropdown = function(isDropdown){
- $scope.isDropdown = isDropdown;
- };
- this.dropDownClicked = function(){
- if($scope.dropDownClicked) {
- $scope.dropDownClicked();
- }
- };
- this.dirType = $scope.dirType;
-}])
-.directive('attSplitIcon', ['$document', '$timeout','iconStateConstants','$documentBind','events', 'keymap',
- function($document,$timeout,iconStateConstants,$documentBind, events, keymap){
- return {
- restrict: 'EA',
- replace: true,
- priority: 200,
- transclude: true,
- require: ['^attSplitIconButton','attSplitIcon'],
- templateUrl: 'app/scripts/ng_js_att_tpls/splitIconButton/splitIcon.html',
- scope:{
- icon: '@',
- iconTitle: '@title',
- hoverWatch: '=',
- dropDownWatch: '=',
- dirType: '@'
- },
- controller:'AttSplitIconCtrl',
- link: function(scope,element,attr,ctrls){
- var attSplitIconButtonCtrl = ctrls[0];
- var attSplitIconCtrl = ctrls[1];
- attSplitIconButtonCtrl.addSubCtrl(attSplitIconCtrl);
- scope.iconStateConstants = iconStateConstants;
- var currentIndex = 0;
- var isMyElement = false;
- var listElements;
- scope.isDropdown = false;
- scope.isDropdownOpen = false;
- var outsideClick = function(e) {
- if(scope.isDropdown){
- if (isMyElement) {
- isMyElement = false;
- scope.toggleDropdown();
- } else{
- scope.toggleDropdown(false);
- }
- scope.$apply();
- }
- };
- if(attr.dropDownId && attr.dropDownId !== ''){
- scope.dropDownId = attr.dropDownId;
- scope.isDropdown = true;
- }
- scope.$on(iconStateConstants.SPLIT_ICON_BTN_EVENT_EMITTER_KEY, function(evnt, data){
- if(typeof data === 'boolean' && data) {
- scope.dropDownClicked();
- /*
- Check if the dropdown is open and if we are selecting one
- of the items, so that when pressing enter it will trigger it.
- */
- if(scope.isDropDownOpen) {
- listElements[currentIndex].eq(0).find('a')[0].click();
- }
- } else {
- var e = data;
- //Only trigger the keyboard event if the icon button is a dropdown type
- if(scope.isDropdown) {
- triggerKeyboardEvents(e);
- }
- }
- function triggerKeyboardEvents(e) {
- switch(e.which) {
- case (keymap.KEY.TAB):
- scope.toggleDropdown(false);
- scope.$digest();
- break;
- case (keymap.KEY.ESC):
- outsideClick();
- break;
- case (keymap.KEY.ENTER):
- if (scope.isDropDownOpen) {
- listElementsInit();
- }
- break;
- case (keymap.KEY.UP):
- e.preventDefault();
- events.stopPropagation(e);
- if(scope.isDropDownOpen) {
- scope.previousItemInDropdown();
- }
- break;
- case (keymap.KEY.DOWN):
- e.preventDefault();
- events.stopPropagation(e);
- //Dropdown is open and the user taps down again
- if(scope.isDropDownOpen) {
- //Now we need to go through the rows in the dropdown
- scope.nextItemInDropdown();
- } else {
- isMyElement = true;
- outsideClick();
- listElementsInit();
- }
- break;
- default:
- break;
- }
- }
- function listElementsInit() {
- if(listElements === undefined) {
- listElements = [];
- var liTemps = element.find('li');
- for(var i = 0; i < liTemps.length; i++) {
- listElements.push(liTemps.eq(i));
- }
- listElements[currentIndex].children().eq(0).addClass('selected-item');
- }
- }
- });
- scope.nextItemInDropdown = function(){
- if(listElements && currentIndex < listElements.length - 1){
- currentIndex++;
- listElements[currentIndex - 1].children().eq(0).removeClass('selected-item');
- listElements[currentIndex].children().eq(0).addClass('selected-item');
- }
- };
- scope.previousItemInDropdown = function(){
- if(currentIndex > 0) {
- currentIndex--;
- listElements[currentIndex].children().eq(0).addClass('selected-item');
-
- if(currentIndex + 1 < listElements.length)
- listElements[currentIndex + 1].children().eq(0).removeClass('selected-item');
- }
- };
- scope.$watch('isIconHovered', function(val) {
- scope.hoverWatch = val;
- });
- scope.$watch('type', function(val) {
- function toggleValues(isMiddle,isNextToDropDown,isRight,isLeft,isLeftNextDropdown){
- scope['isMiddle'] = isMiddle;
- scope['isNextToDropDown'] = isNextToDropDown;
- scope['isRight'] = isRight;
- scope['isLeft'] = isLeft;
- scope['isLeftNextDropdown'] = isLeftNextDropdown;
- };
- switch(val) {
- case (scope.iconStateConstants.MIDDLE):
- toggleValues(true,false,false,true,false);
- break;
- case (scope.iconStateConstants.LEFT):
- toggleValues(false,false,false,true,false);
- break;
- case (scope.iconStateConstants.RIGHT):
- toggleValues(false,false,true,false,false);
- break;
- case (scope.iconStateConstants.NEXT_TO_DROPDOWN):
- toggleValues(false,true,true,true,false);
- break;
- case (scope.iconStateConstants.LEFT_NEXT_TO_DROPDOWN):
- toggleValues(false,false,false,true,true);
- break;
- default:
- break;
- }
- });
- scope.dropDownClicked = function() {
- isMyElement = true;
- };
- scope.toggleDropdown = function(val) {
- if(val !== undefined) {
- scope.isDropDownOpen = val;
- } else {
- scope.isDropDownOpen = !scope.isDropDownOpen;
- }
- scope.dropDownWatch = scope.isDropDownOpen;
- };
- $documentBind.click('isDropdown', outsideClick, scope);
- }
- };
-}])
-.controller('AttSplitIconButtonCtrl',['$scope', 'iconStateConstants',function($scope,iconStateConstants){
- this.subCtrls = [];
- $scope.isLeftLineShown=true;
- $scope.isRightLineShown=true;
- $scope.childrenScopes = [];
- var that = this;
-
- function getDirIndex(dirType) {
- var index = -1;
- for(var c in that.subCtrls) {
- var ctrl = that.subCtrls[c];
- if(ctrl.dirType === dirType) {
- index = c;
- break;
- }
- }
- return index;
- }
- this.addSubCtrl = function(sub) {
- this.subCtrls.push(sub);
- };
- this.isLeftLineShown = function(isShown) {
- if(isShown === undefined) {
- return $scope.isLeftLineShown;
- } else {
- $scope.isLeftLineShown = isShown;
- }
- };
- this.isRightLineShown = function(isShown) {
- if(isShown === undefined) {
- return $scope.isRightLineShown;
- } else {
- $scope.isRightLineShown = isShown;
- }
- };
- this.setLeftLineHover = function(isHovered) {
- var leftLineIndex = getDirIndex(iconStateConstants.DIR_TYPE.LEFT);
-
- if($scope.isLeftLineShown && this.subCtrls[leftLineIndex] && this.subCtrls[leftLineIndex].setActiveState) {
- this.subCtrls[leftLineIndex].setActiveState(isHovered);
- }
- };
- this.setRightLineHover = function(isHovered) {
- var rightLineIndex = getDirIndex(iconStateConstants.DIR_TYPE.RIGHT);
- if($scope.isRightLineShown && this.subCtrls[rightLineIndex] && this.subCtrls[rightLineIndex].setActiveState){
- this.subCtrls[rightLineIndex].setActiveState(isHovered);
- }
- };
- this.toggleLines = function(isHovered, buttonGroupCtrl, buttonCtrl, isDropDownOpen) {
- var subIconButtons = buttonGroupCtrl.subIconButtons;
- var subIconButtonsLength = subIconButtons.length;
- var leftLineIndex = getDirIndex(iconStateConstants.DIR_TYPE.LEFT);
- var rightLineIndex = getDirIndex(iconStateConstants.DIR_TYPE.RIGHT);
- function noVerticalLineToggle() {
- for(var i =0; i < subIconButtonsLength; i++) {
- if(subIconButtons[i] === buttonCtrl) {
- if(i + 1 <= subIconButtonsLength - 1 && subIconButtons[i+1].isLeftLineShown()
- && subIconButtons[i+1].subCtrls[leftLineIndex]
- && subIconButtons[i+1].subCtrls[leftLineIndex].setActiveState) {
- subIconButtons[i+1].subCtrls[leftLineIndex].setActiveState(isHovered);
- }
- if(i - 1 >= 0 && subIconButtons[i-1].isRightLineShown()
- && subIconButtons[i-1].subCtrls[rightLineIndex]
- && subIconButtons[i-1].subCtrls[rightLineIndex].setActiveState) {
- subIconButtons[i-1].subCtrls[rightLineIndex].setActiveState(isHovered);
- }
- break;
- }
- }
- }
- if(isDropDownOpen) {
- /*
- If the button is next to the dropdown button then just keep the
- buttons left line or its left neighbors right line toggled on
- If the button is the dropdown button don't do anything
- else do things normally witht the button
- */
- /*if(subIconButtons[subIconButtonsLength-1] === buttonCtrl) {
-
- }
- else */
- if(subIconButtons[subIconButtonsLength-2]==buttonCtrl) {
- if(subIconButtons[subIconButtonsLength-2].isLeftLineShown()) {
- subIconButtons[subIconButtonsLength-2].subCtrls[leftLineIndex].setActiveState(isHovered);
- } else if(subIconButtonsLength - 3 >= 0) {
- if(subIconButtons[subIconButtonsLength-3].isRightLineShown()) {
- subIconButtons[subIconButtonsLength-3].subCtrls[rightLineIndex].setActiveState(isHovered);
- }
- }
- } else {
- noVerticalLineToggle();
-
- if($scope.isLeftLineShown) {
- this.subCtrls[leftLineIndex].setActiveState(isHovered);
- }
- if($scope.isRightLineShown) {
- this.subCtrls[rightLineIndex].setActiveState(isHovered);
- }
- }
- } else { // End of if(isDropDownOpen)
- //Handle Special cases where they aren't showing any vertical lines
- //and the dropdown isn't down
- if(!$scope.isLeftLineShown && !$scope.isRightLineShown) {
- noVerticalLineToggle();
- }
- if($scope.isLeftLineShown && this.subCtrls[leftLineIndex].setActiveState) {
- this.subCtrls[leftLineIndex].setActiveState(isHovered);
- }
- if($scope.isRightLineShown && this.subCtrls[rightLineIndex].setActiveState){
- this.subCtrls[rightLineIndex].setActiveState(isHovered);
- }
- }
- };
- this.setButtonType = function(type){
- var buttonIndex = getDirIndex(iconStateConstants.DIR_TYPE.BUTTON);
- if(this.subCtrls[buttonIndex] && this.subCtrls[buttonIndex].setType) {
- this.subCtrls[buttonIndex].setType(type);
- }
- };
-}])
-.directive('attSplitIconButton', ['$document', 'iconStateConstants', 'keymap',
- function($document, iconStateConstants, keymap){
- return {
- restrict: 'EA',
- replace: true,
- priority: 100,
- transclude: true,
- require: ['^attSplitIconButtonGroup', 'attSplitIconButton'],
- controller: 'AttSplitIconButtonCtrl',
- templateUrl: 'app/scripts/ng_js_att_tpls/splitIconButton/splitIconButton.html',
- scope:{
- icon: '@',
- title: '@',
- dropDownId: '@'
- },
- link: function(scope,element,attr,ctrls) {
- if(!scope.title) {
- scope.title = scope.icon;
- }
- var attSplitButtonGroupCtrl = ctrls[0];
- var attSplitIconButtonCtrl = ctrls[1];
- attSplitButtonGroupCtrl.addIconButton(attSplitIconButtonCtrl);
- element.bind('keydown', function(e){
- //Check if the key is the up or down key
- if(e.which === keymap.KEY.ESC ||
- e.which === keymap.KEY.DOWN ||
- e.which === keymap.KEY.ENTER ||
- e.which === keymap.KEY.UP ||
- e.which === keymap.KEY.TAB ) {
- scope.clickHandler();
- scope.$broadcast(iconStateConstants.SPLIT_ICON_BTN_EVENT_EMITTER_KEY, e);
- }
- });
- scope.dropDownWatch = false;
- scope.iconStateConstants = iconStateConstants;
- scope.clickHandler = function() {
- attSplitButtonGroupCtrl.hideLeftLineRightButton(attSplitIconButtonCtrl);
- };
- scope.$watch('isHovered', function(val){
- if(val) {
- attSplitIconButtonCtrl.toggleLines(val,attSplitButtonGroupCtrl,attSplitIconButtonCtrl,attSplitButtonGroupCtrl.isDropDownOpen);
- } else{
- attSplitIconButtonCtrl.toggleLines(val,attSplitButtonGroupCtrl,attSplitIconButtonCtrl,attSplitButtonGroupCtrl.isDropDownOpen);
- }
- });
- scope.$watch('dropDownWatch', function(val) {
- attSplitButtonGroupCtrl.isDropDownOpen = val;
- attSplitButtonGroupCtrl.toggleDropdownState(val);
- });
- }
- }
-}])
-.controller('AttSplitIconButtonGroupCtrl', ['$scope','iconStateConstants',function($scope,iconStateConstants){
- this.subIconButtons = [];
- this.addIconButton = function(iconButton){
- this.subIconButtons.push(iconButton);
- };
- this.isDropDownOpen = false;
- this.hideLeftLineRightButton = function(btn){
- var numButtons = this.subIconButtons.length;
- var buttonLeftOfRightMost = this.subIconButtons[numButtons - 2];
- var rightMostButton = this.subIconButtons[numButtons -1];
-
- if (btn != buttonLeftOfRightMost && btn != rightMostButton ){
- rightMostButton.setLeftLineHover(false);
- }
- };
- this.toggleDropdownState = function(isDropDownOpen){
- var numButtons = this.subIconButtons.length;
- if(numButtons > 2) {
- if(isDropDownOpen) {
- if(this.subIconButtons[numButtons - 2].isRightLineShown()) {
- this.subIconButtons[numButtons - 2].setRightLineHover(true);
- } else {
- this.subIconButtons[numButtons - 1].setLeftLineHover(true);
- }
- this.subIconButtons[numButtons - 2].setButtonType(iconStateConstants.NEXT_TO_DROPDOWN);
- } else {
- this.subIconButtons[numButtons - 1].setLeftLineHover(false);
- this.subIconButtons[numButtons - 2].setButtonType(iconStateConstants.MIDDLE);
- }
- } else {
- if(isDropDownOpen) {
- this.subIconButtons[0].setRightLineHover(true);
- this.subIconButtons[0].setButtonType(iconStateConstants.LEFT_NEXT_TO_DROPDOWN);
- } else {
- this.subIconButtons[0].setButtonType(iconStateConstants.LEFT);
- }
- }
- };
-}])
-.directive('attSplitIconButtonGroup', ['$document', '$timeout', 'iconStateConstants' ,function($document,$timeout,iconStateConstants){
- return {
- restrict: 'EA',
- replace: true,
- priority: 50,
- transclude: true,
- require: 'attSplitIconButtonGroup',
- controller: 'AttSplitIconButtonGroupCtrl',
- templateUrl: 'app/scripts/ng_js_att_tpls/splitIconButton/splitIconButtonGroup.html',
- scope:{},
- link: function(scope,element,attr,ctrls){
- $timeout(initialize,100);
- function initialize(){
- var subIconButtonCtrls = ctrls.subIconButtons;
- var leftMostButtonIndex = 0;
- var rightMostButtonIndex =subIconButtonCtrls.length-1;
- //left most button config
- subIconButtonCtrls[leftMostButtonIndex].setButtonType(iconStateConstants.LEFT);
- subIconButtonCtrls[leftMostButtonIndex].isLeftLineShown(false);
- subIconButtonCtrls[leftMostButtonIndex].isRightLineShown(true);
- //right most button config
- subIconButtonCtrls[rightMostButtonIndex].setButtonType(iconStateConstants.RIGHT);
- subIconButtonCtrls[rightMostButtonIndex].isRightLineShown(false);
- subIconButtonCtrls[rightMostButtonIndex].isLeftLineShown(false);
- //middle buttons config
- if(rightMostButtonIndex >= 2) {
- var index = 1;
- while(index < rightMostButtonIndex) {
- subIconButtonCtrls[index].setButtonType(iconStateConstants.MIDDLE);
- subIconButtonCtrls[index].isRightLineShown(false);
- subIconButtonCtrls[index].isLeftLineShown(false);
- index++;
- }
- var skipIndex = 2;
- while(skipIndex <= rightMostButtonIndex){
- if(skipIndex == rightMostButtonIndex) {
- subIconButtonCtrls[skipIndex].isLeftLineShown(true);
- } else {
- subIconButtonCtrls[skipIndex].isRightLineShown(true);
- subIconButtonCtrls[skipIndex].isLeftLineShown(true);
- }
- skipIndex = skipIndex + 2;
- }
- }
- //reposition the dropdown
- var ulElem = element.find('ul');
- if(ulElem.length > 0) {
- var numButtons = rightMostButtonIndex+1;
- if(numButtons > 2) {
- var offset = (numButtons)*34-70+(numButtons/1.5) + 0.5;
- var offSetStr = offset+'px';
- angular.element(ulElem).css('left',offSetStr);
- angular.element(ulElem).css('border-top-left-radius','0px');
- } else {
- angular.element(ulElem).css('left','0px');
- }
- }
- }
- }
- }
-}]);
-
-angular.module('att.abs.stepSlider', ['att.abs.position'])
- .constant('sliderConstants', {
- /*
- The MIT License (MIT)
- Copyright (c) 2013 Julien Valéry
- */
- SLIDER: {
- settings: {
- from: 1,
- to: 40,
- step: 1,
- smooth: true,
- limits: true,
- value: "3",
- dimension: "",
- vertical: false
- },
- className: "jslider",
- selector: ".jslider-"
- },
- EVENTS: {
- },
- COLORS: {
- GREEN: 'green',
- BLUE_HIGHLIGHT: 'blue',
- MAGENTA: 'magenta',
- GOLD: 'gold',
- PURPLE: 'purple',
- DARK_BLUE: 'dark-blue',
- REGULAR: 'regular',
- WHITE: 'white'
- }
- })
- .factory('utils', function () {
- /*
- The MIT License (MIT)
- Copyright (c) 2013 Julien Valéry
- */
- return {
- offset: function (elm) {
- var rawDom = elm[0];
- var _x = 0;
- var _y = 0;
- var body = document.documentElement || document.body;
- var scrollX = window.pageXOffset || body.scrollLeft;
- var scrollY = window.pageYOffset || body.scrollTop;
- _x = rawDom.getBoundingClientRect().left + scrollX;
- _y = rawDom.getBoundingClientRect().top + scrollY;
- return {left: _x, top: _y};
- },
- roundUpToScale: function (mousePrc, scale, cutOffWidth, cutOffIndex) {
- var lowerVal;
- var higherVal;
- var newMousePrc;
- var middle;
-
- for (var index = 1; index < scale.length; index++) {
- lowerVal = scale[index - 1];
- higherVal = scale[index];
- middle = ((higherVal - lowerVal) * .5) + lowerVal;
- /*
- Handles a situation where the user clicks close to the start point of
- the slider but the pointer doesn't move
- */
- if ((lowerVal === 0 && mousePrc <= middle) || checkEquality(lowerVal, mousePrc)) {
- newMousePrc = lowerVal;
- break;
- }
- else if (lowerVal < mousePrc && (mousePrc < higherVal ||
- checkEquality(mousePrc, higherVal)))
- {
- newMousePrc = higherVal;
- break;
- }
- }
- //Check if the newMousePrc is <= the cuttOffPoint
- if (cutOffWidth && newMousePrc < cutOffWidth) {
- return scale[cutOffIndex];
- }
- else {
- return newMousePrc;
- }
- /*
- Checks to see if 2 points are so close that they are
- basically equal.
- */
- function checkEquality(point1, point2) {
- var precision = 0.1;
- if (Math.abs(point2 - point1) <= precision) {
- return true;
- }
- return false;
- }
- },
- valueForDifferentScale: function (from, to, prc, prcToValueMapper) {
- var decimalPrc = prc / 100;
- if (decimalPrc === 0) {
- return from;
- }
- return prcToValueMapper[prc];
- },
- /* converts the default value Kbps to Mbps or Gbps */
- convertToMbpsGbps: function (unitValue, unitLabel, configDecimalPlaces) {
- var defaultDecimalPlaces = 3; /* this is the default decimal places as per business requirements */
- if (configDecimalPlaces) {
- defaultDecimalPlaces = configDecimalPlaces;
- }
-
- if ((unitValue > 1024 && unitValue < 1000000) && angular.equals(unitLabel, 'Kbps')) {
- unitValue = truncator((unitValue/1000), defaultDecimalPlaces);
- unitLabel = 'Mbps';
- } else if ((unitValue > 1024 && unitValue < 1000000) && angular.equals(unitLabel, 'Mbps')){
- unitValue = truncator((unitValue/1000), defaultDecimalPlaces);
- unitLabel = 'Mbps';
- } else if (unitValue <= 1024 && angular.equals(unitLabel, 'Mbps')) {
- unitLabel = 'Kbps';
- } else {
- unitLabel = 'Kbps';
- }
-
- if (unitValue >= 1000000 && angular.equals(unitLabel, 'Kbps')) {
- unitValue = truncator((unitValue/1000000), defaultDecimalPlaces);
- unitLabel = 'Gbps';
- }
- return {
- unitValue: unitValue,
- unitLabel: unitLabel
- };
-
- function truncator(numToTruncate, intDecimalPlaces) {
- var cnvrtdNum = Math.pow(10, intDecimalPlaces);
- return ~~(numToTruncate * cnvrtdNum)/cnvrtdNum;
- }
- },
- getConversionFactorValue: function (value, conversion, firstDimension) {
- /*
- Loop through the conversion array and keep checking the
- startVal
- */
- if (value <= conversion[0].startVal) {
- return{
- scaledVal: value,
- scaledDimension: firstDimension
- };
- }
- var endIndex = 0;
- for (var index in conversion) {
- var c = conversion[index];
- if (value > c.startVal) {
- endIndex = index;
- }
- }
- var scaleFactor = conversion[endIndex].scaleFactor;
- var scaledVal = value / scaleFactor;
- var scaledDimension = conversion[endIndex].dimension;
- return {
- scaledVal: scaledVal,
- scaledDimension: scaledDimension
- };
- }
- };
- })
- .factory('sliderDraggable', ['utils', function (utils) {
- /*
- The MIT License (MIT)
- Copyright (c) 2013 Julien Valéry
- */
- function Draggable() {
- this._init.apply(this, arguments);
- }
- Draggable.prototype.oninit = function () {
- };
- Draggable.prototype.events = function () {
- };
- Draggable.prototype.onmousedown = function () {
- this.ptr.css({position: "absolute"});
- };
- Draggable.prototype.onmousemove = function (evt, x, y) {
- this.ptr.css({left: x, top: y});
- };
- Draggable.prototype.onmouseup = function () {
- };
- Draggable.prototype.isDefault = {
- drag: false,
- clicked: false,
- toclick: true,
- mouseup: false
- };
- Draggable.prototype._init = function () {
- if (arguments.length > 0) {
- this.ptr = arguments[0];
- this.parent = arguments[2];
- if (!this.ptr) {
- return;
- }
- this.is = {};
- angular.extend(this.is, this.isDefault);
- var offset = utils.offset(this.ptr);
- this.d = {
- left: offset.left,
- top: offset.top,
- width: this.ptr[0].clientWidth,
- height: this.ptr[0].clientHeight
- };
- this.oninit.apply(this, arguments);
- this._events();
- }
- };
- Draggable.prototype._getPageCoords = function (event) {
- var value = {};
- if (event.targetTouches && event.targetTouches[0]) {
- value = {x: event.targetTouches[0].pageX, y: event.targetTouches[0].pageY};
- } else {
- value = {x: event.pageX, y: event.pageY};
- }
- return value;
- };
- Draggable.prototype._bindEvent = function (ptr, eventType, handler) {
- if (this.supportTouches_) {
- ptr[0].attachEvent(this.events_[ eventType ], handler);
- }
- else {
- if (ptr.bind) {
- ptr.bind(this.events_[ eventType ], handler);
- }
- }
- };
- Draggable.prototype._events = function () {
- var self = this;
- this.supportTouches_ = 'ontouchend' in document;
- this.events_ = {
- "click": this.supportTouches_ ? "touchstart" : "click",
- "down": this.supportTouches_ ? "touchstart" : "mousedown",
- "move": this.supportTouches_ ? "touchmove" : "mousemove",
- "up": this.supportTouches_ ? "touchend" : "mouseup",
- "mousedown": this.supportTouches_ ? "mousedown" : "mousedown"
- };
- var documentElt = angular.element(window.document);
- this._bindEvent(documentElt, "move", function (event) {
- if (self.is.drag) {
- event.stopPropagation();
- event.preventDefault();
- if (!self.parent.disabled) {
- self._mousemove(event);
- }
- }
- });
- this._bindEvent(documentElt, "down", function (event) {
- if (self.is.drag) {
- event.stopPropagation();
- event.preventDefault();
- }
- });
- this._bindEvent(documentElt, "up", function (event) {
- self._mouseup(event);
- });
- this._bindEvent(this.ptr, "down", function (event) {
- self._mousedown(event);
- return false;
- });
- this._bindEvent(this.ptr, "up", function (event) {
- self._mouseup(event);
- });
- this.events();
- };
- Draggable.prototype._mousedown = function (evt) {
- this.is.drag = true;
- this.is.clicked = false;
- this.is.mouseup = false;
- var coords = this._getPageCoords(evt);
- this.cx = coords.x - this.ptr[0].offsetLeft;
- this.cy = coords.y - this.ptr[0].offsetTop;
- angular.extend(this.d, {
- left: this.ptr[0].offsetLeft,
- top: this.ptr[0].offsetTop,
- width: this.ptr[0].clientWidth,
- height: this.ptr[0].clientHeight
- });
- if (this.outer && this.outer.get(0)) {
- this.outer.css({height: Math.max(this.outer.height(), $(document.body).height()), overflow: "hidden"});
- }
- this.onmousedown(evt);
- };
- Draggable.prototype._mousemove = function (evt) {
- if (this.uid === 0) {
- return;
- }
- this.is.toclick = false;
- var coords = this._getPageCoords(evt);
- this.onmousemove(evt, coords.x - this.cx, coords.y - this.cy);
- };
- Draggable.prototype._mouseup = function (evt) {
- if (this.is.drag) {
- this.is.drag = false;
- if (this.outer && this.outer.get(0)) {
- if ($.browser.mozilla) {
- this.outer.css({overflow: "hidden"});
- } else {
- this.outer.css({overflow: "visible"});
- }
- if ($.browser.msie && $.browser.version === '6.0') {
- this.outer.css({height: "100%"});
- } else {
- this.outer.css({height: "auto"});
- }
- }
- this.onmouseup(evt);
- }
- };
- return Draggable;
- }])
- .factory('sliderPointer', ['sliderDraggable', 'utils', function (Draggable, utils) {
- /*
- The MIT License (MIT)
- Copyright (c) 2013 Julien Valéry
- */
- function SliderPointer() {
- Draggable.apply(this, arguments);
- }
- SliderPointer.prototype = new Draggable();
- SliderPointer.prototype.oninit = function (ptr, id, _constructor) {
- this.uid = id;
- this.parent = _constructor;
- this.value = {};
- this.settings = angular.copy(_constructor.settings);
- };
- SliderPointer.prototype.onmousedown = function (evt) {
- var off = utils.offset(this.parent.domNode);
- var offset = {
- left: off.left,
- top: off.top,
- width: this.parent.domNode[0].clientWidth,
- height: this.parent.domNode[0].clientHeight
- };
- this._parent = {
- offset: offset,
- width: offset.width,
- height: offset.height
- };
- this.ptr.addClass("jslider-pointer-hover");
- this.setIndexOver();
- };
- SliderPointer.prototype.onmousemove = function (evt, x, y) {
- var coords = this._getPageCoords(evt);
- //val is the percent where the slider pointer is located
- var val = this.calc(coords.x);
- if (!this.parent.settings.smooth) {
- val = utils.roundUpToScale(val,
- this.parent.settings.scale,
- this.parent.settings.cutOffWidth,
- this.parent.settings.cutOffIndex);
- }
- var cutOffWidth = this.parent.settings.cutOffWidth;
- if (cutOffWidth && val < cutOffWidth) {
- val = cutOffWidth;
- }
- this._set(val);
- };
- SliderPointer.prototype.onmouseup = function (evt) {
- if (this.settings.callback && angular.isFunction(this.settings.callback)) {
- var val = this.parent.getValue();
- this.settings.callback.call(this.parent, val);
- }
- this.ptr.removeClass("jslider-pointer-hover");
- };
- SliderPointer.prototype.setIndexOver = function () {
- this.parent.setPointersIndex(1);
- this.index(2);
- };
- SliderPointer.prototype.index = function (i) {
- };
- SliderPointer.prototype.limits = function (x) {
- return this.parent.limits(x, this);
- };
- SliderPointer.prototype.calc = function (coords) {
- var diff = coords - this._parent.offset.left;
- var val = this.limits((diff * 100) / this._parent.width);
- return val;
- };
- SliderPointer.prototype.set = function (value, opt_origin) {
- this.value.origin = this.parent.round(value);
- this._set(this.parent.valueToPrc(value, this), opt_origin);
- };
- SliderPointer.prototype._set = function (prc, opt_origin) {
- if (!opt_origin) {
- this.value.origin = this.parent.prcToValue(prc);
- }
- this.value.prc = prc;
- //Sets the location of the SliderPointer
- this.ptr.css({left: prc + '%'});
- this.parent.redraw(this);
- };
- return SliderPointer;
- }])
- .factory('slider', ['sliderPointer', 'sliderConstants', 'utils', function (SliderPointer, sliderConstants, utils) {
- /*
- The MIT License (MIT)
- Copyright (c) 2013 Julien Valéry
- */
- var cutOffDom;
- function Slider() {
- return this.init.apply(this, arguments);
- }
- function changeCutOffWidth(width) {
- cutOffDom.css('width', width);
- }
- ;
- Slider.prototype.changeCutOffWidth = changeCutOffWidth;
- Slider.prototype.init = function (inputNode, templateNode, settings) {
- this.settings = sliderConstants.SLIDER.settings;
- angular.extend(this.settings, angular.copy(settings));
- this.inputNode = inputNode;
- this.inputNode.addClass("ng-hide");
- this.settings.interval = this.settings.to - this.settings.from;
- if (this.settings.calculate && $.isFunction(this.settings.calculate)) {
- this.nice = this.settings.calculate;
- }
- if (this.settings.onstatechange && $.isFunction(this.settings.onstatechange)) {
- this.onstatechange = this.settings.onstatechange;
- }
- this.is = {init: false};
- this.o = {};
- this.create(templateNode);
- };
- Slider.prototype.create = function (templateNode) {
- var $this = this;
- this.domNode = templateNode;
- var off = utils.offset(this.domNode);
- var offset = {
- left: off.left,
- top: off.top,
- width: this.domNode[0].clientWidth,
- height: this.domNode[0].clientHeight
- };
- this.sizes = {domWidth: this.domNode[0].clientWidth, domOffset: offset};
- angular.extend(this.o, {
- pointers: {},
- labels: {
- 0: {
- o: angular.element(this.domNode.find('div')[5])
- },
- 1: {
- o: angular.element(this.domNode.find('div')[6])
- }
- },
- limits: {
- 0: angular.element(this.domNode.find('div')[3]),
- 1: angular.element(this.domNode.find('div')[5])
- }
- });
- angular.extend(this.o.labels[0], {
- value: this.o.labels[0].o.find("span")
- });
- angular.extend(this.o.labels[1], {
- value: this.o.labels[1].o.find("span")
- });
- if (!$this.settings.value.split(";")[1]) {
- this.settings.single = true;
- }
- var domNodeDivs = this.domNode.find('div');
- cutOffDom = angular.element(domNodeDivs[8]);
- if (cutOffDom && cutOffDom.css) {
- cutOffDom.css('width', '0%');
- }
- var pointers = [angular.element(domNodeDivs[1]), angular.element(domNodeDivs[2])];
- angular.forEach(pointers, function (pointer, key) {
- $this.settings = angular.copy($this.settings);
- var value = $this.settings.value.split(';')[key];
- if (value) {
- $this.o.pointers[key] = new SliderPointer(pointer, key, $this);
- var prev = $this.settings.value.split(';')[key - 1];
- if (prev && parseInt(value, 10) < parseInt(prev, 10)) {
- value = prev;
- }
- var value1 = value < $this.settings.from ? $this.settings.from : value;
- value1 = value > $this.settings.to ? $this.settings.to : value;
- $this.o.pointers[key].set(value1, true);
- if (key === 0) {
- $this.domNode.bind('mousedown', $this.clickHandler.apply($this));
- }
- }
- });
- this.o.value = angular.element(this.domNode.find("i")[2]);
- this.is.init = true;
- angular.forEach(this.o.pointers, function (pointer) {
- $this.redraw(pointer);
- });
- };
- Slider.prototype.clickHandler = function () {
- var self = this;
- return function (evt) {
- if (self.disabled) {
- return;
- }
- var className = evt.target.className;
- var targetIdx = 0;
- if (className.indexOf('jslider-pointer-to') > 0) {
- targetIdx = 1;
- }
- var _off = utils.offset(self.domNode);
- var offset = {
- left: _off.left,
- top: _off.top,
- width: self.domNode[0].clientWidth,
- height: self.domNode[0].clientHeight
- };
- targetIdx = 1;
- var targetPtr = self.o.pointers[targetIdx];
- targetPtr._parent = {offset: offset, width: offset.width, height: offset.height};
- targetPtr._mousemove(evt);
- targetPtr.onmouseup();
- return false;
- };
- };
- Slider.prototype.disable = function (bool) {
- this.disabled = bool;
- };
- Slider.prototype.nice = function (value) {
- return value;
- };
- Slider.prototype.onstatechange = function () {
- };
- Slider.prototype.limits = function (x, pointer) {
- if (!this.settings.smooth) {
- var step = this.settings.step * 100 / (this.settings.interval);
- x = Math.round(x / step) * step;
- }
- var another = this.o.pointers[1 - pointer.uid];
- if (another && pointer.uid && x < another.value.prc) {
- x = another.value.prc;
- }
- if (another && !pointer.uid && x > another.value.prc) {
- x = another.value.prc;
- }
- if (x < 0) {
- x = 0;
- }
- if (x > 100) {
- x = 100;
- }
- var val = Math.round(x * 10) / 10;
- return val;
- };
- Slider.prototype.setPointersIndex = function (i) {
- angular.forEach(this.getPointers(), function (pointer, i) {
- pointer.index(i);
- });
- };
- Slider.prototype.getPointers = function () {
- return this.o.pointers;
- };
- Slider.prototype.onresize = function () {
- var self = this;
- this.sizes = {
- domWidth: this.domNode[0].clientWidth,
- domHeight: this.domNode[0].clientHeight,
- domOffset: {
- left: this.domNode[0].offsetLeft,
- top: this.domNode[0].offsetTop,
- width: this.domNode[0].clientWidth,
- height: this.domNode[0].clientHeight
- }
- };
- angular.forEach(this.o.pointers, function (ptr, key) {
- self.redraw(ptr);
- });
- };
- Slider.prototype.update = function () {
- this.onresize();
- this.drawScale();
- };
- Slider.prototype.drawScale = function () {
- };
- Slider.prototype.redraw = function (pointer) {
- if (!this.settings.smooth) {
- var newMousePrc = utils.roundUpToScale(pointer.value.prc,
- this.settings.scale,
- this.settings.cutOffWidth,
- this.settings.cutOffIndex);
- pointer.value.origin = newMousePrc;
- pointer.value.prc = newMousePrc;
- }
-
- if (!this.is.init) {
- return false;
- }
- this.setValue();
- var width = this.o.pointers[1].value.prc;
- var newPos = {left: '0%', width: width + '%'};
- this.o.value.css(newPos);
- var htmlValue = this.nice(pointer.value.origin);
- var scaledDimension = this.settings.firstDimension;
- if (this.settings.stepWithDifferentScale && !this.settings.smooth) {
- htmlValue = utils.valueForDifferentScale(this.settings.from,
- this.settings.to, htmlValue, this.settings.prcToValueMapper);
- }
- //This is the base value before the conversion
- if (this.settings.realtimeCallback && angular.isFunction(this.settings.realtimeCallback)
- && this.settings.cutOffVal !== undefined && pointer.uid === 1) {
- this.settings.realtimeCallback(htmlValue);
- }
- //Need to change this to the correct value for the scale
- if (this.settings.conversion) {
- var conversionObj = utils.getConversionFactorValue(parseInt(htmlValue),
- this.settings.conversion,
- this.settings.firstDimension);
- htmlValue = conversionObj.scaledVal;
- scaledDimension = conversionObj.scaledDimension;
- }
-
- htmlValue = parseFloat(htmlValue);
- var tooltipLabel = utils.convertToMbpsGbps(htmlValue, scaledDimension, this.settings.decimalPlaces);
-
- this.o.labels[pointer.uid].value.html(tooltipLabel.unitValue + ' ' + tooltipLabel.unitLabel);
- //Top tooltip label
- this.redrawLabels(pointer);
- };
- Slider.prototype.redrawLabels = function (pointer) {
- function setPosition(label, sizes, prc) {
- sizes.margin = -sizes.label / 2;
- var domSize = self.sizes.domWidth;
- var label_left = sizes.border + sizes.margin;
- if (label_left < 0) {
- sizes.margin -= label_left;
- }
- if (sizes.border + sizes.label / 2 > domSize) {
- sizes.margin = 0;
- sizes.right = true;
- } else
- sizes.right = false;
- //Adjust the tooltip location
- sizes.margin = -((label.o[0].clientWidth / 2) - label.o[0].clientWidth / 20);
- label.o.css({left: prc + "%", marginLeft: sizes.margin, right: "auto"});
- if (sizes.right)
- label.o.css({left: "auto", right: 0});
- return sizes;
- }
- var self = this;
- var label = this.o.labels[pointer.uid];
- var prc = pointer.value.prc;
- var sizes = {
- label: label.o[0].offsetWidth,
- right: false,
- border: (prc * domSize) / 100
- };
- var another_label = null;
- var another = null;
- if (!this.settings.single) {
- another = this.o.pointers[1 - pointer.uid];
- another_label = this.o.labels[another.uid];
- switch (pointer.uid) {
- case 0:
- if (sizes.border + sizes.label / 2 > another_label.o[0].offsetLeft - this.sizes.domOffset.left) {
- another_label.o.css({visibility: "hidden"});
- another_label.value.html(this.nice(another.value.origin));
- label.o.css({visibility: "hidden"});
- prc = (another.value.prc - prc) / 2 + prc;
- if (another.value.prc !== pointer.value.prc) {
- label.value.html(this.nice(pointer.value.origin) + "&nbsp;&ndash;&nbsp;" + this.nice(another.value.origin));
- sizes.label = label.o[0].clientWidth;
- sizes.border = (prc * domSize) / 100;
- }
- } else {
- another_label.o.css({visibility: "visible"});
- }
- break;
- case 1:
- if (sizes.border - sizes.label / 2 < another_label.o[0].offsetLeft - this.sizes.domOffset.left + another_label.o[0].clientWidth) {
- another_label.o.css({visibility: "hidden"});
- another_label.value.html(this.nice(another.value.origin));
- label.o.css({visibility: "visible"});
- prc = (prc - another.value.prc) / 2 + another.value.prc;
- if (another.value.prc !== pointer.value.prc) {
- label.value.html(this.nice(another.value.origin) + "&nbsp;&ndash;&nbsp;" + this.nice(pointer.value.origin));
- sizes.label = label.o[0].clientWidth;
- sizes.border = (prc * domSize) / 100;
- }
- } else {
- another_label.o.css({visibility: "visible"});
- }
- break;
- }
- }
- sizes = setPosition(label, sizes, prc);
- var domSize = self.sizes.domWidth;
- //This is the 0th pointer
- if (another_label) {
- sizes = {
- label: another_label.o[0].clientWidth,
- right: false,
- border: (another.value.prc * this.sizes.domWidth) / 100
- };
- sizes = setPosition(another_label, sizes, another.value.prc);
- }
- };
- Slider.prototype.redrawLimits = function () {
- if (this.settings.limits) {
- var limits = [true, true];
- for (var key in this.o.pointers) {
- if (!this.settings.single || key === 0) {
- var pointer = this.o.pointers[key];
- var label = this.o.labels[pointer.uid];
- var label_left = label.o[0].offsetLeft - this.sizes.domOffset.left;
- var limit = this.o.limits[0];
- if (label_left < limit[0].clientWidth)
- limits[0] = false;
- limit = this.o.limits[1];
- if (label_left + label.o[0].clientWidth > this.sizes.domWidth - limit[0].clientWidth)
- limits[1] = false;
- }
- }
- for (var i = 0; i < limits.length; i++) {
- if (limits[i]){
- angular.element(this.o.limits[i]).addClass("animate-show");}
- else{
- angular.element(this.o.limits[i]).addClass("animate-hidde");}
- }
- }
- };
- Slider.prototype.setValue = function () {
- var value = this.getValue();
- this.inputNode.attr("value", value);
- this.onstatechange.call(this, value, this.inputNode);
- };
- Slider.prototype.getValue = function () {
- if (!this.is.init){
- return false;}
- var $this = this;
- var value = "";
- angular.forEach(this.o.pointers, function (pointer, key) {
- if (pointer.value.prc !== undefined && !isNaN(pointer.value.prc)) {
- var pointerPrc = pointer.value.prc;
- var myValue = $this.prcToValue(pointerPrc);
- if (!$this.settings.smooth) {
- var myValue = utils.valueForDifferentScale($this.settings.from,
- $this.settings.to,
- pointerPrc,
- $this.settings.prcToValueMapper);
- }
- value += (key > 0 ? ";" : "") + myValue;
- }
- });
- return value;
- };
- Slider.prototype.getPrcValue = function () {
- if (!this.is.init)
- return false;
- var value = "";
- $.each(this.o.pointers, function (i) {
- if (this.value.prc !== undefined && !isNaN(this.value.prc))
- value += (i > 0 ? ";" : "") + this.value.prc;
- });
- return value;
- };
- Slider.prototype.prcToValue = function (prc) {
- var value;
- if (this.settings.heterogeneity && this.settings.heterogeneity.length > 0) {
- var h = this.settings.heterogeneity;
- var _start = 0;
- var _from = this.settings.from;
- for (var i = 0; i <= h.length; i++) {
- var v;
- if (h[i]){
- v = h[i].split("/");}
- else{
- v = [100, this.settings.to];}
- if (prc >= _start && prc <= v[0]) {
- value = _from + ((prc - _start) * (v[1] - _from)) / (v[0] - _start);
- }
- _start = v[0];
- _from = v[1];
- }
- }
- else {
- value = this.settings.from + (prc * this.settings.interval) / 100;
- }
- var roundedValue = this.round(value);
- return roundedValue;
- };
- Slider.prototype.valueToPrc = function (value, pointer) {
- var prc;
- if (this.settings.heterogeneity && this.settings.heterogeneity.length > 0) {
- var h = this.settings.heterogeneity;
- var _start = 0;
- var _from = this.settings.from;
- for (var i = 0; i <= h.length; i++) {
- var v;
- if (h[i])
- v = h[i].split("/");
- else
- v = [100, this.settings.to];
- if (value >= _from && value <= v[1]) {
- prc = pointer.limits(_start + (value - _from) * (v[0] - _start) / (v[1] - _from));
- }
- _start = v[0];
- _from = v[1];
- }
- } else {
- prc = pointer.limits((value - this.settings.from) * 100 / this.settings.interval);
- }
- return prc;
- };
- Slider.prototype.round = function (value) {
- value = Math.round(value / this.settings.step) * this.settings.step;
- if (this.settings.round){
- value = Math.round(value * Math.pow(10, this.settings.round)) / Math.pow(10, this.settings.round);}
- else{
- value = Math.round(value);}
- return value;
- };
- return Slider;
- }])
- .directive('attStepSlider', [
- '$compile', '$templateCache', '$timeout', '$window', 'slider', 'sliderConstants', 'utils',
- function (compile, templateCache, timeout, win, Slider, sliderConstants, utils) {
- /*
- The MIT License (MIT)
- Copyright (c) 2013 Julien Valéry
- */
- var templateUrl = 'app/scripts/ng_js_att_tpls/stepSlider/attStepSlider.html';
- return {
- restrict: 'AE',
- require: '?ngModel',
- scope: {
- options: '=',
- cutOff: '='
- },
- priority: 1,
- templateUrl: templateUrl,
- link: function (scope, element, attrs, ngModel) {
- if (!ngModel)
- return;
- scope.mainSliderClass = 'step-slider';
- element.after(compile(templateCache.get(templateUrl))(scope, function (clonedElement, scope) {
- scope.tmplElt = clonedElement;
- }));
- ngModel.$render = function () {
- if (ngModel.$viewValue.split && ngModel.$viewValue.split(";").length === 1) {
- ngModel.$viewValue = '0;' + ngModel.$viewValue;
- } else if (typeof (ngModel.$viewValue) === 'number') {
- ngModel.$viewValue = '0;' + ngModel.$viewValue;
- }
- if (!ngModel.$viewValue && ngModel.$viewValue !== 0) {
- return;
- }
- if (typeof (ngModel.$viewValue) === 'number') {
- ngModel.$viewValue = '' + ngModel.$viewValue;
- }
- if (scope.slider) {
- var firstPointer = '0';
- scope.slider.getPointers()[0].set(firstPointer, true);
- if (ngModel.$viewValue.split(";")[1]) {
- var value = ngModel.$viewValue.split(";")[1];
- if (value.length >= 4) {
- value = value.substring(0, 2);
- }
- if (!scope.options.realtime)
- scope.options.callback(parseFloat(ngModel.$viewValue.split(";")[1]));
- scope.slider.getPointers()[1].set(ngModel.$viewValue.split(";")[1], true);
- }
- }
- };
- var init = function () {
- scope.from = '' + scope.options.from;
- scope.to = '' + scope.options.to;
- if (scope.options.calculate && typeof scope.options.calculate === 'function') {
- scope.from = scope.options.calculate(scope.from);
- scope.to = scope.options.calculate(scope.to);
- }
- scope.showDividers = scope.options.showDividers;
- scope.COLORS = sliderConstants.COLORS;
- scope.sliderColor = scope.options.sliderColor;
- if (!scope.sliderColor)
- scope.sliderColor = sliderConstants.COLORS.REGULAR;
- var scaleArray = scope.options.scale;
- /* Make a copy of the scaleArray before converting it to percentage for the bars */
- var nonPercentScaleArray = [];
- /* Define variable for displaying lower range values */
- var scaledUpValueArray=[];
- /* Create Mapper for the percentage to value */
- var prcToValueMapper = {};
- for (var i in scaleArray) {
- var s = scaleArray[i];
- nonPercentScaleArray.push(s);
- }
- function addScaleArrayStartAndEnd() {
- if (scaleArray[0] !== 0) {
- scaleArray.splice(0, 0, 0);
- }
- if (scaleArray[scaleArray.length - 1] !== 100) {
- scaleArray.splice(scaleArray.length, 0, 100);
- }
- }
- function convertScaleArrayToPercentage() {
- if (scaleArray[scaleArray.length - 1] !== scope.options.to) {
- scaleArray.splice(scaleArray.length, 0, scope.options.to);
- }
-
- if(scope.options.displayScaledvalues){
- for(var i in scaleArray){
- scaledUpValueArray.push(Math.log2(scaleArray[i]));
- }
- var maxScaledUpValue=scaledUpValueArray[scaledUpValueArray.length-1];
- }
-
- for (var i in scaleArray) {
- var prcValue;
- var fromValueCheck = (scaleArray[i] / scope.options.from);
- var toValueCheck = (scaleArray[i] / scope.options.to);
-
- if (scope.options.displayScaledvalues){
- prcValue = (scaledUpValueArray[i] /maxScaledUpValue)*100;
- } else {
- prcValue = ((scaleArray[i] - scope.options.from) / (scope.options.to - scope.options.from)) * 100;
- }
-
- var realValue = scaleArray[i];
-
- if (toValueCheck === 1) {
- prcValue = 100;
- }
- else if (fromValueCheck === 1) {
- prcValue = 0;
- }
- scaleArray[i] = prcValue;
- prcToValueMapper['' + prcValue] = realValue;
- }
- }
- if ((scope.options.from !== 0 || scope.options.to !== 100)
- && scope.options.smooth) {
- /*
- scale array is in real values.
- */
- addScaleArrayStartAndEnd();
- scope.options.stepWithDifferentScale = true;
- }
- else if ((scope.options.from !== 0 || scope.options.to !== 100)
- && !scope.options.smooth) {
- /*
- Case for different from and to values other than 0 and 100
- so we have to do some different calculations
- */
- scope.options.stepWithDifferentScale = true;
- convertScaleArrayToPercentage();
- addScaleArrayStartAndEnd();
- }
- else {
- /*
- This is the normal case where the from and to values are 0 and
- 100 respectively.
- */
- //Check that the scale starts at 0 and 100
- convertScaleArrayToPercentage();
- addScaleArrayStartAndEnd();
- }
- var decimalPlaces = 0;
- if (scope.options.decimalPlaces) {
- decimalPlaces = scope.options.decimalPlaces;
- }
- //Modify the endDimension based on whether converison was passed in
- //Also change the toStr value to scale to the last factor
- scope.endDimension = scope.options.dimension;
- if (scope.options.conversion) {
- //Get the dimension of the last conversion
- var lastIndex = scope.options.conversion.length - 1;
- var lastDimension = scope.options.conversion[lastIndex].dimension;
- var lastScaleFactor = scope.options.conversion[lastIndex].scaleFactor;
- scope.endDimension = ' ' + lastDimension;
-
- var toVal = (scope.to / lastScaleFactor).toFixed(decimalPlaces);
- scope.toStr = toVal;
- } else {
- scope.toStr = scope.options.to;
- }
-
- var tooltipLabel = utils.convertToMbpsGbps(scope.toStr, scope.endDimension, scope.options.decimalPlaces);
- scope.toStr = tooltipLabel.unitValue;
- scope.endDimension = ' ' + tooltipLabel.unitLabel;
-
- var OPTIONS = {
- from: scope.options.from,
- to: scope.options.to,
- step: scope.options.step,
- smooth: scope.options.smooth,
- limits: true,
- stepWithDifferentScale: scope.options.stepWithDifferentScale,
- round: scope.options.round || false,
- value: ngModel.$viewValue,
- scale: scope.options.scale,
- nonPercentScaleArray: nonPercentScaleArray,
- prcToValueMapper: prcToValueMapper,
- firstDimension: scope.options.dimension,
- decimalPlaces: decimalPlaces,
- conversion: scope.options.conversion,
- realtimeCallback: scope.options.callback
- };
- if (angular.isFunction(scope.options.realtime)) {
- OPTIONS.realtimeCallback = function (value) {
- ngModel.$setViewValue(value);
- scope.options.callback(value);
- };
- }
- else {
- OPTIONS.callback = forceApply;
- }
- OPTIONS.calculate = scope.options.calculate || undefined;
- OPTIONS.onstatechange = scope.options.onstatechange || undefined;
- timeout(function () {
- var scaleDiv = scope.tmplElt.find('div')[7];
- if (!OPTIONS.conversion) {
- scope.tmplElt.find('div').eq(6).find('span').eq(0).css('padding-left', '10px');
- scope.tmplElt.find('div').eq(6).find('span').eq(0).css('padding-right', '15px');
- }
- scope.slider = angular.element.slider(element, scope.tmplElt, OPTIONS);
- angular.element(scaleDiv).html(scope.generateScale());
- scope.drawScale(scaleDiv);
- initListener();
- scope.$watch('options.disable', function (val) {
- if (scope.slider) {
- scope.tmplElt.toggleClass('disabled', val);
- scope.slider.disable(val);
- }
- });
- scope.$watch('cutOff', function (cutOffVal) {
- if (cutOffVal && cutOffVal > 0) {
- var cutOffPrc = (cutOffVal - scope.slider.settings.from) / (scope.slider.settings.to -
- scope.slider.settings.from);
- cutOffPrc = cutOffPrc * 100;
- scope.isCutOffSlider = true;
- scope.slider.settings.cutOffWidth = cutOffPrc;
- //cutOffVal is the actual value of the cutoff point
- scope.cutOffVal = cutOffVal;
- if (scope.options.conversion) {
- var convertedVal = utils.getConversionFactorValue(cutOffVal, scope.options.conversion, scope.options.dimension);
- convertedVal.scaledVal = parseFloat(convertedVal.scaledVal).toFixed(scope.options.decimalPlaces);
- scope.cutOffVal = convertedVal.scaledVal + ' ' + convertedVal.scaledDimension;
- }
- scope.slider.settings.cutOffVal = cutOffVal;
- //Calculate the cutOff percentage
- scope.slider.changeCutOffWidth(cutOffPrc + '%');
- var scale = scope.slider.settings.nonPercentScaleArray;
- //Calculate where the cutOff point in relation to the scale array
- for (var i in scale) {
- if (i >= 1) {
- var lowerVal = scale[i - 1];
- var higherVal = scale[i];
- if (cutOffVal > lowerVal && cutOffVal <= higherVal) {
- scope.slider.settings.cutOffIndex = i;
- }
- }
- }
- } else {
- scope.slider.settings.cutOffVal = 0;
- }
- });
- });
- };
- function initListener() {
- angular.element(win).bind('resize', function (event) {
- scope.slider.onresize();
- });
- }
- scope.generateScale = function () {
- if (scope.options.scale && scope.options.scale.length > 0) {
- var str = "";
- var s = scope.options.scale;
- var position = 'left';
- for (var i = 0; i < s.length; i++) {
- if (i !== 0 && i !== s.length - 1) {
- var scaledPosition = ((s[i] - scope.from) / (scope.to - scope.from)) * 100;
- if (scope.options.stepWithDifferentScale && !scope.options.smooth) {
- scaledPosition = s[i];
- }
- str += '<span style="' + position + ': ' + scaledPosition + '%"></span>';
- }
- }
- return str;
- } else
- return "";
- return "";
- };
- scope.drawScale = function (scaleDiv) {
- angular.forEach(angular.element(scaleDiv).find('ins'), function (scaleLabel, key) {
- scaleLabel.style.marginLeft = -scaleLabel.clientWidth / 2;
- });
- };
- var forceApply = function (value) {
- var val = value.split(";")[1];
- scope.$apply(function () {
- ngModel.$setViewValue(parseInt(val));
- });
- if (scope.options.callback) {
- scope.options.callback(parseInt(val));
- }
- };
- scope.$watch('options', function (value) {
- init();
- });
- angular.element.slider = function (inputElement, element, settings) {
- if (!element.data('jslider'))
- element.data('jslider', new Slider(inputElement, element, settings));
- var sliderObj = element.data('jslider');
- return sliderObj;
- };
- }
- };
- }]);
-angular.module('att.abs.steptracker', ['att.abs.transition'])
- .directive('steptracker', ['$timeout', function ($timeout) {
- return {
- // This allows dev's clickHandler to cancel an operation
- priority: 100,
- scope: {
- sdata: "=sdata",
- cstep: "=currentStep",
- clickHandler: '=?',
- disableClick: '=?'
- },
- restrict: 'EA',
- replace: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/steptracker/step-tracker.html',
- link: function (scope, elem) {
- if (scope.disableClick === undefined) {
- scope.disableClick = false;
- }
- $timeout(function () {
- if (scope.cstep < 1) {
- scope.cstep = 1;
- }
- else if (scope.cstep > scope.sdata.length) {
- scope.cstep = scope.sdata.length;
- }
- var divs = elem.find('div');
- var slidertracks = [];
- for (var i in divs) {
- if (divs.eq(i)[0]) {
- var el = divs.eq(i)[0].className;
- if (el.indexOf('track ng-scope') > -1) {
- slidertracks.push(divs.eq(i));
- }
- }
- }
- var currentPage,totalPage,currentTrack = updateCurrentTrack(scope.cstep);
- function updateCurrentTrack(step) {
- // Always return the step-1 because array starts at 0
- return angular.element(slidertracks[step - 1]);
- }
- function updateTrackWidth() {
- if (scope.cstep > 0 && scope.cstep <= scope.sdata.length - 1 && currentPage > 0) {
- var newWidth = ((currentPage / totalPage) * 100) + "%";
- currentTrack = updateCurrentTrack(scope.cstep);
- currentTrack.css('width', newWidth);
- }
- }
- function updatePages() {
- if (scope.cstep <= scope.sdata.length) {
- currentPage = scope.sdata[scope.cstep - 1]['currentPage'];
- totalPage = scope.sdata[scope.cstep - 1]['totalPages'];
- }
- }
- // dynamically add width for steps, depending on the number of steps.
- scope.set_width = function (indexval) {
- var setwidth = (100 / (scope.sdata.length - 1)) + "%";
- // skip last element and add width for all other element
- if ((scope.sdata.length - 1) > indexval) {
- return {'width': setwidth};
- }
- };
- scope.$watch('sdata', function () {
- updatePages();
- var prevStep = scope.cstep;
- // Before anything, ensure currentPage is never below 1
- if (currentPage < 1) {
- currentPage = 1;
- if (scope.cstep !== 1) {
- // Decrease step, current track width is 0%, new step width updates
- scope.cstep--;
- updatePages();
- }
- }
- // Move to next step, reset currentPage, totalPage, and ensure previous steps are completed
- if (currentPage > totalPage) {
- if (scope.cstep > scope.sdata.length - 1) {
- scope.cstep++;
- return;
- } else {
- currentPage = totalPage;
- updateTrackWidth();
- scope.cstep++;
- updatePages();
- updateTrackWidth();
- }
- }
- if (currentPage < 1 && prevStep === scope.cstep) {
- currentPage = 1;
- if (scope.cstep > 1) {
- scope.cstep--;
- scope.sdata[scope.cstep - 1]['currentPage'] = scope.sdata[scope.cstep - 1]['totalPages'];
- scope.sdata[scope.cstep]['currentPage'] = 1;
- }
- }
- updateTrackWidth();
- }, true);
- //add the active class for current step
- scope.activestep = function (index) {
- return (index === scope.cstep - 1);
- };
- //add the done class for finished step
- scope.donesteps = function (index) {
- return (index < scope.cstep - 1);
- };
- //add the last class for final step
- scope.laststep = function (index) {
- return (index === scope.sdata.length - 1);
- };
- scope.isIncomplete = function (index) {
- if (index === scope.cstep - 1) {
- return false;
- }
- if (index >= 0 && index < scope.sdata.length - 1) {
- var step = scope.sdata[index];
- return (step['currentPage'] <= step['totalPages']);
- }
- };
- //click event
- scope.stepclick = function ($event, steps) {
- // If we are decreasing steps, reset all currentPage counts to 1
- if (steps < scope.cstep) {
- for (var i = scope.cstep - 1; i > steps; i--) {
- scope.sdata[i]['currentPage'] = 1;
- }
- scope.sdata[steps]['currentPage']--;
- }
- if (angular.isFunction(scope.clickHandler)) {
- scope.clickHandler($event, steps);
- }
- scope.cstep = steps + 1;
- // In the case we decremented previously from this step, we need to reset currentpage to default
- if (scope.cstep <= scope.sdata.length && scope.sdata[scope.cstep]['currentPage'] < 1) {
- scope.sdata[scope.cstep]['currentPage'] = 1;
- }
- updatePages();
- updateTrackWidth();
- };
- }, 100);
- }
- };
- }
- ])
- .constant('timelineConstants', {
- STEP_TYPE: {
- ALERT: 'alert',
- COMPLETED: 'completed',
- CANCELLED: 'cancelled'
- }
- })
- .controller('AttTimelineCtrl', ['$scope', '$timeout', function ($scope, $timeout) {
- var timelineBarCtrls = [];
- var timelineDotCtrls = [];
- this.numSteps = 0;
- this.isAlternate = function () {
- return $scope.alternate;
- };
- this.addTimelineBarCtrls = function (t) {
- timelineBarCtrls.push(t);
- };
- this.addTimelineDotCtrls = function (b) {
- timelineDotCtrls.push(b);
- };
- $timeout(init, 200);
- function init() {
- function compare(a, b) {
- if (a.order < b.order) {
- return -1;
- }
- if (a.order > b.order) {
- return 1;
- }
- return 0;
- }
- timelineDotCtrls.sort(compare);
- timelineBarCtrls.sort(compare);
- if ($scope.$parent.animate) {
- animateSequence();
- }
- $scope.$watch('trigger', function (val) {
- if (val) {
- $scope.resetTimeline();
- } else {
- $scope.$parent.animate = false;
- }
- });
- }
- function animateSequence() {
- var dotsDuration = .25;
- var timelineBarProgressDuration = .25;
- if (typeof $scope.barAnimateDuration === 'number') {
- timelineBarProgressDuration = $scope.barAnimateDuration;
- }
- var start = createAnimation(0, timelineBarProgressDuration);
- function setToInactiveStates() {
- for (var i in timelineDotCtrls) {
- var dotCtrl = timelineDotCtrls[i];
- if (i % 2 === 0) {
- dotCtrl.unhoveredStateForBelow(.25);
- } else {
- dotCtrl.unhoveredStateForAbove(.25);
- }
- if (dotCtrl.isStop()) {
- break;
- }
- }
- }
- function createAnimation(i, duration) {
- if (i === 0) {
- return function () {
- if (timelineDotCtrls[i + 1].isStop() && timelineDotCtrls[i + 1].isCancelled()) {
- timelineBarCtrls[i].isCancelled(true);
- }
- timelineBarCtrls[i].animate(createAnimation(i + 1, duration), duration);
- };
- } else if (i === timelineBarCtrls.length - 1) {
- return function () {
- //Removes the bolded text from the start
- if (timelineDotCtrls[0].isCurrentStep()) {
- timelineDotCtrls[0].isCurrentStep(false);
- }
- if (timelineDotCtrls[i].isStop()) {
- timelineDotCtrls[i - 1].shrinkAnimate(dotsDuration);
- timelineDotCtrls[i].isCurrentStep(true);
- } else {
- timelineDotCtrls[i - 1].shrinkAnimate(dotsDuration);
- timelineBarCtrls[i].animate(createAnimation(i + 1, duration), duration);
- }
- timelineDotCtrls[i].expandedAnimate(dotsDuration);
- $timeout(function () {
- setToInactiveStates();
- }, 500);
- };
- }
- //End Dot
- else if (i === timelineBarCtrls.length) {
- return function () {
- //Removes the bolded text from the start
- if (timelineDotCtrls[0].isCurrentStep()) {
- timelineDotCtrls[0].isCurrentStep(false);
- }
- timelineDotCtrls[i - 1].shrinkAnimate(dotsDuration);
- timelineDotCtrls[i].expandedAnimate(dotsDuration);
- timelineDotCtrls[i].isCurrentStep(true);
- $timeout(function () {
- setToInactiveStates();
- }, 500);
- };
- }
- else {
- return function () {
- //Removes the bolded text from the start
- if (timelineDotCtrls[0].isCurrentStep()) {
- timelineDotCtrls[0].isCurrentStep(false);
- }
- if (timelineDotCtrls[i].isStop()) {
- timelineDotCtrls[i - 1].shrinkAnimate(dotsDuration);
- timelineDotCtrls[i].expandedAnimate(dotsDuration);
- timelineDotCtrls[i].isCurrentStep(true);
- $timeout(function () {
- setToInactiveStates();
- }, 500);
- } else {
- if (timelineDotCtrls[i + 1].isStop() && timelineDotCtrls[i + 1].isCancelled()) {
- timelineBarCtrls[i].isCancelled(true);
- }
- timelineDotCtrls[i - 1].shrinkAnimate(dotsDuration);
- timelineBarCtrls[i].animate(createAnimation(i + 1, duration), duration);
- timelineDotCtrls[i].expandedAnimate(dotsDuration);
- }
- };
- }
- }
- start();
- }
- }])
- .directive('attTimeline', ['$timeout', '$compile', function ($timeout, $compile) {
- return {
- restrict: 'EA',
- replace: true,
- scope: {
- steps: '=',
- trigger: '=',
- alternate: '=',
- barAnimateDuration: '='
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/steptracker/timeline.html',
- controller: 'AttTimelineCtrl',
- link: function (scope, element, attrs, ctrl) {
- var init = function () {
- var steps = scope.steps;
- var middleSteps = [];
- for (var i = 1; i < steps.length; i++) {
- var aStep = steps[i];
- middleSteps.push(aStep);
- }
- scope.middleSteps = middleSteps;
- //Used in calculating the width of the loading bars
- ctrl.numSteps = steps.length - 1;
- };
- init();
- //Recompile in case of scope changes
- scope.resetTimeline = function () {
- scope.animate = true;
- $compile(element)(scope);
- };
- }
- };
- }])
- .controller('TimelineBarCtrl', ['$scope', function ($scope) {
- this.type = 'timelinebar';
- this.order = parseInt($scope.order);
- this.animate = function (callback, duration) {
- $scope.loadingAnimation(callback, duration);
- };
- this.isCancelled = function (isCancelled) {
- $scope.isCancelled = isCancelled;
- };
- }])
- .directive('timelineBar', ['animation', '$progressBar', function (animation, $progressBar) {
- return {
- restrict: 'EA',
- replace: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/steptracker/timelineBar.html',
- scope: {
- order: '@'
- },
- require: ['^attTimeline', 'timelineBar'],
- controller: 'TimelineBarCtrl',
- link: function (scope, element, attrs, ctrls) {
- var attTimelineCtrl = ctrls[0];
- var timelineBarCtrl = ctrls[1];
- attTimelineCtrl.addTimelineBarCtrls(timelineBarCtrl);
- scope.isCompleted = true;
- var widthPerc = (100 / attTimelineCtrl.numSteps) - 3;
- element.css('width', widthPerc + '%');
- var elem = element.find('div').eq(0);
- animation.set(elem, {opacity: 0.0});
- var updateCallback = function (selfElement) {
- animation.set(elem, {opacity: 1.0});
- animation.set(elem, {
- scaleX: selfElement.progress(),
- transformOrigin: "left"
- });
- };
- scope.loadingAnimation = $progressBar(updateCallback);
- }
- };
- }])
- .controller('TimelineDotCtrl', ['$scope', '$timeout', 'timelineConstants', function ($scope, $timeout, timelineConstants) {
- this.type = 'dot';
- this.order = parseInt($scope.order);
- var self = this;
- $timeout(function () {
- if (self.order !== 0) {
- if (self.order % 2 !== 0) {
- $scope.initializeAboveForAnimation();
- }
- else {
- $scope.initializeBelowForAnimation();
- }
- }
- });
- this.expandedAnimate = function (duration) {
- $scope.setColor();
- $scope.expandedAnimate(duration);
- if (self.order !== 0 && !$scope.isStepsLessThanFive()) {
- if (self.order % 2 !== 0) {
- $scope.expandContentForAbove(duration);
- } else {
- $scope.expandContentForBelow(duration);
- }
- }
- };
- this.unhoveredStateForAbove = function (duration) {
- $scope.unhoveredStateForAbove(duration);
- };
- this.unhoveredStateForBelow = function (duration) {
- $scope.unhoveredStateForBelow(duration);
- };
- this.shrinkAnimate = function (duration) {
- $scope.shrinkAnimate(duration);
- };
- this.setExpanded = function () {
- $scope.setSize(3);
- };
- this.isStop = function () {
- return $scope.isStop;
- };
- this.isCancelled = function () {
- return ($scope.type === timelineConstants.STEP_TYPE.CANCELLED);
- };
- this.isAlert = function () {
- return ($scope.type === timelineConstants.STEP_TYPE.ALERT);
- };
- //Sets the bolded text
- this.isCurrentStep = function (isCurrentStep) {
- if (isCurrentStep !== undefined) {
- $scope.isCurrentStep = isCurrentStep;
- }
- return $scope.isCurrentStep;
- };
- }])
- .directive('timelineDot', ['animation', 'timelineConstants',
- function (animation, timelineConstants) {
- return {
- restrict: 'EA',
- replace: true,
- scope: {
- order: '@',
- title: '@',
- description: '@',
- by: '@',
- date: '@',
- type: '@'
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/steptracker/timelineDot.html',
- require: ['^attTimeline', 'timelineDot'],
- controller: 'TimelineDotCtrl',
- link: function (scope, element, attrs, ctrls) {
- var attTimelineCtrl = ctrls[0];
- var timelineDotCtrl = ctrls[1];
- attTimelineCtrl.addTimelineDotCtrls(timelineDotCtrl);
- scope.numSteps = attTimelineCtrl.numSteps + 1;
- scope.isCurrentStep = false;
- scope.isCompleted = false;
- scope.isStop = false;
- if (scope.type === timelineConstants.STEP_TYPE.ALERT || scope.type === timelineConstants.STEP_TYPE.CANCELLED) {
- scope.isStop = true;
- }
- scope.isInactive = true;
- var divs = element.find('div');
- var biggerCircleElem = divs.eq(0);
- var expandableCircleElem = divs.eq(2);
- var infoboxElem = divs.eq(3);
- var titleElem = divs.eq(5);
- var contentElem = divs.eq(6);
- var dateElem = divs.eq(9);
- function isEmptyStep() {
- if (!scope.description && !scope.by && !scope.date) {
- return true;
- }
- return false;
- }
- scope.isStepsLessThanFive = function () {
- if (scope.numSteps < 5) {
- return true;
- }
- return false;
- };
- scope.titleMouseover = function (num) {
- if (!scope.isStepsLessThanFive() && !isEmptyStep()) {
- if (num === 1 && scope.order % 2 === 0) {
- scope.expandContentForBelow(.25);
- }
- if (num === 2 && scope.order % 2 !== 0) {
- scope.expandContentForAbove(.25);
- }
- }
- };
- scope.titleMouseleave = function () {
- if (scope.order % 2 === 0) {
- scope.unhoveredStateForBelow(.25);
- }
- else {
- scope.unhoveredStateForAbove(.25);
- }
- };
- scope.initializeAboveForAnimation = function () {
- if (!scope.isStepsLessThanFive() && attTimelineCtrl.isAlternate()) {
- animation.set(contentElem, {opacity: 0});
- animation.set(dateElem, {opacity: 0});
- if (!isEmptyStep()) {
- var yOffset = contentElem[0].offsetHeight + dateElem[0].offsetHeight;
- animation.set(titleElem, {'top': yOffset});
- }
- }
- };
- scope.expandContentForAbove = function (duration) {
- if (!scope.isStepsLessThanFive() && attTimelineCtrl.isAlternate()) {
- animation.to(titleElem, duration, {'top': 0});
- animation.to(contentElem, duration, {opacity: 1});
- animation.to(dateElem, duration, {opacity: 1});
- }
- };
- scope.unhoveredStateForAbove = function (duration) {
- if (!scope.isStepsLessThanFive() && attTimelineCtrl.isAlternate()) {
- animation.set(contentElem, {opacity: 0});
- animation.set(dateElem, {opacity: 1});
- var yOffset = contentElem[0].offsetHeight;
- animation.to(titleElem, duration, {'top': yOffset});
- }
- };
- scope.initializeBelowForAnimation = function () {
- if (!scope.isStepsLessThanFive() && attTimelineCtrl.isAlternate()) {
- animation.set(contentElem, {height: '0%', opacity: 0, top: '-20px'});
- animation.set(dateElem, {opacity: 0});
- }
- };
- scope.expandContentForBelow = function (duration) {
- if (!scope.isStepsLessThanFive() && attTimelineCtrl.isAlternate()) {
- animation.set(dateElem, {opacity: 1});
- animation.to(contentElem, duration, {height: 'auto', opacity: 1, top: '0px'});
- }
- };
- scope.unhoveredStateForBelow = function (duration) {
- if (!scope.isStepsLessThanFive() && attTimelineCtrl.isAlternate()) {
- animation.to(contentElem, duration, {height: '0%', opacity: 0, top: '-20px', position: 'relative'});
- animation.set(dateElem, {opacity: 1});
- }
- };
- /*Default Initializaztion*/
- //If the info box is above and the description and date and by are empty then we have do reset its position
- if (isEmptyStep() && (scope.order % 2 !== 0 && attTimelineCtrl.isAlternate())) {
- infoboxElem.css('top', '-47px');
- }
- //Check if the order is odd and set the appropiate above or below and other effects
- if (scope.order % 2 === 0 || !attTimelineCtrl.isAlternate()) {
- scope.isBelowInfoBoxShown = true;
- }
- else {
- scope.isBelowInfoBoxShown = false;
- }
- //modify some css for steps less than 5 and not alternating
- if (scope.isStepsLessThanFive() && !attTimelineCtrl.isAlternate()) {
- animation.set(dateElem, {marginTop: 10});
- }
- //For IE 8 fix
- animation.set(biggerCircleElem, {opacity: '.5'});
- //shrink the expandableCircle to we can expand it later
- animation.set(expandableCircleElem, {opacity: '0.0'});
- animation.set(expandableCircleElem, {scale: .10});
- if (scope.order === 0) {
- animation.set(expandableCircleElem, {opacity: '1.0'});
- animation.set(expandableCircleElem, {scale: 1});
- animation.set(biggerCircleElem, {scale: 3});
- scope.isCurrentStep = true;
- scope.isInactive = false;
- scope.isCompleted = true;
- }
- scope.setColor = function () {
- scope.isInactive = false;
- if (scope.type === timelineConstants.STEP_TYPE.CANCELLED) {
- scope.isCancelled = true;
- }
- else if (scope.type === timelineConstants.STEP_TYPE.ALERT) {
- scope.isAlert = true;
- }
- else {
- scope.isCompleted = true;
- }
- if (!scope.$phase) {
- scope.$apply();
- }
- };
- scope.setSize = function (size) {
- animation.set(biggerCircle, {scale: size});
- };
- scope.setExpandedCircle = function () {
- animation.set(expandableCircleElem, {opacity: '1.0'});
- animation.set(expandableCircleElem, {scale: 1});
- };
- scope.expandedAnimate = function (duration) {
- animation.to(biggerCircleElem, duration, {scale: 3});
- animation.set(expandableCircleElem, {opacity: '1.0'});
- animation.to(expandableCircleElem, duration, {scale: 1});
- };
- scope.shrinkAnimate = function (duration) {
- animation.to(biggerCircleElem, duration, {scale: 1});
- };
- }
- };
- }]);
-angular.module('att.abs.table', ['att.abs.utilities'])
-.constant('tableConfig', {
- //true for descending & false for ascending
- defaultSortPattern: false,
- highlightSearchStringClass: 'tablesorter-search-highlight'
-})
-
-.directive('attTable', ['$filter', function($filter) {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- scope: {
- tableData: "=",
- viewPerPage: "=",
- currentPage: "=",
- totalPage: "=",
- searchCategory: "=",
- searchString: "="
- },
- require: 'attTable',
- templateUrl: 'app/scripts/ng_js_att_tpls/table/attTable.html',
- controller: ['$scope', function($scope) {
- this.headers = [];
- this.currentSortIndex = null;
- this.setIndex = function(headerScope) {
- this.headers.push(headerScope);
- };
- 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.sortData = function(columnIndex, reverse) {
- $scope.$parent.columnIndex = columnIndex;
- $scope.$parent.reverse = reverse;
- this.currentSortIndex = columnIndex;
- $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();
- }
- }
- };
- }],
- link: function(scope, elem, attr, ctrl) {
- scope.searchCriteria = {};
- scope.$watchCollection('tableData', function(value) {
- if(value && !isNaN(value.length)) {
- scope.totalRows = value.length;
- }
- });
- scope.$watch('currentPage', function(val) {
- scope.$parent.currentPage = val;
- });
- scope.$watch('viewPerPage', function(val) {
- scope.$parent.viewPerPage = val;
- });
- 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) {
- scope.$parent.searchCriteria = val;
- scope.totalRows = scope.tableData && ($filter('filter')(scope.tableData, val, false)).length || 0;
- scope.currentPage = 1;
- });
- }
- };
-}])
-
-.directive('attTableRow', [function() {
- return {
- restrict: 'EA',
- compile: function (elem, attr) {
- if (attr.type === 'header') {
- elem.find('tr').eq(0).addClass('tablesorter-headerRow');
- } else if (attr.type === 'body') {
- var html = elem.children();
- if(attr.rowRepeat){
- if (attr.trackBy) {
- html.attr('ng-repeat', attr.rowRepeat.concat(" | orderBy : columnIndex : reverse | filter : searchCriteria : false | attLimitTo : viewPerPage : viewPerPage*(currentPage-1) track by " + attr.trackBy));
- } else {
- html.attr('ng-repeat', attr.rowRepeat.concat(" | orderBy : columnIndex : reverse | filter : searchCriteria : false | attLimitTo : viewPerPage : viewPerPage*(currentPage-1) track by $index"));
- }
- }
- html.attr('ng-class', "{'alt-row': $even,'normal-row': $odd}");
- elem.append(html);
- }
- }
- };
-}])
-
-.directive('attTableHeader', ['tableConfig', function(tableConfig) {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- scope: {
- sortable: '@',
- defaultSort: '@',
- index: '@key'
- },
- require: '^attTable',
- templateUrl: 'app/scripts/ng_js_att_tpls/table/attTableHeader.html',
- link: function(scope, elem, attr, ctrl) {
- var reverse = tableConfig.defaultSortPattern;
- scope.headerName = elem.text();
- scope.sortPattern = null;
- ctrl.setIndex(scope);
-
- 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);
- 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 = tableConfig.defaultSortPattern;
- };
- }
- };
-}])
-
-.directive('attTableBody', ['$filter', '$timeout', 'tableConfig', function($filter, $timeout, tableConfig) {
- return {
- restrict: 'EA',
- require: '^attTable',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/table/attTableBody.html',
- link: function (scope, elem, attr, ctrl) {
- var highlightSearchStringClass = tableConfig.highlightSearchStringClass;
- var searchString = "";
- var wrapElement = function (elem) {
- var text = elem.text();
- elem.html($filter('highlight')(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);
- }
- }
- };
- $timeout(function () {
- var actualHtml = elem.children();
- scope.$watch(function () {
- return ctrl.getSearchString();
- }, function (val) {
- searchString = val;
- clearWrap(elem);
- if (actualHtml.length > 0) {
- traverse(elem);
- } else {
- wrapElement(elem);
- }
- });
- }, 50);
- }
- };
-}]);
-
-angular.module('att.abs.tableMessages', ['att.abs.utilities'])
- .constant('messageConstants', {
- TABLE_MESSAGE_TYPES: {
- noMatching: 1,
- errorLoading: 2,
- magnifySearch: 3,
- isLoading: 4},
- USER_MESSAGE_TYPES: {
- success: 1,
- error: 0
- }
- })
- .directive('attTableMessage', ['messageConstants', function(messageConstants) {
- return {
- restrict: 'AE',
- replace: true,
- transclude: true,
- scope: {
- msgType: '=',
- onRefreshClick: '&'
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/tableMessages/attTableMessage.html',
- link: function(scope) {
- scope.messageConstants = messageConstants;
- scope.refreshAction = function(evt) {
- scope.onRefreshClick(evt);
- };
- }
- };
- }]).directive('attUserMessage', ['messageConstants', '$timeout', 'DOMHelper', function(messageConstants, $timeout, DOMHelper) {
- return {
- restrict: 'AE',
- replace: true,
- transclude: true,
- scope: {
- thetitle: '=',
- type: '=',
- message: '=',
- trigger: '='
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/tableMessages/attUserMessage.html',
- link: function(scope, element) {
- var prevActiveElement = undefined;
- var firstElement = undefined;
- scope.messageConstants = messageConstants;
-
- $timeout(function() {
- firstElement = DOMHelper.firstTabableElement(element[0]);
- }, 10);
-
-
- scope.$watch('trigger', function() {
- if (scope.trigger) {
- prevActiveElement = document.activeElement;
- if (angular.isDefined(firstElement)) {
- firstElement.focus();
- }
- } else {
- if (angular.isDefined(prevActiveElement)) {
- prevActiveElement.focus();
- }
- }
- })
-
-
- }
- };
- }]);
-angular.module('att.abs.tabs', ['att.abs.utilities'])
- .directive('attTabs', function () {
- return{
- restrict: 'EA',
- transclude: false,
- replace: true,
- scope: {
- tabs: "=title"
- },
- controller: ['$scope', function ($scope) {
- this.getData = function () {
- return $scope.tabs;
- };
- this.onClickTab = function (tab) {
- $scope.currentTab = tab.url;
- return $scope.currentTab;
- };
- this.isActiveTab = function (tab) {
- return (tab === $scope.currentTab);
- };
- }],
- link: function (scope) {
- for (var i = 0; i < scope.tabs.length; i++) {
- if ((scope.tabs[i].selected) && (scope.tabs[i].url)) {
- scope.currentTab = scope.tabs[i].url;
- }
- }
- }
- };
- })
- .directive('floatingTabs', function () {
- return {
- require: '^attTabs',
- restrict: 'EA',
- transclude: false,
- replace: true,
- scope: {
- size: "@"
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/tabs/floatingTabs.html',
- link: function (scope, elem, attr, attTabsCtrl) {
- scope.tabs = attTabsCtrl.getData();
- scope.onClickTab = attTabsCtrl.onClickTab;
- scope.isActiveTab = attTabsCtrl.isActiveTab;
- }
- };
- })
- .directive('simplifiedTabs', function () {
- return {
- require: '^attTabs',
- restrict: 'EA',
- transclude: false,
- replace: true,
- scope: {
- ctab: "=ngModel"
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/tabs/simplifiedTabs.html',
- link: function (scope, elem, attr, attTabsCtrl) {
- scope.tabs = attTabsCtrl.getData();
- scope.clickTab = function (tab) {
- scope.ctab = tab.id;
- return scope.ctab;
- };
- scope.isActive = function (tab) {
- return (tab === scope.ctab);
- };
- }
- };
- })
- .directive('genericTabs', function () {
- return {
- require: '^attTabs',
- restrict: 'EA',
- transclude: false,
- replace: true,
- scope: {
- ctab: "=ngModel"
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/tabs/genericTabs.html',
- link: function (scope, elem, attr, attTabsCtrl) {
- scope.tabs = attTabsCtrl.getData();
- scope.clickTab = function (tab) {
- scope.ctab = tab.id;
- return scope.ctab;
- };
- scope.isActive = function (tab) {
- return (tab === scope.ctab);
- };
- }
- };
- })
- .directive('skipNavigation', function(){
- return{
- link: function(scope,elem,attr){
- elem.bind('click', function(){
- var skiptoBody = angular.element(elem.parent().parent().parent().parent())[0].querySelector('a.skiptoBody');
- (angular.element(skiptoBody)).attr('tabindex',-1);
- skiptoBody.focus();
- });
-
- }
- }
- })
- .directive('parentTab', [function () {
- return {
- restrict: 'EA',
- scope: {
- menuItems: '=',
- activeSubMenu: '=',
- activeMenu: '='
- },
- controller: ['$scope', function ($scope) {
- $scope.megaMenu = $scope.menuItems;
- $scope.megaMenuTab;
- $scope.megaMenuHoverTab;
- this.setMenu = function () {
- $scope.menuItems = $scope.megaMenu;
- $scope.activeSubMenu.scroll=false;
- for (var i = 0; i < $scope.menuItems.length; i++) {
- if ($scope.menuItems[i].active) {
- $scope.activeMenu = $scope.menuItems[i];
- }
- }
- this.setSubMenuStatus(false);
- $scope.$apply();
- };
- this.setActiveMenu = function () {
- if (!($scope.megaMenuTab === undefined || $scope.megaMenuTab === null)) {
- $scope.menuItems = [$scope.megaMenuTab];
- $scope.megaMenuTab.scroll = true;
- $scope.activeMenu = {};
- $scope.activeSubMenu = $scope.megaMenuTab;
- this.setSubMenuStatus(true);
- }
- else{
- for(var i=0; i<$scope.menuItems.length; i++){
- ($scope.menuItems[i].active = false);
- if($scope.menuItems[i].subItems)
- for(var j=0; j<$scope.menuItems[i].subItems.length; j++){
- $scope.menuItems[i].subItems[j].active = false;
- };
- };
- $scope.menuItems=$scope.megaMenu;
- }
- $scope.$apply();
- };
- var checkSubMenuStatus = false;
- this.setSubMenuStatus = function (value) {
- checkSubMenuStatus = value;
- };
- this.getSubMenuStatus = function () {
- return checkSubMenuStatus;
- };
- this.setActiveMenuTab = function (tab) {
- $scope.megaMenuTab = tab;
- };
- this.setActiveMenuHoverTab = function (tab) {
- $scope.megaMenuHoverTab = tab;
- };
- this.setActiveSubMenuTab = function () {
- $scope.megaMenuTab = $scope.megaMenuHoverTab;
- };
- this.resetMenuTab = function () {
- $scope.megaMenuTab = undefined;
- };
- this.clearSubMenu = function () {
- /* Clears Sub-tems when focus shifts from Sub-menu to Mega menu*/
- $scope.$evalAsync(function(){
- $scope.megaMenuTab = undefined;
- $scope.megaMenuHoverTab = undefined;
- })
- };
- }]
- };
- }])
- .directive('parentmenuTabs', [function () {
- return {
- restrict: 'EA',
- transclude: true,
- replace: true,
- scope: {
- megaMenu: '@',
- menuItems: '='
- },
- controller: ['$scope', function ($scope) {
- this.getMenu = function () {
- return $scope.menuItems;
- };
- this.setMenu = function (menuItem) {
- $scope.menuItems = menuItem;
- };
- }],
- templateUrl: 'app/scripts/ng_js_att_tpls/tabs/parentmenuTab.html'
- };
- }])
-
- .directive('menuTabs', ["$window", "$document",'events','keymap', function (win, $document, events, keymap) {
- return {
- restrict: 'EA',
- transclude: true,
- replace: true,
- require: ['^?parentTab', '^?parentmenuTabs'],
- scope: {
- activeMenu: "=",
- menuItem: "=",
- subMenu: "@",
- subItemActive: "@",
- tabName: "=?",
- tabUrl: "=?"
- },
- templateUrl: function (element, attrs) {
- if (attrs.megaMenu) {
- return 'app/scripts/ng_js_att_tpls/tabs/menuTab.html';
- }
- else {
- return 'app/scripts/ng_js_att_tpls/tabs/submenuTab.html';
- }
- },
- link: function (scope, elem, attr, ctrl) {
- var parentCtrl = ctrl[0];
- var parentmenuCtrl = ctrl[1];
- scope.clickInactive = true;
- scope.showHoverChild = function (e) {
- scope.clickInactive = false;
- scope.hoverChild = ctrl[0].getSubMenuStatus();
- if (e.type === "mouseover" && ctrl[0].getSubMenuStatus())
- {
- //scope.showChildren(e);
- }
-
- };
- scope.showChildren = function (e) {
- scope.parentMenuItems = parentmenuCtrl.getMenu();
- for (var i = 0; i < scope.parentMenuItems.length; i++) {
- scope.parentMenuItems[i].active = false;
- if (scope.parentMenuItems[i].subItems) {
- for (var j = 0; j < scope.parentMenuItems[i].subItems.length; j++) {
- scope.parentMenuItems[i].subItems[j].active = false;
- }
- }
- scope.clickInactive = true;
- }
- scope.menuItem.active = true;
- scope.activeMenu = scope.menuItem;
- e.stopPropagation();
- };
- scope.$watch("subItemActive", function (value) {
- if (value === "true" && scope.subMenu === 'true') {
- parentCtrl.setActiveMenuHoverTab(scope.menuItem);
- }
- });
- scope.showMenuClick = function (e) {
- parentCtrl.setActiveMenuTab(scope.menuItem);
- e.stopPropagation();
- };
- scope.showSubMenuClick = function (e) {
- parentCtrl.setActiveSubMenuTab();
- e.stopPropagation();
- };
- scope.resetMenu = function (e) {
- parentCtrl.resetMenuTab();
- e.stopPropagation();
- };
- function debounce(method, delay) {
- clearTimeout(method._tId);
- method._tId = setTimeout(function () {
- parentCtrl.setMenu();
- }, delay);
- }
- function debounce1(method, delay) {
- clearTimeout(method._tId);
- method._tId = setTimeout(function () {
- parentCtrl.setActiveMenu();
- }, delay);
- }
- $document.bind('scroll', function () {
- if (win.pageYOffset === 0) {
- debounce(parentCtrl.setMenu, 100);
- }
- else if (win.pageYOffset > 1 && win.pageYOffset < 1500) {
- debounce1(parentCtrl.setActiveMenu, 100);
- }
- });
- elem.bind('keydown', function(evt){
- if (!(evt.keyCode)){
- evt.keyCode = evt.which;
- }
- if(evt.keyCode !== keymap.KEY.TAB){
- events.preventDefault(evt);
- events.stopPropagation(evt);
- }
-
- switch (evt.keyCode) {
- case keymap.KEY.ESC:
- var skiptoBody;
- if (!(elem.attr('mega-menu'))) {
- if (elem.attr("sub-menu") === "true") {
- /* condition true when user navigates through Sub-menu*/
-
- skiptoBody = angular.element(elem.parent().parent().parent().parent().parent().parent().parent())[0].querySelector('a.skiptoBody');
- (angular.element(skiptoBody)).attr('tabindex',-1);
- skiptoBody.focus();
- }
- else if (elem.attr("sub-menu") === undefined) {
- skiptoBody = angular.element(elem.parent().parent().parent().parent().parent().parent().parent().parent().parent().parent())[0].querySelector('a.skiptoBody');
- (angular.element(skiptoBody)).attr('tabindex',-1);
- skiptoBody.focus();
- }
- }
- else
- {
- if (elem.attr("menu-item") === "item") {
- /* Works when user on Mega menu*/
-
- skiptoBody = angular.element(elem.parent().parent().parent().parent())[0].querySelector('a.skiptoBody');
- (angular.element(skiptoBody)).attr('tabindex',-1);
- skiptoBody.focus();
- }
- }
- break;
- case keymap.KEY.RIGHT:
- if (!(elem.attr('mega-menu'))) {
- var el = angular.element(elem)[0];
- if (elem.attr("sub-menu") === "true") {
- /* condition true when user navigates through Sub-menu*/
- if(el.nextElementSibling === null){ break;}
- if(el.nextElementSibling){
- el.nextElementSibling.querySelector("a").focus();
- }
- else{
- do{
- if (el && el.nextSibling){
- el = el.nextSibling;
- }
- else{
- break;
- }
- } while (el && el.tagName !== 'LI');
- if(el){
- if (el.querySelector("a") == null){}
- else{
- el.querySelector("a").focus();}
- }
- events.preventDefault(evt);
- events.stopPropagation(evt);
- }
- }
- else if (elem.attr("sub-menu") === undefined) {
- if(el.nextElementSibling === null) break;
- if(el.nextElementSibling){
- el.nextElementSibling.querySelector("a").focus();
- }
- else{
- do{
- if (el && el.nextSibling){
- el = el.nextSibling;
- }
- else{
- break;
- }
- } while (el && el.tagName !== 'LI');
- if(el){
- if (el.querySelector("a") == null){}
- else{
- el.querySelector("a").focus();}
- }
-
- }
- }
- }
- else
- {
- if (elem.attr("menu-item") === "item") {
- /* When user navigates through on Mega menu*/
-
- var el = angular.element(elem)[0];
-
- if(el.nextElementSibling){
- if(el.nextElementSibling.querySelector("span") == null){
- }
- else {
- el.nextElementSibling.querySelector("span").focus();
- }
- }
- else{
- do{
- if (el && el.nextSibling){
- el = el.nextSibling;
- }
- else{
- break;
- }
- } while (el && el.tagName !== 'LI');
- if(el){
- if(el.querySelector("span") === null){}
- else {
- el.querySelector("span").focus();
- }
- }
- events.preventDefault(evt);
- events.stopPropagation(evt);
- }
- }
- }
- break;
- case keymap.KEY.DOWN:
-
-
- if (elem.attr('mega-menu')) {
- /* When user navigates from top menu to Sub-menu*/
- angular.element(elem)[0].querySelectorAll(".megamenu__items")[0].querySelector("a").focus();
- }
- else if(elem.attr("sub-menu") === undefined) {
- /*When user navigates within Sub Items*/
- var el = document.activeElement;
- if(el.nextElementSibling === null) break;
- if(el.nextElementSibling) {
- el.nextElementSibling.focus();
- }else{
- do {
- if (el && el.nextSibling){
- el = el.nextSibling;
- }
- else{
- break;
- }
- } while (el && el.tagName !== 'A');
- if(el.attributes !== null){
- el.focus();
- }
- events.stopPropagation(evt);
- }
-
- }
- else if (elem.attr("sub-menu")=== "true" ) {
- /* condition true when user navigates from sub menu to Sub Item*/
- var childItems = angular.element(elem)[0].querySelector("span").querySelector('a');
- if(childItems === null) break;
- childItems.focus();
- }
- break;
-
- case keymap.KEY.LEFT:
-
- if (!(elem.attr('mega-menu'))) {
- var el = angular.element(elem)[0];
- if (elem.attr("sub-menu") === "true") {
- /* condition true when user navigates through Sub-menu*/
- if(el.previousElementSibling === null) break;
- if(el.previousElementSibling){
- el.previousElementSibling.querySelector("a").focus();
- }
- else{
- do{
- if (el && el.previousSibling){
- el = el.previousSibling;
- }
- else{
- break;
- }
- } while (el && el.tagName !== 'LI');
- if(el){
- if (el.querySelector("a") == null){}
- else{
- el.querySelector("a").focus();}
- }
- events.preventDefault(evt);
- events.stopPropagation(evt);
- }
-
- /*el.previousElementSibling.querySelector("span").focus();
- events.stopPropagation(evt);
- break;*/
- }
- else if (elem.attr("sub-menu") === undefined) {
- if(el.previousElementSibling === null) break;
- if(el.previousElementSibling){
- el.previousElementSibling.querySelector("a").focus();
- }
- else{
- do{
- if (el && el.previousSibling){
- el = el.previousSibling;
- }
- else{
- break;
- }
- } while (el && el.tagName !== 'LI');
- if(el){
- if (el.querySelector("a") == null){}
- else{
- el.querySelector("a").focus();}
- }
- }
- }
- }
- else
- {
- if (elem.attr("menu-item") === "item") {
- /* Works when user on Mega menu*/
-
- var el = angular.element(elem)[0];
- if(el.previousElementSibling){
-
- if(el.previousElementSibling.querySelector("span") === null){
- }
- else {
- el.previousElementSibling.querySelector("span").focus();
- }
-
- }
- else{
- do{
- if (el && el.previousSibling){
- el = el.previousSibling;
- }
- else{
- break;
- }
- } while (el && el.tagName !== 'LI');
- if(el){
- if (el.querySelector("span") === null) {
- }
- else {
- el.querySelector("span").focus();
- }
- }
- events.preventDefault(evt);
- events.stopPropagation(evt);
- }
- }
- }
- break;
- case keymap.KEY.UP:
-
- if (elem.attr("sub-menu") === "true") {
- var el = document.activeElement;
- var parent_menu = angular.element(elem.parent().parent().parent().parent())[0].querySelector("span");
- parent_menu.focus();
- parentCtrl.clearSubMenu();
- scope.menuItem.active = false;
- break;
- }
- else if(elem.attr("sub-menu") === undefined) {
- /* condition true when user navigates within Sub Items*/
- var el = document.activeElement;
- var parent_menu = angular.element(elem.parent().parent().parent().parent())[0].querySelector("a");
- if(document.activeElement === angular.element(el).parent().parent()[0].querySelectorAll('a')[0]){
- parent_menu.focus();
- break;
- };
-
- if(el.previousElementSibling) {
- var prev_a = el.previousElementSibling;
- (el.previousElementSibling != null)? el.previousElementSibling.focus(): parent_menu.focus();
- }else{
- do{
- if (el && el.previousSibling){
- el = el.previousSibling;
- }
- else{
- break;
- }
- } while (el && el.tagName !== 'A');
- if(el && (el.nodeType !== 3)){
- el.focus();
- }
- events.preventDefault(evt);
- events.stopPropagation(evt);
- }
-
- break;
- }
- default:
- break;
- }
- });
- }
- };
- }]);
-
-angular.module('att.abs.tagBadges', [])
- .directive('tagBadges', ['$parse', '$timeout', function($parse, $timeout) {
- return {
- restrict: 'EA',
- replace: false,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/tagBadges/tagBadges.html',
- scope: {
- styleType: "@",
- onClose: "&"
- },
- link: function(scope, elem, attr) {
- scope.isSmall = false;
- scope.isIcon = false;
- scope.isColor = false;
- scope.display = true;
- scope.isClosable = false;
- scope.isHighlight = false;
- scope.customColor = false;
-
- if (attr.small === "") {
- scope.isSmall = true;
- }
- if (scope.styleType === "icon") {
- scope.isIcon = true;
- }
- else if (scope.styleType === "color") {
- scope.isColor = true;
- if(attr.color !== undefined && attr.color !== "") {
- scope.customColor = true;
- attr.$observe("color", function(val) {
- scope.border_type_borderColor = val;
- scope.background_type_backgroundColor = val;
- scope.background_type_borderColor = val;
- });
- }
- }
- scope.activeHighlight = function(state){
- if(scope.customColor){
- if(state){
- scope.isHighlight = true;
- }
- else{
- scope.isHighlight = false;
- }
- }
- };
- if (attr.closable === "") {
- scope.isClosable = true;
- scope.closeMe = function() {
- scope.display = false;
- $timeout(function(){
- elem.attr("tabindex", "0");
- elem[0].focus();
- elem.bind('blur', function(){
- elem.remove();
- });
- });
- if(attr['onClose']){
- scope.onClose = $parse(scope.onClose);
- scope.onClose();
- }
- };
- }
- }
- };
- }]);
-angular.module('att.abs.textOverflow', [])
- .constant('textDefaultOptions', {
- width: '50%'
- })
-.directive('attTextOverflow', ['textDefaultOptions','$compile',function(textDefaultOptions,$compile)
-{
- return {
- restrict: 'A',
- link: function(scope, elem, attrs)
- {
- var tooltipText = elem.text();
- elem.addClass('text-ellipsis');
- attrs.$observe('attTextOverflow', function(val){
- if(val){
- elem.css({"width":val});
- }
- else{
- elem.css({"width":textDefaultOptions.width});
- }
- });
- if(!(elem.attr('tooltip'))){
- elem.attr("tooltip", tooltipText);
- elem.attr("tooltip-placement", 'above');
- var newElem = angular.element(elem);
- $compile(newElem)(scope);
- }
- }
- };
-}]);
-
-angular.module('att.abs.toggle', ['angular-gestures', 'att.abs.position'])
- .directive('attToggleTemplate', ['$compile', '$log', '$position', function ($compile, $log, $position)
- {
- return{
- restrict: 'A',
- require: 'ngModel',
- transclude: true,
- scope: {
- modelVal: "=ngModel"
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/toggle/demoToggle.html',
- link: function (scope, element, attr) {
- scope.initialDragPosition = 0;
- var dragStatus = 0;
- var switchMovementPath = ($position.offset(element.children().eq(1).children().eq(0)).width - 1);
- var updateModelVal = function () {
- if (scope.attrValue === attr.ngTrueValue || scope.attrValue)
- {
- scope.modelVal = false;
- }
- else
- {
- scope.modelVal = true;
- }
- };
- scope.updateModel = function (env) {
- {
- if (dragStatus !== 1) {
- updateModelVal();
- dragStatus = 0;
- }
- }
- env.preventDefault();
- };
- scope.drag = function (e) {
- dragStatus = 1;
- if (e.type === 'dragstart') {
- scope.initialDragPosition = $position.position(element.children().eq(1)).left;
- element.children().eq(1).addClass('dragging');
- } else if (e.type === 'drag') {
- var left = Math.min(0, Math.max(scope.initialDragPosition + e.gesture.deltaX, -switchMovementPath));
- element.children().eq(1).css({
- left: left + 'px'
- });
- } else if (e.type === 'dragend') {
- var isOn = $position.position(element.children().eq(1)).left > (switchMovementPath * -1) / 2;
- element.children().eq(1).removeClass('dragging');
- TweenMax.to(element.children().eq(1), .1, {left: isOn ? 0 : (switchMovementPath * -1), ease: Power4.easeOut,
- onComplete: function () {
- element.children().eq(1).css({left: ''});
- }});
- if (isOn || (!isOn && e.gesture.direction === "left")) {
- updateModelVal();
- }
- dragStatus = 0;
- }
-
- return false;
- };
-
- scope.directiveValue = attr.attToggleTemplate;
- scope.on = attr.trueValue;
- scope.off = attr.falseValue;
- var switchMovementPathPixels = ((switchMovementPath) * -1) + 'px';
- scope.$watch('modelVal', function (newVal) {
- scope.attrValue = newVal;
- if (newVal === attr.ngTrueValue || newVal) {
- element.children().eq(1).css({
- left: '0px'
- });
- element.addClass('att-checkbox--on');
- var elem = element.find('div').find('div').eq(1);
- elem.attr("aria-checked", true);
- dragStatus = 0;
- } else {
- element.children().eq(1).css({
- left: switchMovementPathPixels
- });
- element.removeClass('att-checkbox--on');
- var elem = element.find('div').find('div').eq(1);
- elem.attr("aria-checked", false);
- dragStatus = 0;
- }
- element.children().eq(1).css({
- left: ''
- });
- });
- }
- };
- }
- ])
-
- .directive('attToggleMain', ['$compile', function ($compile)
- {
- return{
- restrict: 'A',
- require: 'ngModel',
- transclude: true,
- replace: true,
- scope: {
- modelValue: "=ngModel",
- trueValue: "=ngTrueValue",
- falseValue: "=ngFalseValue"
- },
- link: function (scope, element, attr) {
- var html = "";
- var attrVal = "";
- element.removeAttr('att-toggle-main');
- scope.on = attr.ngTrueValue;
- scope.off = attr.ngFalseValue;
- scope.largeValue = attr.attToggleMain;
- if (angular.isDefined(attr.ngTrueValue)) {
- html += ' true-value="{{on}}" false-value="{{off}}"';
- }
- if (scope.largeValue !== undefined)
- {
- attrVal += ' ="{{largeValue}}"';
- }
-
- element.css({display: 'none'});
- var elm = angular.element('<div class="att-switch att-switch-alt" ng-class="{\'large\' : largeValue == \'large\'}" ng-model="modelValue"' + html + ' att-toggle-template' + attrVal + '>' + element.prop('outerHTML') + '</div>');
- elm = $compile(elm)(scope);
- element.replaceWith(elm);
- }
- };
- }]);
-angular.module('att.abs.treeview', [])
- .directive('treeView', function() {
- return{
- restrict: 'A',
- link: function(scope, elem) {
- var el = elem.children('ul li');
- var list = TweenMax.from(el, .2, {display: 'none', paused: true, reversed: true});
- elem.attr("tabindex","0");
- function toggleBranch() {
- if (list.reversed())
- {
- list.play();
- } else
- {
- list.reverse();
- }
- };
- function toggleTree(e) {
- e.stopPropagation();
- if (angular.element(e.target).attr("tree-view") !== undefined)
- {
- if (elem.hasClass('minus'))
- {
- elem.removeClass('minus');
- }
- else
- {
- elem.addClass('minus');
- }
- toggleBranch();
- }
- }
- elem.on('click', function(e) {
- toggleTree(e);
- });
- elem.on('keypress', function (e) {
- var activeCode = e.keyCode ? e.keyCode : e.charCode;
- var keyCode = [13,32];
- if (keyCode.length > 0 && ((activeCode && keyCode.indexOf(activeCode) > -1))) {
- toggleTree(e);
- e.preventDefault();
- }
- });
- }
- };
- });
-
-angular.module('att.abs.typeAhead', ['att.abs.tagBadges'])
-
- .directive('focusMe',['$timeout', '$parse', function($timeout, $parse) {
- return {
- link: function(scope, element, attrs) {
- var model = $parse(attrs.focusMe);
- scope.$watch(model, function(value) {
- if (value) {
- $timeout(function() {
- element[0].focus();
- scope.inputActive=true;
- });
- }
- });
- element.bind('blur', function() {
- model.assign(scope, false);
- scope.inputActive=false;
- scope.$digest();
- });
- }
- };
- }])
-
- .directive('typeAhead', ['$timeout','$log', function($timeout,$log) {
- return {
- restrict: 'EA',
- templateUrl: 'app/scripts/ng_js_att_tpls/typeAhead/typeAhead.html',
- replace: true,
- scope: {
- items: '=',
- title: '@?',
- titleName: '@',
- subtitle: '@',
- model: '=',
- emailIdList:'=',
- emailMessage:'='
- },
- link: function(scope, elem) {
- if(!angular.isDefined(scope.titleName) && angular.isDefined(scope.title)){
- $timeout(function(){
- scope.titleName = scope.title;
- $log.warn("title attribute is deprecated and title-name attribute is used instead as it is conflicting with html title attribute");
- });
- }
- scope.lineItems = [];
- scope.filteredListLength = -1;
- scope.filteredList = [];
- scope.setFocus = function() {
- scope.clickFocus = true;
- };
- scope.setFocus();
- scope.handleSelection = function(selectedItem,emailItem) {
- scope.lineItems.push(selectedItem);
- scope.emailIdList.push(emailItem);
- scope.model = "";
- scope.current = 0;
- scope.selected = true;
- scope.clickFocus = true;
- };
- scope.theMethodToBeCalled = function(index) {
- var tempArr = scope.lineItems.slice();
- scope.emailIdList.splice(index, 1);
- tempArr.splice(index, 1);
- $timeout(function() {
- scope.lineItems = [];
- scope.$apply();
- scope.lineItems = scope.lineItems.concat(tempArr);
- });
- };
-
- scope.current = 0;
- scope.selected = true;
-
- scope.isCurrent = function(index, itemName,itemEmail,dropdownLength) {
- if (scope.current === index) {
- scope.itemName = itemName;
- scope.itemEmail = itemEmail;
- }
- scope.dropdownLength=dropdownLength;
- return scope.current === index;
- };
-
- scope.setCurrent = function(index) {
- scope.current = index;
- };
-
- scope.selectionIndex = function(evt) {
- if (evt.keyCode === 38 && scope.current > 0) {
- evt.preventDefault();
- scope.current = scope.current - 1;
- scope.isCurrent(scope.current);
- } else if (evt.keyCode === 9) {
- scope.selected = true;
- } else if (evt.keyCode === 13 && scope.dropdownLength!==scope.items.length) {
- scope.handleSelection(scope.itemName,scope.itemEmail);
- } else if ((evt.keyCode === 8 && scope.model.length === 0) || evt.keyCode === 46) {
- scope.theMethodToBeCalled(scope.lineItems.length - 1);
- } else if (evt.keyCode === 40 && scope.current < scope.dropdownLength-1) {
- evt.preventDefault();
- scope.current = scope.current + 1;
- scope.isCurrent(scope.current);
- }
- elem[0].querySelector('.list-scrollable').scrollTop = (scope.current - 1) * 35;
- };
- }
- };
- }]);
-angular.module('att.abs.verticalSteptracker', ['ngSanitize'])
- .directive('verticalSteptracker', [ function(){
- return {
- restrict: 'EA',
- transclude: true,
- replace: false,
- scope: {},
- template: '<div class="vertical-nav"><ul ng-transclude arial-label="step list" role="presentation" class="tickets-list-height"></ul></div>',
- link: function () {}
- };
- }])
- .directive('verticalSteptrackerStep',[ function(){
- return {
- restrict: 'EA',
- transclude: true,
- replace: false,
- scope: {
- type: "=type",
- id: "=id"
- },
- templateUrl: 'app/scripts/ng_js_att_tpls/verticalSteptracker/vertical-step-tracker.html',
- link: function(){}
- };
- }])
- .directive('attAbsLink',[ function(){
- return{
- restrict: 'EA',
- transclude: true,
- replace: false,
- template: '<span ng-transclude class="view-log"></span>'
- };
- }]);
-angular.module('att.abs.videoControls', [])
- .config(['$compileProvider' , function ($compileProvider) {
- $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|javascript):/);
- }])
- .directive('videoControls', [function() {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/videoControls/videoControls.html'
- };
- }])
- .directive('photoControls', [function() {
- return {
- restrict: 'EA',
- replace: true,
- transclude: true,
- templateUrl: 'app/scripts/ng_js_att_tpls/videoControls/photoControls.html',
- scope: {
- prevLink: "@",
- nextLink: "@"
- },
- link: function(scope, elem, attr) {
- if(!attr['prevLink']){
- scope.prevLink = 'javascript:void(0)';
- }
- if(!attr['nextLink']){
- scope.nextLink = 'javascript:void(0)';
- }
- scope.links = {
- prevLink : scope.prevLink,
- nextLink : scope.nextLink
- };
- }
- };
- }]);
-angular.module("app/scripts/ng_js_att_tpls/accordion/accordion.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/accordion/accordion.html",
- "<div class=\"att-accordion__group tabpanel\" ng-class=\"{'att-accordion__group att-accordion__group--open':isOpen,'att-accordion__group':!isOpen }\">\n" +
- " <a ng-show=\"showicon\" \n" +
- " class=\"toggle-header att-accordion__heading att-accordion__toggle noafter\" \n" +
- " aria-selected=\"{{focused}}\" \n" +
- " aria-controls=\"panel{{index}}\" \n" +
- " aria-expanded=\"{{isOpen}}\" \n" +
- " ng-class=\"{focus: focused, selected: focused}\" \n" +
- " role=\"tab\" \n" +
- " ng-click=\"toggle()\" \n" +
- " accordion-transclude=\"heading\" \n" +
- " style=\"cursor:pointer; text-decoration:none\">\n" +
- " <span href=\"#\"><i class={{headingIconClass}}></i>&nbsp;&nbsp;{{heading}}</span>\n" +
- " <i i ng-show = 'childLength > 0' ng-class=\"{'icon-chevron-down':!isOpen,'icon-chevron-up':isOpen }\" class=\"pull-right\"></i>\n" +
- " </a>\n" +
- " <div ng-show=\"!showicon\" \n" +
- " ng-class=\"{focus: focused, selected: focused}\" \n" +
- " style=\"text-decoration:none\" \n" +
- " accordion-transclude=\"heading\" \n" +
- " role=\"tab\" \n" +
- " aria-expanded=\"{{isOpen}}\"\n" +
- " aria-selected=\"{{focused}}\" \n" +
- " aria-controls=\"panel{{index}}\" \n" +
- " class=\"toggle-header att-accordion__heading att-accordion__toggle noafter\">\n" +
- " <span>{{heading}}</span>\n" +
- " </div> \n" +
- " <div aria-label=\"{{heading}}\" \n" +
- " aria-hidden=\"{{!isOpen}}\" \n" +
- " role=\"tabpanel\" \n" +
- " collapse=\"!isOpen\" \n" +
- " class=\"att-accordion__body\" \n" +
- " id=\"panel{{index}}\" \n" +
- " ng-transclude>\n" +
- " </div>\n" +
- " <div class=\"att-accordion__bottom--border\"></div> \n" +
- "</div> ");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/accordion/accordion_alt.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/accordion/accordion_alt.html",
- "<div class=\"att-accordion__group tabpanel\" ng-class=\"{'att-accordion__group att-accordion__group--open':isOpen,'att-accordion__group':!isOpen }\">\n" +
- " <a class=\"toggle-header att-accordion__heading att-accordion__toggle\" \n" +
- " aria-selected=\"{{focused}}\" \n" +
- " aria-controls=\"panel{{index}}\" \n" +
- " ng-class=\"{focus: focused, selected: focused}\" \n" +
- " aria-expanded=\"{{isOpen}}\" \n" +
- " role=\"tab\" \n" +
- " ng-click=\"toggle()\" \n" +
- " accordion-transclude=\"heading\"> \n" +
- " </a>\n" +
- " <span>{{heading}}</span>\n" +
- " <div aria-label=\"{{heading}}\" \n" +
- " aria-hidden=\"{{!isOpen}}\" \n" +
- " role=\"tabpanel\" \n" +
- " collapse=\"!isOpen\" \n" +
- " class=\"att-accordion__body\" \n" +
- " id=\"panel{{index}}\" \n" +
- " ng-transclude>\n" +
- " </div>\n" +
- "</div> ");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/accordion/attAccord.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/accordion/attAccord.html",
- "<div ng-transclude></div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/accordion/attAccordBody.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/accordion/attAccordBody.html",
- "<div ng-transclude></div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/accordion/attAccordHeader.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/accordion/attAccordHeader.html",
- "<div ng-click=\"clickFunc()\">\n" +
- " <div ng-transclude>\n" +
- " <i class=\"icon-chevron-down\"></i>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/alert/alert.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/alert/alert.html",
- "<div class=\"alert\" ng-class=\"{'alert-success': alertType === 'success', 'alert-warning': alertType === 'warning', 'alert-error': alertType === 'error', 'alert-info': alertType === 'info', 'alert-inplace': showTop !== 'true'}\" ng-show=\"showAlert\" ng-style=\"cssStyle\">\n" +
- " <div class=\"container\">\n" +
- " <a href=\"javascript:void(0)\" alt=\"close\" class=\"close-role\" ng-click=\"close()\" tabindex=\"0\" att-accessibility-click=\"32,13\">Dismiss <i class=\"icon-circle-action-close\"></i></a>\n" +
- " <span ng-transclude> </span>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/boardStrip/attAddBoard.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/boardStrip/attAddBoard.html",
- "<div tabindex=\"0\" att-accessibility-click=\"13,32\" ng-click=\"addBoard()\" aria-label=\"Add Board\" class=\"boardstrip-item--add\">\n" +
- " <i aria-hidden=\"true\" class=\"icon-add centered\"></i>\n" +
- " <br/>\n" +
- " <div class=\"centered\">Add board</div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/boardStrip/attBoard.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/boardStrip/attBoard.html",
- "<li att-board-navigation tabindex=\"0\" aria-label=\"{{boardLabel}}\" att-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("app/scripts/ng_js_att_tpls/boardStrip/attBoardStrip.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/boardStrip/attBoardStrip.html",
- "<div class=\"att-boardstrip\">\n" +
- " <div class=\"boardstrip-reel\">\n" +
- " <div class=\"prev-items\" ng-if=\"isPrevBoard()\">\n" +
- " <i tabindex=\"0\" aria-label=\"Scroll Boardstrip Left\" att-accessibility-click=\"13,32\" ng-click=\"prevBoard()\" class=\"arrow icon-arrow-left-circle\"></i>\n" +
- " </div>\n" +
- " <div att-add-board on-add-board=\"onAddBoard()\"></div>\n" +
- " <div class=\"board-viewport\"><ul role=\"presentation\" class=\"boardstrip-container\" ng-transclude></ul></div>\n" +
- " <div class=\"next-items\" ng-if=\"isNextBoard()\">\n" +
- " <i tabindex=\"0\" aria-label=\"Scroll Boardstrip Right\" att-accessibility-click=\"13,32\" ng-click=\"nextBoard()\" class=\"arrow icon-arrow-right-circle\"></i>\n" +
- " </div>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/buttons/buttonDropdown.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/buttons/buttonDropdown.html",
- "<div class=\"att-btn-dropdown\">\n" +
- " <div class=\"buttons-dropdown--small btn-group\" ng-class=\"{'open': isOpen}\" att-accessibility-click=\"13,32\" ng-click=\"toggle()\">\n" +
- " \n" +
- " <button role=\"menu\" class=\"button button--secondary button--small buttons-dropdown__drop dropdown-toggle\" ng-if=\"type==='dots'\" alt=\"Click for Options\" >\n" +
- " \n" +
- " <div class=\"circle\"></div>\n" +
- " <div class=\"circle\"></div>\n" +
- " <div class=\"circle\"></div>\n" +
- " </button>\n" +
- " <button role=\"menu\" class=\"button button--secondary button--small buttons-dropdown__drop dropdown-toggle ng-isolate-scope actions-title\" ng-if=\"type === 'actions'\" alt=\"Actions dropdown Buttons\">Actions</button>\n" +
- " \n" +
- "\n" +
- " <ul ng-class=\"{'dropdown-menu dots-dropdwn': type==='dots', 'dropdown-menu actions-dropdwn': type === 'actions'}\" ng-transclude></ul>\n" +
- " </div>\n" +
- " \n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/colorselector/colorselector.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/colorselector/colorselector.html",
- "<div class=\"att-radio att-color-selector__item\" \n" +
- " ng-class=\"{'att-radio--on': (iconColor === selected)}\">\n" +
- " <div class=\"att-radio__indicator\" tabindex=\"0\" att-accessibility-click=\"32,13\" ng-click=\"selectedcolor(iconColor)\" \n" +
- " ng-style=\"applycolor\" ng-transclude></div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/datepicker/dateFilter.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/datepicker/dateFilter.html",
- "<div class=\"calendar\" ng-class=\"{'monthpicker':mode === 1}\">\n" +
- " <div class=\"select2-container\" ng-class=\"{'select2-container-active select2-dropdown-open': showDropdownList}\" style=\"width: 100%; z-index:0\">\n" +
- " <a tabindex=\"0\" id=\"select2-choice\" class=\"select2-choice\" href=\"javascript:void(0)\" att-element-focus=\"focusInputButton\" ng-show=\"!showCalendar\" att-accessibility-click=\"13,32\" ng-click=\"showDropdown()\" ng-blur=\"focusInputButton=false\">\n" +
- " <span class=\"select2-chosen\" ng-show=\"!showCalendar\">{{selectedOption}}</span>\n" +
- " <input type=\"text\" ng-show=\"showCalendar\" ng-blur=\"untrackInputChange($event)\" att-input-deny=\"[^0-9\\/-]\" maxlength=\"{{maxLength}}\" ng-model=\"selectedOption\" aria-labelledby=\"select2-choice\" ng-change=\"getDropdownText()\" />\n" +
- " <abbr class=\"select2-search-choice-close\"></abbr>\n" +
- " <span ng-class=\"{'select2-arrow': mode !== 1, 'calendar-icon': mode === 1}\"><b></b></span>\n" +
- " </a>\n" +
- " <a id=\"select2-chosen\" class=\"select2-choice\" href=\"javascript:void(0)\" ng-show=\"showCalendar\">\n" +
- " <span class=\"select2-chosen\" ng-show=\"!showCalendar\">{{selectedOption}}</span>\n" +
- " <input type=\"text\" ng-show=\"showCalendar\" ng-blur=\"untrackInputChange($event)\" att-input-deny=\"[^0-9\\/-]\" maxlength=\"{{maxLength}}\" ng-model=\"selectedOption\" aria-labelledby=\"select2-chosen\" ng-change=\"getDropdownText()\" />\n" +
- " <abbr class=\"select2-search-choice-close\"></abbr>\n" +
- " <span tabindex=\"0\" ng-class=\"{'select2-arrow': mode !== 1, 'calendar-icon': mode === 1}\" att-accessibility-click=\"13,32\" ng-click=\"showDropdown()\"><b></b></span>\n" +
- " </a>\n" +
- " </div>\n" +
- " <div class=\"select2-drop select2-drop-active select2-display-none\" ng-style=\"{display: (showDropdownList && 'block') || 'none', 'border-radius': showCalendar && '0 0 0 6px'}\" style=\"width: 100%\">\n" +
- " <div id=\"dateFilterList\" att-scrollbar ><ul class=\"select2-results options\" ng-transclude></ul></div>\n" +
- " <ul class=\"select2-results sttings\" style=\"margin-top:0px\">\n" +
- " <li tabindex=\"0\" class=\"select2-result select2-highlighted greyBorder\" ng-class=\"{'select2-result-current': checkCurrentSelection('Custom Single Date')}\" att-accessibility-click=\"13,32\" ng-click=\"selectAdvancedOption('Custom Single Date')\">\n" +
- " <div class=\"select2-result-label\" ng-if=\"mode !== 1\">Custom Single Date...</div>\n" +
- " <div class=\"select2-result-label\" ng-if=\"mode === 1\">Custom single month...</div>\n" +
- " </li>\n" +
- " <li tabindex=\"0\" class=\"select2-result select2-highlighted\" ng-class=\"{'select2-result-current': checkCurrentSelection('Custom Range')}\" att-accessibility-click=\"13,32\" ng-click=\"selectAdvancedOption('Custom Range')\">\n" +
- " <div class=\"select2-result-label\" ng-if=\"mode !== 1\">Custom Range...</div>\n" +
- " <div class=\"select2-result-label\" ng-if=\"mode === 1\">Custom month range...</div>\n" +
- " </li>\n" +
- " <li class=\"select2-result select2-highlighted btnContainer\" ng-style=\"{display: (showCalendar && 'block') || 'none'}\">\n" +
- " <button tabindex=\"0\" ng-blur=\"resetFocus($event)\" att-element-focus=\"focusApplyButton\" att-button=\"\" btn-type=\"{{applyButtonType}}\" size=\"small\" att-accessibility-click=\"13,32\" ng-click=\"apply()\">Apply</button>\n" +
- " <button tabindex=\"0\" att-button=\"\" btn-type=\"secondary\" size=\"small\" att-accessibility-click=\"13,32\" ng-click=\"cancel()\">Cancel</button>\n" +
- " <div>\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" ng-if=\"mode !== 1\" style=\"text-decoration:underline;\" att-accessibility-click=\"13,32\" ng-click=\"clear()\">Clear Dates</a>\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" ng-if=\"mode === 1\" style=\"text-decoration:underline;\" att-accessibility-click=\"13,32\" ng-click=\"clear()\">Clear Months</a>\n" +
- " </div>\n" +
- " </li>\n" +
- " </ul>\n" +
- " </div>\n" +
- " <div class=\"datepicker-wrapper show-right\" ng-style=\"{display: (showCalendar && 'block') || 'none'}\">\n" +
- " <span datepicker ng-blur=\"resetFocus($event)\" att-element-focus=\"focusSingleDateCalendar\" ng-show=\"checkCurrentSelection('Custom Single Date')\"></span>\n" +
- " <span datepicker ng-blur=\"resetFocus($event)\" att-element-focus=\"focusRangeCalendar\" ng-show=\"checkCurrentSelection('Custom Range')\"></span>\n" +
- " </div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/datepicker/dateFilterList.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/datepicker/dateFilterList.html",
- "<li ng-click=\"!disabled && selectOption(fromDate,toDate,caption)\" att-accessibility-click=\"13,32\" ng-class=\"{'select2-result-current': checkCurrentSelection(caption)}\" class=\"select2-result select2-highlighted ng-scope\" tabindex=\"{{!disabled?'0':'-1'}}\">\n" +
- " <div class=\"select2-result-label\" ng-class=\"{'disabled':disabled}\" ng-transclude></div>\n" +
- "</li>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/datepicker/datepicker.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/datepicker/datepicker.html",
- "<div id=\"datepicker\" class=\"datepicker\" ng-class=\"{'monthpicker': mode === 1}\" aria-hidden=\"false\" role=\"dialog\" tabindex=\"-1\" aria-labelledby=\"datepicker\">\n" +
- " <div class=\"datepicker-days\" style=\"display: block;\">\n" +
- " <table class=\"table-condensed\">\n" +
- " <thead>\n" +
- " <tr>\n" +
- " <th id=\"month\" tabindex=\"0\" class=\"datepicker-switch\" colspan=\"{{(mode !== 1) && (currentRows[0].length - 2) || (currentRows[0].length)}}\" style=\"text-align:left\">{{currentTitle}}</th>\n" +
- " <th ng-if=\"mode !== 1\" id=\"prev\" aria-hidden=\"{{!disablePrev && 'false'|| 'true'}}\" tabindex=\"{{!disablePrev && '0'|| '-1'}}\" att-accessibility-click=\"13,32\" ng-click=\"!disablePrev && move(-1)\">\n" +
- " <div class=\"icons-list\" data-size=\"medium\"><i class=\"icon-arrow-left-circle\" ng-class=\"{'disabled': disablePrev}\" alt=\"Left Arrow\"></i>\n" +
- " </div><span class=\"hidden-spoken\">Previous Month</span>\n" +
- " </th>\n" +
- " <th ng-if=\"mode !== 1\" id=\"next\" aria-hidden=\"{{!disableNext && 'false'|| 'true'}}\" tabindex=\"{{!disableNext && '0'|| '-1'}}\" att-accessibility-click=\"13,32\" ng-click=\"!disableNext && move(1)\">\n" +
- " <div class=\"icons-list\" data-size=\"medium\"><i class=\"icon-arrow-right-circle\" ng-class=\"{'disabled': disableNext}\" alt=\"Right Arrow\"></i>\n" +
- " </div><span class=\"hidden-spoken\">Next Month</span>\n" +
- " </th>\n" +
- " </tr>\n" +
- " <tr ng-if=\"labels.length > 0\">\n" +
- " <th tabindex=\"-1\" class=\"dow weekday\" ng-repeat=\"label in labels\"><span>{{label.pre}}</span></th>\n" +
- " </tr>\n" +
- " </thead>\n" +
- " <tbody>\n" +
- " <tr>\n" +
- " <td id=\"datepickerBody\" att-scrollbar colspan=\"{{currentRows[0].length}}\" style=\"padding: 0px;\" headers=\"\">\n" +
- " <table ng-class=\"{'table-condensed': mode === 0, 'monthtable-condensed': mode === 1}\" style=\"padding: 0px;\">\n" +
- " <thead class=\"hidden-spoken\">\n" +
- " <tr ng-show=\"labels.length > 0\">\n" +
- " <th id=\"{{label.post}}\" tabindex=\"-1\" class=\"dow weekday\" ng-repeat=\"label in labels\"></th>\n" +
- " </tr>\n" +
- " </thead>\n" +
- " <tbody>\n" +
- " <tr ng-repeat=\"row in currentRows\">\n" +
- " <td headers=\"{{(mode === 0) && dt.header || 'month'}}\" att-element-focus=\"dt.focused\" aria-hidden=\"{{(!dt.oldMonth && !dt.nextMonth && !dt.disabled && 'false') || 'true'}}\" tabindex=\"{{(!dt.oldMonth && !dt.nextMonth && !dt.disabled && '0') || '-1'}}\" ng-repeat=\"dt in row\" class=\"days\" ng-class=\"{'active': dt.selected || dt.from || dt.to, 'from': dt.from, 'to': dt.to, 'range': dt.dateRange, 'prev-month ': dt.oldMonth, 'next-month': dt.nextMonth, 'disabled': dt.disabled, 'today': dt.today, 'weekend': dt.weekend}\" ng-click=\"!dt.selected && !dt.from && !dt.to && !dt.disabled && !dt.oldMonth && !dt.nextMonth && select(dt.date)\" att-accessibility-click=\"13,32\" aria-label=\"{{dt.date | date : 'EEEE, MMMM d'}}\"><span class=\"day\">{{dt.label}}</span></td>\n" +
- " </tr>\n" +
- " <tr ng-if=\"mode === 1\" class=\"divider\"><td colspan=\"{{nextRows[0].length}}\"><hr></td></tr>\n" +
- " <tr>\n" +
- " <th id=\"month\" tabindex=\"0\" class=\"datepicker-switch internal\" colspan=\"{{nextRows[0].length}}\" style=\"text-align:left\">{{nextTitle}}</th>\n" +
- " </tr>\n" +
- " <tr ng-repeat=\"row in nextRows\">\n" +
- " <td headers=\"{{(mode === 0) && dt.header || 'month'}}\" att-element-focus=\"dt.focused\" aria-hidden=\"{{(!dt.oldMonth && !dt.nextMonth && !dt.disabled && 'false') || 'true'}}\" tabindex=\"{{(!dt.oldMonth && !dt.nextMonth && !dt.disabled && '0') || '-1'}}\" ng-repeat=\"dt in row\" class=\"days\" ng-class=\"{'active': dt.selected || dt.from || dt.to, 'from': dt.from, 'to': dt.to, 'range': dt.dateRange, 'prev-month ': dt.oldMonth, 'next-month': dt.nextMonth, 'disabled': dt.disabled, 'today': dt.today, 'weekend': dt.weekend}\" ng-click=\"!dt.selected && !dt.from && !dt.to && !dt.disabled && !dt.oldMonth && !dt.nextMonth && select(dt.date)\" att-accessibility-click=\"13,32\" aria-label=\"{{dt.date | date : 'EEEE, MMMM d'}}\"><span class=\"day\">{{dt.label}}</span></td>\n" +
- " </tr>\n" +
- " </tbody>\n" +
- " </table>\n" +
- " </td>\n" +
- " </tr>\n" +
- " </tbody>\n" +
- " </table>\n" +
- " </div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/datepicker/datepickerPopup.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/datepicker/datepickerPopup.html",
- "<div class=\"calendar\">\n" +
- " <div class=\"box\" ng-class=\"{'active': isOpen}\">\n" +
- " <span ng-transclude></span>\n" +
- " <i class=\"calendar-icon\" tabindex=\"0\" att-accessibility-click=\"13,32\" ng-click=\"toggle()\" alt=\"Calendar Icon\"></i>\n" +
- " </div>\n" +
- " <div class=\"datepicker-wrapper datepicker-wrapper-display-none\" ng-style=\"{display: (isOpen && 'block') || 'none'}\" aria-hidden=\"false\" role=\"dialog\" tabindex=\"-1\">\n" +
- " <span datepicker></span>\n" +
- " </div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/dividerLines/dividerLines.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/dividerLines/dividerLines.html",
- "<div class=\"divider-container\" ng-class=\"{'divider-container-light': lightContainer}\">\n" +
- " <hr ng-class=\"{'divider-light': lightContainer}\">\n" +
- "</div>\n" +
- "\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/dragdrop/fileUpload.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/dragdrop/fileUpload.html",
- "<label class=\"fileContainer\"><span ng-transclude></span><input type=\"file\" att-file-change></label>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/formField/attFormFieldValidationAlert.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/formField/attFormFieldValidationAlert.html",
- "<div class=\"form-field\" ng-class=\"{'error': errorMessage, 'warning': warningMessage}\">\n" +
- " <label class=\"form-field__label\" ng-class=\"{'form-field__label--show': showLabel, 'form-field__label--hide': hideLabel}\"></label>\n" +
- " <div class=\"form-field-input-container\" ng-transclude></div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/formField/attFormFieldValidationAlertPrv.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/formField/attFormFieldValidationAlertPrv.html",
- "<div class=\"form-field\" ng-class=\"{'error':hideErrorMsg}\">\n" +
- " <div class=\"form-field-input-container\" ng-transclude></div>\n" +
- " <div class=\"form-field__message error\" type=\"error\" ng-show=\"hideErrorMsg\" >\n" +
- " <i class=\"icon-info-alert\"></i>{{errorMessage}}\n" +
- " </div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/formField/creditCardImage.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/formField/creditCardImage.html",
- "<span class=\"css-sprite pull-right\">\n" +
- "<span class=\"hidden-spoken\">We accept</span>\n" +
- "<ul class=\"{{newValCCI}}\">\n" +
- " <li class=\"css-sprite-mc\"><span class=\"hidden-spoken\">MasterCard</span></li>\n" +
- " <li class=\"css-sprite-visa\"><span class=\"hidden-spoken\">Visa</span></li>\n" +
- " <li class=\"css-sprite-amex\"><span class=\"hidden-spoken\">American Express</span></li>\n" +
- " <li class=\"css-sprite-discover\"><span class=\"hidden-spoken\">Discover</span></li> \n" +
- "</ul>\n" +
- "</span>\n" +
- "<label for=\"ccForm.card\" class=\"pull-left\">Card number</label>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/formField/cvcSecurityImg.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/formField/cvcSecurityImg.html",
- "<div>\n" +
- "<button type=\"button\" class=\"btn btn-alt btn-tooltip\" style=\"padding-top:16px\" title=\"Help\"><i class=\"hidden-spoken\">Help</i></button>\n" +
- "<div class=\"helpertext\" role=\"tooltip\">\n" +
- "<div class=\"popover-title\"></div>\n" +
- "<div class=\"popover-content\">\n" +
- " <p class=\"text-legal cvc-cc\">\n" +
- " <img ng-src=\"images/{{newValI}}.png\" alt=\"{{newValIAlt}}\">\n" +
- " </p>\n" +
- "</div>\n" +
- "</div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/hourpicker/hourpicker.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/hourpicker/hourpicker.html",
- "<div class=\"hourpicker\">\n" +
- " <div class=\"dropdown-width\">\n" +
- " <div ng-model=\"showlist\" class=\"select2-container topDropDownWidth\" ng-class=\"{'select2-dropdown-open select2-container-active': showlist}\" >\n" +
- " <a class=\"select2-choice\" href=\"javascript:void(0)\" id=\"customSelect\" ng-keydown=\"selectOption(selectPrevNextValue($event,options,selectedOption))\" att-accessibility-click=\"13\" ng-click=\"showDropdown()\">\n" +
- " <span class=\"select2-chosen\">{{selectedOption}}</span>\n" +
- " <span class=\"select2-arrow\"><b></b></span>\n" +
- " </a>\n" +
- " </div> \n" +
- " <div class=\"select2-display-none select2-with-searchbox select2-drop-active show-search resultTopWidth\" ng-show=\"showlist\"> \n" +
- " <ul class=\"select2-results resultTopMargin\" > \n" +
- " <li ng-model=\"ListType\" ng-repeat=\"option in options\" att-accessibility-click=\"13\" ng-click=\"selectOption(option,$index)\" class=\"select2-results-dept-0 select2-result select2-result-selectable\"><div class=\"select2-result-label\"><span >{{option}}</span></div></li> \n" +
- " </ul>\n" +
- " </div>\n" +
- " </div>\n" +
- " <div ng-show=\"showDaysSelector\" class=\"customdays-width\">\n" +
- " <div att-divider-lines class=\"divider-margin-f\"></div> \n" +
- " <div class=\"col-md-3 fromto-margin\">\n" +
- " <div>From</div> <br>\n" +
- " <div>To</div>\n" +
- " </div>\n" +
- " <div ng-repeat=\"day in days\">\n" +
- " <div class=\"col-md-3 col-md-days\">\n" +
- " <div class=\"col-md-1 daysselect-margin\">\n" +
- " <input type=\"checkbox\" ng-model=\"daysList[day]\" title=\"Day selection {{$index}}\" att-checkbox ng-change=\"addSelectedValue(day)\"> \n" +
- " </div>\n" +
- " <span>{{day}}</span><br>\n" +
- " \n" +
- " <div class=\"dropDownMarginBottom\">\n" +
- " <div class=\"select2-container topDropDownWidth\" ng-class=\"{'select2-dropdown-open select2-container-active': FrtimeListDay[day]}\" >\n" +
- " <a class=\"select2-choice selectDropDown\" href=\"javascript:void(0)\" tabindex=\"{{daysList[day] ? '0' : '-1'}}\" att-accessibility-click=\"13\" ng-click=\"daysList[day] && showfromDayDropdown(day)\" ng-class=\"{'select2-chosen-disabled':!daysList[day]}\" ng-keydown=\"daysList[day] && selectFromDayOption(day , selectPrevNextValue($event,fromtime,selectedFromOption[day]));daysList[day] && addSelectedValue(day);\">\n" +
- " <span class=\"select2-chosen dropDownMarginRight\" >{{selectedFromOption[day]}} <i ng-if=\"daysList[day]\" ng-class=\"FrtimeListDay[day] ? 'icon-dropdown-up' : 'icon-dropdown-down'\"></i></span>\n" +
- " </a>\n" +
- " </div> \n" +
- " \n" +
- " <div class=\"select2-display-none select2-with-searchbox select2-drop-active show-search resultFromDropDown\" ng-show=\"FrtimeListDay[day]\"> \n" +
- " <ul class=\"select2-results resultTopMargin\" > \n" +
- " <li ng-click=\"selectFromDayOption(day,time.value);addSelectedValue(day);\" ng-repeat=\"time in fromtime\" class=\"select2-results-dept-0 select2-result select2-result-selectable\"><div class=\"select2-result-label\" ng-class=\"{'selectedItemInDropDown': (time.value==selectedFromOption[day])}\"><span >{{time.value}}</span></div></li> \n" +
- " </ul>\n" +
- " </div>\n" +
- " </div>\n" +
- " \n" +
- " <div class=\"dropDownMarginBottom\">\n" +
- " <div class=\"select2-container topDropDownWidth\" ng-class=\"{'select2-dropdown-open select2-container-active': TotimeListDay[day]}\" >\n" +
- " <a class=\"select2-choice selectDropDown\" href=\"javascript:void(0)\" tabindex=\"{{daysList[day] ? '0' : '-1'}}\" att-accessibility-click=\"13\" ng-click=\"daysList[day] && showtoDayDropdown(day)\" ng-class=\"{'select2-chosen-disabled':!daysList[day], 'selectDropDown-error':daysList[day] && showToTimeErrorDay[day]}\" ng-keydown=\"daysList[day] && selectToDayOption(day , selectPrevNextValue($event,totime,selectedToOption[day]));daysList[day] && addSelectedValue(day);\">\n" +
- " <span class=\"select2-chosen dropDownMarginRight\">{{selectedToOption[day]}} <i ng-if=\"daysList[day]\" ng-class=\"TotimeListDay[day] ? 'icon-dropdown-up' : 'icon-dropdown-down'\" ></i></span>\n" +
- " </a>\n" +
- " </div>\n" +
- " \n" +
- " <div class=\"select2-display-none select2-with-searchbox select2-drop-active show-search resultToDropDown\" ng-show=\"TotimeListDay[day]\"> \n" +
- " <ul class=\"select2-results resultTopMargin\" > \n" +
- " <li ng-click=\"selectToDayOption(day,time.value);addSelectedValue(day);\" ng-repeat=\"time in totime\" class=\"select2-results-dept-0 select2-result select2-result-selectable\"><div class=\"select2-result-label\" ng-class=\"{'selectedItemInDropDown': (time.value==selectedToOption[day])}\"><span >{{time.value}}</span></div></li> \n" +
- " </ul>\n" +
- " </div>\n" +
- " </div>\n" +
- " </div> \n" +
- " </div> \n" +
- " <div att-divider-lines class=\"divider-margin-s\"></div>\n" +
- " </div>\n" +
- " <div ng-transclude></div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/links/readMore.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/links/readMore.html",
- "<div>\n" +
- " <div ng-bind-html=\"textToDisplay\" ng-class=\"{'att--readMore': readFlag, 'att--readLess': !readFlag}\" ng-style=\"readLinkStyle\"></div>\n" +
- " <span class=\"att--readmore__link\" ng-show=\"readMoreLink\">… <a href=\"javascript:void(0);\" ng-click=\"readMore()\" att-accessbility-click=\"32,13\">Read More</a>\n" +
- " </span>\n" +
- "</div>\n" +
- "<span class=\"att--readless__link\" ng-show=\"readLessLink\">\n" +
- " <a href=\"javascript:void(0);\" ng-click=\"readLess()\" att-accessbility-click=\"32,13\">Read Less</a>\n" +
- "</span>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/loading/loading.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/loading/loading.html",
- "<div data-progress=\"{{progressStatus}}\" class=\"{{colorClass}}\" ng-class=\"{'att-loading-count':icon == 'count','loading--small':icon == 'small','loading': icon != 'count'}\" alt=\"Loading\">\n" +
- " <div class=\"att-loading-circle\" ng-if=\"icon == 'count'\">\n" +
- " <div class=\"att-loading-circle__mask att-loading-circle__full\">\n" +
- " <div class=\"att-loading-circle__fill\"></div>\n" +
- " </div>\n" +
- " <div class=\"att-loading-circle__mask att-loading-circle__half\">\n" +
- " <div class=\"att-loading-circle__fill\"></div>\n" +
- " <div class=\"att-loading-circle__fill att-loading-circle__fix\"></div>\n" +
- " </div>\n" +
- " </div>\n" +
- " <div ng-class=\"{'att-loading-inset':icon == 'count','loading__inside':icon != 'count'}\"><div class=\"att-loading-inset__percentage\" ng-if=\"icon == 'count'\" alt=\"Loading with Count\"></div></div>\n" +
- "</div>\n" +
- "\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/modal/backdrop.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/modal/backdrop.html",
- "<div class=\"overlayed\" ng-class=\"{show: animate}\" \n" +
- " ng-style=\"{'z-index': 2000 + index*10,'overflow':'scroll'}\"> \n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/modal/tabbedItem.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/modal/tabbedItem.html",
- "<div>\n" +
- " <ul class=\"tabs_overlay\">\n" +
- " <li ng-repeat=\"item in items\" class=\"tabs_overlay__item two__item\" ng-class=\"{'active':isActiveTab($index)}\" ng-click=\"clickTab($index)\">\n" +
- " <i class=\"{{item.iconClass}}\"></i>\n" +
- " {{item.title}} ({{item.number}})\n" +
- " <a class=\"viewLink\" att-link>Show</a>\n" +
- " </li>\n" +
- " </ul>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/modal/tabbedOverlayItem.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/modal/tabbedOverlayItem.html",
- "<div>\n" +
- " <ul class=\"tabs_overlay\">\n" +
- " <li ng-repeat=\"item in items\" class=\"tabs_overlay__item two__item\" ng-class=\"{'active':isActiveTab($index)}\" ng-click=\"clickTab($index)\">\n" +
- " <i class=\"{{item.iconClass}}\"></i>\n" +
- " {{item.title}} ({{item.number}})\n" +
- " <a class=\"viewLink\" att-link>Show</a>\n" +
- " </li>\n" +
- " </ul>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/modal/window.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/modal/window.html",
- "<div tabindex=\"-1\" role=\"dialog\" att-element-focus=\"focusModalFlag\" class=\"modals {{ windowClass }}\" ng-class=\"{show: animate}\" \n" +
- " ng-style=\"{'z-index': 2010 + index*10}\" ng-click=\"close($event)\" ng-transclude> \n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/pagination/pagination.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/pagination/pagination.html",
- "<div class=\"pager\">\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" class=\"pager__item--prev\" att-accessibility-click=\"13,32\" ng-click=\"prev($event)\" ng-if=\"currentPage > 1\"><i class=\"icon-arrow-left\"></i> Previous</a>\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" class=\"pager__item pager__item--link\" ng-if=\"totalPages > 7 && currentPage > 3\" att-accessibility-click=\"13,32\" ng-click=\"selectPage(1, $event)\">1</a>\n" +
- " <span class=\"pager__item\" ng-if=\"totalPages > 7 && currentPage > 3\">...</span>\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" class=\"pager__item pager__item--link\" att-element-focus=\"isFocused(page)\" ng-repeat=\"page in pages\" ng-class=\"{'pager__item--active': checkSelectedPage(page)}\" att-accessibility-click=\"13,32\" ng-click=\"selectPage(page, $event)\">{{page}}</a>\n" +
- " <span class=\"pager__item\" ng-if=\"totalPages > 7 && currentPage < totalPages - 2 && showInput !== true\">...</span>\n" +
- " <span ng-show=\"totalPages > 7 && showInput === true\"><input class=\"pager__item--input\" type=\"text\" placeholder=\"...\" maxlength=\"2\" ng-model=\"currentPage\" aria-label=\"Current page count\"/></span>\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" class=\"pager__item pager__item--link\" ng-if=\"totalPages > 7 && currentPage < totalPages - 2\" att-accessibility-click=\"13,32\" ng-click=\"selectPage(totalPages, $event)\">{{totalPages}}</a>\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" class=\"pager__item--next\" att-accessibility-click=\"13,32\" ng-click=\"next($event)\" ng-if=\"currentPage < totalPages\">Next <i class=\"icon-arrow-right\"></i></a>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/paneSelector/innerPane.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/paneSelector/innerPane.html",
- "<div class='inner-pane' ng-transclude></div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/paneSelector/paneGroup.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/paneSelector/paneGroup.html",
- "<div class='pane-group' ng-transclude></div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/paneSelector/sidePane.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/paneSelector/sidePane.html",
- "<div class='side-pane' ng-transclude></div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/tooltip/tooltip-popup.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/tooltip/tooltip-popup.html",
- "<div class=\"att-tooltip \" \n" +
- " ng-class=\"{ 'att-tooltip--on': isOpen, \n" +
- " 'att-tooltip--dark att-tooltip--dark--hover':stylett=='dark', \n" +
- " 'att-tooltip--light att-tooltip--light--hover':stylett=='light',\n" +
- " 'att-tooltip--left':placement=='left', \n" +
- " 'att-tooltip--above':placement=='above', \n" +
- " 'att-tooltip--right':placement=='right', \n" +
- " 'att-tooltip--below':placement=='below'}\" \n" +
- " ng-bind-html=\"content | unsafe\" ></div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/popOvers/popOvers.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/popOvers/popOvers.html",
- "<div class=\"att-popover popover-demo\" ng-style=\"{backgroundColor:popOverStyle}\"\n" +
- " ng-class=\"{'att-tooltip--dark':popOverStyle==='grey',\n" +
- " 'att-pop-over--left':popOverPlacement==='left', \n" +
- " 'att-pop-over--above':popOverPlacement==='above', \n" +
- " 'att-pop-over--right':popOverPlacement==='right'}\" \n" +
- " style='position: absolute; max-width: 490px;'>\n" +
- " <div class=\"pop-over-caret\"\n" +
- " ng-class=\"{'pop-over-caret-border--left':popOverPlacement==='left', \n" +
- " 'pop-over-caret-border--above':popOverPlacement==='above', \n" +
- " 'pop-over-caret-border--right':popOverPlacement==='right', \n" +
- " 'pop-over-caret-border--below':popOverPlacement==='below'}\">\n" +
- " </div>\n" +
- " <div class=\"pop-over-caret\" ng-style=\"popOverPlacement=='below' && {borderBottom:'6px solid ' +popOverStyle}||popOverPlacement=='left' && {borderLeft:'6px solid ' +popOverStyle}||popOverPlacement=='right' && {borderRight:'6px solid ' +popOverStyle}||popOverPlacement=='above' && {borderTop:'6px solid ' +popOverStyle}\"\n" +
- " ng-class=\"{'pop-over-caret--left':popOverPlacement==='left', \n" +
- " 'pop-over-caret--above':popOverPlacement==='above', \n" +
- " 'pop-over-caret--right':popOverPlacement==='right', \n" +
- " 'pop-over-caret--below':popOverPlacement==='below'}\"></div>\n" +
- " \n" +
- " <div class=\"att-popover-content\">\n" +
- " <a ng-if=\"closeable\" href=\"javascript:void(0)\" class=\"icon-close att-popover__close\" ng-click=\"closeMe();$event.preventDefault()\"></a>\n" +
- " <div class=\"popover-packages__container\" ng-include=\"content\"></div>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/profileCard/addUser.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/profileCard/addUser.html",
- "<div class=\"col-md-9 profile-card add-user\">\n" +
- " <div class=\"atcenter\">\n" +
- " <div><i class=\"icon-add\"></i></div>\n" +
- " <span>add User</span>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/profileCard/profileCard.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/profileCard/profileCard.html",
- "<div class=\"col-md-9 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-hide=\"image\" class=\"default-img\">{{initials}}</span>\n" +
- " <p class=\"name\" tooltip-condition=\"{{profile.name}}\" height=\"true\"></p>\n" +
- " <p class=\"status\">\n" +
- " <span class=\"status-icon\" ng-class=\"{'icon-green':colorIcon==='green','icon-red':colorIcon==='red','icon-blue':colorIcon==='blue','icon-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" +
- " <p att-text-overflow=\"92%\" tooltip-condition=\"{{profile.userName}}\">{{profile.userName}}</p>\n" +
- " <label>Email</label>\n" +
- " <p att-text-overflow=\"92%\" tooltip-condition=\"{{profile.email}}\">{{profile.email}}</p>\n" +
- " <label>Role</label>\n" +
- " <p att-text-overflow=\"92%\" tooltip-condition=\"{{profile.role}}\">{{profile.role}}</p>\n" +
- " <label>Last Login</label>\n" +
- " <p att-text-overflow=\"92%\" tooltip-condition=\"{{profile.lastLogin}}\">{{profile.lastLogin}}</p>\n" +
- " </div>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/progressBars/progressBars.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/progressBars/progressBars.html",
- "<div class=\"att-progress\">\n" +
- " <div class=\"att-progress-value\">&nbsp;</div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/scrollbar/scrollbar.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/scrollbar/scrollbar.html",
- "<div class=\"scroll-bar\" style=\"position: absolute\">\n" +
- " <div class=\"scroll-thumb\" style=\"position: absolute; overflow: hidden\"></div>\n" +
- "</div>\n" +
- "<div class=\"prev icons-list\" data-size=\"medium\" ng-show=\"navigation && prevAvailable\" ng-style=\"{height: scrollbarAxis === 'x' && position.height + 'px'}\">\n" +
- " <a href=\"javascript:void(0);\" ng-click=\"customScroll(false)\" aria-label=\"Scroll\" aria-hidden=\"true\">\n" +
- " <i ng-class=\"{'icon-chevron-up': (scrollbarAxis === 'y'), 'icon-chevron-left': (scrollbarAxis === 'x')}\"></i>\n" +
- " </a>\n" +
- "</div>\n" +
- "<div class=\"scroll-viewport\" ng-style=\"{height: (scrollbarAxis === 'x' && position.height + 'px') || viewportHeight, width: viewportWidth}\" style=\"position: relative; overflow: hidden\">\n" +
- " <div class=\"scroll-overview\" style=\"position: absolute; display: table; width: 100%\" att-position=\"position\" ng-transclude></div>\n" +
- "</div>\n" +
- "<div class='next icons-list' data-size=\"medium\" ng-show=\"navigation && nextAvailable\" ng-style=\"{height: scrollbarAxis === 'x' && position.height + 'px'}\">\n" +
- " <a href=\"javascript:void(0);\" ng-click=\"customScroll(true)\" aria-label=\"Scroll\" aria-hidden=\"true\">\n" +
- " <i ng-class=\"{'icon-chevron-down': (scrollbarAxis === 'y'), 'icon-chevron-right': (scrollbarAxis === 'x')}\"></i>\n" +
- " </a>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/search/search.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/search/search.html",
- "<div class=\"select2-container show-search\" ng-class=\"{'select2-dropdown-open': (showlist && !isDisabled),'select2-container-disabled':isDisabled, 'select2-container-active': isact}\" ng-init=\"isact=false;\" style=\"width: 100%;\">\n" +
- " <a href=\"javascript:void(0)\" class=\"select2-choice needsclick\" tabindex=\"0\" ng-click=\"showDropdown()\" ng-class=\"{'select2-chosen-disabled':isDisabled}\" role=\"combobox\" aria-expanded=\"{{showlist}}\" aria-owns=\"inList\" aria-label=\"{{selectedOption}} selected\" ng-focus=\"isact=true;\" ng-blur=\"isact=false;\">\n" +
- " <span class=\"select2-chosen needsclick\" aria-hidden = \"true\">{{selectedOption}}</span>\n" +
- " <abbr class=\"select2-search-choice-close needsclick\"></abbr>\n" +
- " <span class=\"select2-arrow needsclick\" role=\"presentation\">\n" +
- " <b role=\"presentation\" class=\"needsclick\"></b>\n" +
- " </span>\n" +
- " </a> \n" +
- " <input class=\"select2-focusser select2-offscreen\" \n" +
- " tabindex=\"-1\" \n" +
- " type=\"text\" \n" +
- " aria-hidden=\"true\" \n" +
- " title=\"hidden\" \n" +
- " aria-haspopup=\"true\" \n" +
- " role=\"button\"> \n" +
- "</div>\n" +
- "\n" +
- "<div class=\"select2-drop select2-with-searchbox select2-drop-auto-width select2-drop-active\" ng-class=\"{'select2-display-none':(!showlist || isDisabled)}\" style=\"width:100%;z-index: 10\">\n" +
- " <div class=\"select2-search\">\n" +
- " <label ng-if=\"!noFilter\" class=\"select2-offscreen\" aria-label=\"Inline Search Field\" aria-hidden=\"true\">Inline Search Field</label>\n" +
- " <input ng-if=\"!noFilter\" ng-model=\"title\" aria-label=\"title\" typeahead=\"c.title for c in cName | filter:$viewValue:startsWith\" type=\"text\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" class=\"select2-input\" aria-autocomplete=\"list\" placeholder=\"\">\n" +
- " </div>\n" +
- " <ul id=\"inList\" class=\"select2-results\" role=\"listbox\">\n" +
- " <li ng-show=\"filteredName.length === 0\" class=\"select2-no-results\" tabindex=\"-1\">No matches found</li>\n" +
- " <li class=\"select2-results-dept-0 select2-result select2-result-selectable\" role=\"presentation\" ng-model=\"ListType\" ng-show=\"selectMsg && filteredName.length > 0\" ng-click=\"selectOption(selectMsg, '-1')\" ng-class=\"{'select2-result-current': selectedOption === selectMsg, 'hovstyle': selectedIndex === -1}\" ng-mouseover=\"hoverIn(-1)\" aria-label=\"{{selectMsg}}\" tabindex=\"-1\">\n" +
- " <div ng-if=\"startsWithFilter\" class=\"select2-result-label\" ng-bind-html=\"selectMsg | unsafe\" role=\"option\">\n" +
- " <span class=\"select2-match\"></span>\n" +
- " </div>\n" +
- " <div ng-if=\"!startsWithFilter\" class=\"select2-result-label\" ng-bind-html=\"selectMsg | highlight:title:className | unsafe\" role=\"option\">\n" +
- " <span class=\"select2-match\"></span>\n" +
- " </div>\n" +
- " </li>\n" +
- "\n" +
- " <li role=\"menuitem\" ng-if=\"startsWithFilter\" class=\"select2-results-dept-0 select2-result select2-result-selectable\" role=\"presentation\" ng-model=\"ListType\" ng-repeat=\"(fIndex, item) in filteredName = (cName | startsWith:title:item)\" ng-class=\"{'select2-result-current': selectedOption === item.title,'hovstyle': selectedIndex === item.index,'disable': item.disabled}\" ng-click=\"item.disabled || selectOption(item.title,item.index)\" ng-mouseover=\"hoverIn(item.index)\" aria-label=\"{{item.title}}\" tabindex=\"-1\">\n" +
- " <div class=\"select2-result-label\" ng-bind-html=\"item.title | unsafe\" role=\"option\">\n" +
- " <span class=\"select2-match\"></span>\n" +
- " </div>\n" +
- " </li>\n" +
- "\n" +
- " <li role=\"menuitem\" ng-if=\"!startsWithFilter\" class=\"select2-results-dept-0 select2-result select2-result-selectable\" role=\"presentation\" ng-model=\"ListType\" ng-repeat=\"(fIndex, item) in filteredName = (cName | filter:title)\" ng-class=\"{'select2-result-current': selectedOption === item.title,'hovstyle': selectedIndex === item.index,'disable': item.disabled}\" ng-click=\"item.disabled || selectOption(item.title,item.index)\" ng-mouseover=\"hoverIn(item.index)\" aria-label=\"{{item.title}}\" tabindex=\"-1\">\n" +
- " <div class=\"select2-result-label\" ng-bind-html=\"item.title | highlight:title:className | unsafe\" role=\"option\">\n" +
- " <span class=\"select2-match\"></span>\n" +
- " </div>\n" +
- " </li>\n" +
- " </ul>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/select/select.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/select/select.html",
- "<div class=\"select2-container show-search\" ng-class=\"{'select2-dropdown-open': (showlist && !isDisabled),'select2-container-disabled': isDisabled, 'select2-container-active': isact}\" ng-init=\"isact=false;\">\n" +
- " <span class=\"select2-choice needsclick\" tabindex=\"{{isDisabled ? -1 : 0}}\" ng-click=\"showDropdown()\" ng-class=\"{'select2-chosen-disabled':isDisabled}\" role=\"combobox\" aria-expanded=\"{{showlist}}\" aria-owns=\"inList\" aria-label=\"{{titleName}} dropdown {{selectedOption}} selected\" ng-focus=\"isact=true;\" ng-blur=\"isact=false;\">\n" +
- " <span class=\"select2-chosen needsclick\" aria-hidden=\"true\" ng-bind-html=\"selectedOption | unsafe\">{{selectedOption}}</span>\n" +
- " <abbr class=\"select2-search-choice-close needsclick\"></abbr>\n" +
- " <span class=\"select2-arrow needsclick\" role=\"presentation\">\n" +
- " <b role=\"presentation\" class=\"needsclick\"></b>\n" +
- " </span>\n" +
- " </span> \n" +
- " <input class=\"select2-focusser select2-offscreen\" \n" +
- " tabindex=\"-1\" \n" +
- " type=\"text\" \n" +
- " aria-hidden=\"true\" \n" +
- " title=\"hidden\" \n" +
- " aria-haspopup=\"true\" \n" +
- " role=\"button\"> \n" +
- "</div>\n" +
- "\n" +
- "<div class=\"select2-drop select2-with-searchbox select2-drop-auto-width select2-drop-active\" ng-class=\"{'select2-display-none':(!showlist || isDisabled)}\" style=\"width:100%;z-index: 10\">\n" +
- " <div class=\"select2-search\">\n" +
- " <label ng-if=\"!noFilter\" class=\"select2-offscreen\" aria-label=\"Inline Search Field\" aria-hidden=\"true\">Inline Search Field</label>\n" +
- " <input ng-if=\"!noFilter\" ng-model=\"title\" aria-label=\"title\" typeahead=\"c.title for c in cName | filter:$viewValue:startsWith\" type=\"text\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" class=\"select2-input\" aria-autocomplete=\"list\" placeholder=\"\">\n" +
- " </div>\n" +
- " <ul id=\"inList\" class=\"select2-results\" role=\"listbox\">\n" +
- " <li ng-if=\"!noFilter\" ng-show=\"filteredName.length === 0\" class=\"select2-no-results\" tabindex=\"-1\">No matches found</li>\n" +
- " <li ng-if=\"!noFilter\" class=\"select2-results-dept-0 select2-result select2-result-selectable\" role=\"presentation\" ng-model=\"ListType\" ng-show=\"selectMsg && filteredName.length > 0\" ng-click=\"selectOption(selectMsg, '-1')\" ng-class=\"{'select2-result-current': selectedOption === selectMsg, 'hovstyle': selectedIndex === -1}\" ng-mouseover=\"hoverIn(-1)\" aria-label=\"{{selectMsg}}\" tabindex=\"-1\">\n" +
- " <div ng-if=\"startsWithFilter\" class=\"select2-result-label\" ng-bind-html=\"selectMsg | unsafe\" role=\"option\">\n" +
- " <span class=\"select2-match\"></span>\n" +
- " </div>\n" +
- " <div ng-if=\"!startsWithFilter\" class=\"select2-result-label\" ng-bind-html=\"selectMsg | highlight:title:className | unsafe\" role=\"option\">\n" +
- " <span class=\"select2-match\"></span>\n" +
- " </div>\n" +
- " </li>\n" +
- "\n" +
- " <li role=\"menuitem\" ng-if=\"startsWithFilter\" class=\"select2-results-dept-0 select2-result select2-result-selectable\" ng-model=\"ListType\" ng-repeat=\"(fIndex, item) in filteredName = (cName | startsWith:title:item)\" ng-class=\"{'select2-result-current': selectedOption === item.title,'hovstyle': selectedIndex === item.index,'disable': item.disabled}\" ng-click=\"item.disabled || selectOption(item.title,item.index)\" ng-mouseover=\"hoverIn(item.index)\" tabindex=\"-1\">\n" +
- " <div class=\"select2-result-label\" ng-bind-html=\"item.title | unsafe\" role=\"option\">\n" +
- " <span class=\"select2-match\"></span>\n" +
- " </div>\n" +
- " </li>\n" +
- "\n" +
- " <li role=\"menuitem\" ng-if=\"!startsWithFilter\" class=\"select2-results-dept-0 select2-result select2-result-selectable\" ng-model=\"ListType\" ng-repeat=\"(fIndex, item) in filteredName = (cName | filter:title)\" ng-class=\"{'select2-result-current': selectedOption === item.title,'hovstyle': selectedIndex === item.index,'disable': item.disabled}\" ng-click=\"item.disabled || selectOption(item.title,item.index)\" ng-mouseover=\"hoverIn(item.index)\" tabindex=\"-1\">\n" +
- " <div class=\"select2-result-label\" ng-bind-html=\"item.title | highlight:title:className | unsafe\" role=\"option\">\n" +
- " <span class=\"select2-match\"></span>\n" +
- " </div>\n" +
- " </li>\n" +
- " </ul>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/select/textDropdown.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/select/textDropdown.html",
- "<div tabindex=\"0\" class=\"text-dropdown\">\n" +
- " <div class=\"dropdown\" ng-class=\"{'not-visible': isActionsShown}\" ng-click=\"toggle()\">\n" +
- " <span class=\"action--selected\" ng-bind=\"currentAction\"></span>\n" +
- " <i ng-class=\"isActionsShown ? 'icon-dropdown-up' : 'icon-dropdown-down'\"></i>\n" +
- " </div>\n" +
- " <ul ng-class=\"isActionsShown ? 'actionsOpened' : 'actionsClosed'\" ng-show=\"isActionsShown\">\n" +
- " <li ng-class=\"{'highlight': selectedIndex==$index}\" ng-repeat=\"action in actions track by $index\" ng-click=\"chooseAction($event, action, $index)\" ng-mouseover=\"hoverIn($index)\">{{action}}<i ng-class=\"{'icon-included-checkmark': isCurrentAction(action)}\" att-accessibility-click=\"13,32\"></i></li>\n" +
- " </ul>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/slider/maxContent.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/slider/maxContent.html",
- "<div class=\"att-slider__label att-slider__label--max att-slider__label--below\" ng-transclude></div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/slider/minContent.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/slider/minContent.html",
- "<div class=\"att-slider__label att-slider__label--min att-slider__label--below\" ng-transclude></div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/slider/slider.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/slider/slider.html",
- "<div class=\"att-slider\" ng-mousemove=\"moveElem($event)\" ng-mouseup=\"mouseUp($event)\">\n" +
- " <div class=\"att-slider__track\">\n" +
- " <div class=\"att-slider__range att-slider__range--disabled\" ng-style=\"disabledStyle\"></div>\n" +
- " <div class=\"att-slider__range\" ng-style=\"rangeStyle\"></div>\n" +
- " </div>\n" +
- " <div class=\"att-slider__handles-container\">\n" +
- " <div role=\"menuitem\" aria-label=\"{{ngModelSingle}}\" class=\"att-slider__handle\" ng-style=\"handleStyle\" ng-mousedown=\"mouseDown($event,'ngModelSingle')\" ng-mousemove=\"moveElem($event)\" ng-mouseup=\"mouseUp($event)\" tabindex=\"0\" ng-keydown=\"keyDown($event,'ngModelSingle')\"></div>\n" +
- " <div role=\"menuitem\" aria-label=\"Minimum Value- {{ngModelLow}}\" class=\"att-slider__handle\" ng-style=\"minHandleStyle\" ng-mousedown=\"mouseDown($event,'ngModelLow')\" ng-focus=\"focus($event,'ngModelLow')\" ng-mousemove=\"moveElem($event)\" ng-mouseup=\"mouseUp($event)\" tabindex=\"0\" ng-keyup=\"keyUp($event,'ngModelLow')\" ng-keydown=\"keyDown($event,'ngModelLow')\"></div>\n" +
- " <div role=\"menuitem\" aria-label=\"Maximum Value- {{ngModelHigh}}\" class=\"att-slider__handle\" ng-style=\"maxHandleStyle\" ng-mousedown=\"mouseDown($event,'ngModelHigh')\" ng-focus=\"focus($event,'ngModelHigh')\" ng-mousemove=\"moveElem($event)\" ng-mouseup=\"mouseUp($event)\" tabindex=\"0\" ng-keyup=\"keyUp($event,'ngModelHigh')\" ng-keydown=\"keyDown($event,'ngModelHigh')\"></div>\n" +
- " </div>\n" +
- " <div ng-transclude></div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/splitButtonDropdown/splitButtonDropdown.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/splitButtonDropdown/splitButtonDropdown.html",
- "<div class=\" btn-group\" \n" +
- " ng-class=\"{'buttons-dropdown--large':!isSmall, \n" +
- " 'buttons-dropdown--small':isSmall, \n" +
- " 'action-dropdown':(isActionDropdown), \n" +
- " 'open':isDropDownOpen}\">\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" class=\"button btn buttons-dropdown__split\" \n" +
- " ng-class=\"{'button--primary':(btnType==undefined || btnType=='primary'), \n" +
- " 'button--secondary':btnType=='secondary', \n" +
- " 'button--disabled':btnType=='disabled', \n" +
- " 'button--small':isSmall}\" \n" +
- " ng-if=\"!isActionDropdown\"\n" +
- " ng-click=\"btnType==='disabled'?undefined:clickFxn()\" att-accessibility-click=\"13,32\">{{btnText}}</a>\n" +
- " <a tabindex=\"0\" href=\"javascript:void(0)\" role=\"button\" aria-label=\"Toggle Dropdown\" aria-haspopup=\"true\" class=\"button buttons-dropdown__drop dropdown-toggle\" \n" +
- " ng-class=\"{'button--primary':(btnType==undefined || btnType=='primary'), \n" +
- " 'button--secondary':btnType=='secondary', \n" +
- " 'button--disabled':btnType=='disabled', \n" +
- " 'button--small':isSmall}\" ng-click=\"toggleDropdown()\" att-accessibility-click=\"13,32\">{{toggleTitle}} </a>\n" +
- " <ul class=\"dropdown-menu\" ng-class=\"{'align-right':multiselect ===true}\" aria-expanded=\"{{isDropDownOpen}}\" ng-click=\"hideDropdown()\" role=\"menu\" ng-transclude></ul>\n" +
- "</div> ");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/splitButtonDropdown/splitButtonDropdownItem.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/splitButtonDropdown/splitButtonDropdownItem.html",
- "<li role=\"menuitem\" att-element-focus=\"sFlag\" tabindex=\"0\" ng-transclude></li>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/splitIconButton/splitIcon.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/splitIconButton/splitIcon.html",
- "<div class='split-icon-button-container'>\n" +
- "\n" +
- " <div class='split-icon-button' ng-class=\"{'icon-with-chevron': isRight && !isMiddle && !isLeftNextDropdown && !isNextToDropDown, 'split-icon-button-middle':isMiddle, 'split-icon-button-right':isRight, 'split-icon-button-left':isLeft, 'split-icon-button-left-dropdown': isLeftNextDropdown ,'split-icon-button-next-dropdown': isNextToDropDown,'split-icon-button-dropdown': isDropDownOpen,'split-icon-button-hover':isIconHovered || isDropDownOpen}\" ng-mouseover='isIconHovered = true;' ng-mouseleave='isIconHovered = false;' tabindex=\"-1\" att-accessibility-click=\"13,32\" ng-click='dropDownClicked();'>\n" +
- " <a class='{{icon}}' title='{{iconTitle}}' tabindex=\"0\"></a>\n" +
- " <i ng-if=\"isRight && !isMiddle && !isLeftNextDropdown && !isNextToDropDown\" \n" +
- " ng-class=\"isDropDownOpen ? 'icon-dropdown-up' : 'icon-dropdown-down'\"> </i>\n" +
- " </div> \n" +
- "\n" +
- " <ul ng-if='isDropdown' class='dropdown-menu {{dropDownId}}' ng-show='\n" +
- " isDropDownOpen' ng-click='toggleDropdown(false)' role=\"presentation\" ng-transclude>\n" +
- " </ul>\n" +
- "\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/splitIconButton/splitIconButton.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/splitIconButton/splitIconButton.html",
- "<div>\n" +
- " <div ng-if='isLeftLineShown' dir-type='{{iconStateConstants.DIR_TYPE.LEFT}}' expandable-line></div>\n" +
- " <div ng-click='clickHandler()' att-split-icon icon='{{icon}}' title='{{title}}' dir-type='{{iconStateConstants.DIR_TYPE.BUTTON}}' hover-watch='isHovered' drop-down-watch='dropDownWatch' drop-down-id='{{dropDownId}}'>\n" +
- " <div ng-transclude>\n" +
- " </div>\n" +
- " </div>\n" +
- " <div ng-if='isRightLineShown' dir-type='{{iconStateConstants.DIR_TYPE.RIGHT}}' expandable-line></div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/splitIconButton/splitIconButtonGroup.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/splitIconButton/splitIconButtonGroup.html",
- "<div ng-transclude>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/stepSlider/attStepSlider.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/stepSlider/attStepSlider.html",
- "<span ng-class=\"mainSliderClass\">\n" +
- " <table>\n" +
- " <tr>\n" +
- " <td>\n" +
- " <div class=\"jslider-bg\">\n" +
- " <i class=\"l\"></i>\n" +
- " <i class=\"r\"></i>\n" +
- " <i class=\"v\" ng-class=\"{'step-slider-green':sliderColor == COLORS.GREEN, 'step-slider-blue': sliderColor == COLORS.BLUE_HIGHLIGHT, 'step-slider-magenta': sliderColor == COLORS.MAGENTA, 'step-slider-gold': sliderColor == COLORS.GOLD, 'step-slider-purple': sliderColor == COLORS.PURPLE, 'step-slider-dark-blue': sliderColor == COLORS.DARK_BLUE, 'step-slider-regular': sliderColor == COLORS.REGULAR, 'step-slider-white': sliderColor == COLORS.WHITE, 'cutoff-slider': isCutOffSlider}\"></i>\n" +
- " </div>\n" +
- " <div class=\"jslider-pointer\" id=\"left-pointer\"></div>\n" +
- " <div class=\"jslider-pointer jslider-pointer-to\" ng-class=\"{'step-slider-green':sliderColor == COLORS.GREEN, 'step-slider-blue': sliderColor == COLORS.BLUE_HIGHLIGHT, 'step-slider-magenta': sliderColor == COLORS.MAGENTA, 'step-slider-gold': sliderColor == COLORS.GOLD, 'step-slider-purple': sliderColor == COLORS.PURPLE, 'step-slider-dark-blue': sliderColor == COLORS.DARK_BLUE, 'step-slider-regular': sliderColor == COLORS.REGULAR, 'step-slider-white':sliderColor == COLORS.WHITE ,'cutoff-slider': isCutOffSlider}\"></div>\n" +
- " <div class=\"jslider-label\"><span ng-bind=\"from\"></span><span ng-bind=\"options.dimension\"></span></div>\n" +
- " <div class=\"jslider-label jslider-label-to\"><span ng-bind=\"toStr\"></span><span ng-bind=\"endDimension\"></span></div>\n" +
- " <div class=\"jslider-value\" id=\"jslider-value-left\"><span></span>{{options.dimension}}</div>\n" +
- " <div class=\"jslider-value jslider-value-to\"><span></span>{{toolTipDimension}}</div>\n" +
- " <div class=\"jslider-scale\" ng-class=\"{'show-dividers': showDividers, 'cutoff-slider-dividers':isCutOffSlider}\">\n" +
- " </div>\n" +
- " <div class=\"jslider-cutoff\">\n" +
- " <div class=\"jslider-label jslider-label-cutoff\">\n" +
- " <span ng-bind=\"cutOffVal\"></span>\n" +
- " </div>\n" +
- " </div>\n" +
- " </td>\n" +
- " </tr>\n" +
- " </table>\n" +
- "</span>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/steptracker/step-tracker.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/steptracker/step-tracker.html",
- "<div class=\"steptracker1\">\n" +
- " <div class=\"steptracker-bg\">\n" +
- " <div tabindex=\"0\" ng-click=\"stepclick($event, $index);\" att-accessibility-click=\"13,23\" class=\"steptracker-track size-onethird\" ng-repeat=\"step in sdata\"\n" +
- " ng-style=\"set_width($index)\"\n" +
- " ng-class=\"{'last':laststep($index),'done':donesteps($index),'active':activestep($index), 'incomplete': isIncomplete($index), 'disabled': disableClick}\">\n" +
- " <div class=\"circle\">{{($index) + 1}}<span>{{step.title}}</span></div>\n" +
- " <div ng-if=\"!laststep($index)\" class=\"track\"></div>\n" +
- " </div>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/steptracker/step.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/steptracker/step.html",
- "<div class=\"steptracker1\">\n" +
- " <div class=\"steptracker-bg\">\n" +
- " <div class=\"steptracker-track size-onethird\" \n" +
- " ng-class=\"{'last':laststep($index),'done':donesteps($index),'active':activestep($index)}\">\n" +
- " <div class=\"circle\" tabindex=\"0\" \n" +
- " ng-click=\"stepclick($event, $index);\" \n" +
- " att-accessibility-click=\"13,23\">{{($index) + 1}}<span>{{step.title}}</span></div>\n" +
- " <div ng-if=\"!laststep($index)\" class=\"track\"></div>\n" +
- " </div>\n" +
- " </div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/steptracker/timeline.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/steptracker/timeline.html",
- "<div class='att-timeline'>\n" +
- " <div timeline-dot order='0' title='{{steps[0].title}}' description='{{steps[0].description}}' by='{{steps[0].by}}' date='{{steps[0].date}}' type='{{steps[0].type}}'></div>\n" +
- "\n" +
- " <div ng-repeat=\"m in middleSteps track by $index\">\n" +
- " <div timeline-bar order='{{$index}}'></div>\n" +
- " <div timeline-dot order='{{$index + 1}}' title='{{m.title}}' description='{{m.description}}' by='{{m.by}}' date='{{m.date}}' type='{{m.type}}'>\n" +
- " </div>\n" +
- " </div>\n" +
- "\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/steptracker/timelineBar.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/steptracker/timelineBar.html",
- "<div class='timeline-bar'>\n" +
- " <div class='progress-bar' ng-class=\"{'completed-color':isCompleted,'cancelled-color':isCancelled,'alert-color':isAlert}\">\n" +
- " </div>\n" +
- " <hr></hr>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/steptracker/timelineDot.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/steptracker/timelineDot.html",
- "<div class='timeline-dot'>\n" +
- "\n" +
- " <div class='bigger-circle' ng-class=\"{'completed-color':isCompleted,'cancelled-color':isCancelled,'alert-color':isAlert}\">\n" +
- " </div>\n" +
- "\n" +
- " <div class='inactive-circle'>\n" +
- " </div>\n" +
- "\n" +
- " <div class='expandable-circle' ng-class=\"{'completed-color':isCompleted,'cancelled-color':isCancelled,'alert-color':isAlert}\">\n" +
- " </div>\n" +
- "\n" +
- " <div ng-class=\"{'below-info-box':isBelowInfoBoxShown, 'above-info-box': !isBelowInfoBoxShown}\" tabindex=\"0\">\n" +
- " \n" +
- " <div ng-if='isBelowInfoBoxShown' class='vertical-line'>\n" +
- " </div>\n" +
- "\n" +
- " <div class='info-container' ng-init='isContentShown=false'>\n" +
- " <div ng-class=\"{'current-step-title':isCurrentStep, 'title':!isCurrentStep,'completed-color-text':isCompleted,'cancelled-color-text':isCancelled,'alert-color-text':isAlert, 'inactive-color-text':isInactive}\" ng-mouseover='titleMouseover(1)' ng-mouseleave='titleMouseleave()' ng-bind='title' ></div>\n" +
- " <div class='content'>\n" +
- " <div class='description' ng-bind='description'></div>\n" +
- " <div class='submitter' ng-bind='by'></div>\n" +
- " </div>\n" +
- " <div class='date' ng-mouseover='titleMouseover(2)' ng-mouseleave='titleMouseleave()' ng-bind='date'></div>\n" +
- " </div>\n" +
- "\n" +
- " <div ng-if='!isBelowInfoBoxShown' class='vertical-line'>\n" +
- " </div>\n" +
- " </div>\n" +
- "\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/table/attTable.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/table/attTable.html",
- "<table class=\"tablesorter tablesorter-default\" ng-transclude></table>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/table/attTableBody.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/table/attTableBody.html",
- "<td ng-transclude></td>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/table/attTableHeader.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/table/attTableHeader.html",
- "<th role=\"columnheader\" scope=\"col\" aria-live=\"polite\" aria-sort=\"{{sortPattern !== 'null' && '' || sortPattern}}\" aria-label=\"{{headerName}} {{sortable !== 'false' && ': activate to sort' || ' '}} {{sortPattern !== 'null' && '' || sortPattern}}\" tabindex=\"{{sortable !== 'false' && '0' || '-1'}}\" class=\"tablesorter-header\" ng-class=\"{'tablesorter-headerAsc': sortPattern === 'ascending', 'tablesorter-headerDesc': sortPattern === 'descending', 'tablesort-sortable': sortable !== 'false', 'sorter-false': sortable === 'false'}\" att-accessibility-click=\"13,32\" ng-click=\"(sortable !== 'false') && sort();\"><div class=\"tablesorter-header-inner\" ng-transclude></div></th>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/tableMessages/attTableMessage.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/tableMessages/attTableMessage.html",
- "<div class=\"att-table-message\">\n" +
- " <div class=\"message\" ng-if=\"msgType==messageConstants.TABLE_MESSAGE_TYPES.noMatching\">\n" +
- " <div class=\"img-magnify-glass\"></div> \n" +
- " <div>\n" +
- " <div ng-transclude></div>\n" +
- " </div>\n" +
- " </div>\n" +
- " <div class=\"message\" ng-if=\"msgType==messageConstants.TABLE_MESSAGE_TYPES.errorLoading\">\n" +
- " <div class=\"img-oops-exclamation\" tabindex=\"0\" 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)\" ng-click=\"refreshAction($event)\">refresh the page</a>\n" +
- " </div>\n" +
- " </div>\n" +
- " <div class=\"message\" ng-if=\"msgType==messageConstants.TABLE_MESSAGE_TYPES.magnifySearch\">\n" +
- " <div class=\"img-magnify-glass\"></div>\n" +
- " <div>\n" +
- " <p class=\"title\" tabindex=\"0\">Please input values to <br/> begin your search.</p>\n" +
- " </div>\n" +
- " </div>\n" +
- " <div class=\"message loading-message\" ng-if=\"msgType==messageConstants.TABLE_MESSAGE_TYPES.isLoading\">\n" +
- " <div class=\"img-loading-dots\"></div>\n" +
- " <div ng-transclude></div>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/tableMessages/attUserMessage.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/tableMessages/attUserMessage.html",
- "<div class=\"att-user-message\">\n" +
- " <div ng-class=\"type==messageConstants.USER_MESSAGE_TYPES.error && trigger ? 'message-wrapper-error' : 'hidden'\">\n" +
- " <div class=\"message-icon-error\"> <i class=\"icon-info-alert\"></i> </div>\n" +
- "\n" +
- " <div class=\"message-body-wrapper\">\n" +
- " <div class=\"message-title-error\" ng-if=\"thetitle && thetitle.length > 0\"> <span ng-bind=\"thetitle\" tabindex=\"0\" aria-label=\"{{thetitle}}\"></span> </div>\n" +
- " <div class=\"message-msg\" ng-bind=\"message\" ng-if=\"message && message.length > 0\" tabindex=\"0\"></div>\n" +
- " <div class=\"message-bottom\">\n" +
- " <div ng-transclude></div>\n" +
- " </div>\n" +
- " </div>\n" +
- "\n" +
- " </div>\n" +
- " <div ng-class=\"type==messageConstants.USER_MESSAGE_TYPES.success && trigger ? 'message-wrapper-success' : 'hidden'\">\n" +
- " <div class=\"message-icon-success\"> <i class=\"icon-included-checkmark\"></i></div>\n" +
- "\n" +
- " <div class=\"message-body-wrapper\">\n" +
- " <div class=\"message-title-success\" ng-if=\"thetitle && thetitle.length > 0\" >\n" +
- " <span ng-bind=\"thetitle\" tabindex=\"0\" aria-label=\"{{thetitle}}\"></span>\n" +
- " </div>\n" +
- " <div class=\"message-msg\" ng-bind=\"message\" ng-if=\"message && message.length > 0\" tabindex=\"0\"></div>\n" +
- " <div class=\"message-bottom\">\n" +
- " <div ng-transclude></div>\n" +
- " </div>\n" +
- " </div>\n" +
- "\n" +
- " </div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/tabs/floatingTabs.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/tabs/floatingTabs.html",
- "<ul ng-class=\"{'tabsbid': size === 'large', 'tabsbid--small': size === 'small'}\">\n" +
- " <li ng-repeat=\"tab in tabs\" ng-class=\"{'tabsbid__item tabsbid__item--active': isActiveTab(tab.url), 'tabsbid__item': !isActiveTab(tab.url)}\" ng-click=\"onClickTab(tab)\">\n" +
- " <a class=\"tabsbid__item-link\" href=\"{{tab.url}}\" tabindex=\"0\" att-accessibility-click=\"32,13\">{{tab.title}}</a>\n" +
- " </li>\n" +
- "</ul>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/tabs/genericTabs.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/tabs/genericTabs.html",
- "<ul ng-class=\"{'tabsbid': size === 'large', 'tabsbid--small': size === 'small'}\">\n" +
- " <li ng-repeat=\"tab in tabs\" ng-class=\"{'tabsbid__item tabsbid__item--active': isActive(tab.id), 'tabsbid__item': !isActive(tab.id),'tabs__item--active': isActive(tab.id)}\" ng-click=\"clickTab(tab)\">\n" +
- " <a class=\"tabsbid__item-link\" href=\"{{tab.url}}\" tabindex=\"0\" att-accessibility-click=\"32,13\">{{tab.title}}</a>\n" +
- " </li>\n" +
- "</ul>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/tabs/menuTab.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/tabs/menuTab.html",
- "<li class=\"megamenu__item\" ng-mouseover=\"showHoverChild($event)\" ng-class=\"{'tabs__item--active': menuItem.active==true && !hoverChild==true}\">\n" +
- " <span role=\"menuitem\" att-accessibility-click=\"13,32\" tabindex=\"0\" ng-click=\"showChildren($event);!clickInactive||resetMenu($event)\">{{tabName}}</span>\n" +
- " <div ng-transclude></div>\n" +
- "</li>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/tabs/parentmenuTab.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/tabs/parentmenuTab.html",
- "<div ng-class=\"{'megamenu-tabs': megaMenu,'submenu-tabs': !megaMenu}\">\n" +
- " <ul class=\"megamenu__items\" role=\"presentation\" ng-transclude>\n" +
- " </ul>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/tabs/simplifiedTabs.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/tabs/simplifiedTabs.html",
- "<div class=\"simplified-tabs\">\n" +
- "<ul class=\"simplified-tabs__items\" role=\"tablist\">\n" +
- " <li ng-repeat=\"tab in tabs\" role=\"tab\" class=\"simplified-tabs__item\" ng-class=\"{'tabs__item--active': isActive(tab.id)}\" ng-click=\"clickTab(tab)\" tabindex=\"0\" att-accessibility-click=\"32,13\">{{tab.title}}</li>\n" +
- " <li class=\"tabs__pointer\"></li>\n" +
- "</ul>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/tabs/submenuTab.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/tabs/submenuTab.html",
- "<li class=\"tabsbid__item megamenu__item\" ng-class=\"{'subMenuHover': menuItem.active==true}\">\n" +
- "<a ng-href=\"{{tabUrl}}\" role=\"menuitem\" ng-if=\"subMenu === true\" ng-mouseover=\"!subMenu || showChildren($event)\" ng-focus=\"!subMenu ||showChildren($event)\" tabindex=\"{{subMenu=='true'?0:-1}}\" ng-click=\"!subMenu ||showMenuClick($event) ; subMenu ||showSubMenuClick($event)\" att-accessibility-click=\"13,32\">{{tabName}}</a>\n" +
- "<a ng-href=\"{{tabUrl}}\" role=\"menuitem\" ng-if=\"!menuItem.leafNode && subMenu !== true\" ng-mouseover=\"!subMenu || showChildren($event)\" ng-focus=\"!subMenu ||showChildren($event)\" tabindex=\"{{subMenu=='true'?0:-1}}\" ng-click=\"!subMenu ||showMenuClick($event) ; subMenu ||showSubMenuClick($event)\" att-accessibility-click=\"13,32\">{{tabName}}</a>\n" +
- "<span ng-transclude></span>\n" +
- "</li>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/tagBadges/tagBadges.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/tagBadges/tagBadges.html",
- "<div class=\"tags__item\" \n" +
- " ng-class=\"{'tags__item--small':isSmall, \n" +
- " 'tags__item--color':isColor, \n" +
- " 'tags__item--cloud':!isClosable && !isColor,'active':applyActiveClass}\"\n" +
- " ng-if=\"display\" \n" +
- " ng-style=\"{borderColor: border_type_borderColor, background: isHighlight?'#bbb':undefined, color: isHighlight?'#444':undefined }\"\n" +
- " ng-mousedown=\"activeHighlight(true)\" role=\"presentation\" ng-mouseup=\"activeHighlight(false)\">\n" +
- " <i class=\"icon-filter tags__item--icon\" ng-if=\"isIcon\">&nbsp;</i>\n" +
- " <i class=\"tags__item--color-icon\" ng-if=\"isColor\" ng-style=\"{backgroundColor: background_type_backgroundColor, borderColor: background_type_borderColor}\"></i>\n" +
- " <span class=\"tags__item--title\" role=\"presentation\" tabindex=0 ng-mousedown=\"activeHighlight(true)\" ng-mouseup=\"activeHighlight(false)\" ng-transclude></span>\n" +
- " <a href=\"javascript:void(0)\" title=\"Dismiss Link\" class=\"tags__item--action\" ng-click=\"closeMe();$event.preventDefault()\" ng-if=\"isClosable\"\n" +
- " ng-style=\"{color: (isHighlight && '#444') || '#888' , borderLeft: (isHighlight && '1px solid #444')|| '1px solid #888' }\">\n" +
- " <i class=\"icon-erase\">&nbsp;</i>\n" +
- " </a>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/toggle/demoToggle.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/toggle/demoToggle.html",
- "<span ng-transclude></span>\n" +
- "<div class=\"att-switch-content\" hm-drag = \"drag($event)\" att-accessibility-click=\"13,32\" ng-click=\"updateModel($event)\" hm-dragstart=\"alert('hello')\" hm-dragend=\"drag($event)\" ng-class=\"{'large' : directiveValue == 'large'}\" style=\"-webkit-user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\">\n" +
- " <div class=\"att-switch-onText\" ng-style=\"\" ng-class=\"{'icon-included-checkmark ico' : on === undefined,'large' : directiveValue == 'large'}\">{{on}}<span class=\"hidden-spoken\">{{directiveValue}} when checked.</span></div>\n" +
- " <div class=\"att-switch-thumb\" tabindex=\"0\" title=\"Toggle switch\" role=\"checkbox\" ng-class=\"{'large' : directiveValue == 'large'}\"></div>\n" +
- " <div class=\"att-switch-offText\" ng-class=\"{'icon-erase ico' : on === undefined,'large' : directiveValue == 'large'}\">{{off}}<span class=\"hidden-spoken\">{{directiveValue}} when unchecked.</span></div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/typeAhead/typeAhead.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/typeAhead/typeAhead.html",
- "<div class=\"typeahead mainContainerOuter\">\n" +
- " <span class=\"message\">To</span>\n" +
- " <div class='maincontainer' ng-click=\"setFocus()\" ng-focus=\"inputActive=true\" ng-class =\"{'typeahed_active':inputActive || (lineItems.length && inputActive)}\">\n" +
- " <span tag-badges closable ng-repeat =\"lineItem in lineItems track by $index\" on-close=\"theMethodToBeCalled($index)\" >{{lineItem}}</span>\n" +
- " <input type=\"text\" focus-me=\"clickFocus\" ng-focus=\"inputActive=true\" ng-model=\"model\" ng-keydown=\"selected = false; selectionIndex($event)\"/><br/> \n" +
- " </div>\n" +
- " <div ng-hide=\"!model.length || selected\">\n" +
- " <div class=\"filtercontainer list-scrollable\" ng-show=\"( items | filter:model).length\">\n" +
- " <div class=\"item\" ng-repeat=\"item in items| filter:model track by $index\" ng-click=\"handleSelection(item[titleName],item[subtitle])\" att-accessibility-click=\"13,32\" ng-class=\"{active:isCurrent($index,item[titleName],item[subtitle],( items | filter:model).length)}\"ng-mouseenter=\"setCurrent($index)\">\n" +
- " <span class=\"title\" >{{item[titleName]}}</span>\n" +
- " <span class=\"subtitle\">{{item[subtitle]}}</span>\n" +
- " </div> \n" +
- " </div>\n" +
- " </div>\n" +
- " \n" +
- " <div class=\"textAreaEmailContentDiv\">\n" +
- " <span class=\"message\">Message</span>\n" +
- " <textarea rows=\"4\" cols=\"50\" role=\"textarea\" class=\"textAreaEmailContent\" ng-model=\"emailMessage\">To send \n" +
- " a text, picture, or video message1 to an AT&T wireless device from your email:my message.</textarea>\n" +
- " \n" +
- " </div>\n" +
- " \n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/verticalSteptracker/vertical-step-tracker.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/verticalSteptracker/vertical-step-tracker.html",
- "<li>\n" +
- " <i ng-class=\"{'icon-tickets-active' : type == 'actual' && id =='Active','icon-tickets-referred' : type == 'actual' && id =='Requested Closed','icon-ticket-regular' : type == 'progress' && id =='In Progress','icon-tickets-contested' : type == 'actual' && id =='Contested','icon-tickets-returned' : type == 'actual' && id =='Deferred','icon-tickets-closed' : type == 'actual' && id =='Ready to Close','icon-tickets-cleared' : type == 'actual' && id =='Cleared'}\"></i>\n" +
- " <span ng-transclude></span>\n" +
- "</li>\n" +
- " \n" +
- "");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/videoControls/photoControls.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/videoControls/photoControls.html",
- "<div>\n" +
- " <a title=\"{{links.prevLink}}\" aria-label=\"Previous Link\" ng-href=\"{{links.prevLink}}\"><i alt=\"previous\" class=\"icon-arrow-left\">&nbsp;</i></a>\n" +
- " <span ng-transclude></span>\n" +
- " <a title=\"{{links.nextLink}}\" aria-label=\"Next Link\" ng-href=\"{{links.nextLink}}\"><i alt=\"next\" class=\"icon-arrow-right\">&nbsp;</i></a>\n" +
- "</div>");
-}]);
-
-angular.module("app/scripts/ng_js_att_tpls/videoControls/videoControls.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("app/scripts/ng_js_att_tpls/videoControls/videoControls.html",
- "<div class=\"video-player\">\n" +
- " <div class=\"video-player__control video-player__play-button\">\n" +
- " <a class=\"video-player__button gigant-play\" data-toggle-buttons=\"icon-play, icon-pause\" data-target=\"i\"><i class=\"icon-play\" alt=\"Play/Pause Button\"></i></a>\n" +
- " </div>\n" +
- " <div class=\"video-player__control video-player__track\">\n" +
- "\n" +
- " <div class=\"video-player__track--inner\">\n" +
- " <div class=\"video-player__track--loaded\" style=\"width: 75%\"></div>\n" +
- " <div class=\"video-player__track--played\" style=\"width: 40%\">\n" +
- " <div class=\"att-tooltip att-tooltip--on att-tooltip--dark att-tooltip--above video-player__track-tooltip\" ng-transclude></div>\n" +
- " <div class=\"video-player__track-handle\"></div>\n" +
- " </div>\n" +
- " </div>\n" +
- " </div>\n" +
- " <a class=\"video-player__time\" ng-transclude></a>\n" +
- " <div class=\"video-player__control video-player__volume_icon\">\n" +
- " <a class=\"video-player__button\" data-toggle-buttons=\"icon-volume-mute, icon-volume-up\" data-target=\"i\"><i class=\"icon-volume-up\" alt=\"Volume Button\"></i></a>\n" +
- " </div>\n" +
- " <ul class=\"video-player__control video-player__volume\">\n" +
- " <li class=\"video-player__volume-bar video-player__volume-bar--full\">&nbsp;</li>\n" +
- " <li class=\"video-player__volume-bar video-player__volume-bar--full\">&nbsp;</li>\n" +
- " <li class=\"video-player__volume-bar\">&nbsp;</li>\n" +
- " <li class=\"video-player__volume-bar\">&nbsp;</li>\n" +
- " <li class=\"video-player__volume-bar\">&nbsp;</li>\n" +
- " </ul>\n" +
- " <div class=\"video-player__control video-player__toggle-fullscreen-button\">\n" +
- " <a class=\"video-player__button\" data-toggle-buttons=\"icon-full-screen, icon-normal-screen\" data-target=\"i\"><i class=\"icon-full-screen\" alt=\"Full Screen Button\">&nbsp;</i></a>\n" +
- " </div>\n" +
- "</div>");
-}]);
-
-return {}
-})(angular, window); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/ebz/sandbox/att-abs-tpls.min.js b/ecomp-portal-BE/war/static/ebz/sandbox/att-abs-tpls.min.js
deleted file mode 100644
index 95d81a26..00000000
--- a/ecomp-portal-BE/war/static/ebz/sandbox/att-abs-tpls.min.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
-* FileName att-style-guide
-* Version 2.17.0
-* Build number 5c64ecd381d5984c483cdfaa078a1890
-* Date 11/23/2015
-*/
-
-(function(angular, window){
-angular.module("att.abs",["att.abs.tpls","att.abs.utilities","att.abs.position","att.abs.transition","att.abs.accordion","att.abs.alert","att.abs.boardStrip","att.abs.breadCrumbs","att.abs.buttons","att.abs.checkbox","att.abs.colorselector","att.abs.datepicker","att.abs.devNotes","att.abs.dividerLines","att.abs.dragdrop","att.abs.drawer","att.abs.message","att.abs.formField","att.abs.hourpicker","att.abs.iconButtons","att.abs.links","att.abs.loading","att.abs.modal","att.abs.pagination","att.abs.paneSelector","att.abs.tooltip","att.abs.popOvers","att.abs.profileCard","att.abs.progressBars","att.abs.radio","att.abs.scrollbar","att.abs.search","att.abs.select","att.abs.slider","att.abs.splitButtonDropdown","att.abs.splitIconButton","att.abs.stepSlider","att.abs.steptracker","att.abs.table","att.abs.tableMessages","att.abs.tabs","att.abs.tagBadges","att.abs.textOverflow","att.abs.toggle","att.abs.treeview","att.abs.typeAhead","att.abs.verticalSteptracker","att.abs.videoControls"]),angular.module("att.abs.tpls",["app/scripts/ng_js_att_tpls/accordion/accordion.html","app/scripts/ng_js_att_tpls/accordion/accordion_alt.html","app/scripts/ng_js_att_tpls/accordion/attAccord.html","app/scripts/ng_js_att_tpls/accordion/attAccordBody.html","app/scripts/ng_js_att_tpls/accordion/attAccordHeader.html","app/scripts/ng_js_att_tpls/alert/alert.html","app/scripts/ng_js_att_tpls/boardStrip/attAddBoard.html","app/scripts/ng_js_att_tpls/boardStrip/attBoard.html","app/scripts/ng_js_att_tpls/boardStrip/attBoardStrip.html","app/scripts/ng_js_att_tpls/buttons/buttonDropdown.html","app/scripts/ng_js_att_tpls/colorselector/colorselector.html","app/scripts/ng_js_att_tpls/datepicker/dateFilter.html","app/scripts/ng_js_att_tpls/datepicker/dateFilterList.html","app/scripts/ng_js_att_tpls/datepicker/datepicker.html","app/scripts/ng_js_att_tpls/datepicker/datepickerPopup.html","app/scripts/ng_js_att_tpls/dividerLines/dividerLines.html","app/scripts/ng_js_att_tpls/dragdrop/fileUpload.html","app/scripts/ng_js_att_tpls/formField/attFormFieldValidationAlert.html","app/scripts/ng_js_att_tpls/formField/attFormFieldValidationAlertPrv.html","app/scripts/ng_js_att_tpls/formField/creditCardImage.html","app/scripts/ng_js_att_tpls/formField/cvcSecurityImg.html","app/scripts/ng_js_att_tpls/hourpicker/hourpicker.html","app/scripts/ng_js_att_tpls/links/readMore.html","app/scripts/ng_js_att_tpls/loading/loading.html","app/scripts/ng_js_att_tpls/modal/backdrop.html","app/scripts/ng_js_att_tpls/modal/tabbedItem.html","app/scripts/ng_js_att_tpls/modal/tabbedOverlayItem.html","app/scripts/ng_js_att_tpls/modal/window.html","app/scripts/ng_js_att_tpls/pagination/pagination.html","app/scripts/ng_js_att_tpls/paneSelector/innerPane.html","app/scripts/ng_js_att_tpls/paneSelector/paneGroup.html","app/scripts/ng_js_att_tpls/paneSelector/sidePane.html","app/scripts/ng_js_att_tpls/tooltip/tooltip-popup.html","app/scripts/ng_js_att_tpls/popOvers/popOvers.html","app/scripts/ng_js_att_tpls/profileCard/addUser.html","app/scripts/ng_js_att_tpls/profileCard/profileCard.html","app/scripts/ng_js_att_tpls/progressBars/progressBars.html","app/scripts/ng_js_att_tpls/scrollbar/scrollbar.html","app/scripts/ng_js_att_tpls/search/search.html","app/scripts/ng_js_att_tpls/select/select.html","app/scripts/ng_js_att_tpls/select/textDropdown.html","app/scripts/ng_js_att_tpls/slider/maxContent.html","app/scripts/ng_js_att_tpls/slider/minContent.html","app/scripts/ng_js_att_tpls/slider/slider.html","app/scripts/ng_js_att_tpls/splitButtonDropdown/splitButtonDropdown.html","app/scripts/ng_js_att_tpls/splitButtonDropdown/splitButtonDropdownItem.html","app/scripts/ng_js_att_tpls/splitIconButton/splitIcon.html","app/scripts/ng_js_att_tpls/splitIconButton/splitIconButton.html","app/scripts/ng_js_att_tpls/splitIconButton/splitIconButtonGroup.html","app/scripts/ng_js_att_tpls/stepSlider/attStepSlider.html","app/scripts/ng_js_att_tpls/steptracker/step-tracker.html","app/scripts/ng_js_att_tpls/steptracker/step.html","app/scripts/ng_js_att_tpls/steptracker/timeline.html","app/scripts/ng_js_att_tpls/steptracker/timelineBar.html","app/scripts/ng_js_att_tpls/steptracker/timelineDot.html","app/scripts/ng_js_att_tpls/table/attTable.html","app/scripts/ng_js_att_tpls/table/attTableBody.html","app/scripts/ng_js_att_tpls/table/attTableHeader.html","app/scripts/ng_js_att_tpls/tableMessages/attTableMessage.html","app/scripts/ng_js_att_tpls/tableMessages/attUserMessage.html","app/scripts/ng_js_att_tpls/tabs/floatingTabs.html","app/scripts/ng_js_att_tpls/tabs/genericTabs.html","app/scripts/ng_js_att_tpls/tabs/menuTab.html","app/scripts/ng_js_att_tpls/tabs/parentmenuTab.html","app/scripts/ng_js_att_tpls/tabs/simplifiedTabs.html","app/scripts/ng_js_att_tpls/tabs/submenuTab.html","app/scripts/ng_js_att_tpls/tagBadges/tagBadges.html","app/scripts/ng_js_att_tpls/toggle/demoToggle.html","app/scripts/ng_js_att_tpls/typeAhead/typeAhead.html","app/scripts/ng_js_att_tpls/verticalSteptracker/vertical-step-tracker.html","app/scripts/ng_js_att_tpls/videoControls/photoControls.html","app/scripts/ng_js_att_tpls/videoControls/videoControls.html"]),angular.module("att.abs.utilities",[]).filter("unsafe",["$sce",function(a){return function(b){return a.trustAsHtml(b)}}]).filter("highlight",function(){function a(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(b,c,d){return c&&b?b.replace(new RegExp(a(c),"gi"),'<span class="'+d+'">$&</span>'):b}}).filter("attLimitTo",function(){return function(a,b,c){var d=[],e=b,f=c;return isNaN(f)&&(f=0),d=a&&!isNaN(e)?a.slice(f,f+e):a}}).filter("startsWith",function(){return"function"!=typeof String.prototype.startsWith&&(String.prototype.startsWith=function(a){return 0===this.indexOf(a)}),function(a,b){if(void 0===b||""===b)return a;var c=[];return angular.forEach(a,function(a){a.title.toLowerCase().startsWith(b.toLowerCase())&&c.push(a)}),c}}).directive("attInputDeny",[function(){return{restrict:"A",require:"ngModel",link:function(a,b,c,d){var e=null;c.$observe("attInputDeny",function(a){a&&(e=new RegExp(a,"g"))}),b.bind("input",function(){var b=d.$viewValue&&d.$viewValue.replace(e,"");b!==d.$viewValue&&(d.$setViewValue(b),d.$render(),a.$apply())})}}}]).directive("attAccessibilityClick",[function(){return{restrict:"A",link:function(a,b,c){var d=[];c.$observe("attAccessibilityClick",function(a){a&&(d=a.split(","))}),b.bind("keydown",function(a){var c=function(){var b=!1;return a.keyCode||(a.which?a.keyCode=a.which:a.charCode&&(a.keyCode=a.charCode)),a.keyCode&&d.indexOf(a.keyCode.toString())>-1&&(b=!0),b};d.length>0&&c()&&(b[0].click(),a.preventDefault())})}}}]).directive("attElementFocus",[function(){return{restrict:"A",link:function(a,b,c){a.$watch(c.attElementFocus,function(a){a&&b[0].focus()})}}}]).directive("focusOn",["$timeout",function(a){var b=function(a){if(!a.focusOn&&""!==a.focusOn)throw"FocusOnCondition missing attribute to evaluate"};return{restrict:"A",link:function(c,d,e){b(e),c.$watch(e.focusOn,function(b){b&&a(function(){d[0].focus()})})}}}]).constant("whenScrollEndsConstants",{threshold:100,width:0,height:0}).directive("whenScrollEnds",function(a,b){return{restrict:"A",link:function(c,d,e){var f=parseInt(e.threshold,10)||a.threshold;return e.axis&&""!==e.axis?void("x"===e.axis?(visibleWidth=parseInt(e.width,10)||a.width,d.css("width")&&(visibleWidth=d.css("width").split("px")[0]),d[0].addEventListener("scroll",function(){var a=d.prop("scrollWidth");void 0===a&&(a=1);var b=a-visibleWidth;b-d[0].scrollLeft<=f&&c.$apply(e.whenScrollEnds)})):"y"===e.axis&&(visibleHeight=parseInt(e.height,10)||a.height,d.css("width")&&(visibleHeight=d.css("height").split("px")[0]),d[0].addEventListener("scroll",function(){var a=d.prop("scrollHeight");void 0===a&&(a=1);var b=a-visibleHeight;b-d[0].scrollTop<=f&&c.$apply(e.whenScrollEnds)}))):void b.warn("axis attribute must be defined for whenScrollEnds.")}}}).directive("validImei",function(){return{restrict:"A",require:"ngModel",link:function(a,b,c,d){d.$parsers.unshift(function(b){if(b){if(a.valid=!1,isNaN(b)||15!==b.length)a.valid=!1;else{for(var c=0,e=[],f=0;15>f;f++)e[f]=parseInt(b.substring(f,f+1),10),f%2!==0&&(e[f]=parseInt(2*e[f],10)),e[f]>9&&(e[f]=parseInt(e[f]%10,10)+parseInt(e[f]/10,10)),c+=parseInt(e[f],10);c%10===0?a.valid=!0:a.valid=!1}d.$setValidity("invalidImei",a.valid)}return a.valid?b:void 0})}}}).directive("togglePassword",function(){return{restrict:"A",transclude:!1,link:function(a,b,c,d){b.bind("click",function(){var a=c.togglePassword;b[0].innerHTML="Show"===b[0].innerHTML?"Hide":"Show";var d=angular.element(document.querySelector("#"+a))[0].type;angular.element(document.querySelector("#"+a))[0].type="password"===d?"text":"password"})}}}).factory("events",function(){var a=function(a){a.stopPropagation?a.stopPropagation():a.returnValue=!1},b=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1};return{stopPropagation:a,preventDefault:b}}).factory("$documentBind",["$document","$timeout",function(a,b){var c=function(c,d,e){e.$watch(c,function(c){b(function(){c?a.bind("click",d):a.unbind("click",d)})})},d=function(c,d,e,f,g,h){g?(h||(h=0),f.$watch(d,function(d,f){d!==f&&b(function(){d?a.bind(c,e):a.unbind(c,e)},h)})):f.$watch(d,function(b,d){b!==d&&(b?a.bind(c,e):a.unbind(c,e))})};return{click:c,event:d}}]).factory("DOMHelper",function(){function a(a){var b=angular.element(a),c=parseInt(b.attr("tabindex"),10)>=0?!0:!1,d=b[0].tagName.toUpperCase();return c||"A"===d||"INPUT"===d||"TEXTAREA"===d?!(b[0].disabled||b[0].readOnly):!1}function b(a){return 1==a.nodeType&&"SCRIPT"!=a.nodeName&&"STYLE"!=a.nodeName}function c(d){var d=d||document.getElementsByTagName("body")[0];if(b(d)&&a(d))return d;if(!d.hasChildNodes())return void 0;for(var e=d.firstChild;e;){var f=c(e);if(f)return f;e=e.nextSibling}}var d=function(a){var b=a;return a.hasOwnProperty("length")&&(b=a[0]),c(b)};return{firstTabableElement:d}}).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(a){var b=a.keyCode;switch(b){case this.KEY.COMMAND:case this.KEY.SHIFT:case this.KEY.CTRL:case this.KEY.ALT:return!0}return a.metaKey?!0:!1},isFunctionKey:function(a){return a=a.keyCode?a.keyCode:a,a>=112&&123>=a},isVerticalMovement:function(a){return~[this.KEY.UP,this.KEY.DOWN].indexOf(a)},isHorizontalMovement:function(a){return~[this.KEY.LEFT,this.KEY.RIGHT,this.KEY.BACKSPACE,this.KEY.DELETE].indexOf(a)},isAllowedKey:function(a){return~[this.KEY.SPACE,this.KEY.ESC,this.KEY.ENTER].indexOf(a)||this.isHorizontalMovement(a)||this.isVerticalMovement(a)}}}).factory("keyMapAc",function(){return{keys:{32:" ",33:"!",34:'"',35:"#",36:"$",37:"%",38:"&",39:"'",40:"(",41:")",42:"*",43:"+",44:",",45:"-",46:".",47:"/",58:":",59:";",60:"<",61:"=",62:">",63:"?",64:"@",91:"[",92:"\\",93:"]",94:"^",95:"_",96:"`",123:"{",124:"|",125:"}",126:"~"},keyRange:{startNum:"48",endNum:"57",startSmallLetters:"97",endSmallLetters:"122",startCapitalLetters:"65",endCapitalLetters:"90"},allowedKeys:{TAB:8,BACKSPACE:9,DELETE:16}}}).factory("$attElementDetach",function(){var a=function(a){a&&a.parentNode&&a.parentNode.removeChild(a)};return a}).factory("$ieVersion",function(){var ie=null,loadIEVersion=function(){var isIE10=eval("/*@cc_on!@*/false")&&10===document.documentMode;if(isIE10)return 10;var v=3,div=document.createElement("div"),all=div.getElementsByTagName("i");do div.innerHTML="<!--[if gt IE "+ ++v+"]><i></i><![endif]-->";while(all[0]);return v>4?v:void 0};return function(){return null===ie&&(ie=loadIEVersion()),ie}}),function(){String.prototype.toSnakeCase=function(){return this.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})};var a=function(a,b){a=a||"",b=!isNaN(b)&&b||0;for(var c="",d=0;b>d;d++)c+=a;return c},b=function(b,c,d,e){return b=b||"",c=!isNaN(c)&&c||0,d=d||"",c>b.length?e?a(d,c-b.length)+b:b+a(d,c-b.length):b};String.prototype.lPad=function(a,c){return b(this,a,c,!0)},String.prototype.rPad=function(a,c){return b(this,a,c,!1)},Array.prototype.indexOf||(Array.prototype.indexOf=function(a){for(var b=0;b<this.length;b++)if(this[b]===a)return b;return-1})}(),angular.module("att.abs.position",[]).factory("$position",["$document","$window",function(a,b){function c(a,c){return a.currentStyle?a.currentStyle[c]:b.getComputedStyle?b.getComputedStyle(a)[c]:a.style[c]}function d(a){return"static"===(c(a,"position")||"static")}var e=function(b){for(var c=a[0],e=b.offsetParent||c;e&&e!==c&&d(e);)e=e.offsetParent;return e||c};return{position:function(b){var c=this.offset(b),d={top:0,left:0},f=e(b[0]);return f!==a[0]&&(d=this.offset(angular.element(f)),d.top+=f.clientTop-f.scrollTop,d.left+=f.clientLeft-f.scrollLeft),{width:b.prop("offsetWidth"),height:b.prop("offsetHeight"),top:c.top-d.top,left:c.left-d.left}},offset:function(c){var d=c[0].getBoundingClientRect();return{width:c.prop("offsetWidth"),height:c.prop("offsetHeight"),top:d.top+(b.pageYOffset||a[0].body.scrollTop||a[0].documentElement.scrollTop),left:d.left+(b.pageXOffset||a[0].body.scrollLeft||a[0].documentElement.scrollLeft)}}}}]).factory("$isElement",[function(){var a=function(b,c,d){return b[0]===c[0]?!0:b[0]===d[0]?!1:a(b.parent()[0]&&b.parent()||c,c,d)};return a}]).directive("attPosition",["$position",function(a){return{restrict:"A",link:function(b,c,d){b.$watchCollection(function(){return a.position(c)},function(a){b[d.attPosition]=a})}}}]),(window._gsQueue||(window._gsQueue=[])).push(function(){"use strict";var a=document.documentElement,b=window,c=function(c,d){var e="x"===d?"Width":"Height",f="scroll"+e,g="client"+e,h=document.body;return c===b||c===a||c===h?Math.max(a[f],h[f])-(b["inner"+e]||Math.max(a[g],h[g])):c[f]-c["offset"+e]},d=window._gsDefine.plugin({propName:"scrollTo",API:2,version:"1.7.3",init:function(a,d,e){return this._wdw=a===b,this._target=a,this._tween=e,"object"!=typeof d&&(d={y:d}),this._autoKill=d.autoKill!==!1,this.x=this.xPrev=this.getX(),this.y=this.yPrev=this.getY(),null!=d.x?(this._addTween(this,"x",this.x,"max"===d.x?c(a,"x"):d.x,"scrollTo_x",!0),this._overwriteProps.push("scrollTo_x")):this.skipX=!0,null!=d.y?(this._addTween(this,"y",this.y,"max"===d.y?c(a,"y"):d.y,"scrollTo_y",!0),this._overwriteProps.push("scrollTo_y")):this.skipY=!0,!0},set:function(a){this._super.setRatio.call(this,a);var d=this._wdw||!this.skipX?this.getX():this.xPrev,e=this._wdw||!this.skipY?this.getY():this.yPrev,f=e-this.yPrev,g=d-this.xPrev;this._autoKill&&(!this.skipX&&(g>7||-7>g)&&d<c(this._target,"x")&&(this.skipX=!0),!this.skipY&&(f>7||-7>f)&&e<c(this._target,"y")&&(this.skipY=!0),this.skipX&&this.skipY&&this._tween.kill()),this._wdw?b.scrollTo(this.skipX?d:this.x,this.skipY?e:this.y):(this.skipY||(this._target.scrollTop=this.y),this.skipX||(this._target.scrollLeft=this.x)),this.xPrev=this.x,this.yPrev=this.y}}),e=d.prototype;d.max=c,e.getX=function(){return this._wdw?null!=b.pageXOffset?b.pageXOffset:null!=a.scrollLeft?a.scrollLeft:document.body.scrollLeft:this._target.scrollLeft},e.getY=function(){return this._wdw?null!=b.pageYOffset?b.pageYOffset:null!=a.scrollTop?a.scrollTop:document.body.scrollTop:this._target.scrollTop},e._kill=function(a){return a.scrollTo_x&&(this.skipX=!0),a.scrollTo_y&&(this.skipY=!0),this._super._kill.call(this,a)}}),window._gsDefine&&window._gsQueue.pop()(),(window._gsQueue||(window._gsQueue=[])).push(function(){"use strict";window._gsDefine("TweenMax",["core.Animation","core.SimpleTimeline","TweenLite"],function(a,b,c){var d=[].slice,e=function(a,b,d){c.call(this,a,b,d),this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._dirty=!0,this.render=e.prototype.render},f=1e-10,g=c._internals,h=g.isSelector,i=g.isArray,j=e.prototype=c.to({},.1,{}),k=[];e.version="1.12.1",j.constructor=e,j.kill()._gc=!1,e.killTweensOf=e.killDelayedCallsTo=c.killTweensOf,e.getTweensOf=c.getTweensOf,e.lagSmoothing=c.lagSmoothing,e.ticker=c.ticker,e.render=c.render,j.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),c.prototype.invalidate.call(this)},j.updateTo=function(a,b){var d,e=this.ratio;b&&this._startTime<this._timeline._time&&(this._startTime=this._timeline._time,this._uncache(!1),this._gc?this._enabled(!0,!1):this._timeline.insert(this,this._startTime-this._delay));for(d in a)this.vars[d]=a[d];if(this._initted)if(b)this._initted=!1;else if(this._gc&&this._enabled(!0,!1),this._notifyPluginsOfEnabled&&this._firstPT&&c._onPluginEvent("_onDisable",this),this._time/this._duration>.998){var f=this._time;this.render(0,!0,!1),this._initted=!1,this.render(f,!0,!1)}else if(this._time>0){this._initted=!1,this._init();for(var g,h=1/(1-e),i=this._firstPT;i;)g=i.s+i.c,i.c*=h,i.s=g-i.c,i=i._next}return this},j.render=function(a,b,c){this._initted||0===this._duration&&this.vars.repeat&&this.invalidate();var d,e,h,i,j,l,m,n,o=this._dirty?this.totalDuration():this._totalDuration,p=this._time,q=this._totalTime,r=this._cycle,s=this._duration,t=this._rawPrevTime;if(a>=o?(this._totalTime=o,this._cycle=this._repeat,this._yoyo&&0!==(1&this._cycle)?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=s,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(d=!0,e="onComplete"),0===s&&(this._initted||!this.vars.lazy||c)&&(this._startTime===this._timeline._duration&&(a=0),(0===a||0>t||t===f)&&t!==a&&(c=!0,t>f&&(e="onReverseComplete")),this._rawPrevTime=n=!b||a||t===a?a:f)):1e-7>a?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==q||0===s&&t>0&&t!==f)&&(e="onReverseComplete",d=this._reversed),0>a?(this._active=!1,0===s&&(this._initted||!this.vars.lazy||c)&&(t>=0&&(c=!0),this._rawPrevTime=n=!b||a||t===a?a:f)):this._initted||(c=!0)):(this._totalTime=this._time=a,0!==this._repeat&&(i=s+this._repeatDelay,this._cycle=this._totalTime/i>>0,0!==this._cycle&&this._cycle===this._totalTime/i&&this._cycle--,this._time=this._totalTime-this._cycle*i,this._yoyo&&0!==(1&this._cycle)&&(this._time=s-this._time),this._time>s?this._time=s:this._time<0&&(this._time=0)),this._easeType?(j=this._time/s,l=this._easeType,m=this._easePower,(1===l||3===l&&j>=.5)&&(j=1-j),3===l&&(j*=2),1===m?j*=j:2===m?j*=j*j:3===m?j*=j*j*j:4===m&&(j*=j*j*j*j),1===l?this.ratio=1-j:2===l?this.ratio=j:this._time/s<.5?this.ratio=j/2:this.ratio=1-j/2):this.ratio=this._ease.getRatio(this._time/s)),p===this._time&&!c&&r===this._cycle)return void(q!==this._totalTime&&this._onUpdate&&(b||this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||k)));if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!c&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=p,this._totalTime=q,this._rawPrevTime=t,this._cycle=r,g.lazyTweens.push(this),void(this._lazy=a);this._time&&!d?this.ratio=this._ease.getRatio(this._time/s):d&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==p&&a>=0&&(this._active=!0),0===q&&(2===this._initted&&a>0&&this._init(),this._startAt&&(a>=0?this._startAt.render(a,b,c):e||(e="_dummyGS")),this.vars.onStart&&(0!==this._totalTime||0===s)&&(b||this.vars.onStart.apply(this.vars.onStartScope||this,this.vars.onStartParams||k))),h=this._firstPT;h;)h.f?h.t[h.p](h.c*this.ratio+h.s):h.t[h.p]=h.c*this.ratio+h.s,h=h._next;this._onUpdate&&(0>a&&this._startAt&&this._startTime&&this._startAt.render(a,b,c),b||(this._totalTime!==q||d)&&this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||k)),this._cycle!==r&&(b||this._gc||this.vars.onRepeat&&this.vars.onRepeat.apply(this.vars.onRepeatScope||this,this.vars.onRepeatParams||k)),e&&(this._gc||(0>a&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(a,b,c),d&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[e]&&this.vars[e].apply(this.vars[e+"Scope"]||this,this.vars[e+"Params"]||k),0===s&&this._rawPrevTime===f&&n!==f&&(this._rawPrevTime=0)))},e.to=function(a,b,c){return new e(a,b,c)},e.from=function(a,b,c){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,new e(a,b,c)},e.fromTo=function(a,b,c,d){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,new e(a,b,d)},e.staggerTo=e.allTo=function(a,b,f,g,j,l,m){g=g||0;var n,o,p,q,r=f.delay||0,s=[],t=function(){f.onComplete&&f.onComplete.apply(f.onCompleteScope||this,arguments),j.apply(m||this,l||k)};for(i(a)||("string"==typeof a&&(a=c.selector(a)||a),h(a)&&(a=d.call(a,0))),n=a.length,p=0;n>p;p++){o={};for(q in f)o[q]=f[q];o.delay=r,p===n-1&&j&&(o.onComplete=t),s[p]=new e(a[p],b,o),r+=g}return s},e.staggerFrom=e.allFrom=function(a,b,c,d,f,g,h){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,e.staggerTo(a,b,c,d,f,g,h)},e.staggerFromTo=e.allFromTo=function(a,b,c,d,f,g,h,i){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,e.staggerTo(a,b,d,f,g,h,i)},e.delayedCall=function(a,b,c,d,f){return new e(b,0,{delay:a,onComplete:b,onCompleteParams:c,onCompleteScope:d,onReverseComplete:b,onReverseCompleteParams:c,onReverseCompleteScope:d,immediateRender:!1,useFrames:f,overwrite:0})},e.set=function(a,b){return new e(a,0,b)},e.isTweening=function(a){return c.getTweensOf(a,!0).length>0};var l=function(a,b){for(var d=[],e=0,f=a._first;f;)f instanceof c?d[e++]=f:(b&&(d[e++]=f),d=d.concat(l(f,b)),e=d.length),f=f._next;return d},m=e.getAllTweens=function(b){return l(a._rootTimeline,b).concat(l(a._rootFramesTimeline,b))};e.killAll=function(a,c,d,e){null==c&&(c=!0),null==d&&(d=!0);var f,g,h,i=m(0!=e),j=i.length,k=c&&d&&e;for(h=0;j>h;h++)g=i[h],(k||g instanceof b||(f=g.target===g.vars.onComplete)&&d||c&&!f)&&(a?g.totalTime(g._reversed?0:g.totalDuration()):g._enabled(!1,!1))},e.killChildTweensOf=function(a,b){if(null!=a){var f,j,k,l,m,n=g.tweenLookup;if("string"==typeof a&&(a=c.selector(a)||a),h(a)&&(a=d.call(a,0)),i(a))for(l=a.length;--l>-1;)e.killChildTweensOf(a[l],b);else{f=[];for(k in n)for(j=n[k].target.parentNode;j;)j===a&&(f=f.concat(n[k].tweens)),j=j.parentNode;for(m=f.length,l=0;m>l;l++)b&&f[l].totalTime(f[l].totalDuration()),f[l]._enabled(!1,!1)}}};var n=function(a,c,d,e){c=c!==!1,d=d!==!1,e=e!==!1;for(var f,g,h=m(e),i=c&&d&&e,j=h.length;--j>-1;)g=h[j],(i||g instanceof b||(f=g.target===g.vars.onComplete)&&d||c&&!f)&&g.paused(a)};return e.pauseAll=function(a,b,c){n(!0,a,b,c)},e.resumeAll=function(a,b,c){n(!1,a,b,c)},e.globalTimeScale=function(b){var d=a._rootTimeline,e=c.ticker.time;return arguments.length?(b=b||f,d._startTime=e-(e-d._startTime)*d._timeScale/b,d=a._rootFramesTimeline,e=c.ticker.frame,d._startTime=e-(e-d._startTime)*d._timeScale/b,d._timeScale=a._rootTimeline._timeScale=b,b):d._timeScale},j.progress=function(a){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!==(1&this._cycle)?1-a:a)+this._cycle*(this._duration+this._repeatDelay),!1):this._time/this.duration()},j.totalProgress=function(a){return arguments.length?this.totalTime(this.totalDuration()*a,!1):this._totalTime/this.totalDuration()},j.time=function(a,b){return arguments.length?(this._dirty&&this.totalDuration(),a>this._duration&&(a=this._duration),this._yoyo&&0!==(1&this._cycle)?a=this._duration-a+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(a+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(a,b)):this._time},j.duration=function(b){return arguments.length?a.prototype.duration.call(this,b):this._duration},j.totalDuration=function(a){return arguments.length?-1===this._repeat?this:this.duration((a-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat,this._dirty=!1),this._totalDuration)},j.repeat=function(a){return arguments.length?(this._repeat=a,this._uncache(!0)):this._repeat},j.repeatDelay=function(a){return arguments.length?(this._repeatDelay=a,this._uncache(!0)):this._repeatDelay},j.yoyo=function(a){return arguments.length?(this._yoyo=a,this):this._yoyo},e},!0),window._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(a,b,c){var d=function(a){b.call(this,a),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var c,d,e=this.vars;for(d in e)c=e[d],g(c)&&-1!==c.join("").indexOf("{self}")&&(e[d]=this._swapSelfInParams(c));g(e.tweens)&&this.add(e.tweens,0,e.align,e.stagger)},e=1e-10,f=c._internals.isSelector,g=c._internals.isArray,h=[],i=window._gsDefine.globals,j=function(a){var b,c={};for(b in a)c[b]=a[b];return c},k=function(a,b,c,d){a._timeline.pause(a._startTime),b&&b.apply(d||a._timeline,c||h)},l=h.slice,m=d.prototype=new b;return d.version="1.12.1",m.constructor=d,m.kill()._gc=!1,m.to=function(a,b,d,e){var f=d.repeat&&i.TweenMax||c;return b?this.add(new f(a,b,d),e):this.set(a,d,e)},m.from=function(a,b,d,e){return this.add((d.repeat&&i.TweenMax||c).from(a,b,d),e)},m.fromTo=function(a,b,d,e,f){var g=e.repeat&&i.TweenMax||c;return b?this.add(g.fromTo(a,b,d,e),f):this.set(a,e,f)},m.staggerTo=function(a,b,e,g,h,i,k,m){var n,o=new d({onComplete:i,onCompleteParams:k,onCompleteScope:m,smoothChildTiming:this.smoothChildTiming});for("string"==typeof a&&(a=c.selector(a)||a),f(a)&&(a=l.call(a,0)),g=g||0,n=0;n<a.length;n++)e.startAt&&(e.startAt=j(e.startAt)),o.to(a[n],b,j(e),n*g);return this.add(o,h)},m.staggerFrom=function(a,b,c,d,e,f,g,h){return c.immediateRender=0!=c.immediateRender,c.runBackwards=!0,this.staggerTo(a,b,c,d,e,f,g,h)},m.staggerFromTo=function(a,b,c,d,e,f,g,h,i){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,this.staggerTo(a,b,d,e,f,g,h,i)},m.call=function(a,b,d,e){return this.add(c.delayedCall(0,a,b,d),e)},m.set=function(a,b,d){return d=this._parseTimeOrLabel(d,0,!0),null==b.immediateRender&&(b.immediateRender=d===this._time&&!this._paused),this.add(new c(a,0,b),d)},d.exportRoot=function(a,b){a=a||{},null==a.smoothChildTiming&&(a.smoothChildTiming=!0);var e,f,g=new d(a),h=g._timeline;for(null==b&&(b=!0),h._remove(g,!0),g._startTime=0,g._rawPrevTime=g._time=g._totalTime=h._time,e=h._first;e;)f=e._next,b&&e instanceof c&&e.target===e.vars.onComplete||g.add(e,e._startTime-e._delay),e=f;return h.add(g,0),g},m.add=function(e,f,h,i){var j,k,l,m,n,o;if("number"!=typeof f&&(f=this._parseTimeOrLabel(f,0,!0,e)),!(e instanceof a)){if(e instanceof Array||e&&e.push&&g(e)){for(h=h||"normal",i=i||0,j=f,k=e.length,l=0;k>l;l++)g(m=e[l])&&(m=new d({tweens:m})),this.add(m,j),"string"!=typeof m&&"function"!=typeof m&&("sequence"===h?j=m._startTime+m.totalDuration()/m._timeScale:"start"===h&&(m._startTime-=m.delay())),j+=i;return this._uncache(!0)}if("string"==typeof e)return this.addLabel(e,f);if("function"!=typeof e)throw"Cannot add "+e+" into the timeline; it is not a tween, timeline, function, or string.";e=c.delayedCall(0,e)}if(b.prototype.add.call(this,e,f),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(n=this,o=n.rawTime()>e._startTime;n._timeline;)o&&n._timeline.smoothChildTiming?n.totalTime(n._totalTime,!0):n._gc&&n._enabled(!0,!1),n=n._timeline;return this},m.remove=function(b){if(b instanceof a)return this._remove(b,!1);if(b instanceof Array||b&&b.push&&g(b)){for(var c=b.length;--c>-1;)this.remove(b[c]);return this}return"string"==typeof b?this.removeLabel(b):this.kill(null,b)},m._remove=function(a,c){b.prototype._remove.call(this,a,c);var d=this._last;return d?this._time>d._startTime+d._totalDuration/d._timeScale&&(this._time=this.duration(),this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},m.append=function(a,b){return this.add(a,this._parseTimeOrLabel(null,b,!0,a))},m.insert=m.insertMultiple=function(a,b,c,d){return this.add(a,b||0,c,d)},m.appendMultiple=function(a,b,c,d){return this.add(a,this._parseTimeOrLabel(null,b,!0,a),c,d)},m.addLabel=function(a,b){return this._labels[a]=this._parseTimeOrLabel(b),this},m.addPause=function(a,b,c,d){return this.call(k,["{self}",b,c,d],this,a)},m.removeLabel=function(a){return delete this._labels[a],this},m.getLabelTime=function(a){return null!=this._labels[a]?this._labels[a]:-1},m._parseTimeOrLabel=function(b,c,d,e){var f;if(e instanceof a&&e.timeline===this)this.remove(e);else if(e&&(e instanceof Array||e.push&&g(e)))for(f=e.length;--f>-1;)e[f]instanceof a&&e[f].timeline===this&&this.remove(e[f]);if("string"==typeof c)return this._parseTimeOrLabel(c,d&&"number"==typeof b&&null==this._labels[c]?b-this.duration():0,d);if(c=c||0,"string"!=typeof b||!isNaN(b)&&null==this._labels[b])null==b&&(b=this.duration());else{if(f=b.indexOf("="),-1===f)return null==this._labels[b]?d?this._labels[b]=this.duration()+c:c:this._labels[b]+c;c=parseInt(b.charAt(f-1)+"1",10)*Number(b.substr(f+1)),b=f>1?this._parseTimeOrLabel(b.substr(0,f-1),0,d):this.duration()}return Number(b)+c},m.seek=function(a,b){return this.totalTime("number"==typeof a?a:this._parseTimeOrLabel(a),b!==!1)},m.stop=function(){return this.paused(!0)},m.gotoAndPlay=function(a,b){return this.play(a,b)},m.gotoAndStop=function(a,b){return this.pause(a,b)},m.render=function(a,b,c){this._gc&&this._enabled(!0,!1);var d,f,g,i,j,k=this._dirty?this.totalDuration():this._totalDuration,l=this._time,m=this._startTime,n=this._timeScale,o=this._paused;if(a>=k?(this._totalTime=this._time=k,this._reversed||this._hasPausedChild()||(f=!0,i="onComplete",0===this._duration&&(0===a||this._rawPrevTime<0||this._rawPrevTime===e)&&this._rawPrevTime!==a&&this._first&&(j=!0,this._rawPrevTime>e&&(i="onReverseComplete"))),this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,a=k+1e-4):1e-7>a?(this._totalTime=this._time=0,(0!==l||0===this._duration&&this._rawPrevTime!==e&&(this._rawPrevTime>0||0>a&&this._rawPrevTime>=0))&&(i="onReverseComplete",f=this._reversed),0>a?(this._active=!1,0===this._duration&&this._rawPrevTime>=0&&this._first&&(j=!0),this._rawPrevTime=a):(this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,a=0,this._initted||(j=!0))):this._totalTime=this._time=this._rawPrevTime=a,this._time!==l&&this._first||c||j){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==l&&a>0&&(this._active=!0),0===l&&this.vars.onStart&&0!==this._time&&(b||this.vars.onStart.apply(this.vars.onStartScope||this,this.vars.onStartParams||h)),this._time>=l)for(d=this._first;d&&(g=d._next,!this._paused||o);)(d._active||d._startTime<=this._time&&!d._paused&&!d._gc)&&(d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)),d=g;else for(d=this._last;d&&(g=d._prev,!this._paused||o);)(d._active||d._startTime<=l&&!d._paused&&!d._gc)&&(d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)),
-d=g;this._onUpdate&&(b||this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||h)),i&&(this._gc||(m===this._startTime||n!==this._timeScale)&&(0===this._time||k>=this.totalDuration())&&(f&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[i]&&this.vars[i].apply(this.vars[i+"Scope"]||this,this.vars[i+"Params"]||h)))}},m._hasPausedChild=function(){for(var a=this._first;a;){if(a._paused||a instanceof d&&a._hasPausedChild())return!0;a=a._next}return!1},m.getChildren=function(a,b,d,e){e=e||-9999999999;for(var f=[],g=this._first,h=0;g;)g._startTime<e||(g instanceof c?b!==!1&&(f[h++]=g):(d!==!1&&(f[h++]=g),a!==!1&&(f=f.concat(g.getChildren(!0,b,d)),h=f.length))),g=g._next;return f},m.getTweensOf=function(a,b){var d,e,f=this._gc,g=[],h=0;for(f&&this._enabled(!0,!0),d=c.getTweensOf(a),e=d.length;--e>-1;)(d[e].timeline===this||b&&this._contains(d[e]))&&(g[h++]=d[e]);return f&&this._enabled(!1,!0),g},m._contains=function(a){for(var b=a.timeline;b;){if(b===this)return!0;b=b.timeline}return!1},m.shiftChildren=function(a,b,c){c=c||0;for(var d,e=this._first,f=this._labels;e;)e._startTime>=c&&(e._startTime+=a),e=e._next;if(b)for(d in f)f[d]>=c&&(f[d]+=a);return this._uncache(!0)},m._kill=function(a,b){if(!a&&!b)return this._enabled(!1,!1);for(var c=b?this.getTweensOf(b):this.getChildren(!0,!0,!1),d=c.length,e=!1;--d>-1;)c[d]._kill(a,b)&&(e=!0);return e},m.clear=function(a){var b=this.getChildren(!1,!0,!0),c=b.length;for(this._time=this._totalTime=0;--c>-1;)b[c]._enabled(!1,!1);return a!==!1&&(this._labels={}),this._uncache(!0)},m.invalidate=function(){for(var a=this._first;a;)a.invalidate(),a=a._next;return this},m._enabled=function(a,c){if(a===this._gc)for(var d=this._first;d;)d._enabled(a,!0),d=d._next;return b.prototype._enabled.call(this,a,c)},m.duration=function(a){return arguments.length?(0!==this.duration()&&0!==a&&this.timeScale(this._duration/a),this):(this._dirty&&this.totalDuration(),this._duration)},m.totalDuration=function(a){if(!arguments.length){if(this._dirty){for(var b,c,d=0,e=this._last,f=999999999999;e;)b=e._prev,e._dirty&&e.totalDuration(),e._startTime>f&&this._sortChildren&&!e._paused?this.add(e,e._startTime-e._delay):f=e._startTime,e._startTime<0&&!e._paused&&(d-=e._startTime,this._timeline.smoothChildTiming&&(this._startTime+=e._startTime/this._timeScale),this.shiftChildren(-e._startTime,!1,-9999999999),f=0),c=e._startTime+e._totalDuration/e._timeScale,c>d&&(d=c),e=b;this._duration=this._totalDuration=d,this._dirty=!1}return this._totalDuration}return 0!==this.totalDuration()&&0!==a&&this.timeScale(this._totalDuration/a),this},m.usesFrames=function(){for(var b=this._timeline;b._timeline;)b=b._timeline;return b===a._rootFramesTimeline},m.rawTime=function(){return this._paused?this._totalTime:(this._timeline.rawTime()-this._startTime)*this._timeScale},d},!0),window._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(a,b,c){var d=function(b){a.call(this,b),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._dirty=!0},e=1e-10,f=[],g=new c(null,null,1,0),h=d.prototype=new a;return h.constructor=d,h.kill()._gc=!1,d.version="1.12.1",h.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),a.prototype.invalidate.call(this)},h.addCallback=function(a,c,d,e){return this.add(b.delayedCall(0,a,d,e),c)},h.removeCallback=function(a,b){if(a)if(null==b)this._kill(null,a);else for(var c=this.getTweensOf(a,!1),d=c.length,e=this._parseTimeOrLabel(b);--d>-1;)c[d]._startTime===e&&c[d]._enabled(!1,!1);return this},h.tweenTo=function(a,c){c=c||{};var d,e,h,i={ease:g,overwrite:c.delay?2:1,useFrames:this.usesFrames(),immediateRender:!1};for(e in c)i[e]=c[e];return i.time=this._parseTimeOrLabel(a),d=Math.abs(Number(i.time)-this._time)/this._timeScale||.001,h=new b(this,d,i),i.onStart=function(){h.target.paused(!0),h.vars.time!==h.target.time()&&d===h.duration()&&h.duration(Math.abs(h.vars.time-h.target.time())/h.target._timeScale),c.onStart&&c.onStart.apply(c.onStartScope||h,c.onStartParams||f)},h},h.tweenFromTo=function(a,b,c){c=c||{},a=this._parseTimeOrLabel(a),c.startAt={onComplete:this.seek,onCompleteParams:[a],onCompleteScope:this},c.immediateRender=c.immediateRender!==!1;var d=this.tweenTo(b,c);return d.duration(Math.abs(d.vars.time-a)/this._timeScale||.001)},h.render=function(a,b,c){this._gc&&this._enabled(!0,!1);var d,g,h,i,j,k,l=this._dirty?this.totalDuration():this._totalDuration,m=this._duration,n=this._time,o=this._totalTime,p=this._startTime,q=this._timeScale,r=this._rawPrevTime,s=this._paused,t=this._cycle;if(a>=l?(this._locked||(this._totalTime=l,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(g=!0,i="onComplete",0===this._duration&&(0===a||0>r||r===e)&&r!==a&&this._first&&(j=!0,r>e&&(i="onReverseComplete"))),this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,this._yoyo&&0!==(1&this._cycle)?this._time=a=0:(this._time=m,a=m+1e-4)):1e-7>a?(this._locked||(this._totalTime=this._cycle=0),this._time=0,(0!==n||0===m&&r!==e&&(r>0||0>a&&r>=0)&&!this._locked)&&(i="onReverseComplete",g=this._reversed),0>a?(this._active=!1,0===m&&r>=0&&this._first&&(j=!0),this._rawPrevTime=a):(this._rawPrevTime=m||!b||a||this._rawPrevTime===a?a:e,a=0,this._initted||(j=!0))):(0===m&&0>r&&(j=!0),this._time=this._rawPrevTime=a,this._locked||(this._totalTime=a,0!==this._repeat&&(k=m+this._repeatDelay,this._cycle=this._totalTime/k>>0,0!==this._cycle&&this._cycle===this._totalTime/k&&this._cycle--,this._time=this._totalTime-this._cycle*k,this._yoyo&&0!==(1&this._cycle)&&(this._time=m-this._time),this._time>m?(this._time=m,a=m+1e-4):this._time<0?this._time=a=0:a=this._time))),this._cycle!==t&&!this._locked){var u=this._yoyo&&0!==(1&t),v=u===(this._yoyo&&0!==(1&this._cycle)),w=this._totalTime,x=this._cycle,y=this._rawPrevTime,z=this._time;if(this._totalTime=t*m,this._cycle<t?u=!u:this._totalTime+=m,this._time=n,this._rawPrevTime=0===m?r-1e-4:r,this._cycle=t,this._locked=!0,n=u?0:m,this.render(n,b,0===m),b||this._gc||this.vars.onRepeat&&this.vars.onRepeat.apply(this.vars.onRepeatScope||this,this.vars.onRepeatParams||f),v&&(n=u?m+1e-4:-1e-4,this.render(n,!0,!1)),this._locked=!1,this._paused&&!s)return;this._time=z,this._totalTime=w,this._cycle=x,this._rawPrevTime=y}if(!(this._time!==n&&this._first||c||j))return void(o!==this._totalTime&&this._onUpdate&&(b||this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||f)));if(this._initted||(this._initted=!0),this._active||!this._paused&&this._totalTime!==o&&a>0&&(this._active=!0),0===o&&this.vars.onStart&&0!==this._totalTime&&(b||this.vars.onStart.apply(this.vars.onStartScope||this,this.vars.onStartParams||f)),this._time>=n)for(d=this._first;d&&(h=d._next,!this._paused||s);)(d._active||d._startTime<=this._time&&!d._paused&&!d._gc)&&(d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)),d=h;else for(d=this._last;d&&(h=d._prev,!this._paused||s);)(d._active||d._startTime<=n&&!d._paused&&!d._gc)&&(d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)),d=h;this._onUpdate&&(b||this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||f)),i&&(this._locked||this._gc||(p===this._startTime||q!==this._timeScale)&&(0===this._time||l>=this.totalDuration())&&(g&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[i]&&this.vars[i].apply(this.vars[i+"Scope"]||this,this.vars[i+"Params"]||f)))},h.getActive=function(a,b,c){null==a&&(a=!0),null==b&&(b=!0),null==c&&(c=!1);var d,e,f=[],g=this.getChildren(a,b,c),h=0,i=g.length;for(d=0;i>d;d++)e=g[d],e.isActive()&&(f[h++]=e);return f},h.getLabelAfter=function(a){a||0!==a&&(a=this._time);var b,c=this.getLabelsArray(),d=c.length;for(b=0;d>b;b++)if(c[b].time>a)return c[b].name;return null},h.getLabelBefore=function(a){null==a&&(a=this._time);for(var b=this.getLabelsArray(),c=b.length;--c>-1;)if(b[c].time<a)return b[c].name;return null},h.getLabelsArray=function(){var a,b=[],c=0;for(a in this._labels)b[c++]={time:this._labels[a],name:a};return b.sort(function(a,b){return a.time-b.time}),b},h.progress=function(a){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!==(1&this._cycle)?1-a:a)+this._cycle*(this._duration+this._repeatDelay),!1):this._time/this.duration()},h.totalProgress=function(a){return arguments.length?this.totalTime(this.totalDuration()*a,!1):this._totalTime/this.totalDuration()},h.totalDuration=function(b){return arguments.length?-1===this._repeat?this:this.duration((b-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(a.prototype.totalDuration.call(this),this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},h.time=function(a,b){return arguments.length?(this._dirty&&this.totalDuration(),a>this._duration&&(a=this._duration),this._yoyo&&0!==(1&this._cycle)?a=this._duration-a+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(a+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(a,b)):this._time},h.repeat=function(a){return arguments.length?(this._repeat=a,this._uncache(!0)):this._repeat},h.repeatDelay=function(a){return arguments.length?(this._repeatDelay=a,this._uncache(!0)):this._repeatDelay},h.yoyo=function(a){return arguments.length?(this._yoyo=a,this):this._yoyo},h.currentLabel=function(a){return arguments.length?this.seek(a,!0):this.getLabelBefore(this._time+1e-8)},d},!0),function(){var a=180/Math.PI,b=[],c=[],d=[],e={},f=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},g=",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",h=function(a,b,c,d){var e={a:a},f={},g={},h={c:d},i=(a+b)/2,j=(b+c)/2,k=(c+d)/2,l=(i+j)/2,m=(j+k)/2,n=(m-l)/8;return e.b=i+(a-i)/4,f.b=l+n,e.c=f.a=(e.b+f.b)/2,f.c=g.a=(l+m)/2,g.b=m-n,h.b=k+(d-k)/4,g.c=h.a=(g.b+h.b)/2,[e,f,g,h]},i=function(a,e,f,g,i){var j,k,l,m,n,o,p,q,r,s,t,u,v,w=a.length-1,x=0,y=a[0].a;for(j=0;w>j;j++)n=a[x],k=n.a,l=n.d,m=a[x+1].d,i?(t=b[j],u=c[j],v=(u+t)*e*.25/(g?.5:d[j]||.5),o=l-(l-k)*(g?.5*e:0!==t?v/t:0),p=l+(m-l)*(g?.5*e:0!==u?v/u:0),q=l-(o+((p-o)*(3*t/(t+u)+.5)/4||0))):(o=l-(l-k)*e*.5,p=l+(m-l)*e*.5,q=l-(o+p)/2),o+=q,p+=q,n.c=r=o,0!==j?n.b=y:n.b=y=n.a+.6*(n.c-n.a),n.da=l-k,n.ca=r-k,n.ba=y-k,f?(s=h(k,y,r,l),a.splice(x,1,s[0],s[1],s[2],s[3]),x+=4):x++,y=p;n=a[x],n.b=y,n.c=y+.4*(n.d-y),n.da=n.d-n.a,n.ca=n.c-n.a,n.ba=y-n.a,f&&(s=h(n.a,y,n.c,n.d),a.splice(x,1,s[0],s[1],s[2],s[3]))},j=function(a,d,e,g){var h,i,j,k,l,m,n=[];if(g)for(a=[g].concat(a),i=a.length;--i>-1;)"string"==typeof(m=a[i][d])&&"="===m.charAt(1)&&(a[i][d]=g[d]+Number(m.charAt(0)+m.substr(2)));if(h=a.length-2,0>h)return n[0]=new f(a[0][d],0,0,a[-1>h?0:1][d]),n;for(i=0;h>i;i++)j=a[i][d],k=a[i+1][d],n[i]=new f(j,0,0,k),e&&(l=a[i+2][d],b[i]=(b[i]||0)+(k-j)*(k-j),c[i]=(c[i]||0)+(l-k)*(l-k));return n[i]=new f(a[i][d],0,0,a[i+1][d]),n},k=function(a,f,h,k,l,m){var n,o,p,q,r,s,t,u,v={},w=[],x=m||a[0];l="string"==typeof l?","+l+",":g,null==f&&(f=1);for(o in a[0])w.push(o);if(a.length>1){for(u=a[a.length-1],t=!0,n=w.length;--n>-1;)if(o=w[n],Math.abs(x[o]-u[o])>.05){t=!1;break}t&&(a=a.concat(),m&&a.unshift(m),a.push(a[1]),m=a[a.length-3])}for(b.length=c.length=d.length=0,n=w.length;--n>-1;)o=w[n],e[o]=-1!==l.indexOf(","+o+","),v[o]=j(a,o,e[o],m);for(n=b.length;--n>-1;)b[n]=Math.sqrt(b[n]),c[n]=Math.sqrt(c[n]);if(!k){for(n=w.length;--n>-1;)if(e[o])for(p=v[w[n]],s=p.length-1,q=0;s>q;q++)r=p[q+1].da/c[q]+p[q].da/b[q],d[q]=(d[q]||0)+r*r;for(n=d.length;--n>-1;)d[n]=Math.sqrt(d[n])}for(n=w.length,q=h?4:1;--n>-1;)o=w[n],p=v[o],i(p,f,h,k,e[o]),t&&(p.splice(0,q),p.splice(p.length-q,q));return v},l=function(a,b,c){b=b||"soft";var d,e,g,h,i,j,k,l,m,n,o,p={},q="cubic"===b?3:2,r="soft"===b,s=[];if(r&&c&&(a=[c].concat(a)),null==a||a.length<q+1)throw"invalid Bezier data";for(m in a[0])s.push(m);for(j=s.length;--j>-1;){for(m=s[j],p[m]=i=[],n=0,l=a.length,k=0;l>k;k++)d=null==c?a[k][m]:"string"==typeof(o=a[k][m])&&"="===o.charAt(1)?c[m]+Number(o.charAt(0)+o.substr(2)):Number(o),r&&k>1&&l-1>k&&(i[n++]=(d+i[n-2])/2),i[n++]=d;for(l=n-q+1,n=0,k=0;l>k;k+=q)d=i[k],e=i[k+1],g=i[k+2],h=2===q?0:i[k+3],i[n++]=o=3===q?new f(d,e,g,h):new f(d,(2*e+d)/3,(2*e+g)/3,g);i.length=n}return p},m=function(a,b,c){for(var d,e,f,g,h,i,j,k,l,m,n,o=1/c,p=a.length;--p>-1;)for(m=a[p],f=m.a,g=m.d-f,h=m.c-f,i=m.b-f,d=e=0,k=1;c>=k;k++)j=o*k,l=1-j,d=e-(e=(j*j*g+3*l*(j*h+l*i))*j),n=p*c+k-1,b[n]=(b[n]||0)+d*d},n=function(a,b){b=b>>0||6;var c,d,e,f,g=[],h=[],i=0,j=0,k=b-1,l=[],n=[];for(c in a)m(a[c],g,b);for(e=g.length,d=0;e>d;d++)i+=Math.sqrt(g[d]),f=d%b,n[f]=i,f===k&&(j+=i,f=d/b>>0,l[f]=n,h[f]=j,i=0,n=[]);return{length:j,lengths:h,segments:l}},o=window._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.2",API:2,global:!0,init:function(a,b,c){this._target=a,b instanceof Array&&(b={values:b}),this._func={},this._round={},this._props=[],this._timeRes=null==b.timeResolution?6:parseInt(b.timeResolution,10);var d,e,f,g,h,i=b.values||[],j={},m=i[0],o=b.autoRotate||c.vars.orientToBezier;this._autoRotate=o?o instanceof Array?o:[["x","y","rotation",o===!0?0:Number(o)||0]]:null;for(d in m)this._props.push(d);for(f=this._props.length;--f>-1;)d=this._props[f],this._overwriteProps.push(d),e=this._func[d]="function"==typeof a[d],j[d]=e?a[d.indexOf("set")||"function"!=typeof a["get"+d.substr(3)]?d:"get"+d.substr(3)]():parseFloat(a[d]),h||j[d]!==i[0][d]&&(h=j);if(this._beziers="cubic"!==b.type&&"quadratic"!==b.type&&"soft"!==b.type?k(i,isNaN(b.curviness)?1:b.curviness,!1,"thruBasic"===b.type,b.correlate,h):l(i,b.type,j),this._segCount=this._beziers[d].length,this._timeRes){var p=n(this._beziers,this._timeRes);this._length=p.length,this._lengths=p.lengths,this._segments=p.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(o=this._autoRotate)for(this._initialRotations=[],o[0]instanceof Array||(this._autoRotate=o=[o]),f=o.length;--f>-1;){for(g=0;3>g;g++)d=o[f][g],this._func[d]="function"==typeof a[d]?a[d.indexOf("set")||"function"!=typeof a["get"+d.substr(3)]?d:"get"+d.substr(3)]:!1;d=o[f][2],this._initialRotations[f]=this._func[d]?this._func[d].call(this._target):this._target[d]}return this._startRatio=c.vars.runBackwards?1:0,!0},set:function(b){var c,d,e,f,g,h,i,j,k,l,m=this._segCount,n=this._func,o=this._target,p=b!==this._startRatio;if(this._timeRes){if(k=this._lengths,l=this._curSeg,b*=this._length,e=this._li,b>this._l2&&m-1>e){for(j=m-1;j>e&&(this._l2=k[++e])<=b;);this._l1=k[e-1],this._li=e,this._curSeg=l=this._segments[e],this._s2=l[this._s1=this._si=0]}else if(b<this._l1&&e>0){for(;e>0&&(this._l1=k[--e])>=b;);0===e&&b<this._l1?this._l1=0:e++,this._l2=k[e],this._li=e,this._curSeg=l=this._segments[e],this._s1=l[(this._si=l.length-1)-1]||0,this._s2=l[this._si]}if(c=e,b-=this._l1,e=this._si,b>this._s2&&e<l.length-1){for(j=l.length-1;j>e&&(this._s2=l[++e])<=b;);this._s1=l[e-1],this._si=e}else if(b<this._s1&&e>0){for(;e>0&&(this._s1=l[--e])>=b;);0===e&&b<this._s1?this._s1=0:e++,this._s2=l[e],this._si=e}h=(e+(b-this._s1)/(this._s2-this._s1))*this._prec}else c=0>b?0:b>=1?m-1:m*b>>0,h=(b-c*(1/m))*m;for(d=1-h,e=this._props.length;--e>-1;)f=this._props[e],g=this._beziers[f][c],i=(h*h*g.da+3*d*(h*g.ca+d*g.ba))*h+g.a,this._round[f]&&(i=Math.round(i)),n[f]?o[f](i):o[f]=i;if(this._autoRotate){var q,r,s,t,u,v,w,x=this._autoRotate;for(e=x.length;--e>-1;)f=x[e][2],v=x[e][3]||0,w=x[e][4]===!0?1:a,g=this._beziers[x[e][0]],q=this._beziers[x[e][1]],g&&q&&(g=g[c],q=q[c],r=g.a+(g.b-g.a)*h,t=g.b+(g.c-g.b)*h,r+=(t-r)*h,t+=(g.c+(g.d-g.c)*h-t)*h,s=q.a+(q.b-q.a)*h,u=q.b+(q.c-q.b)*h,s+=(u-s)*h,u+=(q.c+(q.d-q.c)*h-u)*h,i=p?Math.atan2(u-s,t-r)*w+v:this._initialRotations[e],n[f]?o[f](i):o[f]=i)}}}),p=o.prototype;o.bezierThrough=k,o.cubicToQuadratic=h,o._autoCSS=!0,o.quadraticToCubic=function(a,b,c){return new f(a,(2*b+a)/3,(2*b+c)/3,c)},o._cssRegister=function(){var a=window._gsDefine.globals.CSSPlugin;if(a){var b=a._internals,c=b._parseToProxy,d=b._setPluginRatio,e=b.CSSPropTween;b._registerComplexSpecialProp("bezier",{parser:function(a,b,f,g,h,i){b instanceof Array&&(b={values:b}),i=new o;var j,k,l,m=b.values,n=m.length-1,p=[],q={};if(0>n)return h;for(j=0;n>=j;j++)l=c(a,m[j],g,h,i,n!==j),p[j]=l.end;for(k in b)q[k]=b[k];return q.values=p,h=new e(a,"bezier",0,0,l.pt,2),h.data=l,h.plugin=i,h.setRatio=d,0===q.autoRotate&&(q.autoRotate=!0),!q.autoRotate||q.autoRotate instanceof Array||(j=q.autoRotate===!0?0:Number(q.autoRotate),q.autoRotate=null!=l.end.left?[["left","top","rotation",j,!1]]:null!=l.end.x?[["x","y","rotation",j,!1]]:!1),q.autoRotate&&(g._transform||g._enableTransforms(!1),l.autoRotate=g._target._gsTransform),i._onInitTween(l.proxy,q,g._tween),h}})}},p._roundProps=function(a,b){for(var c=this._overwriteProps,d=c.length;--d>-1;)(a[c[d]]||a.bezier||a.bezierThrough)&&(this._round[c[d]]=b)},p._kill=function(a){var b,c,d=this._props;for(b in this._beziers)if(b in a)for(delete this._beziers[b],delete this._func[b],c=d.length;--c>-1;)d[c]===b&&d.splice(c,1);return this._super._kill.call(this,a)}}(),window._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(a,b){var c,d,e,f,g=function(){a.call(this,"css"),this._overwriteProps.length=0,this.setRatio=g.prototype.setRatio},h={},i=g.prototype=new a("css");i.constructor=g,g.version="1.12.1",g.API=2,g.defaultTransformPerspective=0,g.defaultSkewType="compensated",i="px",g.suffixMap={top:i,right:i,bottom:i,left:i,width:i,height:i,fontSize:i,padding:i,margin:i,perspective:i,lineHeight:""};var j,k,l,m,n,o,p=/(?:\d|\-\d|\.\d|\-\.\d)+/g,q=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,r=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,s=/[^\d\-\.]/g,t=/(?:\d|\-|\+|=|#|\.)*/g,u=/opacity *= *([^)]*)/i,v=/opacity:([^;]*)/i,w=/alpha\(opacity *=.+?\)/i,x=/^(rgb|hsl)/,y=/([A-Z])/g,z=/-([a-z])/gi,A=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,B=function(a,b){return b.toUpperCase()},C=/(?:Left|Right|Width)/i,D=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,E=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,F=/,(?=[^\)]*(?:\(|$))/gi,G=Math.PI/180,H=180/Math.PI,I={},J=document,K=J.createElement("div"),L=J.createElement("img"),M=g._internals={_specialProps:h},N=navigator.userAgent,O=function(){var a,b=N.indexOf("Android"),c=J.createElement("div");return l=-1!==N.indexOf("Safari")&&-1===N.indexOf("Chrome")&&(-1===b||Number(N.substr(b+8,1))>3),n=l&&Number(N.substr(N.indexOf("Version/")+8,1))<6,m=-1!==N.indexOf("Firefox"),/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(N)&&(o=parseFloat(RegExp.$1)),c.innerHTML="<a style='top:1px;opacity:.55;'>a</a>",a=c.getElementsByTagName("a")[0],a?/^0.55/.test(a.style.opacity):!1}(),P=function(a){return u.test("string"==typeof a?a:(a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100:1},Q=function(a){window.console},R="",S="",T=function(a,b){b=b||K;var c,d,e=b.style;if(void 0!==e[a])return a;for(a=a.charAt(0).toUpperCase()+a.substr(1),c=["O","Moz","ms","Ms","Webkit"],d=5;--d>-1&&void 0===e[c[d]+a];);return d>=0?(S=3===d?"ms":c[d],R="-"+S.toLowerCase()+"-",S+a):null},U=J.defaultView?J.defaultView.getComputedStyle:function(){},V=g.getStyle=function(a,b,c,d,e){var f;return O||"opacity"!==b?(!d&&a.style[b]?f=a.style[b]:(c=c||U(a))?f=c[b]||c.getPropertyValue(b)||c.getPropertyValue(b.replace(y,"-$1").toLowerCase()):a.currentStyle&&(f=a.currentStyle[b]),null==e||f&&"none"!==f&&"auto"!==f&&"auto auto"!==f?f:e):P(a)},W=M.convertToPixels=function(a,c,d,e,f){if("px"===e||!e)return d;if("auto"===e||!d)return 0;var h,i,j,k=C.test(c),l=a,m=K.style,n=0>d;if(n&&(d=-d),"%"===e&&-1!==c.indexOf("border"))h=d/100*(k?a.clientWidth:a.clientHeight);else{if(m.cssText="border:0 solid red;position:"+V(a,"position")+";line-height:0;","%"!==e&&l.appendChild)m[k?"borderLeftWidth":"borderTopWidth"]=d+e;else{if(l=a.parentNode||J.body,i=l._gsCache,j=b.ticker.frame,i&&k&&i.time===j)return i.width*d/100;m[k?"width":"height"]=d+e}l.appendChild(K),h=parseFloat(K[k?"offsetWidth":"offsetHeight"]),l.removeChild(K),k&&"%"===e&&g.cacheWidths!==!1&&(i=l._gsCache=l._gsCache||{},i.time=j,i.width=h/d*100),0!==h||f||(h=W(a,c,d,e,!0))}return n?-h:h},X=M.calculateOffset=function(a,b,c){if("absolute"!==V(a,"position",c))return 0;var d="left"===b?"Left":"Top",e=V(a,"margin"+d,c);return a["offset"+d]-(W(a,b,parseFloat(e),e.replace(t,""))||0)},Y=function(a,b){var c,d,e={};if(b=b||U(a,null))if(c=b.length)for(;--c>-1;)e[b[c].replace(z,B)]=b.getPropertyValue(b[c]);else for(c in b)e[c]=b[c];else if(b=a.currentStyle||a.style)for(c in b)"string"==typeof c&&void 0===e[c]&&(e[c.replace(z,B)]=b[c]);return O||(e.opacity=P(a)),d=ya(a,b,!1),e.rotation=d.rotation,e.skewX=d.skewX,e.scaleX=d.scaleX,e.scaleY=d.scaleY,e.x=d.x,e.y=d.y,wa&&(e.z=d.z,e.rotationX=d.rotationX,e.rotationY=d.rotationY,e.scaleZ=d.scaleZ),e.filters&&delete e.filters,e},Z=function(a,b,c,d,e){var f,g,h,i={},j=a.style;for(g in c)"cssText"!==g&&"length"!==g&&isNaN(g)&&(b[g]!==(f=c[g])||e&&e[g])&&-1===g.indexOf("Origin")&&("number"==typeof f||"string"==typeof f)&&(i[g]="auto"!==f||"left"!==g&&"top"!==g?""!==f&&"auto"!==f&&"none"!==f||"string"!=typeof b[g]||""===b[g].replace(s,"")?f:0:X(a,g),void 0!==j[g]&&(h=new la(j,g,j[g],h)));if(d)for(g in d)"className"!==g&&(i[g]=d[g]);return{difs:i,firstMPT:h}},$={width:["Left","Right"],height:["Top","Bottom"]},_=["marginLeft","marginRight","marginTop","marginBottom"],aa=function(a,b,c){var d=parseFloat("width"===b?a.offsetWidth:a.offsetHeight),e=$[b],f=e.length;for(c=c||U(a,null);--f>-1;)d-=parseFloat(V(a,"padding"+e[f],c,!0))||0,d-=parseFloat(V(a,"border"+e[f]+"Width",c,!0))||0;return d},ba=function(a,b){(null==a||""===a||"auto"===a||"auto auto"===a)&&(a="0 0");var c=a.split(" "),d=-1!==a.indexOf("left")?"0%":-1!==a.indexOf("right")?"100%":c[0],e=-1!==a.indexOf("top")?"0%":-1!==a.indexOf("bottom")?"100%":c[1];return null==e?e="0":"center"===e&&(e="50%"),("center"===d||isNaN(parseFloat(d))&&-1===(d+"").indexOf("="))&&(d="50%"),b&&(b.oxp=-1!==d.indexOf("%"),b.oyp=-1!==e.indexOf("%"),b.oxr="="===d.charAt(1),b.oyr="="===e.charAt(1),b.ox=parseFloat(d.replace(s,"")),b.oy=parseFloat(e.replace(s,""))),d+" "+e+(c.length>2?" "+c[2]:"")},ca=function(a,b){return"string"==typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+"1",10)*parseFloat(a.substr(2)):parseFloat(a)-parseFloat(b)},da=function(a,b){return null==a?b:"string"==typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+"1",10)*Number(a.substr(2))+b:parseFloat(a)},ea=function(a,b,c,d){var e,f,g,h,i=1e-6;return null==a?h=b:"number"==typeof a?h=a:(e=360,f=a.split("_"),g=Number(f[0].replace(s,""))*(-1===a.indexOf("rad")?1:H)-("="===a.charAt(1)?0:b),f.length&&(d&&(d[c]=b+g),-1!==a.indexOf("short")&&(g%=e,g!==g%(e/2)&&(g=0>g?g+e:g-e)),-1!==a.indexOf("_cw")&&0>g?g=(g+9999999999*e)%e-(g/e|0)*e:-1!==a.indexOf("ccw")&&g>0&&(g=(g-9999999999*e)%e-(g/e|0)*e)),h=b+g),i>h&&h>-i&&(h=0),h},fa={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]},ga=function(a,b,c){return a=0>a?a+1:a>1?a-1:a,255*(1>6*a?b+(c-b)*a*6:.5>a?c:2>3*a?b+(c-b)*(2/3-a)*6:b)+.5|0},ha=function(a){var b,c,d,e,f,g;return a&&""!==a?"number"==typeof a?[a>>16,a>>8&255,255&a]:(","===a.charAt(a.length-1)&&(a=a.substr(0,a.length-1)),fa[a]?fa[a]:"#"===a.charAt(0)?(4===a.length&&(b=a.charAt(1),c=a.charAt(2),d=a.charAt(3),a="#"+b+b+c+c+d+d),a=parseInt(a.substr(1),16),[a>>16,a>>8&255,255&a]):"hsl"===a.substr(0,3)?(a=a.match(p),e=Number(a[0])%360/360,f=Number(a[1])/100,g=Number(a[2])/100,c=.5>=g?g*(f+1):g+f-g*f,b=2*g-c,a.length>3&&(a[3]=Number(a[3])),a[0]=ga(e+1/3,b,c),a[1]=ga(e,b,c),a[2]=ga(e-1/3,b,c),a):(a=a.match(p)||fa.transparent,a[0]=Number(a[0]),a[1]=Number(a[1]),a[2]=Number(a[2]),a.length>3&&(a[3]=Number(a[3])),a)):fa.black},ia="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#.+?\\b";for(i in fa)ia+="|"+i+"\\b";ia=new RegExp(ia+")","gi");var ja=function(a,b,c,d){if(null==a)return function(a){return a};var e,f=b?(a.match(ia)||[""])[0]:"",g=a.split(f).join("").match(r)||[],h=a.substr(0,a.indexOf(g[0])),i=")"===a.charAt(a.length-1)?")":"",j=-1!==a.indexOf(" ")?" ":",",k=g.length,l=k>0?g[0].replace(p,""):"";return k?e=b?function(a){var b,m,n,o;if("number"==typeof a)a+=l;else if(d&&F.test(a)){for(o=a.replace(F,"|").split("|"),n=0;n<o.length;n++)o[n]=e(o[n]);return o.join(",")}if(b=(a.match(ia)||[f])[0],m=a.split(b).join("").match(r)||[],n=m.length,k>n--)for(;++n<k;)m[n]=c?m[(n-1)/2|0]:g[n];return h+m.join(j)+j+b+i+(-1!==a.indexOf("inset")?" inset":"")}:function(a){var b,f,m;if("number"==typeof a)a+=l;else if(d&&F.test(a)){for(f=a.replace(F,"|").split("|"),m=0;m<f.length;m++)f[m]=e(f[m]);return f.join(",")}if(b=a.match(r)||[],m=b.length,k>m--)for(;++m<k;)b[m]=c?b[(m-1)/2|0]:g[m];return h+b.join(j)+i}:function(a){return a}},ka=function(a){return a=a.split(","),function(b,c,d,e,f,g,h){var i,j=(c+"").split(" ");for(h={},i=0;4>i;i++)h[a[i]]=j[i]=j[i]||j[(i-1)/2>>0];return e.parse(b,h,f,g)}},la=(M._setPluginRatio=function(a){this.plugin.setRatio(a);for(var b,c,d,e,f=this.data,g=f.proxy,h=f.firstMPT,i=1e-6;h;)b=g[h.v],h.r?b=Math.round(b):i>b&&b>-i&&(b=0),h.t[h.p]=b,h=h._next;if(f.autoRotate&&(f.autoRotate.rotation=g.rotation),1===a)for(h=f.firstMPT;h;){if(c=h.t,c.type){if(1===c.type){for(e=c.xs0+c.s+c.xs1,d=1;d<c.l;d++)e+=c["xn"+d]+c["xs"+(d+1)];c.e=e}}else c.e=c.s+c.xs0;h=h._next}},function(a,b,c,d,e){this.t=a,this.p=b,this.v=c,this.r=e,d&&(d._prev=this,this._next=d)}),ma=(M._parseToProxy=function(a,b,c,d,e,f){var g,h,i,j,k,l=d,m={},n={},o=c._transform,p=I;for(c._transform=null,I=b,d=k=c.parse(a,b,d,e),I=p,f&&(c._transform=o,l&&(l._prev=null,l._prev&&(l._prev._next=null)));d&&d!==l;){if(d.type<=1&&(h=d.p,n[h]=d.s+d.c,m[h]=d.s,f||(j=new la(d,"s",h,j,d.r),d.c=0),1===d.type))for(g=d.l;--g>0;)i="xn"+g,h=d.p+"_"+i,n[h]=d.data[i],m[h]=d[i],f||(j=new la(d,i,h,j,d.rxp[i]));d=d._next}return{proxy:m,end:n,firstMPT:j,pt:k}},M.CSSPropTween=function(a,b,d,e,g,h,i,j,k,l,m){this.t=a,this.p=b,this.s=d,this.c=e,this.n=i||b,a instanceof ma||f.push(this.n),this.r=j,this.type=h||0,k&&(this.pr=k,c=!0),this.b=void 0===l?d:l,this.e=void 0===m?d+e:m,g&&(this._next=g,g._prev=this)}),na=g.parseComplex=function(a,b,c,d,e,f,g,h,i,k){c=c||f||"",g=new ma(a,b,0,0,g,k?2:1,null,!1,h,c,d),d+="";var l,m,n,o,r,s,t,u,v,w,y,z,A=c.split(", ").join(",").split(" "),B=d.split(", ").join(",").split(" "),C=A.length,D=j!==!1;for((-1!==d.indexOf(",")||-1!==c.indexOf(","))&&(A=A.join(" ").replace(F,", ").split(" "),B=B.join(" ").replace(F,", ").split(" "),C=A.length),C!==B.length&&(A=(f||"").split(" "),C=A.length),g.plugin=i,g.setRatio=k,l=0;C>l;l++)if(o=A[l],r=B[l],u=parseFloat(o),u||0===u)g.appendXtra("",u,ca(r,u),r.replace(q,""),D&&-1!==r.indexOf("px"),!0);else if(e&&("#"===o.charAt(0)||fa[o]||x.test(o)))z=","===r.charAt(r.length-1)?"),":")",o=ha(o),r=ha(r),v=o.length+r.length>6,v&&!O&&0===r[3]?(g["xs"+g.l]+=g.l?" transparent":"transparent",g.e=g.e.split(B[l]).join("transparent")):(O||(v=!1),g.appendXtra(v?"rgba(":"rgb(",o[0],r[0]-o[0],",",!0,!0).appendXtra("",o[1],r[1]-o[1],",",!0).appendXtra("",o[2],r[2]-o[2],v?",":z,!0),v&&(o=o.length<4?1:o[3],g.appendXtra("",o,(r.length<4?1:r[3])-o,z,!1)));else if(s=o.match(p)){if(t=r.match(q),!t||t.length!==s.length)return g;for(n=0,m=0;m<s.length;m++)y=s[m],w=o.indexOf(y,n),g.appendXtra(o.substr(n,w-n),Number(y),ca(t[m],y),"",D&&"px"===o.substr(w+y.length,2),0===m),n=w+y.length;g["xs"+g.l]+=o.substr(n)}else g["xs"+g.l]+=g.l?" "+o:o;if(-1!==d.indexOf("=")&&g.data){for(z=g.xs0+g.data.s,l=1;l<g.l;l++)z+=g["xs"+l]+g.data["xn"+l];g.e=z+g["xs"+l]}return g.l||(g.type=-1,g.xs0=g.e),g.xfirst||g},oa=9;for(i=ma.prototype,i.l=i.pr=0;--oa>0;)i["xn"+oa]=0,i["xs"+oa]="";i.xs0="",i._next=i._prev=i.xfirst=i.data=i.plugin=i.setRatio=i.rxp=null,i.appendXtra=function(a,b,c,d,e,f){var g=this,h=g.l;return g["xs"+h]+=f&&h?" "+a:a||"",c||0===h||g.plugin?(g.l++,g.type=g.setRatio?2:1,g["xs"+g.l]=d||"",h>0?(g.data["xn"+h]=b+c,g.rxp["xn"+h]=e,g["xn"+h]=b,g.plugin||(g.xfirst=new ma(g,"xn"+h,b,c,g.xfirst||g,0,g.n,e,g.pr),g.xfirst.xs0=0),g):(g.data={s:b+c},g.rxp={},g.s=b,g.c=c,g.r=e,g)):(g["xs"+h]+=b+(d||""),g)};var pa=function(a,b){b=b||{},this.p=b.prefix?T(a)||a:a,h[a]=h[this.p]=this,this.format=b.formatter||ja(b.defaultValue,b.color,b.collapsible,b.multi),b.parser&&(this.parse=b.parser),this.clrs=b.color,this.multi=b.multi,this.keyword=b.keyword,this.dflt=b.defaultValue,this.pr=b.priority||0},qa=M._registerComplexSpecialProp=function(a,b,c){"object"!=typeof b&&(b={parser:c});var d,e,f=a.split(","),g=b.defaultValue;for(c=c||[g],d=0;d<f.length;d++)b.prefix=0===d&&b.prefix,b.defaultValue=c[d]||g,e=new pa(f[d],b)},ra=function(a){if(!h[a]){var b=a.charAt(0).toUpperCase()+a.substr(1)+"Plugin";qa(a,{parser:function(a,c,d,e,f,g,i){var j=(window.GreenSockGlobals||window).com.greensock.plugins[b];return j?(j._cssRegister(),h[d].parse(a,c,d,e,f,g,i)):(Q("Error: "+b+" js file not loaded."),f)}})}};i=pa.prototype,i.parseComplex=function(a,b,c,d,e,f){var g,h,i,j,k,l,m=this.keyword;if(this.multi&&(F.test(c)||F.test(b)?(h=b.replace(F,"|").split("|"),i=c.replace(F,"|").split("|")):m&&(h=[b],i=[c])),i){for(j=i.length>h.length?i.length:h.length,g=0;j>g;g++)b=h[g]=h[g]||this.dflt,c=i[g]=i[g]||this.dflt,m&&(k=b.indexOf(m),l=c.indexOf(m),k!==l&&(c=-1===l?i:h,c[g]+=" "+m));b=h.join(", "),c=i.join(", ")}return na(a,this.p,b,c,this.clrs,this.dflt,d,this.pr,e,f)},i.parse=function(a,b,c,d,f,g,h){return this.parseComplex(a.style,this.format(V(a,this.p,e,!1,this.dflt)),this.format(b),f,g)},g.registerSpecialProp=function(a,b,c){qa(a,{parser:function(a,d,e,f,g,h,i){var j=new ma(a,e,0,0,g,2,e,!1,c);return j.plugin=h,j.setRatio=b(a,d,f._tween,e),j},priority:c})};var sa="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective".split(","),ta=T("transform"),ua=R+"transform",va=T("transformOrigin"),wa=null!==T("perspective"),xa=M.Transform=function(){this.skewY=0},ya=M.getTransform=function(a,b,c,d){if(a._gsTransform&&c&&!d)return a._gsTransform;var e,f,h,i,j,k,l,m,n,o,p,q,r,s=c?a._gsTransform||new xa:new xa,t=s.scaleX<0,u=2e-5,v=1e5,w=179.99,x=w*G,y=wa?parseFloat(V(a,va,b,!1,"0 0 0").split(" ")[2])||s.zOrigin||0:0;for(ta?e=V(a,ua,b,!0):a.currentStyle&&(e=a.currentStyle.filter.match(D),e=e&&4===e.length?[e[0].substr(4),Number(e[2].substr(4)),Number(e[1].substr(4)),e[3].substr(4),s.x||0,s.y||0].join(","):""),f=(e||"").match(/(?:\-|\b)[\d\-\.e]+\b/gi)||[],h=f.length;--h>-1;)i=Number(f[h]),f[h]=(j=i-(i|=0))?(j*v+(0>j?-.5:.5)|0)/v+i:i;if(16===f.length){var z=f[8],A=f[9],B=f[10],C=f[12],E=f[13],F=f[14];if(s.zOrigin&&(F=-s.zOrigin,C=z*F-f[12],E=A*F-f[13],F=B*F+s.zOrigin-f[14]),!c||d||null==s.rotationX){var I,J,K,L,M,N,O,P=f[0],Q=f[1],R=f[2],S=f[3],T=f[4],U=f[5],W=f[6],X=f[7],Y=f[11],Z=Math.atan2(W,B),$=-x>Z||Z>x;s.rotationX=Z*H,Z&&(L=Math.cos(-Z),M=Math.sin(-Z),I=T*L+z*M,J=U*L+A*M,K=W*L+B*M,z=T*-M+z*L,A=U*-M+A*L,B=W*-M+B*L,Y=X*-M+Y*L,T=I,U=J,W=K),Z=Math.atan2(z,P),s.rotationY=Z*H,Z&&(N=-x>Z||Z>x,L=Math.cos(-Z),M=Math.sin(-Z),I=P*L-z*M,J=Q*L-A*M,K=R*L-B*M,A=Q*M+A*L,B=R*M+B*L,Y=S*M+Y*L,P=I,Q=J,R=K),Z=Math.atan2(Q,U),s.rotation=Z*H,Z&&(O=-x>Z||Z>x,L=Math.cos(-Z),M=Math.sin(-Z),P=P*L+T*M,J=Q*L+U*M,U=Q*-M+U*L,W=R*-M+W*L,Q=J),O&&$?s.rotation=s.rotationX=0:O&&N?s.rotation=s.rotationY=0:N&&$&&(s.rotationY=s.rotationX=0),s.scaleX=(Math.sqrt(P*P+Q*Q)*v+.5|0)/v,s.scaleY=(Math.sqrt(U*U+A*A)*v+.5|0)/v,s.scaleZ=(Math.sqrt(W*W+B*B)*v+.5|0)/v,
-s.skewX=0,s.perspective=Y?1/(0>Y?-Y:Y):0,s.x=C,s.y=E,s.z=F}}else if((!wa||d||!f.length||s.x!==f[4]||s.y!==f[5]||!s.rotationX&&!s.rotationY)&&(void 0===s.x||"none"!==V(a,"display",b))){var _=f.length>=6,aa=_?f[0]:1,ba=f[1]||0,ca=f[2]||0,da=_?f[3]:1;s.x=f[4]||0,s.y=f[5]||0,k=Math.sqrt(aa*aa+ba*ba),l=Math.sqrt(da*da+ca*ca),m=aa||ba?Math.atan2(ba,aa)*H:s.rotation||0,n=ca||da?Math.atan2(ca,da)*H+m:s.skewX||0,o=k-Math.abs(s.scaleX||0),p=l-Math.abs(s.scaleY||0),Math.abs(n)>90&&Math.abs(n)<270&&(t?(k*=-1,n+=0>=m?180:-180,m+=0>=m?180:-180):(l*=-1,n+=0>=n?180:-180)),q=(m-s.rotation)%180,r=(n-s.skewX)%180,(void 0===s.skewX||o>u||-u>o||p>u||-u>p||q>-w&&w>q&&q*v|!1||r>-w&&w>r&&r*v|!1)&&(s.scaleX=k,s.scaleY=l,s.rotation=m,s.skewX=n),wa&&(s.rotationX=s.rotationY=s.z=0,s.perspective=parseFloat(g.defaultTransformPerspective)||0,s.scaleZ=1)}s.zOrigin=y;for(h in s)s[h]<u&&s[h]>-u&&(s[h]=0);return c&&(a._gsTransform=s),s},za=function(a){var b,c,d=this.data,e=-d.rotation*G,f=e+d.skewX*G,g=1e5,h=(Math.cos(e)*d.scaleX*g|0)/g,i=(Math.sin(e)*d.scaleX*g|0)/g,j=(Math.sin(f)*-d.scaleY*g|0)/g,k=(Math.cos(f)*d.scaleY*g|0)/g,l=this.t.style,m=this.t.currentStyle;if(m){c=i,i=-j,j=-c,b=m.filter,l.filter="";var n,p,q=this.t.offsetWidth,r=this.t.offsetHeight,s="absolute"!==m.position,v="progid:DXImageTransform.Microsoft.Matrix(M11="+h+", M12="+i+", M21="+j+", M22="+k,w=d.x,x=d.y;if(null!=d.ox&&(n=(d.oxp?q*d.ox*.01:d.ox)-q/2,p=(d.oyp?r*d.oy*.01:d.oy)-r/2,w+=n-(n*h+p*i),x+=p-(n*j+p*k)),s?(n=q/2,p=r/2,v+=", Dx="+(n-(n*h+p*i)+w)+", Dy="+(p-(n*j+p*k)+x)+")"):v+=", sizingMethod='auto expand')",-1!==b.indexOf("DXImageTransform.Microsoft.Matrix(")?l.filter=b.replace(E,v):l.filter=v+" "+b,(0===a||1===a)&&1===h&&0===i&&0===j&&1===k&&(s&&-1===v.indexOf("Dx=0, Dy=0")||u.test(b)&&100!==parseFloat(RegExp.$1)||-1===b.indexOf(b.indexOf("Alpha"))&&l.removeAttribute("filter")),!s){var y,z,A,B=8>o?1:-1;for(n=d.ieOffsetX||0,p=d.ieOffsetY||0,d.ieOffsetX=Math.round((q-((0>h?-h:h)*q+(0>i?-i:i)*r))/2+w),d.ieOffsetY=Math.round((r-((0>k?-k:k)*r+(0>j?-j:j)*q))/2+x),oa=0;4>oa;oa++)z=_[oa],y=m[z],c=-1!==y.indexOf("px")?parseFloat(y):W(this.t,z,parseFloat(y),y.replace(t,""))||0,A=c!==d[z]?2>oa?-d.ieOffsetX:-d.ieOffsetY:2>oa?n-d.ieOffsetX:p-d.ieOffsetY,l[z]=(d[z]=Math.round(c-A*(0===oa||2===oa?1:B)))+"px"}}},Aa=M.set3DTransformRatio=function(a){var b,c,d,e,f,g,h,i,j,k,l,n,o,p,q,r,s,t,u,v,w,x,y,z=this.data,A=this.t.style,B=z.rotation*G,C=z.scaleX,D=z.scaleY,E=z.scaleZ,F=z.perspective;if((1===a||0===a)&&"auto"===z.force3D&&!(z.rotationY||z.rotationX||1!==E||F||z.z))return void Ba.call(this,a);if(m){var H=1e-4;H>C&&C>-H&&(C=E=2e-5),H>D&&D>-H&&(D=E=2e-5),!F||z.z||z.rotationX||z.rotationY||(F=0)}if(B||z.skewX)t=Math.cos(B),u=Math.sin(B),b=t,f=u,z.skewX&&(B-=z.skewX*G,t=Math.cos(B),u=Math.sin(B),"simple"===z.skewType&&(v=Math.tan(z.skewX*G),v=Math.sqrt(1+v*v),t*=v,u*=v)),c=-u,g=t;else{if(!(z.rotationY||z.rotationX||1!==E||F))return void(A[ta]="translate3d("+z.x+"px,"+z.y+"px,"+z.z+"px)"+(1!==C||1!==D?" scale("+C+","+D+")":""));b=g=1,c=f=0}l=1,d=e=h=i=j=k=n=o=p=0,q=F?-1/F:0,r=z.zOrigin,s=1e5,B=z.rotationY*G,B&&(t=Math.cos(B),u=Math.sin(B),j=l*-u,o=q*-u,d=b*u,h=f*u,l*=t,q*=t,b*=t,f*=t),B=z.rotationX*G,B&&(t=Math.cos(B),u=Math.sin(B),v=c*t+d*u,w=g*t+h*u,x=k*t+l*u,y=p*t+q*u,d=c*-u+d*t,h=g*-u+h*t,l=k*-u+l*t,q=p*-u+q*t,c=v,g=w,k=x,p=y),1!==E&&(d*=E,h*=E,l*=E,q*=E),1!==D&&(c*=D,g*=D,k*=D,p*=D),1!==C&&(b*=C,f*=C,j*=C,o*=C),r&&(n-=r,e=d*n,i=h*n,n=l*n+r),e=(v=(e+=z.x)-(e|=0))?(v*s+(0>v?-.5:.5)|0)/s+e:e,i=(v=(i+=z.y)-(i|=0))?(v*s+(0>v?-.5:.5)|0)/s+i:i,n=(v=(n+=z.z)-(n|=0))?(v*s+(0>v?-.5:.5)|0)/s+n:n,A[ta]="matrix3d("+[(b*s|0)/s,(f*s|0)/s,(j*s|0)/s,(o*s|0)/s,(c*s|0)/s,(g*s|0)/s,(k*s|0)/s,(p*s|0)/s,(d*s|0)/s,(h*s|0)/s,(l*s|0)/s,(q*s|0)/s,e,i,n,F?1+-n/F:1].join(",")+")"},Ba=M.set2DTransformRatio=function(a){var b,c,d,e,f,g=this.data,h=this.t,i=h.style;return g.rotationX||g.rotationY||g.z||g.force3D===!0||"auto"===g.force3D&&1!==a&&0!==a?(this.setRatio=Aa,void Aa.call(this,a)):void(g.rotation||g.skewX?(b=g.rotation*G,c=b-g.skewX*G,d=1e5,e=g.scaleX*d,f=g.scaleY*d,i[ta]="matrix("+(Math.cos(b)*e|0)/d+","+(Math.sin(b)*e|0)/d+","+(Math.sin(c)*-f|0)/d+","+(Math.cos(c)*f|0)/d+","+g.x+","+g.y+")"):i[ta]="matrix("+g.scaleX+",0,0,"+g.scaleY+","+g.x+","+g.y+")")};qa("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(a,b,c,d,f,h,i){if(d._transform)return f;var j,k,l,m,n,o,p,q=d._transform=ya(a,e,!0,i.parseTransform),r=a.style,s=1e-6,t=sa.length,u=i,v={};if("string"==typeof u.transform&&ta)l=K.style,l[ta]=u.transform,l.display="block",l.position="absolute",J.body.appendChild(K),j=ya(K,null,!1),J.body.removeChild(K);else if("object"==typeof u){if(j={scaleX:da(null!=u.scaleX?u.scaleX:u.scale,q.scaleX),scaleY:da(null!=u.scaleY?u.scaleY:u.scale,q.scaleY),scaleZ:da(u.scaleZ,q.scaleZ),x:da(u.x,q.x),y:da(u.y,q.y),z:da(u.z,q.z),perspective:da(u.transformPerspective,q.perspective)},p=u.directionalRotation,null!=p)if("object"==typeof p)for(l in p)u[l]=p[l];else u.rotation=p;j.rotation=ea("rotation"in u?u.rotation:"shortRotation"in u?u.shortRotation+"_short":"rotationZ"in u?u.rotationZ:q.rotation,q.rotation,"rotation",v),wa&&(j.rotationX=ea("rotationX"in u?u.rotationX:"shortRotationX"in u?u.shortRotationX+"_short":q.rotationX||0,q.rotationX,"rotationX",v),j.rotationY=ea("rotationY"in u?u.rotationY:"shortRotationY"in u?u.shortRotationY+"_short":q.rotationY||0,q.rotationY,"rotationY",v)),j.skewX=null==u.skewX?q.skewX:ea(u.skewX,q.skewX),j.skewY=null==u.skewY?q.skewY:ea(u.skewY,q.skewY),(k=j.skewY-q.skewY)&&(j.skewX+=k,j.rotation+=k)}for(wa&&null!=u.force3D&&(q.force3D=u.force3D,o=!0),q.skewType=u.skewType||q.skewType||g.defaultSkewType,n=q.force3D||q.z||q.rotationX||q.rotationY||j.z||j.rotationX||j.rotationY||j.perspective,n||null==u.scale||(j.scaleZ=1);--t>-1;)c=sa[t],m=j[c]-q[c],(m>s||-s>m||null!=I[c])&&(o=!0,f=new ma(q,c,q[c],m,f),c in v&&(f.e=v[c]),f.xs0=0,f.plugin=h,d._overwriteProps.push(f.n));return m=u.transformOrigin,(m||wa&&n&&q.zOrigin)&&(ta?(o=!0,c=va,m=(m||V(a,c,e,!1,"50% 50%"))+"",f=new ma(r,c,0,0,f,-1,"transformOrigin"),f.b=r[c],f.plugin=h,wa?(l=q.zOrigin,m=m.split(" "),q.zOrigin=(m.length>2&&(0===l||"0px"!==m[2])?parseFloat(m[2]):l)||0,f.xs0=f.e=m[0]+" "+(m[1]||"50%")+" 0px",f=new ma(q,"zOrigin",0,0,f,-1,f.n),f.b=l,f.xs0=f.e=q.zOrigin):f.xs0=f.e=m):ba(m+"",q)),o&&(d._transformType=n||3===this._transformType?3:2),f},prefix:!0}),qa("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),qa("borderRadius",{defaultValue:"0px",parser:function(a,b,c,f,g,h){b=this.format(b);var i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],z=a.style;for(q=parseFloat(a.offsetWidth),r=parseFloat(a.offsetHeight),i=b.split(" "),j=0;j<y.length;j++)this.p.indexOf("border")&&(y[j]=T(y[j])),m=l=V(a,y[j],e,!1,"0px"),-1!==m.indexOf(" ")&&(l=m.split(" "),m=l[0],l=l[1]),n=k=i[j],o=parseFloat(m),t=m.substr((o+"").length),u="="===n.charAt(1),u?(p=parseInt(n.charAt(0)+"1",10),n=n.substr(2),p*=parseFloat(n),s=n.substr((p+"").length-(0>p?1:0))||""):(p=parseFloat(n),s=n.substr((p+"").length)),""===s&&(s=d[c]||t),s!==t&&(v=W(a,"borderLeft",o,t),w=W(a,"borderTop",o,t),"%"===s?(m=v/q*100+"%",l=w/r*100+"%"):"em"===s?(x=W(a,"borderLeft",1,"em"),m=v/x+"em",l=w/x+"em"):(m=v+"px",l=w+"px"),u&&(n=parseFloat(m)+p+s,k=parseFloat(l)+p+s)),g=na(z,y[j],m+" "+l,n+" "+k,!1,"0px",g);return g},prefix:!0,formatter:ja("0px 0px 0px 0px",!1,!0)}),qa("backgroundPosition",{defaultValue:"0 0",parser:function(a,b,c,d,f,g){var h,i,j,k,l,m,n="background-position",p=e||U(a,null),q=this.format((p?o?p.getPropertyValue(n+"-x")+" "+p.getPropertyValue(n+"-y"):p.getPropertyValue(n):a.currentStyle.backgroundPositionX+" "+a.currentStyle.backgroundPositionY)||"0 0"),r=this.format(b);if(-1!==q.indexOf("%")!=(-1!==r.indexOf("%"))&&(m=V(a,"backgroundImage").replace(A,""),m&&"none"!==m)){for(h=q.split(" "),i=r.split(" "),L.setAttribute("src",m),j=2;--j>-1;)q=h[j],k=-1!==q.indexOf("%"),k!==(-1!==i[j].indexOf("%"))&&(l=0===j?a.offsetWidth-L.width:a.offsetHeight-L.height,h[j]=k?parseFloat(q)/100*l+"px":parseFloat(q)/l*100+"%");q=h.join(" ")}return this.parseComplex(a.style,q,r,f,g)},formatter:ba}),qa("backgroundSize",{defaultValue:"0 0",formatter:ba}),qa("perspective",{defaultValue:"0px",prefix:!0}),qa("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),qa("transformStyle",{prefix:!0}),qa("backfaceVisibility",{prefix:!0}),qa("userSelect",{prefix:!0}),qa("margin",{parser:ka("marginTop,marginRight,marginBottom,marginLeft")}),qa("padding",{parser:ka("paddingTop,paddingRight,paddingBottom,paddingLeft")}),qa("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(a,b,c,d,f,g){var h,i,j;return 9>o?(i=a.currentStyle,j=8>o?" ":",",h="rect("+i.clipTop+j+i.clipRight+j+i.clipBottom+j+i.clipLeft+")",b=this.format(b).split(",").join(j)):(h=this.format(V(a,this.p,e,!1,this.dflt)),b=this.format(b)),this.parseComplex(a.style,h,b,f,g)}}),qa("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),qa("autoRound,strictUnits",{parser:function(a,b,c,d,e){return e}}),qa("border",{defaultValue:"0px solid #000",parser:function(a,b,c,d,f,g){return this.parseComplex(a.style,this.format(V(a,"borderTopWidth",e,!1,"0px")+" "+V(a,"borderTopStyle",e,!1,"solid")+" "+V(a,"borderTopColor",e,!1,"#000")),this.format(b),f,g)},color:!0,formatter:function(a){var b=a.split(" ");return b[0]+" "+(b[1]||"solid")+" "+(a.match(ia)||["#000"])[0]}}),qa("borderWidth",{parser:ka("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),qa("float,cssFloat,styleFloat",{parser:function(a,b,c,d,e,f){var g=a.style,h="cssFloat"in g?"cssFloat":"styleFloat";return new ma(g,h,0,0,e,-1,c,!1,0,g[h],b)}});var Ca=function(a){var b,c=this.t,d=c.filter||V(this.data,"filter"),e=this.s+this.c*a|0;100===e&&(-1===d.indexOf("atrix(")&&-1===d.indexOf("radient(")&&-1===d.indexOf("oader(")?(c.removeAttribute("filter"),b=!V(this.data,"filter")):(c.filter=d.replace(w,""),b=!0)),b||(this.xn1&&(c.filter=d=d||"alpha(opacity="+e+")"),-1===d.indexOf("pacity")?0===e&&this.xn1||(c.filter=d+" alpha(opacity="+e+")"):c.filter=d.replace(u,"opacity="+e))};qa("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(a,b,c,d,f,g){var h=parseFloat(V(a,"opacity",e,!1,"1")),i=a.style,j="autoAlpha"===c;return"string"==typeof b&&"="===b.charAt(1)&&(b=("-"===b.charAt(0)?-1:1)*parseFloat(b.substr(2))+h),j&&1===h&&"hidden"===V(a,"visibility",e)&&0!==b&&(h=0),O?f=new ma(i,"opacity",h,b-h,f):(f=new ma(i,"opacity",100*h,100*(b-h),f),f.xn1=j?1:0,i.zoom=1,f.type=2,f.b="alpha(opacity="+f.s+")",f.e="alpha(opacity="+(f.s+f.c)+")",f.data=a,f.plugin=g,f.setRatio=Ca),j&&(f=new ma(i,"visibility",0,0,f,-1,null,!1,0,0!==h?"inherit":"hidden",0===b?"hidden":"inherit"),f.xs0="inherit",d._overwriteProps.push(f.n),d._overwriteProps.push(c)),f}});var Da=function(a,b){b&&(a.removeProperty?("ms"===b.substr(0,2)&&(b="M"+b.substr(1)),a.removeProperty(b.replace(y,"-$1").toLowerCase())):a.removeAttribute(b))},Ea=function(a){if(this.t._gsClassPT=this,1===a||0===a){this.t.setAttribute("class",0===a?this.b:this.e);for(var b=this.data,c=this.t.style;b;)b.v?c[b.p]=b.v:Da(c,b.p),b=b._next;1===a&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};qa("className",{parser:function(a,b,d,f,g,h,i){var j,k,l,m,n,o=a.getAttribute("class")||"",p=a.style.cssText;if(g=f._classNamePT=new ma(a,d,0,0,g,2),g.setRatio=Ea,g.pr=-11,c=!0,g.b=o,k=Y(a,e),l=a._gsClassPT){for(m={},n=l.data;n;)m[n.p]=1,n=n._next;l.setRatio(1)}return a._gsClassPT=g,g.e="="!==b.charAt(1)?b:o.replace(new RegExp("\\s*\\b"+b.substr(2)+"\\b"),"")+("+"===b.charAt(0)?" "+b.substr(2):""),f._tween._duration&&(a.setAttribute("class",g.e),j=Z(a,k,Y(a),i,m),a.setAttribute("class",o),g.data=j.firstMPT,a.style.cssText=p,g=g.xfirst=f.parse(a,j.difs,g,h)),g}});var Fa=function(a){if((1===a||0===a)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var b,c,d,e,f=this.t.style,g=h.transform.parse;if("all"===this.e)f.cssText="",e=!0;else for(b=this.e.split(","),d=b.length;--d>-1;)c=b[d],h[c]&&(h[c].parse===g?e=!0:c="transformOrigin"===c?va:h[c].p),Da(f,c);e&&(Da(f,ta),this.t._gsTransform&&delete this.t._gsTransform)}};for(qa("clearProps",{parser:function(a,b,d,e,f){return f=new ma(a,d,0,0,f,2),f.setRatio=Fa,f.e=b,f.pr=-10,f.data=e._tween,c=!0,f}}),i="bezier,throwProps,physicsProps,physics2D".split(","),oa=i.length;oa--;)ra(i[oa]);i=g.prototype,i._firstPT=null,i._onInitTween=function(a,b,h){if(!a.nodeType)return!1;this._target=a,this._tween=h,this._vars=b,j=b.autoRound,c=!1,d=b.suffixMap||g.suffixMap,e=U(a,""),f=this._overwriteProps;var i,m,o,p,q,r,s,t,u,w=a.style;if(k&&""===w.zIndex&&(i=V(a,"zIndex",e),("auto"===i||""===i)&&this._addLazySet(w,"zIndex",0)),"string"==typeof b&&(p=w.cssText,i=Y(a,e),w.cssText=p+";"+b,i=Z(a,i,Y(a)).difs,!O&&v.test(b)&&(i.opacity=parseFloat(RegExp.$1)),b=i,w.cssText=p),this._firstPT=m=this.parse(a,b,null),this._transformType){for(u=3===this._transformType,ta?l&&(k=!0,""===w.zIndex&&(s=V(a,"zIndex",e),("auto"===s||""===s)&&this._addLazySet(w,"zIndex",0)),n&&this._addLazySet(w,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(u?"visible":"hidden"))):w.zoom=1,o=m;o&&o._next;)o=o._next;t=new ma(a,"transform",0,0,null,2),this._linkCSSP(t,null,o),t.setRatio=u&&wa?Aa:ta?Ba:za,t.data=this._transform||ya(a,e,!0),f.pop()}if(c){for(;m;){for(r=m._next,o=p;o&&o.pr>m.pr;)o=o._next;(m._prev=o?o._prev:q)?m._prev._next=m:p=m,(m._next=o)?o._prev=m:q=m,m=r}this._firstPT=p}return!0},i.parse=function(a,b,c,f){var g,i,k,l,m,n,o,p,q,r,s=a.style;for(g in b)n=b[g],i=h[g],i?c=i.parse(a,n,g,this,c,f,b):(m=V(a,g,e)+"",q="string"==typeof n,"color"===g||"fill"===g||"stroke"===g||-1!==g.indexOf("Color")||q&&x.test(n)?(q||(n=ha(n),n=(n.length>3?"rgba(":"rgb(")+n.join(",")+")"),c=na(s,g,m,n,!0,"transparent",c,0,f)):!q||-1===n.indexOf(" ")&&-1===n.indexOf(",")?(k=parseFloat(m),o=k||0===k?m.substr((k+"").length):"",(""===m||"auto"===m)&&("width"===g||"height"===g?(k=aa(a,g,e),o="px"):"left"===g||"top"===g?(k=X(a,g,e),o="px"):(k="opacity"!==g?0:1,o="")),r=q&&"="===n.charAt(1),r?(l=parseInt(n.charAt(0)+"1",10),n=n.substr(2),l*=parseFloat(n),p=n.replace(t,"")):(l=parseFloat(n),p=q?n.substr((l+"").length)||"":""),""===p&&(p=g in d?d[g]:o),n=l||0===l?(r?l+k:l)+p:b[g],o!==p&&""!==p&&(l||0===l)&&k&&(k=W(a,g,k,o),"%"===p?(k/=W(a,g,100,"%")/100,b.strictUnits!==!0&&(m=k+"%")):"em"===p?k/=W(a,g,1,"em"):"px"!==p&&(l=W(a,g,l,p),p="px"),r&&(l||0===l)&&(n=l+k+p)),r&&(l+=k),!k&&0!==k||!l&&0!==l?void 0!==s[g]&&(n||n+""!="NaN"&&null!=n)?(c=new ma(s,g,l||k||0,0,c,-1,g,!1,0,m,n),c.xs0="none"!==n||"display"!==g&&-1===g.indexOf("Style")?n:m):Q("invalid "+g+" tween value: "+b[g]):(c=new ma(s,g,k,l-k,c,0,g,j!==!1&&("px"===p||"zIndex"===g),0,m,n),c.xs0=p)):c=na(s,g,m,n,!0,null,c,0,f)),f&&c&&!c.plugin&&(c.plugin=f);return c},i.setRatio=function(a){var b,c,d,e=this._firstPT,f=1e-6;if(1!==a||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(a||this._tween._time!==this._tween._duration&&0!==this._tween._time||this._tween._rawPrevTime===-1e-6)for(;e;){if(b=e.c*a+e.s,e.r?b=Math.round(b):f>b&&b>-f&&(b=0),e.type)if(1===e.type)if(d=e.l,2===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2;else if(3===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3;else if(4===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4;else if(5===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4+e.xn4+e.xs5;else{for(c=e.xs0+b+e.xs1,d=1;d<e.l;d++)c+=e["xn"+d]+e["xs"+(d+1)];e.t[e.p]=c}else-1===e.type?e.t[e.p]=e.xs0:e.setRatio&&e.setRatio(a);else e.t[e.p]=b+e.xs0;e=e._next}else for(;e;)2!==e.type?e.t[e.p]=e.b:e.setRatio(a),e=e._next;else for(;e;)2!==e.type?e.t[e.p]=e.e:e.setRatio(a),e=e._next},i._enableTransforms=function(a){this._transformType=a||3===this._transformType?3:2,this._transform=this._transform||ya(this._target,e,!0)};var Ga=function(a){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};i._addLazySet=function(a,b,c){var d=this._firstPT=new ma(a,b,0,0,this._firstPT,2);d.e=c,d.setRatio=Ga,d.data=this},i._linkCSSP=function(a,b,c,d){return a&&(b&&(b._prev=a),a._next&&(a._next._prev=a._prev),a._prev?a._prev._next=a._next:this._firstPT===a&&(this._firstPT=a._next,d=!0),c?c._next=a:d||null!==this._firstPT||(this._firstPT=a),a._next=b,a._prev=c),a},i._kill=function(b){var c,d,e,f=b;if(b.autoAlpha||b.alpha){f={};for(d in b)f[d]=b[d];f.opacity=1,f.autoAlpha&&(f.visibility=1)}return b.className&&(c=this._classNamePT)&&(e=c.xfirst,e&&e._prev?this._linkCSSP(e._prev,c._next,e._prev._prev):e===this._firstPT&&(this._firstPT=c._next),c._next&&this._linkCSSP(c._next,c._next._next,e._prev),this._classNamePT=null),a.prototype._kill.call(this,f)};var Ha=function(a,b,c){var d,e,f,g;if(a.slice)for(e=a.length;--e>-1;)Ha(a[e],b,c);else for(d=a.childNodes,e=d.length;--e>-1;)f=d[e],g=f.type,f.style&&(b.push(Y(f)),c&&c.push(f)),1!==g&&9!==g&&11!==g||!f.childNodes.length||Ha(f,b,c)};return g.cascadeTo=function(a,c,d){var e,f,g,h=b.to(a,c,d),i=[h],j=[],k=[],l=[],m=b._internals.reservedProps;for(a=h._targets||h.target,Ha(a,j,l),h.render(c,!0),Ha(a,k),h.render(0,!0),h._enabled(!0),e=l.length;--e>-1;)if(f=Z(l[e],j[e],k[e]),f.firstMPT){f=f.difs;for(g in d)m[g]&&(f[g]=d[g]);i.push(b.to(l[e],c,f))}return i},a.activate([g]),g},!0),function(){var a=window._gsDefine.plugin({propName:"roundProps",priority:-1,API:2,init:function(a,b,c){return this._tween=c,!0}}),b=a.prototype;b._onInitAllProps=function(){for(var a,b,c,d=this._tween,e=d.vars.roundProps instanceof Array?d.vars.roundProps:d.vars.roundProps.split(","),f=e.length,g={},h=d._propLookup.roundProps;--f>-1;)g[e[f]]=1;for(f=e.length;--f>-1;)for(a=e[f],b=d._firstPT;b;)c=b._next,b.pg?b.t._roundProps(g,!0):b.n===a&&(this._add(b.t,a,b.s,b.c),c&&(c._prev=b._prev),b._prev?b._prev._next=c:d._firstPT===b&&(d._firstPT=c),b._next=b._prev=null,d._propLookup[a]=h),b=c;return!1},b._add=function(a,b,c,d){this._addTween(a,b,c,c+d,b,!0),this._overwriteProps.push(b)}}(),window._gsDefine.plugin({propName:"attr",API:2,version:"0.3.2",init:function(a,b,c){var d,e,f;if("function"!=typeof a.setAttribute)return!1;this._target=a,this._proxy={},this._start={},this._end={};for(d in b)this._start[d]=this._proxy[d]=e=a.getAttribute(d),f=this._addTween(this._proxy,d,parseFloat(e),b[d],d),this._end[d]=f?f.s+f.c:b[d],this._overwriteProps.push(d);return!0},set:function(a){this._super.setRatio.call(this,a);for(var b,c=this._overwriteProps,d=c.length,e=1===a?this._end:a?this._proxy:this._start;--d>-1;)b=c[d],this._target.setAttribute(b,e[b]+"")}}),window._gsDefine.plugin({propName:"directionalRotation",API:2,version:"0.2.0",init:function(a,b,c){"object"!=typeof b&&(b={rotation:b}),this.finals={};var d,e,f,g,h,i,j=b.useRadians===!0?2*Math.PI:360,k=1e-6;for(d in b)"useRadians"!==d&&(i=(b[d]+"").split("_"),e=i[0],f=parseFloat("function"!=typeof a[d]?a[d]:a[d.indexOf("set")||"function"!=typeof a["get"+d.substr(3)]?d:"get"+d.substr(3)]()),g=this.finals[d]="string"==typeof e&&"="===e.charAt(1)?f+parseInt(e.charAt(0)+"1",10)*Number(e.substr(2)):Number(e)||0,h=g-f,i.length&&(e=i.join("_"),-1!==e.indexOf("short")&&(h%=j,h!==h%(j/2)&&(h=0>h?h+j:h-j)),-1!==e.indexOf("_cw")&&0>h?h=(h+9999999999*j)%j-(h/j|0)*j:-1!==e.indexOf("ccw")&&h>0&&(h=(h-9999999999*j)%j-(h/j|0)*j)),(h>k||-k>h)&&(this._addTween(a,d,f,f+h,d),this._overwriteProps.push(d)));return!0},set:function(a){var b;if(1!==a)this._super.setRatio.call(this,a);else for(b=this._firstPT;b;)b.f?b.t[b.p](this.finals[b.p]):b.t[b.p]=this.finals[b.p],b=b._next}})._autoCSS=!0,window._gsDefine("easing.Back",["easing.Ease"],function(a){var b,c,d,e=window.GreenSockGlobals||window,f=e.com.greensock,g=2*Math.PI,h=Math.PI/2,i=f._class,j=function(b,c){var d=i("easing."+b,function(){},!0),e=d.prototype=new a;return e.constructor=d,e.getRatio=c,d},k=a.register||function(){},l=function(a,b,c,d,e){var f=i("easing."+a,{easeOut:new b,easeIn:new c,easeInOut:new d},!0);return k(f,a),f},m=function(a,b,c){this.t=a,this.v=b,c&&(this.next=c,c.prev=this,this.c=c.v-b,this.gap=c.t-a)},n=function(b,c){var d=i("easing."+b,function(a){this._p1=a||0===a?a:1.70158,this._p2=1.525*this._p1},!0),e=d.prototype=new a;return e.constructor=d,e.getRatio=c,e.config=function(a){return new d(a)},d},o=l("Back",n("BackOut",function(a){return(a-=1)*a*((this._p1+1)*a+this._p1)+1}),n("BackIn",function(a){return a*a*((this._p1+1)*a-this._p1)}),n("BackInOut",function(a){return(a*=2)<1?.5*a*a*((this._p2+1)*a-this._p2):.5*((a-=2)*a*((this._p2+1)*a+this._p2)+2)})),p=i("easing.SlowMo",function(a,b,c){b=b||0===b?b:.7,null==a?a=.7:a>1&&(a=1),this._p=1!==a?b:0,this._p1=(1-a)/2,this._p2=a,this._p3=this._p1+this._p2,this._calcEnd=c===!0},!0),q=p.prototype=new a;return q.constructor=p,q.getRatio=function(a){var b=a+(.5-a)*this._p;return a<this._p1?this._calcEnd?1-(a=1-a/this._p1)*a:b-(a=1-a/this._p1)*a*a*a*b:a>this._p3?this._calcEnd?1-(a=(a-this._p3)/this._p1)*a:b+(a-b)*(a=(a-this._p3)/this._p1)*a*a*a:this._calcEnd?1:b},p.ease=new p(.7,.7),q.config=p.config=function(a,b,c){return new p(a,b,c)},b=i("easing.SteppedEase",function(a){a=a||1,this._p1=1/a,this._p2=a+1},!0),q=b.prototype=new a,q.constructor=b,q.getRatio=function(a){return 0>a?a=0:a>=1&&(a=.999999999),(this._p2*a>>0)*this._p1},q.config=b.config=function(a){return new b(a)},c=i("easing.RoughEase",function(b){b=b||{};for(var c,d,e,f,g,h,i=b.taper||"none",j=[],k=0,l=0|(b.points||20),n=l,o=b.randomize!==!1,p=b.clamp===!0,q=b.template instanceof a?b.template:null,r="number"==typeof b.strength?.4*b.strength:.4;--n>-1;)c=o?Math.random():1/l*n,d=q?q.getRatio(c):c,"none"===i?e=r:"out"===i?(f=1-c,e=f*f*r):"in"===i?e=c*c*r:.5>c?(f=2*c,e=f*f*.5*r):(f=2*(1-c),e=f*f*.5*r),o?d+=Math.random()*e-.5*e:n%2?d+=.5*e:d-=.5*e,p&&(d>1?d=1:0>d&&(d=0)),j[k++]={x:c,y:d};for(j.sort(function(a,b){return a.x-b.x}),h=new m(1,1,null),n=l;--n>-1;)g=j[n],h=new m(g.x,g.y,h);this._prev=new m(0,0,0!==h.t?h:h.next)},!0),q=c.prototype=new a,q.constructor=c,q.getRatio=function(a){var b=this._prev;if(a>b.t){for(;b.next&&a>=b.t;)b=b.next;b=b.prev}else for(;b.prev&&a<=b.t;)b=b.prev;return this._prev=b,b.v+(a-b.t)/b.gap*b.c},q.config=function(a){return new c(a)},c.ease=new c,l("Bounce",j("BounceOut",function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}),j("BounceIn",function(a){return(a=1-a)<1/2.75?1-7.5625*a*a:2/2.75>a?1-(7.5625*(a-=1.5/2.75)*a+.75):2.5/2.75>a?1-(7.5625*(a-=2.25/2.75)*a+.9375):1-(7.5625*(a-=2.625/2.75)*a+.984375)}),j("BounceInOut",function(a){var b=.5>a;return a=b?1-2*a:2*a-1,a=1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375,b?.5*(1-a):.5*a+.5})),l("Circ",j("CircOut",function(a){return Math.sqrt(1-(a-=1)*a)}),j("CircIn",function(a){return-(Math.sqrt(1-a*a)-1)}),j("CircInOut",function(a){return(a*=2)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)})),d=function(b,c,d){var e=i("easing."+b,function(a,b){this._p1=a||1,this._p2=b||d,this._p3=this._p2/g*(Math.asin(1/this._p1)||0)},!0),f=e.prototype=new a;return f.constructor=e,f.getRatio=c,f.config=function(a,b){return new e(a,b)},e},l("Elastic",d("ElasticOut",function(a){return this._p1*Math.pow(2,-10*a)*Math.sin((a-this._p3)*g/this._p2)+1},.3),d("ElasticIn",function(a){return-(this._p1*Math.pow(2,10*(a-=1))*Math.sin((a-this._p3)*g/this._p2))},.3),d("ElasticInOut",function(a){return(a*=2)<1?-.5*(this._p1*Math.pow(2,10*(a-=1))*Math.sin((a-this._p3)*g/this._p2)):this._p1*Math.pow(2,-10*(a-=1))*Math.sin((a-this._p3)*g/this._p2)*.5+1},.45)),l("Expo",j("ExpoOut",function(a){return 1-Math.pow(2,-10*a)}),j("ExpoIn",function(a){return Math.pow(2,10*(a-1))-.001}),j("ExpoInOut",function(a){return(a*=2)<1?.5*Math.pow(2,10*(a-1)):.5*(2-Math.pow(2,-10*(a-1)))})),l("Sine",j("SineOut",function(a){return Math.sin(a*h)}),j("SineIn",function(a){return-Math.cos(a*h)+1}),j("SineInOut",function(a){return-.5*(Math.cos(Math.PI*a)-1)})),i("easing.EaseLookup",{find:function(b){return a.map[b]}},!0),k(e.SlowMo,"SlowMo","ease,"),k(c,"RoughEase","ease,"),k(b,"SteppedEase","ease,"),o},!0)}),function(a){"use strict";var b=a.GreenSockGlobals||a;if(!b.TweenLite){var c,d,e,f,g,h=function(a){var c,d=a.split("."),e=b;for(c=0;c<d.length;c++)e[d[c]]=e=e[d[c]]||{};return e},i=h("com.greensock"),j=1e-10,k=[].slice,l=function(){},m=function(){var a=Object.prototype.toString,b=a.call([]);return function(c){return null!=c&&(c instanceof Array||"object"==typeof c&&!!c.push&&a.call(c)===b)}}(),n={},o=function(c,d,e,f){this.sc=n[c]?n[c].sc:[],n[c]=this,this.gsClass=null,this.func=e;var g=[];this.check=function(i){for(var j,k,l,m,p=d.length,q=p;--p>-1;)(j=n[d[p]]||new o(d[p],[])).gsClass?(g[p]=j.gsClass,q--):i&&j.sc.push(this);if(0===q&&e)for(k=("com.greensock."+c).split("."),l=k.pop(),m=h(k.join("."))[l]=this.gsClass=e.apply(e,g),f&&(b[l]=m,"function"==typeof define&&define.amd?define((a.GreenSockAMDPath?a.GreenSockAMDPath+"/":"")+c.split(".").join("/"),[],function(){return m}):"undefined"!=typeof module&&module.exports&&(module.exports=m)),p=0;p<this.sc.length;p++)this.sc[p].check()},this.check(!0)},p=a._gsDefine=function(a,b,c,d){return new o(a,b,c,d)},q=i._class=function(a,b,c){return b=b||function(){},p(a,[],function(){return b},c),b};p.globals=b;var r=[0,0,1,1],s=[],t=q("easing.Ease",function(a,b,c,d){this._func=a,this._type=c||0,this._power=d||0,this._params=b?r.concat(b):r},!0),u=t.map={},v=t.register=function(a,b,c,d){for(var e,f,g,h,j=b.split(","),k=j.length,l=(c||"easeIn,easeOut,easeInOut").split(",");--k>-1;)for(f=j[k],e=d?q("easing."+f,null,!0):i.easing[f]||{},g=l.length;--g>-1;)h=l[g],u[f+"."+h]=u[h+f]=e[h]=a.getRatio?a:a[h]||new a};for(e=t.prototype,e._calcEnd=!1,e.getRatio=function(a){if(this._func)return this._params[0]=a,this._func.apply(null,this._params);var b=this._type,c=this._power,d=1===b?1-a:2===b?a:.5>a?2*a:2*(1-a);return 1===c?d*=d:2===c?d*=d*d:3===c?d*=d*d*d:4===c&&(d*=d*d*d*d),1===b?1-d:2===b?d:.5>a?d/2:1-d/2},c=["Linear","Quad","Cubic","Quart","Quint,Strong"],d=c.length;--d>-1;)e=c[d]+",Power"+d,v(new t(null,null,1,d),e,"easeOut",!0),v(new t(null,null,2,d),e,"easeIn"+(0===d?",easeNone":"")),v(new t(null,null,3,d),e,"easeInOut");u.linear=i.easing.Linear.easeIn,u.swing=i.easing.Quad.easeInOut;var w=q("events.EventDispatcher",function(a){this._listeners={},this._eventTarget=a||this});e=w.prototype,e.addEventListener=function(a,b,c,d,e){e=e||0;var h,i,j=this._listeners[a],k=0;for(null==j&&(this._listeners[a]=j=[]),i=j.length;--i>-1;)h=j[i],h.c===b&&h.s===c?j.splice(i,1):0===k&&h.pr<e&&(k=i+1);j.splice(k,0,{c:b,s:c,up:d,pr:e}),this!==f||g||f.wake()},e.removeEventListener=function(a,b){var c,d=this._listeners[a];if(d)for(c=d.length;--c>-1;)if(d[c].c===b)return void d.splice(c,1)},e.dispatchEvent=function(a){var b,c,d,e=this._listeners[a];if(e)for(b=e.length,c=this._eventTarget;--b>-1;)d=e[b],d.up?d.c.call(d.s||c,{type:a,target:c}):d.c.call(d.s||c)};var x=a.requestAnimationFrame,y=a.cancelAnimationFrame,z=Date.now||function(){return(new Date).getTime()},A=z();for(c=["ms","moz","webkit","o"],d=c.length;--d>-1&&!x;)x=a[c[d]+"RequestAnimationFrame"],y=a[c[d]+"CancelAnimationFrame"]||a[c[d]+"CancelRequestAnimationFrame"];q("Ticker",function(a,b){var c,d,e,h,i,k=this,m=z(),n=b!==!1&&x,o=500,p=33,q=function(a){var b,f,g=z()-A;g>o&&(m+=g-p),A+=g,k.time=(A-m)/1e3,b=k.time-i,(!c||b>0||a===!0)&&(k.frame++,i+=b+(b>=h?.004:h-b),f=!0),a!==!0&&(e=d(q)),f&&k.dispatchEvent("tick")};w.call(k),k.time=k.frame=0,k.tick=function(){q(!0)},k.lagSmoothing=function(a,b){o=a||1/j,p=Math.min(b,o,0)},k.sleep=function(){null!=e&&(n&&y?y(e):clearTimeout(e),d=l,e=null,k===f&&(g=!1))},k.wake=function(){null!==e?k.sleep():k.frame>10&&(A=z()-o+5),d=0===c?l:n&&x?x:function(a){return setTimeout(a,1e3*(i-k.time)+1|0)},k===f&&(g=!0),q(2)},k.fps=function(a){return arguments.length?(c=a,h=1/(c||60),i=this.time+h,void k.wake()):c},k.useRAF=function(a){return arguments.length?(k.sleep(),n=a,void k.fps(c)):n},k.fps(a),setTimeout(function(){n&&(!e||k.frame<5)&&k.useRAF(!1)},1500)}),e=i.Ticker.prototype=new i.events.EventDispatcher,e.constructor=i.Ticker;var B=q("core.Animation",function(a,b){if(this.vars=b=b||{},this._duration=this._totalDuration=a||0,this._delay=Number(b.delay)||0,this._timeScale=1,this._active=b.immediateRender===!0,this.data=b.data,this._reversed=b.reversed===!0,Q){g||f.wake();var c=this.vars.useFrames?P:Q;c.add(this,c._time),this.vars.paused&&this.paused(!0)}});f=B.ticker=new i.Ticker,e=B.prototype,e._dirty=e._gc=e._initted=e._paused=!1,e._totalTime=e._time=0,e._rawPrevTime=-1,e._next=e._last=e._onUpdate=e._timeline=e.timeline=null,e._paused=!1;var C=function(){g&&z()-A>2e3&&f.wake(),setTimeout(C,2e3)};C(),e.play=function(a,b){return null!=a&&this.seek(a,b),this.reversed(!1).paused(!1)},e.pause=function(a,b){return null!=a&&this.seek(a,b),this.paused(!0)},e.resume=function(a,b){return null!=a&&this.seek(a,b),this.paused(!1)},e.seek=function(a,b){return this.totalTime(Number(a),b!==!1)},e.restart=function(a,b){return this.reversed(!1).paused(!1).totalTime(a?-this._delay:0,b!==!1,!0)},e.reverse=function(a,b){return null!=a&&this.seek(a||this.totalDuration(),b),this.reversed(!0).paused(!1)},e.render=function(a,b,c){},e.invalidate=function(){return this},e.isActive=function(){var a,b=this._timeline,c=this._startTime;return!b||!this._gc&&!this._paused&&b.isActive()&&(a=b.rawTime())>=c&&a<c+this.totalDuration()/this._timeScale},e._enabled=function(a,b){return g||f.wake(),this._gc=!a,this._active=this.isActive(),b!==!0&&(a&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!a&&this.timeline&&this._timeline._remove(this,!0)),!1},e._kill=function(a,b){return this._enabled(!1,!1)},e.kill=function(a,b){return this._kill(a,b),this},e._uncache=function(a){for(var b=a?this:this.timeline;b;)b._dirty=!0,b=b.timeline;return this},e._swapSelfInParams=function(a){for(var b=a.length,c=a.concat();--b>-1;)"{self}"===a[b]&&(c[b]=this);return c},e.eventCallback=function(a,b,c,d){if("on"===(a||"").substr(0,2)){var e=this.vars;if(1===arguments.length)return e[a];null==b?delete e[a]:(e[a]=b,e[a+"Params"]=m(c)&&-1!==c.join("").indexOf("{self}")?this._swapSelfInParams(c):c,e[a+"Scope"]=d),"onUpdate"===a&&(this._onUpdate=b)}return this},e.delay=function(a){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+a-this._delay),this._delay=a,this):this._delay},e.duration=function(a){return arguments.length?(this._duration=this._totalDuration=a,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&0!==a&&this.totalTime(this._totalTime*(a/this._duration),!0),this):(this._dirty=!1,this._duration)},e.totalDuration=function(a){return this._dirty=!1,arguments.length?this.duration(a):this._totalDuration},e.time=function(a,b){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(a>this._duration?this._duration:a,b)):this._time},e.totalTime=function(a,b,c){if(g||f.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>a&&!c&&(a+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var d=this._totalDuration,e=this._timeline;if(a>d&&!c&&(a=d),this._startTime=(this._paused?this._pauseTime:e._time)-(this._reversed?d-a:a)/this._timeScale,e._dirty||this._uncache(!1),e._timeline)for(;e._timeline;)e._timeline._time!==(e._startTime+e._totalTime)/e._timeScale&&e.totalTime(e._totalTime,!0),e=e._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==a||0===this._duration)&&(this.render(a,b,!1),H.length&&R())}return this},e.progress=e.totalProgress=function(a,b){return arguments.length?this.totalTime(this.duration()*a,b):this._time/this.duration()},e.startTime=function(a){return arguments.length?(a!==this._startTime&&(this._startTime=a,
-this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,a-this._delay)),this):this._startTime},e.timeScale=function(a){if(!arguments.length)return this._timeScale;if(a=a||j,this._timeline&&this._timeline.smoothChildTiming){var b=this._pauseTime,c=b||0===b?b:this._timeline.totalTime();this._startTime=c-(c-this._startTime)*this._timeScale/a}return this._timeScale=a,this._uncache(!1)},e.reversed=function(a){return arguments.length?(a!=this._reversed&&(this._reversed=a,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},e.paused=function(a){if(!arguments.length)return this._paused;if(a!=this._paused&&this._timeline){g||a||f.wake();var b=this._timeline,c=b.rawTime(),d=c-this._pauseTime;!a&&b.smoothChildTiming&&(this._startTime+=d,this._uncache(!1)),this._pauseTime=a?c:null,this._paused=a,this._active=this.isActive(),!a&&0!==d&&this._initted&&this.duration()&&this.render(b.smoothChildTiming?this._totalTime:(c-this._startTime)/this._timeScale,!0,!0)}return this._gc&&!a&&this._enabled(!0,!1),this};var D=q("core.SimpleTimeline",function(a){B.call(this,0,a),this.autoRemoveChildren=this.smoothChildTiming=!0});e=D.prototype=new B,e.constructor=D,e.kill()._gc=!1,e._first=e._last=null,e._sortChildren=!1,e.add=e.insert=function(a,b,c,d){var e,f;if(a._startTime=Number(b||0)+a._delay,a._paused&&this!==a._timeline&&(a._pauseTime=a._startTime+(this.rawTime()-a._startTime)/a._timeScale),a.timeline&&a.timeline._remove(a,!0),a.timeline=a._timeline=this,a._gc&&a._enabled(!0,!0),e=this._last,this._sortChildren)for(f=a._startTime;e&&e._startTime>f;)e=e._prev;return e?(a._next=e._next,e._next=a):(a._next=this._first,this._first=a),a._next?a._next._prev=a:this._last=a,a._prev=e,this._timeline&&this._uncache(!0),this},e._remove=function(a,b){return a.timeline===this&&(b||a._enabled(!1,!0),a.timeline=null,a._prev?a._prev._next=a._next:this._first===a&&(this._first=a._next),a._next?a._next._prev=a._prev:this._last===a&&(this._last=a._prev),this._timeline&&this._uncache(!0)),this},e.render=function(a,b,c){var d,e=this._first;for(this._totalTime=this._time=this._rawPrevTime=a;e;)d=e._next,(e._active||a>=e._startTime&&!e._paused)&&(e._reversed?e.render((e._dirty?e.totalDuration():e._totalDuration)-(a-e._startTime)*e._timeScale,b,c):e.render((a-e._startTime)*e._timeScale,b,c)),e=d},e.rawTime=function(){return g||f.wake(),this._totalTime};var E=q("TweenLite",function(b,c,d){if(B.call(this,c,d),this.render=E.prototype.render,null==b)throw"Cannot tween a null target.";this.target=b="string"!=typeof b?b:E.selector(b)||b;var e,f,g,h=b.jquery||b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType),i=this.vars.overwrite;if(this._overwrite=i=null==i?O[E.defaultOverwrite]:"number"==typeof i?i>>0:O[i],(h||b instanceof Array||b.push&&m(b))&&"number"!=typeof b[0])for(this._targets=g=k.call(b,0),this._propLookup=[],this._siblings=[],e=0;e<g.length;e++)f=g[e],f?"string"!=typeof f?f.length&&f!==a&&f[0]&&(f[0]===a||f[0].nodeType&&f[0].style&&!f.nodeType)?(g.splice(e--,1),this._targets=g=g.concat(k.call(f,0))):(this._siblings[e]=S(f,this,!1),1===i&&this._siblings[e].length>1&&T(f,this,null,1,this._siblings[e])):(f=g[e--]=E.selector(f),"string"==typeof f&&g.splice(e+1,1)):g.splice(e--,1);else this._propLookup={},this._siblings=S(b,this,!1),1===i&&this._siblings.length>1&&T(b,this,null,1,this._siblings);(this.vars.immediateRender||0===c&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-j,this.render(-this._delay))},!0),F=function(b){return b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType)},G=function(a,b){var c,d={};for(c in a)N[c]||c in b&&"transform"!==c&&"x"!==c&&"y"!==c&&"width"!==c&&"height"!==c&&"className"!==c&&"border"!==c||!(!K[c]||K[c]&&K[c]._autoCSS)||(d[c]=a[c],delete a[c]);a.css=d};e=E.prototype=new B,e.constructor=E,e.kill()._gc=!1,e.ratio=0,e._firstPT=e._targets=e._overwrittenProps=e._startAt=null,e._notifyPluginsOfEnabled=e._lazy=!1,E.version="1.12.1",E.defaultEase=e._ease=new t(null,null,1,1),E.defaultOverwrite="auto",E.ticker=f,E.autoSleep=!0,E.lagSmoothing=function(a,b){f.lagSmoothing(a,b)},E.selector=a.$||a.jQuery||function(b){return a.$?(E.selector=a.$,a.$(b)):a.document?a.document.getElementById("#"===b.charAt(0)?b.substr(1):b):b};var H=[],I={},J=E._internals={isArray:m,isSelector:F,lazyTweens:H},K=E._plugins={},L=J.tweenLookup={},M=0,N=J.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},O={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},P=B._rootFramesTimeline=new D,Q=B._rootTimeline=new D,R=function(){var a=H.length;for(I={};--a>-1;)c=H[a],c&&c._lazy!==!1&&(c.render(c._lazy,!1,!0),c._lazy=!1);H.length=0};Q._startTime=f.time,P._startTime=f.frame,Q._active=P._active=!0,setTimeout(R,1),B._updateRoot=E.render=function(){var a,b,c;if(H.length&&R(),Q.render((f.time-Q._startTime)*Q._timeScale,!1,!1),P.render((f.frame-P._startTime)*P._timeScale,!1,!1),H.length&&R(),!(f.frame%120)){for(c in L){for(b=L[c].tweens,a=b.length;--a>-1;)b[a]._gc&&b.splice(a,1);0===b.length&&delete L[c]}if(c=Q._first,(!c||c._paused)&&E.autoSleep&&!P._first&&1===f._listeners.tick.length){for(;c&&c._paused;)c=c._next;c||f.sleep()}}},f.addEventListener("tick",B._updateRoot);var S=function(a,b,c){var d,e,f=a._gsTweenID;if(L[f||(a._gsTweenID=f="t"+M++)]||(L[f]={target:a,tweens:[]}),b&&(d=L[f].tweens,d[e=d.length]=b,c))for(;--e>-1;)d[e]===b&&d.splice(e,1);return L[f].tweens},T=function(a,b,c,d,e){var f,g,h,i;if(1===d||d>=4){for(i=e.length,f=0;i>f;f++)if((h=e[f])!==b)h._gc||h._enabled(!1,!1)&&(g=!0);else if(5===d)break;return g}var k,l=b._startTime+j,m=[],n=0,o=0===b._duration;for(f=e.length;--f>-1;)(h=e[f])===b||h._gc||h._paused||(h._timeline!==b._timeline?(k=k||U(b,0,o),0===U(h,k,o)&&(m[n++]=h)):h._startTime<=l&&h._startTime+h.totalDuration()/h._timeScale>l&&((o||!h._initted)&&l-h._startTime<=2e-10||(m[n++]=h)));for(f=n;--f>-1;)h=m[f],2===d&&h._kill(c,a)&&(g=!0),(2!==d||!h._firstPT&&h._initted)&&h._enabled(!1,!1)&&(g=!0);return g},U=function(a,b,c){for(var d=a._timeline,e=d._timeScale,f=a._startTime;d._timeline;){if(f+=d._startTime,e*=d._timeScale,d._paused)return-100;d=d._timeline}return f/=e,f>b?f-b:c&&f===b||!a._initted&&2*j>f-b?j:(f+=a.totalDuration()/a._timeScale/e)>b+j?0:f-b-j};e._init=function(){var a,b,c,d,e,f=this.vars,g=this._overwrittenProps,h=this._duration,i=!!f.immediateRender,j=f.ease;if(f.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),e={};for(d in f.startAt)e[d]=f.startAt[d];if(e.overwrite=!1,e.immediateRender=!0,e.lazy=i&&f.lazy!==!1,e.startAt=e.delay=null,this._startAt=E.to(this.target,0,e),i)if(this._time>0)this._startAt=null;else if(0!==h)return}else if(f.runBackwards&&0!==h)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{c={};for(d in f)N[d]&&"autoCSS"!==d||(c[d]=f[d]);if(c.overwrite=0,c.data="isFromStart",c.lazy=i&&f.lazy!==!1,c.immediateRender=i,this._startAt=E.to(this.target,0,c),i){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1)}if(j?j instanceof t?this._ease=f.easeParams instanceof Array?j.config.apply(j,f.easeParams):j:this._ease="function"==typeof j?new t(j,f.easeParams):u[j]||E.defaultEase:this._ease=E.defaultEase,this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(a=this._targets.length;--a>-1;)this._initProps(this._targets[a],this._propLookup[a]={},this._siblings[a],g?g[a]:null)&&(b=!0);else b=this._initProps(this.target,this._propLookup,this._siblings,g);if(b&&E._onPluginEvent("_onInitAllProps",this),g&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),f.runBackwards)for(c=this._firstPT;c;)c.s+=c.c,c.c=-c.c,c=c._next;this._onUpdate=f.onUpdate,this._initted=!0},e._initProps=function(b,c,d,e){var f,g,h,i,j,k;if(null==b)return!1;I[b._gsTweenID]&&R(),this.vars.css||b.style&&b!==a&&b.nodeType&&K.css&&this.vars.autoCSS!==!1&&G(this.vars,b);for(f in this.vars){if(k=this.vars[f],N[f])k&&(k instanceof Array||k.push&&m(k))&&-1!==k.join("").indexOf("{self}")&&(this.vars[f]=k=this._swapSelfInParams(k,this));else if(K[f]&&(i=new K[f])._onInitTween(b,this.vars[f],this)){for(this._firstPT=j={_next:this._firstPT,t:i,p:"setRatio",s:0,c:1,f:!0,n:f,pg:!0,pr:i._priority},g=i._overwriteProps.length;--g>-1;)c[i._overwriteProps[g]]=this._firstPT;(i._priority||i._onInitAllProps)&&(h=!0),(i._onDisable||i._onEnable)&&(this._notifyPluginsOfEnabled=!0)}else this._firstPT=c[f]=j={_next:this._firstPT,t:b,p:f,f:"function"==typeof b[f],n:f,pg:!1,pr:0},j.s=j.f?b[f.indexOf("set")||"function"!=typeof b["get"+f.substr(3)]?f:"get"+f.substr(3)]():parseFloat(b[f]),j.c="string"==typeof k&&"="===k.charAt(1)?parseInt(k.charAt(0)+"1",10)*Number(k.substr(2)):Number(k)-j.s||0;j&&j._next&&(j._next._prev=j)}return e&&this._kill(e,b)?this._initProps(b,c,d,e):this._overwrite>1&&this._firstPT&&d.length>1&&T(b,this,c,this._overwrite,d)?(this._kill(c,b),this._initProps(b,c,d,e)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(I[b._gsTweenID]=!0),h)},e.render=function(a,b,c){var d,e,f,g,h=this._time,i=this._duration,k=this._rawPrevTime;if(a>=i)this._totalTime=this._time=i,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(d=!0,e="onComplete"),0===i&&(this._initted||!this.vars.lazy||c)&&(this._startTime===this._timeline._duration&&(a=0),(0===a||0>k||k===j)&&k!==a&&(c=!0,k>j&&(e="onReverseComplete")),this._rawPrevTime=g=!b||a||k===a?a:j);else if(1e-7>a)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==h||0===i&&k>0&&k!==j)&&(e="onReverseComplete",d=this._reversed),0>a?(this._active=!1,0===i&&(this._initted||!this.vars.lazy||c)&&(k>=0&&(c=!0),this._rawPrevTime=g=!b||a||k===a?a:j)):this._initted||(c=!0);else if(this._totalTime=this._time=a,this._easeType){var l=a/i,m=this._easeType,n=this._easePower;(1===m||3===m&&l>=.5)&&(l=1-l),3===m&&(l*=2),1===n?l*=l:2===n?l*=l*l:3===n?l*=l*l*l:4===n&&(l*=l*l*l*l),1===m?this.ratio=1-l:2===m?this.ratio=l:.5>a/i?this.ratio=l/2:this.ratio=1-l/2}else this.ratio=this._ease.getRatio(a/i);if(this._time!==h||c){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!c&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=h,this._rawPrevTime=k,H.push(this),void(this._lazy=a);this._time&&!d?this.ratio=this._ease.getRatio(this._time/i):d&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==h&&a>=0&&(this._active=!0),0===h&&(this._startAt&&(a>=0?this._startAt.render(a,b,c):e||(e="_dummyGS")),this.vars.onStart&&(0!==this._time||0===i)&&(b||this.vars.onStart.apply(this.vars.onStartScope||this,this.vars.onStartParams||s))),f=this._firstPT;f;)f.f?f.t[f.p](f.c*this.ratio+f.s):f.t[f.p]=f.c*this.ratio+f.s,f=f._next;this._onUpdate&&(0>a&&this._startAt&&this._startTime&&this._startAt.render(a,b,c),b||(this._time!==h||d)&&this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||s)),e&&(this._gc||(0>a&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(a,b,c),d&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[e]&&this.vars[e].apply(this.vars[e+"Scope"]||this,this.vars[e+"Params"]||s),0===i&&this._rawPrevTime===j&&g!==j&&(this._rawPrevTime=0)))}},e._kill=function(a,b){if("all"===a&&(a=null),null==a&&(null==b||b===this.target))return this._lazy=!1,this._enabled(!1,!1);b="string"!=typeof b?b||this._targets||this.target:E.selector(b)||b;var c,d,e,f,g,h,i,j;if((m(b)||F(b))&&"number"!=typeof b[0])for(c=b.length;--c>-1;)this._kill(a,b[c])&&(h=!0);else{if(this._targets){for(c=this._targets.length;--c>-1;)if(b===this._targets[c]){g=this._propLookup[c]||{},this._overwrittenProps=this._overwrittenProps||[],d=this._overwrittenProps[c]=a?this._overwrittenProps[c]||{}:"all";break}}else{if(b!==this.target)return!1;g=this._propLookup,d=this._overwrittenProps=a?this._overwrittenProps||{}:"all"}if(g){i=a||g,j=a!==d&&"all"!==d&&a!==g&&("object"!=typeof a||!a._tempKill);for(e in i)(f=g[e])&&(f.pg&&f.t._kill(i)&&(h=!0),f.pg&&0!==f.t._overwriteProps.length||(f._prev?f._prev._next=f._next:f===this._firstPT&&(this._firstPT=f._next),f._next&&(f._next._prev=f._prev),f._next=f._prev=null),delete g[e]),j&&(d[e]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return h},e.invalidate=function(){return this._notifyPluginsOfEnabled&&E._onPluginEvent("_onDisable",this),this._firstPT=null,this._overwrittenProps=null,this._onUpdate=null,this._startAt=null,this._initted=this._active=this._notifyPluginsOfEnabled=this._lazy=!1,this._propLookup=this._targets?{}:[],this},e._enabled=function(a,b){if(g||f.wake(),a&&this._gc){var c,d=this._targets;if(d)for(c=d.length;--c>-1;)this._siblings[c]=S(d[c],this,!0);else this._siblings=S(this.target,this,!0)}return B.prototype._enabled.call(this,a,b),this._notifyPluginsOfEnabled&&this._firstPT?E._onPluginEvent(a?"_onEnable":"_onDisable",this):!1},E.to=function(a,b,c){return new E(a,b,c)},E.from=function(a,b,c){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,new E(a,b,c)},E.fromTo=function(a,b,c,d){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,new E(a,b,d)},E.delayedCall=function(a,b,c,d,e){return new E(b,0,{delay:a,onComplete:b,onCompleteParams:c,onCompleteScope:d,onReverseComplete:b,onReverseCompleteParams:c,onReverseCompleteScope:d,immediateRender:!1,useFrames:e,overwrite:0})},E.set=function(a,b){return new E(a,0,b)},E.getTweensOf=function(a,b){if(null==a)return[];a="string"!=typeof a?a:E.selector(a)||a;var c,d,e,f;if((m(a)||F(a))&&"number"!=typeof a[0]){for(c=a.length,d=[];--c>-1;)d=d.concat(E.getTweensOf(a[c],b));for(c=d.length;--c>-1;)for(f=d[c],e=c;--e>-1;)f===d[e]&&d.splice(c,1)}else for(d=S(a).concat(),c=d.length;--c>-1;)(d[c]._gc||b&&!d[c].isActive())&&d.splice(c,1);return d},E.killTweensOf=E.killDelayedCallsTo=function(a,b,c){"object"==typeof b&&(c=b,b=!1);for(var d=E.getTweensOf(a,b),e=d.length;--e>-1;)d[e]._kill(c,a)};var V=q("plugins.TweenPlugin",function(a,b){this._overwriteProps=(a||"").split(","),this._propName=this._overwriteProps[0],this._priority=b||0,this._super=V.prototype},!0);if(e=V.prototype,V.version="1.10.1",V.API=2,e._firstPT=null,e._addTween=function(a,b,c,d,e,f){var g,h;return null!=d&&(g="number"==typeof d||"="!==d.charAt(1)?Number(d)-c:parseInt(d.charAt(0)+"1",10)*Number(d.substr(2)))?(this._firstPT=h={_next:this._firstPT,t:a,p:b,s:c,c:g,f:"function"==typeof a[b],n:e||b,r:f},h._next&&(h._next._prev=h),h):void 0},e.setRatio=function(a){for(var b,c=this._firstPT,d=1e-6;c;)b=c.c*a+c.s,c.r?b=Math.round(b):d>b&&b>-d&&(b=0),c.f?c.t[c.p](b):c.t[c.p]=b,c=c._next},e._kill=function(a){var b,c=this._overwriteProps,d=this._firstPT;if(null!=a[this._propName])this._overwriteProps=[];else for(b=c.length;--b>-1;)null!=a[c[b]]&&c.splice(b,1);for(;d;)null!=a[d.n]&&(d._next&&(d._next._prev=d._prev),d._prev?(d._prev._next=d._next,d._prev=null):this._firstPT===d&&(this._firstPT=d._next)),d=d._next;return!1},e._roundProps=function(a,b){for(var c=this._firstPT;c;)(a[this._propName]||null!=c.n&&a[c.n.split(this._propName+"_").join("")])&&(c.r=b),c=c._next},E._onPluginEvent=function(a,b){var c,d,e,f,g,h=b._firstPT;if("_onInitAllProps"===a){for(;h;){for(g=h._next,d=e;d&&d.pr>h.pr;)d=d._next;(h._prev=d?d._prev:f)?h._prev._next=h:e=h,(h._next=d)?d._prev=h:f=h,h=g}h=b._firstPT=e}for(;h;)h.pg&&"function"==typeof h.t[a]&&h.t[a]()&&(c=!0),h=h._next;return c},V.activate=function(a){for(var b=a.length;--b>-1;)a[b].API===V.API&&(K[(new a[b])._propName]=a[b]);return!0},p.plugin=function(a){if(!(a&&a.propName&&a.init&&a.API))throw"illegal plugin definition.";var b,c=a.propName,d=a.priority||0,e=a.overwriteProps,f={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_roundProps",initAll:"_onInitAllProps"},g=q("plugins."+c.charAt(0).toUpperCase()+c.substr(1)+"Plugin",function(){V.call(this,c,d),this._overwriteProps=e||[]},a.global===!0),h=g.prototype=new V(c);h.constructor=g,g.API=a.API;for(b in f)"function"==typeof a[b]&&(h[f[b]]=a[b]);return g.version=a.version,V.activate([g]),g},c=a._gsQueue){for(d=0;d<c.length;d++)c[d]();for(e in n)!n[e].func}g=!1}}(window),angular.module("att.abs.transition",[]).factory("$transition",["$q","$timeout","$rootScope",function(a,b,c){function d(a){for(var b in a)if(void 0!==f.style[b])return a[b]}var e=function(d,f,g){g=g||{};var h=a.defer(),i=e[g.animation?"animationEndEventName":"transitionEndEventName"],j=function(){c.$apply(function(){d.unbind(i,j),h.resolve(d)})};return i&&d.bind(i,j),b(function(){angular.isString(f)?d.addClass(f):angular.isFunction(f)?f(d):angular.isObject(f)&&d.css(f),i||h.resolve(d)},100),h.promise.cancel=function(){i&&d.unbind(i,j),h.reject("Transition cancelled")},h.promise},f=document.createElement("trans"),g={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},h={WebkitTransition:"webkitAnimationEnd",MozTransition:"animationend",OTransition:"oAnimationEnd",transition:"animationend"};return e.transitionEndEventName=d(g),e.animationEndEventName=d(h),e}]).factory("$scrollTo",["$window",function(a){var b=function(b,c,d){TweenMax.to(a,d||1,{scrollTo:{y:c,x:b},ease:Power4.easeOut})};return b}]).factory("animation",function(){return TweenMax}).factory("$progressBar",function(){var a=function(a){var b=function(b,c){TweenMax.to({},c,{onUpdateParams:["{self}"],onUpdate:a,onComplete:b})};return function(){return b}()};return a}).factory("$height",function(){var a=function(a,b,c,d){TweenMax.to(a,b,{height:c,autoAlpha:d},0)};return a}),angular.module("att.abs.accordion",["att.abs.utilities","att.abs.position","att.abs.transition"]).constant("accordionConfig",{closeOthers:!1}).controller("AccordionController",["$scope","$attrs","accordionConfig","$log",function(a,b,c,d){this.groups=[],this.index=-1,this.scope=a,a.forceExpand=!1,this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&!a.forceExpand&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)}),this.groups.indexOf(d)===this.groups.length-1&&a.forceExpand&&(a.forceExpand=!1)},this.expandAll=function(){a.forceExpand=!0,angular.forEach(this.groups,function(a){a.isOpen=!0})},this.collapseAll=function(){angular.forEach(this.groups,function(a){a.isOpen=!1})},this.focus=function(a){var b=this;angular.forEach(this.groups,function(c,d){c!==a?c.focused=!1:(b.index=d,c.focused=!0)})},this.blur=function(a){a.focused=!1,this.index=-1,d.log("accordion.blur()",a)},this.cycle=function(b,c,d){if(c)if(this.index===this.groups.length-1){if(d)return this.index=0,b.focused=!1,void a.$apply();this.index=0}else this.index++;else this.index<=0&&!d?this.index=this.groups.length-1:this.index--;b.focused=!1,this.groups[this.index].setFocus=!0,this.groups[this.index].focused=!0,a.$apply()},this.addGroup=function(a){var b=this;a.index=this.groups.length,a.focused=!1,this.groups.push(a),this.groups.length>0&&(this.index=0),a.$on("$destroy",function(){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(this.groups.indexOf(a),1)}}]).directive("accordion",function(){return{restrict:"EA",controller:"AccordionController",transclude:!0,replace:!1,scope:{cClass:"@css",expandAll:"=?",collapseAll:"=?"},template:'<div class="{{cClass}}" ng-transclude></div>',link:function(a,b,c,d){a.$watch("expandAll",function(b){b&&(d.expandAll(),a.expandAll=!1)}),a.$watch("collapseAll",function(b){b&&(d.collapseAll(),a.collapseAll=!1)})}}}).directive("accordionGroup",[function(){return{require:["^accordion","accordionGroup"],restrict:"EA",transclude:!0,replace:!0,templateUrl:"app/scripts/ng_js_att_tpls/accordion/accordion.html",scope:{heading:"@",isOpen:"=?"},controller:["$scope",function(a){a.showicon=!0,this.setHeading=function(b){this.heading=b,a.showicon=!1},this.isIsOpen=function(){return a.isOpen}}],link:function(a,b,c,d){var e=d[0],f=d[1],g={tab:9,enter:13,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,left:37,up:38,right:39,down:40},h=b.children().eq(0);a.setFocus=!1;var i=function(b){var c=!0;switch(b.keyCode){case g.enter:b.preventDefault(),a.toggle(),a.$apply();break;case g.up:case g.left:b.preventDefault(),e.cycle(a,!1);break;case g.down:case g.right:b.preventDefault(),e.cycle(a,!0);break;default:c=!1}return b.stopPropagation(),c};angular.isUndefined(a.isOpen)&&(a.isOpen=!1),h.bind("keydown",i),e.addGroup(a),0===a.index&&(a.focused=!0),f.toggle=a.toggle=function(){return a.isOpen=!a.isOpen,e.focus(a),a.isOpen},a.$watch("isOpen",function(b){b&&e.closeOthers(a)}),a.$watch("focused",function(b){b?(h.attr("tabindex","0"),a.setFocus&&h[0].focus()):(a.setFocus=!1,h.attr("tabindex","-1"))})}}}]).directive("accordionToggle",function(){return{restrict:"EA",require:"^accordionGroup",scope:{expandIcon:"@",collapseIcon:"@"},link:function(a,b,c,d){var e=function(c){a.expandIcon&&a.collapseIcon&&(c?(b.removeClass(a.expandIcon),b.addClass(a.collapseIcon)):(b.removeClass(a.collapseIcon),b.addClass(a.expandIcon)))};b.bind("click",function(){d.toggle(),a.$apply()}),a.$watch(function(){return d.isIsOpen()},function(a){e(a)})}}}).directive("accordionHeading",function(){return{restrict:"EA",transclude:!0,template:"",require:"^accordionGroup",compile:function(a,b,c){var d=function(a,b,d,e){c(a,function(a){b.append(a),e.setHeading(b)})};return d}}}).directive("accordionTransclude",function(){return{require:"^accordionGroup",link:function(a,b,c,d){a.$watch(function(){return d[c.accordionTransclude]},function(a){a&&b.find("span").eq(0).prepend(a)})}}}).directive("attGoTop",["$scrollTo",function(a){return{restrict:"A",transclude:!1,link:function(b,c,d){c.bind("click",function(){a(0,d.attGoTop)})}}}]).directive("attGoTo",["$anchorScroll","$location",function(a,b){return{restrict:"A",transclude:!1,link:function(c,d,e){d.bind("click",function(){var c=e.attGoTo;b.hash()!==c?b.hash(e.attGoTo):a()})}}}]).directive("freeStanding",function(){return{restrict:"EA",transclude:!0,replace:!0,scope:!0,template:"<div><span class='att-accordion__freestanding' ng-show='showAccordion'></span>\n<div class='section-toggle'>\n<button class='section-toggle__button' ng-click='fsToggle()'>\n {{btnText}}<i style='font-size:0.875rem' ng-class='{\"icon-chevron-up\": showAccordion,\"icon-chevron-down\": !showAccordion, }'></i> \n</button>\n</div></div>",compile:function(a,b,c){var d=function(a,b,d){a.content="",c(a,function(a){b.find("span").append(a)}),a.showAccordion=!1,a.btnText=a.showAccordion?d.hideMsg:d.showMsg,a.fsToggle=function(){a.showAccordion=!a.showAccordion,a.btnText=a.showAccordion?d.hideMsg:d.showMsg}};return d}}}).directive("expanders",function(){return{restrict:"EA",replace:!0,transclude:!0,template:"<div ng-transclude></div>",controller:["$scope",function(a){var b=null;this.setScope=function(a){b=a},this.toggle=function(){return a.isOpen=b.isOpen=!b.isOpen,b.isOpen}}],link:function(a){a.isOpen=!1}}}).directive("expanderHeading",function(){return{require:"^expanders",restrict:"EA",replace:!0,transclude:!0,scope:!0,template:"<div style='padding:10px !important' ng-transclude></div>"}}).directive("expanderBody",function(){return{restrict:"EA",require:"^expanders",replace:!0,transclude:!0,scope:{},template:"<div collapse='!isOpen'><div ng-transclude></div></div>",link:function(a,b,c,d){a.isOpen=!1,d.setScope(a)}}}).directive("expanderToggle",function(){return{restrict:"EA",require:"^expanders",scope:{expandIcon:"@",collapseIcon:"@"},link:function(a,b,c,d){var e=!1,f=function(){a.expandIcon&&a.collapseIcon&&(e?(b.removeClass(a.expandIcon),b.addClass(a.collapseIcon)):(b.removeClass(a.collapseIcon),b.addClass(a.expandIcon)))};b.bind("keydown",function(b){13===b.keyCode&&a.toggleit()}),b.bind("click",function(){a.toggleit()}),a.toggleit=function(){e=d.toggle(),f(),a.$apply()},f()}}}).directive("collapse",["$transition",function(a){var b={open:{marginTop:null,marginBottom:null,paddingTop:null,paddingBottom:null,display:"block"},closed:{marginTop:0,marginBottom:0,paddingTop:0,paddingBottom:0,display:"none"}},c=function(a,c,d){c.removeClass("collapse"),c.css({height:d}),0===d?c.css(b.closed):c.css(b.open),c.addClass("collapse")};return{link:function(d,e,f){var g,h=!0;d.$watch(function(){return e[0].scrollHeight},function(){0===e[0].scrollHeight||g||(h?c(d,e,e[0].scrollHeight+"px"):c(d,e,"auto"))});var i,j=function(b){return i&&i.cancel(),i=a(e,b),i.then(function(){i=void 0},function(){i=void 0}),i},k=function(){d.postTransition=!0,h?(h=!1,g||c(d,e,"auto")):j(angular.extend({height:e[0].scrollHeight+"px"},b.open)).then(function(){g||c(d,e,"auto")}),g=!1},l=function(){g=!0,h?(h=!1,c(d,e,0)):(c(d,e,e[0].scrollHeight+"px"),j(angular.extend({height:0},b.closed)).then(function(){d.postTransition=!1}))};d.$watch(f.collapse,function(a){a?l():k()})}}}]).directive("attAccord",function(){return{restrict:"EA",transclude:!0,replace:!0,scope:{},controller:"AttAccordCtrl",templateUrl:"app/scripts/ng_js_att_tpls/accordion/attAccordHeader.html"}}).controller("AttAccordCtrl",[function(){this.type="attAccord",this.headerCtrl,this.bodyCtrl;var a=!0;this.toggleBody=function(){a?this.expandBody():this.collapseBody(),a=!a},this.expandBody=function(){this.bodyCtrl.expand()},this.collapseBody=function(){this.bodyCtrl.collapse()}}]).controller("AttAccordHeaderCtrl",[function(){this.type="header"}]).directive("attAccordHeader",["keymap","events",function(a,b){return{restrict:"EA",transclude:!0,replace:!0,require:["^attAccord","attAccordHeader"],controller:"AttAccordHeaderCtrl",templateUrl:"app/scripts/ng_js_att_tpls/accordion/attAccordHeader.html",link:function(b,c,d,e){var f=e[0],g=e[1];f.headerCtrl=g;var h=c.children().eq(0);b.clickFunc=function(){f.toggleBody()};var i=function(c){var d=!0;switch(c.keyCode){case a.KEY.ENTER:c.preventDefault(),b.clickFunc(),b.$apply();break;default:d=!1}return c.stopPropagation(),d};angular.isUndefined(b.isOpen)&&(b.isOpen=!1),h.bind("keydown",i)}}}]).controller("AttAccordBodyCtrl",["$scope",function(a){this.type="body",this.expand=function(){a.expand()},this.collapse=function(){a.collapse()}}]).directive("attAccordBody",["$timeout","$height",function(a,b){return{restrict:"EA",transclude:!0,replace:!0,require:["^attAccord","attAccordBody"],controller:"AttAccordBodyCtrl",templateUrl:"app/scripts/ng_js_att_tpls/accordion/attAccordBody.html",link:function(c,d,e,f){var g=f[0],h=f[1];g.bodyCtrl=h;var i;a(function(){i=d[0].offsetHeight,b(d,0,0,0)}),c.expand=function(){b(d,.05,i,1)},c.collapse=function(){b(d,.25,0,0)}}}}]),angular.module("att.abs.alert",[]).directive("attAlert",[function(){return{restrict:"EA",replace:!0,transclude:!0,scope:{alertType:"@type",showTop:"@topPos",showAlert:"="},templateUrl:"app/scripts/ng_js_att_tpls/alert/alert.html",link:function(a){"true"===a.showTop?a.cssStyle={top:"50px"}:a.cssStyle={top:"0px"},a.close=function(){a.showAlert=!1}}}}]),angular.module("att.abs.boardStrip",["att.abs.utilities"]).constant("BoardStripConfig",{maxVisibleBoards:4,boardsToScroll:1,boardLength:140,boardMargin:15}).directive("attBoard",[function(){return{restrict:"AE",replace:!0,transclude:!0,require:"^attBoardStrip",scope:{boardIndex:"=",boardLabel:"="},templateUrl:"app/scripts/ng_js_att_tpls/boardStrip/attBoard.html",link:function(a,b,c,d){var e=d;a.getCurrentIndex=function(){return e.getCurrentIndex()},a.selectBoard=function(a){isNaN(a)||e.setCurrentIndex(a)},a.isInView=function(a){return e.isInView(a)}}}}]).directive("attBoardStrip",["BoardStripConfig","$timeout","$ieVersion",function(a,b,c){return{restrict:"AE",replace:!0,transclude:!0,scope:{currentIndex:"=selectedIndex",boardsMasterArray:"=",onAddBoard:"&?"},templateUrl:"app/scripts/ng_js_att_tpls/boardStrip/attBoardStrip.html",controller:function(b){if(angular.isDefined(b.boardsMasterArray)||(b.boardsMasterArray=[]),this.rectifyMaxVisibleBoards=function(){this.maxVisibleIndex>=b.boardsMasterArray.length&&(this.maxVisibleIndex=b.boardsMasterArray.length-1),this.maxVisibleIndex<0&&(this.maxVisibleIndex=0)},this.resetBoardStrip=function(){b.currentIndex=0,this.maxVisibleIndex=a.maxVisibleBoards-1,this.minVisibleIndex=0,this.rectifyMaxVisibleBoards()},b.currentIndex>0){var c=b.currentIndex;this.resetBoardStrip(),c>b.boardsMasterArray.length?b.currentIndex=b.boardsMasterArray.length-1:b.currentIndex=c}else this.resetBoardStrip();this.getCurrentIndex=function(){return b.currentIndex},this.setCurrentIndex=function(a){b.currentIndex=a},this.isInView=function(a){return a<=this.maxVisibleIndex&&a>=this.minVisibleIndex},this.getBoardsMasterArrayLength=function(){return b.boardsMasterArray.length}},link:function(d,e,f,g){var h,i=c(),j=1e3;i&&10>i&&(j=0);var k=function(b){return b*(a.boardLength+a.boardMargin)};e[0].querySelector(".board-viewport")&&angular.element(e[0].querySelector(".board-viewport")).css({width:k(a.maxVisibleBoards)+"px"});var l=function(b){return b*(a.boardLength+a.boardMargin)};e[0].querySelector(".boardstrip-container")&&(angular.element(e[0].querySelector(".boardstrip-container")).css({width:l(g.getBoardsMasterArrayLength())+"px"}),angular.element(e[0].querySelector(".boardstrip-container")).css({left:"0px"}));var m=function(){var b;return b=g.getBoardsMasterArrayLength()<=a.maxVisibleBoards?0:g.minVisibleIndex*(a.boardLength+a.boardMargin)*-1},n=function(a,b,c){for(var d=0;d<a.length;d++)angular.element(a[d]).attr("tabindex","-1");for(var d=b;c>=d;d++)angular.element(a[d]).attr("tabindex","0")};d.$watchCollection("boardsMasterArray",function(c,d){c!==d&&(c.length<d.length?(g.resetBoardStrip(),b(function(){var a=e[0].querySelectorAll("[att-board]");if(0!==a.length){var c=angular.element(e[0].querySelector(".boardstrip-container"))[0].style.left,d=m();c!==d+"px"?(angular.element(e[0].querySelector(".boardstrip-container")).css({left:d+"px"}),b.cancel(h),h=b(function(){a[0].focus()},j)):a[0].focus()}else e[0].querySelector("div.boardstrip-item--add").focus();angular.element(e[0].querySelector(".boardstrip-container")).css({width:l(g.getBoardsMasterArrayLength())+"px"})})):(g.maxVisibleIndex=g.getBoardsMasterArrayLength()-1,g.minVisibleIndex=Math.max(g.maxVisibleIndex-a.maxVisibleBoards+1,0),g.setCurrentIndex(g.maxVisibleIndex),b(function(){angular.element(e[0].querySelector(".boardstrip-container")).css({width:l(g.getBoardsMasterArrayLength())+"px"});var a=angular.element(e[0].querySelector(".boardstrip-container"))[0].style.left,c=m(),d=e[0].querySelectorAll("[att-board]");a!==c+"px"?(angular.element(e[0].querySelector(".boardstrip-container")).css({left:c+"px"}),b.cancel(h),h=b(function(){d[d.length-1].focus()},j)):d[d.length-1].focus(),n(d,g.minVisibleIndex,g.maxVisibleIndex)})))}),d.nextBoard=function(){g.maxVisibleIndex+=a.boardsToScroll,g.rectifyMaxVisibleBoards(),g.minVisibleIndex=g.maxVisibleIndex-(a.maxVisibleBoards-1),b.cancel(h),angular.element(e[0].querySelector(".boardstrip-container")).css({left:m()+"px"}),b(function(){var a=e[0].querySelectorAll("[att-board]");if(n(a,g.minVisibleIndex,g.maxVisibleIndex),!d.isNextBoard())try{a[a.length-1].focus()}catch(b){}},j)},d.prevBoard=function(){g.minVisibleIndex-=a.boardsToScroll,g.minVisibleIndex<0&&(g.minVisibleIndex=0),g.maxVisibleIndex=g.minVisibleIndex+a.maxVisibleBoards-1,g.rectifyMaxVisibleBoards(),b.cancel(h),angular.element(e[0].querySelector(".boardstrip-container")).css({left:m()+"px"}),b(function(){var a=e[0].querySelectorAll("[att-board]");if(n(a,g.minVisibleIndex,g.maxVisibleIndex),
-0===g.minVisibleIndex)try{e[0].querySelector("div.boardstrip-item--add").focus()}catch(b){}})},d.isPrevBoard=function(){return g.minVisibleIndex>0},d.isNextBoard=function(){return g.getBoardsMasterArrayLength()-1>g.maxVisibleIndex}}}}]).directive("attAddBoard",["BoardStripConfig","$parse","$timeout",function(a,b,c){return{restrict:"AE",replace:!0,require:"^attBoardStrip",scope:{onAddBoard:"&?"},templateUrl:"app/scripts/ng_js_att_tpls/boardStrip/attAddBoard.html",link:function(a,c,d,e){a.addBoard=function(){d.onAddBoard&&(a.onAddBoard=b(a.onAddBoard),a.onAddBoard())}}}}]).directive("attBoardNavigation",["keymap","events",function(a,b){return{restrict:"AE",link:function(c,d){var e=a.KEY.LEFT,f=a.KEY.RIGHT;d.bind("keydown",function(a){switch(a.keyCode||(a.keyCode=a.which),a.keyCode){case f:if(b.preventDefault(a),b.stopPropagation(a),d[0].nextElementSibling&&parseInt(angular.element(d[0].nextElementSibling).attr("tabindex"))>=0)angular.element(d[0])[0].nextElementSibling.focus();else{var c=angular.element(d[0])[0];do{if(!c.nextSibling)break;c=c.nextSibling}while(c&&"LI"!==c.tagName);c.tagName&&"LI"===c.tagName&&parseInt(angular.element(c).attr("tabindex"))>=0&&c.focus()}break;case e:if(b.preventDefault(a),b.stopPropagation(a),d[0].previousElementSibling&&parseInt(angular.element(d[0].previousElementSibling).attr("tabindex"))>=0)angular.element(d[0])[0].previousElementSibling.focus();else{var g=angular.element(d[0])[0];do{if(!g.previousSibling)break;g=g.previousSibling}while(g&&"LI"!==g.tagName);g.tagName&&"LI"===g.tagName&&parseInt(angular.element(c).attr("tabindex"))>=0&&g.focus()}}})}}}]),angular.module("att.abs.breadCrumbs",[]).constant("classConstant",{defaultClass:"breadcrumbs__link",activeClass:"breadcrumbs__link--active"}).directive("attCrumb",["classConstant",function(a){return{restrict:"A",link:function(b,c,d){c.addClass(a.defaultClass),"active"===d.attCrumb&&c.addClass(a.activeClass),c.hasClass("last")||c.after('<i class="breadcrumbs__item"></i>')}}}]),angular.module("att.abs.buttons",["att.abs.position","att.abs.utilities"]).constant("btnConfig",{btnClass:"button",btnPrimaryClass:"button--primary",btnSecondaryClass:"button--secondary",btnDisabledClass:"button--inactive",btnSmallClass:"button--small"}).directive("attButton",["btnConfig",function(a){return{restrict:"A",link:function(b,c,d){c.addClass(a.btnClass),"small"===d.size&&c.addClass(a.btnSmallClass),d.$observe("btnType",function(b){"primary"===b?(c.addClass(a.btnPrimaryClass),c.removeClass(a.btnSecondaryClass),c.removeClass(a.btnDisabledClass),c.removeAttr("disabled")):"secondary"===b?(c.addClass(a.btnSecondaryClass),c.removeClass(a.btnPrimaryClass),c.removeClass(a.btnDisabledClass),c.removeAttr("disabled")):"disabled"===b&&(c.addClass(a.btnDisabledClass),c.removeClass(a.btnPrimaryClass),c.removeClass(a.btnSecondaryClass),c.attr("disabled","disabled"))})}}}]).directive("attButtonLoader",[function(){return{restrict:"A",replace:!1,scope:{size:"@"},template:"<div ng-class=\"{'button--loading': size === 'large','button--loading__small': size === 'small'}\"><i></i><i class=\"second__loader\"></i><i></i></div>",link:function(a,b){b.addClass("button button--inactive")}}}]).directive("attButtonHero",[function(){return{restrict:"A",replace:!1,transclude:!0,scope:{icon:"@"},template:"<div class=\"button--hero__inner\"><span ng-transclude></span> <i ng-class=\"{'icon-arrow-right': icon === 'arrow-right','icon-cart': icon === 'cart'}\"></i></div>",link:function(a,b){b.addClass("button button--hero"),b.attr("tabindex","0")}}}]).directive("attBtnDropdown",["$document","$timeout","$isElement","$documentBind","keymap","events",function(a,b,c,d,e,f){return{restrict:"EA",scope:{type:"@dropdowntype"},replace:!0,transclude:!0,templateUrl:"app/scripts/ng_js_att_tpls/buttons/buttonDropdown.html",link:function(g,h){g.isOpen=!1;var i=-1,j=[],k=void 0;b(function(){j=h.find("li"),k=h.find("button")[0]},10);var l=g.toggle=function(a){angular.isUndefined(a)||""===a?g.isOpen=!g.isOpen:g.isOpen=a},m=function(){i+1<j.length&&(i++,j[i].focus())},n=function(){i-1>=0&&(i--,j[i].focus())};h.bind("keydown",function(a){var b=a.keyCode;if(e.isAllowedKey(b)||e.isControl(a)||e.isFunctionKey(a))switch(b){case e.KEY.ENTER:i>0&&(k.focus(),g.$apply());break;case e.KEY.ESC:l(!1),i=-1,k.focus(),g.$apply();break;case e.KEY.DOWN:m(),g.$apply(),f.preventDefault(a),f.stopPropagation(a);break;case e.KEY.UP:n(),g.$apply(),f.preventDefault(a),f.stopPropagation(a)}else b===e.KEY.TAB&&(l(!1),i=-1,g.$apply())});var o=function(b){var d=c(angular.element(b.target),h,a);if(!d){l(!1),i=-1;for(var e=0;e<j.length;e++)angular.element(j[e]).removeClass("selected");k.focus(),g.$apply()}};d.click("isOpen",o,g)}}}]),angular.module("att.abs.checkbox",[]).constant("attCheckboxConfig",{activeClass:"att-checkbox--on",disabledClass:"att-checkbox--disabled"}).directive("checkboxLimit",function(){return{scope:{checkboxLimit:"=",selectLimit:"@?",maxSelected:"&?"},restrict:"A",require:"checkboxLimit",controller:["$scope",function(a){a.limit=!0,this.getMaxLimits=function(){return a.limit},this.setMaxLimits=function(b){a.limit=b},this.maxCheckboxSelected=function(){a.maxSelected()}}],link:function(a,b,c,d){a.$watch("checkboxLimit",function(){var b=0;for(var c in a.checkboxLimit)a.checkboxLimit.hasOwnProperty(c)&&a.checkboxLimit[c]&&(b+=1);b>=parseInt(a.selectLimit)?d.setMaxLimits(!1):d.setMaxLimits(!0)},!0)}}}).directive("attCheckbox",["$compile","attCheckboxConfig",function(a,b){return{scope:{},restrict:"A",require:["ngModel","^?checkboxLimit"],link:function(c,d,e,f){var g=f[0],h=f[1],i=a('<div tabindex="0" role="checkbox" att-accessibility-click="13,32" aria-label="Checkbox" ng-click="updateModel($event)" class="att-checkbox"></div>')(c);d.css({display:"none"}),d.wrap(i),d.parent().append('<div class="att-checkbox__indicator"></div>'),d.parent().attr("title",e.title),d.parent().attr("aria-label",e.title),d.parent().attr("id",e.id),d.removeAttr("id"),g.$render=function(){var a=g.$modelValue?!0:!1;d.parent().toggleClass(b.activeClass,a),d.parent().attr("aria-checked",a)},c.updateModel=function(a){c.disabled||(g.$setViewValue(d.parent().hasClass(b.activeClass)?!1:!0),h&&!h.getMaxLimits()&&g.$modelValue?(h.maxCheckboxSelected(),g.$setViewValue(d.parent().hasClass(b.activeClass)?!0:!1)):g.$render()),a.preventDefault()},e.$observe("disabled",function(a){c.disabled=a||"disabled"===a||"true"===a,d.parent().toggleClass(b.disabledClass,c.disabled),d.parent().attr("tabindex",c.disabled?"-1":"0")})}}}]).directive("checkboxGroup",["$compile",function(a){return{scope:{checkboxGroup:"=",checkboxGroupValue:"=?"},restrict:"A",link:function(b,c,d){b.checkboxState="none",void 0===b.checkboxGroupValue&&(b.checkboxGroupValue="indeterminate"),c.css({display:"none"}),c.wrap(a('<div tabindex="0" role="checkbox" att-accessibility-click="13,32" ng-click="updateModel($event)" class="att-checkbox"></div>')(b)),c.parent().append('<div class="att-checkbox__indicator"></div>'),c.parent().attr("title",d.title),c.parent().attr("aria-label",d.title),b.$watch("checkboxState",function(a){"all"===a?(c.parent().addClass("att-checkbox--on"),c.parent().removeClass("att-checkbox--indeterminate"),c.parent().attr("aria-checked",!0)):"none"===a?(c.parent().removeClass("att-checkbox--on"),c.parent().removeClass("att-checkbox--indeterminate"),c.parent().attr("aria-checked",!1)):"indeterminate"===a&&(c.parent().removeClass("att-checkbox--on"),c.parent().addClass("att-checkbox--indeterminate"),c.parent().attr("aria-checked",!0))}),b.updateModel=function(a){if(c.parent().hasClass("att-checkbox--on")){c.parent().removeClass("att-checkbox--on");for(var d in b.checkboxGroup)b.checkboxGroup.hasOwnProperty(d)&&(b.checkboxGroup[d]=!1)}else{c.parent().addClass("att-checkbox--on");for(var e in b.checkboxGroup)b.checkboxGroup.hasOwnProperty(e)&&(b.checkboxGroup[e]=!0)}a.preventDefault()},b.$watch("checkboxGroupValue",function(a){if(a===!1){c.parent().removeClass("att-checkbox--on");for(var d in b.checkboxGroup)b.checkboxGroup.hasOwnProperty(d)&&(b.checkboxGroup[d]=!1)}else if(a===!0){c.parent().addClass("att-checkbox--on");for(var e in b.checkboxGroup)b.checkboxGroup.hasOwnProperty(e)&&(b.checkboxGroup[e]=!0)}}),b.$watch("checkboxGroup",function(){var a=0,c=0,d=0;for(var e in b.checkboxGroup)b.checkboxGroup.hasOwnProperty(e)&&(d+=1,b.checkboxGroup[e]?a+=1:b.checkboxGroup[e]||(c+=1));d===a?(b.checkboxState="all",b.checkboxGroupValue=!0):d===c?(b.checkboxState="none",b.checkboxGroupValue=!1):(b.checkboxState="indeterminate",b.checkboxGroupValue="indeterminate")},!0)}}}]),angular.module("att.abs.colorselector",[]).directive("colorSelectorWrapper",[function(){return{scope:{selected:"=",iconColor:"@"},restrict:"AE",transclude:!0,templateUrl:"app/scripts/ng_js_att_tpls/colorselector/colorselector.html",link:function(a){a.applycolor={"background-color":a.iconColor},a.selectedcolor=function(b){a.selected=b}}}}]).directive("colorSelector",["$compile",function(a){return{restrict:"A",scope:{colorSelector:"@",ngModel:"="},link:function(b,c,d){c.removeAttr("color-selector");var e=d.title,f=angular.element('<color-selector-wrapper selected="ngModel" title="'+e+'" icon-color="{{colorSelector}}">'+c.prop("outerHTML")+"</color-selector-wrapper>"),g=a(f)(b);c.replaceWith(g)}}}]),angular.module("att.abs.datepicker",["att.abs.position","att.abs.utilities"]).constant("datepickerConfig",{dateFormat:"MM/dd/yyyy",dayFormat:"d",monthFormat:"MMMM",yearFormat:"yyyy",dayHeaderFormat:"EEEE",dayTitleFormat:"MMMM yyyy",disableWeekend:!1,disableSunday:!1,startingDay:0,minDate:null,maxDate:null,mode:0,dateFilter:{defaultText:"Select from list"},datepickerEvalAttributes:["dateFormat","dayFormat","monthFormat","yearFormat","dayHeaderFormat","dayTitleFormat","disableWeekend","disableSunday","startingDay","mode"],datepickerWatchAttributes:["min","max"]}).factory("datepickerService",["datepickerConfig","dateFilter",function(a,b){var c=function(b,c){if(angular.isDefined(b)&&null!==b&&angular.isDefined(c)&&null!==c){var d=a.datepickerEvalAttributes.concat(a.datepickerWatchAttributes);for(var e in b){var f=b[e];-1!==d.indexOf(e)&&angular.isDefined(f)&&c.attr(e.toSnakeCase(),e)}}},d=function(b,c){if(angular.isDefined(b)&&null!==b&&angular.isDefined(c)&&null!==c){var d=function(a,b){c[a]=c.$parent.$eval(b)},e=function(a,b){c.$parent.$watch(b,function(b){c[a]=b}),c.$watch(a,function(a){c.$parent[b]=a})},f=a.datepickerEvalAttributes,g=a.datepickerWatchAttributes;for(var h in b){var i=b[h];-1!==f.indexOf(h)&&angular.isDefined(i)?d(h,i):-1!==g.indexOf(h)&&angular.isDefined(i)&&e(h,i)}}},e=function(a,c){if(a&&c){var d;-1!==c.indexOf("/")?d="/":-1!==c.indexOf("-")?d="-":-1!==c.indexOf(".")&&(d=".");var e=a.split(d),f=c.split(d);if(e.length!==f.length)return!1;for(var g=0;g<e.length;g++)e[g]=e[g].lPad(f[g].length,"0");var h=e.join(d),i=b(new Date(h),c);return h===i}};return{setAttributes:c,bindScope:d,validateDateString:e}}]).controller("DatepickerController",["$scope","$attrs","dateFilter","datepickerConfig",function(a,b,c,d){function e(b,c){return angular.isDefined(b)?a.$parent.$eval(b):c}function f(a,b){return new Date(a,b,0).getDate()}function g(a,b){for(var c=[],d=a,e=0;b>e;)c[e++]=new Date(d),d.setDate(d.getDate()+1);return c}function h(b){return b&&angular.isDate(a.currentDate)&&0===u(b,a.currentDate)?!0:!1}function i(b){return b&&angular.isDate(a.fromDate)&&0===u(b,a.fromDate)?!0:!1}function j(b){return b&&angular.isDate(a.fromDate)&&angular.isDate(a.currentDate)&&0===u(b,a.currentDate)?!0:!1}function k(b){return b&&angular.isDate(a.fromDate)&&angular.isDate(a.currentDate)&&u(b,a.fromDate)>=0&&u(b,a.currentDate)<=0?!0:!1}function l(a){return"Saturday"===c(a,s.dayHeader)||"Sunday"===c(a,s.dayHeader)?!0:!1}function m(b){return 0===u(b,a.resetTime(new Date))?!0:!1}function n(b){return b&&angular.isDate(a.focusedDate)&&0===u(b,a.focusedDate)?!0:!1}function o(b,c){return a.minDate&&a.minDate.getTime()>=b.getTime()&&a.minDate.getTime()<=c.getTime()}function p(b,c){return a.maxDate&&a.maxDate.getTime()>=b.getTime()&&a.maxDate.getTime()<=c.getTime()}function q(a){if(a){var b={pre:a.substr(0,3),post:a};return b}}function r(a){return{date:a.date,label:c(a.date,a.formatDay),header:c(a.date,a.formatHeader),focused:!!a.isFocused,selected:!!a.isSelected,from:!!a.isFromDate,to:!!a.isToDate,dateRange:!!a.isDateRange,oldMonth:!!a.oldMonth,nextMonth:!!a.newMonth,disabled:!!a.isDisabled,today:!!a.isToday,weekend:!!a.isWeakend}}var s={date:e(b.dateFormat,d.dateFormat),day:e(b.dayFormat,d.dayFormat),month:e(b.monthFormat,d.monthFormat),year:e(b.yearFormat,d.yearFormat),dayHeader:e(b.dayHeaderFormat,d.dayHeaderFormat),dayTitle:e(b.dayTitleFormat,d.dayTitleFormat),disableWeekend:e(b.disableWeekend,d.disableWeekend),disableSunday:e(b.disableSunday,d.disableSunday)},t=e(b.startingDay,d.startingDay);a.mode=e(b.mode,d.mode),a.minDate=d.minDate?a.resetTime(d.minDate):null,a.maxDate=d.maxDate?a.resetTime(d.maxDate):null;var u=this.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},v=this.isDisabled=function(b){return s.disableWeekend!==!0||"Saturday"!==c(b,s.dayHeader)&&"Sunday"!==c(b,s.dayHeader)?s.disableSunday===!0&&"Sunday"===c(b,s.dayHeader)?!0:a.minDate&&u(b,a.minDate)<0||a.maxDate&&u(b,a.maxDate)>0:!0};this.modes=[{name:"day",getVisibleDates:function(b,d){var e=b.getFullYear(),u=b.getMonth(),w=new Date(e,u,1),x=new Date(e,u+1,0),y=t-w.getDay(),z=y>0?7-y:-y,A=new Date(w),B=0;z>0&&(A.setDate(-z+1),B+=z),B+=f(e,u+1),B+=(7-B%7)%7;for(var C=g(A,B),D=[],E=0;B>E;E++){var F=new Date(C[E]);C[E]=r({date:F,formatDay:s.day,formatHeader:s.dayHeader,isFocused:n(F),isSelected:h(F),isFromDate:i(F),isToDate:j(F),isDateRange:k(F),oldMonth:new Date(F.getFullYear(),F.getMonth(),1,0,0,0).getTime()<new Date(e,u,1,0,0,0).getTime(),newMonth:new Date(F.getFullYear(),F.getMonth(),1,0,0,0).getTime()>new Date(e,u,1,0,0,0).getTime(),isDisabled:v(F),isToday:m(F),isWeakend:l(F)})}for(var G=0;7>G;G++)D[G]=q(c(C[G].date,s.dayHeader));return"top"===d?(a.disablePrevTop=o(w,x),a.disableNextTop=p(w,x)):"bottom"===d?(a.disablePrevBottom=o(w,x),a.disableNextBottom=p(w,x)):(a.disablePrevTop=a.disablePrevBottom=o(w,x),a.disableNextTop=a.disableNextBottom=p(w,x)),a.disablePrev=a.disablePrevTop||a.disablePrevBottom,a.disableNext=a.disableNextTop||a.disableNextBottom,{objects:C,title:c(b,s.dayTitle),labels:D}},split:7,step:{months:1}},{name:"month",getVisibleDates:function(a){for(var b=[],d=[],e=a.getFullYear(),f=0;12>f;f++){var g=new Date(e,f,1);b[f]=r({date:g,formatDay:s.month,formatHeader:s.month,isFocused:n(g),isSelected:h(g),isFromDate:i(g),isToDate:j(g),isDateRange:k(g),oldMonth:!1,newMonth:!1,isDisabled:v(g),isToday:m(g),isWeakend:!1})}return{objects:b,title:c(a,s.year),labels:d}},split:3,step:{years:1}}]}]).directive("datepicker",["$timeout",function(a){return{restrict:"EA",replace:!0,transclude:!0,templateUrl:"app/scripts/ng_js_att_tpls/datepicker/datepicker.html",scope:{currentDate:"=?current",fromDate:"=?from"},require:"datepicker",controller:"DatepickerController",link:function(b,c,d,e){function f(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c}function g(a){if(angular.isDate(a)&&!isNaN(a)?h=new Date(a):h||(h=new Date),h){var c;1===b.mode?(h=new Date,c=k(angular.copy(h),-1)):c=angular.copy(h);var d=i.modes[b.mode],e=d.getVisibleDates(c,"top");b.currentRows=f(e.objects,d.split),b.currentTitle=e.title,b.labels=e.labels||[];var g=d.getVisibleDates(k(angular.copy(c),1),"bottom");b.nextRows=f(g.objects,d.split),b.nextTitle=g.title}}var h,i=e,j=!1;b.focusedDate,b.resetTime=function(a){var c;return isNaN(new Date(a))?null:(c=new Date(a),c=1===b.mode?new Date(c.getFullYear(),c.getMonth()):new Date(c.getFullYear(),c.getMonth(),c.getDate()))},d.min&&b.$parent.$watch(d.min,function(a){b.minDate=a?b.resetTime(a):null,g()}),d.max&&b.$parent.$watch(d.max,function(a){b.maxDate=a?b.resetTime(a):null,g()});var k=function(a,c){var d=i.modes[b.mode].step;return a.setDate(1),a.setMonth(a.getMonth()+c*(d.months||0)),a.setFullYear(a.getFullYear()+c*(d.years||0)),a},l=function(a){var c=new Date(a.getFullYear(),a.getMonth(),a.getDate());b.currentDate=c},m=function(a){var c=new Date(a.getFullYear(),a.getMonth(),a.getDate());b.fromDate=c};b.select=function(a){j=!0,d.from?angular.isDate(b.fromDate)&&angular.isDate(b.currentDate)||(angular.isDate(b.fromDate)?l(a):angular.isDate(b.fromDate)||m(a)):l(a),b.focusedDate=a};var n=function(c,d){m(d),a(function(){j=!0,b.focusedDate=d,l(c)})};b.move=function(a){h=k(angular.copy(h),a),g()},b.$watch("currentDate",function(a){return angular.isDate(a)&&!isNaN(a)&&i.isDisabled(a)?void(b.currentDate=null):d.from&&!isNaN(a)&&!isNaN(b.fromDate)&&i.compare(a,b.fromDate)<0?void n(b.fromDate,a):(j?(g(),j=!1):angular.isDefined(a)&&null!==a?g(a):g(),void(b.focusedDate=void 0))}),b.$watch("fromDate",function(a){if(angular.isDate(a)&&!isNaN(a)&&i.isDisabled(a))return void(b.fromDate=null);if(d.from){if(!isNaN(b.currentDate)&&!isNaN(a)&&i.compare(b.currentDate,a)<0)return void n(a,b.currentDate);j?(g(),j=!1):angular.isDefined(a)&&null!==a?g(a):g()}b.focusedDate=void 0})}}}]).directive("datepickerPopup",["$document","datepickerService","$isElement","$documentBind",function(a,b,c,d){var e=function(e,f,g){b.bindScope(g,e),e.isOpen=!1;var h=e.toggle=function(a){a===!0||a===!1?e.isOpen=a:e.isOpen=!e.isOpen};e.$watch("current",function(){h(!1)});var i=function(b){var d=c(angular.element(b.target),f,a);d||(h(!1),e.$apply())};d.click("isOpen",i,e)};return{restrict:"EA",replace:!0,transclude:!0,templateUrl:"app/scripts/ng_js_att_tpls/datepicker/datepickerPopup.html",scope:{current:"=current"},compile:function(a,c){var d=a.find("span").eq(1);return d.attr("current","current"),b.setAttributes(c,d),e}}}]).directive("attDatepicker",["$log",function(a){return{restrict:"A",require:"ngModel",scope:{},controller:["$scope","$element","$attrs","$compile","datepickerConfig","datepickerService",function(a,b,c,d,e,f){var g=angular.isDefined(c.dateFormat)?a.$parent.$eval(c.dateFormat):e.dateFormat,h='<div class="sr-focus hidden-spoken" tabindex="-1">the date you selected is {{$parent.current | date : \''+g+"'}}</div>";b.removeAttr("att-datepicker"),b.removeAttr("ng-model"),b.attr("ng-model","$parent.current"),b.attr("aria-describedby","datepicker"),b.attr("format-date",g),b.attr("att-input-deny","[^0-9/-]"),b.attr("maxlength",10);var i=angular.element("<div></div>");i.attr("datepicker-popup",""),i.attr("current","current"),f.setAttributes(c,i),f.bindScope(c,a),i.html(""),i.append(b.prop("outerHTML")),null===navigator.userAgent.match(/MSIE 8/)&&i.append(h);var j=i.prop("outerHTML");j=d(j)(a),b.replaceWith(j)}],link:function(b,c,d,e){return e?(b.$watch("current",function(a){e.$setViewValue(a)}),void(e.$render=function(){b.current=e.$viewValue})):void a.error("ng-model is required.")}}}]).directive("formatDate",["dateFilter","datepickerService",function(a,b){return{restrict:"A",require:"ngModel",link:function(c,d,e,f){var g="";e.$observe("formatDate",function(a){g=a});var h=function(b){return b?(f.$setValidity("invalidDate",!0),a(b,g)):(f.$setValidity("invalidDate",!1),d.val())},i=function(a){return b.validateDateString(a,g)?(f.$setValidity("invalidDate",!0),new Date(a)):(f.$setValidity("invalidDate",!1),null)};f.$formatters.unshift(h),f.$parsers.unshift(i)}}}]).directive("attDateFilter",["$document","dateFilter","datepickerConfig","datepickerService","$isElement","$documentBind",function(a,b,c,d,e,f){var g=function(g,h,i,j){d.bindScope(i,g),g.selectedOption=c.dateFilter.defaultText,g.showDropdownList=!1,g.showCalendar=!1,g.applyButtonType="disabled",g.currentSelection="";var k=angular.isDefined(i.dateFormat)?g.$parent.$eval(i.dateFormat):c.dateFormat,l=!1,m=function(a){if(!l){var c=k.toUpperCase(),d=k.toUpperCase();isNaN(new Date(g.fromDate))||(c=b(g.fromDate,k)),isNaN(new Date(g.currentDate))||(d=b(g.currentDate,k)),"Custom Single Date"===a?(j.$setValidity("invalidDate",!0),g.maxLength=10,g.selectedOption=d):"Custom Range"===a&&(j.$setValidity("invalidDate",!0),j.$setValidity("invalidDateRange",!0),g.maxLength=21,g.selectedOption=c+"-"+d)}},n=g.clear=function(a){g.fromDate=void 0,g.currentDate=void 0,g.applyButtonType="disabled",a||(j.$setValidity("invalidDate",!0),j.$setValidity("invalidDateRange",!0),m(g.currentSelection))},o=function(){g.showCalendar=!0},p=function(){g.showCalendar=!1,"Custom Single Date"!==g.currentSelection&&"Custom Range"!==g.currentSelection&&n(!0)},q=g.showDropdown=function(a){a===!0||a===!1?g.showDropdownList=a:g.showDropdownList=!g.showDropdownList,g.showDropdownList?("Custom Single Date"===g.currentSelection||"Custom Range"===g.currentSelection)&&o():(g.focusInputButton=!0,p())};g.resetTime=function(a){var b;return isNaN(new Date(a))?null:(b=new Date(a),new Date(b.getFullYear(),b.getMonth(),b.getDate()))},g.getDropdownText=function(){l=!0;var a=g.selectedOption;if("Custom Single Date"===g.currentSelection)!isNaN(new Date(a))&&d.validateDateString(a,k)?(j.$setValidity("invalidDate",!0),g.fromDate=void 0,g.currentDate=new Date(a)):(j.$setValidity("invalidDate",!1),n(!0));else if("Custom Range"===g.currentSelection)if(-1===a.indexOf("-")||2!==a.split("-").length&&6!==a.split("-").length)j.$setValidity("invalidDateRange",!1),n(!0);else{j.$setValidity("invalidDateRange",!0);var b=a.split("-");if(2===b.length)b[0]=b[0].trim(),b[1]=b[1].trim();else if(6===b.length){var c=b[0].trim()+"-"+b[1].trim()+"-"+b[2].trim(),e=b[3].trim()+"-"+b[4].trim()+"-"+b[5].trim();b[0]=c,b[1]=e}if(!isNaN(new Date(b[0]))&&!isNaN(new Date(b[1]))&&d.validateDateString(b[0],k)&&d.validateDateString(b[1],k)){j.$setValidity("invalidDate",!0);var f=new Date(b[0]),h=new Date(b[1]);f.getTime()<h.getTime()?(j.$setValidity("invalidDateRange",!0),g.fromDate=f,g.currentDate=h):(j.$setValidity("invalidDateRange",!1),n(!0))}else j.$setValidity("invalidDate",!1),n(!0)}},g.untrackInputChange=function(){l=!1},g.selectAdvancedOption=function(a,b){g.currentSelection=a,b||(n(),o()),g.$watch("currentDate",function(b){isNaN(new Date(b))||(g.applyButtonType="primary",m(a),l||(g.focusApplyButton=!0))}),g.$watch("fromDate",function(b){isNaN(new Date(b))||m(a)}),"Custom Single Date"===a?g.focusSingleDateCalendar=!0:"Custom Range"===a&&(g.focusRangeCalendar=!0)},g.resetFocus=function(){g.focusSingleDateCalendar=!1,g.focusRangeCalendar=!1,g.focusApplyButton=!1},g.apply=function(){g.dateRange.selection=g.selectedOption,isNaN(new Date(g.fromDate))?(g.from=void 0,g.dateRange.from=void 0):(g.from=g.fromDate,g.dateRange.from=g.fromDate),isNaN(new Date(g.currentDate))?(g.current=void 0,g.dateRange.current=void 0):(g.current=g.currentDate,g.dateRange.current=g.currentDate),q()},g.$watchCollection(function(){return g.dateRange},function(a){if(j){var b=angular.copy(a);j.$setViewValue(b)}}),j.$render=function(){if(j.$viewValue){var a=j.$viewValue;g.selectedOption=a.selection,g.fromDate=a.from,g.currentDate=a.current,void 0!==g.fromDate&&void 0!==g.currentDate?(g.selectAdvancedOption("Custom Range",!0),g.dateRange.from=g.fromDate,g.dateRange.current=g.currentDate):void 0!==g.currentDate&&(g.selectAdvancedOption("Custom Single Date",!0),g.dateRange.from=void 0,g.dateRange.current=g.currentDate)}},g.cancel=function(){g.currentSelection="",g.selectedOption=c.dateFilter.defaultText,q()};var r=function(b){var c=e(angular.element(b.target),h,a);c||(g.cancel(),g.$apply())};f.click("showDropdownList",r,g)};return{restrict:"EA",scope:{from:"=?from",current:"=?current"},replace:!0,require:"?ngModel",transclude:!0,templateUrl:"app/scripts/ng_js_att_tpls/datepicker/dateFilter.html",controller:["$scope","$element","$attrs",function(a){a.dateRange={selection:void 0,from:void 0,current:void 0},this.selectOption=function(b,c,d){a.selectedOption=d,a.currentSelection=d,a.dateRange.selection=d,a.dateRange.current=a.resetTime(c),a.dateRange.from=a.resetTime(b),a.showDropdown()},a.checkCurrentSelection=this.checkCurrentSelection=function(b){return b===a.currentSelection?!0:!1}}],compile:function(a,b){var c=a.find("span").eq(4),e=a.find("span").eq(5);return e.attr("from","fromDate"),c.attr("current","currentDate"),e.attr("current","currentDate"),d.setAttributes(b,c),d.setAttributes(b,e),g}}}]).directive("attDateFilterList",function(){return{restrict:"EA",scope:{fromDate:"=fromDate",toDate:"=toDate",caption:"=caption",disabled:"=disabled"},require:"^attDateFilter",transclude:!0,replace:!0,templateUrl:"app/scripts/ng_js_att_tpls/datepicker/dateFilterList.html",link:function(a,b,c,d){a.selectOption=function(a,b,c){d.selectOption(a,b,c)},a.checkCurrentSelection=d.checkCurrentSelection}}}),angular.module("att.abs.devNotes",[]).directive("attDevNotes",function(){return{restrict:"EA",transclude:!0,scope:{},controller:function(a){var b=a.panes=[];a.select=function(a){angular.forEach(b,function(a){a.selected=!1}),a.selected=!0},this.addPane=function(c){0===b.length&&a.select(c),b.push(c)}},template:'<div><ul class="tabs"><li ng-repeat="pane in panes" ng-class="{active:pane.selected}"><a href="javascript:void(0)" ng-click="select(pane)">{{pane.title}}</a></li></ul><div ng-transclude></div></div>',replace:!0}}).directive("pane",function(){return{require:"^attDevNotes",restrict:"EA",transclude:!0,scope:{title:"@"},link:function(a,b,c,d){d.addPane(a)},template:'<div class="tab-pane" ng-class="{active: selected}">'+"<pre ng-class=\"{'language-markup':title=='HTML','language-javascript':title=='JavaScript','language-json':title=='JSON'}\" class=\" line-numbers\"><code ng-transclude></code></pre></div>",replace:!0}}),angular.module("att.abs.dividerLines",[]).directive("attDividerLines",[function(){return{scope:{attDividerLines:"@"},restrict:"A",replace:!0,templateUrl:"app/scripts/ng_js_att_tpls/dividerLines/dividerLines.html",link:function(a,b,c){a.lightContainer=c.attDividerLines}}}]),angular.module("att.abs.dragdrop",[]).directive("attFileDrop",["$parse",function(a){return{restrict:"A",scope:{fileModel:"=",onDrop:"&",attFileDrop:"&"},controller:["$scope","$attrs",function(a,b){""!==b.attFileDrop&&(a.onDrop=a.attFileDrop),this.onDrop=a.onDrop}],link:function(b,c){c.addClass("dragdrop"),c.bind("dragover",function(a){return a.originalEvent&&(a.dataTransfer=a.originalEvent.dataTransfer),a.dataTransfer.dropEffect="move",a.preventDefault&&a.preventDefault(),c.addClass("dragdrop-over"),!1}),c.bind("dragenter",function(a){return a.preventDefault&&a.preventDefault(),c.addClass("dragdrop-over"),!1}),c.bind("dragleave",function(){return c.removeClass("dragdrop-over"),!1}),c.bind("drop",function(d){return d.preventDefault&&d.preventDefault(),d.stopPropagation&&d.stopPropagation(),d.originalEvent&&(d.dataTransfer=d.originalEvent.dataTransfer),c.removeClass("dragdrop-over"),d.dataTransfer.files&&d.dataTransfer.files.length>0&&(b.fileModel=d.dataTransfer.files[0],b.$apply(),"function"==typeof b.onDrop&&(b.onDrop=a(b.onDrop),b.onDrop())),!1})}}}]).directive("attFileLink",[function(){return{restrict:"EA",require:"^?attFileDrop",replace:!0,transclude:!0,templateUrl:"app/scripts/ng_js_att_tpls/dragdrop/fileUpload.html",scope:{fileModel:"=?",onFileSelect:"&",attFileLink:"&"},controller:["$scope","$parse",function(a,b){this.setFileModel=function(b){a.takeFileModelFromParent?(a.$parent.fileModel=b,a.$parent.$apply()):(a.fileModel=b,a.$apply())},this.callbackFunction=function(){"function"==typeof a.onFileSelect&&(a.onFileSelect=b(a.onFileSelect),a.onFileSelect())}}],link:function(a,b,c,d){a.takeFileModelFromParent=!1,!c.fileModel&&d&&(a.takeFileModelFromParent=!0),""!==c.attFileLink?a.onFileSelect=a.attFileLink:!c.onFileSelect&&d&&(a.onFileSelect=d.onDrop)}}}]).directive("attFileChange",["$log","$rootScope",function(a,b){return{restrict:"A",require:"^attFileLink",link:function(c,d,e,f){function g(c){if(c.target.files&&c.target.files.length>0)f.setFileModel(c.target.files[0]),f.callbackFunction();else{var d=c.target.value;try{var e=new ActiveXObject("Scripting.FileSystemObject");f.setFileModel(e.getFile(d)),f.callbackFunction()}catch(c){var g="Error: Please follow the guidelines of Drag and Drop component on Sandbox demo page.";a.error(g),b.$broadcast("att-file-link-failure",g)}}}d.bind("change",g)}}}]),angular.module("att.abs.drawer",["att.abs.utilities"]).directive("attDrawer",["$document","$timeout","DOMHelper",function(a,b,c){return{restrict:"EA",replace:!0,transclude:!0,scope:{drawerOpen:"=?",drawerAutoClose:"&?"},template:'<div><div class="att-drawer" ng-transclude></div><div ng-class="{\'drawer-backdrop\':drawerOpen}"></div></div>',link:function(a,d,e){function f(b,c){b&&0!==b.style.width&&0!==b.style.height&&(m.style.display="none","right"===c.side||"left"===c.side?b.style.width="0px":("top"===c.side||"bottom"===c.side)&&(b.style.height="0px")),a.drawerOpen=!1,angular.isDefined(k)&&null!=k&&k.focus()}function g(a,c){k=document.activeElement,0!==a.style.width&&0!==a.style.height&&("right"===c.side||"left"===c.side?a.style.width=c.size:("top"===c.side||"bottom"===c.side)&&(a.style.height=c.size),b(function(){m.style.display="block",angular.isDefined(j)&&null!=j&&j.focus()},1e3*c.speed))}function h(a){var b={};return a&&"[object Function]"===b.toString.call(a)}var i={},j=void 0,k=void 0;i.side=e.drawerSlide||"top",i.speed=e.drawerSpeed||"0.25",i.size=e.drawerSize||"300px",i.zindex=e.drawerZindex||1e3,i.className=e.drawerClass||"att-drawer";var l=d.eq(0).children()[0],m=angular.element(l).children()[0];l.className=i.className,l.style.transitionDuration=i.speed+"s",l.style.webkitTransitionDuration=i.speed+"s",l.style.zIndex=i.zindex,l.style.position="fixed",l.style.width=0,l.style.height=0,l.style.transitionProperty="width, height","right"===i.side||"left"===i.side?(l.style.height=e.drawerCustomHeight||"100%",l.style.top=e.drawerCustomTop||"0px",l.style.bottom=e.drawerCustomBottom||"0px",l.style.right=e.drawerCustomRight||"0px"):("top"===i.side||"bottom"===i.side)&&(l.style.width=e.drawerCustomWidth||"100%",l.style.left=e.drawerCustomLeft||"0px",l.style.top=e.drawerCustomTop||"0px",l.style.right=e.drawerCustomRight||"0px"),b(function(){j=c.firstTabableElement(d[0])},10,!1),e.drawerSize&&a.$watch(function(){return e.drawerSize},function(b){i.size=b,a.drawerOpen&&g(l,i)}),a.$watch("drawerOpen",function(a){a?g(l,i):f(l,i)}),a.drawerAutoClose&&(a.$on("$locationChangeStart",function(){f(l,i),h(a.drawerAutoClose)&&a.drawerAutoClose()}),a.$on("$stateChangeStart",function(){f(l,i),h(a.drawerAutoClose)&&a.drawerAutoClose()}))}}}]),angular.module("att.abs.message",[]).directive("attMessages",[function(){return{restrict:"EA",scope:{messageType:"=?"},controller:["$scope","$element","$attrs",function(a,b,c){a.messageScope=[],this.registerScope=function(b){a.messageScope.push(b)},a.$parent.$watchCollection(c["for"],function(b){for(var c in b){if(b[c]){a.error=c;break}a.error=null}for(var d=0;d<a.messageScope.length;d++)a.messageScope[d].when===a.error?(a.messageScope[d].show(),a.setMessageType(a.messageScope[d].type)):a.messageScope[d].hide();null===a.error&&a.setMessageType(null)}),a.setMessageType=this.setMessageType=function(b){c.messageType&&(a.messageType=b)}}]}}]).directive("attMessage",[function(){return{restrict:"EA",scope:{},require:"^attMessages",link:function(a,b,c,d){d.registerScope(a),a.when=c.when||c.attMessage,a.type=c.type,a.show=function(){b.css({display:"block"})},a.hide=function(){b.css({display:"none"})},a.hide()}}}]),angular.module("att.abs.formField",["att.abs.message","att.abs.utilities"]).directive("attFormField",[function(){return{priority:101,restrict:"A",controller:function(){},link:function(a,b,c){b.wrap('<div class="form-field"></div>'),b.parent().append('<label class="form-field__label">'+c.placeholder||c.attFormField+"</label>"),b.wrap('<div class="form-field-input-container"></div>'),b.bind("keyup",function(){""!==this.value?b.parent().parent().find("label").addClass("form-field__label--show").removeClass("form-field__label--hide"):b.parent().parent().find("label").addClass("form-field__label--hide").removeClass("form-field__label--show")}),b.bind("blur",function(){
-""===this.value&&b.parent().parent().find("label").removeClass("form-field__label--hide")})}}}]).directive("attFormFieldValidation",["$compile","$log",function(a,b){return{priority:102,scope:{},restrict:"A",require:["?ngModel","?attFormField"],link:function(c,d,e,f){var g=f[0],h=f[1];return c.valid="",g?h?(d.parent().append(a(angular.element('<i class="icon-info-alert error" ng-show="valid===false">&nbsp;</i>'))(c)),d.parent().append(a(angular.element('<i class="icon-info-success success" ng-show="valid===true">&nbsp;</i>'))(c)),c.$watch("valid",function(a){a?d.parent().parent().addClass("success"):a===!1?d.parent().parent().addClass("error"):d.parent().parent().removeClass("success").removeClass("error")}),void d.bind("keyup",function(){g.$valid?c.valid=!0:g.$invalid?c.valid=!1:c.valid="",c.$apply()})):void b.error("att-form-field-validation :: att-form-field directive is required."):void b.error("att-form-field-validation :: ng-model directive is required.")}}}]).directive("attFormFieldValidationAlert",["$timeout",function(a){return{scope:{messageType:"=?"},restrict:"EA",replace:!0,transclude:!0,templateUrl:"app/scripts/ng_js_att_tpls/formField/attFormFieldValidationAlert.html",link:function(b,c,d,e){b.showLabel=!1,b.hideLabel=!1,b.errorMessage=!1,b.warningMessage=!1;var f=function(){var a=b.messageType;"error"===a?(b.errorMessage=!0,b.warningMessage=!1):"warning"===a?(b.errorMessage=!1,b.warningMessage=!0):(b.errorMessage=!1,b.warningMessage=!1)},g=-1!==navigator.userAgent.toLowerCase().indexOf("msie 8.0");c.find("label").text(c.find("input").attr("placeholder")),c.find("input").bind("keyup",function(){""!==this.value?(b.showLabel=!0,b.hideLabel=!1,g&&c.find("label").css({top:"-20px"})):(b.showLabel=!1,b.hideLabel=!0,g&&c.find("label").css({top:"0px"})),f(),b.$apply()}),c.find("input").bind("blur",function(){""===this.value&&(b.showLabel=!1,b.hideLabel=!1),b.$apply()}),a(function(){f()},100)}}}]).constant("CoreFormsUiConfig",{phoneMask:"(___) ___-____"}).directive("attPhoneMask",["$parse","CoreFormsUiConfig",function(a,b){return{require:"ngModel",scope:{ngModel:"="},link:function(a,c,d,e){var f=navigator.userAgent.toLowerCase(),g=f.indexOf("android")>-1,h=(-1!==f.indexOf("msie 8.0"),""),i=!1;h=g?"__________":b.phoneMask,c.attr("maxlength",h.length);var j=function(a){var b=!1;return a&&(b=10===a.length),e.$setValidity("invalidPhoneNumber",i),e.$setValidity("mask",b),b},k=function(){var a,b=e.$modelValue;if(b.length){var c,d,f,g,i;for(g=[],f=h.split(""),i=f.length,c=b.substring(0,h.length),d=b.replace(/[^0-9]/g,"").split(""),a=0;i>a&&(g.push("_"===f[a]?d.shift():f[a]),0!==d.length);a++);return b=g.join(""),"("===b&&(b=""),e.$setViewValue(b),e.$render(),b}},l=function(b){b.which&&((b.which<48||b.which>57)&&(b.which<96||b.which>105)?8===b.which||9===b.which||46===b.which||13===b.which||37===b.which||39===b.which||b.ctrlKey===!0||"118"===b.which&&"86"===b.which||b.ctrlKey===!0||"99"===b.which&&"67"===b.which||b.ctrlKey===!0||"120"===b.which&&"88"===b.which||(b.preventDefault?b.preventDefault():b.returnValue=!1,c.attr("aria-label","Only numbers are allowed"),i=!1):(c.removeAttr("aria-label"),i=!0)),a.$apply()},m=function(a){var b=/^[A-Za-z]+$/,c=/^[0-9]+$/;a.match(b)&&(i=!1),a.match(c)&&(i=!0);var d="";return a&&a.length>0&&(d=a.replace(/[^0-9]/g,"")),j(d),d},n=function(a){var b="";return j(a),a&&(b=k()),b};e.$parsers.push(m),e.$formatters.push(n),c.bind("keyup",k),c.bind("keydown",l),c.bind("input",function(a){k(a),l(a)})}}}]).constant("validationTypeInt",{validationNum:{number:"1",text:"2",email:"3"}}).directive("attFormFieldPrv",["keyMapAc","validationTypeInt",function(a,b){return{priority:101,restrict:"AE",controller:["$scope",function(c){this.showHideErrorMessage=function(a){null!=c.$$prevSibling&&angular.isDefined(c.$$prevSibling)&&angular.isDefined(c.$$prevSibling.hideErrorMsg)&&(c.$$prevSibling.hideErrorMsg=a,c.$apply())},this.findAllowedCharactor=function(b){var d=a.keys;if(angular.isDefined(c.allowedSpecialCharacters)&&angular.isDefined(c.allowedSpecialCharacters.length)&&c.allowedSpecialCharacters.length>0){for(var e=c.allowedSpecialCharacters,f=!1,g=0;g<e.length;g++)if(e[g]===d[b]){f=!0;break}return f}return!1},this.validateText=function(a,b,c,d){if(angular.isDefined(b)&&0===b.length){var e=/^[a-zA-Z0-9]*$/i;return e.test(c)}var f="^[a-zA-Z0-9"+d+"]*$",g=new RegExp(f,"i");return g.test(c)},this.validateNumber=function(a,b,c,d){if(angular.isDefined(b)&&0===b.length){var e=/^[0-9\.]+$/;return e.test(c)}var f="^[0-9."+d+"]*$",g=new RegExp(f,"i");return g.test(c)},this.validateEmail=function(a,b,c,d){if(angular.isDefined(b)&&0===b.length){var e=/(([a-zA-Z0-9\-?\.?]+)@(([a-zA-Z0-9\-_]+\.)+)([a-z]{2,3}))+$/;return e.test(c)}var f="(([a-z"+d+"A-Z0-9-?.?]+)@(([a-z"+d+"A-Z0-9-_]+.)+)(["+d+"a-z]{2,3}))+$",g=new RegExp(f,"i");return g.test(c)},this.validateInput=function(a,c,d){var e="",f=!1;if(angular.isDefined(c)&&angular.isDefined(c.length)&&c.length>0)for(var g=0;g<c.length;g++)e+="\\"+c[g];switch(b.validationNum[a]){case b.validationNum.text:f=this.validateText(a,c,d,e);break;case b.validationNum.number:f=this.validateNumber(a,c,d,e);break;case b.validationNum.email:f=this.validateEmail(a,c,d,e)}return f}}],link:function(a,b,c){b.parent().prepend('<label class="form-field__label">'+c.placeholder+"</label>"),b.wrap('<div class="form-field-input-container"></div>'),b.parent().parent().find("label").addClass("form-field__label--show")}}}]).directive("attFormFieldValidationPrv",["keyMapAc","validationTypeInt",function(a,b){return{priority:202,scope:{validationType:"=",allowedChars:"="},restrict:"A",require:["?ngModel","^attFormFieldPrv"],link:function(c,d,e,f){var g=f[1];d.bind("keyup",function(){g.validateInput(c.validationType,c.allowedChars,d[0].value)?g.showHideErrorMessage(!1):g.showHideErrorMessage(!0)});var h=a.keyRange,i=a.allowedKeys,j=function(a,b){var c=b.which<h.startNum||b.which>h.endNum,d=b.which<h.startCapitalLetters||b.which>h.endCapitalLetters,e=b.which<h.startSmallLetters||b.which>h.endSmallLetters,f=c&&d&&e;return f&&!a},k=function(a,b){return(b.which<h.startNum||b.which>h.endNum)&&!a},l=function(a,b){var c="-"!==String.fromCharCode(b.which)&&"_"!==String.fromCharCode(b.which),d="@"!==String.fromCharCode(b.which)&&"."!==String.fromCharCode(b.which),e=c&&d,f=j(a,b);return!a&&e&&f},m=function(a,c,d){switch(a){case b.validationNum.text:if(j(c,d))return!0;break;case b.validationNum.number:if(k(c,d))return!0;break;case b.validationNum.email:if(l(c,d))return!0}return!1};d.bind("keypress",function(a){a.which||(a.keyCode?a.which=a.keyCode:a.charCode&&(a.which=a.charCode));var d=g.findAllowedCharactor(a.which),e=angular.isDefined(c.validationType)&&""!==c.validationType,f=a.which!==i.TAB&&a.which!==i.BACKSPACE&&a.which!==i.DELETE,h=e&&f;h&&m(b.validationNum[c.validationType],d,a)&&a.preventDefault()})}}}]).directive("attFormFieldValidationAlertPrv",[function(){return{restrict:"A",scope:{errorMessage:"="},transclude:!0,templateUrl:"app/scripts/ng_js_att_tpls/formField/attFormFieldValidationAlertPrv.html",link:function(a){a.errorMessage=a.errorMessage,angular.isDefined(a.$parent.hideErrorMsg)?a.hideErrorMsg=a.$parent.hideErrorMsg:a.hideErrorMsg=!0}}}]).factory("Cards",[function(){var a=/(\d{1,4})/g,b=/(?:^|\s)(\d{4})$/,c=[{type:"discover",pattern:/^(6011|65|64[4-9]|622)/,format:a,inputFormat:b,length:[16],cvcLength:[3],cvcSecurityImg:"visaI",zipLength:[5],luhn:!0},{type:"mc",pattern:/^5[1-5]/,format:a,inputFormat:b,length:[16],cvcLength:[3],cvcSecurityImg:"visaI",zipLength:[5],luhn:!0},{type:"amex",pattern:/^3[47]/,format:/(\d{1,4})(\d{1,6})?(\d{1,5})?/,inputFormat:/^(\d{4}|\d{4}\s\d{6})$/,length:[15],cvcLength:[4],cvcSecurityImg:"amexI",zipLength:[5],luhn:!0},{type:"visa",pattern:/^4/,format:a,inputFormat:b,length:[16],cvcLength:[3],cvcSecurityImg:"visaI",zipLength:[5],luhn:!0}],d=function(a){var b,d,e;for(a=(a+"").replace(/\D/g,""),d=0,e=c.length;e>d;d++)if(b=c[d],b.pattern.test(a))return b},e=function(a){var b,d,e;for(d=0,e=c.length;e>d;d++)if(b=c[d],b.type===a)return b};return{fromNumber:function(a){return d(a)},fromType:function(a){return e(a)},defaultFormat:function(){return a},defaultInputFormat:function(){return b}}}]).factory("_Validate",["Cards","$parse",function(a,b){var c=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1},d=function(a){var b,c,d,e,f,g;for(d=!0,e=0,c=(a+"").split("").reverse(),f=0,g=c.length;g>f;f++)b=c[f],b=parseInt(b,10),(d=!d)&&(b*=2),b>9&&(b-=9),e+=b;return e%10===0},e={};return e.cvc=function(d,e,f,g){var h,i;if(angular.isUndefined(d)||null===d||0===d.length)return!0;if(!/^\d+$/.test(d))return!1;var j;if(g.paymentsTypeModel){var k=b(g.paymentsTypeModel);j=k(f)}return j?(i=a.fromType(j),h=d.length,c.call(null!==i?i.cvcLength:void 0,h)>=0):d.length>=3&&d.length<=4},e.zip=function(d,e,f,g){var h,i;if(angular.isUndefined(d)||null===d||0===d.length)return!0;if(!/^\d+$/.test(d))return!1;var j;if(g.paymentsTypeModel){var k=b(g.paymentsTypeModel);j=k(f)}return j?(i=a.fromType(j),h=d.length,c.call(null!==i?i.zipLength:void 0,h)>=0):d.length<6},e.card=function(e,f,g,h){var i,j,k;h.paymentsTypeModel&&(k=b(h.paymentsTypeModel));var l=function(){k&&k.assign(g,null),f.$card=null};return angular.isUndefined(e)||null===e||0===e.length?(l(),!0):(e=(e+"").replace(/\s+|-/g,""),/^\d+$/.test(e)&&(i=a.fromNumber(e))?(f.$card=angular.copy(i),k&&k.assign(g,i.type),ret=(j=e.length,c.call(i.length,j)>=0&&(i.luhn===!1||d(e))),ret):(l(),!1))},function(a,b,c,d,f){if(!e[a])throw types=Object.keys(e),errstr='Unknown type for validation: "'+a+'". ',errstr+='Should be one of: "'+types.join('", "')+'"',errstr;return e[a](b,c,d,f)}}]).factory("_ValidateWatch",["_Validate",function(a){var b={};return b.cvc=function(b,c,d,e){e.paymentsTypeModel&&d.$watch(e.paymentsTypeModel,function(f,g){if(f!==g){var h=a(b,c.$modelValue,c,d,e);c.$setValidity(b,h)}})},b.zip=function(b,c,d,e){e.paymentsTypeModel&&d.$watch(e.paymentsTypeModel,function(f,g){if(f!==g){var h=a(b,c.$modelValue,c,d,e);c.$setValidity(b,h)}})},function(a,c,d,e){return b[a]?b[a](a,c,d,e):void 0}}]).directive("validateCard",["$window","_Validate","_ValidateWatch",function(a,b,c){return{restrict:"A",require:"ngModel",link:function(a,d,e,f){var g=e.validateCard;c(g,f,a,e);var h=function(c){var h=b(g,c,f,a,e);return f.$setValidity(g,h),"card"===g&&(null===f.$card?null==c||""===c||""===c?(a.invalidCardError="",a.invalidCard=""):c.length>=1&&(a.invalidCardError="error",a.invalidCard="The number entered is not a recognized credit card number."):h?(a.invalidCardError="",a.invalidCard=""):f.$card.length.indexOf(c.length)>=0?(a.invalidCardError="error",a.invalidCard="The number entered is not a recognized credit card number."):(a.invalidCardError="",a.invalidCard=""),d.bind("blur",function(){h&&null!==f.$card?(a.invalidCardError="",a.invalidCard=""):(a.invalidCardError="error",a.invalidCard="The number entered is not a recognized credit card number.")})),h?c:void 0};f.$formatters.push(h),f.$parsers.push(h)}}}]).directive("creditCardImage",function(){return{templateUrl:"app/scripts/ng_js_att_tpls/formField/creditCardImage.html",replace:!1,transclude:!1,link:function(a,b,c){a.$watch(c.creditCardImage,function(b,c){b!==c&&(a.cvc="",angular.isUndefined(b)||null===b||(a.newValCCI="show-"+b),null===b&&(a.newValCCI=""))})}}}).directive("securityCodeImage",["$document",function(a){return{templateUrl:"app/scripts/ng_js_att_tpls/formField/cvcSecurityImg.html",replace:!1,transclude:!1,link:function(b,c,d){b.$watch(d.securityCodeImage,function(a,c){a!==c&&(angular.isUndefined(a)||null===a||("amexI"===a?(b.newValI="ccv2-security-amex",b.newValIAlt="The 4 digit CVC security code is on the front of the card.",b.cvcPlaceholder="4 digits",b.cvcMaxlength=4):"visaI"===a&&(b.newValI="ccv2-security",b.newValIAlt="The CVC security code is on the back of your card right after the credit card number.",b.cvcPlaceholder="3 digits",b.cvcMaxlength=3)),null===a&&(b.newValI="ccv2-security",b.cvcPlaceholder="3 digits",b.cvcMaxlength=3,b.newValIAlt="The CVC security code is on the back of your card right after the credit card number."))}),c.bind("click",function(a){a.preventDefault(),c.find("button").hasClass("active")?c.find("button").removeClass("active"):c.find("button").addClass("active")});var e=angular.element(a);e.bind("click",function(a){var b=a.target.className;"btn btn-alt btn-tooltip active"!==b&&c.find("button").hasClass("active")&&c.find("button").removeClass("active")})}}}]),angular.module("att.abs.hourpicker",["att.abs.utilities"]).constant("hourpickerConfig",{days:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],customOption:"Custom"}).controller("hourPickerController",["$scope",function(a){a.options=[],this.setOptions=function(b,c,d,e,f,g){a.options.push(b),void 0!==e&&(a.preselect=e);var h;if(void 0!==c){a.fromtime=c;for(h in a.days)a.days.hasOwnProperty(h)&&(a.FrtimeList[a.days[h]]={},void 0!==f?(a.FrtimeList[a.days[h]].value=f,a.selectedFromOption[a.days[h]]=f):(a.FrtimeList[a.days[h]].value=c[0].value,a.selectedFromOption[a.days[h]]=c[0].value))}if(void 0!==d){a.totime=d;for(h in a.days)a.days.hasOwnProperty(h)&&(a.TotimeList[a.days[h]]={},void 0!==g?(a.TotimeList[a.days[h]].value=g,a.selectedToOption[a.days[h]]=g):(a.TotimeList[a.days[h]].value=d[0].value,a.selectedToOption[a.days[h]]=d[0].value),a.showToTimeErrorDay[a.days[h]]=!1)}void 0!==f&&(a.uncheckedFromTime=f),void 0!==g&&(a.uncheckedToTime=g)},this.getSelectedOption=function(){return a.selectedOption},this.setToTimeErrorDay=function(b,c){a.showToTimeErrorDay[b]=c}}]).directive("attHourpickerOption",[function(){return{restrict:"EA",require:"^attHourpicker",scope:{option:"=option",fromtime:"=fromtime",totime:"=totime",preselect:"=preselect",uncheckedFromTime:"=",uncheckedToTime:"="},link:function(a,b,c,d){d.setOptions(a.option,a.fromtime,a.totime,a.preselect,a.uncheckedFromTime,a.uncheckedToTime)}}}]).directive("attHourpicker",["hourpickerConfig","$document","$log","$documentBind","$timeout",function(a,b,c,d,e){return{require:"ngModel",restrict:"EA",controller:"hourPickerController",transclude:!0,scope:{model:"=ngModel",resetFlag:"=?"},templateUrl:"app/scripts/ng_js_att_tpls/hourpicker/hourpicker.html",link:function(b,c,f,g){var h=!1;b.isFromDropDownOpen=!1,b.isToDropDownOpen=!1;var i="",j={};b.days=a.days,b.daysList={},b.FrtimeList={},b.FrtimeListDay={},b.TotimeListDay={},b.selectedFromOption={},b.selectedToOption={},b.TotimeList={},b.selectedIndex=0,b.selectedOption="Select from list",b.customTime=[],b.resetFlag=!1,b.showToTimeErrorDay={},b.validatedCustomPreselect=[],b.$watch("resetFlag",function(c,d){if(c!==d){if(c&&b.selectedOption===a.customOption){for(day in b.daysList)b.daysList.hasOwnProperty(day)&&(b.daysList[day]=!1,b.addSelectedValue(day));b.preselectUpdateFxn(b.preselect)}b.resetFlag=!1}}),b.$watch("selCategory",function(a){a&&g.$setViewValue(a)},!0),b.updateData=function(c){if(c.constructor===Array){b.showDaysSelector=!0,b.selectedOption=a.customOption;for(var d in c)if(c.hasOwnProperty(d)){var e=c[d].day;"boolean"==typeof c[d].preEnabled&&c[d].preEnabled?b.daysList[e]=!0:b.daysList[e]=!1;for(var f in b.fromtime)b.fromtime[f].value!==c[d].FromTime||b.uncheckedFromTime||(b.FrtimeList[e].value=b.fromtime[f].value,b.selectedFromOption[e]=b.FrtimeList[e].value);for(var g in b.totime)b.totime[g].value!==c[d].ToTime||b.uncheckedToTime||(b.TotimeList[e].value=b.totime[g].value,b.selectedToOption[e]=b.TotimeList[e].value);if(b.addSelectedValue(e,c[d].FromTime,c[d].ToTime),parseInt(d)+1===c.length)break}}else b.selectOption(c.day)},b.$watch("preselect",function(a){b.preselectUpdateFxn(a)}),b.preselectUpdateFxn=function(a){if(void 0!==a){if(b.options&&(a=b.validatePreselectData(a)),""===a)return;b.updateData(a)}},b.validatePreselectData=function(a){if(a.constructor===Array){for(var c in a)if(a.hasOwnProperty(c)){var d=a[c].day,e=!1,f=!1,g=!1;for(var h in b.days)if(b.days[h]===d){e=!0;break}if(!e){a.splice(c,1);continue}for(var i in b.fromtime)if(b.fromtime[i].value===a[c].FromTime){f=!0;break}f||(a[c].FromTime=b.fromtime[0].value);for(var j in b.totime)if(b.totime[j].value===a[c].ToTime){g=!0;break}if(g||(a[c].ToTime=b.totime[0].value),"boolean"==typeof a[c].preEnabled&&a[c].preEnabled?a[c].preEnabled=!0:a[c].preEnabled=!1,b.validatedCustomPreselect[d]={},b.validatedCustomPreselect[d].FromTime=a[c].FromTime,b.validatedCustomPreselect[d].ToTime=a[c].ToTime,parseInt(c)+1===a.length)break}}else{var k=!1;for(var l in b.options)if(b.options[l]===a.day){k=!0;break}k||(a="")}return a},b.selectPrevNextValue=function(a,b,c){var d,e=0;if(38===a.keyCode)d=-1;else{if(40!==a.keyCode)return c;d=1}if(-1!==b.indexOf(c))e=b.indexOf(c)+d;else for(var f in b)if(b[f].value===c){e=parseInt(f)+d;break}return e===b.length?e-=1:-1===e&&(e+=1),a.preventDefault(),b[e].value?b[e].value:b[e]},b.showDropdown=function(){b.showlist=!b.showlist,h=!h},b.showfromDayDropdown=function(a){for(count in b.FrtimeListDay)count!==a&&b.FrtimeListDay[count]&&(b.FrtimeListDay[count]=!1);for(count in b.TotimeListDay)b.TotimeListDay[count]&&(b.TotimeListDay[count]=!1);b.FrtimeListDay[a]=!b.FrtimeListDay[a],h=!h,b.showlist=!1,b.FrtimeListDay[a]?(b.isFromDropDownOpen=!0,i=a):b.isFromDropDownOpen=!1,e(function(){if(b.FrtimeListDay[a]){var d=angular.element(c)[0].querySelector(".customdays-width"),e=angular.element(d.querySelector(".select2-container-active")).parent()[0].querySelector("ul"),f=angular.element(e.querySelector(".selectedItemInDropDown"))[0].offsetTop;angular.element(e)[0].scrollTop=f}})},b.showtoDayDropdown=function(a){for(count in b.TotimeListDay)count!==a&&b.TotimeListDay[count]&&(b.TotimeListDay[count]=!1);for(count in b.FrtimeListDay)b.FrtimeListDay[count]&&(b.FrtimeListDay[count]=!1);b.TotimeListDay[a]=!b.TotimeListDay[a],h=!h,b.showlist=!1,b.TotimeListDay[a]?(b.isToDropDownOpen=!0,i=a):b.isToDropDownOpen=!1,e(function(){if(b.TotimeListDay[a]){var d=angular.element(c)[0].querySelector(".customdays-width"),e=angular.element(d.querySelector(".select2-container-active")).parent()[0].querySelector("ul"),f=angular.element(e.querySelector(".selectedItemInDropDown"))[0].offsetTop;angular.element(e)[0].scrollTop=f}})},b.selectFromDayOption=function(a,c){b.selectedFromOption[a]=c,b.FrtimeList[a].value=c,b.FrtimeListDay[a]=!1,b.isFromDropDownOpen=!1},b.selectToDayOption=function(a,c){b.selectedToOption[a]=c,b.TotimeList[a].value=c,b.TotimeListDay[a]=!1,b.isToDropDownOpen=!1},b.addSelectedValue=function(a,c,d){var e,f;if(void 0===b.daysList[a]||b.daysList[a]){for(b.selectedFromOption[a]===b.uncheckedFromTime&&(angular.isDefined(b.validatedCustomPreselect[a])?(b.selectedFromOption[a]=b.validatedCustomPreselect[a].FromTime,c=b.validatedCustomPreselect[a].FromTime,b.FrtimeList[a].value=b.validatedCustomPreselect[a].FromTime):(b.selectedFromOption[a]=b.fromtime[0].value,c=b.fromtime[0].value,b.FrtimeList[a].value=b.fromtime[0].value)),b.selectedToOption[a]===b.uncheckedToTime&&(angular.isDefined(b.validatedCustomPreselect[a])?(b.selectedToOption[a]=b.validatedCustomPreselect[a].ToTime,d=b.validatedCustomPreselect[a].ToTime,b.TotimeList[a].value=b.validatedCustomPreselect[a].ToTime):(b.selectedToOption[a]=b.totime[0].value,d=b.totime[0].value,b.TotimeList[a].value=b.totime[0].value)),j.day=a,j.FromTime=b.FrtimeList[a].value,j.ToTime=b.TotimeList[a].value,e=0,f=b.customTime.length;f>e;e++)if(b.customTime[e].day===a){b.customTime[e].FromTime=j.FromTime,b.customTime[e].ToTime=j.ToTime;break}if(e===f){var g=angular.copy(j);b.customTime.push(g)}}else for(e=0,f=b.customTime.length;f>e;e++)if(b.customTime[e].day===a){b.uncheckedFromTime?b.selectedFromOption[b.customTime[e].day]=b.uncheckedFromTime:b.selectedFromOption[b.customTime[e].day]=b.FrtimeList[b.customTime[e].day].value,b.uncheckedToTime?b.selectedToOption[b.customTime[e].day]=b.uncheckedToTime:b.selectedToOption[b.customTime[e].day]=b.TotimeList[b.customTime[e].day].value,b.customTime.splice(e,1);break}b.selCategory=b.customTime};var k=function(){b.showlist&&b.$apply(function(){b.showlist=!1})};d.click("showlist",k,b);var l=function(){b.$apply(function(){b.isFromDropDownOpen&&(b.FrtimeListDay[i]=!1,b.isFromDropDownOpen=!1)})};d.click("isFromDropDownOpen",l,b);var m=function(){b.$apply(function(){b.isToDropDownOpen&&(b.TotimeListDay[i]=!1,b.isToDropDownOpen=!1)})};d.click("isToDropDownOpen",m,b),b.selectOption=function(c){if(c===a.customOption)b.showDaysSelector=!0,b.selCategory=b.customTime;else{b.showDaysSelector=!1;var d=/[0-9]\s?am/i.exec(c),e=/[0-9]\s?pm/i.exec(c);b.selCategory={day:c,FromTime:null===d?"NA":d[0],ToTime:null===e?"NA":e[0]}}b.showlist=!1,h=!1,b.selectedOption=c}}}}]).directive("attHourpickerValidator",["hourpickerConfig",function(a){return{restrict:"A",require:["attHourpicker","ngModel"],link:function(b,c,d,e){var f=e[0],g=e[1],h=function(a){var b=Number(a.match(/^(\d+)/)[1]),c=Number(a.match(/:(\d+)/)[1]),d=a.match(/\s(.*)$/)[1].toUpperCase();"PM"===d&&12>b&&(b+=12),"AM"===d&&12===b&&(b-=12);var e=b.toString(),f=c.toString();return 10>b&&(e="0"+e),10>c&&(f="0"+f),parseInt(e+f,10)},i=function(a,b){var c=h(a),d=h(b);return d-c},j=function(b){if(f.getSelectedOption()===a.customOption){var c=0;for(var d in b)b.hasOwnProperty(d)&&(i(b[d].FromTime,b[d].ToTime)<=0?(f.setToTimeErrorDay(b[d].day,!0),c++):f.setToTimeErrorDay(b[d].day,!1));return c>0?(g.$setValidity("validationStatus",!1),[]):(g.$setValidity("validationStatus",!0),b)}return g.$setValidity("validationStatus",!0),b};g.$parsers.unshift(j)}}}]),angular.module("att.abs.iconButtons",[]).constant("buttonConfig",{activeClass:"active--button",toggleEvent:"click"}).directive("attIconBtnRadio",["buttonConfig",function(a){var b=a.activeClass||"active--button",c=a.toggleEvent||"click";return{require:"ngModel",link:function(a,d,e,f){d.attr("tabindex","0"),d.append("<span class='hidden-spoken'>"+e.attIconBtnRadio+"</span>"),f.$render=function(){d.parent().toggleClass(b,angular.equals(f.$modelValue,e.attIconBtnRadio))},d.parent().bind(c,function(){d.parent().hasClass(b)||a.$apply(function(){f.$setViewValue(e.attIconBtnRadio),f.$render()})})}}}]).directive("attIconBtnCheckbox",["buttonConfig",function(a){var b=a.activeClass||"active--button",c=a.toggleEvent||"click";return{require:"ngModel",link:function(a,d,e,f){function g(){var b=a.$eval(e.btnCheckboxTrue);return angular.isDefined(b)?b:!0}function h(){var b=a.$eval(e.btnCheckboxFalse);return angular.isDefined(b)?b:!1}d.attr("tabindex","0"),d.append("<span class='hidden-spoken'>"+e.attIconBtnCheckbox+"</span>"),f.$render=function(){d.parent().toggleClass(b,angular.equals(f.$modelValue,g()))},d.parent().bind(c,function(){a.$apply(function(){f.$setViewValue(d.parent().hasClass(b)?h():g()),f.$render()})})}}}]),angular.module("att.abs.links",["ngSanitize"]).directive("attLink",[function(){return{restrict:"A",link:function(a,b){b.addClass("link"),b.attr("href")||b.attr("tabindex","0")}}}]).directive("attLinkVisited",[function(){return{restrict:"A",link:function(a,b){b.addClass("link--visited"),b.attr("href")||b.attr("tabindex","0")}}}]).directive("attReadmore",["$timeout",function(a){return{restrict:"A",scope:{lines:"@noOfLines",textModel:"=",isOpen:"="},templateUrl:"app/scripts/ng_js_att_tpls/links/readMore.html",link:function(b,c){var d=1;b.$watch("textModel",function(e){e?("function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),b.textToDisplay=e.trim(),b.readFlag=!0,a(function(){var a=c[0].children[0].children[0];1===d&&(d=window.getComputedStyle?parseInt(b.lines)*parseFloat(window.getComputedStyle(a,null).getPropertyValue("height")):parseInt(b.lines)*parseFloat(a.currentStyle.height),b.elemHeight=d,b.readLinkStyle={height:b.elemHeight+"px"})}),b.readMoreLink=!0,b.readLessLink=!1):(b.textToDisplay="",b.readMoreLink=!1,b.readLessLink=!1,b.readFlag=!1)});var e=c.parent();e.hasClass("att-accordion__body")&&b.$watch("isOpen",function(a){a||(b.readMoreLink=!0,b.readLessLink=!1,b.readLinkStyle={height:b.elemHeight+"px"},b.readFlag=!0)}),b.readMore=function(){b.readMoreLink=!1,b.readLessLink=!0,b.readLinkStyle={height:"auto"},b.readFlag=!1;var d=angular.element(c).children().eq(1).find("a")[0];a(function(){d.focus()})},b.readLess=function(){b.readMoreLink=!0,b.readLessLink=!1,b.readLinkStyle={height:b.elemHeight+"px"},b.readFlag=!0;var d=angular.element(c).children().eq(0).find("a")[0];a(function(){d.focus()})}}}}]).directive("attLinksList",[function(){return{restrict:"A",controller:function(){},link:function(a,b){b.addClass("links-list")}}}]).directive("attLinksListItem",[function(){return{restrict:"A",require:"^attLinksList",link:function(a,b){b.addClass("links-list__item"),b.attr("href")||b.attr("tabindex","0")}}}]),angular.module("att.abs.loading",[]).directive("attLoading",["$window",function(a){return{restrict:"A",replace:!0,scope:{icon:"@attLoading",progressStatus:"=?",colorClass:"=?"},templateUrl:"app/scripts/ng_js_att_tpls/loading/loading.html",link:function(b,c){var d=b.progressStatus;if(b.progressStatus=Math.min(100,Math.max(0,d)),-1!==a.navigator.userAgent.indexOf("MSIE 8.")){var e=0,f=36*b.progressStatus;c.css({"background-position-x":e,"background-position-y":-f})}}}}]),angular.module("att.abs.modal",["att.abs.utilities"]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c<a.length;c++)if(b===a[c].key)return a[c]},keys:function(){for(var b=[],c=0;c<a.length;c++)b.push(a[c].key);return b},top:function(){return a[a.length-1]},remove:function(b){for(var c=-1,d=0;d<a.length;d++)if(b===a[d].key){c=d;break}return a.splice(c,1)[0]},removeTop:function(){return a.splice(a.length-1,1)[0]},length:function(){return a.length}}}}}).directive("modalBackdrop",["$timeout",function(a){return{restrict:"EA",replace:!0,templateUrl:"app/scripts/ng_js_att_tpls/modal/backdrop.html",link:function(b){b.animate=!1,a(function(){b.animate=!0})}}}]).directive("modalWindow",["$modalStack","$timeout","$document",function(a,b,c){return{restrict:"EA",scope:{index:"@",modalTitle:"@?"},replace:!0,transclude:!0,templateUrl:"app/scripts/ng_js_att_tpls/modal/window.html",link:function(d,e,f){d.windowClass=f.windowClass||"",f.modalTitle&&""!==f.modalTitle&&(e[0].setAttribute("aria-label",f.modalTitle),e[0].removeAttribute("modal-title")),b(function(){d.focusModalFlag=!0,d.animate=!0}),c.on("focus keydown",function(a){9===a.which&&(String.prototype.contains=function(a){return-1!==this.indexOf(a)},e[0]===a.target||e[0].contains(a.target)||e[0].focus())}),d.close=function(b){var c=a.getTop();c&&c.value.backdrop&&"static"!=c.value.backdrop&&b.target===b.currentTarget&&(b.preventDefault?(b.preventDefault(),b.stopPropagation()):b.returnValue=!1,a.dismiss(c.key,"backdrop click"))}}}}]).factory("$modalStack",["$document","$compile","$rootScope","$$stackedMap","events","keymap",function(a,b,c,d,e,f){function g(){for(var a=-1,b=m.keys(),c=0;c<b.length;c++)m.get(b[c]).value.backdrop&&(a=c);return a}function h(b){var c=a.find("body").eq(0),d=a.find("html").eq(0),e=m.get(b).value;m.remove(b),e.modalDomEl.remove(),c.toggleClass(k,m.length()>0),d.css({overflow:"scroll"}),j&&-1==g()&&(j.remove(),j=void 0),e.modalScope.$destroy(),angular.isDefined(o)&&null!=o&&o.focus()}var i,j,k="modal-open",l=c.$new(!0),m=d.createNew(),n={},o=void 0;return c.$watch(g,function(a){l.index=a}),a.bind("keydown",function(a){var b;if(27===a.which)b=m.top(),b&&b.value.keyboard&&c.$apply(function(){n.dismiss(b.key)});else if(a.keyCode===f.KEY.BACKSPACE){var d,g=!1,h=a.srcElement||a.target;g=void 0===h.type?!0:"INPUT"===h.tagName.toUpperCase()&&("TEXT"===(d=h.type.toUpperCase())||"PASSWORD"===d||"FILE"===d||"SEARCH"===d||"EMAIL"===d||"NUMBER"===d||"DATE"===d||"TEL"===d||"URL"===d||"TIME"===d)||"TEXTAREA"===h.tagName.toUpperCase()?h.readOnly||h.disabled:!0,g&&e.preventDefault(a)}}),n.open=function(c,d){m.add(c,{deferred:d.deferred,modalScope:d.scope,backdrop:d.backdrop,keyboard:d.keyboard}),o=document.activeElement;var e=a.find("body").eq(0),f=a.find("html").eq(0);g()>=0&&!j&&(i=angular.element("<div modal-backdrop></div>"),j=b(i)(l),e.append(j));var h=angular.element("<div modal-window></div>");h.attr("window-class",d.windowClass),h.attr("index",m.length()-1),h.attr("modal-title",d.modalTitle),h.html(d.content);var n=b(h)(d.scope);m.top().value.modalDomEl=n,e.append(n),e.addClass(k),f.css({overflow:"hidden"})},n.close=function(a,b){var c=m.get(a);c&&(c.value.deferred.resolve(b),h(a))},n.dismiss=function(a,b){var c=m.get(a).value;c&&(c.deferred.reject(b),h(a))},n.getTop=function(){return m.top()},n}]).provider("$modal",function(){var a={options:{backdrop:!0,keyboard:!0},$get:["$injector","$rootScope","$q","$http","$templateCache","$controller","$modalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?d.when(a.template):e.get(a.templateUrl,{cache:f}).then(function(a){return a.data})}function j(a){var c=[];return angular.forEach(a,function(a){(angular.isFunction(a)||angular.isArray(a))&&c.push(d.when(b.invoke(a)))}),c}var k={};return k.open=function(b){var e=d.defer(),f=d.defer(),k={result:e.promise,opened:f.promise,close:function(a){h.close(k,a)},dismiss:function(a){h.dismiss(k,a)}};if(b=angular.extend({},a.options,b),b.resolve=b.resolve||{},!b.template&&!b.templateUrl)throw new Error("One of template or templateUrl options is required.");var l=d.all([i(b)].concat(j(b.resolve)));return l.then(function(a){var d=(b.scope||c).$new();d.$close=k.close,d.$dismiss=k.dismiss;var f,i={},j=1;b.controller&&(i.$scope=d,i.$modalInstance=k,angular.forEach(b.resolve,function(b,c){i[c]=a[j++]}),f=g(b.controller,i)),h.open(k,{scope:d,deferred:e,content:a[0],backdrop:b.backdrop,keyboard:b.keyboard,windowClass:b.windowClass,modalTitle:b.modalTitle})},function(a){e.reject(a)}),l.then(function(){f.resolve(!0)},function(){f.reject(!1)}),k},k}]};return a}).directive("simpleModal",["$modal",function(a){return{restrict:"EA",scope:{simpleModal:"@",backdrop:"@",keyboard:"@",modalOk:"&",modalCancel:"&",windowClass:"@",controller:"@",modalTitle:"@?"},link:function(b,c){c.bind("click",function(d){d.preventDefault(),angular.isDefined(c.attr("href"))&&""!==c.attr("href")&&(b.simpleModal=c.attr("href")),"false"===b.backdrop?b.backdropclick="static":b.backdropclick=!0,"false"===b.keyboard?b.keyboardev=!1:b.keyboardev=!0,a.open({templateUrl:b.simpleModal,backdrop:b.backdropclick,keyboard:b.keyboardev,windowClass:b.windowClass,controller:b.controller,modalTitle:b.modalTitle}).result.then(b.modalOk,b.modalCancel)})}}}]).directive("tabbedItem",["$modal","$log",function(a,b){return{restrict:"AE",replace:!0,scope:{items:"=items",controller:"@",templateId:"@",modalTitle:"@?"},templateUrl:"app/scripts/ng_js_att_tpls/modal/tabbedItem.html",controller:["$scope","$rootScope","$attrs",function(c){c.clickTab=function(d){for(var e=0;e<c.items.length;e++)e===d?(c.items[e].isTabOpen=!0,c.items[e].showData=!0):(c.items[e].isTabOpen=!1,c.items[e].showData=!1);var f=a.open({templateUrl:c.templateId,controller:c.controller,windowClass:"tabbedOverlay_modal",modalTitle:c.modalTitle,resolve:{items:function(){return c.items}}});f.result.then(function(a){c.selected=a},function(){b.info("Modal dismissed at: "+new Date)})},c.isActiveTab=function(a){return c.items&&c.items[a]&&c.items[a].isTabOpen}}]}}]).directive("tabbedOverlay",[function(){return{restrict:"AE",replace:!0,scope:{items:"="},transclude:!0,templateUrl:"app/scripts/ng_js_att_tpls/modal/tabbedOverlayItem.html",controller:["$scope",function(a){a.clickTab=function(b){for(var c=0;c<a.items.length;c++)c===b?(a.items[c].isTabOpen=!0,a.items[c].showData=!0):(a.items[c].isTabOpen=!1,a.items[c].showData=!1)},a.isActiveTab=function(b){return a.items&&a.items[b]&&a.items[b].isTabOpen}}]}}]),angular.module("att.abs.pagination",["att.abs.utilities"]).directive("attPagination",[function(){return{restrict:"EA",scope:{totalPages:"=",currentPage:"=",showInput:"=",clickHandler:"=?"},replace:!0,templateUrl:"app/scripts/ng_js_att_tpls/pagination/pagination.html",
-link:function(a){function b(b){angular.isDefined(b)&&null!==b&&((!b||1>b)&&(b=1),b>a.totalPages&&(b=a.totalPages),a.currentPage!==b&&(a.currentPage=b,c(a.currentPage)),a.totalPages>7&&(b<a.pages[0]&&b>3?a.pages=[b,b+1,b+2]:b>a.pages[2]&&b<a.totalPages-2?a.pages=[b-2,b-1,b]:3>=b?a.pages=[1,2,3]:b>=a.totalPages-2&&(a.pages=[a.totalPages-2,a.totalPages-1,a.totalPages])))}a.focusedPage,a.$watch("totalPages",function(c){if(angular.isDefined(c)&&null!==c){if(a.pages=[],1>c)return void(a.totalPages=1);if(7>=c)for(var d=1;c>=d;d++)a.pages.push(d);else if(c>7){var e=Math.ceil(c/2);a.pages=[e-1,e,e+1]}b(1)}}),a.$watch("currentPage",function(a){b(a)});var c=function(b){angular.isFunction(a.clickHandler)&&a.clickHandler(b)};a.next=function(b){b.preventDefault(),a.currentPage<a.totalPages&&(a.currentPage+=1,c(a.currentPage))},a.prev=function(b){b.preventDefault(),a.currentPage>1&&(a.currentPage-=1,c(a.currentPage))},a.selectPage=function(b,d){d.preventDefault(),a.currentPage=b,a.focusedPage=b,c(a.currentPage)},a.checkSelectedPage=function(b){return a.currentPage===b?!0:!1},a.isFocused=function(b){return a.focusedPage===b}}}}]),angular.module("att.abs.paneSelector",["att.abs.utilities"]).constant("paneGroupConstants",{SIDE_WIDTH_DEFAULT:"33%",INNER_PANE_DEFAULT:"67%",SIDE_PANE_ID:"sidePane",NO_DRILL_DOWN:"none"}).factory("animation",function(){return TweenLite}).directive("attPaneAccessibility",["keymap","$window",function(a,b){return{restrict:"A",require:["^?sidePane","^?innerPane"],link:function(b,c,d,e){var f=e[0],g=e[1],h=!1;b.ie=function(){for(var a,b=3,c=document.createElement("div"),d=c.getElementsByTagName("i");c.innerHTML="<!--[if gt IE "+ ++b+"]><i></i>< ![endif]-->",d[0];);return b>4?b:a}(),h=8===b.ie?!0:!1,c.bind("keydown",function(b){if(a.isAllowedKey(b.keyCode)||a.isControl(b)||a.isFunctionKey(b)){b.preventDefault(),b.stopPropagation();var d;switch(b.keyCode){case a.KEY.DOWN:if(d=angular.element(c[0])[0],d&&d.nextElementSibling&&d.nextElementSibling.focus(),h){do{if(!d||!d.nextSibling)break;d=d.nextSibling}while(d&&"DIV"!==d.tagName);d.focus()}break;case a.KEY.UP:if(d=angular.element(c[0])[0],d&&d.previousElementSibling&&d.previousElementSibling.focus(),h){do{if(!d||!d.previousSibling)break;d=d.previousSibling}while(d&&"DIV"!==d.tagName);d.focus()}break;case a.KEY.RIGHT:angular.isDefined(f)&&(d=f.getElement()[0]),angular.isDefined(g)&&(d=g.getElement()[0]);do{if(!d||!d.nextElementSibling)break;d=d.nextElementSibling}while("none"===window.getComputedStyle(d,null).getPropertyValue("display"));if(h)do{if(!d||!d.nextSibling)break;d=d.nextSibling}while(d&&"DIV"==d.tagName&&"none"==d.currentStyle.display);d&&d.querySelector("[att-pane-accessibility]").focus();break;case a.KEY.LEFT:angular.isDefined(f)&&(d=f.getElement()[0]),angular.isDefined(g)&&(d=g.getElement()[0]);do{if(!d||!d.previousElementSibling)break;d=d.previousElementSibling}while("none"==window.getComputedStyle(d,null).getPropertyValue("display"));if(h)do{if(!d||!d.previousSibling)break;d=d.previousSibling}while(d&&"DIV"==d.tagName&&"none"==d.currentStyle.display);d&&d.querySelector("[att-pane-accessibility]").focus()}}})}}}]).directive("sideRow",[function(){return{restrict:"A",replace:!0,require:["^sidePane","^paneGroup"],link:function(a,b,c,d){var e=d[0],f=d[1];a.$first&&(e.sidePaneIds=[]);var g=c.paneId,h=c.drillDownTo;e.sidePaneRows.push({paneId:g,drillDownTo:h}),b.on("click",function(){e.currentSelectedRowPaneId=g,f.slideOutPane(g,!0)})}}}]).controller("SidePaneCtrl",["$scope","$element","animation","paneGroupConstants",function(a,b,c,d){this.getElement=function(){return b},this.sidePaneTracker={},this.currentWidth=d.SIDE_WIDTH_DEFAULT,this.paneId=d.SIDE_PANE_ID,this.currentSelectedRowPaneId,this.drillDownToMapper={},this.sidePaneRows=[],this.init=function(){var a=this.sidePaneRows;if(a)for(var b in a)if(a.hasOwnProperty(b)){var c=a[b].paneId,d=a[b].drillDownTo;this.drillDownToMapper[c]=d,0==b&&(this.currentSelectedRowPaneId=c,this.sidePaneTracker[c]=[])}},this.getSidePanesList=function(){return this.sidePaneTracker[this.currentSelectedRowPaneId]},this.addToSidePanesList=function(a){void 0===this.sidePaneTracker[this.currentSelectedRowPaneId]?this.sidePaneTracker[this.currentSelectedRowPaneId]=[]:a&&this.sidePaneTracker[this.currentSelectedRowPaneId].push(a)},this.setWidth=function(a){a&&(this.currentWidth=a),c.set(b,{width:this.currentWidth})},this.resizeWidth=function(a){a&&(this.currentWidth=a),c.to(b,.5,{width:a})}}]).directive("sidePane",["paneGroupConstants",function(a){return{restrict:"EA",transclude:!0,replace:!0,templateUrl:"app/scripts/ng_js_att_tpls/paneSelector/sidePane.html",require:["^paneGroup","sidePane"],controller:"SidePaneCtrl",scope:{},link:function(b,c,d,e){var f=e[0],g=e[1];f.addPaneCtrl(a.SIDE_PANE_ID,g)}}}]).directive("drillDownRow",["$parse","paneGroupConstants",function(a,b){return{restrict:"A",replace:!0,require:["^innerPane","^paneGroup"],link:function(a,c,d,e){var f=e[0],g=e[1];c.on("click",function(){var a=f.drillDownTo;f.drillDownTo!==b.NO_DRILL_DOWN&&g.slideOutPane(a),c[0].focus()})}}}]).controller("InnerPaneCtrl",["$scope","$element","animation","paneGroupConstants",function(a,b,c,d){this.getElement=function(){return b},this.paneId=a.paneId,this.drillDownTo,this.currentWidth=d.INNER_PANE_DEFAULT,this.setWidth=function(a){a&&(this.currentWidth=a),c.set(b,{width:this.currentWidth})},this.resizeWidth=function(a,d){c.to(b,.25,{width:a,onComplete:d})},this.displayNone=function(){c.set(b,{display:"none"})},this.displayBlock=function(){c.set(b,{display:"block"}),this&&this.hideRightBorder()},this.floatLeft=function(){c.set(b,{"float":"left"})},this.hideLeftBorder=function(){c.set(b,{borderLeftWidth:"0px"})},this.showLeftBorder=function(){c.set(b,{borderLeftWidth:"1px"})},this.hideRightBorder=function(){c.set(b,{borderRightWidth:"0px"})},this.showRightBorder=function(){c.set(b,{borderRightWidth:"1px"})},this.slideFromRight=function(){c.set(b,{"float":"right"}),c.set(b,{width:this.currentWidth})},this.startOpen=function(){return a.startOpen}}]).directive("innerPane",function(){return{restrict:"EA",replace:!0,transclude:!0,templateUrl:"app/scripts/ng_js_att_tpls/paneSelector/innerPane.html",require:["^paneGroup","innerPane"],controller:"InnerPaneCtrl",scope:{paneId:"@"},link:function(a,b,c,d){""===c.startOpen&&(a.startOpen=!0);var e=d[0],f=d[1];e.addPaneCtrl(a.paneId,f)}}}).controller("PaneGroupCtrl",["$scope","$element","paneGroupConstants",function(a,b,c){this.panes={},this.accountLevelPaneModel=[],this.title=a.title,this.init=function(){function a(a,b){var c,d=[];for(c in a.sidePaneRows)if(a.sidePaneRows.hasOwnProperty(c)){var e=a.sidePaneRows[c];c>0&&b[e.paneId].startOpen&&b[e.paneId].startOpen()&&(d.push(e),a.addToSidePanesList(e.paneId))}if(f)for(c in d)if(d.hasOwnProperty(c)){var g=d[c].paneId,h=b[g];h&&h.setWidth&&h.displayBlock&&(h.setWidth(f),h.displayBlock())}}var b=this.panes[c.SIDE_PANE_ID];if(b){b.init();var d,e=1;for(d in this.panes)this.panes[d].startOpen&&this.panes[d].startOpen()&&e++;var f;if(e>=3&&(f=100/e+"%"),this.panes[b.currentSelectedRowPaneId]){f?(b.setWidth(f),this.panes[b.currentSelectedRowPaneId].setWidth(f)):(b.setWidth(),this.panes[b.currentSelectedRowPaneId].setWidth()),this.panes[b.currentSelectedRowPaneId].displayBlock();for(d in this.panes)d!==c.SIDE_PANE_ID&&d!==b.currentSelectedRowPaneId&&this.panes[d].displayNone(),this.panes[d].drillDownTo=b.drillDownToMapper[d]}a(b,this.panes)}},this.resetPanes=function(){for(var a in this.panes)if(this.panes.hasOwnProperty(a)){var b=this.panes[a];b&&b.paneId!==c.SIDE_PANE_ID&&(b.floatLeft(),b.displayNone())}this.panes[c.SIDE_PANE_ID]&&this.panes[c.SIDE_PANE_ID].setWidth(c.SIDE_WIDTH_DEFAULT)},this.addPaneCtrl=function(a,b){this.panes[a]=b},this._slideOutPane=function(a,b){this.resetPanes();var d;if(b)if(this.panes[c.SIDE_PANE_ID]&&(d=this.panes[c.SIDE_PANE_ID].getSidePanesList()),d){if(this.panes&&this.panes[c.SIDE_PANE_ID])if(0===d.length&&this.panes[a])this.panes[c.SIDE_PANE_ID].setWidth(c.SIDE_WIDTH_DEFAULT),this.panes[a].displayBlock(),this.panes[a].setWidth(c.INNER_PANE_DEFAULT);else{var e=d.length+2,f=100/e+"%";this.panes[c.SIDE_PANE_ID].setWidth(f),this.panes[this.panes[c.SIDE_PANE_ID].currentSelectedRowPaneId]&&(this.panes[this.panes[c.SIDE_PANE_ID].currentSelectedRowPaneId].displayBlock(),this.panes[this.panes[c.SIDE_PANE_ID].currentSelectedRowPaneId].setWidth(f));for(var g in d)this.panes[d[g]]&&(this.panes[d[g]].displayBlock(),this.panes[d[g]].setWidth(f))}}else this.panes&&this.panes[c.SIDE_PANE_ID]&&this.panes[a]&&(this.panes[c.SIDE_PANE_ID].currentSelectedRowPaneId=a,this.panes[c.SIDE_PANE_ID].addToSidePanesList(),this.panes[a].slideFromRight(),this.panes[a].displayBlock(),this.panes[a].setWidth(c.INNER_PANE_DEFAULT));else{var h,i=!1;this.panes[c.SIDE_PANE_ID]&&(h=this.panes[c.SIDE_PANE_ID].getSidePanesList());for(var j in h)if(h.hasOwnProperty(j)){var k=h[j];if(k===a){i=!0;break}}!i&&this.panes[c.SIDE_PANE_ID]&&this.panes[c.SIDE_PANE_ID].addToSidePanesList(a);var l;this.panes[c.SIDE_PANE_ID]&&(l=this.panes[c.SIDE_PANE_ID].getSidePanesList().length);var m=l+2,n=100/m+"%";this.panes[c.SIDE_PANE_ID]&&this.panes[c.SIDE_PANE_ID].setWidth(n);var o;this.panes[c.SIDE_PANE_ID]&&(o=this.panes[c.SIDE_PANE_ID].getSidePanesList()[l-1]);var p=this;p.panes[c.SIDE_PANE_ID]&&(d=p.panes[c.SIDE_PANE_ID].getSidePanesList());for(var q in d)if(d.hasOwnProperty(q)){var r=d[q],s=this.panes[r];r!==o&&s&&(s.setWidth(n),s.displayBlock(),s.floatLeft())}this.panes[this.panes[c.SIDE_PANE_ID].currentSelectedRowPaneId]&&(this.panes[this.panes[c.SIDE_PANE_ID].currentSelectedRowPaneId].displayBlock(),this.panes[this.panes[c.SIDE_PANE_ID].currentSelectedRowPaneId].showRightBorder(),this.panes[this.panes[c.SIDE_PANE_ID].currentSelectedRowPaneId].resizeWidth(n,function(){p.panes[o]&&p.panes[p.panes[c.SIDE_PANE_ID].currentSelectedRowPaneId]&&(p.panes[p.panes[c.SIDE_PANE_ID].currentSelectedRowPaneId].hideRightBorder(),p.panes[o].setWidth(n),p.panes[o].slideFromRight(),p.panes[o].displayBlock(),p.panes[o].floatLeft())}))}},this.slideOutPane=function(a,b){this._slideOutPane(a,b)}}]).directive("paneGroup",["$timeout",function(a){return{restrict:"EA",transclude:!0,replace:!0,templateUrl:"app/scripts/ng_js_att_tpls/paneSelector/paneGroup.html",scope:{},controller:"PaneGroupCtrl",link:function(b,c,d,e){function f(){e.init()}a(f,100)}}}]),angular.module("att.abs.tooltip",["att.abs.position","att.abs.utilities","ngSanitize"]).constant("tooltipDefaultOptions",{placement:"above",animation:!1,popupDelay:0,stylett:"dark",appendToBody:!0}).provider("$tooltip",["tooltipDefaultOptions",function(a){function b(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var c={mouseenter:"mouseleave",click:"click",focus:"blur",mouseover:"mouseout"},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$parse","$document","$position","$interpolate","$attElementDetach",function(e,f,g,h,i,j,k,l){return function(e,m,n){function o(a){var b=a||p.trigger||n,d=c[b]||b;return{show:b,hide:d}}var p=angular.extend({},a,d),q=b(e),r=k.startSymbol(),s=k.endSymbol();return{restrict:"EA",scope:!0,link:function(a,b,c){function d(){a.tt_isOpen?n():k()}function k(){(!F||a.$eval(c[m+"Enable"]))&&(a.tt_popupDelay?y=g(t,a.tt_popupDelay):a.$apply(t))}function n(){a.$apply(function(){u()})}function t(){var c,d,e,f;if(a.tt_content){x&&g.cancel(x),B.css({top:0,left:0,display:"block","z-index":9999}),C?(z=z||i.find("body"),z.append(B)):b.after(B),c=C?j.offset(b):j.position(b),d=B.prop("offsetWidth"),e=B.prop("offsetHeight");var h=10;switch(a.tt_placement){case"right":f=C?{top:c.top+c.height/2-e/2,left:c.left+c.width+G}:{top:c.top+c.height/2-e/2,left:c.left+c.width+h+G};break;case"below":f=C?{top:c.top+c.height+G,left:c.left+c.width/2-d/2}:{top:c.top+c.height+h+G,left:c.left+c.width/2-d/2};break;case"left":f=C?{top:c.top+c.height/2-e/2,left:c.left-d-G}:{top:c.top+c.height/2-e/2,left:c.left-d-h-G};break;default:f=C?{top:c.top-e-G,left:c.left+c.width/2-d/2}:{top:c.top-e-h-G,left:c.left+c.width/2-d/2}}f.top+="px",f.left+="px",B.css(f),a.tt_isOpen=!0}}function u(){a.tt_isOpen=!1,g.cancel(y),angular.isDefined(a.tt_animation)&&a.tt_animation()?x=g(function(){l(B[0])},500):l(B[0])}function v(){b.removeAttr("title"),w||(H?b.attr("title",a.tooltipAriaLabel):b.attr("title",a.tt_content))}b.attr("tabindex")||b.attr("tabindex","0");var w=!1;b.bind("mouseenter",function(){w=!0,b.removeAttr("title")}),b.bind("mouseleave",function(){w=!1,v()}),a.parentAttrs=c;var x,y,z,A="<div "+q+'-popup title="'+r+"tt_title"+s+'" content="'+r+"tt_content"+s+'" placement="'+r+"tt_placement"+s+'" animation="tt_animation()" is-open="tt_isOpen" stylett="'+r+"tt_style"+s+'" ></div>',B=f(A)(a),C=angular.isDefined(p.appendToBody)?p.appendToBody:!1,D=o(void 0),E=!1,F=angular.isDefined(c[m+"Enable"]),G=0,H=!1;a.tt_isOpen=!1,a.$watch("tt_isOpen",function(a,b){a===b||a||l(B[0])}),c.$observe(e,function(b){b?(a.tt_content=b,v()):a.tt_isOpen&&u()}),c.$observe(m+"Title",function(b){a.tt_title=b}),c.$observe(m+"Placement",function(b){a.tt_placement=angular.isDefined(b)?b:p.placement}),c.$observe(m+"Style",function(b){a.tt_style=angular.isDefined(b)?b:p.stylett}),c.$observe(m+"Animation",function(b){a.tt_animation=angular.isDefined(b)?h(b):function(){return p.animation}}),c.$observe(m+"PopupDelay",function(b){var c=parseInt(b,10);a.tt_popupDelay=isNaN(c)?p.popupDelay:c}),c.$observe(m+"Trigger",function(a){E&&(b.unbind(D.show,k),b.unbind(D.hide,n)),D=o(a),"focus"===D.show?(b.bind("focus",k),b.bind("blur",n),b.bind("click",function(a){a.stopPropagation()})):D.show===D.hide?b.bind(D.show,d):(b.bind(D.show,k),b.bind(D.hide,n)),E=!0}),c.$observe(m+"AppendToBody",function(b){C=angular.isDefined(b)?h(b)(a):C}),c.$observe(m+"Offset",function(a){G=angular.isDefined(a)?parseInt(a,10):0}),c.$observe(m+"AriaLabel",function(b){angular.isDefined(b)?(a.tooltipAriaLabel=b,H=!0):H=!1,v()}),C&&a.$on("$locationChangeSuccess",function(){a.tt_isOpen&&u()}),a.$on("$destroy",function(){a.tt_isOpen?u():B.remove()})}}}}]}]).directive("tooltipPopup",["$document","$documentBind",function(a,b){return{restrict:"EA",replace:!0,transclude:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"=",stylett:"@"},templateUrl:"app/scripts/ng_js_att_tpls/tooltip/tooltip-popup.html",link:function(a,c){a.$watch("isOpen",function(){a.isOpen}),c.bind("click",function(a){a.stopPropagation()});var d=function(){a.$apply(function(){a.isOpen=!1})};b.event("click","isOpen",d,a,!0,10)}}}]).directive("tooltip",["$tooltip",function(a){return a("tooltip","tooltip","mouseenter")}]).directive("tooltipCondition",["$timeout",function(a){return{restrict:"EA",replace:!0,scope:{tooltipCondition:"@?"},template:'<p><span tooltip="{{tooltipCondition}}" ng-if="showpop">{{tooltipCondition}}</span><span id="innerElement" ng-hide="showpop">{{tooltipCondition}}</span></p>',link:function(b,c,d){b.showpop=!1,"true"===d.height?a(function(){var a=c[0].offsetHeight,d=c.children(0)[0].offsetHeight;d>a&&(b.showpop=!0)}):b.tooltipCondition.length>=25&&(b.showpop=!0)}}}]),angular.module("att.abs.popOvers",["att.abs.tooltip","att.abs.utilities","ngSanitize"]).directive("popover",["$tooltip",function(a){return a("popover","popover","click")}]).directive("popoverPopup",["$document","$documentBind","$timeout","events","DOMHelper",function(a,b,c,d,e){return{restrict:"EA",replace:!0,transclude:!0,templateUrl:"app/scripts/ng_js_att_tpls/popOvers/popOvers.html",scope:{content:"@",placement:"@",animation:"&",isOpen:"=",stylett:"@"},link:function(a,f,g,h){a.closeable=!1;try{a.closeable=""===a.$parent.parentAttrs.closeable?!0:!1}catch(i){}var j=void 0,k=void 0,l=function(b){a.$apply(function(){a.isOpen=!1})},m=function(b){(27===b.which||27===b.keyCode)&&(console.log("ESC was pressed!"),a.$apply(function(){a.isOpen=!1}))};c(function(){k=e.firstTabableElement(f)},10,!1),a.$watch("isOpen",function(b){if(a.isOpen){if(j=document.activeElement,angular.isDefined(k))try{k.focus()}catch(c){}}else if(angular.isDefined(j))try{j.focus()}catch(c){}}),a.$watch("stylett",function(b){a.popOverStyle=b}),a.$watch("placement",function(b){a.popOverPlacement=b}),a.closeMe=function(){a.isOpen=!1},f.bind("click",function(a){d.stopPropagation(a)}),b.event("click","isOpen",l,a,!0,10),b.event("keydown","isOpen",m,a,!0,10)}}}]),angular.module("att.abs.profileCard",[]).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("profileCard",["$http","$q","profileStatus",function(a,b,c){return{restrict:"EA",replace:"true",templateUrl:function(a,b){return b.addUser?"app/scripts/ng_js_att_tpls/profileCard/addUser.html":"app/scripts/ng_js_att_tpls/profileCard/profileCard.html"},scope:{profile:"="},link:function(a,d,e){function f(a){var c=b.defer(),d=new Image;return d.onerror=function(){c.reject(!1)},d.onload=function(){c.resolve(!0)},void 0!==a&&a.length>0?d.src=a:c.reject(!1),c.promise}if(a.image=!0,!e.addUser){a.image=!1,f(a.profile.img).then(function(b){a.image=b});var g=a.profile.name.split(" ");a.initials="";for(var h=0;h<g.length;h++)a.initials+=g[h][0];a.profile.role.toUpperCase()===c.role&&(a.badge=!0);var i=c.status[a.profile.state.toUpperCase()];i&&(a.profile.state=c.status[a.profile.state.toUpperCase()].status,a.colorIcon=c.status[a.profile.state.toUpperCase()].color,(a.profile.state.toUpperCase()===c.status.PENDING.status.toUpperCase()||a.profile.state.toUpperCase()===c.status.LOCKED.status.toUpperCase())&&(a.profile.lastLogin=a.profile.state));var j=(new Date).getTime(),k=new Date(a.profile.lastLogin).getTime(),l=(j-k)/864e5;1>=l?a.profile.lastLogin="Today":2>=l&&(a.profile.lastLogin="Yesterday")}}}}]),angular.module("att.abs.progressBars",[]).directive("attProgressBar",[function(){return{restrict:"A",replace:!0,templateUrl:"app/scripts/ng_js_att_tpls/progressBars/progressBars.html"}}]),angular.module("att.abs.radio",[]).constant("attRadioConfig",{activeClass:"att-radio--on",disabledClass:"att-radio--disabled"}).directive("attRadio",["$compile","attRadioConfig",function(a,b){return{scope:{},restrict:"A",require:"ngModel",link:function(c,d,e,f){var g=f;c.radioVal="";var h=angular.element('<div att-accessibility-click="13,32" ng-click="updateModel($event)" class="att-radio"></div>');d.attr("value",e.attRadio),d.removeAttr("att-radio"),d.removeAttr("title"),d.attr("ng-model","radioVal"),h.append(d.prop("outerHTML")),h.append('<div class="att-radio__indicator"></div>'),h.attr("title",e.title);var i=h.prop("outerHTML");i=a(i)(c),d=d.replaceWith(i);var j=i.find("input");j.on("focus",function(){i.css("outline","thin dotted #333"),i.css("outline","-webkit-focus-ring-color auto 5px")}),j.on("blur",function(){i.css("outline","none")}),g.$render=function(){c.radioVal=g.$modelValue;var a=angular.equals(g.$modelValue,e.attRadio);i.toggleClass(b.activeClass,a)},c.updateModel=function(){j[0].focus();var a=i.hasClass(b.activeClass);a||c.disabled||(g.$setViewValue(a?null:e.attRadio),g.$render())},e.$observe("disabled",function(a){c.disabled=a||"disabled"===a||"true"===a,c.disabled&&(i.addClass(b.disabledClass),i.attr("tabindex","-1"))})}}}]),angular.module("att.abs.scrollbar",["att.abs.position"]).constant("attScrollbarConstant",{defaults:{axis:"y",navigation:!1,wheel:!0,wheelSpeed:40,wheelLock:!0,scrollInvert:!1,trackSize:!1,thumbSize:!1,alwaysVisible:!0}}).directive("attScrollbar",["$window","$timeout","$parse","$animate","attScrollbarConstant","$position",function(a,b,c,d,e,f){return{restrict:"A",scope:!0,transclude:!0,templateUrl:"app/scripts/ng_js_att_tpls/scrollbar/scrollbar.html",controller:["$scope","$element","$attrs",function(g,h,i){function j(){w.contentRatio<=1&&w.contentPosition>w.contentSize-w.viewportSize?w.contentPosition=w.contentSize-w.viewportSize:w.contentRatio>1&&w.contentPosition>0&&(w.contentPosition=0),w.contentPosition<=0?g.prevAvailable=!1:g.prevAvailable=!0,w.contentPosition>=w.contentSize-w.viewportSize?g.nextAvailable=!1:g.nextAvailable=!0}function k(){F?(z.on("touchstart",m),C.on("touchstart",m)):(C.on("mousedown",n),B.on("mousedown",r)),angular.element(a).on("resize",l),w.options.wheel&&h.on(G,o)}function l(){w.update()}function m(a){1===a.touches.length&&(a.stopPropagation(),n(a.touches[0]))}function n(a){x.addClass("scroll-no-select"),h.addClass("scroll-no-select"),w.options.alwaysVisible||B.addClass("visible"),D=E?a.clientX:a.clientY,w.thumbPosition=parseInt(C.css(J),10)||0,F?(L=!1,K=!1,z.on("touchmove",p),z.on("touchend",s),C.on("touchmove",q),C.on("touchend",s)):(y.on("mousemove",r),y.on("mouseup",s),C.on("mouseup",s))}function o(c){if(!(w.contentRatio>=1)){w.options.alwaysVisible||(v&&b.cancel(v),B.addClass("visible"),v=b(function(){B.removeClass("visible")},100));var d=c&&c.originalEvent||c||a.event,e=w.options.axis.toUpperCase(),f={X:d.deltaX||0,Y:d.deltaY||0},i=0===d.deltaMode?w.options.wheelSpeed:1;w.options.scrollInvert&&(i*=-1),"mousewheel"===G&&(f.Y=-1*d.wheelDelta/40,d.wheelDeltaX&&(f.X=-1*d.wheelDeltaX/40)),f.X*=-1/i,f.Y*=-1/i;var k=f[e];w.contentPosition-=k*w.options.wheelSpeed,w.contentPosition=Math.min(w.contentSize-w.viewportSize,Math.max(0,w.contentPosition)),fireEvent(h[0],"move"),j(),C.css(J,w.contentPosition/w.trackRatio+"px"),A.css(J,-w.contentPosition+"px"),(w.options.wheelLock||w.contentPosition!==w.contentSize-w.viewportSize&&0!==w.contentPosition)&&d.preventDefault(),g.$apply()}}function p(a){a.preventDefault(),L=!0,r(a.touches[0])}function q(a){a.preventDefault(),K=!0,r(a.touches[0])}function r(a){if(!(w.contentRatio>=1)){var b=E?a.clientX:a.clientY,c=b-D;(w.options.scrollInvert&&!F||F&&!w.options.scrollInvert)&&(c=D-b),L&&F&&(c=D-b),K&&F&&(c=b-D);var d=Math.min(w.trackSize-w.thumbSize,Math.max(0,w.thumbPosition+c));w.contentPosition=d*w.trackRatio,fireEvent(h[0],"move"),j(),C.css(J,d+"px"),A.css(J,-w.contentPosition+"px"),g.$apply()}}function s(){x.removeClass("scroll-no-select"),h.removeClass("scroll-no-select"),w.options.alwaysVisible||B.removeClass("visible"),y.off("mousemove",r),y.off("mouseup",s),C.off("mouseup",s),y.off("touchmove",p),y.off("ontouchend",s),C.off("touchmove",q),C.off("touchend",s)}var t={axis:i.attScrollbar||e.defaults.axis,navigation:i.navigation||e.defaults.navigation,wheel:e.defaults.wheel,wheelSpeed:e.defaults.wheelSpeed,wheelLock:e.defaults.wheelLock,scrollInvert:e.defaults.scrollInvert,trackSize:e.defaults.trackSize,thumbSize:e.defaults.thumbSize,alwaysVisible:e.defaults.alwaysVisible},u=i.scrollbar;u=u?c(u)(g):{},this.options=angular.extend({},t,u),this._defaults=t;var v,w=this,x=angular.element(document.querySelectorAll("body")[0]),y=angular.element(document),z=angular.element(h[0].querySelectorAll(".scroll-viewport")[0]),A=angular.element(h[0].querySelectorAll(".scroll-overview")[0]),B=angular.element(h[0].querySelectorAll(".scroll-bar")[0]),C=angular.element(h[0].querySelectorAll(".scroll-thumb")[0]),D=0,E="x"===this.options.axis,F=!1,G="onwheel"in document?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",H=E?"width":"height",I=H.charAt(0).toUpperCase()+H.slice(1).toLowerCase(),J=E?"left":"top",K=!1,L=!1;("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)&&(F=!0),this.contentPosition=0,this.viewportSize=0,this.contentSize=0,this.contentRatio=0,this.trackSize=0,this.trackRatio=0,this.thumbSize=0,this.thumbPosition=0,this.initialize=function(){return this.options.alwaysVisible||B.css("opacity",0),w.update(),k(),w},this.setSizeData=function(){this.viewportSize=z.prop("offset"+I)||1,this.contentSize=A.prop("scroll"+I)||1,this.contentRatio=this.viewportSize/this.contentSize,this.trackSize=this.options.trackSize||this.viewportSize,this.thumbSize=Math.min(this.trackSize,Math.max(0,this.options.thumbSize||this.trackSize*this.contentRatio)),this.trackRatio=this.options.thumbSize?(this.contentSize-this.viewportSize)/(this.trackSize-this.thumbSize):this.contentSize/this.trackSize},this.update=function(a){return w.setSizeData(),D=B.prop("offsetTop"),B.toggleClass("disable",this.contentRatio>=1||isNaN(this.contentRatio)),!this.options.alwaysVisible&&this.contentRatio<1&&this.viewportSize>0&&d.addClass(B,"visible").then(function(){d.removeClass(B,"visible"),g.$digest()}),null!==a&&("bottom"===a?this.contentPosition=this.contentSize-this.viewportSize:this.contentPosition=parseInt(a,10)||0),j(),C.css(J,w.contentPosition/w.trackRatio+"px"),B.css(H,w.trackSize+"px"),C.css(H,w.thumbSize+"px"),A.css(J,-w.contentPosition+"px"),this},fireEvent=function(a,b){var c,d=a;document.createEvent?(c=document.createEvent("HTMLEvents"),c.initEvent(b,!0,!1),d.dispatchEvent(c)):document.createEventObject&&(c=document.createEventObject(),d.fireEvent("on"+b,c))},g.customScroll=function(a){if(!(w.contentRatio>=1)){var b,c=f.position(z);b=E?c.width:c.height,a?w.contentPosition+=b:w.contentPosition-=b,w.contentPosition=Math.min(w.contentSize-w.viewportSize,Math.max(0,w.contentPosition)),fireEvent(h[0],"move"),j(),C.css(J,w.contentPosition/w.trackRatio+"px"),A.css(J,-w.contentPosition+"px")}},this.cleanup=function(){z.off("touchstart",m),C.off("mousedown",n),B.off("mousedown",r),C.off("touchmove",q),C.off("touchend",s),angular.element(a).off("resize",l),h.off(G,o),w.options.alwaysVisible=!0,s()}}],link:function(a,c,d,e){a.navigation=e.options.navigation,a.viewportHeight=d.viewportHeight,a.viewportWidth=d.viewportWidth,a.scrollbarAxis=e.options.axis,"x"===a.scrollbarAxis?c.addClass("horizontal"):"y"===a.scrollbarAxis&&c.addClass("vertical");var f=c.css("position");"relative"!==f&&"absolute"!==f&&c.css("position","relative"),a.$watch(function(){b(g,100,!1)});var g=function(){var b=angular.element(c[0].querySelectorAll(".scroll-overview")[0]),d=b.prop("scrollHeight"),f=a.oldValue;d!==f&&(a.oldValue=d,e.update())};e.initialize(),c.on("$destroy",function(){e.cleanup()})}}}]),angular.module("att.abs.search",["att.abs.utilities","att.abs.position","att.abs.utilities"]).directive("attSearch",["$document","$filter","$isElement","$documentBind","$timeout","$log","keymap",function(a,b,c,d,e,f,g){return{restrict:"A",scope:{cName:"=attSearch"},transclude:!1,replace:!1,require:"ngModel",templateUrl:"app/scripts/ng_js_att_tpls/search/search.html",link:function(b,h,i,j){b.selectedIndex=-1,b.selectedOption=i.placeholder,b.isDisabled=!1,b.className="select2-match",b.showSearch=!1,b.showlist=!1;var k="",l=new Date,m=void 0,n=[];e(function(){n=h.find("li")},10),f.warn("attSearch is deprecated, please use attSelect instead. This component will be removed by version 2.7."),i.noFilter||"true"===i.noFilter?b.noFilter=!0:b.noFilter=!1,"false"===i.placeholderAsOption?b.selectedOption=i.placeholder:b.selectMsg=i.placeholder,(i.startsWithFilter||"true"===i.startsWithFilter)&&(b.startsWithFilter=!0),"true"===i.showInputFilter&&(b.showSearch=!1,f.warn("showInputFilter functionality has been removed from the library.")),i.disabled&&(b.isDisabled=!0),m=angular.element(h).children().eq(0).find("a")[0];var o=0,p=function(){if(b.noFilter){var a=k,c=0;for(c=o;c<b.cName.length;c++)if(b.cName[c].title.startsWith(a)&&c!==b.selectedIndex){b.selectOption(b.cName[c],c,b.showlist),o=c,k="";break}(c>=b.cName.length||!b.cName[c+1].title.startsWith(a))&&o>0&&(o=0)}};b.showDropdown=function(){i.disabled||(b.showlist=!b.showlist,b.setSelectTop())},h.bind("keydown",function(a){if(g.isAllowedKey(a.keyCode)||g.isControl(a)||g.isFunctionKey(a))switch(a.preventDefault(),a.stopPropagation(),a.keyCode){case g.KEY.DOWN:b.selectNext();break;case g.KEY.UP:b.selectPrev(),k="";break;case g.KEY.ENTER:b.selectCurrent(),k="";break;case g.KEY.BACKSPACE:b.title="",k="",b.$apply();break;case g.KEY.SPACE:b.noFilter||(b.title+=" "),b.$apply();break;case g.KEY.ESC:""===b.title||void 0===b.title?(b.showlist=!1,m.focus(),b.$apply()):(b.title="",b.$apply()),b.noFilter&&(k="",m.focus(),b.showlist=!1)}else if(9!==a.keyCode){if(b.noFilter){var c=new Date,d=Math.abs(l.getMilliseconds()-c.getMilliseconds());l=c,d>100&&(k=""),k=k?k+String.fromCharCode(a.keyCode):String.fromCharCode(a.keyCode),k.length>2&&(k=k.substring(0,2)),p()}else b.showlist=!0,b.title=b.title?b.title+String.fromCharCode(a.keyCode):String.fromCharCode(a.keyCode);b.$apply()}else 9===a.keyCode&&(b.showlist=!1,b.title="",b.$apply())}),b.selectOption=function(a,c,d){-1===c||"-1"===c?(b.selCategory="",b.selectedIndex=-1,j.$setViewValue(""),"false"!==i.placeholderAsOption&&(b.selectedOption=b.selectMsg)):(b.selCategory=b.cName[c],b.selectedIndex=c,j.$setViewValue(b.selCategory),b.selectedOption=b.selCategory.title,angular.isDefined(n[c])&&n[c].focus()),b.title="",d||(b.showlist=!1,m.focus()),b.$apply()},b.selectCurrent=function(){b.showlist?(b.selectOption(b.selectMsg,b.selectedIndex,!1),b.$apply()):(b.showlist=!0,b.setSelectTop(),b.$apply())},b.hoverIn=function(a){b.selectedIndex=a,b.focusme()},b.setSelectTop=function(){e(function(){if(b.showlist&&!b.noFilter){var a=angular.element(h)[0].querySelector(".select2-results");if(angular.element(a.querySelector(".select2-result-current"))[0])var c=angular.element(a.querySelector(".select2-result-current"))[0].offsetTop;angular.element(a)[0].scrollTop=c}})},b.setCurrentTop=function(){e(function(){if(b.showlist){var a=angular.element(h)[0].querySelector(".select2-results");if(angular.element(a.querySelector(".hovstyle"))[0])var c=angular.element(a.querySelector(".hovstyle"))[0].offsetTop;c<angular.element(a)[0].scrollTop?angular.element(a)[0].scrollTop-=30:c+30>angular.element(a)[0].clientHeight&&(angular.element(a)[0].scrollTop+=30)}})},b.selectNext=function(){b.selectedIndex+1<=b.cName.length-1&&(b.selectedIndex+=1,b.showlist||b.selectOption(b.selectMsg,b.selectedIndex,!1),b.focusme(),b.$apply()),b.setCurrentTop()},b.selectPrev=function(){b.selectedIndex-1>=0?(b.selectedIndex-=1,b.showlist||b.selectOption(b.selectMsg,b.selectedIndex,!1),b.focusme(),b.$apply()):b.selectedIndex-1<0&&(void 0===i.placeholderAsOption||"true"===i.placeholderAsOption?b.selectedIndex=-1:b.selectedIndex=0,b.showlist||b.selectOption(b.selectMsg,b.selectedIndex,!1),b.focusme(),b.$apply()),b.setCurrentTop()},b.updateSelection=function(a){b.selectedOption=a.title,b.title=""},b.focusme=function(){e(function(){var a=angular.element(h).find("ul").find("li"),c=b.selectedIndex+2;b.noFilter&&(c=b.selectedIndex),angular.isDefined(a[c])&&a[c].focus()})},b.$watch("selCategory",function(a){a&&b.updateSelection(a)}),j.$viewChangeListeners.push(function(){b.$eval(i.ngChange)}),j.$render=function(){b.selCategory=j.$viewValue};var q=function(d){var e=c(angular.element(d.target),h,a);e||(b.showlist=!1,m.focus(),b.$apply())};d.click("showlist",q,b)}}}]),angular.module("att.abs.select",["att.abs.utilities","att.abs.position","att.abs.utilities"]).directive("attSelect",["$document","$filter","$isElement","$documentBind","$timeout","keymap","$log",function(a,b,c,d,e,f,g){return{restrict:"A",scope:{cName:"=attSelect"},transclude:!1,replace:!1,require:"ngModel",templateUrl:"app/scripts/ng_js_att_tpls/select/select.html",link:function(h,i,j,k){h.selectedIndex=-1,h.selectedOption=j.placeholder,h.isDisabled=!1,h.className="select2-match",h.showSearch=!1,h.showlist=!1;var l="",m=new Date,n=void 0,o=[];e(function(){o=i.find("li")},10),j.noFilter||"true"===j.noFilter?h.noFilter=!0:h.noFilter=!1,"false"===j.placeholderAsOption?h.selectedOption=j.placeholder:h.selectMsg=j.placeholder,(j.startsWithFilter||"true"===j.startsWithFilter)&&(h.startsWithFilter=!0),"true"===j.showInputFilter&&(h.showSearch=!1,g.warn("showInputFilter functionality has been removed from the library.")),j.disabled&&(h.isDisabled=!0);var p=function(){return h.startsWithFilter?"startsWith":"filter"};n=angular.element(i).children().eq(0).find("span")[0];var q=0,r=function(){if(h.noFilter){var a=l,b=0;for(b=q;b<h.cName.length;b++)if(h.cName[b].title.startsWith(a)&&b!==h.selectedIndex){
-h.selectOption(h.cName[b],b,h.showlist),q=b,l="";break}(b>=h.cName.length||!h.cName[b+1].title.startsWith(a))&&q>0&&(q=0)}};h.showDropdown=function(){j.disabled||(h.showlist=!h.showlist,h.setSelectTop(),h.focusme())},i.bind("keydown",function(a){if(f.isAllowedKey(a.keyCode)||f.isControl(a)||f.isFunctionKey(a))switch(a.preventDefault(),a.stopPropagation(),a.keyCode){case f.KEY.DOWN:h.selectNext();break;case f.KEY.UP:h.selectPrev(),l="";break;case f.KEY.ENTER:h.selectCurrent(),l="";break;case f.KEY.BACKSPACE:h.title="",l="",h.$apply();break;case f.KEY.SPACE:h.noFilter||(h.title+=" "),h.$apply();break;case f.KEY.ESC:""===h.title||void 0===h.title?(h.showlist=!1,n.focus(),h.$apply()):(h.title="",h.$apply()),h.noFilter&&(l="",n.focus(),h.showlist=!1)}else if(a.keyCode!==f.KEY.TAB){if(h.noFilter){var c=new Date,d=Math.abs(m.getMilliseconds()-c.getMilliseconds());m=c,d>100&&(l=""),l=l?l+String.fromCharCode(a.keyCode):String.fromCharCode(a.keyCode),l.length>2&&(l=l.substring(0,2)),r()}else if(h.showlist=!0,h.title=h.title?h.title+String.fromCharCode(a.keyCode):String.fromCharCode(a.keyCode),""!=h.title)for(var e=b(p())(h.cName,h.title),g=0;g<e.length;g++)for(var i=0;i<h.cName.length&&angular.isDefined(h.cName[h.selectedIndex]);i++)if(e[g].title===h.cName[h.selectedIndex].title){h.selectedIndex=g,h.focusme();break}h.$apply()}else a.keyCode===f.KEY.TAB&&(h.showlist=!1,h.title="",h.$apply())}),h.selectOption=function(a,c,d){if(-1===c||"-1"===c)h.selCategory="",h.selectedIndex=-1,k.$setViewValue(""),"false"!==j.placeholderAsOption&&(h.selectedOption=h.selectMsg);else{if(""!=h.title){var f=b(p())(h.cName,h.title);if(angular.isDefined(f)&&angular.isDefined(f[c]))for(var g=0;g<h.cName.length;g++)if(f[c].title===h.cName[g].title){c=g;break}}h.selCategory=h.cName[c],h.selectedIndex=c,k.$setViewValue(h.selCategory),h.selectedOption=h.selCategory.title,e(function(){if(angular.isDefined(o[c]))try{o[index].focus()}catch(a){}})}h.title="",d||(h.showlist=!1,n.focus())},h.selectCurrent=function(){h.showlist?h.selectOption(h.selectMsg,h.selectedIndex,!1):(h.showlist=!0,h.setSelectTop()),h.$apply()},h.hoverIn=function(a){h.selectedIndex=a,h.focusme()},h.setSelectTop=function(){e(function(){if(h.showlist&&!h.noFilter){var a=angular.element(i)[0].querySelector(".select2-results");if(angular.element(a.querySelector(".select2-result-current"))[0])var b=angular.element(a.querySelector(".select2-result-current"))[0].offsetTop;angular.element(a)[0].scrollTop=b}})},h.setCurrentTop=function(){e(function(){if(h.showlist){var a=angular.element(i)[0].querySelector(".select2-results");if(angular.element(a.querySelector(".hovstyle"))[0])var b=angular.element(a.querySelector(".hovstyle"))[0].offsetTop;b<angular.element(a)[0].scrollTop?angular.element(a)[0].scrollTop-=30:b+30>angular.element(a)[0].clientHeight&&(angular.element(a)[0].scrollTop+=30)}})},h.selectNext=function(){h.cName.length;if(h.selectedIndex+1<=h.cName.length-1){h.selectedIndex+=1;var a=h.cName[h.selectedIndex].disabled;a&&(h.selectedIndex+=1),h.showlist||h.selectOption(h.selectMsg,h.selectedIndex,!1),h.focusme(),h.$apply()}h.setCurrentTop()},h.selectPrev=function(){if(h.selectedIndex-1>=0){h.selectedIndex-=1;var a=h.cName[h.selectedIndex].disabled;a&&(h.selectedIndex-=1),h.showlist||h.selectOption(h.selectMsg,h.selectedIndex,!1),h.focusme(),h.$apply()}else h.selectedIndex-1<0&&(void 0===j.placeholderAsOption||"true"===j.placeholderAsOption?void 0===j.placeholder?h.selectedIndex=0:h.selectedIndex=-1:h.selectedIndex=0,h.showlist||h.selectOption(h.selectMsg,h.selectedIndex,!1),h.focusme(),h.$apply());h.setCurrentTop()},h.updateSelection=function(a){h.selectedOption=a.title,h.title="",a.index<0&&h.selectOption(h.selectMsg,a.index,h.showlist)},h.focusme=function(){e(function(){var a=angular.element(i).find("ul").find("li"),b=h.selectedIndex+2;if(h.noFilter&&(b=h.selectedIndex),angular.isDefined(a[b]))try{a[b].focus()}catch(c){}})},h.$watch("selCategory",function(a){a&&h.updateSelection(a)}),k.$viewChangeListeners.push(function(){h.$eval(j.ngChange)}),k.$render=function(){h.selCategory=k.$viewValue};var s=function(b){var d=c(angular.element(b.target),i,a);d||(h.showlist=!1,n.focus(),h.$apply())};d.click("showlist",s,h)}}}]).directive("textDropdown",["$document","$isElement","$documentBind","keymap",function(a,b,c,d){return{restrict:"EA",replace:!0,scope:{actions:"=actions",defaultAction:"=defaultAction",onActionClicked:"=?"},templateUrl:"app/scripts/ng_js_att_tpls/select/textDropdown.html",link:function(e,f,g){e.selectedIndex=0,e.selectedOption=g.placeholder,e.isDisabled=!1,e.isActionsShown=!1;var h=void 0;if(g.disabled&&(e.isDisabled=!0),h=f.find("div")[0],angular.isDefined(e.defaultAction))if(angular.isDefined(e.defaultAction)||""!==e.defaultAction){for(var i in e.actions)if(e.actions[i]===e.defaultAction){e.currentAction=e.actions[i],e.selectedIndex=e.actions.indexOf(i),e.isActionsShown=!1;break}}else e.currentAction=e.actions[0];else e.currentAction=e.actions[0],e.selectedIndex=0;e.toggle=function(){e.isActionsShown=!e.isActionsShown},e.chooseAction=function(a,b,c){null!=a?(e.currentAction=b,e.selectedIndex=c):e.currentAction=e.actions[e.selectedIndex],angular.isFunction(e.onActionClicked)&&e.onActionClicked(e.currentAction),e.toggle()},e.isCurrentAction=function(a){return a===e.currentAction},f.bind("keydown",function(a){if(d.isAllowedKey(a.keyCode)||d.isControl(a)||d.isFunctionKey(a)){switch(a.preventDefault(),a.stopPropagation(),a.keyCode){case d.KEY.DOWN:e.selectNext();break;case d.KEY.UP:e.selectPrev();break;case d.KEY.ENTER:e.selectCurrent();break;case d.KEY.ESC:e.isActionsShown=!1,h.focus(),e.$apply()}return void e.$apply()}a.keyCode===d.KEY.TAB&&(e.isActionsShown=!1,e.$apply())}),e.selectCurrent=function(){e.selectedIndex<0&&(e.selectedIndex=0),e.isActionsShown?e.chooseAction(null,e.currentAction):e.toggle()},e.selectNext=function(){e.isActionsShown&&(e.selectedIndex+1<e.actions.length?e.selectedIndex+=1:e.selectedIndex=e.actions.length-1,e.$apply())},e.selectPrev=function(){e.isActionsShown&&(e.selectedIndex-1>=0?e.selectedIndex-=1:e.selectedIndex-1<0&&(e.selectedIndex=0),e.$apply())},e.hoverIn=function(a){e.selectedIndex=a};var j=function(c){var d=b(angular.element(c.target),f,a);d||(e.toggle(),e.$apply())};c.click("isActionsShown",j,e)}}}]),angular.module("att.abs.slider",["att.abs.position"]).constant("sliderDefaultOptions",{width:300,step:1,precision:0,disabledWidth:116}).directive("attSlider",["sliderDefaultOptions","$position","$document",function(a,b,c){return{restrict:"EA",replace:!0,transclude:!0,scope:{floor:"=",ceiling:"=",step:"@",precision:"@",width:"@",textDisplay:"=",value:"=",ngModelSingle:"=?",ngModelLow:"=?",ngModelHigh:"=?",ngModelDisabled:"=?"},templateUrl:"app/scripts/ng_js_att_tpls/slider/slider.html",link:function(d,e,f){var g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=0,z=!1;d.minPtrOffset=0,d.maxPtrOffset=0;var A=a.disabledWidth,B=e.children();n=B[0].children,n=angular.element(n[0]),x=B[1].children,w=angular.element(x[0]),v=angular.element(x[1]),u=angular.element(x[2]),o=null==f.ngModelSingle&&null==f.ngModelLow&&null==f.ngModelHigh&&null!=f.ngModelDisabled,r=null==f.ngModelSingle&&null!=f.ngModelLow&&null!=f.ngModelHigh,s="ngModelLow",t="ngModelHigh",r?w.remove():(v.remove(),u.remove()),o?(d.disabledStyle={width:A+"px",zIndex:1},d.handleStyle={left:A+"px"}):n.remove(),p=parseFloat(d.floor),q=parseFloat(d.ceiling),m=q-p,g=0,h=void 0!==f.width?f.width:0!==e[0].clientWidth?e[0].clientWidth:a.width,l=h-g,d.keyDown=function(c){if(39===c.keyCode){var f=b.position(e).left;if(i)"ngModelLow"===d.ref?(j=a.step+j,i=j):"ngModelHigh"===d.ref?(k=a.step+k,i=k):i=a.step+i;else{if(r&&"ngModelLow"===d.ref)return;i=a.step+f,j=k=i}}else if(37===c.keyCode){var g=b.position(w).left;i?0>=i||("ngModelLow"===d.ref?(j-=a.step,i=j):"ngModelHigh"===d.ref?(k-=a.step,i=k):(i-=a.step,j=k=i)):i=g-a.step}i>=0&&d.ptrOffset(i)},d.mouseDown=function(a,b){d.ref=b,z=!0,y=r?d.ref===s?a.clientX-d.minPtrOffset:a.clientX-d.maxPtrOffset:i?a.clientX-i:a.clientX,o&&(d.ref="ngModelDisabled",d.disabledStyle={width:A+"px",zIndex:1})},d.moveElem=function(a){if(z){var b;b=a.clientX,i=b-y,d.ptrOffset(i)}},d.focus=function(a,b){console.log(b),d.ref=b},d.mouseUp=function(a){z=!1,v.removeClass("dragging"),u.removeClass("dragging"),w.removeClass("dragging"),c.off("mousemove")},d.keyUp=function(a){z=!1,v.removeClass("dragging"),u.removeClass("dragging"),w.removeClass("dragging"),c.off("mousemove")},d.calStep=function(a,b,c,d){var e,f,g,h;return null===d&&(d=0),null===c&&(c=1/Math.pow(10,b)),f=(a-d)%c,h=f>c/2?a+c-f:a-f,e=Math.pow(10,b),g=h*e/e,g.toFixed(b)},d.percentOffset=function(a){return(a-g)/l*100},d.ptrOffset=function(b){var c,e;if(b=Math.max(Math.min(b,h),g),c=d.percentOffset(b),e=p+m*c/100,r){var f;d.ref===s?(d.minHandleStyle={left:b+"px"},d.minNewVal=e,d.minPtrOffset=b,v.addClass("dragging"),e>d.maxNewVal&&(d.ref=t,u[0].focus(),d.maxNewVal=e,d.maxPtrOffset=b,u.addClass("dragging"),v.removeClass("dragging"),d.maxHandleStyle={left:b+"px"})):(d.maxHandleStyle={left:b+"px"},d.maxNewVal=e,d.maxPtrOffset=b,u.addClass("dragging"),e<d.minNewVal&&(d.ref=s,v[0].focus(),d.minVal=e,d.minPtrOffset=b,v.addClass("dragging"),u.removeClass("dragging"),d.minHandleStyle={left:b+"px"})),f=parseInt(d.maxPtrOffset)-parseInt(d.minPtrOffset),d.rangeStyle={width:f+"px",left:d.minPtrOffset+"px"}}else o&&b>A?d.rangeStyle={width:b+"px",zIndex:0}:(w.addClass("dragging"),d.rangeStyle={width:b+"px"}),d.handleStyle={left:b+"px"};(void 0===d.precision||void 0===d.step)&&(d.precision=a.precision,d.step=a.step),e=d.calStep(e,parseInt(d.precision),parseFloat(d.step),parseFloat(d.floor)),d[d.ref]=e}}}}]).directive("attSliderMin",[function(){return{require:"^attSlider",restrict:"EA",replace:!0,transclude:!0,templateUrl:"app/scripts/ng_js_att_tpls/slider/minContent.html"}}]).directive("attSliderMax",[function(){return{require:"^attSlider",restrict:"EA",replace:!0,transclude:!0,templateUrl:"app/scripts/ng_js_att_tpls/slider/maxContent.html"}}]),angular.module("att.abs.splitButtonDropdown",["att.abs.utilities","att.abs.position"]).directive("attButtonDropdown",["$document","$parse","$documentBind","$timeout","$isElement",function(a,b,c,d,e){return{restrict:"EA",replace:!0,transclude:!0,templateUrl:"app/scripts/ng_js_att_tpls/splitButtonDropdown/splitButtonDropdown.html",scope:{btnText:"@",btnType:"@",btnLink:"@",btnClick:"&",toggleTitle:"@"},controller:["$scope","$element",function(a,b){this.cSelected=0,this.closeAndFocusDropdown=function(){a.isDropDownOpen&&a.$apply(function(){a.isDropDownOpen=!1,angular.element(b[0].querySelector("a.dropdown-toggle"))[0].focus()})},this.focusNext=function(){this.cSelected=this.cSelected+1>=this.childScopes.length?a.cycleSelection===!0?0:this.childScopes.length-1:this.cSelected+1,this.childScopes[this.cSelected].sFlag=!0,this.resetFlag(this.cSelected)},this.focusPrev=function(){this.cSelected=this.cSelected-1<0?a.cycleSelection===!0?this.childScopes.length-1:0:this.cSelected-1,this.childScopes[this.cSelected].sFlag=!0,this.resetFlag(this.cSelected)},this.childScopes=[],this.registerScope=function(a){this.childScopes.push(a)},this.resetFlag=function(a){for(var b=0;b<this.childScopes.length;b++)b!==a&&(this.childScopes[b].sFlag=!1)}}],link:function(f,g,h){f.isSmall=""===h.small?!0:!1,f.multiselect=""===h.multiselect?!0:!1,f.cycleSelection=""===h.cycleSelection?!0:!1,f.isDropDownOpen=!1,f.isActionDropdown=!1,f.btnText||(f.isActionDropdown=!0),f.clickFxn=function(){"function"!=typeof f.btnClick||f.btnLink||(f.btnClick=b(f.btnClick),f.btnClick()),f.multiselect===!0&&(f.isDropDownOpen=!1)},f.toggleDropdown=function(){"disabled"!==f.btnType&&(f.isDropDownOpen=!f.isDropDownOpen,f.isDropDownOpen&&d(function(){angular.element(g[0].querySelector("li"))[0].focus()}))},f.btnTypeSelector=function(a,b){""!==a?f.btnTypeFinal=a:f.btnTypeFinal=b};var i=function(b){var c=e(angular.element(b.target),g.find("ul").eq(0),a);c||(f.isDropDownOpen=!1,f.$apply())};c.click("isDropDownOpen",i,f),h.$observe("btnType",function(a){f.btnType=a}),h.$observe("attButtonDropdown",function(a){h.attButtonDropdown=a,f.btnTypeSelector(h.attButtonDropdown,f.btnType)})}}}]).directive("attButtonDropdownItem",["$location","keymap",function(a,b){return{restrict:"EA",require:["^attButtonDropdown","?ngModel"],replace:!0,transclude:!0,templateUrl:"app/scripts/ng_js_att_tpls/splitButtonDropdown/splitButtonDropdownItem.html",scope:{itemLink:"@"},link:function(a,c,d,e){angular.element(c[0].querySelector("a"));a.sFlag=!1,e[0].registerScope(a);e[1]?a.isSelected=e[1].$viewValue:a.isSelected=!1,c.bind("keydown",function(c){if(b.isAllowedKey(c.keyCode)||b.isControl(c)||b.isFunctionKey(c))switch(c.preventDefault(),c.stopPropagation(),c.keyCode){case b.KEY.DOWN:e[0].focusNext();break;case b.KEY.UP:e[0].focusPrev();break;case b.KEY.ENTER:a.selectItem();break;case b.KEY.ESC:e[0].closeAndFocusDropdown()}a.$apply()}),a.selectItem=function(){e[1]&&a.$evalAsync(function(){e[1].$setViewValue(!e[1].$viewValue)})}}}}]),angular.module("att.abs.splitIconButton",["att.abs.utilities"]).constant("iconStateConstants",{MIDDLE:"middle",LEFT:"left",RIGHT:"right",NEXT_TO_DROPDOWN:"next-to-dropdown",LEFT_NEXT_TO_DROPDOWN:"left-next-to-dropdown",DIR_TYPE:{LEFT:"left",RIGHT:"right",BUTTON:"button"},SPLIT_ICON_BTN_EVENT_EMITTER_KEY:"splitIconButtonTap"}).directive("expandableLine",[function(){return{restrict:"EA",replace:!0,priority:300,require:["^attSplitIconButton","expandableLine"],controller:["$scope",function(a){a.isActive=!1,this.setActiveState=function(b){a.isActive=b},this.isActive=a.isActive,this.dirType=a.dirType}],template:"<div ng-class=\"{'expand-line-container': !isActive, 'expand-line-container-active': isActive}\"> <div ng-class=\"{'hovered-line':isActive, 'vertical-line':!isActive}\"> </div></div>",scope:{dirType:"@"},link:function(a,b,c,d){var e=d[0],f=d[1];e.addSubCtrl(f)}}}]).controller("AttSplitIconCtrl",["$scope",function(a){this.setType=function(b){a.type=b},this.isDropdown=function(b){a.isDropdown=b},this.dropDownClicked=function(){a.dropDownClicked&&a.dropDownClicked()},this.dirType=a.dirType}]).directive("attSplitIcon",["$document","$timeout","iconStateConstants","$documentBind","events","keymap",function(a,b,c,d,e,f){return{restrict:"EA",replace:!0,priority:200,transclude:!0,require:["^attSplitIconButton","attSplitIcon"],templateUrl:"app/scripts/ng_js_att_tpls/splitIconButton/splitIcon.html",scope:{icon:"@",iconTitle:"@title",hoverWatch:"=",dropDownWatch:"=",dirType:"@"},controller:"AttSplitIconCtrl",link:function(a,b,g,h){var i=h[0],j=h[1];i.addSubCtrl(j),a.iconStateConstants=c;var k,l=0,m=!1;a.isDropdown=!1,a.isDropdownOpen=!1;var n=function(b){a.isDropdown&&(m?(m=!1,a.toggleDropdown()):a.toggleDropdown(!1),a.$apply())};g.dropDownId&&""!==g.dropDownId&&(a.dropDownId=g.dropDownId,a.isDropdown=!0),a.$on(c.SPLIT_ICON_BTN_EVENT_EMITTER_KEY,function(c,d){function g(b){switch(b.which){case f.KEY.TAB:a.toggleDropdown(!1),a.$digest();break;case f.KEY.ESC:n();break;case f.KEY.ENTER:a.isDropDownOpen&&h();break;case f.KEY.UP:b.preventDefault(),e.stopPropagation(b),a.isDropDownOpen&&a.previousItemInDropdown();break;case f.KEY.DOWN:b.preventDefault(),e.stopPropagation(b),a.isDropDownOpen?a.nextItemInDropdown():(m=!0,n(),h())}}function h(){if(void 0===k){k=[];for(var a=b.find("li"),c=0;c<a.length;c++)k.push(a.eq(c));k[l].children().eq(0).addClass("selected-item")}}if("boolean"==typeof d&&d)a.dropDownClicked(),a.isDropDownOpen&&k[l].eq(0).find("a")[0].click();else{var i=d;a.isDropdown&&g(i)}}),a.nextItemInDropdown=function(){k&&l<k.length-1&&(l++,k[l-1].children().eq(0).removeClass("selected-item"),k[l].children().eq(0).addClass("selected-item"))},a.previousItemInDropdown=function(){l>0&&(l--,k[l].children().eq(0).addClass("selected-item"),l+1<k.length&&k[l+1].children().eq(0).removeClass("selected-item"))},a.$watch("isIconHovered",function(b){a.hoverWatch=b}),a.$watch("type",function(b){function c(b,c,d,e,f){a.isMiddle=b,a.isNextToDropDown=c,a.isRight=d,a.isLeft=e,a.isLeftNextDropdown=f}switch(b){case a.iconStateConstants.MIDDLE:c(!0,!1,!1,!0,!1);break;case a.iconStateConstants.LEFT:c(!1,!1,!1,!0,!1);break;case a.iconStateConstants.RIGHT:c(!1,!1,!0,!1,!1);break;case a.iconStateConstants.NEXT_TO_DROPDOWN:c(!1,!0,!0,!0,!1);break;case a.iconStateConstants.LEFT_NEXT_TO_DROPDOWN:c(!1,!1,!1,!0,!0)}}),a.dropDownClicked=function(){m=!0},a.toggleDropdown=function(b){void 0!==b?a.isDropDownOpen=b:a.isDropDownOpen=!a.isDropDownOpen,a.dropDownWatch=a.isDropDownOpen},d.click("isDropdown",n,a)}}}]).controller("AttSplitIconButtonCtrl",["$scope","iconStateConstants",function(a,b){function c(a){var b=-1;for(var c in d.subCtrls){var e=d.subCtrls[c];if(e.dirType===a){b=c;break}}return b}this.subCtrls=[],a.isLeftLineShown=!0,a.isRightLineShown=!0,a.childrenScopes=[];var d=this;this.addSubCtrl=function(a){this.subCtrls.push(a)},this.isLeftLineShown=function(b){return void 0===b?a.isLeftLineShown:void(a.isLeftLineShown=b)},this.isRightLineShown=function(b){return void 0===b?a.isRightLineShown:void(a.isRightLineShown=b)},this.setLeftLineHover=function(d){var e=c(b.DIR_TYPE.LEFT);a.isLeftLineShown&&this.subCtrls[e]&&this.subCtrls[e].setActiveState&&this.subCtrls[e].setActiveState(d)},this.setRightLineHover=function(d){var e=c(b.DIR_TYPE.RIGHT);a.isRightLineShown&&this.subCtrls[e]&&this.subCtrls[e].setActiveState&&this.subCtrls[e].setActiveState(d)},this.toggleLines=function(d,e,f,g){function h(){for(var a=0;j>a;a++)if(i[a]===f){j-1>=a+1&&i[a+1].isLeftLineShown()&&i[a+1].subCtrls[k]&&i[a+1].subCtrls[k].setActiveState&&i[a+1].subCtrls[k].setActiveState(d),a-1>=0&&i[a-1].isRightLineShown()&&i[a-1].subCtrls[l]&&i[a-1].subCtrls[l].setActiveState&&i[a-1].subCtrls[l].setActiveState(d);break}}var i=e.subIconButtons,j=i.length,k=c(b.DIR_TYPE.LEFT),l=c(b.DIR_TYPE.RIGHT);g?i[j-2]==f?i[j-2].isLeftLineShown()?i[j-2].subCtrls[k].setActiveState(d):j-3>=0&&i[j-3].isRightLineShown()&&i[j-3].subCtrls[l].setActiveState(d):(h(),a.isLeftLineShown&&this.subCtrls[k].setActiveState(d),a.isRightLineShown&&this.subCtrls[l].setActiveState(d)):(a.isLeftLineShown||a.isRightLineShown||h(),a.isLeftLineShown&&this.subCtrls[k].setActiveState&&this.subCtrls[k].setActiveState(d),a.isRightLineShown&&this.subCtrls[l].setActiveState&&this.subCtrls[l].setActiveState(d))},this.setButtonType=function(a){var d=c(b.DIR_TYPE.BUTTON);this.subCtrls[d]&&this.subCtrls[d].setType&&this.subCtrls[d].setType(a)}}]).directive("attSplitIconButton",["$document","iconStateConstants","keymap",function(a,b,c){return{restrict:"EA",replace:!0,priority:100,transclude:!0,require:["^attSplitIconButtonGroup","attSplitIconButton"],controller:"AttSplitIconButtonCtrl",templateUrl:"app/scripts/ng_js_att_tpls/splitIconButton/splitIconButton.html",scope:{icon:"@",title:"@",dropDownId:"@"},link:function(a,d,e,f){a.title||(a.title=a.icon);var g=f[0],h=f[1];g.addIconButton(h),d.bind("keydown",function(d){(d.which===c.KEY.ESC||d.which===c.KEY.DOWN||d.which===c.KEY.ENTER||d.which===c.KEY.UP||d.which===c.KEY.TAB)&&(a.clickHandler(),a.$broadcast(b.SPLIT_ICON_BTN_EVENT_EMITTER_KEY,d))}),a.dropDownWatch=!1,a.iconStateConstants=b,a.clickHandler=function(){g.hideLeftLineRightButton(h)},a.$watch("isHovered",function(a){a?h.toggleLines(a,g,h,g.isDropDownOpen):h.toggleLines(a,g,h,g.isDropDownOpen)}),a.$watch("dropDownWatch",function(a){g.isDropDownOpen=a,g.toggleDropdownState(a)})}}}]).controller("AttSplitIconButtonGroupCtrl",["$scope","iconStateConstants",function(a,b){this.subIconButtons=[],this.addIconButton=function(a){this.subIconButtons.push(a)},this.isDropDownOpen=!1,this.hideLeftLineRightButton=function(a){var b=this.subIconButtons.length,c=this.subIconButtons[b-2],d=this.subIconButtons[b-1];a!=c&&a!=d&&d.setLeftLineHover(!1)},this.toggleDropdownState=function(a){var c=this.subIconButtons.length;c>2?a?(this.subIconButtons[c-2].isRightLineShown()?this.subIconButtons[c-2].setRightLineHover(!0):this.subIconButtons[c-1].setLeftLineHover(!0),this.subIconButtons[c-2].setButtonType(b.NEXT_TO_DROPDOWN)):(this.subIconButtons[c-1].setLeftLineHover(!1),this.subIconButtons[c-2].setButtonType(b.MIDDLE)):a?(this.subIconButtons[0].setRightLineHover(!0),this.subIconButtons[0].setButtonType(b.LEFT_NEXT_TO_DROPDOWN)):this.subIconButtons[0].setButtonType(b.LEFT)}}]).directive("attSplitIconButtonGroup",["$document","$timeout","iconStateConstants",function(a,b,c){return{restrict:"EA",replace:!0,priority:50,transclude:!0,require:"attSplitIconButtonGroup",controller:"AttSplitIconButtonGroupCtrl",templateUrl:"app/scripts/ng_js_att_tpls/splitIconButton/splitIconButtonGroup.html",scope:{},link:function(a,d,e,f){function g(){var a=f.subIconButtons,b=0,e=a.length-1;if(a[b].setButtonType(c.LEFT),a[b].isLeftLineShown(!1),a[b].isRightLineShown(!0),a[e].setButtonType(c.RIGHT),a[e].isRightLineShown(!1),a[e].isLeftLineShown(!1),e>=2){for(var g=1;e>g;)a[g].setButtonType(c.MIDDLE),a[g].isRightLineShown(!1),a[g].isLeftLineShown(!1),g++;for(var h=2;e>=h;)h==e?a[h].isLeftLineShown(!0):(a[h].isRightLineShown(!0),a[h].isLeftLineShown(!0)),h+=2}var i=d.find("ul");if(i.length>0){var j=e+1;if(j>2){var k=34*j-70+j/1.5+.5,l=k+"px";angular.element(i).css("left",l),angular.element(i).css("border-top-left-radius","0px")}else angular.element(i).css("left","0px")}}b(g,100)}}}]),angular.module("att.abs.stepSlider",["att.abs.position"]).constant("sliderConstants",{SLIDER:{settings:{from:1,to:40,step:1,smooth:!0,limits:!0,value:"3",dimension:"",vertical:!1},className:"jslider",selector:".jslider-"},EVENTS:{},COLORS:{GREEN:"green",BLUE_HIGHLIGHT:"blue",MAGENTA:"magenta",GOLD:"gold",PURPLE:"purple",DARK_BLUE:"dark-blue",REGULAR:"regular",WHITE:"white"}}).factory("utils",function(){return{offset:function(a){var b=a[0],c=0,d=0,e=document.documentElement||document.body,f=window.pageXOffset||e.scrollLeft,g=window.pageYOffset||e.scrollTop;return c=b.getBoundingClientRect().left+f,d=b.getBoundingClientRect().top+g,{left:c,top:d}},roundUpToScale:function(a,b,c,d){function e(a,b){var c=.1;return Math.abs(b-a)<=c?!0:!1}for(var f,g,h,i,j=1;j<b.length;j++){if(f=b[j-1],g=b[j],i=.5*(g-f)+f,0===f&&i>=a||e(f,a)){h=f;break}if(a>f&&(g>a||e(a,g))){h=g;break}}return c&&c>h?b[d]:h},valueForDifferentScale:function(a,b,c,d){var e=c/100;return 0===e?a:d[c]},convertToMbpsGbps:function(a,b,c){function d(a,b){var c=Math.pow(10,b);return~~(a*c)/c}var e=3;return c&&(e=c),a>1024&&1e6>a&&angular.equals(b,"Kbps")?(a=d(a/1e3,e),b="Mbps"):a>1024&&1e6>a&&angular.equals(b,"Mbps")?(a=d(a/1e3,e),b="Mbps"):b=(1024>=a&&angular.equals(b,"Mbps"),"Kbps"),a>=1e6&&angular.equals(b,"Kbps")&&(a=d(a/1e6,e),b="Gbps"),{unitValue:a,unitLabel:b}},getConversionFactorValue:function(a,b,c){if(a<=b[0].startVal)return{scaledVal:a,scaledDimension:c};var d=0;for(var e in b){var f=b[e];a>f.startVal&&(d=e)}var g=b[d].scaleFactor,h=a/g,i=b[d].dimension;return{scaledVal:h,scaledDimension:i}}}}).factory("sliderDraggable",["utils",function(a){function b(){this._init.apply(this,arguments)}return b.prototype.oninit=function(){},b.prototype.events=function(){},b.prototype.onmousedown=function(){this.ptr.css({position:"absolute"})},b.prototype.onmousemove=function(a,b,c){this.ptr.css({left:b,top:c})},b.prototype.onmouseup=function(){},b.prototype.isDefault={drag:!1,clicked:!1,toclick:!0,mouseup:!1},b.prototype._init=function(){if(arguments.length>0){if(this.ptr=arguments[0],this.parent=arguments[2],!this.ptr)return;this.is={},angular.extend(this.is,this.isDefault);var b=a.offset(this.ptr);this.d={left:b.left,top:b.top,width:this.ptr[0].clientWidth,height:this.ptr[0].clientHeight},this.oninit.apply(this,arguments),this._events()}},b.prototype._getPageCoords=function(a){var b={};return b=a.targetTouches&&a.targetTouches[0]?{x:a.targetTouches[0].pageX,y:a.targetTouches[0].pageY}:{x:a.pageX,y:a.pageY}},b.prototype._bindEvent=function(a,b,c){this.supportTouches_?a[0].attachEvent(this.events_[b],c):a.bind&&a.bind(this.events_[b],c)},b.prototype._events=function(){var a=this;this.supportTouches_="ontouchend"in document,this.events_={click:this.supportTouches_?"touchstart":"click",down:this.supportTouches_?"touchstart":"mousedown",move:this.supportTouches_?"touchmove":"mousemove",up:this.supportTouches_?"touchend":"mouseup",mousedown:(this.supportTouches_,"mousedown")};var b=angular.element(window.document);this._bindEvent(b,"move",function(b){a.is.drag&&(b.stopPropagation(),b.preventDefault(),a.parent.disabled||a._mousemove(b))}),this._bindEvent(b,"down",function(b){a.is.drag&&(b.stopPropagation(),b.preventDefault())}),this._bindEvent(b,"up",function(b){a._mouseup(b)}),this._bindEvent(this.ptr,"down",function(b){return a._mousedown(b),!1}),this._bindEvent(this.ptr,"up",function(b){a._mouseup(b)}),this.events()},b.prototype._mousedown=function(a){this.is.drag=!0,this.is.clicked=!1,this.is.mouseup=!1;var b=this._getPageCoords(a);this.cx=b.x-this.ptr[0].offsetLeft,this.cy=b.y-this.ptr[0].offsetTop,angular.extend(this.d,{left:this.ptr[0].offsetLeft,top:this.ptr[0].offsetTop,width:this.ptr[0].clientWidth,height:this.ptr[0].clientHeight}),this.outer&&this.outer.get(0)&&this.outer.css({height:Math.max(this.outer.height(),$(document.body).height()),overflow:"hidden"}),this.onmousedown(a)},b.prototype._mousemove=function(a){if(0!==this.uid){this.is.toclick=!1;var b=this._getPageCoords(a);this.onmousemove(a,b.x-this.cx,b.y-this.cy)}},b.prototype._mouseup=function(a){this.is.drag&&(this.is.drag=!1,this.outer&&this.outer.get(0)&&($.browser.mozilla?this.outer.css({overflow:"hidden"}):this.outer.css({overflow:"visible"}),$.browser.msie&&"6.0"===$.browser.version?this.outer.css({height:"100%"}):this.outer.css({height:"auto"})),this.onmouseup(a))},b}]).factory("sliderPointer",["sliderDraggable","utils",function(a,b){function c(){a.apply(this,arguments)}return c.prototype=new a,c.prototype.oninit=function(a,b,c){this.uid=b,this.parent=c,this.value={},this.settings=angular.copy(c.settings)},c.prototype.onmousedown=function(a){var c=b.offset(this.parent.domNode),d={left:c.left,top:c.top,width:this.parent.domNode[0].clientWidth,height:this.parent.domNode[0].clientHeight};this._parent={offset:d,width:d.width,height:d.height},this.ptr.addClass("jslider-pointer-hover"),this.setIndexOver()},c.prototype.onmousemove=function(a,c,d){var e=this._getPageCoords(a),f=this.calc(e.x);this.parent.settings.smooth||(f=b.roundUpToScale(f,this.parent.settings.scale,this.parent.settings.cutOffWidth,this.parent.settings.cutOffIndex));var g=this.parent.settings.cutOffWidth;g&&g>f&&(f=g),this._set(f)},c.prototype.onmouseup=function(a){if(this.settings.callback&&angular.isFunction(this.settings.callback)){var b=this.parent.getValue();this.settings.callback.call(this.parent,b)}this.ptr.removeClass("jslider-pointer-hover")},c.prototype.setIndexOver=function(){this.parent.setPointersIndex(1),this.index(2)},c.prototype.index=function(a){},c.prototype.limits=function(a){return this.parent.limits(a,this)},c.prototype.calc=function(a){var b=a-this._parent.offset.left,c=this.limits(100*b/this._parent.width);return c},c.prototype.set=function(a,b){this.value.origin=this.parent.round(a),this._set(this.parent.valueToPrc(a,this),b)},c.prototype._set=function(a,b){b||(this.value.origin=this.parent.prcToValue(a)),this.value.prc=a,this.ptr.css({left:a+"%"}),this.parent.redraw(this)},c}]).factory("slider",["sliderPointer","sliderConstants","utils",function(a,b,c){function d(){return this.init.apply(this,arguments)}function e(a){f.css("width",a)}var f;return d.prototype.changeCutOffWidth=e,d.prototype.init=function(a,c,d){this.settings=b.SLIDER.settings,angular.extend(this.settings,angular.copy(d)),this.inputNode=a,this.inputNode.addClass("ng-hide"),this.settings.interval=this.settings.to-this.settings.from,this.settings.calculate&&$.isFunction(this.settings.calculate)&&(this.nice=this.settings.calculate),this.settings.onstatechange&&$.isFunction(this.settings.onstatechange)&&(this.onstatechange=this.settings.onstatechange),this.is={init:!1},this.o={},this.create(c)},d.prototype.create=function(b){var d=this;this.domNode=b;var e=c.offset(this.domNode),g={left:e.left,top:e.top,width:this.domNode[0].clientWidth,height:this.domNode[0].clientHeight};this.sizes={domWidth:this.domNode[0].clientWidth,domOffset:g},angular.extend(this.o,{pointers:{},labels:{0:{o:angular.element(this.domNode.find("div")[5])},1:{o:angular.element(this.domNode.find("div")[6])}},limits:{0:angular.element(this.domNode.find("div")[3]),1:angular.element(this.domNode.find("div")[5])}}),angular.extend(this.o.labels[0],{value:this.o.labels[0].o.find("span")}),angular.extend(this.o.labels[1],{value:this.o.labels[1].o.find("span")}),d.settings.value.split(";")[1]||(this.settings.single=!0);var h=this.domNode.find("div");f=angular.element(h[8]),f&&f.css&&f.css("width","0%");var i=[angular.element(h[1]),angular.element(h[2])];angular.forEach(i,function(b,c){d.settings=angular.copy(d.settings);var e=d.settings.value.split(";")[c];if(e){d.o.pointers[c]=new a(b,c,d);var f=d.settings.value.split(";")[c-1];f&&parseInt(e,10)<parseInt(f,10)&&(e=f);var g=e<d.settings.from?d.settings.from:e;g=e>d.settings.to?d.settings.to:e,d.o.pointers[c].set(g,!0),0===c&&d.domNode.bind("mousedown",d.clickHandler.apply(d))}}),this.o.value=angular.element(this.domNode.find("i")[2]),this.is.init=!0,angular.forEach(this.o.pointers,function(a){d.redraw(a)})},d.prototype.clickHandler=function(){var a=this;return function(b){if(!a.disabled){var d=b.target.className,e=0;d.indexOf("jslider-pointer-to")>0&&(e=1);var f=c.offset(a.domNode),g={left:f.left,top:f.top,width:a.domNode[0].clientWidth,height:a.domNode[0].clientHeight};e=1;var h=a.o.pointers[e];return h._parent={offset:g,width:g.width,height:g.height},h._mousemove(b),h.onmouseup(),!1}}},d.prototype.disable=function(a){this.disabled=a},d.prototype.nice=function(a){return a},d.prototype.onstatechange=function(){},d.prototype.limits=function(a,b){if(!this.settings.smooth){var c=100*this.settings.step/this.settings.interval;a=Math.round(a/c)*c}var d=this.o.pointers[1-b.uid];d&&b.uid&&a<d.value.prc&&(a=d.value.prc),d&&!b.uid&&a>d.value.prc&&(a=d.value.prc),0>a&&(a=0),a>100&&(a=100);var e=Math.round(10*a)/10;return e},d.prototype.setPointersIndex=function(a){angular.forEach(this.getPointers(),function(a,b){a.index(b)})},d.prototype.getPointers=function(){return this.o.pointers},d.prototype.onresize=function(){var a=this;this.sizes={domWidth:this.domNode[0].clientWidth,domHeight:this.domNode[0].clientHeight,domOffset:{left:this.domNode[0].offsetLeft,top:this.domNode[0].offsetTop,width:this.domNode[0].clientWidth,height:this.domNode[0].clientHeight}},angular.forEach(this.o.pointers,function(b,c){a.redraw(b)})},d.prototype.update=function(){this.onresize(),this.drawScale()},d.prototype.drawScale=function(){},d.prototype.redraw=function(a){if(!this.settings.smooth){var b=c.roundUpToScale(a.value.prc,this.settings.scale,this.settings.cutOffWidth,this.settings.cutOffIndex);a.value.origin=b,a.value.prc=b}if(!this.is.init)return!1;this.setValue();var d=this.o.pointers[1].value.prc,e={left:"0%",width:d+"%"};this.o.value.css(e);var f=this.nice(a.value.origin),g=this.settings.firstDimension;if(this.settings.stepWithDifferentScale&&!this.settings.smooth&&(f=c.valueForDifferentScale(this.settings.from,this.settings.to,f,this.settings.prcToValueMapper)),this.settings.realtimeCallback&&angular.isFunction(this.settings.realtimeCallback)&&void 0!==this.settings.cutOffVal&&1===a.uid&&this.settings.realtimeCallback(f),this.settings.conversion){var h=c.getConversionFactorValue(parseInt(f),this.settings.conversion,this.settings.firstDimension);f=h.scaledVal,g=h.scaledDimension}f=parseFloat(f);var i=c.convertToMbpsGbps(f,g,this.settings.decimalPlaces);this.o.labels[a.uid].value.html(i.unitValue+" "+i.unitLabel),this.redrawLabels(a)},d.prototype.redrawLabels=function(a){function b(a,b,d){b.margin=-b.label/2;var e=c.sizes.domWidth,f=b.border+b.margin;return 0>f&&(b.margin-=f),b.border+b.label/2>e?(b.margin=0,b.right=!0):b.right=!1,b.margin=-(a.o[0].clientWidth/2-a.o[0].clientWidth/20),
-a.o.css({left:d+"%",marginLeft:b.margin,right:"auto"}),b.right&&a.o.css({left:"auto",right:0}),b}var c=this,d=this.o.labels[a.uid],e=a.value.prc,f={label:d.o[0].offsetWidth,right:!1,border:e*i/100},g=null,h=null;if(!this.settings.single)switch(h=this.o.pointers[1-a.uid],g=this.o.labels[h.uid],a.uid){case 0:f.border+f.label/2>g.o[0].offsetLeft-this.sizes.domOffset.left?(g.o.css({visibility:"hidden"}),g.value.html(this.nice(h.value.origin)),d.o.css({visibility:"hidden"}),e=(h.value.prc-e)/2+e,h.value.prc!==a.value.prc&&(d.value.html(this.nice(a.value.origin)+"&nbsp;&ndash;&nbsp;"+this.nice(h.value.origin)),f.label=d.o[0].clientWidth,f.border=e*i/100)):g.o.css({visibility:"visible"});break;case 1:f.border-f.label/2<g.o[0].offsetLeft-this.sizes.domOffset.left+g.o[0].clientWidth?(g.o.css({visibility:"hidden"}),g.value.html(this.nice(h.value.origin)),d.o.css({visibility:"visible"}),e=(e-h.value.prc)/2+h.value.prc,h.value.prc!==a.value.prc&&(d.value.html(this.nice(h.value.origin)+"&nbsp;&ndash;&nbsp;"+this.nice(a.value.origin)),f.label=d.o[0].clientWidth,f.border=e*i/100)):g.o.css({visibility:"visible"})}f=b(d,f,e);var i=c.sizes.domWidth;g&&(f={label:g.o[0].clientWidth,right:!1,border:h.value.prc*this.sizes.domWidth/100},f=b(g,f,h.value.prc))},d.prototype.redrawLimits=function(){if(this.settings.limits){var a=[!0,!0];for(var b in this.o.pointers)if(!this.settings.single||0===b){var c=this.o.pointers[b],d=this.o.labels[c.uid],e=d.o[0].offsetLeft-this.sizes.domOffset.left,f=this.o.limits[0];e<f[0].clientWidth&&(a[0]=!1),f=this.o.limits[1],e+d.o[0].clientWidth>this.sizes.domWidth-f[0].clientWidth&&(a[1]=!1)}for(var g=0;g<a.length;g++)a[g]?angular.element(this.o.limits[g]).addClass("animate-show"):angular.element(this.o.limits[g]).addClass("animate-hidde")}},d.prototype.setValue=function(){var a=this.getValue();this.inputNode.attr("value",a),this.onstatechange.call(this,a,this.inputNode)},d.prototype.getValue=function(){if(!this.is.init)return!1;var a=this,b="";return angular.forEach(this.o.pointers,function(d,e){if(void 0!==d.value.prc&&!isNaN(d.value.prc)){var f=d.value.prc,g=a.prcToValue(f);if(!a.settings.smooth)var g=c.valueForDifferentScale(a.settings.from,a.settings.to,f,a.settings.prcToValueMapper);b+=(e>0?";":"")+g}}),b},d.prototype.getPrcValue=function(){if(!this.is.init)return!1;var a="";return $.each(this.o.pointers,function(b){void 0===this.value.prc||isNaN(this.value.prc)||(a+=(b>0?";":"")+this.value.prc)}),a},d.prototype.prcToValue=function(a){var b;if(this.settings.heterogeneity&&this.settings.heterogeneity.length>0)for(var c=this.settings.heterogeneity,d=0,e=this.settings.from,f=0;f<=c.length;f++){var g;g=c[f]?c[f].split("/"):[100,this.settings.to],a>=d&&a<=g[0]&&(b=e+(a-d)*(g[1]-e)/(g[0]-d)),d=g[0],e=g[1]}else b=this.settings.from+a*this.settings.interval/100;var h=this.round(b);return h},d.prototype.valueToPrc=function(a,b){var c;if(this.settings.heterogeneity&&this.settings.heterogeneity.length>0)for(var d=this.settings.heterogeneity,e=0,f=this.settings.from,g=0;g<=d.length;g++){var h;h=d[g]?d[g].split("/"):[100,this.settings.to],a>=f&&a<=h[1]&&(c=b.limits(e+(a-f)*(h[0]-e)/(h[1]-f))),e=h[0],f=h[1]}else c=b.limits(100*(a-this.settings.from)/this.settings.interval);return c},d.prototype.round=function(a){return a=Math.round(a/this.settings.step)*this.settings.step,a=this.settings.round?Math.round(a*Math.pow(10,this.settings.round))/Math.pow(10,this.settings.round):Math.round(a)},d}]).directive("attStepSlider",["$compile","$templateCache","$timeout","$window","slider","sliderConstants","utils",function(a,b,c,d,e,f,g){var h="app/scripts/ng_js_att_tpls/stepSlider/attStepSlider.html";return{restrict:"AE",require:"?ngModel",scope:{options:"=",cutOff:"="},priority:1,templateUrl:h,link:function(i,j,k,l){function m(){angular.element(d).bind("resize",function(a){i.slider.onresize()})}if(l){i.mainSliderClass="step-slider",j.after(a(b.get(h))(i,function(a,b){b.tmplElt=a})),l.$render=function(){if(l.$viewValue.split&&1===l.$viewValue.split(";").length?l.$viewValue="0;"+l.$viewValue:"number"==typeof l.$viewValue&&(l.$viewValue="0;"+l.$viewValue),(l.$viewValue||0===l.$viewValue)&&("number"==typeof l.$viewValue&&(l.$viewValue=""+l.$viewValue),i.slider)){var a="0";if(i.slider.getPointers()[0].set(a,!0),l.$viewValue.split(";")[1]){var b=l.$viewValue.split(";")[1];b.length>=4&&(b=b.substring(0,2)),i.options.realtime||i.options.callback(parseFloat(l.$viewValue.split(";")[1])),i.slider.getPointers()[1].set(l.$viewValue.split(";")[1],!0)}}};var n=function(){function a(){0!==d[0]&&d.splice(0,0,0),100!==d[d.length-1]&&d.splice(d.length,0,100)}function b(){if(d[d.length-1]!==i.options.to&&d.splice(d.length,0,i.options.to),i.options.displayScaledvalues){for(var a in d)h.push(Math.log2(d[a]));var b=h[h.length-1]}for(var a in d){var c,e=d[a]/i.options.from,f=d[a]/i.options.to;c=i.options.displayScaledvalues?h[a]/b*100:(d[a]-i.options.from)/(i.options.to-i.options.from)*100;var g=d[a];1===f?c=100:1===e&&(c=0),d[a]=c,k[""+c]=g}}i.from=""+i.options.from,i.to=""+i.options.to,i.options.calculate&&"function"==typeof i.options.calculate&&(i.from=i.options.calculate(i.from),i.to=i.options.calculate(i.to)),i.showDividers=i.options.showDividers,i.COLORS=f.COLORS,i.sliderColor=i.options.sliderColor,i.sliderColor||(i.sliderColor=f.COLORS.REGULAR);var d=i.options.scale,e=[],h=[],k={};for(var n in d){var p=d[n];e.push(p)}0===i.options.from&&100===i.options.to||!i.options.smooth?0===i.options.from&&100===i.options.to||i.options.smooth?(b(),a()):(i.options.stepWithDifferentScale=!0,b(),a()):(a(),i.options.stepWithDifferentScale=!0);var q=0;if(i.options.decimalPlaces&&(q=i.options.decimalPlaces),i.endDimension=i.options.dimension,i.options.conversion){var r=i.options.conversion.length-1,s=i.options.conversion[r].dimension,t=i.options.conversion[r].scaleFactor;i.endDimension=" "+s;var u=(i.to/t).toFixed(q);i.toStr=u}else i.toStr=i.options.to;var v=g.convertToMbpsGbps(i.toStr,i.endDimension,i.options.decimalPlaces);i.toStr=v.unitValue,i.endDimension=" "+v.unitLabel;var w={from:i.options.from,to:i.options.to,step:i.options.step,smooth:i.options.smooth,limits:!0,stepWithDifferentScale:i.options.stepWithDifferentScale,round:i.options.round||!1,value:l.$viewValue,scale:i.options.scale,nonPercentScaleArray:e,prcToValueMapper:k,firstDimension:i.options.dimension,decimalPlaces:q,conversion:i.options.conversion,realtimeCallback:i.options.callback};angular.isFunction(i.options.realtime)?w.realtimeCallback=function(a){l.$setViewValue(a),i.options.callback(a)}:w.callback=o,w.calculate=i.options.calculate||void 0,w.onstatechange=i.options.onstatechange||void 0,c(function(){var a=i.tmplElt.find("div")[7];w.conversion||(i.tmplElt.find("div").eq(6).find("span").eq(0).css("padding-left","10px"),i.tmplElt.find("div").eq(6).find("span").eq(0).css("padding-right","15px")),i.slider=angular.element.slider(j,i.tmplElt,w),angular.element(a).html(i.generateScale()),i.drawScale(a),m(),i.$watch("options.disable",function(a){i.slider&&(i.tmplElt.toggleClass("disabled",a),i.slider.disable(a))}),i.$watch("cutOff",function(a){if(a&&a>0){var b=(a-i.slider.settings.from)/(i.slider.settings.to-i.slider.settings.from);if(b=100*b,i.isCutOffSlider=!0,i.slider.settings.cutOffWidth=b,i.cutOffVal=a,i.options.conversion){var c=g.getConversionFactorValue(a,i.options.conversion,i.options.dimension);c.scaledVal=parseFloat(c.scaledVal).toFixed(i.options.decimalPlaces),i.cutOffVal=c.scaledVal+" "+c.scaledDimension}i.slider.settings.cutOffVal=a,i.slider.changeCutOffWidth(b+"%");var d=i.slider.settings.nonPercentScaleArray;for(var e in d)if(e>=1){var f=d[e-1],h=d[e];a>f&&h>=a&&(i.slider.settings.cutOffIndex=e)}}else i.slider.settings.cutOffVal=0})})};i.generateScale=function(){if(i.options.scale&&i.options.scale.length>0){for(var a="",b=i.options.scale,c="left",d=0;d<b.length;d++)if(0!==d&&d!==b.length-1){var e=(b[d]-i.from)/(i.to-i.from)*100;i.options.stepWithDifferentScale&&!i.options.smooth&&(e=b[d]),a+='<span style="'+c+": "+e+'%"></span>'}return a}return""},i.drawScale=function(a){angular.forEach(angular.element(a).find("ins"),function(a,b){a.style.marginLeft=-a.clientWidth/2})};var o=function(a){var b=a.split(";")[1];i.$apply(function(){l.$setViewValue(parseInt(b))}),i.options.callback&&i.options.callback(parseInt(b))};i.$watch("options",function(a){n()}),angular.element.slider=function(a,b,c){b.data("jslider")||b.data("jslider",new e(a,b,c));var d=b.data("jslider");return d}}}}}]),angular.module("att.abs.steptracker",["att.abs.transition"]).directive("steptracker",["$timeout",function(a){return{priority:100,scope:{sdata:"=sdata",cstep:"=currentStep",clickHandler:"=?",disableClick:"=?"},restrict:"EA",replace:!0,templateUrl:"app/scripts/ng_js_att_tpls/steptracker/step-tracker.html",link:function(b,c){void 0===b.disableClick&&(b.disableClick=!1),a(function(){function a(a){return angular.element(g[a-1])}function d(){if(b.cstep>0&&b.cstep<=b.sdata.length-1&&j>0){var c=j/k*100+"%";l=a(b.cstep),l.css("width",c)}}function e(){b.cstep<=b.sdata.length&&(j=b.sdata[b.cstep-1].currentPage,k=b.sdata[b.cstep-1].totalPages)}b.cstep<1?b.cstep=1:b.cstep>b.sdata.length&&(b.cstep=b.sdata.length);var f=c.find("div"),g=[];for(var h in f)if(f.eq(h)[0]){var i=f.eq(h)[0].className;i.indexOf("track ng-scope")>-1&&g.push(f.eq(h))}var j,k,l=a(b.cstep);b.set_width=function(a){var c=100/(b.sdata.length-1)+"%";return b.sdata.length-1>a?{width:c}:void 0},b.$watch("sdata",function(){e();var a=b.cstep;if(1>j&&(j=1,1!==b.cstep&&(b.cstep--,e())),j>k){if(b.cstep>b.sdata.length-1)return void b.cstep++;j=k,d(),b.cstep++,e(),d()}1>j&&a===b.cstep&&(j=1,b.cstep>1&&(b.cstep--,b.sdata[b.cstep-1].currentPage=b.sdata[b.cstep-1].totalPages,b.sdata[b.cstep].currentPage=1)),d()},!0),b.activestep=function(a){return a===b.cstep-1},b.donesteps=function(a){return a<b.cstep-1},b.laststep=function(a){return a===b.sdata.length-1},b.isIncomplete=function(a){if(a===b.cstep-1)return!1;if(a>=0&&a<b.sdata.length-1){var c=b.sdata[a];return c.currentPage<=c.totalPages}},b.stepclick=function(a,c){if(c<b.cstep){for(var f=b.cstep-1;f>c;f--)b.sdata[f].currentPage=1;b.sdata[c].currentPage--}angular.isFunction(b.clickHandler)&&b.clickHandler(a,c),b.cstep=c+1,b.cstep<=b.sdata.length&&b.sdata[b.cstep].currentPage<1&&(b.sdata[b.cstep].currentPage=1),e(),d()}},100)}}}]).constant("timelineConstants",{STEP_TYPE:{ALERT:"alert",COMPLETED:"completed",CANCELLED:"cancelled"}}).controller("AttTimelineCtrl",["$scope","$timeout",function(a,b){function c(){function b(a,b){return a.order<b.order?-1:a.order>b.order?1:0}f.sort(b),e.sort(b),a.$parent.animate&&d(),a.$watch("trigger",function(b){b?a.resetTimeline():a.$parent.animate=!1})}function d(){function c(){for(var a in f){var b=f[a];if(a%2===0?b.unhoveredStateForBelow(.25):b.unhoveredStateForAbove(.25),b.isStop())break}}function d(a,h){return 0===a?function(){f[a+1].isStop()&&f[a+1].isCancelled()&&e[a].isCancelled(!0),e[a].animate(d(a+1,h),h)}:a===e.length-1?function(){f[0].isCurrentStep()&&f[0].isCurrentStep(!1),f[a].isStop()?(f[a-1].shrinkAnimate(g),f[a].isCurrentStep(!0)):(f[a-1].shrinkAnimate(g),e[a].animate(d(a+1,h),h)),f[a].expandedAnimate(g),b(function(){c()},500)}:a===e.length?function(){f[0].isCurrentStep()&&f[0].isCurrentStep(!1),f[a-1].shrinkAnimate(g),f[a].expandedAnimate(g),f[a].isCurrentStep(!0),b(function(){c()},500)}:function(){f[0].isCurrentStep()&&f[0].isCurrentStep(!1),f[a].isStop()?(f[a-1].shrinkAnimate(g),f[a].expandedAnimate(g),f[a].isCurrentStep(!0),b(function(){c()},500)):(f[a+1].isStop()&&f[a+1].isCancelled()&&e[a].isCancelled(!0),f[a-1].shrinkAnimate(g),e[a].animate(d(a+1,h),h),f[a].expandedAnimate(g))}}var g=.25,h=.25;"number"==typeof a.barAnimateDuration&&(h=a.barAnimateDuration);var i=d(0,h);i()}var e=[],f=[];this.numSteps=0,this.isAlternate=function(){return a.alternate},this.addTimelineBarCtrls=function(a){e.push(a)},this.addTimelineDotCtrls=function(a){f.push(a)},b(c,200)}]).directive("attTimeline",["$timeout","$compile",function(a,b){return{restrict:"EA",replace:!0,scope:{steps:"=",trigger:"=",alternate:"=",barAnimateDuration:"="},templateUrl:"app/scripts/ng_js_att_tpls/steptracker/timeline.html",controller:"AttTimelineCtrl",link:function(a,c,d,e){var f=function(){for(var b=a.steps,c=[],d=1;d<b.length;d++){var f=b[d];c.push(f)}a.middleSteps=c,e.numSteps=b.length-1};f(),a.resetTimeline=function(){a.animate=!0,b(c)(a)}}}}]).controller("TimelineBarCtrl",["$scope",function(a){this.type="timelinebar",this.order=parseInt(a.order),this.animate=function(b,c){a.loadingAnimation(b,c)},this.isCancelled=function(b){a.isCancelled=b}}]).directive("timelineBar",["animation","$progressBar",function(a,b){return{restrict:"EA",replace:!0,templateUrl:"app/scripts/ng_js_att_tpls/steptracker/timelineBar.html",scope:{order:"@"},require:["^attTimeline","timelineBar"],controller:"TimelineBarCtrl",link:function(c,d,e,f){var g=f[0],h=f[1];g.addTimelineBarCtrls(h),c.isCompleted=!0;var i=100/g.numSteps-3;d.css("width",i+"%");var j=d.find("div").eq(0);a.set(j,{opacity:0});var k=function(b){a.set(j,{opacity:1}),a.set(j,{scaleX:b.progress(),transformOrigin:"left"})};c.loadingAnimation=b(k)}}}]).controller("TimelineDotCtrl",["$scope","$timeout","timelineConstants",function(a,b,c){this.type="dot",this.order=parseInt(a.order);var d=this;b(function(){0!==d.order&&(d.order%2!==0?a.initializeAboveForAnimation():a.initializeBelowForAnimation())}),this.expandedAnimate=function(b){a.setColor(),a.expandedAnimate(b),0===d.order||a.isStepsLessThanFive()||(d.order%2!==0?a.expandContentForAbove(b):a.expandContentForBelow(b))},this.unhoveredStateForAbove=function(b){a.unhoveredStateForAbove(b)},this.unhoveredStateForBelow=function(b){a.unhoveredStateForBelow(b)},this.shrinkAnimate=function(b){a.shrinkAnimate(b)},this.setExpanded=function(){a.setSize(3)},this.isStop=function(){return a.isStop},this.isCancelled=function(){return a.type===c.STEP_TYPE.CANCELLED},this.isAlert=function(){return a.type===c.STEP_TYPE.ALERT},this.isCurrentStep=function(b){return void 0!==b&&(a.isCurrentStep=b),a.isCurrentStep}}]).directive("timelineDot",["animation","timelineConstants",function(a,b){return{restrict:"EA",replace:!0,scope:{order:"@",title:"@",description:"@",by:"@",date:"@",type:"@"},templateUrl:"app/scripts/ng_js_att_tpls/steptracker/timelineDot.html",require:["^attTimeline","timelineDot"],controller:"TimelineDotCtrl",link:function(c,d,e,f){function g(){return c.description||c.by||c.date?!1:!0}var h=f[0],i=f[1];h.addTimelineDotCtrls(i),c.numSteps=h.numSteps+1,c.isCurrentStep=!1,c.isCompleted=!1,c.isStop=!1,(c.type===b.STEP_TYPE.ALERT||c.type===b.STEP_TYPE.CANCELLED)&&(c.isStop=!0),c.isInactive=!0;var j=d.find("div"),k=j.eq(0),l=j.eq(2),m=j.eq(3),n=j.eq(5),o=j.eq(6),p=j.eq(9);c.isStepsLessThanFive=function(){return c.numSteps<5?!0:!1},c.titleMouseover=function(a){c.isStepsLessThanFive()||g()||(1===a&&c.order%2===0&&c.expandContentForBelow(.25),2===a&&c.order%2!==0&&c.expandContentForAbove(.25))},c.titleMouseleave=function(){c.order%2===0?c.unhoveredStateForBelow(.25):c.unhoveredStateForAbove(.25)},c.initializeAboveForAnimation=function(){if(!c.isStepsLessThanFive()&&h.isAlternate()&&(a.set(o,{opacity:0}),a.set(p,{opacity:0}),!g())){var b=o[0].offsetHeight+p[0].offsetHeight;a.set(n,{top:b})}},c.expandContentForAbove=function(b){!c.isStepsLessThanFive()&&h.isAlternate()&&(a.to(n,b,{top:0}),a.to(o,b,{opacity:1}),a.to(p,b,{opacity:1}))},c.unhoveredStateForAbove=function(b){if(!c.isStepsLessThanFive()&&h.isAlternate()){a.set(o,{opacity:0}),a.set(p,{opacity:1});var d=o[0].offsetHeight;a.to(n,b,{top:d})}},c.initializeBelowForAnimation=function(){!c.isStepsLessThanFive()&&h.isAlternate()&&(a.set(o,{height:"0%",opacity:0,top:"-20px"}),a.set(p,{opacity:0}))},c.expandContentForBelow=function(b){!c.isStepsLessThanFive()&&h.isAlternate()&&(a.set(p,{opacity:1}),a.to(o,b,{height:"auto",opacity:1,top:"0px"}))},c.unhoveredStateForBelow=function(b){!c.isStepsLessThanFive()&&h.isAlternate()&&(a.to(o,b,{height:"0%",opacity:0,top:"-20px",position:"relative"}),a.set(p,{opacity:1}))},g()&&c.order%2!==0&&h.isAlternate()&&m.css("top","-47px"),c.order%2!==0&&h.isAlternate()?c.isBelowInfoBoxShown=!1:c.isBelowInfoBoxShown=!0,c.isStepsLessThanFive()&&!h.isAlternate()&&a.set(p,{marginTop:10}),a.set(k,{opacity:".5"}),a.set(l,{opacity:"0.0"}),a.set(l,{scale:.1}),0===c.order&&(a.set(l,{opacity:"1.0"}),a.set(l,{scale:1}),a.set(k,{scale:3}),c.isCurrentStep=!0,c.isInactive=!1,c.isCompleted=!0),c.setColor=function(){c.isInactive=!1,c.type===b.STEP_TYPE.CANCELLED?c.isCancelled=!0:c.type===b.STEP_TYPE.ALERT?c.isAlert=!0:c.isCompleted=!0,c.$phase||c.$apply()},c.setSize=function(b){a.set(biggerCircle,{scale:b})},c.setExpandedCircle=function(){a.set(l,{opacity:"1.0"}),a.set(l,{scale:1})},c.expandedAnimate=function(b){a.to(k,b,{scale:3}),a.set(l,{opacity:"1.0"}),a.to(l,b,{scale:1})},c.shrinkAnimate=function(b){a.to(k,b,{scale:1})}}}}]),angular.module("att.abs.table",["att.abs.utilities"]).constant("tableConfig",{defaultSortPattern:!1,highlightSearchStringClass:"tablesorter-search-highlight"}).directive("attTable",["$filter",function(a){return{restrict:"EA",replace:!0,transclude:!0,scope:{tableData:"=",viewPerPage:"=",currentPage:"=",totalPage:"=",searchCategory:"=",searchString:"="},require:"attTable",templateUrl:"app/scripts/ng_js_att_tpls/table/attTable.html",controller:["$scope",function(a){this.headers=[],this.currentSortIndex=null,this.setIndex=function(a){this.headers.push(a)},this.getIndex=function(a){for(var b=0;b<this.headers.length;b++)if(this.headers[b].headerName===a)return this.headers[b].index;return null},this.sortData=function(b,c){a.$parent.columnIndex=b,a.$parent.reverse=c,this.currentSortIndex=b,a.currentPage=1,this.resetSortPattern()},this.getSearchString=function(){return a.searchString},this.resetSortPattern=function(){for(var a=0;a<this.headers.length;a++){var b=this.headers[a];b.index!==this.currentSortIndex&&b.resetSortPattern()}}}],link:function(b,c,d,e){b.searchCriteria={},b.$watchCollection("tableData",function(a){a&&!isNaN(a.length)&&(b.totalRows=a.length)}),b.$watch("currentPage",function(a){b.$parent.currentPage=a}),b.$watch("viewPerPage",function(a){b.$parent.viewPerPage=a}),b.$watch(function(){return b.totalRows/b.viewPerPage},function(a){isNaN(a)||(b.totalPage=Math.ceil(a),b.currentPage=1)});var f=function(a){return angular.isDefined(a)&&null!==a&&""!==a?!0:void 0},g=function(a,c){if(f(a)&&f(c)){var d=e.getIndex(c);b.searchCriteria={},null!==d&&(b.searchCriteria[d]=a)}else!f(a)||angular.isDefined(c)&&null!==c&&""!==c?b.searchCriteria={}:b.searchCriteria={$:a}};b.$watch("searchCategory",function(a,c){a!==c&&g(b.searchString,a)}),b.$watch("searchString",function(a,c){a!==c&&g(a,b.searchCategory)}),b.$watchCollection("searchCriteria",function(c){b.$parent.searchCriteria=c,b.totalRows=b.tableData&&a("filter")(b.tableData,c,!1).length||0,b.currentPage=1})}}}]).directive("attTableRow",[function(){return{restrict:"EA",compile:function(a,b){if("header"===b.type)a.find("tr").eq(0).addClass("tablesorter-headerRow");else if("body"===b.type){var c=a.children();b.rowRepeat&&(b.trackBy?c.attr("ng-repeat",b.rowRepeat.concat(" | orderBy : columnIndex : reverse | filter : searchCriteria : false | attLimitTo : viewPerPage : viewPerPage*(currentPage-1) track by "+b.trackBy)):c.attr("ng-repeat",b.rowRepeat.concat(" | orderBy : columnIndex : reverse | filter : searchCriteria : false | attLimitTo : viewPerPage : viewPerPage*(currentPage-1) track by $index"))),c.attr("ng-class","{'alt-row': $even,'normal-row': $odd}"),a.append(c)}}}}]).directive("attTableHeader",["tableConfig",function(a){return{restrict:"EA",replace:!0,transclude:!0,scope:{sortable:"@",defaultSort:"@",index:"@key"},require:"^attTable",templateUrl:"app/scripts/ng_js_att_tpls/table/attTableHeader.html",link:function(b,c,d,e){var f=a.defaultSortPattern;b.headerName=c.text(),b.sortPattern=null,e.setIndex(b),b.$watch(function(){return c.text()},function(a){b.headerName=a}),b.sort=function(a){"boolean"==typeof a&&(f=a),e.sortData(b.index,f),b.sortPattern=f?"desc":"asc",f=!f},b.$watch(function(){return e.currentSortIndex},function(a){a!==b.index&&(b.sortPattern=null)}),"false"!==b.sortable&&("A"===b.defaultSort||"a"===b.defaultSort?b.sort(!1):("D"===b.defaultSort||"d"===b.defaultSort)&&b.sort(!0)),b.resetSortPattern=function(){f=a.defaultSortPattern}}}}]).directive("attTableBody",["$filter","$timeout","tableConfig",function(a,b,c){return{restrict:"EA",require:"^attTable",replace:!0,transclude:!0,templateUrl:"app/scripts/ng_js_att_tpls/table/attTableBody.html",link:function(d,e,f,g){var h=c.highlightSearchStringClass,i="",j=function(b){var c=b.text();b.html(a("highlight")(c,i,h))},k=function(a){var b=a.children();if(!(b.length>0))return void j(a);for(var c=0;c<b.length;c++)k(b.eq(c))},l=function(a){for(var b=a.find("*"),c=0;c<b.length;c++)if(b.eq(c).attr("class")&&-1!==b.eq(c).attr("class").indexOf(h)){var d=b.eq(c).text();b.eq(c).replaceWith(d)}};b(function(){var a=e.children();d.$watch(function(){return g.getSearchString()},function(b){i=b,l(e),a.length>0?k(e):j(e)})},50)}}}]),angular.module("att.abs.tableMessages",["att.abs.utilities"]).constant("messageConstants",{TABLE_MESSAGE_TYPES:{noMatching:1,errorLoading:2,magnifySearch:3,isLoading:4},USER_MESSAGE_TYPES:{success:1,error:0}}).directive("attTableMessage",["messageConstants",function(a){return{restrict:"AE",replace:!0,transclude:!0,scope:{msgType:"=",onRefreshClick:"&"},templateUrl:"app/scripts/ng_js_att_tpls/tableMessages/attTableMessage.html",link:function(b){b.messageConstants=a,b.refreshAction=function(a){b.onRefreshClick(a)}}}}]).directive("attUserMessage",["messageConstants","$timeout","DOMHelper",function(a,b,c){return{restrict:"AE",replace:!0,transclude:!0,scope:{thetitle:"=",type:"=",message:"=",trigger:"="},templateUrl:"app/scripts/ng_js_att_tpls/tableMessages/attUserMessage.html",link:function(d,e){var f=void 0,g=void 0;d.messageConstants=a,b(function(){g=c.firstTabableElement(e[0])},10),d.$watch("trigger",function(){d.trigger?(f=document.activeElement,angular.isDefined(g)&&g.focus()):angular.isDefined(f)&&f.focus()})}}}]),angular.module("att.abs.tabs",["att.abs.utilities"]).directive("attTabs",function(){return{restrict:"EA",transclude:!1,replace:!0,scope:{tabs:"=title"},controller:["$scope",function(a){this.getData=function(){return a.tabs},this.onClickTab=function(b){return a.currentTab=b.url,a.currentTab},this.isActiveTab=function(b){return b===a.currentTab}}],link:function(a){for(var b=0;b<a.tabs.length;b++)a.tabs[b].selected&&a.tabs[b].url&&(a.currentTab=a.tabs[b].url)}}}).directive("floatingTabs",function(){return{require:"^attTabs",restrict:"EA",transclude:!1,replace:!0,scope:{size:"@"},templateUrl:"app/scripts/ng_js_att_tpls/tabs/floatingTabs.html",link:function(a,b,c,d){a.tabs=d.getData(),a.onClickTab=d.onClickTab,a.isActiveTab=d.isActiveTab}}}).directive("simplifiedTabs",function(){return{require:"^attTabs",restrict:"EA",transclude:!1,replace:!0,scope:{ctab:"=ngModel"},templateUrl:"app/scripts/ng_js_att_tpls/tabs/simplifiedTabs.html",link:function(a,b,c,d){a.tabs=d.getData(),a.clickTab=function(b){return a.ctab=b.id,a.ctab},a.isActive=function(b){return b===a.ctab}}}}).directive("genericTabs",function(){return{require:"^attTabs",restrict:"EA",transclude:!1,replace:!0,scope:{ctab:"=ngModel"},templateUrl:"app/scripts/ng_js_att_tpls/tabs/genericTabs.html",link:function(a,b,c,d){a.tabs=d.getData(),a.clickTab=function(b){return a.ctab=b.id,a.ctab},a.isActive=function(b){return b===a.ctab}}}}).directive("skipNavigation",function(){return{link:function(a,b,c){b.bind("click",function(){var a=angular.element(b.parent().parent().parent().parent())[0].querySelector("a.skiptoBody");angular.element(a).attr("tabindex",-1),a.focus()})}}}).directive("parentTab",[function(){return{restrict:"EA",scope:{menuItems:"=",activeSubMenu:"=",activeMenu:"="},controller:["$scope",function(a){a.megaMenu=a.menuItems,a.megaMenuTab,a.megaMenuHoverTab,this.setMenu=function(){a.menuItems=a.megaMenu,a.activeSubMenu.scroll=!1;for(var b=0;b<a.menuItems.length;b++)a.menuItems[b].active&&(a.activeMenu=a.menuItems[b]);this.setSubMenuStatus(!1),a.$apply()},this.setActiveMenu=function(){if(void 0!==a.megaMenuTab&&null!==a.megaMenuTab)a.menuItems=[a.megaMenuTab],a.megaMenuTab.scroll=!0,a.activeMenu={},a.activeSubMenu=a.megaMenuTab,this.setSubMenuStatus(!0);else{for(var b=0;b<a.menuItems.length;b++)if(a.menuItems[b].active=!1,a.menuItems[b].subItems)for(var c=0;c<a.menuItems[b].subItems.length;c++)a.menuItems[b].subItems[c].active=!1;a.menuItems=a.megaMenu}a.$apply()};var b=!1;this.setSubMenuStatus=function(a){b=a},this.getSubMenuStatus=function(){return b},this.setActiveMenuTab=function(b){a.megaMenuTab=b},this.setActiveMenuHoverTab=function(b){a.megaMenuHoverTab=b},this.setActiveSubMenuTab=function(){a.megaMenuTab=a.megaMenuHoverTab},this.resetMenuTab=function(){a.megaMenuTab=void 0},this.clearSubMenu=function(){a.$evalAsync(function(){a.megaMenuTab=void 0,a.megaMenuHoverTab=void 0})}}]}}]).directive("parentmenuTabs",[function(){return{restrict:"EA",transclude:!0,replace:!0,scope:{megaMenu:"@",menuItems:"="},controller:["$scope",function(a){this.getMenu=function(){return a.menuItems},this.setMenu=function(b){a.menuItems=b}}],templateUrl:"app/scripts/ng_js_att_tpls/tabs/parentmenuTab.html"}}]).directive("menuTabs",["$window","$document","events","keymap",function(a,b,c,d){return{restrict:"EA",transclude:!0,replace:!0,require:["^?parentTab","^?parentmenuTabs"],scope:{activeMenu:"=",menuItem:"=",subMenu:"@",subItemActive:"@",tabName:"=?",tabUrl:"=?"},templateUrl:function(a,b){return b.megaMenu?"app/scripts/ng_js_att_tpls/tabs/menuTab.html":"app/scripts/ng_js_att_tpls/tabs/submenuTab.html"},link:function(e,f,g,h){function i(a,b){clearTimeout(a._tId),a._tId=setTimeout(function(){k.setMenu()},b)}function j(a,b){clearTimeout(a._tId),a._tId=setTimeout(function(){k.setActiveMenu()},b)}var k=h[0],l=h[1];e.clickInactive=!0,e.showHoverChild=function(a){e.clickInactive=!1,e.hoverChild=h[0].getSubMenuStatus(),"mouseover"===a.type&&h[0].getSubMenuStatus()&&e.showChildren(a)},e.showChildren=function(a){e.parentMenuItems=l.getMenu();for(var b=0;b<e.parentMenuItems.length;b++){if(e.parentMenuItems[b].active=!1,e.parentMenuItems[b].subItems)for(var c=0;c<e.parentMenuItems[b].subItems.length;c++)e.parentMenuItems[b].subItems[c].active=!1;e.clickInactive=!0}e.menuItem.active=!0,e.activeMenu=e.menuItem,a.stopPropagation()},e.$watch("subItemActive",function(a){"true"===a&&"true"===e.subMenu&&k.setActiveMenuHoverTab(e.menuItem)}),e.showMenuClick=function(a){k.setActiveMenuTab(e.menuItem),a.stopPropagation()},e.showSubMenuClick=function(a){k.setActiveSubMenuTab(),a.stopPropagation()},e.resetMenu=function(a){k.resetMenuTab(),a.stopPropagation()},b.bind("scroll",function(){0===a.pageYOffset?i(k.setMenu,100):a.pageYOffset>1&&a.pageYOffset<1500&&j(k.setActiveMenu,100)}),f.bind("keydown",function(a){switch(a.keyCode||(a.keyCode=a.which),a.keyCode!==d.KEY.TAB&&(c.preventDefault(a),c.stopPropagation(a)),a.keyCode){case d.KEY.ESC:var b;f.attr("mega-menu")?"item"===f.attr("menu-item")&&(b=angular.element(f.parent().parent().parent().parent())[0].querySelector("a.skiptoBody"),angular.element(b).attr("tabindex",-1),b.focus()):"true"===f.attr("sub-menu")?(b=angular.element(f.parent().parent().parent().parent().parent().parent().parent())[0].querySelector("a.skiptoBody"),angular.element(b).attr("tabindex",-1),b.focus()):void 0===f.attr("sub-menu")&&(b=angular.element(f.parent().parent().parent().parent().parent().parent().parent().parent().parent().parent())[0].querySelector("a.skiptoBody"),angular.element(b).attr("tabindex",-1),b.focus());break;case d.KEY.RIGHT:if(f.attr("mega-menu")){if("item"===f.attr("menu-item")){var g=angular.element(f)[0];if(g.nextElementSibling)null==g.nextElementSibling.querySelector("span")||g.nextElementSibling.querySelector("span").focus();else{do{if(!g||!g.nextSibling)break;g=g.nextSibling}while(g&&"LI"!==g.tagName);g&&(null===g.querySelector("span")||g.querySelector("span").focus()),c.preventDefault(a),c.stopPropagation(a)}}}else{var g=angular.element(f)[0];if("true"===f.attr("sub-menu")){if(null===g.nextElementSibling)break;if(g.nextElementSibling)g.nextElementSibling.querySelector("a").focus();else{do{if(!g||!g.nextSibling)break;g=g.nextSibling}while(g&&"LI"!==g.tagName);g&&(null==g.querySelector("a")||g.querySelector("a").focus()),c.preventDefault(a),c.stopPropagation(a)}}else if(void 0===f.attr("sub-menu")){if(null===g.nextElementSibling)break;if(g.nextElementSibling)g.nextElementSibling.querySelector("a").focus();else{do{if(!g||!g.nextSibling)break;g=g.nextSibling}while(g&&"LI"!==g.tagName);g&&(null==g.querySelector("a")||g.querySelector("a").focus())}}}break;case d.KEY.DOWN:if(f.attr("mega-menu"))angular.element(f)[0].querySelectorAll(".megamenu__items")[0].querySelector("a").focus();else if(void 0===f.attr("sub-menu")){var g=document.activeElement;if(null===g.nextElementSibling)break;if(g.nextElementSibling)g.nextElementSibling.focus();else{do{if(!g||!g.nextSibling)break;g=g.nextSibling}while(g&&"A"!==g.tagName);null!==g.attributes&&g.focus(),c.stopPropagation(a)}}else if("true"===f.attr("sub-menu")){var h=angular.element(f)[0].querySelector("span").querySelector("a");if(null===h)break;h.focus()}break;case d.KEY.LEFT:if(f.attr("mega-menu")){if("item"===f.attr("menu-item")){var g=angular.element(f)[0];if(g.previousElementSibling)null===g.previousElementSibling.querySelector("span")||g.previousElementSibling.querySelector("span").focus();else{do{if(!g||!g.previousSibling)break;g=g.previousSibling}while(g&&"LI"!==g.tagName);g&&(null===g.querySelector("span")||g.querySelector("span").focus()),c.preventDefault(a),c.stopPropagation(a)}}}else{var g=angular.element(f)[0];if("true"===f.attr("sub-menu")){if(null===g.previousElementSibling)break;if(g.previousElementSibling)g.previousElementSibling.querySelector("a").focus();else{do{if(!g||!g.previousSibling)break;g=g.previousSibling}while(g&&"LI"!==g.tagName);g&&(null==g.querySelector("a")||g.querySelector("a").focus()),c.preventDefault(a),c.stopPropagation(a)}}else if(void 0===f.attr("sub-menu")){if(null===g.previousElementSibling)break;if(g.previousElementSibling)g.previousElementSibling.querySelector("a").focus();else{do{if(!g||!g.previousSibling)break;g=g.previousSibling}while(g&&"LI"!==g.tagName);g&&(null==g.querySelector("a")||g.querySelector("a").focus())}}}break;case d.KEY.UP:if("true"===f.attr("sub-menu")){var g=document.activeElement,i=angular.element(f.parent().parent().parent().parent())[0].querySelector("span");i.focus(),k.clearSubMenu(),e.menuItem.active=!1;break}if(void 0===f.attr("sub-menu")){var g=document.activeElement,i=angular.element(f.parent().parent().parent().parent())[0].querySelector("a");if(document.activeElement===angular.element(g).parent().parent()[0].querySelectorAll("a")[0]){i.focus();break}if(g.previousElementSibling){g.previousElementSibling;null!=g.previousElementSibling?g.previousElementSibling.focus():i.focus()}else{do{if(!g||!g.previousSibling)break;g=g.previousSibling}while(g&&"A"!==g.tagName);g&&3!==g.nodeType&&g.focus(),c.preventDefault(a),c.stopPropagation(a)}break}}})}}}]),angular.module("att.abs.tagBadges",[]).directive("tagBadges",["$parse","$timeout",function(a,b){return{restrict:"EA",replace:!1,transclude:!0,templateUrl:"app/scripts/ng_js_att_tpls/tagBadges/tagBadges.html",scope:{styleType:"@",onClose:"&"},link:function(c,d,e){c.isSmall=!1,c.isIcon=!1,c.isColor=!1,c.display=!0,c.isClosable=!1,c.isHighlight=!1,c.customColor=!1,""===e.small&&(c.isSmall=!0),"icon"===c.styleType?c.isIcon=!0:"color"===c.styleType&&(c.isColor=!0,void 0!==e.color&&""!==e.color&&(c.customColor=!0,e.$observe("color",function(a){c.border_type_borderColor=a,c.background_type_backgroundColor=a,c.background_type_borderColor=a}))),c.activeHighlight=function(a){c.customColor&&(a?c.isHighlight=!0:c.isHighlight=!1)},""===e.closable&&(c.isClosable=!0,c.closeMe=function(){c.display=!1,b(function(){
-d.attr("tabindex","0"),d[0].focus(),d.bind("blur",function(){d.remove()})}),e.onClose&&(c.onClose=a(c.onClose),c.onClose())})}}}]),angular.module("att.abs.textOverflow",[]).constant("textDefaultOptions",{width:"50%"}).directive("attTextOverflow",["textDefaultOptions","$compile",function(a,b){return{restrict:"A",link:function(c,d,e){var f=d.text();if(d.addClass("text-ellipsis"),e.$observe("attTextOverflow",function(b){b?d.css({width:b}):d.css({width:a.width})}),!d.attr("tooltip")){d.attr("tooltip",f),d.attr("tooltip-placement","above");var g=angular.element(d);b(g)(c)}}}}]),angular.module("att.abs.toggle",["angular-gestures","att.abs.position"]).directive("attToggleTemplate",["$compile","$log","$position",function(a,b,c){return{restrict:"A",require:"ngModel",transclude:!0,scope:{modelVal:"=ngModel"},templateUrl:"app/scripts/ng_js_att_tpls/toggle/demoToggle.html",link:function(a,b,d){a.initialDragPosition=0;var e=0,f=c.offset(b.children().eq(1).children().eq(0)).width-1,g=function(){a.attrValue===d.ngTrueValue||a.attrValue?a.modelVal=!1:a.modelVal=!0};a.updateModel=function(a){1!==e&&(g(),e=0),a.preventDefault()},a.drag=function(d){if(e=1,"dragstart"===d.type)a.initialDragPosition=c.position(b.children().eq(1)).left,b.children().eq(1).addClass("dragging");else if("drag"===d.type){var h=Math.min(0,Math.max(a.initialDragPosition+d.gesture.deltaX,-f));b.children().eq(1).css({left:h+"px"})}else if("dragend"===d.type){var i=c.position(b.children().eq(1)).left>-1*f/2;b.children().eq(1).removeClass("dragging"),TweenMax.to(b.children().eq(1),.1,{left:i?0:-1*f,ease:Power4.easeOut,onComplete:function(){b.children().eq(1).css({left:""})}}),(i||!i&&"left"===d.gesture.direction)&&g(),e=0}return!1},a.directiveValue=d.attToggleTemplate,a.on=d.trueValue,a.off=d.falseValue;var h=-1*f+"px";a.$watch("modelVal",function(c){if(a.attrValue=c,c===d.ngTrueValue||c){b.children().eq(1).css({left:"0px"}),b.addClass("att-checkbox--on");var f=b.find("div").find("div").eq(1);f.attr("aria-checked",!0),e=0}else{b.children().eq(1).css({left:h}),b.removeClass("att-checkbox--on");var f=b.find("div").find("div").eq(1);f.attr("aria-checked",!1),e=0}b.children().eq(1).css({left:""})})}}}]).directive("attToggleMain",["$compile",function(a){return{restrict:"A",require:"ngModel",transclude:!0,replace:!0,scope:{modelValue:"=ngModel",trueValue:"=ngTrueValue",falseValue:"=ngFalseValue"},link:function(b,c,d){var e="",f="";c.removeAttr("att-toggle-main"),b.on=d.ngTrueValue,b.off=d.ngFalseValue,b.largeValue=d.attToggleMain,angular.isDefined(d.ngTrueValue)&&(e+=' true-value="{{on}}" false-value="{{off}}"'),void 0!==b.largeValue&&(f+=' ="{{largeValue}}"'),c.css({display:"none"});var g=angular.element('<div class="att-switch att-switch-alt" ng-class="{\'large\' : largeValue == \'large\'}" ng-model="modelValue"'+e+" att-toggle-template"+f+">"+c.prop("outerHTML")+"</div>");g=a(g)(b),c.replaceWith(g)}}}]),angular.module("att.abs.treeview",[]).directive("treeView",function(){return{restrict:"A",link:function(a,b){function c(){f.reversed()?f.play():f.reverse()}function d(a){a.stopPropagation(),void 0!==angular.element(a.target).attr("tree-view")&&(b.hasClass("minus")?b.removeClass("minus"):b.addClass("minus"),c())}var e=b.children("ul li"),f=TweenMax.from(e,.2,{display:"none",paused:!0,reversed:!0});b.attr("tabindex","0"),b.on("click",function(a){d(a)}),b.on("keypress",function(a){var b=a.keyCode?a.keyCode:a.charCode,c=[13,32];c.length>0&&b&&c.indexOf(b)>-1&&(d(a),a.preventDefault())})}}}),angular.module("att.abs.typeAhead",["att.abs.tagBadges"]).directive("focusMe",["$timeout","$parse",function(a,b){return{link:function(c,d,e){var f=b(e.focusMe);c.$watch(f,function(b){b&&a(function(){d[0].focus(),c.inputActive=!0})}),d.bind("blur",function(){f.assign(c,!1),c.inputActive=!1,c.$digest()})}}}]).directive("typeAhead",["$timeout","$log",function(a,b){return{restrict:"EA",templateUrl:"app/scripts/ng_js_att_tpls/typeAhead/typeAhead.html",replace:!0,scope:{items:"=",title:"@?",titleName:"@",subtitle:"@",model:"=",emailIdList:"=",emailMessage:"="},link:function(c,d){!angular.isDefined(c.titleName)&&angular.isDefined(c.title)&&a(function(){c.titleName=c.title,b.warn("title attribute is deprecated and title-name attribute is used instead as it is conflicting with html title attribute")}),c.lineItems=[],c.filteredListLength=-1,c.filteredList=[],c.setFocus=function(){c.clickFocus=!0},c.setFocus(),c.handleSelection=function(a,b){c.lineItems.push(a),c.emailIdList.push(b),c.model="",c.current=0,c.selected=!0,c.clickFocus=!0},c.theMethodToBeCalled=function(b){var d=c.lineItems.slice();c.emailIdList.splice(b,1),d.splice(b,1),a(function(){c.lineItems=[],c.$apply(),c.lineItems=c.lineItems.concat(d)})},c.current=0,c.selected=!0,c.isCurrent=function(a,b,d,e){return c.current===a&&(c.itemName=b,c.itemEmail=d),c.dropdownLength=e,c.current===a},c.setCurrent=function(a){c.current=a},c.selectionIndex=function(a){38===a.keyCode&&c.current>0?(a.preventDefault(),c.current=c.current-1,c.isCurrent(c.current)):9===a.keyCode?c.selected=!0:13===a.keyCode&&c.dropdownLength!==c.items.length?c.handleSelection(c.itemName,c.itemEmail):8===a.keyCode&&0===c.model.length||46===a.keyCode?c.theMethodToBeCalled(c.lineItems.length-1):40===a.keyCode&&c.current<c.dropdownLength-1&&(a.preventDefault(),c.current=c.current+1,c.isCurrent(c.current)),d[0].querySelector(".list-scrollable").scrollTop=35*(c.current-1)}}}}]),angular.module("att.abs.verticalSteptracker",["ngSanitize"]).directive("verticalSteptracker",[function(){return{restrict:"EA",transclude:!0,replace:!1,scope:{},template:'<div class="vertical-nav"><ul ng-transclude arial-label="step list" role="presentation" class="tickets-list-height"></ul></div>',link:function(){}}}]).directive("verticalSteptrackerStep",[function(){return{restrict:"EA",transclude:!0,replace:!1,scope:{type:"=type",id:"=id"},templateUrl:"app/scripts/ng_js_att_tpls/verticalSteptracker/vertical-step-tracker.html",link:function(){}}}]).directive("attAbsLink",[function(){return{restrict:"EA",transclude:!0,replace:!1,template:'<span ng-transclude class="view-log"></span>'}}]),angular.module("att.abs.videoControls",[]).config(["$compileProvider",function(a){a.aHrefSanitizationWhitelist(/^\s*(https?|javascript):/)}]).directive("videoControls",[function(){return{restrict:"EA",replace:!0,transclude:!0,templateUrl:"app/scripts/ng_js_att_tpls/videoControls/videoControls.html"}}]).directive("photoControls",[function(){return{restrict:"EA",replace:!0,transclude:!0,templateUrl:"app/scripts/ng_js_att_tpls/videoControls/photoControls.html",scope:{prevLink:"@",nextLink:"@"},link:function(a,b,c){c.prevLink||(a.prevLink="javascript:void(0)"),c.nextLink||(a.nextLink="javascript:void(0)"),a.links={prevLink:a.prevLink,nextLink:a.nextLink}}}}]),angular.module("app/scripts/ng_js_att_tpls/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/accordion/accordion.html",'<div class="att-accordion__group tabpanel" ng-class="{\'att-accordion__group att-accordion__group--open\':isOpen,\'att-accordion__group\':!isOpen }">\n <a ng-show="showicon" \n class="toggle-header att-accordion__heading att-accordion__toggle noafter" \n aria-selected="{{focused}}" \n aria-controls="panel{{index}}" \n aria-expanded="{{isOpen}}" \n ng-class="{focus: focused, selected: focused}" \n role="tab" \n ng-click="toggle()" \n accordion-transclude="heading" \n style="cursor:pointer; text-decoration:none">\n <span>{{heading}}</span>\n <i ng-class="{\'icon-chevron-down\':!isOpen,\'icon-chevron-up\':isOpen }" class="pull-right"></i>\n </a>\n <div ng-show="!showicon" \n ng-class="{focus: focused, selected: focused}" \n style="text-decoration:none" \n accordion-transclude="heading" \n role="tab" \n aria-expanded="{{isOpen}}"\n aria-selected="{{focused}}" \n aria-controls="panel{{index}}" \n class="toggle-header att-accordion__heading att-accordion__toggle noafter">\n <span>{{heading}}</span>\n </div> \n <div aria-label="{{heading}}" \n aria-hidden="{{!isOpen}}" \n role="tabpanel" \n collapse="!isOpen" \n class="att-accordion__body" \n id="panel{{index}}" \n ng-transclude>\n </div>\n <div class="att-accordion__bottom--border"></div> \n</div> ')}]),angular.module("app/scripts/ng_js_att_tpls/accordion/accordion_alt.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/accordion/accordion_alt.html",'<div class="att-accordion__group tabpanel" ng-class="{\'att-accordion__group att-accordion__group--open\':isOpen,\'att-accordion__group\':!isOpen }">\n <a class="toggle-header att-accordion__heading att-accordion__toggle" \n aria-selected="{{focused}}" \n aria-controls="panel{{index}}" \n ng-class="{focus: focused, selected: focused}" \n aria-expanded="{{isOpen}}" \n role="tab" \n ng-click="toggle()" \n accordion-transclude="heading"> \n </a>\n <span>{{heading}}</span>\n <div aria-label="{{heading}}" \n aria-hidden="{{!isOpen}}" \n role="tabpanel" \n collapse="!isOpen" \n class="att-accordion__body" \n id="panel{{index}}" \n ng-transclude>\n </div>\n</div> ')}]),angular.module("app/scripts/ng_js_att_tpls/accordion/attAccord.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/accordion/attAccord.html","<div ng-transclude></div>")}]),angular.module("app/scripts/ng_js_att_tpls/accordion/attAccordBody.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/accordion/attAccordBody.html","<div ng-transclude></div>")}]),angular.module("app/scripts/ng_js_att_tpls/accordion/attAccordHeader.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/accordion/attAccordHeader.html",'<div ng-click="clickFunc()">\n <div ng-transclude>\n <i class="icon-chevron-down"></i>\n </div>\n</div>')}]),angular.module("app/scripts/ng_js_att_tpls/alert/alert.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/alert/alert.html","<div class=\"alert\" ng-class=\"{'alert-success': alertType === 'success', 'alert-warning': alertType === 'warning', 'alert-error': alertType === 'error', 'alert-info': alertType === 'info', 'alert-inplace': showTop !== 'true'}\" ng-show=\"showAlert\" ng-style=\"cssStyle\">\n <div class=\"container\">\n"+' <a href="javascript:void(0)" alt="close" class="close-role" ng-click="close()" tabindex="0" att-accessibility-click="32,13">Dismiss <i class="icon-circle-action-close"></i></a>\n <span ng-transclude> </span>\n </div>\n</div>')}]),angular.module("app/scripts/ng_js_att_tpls/boardStrip/attAddBoard.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/boardStrip/attAddBoard.html",'<div tabindex="0" att-accessibility-click="13,32" ng-click="addBoard()" aria-label="Add Board" class="boardstrip-item--add">\n <i aria-hidden="true" class="icon-add centered"></i>\n <br/>\n <div class="centered">Add board</div>\n</div>')}]),angular.module("app/scripts/ng_js_att_tpls/boardStrip/attBoard.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/boardStrip/attBoard.html",'<li att-board-navigation tabindex="0" aria-label="{{boardLabel}}" att-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("app/scripts/ng_js_att_tpls/boardStrip/attBoardStrip.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/boardStrip/attBoardStrip.html",'<div class="att-boardstrip">\n <div class="boardstrip-reel">\n <div class="prev-items" ng-if="isPrevBoard()">\n <i tabindex="0" aria-label="Scroll Boardstrip Left" att-accessibility-click="13,32" ng-click="prevBoard()" class="arrow icon-arrow-left-circle"></i>\n </div>\n <div att-add-board on-add-board="onAddBoard()"></div>\n <div class="board-viewport"><ul role="presentation" class="boardstrip-container" ng-transclude></ul></div>\n <div class="next-items" ng-if="isNextBoard()">\n <i tabindex="0" aria-label="Scroll Boardstrip Right" att-accessibility-click="13,32" ng-click="nextBoard()" class="arrow icon-arrow-right-circle"></i>\n </div>\n </div>\n</div>')}]),angular.module("app/scripts/ng_js_att_tpls/buttons/buttonDropdown.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/buttons/buttonDropdown.html",'<div class="att-btn-dropdown">\n <div class="buttons-dropdown--small btn-group" ng-class="{\'open\': isOpen}" att-accessibility-click="13,32" ng-click="toggle()">\n \n <button role="menu" class="button button--secondary button--small buttons-dropdown__drop dropdown-toggle" ng-if="type===\'dots\'" alt="Click for Options" >\n \n <div class="circle"></div>\n <div class="circle"></div>\n <div class="circle"></div>\n </button>\n <button role="menu" class="button button--secondary button--small buttons-dropdown__drop dropdown-toggle ng-isolate-scope actions-title" ng-if="type === \'actions\'" alt="Actions dropdown Buttons">Actions</button>\n \n\n'+" <ul ng-class=\"{'dropdown-menu dots-dropdwn': type==='dots', 'dropdown-menu actions-dropdwn': type === 'actions'}\" ng-transclude></ul>\n </div>\n \n</div>\n")}]),angular.module("app/scripts/ng_js_att_tpls/colorselector/colorselector.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/colorselector/colorselector.html",'<div class="att-radio att-color-selector__item" \n ng-class="{\'att-radio--on\': (iconColor === selected)}">\n <div class="att-radio__indicator" tabindex="0" att-accessibility-click="32,13" ng-click="selectedcolor(iconColor)" \n ng-style="applycolor" ng-transclude></div>\n</div>')}]),angular.module("app/scripts/ng_js_att_tpls/datepicker/dateFilter.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/datepicker/dateFilter.html",'<div class="calendar" ng-class="{\'monthpicker\':mode === 1}">\n <div class="select2-container" ng-class="{\'select2-container-active select2-dropdown-open\': showDropdownList}" style="width: 100%; z-index:0">\n <a tabindex="0" id="select2-choice" class="select2-choice" href="javascript:void(0)" att-element-focus="focusInputButton" ng-show="!showCalendar" att-accessibility-click="13,32" ng-click="showDropdown()" ng-blur="focusInputButton=false">\n <span class="select2-chosen" ng-show="!showCalendar">{{selectedOption}}</span>\n <input type="text" ng-show="showCalendar" ng-blur="untrackInputChange($event)" att-input-deny="[^0-9\\/-]" maxlength="{{maxLength}}" ng-model="selectedOption" aria-labelledby="select2-choice" ng-change="getDropdownText()" />\n <abbr class="select2-search-choice-close"></abbr>\n <span ng-class="{\'select2-arrow\': mode !== 1, \'calendar-icon\': mode === 1}"><b></b></span>\n </a>\n <a id="select2-chosen" class="select2-choice" href="javascript:void(0)" ng-show="showCalendar">\n <span class="select2-chosen" ng-show="!showCalendar">{{selectedOption}}</span>\n <input type="text" ng-show="showCalendar" ng-blur="untrackInputChange($event)" att-input-deny="[^0-9\\/-]" maxlength="{{maxLength}}" ng-model="selectedOption" aria-labelledby="select2-chosen" ng-change="getDropdownText()" />\n <abbr class="select2-search-choice-close"></abbr>\n <span tabindex="0" ng-class="{\'select2-arrow\': mode !== 1, \'calendar-icon\': mode === 1}" att-accessibility-click="13,32" ng-click="showDropdown()"><b></b></span>\n </a>\n </div>\n <div class="select2-drop select2-drop-active select2-display-none" ng-style="{display: (showDropdownList && \'block\') || \'none\', \'border-radius\': showCalendar && \'0 0 0 6px\'}" style="width: 100%">\n <div id="dateFilterList" att-scrollbar ><ul class="select2-results options" ng-transclude></ul></div>\n <ul class="select2-results sttings" style="margin-top:0px">\n <li tabindex="0" class="select2-result select2-highlighted greyBorder" ng-class="{\'select2-result-current\': checkCurrentSelection(\'Custom Single Date\')}" att-accessibility-click="13,32" ng-click="selectAdvancedOption(\'Custom Single Date\')">\n <div class="select2-result-label" ng-if="mode !== 1">Custom Single Date...</div>\n <div class="select2-result-label" ng-if="mode === 1">Custom single month...</div>\n </li>\n <li tabindex="0" class="select2-result select2-highlighted" ng-class="{\'select2-result-current\': checkCurrentSelection(\'Custom Range\')}" att-accessibility-click="13,32" ng-click="selectAdvancedOption(\'Custom Range\')">\n <div class="select2-result-label" ng-if="mode !== 1">Custom Range...</div>\n <div class="select2-result-label" ng-if="mode === 1">Custom month range...</div>\n </li>\n <li class="select2-result select2-highlighted btnContainer" ng-style="{display: (showCalendar && \'block\') || \'none\'}">\n <button tabindex="0" ng-blur="resetFocus($event)" att-element-focus="focusApplyButton" att-button="" btn-type="{{applyButtonType}}" size="small" att-accessibility-click="13,32" ng-click="apply()">Apply</button>\n <button tabindex="0" att-button="" btn-type="secondary" size="small" att-accessibility-click="13,32" ng-click="cancel()">Cancel</button>\n <div>\n <a tabindex="0" href="javascript:void(0)" ng-if="mode !== 1" style="text-decoration:underline;" att-accessibility-click="13,32" ng-click="clear()">Clear Dates</a>\n <a tabindex="0" href="javascript:void(0)" ng-if="mode === 1" style="text-decoration:underline;" att-accessibility-click="13,32" ng-click="clear()">Clear Months</a>\n </div>\n </li>\n </ul>\n </div>\n <div class="datepicker-wrapper show-right" ng-style="{display: (showCalendar && \'block\') || \'none\'}">\n <span datepicker ng-blur="resetFocus($event)" att-element-focus="focusSingleDateCalendar" ng-show="checkCurrentSelection(\'Custom Single Date\')"></span>\n <span datepicker ng-blur="resetFocus($event)" att-element-focus="focusRangeCalendar" ng-show="checkCurrentSelection(\'Custom Range\')"></span>\n </div>\n</div>\n')}]),angular.module("app/scripts/ng_js_att_tpls/datepicker/dateFilterList.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/datepicker/dateFilterList.html",'<li ng-click="!disabled && selectOption(fromDate,toDate,caption)" att-accessibility-click="13,32" ng-class="{\'select2-result-current\': checkCurrentSelection(caption)}" class="select2-result select2-highlighted ng-scope" tabindex="{{!disabled?\'0\':\'-1\'}}">\n <div class="select2-result-label" ng-class="{\'disabled\':disabled}" ng-transclude></div>\n</li>')}]),angular.module("app/scripts/ng_js_att_tpls/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/datepicker/datepicker.html",'<div id="datepicker" class="datepicker" ng-class="{\'monthpicker\': mode === 1}" aria-hidden="false" role="dialog" tabindex="-1" aria-labelledby="datepicker">\n <div class="datepicker-days" style="display: block;">\n <table class="table-condensed">\n <thead>\n <tr>\n <th id="month" tabindex="0" class="datepicker-switch" colspan="{{(mode !== 1) && (currentRows[0].length - 2) || (currentRows[0].length)}}" style="text-align:left">{{currentTitle}}</th>\n <th ng-if="mode !== 1" id="prev" aria-hidden="{{!disablePrev && \'false\'|| \'true\'}}" tabindex="{{!disablePrev && \'0\'|| \'-1\'}}" att-accessibility-click="13,32" ng-click="!disablePrev && move(-1)">\n <div class="icons-list" data-size="medium"><i class="icon-arrow-left-circle" ng-class="{\'disabled\': disablePrev}" alt="Left Arrow"></i>\n </div><span class="hidden-spoken">Previous Month</span>\n </th>\n <th ng-if="mode !== 1" id="next" aria-hidden="{{!disableNext && \'false\'|| \'true\'}}" tabindex="{{!disableNext && \'0\'|| \'-1\'}}" att-accessibility-click="13,32" ng-click="!disableNext && move(1)">\n <div class="icons-list" data-size="medium"><i class="icon-arrow-right-circle" ng-class="{\'disabled\': disableNext}" alt="Right Arrow"></i>\n </div><span class="hidden-spoken">Next Month</span>\n </th>\n </tr>\n <tr ng-if="labels.length > 0">\n <th tabindex="-1" class="dow weekday" ng-repeat="label in labels"><span>{{label.pre}}</span></th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td id="datepickerBody" att-scrollbar colspan="{{currentRows[0].length}}" style="padding: 0px;" headers="">\n <table ng-class="{\'table-condensed\': mode === 0, \'monthtable-condensed\': mode === 1}" style="padding: 0px;">\n <thead class="hidden-spoken">\n <tr ng-show="labels.length > 0">\n <th id="{{label.post}}" tabindex="-1" class="dow weekday" ng-repeat="label in labels"></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in currentRows">\n <td headers="{{(mode === 0) && dt.header || \'month\'}}" att-element-focus="dt.focused" aria-hidden="{{(!dt.oldMonth && !dt.nextMonth && !dt.disabled && \'false\') || \'true\'}}" tabindex="{{(!dt.oldMonth && !dt.nextMonth && !dt.disabled && \'0\') || \'-1\'}}" ng-repeat="dt in row" class="days" ng-class="{\'active\': dt.selected || dt.from || dt.to, \'from\': dt.from, \'to\': dt.to, \'range\': dt.dateRange, \'prev-month \': dt.oldMonth, \'next-month\': dt.nextMonth, \'disabled\': dt.disabled, \'today\': dt.today, \'weekend\': dt.weekend}" ng-click="!dt.selected && !dt.from && !dt.to && !dt.disabled && !dt.oldMonth && !dt.nextMonth && select(dt.date)" att-accessibility-click="13,32" aria-label="{{dt.date | date : \'EEEE, MMMM d\'}}"><span class="day">{{dt.label}}</span></td>\n </tr>\n <tr ng-if="mode === 1" class="divider"><td colspan="{{nextRows[0].length}}"><hr></td></tr>\n <tr>\n <th id="month" tabindex="0" class="datepicker-switch internal" colspan="{{nextRows[0].length}}" style="text-align:left">{{nextTitle}}</th>\n </tr>\n <tr ng-repeat="row in nextRows">\n'+" <td headers=\"{{(mode === 0) && dt.header || 'month'}}\" att-element-focus=\"dt.focused\" aria-hidden=\"{{(!dt.oldMonth && !dt.nextMonth && !dt.disabled && 'false') || 'true'}}\" tabindex=\"{{(!dt.oldMonth && !dt.nextMonth && !dt.disabled && '0') || '-1'}}\" ng-repeat=\"dt in row\" class=\"days\" ng-class=\"{'active': dt.selected || dt.from || dt.to, 'from': dt.from, 'to': dt.to, 'range': dt.dateRange, 'prev-month ': dt.oldMonth, 'next-month': dt.nextMonth, 'disabled': dt.disabled, 'today': dt.today, 'weekend': dt.weekend}\" ng-click=\"!dt.selected && !dt.from && !dt.to && !dt.disabled && !dt.oldMonth && !dt.nextMonth && select(dt.date)\" att-accessibility-click=\"13,32\" aria-label=\"{{dt.date | date : 'EEEE, MMMM d'}}\"><span class=\"day\">{{dt.label}}</span></td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</div>\n")}]),angular.module("app/scripts/ng_js_att_tpls/datepicker/datepickerPopup.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/datepicker/datepickerPopup.html",'<div class="calendar">\n <div class="box" ng-class="{\'active\': isOpen}">\n <span ng-transclude></span>\n <i class="calendar-icon" tabindex="0" att-accessibility-click="13,32" ng-click="toggle()" alt="Calendar Icon"></i>\n </div>\n <div class="datepicker-wrapper datepicker-wrapper-display-none" ng-style="{display: (isOpen && \'block\') || \'none\'}" aria-hidden="false" role="dialog" tabindex="-1">\n <span datepicker></span>\n </div>\n</div>\n')}]),angular.module("app/scripts/ng_js_att_tpls/dividerLines/dividerLines.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/dividerLines/dividerLines.html",'<div class="divider-container" ng-class="{\'divider-container-light\': lightContainer}">\n <hr ng-class="{\'divider-light\': lightContainer}">\n</div>\n\n')}]),angular.module("app/scripts/ng_js_att_tpls/dragdrop/fileUpload.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/dragdrop/fileUpload.html",'<label class="fileContainer"><span ng-transclude></span><input type="file" att-file-change></label>')}]),angular.module("app/scripts/ng_js_att_tpls/formField/attFormFieldValidationAlert.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/formField/attFormFieldValidationAlert.html",'<div class="form-field" ng-class="{\'error\': errorMessage, \'warning\': warningMessage}">\n <label class="form-field__label" ng-class="{\'form-field__label--show\': showLabel, \'form-field__label--hide\': hideLabel}"></label>\n <div class="form-field-input-container" ng-transclude></div>\n</div>')}]),angular.module("app/scripts/ng_js_att_tpls/formField/attFormFieldValidationAlertPrv.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/formField/attFormFieldValidationAlertPrv.html",'<div class="form-field" ng-class="{\'error\':hideErrorMsg}">\n <div class="form-field-input-container" ng-transclude></div>\n <div class="form-field__message error" type="error" ng-show="hideErrorMsg" >\n <i class="icon-info-alert"></i>{{errorMessage}}\n </div>\n</div>\n')}]),angular.module("app/scripts/ng_js_att_tpls/formField/creditCardImage.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/formField/creditCardImage.html",'<span class="css-sprite pull-right">\n<span class="hidden-spoken">We accept</span>\n<ul class="{{newValCCI}}">\n <li class="css-sprite-mc"><span class="hidden-spoken">MasterCard</span></li>\n <li class="css-sprite-visa"><span class="hidden-spoken">Visa</span></li>\n <li class="css-sprite-amex"><span class="hidden-spoken">American Express</span></li>\n <li class="css-sprite-discover"><span class="hidden-spoken">Discover</span></li> \n</ul>\n</span>\n<label for="ccForm.card" class="pull-left">Card number</label>')}]),angular.module("app/scripts/ng_js_att_tpls/formField/cvcSecurityImg.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/formField/cvcSecurityImg.html",'<div>\n<button type="button" class="btn btn-alt btn-tooltip" style="padding-top:16px" title="Help"><i class="hidden-spoken">Help</i></button>\n<div class="helpertext" role="tooltip">\n<div class="popover-title"></div>\n<div class="popover-content">\n <p class="text-legal cvc-cc">\n <img ng-src="images/{{newValI}}.png" alt="{{newValIAlt}}">\n </p>\n</div>\n</div>\n</div>\n')}]),angular.module("app/scripts/ng_js_att_tpls/hourpicker/hourpicker.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/hourpicker/hourpicker.html",'<div class="hourpicker">\n <div class="dropdown-width">\n <div ng-model="showlist" class="select2-container topDropDownWidth" ng-class="{\'select2-dropdown-open select2-container-active\': showlist}" >\n <a class="select2-choice" href="javascript:void(0)" id="customSelect" ng-keydown="selectOption(selectPrevNextValue($event,options,selectedOption))" att-accessibility-click="13" ng-click="showDropdown()">\n <span class="select2-chosen">{{selectedOption}}</span>\n <span class="select2-arrow"><b></b></span>\n </a>\n </div> \n <div class="select2-display-none select2-with-searchbox select2-drop-active show-search resultTopWidth" ng-show="showlist"> \n <ul class="select2-results resultTopMargin" > \n <li ng-model="ListType" ng-repeat="option in options" att-accessibility-click="13" ng-click="selectOption(option,$index)" class="select2-results-dept-0 select2-result select2-result-selectable"><div class="select2-result-label"><span >{{option}}</span></div></li> \n </ul>\n </div>\n </div>\n <div ng-show="showDaysSelector" class="customdays-width">\n <div att-divider-lines class="divider-margin-f"></div> \n <div class="col-md-3 fromto-margin">\n <div>From</div> <br>\n <div>To</div>\n </div>\n <div ng-repeat="day in days">\n <div class="col-md-3 col-md-days">\n <div class="col-md-1 daysselect-margin">\n <input type="checkbox" ng-model="daysList[day]" title="Day selection {{$index}}" att-checkbox ng-change="addSelectedValue(day)"> \n </div>\n <span>{{day}}</span><br>\n \n <div class="dropDownMarginBottom">\n <div class="select2-container topDropDownWidth" ng-class="{\'select2-dropdown-open select2-container-active\': FrtimeListDay[day]}" >\n <a class="select2-choice selectDropDown" href="javascript:void(0)" tabindex="{{daysList[day] ? \'0\' : \'-1\'}}" att-accessibility-click="13" ng-click="daysList[day] && showfromDayDropdown(day)" ng-class="{\'select2-chosen-disabled\':!daysList[day]}" ng-keydown="daysList[day] && selectFromDayOption(day , selectPrevNextValue($event,fromtime,selectedFromOption[day]));daysList[day] && addSelectedValue(day);">\n <span class="select2-chosen dropDownMarginRight" >{{selectedFromOption[day]}} <i ng-if="daysList[day]" ng-class="FrtimeListDay[day] ? \'icon-dropdown-up\' : \'icon-dropdown-down\'"></i></span>\n </a>\n </div> \n \n <div class="select2-display-none select2-with-searchbox select2-drop-active show-search resultFromDropDown" ng-show="FrtimeListDay[day]"> \n <ul class="select2-results resultTopMargin" > \n <li ng-click="selectFromDayOption(day,time.value);addSelectedValue(day);" ng-repeat="time in fromtime" class="select2-results-dept-0 select2-result select2-result-selectable"><div class="select2-result-label" ng-class="{\'selectedItemInDropDown\': (time.value==selectedFromOption[day])}"><span >{{time.value}}</span></div></li> \n </ul>\n </div>\n </div>\n \n <div class="dropDownMarginBottom">\n <div class="select2-container topDropDownWidth" ng-class="{\'select2-dropdown-open select2-container-active\': TotimeListDay[day]}" >\n <a class="select2-choice selectDropDown" href="javascript:void(0)" tabindex="{{daysList[day] ? \'0\' : \'-1\'}}" att-accessibility-click="13" ng-click="daysList[day] && showtoDayDropdown(day)" ng-class="{\'select2-chosen-disabled\':!daysList[day], \'selectDropDown-error\':daysList[day] && showToTimeErrorDay[day]}" ng-keydown="daysList[day] && selectToDayOption(day , selectPrevNextValue($event,totime,selectedToOption[day]));daysList[day] && addSelectedValue(day);">\n <span class="select2-chosen dropDownMarginRight">{{selectedToOption[day]}} <i ng-if="daysList[day]" ng-class="TotimeListDay[day] ? \'icon-dropdown-up\' : \'icon-dropdown-down\'" ></i></span>\n </a>\n </div>\n \n <div class="select2-display-none select2-with-searchbox select2-drop-active show-search resultToDropDown" ng-show="TotimeListDay[day]"> \n <ul class="select2-results resultTopMargin" > \n <li ng-click="selectToDayOption(day,time.value);addSelectedValue(day);" ng-repeat="time in totime" class="select2-results-dept-0 select2-result select2-result-selectable"><div class="select2-result-label" ng-class="{\'selectedItemInDropDown\': (time.value==selectedToOption[day])}"><span >{{time.value}}</span></div></li> \n </ul>\n </div>\n </div>\n </div> \n </div> \n <div att-divider-lines class="divider-margin-s"></div>\n </div>\n <div ng-transclude></div>\n</div>');
-}]),angular.module("app/scripts/ng_js_att_tpls/links/readMore.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/links/readMore.html",'<div>\n <div ng-bind-html="textToDisplay" ng-class="{\'att--readMore\': readFlag, \'att--readLess\': !readFlag}" ng-style="readLinkStyle"></div>\n <span class="att--readmore__link" ng-show="readMoreLink">… <a href="javascript:void(0);" ng-click="readMore()" att-accessbility-click="32,13">Read More</a>\n </span>\n</div>\n<span class="att--readless__link" ng-show="readLessLink">\n <a href="javascript:void(0);" ng-click="readLess()" att-accessbility-click="32,13">Read Less</a>\n</span>')}]),angular.module("app/scripts/ng_js_att_tpls/loading/loading.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/loading/loading.html",'<div data-progress="{{progressStatus}}" class="{{colorClass}}" ng-class="{\'att-loading-count\':icon == \'count\',\'loading--small\':icon == \'small\',\'loading\': icon != \'count\'}" alt="Loading">\n <div class="att-loading-circle" ng-if="icon == \'count\'">\n <div class="att-loading-circle__mask att-loading-circle__full">\n <div class="att-loading-circle__fill"></div>\n </div>\n <div class="att-loading-circle__mask att-loading-circle__half">\n <div class="att-loading-circle__fill"></div>\n <div class="att-loading-circle__fill att-loading-circle__fix"></div>\n </div>\n </div>\n <div ng-class="{\'att-loading-inset\':icon == \'count\',\'loading__inside\':icon != \'count\'}"><div class="att-loading-inset__percentage" ng-if="icon == \'count\'" alt="Loading with Count"></div></div>\n</div>\n\n')}]),angular.module("app/scripts/ng_js_att_tpls/modal/backdrop.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/modal/backdrop.html",'<div class="overlayed" ng-class="{show: animate}" \n'+" ng-style=\"{'z-index': 2000 + index*10,'overflow':'scroll'}\"> \n</div>")}]),angular.module("app/scripts/ng_js_att_tpls/modal/tabbedItem.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/modal/tabbedItem.html",'<div>\n <ul class="tabs_overlay">\n <li ng-repeat="item in items" class="tabs_overlay__item two__item" ng-class="{\'active\':isActiveTab($index)}" ng-click="clickTab($index)">\n <i class="{{item.iconClass}}"></i>\n {{item.title}} ({{item.number}})\n <a class="viewLink" att-link>Show</a>\n </li>\n </ul>\n</div>')}]),angular.module("app/scripts/ng_js_att_tpls/modal/tabbedOverlayItem.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/modal/tabbedOverlayItem.html",'<div>\n <ul class="tabs_overlay">\n <li ng-repeat="item in items" class="tabs_overlay__item two__item" ng-class="{\'active\':isActiveTab($index)}" ng-click="clickTab($index)">\n <i class="{{item.iconClass}}"></i>\n {{item.title}} ({{item.number}})\n <a class="viewLink" att-link>Show</a>\n </li>\n </ul>\n</div>')}]),angular.module("app/scripts/ng_js_att_tpls/modal/window.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/modal/window.html",'<div tabindex="-1" role="dialog" att-element-focus="focusModalFlag" class="modals {{ windowClass }}" ng-class="{show: animate}" \n ng-style="{\'z-index\': 2010 + index*10}" ng-click="close($event)" ng-transclude> \n</div>\n')}]),angular.module("app/scripts/ng_js_att_tpls/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/pagination/pagination.html",'<div class="pager">\n <a tabindex="0" href="javascript:void(0)" class="pager__item--prev" att-accessibility-click="13,32" ng-click="prev($event)" ng-if="currentPage > 1"><i class="icon-arrow-left"></i> Previous</a>\n <a tabindex="0" href="javascript:void(0)" class="pager__item pager__item--link" ng-if="totalPages > 7 && currentPage > 3" att-accessibility-click="13,32" ng-click="selectPage(1, $event)">1</a>\n <span class="pager__item" ng-if="totalPages > 7 && currentPage > 3">...</span>\n <a tabindex="0" href="javascript:void(0)" class="pager__item pager__item--link" att-element-focus="isFocused(page)" ng-repeat="page in pages" ng-class="{\'pager__item--active\': checkSelectedPage(page)}" att-accessibility-click="13,32" ng-click="selectPage(page, $event)">{{page}}</a>\n <span class="pager__item" ng-if="totalPages > 7 && currentPage < totalPages - 2 && showInput !== true">...</span>\n <span ng-show="totalPages > 7 && showInput === true"><input class="pager__item--input" type="text" placeholder="..." maxlength="2" ng-model="currentPage" aria-label="Current page count"/></span>\n <a tabindex="0" href="javascript:void(0)" class="pager__item pager__item--link" ng-if="totalPages > 7 && currentPage < totalPages - 2" att-accessibility-click="13,32" ng-click="selectPage(totalPages, $event)">{{totalPages}}</a>\n <a tabindex="0" href="javascript:void(0)" class="pager__item--next" att-accessibility-click="13,32" ng-click="next($event)" ng-if="currentPage < totalPages">Next <i class="icon-arrow-right"></i></a>\n</div>')}]),angular.module("app/scripts/ng_js_att_tpls/paneSelector/innerPane.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/paneSelector/innerPane.html","<div class='inner-pane' ng-transclude></div>")}]),angular.module("app/scripts/ng_js_att_tpls/paneSelector/paneGroup.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/paneSelector/paneGroup.html","<div class='pane-group' ng-transclude></div>")}]),angular.module("app/scripts/ng_js_att_tpls/paneSelector/sidePane.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/paneSelector/sidePane.html","<div class='side-pane' ng-transclude></div>")}]),angular.module("app/scripts/ng_js_att_tpls/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/tooltip/tooltip-popup.html","<div class=\"att-tooltip \" \n ng-class=\"{ 'att-tooltip--on': isOpen, \n 'att-tooltip--dark att-tooltip--dark--hover':stylett=='dark', \n 'att-tooltip--light att-tooltip--light--hover':stylett=='light',\n 'att-tooltip--left':placement=='left', \n 'att-tooltip--above':placement=='above', \n 'att-tooltip--right':placement=='right', \n 'att-tooltip--below':placement=='below'}\" \n ng-bind-html=\"content | unsafe\" ></div>")}]),angular.module("app/scripts/ng_js_att_tpls/popOvers/popOvers.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/popOvers/popOvers.html","<div class=\"att-popover popover-demo\" ng-style=\"{backgroundColor:popOverStyle}\"\n ng-class=\"{'att-tooltip--dark':popOverStyle==='grey',\n 'att-pop-over--left':popOverPlacement==='left', \n 'att-pop-over--above':popOverPlacement==='above', \n 'att-pop-over--right':popOverPlacement==='right'}\" \n style='position: absolute; max-width: 490px;'>\n <div class=\"pop-over-caret\"\n ng-class=\"{'pop-over-caret-border--left':popOverPlacement==='left', \n 'pop-over-caret-border--above':popOverPlacement==='above', \n 'pop-over-caret-border--right':popOverPlacement==='right', \n 'pop-over-caret-border--below':popOverPlacement==='below'}\">\n </div>\n <div class=\"pop-over-caret\" ng-style=\"popOverPlacement=='below' && {borderBottom:'6px solid ' +popOverStyle}||popOverPlacement=='left' && {borderLeft:'6px solid ' +popOverStyle}||popOverPlacement=='right' && {borderRight:'6px solid ' +popOverStyle}||popOverPlacement=='above' && {borderTop:'6px solid ' +popOverStyle}\"\n ng-class=\"{'pop-over-caret--left':popOverPlacement==='left', \n 'pop-over-caret--above':popOverPlacement==='above', \n 'pop-over-caret--right':popOverPlacement==='right', \n 'pop-over-caret--below':popOverPlacement==='below'}\"></div>\n \n <div class=\"att-popover-content\">\n"+' <a ng-if="closeable" href="javascript:void(0)" class="icon-close att-popover__close" ng-click="closeMe();$event.preventDefault()"></a>\n <div class="popover-packages__container" ng-include="content"></div>\n </div>\n</div>')}]),angular.module("app/scripts/ng_js_att_tpls/profileCard/addUser.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/profileCard/addUser.html",'<div class="col-md-9 profile-card add-user">\n <div class="atcenter">\n <div><i class="icon-add"></i></div>\n <span>add User</span>\n </div>\n</div>')}]),angular.module("app/scripts/ng_js_att_tpls/profileCard/profileCard.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/profileCard/profileCard.html",'<div class="col-md-9 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-hide="image" class="default-img">{{initials}}</span>\n <p class="name" tooltip-condition="{{profile.name}}" height="true"></p>\n <p class="status">\n <span class="status-icon" ng-class="{\'icon-green\':colorIcon===\'green\',\'icon-red\':colorIcon===\'red\',\'icon-blue\':colorIcon===\'blue\',\'icon-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 <p att-text-overflow="92%" tooltip-condition="{{profile.userName}}">{{profile.userName}}</p>\n <label>Email</label>\n <p att-text-overflow="92%" tooltip-condition="{{profile.email}}">{{profile.email}}</p>\n <label>Role</label>\n <p att-text-overflow="92%" tooltip-condition="{{profile.role}}">{{profile.role}}</p>\n <label>Last Login</label>\n <p att-text-overflow="92%" tooltip-condition="{{profile.lastLogin}}">{{profile.lastLogin}}</p>\n </div>\n </div>\n</div>')}]),angular.module("app/scripts/ng_js_att_tpls/progressBars/progressBars.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/progressBars/progressBars.html",'<div class="att-progress">\n <div class="att-progress-value">&nbsp;</div>\n</div>')}]),angular.module("app/scripts/ng_js_att_tpls/scrollbar/scrollbar.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/scrollbar/scrollbar.html",'<div class="scroll-bar" style="position: absolute">\n <div class="scroll-thumb" style="position: absolute; overflow: hidden"></div>\n</div>\n<div class="prev icons-list" data-size="medium" ng-show="navigation && prevAvailable" ng-style="{height: scrollbarAxis === \'x\' && position.height + \'px\'}">\n <a href="javascript:void(0);" ng-click="customScroll(false)" aria-label="Scroll" aria-hidden="true">\n <i ng-class="{\'icon-chevron-up\': (scrollbarAxis === \'y\'), \'icon-chevron-left\': (scrollbarAxis === \'x\')}"></i>\n </a>\n</div>\n<div class="scroll-viewport" ng-style="{height: (scrollbarAxis === \'x\' && position.height + \'px\') || viewportHeight, width: viewportWidth}" style="position: relative; overflow: hidden">\n <div class="scroll-overview" style="position: absolute; display: table; width: 100%" att-position="position" ng-transclude></div>\n</div>\n<div class=\'next icons-list\' data-size="medium" ng-show="navigation && nextAvailable" ng-style="{height: scrollbarAxis === \'x\' && position.height + \'px\'}">\n <a href="javascript:void(0);" ng-click="customScroll(true)" aria-label="Scroll" aria-hidden="true">\n'+" <i ng-class=\"{'icon-chevron-down': (scrollbarAxis === 'y'), 'icon-chevron-right': (scrollbarAxis === 'x')}\"></i>\n </a>\n</div>\n")}]),angular.module("app/scripts/ng_js_att_tpls/search/search.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/search/search.html",'<div class="select2-container show-search" ng-class="{\'select2-dropdown-open\': (showlist && !isDisabled),\'select2-container-disabled\':isDisabled, \'select2-container-active\': isact}" ng-init="isact=false;" style="width: 100%;">\n <a href="javascript:void(0)" class="select2-choice needsclick" tabindex="0" ng-click="showDropdown()" ng-class="{\'select2-chosen-disabled\':isDisabled}" role="combobox" aria-expanded="{{showlist}}" aria-owns="inList" aria-label="{{selectedOption}} selected" ng-focus="isact=true;" ng-blur="isact=false;">\n <span class="select2-chosen needsclick" aria-hidden = "true">{{selectedOption}}</span>\n <abbr class="select2-search-choice-close needsclick"></abbr>\n <span class="select2-arrow needsclick" role="presentation">\n <b role="presentation" class="needsclick"></b>\n </span>\n </a> \n <input class="select2-focusser select2-offscreen" \n tabindex="-1" \n type="text" \n aria-hidden="true" \n title="hidden" \n aria-haspopup="true" \n role="button"> \n</div>\n\n<div class="select2-drop select2-with-searchbox select2-drop-auto-width select2-drop-active" ng-class="{\'select2-display-none\':(!showlist || isDisabled)}" style="width:100%;z-index: 10">\n <div class="select2-search">\n <label ng-if="!noFilter" class="select2-offscreen" aria-label="Inline Search Field" aria-hidden="true">Inline Search Field</label>\n <input ng-if="!noFilter" ng-model="title" aria-label="title" typeahead="c.title for c in cName | filter:$viewValue:startsWith" type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="select2-input" aria-autocomplete="list" placeholder="">\n </div>\n <ul id="inList" class="select2-results" role="listbox">\n <li ng-show="filteredName.length === 0" class="select2-no-results" tabindex="-1">No matches found</li>\n <li class="select2-results-dept-0 select2-result select2-result-selectable" role="presentation" ng-model="ListType" ng-show="selectMsg && filteredName.length > 0" ng-click="selectOption(selectMsg, \'-1\')" ng-class="{\'select2-result-current\': selectedOption === selectMsg, \'hovstyle\': selectedIndex === -1}" ng-mouseover="hoverIn(-1)" aria-label="{{selectMsg}}" tabindex="-1">\n <div ng-if="startsWithFilter" class="select2-result-label" ng-bind-html="selectMsg | unsafe" role="option">\n <span class="select2-match"></span>\n </div>\n <div ng-if="!startsWithFilter" class="select2-result-label" ng-bind-html="selectMsg | highlight:title:className | unsafe" role="option">\n <span class="select2-match"></span>\n </div>\n </li>\n\n <li role="menuitem" ng-if="startsWithFilter" class="select2-results-dept-0 select2-result select2-result-selectable" role="presentation" ng-model="ListType" ng-repeat="(fIndex, item) in filteredName = (cName | startsWith:title:item)" ng-class="{\'select2-result-current\': selectedOption === item.title,\'hovstyle\': selectedIndex === item.index,\'disable\': item.disabled}" ng-click="item.disabled || selectOption(item.title,item.index)" ng-mouseover="hoverIn(item.index)" aria-label="{{item.title}}" tabindex="-1">\n <div class="select2-result-label" ng-bind-html="item.title | unsafe" role="option">\n <span class="select2-match"></span>\n </div>\n </li>\n\n <li role="menuitem" ng-if="!startsWithFilter" class="select2-results-dept-0 select2-result select2-result-selectable" role="presentation" ng-model="ListType" ng-repeat="(fIndex, item) in filteredName = (cName | filter:title)" ng-class="{\'select2-result-current\': selectedOption === item.title,\'hovstyle\': selectedIndex === item.index,\'disable\': item.disabled}" ng-click="item.disabled || selectOption(item.title,item.index)" ng-mouseover="hoverIn(item.index)" aria-label="{{item.title}}" tabindex="-1">\n <div class="select2-result-label" ng-bind-html="item.title | highlight:title:className | unsafe" role="option">\n <span class="select2-match"></span>\n </div>\n </li>\n </ul>\n</div>')}]),angular.module("app/scripts/ng_js_att_tpls/select/select.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/select/select.html",'<div class="select2-container show-search" ng-class="{\'select2-dropdown-open\': (showlist && !isDisabled),\'select2-container-disabled\': isDisabled, \'select2-container-active\': isact}" ng-init="isact=false;">\n <span class="select2-choice needsclick" tabindex="{{isDisabled ? -1 : 0}}" ng-click="showDropdown()" ng-class="{\'select2-chosen-disabled\':isDisabled}" role="combobox" aria-expanded="{{showlist}}" aria-owns="inList" aria-label="{{selectedOption}} selected" ng-focus="isact=true;" ng-blur="isact=false;">\n <span class="select2-chosen needsclick" aria-hidden="true">{{selectedOption}}</span>\n <abbr class="select2-search-choice-close needsclick"></abbr>\n <span class="select2-arrow needsclick" role="presentation">\n <b role="presentation" class="needsclick"></b>\n </span>\n </span> \n <input class="select2-focusser select2-offscreen" \n tabindex="-1" \n type="text" \n aria-hidden="true" \n title="hidden" \n aria-haspopup="true" \n role="button"> \n</div>\n\n<div class="select2-drop select2-with-searchbox select2-drop-auto-width select2-drop-active" ng-class="{\'select2-display-none\':(!showlist || isDisabled)}" style="width:100%;z-index: 10">\n <div class="select2-search">\n <label ng-if="!noFilter" class="select2-offscreen" aria-label="Inline Search Field" aria-hidden="true">Inline Search Field</label>\n <input ng-if="!noFilter" ng-model="title" aria-label="title" typeahead="c.title for c in cName | filter:$viewValue:startsWith" type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="select2-input" aria-autocomplete="list" placeholder="">\n </div>\n <ul id="inList" class="select2-results" role="listbox">\n <li ng-if="!noFilter" ng-show="filteredName.length === 0" class="select2-no-results" tabindex="-1">No matches found</li>\n <li ng-if="!noFilter" class="select2-results-dept-0 select2-result select2-result-selectable" role="presentation" ng-model="ListType" ng-show="selectMsg && filteredName.length > 0" ng-click="selectOption(selectMsg, \'-1\')" ng-class="{\'select2-result-current\': selectedOption === selectMsg, \'hovstyle\': selectedIndex === -1}" ng-mouseover="hoverIn(-1)" aria-label="{{selectMsg}}" tabindex="-1">\n <div ng-if="startsWithFilter" class="select2-result-label" ng-bind-html="selectMsg | unsafe" role="option">\n <span class="select2-match"></span>\n </div>\n <div ng-if="!startsWithFilter" class="select2-result-label" ng-bind-html="selectMsg | highlight:title:className | unsafe" role="option">\n <span class="select2-match"></span>\n </div>\n </li>\n\n <li role="menuitem" ng-if="startsWithFilter" class="select2-results-dept-0 select2-result select2-result-selectable" ng-model="ListType" ng-repeat="(fIndex, item) in filteredName = (cName | startsWith:title:item)" ng-class="{\'select2-result-current\': selectedOption === item.title,\'hovstyle\': selectedIndex === item.index,\'disable\': item.disabled}" ng-click="item.disabled || selectOption(item.title,item.index)" ng-mouseover="hoverIn(item.index)" tabindex="-1">\n <div class="select2-result-label" ng-bind-html="item.title | unsafe" role="option">\n <span class="select2-match"></span>\n </div>\n </li>\n\n <li role="menuitem" ng-if="!startsWithFilter" class="select2-results-dept-0 select2-result select2-result-selectable" ng-model="ListType" ng-repeat="(fIndex, item) in filteredName = (cName | filter:title)" ng-class="{\'select2-result-current\': selectedOption === item.title,\'hovstyle\': selectedIndex === item.index,\'disable\': item.disabled}" ng-click="item.disabled || selectOption(item.title,item.index)" ng-mouseover="hoverIn(item.index)" tabindex="-1">\n <div class="select2-result-label" ng-bind-html="item.title | highlight:title:className | unsafe" role="option">\n <span class="select2-match"></span>\n </div>\n </li>\n </ul>\n</div>')}]),angular.module("app/scripts/ng_js_att_tpls/select/textDropdown.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/select/textDropdown.html",'<div tabindex="0" class="text-dropdown">\n <div class="dropdown" ng-class="{\'not-visible\': isActionsShown}" ng-click="toggle()">\n <span class="action--selected" ng-bind="currentAction"></span>\n <i ng-class="isActionsShown ? \'icon-dropdown-up\' : \'icon-dropdown-down\'"></i>\n </div>\n <ul ng-class="isActionsShown ? \'actionsOpened\' : \'actionsClosed\'" ng-show="isActionsShown">\n <li ng-class="{\'highlight\': selectedIndex==$index}" ng-repeat="action in actions track by $index" ng-click="chooseAction($event, action, $index)" ng-mouseover="hoverIn($index)">{{action}}<i ng-class="{\'icon-included-checkmark\': isCurrentAction(action)}" att-accessibility-click="13,32"></i></li>\n </ul>\n</div>')}]),angular.module("app/scripts/ng_js_att_tpls/slider/maxContent.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/slider/maxContent.html",'<div class="att-slider__label att-slider__label--max att-slider__label--below" ng-transclude></div>')}]),angular.module("app/scripts/ng_js_att_tpls/slider/minContent.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/slider/minContent.html",'<div class="att-slider__label att-slider__label--min att-slider__label--below" ng-transclude></div>')}]),angular.module("app/scripts/ng_js_att_tpls/slider/slider.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/slider/slider.html",'<div class="att-slider" ng-mousemove="moveElem($event)" ng-mouseup="mouseUp($event)">\n <div class="att-slider__track">\n <div class="att-slider__range att-slider__range--disabled" ng-style="disabledStyle"></div>\n <div class="att-slider__range" ng-style="rangeStyle"></div>\n </div>\n <div class="att-slider__handles-container">\n <div role="menuitem" aria-label="{{ngModelSingle}}" class="att-slider__handle" ng-style="handleStyle" ng-mousedown="mouseDown($event,\'ngModelSingle\')" ng-mousemove="moveElem($event)" ng-mouseup="mouseUp($event)" tabindex="0" ng-keydown="keyDown($event,\'ngModelSingle\')"></div>\n <div role="menuitem" aria-label="Minimum Value- {{ngModelLow}}" class="att-slider__handle" ng-style="minHandleStyle" ng-mousedown="mouseDown($event,\'ngModelLow\')" ng-focus="focus($event,\'ngModelLow\')" ng-mousemove="moveElem($event)" ng-mouseup="mouseUp($event)" tabindex="0" ng-keyup="keyUp($event,\'ngModelLow\')" ng-keydown="keyDown($event,\'ngModelLow\')"></div>\n <div role="menuitem" aria-label="Maximum Value- {{ngModelHigh}}" class="att-slider__handle" ng-style="maxHandleStyle" ng-mousedown="mouseDown($event,\'ngModelHigh\')" ng-focus="focus($event,\'ngModelHigh\')" ng-mousemove="moveElem($event)" ng-mouseup="mouseUp($event)" tabindex="0" ng-keyup="keyUp($event,\'ngModelHigh\')" ng-keydown="keyDown($event,\'ngModelHigh\')"></div>\n </div>\n <div ng-transclude></div>\n</div>')}]),angular.module("app/scripts/ng_js_att_tpls/splitButtonDropdown/splitButtonDropdown.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/splitButtonDropdown/splitButtonDropdown.html",'<div class=" btn-group" \n ng-class="{\'buttons-dropdown--large\':!isSmall, \n \'buttons-dropdown--small\':isSmall, \n \'action-dropdown\':(isActionDropdown), \n \'open\':isDropDownOpen}">\n <a tabindex="0" href="javascript:void(0)" class="button btn buttons-dropdown__split" \n ng-class="{\'button--primary\':(btnType==undefined || btnType==\'primary\'), \n \'button--secondary\':btnType==\'secondary\', \n \'button--disabled\':btnType==\'disabled\', \n \'button--small\':isSmall}" \n ng-if="!isActionDropdown"\n ng-click="btnType===\'disabled\'?undefined:clickFxn()" att-accessibility-click="13,32">{{btnText}}</a>\n <a tabindex="0" href="javascript:void(0)" role="button" aria-label="Toggle Dropdown" aria-haspopup="true" class="button buttons-dropdown__drop dropdown-toggle" \n ng-class="{\'button--primary\':(btnType==undefined || btnType==\'primary\'), \n \'button--secondary\':btnType==\'secondary\', \n \'button--disabled\':btnType==\'disabled\', \n \'button--small\':isSmall}" ng-click="toggleDropdown()" att-accessibility-click="13,32">{{toggleTitle}} </a>\n <ul class="dropdown-menu" ng-class="{\'align-right\':multiselect ===true}" aria-expanded="{{isDropDownOpen}}" ng-click="hideDropdown()" role="menu" ng-transclude></ul>\n</div> ')}]),angular.module("app/scripts/ng_js_att_tpls/splitButtonDropdown/splitButtonDropdownItem.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/splitButtonDropdown/splitButtonDropdownItem.html",'<li role="menuitem" att-element-focus="sFlag" tabindex="0" ng-transclude></li>')}]),angular.module("app/scripts/ng_js_att_tpls/splitIconButton/splitIcon.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/splitIconButton/splitIcon.html","<div class='split-icon-button-container'>\n\n <div class='split-icon-button' ng-class=\"{'icon-with-chevron': isRight && !isMiddle && !isLeftNextDropdown && !isNextToDropDown, 'split-icon-button-middle':isMiddle, 'split-icon-button-right':isRight, 'split-icon-button-left':isLeft, 'split-icon-button-left-dropdown': isLeftNextDropdown ,'split-icon-button-next-dropdown': isNextToDropDown,'split-icon-button-dropdown': isDropDownOpen,'split-icon-button-hover':isIconHovered || isDropDownOpen}\" ng-mouseover='isIconHovered = true;' ng-mouseleave='isIconHovered = false;' tabindex=\"-1\" att-accessibility-click=\"13,32\" ng-click='dropDownClicked();'>\n <a class='{{icon}}' title='{{iconTitle}}' tabindex=\"0\"></a>\n <i ng-if=\"isRight && !isMiddle && !isLeftNextDropdown && !isNextToDropDown\" \n ng-class=\"isDropDownOpen ? 'icon-dropdown-up' : 'icon-dropdown-down'\"> </i>\n </div> \n\n <ul ng-if='isDropdown' class='dropdown-menu {{dropDownId}}' ng-show='\n isDropDownOpen' ng-click='toggleDropdown(false)' role=\"presentation\" ng-transclude>\n </ul>\n\n</div>")}]),angular.module("app/scripts/ng_js_att_tpls/splitIconButton/splitIconButton.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/splitIconButton/splitIconButton.html","<div>\n <div ng-if='isLeftLineShown' dir-type='{{iconStateConstants.DIR_TYPE.LEFT}}' expandable-line></div>\n <div ng-click='clickHandler()' att-split-icon icon='{{icon}}' title='{{title}}' dir-type='{{iconStateConstants.DIR_TYPE.BUTTON}}' hover-watch='isHovered' drop-down-watch='dropDownWatch' drop-down-id='{{dropDownId}}'>\n <div ng-transclude>\n </div>\n </div>\n <div ng-if='isRightLineShown' dir-type='{{iconStateConstants.DIR_TYPE.RIGHT}}' expandable-line></div>\n</div>")}]),angular.module("app/scripts/ng_js_att_tpls/splitIconButton/splitIconButtonGroup.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/splitIconButton/splitIconButtonGroup.html","<div ng-transclude>\n</div>")}]),angular.module("app/scripts/ng_js_att_tpls/stepSlider/attStepSlider.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/stepSlider/attStepSlider.html",'<span ng-class="mainSliderClass">\n <table>\n <tr>\n <td>\n <div class="jslider-bg">\n <i class="l"></i>\n <i class="r"></i>\n <i class="v" ng-class="{\'step-slider-green\':sliderColor == COLORS.GREEN, \'step-slider-blue\': sliderColor == COLORS.BLUE_HIGHLIGHT, \'step-slider-magenta\': sliderColor == COLORS.MAGENTA, \'step-slider-gold\': sliderColor == COLORS.GOLD, \'step-slider-purple\': sliderColor == COLORS.PURPLE, \'step-slider-dark-blue\': sliderColor == COLORS.DARK_BLUE, \'step-slider-regular\': sliderColor == COLORS.REGULAR, \'step-slider-white\': sliderColor == COLORS.WHITE, \'cutoff-slider\': isCutOffSlider}"></i>\n </div>\n <div class="jslider-pointer" id="left-pointer"></div>\n <div class="jslider-pointer jslider-pointer-to" ng-class="{\'step-slider-green\':sliderColor == COLORS.GREEN, \'step-slider-blue\': sliderColor == COLORS.BLUE_HIGHLIGHT, \'step-slider-magenta\': sliderColor == COLORS.MAGENTA, \'step-slider-gold\': sliderColor == COLORS.GOLD, \'step-slider-purple\': sliderColor == COLORS.PURPLE, \'step-slider-dark-blue\': sliderColor == COLORS.DARK_BLUE, \'step-slider-regular\': sliderColor == COLORS.REGULAR, \'step-slider-white\':sliderColor == COLORS.WHITE ,\'cutoff-slider\': isCutOffSlider}"></div>\n <div class="jslider-label"><span ng-bind="from"></span><span ng-bind="options.dimension"></span></div>\n <div class="jslider-label jslider-label-to"><span ng-bind="toStr"></span><span ng-bind="endDimension"></span></div>\n <div class="jslider-value" id="jslider-value-left"><span></span>{{options.dimension}}</div>\n <div class="jslider-value jslider-value-to"><span></span>{{toolTipDimension}}</div>\n <div class="jslider-scale" ng-class="{\'show-dividers\': showDividers, \'cutoff-slider-dividers\':isCutOffSlider}">\n </div>\n <div class="jslider-cutoff">\n <div class="jslider-label jslider-label-cutoff">\n <span ng-bind="cutOffVal"></span>\n </div>\n </div>\n </td>\n </tr>\n </table>\n</span>\n')}]),angular.module("app/scripts/ng_js_att_tpls/steptracker/step-tracker.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/steptracker/step-tracker.html",'<div class="steptracker1">\n <div class="steptracker-bg">\n <div tabindex="0" ng-click="stepclick($event, $index);" att-accessibility-click="13,23" class="steptracker-track size-onethird" ng-repeat="step in sdata"\n ng-style="set_width($index)"\n ng-class="{\'last\':laststep($index),\'done\':donesteps($index),\'active\':activestep($index), \'incomplete\': isIncomplete($index), \'disabled\': disableClick}">\n <div class="circle">{{($index) + 1}}<span>{{step.title}}</span></div>\n <div ng-if="!laststep($index)" class="track"></div>\n </div>\n </div>\n</div>')}]),angular.module("app/scripts/ng_js_att_tpls/steptracker/step.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/steptracker/step.html",'<div class="steptracker1">\n <div class="steptracker-bg">\n <div class="steptracker-track size-onethird" \n ng-class="{\'last\':laststep($index),\'done\':donesteps($index),\'active\':activestep($index)}">\n <div class="circle" tabindex="0" \n ng-click="stepclick($event, $index);" \n att-accessibility-click="13,23">{{($index) + 1}}<span>{{step.title}}</span></div>\n <div ng-if="!laststep($index)" class="track"></div>\n </div>\n </div>\n</div>\n')}]),angular.module("app/scripts/ng_js_att_tpls/steptracker/timeline.html",[]).run(["$templateCache",function(a){
-a.put("app/scripts/ng_js_att_tpls/steptracker/timeline.html","<div class='att-timeline'>\n <div timeline-dot order='0' title='{{steps[0].title}}' description='{{steps[0].description}}' by='{{steps[0].by}}' date='{{steps[0].date}}' type='{{steps[0].type}}'></div>\n\n <div ng-repeat=\"m in middleSteps track by $index\">\n <div timeline-bar order='{{$index}}'></div>\n <div timeline-dot order='{{$index + 1}}' title='{{m.title}}' description='{{m.description}}' by='{{m.by}}' date='{{m.date}}' type='{{m.type}}'>\n </div>\n </div>\n\n</div>")}]),angular.module("app/scripts/ng_js_att_tpls/steptracker/timelineBar.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/steptracker/timelineBar.html","<div class='timeline-bar'>\n <div class='progress-bar' ng-class=\"{'completed-color':isCompleted,'cancelled-color':isCancelled,'alert-color':isAlert}\">\n </div>\n <hr></hr>\n</div>")}]),angular.module("app/scripts/ng_js_att_tpls/steptracker/timelineDot.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/steptracker/timelineDot.html","<div class='timeline-dot'>\n\n <div class='bigger-circle' ng-class=\"{'completed-color':isCompleted,'cancelled-color':isCancelled,'alert-color':isAlert}\">\n </div>\n\n <div class='inactive-circle'>\n </div>\n\n <div class='expandable-circle' ng-class=\"{'completed-color':isCompleted,'cancelled-color':isCancelled,'alert-color':isAlert}\">\n </div>\n\n <div ng-class=\"{'below-info-box':isBelowInfoBoxShown, 'above-info-box': !isBelowInfoBoxShown}\" tabindex=\"0\">\n \n <div ng-if='isBelowInfoBoxShown' class='vertical-line'>\n </div>\n\n <div class='info-container' ng-init='isContentShown=false'>\n <div ng-class=\"{'current-step-title':isCurrentStep, 'title':!isCurrentStep,'completed-color-text':isCompleted,'cancelled-color-text':isCancelled,'alert-color-text':isAlert, 'inactive-color-text':isInactive}\" ng-mouseover='titleMouseover(1)' ng-mouseleave='titleMouseleave()' ng-bind='title' ></div>\n <div class='content'>\n <div class='description' ng-bind='description'></div>\n <div class='submitter' ng-bind='by'></div>\n </div>\n <div class='date' ng-mouseover='titleMouseover(2)' ng-mouseleave='titleMouseleave()' ng-bind='date'></div>\n </div>\n\n <div ng-if='!isBelowInfoBoxShown' class='vertical-line'>\n </div>\n </div>\n\n</div>")}]),angular.module("app/scripts/ng_js_att_tpls/table/attTable.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/table/attTable.html",'<table class="tablesorter tablesorter-default" ng-transclude></table>\n')}]),angular.module("app/scripts/ng_js_att_tpls/table/attTableBody.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/table/attTableBody.html","<td ng-transclude></td>\n")}]),angular.module("app/scripts/ng_js_att_tpls/table/attTableHeader.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/table/attTableHeader.html","<th role=\"button\" aria-label=\"column header {{headerName}} {{sortable !== 'false' && '' || 'sortable'}} {{sortPattern !== 'null' && '' || sortPattern}}\" tabindex=\"{{sortable !== 'false' && '0' || '-1'}}\" class=\"tablesorter-header\" ng-class=\"{'tablesorter-headerAsc': sortPattern === 'asc', 'tablesorter-headerDesc': sortPattern === 'desc', 'tablesort-sortable': sortable !== 'false', 'sorter-false': sortable === 'false'}\" att-accessibility-click=\"13,32\" ng-click=\"(sortable !== 'false') && sort();\"><div class=\"tablesorter-header-inner\" ng-transclude></div></th>")}]),angular.module("app/scripts/ng_js_att_tpls/tableMessages/attTableMessage.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/tableMessages/attTableMessage.html",'<div class="att-table-message">\n <div class="message" ng-if="msgType==messageConstants.TABLE_MESSAGE_TYPES.noMatching">\n <div class="img-magnify-glass"></div> \n <div>\n <div ng-transclude></div>\n </div>\n </div>\n <div class="message" ng-if="msgType==messageConstants.TABLE_MESSAGE_TYPES.errorLoading">\n <div class="img-oops-exclamation" tabindex="0" 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)" ng-click="refreshAction($event)">refresh the page</a>\n </div>\n </div>\n <div class="message" ng-if="msgType==messageConstants.TABLE_MESSAGE_TYPES.magnifySearch">\n <div class="img-magnify-glass"></div>\n <div>\n <p class="title" tabindex="0">Please input values to <br/> begin your search.</p>\n </div>\n </div>\n <div class="message loading-message" ng-if="msgType==messageConstants.TABLE_MESSAGE_TYPES.isLoading">\n <div class="img-loading-dots"></div>\n <div ng-transclude></div>\n </div>\n</div>')}]),angular.module("app/scripts/ng_js_att_tpls/tableMessages/attUserMessage.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/tableMessages/attUserMessage.html",'<div class="att-user-message">\n <div ng-class="type==messageConstants.USER_MESSAGE_TYPES.error && trigger ? \'message-wrapper-error\' : \'hidden\'">\n <div class="message-icon-error"> <i class="icon-info-alert"></i> </div>\n\n <div class="message-body-wrapper">\n <div class="message-title-error" ng-if="thetitle && thetitle.length > 0"> <span ng-bind="thetitle" tabindex="0" aria-label="{{thetitle}}"></span> </div>\n <div class="message-msg" ng-bind="message" ng-if="message && message.length > 0" tabindex="0"></div>\n <div class="message-bottom">\n <div ng-transclude></div>\n </div>\n </div>\n\n </div>\n <div ng-class="type==messageConstants.USER_MESSAGE_TYPES.success && trigger ? \'message-wrapper-success\' : \'hidden\'">\n <div class="message-icon-success"> <i class="icon-included-checkmark"></i></div>\n\n <div class="message-body-wrapper">\n <div class="message-title-success" ng-if="thetitle && thetitle.length > 0" >\n <span ng-bind="thetitle" tabindex="0" aria-label="{{thetitle}}"></span>\n </div>\n <div class="message-msg" ng-bind="message" ng-if="message && message.length > 0" tabindex="0"></div>\n <div class="message-bottom">\n <div ng-transclude></div>\n </div>\n </div>\n\n </div>\n</div>\n')}]),angular.module("app/scripts/ng_js_att_tpls/tabs/floatingTabs.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/tabs/floatingTabs.html","<ul ng-class=\"{'tabsbid': size === 'large', 'tabsbid--small': size === 'small'}\">\n <li ng-repeat=\"tab in tabs\" ng-class=\"{'tabsbid__item tabsbid__item--active': isActiveTab(tab.url), 'tabsbid__item': !isActiveTab(tab.url)}\" ng-click=\"onClickTab(tab)\">\n"+' <a class="tabsbid__item-link" href="{{tab.url}}" tabindex="0" att-accessibility-click="32,13">{{tab.title}}</a>\n </li>\n</ul>')}]),angular.module("app/scripts/ng_js_att_tpls/tabs/genericTabs.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/tabs/genericTabs.html","<ul ng-class=\"{'tabsbid': size === 'large', 'tabsbid--small': size === 'small'}\">\n <li ng-repeat=\"tab in tabs\" ng-class=\"{'tabsbid__item tabsbid__item--active': isActive(tab.id), 'tabsbid__item': !isActive(tab.id),'tabs__item--active': isActive(tab.id)}\" ng-click=\"clickTab(tab)\">\n"+' <a class="tabsbid__item-link" href="{{tab.url}}" tabindex="0" att-accessibility-click="32,13">{{tab.title}}</a>\n </li>\n</ul>\n')}]),angular.module("app/scripts/ng_js_att_tpls/tabs/menuTab.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/tabs/menuTab.html",'<li class="megamenu__item" ng-mouseover="showHoverChild($event)" ng-class="{\'tabs__item--active\': menuItem.active==true && !hoverChild==true}">\n <span role="menuitem" att-accessibility-click="13,32" tabindex="0" ng-click="showChildren($event);!clickInactive||resetMenu($event)">{{tabName}}</span>\n <div ng-transclude></div>\n</li>\n')}]),angular.module("app/scripts/ng_js_att_tpls/tabs/parentmenuTab.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/tabs/parentmenuTab.html",'<div ng-class="{\'megamenu-tabs\': megaMenu,\'submenu-tabs\': !megaMenu}">\n <ul class="megamenu__items" role="presentation" ng-transclude>\n </ul>\n</div>')}]),angular.module("app/scripts/ng_js_att_tpls/tabs/simplifiedTabs.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/tabs/simplifiedTabs.html",'<div class="simplified-tabs">\n<ul class="simplified-tabs__items" role="tablist">\n <li ng-repeat="tab in tabs" role="tab" class="simplified-tabs__item" ng-class="{\'tabs__item--active\': isActive(tab.id)}" ng-click="clickTab(tab)" tabindex="0" att-accessibility-click="32,13">{{tab.title}}</li>\n <li class="tabs__pointer"></li>\n</ul>\n</div>')}]),angular.module("app/scripts/ng_js_att_tpls/tabs/submenuTab.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/tabs/submenuTab.html",'<li class="tabsbid__item megamenu__item" ng-class="{\'subMenuHover\': menuItem.active==true}">\n<a ng-href="{{tabUrl}}" role="menuitem" ng-if="subMenu === true" ng-mouseover="!subMenu || showChildren($event)" ng-focus="!subMenu ||showChildren($event)" tabindex="{{subMenu==\'true\'?0:-1}}" ng-click="!subMenu ||showMenuClick($event) ; subMenu ||showSubMenuClick($event)" att-accessibility-click="13,32">{{tabName}}</a>\n<a ng-href="{{tabUrl}}" role="menuitem" ng-if="!menuItem.leafNode && subMenu !== true" ng-mouseover="!subMenu || showChildren($event)" ng-focus="!subMenu ||showChildren($event)" tabindex="{{subMenu==\'true\'?0:-1}}" ng-click="!subMenu ||showMenuClick($event) ; subMenu ||showSubMenuClick($event)" att-accessibility-click="13,32">{{tabName}}</a>\n<span ng-transclude></span>\n</li>\n')}]),angular.module("app/scripts/ng_js_att_tpls/tagBadges/tagBadges.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/tagBadges/tagBadges.html","<div class=\"tags__item\" \n ng-class=\"{'tags__item--small':isSmall, \n 'tags__item--color':isColor, \n 'tags__item--cloud':!isClosable && !isColor,'active':applyActiveClass}\"\n ng-if=\"display\" \n ng-style=\"{borderColor: border_type_borderColor, background: isHighlight?'#bbb':undefined, color: isHighlight?'#444':undefined }\"\n"+' ng-mousedown="activeHighlight(true)" role="presentation" ng-mouseup="activeHighlight(false)">\n <i class="icon-filter tags__item--icon" ng-if="isIcon">&nbsp;</i>\n <i class="tags__item--color-icon" ng-if="isColor" ng-style="{backgroundColor: background_type_backgroundColor, borderColor: background_type_borderColor}"></i>\n <span class="tags__item--title" role="presentation" tabindex=0 aria-label="tag" ng-mousedown="activeHighlight(true)" ng-mouseup="activeHighlight(false)" ng-transclude></span>\n <a href="javascript:void(0)" title="Dismiss Link" class="tags__item--action" ng-click="closeMe();$event.preventDefault()" ng-if="isClosable"\n ng-style="{color: (isHighlight && \'#444\') || \'#888\' , borderLeft: (isHighlight && \'1px solid #444\')|| \'1px solid #888\' }">\n <i class="icon-erase">&nbsp;</i>\n </a>\n</div>')}]),angular.module("app/scripts/ng_js_att_tpls/toggle/demoToggle.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/toggle/demoToggle.html",'<span ng-transclude></span>\n<div class="att-switch-content" hm-drag = "drag($event)" att-accessibility-click="13,32" ng-click="updateModel($event)" hm-dragstart="alert(\'hello\')" hm-dragend="drag($event)" ng-class="{\'large\' : directiveValue == \'large\'}" style="-webkit-user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);">\n <div class="att-switch-onText" ng-style="" ng-class="{\'icon-included-checkmark ico\' : on === undefined,\'large\' : directiveValue == \'large\'}">{{on}}<span class="hidden-spoken">{{directiveValue}} when checked.</span></div>\n <div class="att-switch-thumb" tabindex="0" title="Toggle switch" role="checkbox" ng-class="{\'large\' : directiveValue == \'large\'}"></div>\n <div class="att-switch-offText" ng-class="{\'icon-erase ico\' : on === undefined,\'large\' : directiveValue == \'large\'}">{{off}}<span class="hidden-spoken">{{directiveValue}} when unchecked.</span></div>\n</div>\n')}]),angular.module("app/scripts/ng_js_att_tpls/typeAhead/typeAhead.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/typeAhead/typeAhead.html",'<div class="typeahead mainContainerOuter">\n <span class="message">To</span>\n <div class=\'maincontainer\' ng-click="setFocus()" ng-focus="inputActive=true" ng-class ="{\'typeahed_active\':inputActive || (lineItems.length && inputActive)}">\n <span tag-badges closable ng-repeat ="lineItem in lineItems track by $index" on-close="theMethodToBeCalled($index)" >{{lineItem}}</span>\n <input type="text" focus-me="clickFocus" ng-focus="inputActive=true" ng-model="model" ng-keydown="selected = false; selectionIndex($event)"/><br/> \n </div>\n <div ng-hide="!model.length || selected">\n <div class="filtercontainer list-scrollable" ng-show="( items | filter:model).length">\n <div class="item" ng-repeat="item in items| filter:model track by $index" ng-click="handleSelection(item[titleName],item[subtitle])" att-accessibility-click="13,32" ng-class="{active:isCurrent($index,item[titleName],item[subtitle],( items | filter:model).length)}"ng-mouseenter="setCurrent($index)">\n <span class="title" >{{item[titleName]}}</span>\n <span class="subtitle">{{item[subtitle]}}</span>\n </div> \n </div>\n </div>\n \n <div class="textAreaEmailContentDiv">\n <span class="message">Message</span>\n <textarea rows="4" cols="50" role="textarea" class="textAreaEmailContent" ng-model="emailMessage">To send \n a text, picture, or video message1 to an AT&T wireless device from your email:my message.</textarea>\n \n </div>\n \n</div>\n')}]),angular.module("app/scripts/ng_js_att_tpls/verticalSteptracker/vertical-step-tracker.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/verticalSteptracker/vertical-step-tracker.html","<li>\n <i ng-class=\"{'icon-tickets-active' : type == 'actual' && id =='Active','icon-tickets-referred' : type == 'actual' && id =='Requested Closed','icon-ticket-regular' : type == 'progress' && id =='In Progress','icon-tickets-contested' : type == 'actual' && id =='Contested','icon-tickets-returned' : type == 'actual' && id =='Deferred','icon-tickets-closed' : type == 'actual' && id =='Ready to Close','icon-tickets-cleared' : type == 'actual' && id =='Cleared'}\"></i>\n <span ng-transclude></span>\n</li>\n \n")}]),angular.module("app/scripts/ng_js_att_tpls/videoControls/photoControls.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/videoControls/photoControls.html",'<div>\n <a title="{{links.prevLink}}" aria-label="Previous Link" ng-href="{{links.prevLink}}"><i alt="previous" class="icon-arrow-left">&nbsp;</i></a>\n <span ng-transclude></span>\n <a title="{{links.nextLink}}" aria-label="Next Link" ng-href="{{links.nextLink}}"><i alt="next" class="icon-arrow-right">&nbsp;</i></a>\n</div>')}]),angular.module("app/scripts/ng_js_att_tpls/videoControls/videoControls.html",[]).run(["$templateCache",function(a){a.put("app/scripts/ng_js_att_tpls/videoControls/videoControls.html",'<div class="video-player">\n <div class="video-player__control video-player__play-button">\n <a class="video-player__button gigant-play" data-toggle-buttons="icon-play, icon-pause" data-target="i"><i class="icon-play" alt="Play/Pause Button"></i></a>\n </div>\n <div class="video-player__control video-player__track">\n\n <div class="video-player__track--inner">\n <div class="video-player__track--loaded" style="width: 75%"></div>\n <div class="video-player__track--played" style="width: 40%">\n <div class="att-tooltip att-tooltip--on att-tooltip--dark att-tooltip--above video-player__track-tooltip" ng-transclude></div>\n <div class="video-player__track-handle"></div>\n </div>\n </div>\n </div>\n <a class="video-player__time" ng-transclude></a>\n <div class="video-player__control video-player__volume_icon">\n <a class="video-player__button" data-toggle-buttons="icon-volume-mute, icon-volume-up" data-target="i"><i class="icon-volume-up" alt="Volume Button"></i></a>\n </div>\n <ul class="video-player__control video-player__volume">\n <li class="video-player__volume-bar video-player__volume-bar--full">&nbsp;</li>\n <li class="video-player__volume-bar video-player__volume-bar--full">&nbsp;</li>\n <li class="video-player__volume-bar">&nbsp;</li>\n <li class="video-player__volume-bar">&nbsp;</li>\n <li class="video-player__volume-bar">&nbsp;</li>\n </ul>\n <div class="video-player__control video-player__toggle-fullscreen-button">\n <a class="video-player__button" data-toggle-buttons="icon-full-screen, icon-normal-screen" data-target="i"><i class="icon-full-screen" alt="Full Screen Button">&nbsp;</i></a>\n </div>\n</div>')}]);
-return {}
-})(angular, window); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/ebz/sandbox/styles/base.css b/ecomp-portal-BE/war/static/ebz/sandbox/styles/base.css
deleted file mode 100644
index 3227b5b0..00000000
--- a/ecomp-portal-BE/war/static/ebz/sandbox/styles/base.css
+++ /dev/null
@@ -1 +0,0 @@
-/*! normalize.css v2.1.3 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden],template{display:none}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}a{background:0 0}a:active,a:hover{outline:0}h1{margin:.67em 0}b,strong{font-weight:700}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}button,input,select,textarea{margin:0}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}@media print{*{text-shadow:none!important;color:#000!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}@page{margin:2cm .5cm}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:transparent}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.428571429;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:focus,a:hover{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}img{vertical-align:middle}.img-responsive{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail,.thumbnail{padding:4px;line-height:1.428571429;background-color:#fff;border:1px solid #ddd;border-radius:6px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}cite{font-style:normal}.text-muted{color:#999}.text-primary{color:#428bca}.text-primary:hover{color:#3071a9}.text-warning{color:#c09853}.text-warning:hover{color:#a47e3c}.text-danger{color:#b94a48}.text-danger:hover{color:#953b39}.text-success{color:#468847}.text-success:hover{color:#356635}.text-info{color:#3a87ad}.text-info:hover{color:#2d6987}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:700;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#999}h1,h2,h3{margin-top:20px;margin-bottom:10px}h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}h4,h5,h6{margin-top:10px;margin-bottom:10px}h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-inline,.list-unstyled{padding-left:0;list-style:none}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}.list-inline>li:first-child{padding-left:0}dl{margin-bottom:20px}dd,dt{line-height:1.428571429}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}.dl-horizontal dd:after,.dl-horizontal dd:before{content:" ";display:table}.dl-horizontal dd:after{clear:both}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{font-size:17.5px;font-weight:300;line-height:1.25}blockquote p:last-child{margin-bottom:0}blockquote small{display:block;line-height:1.428571429;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right .small,blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right .small:before,blockquote.pull-right small:before{content:''}blockquote.pull-right .small:after,blockquote.pull-right small:after{content:'\00A0 \2014'}blockquote:after,blockquote:before{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.428571429}code,kbd,pre,samp{font-family:Monaco,Menlo,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;white-space:nowrap;border-radius:6px}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.428571429;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:6px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:10px;padding-right:10px}.container:after,.container:before{content:" ";display:table}.container:after{clear:both}.row{margin-left:-10px;margin-right:-10px}.row:after,.row:before{content:" ";display:table}.row:after{clear:both}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-13,.col-lg-14,.col-lg-15,.col-lg-16,.col-lg-17,.col-lg-18,.col-lg-19,.col-lg-2,.col-lg-20,.col-lg-21,.col-lg-22,.col-lg-23,.col-lg-24,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-13,.col-md-14,.col-md-15,.col-md-16,.col-md-17,.col-md-18,.col-md-19,.col-md-2,.col-md-20,.col-md-21,.col-md-22,.col-md-23,.col-md-24,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-13,.col-sm-14,.col-sm-15,.col-sm-16,.col-sm-17,.col-sm-18,.col-sm-19,.col-sm-2,.col-sm-20,.col-sm-21,.col-sm-22,.col-sm-23,.col-sm-24,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-13,.col-xs-14,.col-xs-15,.col-xs-16,.col-xs-17,.col-xs-18,.col-xs-19,.col-xs-2,.col-xs-20,.col-xs-21,.col-xs-22,.col-xs-23,.col-xs-24,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-left:10px;padding-right:10px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-13,.col-xs-14,.col-xs-15,.col-xs-16,.col-xs-17,.col-xs-18,.col-xs-19,.col-xs-2,.col-xs-20,.col-xs-21,.col-xs-22,.col-xs-23,.col-xs-24,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-1{width:4.1666666667%}.col-xs-2{width:8.3333333333%}.col-xs-3{width:12.5%}.col-xs-4{width:16.6666666667%}.col-xs-5{width:20.8333333333%}.col-xs-6{width:25%}.col-xs-7{width:29.1666666667%}.col-xs-8{width:33.3333333333%}.col-xs-9{width:37.5%}.col-xs-10{width:41.6666666667%}.col-xs-11{width:45.8333333333%}.col-xs-12{width:50%}.col-xs-13{width:54.1666666667%}.col-xs-14{width:58.3333333333%}.col-xs-15{width:62.5%}.col-xs-16{width:66.6666666667%}.col-xs-17{width:70.8333333333%}.col-xs-18{width:75%}.col-xs-19{width:79.1666666667%}.col-xs-20{width:83.3333333333%}.col-xs-21{width:87.5%}.col-xs-22{width:91.6666666667%}.col-xs-23{width:95.8333333333%}.col-xs-24{width:100%}.col-xs-pull-0{right:0}.col-xs-pull-1{right:4.1666666667%}.col-xs-pull-2{right:8.3333333333%}.col-xs-pull-3{right:12.5%}.col-xs-pull-4{right:16.6666666667%}.col-xs-pull-5{right:20.8333333333%}.col-xs-pull-6{right:25%}.col-xs-pull-7{right:29.1666666667%}.col-xs-pull-8{right:33.3333333333%}.col-xs-pull-9{right:37.5%}.col-xs-pull-10{right:41.6666666667%}.col-xs-pull-11{right:45.8333333333%}.col-xs-pull-12{right:50%}.col-xs-pull-13{right:54.1666666667%}.col-xs-pull-14{right:58.3333333333%}.col-xs-pull-15{right:62.5%}.col-xs-pull-16{right:66.6666666667%}.col-xs-pull-17{right:70.8333333333%}.col-xs-pull-18{right:75%}.col-xs-pull-19{right:79.1666666667%}.col-xs-pull-20{right:83.3333333333%}.col-xs-pull-21{right:87.5%}.col-xs-pull-22{right:91.6666666667%}.col-xs-pull-23{right:95.8333333333%}.col-xs-pull-24{right:100%}.col-xs-push-0{left:0}.col-xs-push-1{left:4.1666666667%}.col-xs-push-2{left:8.3333333333%}.col-xs-push-3{left:12.5%}.col-xs-push-4{left:16.6666666667%}.col-xs-push-5{left:20.8333333333%}.col-xs-push-6{left:25%}.col-xs-push-7{left:29.1666666667%}.col-xs-push-8{left:33.3333333333%}.col-xs-push-9{left:37.5%}.col-xs-push-10{left:41.6666666667%}.col-xs-push-11{left:45.8333333333%}.col-xs-push-12{left:50%}.col-xs-push-13{left:54.1666666667%}.col-xs-push-14{left:58.3333333333%}.col-xs-push-15{left:62.5%}.col-xs-push-16{left:66.6666666667%}.col-xs-push-17{left:70.8333333333%}.col-xs-push-18{left:75%}.col-xs-push-19{left:79.1666666667%}.col-xs-push-20{left:83.3333333333%}.col-xs-push-21{left:87.5%}.col-xs-push-22{left:91.6666666667%}.col-xs-push-23{left:95.8333333333%}.col-xs-push-24{left:100%}.col-xs-offset-0{margin-left:0}.col-xs-offset-1{margin-left:4.1666666667%}.col-xs-offset-2{margin-left:8.3333333333%}.col-xs-offset-3{margin-left:12.5%}.col-xs-offset-4{margin-left:16.6666666667%}.col-xs-offset-5{margin-left:20.8333333333%}.col-xs-offset-6{margin-left:25%}.col-xs-offset-7{margin-left:29.1666666667%}.col-xs-offset-8{margin-left:33.3333333333%}.col-xs-offset-9{margin-left:37.5%}.col-xs-offset-10{margin-left:41.6666666667%}.col-xs-offset-11{margin-left:45.8333333333%}.col-xs-offset-12{margin-left:50%}.col-xs-offset-13{margin-left:54.1666666667%}.col-xs-offset-14{margin-left:58.3333333333%}.col-xs-offset-15{margin-left:62.5%}.col-xs-offset-16{margin-left:66.6666666667%}.col-xs-offset-17{margin-left:70.8333333333%}.col-xs-offset-18{margin-left:75%}.col-xs-offset-19{margin-left:79.1666666667%}.col-xs-offset-20{margin-left:83.3333333333%}.col-xs-offset-21{margin-left:87.5%}.col-xs-offset-22{margin-left:91.6666666667%}.col-xs-offset-23{margin-left:95.8333333333%}.col-xs-offset-24{margin-left:100%}@media (min-width:768px){.container{width:740px}.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-13,.col-sm-14,.col-sm-15,.col-sm-16,.col-sm-17,.col-sm-18,.col-sm-19,.col-sm-2,.col-sm-20,.col-sm-21,.col-sm-22,.col-sm-23,.col-sm-24,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-1{width:4.1666666667%}.col-sm-2{width:8.3333333333%}.col-sm-3{width:12.5%}.col-sm-4{width:16.6666666667%}.col-sm-5{width:20.8333333333%}.col-sm-6{width:25%}.col-sm-7{width:29.1666666667%}.col-sm-8{width:33.3333333333%}.col-sm-9{width:37.5%}.col-sm-10{width:41.6666666667%}.col-sm-11{width:45.8333333333%}.col-sm-12{width:50%}.col-sm-13{width:54.1666666667%}.col-sm-14{width:58.3333333333%}.col-sm-15{width:62.5%}.col-sm-16{width:66.6666666667%}.col-sm-17{width:70.8333333333%}.col-sm-18{width:75%}.col-sm-19{width:79.1666666667%}.col-sm-20{width:83.3333333333%}.col-sm-21{width:87.5%}.col-sm-22{width:91.6666666667%}.col-sm-23{width:95.8333333333%}.col-sm-24{width:100%}.col-sm-pull-0{right:0}.col-sm-pull-1{right:4.1666666667%}.col-sm-pull-2{right:8.3333333333%}.col-sm-pull-3{right:12.5%}.col-sm-pull-4{right:16.6666666667%}.col-sm-pull-5{right:20.8333333333%}.col-sm-pull-6{right:25%}.col-sm-pull-7{right:29.1666666667%}.col-sm-pull-8{right:33.3333333333%}.col-sm-pull-9{right:37.5%}.col-sm-pull-10{right:41.6666666667%}.col-sm-pull-11{right:45.8333333333%}.col-sm-pull-12{right:50%}.col-sm-pull-13{right:54.1666666667%}.col-sm-pull-14{right:58.3333333333%}.col-sm-pull-15{right:62.5%}.col-sm-pull-16{right:66.6666666667%}.col-sm-pull-17{right:70.8333333333%}.col-sm-pull-18{right:75%}.col-sm-pull-19{right:79.1666666667%}.col-sm-pull-20{right:83.3333333333%}.col-sm-pull-21{right:87.5%}.col-sm-pull-22{right:91.6666666667%}.col-sm-pull-23{right:95.8333333333%}.col-sm-pull-24{right:100%}.col-sm-push-0{left:0}.col-sm-push-1{left:4.1666666667%}.col-sm-push-2{left:8.3333333333%}.col-sm-push-3{left:12.5%}.col-sm-push-4{left:16.6666666667%}.col-sm-push-5{left:20.8333333333%}.col-sm-push-6{left:25%}.col-sm-push-7{left:29.1666666667%}.col-sm-push-8{left:33.3333333333%}.col-sm-push-9{left:37.5%}.col-sm-push-10{left:41.6666666667%}.col-sm-push-11{left:45.8333333333%}.col-sm-push-12{left:50%}.col-sm-push-13{left:54.1666666667%}.col-sm-push-14{left:58.3333333333%}.col-sm-push-15{left:62.5%}.col-sm-push-16{left:66.6666666667%}.col-sm-push-17{left:70.8333333333%}.col-sm-push-18{left:75%}.col-sm-push-19{left:79.1666666667%}.col-sm-push-20{left:83.3333333333%}.col-sm-push-21{left:87.5%}.col-sm-push-22{left:91.6666666667%}.col-sm-push-23{left:95.8333333333%}.col-sm-push-24{left:100%}.col-sm-offset-0{margin-left:0}.col-sm-offset-1{margin-left:4.1666666667%}.col-sm-offset-2{margin-left:8.3333333333%}.col-sm-offset-3{margin-left:12.5%}.col-sm-offset-4{margin-left:16.6666666667%}.col-sm-offset-5{margin-left:20.8333333333%}.col-sm-offset-6{margin-left:25%}.col-sm-offset-7{margin-left:29.1666666667%}.col-sm-offset-8{margin-left:33.3333333333%}.col-sm-offset-9{margin-left:37.5%}.col-sm-offset-10{margin-left:41.6666666667%}.col-sm-offset-11{margin-left:45.8333333333%}.col-sm-offset-12{margin-left:50%}.col-sm-offset-13{margin-left:54.1666666667%}.col-sm-offset-14{margin-left:58.3333333333%}.col-sm-offset-15{margin-left:62.5%}.col-sm-offset-16{margin-left:66.6666666667%}.col-sm-offset-17{margin-left:70.8333333333%}.col-sm-offset-18{margin-left:75%}.col-sm-offset-19{margin-left:79.1666666667%}.col-sm-offset-20{margin-left:83.3333333333%}.col-sm-offset-21{margin-left:87.5%}.col-sm-offset-22{margin-left:91.6666666667%}.col-sm-offset-23{margin-left:95.8333333333%}.col-sm-offset-24{margin-left:100%}}@media (min-width:992px){.container{width:980px}.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-13,.col-md-14,.col-md-15,.col-md-16,.col-md-17,.col-md-18,.col-md-19,.col-md-2,.col-md-20,.col-md-21,.col-md-22,.col-md-23,.col-md-24,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-1{width:4.1666666667%}.col-md-2{width:8.3333333333%}.col-md-3{width:12.5%}.col-md-4{width:16.6666666667%}.col-md-5{width:20.8333333333%}.col-md-6{width:25%}.col-md-7{width:29.1666666667%}.col-md-8{width:33.3333333333%}.col-md-9{width:37.5%}.col-md-10{width:41.6666666667%}.col-md-11{width:45.8333333333%}.col-md-12{width:50%}.col-md-13{width:54.1666666667%}.col-md-14{width:58.3333333333%}.col-md-15{width:62.5%}.col-md-16{width:66.6666666667%}.col-md-17{width:70.8333333333%}.col-md-18{width:75%}.col-md-19{width:79.1666666667%}.col-md-20{width:83.3333333333%}.col-md-21{width:87.5%}.col-md-22{width:91.6666666667%}.col-md-23{width:95.8333333333%}.col-md-24{width:100%}.col-md-pull-0{right:0}.col-md-pull-1{right:4.1666666667%}.col-md-pull-2{right:8.3333333333%}.col-md-pull-3{right:12.5%}.col-md-pull-4{right:16.6666666667%}.col-md-pull-5{right:20.8333333333%}.col-md-pull-6{right:25%}.col-md-pull-7{right:29.1666666667%}.col-md-pull-8{right:33.3333333333%}.col-md-pull-9{right:37.5%}.col-md-pull-10{right:41.6666666667%}.col-md-pull-11{right:45.8333333333%}.col-md-pull-12{right:50%}.col-md-pull-13{right:54.1666666667%}.col-md-pull-14{right:58.3333333333%}.col-md-pull-15{right:62.5%}.col-md-pull-16{right:66.6666666667%}.col-md-pull-17{right:70.8333333333%}.col-md-pull-18{right:75%}.col-md-pull-19{right:79.1666666667%}.col-md-pull-20{right:83.3333333333%}.col-md-pull-21{right:87.5%}.col-md-pull-22{right:91.6666666667%}.col-md-pull-23{right:95.8333333333%}.col-md-pull-24{right:100%}.col-md-push-0{left:0}.col-md-push-1{left:4.1666666667%}.col-md-push-2{left:8.3333333333%}.col-md-push-3{left:12.5%}.col-md-push-4{left:16.6666666667%}.col-md-push-5{left:20.8333333333%}.col-md-push-6{left:25%}.col-md-push-7{left:29.1666666667%}.col-md-push-8{left:33.3333333333%}.col-md-push-9{left:37.5%}.col-md-push-10{left:41.6666666667%}.col-md-push-11{left:45.8333333333%}.col-md-push-12{left:50%}.col-md-push-13{left:54.1666666667%}.col-md-push-14{left:58.3333333333%}.col-md-push-15{left:62.5%}.col-md-push-16{left:66.6666666667%}.col-md-push-17{left:70.8333333333%}.col-md-push-18{left:75%}.col-md-push-19{left:79.1666666667%}.col-md-push-20{left:83.3333333333%}.col-md-push-21{left:87.5%}.col-md-push-22{left:91.6666666667%}.col-md-push-23{left:95.8333333333%}.col-md-push-24{left:100%}.col-md-offset-0{margin-left:0}.col-md-offset-1{margin-left:4.1666666667%}.col-md-offset-2{margin-left:8.3333333333%}.col-md-offset-3{margin-left:12.5%}.col-md-offset-4{margin-left:16.6666666667%}.col-md-offset-5{margin-left:20.8333333333%}.col-md-offset-6{margin-left:25%}.col-md-offset-7{margin-left:29.1666666667%}.col-md-offset-8{margin-left:33.3333333333%}.col-md-offset-9{margin-left:37.5%}.col-md-offset-10{margin-left:41.6666666667%}.col-md-offset-11{margin-left:45.8333333333%}.col-md-offset-12{margin-left:50%}.col-md-offset-13{margin-left:54.1666666667%}.col-md-offset-14{margin-left:58.3333333333%}.col-md-offset-15{margin-left:62.5%}.col-md-offset-16{margin-left:66.6666666667%}.col-md-offset-17{margin-left:70.8333333333%}.col-md-offset-18{margin-left:75%}.col-md-offset-19{margin-left:79.1666666667%}.col-md-offset-20{margin-left:83.3333333333%}.col-md-offset-21{margin-left:87.5%}.col-md-offset-22{margin-left:91.6666666667%}.col-md-offset-23{margin-left:95.8333333333%}.col-md-offset-24{margin-left:100%}}@media (min-width:768px){.container{width:980px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-13,.col-lg-14,.col-lg-15,.col-lg-16,.col-lg-17,.col-lg-18,.col-lg-19,.col-lg-2,.col-lg-20,.col-lg-21,.col-lg-22,.col-lg-23,.col-lg-24,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-1{width:4.1666666667%}.col-lg-2{width:8.3333333333%}.col-lg-3{width:12.5%}.col-lg-4{width:16.6666666667%}.col-lg-5{width:20.8333333333%}.col-lg-6{width:25%}.col-lg-7{width:29.1666666667%}.col-lg-8{width:33.3333333333%}.col-lg-9{width:37.5%}.col-lg-10{width:41.6666666667%}.col-lg-11{width:45.8333333333%}.col-lg-12{width:50%}.col-lg-13{width:54.1666666667%}.col-lg-14{width:58.3333333333%}.col-lg-15{width:62.5%}.col-lg-16{width:66.6666666667%}.col-lg-17{width:70.8333333333%}.col-lg-18{width:75%}.col-lg-19{width:79.1666666667%}.col-lg-20{width:83.3333333333%}.col-lg-21{width:87.5%}.col-lg-22{width:91.6666666667%}.col-lg-23{width:95.8333333333%}.col-lg-24{width:100%}.col-lg-pull-0{right:0}.col-lg-pull-1{right:4.1666666667%}.col-lg-pull-2{right:8.3333333333%}.col-lg-pull-3{right:12.5%}.col-lg-pull-4{right:16.6666666667%}.col-lg-pull-5{right:20.8333333333%}.col-lg-pull-6{right:25%}.col-lg-pull-7{right:29.1666666667%}.col-lg-pull-8{right:33.3333333333%}.col-lg-pull-9{right:37.5%}.col-lg-pull-10{right:41.6666666667%}.col-lg-pull-11{right:45.8333333333%}.col-lg-pull-12{right:50%}.col-lg-pull-13{right:54.1666666667%}.col-lg-pull-14{right:58.3333333333%}.col-lg-pull-15{right:62.5%}.col-lg-pull-16{right:66.6666666667%}.col-lg-pull-17{right:70.8333333333%}.col-lg-pull-18{right:75%}.col-lg-pull-19{right:79.1666666667%}.col-lg-pull-20{right:83.3333333333%}.col-lg-pull-21{right:87.5%}.col-lg-pull-22{right:91.6666666667%}.col-lg-pull-23{right:95.8333333333%}.col-lg-pull-24{right:100%}.col-lg-push-0{left:0}.col-lg-push-1{left:4.1666666667%}.col-lg-push-2{left:8.3333333333%}.col-lg-push-3{left:12.5%}.col-lg-push-4{left:16.6666666667%}.col-lg-push-5{left:20.8333333333%}.col-lg-push-6{left:25%}.col-lg-push-7{left:29.1666666667%}.col-lg-push-8{left:33.3333333333%}.col-lg-push-9{left:37.5%}.col-lg-push-10{left:41.6666666667%}.col-lg-push-11{left:45.8333333333%}.col-lg-push-12{left:50%}.col-lg-push-13{left:54.1666666667%}.col-lg-push-14{left:58.3333333333%}.col-lg-push-15{left:62.5%}.col-lg-push-16{left:66.6666666667%}.col-lg-push-17{left:70.8333333333%}.col-lg-push-18{left:75%}.col-lg-push-19{left:79.1666666667%}.col-lg-push-20{left:83.3333333333%}.col-lg-push-21{left:87.5%}.col-lg-push-22{left:91.6666666667%}.col-lg-push-23{left:95.8333333333%}.col-lg-push-24{left:100%}.col-lg-offset-0{margin-left:0}.col-lg-offset-1{margin-left:4.1666666667%}.col-lg-offset-2{margin-left:8.3333333333%}.col-lg-offset-3{margin-left:12.5%}.col-lg-offset-4{margin-left:16.6666666667%}.col-lg-offset-5{margin-left:20.8333333333%}.col-lg-offset-6{margin-left:25%}.col-lg-offset-7{margin-left:29.1666666667%}.col-lg-offset-8{margin-left:33.3333333333%}.col-lg-offset-9{margin-left:37.5%}.col-lg-offset-10{margin-left:41.6666666667%}.col-lg-offset-11{margin-left:45.8333333333%}.col-lg-offset-12{margin-left:50%}.col-lg-offset-13{margin-left:54.1666666667%}.col-lg-offset-14{margin-left:58.3333333333%}.col-lg-offset-15{margin-left:62.5%}.col-lg-offset-16{margin-left:66.6666666667%}.col-lg-offset-17{margin-left:70.8333333333%}.col-lg-offset-18{margin-left:75%}.col-lg-offset-19{margin-left:79.1666666667%}.col-lg-offset-20{margin-left:83.3333333333%}.col-lg-offset-21{margin-left:87.5%}.col-lg-offset-22{margin-left:91.6666666667%}.col-lg-offset-23{margin-left:95.8333333333%}.col-lg-offset-24{margin-left:100%}}table{max-width:100%;background-color:transparent}th{text-align:left}.table{width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.428571429;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*=col-]{float:none;display:table-column}table td[class*=col-],table th[class*=col-]{float:none;display:table-cell}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}@media (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;overflow-x:scroll;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd;-webkit-overflow-scrolling:touch}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}select[multiple],select[size]{height:auto}select optgroup{font-size:inherit;font-style:inherit;font-family:inherit}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}output{display:block;padding-top:7px;font-size:14px;line-height:1.428571429;color:#555;vertical-align:middle}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.428571429;color:#555;vertical-align:middle;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:6px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control:-moz-placeholder{color:#999}.form-control::-moz-placeholder{color:#999}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee}textarea.form-control{height:auto}.form-group{margin-bottom:15px}.checkbox,.radio{display:block;min-height:20px;margin-top:10px;margin-bottom:10px;padding-left:20px;vertical-align:middle}.checkbox label,.radio label{display:inline;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{float:left;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline[disabled],.checkbox[disabled],.radio-inline[disabled],.radio[disabled],fieldset[disabled] .checkbox,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio,fieldset[disabled] .radio-inline,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox][disabled],input[type=radio][disabled]{cursor:not-allowed}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn,.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.input-group-sm>.input-group-btn>select.btn,.input-group-sm>select.form-control,.input-group-sm>select.input-group-addon,select.input-sm{height:30px;line-height:30px}.input-group-sm>.input-group-btn>textarea.btn,.input-group-sm>textarea.form-control,.input-group-sm>textarea.input-group-addon,textarea.input-sm{height:auto}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn,.input-lg{height:45px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.input-group-lg>.input-group-btn>select.btn,.input-group-lg>select.form-control,.input-group-lg>select.input-group-addon,select.input-lg{height:45px;line-height:45px}.input-group-lg>.input-group-btn>textarea.btn,.input-group-lg>textarea.form-control,.input-group-lg>textarea.input-group-addon,textarea.input-lg{height:auto}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline{color:#c09853}.has-warning .form-control{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #dbc59e}.has-warning .input-group-addon{color:#c09853;border-color:#c09853;background-color:#fcf8e3}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline{color:#b94a48}.has-error .form-control{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #d59392}.has-error .input-group-addon{color:#b94a48;border-color:#b94a48;background-color:#f2dede}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline{color:#468847}.has-success .form-control{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7aba7b}.has-success .input-group-addon{color:#468847;border-color:#468847;background-color:#dff0d8}.form-control-static{margin-bottom:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group,.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control,.navbar-form .form-control{display:inline-block}.form-inline .checkbox,.form-inline .radio,.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio],.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{float:none;margin-left:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .control-label,.form-horizontal .radio,.form-horizontal .radio-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .form-group{margin-left:-10px;margin-right:-10px}.form-horizontal .form-group:after,.form-horizontal .form-group:before{content:" ";display:table}.form-horizontal .form-group:after{clear:both}.form-horizontal .form-control-static{padding-top:7px}@media (min-width:768px){.form-horizontal .control-label{text-align:right}}.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.428571429;border-radius:6px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.active,.btn-default:active,.btn-default:focus,.btn-default:hover,.open .btn-default.dropdown-toggle{color:#333;background-color:#ebebeb;border-color:#adadad}.btn-default.active,.btn-default:active,.open .btn-default.dropdown-toggle{background-image:none}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary.active,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.open .btn-primary.dropdown-toggle{color:#fff;background-color:#3276b1;border-color:#285e8e}.btn-primary.active,.btn-primary:active,.open .btn-primary.dropdown-toggle{background-image:none}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#428bca;border-color:#357ebd}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.active,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.open .btn-warning.dropdown-toggle{color:#fff;background-color:#ed9c28;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open .btn-warning.dropdown-toggle{background-image:none}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.active,.btn-danger:active,.btn-danger:focus,.btn-danger:hover,.open .btn-danger.dropdown-toggle{color:#fff;background-color:#d2322d;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open .btn-danger.dropdown-toggle{background-image:none}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.active,.btn-success:active,.btn-success:focus,.btn-success:hover,.open .btn-success.dropdown-toggle{color:#fff;background-color:#47a447;border-color:#398439}.btn-success.active,.btn-success:active,.open .btn-success.dropdown-toggle{background-image:none}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.active,.btn-info:active,.btn-info:focus,.btn-info:hover,.open .btn-info.dropdown-toggle{color:#fff;background-color:#39b3d7;border-color:#269abc}.btn-info.active,.btn-info:active,.open .btn-info.dropdown-toggle{background-image:none}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-link{color:#428bca;font-weight:400;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#999;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-group-sm>.btn,.btn-group-xs>.btn,.btn-sm,.btn-xs{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon:empty{width:1em}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;border-bottom:0 dotted}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.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.pull-right{right:0;left:auto}.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}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{text-decoration:none;color:#262626;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;outline:0;background-color:#428bca}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#999}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.428571429;color:#999}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0 dotted;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}}.btn-default .caret{border-top-color:#333}.btn-danger .caret,.btn-info .caret,.btn-primary .caret,.btn-success .caret,.btn-warning .caret{border-top-color:#fff}.dropup .btn-default .caret{border-bottom-color:#333}.dropup .btn-danger .caret,.dropup .btn-info .caret,.dropup .btn-primary .caret,.dropup .btn-success .caret,.dropup .btn-warning .caret{border-bottom-color:#fff}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group-vertical>.btn:focus,.btn-group>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar:after,.btn-toolbar:before{content:" ";display:table}.btn-toolbar:after{clear:both}.btn-toolbar .btn-group{float:left}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn+.btn-group,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn-group+.btn-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group-lg.btn-group>.btn+.dropdown-toggle,.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-group-lg>.btn .caret,.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-group-lg>.btn .caret,.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before{content:" ";display:table}.btn-group-vertical>.btn-group:after{clear:both}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:6px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:6px;border-top-right-radius:0;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child>.btn:last-child,.btn-group-vertical>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified .btn{float:none;display:table-cell;width:1%}[data-toggle=buttons]>.btn>input[type=checkbox],[data-toggle=buttons]>.btn>input[type=radio]{display:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group.col{float:none;padding-left:0;padding-right:0}.input-group .form-control{width:100%;margin-bottom:0}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:6px}.input-group-addon.input-sm,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.input-group-addon.btn{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.input-group-addon.btn{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.dropdown-toggle{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;white-space:nowrap}.input-group-btn:first-child>.btn{margin-right:-1px}.input-group-btn:last-child>.btn{margin-left:-1px}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-4px}.input-group-btn>.btn:active,.input-group-btn>.btn:hover{z-index:2}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav:after,.nav:before{content:" ";display:table}.nav:after{clear:both}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#999}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#999;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#428bca}.nav .open>a .caret,.nav .open>a:focus .caret,.nav .open>a:hover .caret{border-top-color:#2a6496;border-bottom-color:#2a6496}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.428571429;border:1px solid transparent;border-radius:6px 6px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:6px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#428bca}.nav-pills>li.active>a .caret,.nav-pills>li.active>a:focus .caret,.nav-pills>li.active>a:hover .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified,.nav-tabs.nav-justified{width:100%}.nav-justified>li,.nav-tabs.nav-justified>li{float:none}.nav-justified>li>a,.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li,.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a,.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified,.nav-tabs.nav-justified{border-bottom:0}.nav-tabs-justified>li>a,.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:6px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a,.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:6px 6px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav .caret{border-top-color:#428bca;border-bottom-color:#428bca}.nav a:hover .caret{border-top-color:#2a6496;border-bottom-color:#2a6496}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}.navbar:after,.navbar:before{content:" ";display:table}.navbar:after{clear:both}@media (min-width:768px){.navbar{border-radius:6px}}.navbar-header:after,.navbar-header:before{content:" ";display:table}.navbar-header:after{clear:both}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{max-height:340px;overflow-x:visible;padding-right:10px;padding-left:10px;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);-webkit-overflow-scrolling:touch}.navbar-collapse:after,.navbar-collapse:before{content:" ";display:table}.navbar-collapse:after{clear:both}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:auto}.navbar-collapse .navbar-nav.navbar-left:first-child{margin-left:-10px}.navbar-collapse .navbar-nav.navbar-right:last-child{margin-right:-10px}.navbar-collapse .navbar-text:last-child{margin-right:0}}.container>.navbar-collapse,.container>.navbar-header{margin-right:-10px;margin-left:-10px}@media (min-width:768px){.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px 10px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}@media (min-width:768px){.navbar>.container .navbar-brand{margin-left:-10px}}.navbar-toggle{position:relative;float:right;margin-right:10px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;border:1px solid transparent;border-radius:6px}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -10px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{margin-left:-10px;margin-right:-10px;padding:10px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin-top:8px;margin-bottom:8px}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media (min-width:768px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-nav.pull-right>li>.dropdown-menu,.navbar-nav>li>.dropdown-menu.pull-right{left:auto;right:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-text{float:left;margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{margin-left:10px;margin-right:10px}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#ccc}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.dropdown>a:focus .caret,.navbar-default .navbar-nav>.dropdown>a:hover .caret{border-top-color:#333;border-bottom-color:#333}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{background-color:#e7e7e7;color:#555}.navbar-default .navbar-nav>.open>a .caret,.navbar-default .navbar-nav>.open>a:focus .caret,.navbar-default .navbar-nav>.open>a:hover .caret{border-top-color:#555;border-bottom-color:#555}.navbar-default .navbar-nav>.dropdown>a .caret{border-top-color:#777;border-bottom-color:#777}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-inverse{background-color:#222;border-color:#090909}.navbar-inverse .navbar-brand{color:#999}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#999}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#090909}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{background-color:#090909;color:#fff}.navbar-inverse .navbar-nav>.dropdown>a:hover .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-nav>.dropdown>a .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .navbar-nav>.open>a .caret,.navbar-inverse .navbar-nav>.open>a:focus .caret,.navbar-inverse .navbar-nav>.open>a:hover .caret{border-top-color:#fff;border-bottom-color:#fff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#090909}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#999}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#090909}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:6px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:6px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.428571429;text-decoration:none;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{background-color:#eee}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca;cursor:default}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#999;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pager{padding-left:0;margin:20px 0;list-style:none;text-align:center}.pager:after,.pager:before{content:" ";display:table}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#999;background-color:#fff;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.label[href]:focus,.label[href]:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.label-default{background-color:#999}.label-default[href]:focus,.label-default[href]:hover{background-color:gray}.label-primary{background-color:#428bca}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;color:#fff;line-height:1;vertical-align:baseline;white-space:nowrap;text-align:center;background-color:#999;border-radius:10px}.badge:empty{display:none}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.btn .badge{position:relative;top:-1px}.nav-pills>.active>a>.badge,a.list-group-item.active>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;font-size:21px;font-weight:200;line-height:2.1428571435;color:inherit;background-color:#eee}.jumbotron h1{line-height:1;color:inherit}.jumbotron p{line-height:1.4}.container .jumbotron{border-radius:6px}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-left:60px;padding-right:60px}.jumbotron h1{font-size:63px}}.thumbnail{display:block;margin-bottom:20px}.thumbnail>img{display:block;max-width:100%;height:auto;margin-left:auto;margin-right:auto}.thumbnail .caption{padding:9px;color:#333}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#428bca}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:6px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable{padding-right:35px}.alert-dismissable .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#468847}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#356635}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#3a87ad}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#2d6987}.alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#c09853}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#a47e3c}.alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#b94a48}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#953b39}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:6px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar{background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(.25,rgba(255,255,255,.15)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.15)),color-stop(.75,rgba(255,255,255,.15)),color-stop(.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:40px 40px}.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(.25,rgba(255,255,255,.15)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.15)),color-stop(.75,rgba(255,255,255,.15)),color-stop(.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(.25,rgba(255,255,255,.15)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.15)),color-stop(.75,rgba(255,255,255,.15)),color-stop(.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(.25,rgba(255,255,255,.15)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.15)),color-stop(.75,rgba(255,255,255,.15)),color-stop(.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(.25,rgba(255,255,255,.15)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.15)),color-stop(.75,rgba(255,255,255,.15)),color-stop(.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:6px;border-top-left-radius:6px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:6px;border-bottom-left-radius:6px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover{text-decoration:none;background-color:#f5f5f5}a.list-group-item.active,a.list-group-item.active:focus,a.list-group-item.active:hover{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}a.list-group-item.active .list-group-item-heading,a.list-group-item.active:focus .list-group-item-heading,a.list-group-item.active:hover .list-group-item-heading{color:inherit}a.list-group-item.active .list-group-item-text,a.list-group-item.active:focus .list-group-item-text,a.list-group-item.active:hover .list-group-item-text{color:#e1edf7}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:6px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-body:after,.panel-body:before{content:" ";display:table}.panel-body:after{clear:both}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0}.panel>.list-group .list-group-item:first-child{border-top-right-radius:0;border-top-left-radius:0}.panel>.list-group .list-group-item:last-child{border-bottom:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.table,.panel>.table-responsive{margin-bottom:0}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:last-child>td,.panel>.table-bordered>thead>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:last-child>td,.panel>.table-responsive>.table-bordered>thead>tr:last-child>th{border-bottom:0}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:5px;border-top-left-radius:5px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.panel-group .panel{margin-bottom:0;border-radius:6px;overflow:hidden}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse .panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-default>.panel-heading>.dropdown .caret{border-color:#333 transparent}.panel-default>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse .panel-body{border-top-color:#428bca}.panel-primary>.panel-heading>.dropdown .caret{border-color:#fff transparent}.panel-primary>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse .panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading>.dropdown .caret{border-color:#468847 transparent}.panel-success>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#d6e9c6}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#c09853;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse .panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading>.dropdown .caret{border-color:#c09853 transparent}.panel-warning>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#b94a48;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse .panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading>.dropdown .caret{border-color:#b94a48 transparent}.panel-danger>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ebccd1}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse .panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading>.dropdown .caret{border-color:#3a87ad transparent}.panel-info>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#bce8f1}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:6px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{display:none;overflow:auto;overflow-y:scroll;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040}.modal.fade .modal-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)}.modal-dialog{position:relative;margin-left:auto;margin-right:auto;width:auto;padding:10px;z-index:1050}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1030;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5;min-height:16.428571429px}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.428571429}.modal-body{position:relative;padding:20px}.modal-footer{margin-top:15px;padding:19px 20px 20px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer:after,.modal-footer:before{content:" ";display:table}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}@media screen and (min-width:768px){.modal-dialog{width:600px;padding-top:30px;padding-bottom:30px}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}}.tooltip{position:absolute;z-index:1030;display:block;visibility:visible;font-size:12px;line-height:1.4;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:6px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;right:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top .arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right .arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom .arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom .arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left .arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.carousel{position:relative}.carousel-inner{position:relative;overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{display:block;max-width:100%;height:auto;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:.5;filter:alpha(opacity=50);font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-control.left{background-image:-webkit-gradient(linear,0 top,100% top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.5) 0),color-stop(rgba(0,0,0,.0001) 100%));background-image:-moz-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-gradient(linear,0 top,100% top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.0001) 0),color-stop(rgba(0,0,0,.5) 100%));background-image:-moz-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #fff;border-radius:10px;cursor:pointer;background-color:#000 \9;background-color:transparent}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#fff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicons-chevron-left,.carousel-control .glyphicons-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-15px;margin-left:-15px;font-size:30px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:after,.clearfix:before{content:" ";display:table}.clearfix:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs,td.visible-lg,td.visible-md,td.visible-sm,td.visible-xs,th.visible-lg,th.visible-md,th.visible-sm,th.visible-xs,tr.visible-lg,tr.visible-md,tr.visible-sm,tr.visible-xs{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-xs.visible-sm{display:block!important}tr.visible-xs.visible-sm{display:table-row!important}td.visible-xs.visible-sm,th.visible-xs.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:767px){.visible-xs.visible-md{display:block!important}tr.visible-xs.visible-md{display:table-row!important}td.visible-xs.visible-md,th.visible-xs.visible-md{display:table-cell!important}}@media (min-width:768px){.visible-xs.visible-lg{display:block!important}tr.visible-xs.visible-lg{display:table-row!important}td.visible-xs.visible-lg,th.visible-xs.visible-lg{display:table-cell!important}}@media (max-width:767px){.visible-sm.visible-xs{display:block!important}tr.visible-sm.visible-xs{display:table-row!important}td.visible-sm.visible-xs,th.visible-sm.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:767px){.visible-sm.visible-md{display:block!important}tr.visible-sm.visible-md{display:table-row!important}td.visible-sm.visible-md,th.visible-sm.visible-md{display:table-cell!important}}@media (min-width:768px){.visible-sm.visible-lg{display:block!important}tr.visible-sm.visible-lg{display:table-row!important}td.visible-sm.visible-lg,th.visible-sm.visible-lg{display:table-cell!important}}@media (max-width:767px){.visible-md.visible-xs{display:block!important}tr.visible-md.visible-xs{display:table-row!important}td.visible-md.visible-xs,th.visible-md.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-md.visible-sm{display:block!important}tr.visible-md.visible-sm{display:table-row!important}td.visible-md.visible-sm,th.visible-md.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:767px){.visible-md{display:block!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:768px){.visible-md.visible-lg{display:block!important}tr.visible-md.visible-lg{display:table-row!important}td.visible-md.visible-lg,th.visible-md.visible-lg{display:table-cell!important}}@media (max-width:767px){.visible-lg.visible-xs{display:block!important}tr.visible-lg.visible-xs{display:table-row!important}td.visible-lg.visible-xs,th.visible-lg.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-lg.visible-sm{display:block!important}tr.visible-lg.visible-sm{display:table-row!important}td.visible-lg.visible-sm,th.visible-lg.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:767px){.visible-lg.visible-md{display:block!important}tr.visible-lg.visible-md{display:table-row!important}td.visible-lg.visible-md,th.visible-lg.visible-md{display:table-cell!important}}@media (min-width:768px){.visible-lg{display:block!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}.hidden-xs{display:block!important}tr.hidden-xs{display:table-row!important}td.hidden-xs,th.hidden-xs{display:table-cell!important}@media (max-width:767px){.hidden-xs,td.hidden-xs,th.hidden-xs,tr.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-xs.hidden-sm,td.hidden-xs.hidden-sm,th.hidden-xs.hidden-sm,tr.hidden-xs.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:767px){.hidden-xs.hidden-md,td.hidden-xs.hidden-md,th.hidden-xs.hidden-md,tr.hidden-xs.hidden-md{display:none!important}}@media (min-width:768px){.hidden-xs.hidden-lg,td.hidden-xs.hidden-lg,th.hidden-xs.hidden-lg,tr.hidden-xs.hidden-lg{display:none!important}}.hidden-sm{display:block!important}tr.hidden-sm{display:table-row!important}td.hidden-sm,th.hidden-sm{display:table-cell!important}@media (max-width:767px){.hidden-sm.hidden-xs,td.hidden-sm.hidden-xs,th.hidden-sm.hidden-xs,tr.hidden-sm.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm,td.hidden-sm,th.hidden-sm,tr.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:767px){.hidden-sm.hidden-md,td.hidden-sm.hidden-md,th.hidden-sm.hidden-md,tr.hidden-sm.hidden-md{display:none!important}}@media (min-width:768px){.hidden-sm.hidden-lg,td.hidden-sm.hidden-lg,th.hidden-sm.hidden-lg,tr.hidden-sm.hidden-lg{display:none!important}}.hidden-md{display:block!important}tr.hidden-md{display:table-row!important}td.hidden-md,th.hidden-md{display:table-cell!important}@media (max-width:767px){.hidden-md.hidden-xs,td.hidden-md.hidden-xs,th.hidden-md.hidden-xs,tr.hidden-md.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-md.hidden-sm,td.hidden-md.hidden-sm,th.hidden-md.hidden-sm,tr.hidden-md.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:767px){.hidden-md,td.hidden-md,th.hidden-md,tr.hidden-md{display:none!important}}@media (min-width:768px){.hidden-md.hidden-lg,td.hidden-md.hidden-lg,th.hidden-md.hidden-lg,tr.hidden-md.hidden-lg{display:none!important}}.hidden-lg{display:block!important}tr.hidden-lg{display:table-row!important}td.hidden-lg,th.hidden-lg{display:table-cell!important}@media (max-width:767px){.hidden-lg.hidden-xs,td.hidden-lg.hidden-xs,th.hidden-lg.hidden-xs,tr.hidden-lg.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-lg.hidden-sm,td.hidden-lg.hidden-sm,th.hidden-lg.hidden-sm,tr.hidden-lg.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:767px){.hidden-lg.hidden-md,td.hidden-lg.hidden-md,th.hidden-lg.hidden-md,tr.hidden-lg.hidden-md{display:none!important}}@media (min-width:768px){.hidden-lg,td.hidden-lg,th.hidden-lg,tr.hidden-lg{display:none!important}}.visible-print,td.visible-print,th.visible-print,tr.visible-print{display:none!important}@media print{.visible-print{display:block!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}.hidden-print,td.hidden-print,th.hidden-print,tr.hidden-print{display:none!important}}#sidebar-nav>li>a>i{background-color:#999;border-radius:100%;color:transparent;cursor:pointer;display:inline-block;font:0/0 Arial;height:12px;letter-spacing:0;padding:0;margin:0;position:absolute;top:8px;right:4px;vertical-align:middle;width:12px}#sidebar-nav>li>a>i:before{border:1px solid #fff;content:" ";display:block;height:0;left:50%;margin-left:-3px;margin-top:-1px;position:absolute;top:50%;width:6px}#sidebar-nav>li>a>i:after{border:1px solid #fff;content:" ";display:block;height:6px;left:50%;margin-left:-1px;margin-top:-3px;position:absolute;top:50%;width:0}#sidebar-nav>li>a.active>i:after{display:none}.css-sprite ul{height:24px;width:auto;margin:-5px 0 0}.css-sprite-amex,.css-sprite-discover,.css-sprite-mc,.css-sprite-visa,.css-sprite-visa-gift-card{background-image:url(//0.ecom.attccc.com/styles/att/assets3.2.0/images/cc-images-sprite.png?build_date=1429672365397);background-repeat:no-repeat;background-size:164px 48px;width:38px;height:24px;display:inline-block}@media \0screen\,screen\8{.css-sprite-amex,.css-sprite-discover,.css-sprite-mc,.css-sprite-visa,.css-sprite-visa-gift-card{background-image:url(//0.ecom.attccc.com/styles/att/assets3.2.0/images/cc-images-sprite-ie8.png?build_date=1429672365397)}}.css-sprite-mc{background-position:0 -24px}.css-sprite-visa{background-position:-42px -24px}.css-sprite-amex{background-position:-84px -24px}.css-sprite-discover{background-position:-126px -24px}.css-sprite-visa-gift-card{background-position:-168px -24px}.show-mc .css-sprite-mc{background-position:0 0}.show-visa .css-sprite-visa{background-position:-42px 0}.show-amex .css-sprite-amex{background-position:-84px 0}.show-discover .css-sprite-discover{background-position:-126px 0}.show-visa-gift-card .css-sprite-visa-gift-card{background-position:-168px 0}.cvc-amex img,.cvc-cc img{margin:10px -8px 0 0} \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/ebz/sandbox/styles/btn.css b/ecomp-portal-BE/war/static/ebz/sandbox/styles/btn.css
deleted file mode 100644
index a02b8033..00000000
--- a/ecomp-portal-BE/war/static/ebz/sandbox/styles/btn.css
+++ /dev/null
@@ -1 +0,0 @@
-@charset "UTF-8";address,blockquote,dd,h1,h2,h3,h4,h5,h6,ol,p,pre,table,ul{margin:0;padding:0;margin-bottom:24px;margin-bottom:1.5rem}html{font-size:1em;line-height:1.5}body{margin:0}h1{font-size:48px;font-size:3rem;line-height:1}h2{font-size:36px;font-size:2.25rem;line-height:1.3333333333}h3{font-size:30px;font-size:1.875rem;line-height:1.6}h4{font-size:24px;font-size:1.5rem;line-height:1}h5{font-size:20px;font-size:1.25rem;line-height:1.2}h6{font-size:18px;font-size:1.125rem;line-height:1.3333333333}dd,ol,ul{margin-left:48px;margin-left:3rem}li>ol,li>ul{margin-bottom:0}code,kbd,pre,samp{font-family:monospace,monospace}blockquote{text-indent:-.41em;quotes:"“" "â€";margin-left:48px;margin-left:3rem}blockquote p:before{content:"“";content:open-quote}blockquote p:after{content:"";content:no-close-quote}blockquote p:last-of-type:after{content:"â€";content:close-quote}q{quotes:"‘" "’" "“" "â€"}q:before{content:"‘";content:open-quote}q:after{content:"’";content:close-quote}q q:before{content:"“";content:open-quote}q q:after{content:"â€";content:close-quote}q:first-child{display:inline-block;text-indent:-.22em}table{width:100%;border-collapse:collapse;border-spacing:0}td,th{padding:12px}#grid{position:absolute;top:0;left:50%;width:980px;margin-left:-490px;counter-reset:section;z-index:9999!important;pointer-events:none;outline:1px solid rgba(0,206,209,.1)}#grid:after{position:fixed;top:0;left:0;content:'Column: 20px Gutter: 20px Margin: 20px';display:block;max-width:90px;padding:3px;background-color:#000;color:#fff;font-size:10px;font-family:monospace;z-index:9999}#grid div.vert{width:20px;outline:solid rgba(0,206,209,.3);outline-width:1px;margin-right:20px;position:relative;background:rgba(255,0,0,.05);counter-increment:section}#grid div.vert.first-line{margin-left:20px}#grid div.vert::after{position:fixed;display:block;text-align:center;color:#fff;width:20px;content:counter(section);top:5px;font-size:8px;font-family:monospace}#grid div.vert:nth-child(24){position:absolute;top:0;right:0}#grid div.vert:nth-child(1),#grid div.vert:nth-child(10),#grid div.vert:nth-child(11),#grid div.vert:nth-child(12),#grid div.vert:nth-child(13),#grid div.vert:nth-child(14),#grid div.vert:nth-child(15),#grid div.vert:nth-child(16),#grid div.vert:nth-child(17),#grid div.vert:nth-child(18),#grid div.vert:nth-child(19),#grid div.vert:nth-child(2),#grid div.vert:nth-child(20),#grid div.vert:nth-child(21),#grid div.vert:nth-child(22),#grid div.vert:nth-child(23),#grid div.vert:nth-child(24),#grid div.vert:nth-child(3),#grid div.vert:nth-child(4),#grid div.vert:nth-child(5),#grid div.vert:nth-child(6),#grid div.vert:nth-child(7),#grid div.vert:nth-child(8),#grid div.vert:nth-child(9){display:inline-block!important}#grid div.vert:nth-child(25),#grid div.vert:nth-child(26),#grid div.vert:nth-child(27),#grid div.vert:nth-child(28),#grid div.vert:nth-child(29),#grid div.vert:nth-child(30),#grid div.vert:nth-child(31){display:none!important}#grid div.horiz{height:10px;border-bottom:1px dotted rgba(100,100,100,.2);margin:0;padding:0}.bg-prime-blue{background-color:#067ab4}.bg-secondary-gray{background-color:#666}.bg-light-blue{background-color:#bcc9d5}.bg-dark-gray{background-color:#444}.bg-dusty-blue{background-color:#97b1cf}.bg-warm-gray{background-color:#cccb9b}.bg-taupe{background-color:#cccb6c}.bg-green-highlight{background-color:#c4d63f}.bg-lime-highlight{background-color:#dad632}.bg-purple-highlight{background-color:#b6539c}.bg-magenta{background-color:#d71481}.bg-blue-highlight{background-color:#4cc8f3}.bg-ochre{background-color:#fab230}.bg-green{background-color:#4fa721}.bg-lime{background-color:#b6bd26}.bg-purple{background-color:#7f0e7c}.bg-burgundy{background-color:#b1103e}.bg-dark-blue{background-color:#0e2875}.bg-gold{background-color:#fd9827}.bg-teal{background-color:#20c6b2}.bg-mint-green{background-color:#9cfecd}.bg-yellow{background-color:#feed35}.bg-white{background-color:#fff}.alt.inline-list>li{display:inline-block;zoom:1;*display:inline;*vertical-align:auto;vertical-align:middle;float:none}.text-upper{text-transform:uppercase!important}body{font-family:arial}.font-showcase h1,.font-showcase h2,.font-showcase h3,.font-showcase h4,.font-showcase h5,.font-showcase h6{font-weight:100;letter-spacing:-1px;margin:10px 0;-webkit-font-smoothing:antialiased}.font-showcase h1{font-family:omnes_att_light;font-size:48px;font-size:3rem;line-height:48px}.font-showcase h2,.price{font-family:omnes_att_light;font-size:36px;font-size:2.25rem;line-height:36px}.font-showcase h3{font-family:arial;font-size:24px;font-size:1.5rem;line-height:28px}.font-showcase h4,.font-showcase h4.font-showcase-font-example,.font-showcase h4.font-showcase-font-name{font-family:arial;font-size:18px;font-size:1.125rem;line-height:22px;-webkit-font-smoothing:antialiased}.font-showcase h5{font-family:arial;font-size:14px;font-size:.875rem;line-height:20px;-webkit-font-smoothing:antialiased}.font-showcase h6{font-family:arial;font-size:11px;font-size:.6875rem;line-height:30px;font-weight:100;-webkit-font-smoothing:antialiased}.body-copy,.font-showcase p{font-family:arial;font-size:14px;font-size:.875rem;line-height:20px;-webkit-font-smoothing:antialiased}.body-copy-short{font-family:arial;font-size:12px;font-size:.75rem;line-height:15px;-webkit-font-smoothing:antialiased}p [class*=icon]{display:inline-block;vertical-align:middle;margin-top:-4px}.details-label{display:block;font-family:arial;font-size:11px;font-size:.6875rem;line-height:15px}.details-label+.price{line-height:28px}.price{letter-spacing:-1px;-webkit-font-smoothing:antialiased}.price sup{font-size:18px;font-size:1.125rem;vertical-align:baseline;top:-11px;margin:0 2px}.price-alt{font-size:24px;font-size:1.5rem;line-height:24px}.price-alt sup{font-size:12px;font-size:.75rem;top:-8px}.promo-tagline{font-family:omnes_att_medium_italic;font-size:16px;font-size:1rem;line-height:20px;display:inline-block;margin-bottom:5px;-webkit-font-smoothing:antialiased}.promo-text{font-family:clearview_att_italic;font-size:12px;font-size:.75rem;line-height:15px;display:inline-block;margin-bottom:5px;-webkit-font-smoothing:antialiased}.divider,.divider-dark,hr{border:0;border-bottom:1px solid #d3d3d3}.divider-light{border-color:#e5e5e5}dl{font-family:arial;color:#444;font-size:12px;font-size:.75rem}dt{font-family:arial;font-size:11px;font-size:.6875rem;display:block!important;margin:10px 0 5px!important;width:auto!important;text-transform:uppercase}dt a{font-family:arial;color:#067ab4;text-transform:none}dd{display:inline!important;line-height:20px}[data-highlight]{background-color:#c9e9f9;-webkit-animation:highlight-fade 3s infinite}@-webkit-keyframes highlight-fade{100%,80%{background-color:transparent}}.button--group{vertical-align:baseline;zoom:1;*display:inline;*vertical-align:auto;display:inline-block;margin-bottom:20px}.button--group .btn{margin-bottom:10px}.bg-light-gray .button,.button{display:inline-block;zoom:1;*display:inline;*vertical-align:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:background-color .3s ease-out;-moz-transition:background-color .3s ease-out;transition:background-color .3s ease-out;font-size:18px;font-size:1.125rem;vertical-align:middle;line-height:1;text-align:center;cursor:pointer;padding:11px 30px;background-color:#888;color:#f2f2f2;border-radius:6px;position:relative;border:0;text-decoration:none;letter-spacing:0;font-family:arial}.bg-light-gray .button:hover,.button:hover{background-color:#666;color:#f2f2f2}.bg-light-gray .button:focus,.button:focus{outline:1px solid #39b1ec!important;outline-offset:2px;text-decoration:none}.bg-light-gray .button:active,.button:active{-webkit-transition:background-color 0;-moz-transition:background-color 0;transition:background-color 0;background-color:#bbb;box-shadow:none;color:#f2f2f2}.bg-light-gray .button:visited,.button:visited{color:#fff}.lt-ie9 .bg-light-gray .button,.lt-ie9 .button{min-width:64px}.bg-light-gray .button [class*=icon-],.button [class*=icon-]{display:inline-block;vertical-align:middle}.button--small,[class*=bg-] .button--small{font-size:14px;font-size:.875rem;height:30px;padding:8px 20px}.lt-ie9 .button--small,.lt-ie9 [class*=bg-] .button--small{min-width:85px}.button--disabled,.button:disabled,.button[disabled]{background-color:#d3d3d3;color:#888!important;pointer-events:none;cursor:not-allowed!important}.buttons-dropdown--large .button--disabled,.buttons-dropdown--small .button--disabled{cursor:not-allowed!important;pointer-events:all!important;background-color:#d3d3d3!important}.button--square{border-radius:0;padding-left:15px;padding-right:15px}.button--primary{background-color:#0574AC!important;min-width:100px}.button--primary:hover{background-color:#0091d9!important}.button--primary:active{background-color:#44c8f5!important;color:#fff}.button--primary:focus{color:#fff}.bg-prime-blue .button.button--primary{background-color:#fafafa!important;color:#067ab4;min-width:100px}.bg-prime-blue .button.button--primary:hover{background-color:#CAE0EB!important;color:#067ab4}.bg-prime-blue .button.button--primary:active{background-color:#1792D6!important;color:#fff}.bg-prime-blue .button.button--primary.button--inactive,.bg-prime-blue .button.button--primary:disabled{background-color:#d3d3d3!important;color:#888;cursor:not-allowed!important}.bg-prime-blue .button.button--primary:focus{outline:1px solid #99C4D9!important;outline-offset:2px}.button.button--secondary{background:#fff;border:1px solid #157BB2;color:#067ab4}.button.button--secondary:hover{background:#F7F7F7;border-color:#0091d9;color:#0091d9}.button.button--secondary:active{background:#E5E5E5;border-color:#0574AC;color:#0574AC}.button--hero{background-color:#ef6f00!important;min-width:100px!important;height:40px;overflow:hidden}.button--hero .button--hero__inner{height:60px;-webkit-transition:width 1s,height 1s,-webkit-transform .2s;-moz-transition:width 1s,height 1s,-moz-transform .2s}.button--hero .button--hero__inner [class*=icon-]{line-height:40px;display:block}.button--hero:hover>.button--hero__inner{-webkit-transform:translate(0px,-29px);-moz-transform:translate(0px,-29px);transform:translate(0px,-29px)}.button--hero:active>.button--hero__inner{-webkit-transform:translate(0px,0);-moz-transform:translate(0px,0);transform:translate(0px,0)}.button--hero:hover{background-color:#ef6f00!important}.button--hero:active{background-color:#fcb314!important;color:#fff}.button--hero:focus{color:#fff}.bg-secondary-gray .button.button--secondary:focus{outline:1px solid #BDBDBD!important;outline-offset:2px}.bg-secondary-gray .button.button--secondary:disabled{color:#f2f2f2}.button--icon{font-size:14px;font-size:.875rem;width:30px;height:30px;border-radius:50%;font-family:atticons;line-height:30px;min-width:0;padding:0}.button--icon [class^=icon-]{vertical-align:baseline}.button--large.button--icon{font-size:28px;font-size:1.75rem;width:40px;height:40px;line-height:40px}.button--inactive{background-color:#ddd!important;color:#999!important;cursor:not-allowed!important;min-width:100px}.bg-secondary-gray .button{background-color:#fff}.bg-secondary-gray .button:hover{background-color:#F7F7F7}.bg-secondary-gray .button.button--inactive,.bg-secondary-gray .button:active,.bg-secondary-gray .button:disabled{background-color:#E5E5E5;cursor:not-allowed;pointer-events:all}.bg-light-blue .button{background-color:#626870}.bg-light-blue .button:hover{background-color:#8a939c}.bg-light-blue .button.button--inactive,.bg-light-blue .button:active,.bg-light-blue .button:disabled{background-color:#d7dfe6;cursor:not-allowed;pointer-events:all}.bg-dark-gray .button{background-color:#fff}.bg-dark-gray .button:hover{background-color:#f4f4f4}.bg-dark-gray .button.button--inactive,.bg-dark-gray .button:active,.bg-dark-gray .button:disabled{background-color:#E5E5E5;cursor:not-allowed;pointer-events:all}.bg-dusty-blue .button{background-color:#4e5c6b}.bg-dusty-blue .button:hover{background-color:#6f8298}.bg-dusty-blue .button.button--inactive,.bg-dusty-blue .button:active,.bg-dusty-blue .button:disabled{background-color:#c0d0e2;cursor:not-allowed;pointer-events:all}.bg-warm-gray .button{background-color:#6a6950}.bg-warm-gray .button:hover{background-color:#969572}.bg-warm-gray .button.button--inactive,.bg-warm-gray .button:active,.bg-warm-gray .button:disabled{background-color:#e0dfc3;cursor:not-allowed;pointer-events:all}.bg-taupe .button{background-color:#6a6938}.bg-taupe .button:hover{background-color:#96954f}.bg-taupe .button.button--inactive,.bg-taupe .button:active,.bg-taupe .button:disabled{background-color:#e0dfa6;cursor:not-allowed;pointer-events:all}.bg-green-highlight .button{background-color:#666f20}.bg-green-highlight .button:hover{background-color:#909c2e}.bg-green-highlight .button.button--inactive,.bg-green-highlight .button:active,.bg-green-highlight .button:disabled{background-color:#dce787;cursor:not-allowed;pointer-events:all}.bg-lime-highlight .button{background-color:#726f17}.bg-lime-highlight .button:hover{background-color:#a19c23}.bg-lime-highlight .button.button--inactive,.bg-lime-highlight .button:active,.bg-lime-highlight .button:disabled{background-color:#e9e678;cursor:not-allowed;pointer-events:all}.bg-purple-highlight .button{background-color:#49213e}.bg-purple-highlight .button:hover{background-color:#7a3768}.bg-purple-highlight .button.button--inactive,.bg-purple-highlight .button:active,.bg-purple-highlight .button:disabled{background-color:#d397c4;cursor:not-allowed;pointer-events:all}.bg-magenta .button{background-color:#560333}.bg-magenta .button:hover{background-color:#8f0956}.bg-magenta .button.button--inactive,.bg-magenta .button:active,.bg-magenta .button:disabled{background-color:#eb82bf;cursor:not-allowed;pointer-events:all}.bg-blue-highlight .button{background-color:#27687e}.bg-blue-highlight .button:hover{background-color:#3893b2}.bg-blue-highlight .button.button--inactive,.bg-blue-highlight .button:active,.bg-blue-highlight .button:disabled{background-color:#92def7;cursor:not-allowed;pointer-events:all}.bg-ochre .button{background-color:#825c17}.bg-ochre .button:hover{background-color:#b88222}.bg-ochre .button.button--inactive,.bg-ochre .button:active,.bg-ochre .button:disabled{background-color:#fcd079;cursor:not-allowed;pointer-events:all}.bg-green .button{background-color:#1f430a}.bg-green .button:hover{background-color:#357014}.bg-green .button.button--inactive,.bg-green .button:active,.bg-green .button:disabled{background-color:#96c278;cursor:not-allowed;pointer-events:all}.bg-lime .button{background-color:#5f620f}.bg-lime .button:hover{background-color:#797e16}.bg-lime .button.button--inactive,.bg-lime .button:active,.bg-lime .button:disabled{background-color:#cacd74;cursor:not-allowed;pointer-events:all}.bg-purple .button{background-color:#c149be}.bg-purple .button:hover{background-color:#d259cf}.bg-purple .button.button--inactive,.bg-purple .button:active,.bg-purple .button:disabled{background-color:#ae71ad;cursor:not-allowed;pointer-events:all}.bg-burgundy .button{background-color:#e84575}.bg-burgundy .button:hover{background-color:#f65383}.bg-burgundy .button.button--inactive,.bg-burgundy .button:active,.bg-burgundy .button:disabled{background-color:#c6758d;cursor:not-allowed;pointer-events:all}.bg-dark-blue .button{background-color:#5b75c2}.bg-dark-blue .button:hover{background-color:#6e88d5}.bg-dark-blue .button.button--inactive,.bg-dark-blue .button:active,.bg-dark-blue .button:disabled{background-color:#7582a8;cursor:not-allowed;pointer-events:all}.bg-gold .button{background-color:#844e0f}.bg-gold .button:hover{background-color:#a96517}.bg-gold .button.button--inactive,.bg-gold .button:active,.bg-gold .button:disabled{background-color:#edba74;cursor:not-allowed;pointer-events:all}.bg-teal .button{background-color:#0b685c}.bg-teal .button:hover{background-color:#159183}.bg-teal .button.button--inactive,.bg-teal .button:active,.bg-teal .button:disabled{background-color:#1aab9a;cursor:not-allowed;pointer-events:all}.bg-mint-green .button{background-color:#51846a}.bg-mint-green .button:hover{background-color:#72ba97}.bg-mint-green .button.button--inactive,.bg-mint-green .button:active,.bg-mint-green .button:disabled{background-color:#88dcb2;cursor:not-allowed;pointer-events:all}.bg-yellow .button{background-color:#847c17}.bg-yellow .button:hover{background-color:#baae24}.bg-yellow .button.button--inactive,.bg-yellow .button:active,.bg-yellow .button:disabled{background-color:#dccd2c;cursor:not-allowed;pointer-events:all}.button--bordered{border:1px solid #d4d4d4}.button__scroll-top-right{position:fixed;top:50%;right:-50px;background:#f2f2f2;border:1px solid #888;border-radius:2px;color:#444;cursor:pointer;padding:7px 58px 7px 11px;z-index:3}.csstransitions .button__scroll-top-right{-webkit-transition:right .3s ease-out;-moz-transition:right .3s ease-out;transition:right .3s ease-out;right:-50px}.button__scroll-top-right.visible{right:20px}.button__scroll-top-right:hover{background:#b2b2b2;color:#000}.button__scroll-top-right:active{background:#0574AC;color:#fff}.button__scroll-top-right .icon-arrow-double-right{-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);font-size:14px}.button__scroll-top{background:#f2f2f2;border:1px solid #888;border-radius:2px;color:#444;cursor:pointer;padding:7px 9px;z-index:3}.csstransitions .button__scroll-top{-webkit-transition:right .3s ease-out;-moz-transition:right .3s ease-out;transition:right .3s ease-out;right:-50px}.button__scroll-top.visible{right:20px}.button__scroll-top:hover{background:#b2b2b2;color:#000}.button__scroll-top:active{background:#0574AC;color:#fff}.button__scroll-top .icon-arrow-double-right{-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);font-size:14px}.button--danger{background-color:#ff6151!important}.button--danger:focus,.button--danger:hover{background-color:#eb4539!important}.button--light,.button--light:focus,.button--light:hover{background-color:#fff!important;color:#666}.button.button--link,[class^=bg-] .button.button--link{background:none!important;min-width:0;padding-left:10px;padding-right:10px}.button--loading{display:inline-block;width:100%}.button--loading i{-webkit-animation-name:loading-item;-webkit-animation-duration:1s;-webkit-animation-timing-function:ease-out;-webkit-animation-iteration-count:infinite;-webkit-transform:scale(0,0);-moz-animation-name:loading-item;-moz-animation-duration:1s;-moz-animation-timing-function:ease-out;-moz-animation-iteration-count:infinite;-moz-transform:scale(0,0);animation-name:loading-item;animation-duration:1s;animation-timing-function:ease-out;animation-iteration-count:infinite;transform:scale(0,0);width:8px;height:8px;background:#000;border-radius:50%;float:right;margin-right:6px}.button--loading__small i{-webkit-animation-name:loading-item;-webkit-animation-duration:1s;-webkit-animation-timing-function:ease-out;-webkit-animation-iteration-count:infinite;-webkit-transform:scale(0,0);-moz-animation-name:loading-item;-moz-animation-duration:1s;-moz-animation-timing-function:ease-out;-moz-animation-iteration-count:infinite;-moz-transform:scale(0,0);animation-name:loading-item;animation-duration:1s;animation-timing-function:ease-out;animation-iteration-count:infinite;transform:scale(0,0);width:5px;height:5px;background:#000;border-radius:50%;float:right;margin-right:4px}@-webkit-keyframes loading-item{0%{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);transform:scale(1,1)}20%{-webkit-transform:scale(0.8,.8);-moz-transform:scale(0.8,.8);transform:scale(0.8,.8)}40%,60%{-webkit-transform:scale(0.6,.6);-moz-transform:scale(0.6,.6);transform:scale(0.6,.6)}80%{-webkit-transform:scale(0.8,.8);-moz-transform:scale(0.8,.8);transform:scale(0.8,.8)}100%{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);transform:scale(1,1)}}i:nth-child(3){-webkit-animation-delay:.8s;-moz-animation-delay:.8s;animation-delay:.8s}i:nth-child(2){-webkit-animation-delay:1s;-moz-animation-delay:1s;animation-delay:1s}i:nth-child(1){-webkit-animation-delay:1.2s;-moz-animation-delay:1.2s;animation-delay:1.2s;margin-right:0}.button-secondary,.button.button-secondary{background-color:#666;color:#f2f2f2}.button-secondary:hover,.button.button-secondary:hover{background-color:#888;color:#f2f2f2}.button-secondary:focus,.button.button-secondary:focus{outline:1px solid #d3d3d3;outline-offset:2px;color:#f2f2f2}.button-secondary:active,.button.button-secondary:active{background-color:#666;color:#f2f2f2}.button-secondary:disabled,.button.button-secondary:disabled{background-color:#d3d3d3;color:#888}.buttons-dropdown--large a{font-size:18px;font-size:1.125rem}.buttons-dropdown--large .buttons-dropdown__split{min-width:inherit;padding:11px 29px}.buttons-dropdown--large .buttons-dropdown__drop{padding:11px 12px;min-width:34px;margin-left:1px!important}.buttons-dropdown--large .buttons-dropdown__drop:after{content:"\e6bf";font-family:atticons;font-size:10px;font-size:.625rem}.buttons-dropdown--large ul{min-width:inherit;top:0;left:100%;margin-left:-34px;margin-top:0;border-top-left-radius:0;overflow:hidden;padding:0;border:1px solid #0091d9}.buttons-dropdown--large ul li{text-align:left}.buttons-dropdown--large ul li a{color:#666;padding:10px;font-size:14px;font-size:.875rem;background:#fff}.buttons-dropdown--large ul li a:hover{background-color:#0091d9;color:#f2f2f2}.buttons-dropdown--small a{font-size:14px;font-size:.875rem;font-size:14px}.buttons-dropdown--small .buttons-dropdown__split{min-width:inherit;padding:8px 20px}.buttons-dropdown--small .buttons-dropdown__drop{padding:8px 12px;min-width:34px;margin-left:1px!important}.buttons-dropdown--small .buttons-dropdown__drop:after{content:"\e6bf";font-family:atticons;font-size:10px;font-size:.625rem}.buttons-dropdown--small ul{min-width:inherit;top:0;left:100%;margin-left:-34px;margin-top:0;border-top-left-radius:0;overflow:hidden;padding:0;border:1px solid #0091d9}.buttons-dropdown--small ul li{text-align:left}.buttons-dropdown--small ul li a{color:#666;padding:6px 10px;font-size:12px;font-size:.75rem;background:#fff}.buttons-dropdown--small ul li a:hover{background-color:#0091d9;color:#f2f2f2}.buttons-dropdown--large .button--secondary.buttons-dropdown__drop,.buttons-dropdown--small .button--secondary.buttons-dropdown__drop{margin-left:-1px!important}.action-dropdown-link,.buttons-dropdown--large.action-dropdown.open a,.buttons-dropdown--small.action-dropdown.open a{border-bottom-right-radius:0;border-bottom-left-radius:0;border-bottom-color:#AAA;z-index:2}.action-dropdown-list,.buttons-dropdown--large.action-dropdown.open ul,.buttons-dropdown--small.action-dropdown.open ul{border-top-left-radius:6px;border-top-right-radius:0;z-index:1}.buttons-dropdown--small.action-dropdown.open a.buttons-dropdown__drop:after{content:'\e6be'}.buttons-dropdown--small.action-dropdown.open ul{margin-left:-118px;margin-left:-117px\9;margin-top:29px;min-width:118px}.buttons-dropdown--large.action-dropdown.open a.buttons-dropdown__drop:after{content:'\e6be'}.buttons-dropdown--large.action-dropdown.open ul{margin-left:-133px;margin-left:-132px\9;margin-top:41px}.buttons-dropdown--large.action-dropdown a.buttons-dropdown__drop.button--primary{border:1px solid #157bb2}.att-btn-dropdown .btn-group{width:53px;min-width:53px;height:30px;min-height:30px}.att-btn-dropdown .dropdown-menu{border-top-right-radius:0;border-top-left-radius:6px}.att-btn-dropdown ul{min-width:130px;top:29px}.att-btn-dropdown ul li{color:#067AB4}.att-btn-dropdown ul li:focus,.att-btn-dropdown ul li:hover{color:#fff;background-color:#067AB4;cursor:pointer}.att-btn-dropdown ul.dots-dropdwn{left:-45px}.att-btn-dropdown ul.actions-dropdwn{left:3px}.att-btn-dropdown .button.button--secondary,.att-btn-dropdown .buttons-dropdown__drop button{color:#067ab4}.att-btn-dropdown button.button.button--secondary.button--small.buttons-dropdown__drop.dropdown-toggle.actions-title{min-width:100px}.att-btn-dropdown div.open .buttons-dropdown__drop:after{content:"\e6be";color:#067AB4}.att-btn-dropdown div.open button{border-bottom-left-radius:0;border-bottom-right-radius:0}.att-btn-dropdown div.open .circle{background:#067AB4}.att-btn-dropdown .circle{background:#067ab4;border-radius:50%;width:3px;height:3px;display:inline-block;margin-left:1px;margin-bottom:1px;margin-top:5px;float:left}.att-btn-dropdown div.circle:nth-child(1){margin-left:0}.att-btn-dropdown div.circle:nth-child(3){margin-right:3px}.expand-line-container{background-color:#fff;float:left;height:30px;position:relative;border-bottom:1px solid #aaa;border-top:1px solid #aaa}.expand-line-container .vertical-line{width:0;float:left;height:20px;margin-top:4px;border-left:1px solid #067AB4}.expand-line-container-active{background-color:#fff;float:left;height:30px;position:relative;border-bottom:1px solid #057ab4;border-top:1px solid #057ab4}.expand-line-container-active .hovered-line{width:0;float:left;height:29px;margin-top:0;border-left:1px solid #057ab4}.split-icon-button-container{position:relative;text-align:initial}.split-icon-button-container .selected-item{background-color:#0091d9!important;color:#f2f2f2!important}.split-icon-button-container .split-icon-button{background-color:#fff;border:1px solid #067AB4;border-radius:3px;float:left;height:30px;width:34px;cursor:pointer}.split-icon-button-container .split-icon-button a{font-size:15px;margin-left:7px;position:relative;top:8px;color:#067AB4}.split-icon-button-container .split-icon-button-middle{border-radius:0;border-left:0;border-right:0}.split-icon-button-container .split-icon-button-left{border-top-right-radius:0;border-bottom-right-radius:0;border-right:0}.split-icon-button-container .split-icon-button-right{border-top-left-radius:0;border-bottom-left-radius:0;border-left:0}.split-icon-button-container .split-icon-button-next-dropdown{border-radius:0;border-left:0;border-right:0;border-bottom-color:#067AB4}.split-icon-button-container .split-icon-button-left-dropdown{border-bottom-color:#057ab4}.split-icon-button-container .split-icon-button-dropdown{border-bottom-right-radius:0;border-bottom-left-radius:0;border-top:1px solid #067AB4;border-right:1px solid #067AB4;border-bottom:0}.split-icon-button-container .icon-with-chevron{width:45px}.split-icon-button-container .icon-dropdown-down,.split-icon-button-container .icon-dropdown-up{font-size:12px;position:relative;top:5px;right:2px;color:#067AB4}.split-icon-button-container .dropdown-menu{position:absolute;top:28px;left:-36px;display:block;min-width:80px;width:80px;border-top-right-radius:0;border-top:0;border-color:#067AB4;overflow:hidden;padding-top:0;padding-bottom:0}.split-icon-button-container .dropdown-menu li{font-family:arial;font-size:12px;color:#666;line-height:30px;margin-left:0}.split-icon-button-container .dropdown-menu li a{color:#666;padding:6px 10px;background:#fff;overflow:hidden;text-overflow:ellipsis;font-size:12px;line-height:30px;font-family:arial;white-space:nowrap;display:block}.split-icon-button-container .dropdown-menu li a:hover{background-color:#0091d9;color:#f2f2f2} \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/ebz/sandbox/styles/demo.css b/ecomp-portal-BE/war/static/ebz/sandbox/styles/demo.css
deleted file mode 100644
index 38519d21..00000000
--- a/ecomp-portal-BE/war/static/ebz/sandbox/styles/demo.css
+++ /dev/null
@@ -1,2 +0,0 @@
-/* AT&T Style Guide Styles */
-.editTNModal{width:624px \9!important;margin:5% auto}.editTNModal .button--disabled,.editTNModal .button--disabled:active,.editTNModal .button--disabled:hover{background-color:#d3d3d3!important}.editTNModal h2{font-weight:400;line-height:36px}.editTNModal h6{line-height:15px;font-size:12px;font-family:arial;font-weight:400;margin-bottom:3px}.editTNModal label{font-size:11px;font-family:arial;margin-bottom:0;font-weight:400}.editTNModal .icon-circle-action-close{font-size:28px}.editTNModal .saveTNs-container button{margin-left:10px}.editTNModal .middleBlock{margin-top:89px}.editTNModal .editSettings{width:85% \9}.editTNModal .editSettings label{font-family:omnes_att_bold}.editTNModal .editSettings .ng-isolate-scope{position:relative}.editTNModal .editSettings .save-cnam-lidb button{margin-left:10px}.editTNModal .editSettings .col-md-16{width:68% \9}.editTNModal .size-threefourth{width:75%}.editTNModal .alt-rows{height:293px;background:#fff;border:1px solid #BBB;margin-left:0;border-radius:5px;overflow-x:hidden;overflow-y:auto}.editTNModal .alt-rows li.even{background-color:#f2f2f2}.editTNModal .alt-rows li.item-selected{background-color:#0091d9}.editTNModal .alt-rows li.item-selected a{color:#fff}.editTNModal .alt-rows li a{display:block;padding:11px 0 11px 10px;font-size:12px;color:#444;line-height:15px}.editTNModal .alt-rows li a:focus{text-decoration:none}.editTNModal .alt-rows .scroll-viewport{height:100%}.editTNModal .leftBlock button,.editTNModal .rightBlock button{min-width:100%!important;padding:8px 10px;width:100%;margin-left:-1px}.editTNModal .leftBlock .form-field input[type=text],.editTNModal .rightBlock .form-field input[type=text]{border-radius:6px 0 0 6px}.editTNModal .middleBlock button{width:110px}.editTNModal .newCNAM span.text-right{display:block;font-size:11px}.margin-bottom20{margin-bottom:20px}.margin-bottom10{margin-bottom:10px}.margin-bottom30{margin-bottom:30px}.margin-bottom40{margin-bottom:40px}.margin-bottom80{margin-bottom:80px}.drawer{margin-left:20%;margin-right:20%}.drawer .title{font-family:arial;font-size:36px;margin:0;border-top:26px solid #fff}.drawer .containerContent{font-family:arial;font-size:14px;margin:0;margin-top:20px;margin-bottom:25px}.drawer .smallText{font-family:arial;font-size:12px;margin:0;margin-bottom:7px}.drawer .textCount{font-family:arial;font-size:12px;text-align:right;margin-right:42%}.drawer .cancelButton{background-color:#000}.drawer .datepicker1{width:200px;height:40px;margin:0;margin-bottom:5px}.att-drawer{background-color:#fff;box-shadow:0 4px 5px rgba(0,0,0,.2),inset 0 1px rgba(0,0,0,.3);-webkit-box-shadow:0 4px 5px rgba(0,0,0,.2),inset 0 1px rgba(0,0,0,.3);-moz-box-shadow:0 4px 5px rgba(0,0,0,.2),inset 0 1px rgba(0,0,0,.3)}.drawer-backdrop{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(255,255,255,.6);z-index:999}#divider-lines .divider-container{padding:20px 40px;background:#f2f2f2}#divider-lines .divider-container-light{background-color:#fff}#tooltips-and-hints .att-tooltip{z-index:0;margin:0}.popover-packages.att-tooltip{border:0;padding:0}.popover-packages__container{background:#fff}.popover-packages__header{background:#0574ac;height:150px;padding:50px;position:relative;text-align:center;width:100%}.popover-packages__header h3{color:#fff;margin:0}.popover-packages__text-block{background:0 0;overflow:hidden;padding:50px}.popover-packages__text-block-row{float:left;width:100%}.text-block-row__title{float:left;margin-bottom:10px;width:auto}.text-block-row__info{float:right;margin-bottom:10px;width:auto}.popover-packages__text-block-price{float:left;margin-top:30px;width:100%}.text-block-price__title{float:left;font-family:arial;margin-bottom:10px;width:auto}.text-block-price__price{float:right;margin-bottom:10px;position:relative;width:auto}pre.code-preview{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:6px}.popover-demo-container [data-preview-element]{height:auto}.popover-demo{position:relative}.popover-demo.att-popover{max-width:320px}.popover-demo .att-popover-content{display:block!important}.popover-demo .popover-packages__container{background:0 0}.popover-demo .popover-packages__container p{color:#444}.popover-demo .popover-packages__text-block{padding:5px 0 0}.popover-demo .popover-packages__text-block-row p{font-size:12px}.popover-demo hr{border-bottom:1px solid #b2b2b2;margin:10px 0 25px}.price--large{font-size:2.25rem;font-family:omnes_att_light;line-height:36px;word-spacing:2px;letter-spacing:-1px}.price--large sup{font-size:1.125rem;line-height:22px;letter-spacing:0;font-family:omnes_att_light;margin:0 2px;top:-11px;vertical-align:baseline}.price--large sup:nth-child(2):before{clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);content:'.';display:inline;height:1px;overflow:hidden;position:absolute;width:1px}.bg-standard{background-color:#f2f2f2}.margin-top{margin-top:10px} \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/ebz/sandbox/styles/dtpk.css b/ecomp-portal-BE/war/static/ebz/sandbox/styles/dtpk.css
deleted file mode 100644
index eb03f79b..00000000
--- a/ecomp-portal-BE/war/static/ebz/sandbox/styles/dtpk.css
+++ /dev/null
@@ -1,9 +0,0 @@
-/*!
- * Datepicker for Bootstrap
- *
- * Copyright 2012 Stefan Petre
- * Improvements by Andrew Rowls
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */.jshook-return-focus-here{display:block}.datepicker table tr td.days.range.from .day,.datepicker table tr td.days.range.to .day,.range-inherit{color:#fff;background-color:#067ab4}.greyBorder{border-top:solid 1px #d3d3d3}.datepicker{background-color:#fff;padding:0;border-radius:5px;direction:ltr;outline:0;margin:0;width:300px}.datepicker.datepicker-rtl{direction:rtl}.datepicker .weekday{height:21px;margin:0 auto;font-family:arial;font-size:14px;line-height:20px;color:#444}.datepicker .icons-list{margin-top:0;cursor:pointer}.datepicker .icons-list .disabled{color:#d3d3d3;cursor:default}.datepicker table{padding:16px 10px;border-spacing:0;border-collapse:separate;font-family:arial;width:auto;margin:0}.datepicker table th.datepicker-switch{width:198px;font-size:14px;font-weight:400;line-height:20px;padding-bottom:13px;font-family:arial;color:#444;cursor:default!important}.datepicker table th.datepicker-switch.internal{padding-bottom:5px}.datepicker table tr td.days{background-color:#fff;color:#444;font-size:14px;width:32px;text-align:center;overflow:hidden}.datepicker table tr td.days.weekend{background-color:#f2f2f2}.datepicker table tr td.days.weekend.disabled .day:hover{background-color:#f2f2f2!important}.datepicker table tr td.days.disabled{color:#d3d3d3}.datepicker table tr td.days.disabled .day:hover{background-color:#fff;color:#d3d3d3;outline:0;cursor:default}.datepicker table tr td.days .day{width:30px;height:29;display:block;line-height:28px;border-radius:100%}.datepicker table tr td.days .day:hover{background-color:#bbb;color:#444;cursor:pointer;outline:2px solid #bbb;outline-offset:2px;-moz-outline-radius:100%}.datepicker table tr td.days.active{background-color:#067ab4;color:#fff;border-radius:100%}.datepicker table tr td.days.active .day:hover{cursor:default}.datepicker table tr td.days.range{background-color:#44c8f5}.datepicker table tr td.days.range.from{border-radius:20px 0 0 20px}.datepicker table tr td.days.range.from .day:hover{cursor:default}.datepicker table tr td.days.range.to{border-radius:0 20px 20px 0}.datepicker table tr td.days.range.to .day:hover{cursor:default}.datepicker table tr td.days.range .day{color:#444}.datepicker table tr td.days.range .day:hover{background-color:#bbb;color:#444}.datepicker table tr td.days.next-month,.datepicker table tr td.days.prev-month{color:#fff;opacity:0}.datepicker table tr td.days.next-month .day:hover,.datepicker table tr td.days.prev-month .day:hover{background-color:#fff!important;color:#fff;outline:0;cursor:default;opacity:0}.datepicker table tr td.today{color:#444;text-decoration:underline;-moz-text-decoration-color:#444;text-decoration-color:#444}.datepicker .dow{height:23px;width:31px;font-weight:400;position:relative;border-top:solid 1px #bbb;border-bottom:solid 1px #bbb;margin-top:13px}.datepicker .dow .hidden-spoken{display:block;letter-spacing:-6px;overflow:hidden;position:absolute;top:5px;left:17px}.datepicker .due-date:after{border:2px solid #cf2a2a;border-radius:100%;content:" ";display:block;height:30px;left:3px;position:absolute;top:2px;width:30px;text-indent:-9999px;-webkit-box-sizing:content-box!important;-moz-box-sizing:content-box!important;box-sizing:content-box!important}.datepicker .due-date.old:after{visibility:hidden}.datepicker .due-date.active:after{border-color:#fff}.datepicker .due-date.active.focused{color:#0577b2!important}.datepicker .due-date.active.focused:after{border-color:#cf2a2a!important}.datepicker i.legend-due-date{border:1px solid #ccc;height:20px;width:20px;display:inline-block;margin-right:5px;margin-top:4px;position:absolute;left:0;top:0}.datepicker i.legend-due-date:after{border:1px solid #cf2a2a;border-radius:100%;display:block;content:" ";height:16px;left:1px;position:absolute;top:1px;width:16px;text-indent:-9999px}.datepicker .calendar-legend li{position:relative;padding-left:30px;padding-top:5px;margin-bottom:5px;font-weight:400;font-size:12px}.monthpicker table{width:100%}.monthpicker table tr td.days{width:33%;padding:0}.monthpicker .datepicker-switch{padding:0}.monthpicker table tr td.days.active{border-radius:25px}.monthpicker table tr td.days .day{line-height:20px;width:auto;border-radius:25px}.monthpicker table tr td.days .day:hover{border-radius:20px;-moz-outline-radius:20px}.monthpicker .monthtable-condensed{border-spacing:0 5px}.monthpicker .divider td{padding:0}.monthpicker .divider hr{margin:10px 0}.calendar.monthpicker .btnContainer{margin:8px 0}.calendar.monthpicker ul.select2-results.sttings li:last-child{margin-bottom:0}.calendar.monthpicker .btnContainer div{margin:12px 0}.calendar{position:relative;display:inline-block;width:270px}.calendar .box{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;position:relative;zoom:1;vertical-align:middle;display:inline-block}.calendar .box.active{z-index:0}.calendar .box.active input[type=text]{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important;border:solid 1px #067ab4;border-bottom:1px solid lightgrey}.calendar .calendar-icon{cursor:pointer;background:url(images/calendar-icon.png) no-repeat right top;width:30px;z-index:100;height:30px;position:absolute;right:3px;top:5px;background-color:#fff;background-size:30px 30px}.calendar .datepicker-wrapper{height:auto;width:302px;border:solid 1px #067ab4;background:none repeat scroll 0 0 #fff;border-radius:0 0 6px 6px;border-top:1px solid lightgrey;margin-top:-2px;z-index:1000;position:absolute;-webkit-box-shadow:rgba(0,0,0,.25) 0 8px 10px -3px;-moz-box-shadow:rgba(0,0,0,.25) 0 8px 10px -3px;box-shadow:rgba(0,0,0,.25) 0 8px 10px -3px}.calendar .datepicker-wrapper.show-right{right:-301px;border-bottom-left-radius:0!important;border-left:1px solid lightgrey;border-top:solid 1px #067ab4;top:41px}.calendar .datepicker-wrapper.datepicker-wrapper-display-none{display:none}.calendar .select2-results{border-radius:0;margin:0;overflow:hidden}.calendar .select2-result:focus{background:#1792D6!important;color:#fff!important}.calendar .select2-results.options{box-shadow:none}.calendar ul.select2-results.options li:last-child{margin-bottom:0}.calendar ul.select2-results.options li .disabled{color:#a0a0a0}.calendar ul.select2-results.sttings li:last-child{margin-bottom:35px}.btnContainer{line-height:14px;margin:9px 0 0;padding:8px 10px}.btnContainer div{margin-top:35px}.datepicker-inline{width:220px}.datepicker-dropdown{top:0;left:0}.datepicker-dropdown:before{content:" ";display:inline-block;border-left:12px solid transparent;border-right:12px solid transparent;border-bottom:12px solid #ccc;border-top:0;border-bottom-color:rgba(0,0,0,.2);position:absolute}.datepicker-dropdown:after{content:" ";display:inline-block;border-left:12px solid transparent;border-right:12px solid transparent;border-bottom:12px solid #fff;border-top:0;position:absolute}.datepicker-dropdown.datepicker-orient-left:after,.datepicker-dropdown.datepicker-orient-left:before{left:58px}.datepicker-dropdown.datepicker-orient-right:after,.datepicker-dropdown.datepicker-orient-right:before{right:58px}.datepicker-dropdown.datepicker-orient-top:before{top:-13px}.datepicker-dropdown.datepicker-orient-top:after{top:-12px}.datepicker-dropdown.datepicker-orient-bottom:before{bottom:-7px;border-bottom:0;border-top:7px solid #999}.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,.datepicker.months div.datepicker-months,.datepicker.years div.datepicker-years{display:block}.datepicker .next{padding-bottom:13px;background-size:10px 15px;background-position:10px 12px;background-repeat:no-repeat;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAKQWlDQ1BJQ0MgUHJvZmlsZQAASA2dlndUU9kWh8+9N73QEiIgJfQaegkg0jtIFQRRiUmAUAKGhCZ2RAVGFBEpVmRUwAFHhyJjRRQLg4Ji1wnyEFDGwVFEReXdjGsJ7601896a/cdZ39nnt9fZZ+9917oAUPyCBMJ0WAGANKFYFO7rwVwSE8vE9wIYEAEOWAHA4WZmBEf4RALU/L09mZmoSMaz9u4ugGS72yy/UCZz1v9/kSI3QyQGAApF1TY8fiYX5QKUU7PFGTL/BMr0lSkyhjEyFqEJoqwi48SvbPan5iu7yZiXJuShGlnOGbw0noy7UN6aJeGjjAShXJgl4GejfAdlvVRJmgDl9yjT0/icTAAwFJlfzOcmoWyJMkUUGe6J8gIACJTEObxyDov5OWieAHimZ+SKBIlJYqYR15hp5ejIZvrxs1P5YjErlMNN4Yh4TM/0tAyOMBeAr2+WRQElWW2ZaJHtrRzt7VnW5mj5v9nfHn5T/T3IevtV8Sbsz55BjJ5Z32zsrC+9FgD2JFqbHbO+lVUAtG0GQOXhrE/vIADyBQC03pzzHoZsXpLE4gwnC4vs7GxzAZ9rLivoN/ufgm/Kv4Y595nL7vtWO6YXP4EjSRUzZUXlpqemS0TMzAwOl89k/fcQ/+PAOWnNycMsnJ/AF/GF6FVR6JQJhIlou4U8gViQLmQKhH/V4X8YNicHGX6daxRodV8AfYU5ULhJB8hvPQBDIwMkbj96An3rWxAxCsi+vGitka9zjzJ6/uf6Hwtcim7hTEEiU+b2DI9kciWiLBmj34RswQISkAd0oAo0gS4wAixgDRyAM3AD3iAAhIBIEAOWAy5IAmlABLJBPtgACkEx2AF2g2pwANSBetAEToI2cAZcBFfADXALDIBHQAqGwUswAd6BaQiC8BAVokGqkBakD5lC1hAbWgh5Q0FQOBQDxUOJkBCSQPnQJqgYKoOqoUNQPfQjdBq6CF2D+qAH0CA0Bv0BfYQRmALTYQ3YALaA2bA7HAhHwsvgRHgVnAcXwNvhSrgWPg63whfhG/AALIVfwpMIQMgIA9FGWAgb8URCkFgkAREha5EipAKpRZqQDqQbuY1IkXHkAwaHoWGYGBbGGeOHWYzhYlZh1mJKMNWYY5hWTBfmNmYQM4H5gqVi1bGmWCesP3YJNhGbjS3EVmCPYFuwl7ED2GHsOxwOx8AZ4hxwfrgYXDJuNa4Etw/XjLuA68MN4SbxeLwq3hTvgg/Bc/BifCG+Cn8cfx7fjx/GvyeQCVoEa4IPIZYgJGwkVBAaCOcI/YQRwjRRgahPdCKGEHnEXGIpsY7YQbxJHCZOkxRJhiQXUiQpmbSBVElqIl0mPSa9IZPJOmRHchhZQF5PriSfIF8lD5I/UJQoJhRPShxFQtlOOUq5QHlAeUOlUg2obtRYqpi6nVpPvUR9Sn0vR5Mzl/OX48mtk6uRa5Xrl3slT5TXl3eXXy6fJ18hf0r+pvy4AlHBQMFTgaOwVqFG4bTCPYVJRZqilWKIYppiiWKD4jXFUSW8koGStxJPqUDpsNIlpSEaQtOledK4tE20Otpl2jAdRzek+9OT6cX0H+i99AllJWVb5SjlHOUa5bPKUgbCMGD4M1IZpYyTjLuMj/M05rnP48/bNq9pXv+8KZX5Km4qfJUilWaVAZWPqkxVb9UU1Z2qbapP1DBqJmphatlq+9Uuq43Pp893ns+dXzT/5PyH6rC6iXq4+mr1w+o96pMamhq+GhkaVRqXNMY1GZpumsma5ZrnNMe0aFoLtQRa5VrntV4wlZnuzFRmJbOLOaGtru2nLdE+pN2rPa1jqLNYZ6NOs84TXZIuWzdBt1y3U3dCT0svWC9fr1HvoT5Rn62fpL9Hv1t/ysDQINpgi0GbwaihiqG/YZ5ho+FjI6qRq9Eqo1qjO8Y4Y7ZxivE+41smsImdSZJJjclNU9jU3lRgus+0zwxr5mgmNKs1u8eisNxZWaxG1qA5wzzIfKN5m/krCz2LWIudFt0WXyztLFMt6ywfWSlZBVhttOqw+sPaxJprXWN9x4Zq42Ozzqbd5rWtqS3fdr/tfTuaXbDdFrtOu8/2DvYi+yb7MQc9h3iHvQ732HR2KLuEfdUR6+jhuM7xjOMHJ3snsdNJp9+dWc4pzg3OowsMF/AX1C0YctFx4bgccpEuZC6MX3hwodRV25XjWuv6zE3Xjed2xG3E3dg92f24+ysPSw+RR4vHlKeT5xrPC16Il69XkVevt5L3Yu9q76c+Oj6JPo0+E752vqt9L/hh/QL9dvrd89fw5/rX+08EOASsCegKpARGBFYHPgsyCRIFdQTDwQHBu4IfL9JfJFzUFgJC/EN2hTwJNQxdFfpzGC4sNKwm7Hm4VXh+eHcELWJFREPEu0iPyNLIR4uNFksWd0bJR8VF1UdNRXtFl0VLl1gsWbPkRoxajCCmPRYfGxV7JHZyqffS3UuH4+ziCuPuLjNclrPs2nK15anLz66QX8FZcSoeGx8d3xD/iRPCqeVMrvRfuXflBNeTu4f7kufGK+eN8V34ZfyRBJeEsoTRRJfEXYljSa5JFUnjAk9BteB1sl/ygeSplJCUoykzqdGpzWmEtPi000IlYYqwK10zPSe9L8M0ozBDuspp1e5VE6JA0ZFMKHNZZruYjv5M9UiMJJslg1kLs2qy3mdHZZ/KUcwR5vTkmuRuyx3J88n7fjVmNXd1Z752/ob8wTXuaw6thdauXNu5Tnddwbrh9b7rj20gbUjZ8MtGy41lG99uit7UUaBRsL5gaLPv5sZCuUJR4b0tzlsObMVsFWzt3WazrWrblyJe0fViy+KK4k8l3JLr31l9V/ndzPaE7b2l9qX7d+B2CHfc3em681iZYlle2dCu4F2t5czyovK3u1fsvlZhW3FgD2mPZI+0MqiyvUqvakfVp+qk6oEaj5rmvep7t+2d2sfb17/fbX/TAY0DxQc+HhQcvH/I91BrrUFtxWHc4azDz+ui6rq/Z39ff0TtSPGRz0eFR6XHwo911TvU1zeoN5Q2wo2SxrHjccdv/eD1Q3sTq+lQM6O5+AQ4ITnx4sf4H++eDDzZeYp9qukn/Z/2ttBailqh1tzWibakNml7THvf6YDTnR3OHS0/m/989Iz2mZqzymdLz5HOFZybOZ93fvJCxoXxi4kXhzpXdD66tOTSna6wrt7LgZevXvG5cqnbvfv8VZerZ645XTt9nX297Yb9jdYeu56WX+x+aem172296XCz/ZbjrY6+BX3n+l37L972un3ljv+dGwOLBvruLr57/17cPel93v3RB6kPXj/Mejj9aP1j7OOiJwpPKp6qP6391fjXZqm99Oyg12DPs4hnj4a4Qy//lfmvT8MFz6nPK0a0RupHrUfPjPmM3Xqx9MXwy4yX0+OFvyn+tveV0auffnf7vWdiycTwa9HrmT9K3qi+OfrW9m3nZOjk03dp76anit6rvj/2gf2h+2P0x5Hp7E/4T5WfjT93fAn88ngmbWbm3/eE8/syOll+AAAACXBIWXMAAAsTAAALEwEAmpwYAAABPElEQVRIDa3VvWoCQRiFYY0mRS4otelSxFICFilSqTeQOzFWFhYi2IlFOu8qRVD0vOLA8DG/u35wGGdn5tlhR9fu4/euY2qq/kAZKyelqvpmNtj8du2o9lOpQh9ui2l8jD47XCk9OqXlQIu59dUoYAxrhAK+uZWJtningCNln8DcUBEK+K98KAe3MtGCLpVubA4g9ae8KyUoXyW+WkHUgRqvQicx1AfvglqwNRoCW6ExsDFqXw5Afvmn/+IPBD5zUJ3UDgNr8pdy4LMIfkW53XGnhTJLgQ57ZXamrpjmnGNgI4ybhsDGWAhshVmwNeaDNdhKC2fKGcAWz/BJ2Sglp7nWvC8liOn69VC2aod0MgWW/Vtlh78ZiOEijImAPwrPJFbFGAAgFUOrMCAHhtBqDMS+vtgpNVCyB8BEWxf/bU+NW/VoOgAAAABJRU5ErkJggg==)}@media \0screen\,screen\8{.datepicker .next{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAPCAYAAADd/14OAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAMNJREFUeNpiZC3fxAAEykA8CYhbgPg4AxbABMRqQLwBiL2AeCUQG+FSOBWIdaB8WSDeiE0xSGErEL9GEpOBKjZAV3gAiIOwKN6AZBNYIQgcwaJYHog3wxQzIUnAFD9CElOAKjZmZraJRHYKSBEzELshiQkAsToTmudsgDgPTewBEBezoClaB8SiaIp8gfgKEx5FD2GKYJ5xwKLoCRAHwBTBFFZjUeQPxBfQAzwbSedjqKJz2KLwFtSabUAcjk0RCAAEGADBuyhEiJHd4gAAAABJRU5ErkJggg==)}}.datepicker .prev{background-size:10px 15px;background-position:20px 12px;background-repeat:no-repeat;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAKQWlDQ1BJQ0MgUHJvZmlsZQAASA2dlndUU9kWh8+9N73QEiIgJfQaegkg0jtIFQRRiUmAUAKGhCZ2RAVGFBEpVmRUwAFHhyJjRRQLg4Ji1wnyEFDGwVFEReXdjGsJ7601896a/cdZ39nnt9fZZ+9917oAUPyCBMJ0WAGANKFYFO7rwVwSE8vE9wIYEAEOWAHA4WZmBEf4RALU/L09mZmoSMaz9u4ugGS72yy/UCZz1v9/kSI3QyQGAApF1TY8fiYX5QKUU7PFGTL/BMr0lSkyhjEyFqEJoqwi48SvbPan5iu7yZiXJuShGlnOGbw0noy7UN6aJeGjjAShXJgl4GejfAdlvVRJmgDl9yjT0/icTAAwFJlfzOcmoWyJMkUUGe6J8gIACJTEObxyDov5OWieAHimZ+SKBIlJYqYR15hp5ejIZvrxs1P5YjErlMNN4Yh4TM/0tAyOMBeAr2+WRQElWW2ZaJHtrRzt7VnW5mj5v9nfHn5T/T3IevtV8Sbsz55BjJ5Z32zsrC+9FgD2JFqbHbO+lVUAtG0GQOXhrE/vIADyBQC03pzzHoZsXpLE4gwnC4vs7GxzAZ9rLivoN/ufgm/Kv4Y595nL7vtWO6YXP4EjSRUzZUXlpqemS0TMzAwOl89k/fcQ/+PAOWnNycMsnJ/AF/GF6FVR6JQJhIlou4U8gViQLmQKhH/V4X8YNicHGX6daxRodV8AfYU5ULhJB8hvPQBDIwMkbj96An3rWxAxCsi+vGitka9zjzJ6/uf6Hwtcim7hTEEiU+b2DI9kciWiLBmj34RswQISkAd0oAo0gS4wAixgDRyAM3AD3iAAhIBIEAOWAy5IAmlABLJBPtgACkEx2AF2g2pwANSBetAEToI2cAZcBFfADXALDIBHQAqGwUswAd6BaQiC8BAVokGqkBakD5lC1hAbWgh5Q0FQOBQDxUOJkBCSQPnQJqgYKoOqoUNQPfQjdBq6CF2D+qAH0CA0Bv0BfYQRmALTYQ3YALaA2bA7HAhHwsvgRHgVnAcXwNvhSrgWPg63whfhG/AALIVfwpMIQMgIA9FGWAgb8URCkFgkAREha5EipAKpRZqQDqQbuY1IkXHkAwaHoWGYGBbGGeOHWYzhYlZh1mJKMNWYY5hWTBfmNmYQM4H5gqVi1bGmWCesP3YJNhGbjS3EVmCPYFuwl7ED2GHsOxwOx8AZ4hxwfrgYXDJuNa4Etw/XjLuA68MN4SbxeLwq3hTvgg/Bc/BifCG+Cn8cfx7fjx/GvyeQCVoEa4IPIZYgJGwkVBAaCOcI/YQRwjRRgahPdCKGEHnEXGIpsY7YQbxJHCZOkxRJhiQXUiQpmbSBVElqIl0mPSa9IZPJOmRHchhZQF5PriSfIF8lD5I/UJQoJhRPShxFQtlOOUq5QHlAeUOlUg2obtRYqpi6nVpPvUR9Sn0vR5Mzl/OX48mtk6uRa5Xrl3slT5TXl3eXXy6fJ18hf0r+pvy4AlHBQMFTgaOwVqFG4bTCPYVJRZqilWKIYppiiWKD4jXFUSW8koGStxJPqUDpsNIlpSEaQtOledK4tE20Otpl2jAdRzek+9OT6cX0H+i99AllJWVb5SjlHOUa5bPKUgbCMGD4M1IZpYyTjLuMj/M05rnP48/bNq9pXv+8KZX5Km4qfJUilWaVAZWPqkxVb9UU1Z2qbapP1DBqJmphatlq+9Uuq43Pp893ns+dXzT/5PyH6rC6iXq4+mr1w+o96pMamhq+GhkaVRqXNMY1GZpumsma5ZrnNMe0aFoLtQRa5VrntV4wlZnuzFRmJbOLOaGtru2nLdE+pN2rPa1jqLNYZ6NOs84TXZIuWzdBt1y3U3dCT0svWC9fr1HvoT5Rn62fpL9Hv1t/ysDQINpgi0GbwaihiqG/YZ5ho+FjI6qRq9Eqo1qjO8Y4Y7ZxivE+41smsImdSZJJjclNU9jU3lRgus+0zwxr5mgmNKs1u8eisNxZWaxG1qA5wzzIfKN5m/krCz2LWIudFt0WXyztLFMt6ywfWSlZBVhttOqw+sPaxJprXWN9x4Zq42Ozzqbd5rWtqS3fdr/tfTuaXbDdFrtOu8/2DvYi+yb7MQc9h3iHvQ732HR2KLuEfdUR6+jhuM7xjOMHJ3snsdNJp9+dWc4pzg3OowsMF/AX1C0YctFx4bgccpEuZC6MX3hwodRV25XjWuv6zE3Xjed2xG3E3dg92f24+ysPSw+RR4vHlKeT5xrPC16Il69XkVevt5L3Yu9q76c+Oj6JPo0+E752vqt9L/hh/QL9dvrd89fw5/rX+08EOASsCegKpARGBFYHPgsyCRIFdQTDwQHBu4IfL9JfJFzUFgJC/EN2hTwJNQxdFfpzGC4sNKwm7Hm4VXh+eHcELWJFREPEu0iPyNLIR4uNFksWd0bJR8VF1UdNRXtFl0VLl1gsWbPkRoxajCCmPRYfGxV7JHZyqffS3UuH4+ziCuPuLjNclrPs2nK15anLz66QX8FZcSoeGx8d3xD/iRPCqeVMrvRfuXflBNeTu4f7kufGK+eN8V34ZfyRBJeEsoTRRJfEXYljSa5JFUnjAk9BteB1sl/ygeSplJCUoykzqdGpzWmEtPi000IlYYqwK10zPSe9L8M0ozBDuspp1e5VE6JA0ZFMKHNZZruYjv5M9UiMJJslg1kLs2qy3mdHZZ/KUcwR5vTkmuRuyx3J88n7fjVmNXd1Z752/ob8wTXuaw6thdauXNu5Tnddwbrh9b7rj20gbUjZ8MtGy41lG99uit7UUaBRsL5gaLPv5sZCuUJR4b0tzlsObMVsFWzt3WazrWrblyJe0fViy+KK4k8l3JLr31l9V/ndzPaE7b2l9qX7d+B2CHfc3em681iZYlle2dCu4F2t5czyovK3u1fsvlZhW3FgD2mPZI+0MqiyvUqvakfVp+qk6oEaj5rmvep7t+2d2sfb17/fbX/TAY0DxQc+HhQcvH/I91BrrUFtxWHc4azDz+ui6rq/Z39ff0TtSPGRz0eFR6XHwo911TvU1zeoN5Q2wo2SxrHjccdv/eD1Q3sTq+lQM6O5+AQ4ITnx4sf4H++eDDzZeYp9qukn/Z/2ttBailqh1tzWibakNml7THvf6YDTnR3OHS0/m/989Iz2mZqzymdLz5HOFZybOZ93fvJCxoXxi4kXhzpXdD66tOTSna6wrt7LgZevXvG5cqnbvfv8VZerZ645XTt9nX297Yb9jdYeu56WX+x+aem172296XCz/ZbjrY6+BX3n+l37L972un3ljv+dGwOLBvruLr57/17cPel93v3RB6kPXj/Mejj9aP1j7OOiJwpPKp6qP6391fjXZqm99Oyg12DPs4hnj4a4Qy//lfmvT8MFz6nPK0a0RupHrUfPjPmM3Xqx9MXwy4yX0+OFvyn+tveV0auffnf7vWdiycTwa9HrmT9K3qi+OfrW9m3nZOjk03dp76anit6rvj/2gf2h+2P0x5Hp7E/4T5WfjT93fAn88ngmbWbm3/eE8/syOll+AAAACXBIWXMAAAsTAAALEwEAmpwYAAABOElEQVRIDa3WsW7CMBAG4AQoQx+InY2hK1XFwMBEeYG+CenEkKES6tZ2YCNzH4gBCdH/rzjLsRz7THzSL5Lo/CnJKSTlw9tXcUcNseYDaZAKMTUyW/oNYjXyfAtXGnTAvYQSbGGt2WL7VfZTQB8mjkG1lxzCbLTQnKEGE3QWA1Owb6jzEFiiYYfYA5AzcX+POPCCnLtAYrzRSyRWxJ6QExt9oGBrNkSqhbHXBXthLtgbs8EsmIDZMAE5Tc0AftFnpsnFvnKH4utJOkZwg7wrVk3Q84M8hnoJXhEtOkVvEJVLzoYKyKvIgtpgFtQFe6M+0EZr7kSqNagukAbv6Qrh6zJWRPfIOAQSuSD8T9SgfIo+YyB6ktCDBtSifDgqLRhD/zE2pYBdqMHYoH3Rs1dKBsW1DWK+a9jwB9DuTqWp5mUgAAAAAElFTkSuQmCC)}@media \0screen\,screen\8{.datepicker .prev{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAPCAYAAADd/14OAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAALxJREFUeNpiZC3fxIADWAJxDRDnAfFdFhyKjIB4JRDLArEcEAez4FC0EYhloHwdIJ7KhKbIAE0RCLwG4lZkE0E6N2BRFATER5iQFG0GYnlsikAckEJjqCIFJEWPkBXBFPaiKQKBSciKYAqLgfgBmkJQ2NmgKzwLxL5oikFhtw5ZMcwzV6CKHyIpFkVWjByOIMUBQPwEi2IH9AC/AMT+WBRXM2GJwnNQxY+RbMpmwpEoQIrDgXgb1Dm3AAIMALk+J8MvzLwTAAAAAElFTkSuQmCC)}}.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{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;top:100%;left:0;float:left;display:none;margin-top:5px;width:290px;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:5px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;color:#333;font-size:13px;line-height:1.428571429;z-index:1050}.datepicker.dropdown-menu td,.datepicker.dropdown-menu th{padding:4px 5px;display:block;position:relative;float:left}.datepicker .text-left{width:100%}.hidden-spoken,.hidden-text-spoken{position:absolute!important;clip:rect(0 0 0 0)!important;width:1px!important;height:1px!important;padding:0!important;overflow:hidden!important;border:0!important;letter-spacing:0;line-height:0}#dateFilterList .scroll-viewport{height:120px;width:100%}#dateFilterList .scroll-bar.disable+div.scroll-viewport{width:268px}#dateFilterList .scroll-bar{width:6px;background-color:#fff}#dateFilterList .scroll-thumb{width:4px;background-color:#999}#datepickerBody .scroll-bar{right:-8px;width:6px;background-color:#fff}#datepickerBody .scroll-thumb{width:4px;background-color:#999}#datepickerBody .scroll-viewport{height:218px;width:280px}.monthpicker #datepickerBody .scroll-viewport{height:208px} \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/ebz/sandbox/styles/frms.css b/ecomp-portal-BE/war/static/ebz/sandbox/styles/frms.css
deleted file mode 100644
index 6f2cb6b2..00000000
--- a/ecomp-portal-BE/war/static/ebz/sandbox/styles/frms.css
+++ /dev/null
@@ -1 +0,0 @@
-@charset "UTF-8";address,blockquote,dd,h1,h2,h3,h4,h5,h6,ol,p,pre,table,ul{margin:0;padding:0;margin-bottom:24px;margin-bottom:1.5rem}html{font-size:1em;line-height:1.5}body{margin:0}h1{font-size:48px;font-size:3rem;line-height:1}h2{font-size:36px;font-size:2.25rem;line-height:1.3333333333}h3{font-size:30px;font-size:1.875rem;line-height:1.6}h4{font-size:24px;font-size:1.5rem;line-height:1}h5{font-size:20px;font-size:1.25rem;line-height:1.2}h6{font-size:18px;font-size:1.125rem;line-height:1.3333333333}dd,ol,ul{margin-left:48px;margin-left:3rem}li>ol,li>ul{margin-bottom:0}code,kbd,pre,samp{font-family:monospace,monospace}blockquote{text-indent:-.41em;quotes:"“" "â€";margin-left:48px;margin-left:3rem}blockquote p:before{content:"“";content:open-quote}blockquote p:after{content:"";content:no-close-quote}blockquote p:last-of-type:after{content:"â€";content:close-quote}q{quotes:"‘" "’" "“" "â€"}q:before{content:"‘";content:open-quote}q:after{content:"’";content:close-quote}q q:before{content:"“";content:open-quote}q q:after{content:"â€";content:close-quote}q:first-child{display:inline-block;text-indent:-.22em}table{width:100%;border-collapse:collapse;border-spacing:0}td,th{padding:12px}#grid{position:absolute;top:0;left:50%;width:980px;margin-left:-490px;counter-reset:section;z-index:9999!important;pointer-events:none;outline:1px solid rgba(0,206,209,.1)}#grid:after{position:fixed;top:0;left:0;content:'Column: 20px Gutter: 20px Margin: 20px';display:block;max-width:90px;padding:3px;background-color:#000;color:#fff;font-size:10px;font-family:monospace;z-index:9999}#grid div.vert{width:20px;outline:solid rgba(0,206,209,.3);outline-width:1px;margin-right:20px;position:relative;background:rgba(255,0,0,.05);counter-increment:section}#grid div.vert.first-line{margin-left:20px}#grid div.vert::after{position:fixed;display:block;text-align:center;color:#fff;width:20px;content:counter(section);top:5px;font-size:8px;font-family:monospace}#grid div.vert:nth-child(24){position:absolute;top:0;right:0}#grid div.vert:nth-child(1),#grid div.vert:nth-child(10),#grid div.vert:nth-child(11),#grid div.vert:nth-child(12),#grid div.vert:nth-child(13),#grid div.vert:nth-child(14),#grid div.vert:nth-child(15),#grid div.vert:nth-child(16),#grid div.vert:nth-child(17),#grid div.vert:nth-child(18),#grid div.vert:nth-child(19),#grid div.vert:nth-child(2),#grid div.vert:nth-child(20),#grid div.vert:nth-child(21),#grid div.vert:nth-child(22),#grid div.vert:nth-child(23),#grid div.vert:nth-child(24),#grid div.vert:nth-child(3),#grid div.vert:nth-child(4),#grid div.vert:nth-child(5),#grid div.vert:nth-child(6),#grid div.vert:nth-child(7),#grid div.vert:nth-child(8),#grid div.vert:nth-child(9){display:inline-block!important}#grid div.vert:nth-child(25),#grid div.vert:nth-child(26),#grid div.vert:nth-child(27),#grid div.vert:nth-child(28),#grid div.vert:nth-child(29),#grid div.vert:nth-child(30),#grid div.vert:nth-child(31){display:none!important}#grid div.horiz{height:10px;border-bottom:1px dotted rgba(100,100,100,.2);margin:0;padding:0}.bg-prime-blue{background-color:#067ab4}.bg-secondary-gray{background-color:#666}.bg-light-blue{background-color:#bcc9d5}.bg-dark-gray{background-color:#444}.bg-dusty-blue{background-color:#97b1cf}.bg-warm-gray{background-color:#cccb9b}.bg-taupe{background-color:#cccb6c}.bg-green-highlight{background-color:#c4d63f}.bg-lime-highlight{background-color:#dad632}.bg-purple-highlight{background-color:#b6539c}.bg-magenta{background-color:#d71481}.bg-blue-highlight{background-color:#4cc8f3}.bg-ochre{background-color:#fab230}.bg-green{background-color:#4fa721}.bg-lime{background-color:#b6bd26}.bg-purple{background-color:#7f0e7c}.bg-burgundy{background-color:#b1103e}.bg-dark-blue{background-color:#0e2875}.bg-gold{background-color:#fd9827}.bg-teal{background-color:#20c6b2}.bg-mint-green{background-color:#9cfecd}.bg-yellow{background-color:#feed35}.bg-white{background-color:#fff}.alt.inline-list>li{display:inline-block;zoom:1;*display:inline;*vertical-align:auto;vertical-align:middle;float:none}.text-upper{text-transform:uppercase!important}body{font-family:arial}.font-showcase h1,.font-showcase h2,.font-showcase h3,.font-showcase h4,.font-showcase h5,.font-showcase h6{font-weight:100;letter-spacing:-1px;margin:10px 0;-webkit-font-smoothing:antialiased}.font-showcase h1{font-family:omnes_att_light;font-size:48px;font-size:3rem;line-height:48px}.font-showcase h2,.price{font-family:omnes_att_light;font-size:36px;font-size:2.25rem;line-height:36px}.font-showcase h3{font-family:arial;font-size:24px;font-size:1.5rem;line-height:28px}.font-showcase h4,.font-showcase h4.font-showcase-font-example,.font-showcase h4.font-showcase-font-name{font-family:arial;font-size:18px;font-size:1.125rem;line-height:22px;-webkit-font-smoothing:antialiased}.font-showcase h5{font-family:arial;font-size:14px;font-size:.875rem;line-height:20px;-webkit-font-smoothing:antialiased}.font-showcase h6{font-family:arial;font-size:11px;font-size:.6875rem;line-height:30px;font-weight:100;-webkit-font-smoothing:antialiased}.body-copy,.font-showcase p{font-family:arial;font-size:14px;font-size:.875rem;line-height:20px;-webkit-font-smoothing:antialiased}.body-copy-short{font-family:arial;font-size:12px;font-size:.75rem;line-height:15px;-webkit-font-smoothing:antialiased}p [class*=icon]{display:inline-block;vertical-align:middle;margin-top:-4px}.details-label{display:block;font-family:arial;font-size:11px;font-size:.6875rem;line-height:15px}.details-label+.price{line-height:28px}.price{letter-spacing:-1px;-webkit-font-smoothing:antialiased}.price sup{font-size:18px;font-size:1.125rem;vertical-align:baseline;top:-11px;margin:0 2px}.price-alt{font-size:24px;font-size:1.5rem;line-height:24px}.price-alt sup{font-size:12px;font-size:.75rem;top:-8px}.promo-tagline{font-family:omnes_att_medium_italic;font-size:16px;font-size:1rem;line-height:20px;display:inline-block;margin-bottom:5px;-webkit-font-smoothing:antialiased}.promo-text{font-family:clearview_att_italic;font-size:12px;font-size:.75rem;line-height:15px;display:inline-block;margin-bottom:5px;-webkit-font-smoothing:antialiased}.divider,.divider-dark,hr{border:0;border-bottom:1px solid #d3d3d3}.divider-light{border-color:#e5e5e5}dl{font-family:arial;color:#444;font-size:12px;font-size:.75rem}dt{font-family:arial;font-size:11px;font-size:.6875rem;display:block!important;margin:10px 0 5px!important;width:auto!important;text-transform:uppercase}dt a{font-family:arial;color:#067ab4;text-transform:none}dd{display:inline!important;line-height:20px}[data-highlight]{background-color:#c9e9f9;-webkit-animation:highlight-fade 3s infinite}@-webkit-keyframes highlight-fade{100%,80%{background-color:transparent}}.form-field{margin-bottom:10px}.form-field [class^=icon-]{font-size:14px;font-size:.875rem;-webkit-font-smoothing:antialiased;bottom:0;color:#888;height:40px;line-height:40px;pointer-events:none;position:absolute;right:0;text-align:center;margin-right:2px;margin-left:-1px;width:30px;z-index:3}.form-field,.form-field-input-container{position:relative;display:inline-block;width:270px}.form-field .hide-field,.form-field-input-container .hide-field{display:none}.form-field--has-left-icon .select2-choice .select2-chosen,.form-field--has-left-icon input[type=color],.form-field--has-left-icon input[type=date],.form-field--has-left-icon input[type=datetime-local],.form-field--has-left-icon input[type=datetime],.form-field--has-left-icon input[type=email],.form-field--has-left-icon input[type=month],.form-field--has-left-icon input[type=number],.form-field--has-left-icon input[type=password],.form-field--has-left-icon input[type=search],.form-field--has-left-icon input[type=tel],.form-field--has-left-icon input[type=text],.form-field--has-left-icon input[type=time],.form-field--has-left-icon input[type=url],.form-field--has-left-icon input[type=week]{padding-left:31px;padding-right:29px}.form-field .form-field-right-icon{color:#444}.form-field__left-icon{left:0;text-indent:12px;right:auto!important}.form-field .icon-checkbox-checkmark,.form-field .icon-cross{font-size:24px;font-size:1.5rem}.form-field .icon-help,.form-field .icon-help-outline{pointer-events:all}.form-field__label{font-size:12px;font-size:.75rem;visibility:hidden;display:block;font-family:arial;margin-bottom:3px;position:absolute;top:0;-webkit-transition:width 1s,height 1s,-webkit-transform .1s}.form-field__label--show{visibility:visible;-moz-transform:translateX(0px) translateY(-20px);-webkit-transform:translateX(0px) translateY(-20px);-o-transform:translateX(0px) translateY(-20px);-ms-transform:translateX(0px) translateY(-20px);transform:translateX(0px) translateY(-20px)}.form-field__label--hide{visibility:visible;-moz-transform:translateX(0px) translateY(0px);-webkit-transform:translateX(0px) translateY(0px);-o-transform:translateX(0px) translateY(0px);-ms-transform:translateX(0px) translateY(0px);transform:translateX(0px) translateY(0px)}[class^=icon-].success{color:#008a06}[class^=icon-].error{color:#e00000}[class^=icon-].info{color:#0a7cb5}input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{font-size:14px;font-size:.875rem;-webkit-transition:all .04 ease-out;-moz-transition:all .04 ease-out;transition:all .04 ease-out;background:#fff;border-radius:6px;border:1px solid #888;color:#444;font-family:arial;width:100%;outline:0;padding:7px 10px;text-transform:none;z-index:0;height:40px;position:relative}input[type=color][disabled],input[type=date][disabled],input[type=datetime-local][disabled],input[type=datetime][disabled],input[type=email][disabled],input[type=month][disabled],input[type=number][disabled],input[type=password][disabled],input[type=search][disabled],input[type=tel][disabled],input[type=text][disabled],input[type=time][disabled],input[type=url][disabled],input[type=week][disabled],select[disabled],textarea[disabled]{border:1px solid #aaa;background:#f2f2f2;color:#a0a0a0;box-shadow:0 0 #d9d9d9 inset}textarea{resize:vertical}select{-webkit-transition-property:all,z-index,background-position;-moz-transition-property:all,z-index,background-position;transition-property:all,z-index,background-position;-webkit-transition-delay:.4s,0,0;-moz-transition-delay:.4s,0,0;transition-delay:.4s,0,0;-webkit-transition-timing-function:ease-out;-moz-transition-timing-function:ease-out;transition-timing-function:ease-out}input[type=color]:hover,input[type=date]:hover,input[type=datetime-local]:hover,input[type=datetime]:hover,input[type=email]:hover,input[type=month]:hover,input[type=number]:hover,input[type=password]:hover,input[type=search]:hover,input[type=tel]:hover,input[type=text]:hover,input[type=time]:hover,input[type=url]:hover,input[type=week]:hover,select:hover,textarea:hover{border:1px solid #444;z-index:1}input[type=color]:hover[disabled],input[type=date]:hover[disabled],input[type=datetime-local]:hover[disabled],input[type=datetime]:hover[disabled],input[type=email]:hover[disabled],input[type=month]:hover[disabled],input[type=number]:hover[disabled],input[type=password]:hover[disabled],input[type=search]:hover[disabled],input[type=tel]:hover[disabled],input[type=text]:hover[disabled],input[type=time]:hover[disabled],input[type=url]:hover[disabled],input[type=week]:hover[disabled],select:hover[disabled],textarea:hover[disabled]{border:1px solid #a0a0a0;background:#f2f2f2;color:#a0a0a0}input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,select:focus,textarea:focus{border:1px solid #0574AC;color:#444;z-index:1}select{width:100%;position:relative;background-image:url(images/select-arrows.png);background-position:100% -1px;background-repeat:no-repeat;-webkit-appearance:none}.form-field.error input[type=email],.form-field.error input[type=password],.form-field.error input[type=text],.form-field.error select{border:1px solid #e00000}.form-field.warning{color:#444}.form-field.success input[type=email],.form-field.success input[type=password],.form-field.success input[type=text],.form-field.success select{border:1px solid #008a06}.form-field__glued{width:100%;margin-bottom:0}.form-field__glued input[type=email],.form-field__glued input[type=password],.form-field__glued input[type=text],.form-field__glued select{position:relative;margin-top:-1px;border-radius:0}.form-field__glued:first-child input[type=email],.form-field__glued:first-child input[type=password],.form-field__glued:first-child input[type=text],.form-field__glued:first-child select{margin-top:0;border-radius:5px 5px 0 0}.form-field__glued:last-child input[type=email],.form-field__glued:last-child input[type=password],.form-field__glued:last-child input[type=text],.form-field__glued:last-child select{border-radius:0 0 5px 5px}.form-field__glued.pull-left{margin-right:-1px}.form-field__glued.pull-left .select2-choice,.form-field__glued.pull-left input[type=email],.form-field__glued.pull-left input[type=password],.form-field__glued.pull-left input[type=text],.form-field__glued.pull-left select{border-radius:0;margin-top:0}.form-field__glued.pull-left:first-child .select2-choice,.form-field__glued.pull-left:first-child input[type=password],.form-field__glued.pull-left:first-child input[type=text],.form-field__glued.pull-left:first-child select{border-radius:5px 0 0 5px}.form-field__glued.pull-left:last-child .select2-choice,.form-field__glued.pull-left:last-child input[type=password],.form-field__glued.pull-left:last-child input[type=text],.form-field__glued.pull-left:last-child select{border-radius:0 5px 5px 0}::-webkit-input-placeholder{color:#444;opacity:.54}:-moz-placeholder{color:#444;opacity:.54}::-moz-placeholder{color:#444;opacity:.54}:-ms-input-placeholder{color:#444;opacity:.54;-ms-filter:'alpha(Opacity=54)'}[disabled]::-webkit-input-placeholder{color:#888}[disabled]:-moz-placeholder{color:#888}[disabled]::-moz-placeholder{color:#888}[disabled]:-ms-input-placeholder{color:#888}.form-field .form-field__message span{vertical-align:middle}.form-field .form-field__message{border-radius:4px;min-width:150px;max-width:280px;display:block;padding:10px;margin:12px 0 0;font-family:arial;font-size:12px;font-size:.75rem;line-height:10px;color:#666;text-transform:none;background:#fff;position:absolute;z-index:1;-moz-box-sizing:border-box;box-sizing:border-box}.form-field .form-field__message:after{content:'';position:absolute;left:10px;top:-7px;border-style:solid;border-width:0 7px 7px;border-color:transparent transparent #fff}.form-field .form-field__message [class*=icon-]{color:#fff;position:relative;margin-right:9px;line-height:0!important;vertical-align:middle}.form-field .form-field__message.error{color:#fff;background:#e00000}.form-field .form-field__message.error:after{border-bottom:7px solid #e00000}.form-field .form-field__message.warning{color:#444;background:#FCB123}.form-field .form-field__message.warning:after{border-bottom:7px solid #FCB123}.form-field .form-field__message.warning [class*=icon-]{color:#444}.form-field .form-field__message.alert{position:absolute;bottom:-45px;left:0;z-index:1;box-shadow:0 5px 10px 0 rgba(0,0,0,.25)}.form-field .form-field__message.success{color:#fff;background:#008a06}.form-field .form-field__message.success:after{border-bottom:7px solid #008a06}.form-field .form-field__message.info{color:#fff;background:#0a7cb5}.form-field .form-field__message [class^=icon-]{height:30px;line-height:30px}.form-field-loading>[class*=icon-]:not(.form-field-left-icon){opacity:0}.form-field-loading:after{content:'';position:absolute;top:2px;right:5px;width:25px;height:25px;background:url(images/loader.gif) center center no-repeat;background-size:20px}.fix-height{height:110px}.form-field__message-login{width:100%;display:block;position:relative;padding:7px 12px 3px;margin:-1px 0 -1px 0;font-family:arial;font-size:12px;font-size:.75rem;color:#666;text-transform:none;background:#fff;z-index:1;-moz-box-sizing:border-box;box-sizing:border-box}.form-field__message-login:after{content:'';position:absolute;right:10px;top:-7px;border-style:solid;border-width:0 7px 7px;border-color:transparent transparent #fff;z-index:2}.form-field__message-login [class*=icon-]{color:#fff;position:absolute;margin-right:5px}.form-field__message-login.incorrect{color:#fff;background:#e00000;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.form-field__message-login.incorrect:after{border-bottom:7px solid #e00000}.form-field__message-login.unregistered{color:#444;background:#fcb134}.form-field__message-login.unregistered:after{border-bottom:7px solid #fcb134}.form-field__glued:first-child:hover+.form-field__message-login{margin:0 0 -1px 0}.form-field__login-field{width:200px}.form-field__login-field input[type=color],.form-field__login-field input[type=date],.form-field__login-field input[type=datetime-local],.form-field__login-field input[type=datetime],.form-field__login-field input[type=email],.form-field__login-field input[type=month],.form-field__login-field input[type=number],.form-field__login-field input[type=password],.form-field__login-field input[type=search],.form-field__login-field input[type=tel],.form-field__login-field input[type=text],.form-field__login-field input[type=time],.form-field__login-field input[type=url],.form-field__login-field input[type=week],.form-field__login-field select,.form-field__login-field textarea{height:35px;width:200px;font-size:12px;font-size:.75rem}.form-field__login-field [class^=icon-]{height:35px;line-height:35px} \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/ebz/sandbox/styles/ie/backgroundsize.min.htc b/ecomp-portal-BE/war/static/ebz/sandbox/styles/ie/backgroundsize.min.htc
deleted file mode 100644
index baa93ada..00000000
--- a/ecomp-portal-BE/war/static/ebz/sandbox/styles/ie/backgroundsize.min.htc
+++ /dev/null
@@ -1,12 +0,0 @@
-<!-- background-size-polyfill v0.2.0 | (c) 2012-2013 Louis-Rémi Babé | MIT License -->
-<PUBLIC:COMPONENT lightWeight="true">
-<PUBLIC:ATTACH EVENT="oncontentready" ONEVENT="o.init()" />
-<PUBLIC:ATTACH EVENT="ondocumentready" ONEVENT="o.init()" />
-<PUBLIC:ATTACH EVENT="onpropertychange" ONEVENT="o.handlePropertychange()" />
-<PUBLIC:ATTACH EVENT="ondetach" ONEVENT="o.restore()" />
-<PUBLIC:ATTACH EVENT="onresize" FOR="window" ONEVENT="o.handleResize()" />
-<PUBLIC:EVENT NAME="onbackgroundupdate" ID="updateEvent" />
-<script type="text/javascript">
-var o;!function(a,b){var c=/url\(["']?(.*?)["']?\)/,d=/^\s\s*/,e=/\s\s*$/,f=/\s\s*/g,g=/%$/,h={top:0,left:0,bottom:1,right:1,center:.5},i=a.document,j="data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",k="background-size-polyfill",l=function(){},m=100,n,p,q,r;function s(){var b=i.createElement("div"),c=i.createElement("img"),d=b.style,e=a.style,f=a.currentStyle,g=a.bgsExpando,h=a.firstChild;g&&(g.restore&&(e.backgroundImage=g.restore.backgroundImage,e.position=g.restore.position,e.zIndex=g.restore.zIndex),h&&"DIV"===(h.nodeName||"").toUpperCase()&&h.className===k&&a.removeChild(h)),t(b),b.className=k,d.top=d.right=d.bottom=d.left=0,d.position="fixed",t(c),c.alt="",b.appendChild(c),a.insertBefore(b,a.firstChild),a.bgsExpando=g={wrapper:b,img:c,restore:{backgroundImage:e.backgroundImage,position:e.position,zIndex:e.zIndex},current:{},next:null,processing:!1,loadImg:null,display:!1,changed:!1,ignore:!1,canFixed:"BODY"===a.nodeName.toUpperCase()&&b.offsetHeight>0},d.position="absolute","auto"===f.zIndex&&(e.zIndex=0),"static"===f.position&&(e.position="relative"),o={init:l,handlePropertychange:D,restore:F,handleResize:E},D()}function t(a){var b=a.style;b.position="absolute",b.display="block",b.zIndex=-1,b.overflow="hidden",b.visibility="inherit",b.width=b.height=b.top=b.right=b.bottom=b.left=b.cursor="auto",b.margin=b.padding=b.border=b.outline=b.minWidth=b.minHeight=0,b.background=b.maxWidth=b.maxHeight="none",b.fontSize=b.lineHeight="1em"}function u(a,c,d){var e;c?(e=i.createElement("img"),e.onload=e.onerror=function(){var c=this.width,e=this.height;"error"===b.event.type&&(c=e=0),a.loadImg=this.onload=this.onerror=null,d(c,e)},e.src=c):e={callbackId:b.setTimeout(function(){a.loadImg=null,d(0,0)},0)},a.loadImg=e,e=null}function v(a){var b=o.handlePropertychange;o.handlePropertychange=l,a(),o.handlePropertychange=b}function w(a,b){var c=a.currentStyle.display;return c!==b.display&&(b.display=c,b.changed=!0),"none"!==c}function x(a,b){var d=a.style,e=a.currentStyle,f=b.restore,i=y(e["background-size"]),k=i.split(" "),l={innerWidth:a.offsetWidth-(parseFloat(e.borderLeftWidth)||0)-(parseFloat(e.borderRightWidth)||0),innerHeight:a.offsetHeight-(parseFloat(e.borderTopWidth)||0)-(parseFloat(e.borderBottomWidth)||0),size:i,sizeIsKeyword:"contain"===i||"cover"===i,sizeX:k[0],sizeY:k.length>1?k[1]:"auto",posX:e.backgroundPositionX,posY:e.backgroundPositionY,attachment:e.backgroundAttachment,src:"",imgWidth:0,imgHeight:0};return l.sizeIsKeyword||((parseFloat(l.sizeX)>=0||"auto"===l.sizeX)&&(parseFloat(l.sizeY)>=0||"auto"===l.sizeY)||(l.sizeX=l.sizeY="auto"),g.test(l.sizeX)&&(l.sizeX=(l.innerWidth*parseFloat(l.sizeX)/100||0)+"px"),g.test(l.sizeY)&&(l.sizeY=(l.innerHeight*parseFloat(l.sizeY)/100||0)+"px")),(l.posX in h||g.test(l.posX))&&(l.posX=h[l.posX]||parseFloat(l.posX)/100||0),(l.posY in h||g.test(l.posY))&&(l.posY=h[l.posY]||parseFloat(l.posY)/100||0),(c.exec(d.backgroundImage)||[])[1]===j?v(function(){d.backgroundImage=f.backgroundImage}):f.backgroundImage=d.backgroundImage,l.src=(c.exec(e.backgroundImage)||[])[1],v(function(){d.backgroundImage="url("+j+")"}),l}function y(a){return String(a).replace(d,"").replace(e,"").replace(f," ")}function z(a,c){var d=c.next;function e(){p=b.setTimeout(function(){c.processing=!1,z(a,c)},0)}!c.processing&&d&&(c.next=null,c.processing=!0,u(c,d.src,function(b,f){d.imgWidth=b,d.imgHeight=f,A(c,d)?B(a,c,d,e):e()}))}function A(a,b){var c=a.current,d=!1,e;if(a.changed)a.changed=!1,d=!0;else for(e in b)if(b[e]!==c[e]){d=!0;break}return d}function B(a,c,d,e){var f=c.img,g=f.style,h=d.size,i=d.innerWidth,j=d.innerHeight,k=d.imgWidth,l=d.imgHeight,m=d.posX,n=d.posY,o="number"==typeof m,p="number"==typeof n,s="none",t=0,u=0,v="auto",w="auto",x="px",y="100%",z,A;i&&j&&k&&l&&(c.wrapper.style.position="fixed"===d.attachment&&c.canFixed?"fixed":"absolute",f.src=d.src,d.sizeIsKeyword?(z=i/j,A=k/l,"contain"===h&&A>z||"cover"===h&&z>A?(u=C((j-i/A)*n)+x,v=y):(t=C((i-j*A)*m)+x,w=y),g.left=o?t:m,g.top=p?u:n,g.width=v,g.height=w,s="block"):(g.display="block",g.width=d.sizeX,g.height=d.sizeY,k=f.width,l=f.height,k&&l&&(g.left=o?C((i-k)*m)+x:m,g.top=p?C((j-l)*n)+x:n,s="block"))),g.display=s,c.current=d,q=b.setTimeout(function(){r=b.setTimeout(e,0),updateEvent.fire()},0)}function C(a){var b=0>a;return a=Math.floor(Math.abs(a)),b?-a:a}function D(){var c=a.bgsExpando,d=(b.event||{}).propertyName,e="style.backgroundImage";c.ignore&&(c.ignore=!1,d===e)||(d===e&&a.style.backgroundImage&&(c.ignore=!0),w(a,c)&&(c.next=x(a,c),z(a,c)))}function E(){b.clearTimeout(n),n=b.setTimeout(D,m)}function F(){var c=a.bgsExpando,d,e,f;o={init:l,handlePropertychange:l,restore:l,handleResize:l},b.clearTimeout(n),b.clearTimeout(p),b.clearTimeout(q),b.clearTimeout(r);try{c&&(d=c.loadImg,d&&(d.onload=d.onerror=null,b.clearTimeout(d.callbackId)),e=a.style,f=c.restore,e&&(e.backgroundImage=f.backgroundImage,e.position=f.position,e.zIndex=f.zIndex),a.removeChild(c.wrapper)),a.bgsExpando=null}catch(g){}a=b=i=l=null}o={init:"print"!==i.media?s:l,handlePropertychange:l,restore:l,handleResize:l},"complete"===a.readyState&&o.init()}(element,window);</script>
-<script type="text/vbscript"></script>
-</PUBLIC:COMPONENT>
diff --git a/ecomp-portal-BE/war/static/ebz/sandbox/styles/pages/iconography.css b/ecomp-portal-BE/war/static/ebz/sandbox/styles/pages/iconography.css
deleted file mode 100644
index 96e4d933..00000000
--- a/ecomp-portal-BE/war/static/ebz/sandbox/styles/pages/iconography.css
+++ /dev/null
@@ -1,2 +0,0 @@
-/* AT&T Style Guide Styles */
-.icons-list{list-style:none;margin:20px 0 0;padding:0;font-size:0}.icons-list li{font-size:14px;display:inline-block;width:20%;box-sizing:border-box;vertical-align:top;padding:20px;margin-bottom:20px;cursor:default;min-height:130px;position:relative;overflow:hidden;border:1px solid transparent;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-transition:all .2s ease-out;-moz-transition:all .2s ease-out;transition:all .2s ease-out}.icons-list li:hover{background:#fff;color:#199DDF;border-color:#d3d3d3}.icons-list [class*=icon]{display:inline-block;vertical-align:middle;-webkit-transition:font-size .2s ease-out;-moz-transition:font-size .2s ease-out;transition:font-size .2s ease-out}.icons-list[data-size=small] [class*=icon]{font-size:14px}.icons-list[data-size=medium] [class*=icon]{font-size:28px}.icons-list[data-size=large] [class*=icon]{font-size:56px}.icons-list.small-icons [class*=icon]{font-size:56px!important}.icons-list li [class*=icon]:hover{outline:1px dotted #444;color:#199DDF}.icons-list [data-role=title]{font-family:arial;font-size:14px;margin-top:15px;display:block}.icons-list[data-display=list] li{display:block;margin-bottom:0;width:100%;min-height:0}.icons-list[data-display=list] [data-role=title]{display:inline-block;vertical-align:middle;margin:0;margin-left:15px}.icons-list [data-role=css-class]{display:none;font-size:11px;background:rgba(0,0,0,.8);color:#fff;margin-top:10px;text-align:center;box-sizing:border-box;position:absolute;left:0;right:0;bottom:-30px;padding:0 10px;height:25px;padding-top:7px;white-space:nowrap;overflow-x:auto;-webkit-transition:bottom .2s ease-out;-moz-transition:bottom .2s ease-out;transition:bottom .2s ease-out}.icons-list li:hover [data-role=css-class]{bottom:0}.icons-list[data-display=list] [data-role=css-class]{left:auto;top:50%;right:25px;margin-top:-12px;background:#d3d3d3;color:#444;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.show-dev-notes .icons-list [data-role=css-class]{display:block}.icons-list [data-role=css-class]::selection{background:#666}.icons-list[data-display=list] [data-role=css-class]::selection{background:#d3d3d3}.label-icon{display:block}.tabs-icon.tabs>li a{height:40px;line-height:40px;font-size:14px} \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/ebz/sandbox/styles/sldr.css b/ecomp-portal-BE/war/static/ebz/sandbox/styles/sldr.css
deleted file mode 100644
index 1715a6e2..00000000
--- a/ecomp-portal-BE/war/static/ebz/sandbox/styles/sldr.css
+++ /dev/null
@@ -1 +0,0 @@
-@charset "UTF-8";address,blockquote,dd,h1,h2,h3,h4,h5,h6,ol,p,pre,table,ul{margin:0;padding:0;margin-bottom:24px;margin-bottom:1.5rem}html{font-size:1em;line-height:1.5}body{margin:0}h1{font-size:48px;font-size:3rem;line-height:1}h2{font-size:36px;font-size:2.25rem;line-height:1.3333333333}h3{font-size:30px;font-size:1.875rem;line-height:1.6}h4{font-size:24px;font-size:1.5rem;line-height:1}h5{font-size:20px;font-size:1.25rem;line-height:1.2}h6{font-size:18px;font-size:1.125rem;line-height:1.3333333333}dd,ol,ul{margin-left:48px;margin-left:3rem}li>ol,li>ul{margin-bottom:0}code,kbd,pre,samp{font-family:monospace,monospace}blockquote{text-indent:-.41em;quotes:"“" "â€";margin-left:48px;margin-left:3rem}blockquote p:before{content:"“";content:open-quote}blockquote p:after{content:"";content:no-close-quote}blockquote p:last-of-type:after{content:"â€";content:close-quote}q{quotes:"‘" "’" "“" "â€"}q:before{content:"‘";content:open-quote}q:after{content:"’";content:close-quote}q q:before{content:"“";content:open-quote}q q:after{content:"â€";content:close-quote}q:first-child{display:inline-block;text-indent:-.22em}table{width:100%;border-collapse:collapse;border-spacing:0}td,th{padding:12px}#grid{position:absolute;top:0;left:50%;width:980px;margin-left:-490px;counter-reset:section;z-index:9999!important;pointer-events:none;outline:1px solid rgba(0,206,209,.1)}#grid:after{position:fixed;top:0;left:0;content:'Column: 20px Gutter: 20px Margin: 20px';display:block;max-width:90px;padding:3px;background-color:#000;color:#fff;font-size:10px;font-family:monospace;z-index:9999}#grid div.vert{width:20px;outline:solid rgba(0,206,209,.3);outline-width:1px;margin-right:20px;position:relative;background:rgba(255,0,0,.05);counter-increment:section}#grid div.vert.first-line{margin-left:20px}#grid div.vert::after{position:fixed;display:block;text-align:center;color:#fff;width:20px;content:counter(section);top:5px;font-size:8px;font-family:monospace}#grid div.vert:nth-child(24){position:absolute;top:0;right:0}#grid div.vert:nth-child(1),#grid div.vert:nth-child(10),#grid div.vert:nth-child(11),#grid div.vert:nth-child(12),#grid div.vert:nth-child(13),#grid div.vert:nth-child(14),#grid div.vert:nth-child(15),#grid div.vert:nth-child(16),#grid div.vert:nth-child(17),#grid div.vert:nth-child(18),#grid div.vert:nth-child(19),#grid div.vert:nth-child(2),#grid div.vert:nth-child(20),#grid div.vert:nth-child(21),#grid div.vert:nth-child(22),#grid div.vert:nth-child(23),#grid div.vert:nth-child(24),#grid div.vert:nth-child(3),#grid div.vert:nth-child(4),#grid div.vert:nth-child(5),#grid div.vert:nth-child(6),#grid div.vert:nth-child(7),#grid div.vert:nth-child(8),#grid div.vert:nth-child(9){display:inline-block!important}#grid div.vert:nth-child(25),#grid div.vert:nth-child(26),#grid div.vert:nth-child(27),#grid div.vert:nth-child(28),#grid div.vert:nth-child(29),#grid div.vert:nth-child(30),#grid div.vert:nth-child(31){display:none!important}#grid div.horiz{height:10px;border-bottom:1px dotted rgba(100,100,100,.2);margin:0;padding:0}.bg-prime-blue{background-color:#067ab4}.bg-secondary-gray{background-color:#666}.bg-light-blue{background-color:#bcc9d5}.bg-dark-gray{background-color:#444}.bg-dusty-blue{background-color:#97b1cf}.bg-warm-gray{background-color:#cccb9b}.bg-taupe{background-color:#cccb6c}.bg-green-highlight{background-color:#c4d63f}.bg-lime-highlight{background-color:#dad632}.bg-purple-highlight{background-color:#b6539c}.bg-magenta{background-color:#d71481}.bg-blue-highlight{background-color:#4cc8f3}.bg-ochre{background-color:#fab230}.bg-green{background-color:#4fa721}.bg-lime{background-color:#b6bd26}.bg-purple{background-color:#7f0e7c}.bg-burgundy{background-color:#b1103e}.bg-dark-blue{background-color:#0e2875}.bg-gold{background-color:#fd9827}.bg-teal{background-color:#20c6b2}.bg-mint-green{background-color:#9cfecd}.bg-yellow{background-color:#feed35}.bg-white{background-color:#fff}.alt.inline-list>li{display:inline-block;zoom:1;*display:inline;*vertical-align:auto;vertical-align:middle;float:none}.text-upper{text-transform:uppercase!important}body{font-family:arial}.font-showcase h1,.font-showcase h2,.font-showcase h3,.font-showcase h4,.font-showcase h5,.font-showcase h6{font-weight:100;letter-spacing:-1px;margin:10px 0;-webkit-font-smoothing:antialiased}.font-showcase h1{font-family:omnes_att_light;font-size:48px;font-size:3rem;line-height:48px}.font-showcase h2,.price{font-family:omnes_att_light;font-size:36px;font-size:2.25rem;line-height:36px}.font-showcase h3{font-family:arial;font-size:24px;font-size:1.5rem;line-height:28px}.font-showcase h4,.font-showcase h4.font-showcase-font-example,.font-showcase h4.font-showcase-font-name{font-family:arial;font-size:18px;font-size:1.125rem;line-height:22px;-webkit-font-smoothing:antialiased}.font-showcase h5{font-family:arial;font-size:14px;font-size:.875rem;line-height:20px;-webkit-font-smoothing:antialiased}.font-showcase h6{font-family:arial;font-size:11px;font-size:.6875rem;line-height:30px;font-weight:100;-webkit-font-smoothing:antialiased}.body-copy,.font-showcase p{font-family:arial;font-size:14px;font-size:.875rem;line-height:20px;-webkit-font-smoothing:antialiased}.body-copy-short{font-family:arial;font-size:12px;font-size:.75rem;line-height:15px;-webkit-font-smoothing:antialiased}p [class*=icon]{display:inline-block;vertical-align:middle;margin-top:-4px}.details-label{display:block;font-family:arial;font-size:11px;font-size:.6875rem;line-height:15px}.details-label+.price{line-height:28px}.price{letter-spacing:-1px;-webkit-font-smoothing:antialiased}.price sup{font-size:18px;font-size:1.125rem;vertical-align:baseline;top:-11px;margin:0 2px}.price-alt{font-size:24px;font-size:1.5rem;line-height:24px}.price-alt sup{font-size:12px;font-size:.75rem;top:-8px}.promo-tagline{font-family:omnes_att_medium_italic;font-size:16px;font-size:1rem;line-height:20px;display:inline-block;margin-bottom:5px;-webkit-font-smoothing:antialiased}.promo-text{font-family:clearview_att_italic;font-size:12px;font-size:.75rem;line-height:15px;display:inline-block;margin-bottom:5px;-webkit-font-smoothing:antialiased}.divider,.divider-dark,hr{border:0;border-bottom:1px solid #d3d3d3}.divider-light{border-color:#e5e5e5}dl{font-family:arial;color:#444;font-size:12px;font-size:.75rem}dt{font-family:arial;font-size:11px;font-size:.6875rem;display:block!important;margin:10px 0 5px!important;width:auto!important;text-transform:uppercase}dt a{font-family:arial;color:#067ab4;text-transform:none}dd{display:inline!important;line-height:20px}[data-highlight]{background-color:#c9e9f9;-webkit-animation:highlight-fade 3s infinite}@-webkit-keyframes highlight-fade{100%,80%{background-color:transparent}}.att-slider{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;height:10px;margin:120px 0;position:relative}.att-slider:first-child{margin:0}.att-slider__track{position:absolute;top:0;right:0;bottom:0;left:0;background-color:none}.att-slider__range{position:absolute;left:0;-webkit-mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC);background:#157BB2;border-radius:5px;height:100%;z-index:1}.att-slider__range--disabled{background-color:#D3D3D3}.att-slider__handles-container{height:100%;position:relative;border:1px solid #888;border-radius:5px}.att-slider__handle{-webkit-transition:background-color .2s ease-out;-moz-transition:background-color .2s ease-out;transition:background-color .2s ease-out;box-shadow:0 0 0 1px #fff;background:#157BB2;border-radius:100%;cursor:pointer;height:16px;margin:-4px 0 0 -7px;position:absolute;width:15px;z-index:1}.att-slider__handle--dragging,.att-slider__handle:hover{z-index:2;background-color:#158BC3}.att-slider__handle--disabled,.att-slider__handle--disabled:hover{box-shadow:none;background:0 0;cursor:default;z-index:1}.att-slider__handle.att-slider-handle-disabled{width:0;margin:0}.att-slider__range.att-slider__range--disabled{border-top-right-radius:0;border-bottom-right-radius:0}.att-slider__handle .att-tooltip--textonly,.att-slider__label{position:absolute;top:-25px;font-size:12px;font-size:.75rem;color:#6f6f6f;font-family:arial;margin:0;text-align:left;z-index:0}.att-slider__label:after{position:absolute;bottom:-5px;background-color:#888;content:'';display:block;height:5px;width:1px}.att-slider__label--max,.att-slider__label--max:after{right:0}.att-slider__label--below{bottom:-34px;top:auto}.att-slider__label--below:after{bottom:auto;top:-7px;left:50%}.att-slider__handle .att-tooltip{white-space:nowrap}.att-slider__handle .att-tooltip--textonly:after{position:absolute;bottom:-5px;left:50%;background-color:#888;border:0;content:'';display:block;height:5px;margin:0 0 0 -1px;width:1px}.step-slider.disabled{opacity:.5}.step-slider.disabled .jslider-value-to{display:none}.step-slider.disabled .jslider-bg i.v,.step-slider.disabled .jslider-pointer-to{background-color:#AAA}.step-slider{display:block;width:100%;height:1em;position:relative;top:.6em;font-family:Arial,sans-serif}.step-slider table{width:100%;border-collapse:collapse;border:0}.step-slider td,.step-slider th{padding:0;vertical-align:top;text-align:left;border:0}.step-slider .step-slider-green{background-color:#4CA90C}.step-slider .step-slider-blue{background-color:#44C8F5}.step-slider .step-slider-magenta{background-color:#DA0081}.step-slider .step-slider-gold{background-color:#F90}.step-slider .step-slider-purple{background-color:#81017E}.step-slider .step-slider-dark-blue{background-color:#0C2577}.step-slider .step-slider-regular{background-color:#0574AC}.step-slider .step-slider-white{background-color:#fff}.step-slider .cutoff-slider{border:1px solid #000!important}.step-slider .cutoff-slider-dividers span{height:7px!important}.step-slider .jslider-label-cutoff{position:relative!important;float:right}.step-slider .jslider-cutoff{position:relative;height:7px;top:0;background-color:#0574AC;border-bottom-left-radius:5px;border-top-left-radius:5px;border-bottom-right-radius:5px;border-top-right-radius:5px}.step-slider .jslider-limitless .jslider-label,.step-slider .jslider-single .jslider-bg .v,.step-slider .jslider-single .jslider-pointer-to,.step-slider .jslider-single .jslider-value-to{display:none}.step-slider .jslider-pointer-to{left:80%;top:-6px}.step-slider .jslider-pointer{border-radius:100%;border:2px solid #fff;top:-5px;width:15px;height:15px;z-index:10;background-position:0 -60px;position:absolute;left:20%;margin-left:-6px;cursor:pointer}.step-slider .jslider-bg{position:relative;height:100%}.step-slider .jslider-bg i{height:5px;position:absolute;width:5px}.step-slider .jslider-bg i.l{height:6px;background-color:#E5E5E5;border-top-left-radius:3px;border-bottom-left-radius:3px;width:50%;background-position:0 0;left:0}.step-slider .jslider-bg i.r{height:6px;background-color:#E5E5E5;border-top-right-radius:3px;border-bottom-right-radius:3px;width:50%;left:50%;background-position:right 0}.step-slider .jslider-bg i.v{border-top-left-radius:3px;border-bottom-left-radius:3px;position:absolute;width:60%;left:20%;top:0;height:5px;background-repeat:repeat-x;background-position:0 -40px}.step-slider .jslider-scale{position:relative;top:9px;z-index:9}.step-slider .jslider-scale span{top:-9px;width:1px;border-left:0;position:absolute;height:5px;font-size:0}.step-slider .show-dividers span{background-color:#FFF}.step-slider .jslider-label{top:15px;font-size:9px;line-height:12px;color:#000;opacity:.4;white-space:nowrap;padding:0 2px;position:absolute;left:0}.step-slider .jslider-label-to{left:auto;right:0}.step-slider #jslider-value-left,.step-slider #left-pointer{display:none}.step-slider .jslider-value{font-size:9px;white-space:nowrap;padding:1px 2px 0;position:absolute;top:-19px;left:20%;background:#fff;line-height:12px;-moz-border-radius:2px;-webkit-border-radius:2px;-o-border-radius:2px;border-radius:2px}.step-slider .jslider-value-to{margin-left:-31px;-webkit-background-clip:border-box;-webkit-background-origin:padding-box;-webkit-background-size:auto;-webkit-box-shadow:rgba(0,0,0,.298039) 0 4px 5px 0;-webkit-transition-delay:0s;-webkit-transition-duration:.2s;-webkit-transition-property:opacity;-webkit-transition-timing-function:ease-out;background-attachment:scroll;background-clip:border-box;background-color:#fefefe;background-image:none;background-origin:padding-box;background-size:auto;border-bottom-left-radius:5px;border-bottom-right-radius:5px;border-top-left-radius:5px;border-top-right-radius:5px;box-shadow:rgba(0,0,0,.298039) 0 4px 5px 0;box-sizing:border-box;color:#444;display:block;font-family:arial;font-size:9px;line-height:15px;max-width:215px;opacity:1;padding:5px;position:absolute;z-index:0;top:-38px}.step-slider .jslider-value-to::after{content:'';border-bottom-color:transparent;border-bottom-style:solid;border-bottom-width:6px;border-image-outset:0;border-image-repeat:stretch;border-image-slice:100%;border-image-source:none;border-image-width:1;border-left-color:transparent;border-left-style:solid;border-left-width:6px;border-right-color:transparent;border-right-style:solid;border-right-width:6px;border-top-color:#fefefe;border-top-style:solid;border-top-width:6px;bottom:-12px;box-sizing:border-box;display:block;height:12px;left:40%;margin-top:-7px;position:absolute;top:auto;width:12px} \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/ebz/sandbox/styles/style.css b/ecomp-portal-BE/war/static/ebz/sandbox/styles/style.css
deleted file mode 100644
index e24d8e5b..00000000
--- a/ecomp-portal-BE/war/static/ebz/sandbox/styles/style.css
+++ /dev/null
@@ -1 +0,0 @@
-@charset "UTF-8";@font-face{font-family:clearview_att_bold_italic;src:url(clearviewatt/clearviewatt-bolditalic-webfont.eot);src:url(clearviewatt/clearviewatt-bolditalic-webfont.eot?#iefix) format('embedded-opentype'),url(clearviewatt/clearviewatt-bolditalic-webfont.woff) format('woff'),url(clearviewatt/clearviewatt-bolditalic-webfont.ttf) format('truetype'),url(clearviewatt/clearviewatt-bolditalic-webfont.svg#clearviewattbold_italic) format('svg');font-weight:400;font-style:normal}@font-face{font-family:arial;src:url(clearviewatt/clearviewatt-bold-webfont.eot);src:url(clearviewatt/clearviewatt-bold-webfont.eot?#iefix) format('embedded-opentype'),url(clearviewatt/clearviewatt-bold-webfont.woff) format('woff'),url(clearviewatt/clearviewatt-bold-webfont.ttf) format('truetype'),url(clearviewatt/clearviewatt-bold-webfont.svg#clearviewattbold) format('svg');font-weight:400;font-style:normal}@font-face{font-family:clearview_att_italic;src:url(clearviewatt/clearviewatt-bookitalic-webfont.eot);src:url(clearviewatt/clearviewatt-bookitalic-webfont.eot?#iefix) format('embedded-opentype'),url(clearviewatt/clearviewatt-bookitalic-webfont.woff) format('woff'),url(clearviewatt/clearviewatt-bookitalic-webfont.ttf) format('truetype'),url(clearviewatt/clearviewatt-bookitalic-webfont.svg#clearviewattbook_italic) format('svg');font-weight:400;font-style:normal}@font-face{font-family:arial;src:url(clearviewatt/clvatt-book-webfont.eot);src:url(clearviewatt/clvatt-book-webfont.eot?#iefix) format('embedded-opentype'),url(clearviewatt/clvatt-book-webfont.woff) format('woff'),url(clearviewatt/clvatt-book-webfont.ttf) format('truetype'),url(clearviewatt/clvatt-book-webfont.svg#clearviewattregular) format('svg');font-weight:400;font-style:normal}@font-face{font-family:clearview_att_light_italic;src:url(clearviewatt/clearviewatt-lightitalic-webfont.eot);src:url(clearviewatt/clearviewatt-lightitalic-webfont.eot?#iefix) format('embedded-opentype'),url(clearviewatt/clearviewatt-lightitalic-webfont.woff) format('woff'),url(clearviewatt/clearviewatt-lightitalic-webfont.ttf) format('truetype'),url(clearviewatt/clearviewatt-lightitalic-webfont.svg#clearviewattlight_italic) format('svg');font-weight:400;font-style:normal}@font-face{font-family:;src:url(clearviewatt/clearviewatt-light-webfont.eot);src:url(clearviewatt/clearviewatt-light-webfont.eot?#iefix) format('embedded-opentype'),url(clearviewatt/clearviewatt-light-webfont.woff) format('woff'),url(clearviewatt/clearviewatt-light-webfont.ttf) format('truetype'),url(clearviewatt/clearviewatt-light-webfont.svg#clearviewattlight) format('svg');font-weight:400;font-style:normal}@font-face{font-family:omnes_att_medium_italic;src:url(omnesatt2/omnesatt2-mediumitalic-webfont.eot);src:url(omnesatt2/omnesatt2-mediumitalic-webfont.eot?#iefix) format('embedded-opentype'),url(omnesatt2/omnesatt2-mediumitalic-webfont.woff) format('woff'),url(omnesatt2/omnesatt2-mediumitalic-webfont.ttf) format('truetype'),url(omnesatt2/omnesatt2-mediumitalic-webfont.svg#omnes_attmedium_italic) format('svg');font-weight:400;font-style:normal}@font-face{font-family:arial;src:url(omnesatt2/omnesatt2-regular-webfont.eot);src:url(omnesatt2/omnesatt2-regular-webfont.eot?#iefix) format('embedded-opentype'),url(omnesatt2/omnesatt2-regular-webfont.woff) format('woff'),url(omnesatt2/omnesatt2-regular-webfont.ttf) format('truetype'),url(omnesatt2/omnesatt2-regular-webfont.svg#omnes_att_regularregular) format('svg');font-weight:400;font-style:normal}@font-face{font-family:omnes_att_regular_italic;src:url(omnesatt2/omnesatt2-regularitalic-webfont.eot);src:url(omnesatt2/omnesatt2-regularitalic-webfont.eot?#iefix) format('embedded-opentype'),url(omnesatt2/omnesatt2-regularitalic-webfont.woff) format('woff'),url(omnesatt2/omnesatt2-regularitalic-webfont.ttf) format('truetype'),url(omnesatt2/omnesatt2-regularitalic-webfont.svg#omnes_attregular_italic) format('svg');font-weight:400;font-style:normal}@font-face{font-family:omnes_att_light;src:url(omnesatt2/omnesatt2-light-webfont.eot);src:url(omnesatt2/omnesatt2-light-webfont.eot?#iefix) format('embedded-opentype'),url(omnesatt2/omnesatt2-light-webfont.woff) format('woff'),url(omnesatt2/omnesatt2-light-webfont.ttf) format('truetype'),url(omnesatt2/omnesatt2-light-webfont.svg#omnes_attlight) format('svg');font-weight:400;font-style:normal}@font-face{font-family:omnes_att_light_italic;src:url(omnesatt2/omnesatt2-lightitalic-webfont.eot);src:url(omnesatt2/omnesatt2-lightitalic-webfont.eot?#iefix) format('embedded-opentype'),url(omnesatt2/omnesatt2-lightitalic-webfont.woff) format('woff'),url(omnesatt2/omnesatt2-lightitalic-webfont.ttf) format('truetype'),url(omnesatt2/omnesatt2-lightitalic-webfont.svg#omnes_attlight_italic) format('svg');font-weight:400;font-style:normal}@font-face{font-family:omnes_att_medium;src:url(omnesatt2/omnesatt2-medium-webfont.eot);src:url(omnesatt2/omnesatt2-medium-webfont.eot?#iefix) format('embedded-opentype'),url(omnesatt2/omnesatt2-medium-webfont.woff) format('woff'),url(omnesatt2/omnesatt2-medium-webfont.ttf) format('truetype'),url(omnesatt2/omnesatt2-medium-webfont.svg#omnes_attmedium) format('svg');font-weight:400;font-style:normal}@font-face{font-family:atticons;src:url(icons/atticons.eot);src:url(icons/atticons.eot?#iefix) format('embedded-opentype'),url(icons/atticons.woff) format('woff'),url(icons/atticons.ttf) format('truetype'),url(icons/atticons.svg#atticons) format('svg');font-weight:400;font-style:normal}[class*=" icon-"],[class^=icon-]{font-family:atticons;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-wireless-outline:before{content:"\e600"}.icon-wireless-dashboard:before{content:"\e601"}.icon-website-hosting-outline:before{content:"\e602"}.icon-volume-up:before{content:"\e603"}.icon-volume-mute:before{content:"\e604"}.icon-volume-down:before{content:"\e605"}.icon-video:before{content:"\e606"}.icon-video-tutorials:before{content:"\e607"}.icon-video-tutorials-outline:before{content:"\e608"}.icon-video-outline:before{content:"\e609"}.icon-user:before{content:"\e60a"}.icon-user-small:before{content:"\e60b"}.icon-user-outline:before{content:"\e60c"}.icon-user-large-outline:before{content:"\e60d"}.icon-upgrades:before{content:"\e60e"}.icon-upgrades-outline:before{content:"\e60f"}.icon-unlimited-nights-weekends-outline:before{content:"\e610"}.icon-unlimited-minutes-outline:before{content:"\e611"}.icon-unlimited-messaging-outline:before{content:"\e612"}.icon-unlimited-m2m-outline:before{content:"\e613"}.icon-unlimited-calling:before{content:"\e614"}.icon-tv-packages-outline:before{content:"\e615"}.icon-travel-minutes-outline:before{content:"\e616"}.icon-trash:before{content:"\e617"}.icon-tollfree-outline:before{content:"\e618"}.icon-tiles:before{content:"\e619"}.icon-tiles-small:before{content:"\e61a"}.icon-tickets:before{content:"\e61b"}.icon-tickets-returned:before{content:"\e61c"}.icon-tickets-referred:before{content:"\e61d"}.icon-tickets-outline:before{content:"\e61e"}.icon-tickets-open:before{content:"\e61f"}.icon-tickets-escalate:before{content:"\e620"}.icon-tickets-contested:before{content:"\e621"}.icon-tickets-closed:before{content:"\e622"}.icon-tickets-cleared:before{content:"\e623"}.icon-tickets-arquived:before{content:"\e624"}.icon-tickets-active:before{content:"\e625"}.icon-technical-specifications:before{content:"\e626"}.icon-tech-support:before{content:"\e627"}.icon-tech-support-outline:before{content:"\e628"}.icon-tablet:before{content:"\e629"}.icon-tablet-outline:before{content:"\e62a"}.icon-support:before{content:"\e62b"}.icon-support-outline:before{content:"\e62c"}.icon-star:before{content:"\e62d"}.icon-sort:before{content:"\e62e"}.icon-social-outline:before{content:"\e62f"}.icon-smartphone:before{content:"\e630"}.icon-smartphone-outline:before{content:"\e631"}.icon-signout-outline:before{content:"\e632"}.icon-sign-out:before{content:"\e633"}.icon-shop:before{content:"\e634"}.icon-shop-outline:before{content:"\e635"}.icon-shared-outline:before{content:"\e636"}.icon-shared-minutes-outline:before{content:"\e637"}.icon-share:before{content:"\e638"}.icon-settings:before{content:"\e639"}.icon-send-invoice-outline:before{content:"\e63a"}.icon-see-more:before{content:"\e63b"}.icon-see-less:before{content:"\e63c"}.icon-search:before{content:"\e63d"}.icon-search-small:before{content:"\e63e"}.icon-screen-calls-outline:before{content:"\e63f"}.icon-save-time-outline:before{content:"\e640"}.icon-saas-enablement-outline:before{content:"\e641"}.icon-s-beam:before{content:"\e642"}.icon-s-beam-outline:before{content:"\e643"}.icon-rollover-outline:before{content:"\e644"}.icon-rollover-minutes:before{content:"\e645"}.icon-reviews-outline:before{content:"\e646"}.icon-reports:before{content:"\e647"}.icon-reports-outline:before{content:"\e648"}.icon-recommendation-tool:before{content:"\e649"}.icon-receivers-outline:before{content:"\e64a"}.icon-productivity-outline:before{content:"\e64b"}.icon-print:before{content:"\e64c"}.icon-plus:before{content:"\e64d"}.icon-plus-outline:before{content:"\e64e"}.icon-play:before{content:"\e64f"}.icon-platform-as-service-outline:before{content:"\e650"}.icon-plans:before{content:"\e651"}.icon-plans-outline:before{content:"\e652"}.icon-pie-chart:before{content:"\e653"}.icon-photos:before{content:"\e654"}.icon-photos-outline:before{content:"\e655"}.icon-phone-data-outline:before{content:"\e656"}.icon-payments:before{content:"\e657"}.icon-payments-outline:before{content:"\e658"}.icon-pause:before{content:"\e659"}.icon-password:before{content:"\e65a"}.icon-password-outline:before{content:"\e65b"}.icon-overview:before{content:"\e65c"}.icon-overview-small:before{content:"\e65d"}.icon-overages:before{content:"\e65e"}.icon-overages-outline:before{content:"\e65f"}.icon-outage-outline:before{content:"\e660"}.icon-orders:before{content:"\e661"}.icon-orders-outline:before{content:"\e662"}.icon-optional-applications-outline:before{content:"\e663"}.icon-office-at-hand-outline:before{content:"\e664"}.icon-offers:before{content:"\e665"}.icon-offers-outline:before{content:"\e666"}.icon-notifications:before{content:"\e667"}.icon-notifications-outline:before{content:"\e668"}.icon-normal-screen:before{content:"\e669"}.icon-nights-weekends-outline:before{content:"\e66a"}.icon-new-requests-outline:before{content:"\e66b"}.icon-network:before{content:"\e66c"}.icon-network-dashboard:before{content:"\e66d"}.icon-netbook:before{content:"\e66e"}.icon-netbook-outline:before{content:"\e66f"}.icon-music:before{content:"\e670"}.icon-music-video:before{content:"\e671"}.icon-music-video-outline:before{content:"\e672"}.icon-music-outline:before{content:"\e673"}.icon-modem:before{content:"\e674"}.icon-modem-outline:before{content:"\e675"}.icon-mobile-insurance:before{content:"\e676"}.icon-mobile-insurance-outline:before{content:"\e677"}.icon-mobile-2-mobile-outline:before{content:"\e678"}.icon-missed-calls-outline:before{content:"\e679"}.icon-minutes:before{content:"\e67a"}.icon-minutes-outline:before{content:"\e67b"}.icon-messaging:before{content:"\e67c"}.icon-messaging-toolkit-outline:before{content:"\e67d"}.icon-messaging-outline:before{content:"\e67e"}.icon-messaging-email:before{content:"\e67f"}.icon-messaging-email-outline:before{content:"\e680"}.icon-message-small:before{content:"\e681"}.icon-maintenance:before{content:"\e682"}.icon-location-pin:before{content:"\e683"}.icon-location-pin-small:before{content:"\e684"}.icon-local-search:before{content:"\e685"}.icon-local-long-distance-outline:before{content:"\e686"}.icon-list:before{content:"\e687"}.icon-learn:before{content:"\e688"}.icon-learn-outline:before{content:"\e689"}.icon-laptop:before{content:"\e68a"}.icon-landline:before{content:"\e68b"}.icon-landline-outline:before{content:"\e68c"}.icon-invoices:before{content:"\e68d"}.icon-invoices-outline:before{content:"\e68e"}.icon-inventory:before{content:"\e68f"}.icon-intranet-outline:before{content:"\e690"}.icon-interpreter:before{content:"\e691"}.icon-interpreter-outline:before{content:"\e692"}.icon-internet:before{content:"\e693"}.icon-internet-outline:before{content:"\e694"}.icon-internet-24-outline:before{content:"\e695"}.icon-internet-18-outline:before{content:"\e696"}.icon-international-outline:before{content:"\e697"}.icon-international-long-distance-outline:before{content:"\e698"}.icon-international-data-outline:before{content:"\e699"}.icon-installation-outline:before{content:"\e69a"}.icon-information:before{content:"\e69b"}.icon-info-success:before{content:"\e69c"}.icon-info-alert:before{content:"\e69d"}.icon-info-alert-outline:before{content:"\e69e"}.icon-included-checkmark:before{content:"\e69f"}.icon-included-checkmark-outline:before{content:"\e6a0"}.icon-hotspot:before{content:"\e6a1"}.icon-hotspot-outline:before{content:"\e6a2"}.icon-hotspot-access-outline:before{content:"\e6a3"}.icon-home:before{content:"\e6a4"}.icon-help:before{content:"\e6a5"}.icon-help-outline:before{content:"\e6a6"}.icon-hd:before{content:"\e6a7"}.icon-hd-outline:before{content:"\e6a8"}.icon-hamburger:before{content:"\e6a9"}.icon-group-outline:before{content:"\e6aa"}.icon-gps:before{content:"\e6ab"}.icon-gps-outline:before{content:"\e6ac"}.icon-go-paperless-email-outline:before{content:"\e6ad"}.icon-global-messaging-outline:before{content:"\e6ae"}.icon-gamepad-outline:before{content:"\e6af"}.icon-game-devices:before{content:"\e6b0"}.icon-full-screen:before{content:"\e6b1"}.icon-forward-calls-outline:before{content:"\e6b2"}.icon-forum:before{content:"\e6b3"}.icon-forum-outline:before{content:"\e6b4"}.icon-filter:before{content:"\e6b5"}.icon-extras:before{content:"\e6b6"}.icon-extras-outline:before{content:"\e6b7"}.icon-erase:before{content:"\e6b8"}.icon-envelope:before{content:"\e6b9"}.icon-envelope-outline:before{content:"\e6ba"}.icon-enterprise-messaging-outline:before{content:"\e6bb"}.icon-edit:before{content:"\e6bc"}.icon-duplicate:before{content:"\e6bd"}.icon-dropdown-up:before{content:"\e6be"}.icon-dropdown-down:before{content:"\e6bf"}.icon-download:before{content:"\e6c0"}.icon-download-outline:before{content:"\e6c1"}.icon-disputes:before{content:"\e6c2"}.icon-detailed-billing:before{content:"\e6c3"}.icon-detailed-billing-outline:before{content:"\e6c4"}.icon-desktop-outline:before{content:"\e6c5"}.icon-data:before{content:"\e6c6"}.icon-data-outline:before{content:"\e6c7"}.icon-data-additional-outline:before{content:"\e6c8"}.icon-compare:before{content:"\e6c9"}.icon-cloud-storage-outline:before{content:"\e6ca"}.icon-cloud-outline:before{content:"\e6cb"}.icon-cloud-computing-outline:before{content:"\e6cc"}.icon-cloud-backup:before{content:"\e6cd"}.icon-cloud-backup-outline:before{content:"\e6ce"}.icon-circle-information-outline:before{content:"\e6cf"}.icon-circle-action-remove:before{content:"\e6d0"}.icon-circle-action-plus-outline:before{content:"\e6d1"}.icon-circle-action-minus-outline:before{content:"\e6d2"}.icon-circle-action-empty:before{content:"\e6d3"}.icon-circle-action-delete-outline:before{content:"\e6d4"}.icon-circle-action-close:before{content:"\e6d5"}.icon-circle-action-check-outline:before{content:"\e6d6"}.icon-circle-action-add:before{content:"\e6d7"}.icon-chip-outline:before{content:"\e6d8"}.icon-chevron-up:before{content:"\e6d9"}.icon-chevron-right:before{content:"\e6da"}.icon-chevron-left:before{content:"\e6db"}.icon-chevron-down:before{content:"\e6dc"}.icon-checkbox-checkmark:before{content:"\e6dd"}.icon-chat:before{content:"\e6de"}.icon-chat-small:before{content:"\e6df"}.icon-case-studies:before{content:"\e6e0"}.icon-cart:before{content:"\e6e1"}.icon-cart-small:before{content:"\e6e2"}.icon-camera:before{content:"\e6e3"}.icon-camera-outline:before{content:"\e6e4"}.icon-calendar-outline:before{content:"\e6e5"}.icon-business:before{content:"\e6e6"}.icon-business-tv:before{content:"\e6e7"}.icon-business-tv-outline:before{content:"\e6e8"}.icon-business-tv-additional-packs-outline:before{content:"\e6e9"}.icon-business-outline:before{content:"\e6ea"}.icon-business-center:before{content:"\e6eb"}.icon-business-center-outline:before{content:"\e6ec"}.icon-bundles:before{content:"\e6ed"}.icon-bundles-outline:before{content:"\e6ee"}.icon-billing:before{content:"\e6ef"}.icon-billing-history-outline:before{content:"\e6f0"}.icon-billing-dashboard:before{content:"\e6f1"}.icon-bd-maps:before{content:"\e6f2"}.icon-basicphone:before{content:"\e6f3"}.icon-basicphone-outline:before{content:"\e6f4"}.icon-barcode-outline:before{content:"\e6f5"}.icon-bar-chart-vertical:before{content:"\e6f6"}.icon-bar-chart-horizontal:before{content:"\e6f7"}.icon-arrow-up:before{content:"\e6f8"}.icon-arrow-up-right:before{content:"\e6f9"}.icon-arrow-up-left:before{content:"\e6fa"}.icon-arrow-up-circle:before{content:"\e6fb"}.icon-arrow-right:before{content:"\e6fc"}.icon-arrow-right-circle:before{content:"\e6fd"}.icon-arrow-left:before{content:"\e6fe"}.icon-arrow-left-circle:before{content:"\e6ff"}.icon-arrow-down:before{content:"\e700"}.icon-arrow-down-right:before{content:"\e701"}.icon-arrow-down-left:before{content:"\e702"}.icon-arrow-down-circle:before{content:"\e703"}.icon-arrow-double-right:before{content:"\e704"}.icon-arrow-double-left:before{content:"\e705"}.icon-apps-media:before{content:"\e706"}.icon-apps-media-outline:before{content:"\e707"}.icon-apps-marketplace:before{content:"\e708"}.icon-apps-marketplace-outline:before{content:"\e709"}.icon-analytics:before{content:"\e70a"}.icon-alt-media-subscription-outline:before{content:"\e70b"}.icon-all-locations:before{content:"\e70c"}.icon-all-devices:before{content:"\e70d"}.icon-all-devices-outline:before{content:"\e70e"}.icon-alarms:before{content:"\e70f"}.icon-alarms-outline:before{content:"\e710"}.icon-address-ip-outline:before{content:"\e711"}.icon-addons:before{content:"\e712"}.icon-addons-outline:before{content:"\e713"}.icon-additional-services:before{content:"\e714"}.icon-additional-minutes-outline:before{content:"\e715"}.icon-add:before{content:"\e716"}.icon-add-widget:before{content:"\e717"}.icon-activity-feed:before{content:"\e718"}.icon-accessories:before{content:"\e719"}.icon-accessories-outline:before{content:"\e71a"}.icon-move:before{content:"\e71b"}.icon-keyboard:before{content:"\e71c"}.icon-social-business-community:before{content:"\e71d"}.icon-social-facebook:before{content:"\e71e"}.icon-social-feed:before{content:"\e71f"}.icon-social-google-plus:before{content:"\e720"}.icon-social-linkedin:before{content:"\e721"}.icon-social-network-exchange:before{content:"\e722"}.icon-social-twitter-bird:before{content:"\e723"}.icon-social-twitter:before{content:"\e724"}.icon-social-youtube:before{content:"\e725"}.icon-cart-small,.icon-chat-small,.icon-location-pin-small,.icon-message-small,.icon-overview-small,.icon-search-small,.icon-user-small{display:inline-block;vertical-align:middle;width:20px;font-size:56px}.icon-cart-small:before,.icon-chat-small:before,.icon-location-pin-small:before,.icon-message-small:before,.icon-overview-small:before,.icon-search-small:before,.icon-user-small:before{margin-left:-18px}@font-face{font-family:full-linear-atticons;src:url(icons/full-linear-atticons.eot?-y1p387);src:url(icons/full-linear-atticons.eot?#iefix-y1p387) format('embedded-opentype'),url(icons/full-linear-atticons.woff?-y1p387) format('woff'),url(icons/full-linear-atticons.ttf?-y1p387) format('truetype'),url(icons/full-linear-atticons.svg?-y1p387#full-linear-atticons) format('svg');font-weight:400;font-style:normal}[class*=" full-linear-icon-"],[class^=full-linear-icon-]{font-family:full-linear-atticons;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.full-linear-icon-accessories:before{content:"\e600"}.full-linear-icon-airport:before{content:"\e601"}.full-linear-icon-api:before{content:"\e602"}.full-linear-icon-bus:before{content:"\e603"}.full-linear-icon-business-continuity:before{content:"\e604"}.full-linear-icon-calendar:before{content:"\e605"}.full-linear-icon-cargoship:before{content:"\e607"}.full-linear-icon-cctv:before{content:"\e609"}.full-linear-icon-checklist:before{content:"\e60a"}.full-linear-icon-clipboard:before{content:"\e60b"}.full-linear-icon-cloud-download:before{content:"\e60c"}.full-linear-icon-cloud-upload:before{content:"\e60e"}.full-linear-icon-construction:before{content:"\e60f"}.full-linear-icon-contacts:before{content:"\e610"}.full-linear-icon-costs:before{content:"\e611"}.full-linear-icon-curved-arrow:before{content:"\e612"}.full-linear-icon-data:before{content:"\e613"}.full-linear-icon-database:before{content:"\e614"}.full-linear-icon-desk-phone:before{content:"\e615"}.full-linear-icon-device-ecosystem:before{content:"\e617"}.full-linear-icon-document:before{content:"\e618"}.full-linear-icon-ecommerce:before{content:"\e619"}.full-linear-icon-emergency-vehicle:before{content:"\e61a"}.full-linear-icon-external-storage:before{content:"\e61d"}.full-linear-icon-factory:before{content:"\e61f"}.full-linear-icon-financial:before{content:"\e621"}.full-linear-icon-gateway:before{content:"\e623"}.full-linear-icon-global-network:before{content:"\e624"}.full-linear-icon-government:before{content:"\e627"}.full-linear-icon-growth:before{content:"\e628"}.full-linear-icon-healthcare:before{content:"\e629"}.full-linear-icon-home-security:before{content:"\e62b"}.full-linear-icon-hosting:before{content:"\e62d"}.full-linear-icon-integrated:before{content:"\e62e"}.full-linear-icon-interaction:before{content:"\e630"}.full-linear-icon-lan:before{content:"\e631"}.full-linear-icon-large-building:before{content:"\e632"}.full-linear-icon-manual:before{content:"\e633"}.full-linear-icon-medical-facility:before{content:"\e634"}.full-linear-icon-medium-building:before{content:"\e637"}.full-linear-icon-meter:before{content:"\e638"}.full-linear-icon-mobile-app:before{content:"\e63b"}.full-linear-icon-mobile-workplace:before{content:"\e63d"}.full-linear-icon-network-folder:before{content:"\e63e"}.full-linear-icon-operations:before{content:"\e63f"}.full-linear-icon-person:before{content:"\e643"}.full-linear-icon-pointer:before{content:"\e646"}.full-linear-icon-police:before{content:"\e648"}.full-linear-icon-report:before{content:"\e649"}.full-linear-icon-router:before{content:"\e64a"}.full-linear-icon-sales-report:before{content:"\e64b"}.full-linear-icon-search-find:before{content:"\e64c"}.full-linear-icon-semi-truck:before{content:"\e64f"}.full-linear-icon-server:before{content:"\e650"}.full-linear-icon-settings:before{content:"\e651"}.full-linear-icon-share:before{content:"\e652"}.full-linear-icon-small-building:before{content:"\e653"}.full-linear-icon-stadium:before{content:"\e657"}.full-linear-icon-star:before{content:"\e65a"}.full-linear-icon-straight-arrow:before{content:"\e65b"}.full-linear-icon-tablet:before{content:"\e65d"}.full-linear-icon-tanker-truck:before{content:"\e65f"}.full-linear-icon-telepresence:before{content:"\e660"}.full-linear-icon-time:before{content:"\e663"}.full-linear-icon-train:before{content:"\e664"}.full-linear-icon-transform:before{content:"\e665"}.full-linear-icon-truck:before{content:"\e66a"}.full-linear-icon-two-people:before{content:"\e66c"}.full-linear-icon-ultra-fast:before{content:"\e66d"}.full-linear-icon-upload:before{content:"\e66e"}.full-linear-icon-usa:before{content:"\e66f"}.full-linear-icon-utilities:before{content:"\e671"}.full-linear-icon-uverse-tv:before{content:"\e672"}.full-linear-icon-video-conferencing:before{content:"\e673"}.full-linear-icon-virtual:before{content:"\e675"}.full-linear-icon-warehouse:before{content:"\e678"}.full-linear-icon-web-conferencing:before{content:"\e67a"}.full-linear-icon-wldintl:before{content:"\e67b"}.full-linear-icon-workstation:before{content:"\e67d"}.full-linear-icon-accounts-billing:before{content:"\e606"}.full-linear-icon-airplane:before{content:"\e608"}.full-linear-icon-application:before{content:"\e60d"}.full-linear-icon-business-tv:before{content:"\e616"}.full-linear-icon-camera:before{content:"\e61b"}.full-linear-icon-cart:before{content:"\e61c"}.full-linear-icon-chat:before{content:"\e61e"}.full-linear-icon-city:before{content:"\e620"}.full-linear-icon-cloud:before{content:"\e622"}.full-linear-icon-creditcard:before{content:"\e625"}.full-linear-icon-cruise:before{content:"\e626"}.full-linear-icon-deptstr:before{content:"\e62a"}.full-linear-icon-dining:before{content:"\e62c"}.full-linear-icon-download:before{content:"\e62f"}.full-linear-icon-email:before{content:"\e635"}.full-linear-icon-employee-id:before{content:"\e636"}.full-linear-icon-error:before{content:"\e639"}.full-linear-icon-ethernet:before{content:"\e63a"}.full-linear-icon-faqs:before{content:"\e63c"}.full-linear-icon-featured:before{content:"\e640"}.full-linear-icon-file:before{content:"\e641"}.full-linear-icon-firewall:before{content:"\e642"}.full-linear-icon-flip:before{content:"\e644"}.full-linear-icon-folder:before{content:"\e645"}.full-linear-icon-forum:before{content:"\e647"}.full-linear-icon-gps:before{content:"\e64d"}.full-linear-icon-group:before{content:"\e64e"}.full-linear-icon-home:before{content:"\e654"}.full-linear-icon-hotel:before{content:"\e655"}.full-linear-icon-hotspot:before{content:"\e656"}.full-linear-icon-included-checkmark:before{content:"\e658"}.full-linear-icon-info-alert:before{content:"\e659"}.full-linear-icon-information:before{content:"\e65c"}.full-linear-icon-internet:before{content:"\e65e"}.full-linear-icon-keyboard:before{content:"\e661"}.full-linear-icon-keypad:before{content:"\e662"}.full-linear-icon-laptop:before{content:"\e666"}.full-linear-icon-lightbulb:before{content:"\e667"}.full-linear-icon-location-pin:before{content:"\e668"}.full-linear-icon-lock:before{content:"\e669"}.full-linear-icon-maintenance:before{content:"\e66b"}.full-linear-icon-mobile:before{content:"\e670"}.full-linear-icon-music:before{content:"\e674"}.full-linear-icon-network:before{content:"\e676"}.full-linear-icon-new:before{content:"\e677"}.full-linear-icon-offers:before{content:"\e679"}.full-linear-icon-overview:before{content:"\e67c"}.full-linear-icon-password:before{content:"\e67f"}.full-linear-icon-pdf:before{content:"\e680"}.full-linear-icon-plus:before{content:"\e684"}.full-linear-icon-power-onoff:before{content:"\e686"}.full-linear-icon-print:before{content:"\e687"}.full-linear-icon-protect:before{content:"\e689"}.full-linear-icon-remove:before{content:"\e690"}.full-linear-icon-rental:before{content:"\e692"}.full-linear-icon-restricted:before{content:"\e694"}.full-linear-icon-s-beam:before{content:"\e696"}.full-linear-icon-save:before{content:"\e698"}.full-linear-icon-search-people:before{content:"\e69b"}.full-linear-icon-smartphone:before{content:"\e6a0"}.full-linear-icon-social:before{content:"\e6a2"}.full-linear-icon-sound-message:before{content:"\e6a4"}.full-linear-icon-sports:before{content:"\e6a7"}.full-linear-icon-tech-support:before{content:"\e6aa"}.full-linear-icon-temperature:before{content:"\e6ab"}.full-linear-icon-top-picks:before{content:"\e6ad"}.full-linear-icon-towtruck:before{content:"\e6af"}.full-linear-icon-update:before{content:"\e6b5"}.full-linear-icon-usb-drive:before{content:"\e6b6"}.full-linear-icon-video:before{content:"\e6b7"}.full-linear-icon-voice-data:before{content:"\e6ba"}.full-linear-icon-vpn:before{content:"\e6bf"}.full-linear-icon-weather:before{content:"\e6c4"}.full-linear-icon-webwindow:before{content:"\e6c5"}.full-linear-icon-wifi:before{content:"\e6c6"}code[class*=language-],pre[class*=language-]{color:#f8f8f2;text-shadow:0 1px rgba(0,0,0,.3);font-family:Consolas,Monaco,'Andale Mono',monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em}:not(pre)>code[class*=language-],pre[class*=language-]{background:#272822}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#f8f8f2}.namespace{opacity:.7}.token.constant,.token.property,.token.symbol,.token.tag{color:#f92672}.token.boolean,.token.number{color:#ae81ff}.token.attr-name,.token.builtin,.token.selector,.token.string{color:#a6e22e}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url,.token.variable{color:#f8f8f2}.token.atrule,.token.attr-value{color:#e6db74}.token.keyword{color:#66d9ef}.token.important,.token.regex{color:#fd971f}.token.important{font-weight:700}.token.entity{cursor:help}pre.line-numbers{position:relative;counter-reset:linenumber}pre.line-numbers>code{position:relative}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{pointer-events:none;display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right}.alert,.alert-success{position:fixed;top:0;left:0;right:0;z-index:2;background-color:#e9eee3;color:#444;font-family:arial;font-size:12px;padding:0;border:0;border-radius:0}.alert-warning{background-color:#fff3d9}.alert-error{background-color:#f3e6e5}.alert-info{background-color:#dfeff7}.alert .container{padding:15px 90px 15px 60px}.alert .container:before{content:'\e69c';position:absolute;top:14px;left:25px;font-family:atticons;font-size:14px;color:#6ebb1f}.alert-warning .container:before{content:'\e69d';color:#fcb314}.alert-error .container:before{content:'\e69d';color:#ff4539}.alert-info .container:before{content:'\e69b';color:#067ab4}.alert strong{font-family:arial;font-size:11px;font-weight:100;text-transform:uppercase}.alert a{color:#067ab4}.alert a:hover{color:#199ddf}.alert [data-role=close]{position:absolute;top:13px;right:20px;font-size:11px;height:20px;line-height:23px;border:0}.alert [data-role=close] [class^=icon-]{font-size:20px;width:15px;color:#777;margin:0;vertical-align:middle;display:inline-block;margin-top:-4px;-webkit-transition:all .2s ease-out;-moz-transition:all .2s ease-out;transition:all .2s ease-out}.alert [data-role=close]:hover [class^=icon-]{color:#199DDF}.alert .container,.alert-inplace{position:relative}.alert-inplace{z-index:1}.alert-inplace .container{width:100%}.tabs{display:inline-block;list-style:none;margin:0;padding:0;font-size:0}.tabs>li{padding:0;margin:0;display:inline-block}.tabs>li a{height:30px;width:auto;margin:0 0 0 -1px;padding:0 30px;background:#f2f2f2;border:1px solid #e7e6e6;text-align:center;font-size:11px;font-size:1.1rem;color:#6f6f6f;text-transform:uppercase;line-height:31px;cursor:pointer;display:inline-block}.tabs>li.first a,.tabs>li:first-child a{border-radius:4px 0 0 4px;margin-left:0}.tabs>li.last a,.tabs>li:last-child a{border-radius:0 4px 4px 0}.tabs>li a:hover{background:#e5e5e5;text-decoration:none;-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;transition:all .3s ease-out}.tabs>li.active a{background:#f8f8f8;color:#067ab4}.tabs-alt>li a,.tabs-small>li a{padding:0 15px}.tabs-light>li a{background-color:#fff}.tabs-icons>li a,.tabs-icons>li a:hover,.tabs-icons>li.active a{padding:0;border:0;background:0 0;font-size:28px;line-height:36px;margin-right:10px}.tabs-icons>li a i{vertical-align:middle}.tabs-icons>li a:hover{color:#067ab4}.tab-pane{display:none}.tab-pane.active{display:block}.tab-pane.html{padding:20px;border:1px solid #ddd;border-top:10px solid #272822;border-radius:0 0 3px 3px}address,blockquote,dd,h1,h2,h3,h4,h5,h6,ol,p,pre,table,ul{margin:0;padding:0;margin-bottom:24px;margin-bottom:1.5rem}html{font-size:1em;line-height:1.5}h1{font-size:48px;font-size:3rem;line-height:1}h2{line-height:1.3333333333}h3{line-height:1.6}h4{line-height:1}h5{font-size:20px;font-size:1.25rem;line-height:1.2}h6{font-size:18px;font-size:1.125rem;line-height:1.3333333333}dd,ol,ul{margin-left:48px;margin-left:3rem}li>ol,li>ul{margin-bottom:0}code,kbd,pre,samp{font-family:monospace,monospace}blockquote{text-indent:-.41em;quotes:"“" "â€";margin-left:48px;margin-left:3rem}blockquote p:before{content:"“";content:open-quote}blockquote p:after{content:"";content:no-close-quote}blockquote p:last-of-type:after{content:"â€";content:close-quote}q{quotes:"‘" "’" "“" "â€"}q:before{content:"‘";content:open-quote}q:after{content:"’";content:close-quote}q q:before{content:"“";content:open-quote}q q:after{content:"â€";content:close-quote}q:first-child{display:inline-block;text-indent:-.22em}table{width:100%;border-collapse:collapse;border-spacing:0}td,th{padding:12px}#grid{position:absolute;top:0;left:50%;width:980px;margin-left:-490px;counter-reset:section;z-index:9999!important;pointer-events:none;outline:1px solid rgba(0,206,209,.1)}#grid:after{position:fixed;top:0;left:0;content:'Column: 20px Gutter: 20px Margin: 20px';display:block;max-width:90px;padding:3px;background-color:#000;color:#fff;font-size:10px;font-family:monospace;z-index:9999}#grid div.vert{width:20px;outline:solid rgba(0,206,209,.3);outline-width:1px;margin-right:20px;position:relative;background:rgba(255,0,0,.05);counter-increment:section}#grid div.vert.first-line{margin-left:20px}#grid div.vert::after{position:fixed;display:block;text-align:center;color:#fff;width:20px;content:counter(section);top:5px;font-size:8px;font-family:monospace}#grid div.vert:nth-child(24){position:absolute;top:0;right:0}#grid div.vert:nth-child(1),#grid div.vert:nth-child(10),#grid div.vert:nth-child(11),#grid div.vert:nth-child(12),#grid div.vert:nth-child(13),#grid div.vert:nth-child(14),#grid div.vert:nth-child(15),#grid div.vert:nth-child(16),#grid div.vert:nth-child(17),#grid div.vert:nth-child(18),#grid div.vert:nth-child(19),#grid div.vert:nth-child(2),#grid div.vert:nth-child(20),#grid div.vert:nth-child(21),#grid div.vert:nth-child(22),#grid div.vert:nth-child(23),#grid div.vert:nth-child(24),#grid div.vert:nth-child(3),#grid div.vert:nth-child(4),#grid div.vert:nth-child(5),#grid div.vert:nth-child(6),#grid div.vert:nth-child(7),#grid div.vert:nth-child(8),#grid div.vert:nth-child(9){display:inline-block!important}#grid div.vert:nth-child(25),#grid div.vert:nth-child(26),#grid div.vert:nth-child(27),#grid div.vert:nth-child(28),#grid div.vert:nth-child(29),#grid div.vert:nth-child(30),#grid div.vert:nth-child(31){display:none!important}#grid div.horiz{height:10px;border-bottom:1px dotted rgba(100,100,100,.2);margin:0;padding:0}.bg-prime-blue{background-color:#067ab4}.bg-secondary-gray{background-color:#666}.bg-light-blue{background-color:#bcc9d5}.bg-dark-gray{background-color:#444}.bg-dusty-blue{background-color:#97b1cf}.bg-warm-gray{background-color:#cccb9b}.bg-taupe{background-color:#cccb6c}.bg-green-highlight{background-color:#c4d63f}.bg-lime-highlight{background-color:#dad632}.bg-purple-highlight{background-color:#b6539c}.bg-magenta{background-color:#d71481}.bg-blue-highlight{background-color:#4cc8f3}.bg-ochre{background-color:#fab230}.bg-green{background-color:#4fa721}.bg-lime{background-color:#b6bd26}.bg-purple{background-color:#7f0e7c}.bg-burgundy{background-color:#b1103e}.bg-dark-blue{background-color:#0e2875}.bg-gold{background-color:#fd9827}.bg-teal{background-color:#20c6b2}.bg-mint-green{background-color:#9cfecd}.bg-yellow{background-color:#feed35}.bg-white{background-color:#fff}html{background:#fff;overflow:auto}body{background-color:#fff;font-size:14px;font-size:.875rem;margin:0;padding:105px 0 20px;position:relative}.alt.inline-list>li{display:inline-block;zoom:1;*display:inline;*vertical-align:auto;vertical-align:middle;float:none}.text-upper{text-transform:uppercase!important}body{font-family:arial}.font-showcase h1,.font-showcase h2,.font-showcase h3,.font-showcase h4,.font-showcase h5,.font-showcase h6{font-weight:100;letter-spacing:-1px;margin:10px 0;-webkit-font-smoothing:antialiased}.font-showcase h1{font-family:omnes_att_light;font-size:48px;font-size:3rem;line-height:48px}.font-showcase h2,.price{font-family:omnes_att_light;font-size:36px;font-size:2.25rem;line-height:36px}.font-showcase h3{font-family:arial;font-size:24px;font-size:1.5rem;line-height:28px}.font-showcase h4,.font-showcase h4.font-showcase-font-example,.font-showcase h4.font-showcase-font-name{font-family:arial;font-size:18px;font-size:1.125rem;line-height:22px;-webkit-font-smoothing:antialiased}.font-showcase h5{font-family:arial;font-size:14px;font-size:.875rem;line-height:20px;-webkit-font-smoothing:antialiased}.font-showcase h6{font-family:arial;font-size:11px;font-size:.6875rem;line-height:30px;font-weight:100;-webkit-font-smoothing:antialiased}.body-copy,.font-showcase p{font-family:arial;font-size:14px;font-size:.875rem;line-height:20px;-webkit-font-smoothing:antialiased}.body-copy-short{font-family:arial;font-size:12px;font-size:.75rem;line-height:15px;-webkit-font-smoothing:antialiased}p [class*=icon]{display:inline-block;vertical-align:middle;margin-top:-4px}.details-label{display:block;font-family:arial;font-size:11px;font-size:.6875rem;line-height:15px}.details-label+.price{line-height:28px}.price{letter-spacing:-1px;-webkit-font-smoothing:antialiased}.price sup{font-size:18px;font-size:1.125rem;vertical-align:baseline;top:-11px;margin:0 2px}.price-alt{font-size:24px;font-size:1.5rem;line-height:24px}.price-alt sup{font-size:12px;font-size:.75rem;top:-8px}.promo-tagline{font-family:omnes_att_medium_italic;font-size:16px;font-size:1rem;line-height:20px;display:inline-block;margin-bottom:5px;-webkit-font-smoothing:antialiased}.promo-text{font-family:clearview_att_italic;font-size:12px;font-size:.75rem;line-height:15px;display:inline-block;margin-bottom:5px;-webkit-font-smoothing:antialiased}.divider,.divider-dark,hr{border:0;border-bottom:1px solid #d3d3d3}.divider-light{border-color:#e5e5e5}dl{font-family:arial;color:#444;font-size:12px;font-size:.75rem}dt{font-family:arial;font-size:11px;font-size:.6875rem;display:block!important;margin:10px 0 5px!important;width:auto!important;text-transform:uppercase}dt a{font-family:arial;color:#067ab4;text-transform:none}dd{display:inline!important;line-height:20px}[data-highlight]{background-color:#c9e9f9;-webkit-animation:highlight-fade 3s infinite}@-webkit-keyframes highlight-fade{100%,80%{background-color:transparent}}.changelog .title{border-bottom:1px solid #aaa;margin:50px 0 20px;padding-bottom:10px}.changelog:first-child .title{margin-top:0}.changelog:first-child .title a{color:#333}.changelog .title a:hover{color:#199DDF}.changelog .title a:hover:after{content:'#';margin-left:5px}.changelog .group{margin-bottom:20px}.changelog .changes-list{margin-bottom:30px}.changelog .changes-list li{margin-bottom:10px}.changelog .changes-list li:first-letter{text-transform:capitalize}.changelog .label-info{background-color:#333}.profile-card{height:380px;width:219px;border-radius:3px;margin:10px;border:solid 1px lightgrey;padding:0!important}.profile-card .top-block{padding:15px 20px;background-color:#e5e5e5;height:185px}.profile-card .bottom-block{padding:15px 20px;background-color:#fff}.profile-image{background:#e5e5e5;margin-bottom:15px;text-align:center}.profile-image .default-img,.profile-image img{display:inline-block;width:60px;height:60px;margin-bottom:10px;background-size:cover;text-align:center;background-position:center;border:6px solid #eee;border-radius:99em;-webkit-border-radius:99em;-moz-border-radius:99em;background-color:#eee}.profile-image .default-img{font-family:arial;color:#AAA;size:24px;line-height:22px;padding:15px;width:60px;height:60px}.profile-image .name{font-family:clearview-att_regular;font-size:18px;line-height:22px;color:#444;text-align:center;margin-bottom:5px;overflow:hidden;max-height:43px;word-break:break-word;white-space:normal}.profile-image .status-icon{border-radius:10px;border:1px solid #fff;margin:0 3px 0 0;width:10px;height:10px}.profile-image .status-icon.icon-green{background:#0c0}.profile-image .status-icon.icon-red{background:red}.profile-image .status-icon.icon-blue{background:#00f}.profile-image .status-icon.icon-yellow{background:#ff0}.profile-image .status{font-family:arial;font-size:12px;line-height:15px;text-align:center;margin:0 15px 0 0;color:#444}.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;border-radius:4px;font-size:11px}.profile-details{background:#fff}.profile-details label{display:block;font-family:arial;font-size:12px;color:#444;padding:0;margin:0}.profile-details p{margin:0;font-family:arial;font-size:12px;color:#444;padding-bottom:6.5px}.add-user{background:#e5e5e5;border-style:dotted;font:arial;size:18px;line-height:21.6px;color:#666}.add-user i{font-size:30px;padding-bottom:15px}.atcenter{padding-top:150px;text-align:center}.scroll-viewport{overflow:hidden;position:relative}.scroll-overview{position:absolute;left:0;top:0;padding:0;margin:0;width:100%;display:table}.scroll-bar{background-color:#eaeaea;border-radius:5px;position:absolute;z-index:10;-webkit-transition:.6s ease-in-out opacity;transition:.6s ease-in-out opacity}.scroll-bar.disable{display:none}.scroll-bar.visible,.scroll-bar:hover{opacity:1!important}.scroll-thumb{background-color:#067ab4;border-radius:5px;cursor:pointer;overflow:hidden;position:absolute;top:0;left:1px}body.scroll-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.next,.prev{position:absolute}.vertical .scroll-bar{top:0;right:0;width:8px;height:100%}.vertical .scroll-thumb{height:20px;width:6px}.vertical .prev{top:-70px;left:0}.vertical .next{bottom:-50px;left:0}.horizontal .scroll-bar{left:0;bottom:0;width:100%;height:8px;border-radius:0;background-color:transparent}.horizontal .scroll-thumb{height:6px;width:20px}.horizontal .prev{left:-26px;top:0;height:inherit;background-color:#999;margin:0;z-index:1;width:26px;border-radius:6px 0 0 6px}.horizontal .next{right:-26px;top:0;height:inherit;background-color:#999;margin:0;z-index:1;width:26px;box-shadow:-7px 0 0 rgba(0,0,0,.2);border-radius:0 6px 6px 0}.horizontal .next:hover,.horizontal .prev:hover{background:#067ab4}.horizontal .next a,.horizontal .prev a{background:inherit;display:block;margin-top:-14px;padding-bottom:20px;padding-top:20px;position:absolute;top:50%;border-radius:6px;color:#fff}.horizontal .next a{right:-15px}.horizontal .prev a{left:-15px}.container{padding-left:20px;padding-right:20px}.att--readless__link,.att--readmore__link,.link{-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;transition:all .3s ease-out;font-size:12px;font-size:.75rem;display:inline-block;vertical-align:baseline;zoom:1;*display:inline;*vertical-align:auto;color:#0574AC;cursor:pointer;line-height:15px;border-bottom:solid 1px}.att--readless__link:hover,.att--readmore__link:hover,.link:hover{color:#0091d9;border-bottom:dotted 1px}.link--large{font-size:14px;font-size:.875rem;line-height:20px}.link--right{*zoom:1;float:right}.link--right:after,.link--right:before{content:" ";display:table}.link--right:after{clear:both}.links-list__item,.links-list__item a{font-size:12px;font-size:.75rem;border-top:1px solid #444;cursor:pointer;display:block;line-height:30px}.links-list__item a a:hover,.links-list__item a:hover,.links-list__item:hover{color:#0091d9}.links-list__item a:first-child,.links-list__item:first-child{border:0}.links-list__item,.links-list__item a{color:#444;text-decoration:none}.link--visited,.link:visited{color:#0c2577;border-color:#0c2577;border-bottom:solid 1px}.link--visited:hover,.link:visited:hover{color:#0091d9;border-bottom:dotted 1px}.body-copy .link{font-size:14px;font-size:.875rem;font-family:arial;letter-spacing:0;line-height:17px}.att--readmore__link{margin-left:5px;margin-bottom:10px;-webkit-transition:width 2s ease,height 2s ease;-moz-transition:width 2s ease,height 2s ease;-o-transition:width 2s ease,height 2s ease;transition:width 2s ease,height 2s ease}.show-more-snippet{height:35px;width:300px;overflow:hidden}.wrapper{width:60%;margin:0 auto}.att--readMore{text-overflow:ellipsis;overflow:hidden;margin-bottom:20px;font-size:12px;font-size:.75rem;line-height:2;height:24px}.att--readLess{height:auto;overflow:visible;margin-bottom:20px;font-size:12px;font-size:.75rem;line-height:2}.navbar{position:fixed;top:0;right:0;left:0;z-index:2000;color:#f8f8f8;height:50px;font-size:12px;font-size:.75rem;background:#000;border:0;border-radius:0}.navbar-brand{display:block;line-height:50px;padding:0;font-size:12px;font-size:.75rem;font-weight:400;color:#f8f8f8;margin-left:0!important;padding-left:40px;background:url(images/logo.png) 0 center no-repeat}.nav{list-style:none;margin:0;padding:0}.navbar li{margin:0;float:left}.navbar li:first-child{margin-left:0}.navbar li>a{display:block;height:50px;line-height:50px;padding:0 10px;color:#bbb;-moz-box-sizing:border-box;box-sizing:border-box}.navbar li.active>a{border-bottom:4px solid #FC411E}.navbar li>a:focus,.navbar li>a:hover{background-color:#181818}.navbar li.active>a,.navbar li>a:hover{color:#f8f8f8}.navbar .dropdown{position:relative;margin:0 0 0 10px}.navbar .dropdown:hover>a{-webkit-transition:none;-moz-transition:none;transition:none;background-color:#474747}.navbar .dropdown:hover .dropdown-menu{display:block}.navbar .dropdown-menu{position:absolute;list-style:none;margin:0;padding:0;min-width:120px;display:none;border:0;border-radius:0}.pull-right .dropdown-menu{left:auto;right:0;top:100%;background-color:#474747}.navbar .dropdown-menu li{display:block;float:none;margin:0;width:100%}.navbar .dropdown-menu li a:hover{background-color:#FC411E}.att-tooltip{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;font-size:12px;font-size:.75rem;-webkit-transition:opacity .2s ease-out;-moz-transition:opacity .2s ease-out;transition:opacity .2s ease-out;box-shadow:0 4px 5px 0 rgba(0,0,0,.3);-webkit-box-shadow:0 4px 5px 0 rgba(0,0,0,.3);-moz-box-shadow:0 4px 5px 0 rgba(0,0,0,.3);background:#ddd;border-radius:5px;color:#444;display:block;line-height:15px;margin:10px 0 0;max-width:215px;opacity:0;padding:7px 10px;position:absolute;z-index:5}.att-tooltip:after,.att-tooltip:before{position:absolute;left:50%;content:'';margin-left:-7px;border:6px solid transparent}.att-tooltip:before{top:-12px;border-bottom-color:#ccc}.att-tooltip:after{top:-12px;border-bottom-color:#ddd}.att-tooltip--on{opacity:1}.att-tooltip--right{margin:0 0 0 10px}.att-tooltip--right:after,.att-tooltip--right:before{top:50%;left:-5px;margin-top:-7px;border-bottom-color:transparent}.att-tooltip--right:before{border-right-color:#ccc;left:-5px}.att-tooltip--right:after{border-right-color:#ddd}.att-tooltip--left{margin:0 0 0 -10px}.att-tooltip--left:after,.att-tooltip--left:before{top:50%;left:auto;right:-12px;margin-top:-7px;border-bottom-color:transparent}.att-tooltip--left:before{border-left-color:#ccc;right:-12px}.att-tooltip--left:after{border-left-color:#ddd}.att-tooltip--above{margin:-10px 0 0 0}.att-tooltip--above:after,.att-tooltip--above:before{top:auto;bottom:-12px;margin-top:-7px;border-bottom-color:transparent}.att-tooltip--above:before{border-top-color:#ccc;bottom:-12px}.att-tooltip--above:after{border-top-color:#ddd}.att-tooltip--light{background-color:#fefefe}.att-tooltip--light.att-tooltip--above:after{border-top-color:#fefefe}.att-tooltip--light.att-tooltip--below:after{border-bottom-color:#fefefe}.att-tooltip--light.att-tooltip--right:after{border-right-color:#fefefe}.att-tooltip--light.att-tooltip--left:after{border-left-color:#fefefe}.att-tooltip--dark{background-color:#6d6d6d;color:#fefefe}.att-tooltip--dark.att-tooltip--above:after{border-top-color:#6d6d6d}.att-tooltip--dark.att-tooltip--below:after{border-bottom-color:#6d6d6d}.att-tooltip--dark.att-tooltip--right:after{border-right-color:#6d6d6d}.att-tooltip--dark.att-tooltip--left:after{border-left-color:#6d6d6d}.att-tooltip--light--hover:hover{padding:6px 9px;border:1px solid #8d8d8d}.att-tooltip--light--hover:hover.att-tooltip--left:before{border-left-color:#8d8d8d;margin-right:-1px}.att-tooltip--light--hover:hover.att-tooltip--right:before{border-right-color:#8d8d8d;margin-left:-8px}.att-tooltip--light--hover:hover.att-tooltip--above:before{border-top-color:#8d8d8d;margin-bottom:-1px}.att-tooltip--light--hover:hover.att-tooltip--below:before{border-bottom-color:#8d8d8d;margin-top:-1px}.att-tooltip--dark--hover:hover{padding:6px 9px;border:1px solid #404040}.att-tooltip--dark--hover:hover.att-tooltip--left:before{border-left-color:#404040;margin-right:-1px}.att-tooltip--dark--hover:hover.att-tooltip--right:before{border-right-color:#404040;margin-left:-8px}.att-tooltip--dark--hover:hover.att-tooltip--above:before{border-top-color:#404040;margin-bottom:-1px}.att-tooltip--dark--hover:hover.att-tooltip--below:before{border-bottom-color:#404040;margin-top:-1px}.att-tooltip--active--dark{width:60px;min-width:60px;max-width:300px;background-color:#6d6d6d;color:#fff;border:0}.att-tooltip--active--dark:focus{outline:0}.att-tooltip--active--light{width:60px;min-width:60px;max-width:300px;background-color:#fefefe;border:0}.att-tooltip--active--light:focus{outline:0}.att-tooltip--textonly{background:0 0;border-color:transparent;padding:0}.att-tooltip--textonly:after,.att-tooltip--textonly:before{display:none}.button.button--small.att-tooltip--button{min-width:60px!important}.lt-ie9 .pop-over-caret--above{bottom:-5px!important}.lt-ie9 .pop-over-caret-border--above{bottom:-6px!important}.lt-ie9 .pop-over-caret--below{top:-5px!important}.lt-ie9 .pop-over-caret-border--below{top:-6px!important}.lt-ie9 .pop-over-caret--right{left:-5px!important}.lt-ie9 .pop-over-caret-border--right{left:-6px!important}.att-pop-over--above{margin:-10px 0 0 1px!important}.att-pop-over--left{margin:-7px 0 0 -6px!important}.att-pop-over--right{margin:-7px 0 0 6px!important}.att-popover{border:1px solid #d3d3d3;max-width:490px;padding:19px;pointer-events:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;font-size:12px;font-size:.75rem;-webkit-transition:opacity .2s ease-out;-moz-transition:opacity .2s ease-out;transition:opacity .2s ease-out;background:#fff;border-radius:5px;box-shadow:0 5px 6px 0 rgba(0,0,0,.25);color:#444;display:table;line-height:15px;margin:6px 0 0;min-height:29px;position:absolute!important;z-index:5;opacity:1}.att-popover:focus{outline:0}.att-popover .pop-over-caret{width:0;height:0;position:absolute}.att-popover .pop-over-caret.pop-over-caret-border--below{border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #d3d3d3;top:-7px;left:50%}.att-popover .pop-over-caret.pop-over-caret-border--above{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #d3d3d3;bottom:-7px;left:50%;margin-left:-7px}.att-popover .pop-over-caret.pop-over-caret-border--left{border-top:6px solid transparent;border-left:6px solid #d3d3d3;border-bottom:6px solid transparent;right:-6px;top:50%}.att-popover .pop-over-caret.pop-over-caret-border--right{border-right:6px solid #d3d3d3;border-top:6px solid transparent;border-bottom:6px solid transparent;left:-7px;top:50%}.att-popover .pop-over-caret.pop-over-caret--below{border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #f2f2f2;top:-6px;left:50%}.att-popover .pop-over-caret.pop-over-caret--above{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #f2f2f2;bottom:-6px;left:50%;margin-left:-7px}.att-popover .pop-over-caret.pop-over-caret--left{border-top:6px solid transparent;border-left:6px solid #f2f2f2;border-bottom:6px solid transparent;right:-5px;top:50%}.att-popover .pop-over-caret.pop-over-caret--right{border-right:6px solid #f2f2f2;border-top:6px solid transparent;border-bottom:6px solid transparent;left:-6px;top:50%}.att-popover .att--readless__link,.att-popover .att--readmore__link,.att-popover .link{color:#0574AC}.att-popover .att--readless__link:hover,.att-popover .att--readless__link:hover:visited,.att-popover .att--readmore__link:hover,.att-popover .att--readmore__link:hover:visited,.att-popover .link:hover,.att-popover .link:hover:visited{color:#0091d9}.att-popover .att--readless__link--visited,.att-popover .att--readless__link:visited,.att-popover .att--readmore__link--visited,.att-popover .att--readmore__link:visited,.att-popover .link--visited,.att-popover .link:visited{color:#0c2577}.att-popover .att--readless__link--visited:hover,.att-popover .att--readless__link:visited:hover,.att-popover .att--readmore__link--visited:hover,.att-popover .att--readmore__link:visited:hover,.att-popover .link--visited:hover,.att-popover .link:visited:hover{color:#0091d9}.att-tooltip.att-popover{pointer-events:auto}.att-popover-content{display:none!important;text-align:left}.att-popover--with-header.att-tooltip--below:below{display:none}.att-popover--with-header.att-tooltip--below:after{border-bottom-color:#0574AC}.att-popover.att-popover--value-selector{max-width:220px;padding:20px;text-align:center}.att-popover.att-popover--value-selector .att-color-selector__item{width:40px;height:40px;-webkit-transition:none;-moz-transition:none;transition:none;background:0 0;border:0;position:relative}.att-popover.att-popover--value-selector .att-color-selector__item:before{position:absolute;-webkit-transition:border-color .3s ease-out;-moz-transition:border-color .3s ease-out;transition:border-color .3s ease-out;border:3px solid transparent;border-radius:50%;content:''}.att-popover.att-popover--value-selector .att-color-selector__item .att-radio__indicator{-webkit-transform:scale3d(1,1,1);-moz-transform:scale3d(1,1,1);-ms-transform:scale3d(1,1,1);-o-transform:scale3d(1,1,1);transform:scale3d(1,1,1);width:38px;height:38px;border:1px solid #444;border-radius:38px;display:block;-ms-filter:none;filter:none;left:50%;margin:-19px 0 0 -19px;opacity:1;top:50%}.att-popover.att-popover--value-selector .att-radio--on.att-color-selector__item:before{border-color:#0574AC}.att-popover.att-popover--value-selector .att-radio--on.att-color-selector__item .att-radio__indicator{width:28px;height:28px;margin:-14px 0 0 -14px}.att-popover.att-popover--value-selector .att-radio.att-value-selector__item{width:40px;height:40px;background:0 0;border:2px solid transparent;color:#666;padding:1px}.att-popover.att-popover--value-selector .att-radio.att-value-selector__item .att-radio__indicator{-webkit-transform:none;-moz-transform:none;-ms-transform:none;-o-transform:none;transform:none;-webkit-transition:none;-moz-transition:none;transition:none;width:40px;height:40px;background:0 0;border:1px solid #666;border-radius:50%;color:#666;-ms-filter:none;filter:none;margin:0;opacity:1;padding-top:5px;position:static}.att-popover.att-popover--value-selector .att-radio--on.att-value-selector__item .att-radio__indicator{background:#0574AC;border-color:#0574AC;color:#fff}.att-popover__close{position:absolute;top:9px;right:9px;font-size:14px;font-size:.875rem;color:#444}.popover-demo .att-popover-content{display:block!important}.popover-demo .popover-packages__container{background:0 0}.popover-demo .popover-packages__container p{color:#444}.popover-demo .popover-packages__text-block{padding:5px 0 0}.popover-demo .popover-packages__text-block-row p{font-size:12px}.popover-demo hr{border-bottom:1px solid #b2b2b2;margin:10px 0 25px}.icon-close:before{content:'\e6d5'}.breadcrumbs{color:#444;height:50px;list-style:none;text-align:right}.breadcrumbs__item{display:inline-block;vertical-align:baseline;zoom:1;*display:inline;*vertical-align:auto}.breadcrumbs__item:before{font-size:11px;font-size:.6875rem;display:inline-block;zoom:1;*display:inline;*vertical-align:auto;content:'>';margin-left:10px;vertical-align:middle}.breadcrumbs__item:first-child:before{display:none}.breadcrumbs__link{font-size:12px;font-size:.75rem;font-family:arial;color:#666;margin-left:10px}.breadcrumbs__link:hover{color:#0574AC;text-decoration:underline}.breadcrumbs__link--active,.breadcrumbs__link--active:hover{color:#444;text-decoration:none}.pager{display:inline-block;vertical-align:baseline;zoom:1;*display:inline;*vertical-align:auto;font-size:0;list-style:none;margin:10px 0 0}.pager--dark{background-color:#000;padding:10px 10px 10px 5px}.pager__item{font-size:12px;font-size:.75rem;-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;transition:all .3s ease-out;display:inline-block;vertical-align:baseline;zoom:1;*display:inline;*vertical-align:auto;cursor:default;color:#4b4b4b;margin-left:12px;text-align:center;width:33px;height:33px;border-radius:6px;padding:7px}.pager__item [class^=icon-]{display:inline-block;vertical-align:baseline;zoom:1;*display:inline;*vertical-align:auto;font-size:12px;font-size:.75rem;color:#888}.pager__item--link{border-radius:50px;border:1px solid transparent;color:#4b4b4b;cursor:pointer}.pager__item--link:hover{background:#b2b2b2;color:#4b4b4b}.pager__item--active{background:#067AB4;color:#fff;cursor:default}.pager__item--active:hover{background:#b2b2b2;color:#4b4b4b}.pager__item--active:focus{color:#fff}.pager__item--input{color:#067ab4;margin-left:12px;padding-left:12px;padding-right:12px;text-align:center;max-width:40px;max-height:29px}.pager__item--next,.pager__item--prev{font-size:12px;cursor:pointer;padding:12px;color:#888}.pager__item--next:hover,.pager__item--prev:hover{background:0 0;border-color:none;color:#0574AC}.pager__item--next:hover [class^=icon-],.pager__item--prev:hover [class^=icon-]{color:#0574AC}.views-per-page__item--active a::after,.views-per-page__item--active:hover a::after{border-bottom-color:#0574ac;border-bottom-width:2px;color:#0574ac;opacity:1}.views-per-page{display:inline-block;font-size:0}.views-per-page__item{display:inline-block;font-size:14px;margin-left:3px;text-align:center;width:33px}.views-per-page__item a{color:#444;outline:0 none;position:relative}.views-per-page__item a:focus::before{opacity:1}.views-per-page__item a::after{border-bottom:1px solid #0091d9;bottom:0;content:"";left:0;opacity:0;position:absolute;right:0;top:18px;transition:all .2s ease-out 0s}.views-per-page__item a::before{border:1px solid #44c8f5;border-radius:0;bottom:auto;content:"";display:inline-block;height:38px;left:50%;margin:-19px;opacity:0;position:absolute;right:auto;top:50%;transform:scale3d(1,1,1);width:38px}.views-per-page__item:hover{cursor:pointer}.views-per-page__item:hover a{color:#0091d9}.views-per-page__item:hover a::after{opacity:1}.views-per-page__item:first-child{margin-left:0;width:auto}.views-per-page__item:first-child:hover{color:#444;cursor:inherit}.views-per-page__item:first-child:hover::after{opacity:0}.lt-ie9 .views-per-page__item a::after,.lt-ie9 .views-per-page__item a::before{content:none}.lt-ie9 .views-per-page__item a:focus::before,.lt-ie9 .views-per-page__item--active a::after,.lt-ie9 .views-per-page__item--active:hover a::after,.lt-ie9 .views-per-page__item:hover a::after{content:""}.views-per-page__item--active a,.views-per-page__item--active:hover a{color:#0574ac}.sidebar{width:230px;padding:15px;background-color:#f2f2f2}.sidebar>.nav{margin-top:30px}.sidebar .nav a{color:#6f6f6f;display:block;padding:2px 0}.sidebar .nav .nav{display:none;margin:0 0 10px}.sidebar .nav .nav a{font-size:12px;font-size:.75rem;color:#999}.sidebar .nav a:hover,.sidebar>.nav .active>a{color:#FC411E;text-decoration:underline}.sidebar>.nav>.active .nav{display:block}.steptracker{padding:0;font-size:0;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.steptracker-bg{padding:0;font-size:0;position:relative}.steptracker-bg:before{content:'';position:absolute;height:4px;background:#e5e5e5;top:50%;right:0;left:0;margin-top:-2px;width:100%}.steptracker-track .circle{display:block;max-width:40px;max-height:40px;padding:11px 0;-moz-box-sizing:border-box;box-sizing:border-box;background:#e5e5e5;border-radius:20px;position:relative;font-size:11px;font-size:.6875rem;line-height:15px;color:#999;text-align:center;border:1px solid transparent;z-index:2}.steptracker-track .circle span{display:block;font-size:10px;font-size:.625rem;line-height:20px;text-align:left;color:#999;position:absolute;height:18px;width:65px;top:18px;left:0;padding-top:20px;cursor:default}.steptracker-track .track{content:'';position:absolute;height:4px;top:50%;left:0;width:0;margin-top:-2px;margin-left:20px;background:#e5e5e5;border-radius:2px;-webkit-transition:all .2s ease-in-out 0s;-moz-transition:all .2s ease-in-out 0s;transition:all .2s ease-in-out 0s}.steptracker-track.incomplete .track{background:#e5e5e5}.steptracker-track.done .track{background:#1b7e28;width:100%}.steptracker-track.active .track{background:#0574ac}.lt-ie9 .steptracker-track .circle span{left:-20px}.steptracker-track .circle,.steptracker-track .circle span{-webkit-transition:background-color .3s ease-out,color .3s ease-out;-moz-transition:background-color .3s ease-out,color .3s ease-out;transition:background-color .3s ease-out,color .3s ease-out}.steptracker-track{display:inline-block;font-size:15px;font-size:.9375rem;position:relative}.steptracker-track.active:before,.steptracker-track.done:before{width:101%}.steptracker-track.last{margin-right:-40px;width:40px}.steptracker-track.done .circle{background:#1b7e28;color:#fff;cursor:pointer}.steptracker-track.done .circle:hover{background:#199ddf;color:#fff}.steptracker-track.done .circle span{color:#444;cursor:pointer}.steptracker-track.incomplete .circle{background:#e5e5e5;color:#999}.steptracker-track.done .circle span:hover{color:#199ddf}.steptracker-track.active .circle{background:#0574ac;color:#fff}.steptracker-track.active .circle:hover{background:#199ddf;color:#fff}.steptracker-track.active .circle span{color:#0574ac}.steptracker-track.disabled{pointer-events:none;cursor:not-allowed}.att-timeline{position:relative}.att-timeline .completed-color{background-color:#1B7E28}.att-timeline .alert-color{background-color:#E00000}.att-timeline .cancelled-color{background-color:#999}.att-timeline .completed-color-text{color:#1B7E28}.att-timeline .alert-color-text{color:#E00000}.att-timeline .cancelled-color-text{color:#666}.att-timeline .inactive-color-text{color:#AAA}.att-timeline .timeline-bar{width:30%;float:left;position:relative}.att-timeline .timeline-bar .progress-bar{width:100%;height:2px;position:relative;z-index:100}.att-timeline .timeline-bar hr{border:0;border-top:2px dotted #AAA;position:relative;top:-20px;z-index:50px}.att-timeline .timeline-dot{width:10px;height:30px;top:-4px;position:relative;float:left}.att-timeline .timeline-dot .bigger-circle{width:10px;height:10px;border-radius:25px;z-index:50;position:absolute;opacity:.5}.att-timeline .timeline-dot .inactive-circle{width:10px;height:10px;border-radius:25px;border:1px solid #AAA;background-color:#fff;z-index:100;position:absolute}.att-timeline .timeline-dot .expandable-circle{width:10px;height:10px;border-radius:25px;z-index:150;position:absolute}.att-timeline .timeline-dot .below-info-box{position:relative;top:10px;left:4.5px;width:auto;min-width:150px}.att-timeline .timeline-dot .below-info-box .vertical-line{border-left:1px solid #AAA;width:1px;height:25px}.att-timeline .timeline-dot .below-info-box .info-container .title{position:relative;font-size:18px;line-height:22px;z-index:100;width:50%;font-family:arial}.att-timeline .timeline-dot .below-info-box .info-container .current-step-title{position:relative;font-size:18px;line-height:22px;z-index:100;width:50%;font-family:arial}.att-timeline .timeline-dot .below-info-box .info-container .content{font-size:14px;color:#444;line-height:20px;position:relative}.att-timeline .timeline-dot .below-info-box .info-container .date{font-size:14px;color:#444;line-height:20px;position:relative;width:100%}.att-timeline .timeline-dot .above-info-box{position:relative;top:-105px;left:3.5px;width:auto;min-width:150px}.att-timeline .timeline-dot .above-info-box .vertical-line{border-left:1px solid #AAA;width:1px;height:25px}.att-timeline .timeline-dot .above-info-box .info-container .title{position:relative;font-size:18px;line-height:22px;z-index:100;width:50%;font-family:arial}.att-timeline .timeline-dot .above-info-box .info-container .current-step-title{position:relative;font-size:18px;line-height:22px;z-index:100;width:50%;font-family:arial}.att-timeline .timeline-dot .above-info-box .info-container .content{font-size:14px;color:#444;line-height:20px;position:relative}.att-timeline .timeline-dot .above-info-box .info-container .date{font-size:14px;color:#444;line-height:20px;position:relative;width:100%}.vertical-nav{padding:11px 0;font-family:arial;font-size:11px}.vertical-nav ul{display:block;margin:0;padding:0 0 0 7px}.vertical-nav ul.tickets-list-height{height:221px;overflow-y:hidden}.vertical-nav ul.tickets-list-height-auto{height:auto}.vertical-nav ul li{display:block;padding:0 0 0 20px;height:41px;border-left:solid 1px #666;margin-top:3px;position:relative}.vertical-nav ul li i{position:absolute;left:-8px;top:2px;background-color:#f2f2f2;outline:3px solid #f2f2f2;outline-offset:0}.vertical-nav ul li i.icon-ticket-regular{border-radius:100%;width:6px;height:6px;background-color:#666;top:3px;left:-4px}.vertical-nav ul li .ticket-title{font-family:arial;font-size:12px;line-height:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:45%}.vertical-nav ul li .ticket-title-regular{font-family:arial;font-size:11px;line-height:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:45%}.vertical-nav ul li .ticket-timestamp{font-size:11px;line-height:15px;padding:3px 0}.vertical-nav .view-log{position:absolute;right:0;bottom:4px}.vertical-nav .view-log a{text-decoration:underline}.tags__item{font-size:12px;font-size:.75rem;display:inline-block;vertical-align:baseline;zoom:1;*display:inline;*vertical-align:auto;border-radius:5px;border:1px solid #666;color:#444;margin:3px 5px 3px 0;padding:2px 10px}.tags__item a:hover{color:#666}.tags__item:last-child{margin-right:0}.tags__item:hover{background:#D3D3D3}.tags__item:active{background:#BBB}.tags__item:active>.tag__item--action,.tags__item:active>.tags__item--icon,.tags__item:hover>.tags__item--action,.tags__item:hover>.tags__item--icon{color:#444;border-color:#444}.tags__item.tags__item--color{border:1px solid #118817}.tags__item.tags__item--color .tags__item--title{padding-left:18px}.tags__item.tags__item--color .tags__item--color-icon{background:#118817;border:1px solid #118817;border-radius:100%;cursor:pointer;height:12px;width:12px;margin:6px 0 0;position:absolute;z-index:1}.tags__item.tags__item--color .active{background:#118817;color:#fff}.tags__item.tags__item--color .active>.tags__item--action{color:#fff;border-left:1px solid #fff}.tags__item.tags__item--color .active>.tags__item--color-icon,.tags__item.tags__item--color:hover>.tags__item--color-icon{border:1px solid #fff}.tags__item.tags__item--color:active{background:#118817;color:#fff}.tags__item.tags__item--color:active>.tags__item--action{color:#fff;border-left:1px solid #fff}.tags__item.tags__item--color:active>.tags__item--color-icon{border:1px solid #fff}.tags__item.tags__item--small{height:24px;padding:0 10px}.tags__item.tags__item--cloud .active{background:#157BB2;border-color:#157BB2}.tags__item.tags__item--cloud .active>.tags__item--icon,.tags__item.tags__item--cloud .active>.tags__item--title{color:#fff}.tags__item.tags__item--cloud:active{background:#157BB2;border-color:#157BB2}.tags__item.tags__item--cloud:active>.tags__item--icon,.tags__item.tags__item--cloud:active>.tags__item--title{color:#fff}.tags__item--action,.tags__item--icon,.tags__item--title{-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;transition:all .3s ease-out;font-size:14px;font-size:.875rem;line-height:1.7142857143;vertical-align:middle;margin:0}.tags__item--icon{font-size:14px;font-size:.875rem;line-height:1.7142857143;color:#888}.tags__item--action{border-left:1px solid #888;color:#888;cursor:pointer;margin-left:5px;text-align:center;width:18px}.tags__item--action [class^=icon-]{font-size:14px;font-size:.875rem;display:inline-block;zoom:1;*display:inline;*vertical-align:auto;margin-left:5px;margin-top:-2px;vertical-align:middle;width:14px}.lt-ie9 .tags__item--action [class^=icon-]{margin-top:4px}.att-progress{height:21px;background-color:#ddd;border-radius:21px;position:relative}.att-progress-value{border-radius:27px;background-color:#067ab4;width:0;min-width:21px;height:21px;-webkit-mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC);-webkit-animation:att-progress 1s ease-out 0s infinite alternate,att-progress-width 10s ease-out infinite;-moz-animation:att-progress 1s ease-out 0s infinite alternate,att-progress-width 10s ease-out infinite;animation:att-progress 1s ease-out 0s infinite alternate,att-progress-width 10s ease-out infinite}@-webkit-keyframes att-progress{from{background-color:#067ab4}to{background-color:#199ddf}}@-moz-keyframes att-progress{from{background-color:#067ab4}to{background-color:#199ddf}}@keyframes att-progress{from{background-color:#067ab4}to{background-color:#199ddf}}@-webkit-keyframes att-progress-width{0%{width:0}100%,70%{width:100%}}@-moz-keyframes att-progress-width{0%{width:0}100%,70%{width:100%}}@keyframes att-progress-width{0%{width:0}100%,70%{width:100%}}.loader{display:inline-block;vertical-align:middle;background:url(images/loader.gif) center center no-repeat;min-width:75px;min-height:75px}.loading{display:inline-block;vertical-align:baseline;zoom:1;*display:inline;*vertical-align:auto}.loading .loading__inside,.loading:after,.loading:before{-webkit-animation:loading-item 1s infinite ease-out;-moz-animation:loading-item 1s infinite ease-out;animation:loading-item 1s infinite ease-out;width:8px;height:8px;display:inline-block;zoom:1;*display:inline;*vertical-align:auto;background:#000;border-radius:50%;content:'';margin-left:6px;vertical-align:middle}.loading:before{-webkit-animation-delay:1s;-moz-animation-delay:1s;animation-delay:1s;margin-left:0}.loading .loading__inside{-webkit-animation-delay:1.2s;-moz-animation-delay:1.2s;animation-delay:1.2s}.loading:after{-webkit-animation-delay:1.4s;-moz-animation-delay:1.4s;animation-delay:1.4s}.ie .loading{width:46px;height:20px;background:url(images/loading_balls_black.gif) center center no-repeat}.ie .loading .loading__inside,.ie .loading:after,.ie .loading:before{display:none}.loading--small .loading__inside,.loading--small:after,.loading--small:before{width:5px;height:5px;margin-left:4px}.ie .loading--small{width:37px;height:18px;background:url(images/loading_balls_black-small.gif) center center no-repeat}.ie .loading--small.att-loading--blue{background:url(images/loading_balls_blue-small.gif) center center no-repeat}.ie .loading--small.att-loading--white{background:url(images/loading_balls_white-small.gif) center center no-repeat}@-webkit-keyframes loading-item{0%{-webkit-transform:scale(1)}20%{-webkit-transform:scale(.8)}40%,60%{-webkit-transform:scale(.6)}80%{-webkit-transform:scale(.8)}100%{-webkit-transform:scale(1)}}@-moz-keyframes loading-item{0%{-moz-transform:scale(1)}20%{-moz-transform:scale(.8)}40%,60%{-moz-transform:scale(.6)}80%{-moz-transform:scale(.8)}100%{-moz-transform:scale(1)}}@-o-keyframes loading-item{0%{-o-transform:scale(1)}20%{-o-transform:scale(.8)}40%,60%{-o-transform:scale(.6)}80%{-o-transform:scale(.8)}100%{-o-transform:scale(1)}}@keyframes loading-item{0%{transform:scale(1)}20%{transform:scale(.8)}40%,60%{transform:scale(.6)}80%{transform:scale(.8)}100%{transform:scale(1)}}.att-loading-count{display:inline-block;vertical-align:baseline;zoom:1;*display:inline;*vertical-align:auto;background-color:transparent;border-radius:50%;height:36px;position:relative;width:36px}.att-loading-count .att-loading-circle__fill,.att-loading-count .att-loading-circle__mask{height:36px;position:absolute;width:36px;-webkit-transition:transform 1s;-moz-transition:transform 1s;transition:transform 1s;-webkit-backface-visibility:hidden;border-radius:50%}.att-loading-count .att-loading-circle__mask{clip:rect(0,36px,36px,18px)}.att-loading-count .att-loading-circle__mask .att-loading-circle__fill{background-color:#444;clip:rect(0,18px,36px,0)}.att-loading-count .att-loading-inset{background-color:#f2f2f2;border-radius:50%;height:32px;left:0;margin-left:2px;margin-top:2px;position:absolute;top:0;width:32px}.lt-ie9 .att-loading-count .att-loading-inset{height:0;width:0}.att-loading-count .att-loading-inset__percentage{position:absolute;top:10px;left:1px;color:#444;font-size:12px;font-weight:800;line-height:1;text-align:center;width:30px}.att-loading-count[data-progress="0"] .att-loading-circle__fill,.att-loading-count[data-progress="0"] .att-loading-circle__fill.att-loading-circle__fix,.att-loading-count[data-progress="0"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}.att-loading-count[data-progress="0"] .att-loading-inset .att-loading-inset__percentage:before{content:"0"}.att-loading-count[data-progress="1"] .att-loading-circle__fill,.att-loading-count[data-progress="1"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(1.8deg);-moz-transform:rotate(1.8deg);-ms-transform:rotate(1.8deg);-o-transform:rotate(1.8deg);transform:rotate(1.8deg)}.att-loading-count[data-progress="1"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(3.6deg);-moz-transform:rotate(3.6deg);-ms-transform:rotate(3.6deg);-o-transform:rotate(3.6deg);transform:rotate(3.6deg)}.att-loading-count[data-progress="1"] .att-loading-inset .att-loading-inset__percentage:before{content:"1"}.att-loading-count[data-progress="2"] .att-loading-circle__fill,.att-loading-count[data-progress="2"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(3.6deg);-moz-transform:rotate(3.6deg);-ms-transform:rotate(3.6deg);-o-transform:rotate(3.6deg);transform:rotate(3.6deg)}.att-loading-count[data-progress="2"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(7.2deg);-moz-transform:rotate(7.2deg);-ms-transform:rotate(7.2deg);-o-transform:rotate(7.2deg);transform:rotate(7.2deg)}.att-loading-count[data-progress="2"] .att-loading-inset .att-loading-inset__percentage:before{content:"2"}.att-loading-count[data-progress="3"] .att-loading-circle__fill,.att-loading-count[data-progress="3"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(5.4deg);-moz-transform:rotate(5.4deg);-ms-transform:rotate(5.4deg);-o-transform:rotate(5.4deg);transform:rotate(5.4deg)}.att-loading-count[data-progress="3"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(10.8deg);-moz-transform:rotate(10.8deg);-ms-transform:rotate(10.8deg);-o-transform:rotate(10.8deg);transform:rotate(10.8deg)}.att-loading-count[data-progress="3"] .att-loading-inset .att-loading-inset__percentage:before{content:"3"}.att-loading-count[data-progress="4"] .att-loading-circle__fill,.att-loading-count[data-progress="4"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(7.2deg);-moz-transform:rotate(7.2deg);-ms-transform:rotate(7.2deg);-o-transform:rotate(7.2deg);transform:rotate(7.2deg)}.att-loading-count[data-progress="4"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(14.4deg);-moz-transform:rotate(14.4deg);-ms-transform:rotate(14.4deg);-o-transform:rotate(14.4deg);transform:rotate(14.4deg)}.att-loading-count[data-progress="4"] .att-loading-inset .att-loading-inset__percentage:before{content:"4"}.att-loading-count[data-progress="5"] .att-loading-circle__fill,.att-loading-count[data-progress="5"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(9deg);-moz-transform:rotate(9deg);-ms-transform:rotate(9deg);-o-transform:rotate(9deg);transform:rotate(9deg)}.att-loading-count[data-progress="5"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(18deg);-moz-transform:rotate(18deg);-ms-transform:rotate(18deg);-o-transform:rotate(18deg);transform:rotate(18deg)}.att-loading-count[data-progress="5"] .att-loading-inset .att-loading-inset__percentage:before{content:"5"}.att-loading-count[data-progress="6"] .att-loading-circle__fill,.att-loading-count[data-progress="6"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(10.8deg);-moz-transform:rotate(10.8deg);-ms-transform:rotate(10.8deg);-o-transform:rotate(10.8deg);transform:rotate(10.8deg)}.att-loading-count[data-progress="6"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(21.6deg);-moz-transform:rotate(21.6deg);-ms-transform:rotate(21.6deg);-o-transform:rotate(21.6deg);transform:rotate(21.6deg)}.att-loading-count[data-progress="6"] .att-loading-inset .att-loading-inset__percentage:before{content:"6"}.att-loading-count[data-progress="7"] .att-loading-circle__fill,.att-loading-count[data-progress="7"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(12.6deg);-moz-transform:rotate(12.6deg);-ms-transform:rotate(12.6deg);-o-transform:rotate(12.6deg);transform:rotate(12.6deg)}.att-loading-count[data-progress="7"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(25.2deg);-moz-transform:rotate(25.2deg);-ms-transform:rotate(25.2deg);-o-transform:rotate(25.2deg);transform:rotate(25.2deg)}.att-loading-count[data-progress="7"] .att-loading-inset .att-loading-inset__percentage:before{content:"7"}.att-loading-count[data-progress="8"] .att-loading-circle__fill,.att-loading-count[data-progress="8"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(14.4deg);-moz-transform:rotate(14.4deg);-ms-transform:rotate(14.4deg);-o-transform:rotate(14.4deg);transform:rotate(14.4deg)}.att-loading-count[data-progress="8"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(28.8deg);-moz-transform:rotate(28.8deg);-ms-transform:rotate(28.8deg);-o-transform:rotate(28.8deg);transform:rotate(28.8deg)}.att-loading-count[data-progress="8"] .att-loading-inset .att-loading-inset__percentage:before{content:"8"}.att-loading-count[data-progress="9"] .att-loading-circle__fill,.att-loading-count[data-progress="9"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(16.2deg);-moz-transform:rotate(16.2deg);-ms-transform:rotate(16.2deg);-o-transform:rotate(16.2deg);transform:rotate(16.2deg)}.att-loading-count[data-progress="9"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(32.4deg);-moz-transform:rotate(32.4deg);-ms-transform:rotate(32.4deg);-o-transform:rotate(32.4deg);transform:rotate(32.4deg)}.att-loading-count[data-progress="9"] .att-loading-inset .att-loading-inset__percentage:before{content:"9"}.att-loading-count[data-progress="10"] .att-loading-circle__fill,.att-loading-count[data-progress="10"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(18deg);-moz-transform:rotate(18deg);-ms-transform:rotate(18deg);-o-transform:rotate(18deg);transform:rotate(18deg)}.att-loading-count[data-progress="10"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(36deg);-moz-transform:rotate(36deg);-ms-transform:rotate(36deg);-o-transform:rotate(36deg);transform:rotate(36deg)}.att-loading-count[data-progress="10"] .att-loading-inset .att-loading-inset__percentage:before{content:"10"}.att-loading-count[data-progress="11"] .att-loading-circle__fill,.att-loading-count[data-progress="11"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(19.8deg);-moz-transform:rotate(19.8deg);-ms-transform:rotate(19.8deg);-o-transform:rotate(19.8deg);transform:rotate(19.8deg)}.att-loading-count[data-progress="11"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(39.6deg);-moz-transform:rotate(39.6deg);-ms-transform:rotate(39.6deg);-o-transform:rotate(39.6deg);transform:rotate(39.6deg)}.att-loading-count[data-progress="11"] .att-loading-inset .att-loading-inset__percentage:before{content:"11"}.att-loading-count[data-progress="12"] .att-loading-circle__fill,.att-loading-count[data-progress="12"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(21.6deg);-moz-transform:rotate(21.6deg);-ms-transform:rotate(21.6deg);-o-transform:rotate(21.6deg);transform:rotate(21.6deg)}.att-loading-count[data-progress="12"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(43.2deg);-moz-transform:rotate(43.2deg);-ms-transform:rotate(43.2deg);-o-transform:rotate(43.2deg);transform:rotate(43.2deg)}.att-loading-count[data-progress="12"] .att-loading-inset .att-loading-inset__percentage:before{content:"12"}.att-loading-count[data-progress="13"] .att-loading-circle__fill,.att-loading-count[data-progress="13"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(23.4deg);-moz-transform:rotate(23.4deg);-ms-transform:rotate(23.4deg);-o-transform:rotate(23.4deg);transform:rotate(23.4deg)}.att-loading-count[data-progress="13"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(46.8deg);-moz-transform:rotate(46.8deg);-ms-transform:rotate(46.8deg);-o-transform:rotate(46.8deg);transform:rotate(46.8deg)}.att-loading-count[data-progress="13"] .att-loading-inset .att-loading-inset__percentage:before{content:"13"}.att-loading-count[data-progress="14"] .att-loading-circle__fill,.att-loading-count[data-progress="14"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(25.2deg);-moz-transform:rotate(25.2deg);-ms-transform:rotate(25.2deg);-o-transform:rotate(25.2deg);transform:rotate(25.2deg)}.att-loading-count[data-progress="14"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(50.4deg);-moz-transform:rotate(50.4deg);-ms-transform:rotate(50.4deg);-o-transform:rotate(50.4deg);transform:rotate(50.4deg)}.att-loading-count[data-progress="14"] .att-loading-inset .att-loading-inset__percentage:before{content:"14"}.att-loading-count[data-progress="15"] .att-loading-circle__fill,.att-loading-count[data-progress="15"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(27deg);-moz-transform:rotate(27deg);-ms-transform:rotate(27deg);-o-transform:rotate(27deg);transform:rotate(27deg)}.att-loading-count[data-progress="15"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(54deg);-moz-transform:rotate(54deg);-ms-transform:rotate(54deg);-o-transform:rotate(54deg);transform:rotate(54deg)}.att-loading-count[data-progress="15"] .att-loading-inset .att-loading-inset__percentage:before{content:"15"}.att-loading-count[data-progress="16"] .att-loading-circle__fill,.att-loading-count[data-progress="16"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(28.8deg);-moz-transform:rotate(28.8deg);-ms-transform:rotate(28.8deg);-o-transform:rotate(28.8deg);transform:rotate(28.8deg)}.att-loading-count[data-progress="16"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(57.6deg);-moz-transform:rotate(57.6deg);-ms-transform:rotate(57.6deg);-o-transform:rotate(57.6deg);transform:rotate(57.6deg)}.att-loading-count[data-progress="16"] .att-loading-inset .att-loading-inset__percentage:before{content:"16"}.att-loading-count[data-progress="17"] .att-loading-circle__fill,.att-loading-count[data-progress="17"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(30.6deg);-moz-transform:rotate(30.6deg);-ms-transform:rotate(30.6deg);-o-transform:rotate(30.6deg);transform:rotate(30.6deg)}.att-loading-count[data-progress="17"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(61.2deg);-moz-transform:rotate(61.2deg);-ms-transform:rotate(61.2deg);-o-transform:rotate(61.2deg);transform:rotate(61.2deg)}.att-loading-count[data-progress="17"] .att-loading-inset .att-loading-inset__percentage:before{content:"17"}.att-loading-count[data-progress="18"] .att-loading-circle__fill,.att-loading-count[data-progress="18"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(32.4deg);-moz-transform:rotate(32.4deg);-ms-transform:rotate(32.4deg);-o-transform:rotate(32.4deg);transform:rotate(32.4deg)}.att-loading-count[data-progress="18"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(64.8deg);-moz-transform:rotate(64.8deg);-ms-transform:rotate(64.8deg);-o-transform:rotate(64.8deg);transform:rotate(64.8deg)}.att-loading-count[data-progress="18"] .att-loading-inset .att-loading-inset__percentage:before{content:"18"}.att-loading-count[data-progress="19"] .att-loading-circle__fill,.att-loading-count[data-progress="19"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(34.2deg);-moz-transform:rotate(34.2deg);-ms-transform:rotate(34.2deg);-o-transform:rotate(34.2deg);transform:rotate(34.2deg)}.att-loading-count[data-progress="19"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(68.4deg);-moz-transform:rotate(68.4deg);-ms-transform:rotate(68.4deg);-o-transform:rotate(68.4deg);transform:rotate(68.4deg)}.att-loading-count[data-progress="19"] .att-loading-inset .att-loading-inset__percentage:before{content:"19"}.att-loading-count[data-progress="20"] .att-loading-circle__fill,.att-loading-count[data-progress="20"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(36deg);-moz-transform:rotate(36deg);-ms-transform:rotate(36deg);-o-transform:rotate(36deg);transform:rotate(36deg)}.att-loading-count[data-progress="20"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(72deg);-moz-transform:rotate(72deg);-ms-transform:rotate(72deg);-o-transform:rotate(72deg);transform:rotate(72deg)}.att-loading-count[data-progress="20"] .att-loading-inset .att-loading-inset__percentage:before{content:"20"}.att-loading-count[data-progress="21"] .att-loading-circle__fill,.att-loading-count[data-progress="21"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(37.8deg);-moz-transform:rotate(37.8deg);-ms-transform:rotate(37.8deg);-o-transform:rotate(37.8deg);transform:rotate(37.8deg)}.att-loading-count[data-progress="21"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(75.6deg);-moz-transform:rotate(75.6deg);-ms-transform:rotate(75.6deg);-o-transform:rotate(75.6deg);transform:rotate(75.6deg)}.att-loading-count[data-progress="21"] .att-loading-inset .att-loading-inset__percentage:before{content:"21"}.att-loading-count[data-progress="22"] .att-loading-circle__fill,.att-loading-count[data-progress="22"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(39.6deg);-moz-transform:rotate(39.6deg);-ms-transform:rotate(39.6deg);-o-transform:rotate(39.6deg);transform:rotate(39.6deg)}.att-loading-count[data-progress="22"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(79.2deg);-moz-transform:rotate(79.2deg);-ms-transform:rotate(79.2deg);-o-transform:rotate(79.2deg);transform:rotate(79.2deg)}.att-loading-count[data-progress="22"] .att-loading-inset .att-loading-inset__percentage:before{content:"22"}.att-loading-count[data-progress="23"] .att-loading-circle__fill,.att-loading-count[data-progress="23"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(41.4deg);-moz-transform:rotate(41.4deg);-ms-transform:rotate(41.4deg);-o-transform:rotate(41.4deg);transform:rotate(41.4deg)}.att-loading-count[data-progress="23"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(82.8deg);-moz-transform:rotate(82.8deg);-ms-transform:rotate(82.8deg);-o-transform:rotate(82.8deg);transform:rotate(82.8deg)}.att-loading-count[data-progress="23"] .att-loading-inset .att-loading-inset__percentage:before{content:"23"}.att-loading-count[data-progress="24"] .att-loading-circle__fill,.att-loading-count[data-progress="24"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(43.2deg);-moz-transform:rotate(43.2deg);-ms-transform:rotate(43.2deg);-o-transform:rotate(43.2deg);transform:rotate(43.2deg)}.att-loading-count[data-progress="24"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(86.4deg);-moz-transform:rotate(86.4deg);-ms-transform:rotate(86.4deg);-o-transform:rotate(86.4deg);transform:rotate(86.4deg)}.att-loading-count[data-progress="24"] .att-loading-inset .att-loading-inset__percentage:before{content:"24"}.att-loading-count[data-progress="25"] .att-loading-circle__fill,.att-loading-count[data-progress="25"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.att-loading-count[data-progress="25"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.att-loading-count[data-progress="25"] .att-loading-inset .att-loading-inset__percentage:before{content:"25"}.att-loading-count[data-progress="26"] .att-loading-circle__fill,.att-loading-count[data-progress="26"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(46.8deg);-moz-transform:rotate(46.8deg);-ms-transform:rotate(46.8deg);-o-transform:rotate(46.8deg);transform:rotate(46.8deg)}.att-loading-count[data-progress="26"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(93.6deg);-moz-transform:rotate(93.6deg);-ms-transform:rotate(93.6deg);-o-transform:rotate(93.6deg);transform:rotate(93.6deg)}.att-loading-count[data-progress="26"] .att-loading-inset .att-loading-inset__percentage:before{content:"26"}.att-loading-count[data-progress="27"] .att-loading-circle__fill,.att-loading-count[data-progress="27"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(48.6deg);-moz-transform:rotate(48.6deg);-ms-transform:rotate(48.6deg);-o-transform:rotate(48.6deg);transform:rotate(48.6deg)}.att-loading-count[data-progress="27"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(97.2deg);-moz-transform:rotate(97.2deg);-ms-transform:rotate(97.2deg);-o-transform:rotate(97.2deg);transform:rotate(97.2deg)}.att-loading-count[data-progress="27"] .att-loading-inset .att-loading-inset__percentage:before{content:"27"}.att-loading-count[data-progress="28"] .att-loading-circle__fill,.att-loading-count[data-progress="28"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(50.4deg);-moz-transform:rotate(50.4deg);-ms-transform:rotate(50.4deg);-o-transform:rotate(50.4deg);transform:rotate(50.4deg)}.att-loading-count[data-progress="28"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(100.8deg);-moz-transform:rotate(100.8deg);-ms-transform:rotate(100.8deg);-o-transform:rotate(100.8deg);transform:rotate(100.8deg)}.att-loading-count[data-progress="28"] .att-loading-inset .att-loading-inset__percentage:before{content:"28"}.att-loading-count[data-progress="29"] .att-loading-circle__fill,.att-loading-count[data-progress="29"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(52.2deg);-moz-transform:rotate(52.2deg);-ms-transform:rotate(52.2deg);-o-transform:rotate(52.2deg);transform:rotate(52.2deg)}.att-loading-count[data-progress="29"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(104.4deg);-moz-transform:rotate(104.4deg);-ms-transform:rotate(104.4deg);-o-transform:rotate(104.4deg);transform:rotate(104.4deg)}.att-loading-count[data-progress="29"] .att-loading-inset .att-loading-inset__percentage:before{content:"29"}.att-loading-count[data-progress="30"] .att-loading-circle__fill,.att-loading-count[data-progress="30"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(54deg);-moz-transform:rotate(54deg);-ms-transform:rotate(54deg);-o-transform:rotate(54deg);transform:rotate(54deg)}.att-loading-count[data-progress="30"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(108deg);-moz-transform:rotate(108deg);-ms-transform:rotate(108deg);-o-transform:rotate(108deg);transform:rotate(108deg)}.att-loading-count[data-progress="30"] .att-loading-inset .att-loading-inset__percentage:before{content:"30"}.att-loading-count[data-progress="31"] .att-loading-circle__fill,.att-loading-count[data-progress="31"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(55.8deg);-moz-transform:rotate(55.8deg);-ms-transform:rotate(55.8deg);-o-transform:rotate(55.8deg);transform:rotate(55.8deg)}.att-loading-count[data-progress="31"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(111.6deg);-moz-transform:rotate(111.6deg);-ms-transform:rotate(111.6deg);-o-transform:rotate(111.6deg);transform:rotate(111.6deg)}.att-loading-count[data-progress="31"] .att-loading-inset .att-loading-inset__percentage:before{content:"31"}.att-loading-count[data-progress="32"] .att-loading-circle__fill,.att-loading-count[data-progress="32"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(57.6deg);-moz-transform:rotate(57.6deg);-ms-transform:rotate(57.6deg);-o-transform:rotate(57.6deg);transform:rotate(57.6deg)}.att-loading-count[data-progress="32"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(115.2deg);-moz-transform:rotate(115.2deg);-ms-transform:rotate(115.2deg);-o-transform:rotate(115.2deg);transform:rotate(115.2deg)}.att-loading-count[data-progress="32"] .att-loading-inset .att-loading-inset__percentage:before{content:"32"}.att-loading-count[data-progress="33"] .att-loading-circle__fill,.att-loading-count[data-progress="33"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(59.4deg);-moz-transform:rotate(59.4deg);-ms-transform:rotate(59.4deg);-o-transform:rotate(59.4deg);transform:rotate(59.4deg)}.att-loading-count[data-progress="33"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(118.8deg);-moz-transform:rotate(118.8deg);-ms-transform:rotate(118.8deg);-o-transform:rotate(118.8deg);transform:rotate(118.8deg)}.att-loading-count[data-progress="33"] .att-loading-inset .att-loading-inset__percentage:before{content:"33"}.att-loading-count[data-progress="34"] .att-loading-circle__fill,.att-loading-count[data-progress="34"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(61.2deg);-moz-transform:rotate(61.2deg);-ms-transform:rotate(61.2deg);-o-transform:rotate(61.2deg);transform:rotate(61.2deg)}.att-loading-count[data-progress="34"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(122.4deg);-moz-transform:rotate(122.4deg);-ms-transform:rotate(122.4deg);-o-transform:rotate(122.4deg);transform:rotate(122.4deg)}.att-loading-count[data-progress="34"] .att-loading-inset .att-loading-inset__percentage:before{content:"34"}.att-loading-count[data-progress="35"] .att-loading-circle__fill,.att-loading-count[data-progress="35"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(63deg);-moz-transform:rotate(63deg);-ms-transform:rotate(63deg);-o-transform:rotate(63deg);transform:rotate(63deg)}.att-loading-count[data-progress="35"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(126deg);-moz-transform:rotate(126deg);-ms-transform:rotate(126deg);-o-transform:rotate(126deg);transform:rotate(126deg)}.att-loading-count[data-progress="35"] .att-loading-inset .att-loading-inset__percentage:before{content:"35"}.att-loading-count[data-progress="36"] .att-loading-circle__fill,.att-loading-count[data-progress="36"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(64.8deg);-moz-transform:rotate(64.8deg);-ms-transform:rotate(64.8deg);-o-transform:rotate(64.8deg);transform:rotate(64.8deg)}.att-loading-count[data-progress="36"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(129.6deg);-moz-transform:rotate(129.6deg);-ms-transform:rotate(129.6deg);-o-transform:rotate(129.6deg);transform:rotate(129.6deg)}.att-loading-count[data-progress="36"] .att-loading-inset .att-loading-inset__percentage:before{content:"36"}.att-loading-count[data-progress="37"] .att-loading-circle__fill,.att-loading-count[data-progress="37"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(66.6deg);-moz-transform:rotate(66.6deg);-ms-transform:rotate(66.6deg);-o-transform:rotate(66.6deg);transform:rotate(66.6deg)}.att-loading-count[data-progress="37"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(133.2deg);-moz-transform:rotate(133.2deg);-ms-transform:rotate(133.2deg);-o-transform:rotate(133.2deg);transform:rotate(133.2deg)}.att-loading-count[data-progress="37"] .att-loading-inset .att-loading-inset__percentage:before{content:"37"}.att-loading-count[data-progress="38"] .att-loading-circle__fill,.att-loading-count[data-progress="38"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(68.4deg);-moz-transform:rotate(68.4deg);-ms-transform:rotate(68.4deg);-o-transform:rotate(68.4deg);transform:rotate(68.4deg)}.att-loading-count[data-progress="38"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(136.8deg);-moz-transform:rotate(136.8deg);-ms-transform:rotate(136.8deg);-o-transform:rotate(136.8deg);transform:rotate(136.8deg)}.att-loading-count[data-progress="38"] .att-loading-inset .att-loading-inset__percentage:before{content:"38"}.att-loading-count[data-progress="39"] .att-loading-circle__fill,.att-loading-count[data-progress="39"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(70.2deg);-moz-transform:rotate(70.2deg);-ms-transform:rotate(70.2deg);-o-transform:rotate(70.2deg);transform:rotate(70.2deg)}.att-loading-count[data-progress="39"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(140.4deg);-moz-transform:rotate(140.4deg);-ms-transform:rotate(140.4deg);-o-transform:rotate(140.4deg);transform:rotate(140.4deg)}.att-loading-count[data-progress="39"] .att-loading-inset .att-loading-inset__percentage:before{content:"39"}.att-loading-count[data-progress="40"] .att-loading-circle__fill,.att-loading-count[data-progress="40"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(72deg);-moz-transform:rotate(72deg);-ms-transform:rotate(72deg);-o-transform:rotate(72deg);transform:rotate(72deg)}.att-loading-count[data-progress="40"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(144deg);-moz-transform:rotate(144deg);-ms-transform:rotate(144deg);-o-transform:rotate(144deg);transform:rotate(144deg)}.att-loading-count[data-progress="40"] .att-loading-inset .att-loading-inset__percentage:before{content:"40"}.att-loading-count[data-progress="41"] .att-loading-circle__fill,.att-loading-count[data-progress="41"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(73.8deg);-moz-transform:rotate(73.8deg);-ms-transform:rotate(73.8deg);-o-transform:rotate(73.8deg);transform:rotate(73.8deg)}.att-loading-count[data-progress="41"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(147.6deg);-moz-transform:rotate(147.6deg);-ms-transform:rotate(147.6deg);-o-transform:rotate(147.6deg);transform:rotate(147.6deg)}.att-loading-count[data-progress="41"] .att-loading-inset .att-loading-inset__percentage:before{content:"41"}.att-loading-count[data-progress="42"] .att-loading-circle__fill,.att-loading-count[data-progress="42"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(75.6deg);-moz-transform:rotate(75.6deg);-ms-transform:rotate(75.6deg);-o-transform:rotate(75.6deg);transform:rotate(75.6deg)}.att-loading-count[data-progress="42"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(151.2deg);-moz-transform:rotate(151.2deg);-ms-transform:rotate(151.2deg);-o-transform:rotate(151.2deg);transform:rotate(151.2deg)}.att-loading-count[data-progress="42"] .att-loading-inset .att-loading-inset__percentage:before{content:"42"}.att-loading-count[data-progress="43"] .att-loading-circle__fill,.att-loading-count[data-progress="43"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(77.4deg);-moz-transform:rotate(77.4deg);-ms-transform:rotate(77.4deg);-o-transform:rotate(77.4deg);transform:rotate(77.4deg)}.att-loading-count[data-progress="43"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(154.8deg);-moz-transform:rotate(154.8deg);-ms-transform:rotate(154.8deg);-o-transform:rotate(154.8deg);transform:rotate(154.8deg)}.att-loading-count[data-progress="43"] .att-loading-inset .att-loading-inset__percentage:before{content:"43"}.att-loading-count[data-progress="44"] .att-loading-circle__fill,.att-loading-count[data-progress="44"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(79.2deg);-moz-transform:rotate(79.2deg);-ms-transform:rotate(79.2deg);-o-transform:rotate(79.2deg);transform:rotate(79.2deg)}.att-loading-count[data-progress="44"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(158.4deg);-moz-transform:rotate(158.4deg);-ms-transform:rotate(158.4deg);-o-transform:rotate(158.4deg);transform:rotate(158.4deg)}.att-loading-count[data-progress="44"] .att-loading-inset .att-loading-inset__percentage:before{content:"44"}.att-loading-count[data-progress="45"] .att-loading-circle__fill,.att-loading-count[data-progress="45"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(81deg);-moz-transform:rotate(81deg);-ms-transform:rotate(81deg);-o-transform:rotate(81deg);transform:rotate(81deg)}.att-loading-count[data-progress="45"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(162deg);-moz-transform:rotate(162deg);-ms-transform:rotate(162deg);-o-transform:rotate(162deg);transform:rotate(162deg)}.att-loading-count[data-progress="45"] .att-loading-inset .att-loading-inset__percentage:before{content:"45"}.att-loading-count[data-progress="46"] .att-loading-circle__fill,.att-loading-count[data-progress="46"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(82.8deg);-moz-transform:rotate(82.8deg);-ms-transform:rotate(82.8deg);-o-transform:rotate(82.8deg);transform:rotate(82.8deg)}.att-loading-count[data-progress="46"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(165.6deg);-moz-transform:rotate(165.6deg);-ms-transform:rotate(165.6deg);-o-transform:rotate(165.6deg);transform:rotate(165.6deg)}.att-loading-count[data-progress="46"] .att-loading-inset .att-loading-inset__percentage:before{content:"46"}.att-loading-count[data-progress="47"] .att-loading-circle__fill,.att-loading-count[data-progress="47"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(84.6deg);-moz-transform:rotate(84.6deg);-ms-transform:rotate(84.6deg);-o-transform:rotate(84.6deg);transform:rotate(84.6deg)}.att-loading-count[data-progress="47"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(169.2deg);-moz-transform:rotate(169.2deg);-ms-transform:rotate(169.2deg);-o-transform:rotate(169.2deg);transform:rotate(169.2deg)}.att-loading-count[data-progress="47"] .att-loading-inset .att-loading-inset__percentage:before{content:"47"}.att-loading-count[data-progress="48"] .att-loading-circle__fill,.att-loading-count[data-progress="48"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(86.4deg);-moz-transform:rotate(86.4deg);-ms-transform:rotate(86.4deg);-o-transform:rotate(86.4deg);transform:rotate(86.4deg)}.att-loading-count[data-progress="48"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(172.8deg);-moz-transform:rotate(172.8deg);-ms-transform:rotate(172.8deg);-o-transform:rotate(172.8deg);transform:rotate(172.8deg)}.att-loading-count[data-progress="48"] .att-loading-inset .att-loading-inset__percentage:before{content:"48"}.att-loading-count[data-progress="49"] .att-loading-circle__fill,.att-loading-count[data-progress="49"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(88.2deg);-moz-transform:rotate(88.2deg);-ms-transform:rotate(88.2deg);-o-transform:rotate(88.2deg);transform:rotate(88.2deg)}.att-loading-count[data-progress="49"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(176.4deg);-moz-transform:rotate(176.4deg);-ms-transform:rotate(176.4deg);-o-transform:rotate(176.4deg);transform:rotate(176.4deg)}.att-loading-count[data-progress="49"] .att-loading-inset .att-loading-inset__percentage:before{content:"49"}.att-loading-count[data-progress="50"] .att-loading-circle__fill,.att-loading-count[data-progress="50"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.att-loading-count[data-progress="50"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.att-loading-count[data-progress="50"] .att-loading-inset .att-loading-inset__percentage:before{content:"50"}.att-loading-count[data-progress="51"] .att-loading-circle__fill,.att-loading-count[data-progress="51"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(91.8deg);-moz-transform:rotate(91.8deg);-ms-transform:rotate(91.8deg);-o-transform:rotate(91.8deg);transform:rotate(91.8deg)}.att-loading-count[data-progress="51"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(183.6deg);-moz-transform:rotate(183.6deg);-ms-transform:rotate(183.6deg);-o-transform:rotate(183.6deg);transform:rotate(183.6deg)}.att-loading-count[data-progress="51"] .att-loading-inset .att-loading-inset__percentage:before{content:"51"}.att-loading-count[data-progress="52"] .att-loading-circle__fill,.att-loading-count[data-progress="52"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(93.6deg);-moz-transform:rotate(93.6deg);-ms-transform:rotate(93.6deg);-o-transform:rotate(93.6deg);transform:rotate(93.6deg)}.att-loading-count[data-progress="52"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(187.2deg);-moz-transform:rotate(187.2deg);-ms-transform:rotate(187.2deg);-o-transform:rotate(187.2deg);transform:rotate(187.2deg)}.att-loading-count[data-progress="52"] .att-loading-inset .att-loading-inset__percentage:before{content:"52"}.att-loading-count[data-progress="53"] .att-loading-circle__fill,.att-loading-count[data-progress="53"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(95.4deg);-moz-transform:rotate(95.4deg);-ms-transform:rotate(95.4deg);-o-transform:rotate(95.4deg);transform:rotate(95.4deg)}.att-loading-count[data-progress="53"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(190.8deg);-moz-transform:rotate(190.8deg);-ms-transform:rotate(190.8deg);-o-transform:rotate(190.8deg);transform:rotate(190.8deg)}.att-loading-count[data-progress="53"] .att-loading-inset .att-loading-inset__percentage:before{content:"53"}.att-loading-count[data-progress="54"] .att-loading-circle__fill,.att-loading-count[data-progress="54"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(97.2deg);-moz-transform:rotate(97.2deg);-ms-transform:rotate(97.2deg);-o-transform:rotate(97.2deg);transform:rotate(97.2deg)}.att-loading-count[data-progress="54"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(194.4deg);-moz-transform:rotate(194.4deg);-ms-transform:rotate(194.4deg);-o-transform:rotate(194.4deg);transform:rotate(194.4deg)}.att-loading-count[data-progress="54"] .att-loading-inset .att-loading-inset__percentage:before{content:"54"}.att-loading-count[data-progress="55"] .att-loading-circle__fill,.att-loading-count[data-progress="55"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(99deg);-moz-transform:rotate(99deg);-ms-transform:rotate(99deg);-o-transform:rotate(99deg);transform:rotate(99deg)}.att-loading-count[data-progress="55"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(198deg);-moz-transform:rotate(198deg);-ms-transform:rotate(198deg);-o-transform:rotate(198deg);transform:rotate(198deg)}.att-loading-count[data-progress="55"] .att-loading-inset .att-loading-inset__percentage:before{content:"55"}.att-loading-count[data-progress="56"] .att-loading-circle__fill,.att-loading-count[data-progress="56"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(100.8deg);-moz-transform:rotate(100.8deg);-ms-transform:rotate(100.8deg);-o-transform:rotate(100.8deg);transform:rotate(100.8deg)}.att-loading-count[data-progress="56"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(201.6deg);-moz-transform:rotate(201.6deg);-ms-transform:rotate(201.6deg);-o-transform:rotate(201.6deg);transform:rotate(201.6deg)}.att-loading-count[data-progress="56"] .att-loading-inset .att-loading-inset__percentage:before{content:"56"}.att-loading-count[data-progress="57"] .att-loading-circle__fill,.att-loading-count[data-progress="57"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(102.6deg);-moz-transform:rotate(102.6deg);-ms-transform:rotate(102.6deg);-o-transform:rotate(102.6deg);transform:rotate(102.6deg)}.att-loading-count[data-progress="57"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(205.2deg);-moz-transform:rotate(205.2deg);-ms-transform:rotate(205.2deg);-o-transform:rotate(205.2deg);transform:rotate(205.2deg)}.att-loading-count[data-progress="57"] .att-loading-inset .att-loading-inset__percentage:before{content:"57"}.att-loading-count[data-progress="58"] .att-loading-circle__fill,.att-loading-count[data-progress="58"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(104.4deg);-moz-transform:rotate(104.4deg);-ms-transform:rotate(104.4deg);-o-transform:rotate(104.4deg);transform:rotate(104.4deg)}.att-loading-count[data-progress="58"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(208.8deg);-moz-transform:rotate(208.8deg);-ms-transform:rotate(208.8deg);-o-transform:rotate(208.8deg);transform:rotate(208.8deg)}.att-loading-count[data-progress="58"] .att-loading-inset .att-loading-inset__percentage:before{content:"58"}.att-loading-count[data-progress="59"] .att-loading-circle__fill,.att-loading-count[data-progress="59"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(106.2deg);-moz-transform:rotate(106.2deg);-ms-transform:rotate(106.2deg);-o-transform:rotate(106.2deg);transform:rotate(106.2deg)}.att-loading-count[data-progress="59"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(212.4deg);-moz-transform:rotate(212.4deg);-ms-transform:rotate(212.4deg);-o-transform:rotate(212.4deg);transform:rotate(212.4deg)}.att-loading-count[data-progress="59"] .att-loading-inset .att-loading-inset__percentage:before{content:"59"}.att-loading-count[data-progress="60"] .att-loading-circle__fill,.att-loading-count[data-progress="60"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(108deg);-moz-transform:rotate(108deg);-ms-transform:rotate(108deg);-o-transform:rotate(108deg);transform:rotate(108deg)}.att-loading-count[data-progress="60"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(216deg);-moz-transform:rotate(216deg);-ms-transform:rotate(216deg);-o-transform:rotate(216deg);transform:rotate(216deg)}.att-loading-count[data-progress="60"] .att-loading-inset .att-loading-inset__percentage:before{content:"60"}.att-loading-count[data-progress="61"] .att-loading-circle__fill,.att-loading-count[data-progress="61"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(109.8deg);-moz-transform:rotate(109.8deg);-ms-transform:rotate(109.8deg);-o-transform:rotate(109.8deg);transform:rotate(109.8deg)}.att-loading-count[data-progress="61"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(219.6deg);-moz-transform:rotate(219.6deg);-ms-transform:rotate(219.6deg);-o-transform:rotate(219.6deg);transform:rotate(219.6deg)}.att-loading-count[data-progress="61"] .att-loading-inset .att-loading-inset__percentage:before{content:"61"}.att-loading-count[data-progress="62"] .att-loading-circle__fill,.att-loading-count[data-progress="62"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(111.6deg);-moz-transform:rotate(111.6deg);-ms-transform:rotate(111.6deg);-o-transform:rotate(111.6deg);transform:rotate(111.6deg)}.att-loading-count[data-progress="62"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(223.2deg);-moz-transform:rotate(223.2deg);-ms-transform:rotate(223.2deg);-o-transform:rotate(223.2deg);transform:rotate(223.2deg)}.att-loading-count[data-progress="62"] .att-loading-inset .att-loading-inset__percentage:before{content:"62"}.att-loading-count[data-progress="63"] .att-loading-circle__fill,.att-loading-count[data-progress="63"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(113.4deg);-moz-transform:rotate(113.4deg);-ms-transform:rotate(113.4deg);-o-transform:rotate(113.4deg);transform:rotate(113.4deg)}.att-loading-count[data-progress="63"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(226.8deg);-moz-transform:rotate(226.8deg);-ms-transform:rotate(226.8deg);-o-transform:rotate(226.8deg);transform:rotate(226.8deg)}.att-loading-count[data-progress="63"] .att-loading-inset .att-loading-inset__percentage:before{content:"63"}.att-loading-count[data-progress="64"] .att-loading-circle__fill,.att-loading-count[data-progress="64"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(115.2deg);-moz-transform:rotate(115.2deg);-ms-transform:rotate(115.2deg);-o-transform:rotate(115.2deg);transform:rotate(115.2deg)}.att-loading-count[data-progress="64"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(230.4deg);-moz-transform:rotate(230.4deg);-ms-transform:rotate(230.4deg);-o-transform:rotate(230.4deg);transform:rotate(230.4deg)}.att-loading-count[data-progress="64"] .att-loading-inset .att-loading-inset__percentage:before{content:"64"}.att-loading-count[data-progress="65"] .att-loading-circle__fill,.att-loading-count[data-progress="65"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(117deg);-moz-transform:rotate(117deg);-ms-transform:rotate(117deg);-o-transform:rotate(117deg);transform:rotate(117deg)}.att-loading-count[data-progress="65"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(234deg);-moz-transform:rotate(234deg);-ms-transform:rotate(234deg);-o-transform:rotate(234deg);transform:rotate(234deg)}.att-loading-count[data-progress="65"] .att-loading-inset .att-loading-inset__percentage:before{content:"65"}.att-loading-count[data-progress="66"] .att-loading-circle__fill,.att-loading-count[data-progress="66"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(118.8deg);-moz-transform:rotate(118.8deg);-ms-transform:rotate(118.8deg);-o-transform:rotate(118.8deg);transform:rotate(118.8deg)}.att-loading-count[data-progress="66"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(237.6deg);-moz-transform:rotate(237.6deg);-ms-transform:rotate(237.6deg);-o-transform:rotate(237.6deg);transform:rotate(237.6deg)}.att-loading-count[data-progress="66"] .att-loading-inset .att-loading-inset__percentage:before{content:"66"}.att-loading-count[data-progress="67"] .att-loading-circle__fill,.att-loading-count[data-progress="67"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(120.6deg);-moz-transform:rotate(120.6deg);-ms-transform:rotate(120.6deg);-o-transform:rotate(120.6deg);transform:rotate(120.6deg)}.att-loading-count[data-progress="67"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(241.2deg);-moz-transform:rotate(241.2deg);-ms-transform:rotate(241.2deg);-o-transform:rotate(241.2deg);transform:rotate(241.2deg)}.att-loading-count[data-progress="67"] .att-loading-inset .att-loading-inset__percentage:before{content:"67"}.att-loading-count[data-progress="68"] .att-loading-circle__fill,.att-loading-count[data-progress="68"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(122.4deg);-moz-transform:rotate(122.4deg);-ms-transform:rotate(122.4deg);-o-transform:rotate(122.4deg);transform:rotate(122.4deg)}.att-loading-count[data-progress="68"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(244.8deg);-moz-transform:rotate(244.8deg);-ms-transform:rotate(244.8deg);-o-transform:rotate(244.8deg);transform:rotate(244.8deg)}.att-loading-count[data-progress="68"] .att-loading-inset .att-loading-inset__percentage:before{content:"68"}.att-loading-count[data-progress="69"] .att-loading-circle__fill,.att-loading-count[data-progress="69"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(124.2deg);-moz-transform:rotate(124.2deg);-ms-transform:rotate(124.2deg);-o-transform:rotate(124.2deg);transform:rotate(124.2deg)}.att-loading-count[data-progress="69"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(248.4deg);-moz-transform:rotate(248.4deg);-ms-transform:rotate(248.4deg);-o-transform:rotate(248.4deg);transform:rotate(248.4deg)}.att-loading-count[data-progress="69"] .att-loading-inset .att-loading-inset__percentage:before{content:"69"}.att-loading-count[data-progress="70"] .att-loading-circle__fill,.att-loading-count[data-progress="70"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(126deg);-moz-transform:rotate(126deg);-ms-transform:rotate(126deg);-o-transform:rotate(126deg);transform:rotate(126deg)}.att-loading-count[data-progress="70"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(252deg);-moz-transform:rotate(252deg);-ms-transform:rotate(252deg);-o-transform:rotate(252deg);transform:rotate(252deg)}.att-loading-count[data-progress="70"] .att-loading-inset .att-loading-inset__percentage:before{content:"70"}.att-loading-count[data-progress="71"] .att-loading-circle__fill,.att-loading-count[data-progress="71"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(127.8deg);-moz-transform:rotate(127.8deg);-ms-transform:rotate(127.8deg);-o-transform:rotate(127.8deg);transform:rotate(127.8deg)}.att-loading-count[data-progress="71"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(255.6deg);-moz-transform:rotate(255.6deg);-ms-transform:rotate(255.6deg);-o-transform:rotate(255.6deg);transform:rotate(255.6deg)}.att-loading-count[data-progress="71"] .att-loading-inset .att-loading-inset__percentage:before{content:"71"}.att-loading-count[data-progress="72"] .att-loading-circle__fill,.att-loading-count[data-progress="72"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(129.6deg);-moz-transform:rotate(129.6deg);-ms-transform:rotate(129.6deg);-o-transform:rotate(129.6deg);transform:rotate(129.6deg)}.att-loading-count[data-progress="72"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(259.2deg);-moz-transform:rotate(259.2deg);-ms-transform:rotate(259.2deg);-o-transform:rotate(259.2deg);transform:rotate(259.2deg)}.att-loading-count[data-progress="72"] .att-loading-inset .att-loading-inset__percentage:before{content:"72"}.att-loading-count[data-progress="73"] .att-loading-circle__fill,.att-loading-count[data-progress="73"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(131.4deg);-moz-transform:rotate(131.4deg);-ms-transform:rotate(131.4deg);-o-transform:rotate(131.4deg);transform:rotate(131.4deg)}.att-loading-count[data-progress="73"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(262.8deg);-moz-transform:rotate(262.8deg);-ms-transform:rotate(262.8deg);-o-transform:rotate(262.8deg);transform:rotate(262.8deg)}.att-loading-count[data-progress="73"] .att-loading-inset .att-loading-inset__percentage:before{content:"73"}.att-loading-count[data-progress="74"] .att-loading-circle__fill,.att-loading-count[data-progress="74"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(133.2deg);-moz-transform:rotate(133.2deg);-ms-transform:rotate(133.2deg);-o-transform:rotate(133.2deg);transform:rotate(133.2deg)}.att-loading-count[data-progress="74"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(266.4deg);-moz-transform:rotate(266.4deg);-ms-transform:rotate(266.4deg);-o-transform:rotate(266.4deg);transform:rotate(266.4deg)}.att-loading-count[data-progress="74"] .att-loading-inset .att-loading-inset__percentage:before{content:"74"}.att-loading-count[data-progress="75"] .att-loading-circle__fill,.att-loading-count[data-progress="75"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(135deg);-moz-transform:rotate(135deg);-ms-transform:rotate(135deg);-o-transform:rotate(135deg);transform:rotate(135deg)}.att-loading-count[data-progress="75"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.att-loading-count[data-progress="75"] .att-loading-inset .att-loading-inset__percentage:before{content:"75"}.att-loading-count[data-progress="76"] .att-loading-circle__fill,.att-loading-count[data-progress="76"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(136.8deg);-moz-transform:rotate(136.8deg);-ms-transform:rotate(136.8deg);-o-transform:rotate(136.8deg);transform:rotate(136.8deg)}.att-loading-count[data-progress="76"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(273.6deg);-moz-transform:rotate(273.6deg);-ms-transform:rotate(273.6deg);-o-transform:rotate(273.6deg);transform:rotate(273.6deg)}.att-loading-count[data-progress="76"] .att-loading-inset .att-loading-inset__percentage:before{content:"76"}.att-loading-count[data-progress="77"] .att-loading-circle__fill,.att-loading-count[data-progress="77"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(138.6deg);-moz-transform:rotate(138.6deg);-ms-transform:rotate(138.6deg);-o-transform:rotate(138.6deg);transform:rotate(138.6deg)}.att-loading-count[data-progress="77"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(277.2deg);-moz-transform:rotate(277.2deg);-ms-transform:rotate(277.2deg);-o-transform:rotate(277.2deg);transform:rotate(277.2deg)}.att-loading-count[data-progress="77"] .att-loading-inset .att-loading-inset__percentage:before{content:"77"}.att-loading-count[data-progress="78"] .att-loading-circle__fill,.att-loading-count[data-progress="78"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(140.4deg);-moz-transform:rotate(140.4deg);-ms-transform:rotate(140.4deg);-o-transform:rotate(140.4deg);transform:rotate(140.4deg)}.att-loading-count[data-progress="78"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(280.8deg);-moz-transform:rotate(280.8deg);-ms-transform:rotate(280.8deg);-o-transform:rotate(280.8deg);transform:rotate(280.8deg)}.att-loading-count[data-progress="78"] .att-loading-inset .att-loading-inset__percentage:before{content:"78"}.att-loading-count[data-progress="79"] .att-loading-circle__fill,.att-loading-count[data-progress="79"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(142.2deg);-moz-transform:rotate(142.2deg);-ms-transform:rotate(142.2deg);-o-transform:rotate(142.2deg);transform:rotate(142.2deg)}.att-loading-count[data-progress="79"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(284.4deg);-moz-transform:rotate(284.4deg);-ms-transform:rotate(284.4deg);-o-transform:rotate(284.4deg);transform:rotate(284.4deg)}.att-loading-count[data-progress="79"] .att-loading-inset .att-loading-inset__percentage:before{content:"79"}.att-loading-count[data-progress="80"] .att-loading-circle__fill,.att-loading-count[data-progress="80"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(144deg);-moz-transform:rotate(144deg);-ms-transform:rotate(144deg);-o-transform:rotate(144deg);transform:rotate(144deg)}.att-loading-count[data-progress="80"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(288deg);-moz-transform:rotate(288deg);-ms-transform:rotate(288deg);-o-transform:rotate(288deg);transform:rotate(288deg)}.att-loading-count[data-progress="80"] .att-loading-inset .att-loading-inset__percentage:before{content:"80"}.att-loading-count[data-progress="81"] .att-loading-circle__fill,.att-loading-count[data-progress="81"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(145.8deg);-moz-transform:rotate(145.8deg);-ms-transform:rotate(145.8deg);-o-transform:rotate(145.8deg);transform:rotate(145.8deg)}.att-loading-count[data-progress="81"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(291.6deg);-moz-transform:rotate(291.6deg);-ms-transform:rotate(291.6deg);-o-transform:rotate(291.6deg);transform:rotate(291.6deg)}.att-loading-count[data-progress="81"] .att-loading-inset .att-loading-inset__percentage:before{content:"81"}.att-loading-count[data-progress="82"] .att-loading-circle__fill,.att-loading-count[data-progress="82"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(147.6deg);-moz-transform:rotate(147.6deg);-ms-transform:rotate(147.6deg);-o-transform:rotate(147.6deg);transform:rotate(147.6deg)}.att-loading-count[data-progress="82"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(295.2deg);-moz-transform:rotate(295.2deg);-ms-transform:rotate(295.2deg);-o-transform:rotate(295.2deg);transform:rotate(295.2deg)}.att-loading-count[data-progress="82"] .att-loading-inset .att-loading-inset__percentage:before{content:"82"}.att-loading-count[data-progress="83"] .att-loading-circle__fill,.att-loading-count[data-progress="83"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(149.4deg);-moz-transform:rotate(149.4deg);-ms-transform:rotate(149.4deg);-o-transform:rotate(149.4deg);transform:rotate(149.4deg)}.att-loading-count[data-progress="83"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(298.8deg);-moz-transform:rotate(298.8deg);-ms-transform:rotate(298.8deg);-o-transform:rotate(298.8deg);transform:rotate(298.8deg)}.att-loading-count[data-progress="83"] .att-loading-inset .att-loading-inset__percentage:before{content:"83"}.att-loading-count[data-progress="84"] .att-loading-circle__fill,.att-loading-count[data-progress="84"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(151.2deg);-moz-transform:rotate(151.2deg);-ms-transform:rotate(151.2deg);-o-transform:rotate(151.2deg);transform:rotate(151.2deg)}.att-loading-count[data-progress="84"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(302.4deg);-moz-transform:rotate(302.4deg);-ms-transform:rotate(302.4deg);-o-transform:rotate(302.4deg);transform:rotate(302.4deg)}.att-loading-count[data-progress="84"] .att-loading-inset .att-loading-inset__percentage:before{content:"84"}.att-loading-count[data-progress="85"] .att-loading-circle__fill,.att-loading-count[data-progress="85"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(153deg);-moz-transform:rotate(153deg);-ms-transform:rotate(153deg);-o-transform:rotate(153deg);transform:rotate(153deg)}.att-loading-count[data-progress="85"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(306deg);-moz-transform:rotate(306deg);-ms-transform:rotate(306deg);-o-transform:rotate(306deg);transform:rotate(306deg)}.att-loading-count[data-progress="85"] .att-loading-inset .att-loading-inset__percentage:before{content:"85"}.att-loading-count[data-progress="86"] .att-loading-circle__fill,.att-loading-count[data-progress="86"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(154.8deg);-moz-transform:rotate(154.8deg);-ms-transform:rotate(154.8deg);-o-transform:rotate(154.8deg);transform:rotate(154.8deg)}.att-loading-count[data-progress="86"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(309.6deg);-moz-transform:rotate(309.6deg);-ms-transform:rotate(309.6deg);-o-transform:rotate(309.6deg);transform:rotate(309.6deg)}.att-loading-count[data-progress="86"] .att-loading-inset .att-loading-inset__percentage:before{content:"86"}.att-loading-count[data-progress="87"] .att-loading-circle__fill,.att-loading-count[data-progress="87"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(156.6deg);-moz-transform:rotate(156.6deg);-ms-transform:rotate(156.6deg);-o-transform:rotate(156.6deg);transform:rotate(156.6deg)}.att-loading-count[data-progress="87"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(313.2deg);-moz-transform:rotate(313.2deg);-ms-transform:rotate(313.2deg);-o-transform:rotate(313.2deg);transform:rotate(313.2deg)}.att-loading-count[data-progress="87"] .att-loading-inset .att-loading-inset__percentage:before{content:"87"}.att-loading-count[data-progress="88"] .att-loading-circle__fill,.att-loading-count[data-progress="88"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(158.4deg);-moz-transform:rotate(158.4deg);-ms-transform:rotate(158.4deg);-o-transform:rotate(158.4deg);transform:rotate(158.4deg)}.att-loading-count[data-progress="88"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(316.8deg);-moz-transform:rotate(316.8deg);-ms-transform:rotate(316.8deg);-o-transform:rotate(316.8deg);transform:rotate(316.8deg)}.att-loading-count[data-progress="88"] .att-loading-inset .att-loading-inset__percentage:before{content:"88"}.att-loading-count[data-progress="89"] .att-loading-circle__fill,.att-loading-count[data-progress="89"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(160.2deg);-moz-transform:rotate(160.2deg);-ms-transform:rotate(160.2deg);-o-transform:rotate(160.2deg);transform:rotate(160.2deg)}.att-loading-count[data-progress="89"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(320.4deg);-moz-transform:rotate(320.4deg);-ms-transform:rotate(320.4deg);-o-transform:rotate(320.4deg);transform:rotate(320.4deg)}.att-loading-count[data-progress="89"] .att-loading-inset .att-loading-inset__percentage:before{content:"89"}.att-loading-count[data-progress="90"] .att-loading-circle__fill,.att-loading-count[data-progress="90"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(162deg);-moz-transform:rotate(162deg);-ms-transform:rotate(162deg);-o-transform:rotate(162deg);transform:rotate(162deg)}.att-loading-count[data-progress="90"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(324deg);-moz-transform:rotate(324deg);-ms-transform:rotate(324deg);-o-transform:rotate(324deg);transform:rotate(324deg)}.att-loading-count[data-progress="90"] .att-loading-inset .att-loading-inset__percentage:before{content:"90"}.att-loading-count[data-progress="91"] .att-loading-circle__fill,.att-loading-count[data-progress="91"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(163.8deg);-moz-transform:rotate(163.8deg);-ms-transform:rotate(163.8deg);-o-transform:rotate(163.8deg);transform:rotate(163.8deg)}.att-loading-count[data-progress="91"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(327.6deg);-moz-transform:rotate(327.6deg);-ms-transform:rotate(327.6deg);-o-transform:rotate(327.6deg);transform:rotate(327.6deg)}.att-loading-count[data-progress="91"] .att-loading-inset .att-loading-inset__percentage:before{content:"91"}.att-loading-count[data-progress="92"] .att-loading-circle__fill,.att-loading-count[data-progress="92"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(165.6deg);-moz-transform:rotate(165.6deg);-ms-transform:rotate(165.6deg);-o-transform:rotate(165.6deg);transform:rotate(165.6deg)}.att-loading-count[data-progress="92"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(331.2deg);-moz-transform:rotate(331.2deg);-ms-transform:rotate(331.2deg);-o-transform:rotate(331.2deg);transform:rotate(331.2deg)}.att-loading-count[data-progress="92"] .att-loading-inset .att-loading-inset__percentage:before{content:"92"}.att-loading-count[data-progress="93"] .att-loading-circle__fill,.att-loading-count[data-progress="93"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(167.4deg);-moz-transform:rotate(167.4deg);-ms-transform:rotate(167.4deg);-o-transform:rotate(167.4deg);transform:rotate(167.4deg)}.att-loading-count[data-progress="93"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(334.8deg);-moz-transform:rotate(334.8deg);-ms-transform:rotate(334.8deg);-o-transform:rotate(334.8deg);transform:rotate(334.8deg)}.att-loading-count[data-progress="93"] .att-loading-inset .att-loading-inset__percentage:before{content:"93"}.att-loading-count[data-progress="94"] .att-loading-circle__fill,.att-loading-count[data-progress="94"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(169.2deg);-moz-transform:rotate(169.2deg);-ms-transform:rotate(169.2deg);-o-transform:rotate(169.2deg);transform:rotate(169.2deg)}.att-loading-count[data-progress="94"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(338.4deg);-moz-transform:rotate(338.4deg);-ms-transform:rotate(338.4deg);-o-transform:rotate(338.4deg);transform:rotate(338.4deg)}.att-loading-count[data-progress="94"] .att-loading-inset .att-loading-inset__percentage:before{content:"94"}.att-loading-count[data-progress="95"] .att-loading-circle__fill,.att-loading-count[data-progress="95"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(171deg);-moz-transform:rotate(171deg);-ms-transform:rotate(171deg);-o-transform:rotate(171deg);transform:rotate(171deg)}.att-loading-count[data-progress="95"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(342deg);-moz-transform:rotate(342deg);-ms-transform:rotate(342deg);-o-transform:rotate(342deg);transform:rotate(342deg)}.att-loading-count[data-progress="95"] .att-loading-inset .att-loading-inset__percentage:before{content:"95"}.att-loading-count[data-progress="96"] .att-loading-circle__fill,.att-loading-count[data-progress="96"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(172.8deg);-moz-transform:rotate(172.8deg);-ms-transform:rotate(172.8deg);-o-transform:rotate(172.8deg);transform:rotate(172.8deg)}.att-loading-count[data-progress="96"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(345.6deg);-moz-transform:rotate(345.6deg);-ms-transform:rotate(345.6deg);-o-transform:rotate(345.6deg);transform:rotate(345.6deg)}.att-loading-count[data-progress="96"] .att-loading-inset .att-loading-inset__percentage:before{content:"96"}.att-loading-count[data-progress="97"] .att-loading-circle__fill,.att-loading-count[data-progress="97"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(174.6deg);-moz-transform:rotate(174.6deg);-ms-transform:rotate(174.6deg);-o-transform:rotate(174.6deg);transform:rotate(174.6deg)}.att-loading-count[data-progress="97"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(349.2deg);-moz-transform:rotate(349.2deg);-ms-transform:rotate(349.2deg);-o-transform:rotate(349.2deg);transform:rotate(349.2deg)}.att-loading-count[data-progress="97"] .att-loading-inset .att-loading-inset__percentage:before{content:"97"}.att-loading-count[data-progress="98"] .att-loading-circle__fill,.att-loading-count[data-progress="98"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(176.4deg);-moz-transform:rotate(176.4deg);-ms-transform:rotate(176.4deg);-o-transform:rotate(176.4deg);transform:rotate(176.4deg)}.att-loading-count[data-progress="98"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(352.8deg);-moz-transform:rotate(352.8deg);-ms-transform:rotate(352.8deg);-o-transform:rotate(352.8deg);transform:rotate(352.8deg)}.att-loading-count[data-progress="98"] .att-loading-inset .att-loading-inset__percentage:before{content:"98"}.att-loading-count[data-progress="99"] .att-loading-circle__fill,.att-loading-count[data-progress="99"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(178.2deg);-moz-transform:rotate(178.2deg);-ms-transform:rotate(178.2deg);-o-transform:rotate(178.2deg);transform:rotate(178.2deg)}.att-loading-count[data-progress="99"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(356.4deg);-moz-transform:rotate(356.4deg);-ms-transform:rotate(356.4deg);-o-transform:rotate(356.4deg);transform:rotate(356.4deg)}.att-loading-count[data-progress="99"] .att-loading-inset .att-loading-inset__percentage:before{content:"99"}.att-loading-count[data-progress="100"] .att-loading-circle__fill,.att-loading-count[data-progress="100"] .att-loading-circle__mask.att-loading-circle__full{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.att-loading-count[data-progress="100"] .att-loading-circle__fill.att-loading-circle__fix{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-ms-transform:rotate(360deg);-o-transform:rotate(360deg);transform:rotate(360deg)}.att-loading-count[data-progress="100"] .att-loading-inset .att-loading-inset__percentage:before{content:"100"}@keyframes loadingCounter{0% .att-loading-inset .att-loading-inset__percentage:before{content:"0"}1% .att-loading-inset .att-loading-inset__percentage:before{content:"1"}2% .att-loading-inset .att-loading-inset__percentage:before{content:"2"}3% .att-loading-inset .att-loading-inset__percentage:before{content:"3"}4% .att-loading-inset .att-loading-inset__percentage:before{content:"4"}5% .att-loading-inset .att-loading-inset__percentage:before{content:"5"}6% .att-loading-inset .att-loading-inset__percentage:before{content:"6"}7% .att-loading-inset .att-loading-inset__percentage:before{content:"7"}8% .att-loading-inset .att-loading-inset__percentage:before{content:"8"}9% .att-loading-inset .att-loading-inset__percentage:before{content:"9"}10% .att-loading-inset .att-loading-inset__percentage:before{content:"10"}11% .att-loading-inset .att-loading-inset__percentage:before{content:"11"}12% .att-loading-inset .att-loading-inset__percentage:before{content:"12"}13% .att-loading-inset .att-loading-inset__percentage:before{content:"13"}14% .att-loading-inset .att-loading-inset__percentage:before{content:"14"}15% .att-loading-inset .att-loading-inset__percentage:before{content:"15"}16% .att-loading-inset .att-loading-inset__percentage:before{content:"16"}17% .att-loading-inset .att-loading-inset__percentage:before{content:"17"}18% .att-loading-inset .att-loading-inset__percentage:before{content:"18"}19% .att-loading-inset .att-loading-inset__percentage:before{content:"19"}20% .att-loading-inset .att-loading-inset__percentage:before{content:"20"}21% .att-loading-inset .att-loading-inset__percentage:before{content:"21"}22% .att-loading-inset .att-loading-inset__percentage:before{content:"22"}23% .att-loading-inset .att-loading-inset__percentage:before{content:"23"}24% .att-loading-inset .att-loading-inset__percentage:before{content:"24"}25% .att-loading-inset .att-loading-inset__percentage:before{content:"25"}26% .att-loading-inset .att-loading-inset__percentage:before{content:"26"}27% .att-loading-inset .att-loading-inset__percentage:before{content:"27"}28% .att-loading-inset .att-loading-inset__percentage:before{content:"28"}29% .att-loading-inset .att-loading-inset__percentage:before{content:"29"}30% .att-loading-inset .att-loading-inset__percentage:before{content:"30"}31% .att-loading-inset .att-loading-inset__percentage:before{content:"31"}32% .att-loading-inset .att-loading-inset__percentage:before{content:"32"}33% .att-loading-inset .att-loading-inset__percentage:before{content:"33"}34% .att-loading-inset .att-loading-inset__percentage:before{content:"34"}35% .att-loading-inset .att-loading-inset__percentage:before{content:"35"}36% .att-loading-inset .att-loading-inset__percentage:before{content:"36"}37% .att-loading-inset .att-loading-inset__percentage:before{content:"37"}38% .att-loading-inset .att-loading-inset__percentage:before{content:"38"}39% .att-loading-inset .att-loading-inset__percentage:before{content:"39"}40% .att-loading-inset .att-loading-inset__percentage:before{content:"40"}41% .att-loading-inset .att-loading-inset__percentage:before{content:"41"}42% .att-loading-inset .att-loading-inset__percentage:before{content:"42"}43% .att-loading-inset .att-loading-inset__percentage:before{content:"43"}44% .att-loading-inset .att-loading-inset__percentage:before{content:"44"}45% .att-loading-inset .att-loading-inset__percentage:before{content:"45"}46% .att-loading-inset .att-loading-inset__percentage:before{content:"46"}47% .att-loading-inset .att-loading-inset__percentage:before{content:"47"}48% .att-loading-inset .att-loading-inset__percentage:before{content:"48"}49% .att-loading-inset .att-loading-inset__percentage:before{content:"49"}50% .att-loading-inset .att-loading-inset__percentage:before{content:"50"}51% .att-loading-inset .att-loading-inset__percentage:before{content:"51"}52% .att-loading-inset .att-loading-inset__percentage:before{content:"52"}53% .att-loading-inset .att-loading-inset__percentage:before{content:"53"}54% .att-loading-inset .att-loading-inset__percentage:before{content:"54"}55% .att-loading-inset .att-loading-inset__percentage:before{content:"55"}56% .att-loading-inset .att-loading-inset__percentage:before{content:"56"}57% .att-loading-inset .att-loading-inset__percentage:before{content:"57"}58% .att-loading-inset .att-loading-inset__percentage:before{content:"58"}59% .att-loading-inset .att-loading-inset__percentage:before{content:"59"}60% .att-loading-inset .att-loading-inset__percentage:before{content:"60"}61% .att-loading-inset .att-loading-inset__percentage:before{content:"61"}62% .att-loading-inset .att-loading-inset__percentage:before{content:"62"}63% .att-loading-inset .att-loading-inset__percentage:before{content:"63"}64% .att-loading-inset .att-loading-inset__percentage:before{content:"64"}65% .att-loading-inset .att-loading-inset__percentage:before{content:"65"}66% .att-loading-inset .att-loading-inset__percentage:before{content:"66"}67% .att-loading-inset .att-loading-inset__percentage:before{content:"67"}68% .att-loading-inset .att-loading-inset__percentage:before{content:"68"}69% .att-loading-inset .att-loading-inset__percentage:before{content:"69"}70% .att-loading-inset .att-loading-inset__percentage:before{content:"70"}71% .att-loading-inset .att-loading-inset__percentage:before{content:"71"}72% .att-loading-inset .att-loading-inset__percentage:before{content:"72"}73% .att-loading-inset .att-loading-inset__percentage:before{content:"73"}74% .att-loading-inset .att-loading-inset__percentage:before{content:"74"}75% .att-loading-inset .att-loading-inset__percentage:before{content:"75"}76% .att-loading-inset .att-loading-inset__percentage:before{content:"76"}77% .att-loading-inset .att-loading-inset__percentage:before{content:"77"}78% .att-loading-inset .att-loading-inset__percentage:before{content:"78"}79% .att-loading-inset .att-loading-inset__percentage:before{content:"79"}80% .att-loading-inset .att-loading-inset__percentage:before{content:"80"}81% .att-loading-inset .att-loading-inset__percentage:before{content:"81"}82% .att-loading-inset .att-loading-inset__percentage:before{content:"82"}83% .att-loading-inset .att-loading-inset__percentage:before{content:"83"}84% .att-loading-inset .att-loading-inset__percentage:before{content:"84"}85% .att-loading-inset .att-loading-inset__percentage:before{content:"85"}86% .att-loading-inset .att-loading-inset__percentage:before{content:"86"}87% .att-loading-inset .att-loading-inset__percentage:before{content:"87"}88% .att-loading-inset .att-loading-inset__percentage:before{content:"88"}89% .att-loading-inset .att-loading-inset__percentage:before{content:"89"}90% .att-loading-inset .att-loading-inset__percentage:before{content:"90"}91% .att-loading-inset .att-loading-inset__percentage:before{content:"91"}92% .att-loading-inset .att-loading-inset__percentage:before{content:"92"}93% .att-loading-inset .att-loading-inset__percentage:before{content:"93"}94% .att-loading-inset .att-loading-inset__percentage:before{content:"94"}95% .att-loading-inset .att-loading-inset__percentage:before{content:"95"}96% .att-loading-inset .att-loading-inset__percentage:before{content:"96"}97% .att-loading-inset .att-loading-inset__percentage:before{content:"97"}98% .att-loading-inset .att-loading-inset__percentage:before{content:"98"}99% .att-loading-inset .att-loading-inset__percentage:before{content:"99"}100% .att-loading-inset .att-loading-inset__percentage:before{content:"100"}}.att-loading--dark .att-loading-circle__mask .att-loading-circle__fill,.att-loading--dark .loading__inside,.att-loading--dark:after,.att-loading--dark:before{background:#444}.att-loading--dark .att-loading-inset__percentage{color:#444}.lt-ie9 .att-loading--dark{background:url(images/loading_balls_black.gif) center center no-repeat}.att-loading--blue .att-loading-circle__mask .att-loading-circle__fill,.att-loading--blue .loading__inside,.att-loading--blue:after,.att-loading--blue:before{background:#0574AC}.att-loading--blue .att-loading-inset__percentage{color:#0574AC}.lt-ie9 .att-loading--blue{background:url(images/loading_balls_blue.gif) center center no-repeat}.att-loading--white{background-color:#888}.att-loading--white.att-loading-count .att-loading-inset{background-color:inherit}.att-loading--white .att-loading-circle__mask .att-loading-circle__fill,.att-loading--white .loading__inside,.att-loading--white:after,.att-loading--white:before{background:#fff}.att-loading--white .att-loading-inset__percentage{color:#fff}.lt-ie9 .att-loading--white{background:url(images/loading_balls_white.gif) center center no-repeat}.lt-ie9 .att-loading-count{background:url(images/loading_counter.png);overflow:hidden}.lt-ie9 .att-loading-count .att-loading-inset__percentage:before{margin-left:-2px}.video-player{position:relative}.video-player__control{display:inline-block;margin-right:-5px;background-color:#444}.video-player__button{-webkit-transition:background-color .3s ease-out;-moz-transition:background-color .3s ease-out;transition:background-color .3s ease-out;display:inline-block;zoom:1;*display:inline;*vertical-align:auto;font-size:14px;font-size:.875rem;vertical-align:middle;color:#f2f2f2;text-decoration:none;cursor:pointer}.video-player__button:hover{color:#44c8f5}.video-player__button:active{-webkit-transition-property:none;-moz-transition-property:none;transition-property:none;color:#44c8f5}.video-player__button [class*=icon]{display:inline-block}.video-player__play-button{border-radius:3px 0 0 3px;border-right:1px solid #f2f2f2;padding:10px 24px 5px}.gigant-play{font-size:25px}.video-player__volume_icon{border-left:1px solid #f2f2f2;padding:17px 0 13px 11px;margin:0 -5px 0 -5px}.video-player__toggle-fullscreen-button{padding:17px 0 13px 15px;border-radius:0 3px 3px 0}.video-player__volume{padding:24px 0 17px 8px;font-size:0;background-color:#444;margin-left:0;opacity:1}.video-player__volume_icon:hover .video-player__volume{opacity:0}.video-player__volume-bar{-webkit-animation:video__volume-bar .3s reverse;-moz-animation:video__volume-bar .3s reverse;animation:video__volume-bar .3s reverse;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;-ms-transform-origin:center bottom;-o-transform-origin:center bottom;transform-origin:center bottom;display:inline-block;zoom:1;*display:inline;*vertical-align:auto;vertical-align:middle;width:4px;height:14px;background-color:#777;margin:-5px 0 0 7px}.video-player__volume-bar:first-child{margin-left:0}.video-player__volume-bar:hover{-webkit-animation:video__volume-bar .3s 1;-moz-animation:video__volume-bar .3s 1;animation:video__volume-bar .3s 1;-webkit-transform:scaleY(1.3);-moz-transform:scaleY(1.3);-ms-transform:scaleY(1.3);-o-transform:scaleY(1.3);transform:scaleY(1.3);-webkit-transform-origin:center;-moz-transform-origin:center;-ms-transform-origin:center;-o-transform-origin:center;transform-origin:center;background-color:#44c8f5}.video-player__volume-bar--full{background-color:#f2f2f2}@-webkit-keyframes video__volume-bar{0%{-webkit-transform:scaleY(1)}50%{-webkit-transform:scaleY(1.3)}100%{-webkit-transform:scaleY(1)}}@-moz-keyframes video__volume-bar{0%{-moz-transform:scaleY(1)}50%{-moz-transform:scaleY(1.3)}100%{-moz-transform:scaleY(1)}}@-o-keyframes video__volume-bar{0%{-o-transform:scaleY(1)}50%{-o-transform:scaleY(1.3)}100%{-o-transform:scaleY(1)}}@keyframes video__volume-bar{0%{transform:scaleY(1)}50%{transform:scaleY(1.3)}100%{transform:scaleY(1)}}.video-player__track{padding:21px 0 21px 21px;margin-bottom:-19px;width:350px}.video-player__track--inner{position:relative;height:8px;border:1px solid #a0a0a0;border-radius:2px;margin:0}.video-player__track--loaded,.video-player__track--played{position:absolute;height:8px;background-color:#a0a0a0;border-radius:2px;margin:-1px 0 0 -1px;left:1px}.video-player__track--played{background-color:#f2f2f2}.video-player__track--played:hover{background-color:#44c8f5}.video-player__track-tooltip{-webkit-transition:opacity .1s ease-out;-moz-transition:opacity .1s ease-out;transition:opacity .1s ease-out;position:absolute;top:-35px;right:-22px;font-size:12px;font-size:.75rem;opacity:0}.lt-ie9 .video-player__track-tooltip{display:none}.video-player__track--played:hover .video-player__track-tooltip{opacity:1}.lt-ie9 .video-player__track--played:hover .video-player__track-tooltip{display:block}.video-player__track-handle{-webkit-transition:opacity .1s ease-out;-moz-transition:opacity .1s ease-out;transition:opacity .1s ease-out;position:absolute;top:-4px;right:-7px;opacity:0;background:#f2f2f2;width:16px;height:16px;border-radius:50%}.video-player__track--played:hover .video-player__track-handle{opacity:1}.video-player__time{font-size:14px;font-size:.875rem;color:#f2f2f2;padding:18px 20px 15px;background-color:#444}.video-player__time:hover{color:#fff}.alert-inplace .container{padding-right:30px}.alert .close-role{position:absolute;top:13px;right:20px;font-size:11px;height:20px;line-height:23px;border:0}.alert .close-role [class^=icon-]{font-size:20px;width:15px;color:#777;margin:0;vertical-align:middle;display:inline-block;margin-top:-4px;-webkit-transition:all .2s ease-out;-moz-transition:all .2s ease-out;transition:all .2s ease-out}.alert .close-role:hover [class^=icon-]{color:#199DDF}.att-checkbox,.att-radio{-webkit-transition:all .2s ease-out;-moz-transition:all .2s ease-out;transition:all .2s ease-out;display:inline-block;zoom:1;*display:inline;*vertical-align:auto;width:21px;height:21px;background-color:#fff;border-radius:21px;border:1px solid #888;cursor:pointer;line-height:21px;text-align:center;vertical-align:middle}.att-checkbox:hover,.att-radio:hover{border-color:#444}.att-checkbox:active,.att-radio:active{border-color:#0574AC}.att-checkbox{border-radius:3px}.att-checkbox__indicator,.att-radio__indicator{opacity:0;-webkit-transition:all .2s cubic-bezier(0.175,.885,.32,1.275);-moz-transition:all .2s cubic-bezier(0.175,.885,.32,1.275);transition:all .2s cubic-bezier(0.175,.885,.32,1.275);top:50%;left:50%;width:7px;height:7px;background:#0574AC;border-radius:7px;position:initial;margin:6px;-ms-filter:"alpha(Opacity=0)"}.csstransforms .att-checkbox__indicator,.csstransforms .att-radio__indicator{-webkit-transform:scale3d(0,0,0);-moz-transform:scale3d(0,0,0);-ms-transform:scale3d(0,0,0);-o-transform:scale3d(0,0,0);transform:scale3d(0,0,0);opacity:0;display:none}.att-checkbox__indicator{width:21px;height:21px;background:0 0;left:0;margin:0;overflow:hidden;position:relative;top:0}.att-checkbox__indicator:after{content:'\e6dd';position:absolute;display:block;width:21px;left:-18px;color:#0574AC;text-align:center;font-family:atticons;font-size:56px}.att-checkbox--on .att-checkbox__indicator,.att-radio--on .att-radio__indicator{opacity:1;-ms-filter:"alpha(Opacity=100)"}.csstransforms .att-checkbox--on .att-checkbox__indicator,.csstransforms .att-radio--on .att-radio__indicator{-webkit-transform:scale3d(1,1,1);-moz-transform:scale3d(1,1,1);-ms-transform:scale3d(1,1,1);-o-transform:scale3d(1,1,1);transform:scale3d(1,1,1);display:block}.att-checkbox input,.att-radio input{left:-9999px;position:absolute}.att-checkbox.att-checkbox--disabled,.att-radio.att-radio--disabled{background-color:#f2f2f2;border:1px solid #DDD;cursor:not-allowed}.att-checkbox.att-checkbox--disabled:active,.att-checkbox.att-checkbox--disabled:hover,.att-radio.att-radio--disabled:active,.att-radio.att-radio--disabled:hover{border-color:#DDD}.att-radio--disabled .att-radio__indicator,.att-radio--on.att-radio--disabled .att-radio__indicator{background:#DDD}.att-checkbox--disabled .att-checkbox__indicator:after,.att-checkbox--on.att-checkbox--disabled .att-checkbox__indicator:after{color:#DDD}.accordion-color-icon-green{background:green;border-radius:100%;height:12px;width:12px;margin:3px 0 0 10px;position:absolute}.accordion-color-icon-yellow{background:#ff0;border-radius:100%;height:12px;width:12px;margin:3px 0 0 10px;position:absolute}.accordion-color-icon-blue{background:#00f;border-radius:100%;height:12px;width:12px;margin:3px 0 0 10px;position:absolute}.accordion-color-icon-red{background:red;border-radius:100%;height:12px;width:12px;margin:3px 0 0 10px;position:absolute}.show-true{padding-left:20px}.att-checkbox--indeterminate:after{content:'-';position:absolute;top:-2px;font-weight:700;color:#067ab4;font-size:40px;left:2px}.dropdown{position:relative}.dropdown:focus,.dropdown:hover{z-index:1}.dropdown:focus>.dropdown__menu,.dropdown:hover>.dropdown__menu{display:block}.dropdown__caret{font-size:10px;margin-left:5px}.dropdown__menu{position:absolute;top:100%;left:0;background-color:#fff;display:none;list-style:none;min-width:150px;text-align:left;z-index:5}.nav--text-right .dropdown__menu{left:auto;right:0}.dropdown__menu-link{display:block;padding:0 20px}select[data-dropdown]{display:inline-block;vertical-align:baseline;zoom:1;*display:inline;*vertical-align:auto;width:auto;opacity:0}.no-js select[data-dropdown]{opacity:1}.att-dropdown{display:inline-block;vertical-align:baseline;zoom:1;*display:inline;*vertical-align:auto;position:relative}.att-dropdown select{position:absolute;top:-10000px;left:-10000px;color:transparent;font:0/0 a;text-shadow:none}.att-dropdown__selection{font-size:48px;font-size:3rem;font-family:omnes_att_light;line-height:48px;letter-spacing:-2px;display:block;color:#444;cursor:pointer}.att-dropdown__selection:after{display:inline-block;zoom:1;*display:inline;*vertical-align:auto;font-size:14px;font-size:.875rem;margin-left:10px;vertical-align:middle}.att-dropdown__selection.att-dropdown--focus,.att-dropdown__selection.att-dropdown--focus:visited{color:#444;outline:0}.att-dropdown__items{position:absolute;top:-10000px;left:-10000px;background-color:#0574AC;border-radius:6px;color:#fff;opacity:0;visibility:hidden;list-style:none;z-index:6;min-width:100px;margin:-10px}.att-dropdown__items.att-dropdown--open{visibility:visible;opacity:1;outline:0}.att-dropdown__item{font-size:48px;font-size:3rem;font-family:omnes_att_light;letter-spacing:-2px;cursor:default;display:block;line-height:48px;margin-top:-1px;overflow:hidden;padding:10px 50px 17px 10px;position:relative}.att-dropdown__item:first-child{border-top-left-radius:6px;border-top-right-radius:6px}.att-dropdown__item:last-child{border-bottom-left-radius:6px;border-bottom-right-radius:6px}.att-dropdown__item:before{position:absolute;top:0;right:10px;left:10px;content:'';display:block;height:1px;border-top:1px solid #0e2875}.att-dropdown__item:first-child:before{display:none}.att-dropdown__item.att-dropdown__item--active{background-color:#0e2875}.att-dropdown__item.att-dropdown__item--selected:after{font-size:28px;font-size:1.75rem;display:inline-block;vertical-align:middle;margin-top:-2px;margin-left:20px}.att-dropdown--h2 .att-dropdown__item,.att-dropdown--h2 .att-dropdown__selection{font-size:36px;font-size:2.25rem;font-family:omnes_att_light;line-height:36px;letter-spacing:-2px}.att-dropdown--h3 .att-dropdown__item,.att-dropdown--h3 .att-dropdown__selection{font-size:24px;font-size:1.5rem;font-family:arial;line-height:26px;letter-spacing:0}.att-dropdown__overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.1);display:none;z-index:5}.select2-container.select2-container-disabled .select2-choice{z-index:0}.select2-container{margin:0;position:relative;display:inline-block;zoom:1;*display:inline;vertical-align:middle;width:100%}.select2-container,.select2-drop,.select2-search,.select2-search input{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.select2-container .select2-choice{overflow:hidden;white-space:nowrap;line-height:26px;color:#444;text-decoration:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.select2-container.select2-drop-above .select2-choice{border-bottom-color:#aaa;border-radius:0 0 4px 4px;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,#eee),color-stop(0.9,#fff));background-image:-webkit-linear-gradient(center bottom,#eee 0,#fff 90%);background-image:-moz-linear-gradient(center bottom,#eee 0,#fff 90%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);background-image:linear,to bottom,#eee 0,#fff 90%}.select2-container.select2-allowclear .select2-choice .select2-chosen{margin-right:42px}.select2-container .select2-choice>.select2-chosen{margin-right:26px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.select2-container .select2-choice abbr{display:none;width:12px;height:12px;position:absolute;right:24px;top:8px;font-size:1px;text-decoration:none;border:0;background:url(select2.png) right top no-repeat;cursor:pointer;outline:0}.select2-container.select2-allowclear .select2-choice abbr{display:inline-block}.select2-container .select2-choice abbr:hover{background-position:right -11px;cursor:pointer}.select2-drop-mask{border:0;margin:0;padding:0;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;background-color:#fff}.select2-drop{width:100%;position:absolute;top:100%;color:#000;border:1px solid #aaa;-webkit-box-shadow:0 4px 5px rgba(0,0,0,.15);box-shadow:0 4px 5px rgba(0,0,0,.15)}.select2-drop.select2-drop-above{margin-top:1px;border-radius:4px 4px 0 0;-webkit-box-shadow:0 -4px 5px rgba(0,0,0,.15);box-shadow:0 -4px 5px rgba(0,0,0,.15)}.select2-drop-active{border:1px solid #5897fb;border-top:0}.select2-drop.select2-drop-above.select2-drop-active{border-top:1px solid #5897fb}.select2-drop-auto-width{border-top:1px solid #aaa;width:auto}.select2-drop-auto-width .select2-search{padding-top:4px}.select2-container .select2-choice .select2-arrow{display:inline-block;height:100%;position:absolute;right:0;top:0;border-radius:0 4px 4px 0}.select2-container .select2-choice .select2-arrow b{display:block;width:100%;height:100%;background:url(select2.png) no-repeat 0 1px}.select2-search{display:inline-block;width:100%;margin:0;padding-left:4px;padding-right:4px;position:relative;z-index:10000;white-space:nowrap}.select2-search input{width:100%;outline:0;font-family:sans-serif;font-size:1em;border:1px solid #aaa;border-radius:0;-webkit-box-shadow:none;box-shadow:none;background:#fff url(select2.png) no-repeat 100% -22px;background:url(select2.png) no-repeat 100% -22px,-webkit-gradient(linear,left bottom,left top,color-stop(0.85,#fff),color-stop(0.99,#eee));background:url(select2.png) no-repeat 100% -22px,-webkit-linear-gradient(center bottom,#fff 85%,#eee 99%);background:url(select2.png) no-repeat 100% -22px,-moz-linear-gradient(center bottom,#fff 85%,#eee 99%);background:url(select2.png) no-repeat 100% -22px,linear,to bottom,#fff 85%,#eee 99% 0 0}.select2-drop.select2-drop-above .select2-search input{margin-top:4px}.select2-search input.select2-active{background:#fff url(select2-spinner.gif) no-repeat 100%;background:url(select2-spinner.gif) no-repeat 100%,-webkit-gradient(linear,left bottom,left top,color-stop(0.85,#fff),color-stop(0.99,#eee));background:url(select2-spinner.gif) no-repeat 100%,-webkit-linear-gradient(center bottom,#fff 85%,#eee 99%);background:url(select2-spinner.gif) no-repeat 100%,-moz-linear-gradient(center bottom,#fff 85%,#eee 99%);background:url(select2-spinner.gif) no-repeat 100%,linear,to bottom,#fff 85%,#eee 99% 0 0}.select2-container-active .select2-choice,.select2-container-active .select2-choices{border:1px solid #5897fb;outline:0;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.select2-dropdown-open .select2-choice{border-bottom-color:transparent;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background-color:#eee;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,#fff),color-stop(0.5,#eee));background-image:-webkit-linear-gradient(center bottom,#fff 0,#eee 50%);background-image:-moz-linear-gradient(center bottom,#fff 0,#eee 50%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0);background-image:linear,to top,#fff 0,#eee 50%}.select2-dropdown-open.select2-drop-above .select2-choice,.select2-dropdown-open.select2-drop-above .select2-choices{border:1px solid #5897fb;border-top-color:transparent;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(0.5,#eee));background-image:-webkit-linear-gradient(center top,#fff 0,#eee 50%);background-image:-moz-linear-gradient(center top,#fff 0,#eee 50%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0);background-image:linear,to bottom,#fff 0,#eee 50%}.select2-dropdown-open .select2-choice .select2-arrow{background:0 0;border-left:0;filter:none}.select2-dropdown-open .select2-choice .select2-arrow b{background-position:-18px 1px}.select2-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.select2-results{max-height:200px;position:relative;overflow-x:hidden;overflow-y:auto;-webkit-tap-highlight-color:transparent}.select2-results ul.select2-result-sub{margin:0;padding-left:0}.select2-results ul.select2-result-sub>li .select2-result-label{padding-left:20px}.select2-results ul.select2-result-sub ul.select2-result-sub>li .select2-result-label{padding-left:40px}.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub>li .select2-result-label{padding-left:60px}.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub>li .select2-result-label{padding-left:80px}.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub>li .select2-result-label{padding-left:100px}.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub>li .select2-result-label{padding-left:110px}.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub>li .select2-result-label{padding-left:120px}.select2-results li{list-style:none;display:list-item;background-image:none}.select2-results li.select2-result-with-children>.select2-result-label{font-weight:700}.select2-results .select2-result-label{padding:3px 7px 4px;margin:0;cursor:pointer;min-height:1em;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.select2-results .select2-highlighted{background:#3875d7;color:#fff}.select2-results li em{background:#feffde;font-style:normal}.select2-results .select2-highlighted em{background:0 0}.select2-results .select2-highlighted ul{background:#fff;color:#000}.select2-results .select2-no-results,.select2-results .select2-searching,.select2-results .select2-selection-limit{background:#f4f4f4;display:list-item;padding-left:5px}.select2-results .select2-disabled.select2-highlighted{color:#666;background:#f4f4f4;display:list-item;cursor:not-allowed}.select2-results .select2-disabled{background:#f4f4f4;display:list-item;cursor:not-allowed}.select2-results .select2-selected{display:none}.select2-more-results.select2-active{background:#f4f4f4 url(select2-spinner.gif) no-repeat 100%}.select2-more-results{background:#f4f4f4;display:list-item}.select2-container.select2-container-disabled .select2-choice{background-color:#f4f4f4;background-image:none;border:1px solid #ddd;cursor:not-allowed}.select2-container.select2-container-disabled .select2-choice abbr{display:none}.select2-container-multi .select2-choices{height:auto!important;height:1%;margin:0;padding:0;position:relative;border:1px solid #aaa;cursor:text;overflow:hidden;background-color:#fff;background-image:-webkit-gradient(linear,0 0,0 100%,color-stop(1%,#eee),color-stop(15%,#fff));background-image:-webkit-linear-gradient(top,#eee 1%,#fff 15%);background-image:-moz-linear-gradient(top,#eee 1%,#fff 15%);background-image:linear,to bottom,#eee 1%,#fff 15%}.select2-locked{padding:3px 5px!important}.select2-container-multi .select2-choices{min-height:26px}.select2-container-multi.select2-container-active .select2-choices{border:1px solid #5897fb;outline:0;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.select2-container-multi .select2-choices li{float:left;list-style:none}html[dir=rtl] .select2-container-multi .select2-choices li{float:right}.select2-container-multi .select2-choices .select2-search-field{margin:0;padding:0;white-space:nowrap}.select2-container-multi .select2-choices .select2-search-field input{padding:5px;margin:1px 0;font-family:sans-serif;font-size:100%;color:#666;outline:0;border:0;-webkit-box-shadow:none;box-shadow:none;background:transparent!important}.select2-container-multi .select2-choices .select2-search-field input.select2-active{background:#fff url(select2-spinner.gif) no-repeat 100%!important}.select2-default{color:#999!important}.select2-container-multi .select2-choices .select2-search-choice{padding:3px 5px 3px 18px;margin:3px 0 3px 5px;position:relative;line-height:13px;color:#333;cursor:default;border:1px solid #aaa;border-radius:3px;-webkit-box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);background-clip:padding-box;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#e4e4e4;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#f4f4f4', GradientType=0);background-image:-webkit-gradient(linear,0 0,0 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear,to top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%}html[dir=rtl] .select2-container-multi .select2-choices .select2-search-choice{margin-left:0;margin-right:5px}.select2-container-multi .select2-choices .select2-search-choice .select2-chosen{cursor:default}.select2-container-multi .select2-choices .select2-search-choice-focus{background:#d4d4d4}.select2-search-choice-close{display:block;width:12px;height:13px;position:absolute;right:3px;top:4px;font-size:1px;outline:0;background:url(select2.png) right top no-repeat}html[dir=rtl] .select2-search-choice-close{right:auto;left:3px}.select2-container-multi .select2-search-choice-close{left:3px}.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover,.select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close{background-position:right -11px}.select2-container-multi.select2-container-disabled .select2-choices{background-color:#f4f4f4;background-image:none;border:1px solid #ddd;cursor:not-allowed}.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice{padding:3px 5px;border:1px solid #ddd;background-image:none;background-color:#f4f4f4}.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close{display:none;background:0 0}.select2-offscreen,.select2-offscreen:focus{clip:rect(0 0 0 0)!important;width:1px!important;height:1px!important;border:0!important;margin:0!important;padding:0!important;overflow:hidden!important;position:absolute!important;outline:0!important;left:0!important;top:0!important}.select2-display-none{display:none}.select2-measure-scrollbar{position:absolute;top:-10000px;left:-10000px;width:100px;height:100px;overflow:scroll}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:2dppx){.select2-container .select2-choice .select2-arrow b,.select2-container .select2-choice abbr,.select2-search input,.select2-search-choice-close{background-image:url(select2x2.png)!important;background-repeat:no-repeat!important;background-size:60px 40px!important}.select2-search input{background-position:100% -21px!important}}.select2-container .select2-choice{-webkit-transition:border-color .2s ease-out;-moz-transition:border-color .2s ease-out;transition:border-color .2s ease-out;background:#fff;border-radius:6px;display:block;border:1px solid #888;box-shadow:none;filter:none;height:40px;padding:0;position:relative;z-index:5;cursor:pointer}.select2-container-active .select2-choice{border-color:#0091d9;z-index:1}.select2-dropdown-open .select2-choice{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}.select2-dropdown-open.select2-drop-above .select2-choice{border-top-left-radius:0!important;border-top-right-radius:0!important}.select2-container .select2-chosen,.select2-container input{font-size:12px;font-size:.75rem;color:#444;height:100%;line-height:39px;padding-left:10px;text-align:left}.select2-container input,.select2-container input:hover{border:0!important;line-height:inherit}.text-separator-subtitle .select2-chosen{font-size:18px;font-size:1.125rem}.hovstyle{background:#1792d6!important;color:#fff!important}.hovstyle.disable{background:transparent!important;color:#c4c4c4!important}.select2-container .select2-choice .select2-arrow,.select2-container.select2-container-disabled .select2-choice .select2-arrow{-webkit-transition:none;-moz-transition:none;transition:none;background:0 0;border:0;filter:none;width:25px;z-index:10}.select2-container .select2-choice .select2-arrow b:after,.select2-container.select2-container-disabled .select2-choice .select2-arrow b:after{font-size:14px;font-size:.875rem;content:'\e6bf';font-family:atticons;position:absolute;top:0;right:0;width:25px;height:40px;line-height:40px;background:0 0;text-align:center;color:#888}.select2-dropdown-open .select2-choice .select2-arrow b:after{content:'\e6be'}.select2-container.select2-container-disabled .select2-chosen{color:#a0a0a0}.select2-drop{margin-top:-1px;background:#fff;border-top:1px solid #d3d3d3;border-radius:0 0 6px 6px;z-index:4}.select2-drop-mask{z-index:3}.select2-drop.select2-drop-above{border-top:0;border-bottom:1px solid #d3d3d3}.select2-search{height:0;min-height:0;overflow:hidden}.select2-search input{margin:0;padding:7px 10px;height:40px!important;line-height:12px;line-height:1.2rem;min-height:0!important}.select2-results{padding:0;margin:-19px 0 0 0;border-radius:0 0 6px 6px;-webkit-box-shadow:rgba(0,0,0,.25) 0 8px 10px -3px;-moz-box-shadow:rgba(0,0,0,.25) 0 8px 10px -3px;box-shadow:rgba(0,0,0,.25) 0 8px 10px -3px}.select2-drop-above .select2-results{border-radius:6px 6px 0 0}.select2-drop-above.select2-dropdown-open .select2-choice{border-radius:0 0 6px 6px!important;background:#fff}.select2-drop-above.select2-drop{border-radius:6px 6px 0 0;margin-top:0;overflow:hidden}.select2-drop.show-search .select2-search{height:auto;overflow:visible;padding:5px}.select2-drop.show-search .select2-results{margin-top:0}.select2-results .select2-result{background:0 0}.select2-result .select2-result-label{-webkit-transition:all .2s ease-out;-moz-transition:all .2s ease-out;transition:all .2s ease-out;font-size:12px;font-size:.75rem;color:#444;display:block;line-height:14px;margin:0;padding:8px 10px}.select2-result.select2-result-current .select2-result-label{background:#fff;color:#1792D6}.select2-result.select2-result-current .select2-result-label:after{content:'\e6dd';font-family:atticons;font-size:50px;font-size:3.125rem;vertical-align:bottom;margin-left:-12px;background:0 0;text-align:center;color:#1792D6}.select2-result-current .select2-result-label{font-family:arial;padding-right:5px;color:#067ab4}.select2-no-results{font-size:12px;font-size:.75rem;color:#777;font-family:arial;line-height:12px;padding:10px}.select2-result-selectable .select2-match,.select2-result-unselectable .select2-match{background-color:#c9e9f9;text-decoration:none}.select2-container .color-circle,.select2-results .color-circle{width:15px;height:15px;display:inline-block;zoom:1;*display:inline;*vertical-align:auto;border-radius:15px;margin-right:10px;vertical-align:middle}.select2-container .option-extra,.select2-results .option-extra{float:right}.select2-container .price,.select2-results .price{color:#888}.select2-container.select--clean{border-color:transparent;background:0 0;width:auto}.select2-container.select--clean .select2-choice{background:0 0;border-color:transparent;height:auto}.select2-container.select--clean .select2-drop{margin-top:5px}.select2-container.select--h1 .select2-chosen{font-size:48px;font-size:3rem;font-family:omnes_att_light;line-height:48px;letter-spacing:-2px}.select2-container.select--h2 .select2-chosen{font-size:36px;font-size:2.25rem;font-family:omnes_att_light;line-height:36px;letter-spacing:-2px}.select2-container.select--h3 .select2-chosen{font-size:24px;font-size:1.5rem;font-family:arial;line-height:26px;letter-spacing:0}.select2-container.select--h4 .select2-chosen{font-size:18px;font-size:1.125rem;font-family:arial;line-height:22px;letter-spacing:0}.select2-drop.select--clean{margin-top:5px}.select2-container .select2-choice .select2-arrow b,.select2-container .select2-choice abbr,.select2-container-multi .select2-choices .select2-search-field input.select2-active,.select2-more-results.select2-active,.select2-search input,.select2-search input.select2-active,.select2-search-choice-close{background-image:none!important}.select2-container.select2--small .select2-choice{height:30px;z-index:1}.select2-container.select2--small .select2-chosen{line-height:29px}.select2-container.select2--small .select2-choice .select2-arrow b:after,.select2-container.select2--small.select2-container-disabled .select2-choice .select2-arrow b:after{height:30px;line-height:30px}.select2-container.select2--small .select2-search input{height:30px!important}.select2-container .select2-choice.select2-chosen-disabled{margin-right:26px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:.75rem;height:100%;line-height:39px;padding-left:10px;text-align:left;color:#c4c4c4;background-color:#e4e4e4;border:1px solid #d4d4d4;cursor:not-allowed}.select2-result.disable .select2-result-label{color:#c4c4c4;cursor:not-allowed}ul.select2-results li:last-child{margin-bottom:10px}.text-dropdown{display:block;font-family:omnes_att_light;font-size:48px;color:#067AB4;line-height:40px}.text-dropdown .not-visible{visibility:hidden}.text-dropdown .actions-opened{display:block;width:auto;position:relative;margin-top:-35px;margin-left:20px}.text-dropdown .actions-opened li i{margin-left:20px}.text-dropdown .actions-closed{display:none}.text-dropdown .action--selected{text-decoration:underline;color:#0574AC}.text-dropdown ul{margin-left:-35px;margin-top:-40px;padding-left:0;position:absolute;list-style-type:none;-moz-border-radius:6px;-webkit-border-radius:6px;border:1px solid #0574AC;box-shadow:0 2px 10px -2px;-webkit-box-shadow:0 2px 10px -2px;-moz-box-shadow:0 2px 10px -2px}.text-dropdown li{white-space:nowrap;height:auto;background-color:#0F7EB6;color:#FFF;font-size:48px;font-family:omnes_att_light;line-height:48px;letter-spacing:-1px;padding-left:20px;cursor:pointer}.text-dropdown li i{margin-left:15px;font-size:30px}.text-dropdown .highlight{background-color:#0F2A7B}.text-dropdown .icon-included-checkmark{color:#fff;font-size:30px}.text-dropdown .dropdown{display:inline-block;cursor:pointer}.text-dropdown .dropdown i{font-size:20px;position:relative;top:-10px}.att-accordion{background:#fff;position:relative;border-radius:6px;border-width:1px;border-color:#888;border-style:solid;overflow:hidden}.att-accordion__freestanding{display:block;min-height:50px;margin-bottom:19px}.att-accordion__group{padding-left:20px;padding-right:20px;margin-top:-1px;position:relative}.att-accordion__group.first,.att-accordion__group:first-child{margin-top:0}.att-accordion__group:hover{background-color:#bbb;z-index:1}.att-accordion__group--open{z-index:1}.att-accordion__group--open.att-accordion__group:hover{background-color:transparent}.att-accordion__inner,.att-accordion__toggle{margin:10px 0;text-transform:none}.att-accordion__toggle{font-size:14px;font-size:.875rem;color:#666;display:inline-block;font-family:arial;position:relative;width:100%}.att-accordion__toggle:after{-webkit-transition:all .2s ease-out;-moz-transition:all .2s ease-out;transition:all .2s ease-out;font-size:14px;font-size:.875rem;position:absolute;top:50%;right:20px;font-family:atticons;content:"\e6dc";height:14px;margin-top:-7px;color:#0574AC}.att-accordion__toggle:hover{color:#0091d9}.att-accordion__toggle.noafter:after{content:none}.att-accordion__toggle.noafter i{color:#067ab4}.att-accordion__group--open .att-accordion__toggle:after{-webkit-transform:rotate(-180deg);-moz-transform:rotate(-180deg);-ms-transform:rotate(-180deg);-o-transform:rotate(-180deg);transform:rotate(-180deg)}.no-csstransforms .att-accordion__heading .att-accordion__toggle:after{-webkit-transition:none;-moz-transition:none;transition:none}.att-accordion__body{display:none;padding-top:0;padding-bottom:14px}.att-accordion__body p{margin-bottom:15px}.att-accordion__inner{padding-top:0}.att-accordion__inner>*{margin:0}.att-accordion__bottom--border{border-bottom:1px solid #888;position:absolute;left:20px;right:20px}.att-accordion--no-box .att-accordion__bottom--border{border-bottom:0}.att-accordion--no-box{background:0 0}.att-accordion--no-box .att-accordion__group{border:0;border-bottom:1px solid #bbb;margin-top:-1px;position:relative;padding-left:0!important;padding-right:0!important}.att-accordion--no-box .att-accordion__group.last,.att-accordion--no-box .att-accordion__group:last-child{border-radius:0}.att-accordion--no-box .att-accordion__group:hover{border-color:#bbb;background-color:transparent}.att-accordion--no-box .att-accordion__group--open{border-color:#bbb}.att-accordion--no-box .att-accordion__toggle:active{color:#0574AC}.att-accordion--no-box .att-accordion__toggle:hover{color:#0091d9}.att-accordion--no-box .att-accordion__group--open .att-accordion__toggle{color:#199DDF}.att-accordion--no-box .att-accordion__inner{margin:10px 0!important;text-transform:none}.att-accordion--no-box .att-accordion__toggle:after{position:absolute;top:50%;right:0}.att-accord-header{width:600px;height:50px;background-color:#f2f2f2;border-left:2px solid gray;border-right:2px solid gray;border-top:2px solid gray;border-bottom:2px solid gray;cursor:pointer}.att-accord-header-closed{border-bottom:0}.att-accord-header i{float:right;margin-right:20px;margin-top:-15px}.att-accord-body-inner-text{margin-left:50px;margin-right:50px;height:32px;border-bottom:1px solid gray}.att-accord-body-inner-end{margin-left:50px;margin-right:50px;height:32px;border-bottom:0}.att-accord-header-child{margin-left:50px;margin-top:14px}.att-accord-body{width:600px;height:100px;background-color:#fff;border-left:2px solid gray;border-right:2px solid gray}.att-accord-body-last{border-bottom:2px solid gray}.hourpicker .customdays-width{width:700px}.hourpicker .dropdown-width{width:32%;position:relative}.hourpicker .col-md-days{width:13.4%;padding-left:0;padding-right:0}.hourpicker .divider-margin-f{margin-top:30px;margin-bottom:20px}.hourpicker .divider-margin-s{margin-top:155px}.hourpicker .fromto-margin{width:6%;margin-top:45px;padding:0}.hourpicker .days-margin{margin-right:3px}.hourpicker .daysselect-margin{margin-bottom:20px;margin-right:25px;padding:0}.hourpicker .topDropDownWidth{width:100%;z-index:0}.hourpicker .resultTopMargin{margin-top:0;max-height:205px}.hourpicker .resultTopWidth{display:block;width:100%;position:absolute;background:#fff;z-index:999}.hourpicker .dropDownMarginBottom{width:80px;margin-bottom:10px}.hourpicker .dropDownMarginRight{margin-right:0!important;line-height:30px}.hourpicker .resultToDropDown{display:block;width:80px;position:absolute;background:#fff;z-index:99;top:111px}.hourpicker .resultFromDropDown{display:block;width:80px;position:absolute;background:#fff;z-index:99;top:71px}.hourpicker .selectDropDown{height:30px!important;width:80px;padding-left:0!important}.hourpicker .selectDropDown.selectDropDown-error{border:red solid 1px}.hourpicker .selectedItemInDropDown{background:#1792D6;color:#fff}.hourpicker .select2-container .select2-chosen{padding-left:4px!important}.hourpicker .select2-result .select2-result-label{padding:8px 3px!important}.hourpicker.hourpicker-error-msg{width:100%;border-radius:4px;display:block;padding:10px;font-family:arial;font-size:12px;font-size:.75rem;line-height:10px;color:#666;text-transform:none;background:#fff;position:absolute;z-index:1;-moz-box-sizing:border-box;box-sizing:border-box;text-align:center}.hourpicker.hourpicker-error-msg [class*=icon-]{color:#fff;position:relative;margin-right:9px;line-height:0!important;vertical-align:middle}.hourpicker.hourpicker-error-msg span{vertical-align:middle}.hourpicker.hourpicker-error-msg.error{color:#fff;background:#e00000}.hourpicker.hourpicker-error-msg.warning{color:#444;background:#FCB123}.hourpicker.hourpicker-error-msg.warning [class*=icon-]{color:#444}.hourpicker.hourpicker-error-msg.success{color:#fff;background:#008a06}.hourpicker.hourpicker-error-msg.info{color:#fff;background:#0a7cb5}.hourpicker.hourpicker-error-msg [class^=icon-]{height:30px;line-height:30px}.att-switch{display:inline-block;vertical-align:middle;width:77px;height:20px;line-height:20px;background-color:#666;border-radius:2px;position:relative;overflow:hidden;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.att-switch.large{width:83px;height:30px}.ie .att-switch{border:0}.att-switch-content{position:absolute;width:131px;font-size:0;top:0;left:-52px;overflow:hidden;-webkit-transition:left .2s ease-in-out 0;-moz-transition:left .2s ease-in-out 0;transition:left .2s ease-in-out 0}.att-switch-content.large{width:135px}.att-switch-content.dragging{-webkit-transition:left;-moz-transition:left 0;transition:left 0}.att-switch.att-checkbox--on .att-switch-content{left:0}.att-switch-offText,.att-switch-onText,.att-switch-thumb{display:inline-block;vertical-align:middle;font-size:11px;font-size:.6875rem;width:53px;height:21px;text-align:center;cursor:pointer;color:#fafafa;margin:0;-webkit-transition:background-color .2s ease-out,color .2s ease-out;-moz-transition:background-color .2s ease-out,color .2s ease-out;transition:background-color .2s ease-out,color .2s ease-out}.ie .att-switch-thumb,.lt-ie9 .att-switch-offText,.lt-ie9 .att-switch-onText,.lt-ie9 .att-switch-thumb{margin-top:-1px}@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){.att-switch-thumb{margin-top:-1px}}.att-switch-thumb{width:23px;height:18px;border-radius:2px;background:#fafafa;top:0;position:relative;overflow:hidden;font-size:12px;font-size:.75rem;color:#afafaf}.att-switch-thumb:focus{color:#0091d9}.att-switch-thumb:after{content:'III';letter-spacing:1px;line-height:17px;position:absolute;left:7px;top:1px}.att-switch-thumb.large{margin-top:1px;width:29px;height:28px}.att-switch-thumb.large:after{font-size:16px;font-size:1rem;content:'III';letter-spacing:1px;line-height:26px;position:absolute;left:7px;top:1px}.att-switch.att-checkbox--on{background:#118817}.att-switch .att-switch-thumb:hover,.att-switch.att-checkbox--on .att-switch-thumb:hover{color:#0091d9}.ico{font-size:15px;font-size:.9375rem;-webkit-font-smoothing:antialiased;color:#fff;line-height:20px;pointer-events:none;width:53px;z-index:3}.att-switch-onText{text-indent:4px}.att-switch-offText{text-indent:-4px}.att-switch input{visibility:hidden;position:absolute;left:-100px}.navbar .dev-notes-toggle{color:#6f6f6f;display:inline-block;vertical-align:middle;height:50px;line-height:49px}.navbar .dev-notes-toggle label{display:inline-block;vertical-align:middle;font-family:'Helvetica Neue LT Std','Helvetica Neue',Helvetica;font-size:12px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.navbar .att-switch{margin-top:-1px;margin-left:5px;background-color:#333;outline:1px solid #333}.button--search{border-radius:0 5px 5px 0}.form-field.form-field__small input[type=color],.form-field.form-field__small input[type=date],.form-field.form-field__small input[type=datetime-local],.form-field.form-field__small input[type=datetime],.form-field.form-field__small input[type=email],.form-field.form-field__small input[type=month],.form-field.form-field__small input[type=number],.form-field.form-field__small input[type=password],.form-field.form-field__small input[type=search],.form-field.form-field__small input[type=tel],.form-field.form-field__small input[type=text],.form-field.form-field__small input[type=time],.form-field.form-field__small input[type=url],.form-field.form-field__small input[type=week],.form-field.form-field__small select,.form-field.form-field__small textarea{height:30px;font-size:12px;font-size:.75rem}.form-field.form-field__small [class^=icon-]{height:30px;line-height:30px}.att-value-selector{display:inline-block;vertical-align:baseline;zoom:1;*display:inline;*vertical-align:auto;font-size:16px;font-size:1rem}.att-value-selector .att-radio{width:48px;height:48px;background:0 0;border:2px solid transparent;color:#bbb;padding:1px}.att-value-selector .att-radio:hover{border-color:#bababa;color:#444}.att-value-selector .att-radio.att-radio--on{border-color:#0574AC;color:#444}.att-value-selector .att-radio__indicator{-webkit-transform:none;-moz-transform:none;-ms-transform:none;-o-transform:none;transform:none;-webkit-transition:none;-moz-transition:none;transition:none;width:42px;height:42px;-ms-filter:none;filter:none;background:0 0;border-radius:40px;border:1px solid #bababa;margin:0;opacity:1;padding-top:5px;position:static}.att-value-selector.att-radio--on .att-radio__indicator{-ms-filter:none;filter:none}.att-value-selector__item{text-align:center}.att-value-selector__unit,.att-value-selector__value{font-size:16px;font-size:1rem;display:block;font-family:arial;line-height:18px;margin:0}.att-value-selector__unit{font-size:12px;font-size:.75rem;line-height:12px}.att-color-selector{display:inline-block;vertical-align:baseline;zoom:1;*display:inline;*vertical-align:auto;font-size:16px;font-size:1rem}.att-color-selector__item{width:30px;height:30px;-webkit-transition:none;-moz-transition:none;transition:none;margin-bottom:5px;background:0 0;border:0;position:relative}.att-color-selector__item:hover{border:2px solid #999;box-shadow:none}.att-radio.att-color-selector__item:hover>.att-radio__indicator{border:0;margin:-11px 0 0 -11px;width:22px;height:22px;border-radius:22px}.att-radio--on.att-color-selector__item{border:2px solid #157BB2}.att-radio--on.att-color-selector__item .att-radio__indicator{border:0;margin:-11px 0 0 -11px;width:22px;height:22px;border-radius:22px}.att-color-selector .att-radio__indicator,[data-color-selector] .att-radio__indicator{-webkit-transform:none;-moz-transform:none;-ms-transform:none;-o-transform:none;transform:none;-webkit-transition:none;-moz-transition:none;transition:none;width:30px;height:30px;border:1px solid #474747;border-radius:30px;display:block;left:50%;margin:-16px 0 0 -16px;opacity:1;top:50%;position:absolute;-ms-filter:"alpha(Opacity=100)"}.att-value-selector__popover-toggle{width:40px;height:40px;display:block;white-space:nowrap}.att-value-selector__popover-toggle [class^=icon-]{display:inline-block;zoom:1;*display:inline;*vertical-align:auto;position:static;vertical-align:middle;width:auto}.att-value-selector__popover-toggle--single{cursor:default}.att-value-selector__selected-circle{display:inline-block;zoom:1;*display:inline;*vertical-align:auto;width:40px;height:40px;border-radius:40px;border:2px solid #999;color:#444;text-align:center;vertical-align:middle}.att-value-selector__selected-circle .att-value-selector__value{line-height:14px;margin-top:5px}.att-color-selector .att-value-selector__selected-circle{border:0}.overlayed{position:absolute;top:0;right:0;bottom:0;left:0;background:none repeat scroll 0 0 rgba(242,242,242,.95);z-index:90;display:none}.modals{top:0;bottom:0;left:0;right:0;position:fixed;z-index:100;overflow-x:auto;overflow-y:scroll;display:none}.modal__informative,.modal__warning{background:#fff;width:380px;box-shadow:0 2px 5px 0 #BEBEBE;border:1px solid #E6E6E6;padding:35px;border-radius:5px;margin:5% auto}.modal__informative{color:#157BB2}.modal__informative .modal__header--icon{background:url(images/icon-informative-modal.png) center center no-repeat}.modal__warning{color:#ED6F20}.modal__warning .modal__header--icon{background:url(images/icon-warning-modal.png) center center no-repeat}.modal__header{display:inline-table;position:relative;width:73%}.modal__header h2{width:220px;display:inline-block;margin:0}.modal__header .modal__header--icon{position:absolute;display:inline-block;height:65px;width:110px;bottom:0}.modal__header .modal__header--close{color:#888;font-size:28px;position:absolute;right:-112px;top:-24px;cursor:pointer}.modal__header .modal__header--close:hover{color:#444}.modal__content{padding-top:8px;color:#444}.modal__footer{padding-top:35px}.modal__footer a{margin-right:5px}.modal-open,.modal-open .navbar{padding-right:17px}.custom_modal{background:none repeat scroll 0 0 #f2f2f2;opacity:.91}.custom_modal .modal__header h2{width:inherit;margin-bottom:12px}.custom_modal .modal__warning{color:inherit;padding:0;width:980px;background:0 0;border:0;border-radius:none;box-shadow:none}.custom_modal .modal__content{width:100%;padding-top:11px;display:inline-block}.custom_modal .size-onethird .button--primary{min-width:92px}.custom_modal .size-onethird .button--small{padding:8px 0}.custom_modal .accordian{background-color:#fff;margin:30px 5px 0;padding:0;border:1px solid #bbb;border-radius:3px 3px 0 0;border-bottom:0}.custom_modal .accordianheader{background:none repeat scroll 0 0 #666;color:#fff;padding:11px;border-radius:3px 3px 0 0}.custom_modal .att-accordion__bottom--border{border:0}.custom_modal .att-accordion__body,.custom_modal .att-accordion__heading{top:3px}.custom_modal .att-accordion__heading{padding:12px;margin:0}.custom_modal .att-accordion__body{padding:5px;background-color:#f2f2f2}.custom_modal .icon-chevron-down,.custom_modal .icon-chevron-up{right:24px;position:absolute}.custom_modal .button--square{border-bottom:1px solid #bbb;margin:14px 20px;padding:0}.custom_modal .button--square>label{margin-bottom:14px}.custom_modal .select2-container .select2-choice{height:30px}.custom_modal .select2-chosen{position:relative;top:-4px}.custom_modal .select2-arrow>b{position:relative;top:-6px}.custom_modal .att-accordion--no-box .att-accordion__group--open .att-accordion__toggle{background-color:#44C9F6;color:#444}.custom_modal .att-accordion__toggle{position:static}.custom_modal .acc_checkboxgroup .scroll-viewport{height:250px;width:960px}.att--tree ul{margin:0 0 0 10px!important;padding:0!important;list-style-type:none!important}.att--tree li{font-size:12px;font-size:.75rem;cursor:pointer;position:relative;text-decoration:none;color:#888;padding-left:24px;padding-top:2px}.att--tree li:hover{color:#0091d9}.att--tree__plus:before{font-size:14px;font-size:.875rem;font-family:atticons;content:"\e63b";display:inline-block;margin-right:8px;vertical-align:middle}.att--tree__plus:hover{color:#0091d9}.att--tree__arrow{-moz-box-sizing:border-box;box-sizing:border-box;background:url(images/treearrow.png) no-repeat;display:block;margin-left:-10px}.att--tree a{font-size:12px;font-size:.75rem;cursor:pointer;position:relative;display:inline-block;padding:5px 3px;text-decoration:none;color:#888}.att--tree a:hover{color:#0091d9}.att--tree{width:-webkit-fit-content}.att--tree__plus.minus{color:#39b1ec}.att--tree__plus.minus:before{font-size:14px;font-size:.875rem;font-family:atticons;content:"\e63c";display:inline-block;margin-right:8px;vertical-align:middle}.tablesorter-default{font-size:12px;font-size:.75rem;font-family:arial;width:100%;color:#333;background-color:#fff;margin:10px 0 15px;text-align:left;cursor:pointer}.tablesorter-default th,.tablesorter-default thead td{color:#fff;background-color:#666;border-collapse:collapse;padding:0;font-weight:700}.tablesorter-default tfoot td,.tablesorter-default tfoot th{border:0}.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/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:12px 16px}.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/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/down.png)}.tablesorter-default tfoot .tablesorter-headerAsc,.tablesorter-default tfoot .tablesorter-headerDesc,.tablesorter-default tfoot .tablesorter-headerSortDown,.tablesorter-default tfoot .tablesorter-headerSortUp{border-top:#000 2px solid}.tablesorter-default td{background-color:#fff;border-bottom:#aaa 1px solid;padding:4px;vertical-align:top}.tablesorter-default tbody>tr.even:hover>td,.tablesorter-default tbody>tr.odd:hover>td,.tablesorter-default tbody>tr:hover>td{background:#BBB;color:#000}.tablesorter-default tbody tr.normal-row td{background:#fff;padding:12px 16px}.tablesorter-default tbody tr.alt-row td{background:#f2f2f2;padding:12px 16px}.tablesorter-default tr.odd td{background-color:#dfdfdf}.tablesorter-default tr.even td{background-color:#efefef}.tablesorter-default tr.odd td.primary{background-color:#bfbfbf}.tablesorter-default td.primary,.tablesorter-default tr.even td.primary,.tablesorter-default tr.odd td.secondary{background-color:#d9d9d9}.tablesorter-default td.secondary,.tablesorter-default tr.even td.secondary,.tablesorter-default tr.odd td.tertiary{background-color:#e6e6e6}.tablesorter-default td.tertiary,.tablesorter-default tr.even td.tertiary{background-color:#f2f2f2}caption{background:#fff}.tablesorter-default .tablesorter-filter-row td{background:#eee;border-bottom:#ccc 1px solid;line-height:normal;text-align:center;-webkit-transition:line-height .1s ease;-moz-transition:line-height .1s ease;-o-transition:line-height .1s ease;transition:line-height .1s ease}.tablesorter-default .tablesorter-filter-row .disabled{opacity:.5;cursor:not-allowed}.tablesorter-default .tablesorter-filter-row.hideme td{padding:2px;margin:0;line-height:0;cursor:pointer}.tablesorter-default .tablesorter-filter-row.hideme .tablesorter-filter{height:1px;min-height:0;border:0;padding:0;margin:0;opacity:0}.tablesorter-default .tablesorter-filter{width:95%;height:auto;margin:4px;padding:4px;background-color:#fff;border:1px solid #bbb;color:#333;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:height .1s ease;-moz-transition:height .1s ease;-o-transition:height .1s ease;transition:height .1s ease}.tablesorter .filtered{display:none}.tablesorter .tablesorter-errorRow td{text-align:center;cursor:pointer;background-color:#e6bf99}.tablesorter-search-highlight{font-weight:700}.scrolling-table{width:700px}.scrolling-table .scroll-viewport{height:200px!important;width:99.5%!important;background-color:#fff}.scrolling-table .scroll-overview{margin-top:-14px!important}.scrolling-table .scroll-viewport:hover{background-color:#fff}.scrolling-table #att-scroll-table-content{height:200px;position:absolute!important;width:700px;padding-left:0;padding-top:0;padding-bottom:0;padding-right:5px}.icon--button{display:inline-block;margin-left:-6px;background-color:#fff;border:1px solid #888;height:40px;width:40px;line-height:39px;text-align:center;cursor:pointer;font-size:20px}.icon--button a{color:#888}.icon--button.first,.icon--button:first-child{border-radius:6px 0 0 6px}.icon--button.last,.icon--button:last-child{border-radius:0 6px 6px 0}.icon--button:hover{background-color:#bbb}.icon--button:hover>a{color:#444}.icon--button:active{background-color:#0574AC}.icon--button:active>a{color:#fff}.icon--button.active--button{background-color:#0574AC}.icon--button.active--button>a{color:#fff}.icon--button.icon--button__small{height:30px;width:34px;line-height:29px;font-size:14px}.icon--button__single-dropdown{font-size:14px;font-size:.875rem;display:inline-block;background-color:#fff;border:1px solid #888;height:30px;width:53px;line-height:29px;border-radius:6px;cursor:pointer}.icon--button__single-dropdown:after{font-size:14px;font-size:.875rem;font-family:atticons;content:"\e6bf";color:#888;margin-left:-4px}.icon--button__single-dropdown:after:hover:after{color:#444}.icon--button__single-dropdown:after:active:after{content:"\e6be";color:#0091d9}.icon--button__single-dropdown a{color:#888;padding-left:10px}.icon--button__single-dropdown:hover{background-color:#bbb}.icon--button__single-dropdown:hover>a{color:#444}.icon--button__single-dropdown:active{background-color:#fff;border-radius:6px 6px 0 0;border-top:1px solid #0091d9;border-left:1px solid #0091d9;border-right:1px solid #0091d9;border-bottom:1px solid #bbb}.icon--button__single-dropdown:active>a{color:#0574AC}.icon--button__dropdown-list{position:absolute;display:none}.icon--button__dropdown-list ul{left:-webkit-calc("-100% + 52px");left:-moz-calc("-100% + 52px");left:calc("-100% + 52px");position:relative;list-style:none;margin-left:0;margin-top:-1px;padding-left:0;border-radius:6px 0 6px 6px;border:1px solid #0091d9}.icon--button__dropdown-list ul li{font-size:12px;text-align:left;height:30px;padding:0 10px}.icon--button__dropdown-list ul li a{color:#888;line-height:30px;padding:0}.icon--button__dropdown-list ul li:hover{background-color:#0091d9}.icon--button__dropdown-list ul li:hover>a{color:#fff}.section-toggle{border-top:1px solid #888;text-align:center}.section-toggle--disabled{border-top-color:#d3d3d3}.section-toggle__button{font-size:12px;font-size:.75rem;display:inline-block;vertical-align:baseline;zoom:1;*display:inline;*vertical-align:auto;background:#fff;border-radius:0 0 3px 3px;border:1px solid #888;color:#444;cursor:pointer;margin:0 auto;padding:5px 10px;position:relative;text-align:center;top:-1px}.section-toggle__button:hover{border-color:#0091d9}.section-toggle__button:active{outline:0}.section-toggle__button:focus{outline:1px solid #39b1ec;outline-offset:2px;text-decoration:none}.section-toggle__button .icon-chevron-down,.section-toggle__button .icon-chevron-up{display:inline-block;zoom:1;*display:inline;*vertical-align:auto;vertical-align:middle}.section-toggle--disabled .section-toggle__button{display:none}.icons-list{list-style:none;margin:20px 0 0;padding:0;font-size:0}.icons-list li{font-size:14px;display:inline-block;width:20%;box-sizing:border-box;vertical-align:top;padding:20px;margin-bottom:20px;cursor:default;min-height:130px;position:relative;overflow:hidden;border:1px solid transparent;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-transition:all .2s ease-out;-moz-transition:all .2s ease-out;transition:all .2s ease-out}.icons-list li:hover{background:#fff;color:#199DDF;border-color:#d3d3d3}.icons-list [class*=icon]{display:inline-block;vertical-align:middle;-webkit-transition:font-size .2s ease-out;-moz-transition:font-size .2s ease-out;transition:font-size .2s ease-out}.icons-list[data-size=small] [class*=icon]{font-size:14px}.icons-list[data-size=medium] [class*=icon]{font-size:28px}.icons-list[data-size=large] [class*=icon]{font-size:56px}.icons-list.small-icons [class*=icon]{font-size:56px!important}.icons-list li [class*=icon]:hover{outline:1px dotted #444;color:#199DDF}.icons-list [data-role=title]{font-family:arial;font-size:14px;margin-top:15px;display:block}.icons-list[data-display=list] li{display:block;margin-bottom:0;width:100%;min-height:0}.icons-list[data-display=list] [data-role=title]{display:inline-block;vertical-align:middle;margin:0;margin-left:15px}.icons-list [data-role=css-class]{display:none;font-size:11px;background:rgba(0,0,0,.8);color:#fff;margin-top:10px;text-align:center;box-sizing:border-box;position:absolute;left:0;right:0;bottom:-30px;padding:0 10px;height:25px;padding-top:7px;white-space:nowrap;overflow-x:auto;-webkit-transition:bottom .2s ease-out;-moz-transition:bottom .2s ease-out;transition:bottom .2s ease-out}.icons-list li:hover [data-role=css-class]{bottom:0}.icons-list[data-display=list] [data-role=css-class]{left:auto;top:50%;right:25px;margin-top:-12px;background:#d3d3d3;color:#444;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.show-dev-notes .icons-list [data-role=css-class]{display:block}.icons-list [data-role=css-class]::selection{background:#666}.icons-list[data-display=list] [data-role=css-class]::selection{background:#d3d3d3}.label-icon{display:block}.tabs-icon.tabs>li a{height:40px;line-height:40px;font-size:14px}.dragdrop{border:1px dashed #bbb;border-radius:5px;padding:0;text-align:center;color:#bbb;position:relative}.dragdrop-over{background:#0091d9;color:#006496}.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}.fileContainer{position:relative;overflow:hidden;display:inline-table;font-weight:400}.fileContainer [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)"}.att-table-message .img-magnify-glass{background:url(images/magnify_glass.png) center center no-repeat;height:50px}.att-table-message .img-oops-exclamation{background:url(images/oops-exclamation.png) center center no-repeat;height:50px}.att-table-message .img-loading-dots{background:url(images/loading_dots.gif) center center no-repeat;height:50px}.att-table-message .message{text-align:center;padding-top:40px;border-style:solid;border-width:1px;border-top:0;padding-bottom:45px;border-color:#d2d2d2;width:100%;min-height:220px}.att-table-message .loading-message{background:#f2f2f2;background:rgba(242,242,242,.5)}.att-table-message .error-title{font-family:arial,Fallback,sans-serif;font-size:24px;color:#444;line-height:26px}.att-table-message .title{font-size:24px;color:#444;font-family:arial}.att-user-message .hidden{visibility:hidden}.att-user-message .message-wrapper-success{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;opacity:.95;background-color:#fff;-webkit-box-shadow:0 6px 6px rgba(0,0,0,.25),inset 0 -1px rgba(0,0,0,.3);-moz-box-shadow:0 6px 6px rgba(0,0,0,.25),inset 0 -1px rgba(0,0,0,.3);box-shadow:0 6px 6px rgba(0,0,0,.25),inset 0 -1px rgba(0,0,0,.3);float:right;margin-top:-50px;min-width:220px;max-width:360px;max-height:196px;border:solid #54AD18 1px}.att-user-message .message-wrapper-error{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;opacity:.95;background-color:#fff;-webkit-box-shadow:0 6px 6px rgba(0,0,0,.25),inset 0 -1px rgba(0,0,0,.3);-moz-box-shadow:0 6px 6px rgba(0,0,0,.25),inset 0 -1px rgba(0,0,0,.3);box-shadow:0 6px 6px rgba(0,0,0,.25),inset 0 -1px rgba(0,0,0,.3);float:right;margin-top:-50px;min-width:220px;max-width:360px;max-height:196px;border:solid #FE9E0C 1px}.att-user-message .message-icon-success{float:left;margin-top:10px;margin-left:10px;margin-right:10px;font-size:27px;color:#54AD18}.att-user-message .message-icon-error{float:left;margin-top:10px;margin-left:10px;margin-right:10px;font-size:27px;color:#FE9E0C}.att-user-message .message-title-success{font-family:arial;font-size:18px;line-height:15px;word-wrap:break-word;width:100%;color:#008A06}.att-user-message .message-title-error{font-family:arial;font-size:18px;line-height:15px;word-wrap:break-word;width:100%;color:#EF6F00}.att-user-message .message-body-wrapper{max-width:280px;margin-top:15px;margin-right:20px;margin-bottom:15px;float:left}.att-user-message .message-msg{color:#444;font-family:arial;font-size:12px;line-height:15px;margin-top:3px;margin-bottom:15px;word-wrap:break-word}.text-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-ms-text-overflow:ellipsis;display:block;width:45%}.pane-group{height:100%;width:100%;border:1px solid #D3D3D3;border-radius:3px;background-color:#FFF}.pane-group .side-pane{position:relative;width:33%;height:100%;float:left}.pane-group .side-pane .header{padding:20px;font-family:arial;font-size:14px;color:#444;line-height:20px}.pane-group .side-pane .body div{line-height:20px;font-family:arial;font-size:14px;color:#444;padding-top:10px;padding-bottom:10px;padding-left:20px}.pane-group .side-pane .body div:hover{background-color:#067AB4;cursor:pointer;color:#FFF}.pane-group .inner-pane{position:relative;display:none;width:300px;height:100%;border-left-width:1px;border-right-width:1px;border-left-style:solid;border-right-style:solid;border-color:#D3D3D3;float:left}.pane-group .inner-pane .header{padding:20px;font-family:arial;font-size:14px;color:#444;line-height:20px}.pane-group .inner-pane .body div{line-height:20px;font-family:arial;font-size:14px;color:#444;padding-top:10px;padding-bottom:10px;padding-left:20px}.pane-group .inner-pane .body div:hover{background-color:#067AB4;cursor:pointer;color:#FFF}.pane-account-selector{width:940px;height:435px;margin-left:10%}.pane-account-selector .line{margin-left:20px;margin-right:20px}.pane-account-selector .side-pane .body .side-row-selected{background-color:#067AB4;color:#FFF}.pane-account-selector .side-pane .body .side-row-selected .chevron-mark{color:#FFF}.pane-account-selector .side-pane .body .chevron-mark{float:right;margin-right:10px;color:#067AB4}.pane-account-selector .side-pane .body div:hover .chevron-mark{color:#FFF}.pane-account-selector .inner-pane{height:434px}.pane-account-selector .inner-pane .header .form-field{width:100%;min-width:190px;max-width:270px;margin-top:10px}.pane-account-selector .inner-pane .header a{font-size:12px;font-family:arial;text-decoration:underline;color:#067AB4}.pane-account-selector .inner-pane .header .verticalLine{border-left:2px solid #D3D3D3;padding-left:2px;padding-right:4x}.pane-account-selector .inner-pane .body .chevron-mark{float:right;margin-right:20px;margin-left:20px;color:#067AB4}.pane-account-selector .inner-pane .body div:hover .chevron-mark{color:#FFF}.pane-account-selector .inner-pane .body .att-radio,.pane-account-selector .inner-pane .body .att-radio__indicator{padding:0}.pane-account-selector .inner-pane hr{margin-top:0;margin-bottom:0}.att-drawer{background-color:#fff;box-shadow:0 4px 5px rgba(0,0,0,.2),inset 0 1px rgba(0,0,0,.3);-webkit-box-shadow:0 4px 5px rgba(0,0,0,.2),inset 0 1px rgba(0,0,0,.3);-moz-box-shadow:0 4px 5px rgba(0,0,0,.2),inset 0 1px rgba(0,0,0,.3)}.drawer-backdrop{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(255,255,255,.6);z-index:999}.loading_div{display:block;margin:10px 0}.typeahead span[tag-badges]{margin-right:5px}.typeahead .tag{margin:0}.typeahead.mainContainerOuter{position:relative;margin-top:35px}.typeahead .maincontainer{text-align:left;width:700px;border:1px solid #888;border-radius:5px;background:#FFF;max-height:220px;overflow:auto;padding:8px 10px 7px;margin-top:3px}.typeahead .maincontainer:focus{border:1px solid #0091d9}.typeahead .typeahed_active{border:1px solid #0574ac}.typeahead .maincontainer>br{display:none}.typeahead .maincontiner>span{font-size:15px;display:inline-block;padding-right:10px}.typeahead input{padding:5px!important;font-size:14px!important;outline:0!important;background:transparent!important;width:auto!important;border:0!important;height:25px!important}.typeahead ::-ms-clear{display:none}.typeahead .item{width:100%;box-sizing:border-box;margin:auto;text-align:left;height:30px;background:#FFF;padding:4px}.typeahead .item.title{font-size:18px;font-weight:700}.typeahead .subtitle{font-size:14px;color:#444}.typeahead .active{background-color:#4180C4;color:#f2f2f2}.typeahead .filtercontainer{position:absolute;left:0;margin-top:-5px;max-height:160px;overflow:auto;width:100%;background:#FFF;z-index:999;border-radius:0 0 5px 5px;border:1px solid #0091d9}.typeahead .dynamiccss{width:120px;height:30px;border:2px #000 solid;display:inline;margin-left:2px}.typeahead .textAreaEmailContent{font-size:14px;height:80px;line-height:20px;color:#444;width:700px;font-family:arial;margin-top:3px;padding:10px}.typeahead .btnEmailSend{margin-top:70px}.typeahead .message{font-size:12px;line-height:20px;color:#444;font-family:arial}.typeahead .textAreaEmailContentDiv{margin-top:17px}.att-modal__close.typeahead-close{position:absolute;left:initial;bottom:initial;right:0;top:0;color:#000}.typeahead-modal-container{position:relative;width:700px;margin:30px auto}.typeahead-heading{font-size:36px;line-height:20px;color:#444;font-family:omnes_att_light;margin:0}.typeahead-paragraph{font-size:14px;line-height:20px;color:#444;font-family:arial;margin-top:7px;margin-bottom:0}.typeahead-modal-footer{padding-top:40px}.type_ahead-cancel{margin-left:10px}.tabs_overlay{list-style:none;margin:0;padding:0;font-size:0;display:block;border:1px solid #888;border-radius:3px}.tabs_overlay .tabs_overlay__item{display:inline-block;vertical-align:baseline;zoom:1;*display:inline;*vertical-align:auto;font-size:18px;font-size:1.125rem;padding:10px 15px;border-left:1px solid #d3d3d3}.tabs_overlay .tabs_overlay__item.two__item{width:50%}.tabs_overlay .tabs_overlay__item.three__item{width:33.3%}.tabs_overlay .tabs_overlay__item.active{background-color:#0574AC;color:#fff}.tabs_overlay .tabs_overlay__item.active .icon-included-checkmark,.tabs_overlay .tabs_overlay__item.active .icon-orders,.tabs_overlay .tabs_overlay__item.active a.viewLink{color:#fff}.tabs_overlay .tabs_overlay__item a.viewLink{float:right;padding-top:2px;font-size:14px;font-size:.875rem}.tabs_overlay .tabs_overlay__item .icon-orders{color:#0574AC}.tabs_overlay .tabs_overlay__item .icon-included-checkmark{color:#4ca90c}.tabbedOverlay_modal{background:none repeat scroll 0 0 #f2f2f2;opacity:.91}.tabbedOverlay_modal .modal__main{color:inherit;padding:0;width:936px;background:0 0;border:0;border-radius:none;box-shadow:none;margin:5% auto}.tabbedOverlay_modal .modal__content{width:100%;background-color:#fff;display:inline-block;padding:0;margin-top:30px}.tabbedOverlay_modal .modal__content .body__content{padding:20px 8px}.tabbedOverlay_modal .icon-circle-action-close{font-size:28px}.tabbedOverlay_modal .icon-trash{font-size:14px;color:#0574AC;border:solid 1px #0574AC;border-radius:6px;padding:5px}.att-boardstrip{display:inline-block;width:100%;border-bottom:1px solid #9d9d9d;position:relative;padding-top:15px}.att-boardstrip .boardstrip-reel{margin-bottom:15px}.att-boardstrip .boardstrip-item--add{border:1px dashed #CCC!important;background:#F2F2F2;color:#444545;width:140px;height:80px;font-size:12px;font-family:arial;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;position:absolute;left:50px;top:15px}.att-boardstrip .boardstrip-item--add:hover{background-color:#39b1ec;cursor:pointer;color:#fff}.att-boardstrip .boardstrip-item--add i{font-size:30px;margin-left:auto;margin-right:auto}.att-boardstrip .boardstrip-item--add .centered{margin-left:auto;margin-right:auto;margin-top:8px;margin-bottom:-12px;display:block}.att-boardstrip .board-viewport{float:left;margin-left:210px;max-height:95px;position:relative;height:95px;overflow:hidden;width:0}.att-boardstrip .board-viewport .boardstrip-container{width:0;margin-left:0;left:0;position:absolute;list-style:none;-webkit-transition:left 1000ms;-moz-transition:left 1000ms;transition:left 1000ms}.att-boardstrip .board-viewport .board-item{width:140px;height:80px;border:1px solid #000;margin:0 15px 15px 0;background-color:#efefef;border-radius:3px;float:left;overflow:hidden}.att-boardstrip .board-viewport .board-item:focus,.att-boardstrip .board-viewport .board-item:hover{border:2px solid #0091d9;background-color:#fff;cursor:pointer}.att-boardstrip .board-viewport .board-item .board-img{width:61px;height:40px;margin:0 auto}.att-boardstrip .board-viewport .board-item .board-img img{max-width:100%}.att-boardstrip .board-viewport .board-item .title{margin:0 auto;display:block;text-align:center;line-height:16px;color:#555545;font-size:12px;font-family:arial;padding:10px 0}.att-boardstrip .board-viewport .board-item.selected{background-color:#fff;border:2px solid #0091d9}.att-boardstrip .board-viewport .board-item .board-caret{cursor:default;outline:0;position:absolute;bottom:7px}.att-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:0;height:0;position:absolute;left:61px;bottom:-7px}.att-boardstrip .board-viewport .board-item .board-caret .board-caret-arrow-up{width:0;height:0;border-style:solid;border-width:0 8px 8px;border-color:transparent transparent #f2f2f2;left:61px;position:absolute}.att-boardstrip .arrow{font-size:32px;cursor:pointer}.att-boardstrip .arrow:hover{color:#0091d9}.att-boardstrip .prev-items{display:inline-block;margin-top:auto;margin-bottom:auto;margin-right:15px;margin-right:15px;position:absolute;left:0;top:36px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.att-boardstrip .next-items{display:inline-block;margin-top:auto;margin-bottom:auto;margin-left:15px;position:absolute;right:0;top:36px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.att-boardstrip .centered{display:table-cell;text-align:center;vertical-align:middle}.content{color:#444}section{margin-bottom:60px}a:hover{text-decoration:none}a:focus{outline:-webkit-focus-ring-color auto 5px}h2,h3,h4{margin:0 0 20px}h2{font-family:'Helvetica Neue',Helvetica;font-size:36px;font-size:2.25rem}h3{font-size:18px;font-size:1.125rem;font-weight:400}h4{font-size:14px;font-size:.875rem;font-weight:600;margin:0}dl{margin:5px 0 20px}dd,dt{display:inline-block;margin:0;width:80px}dd{width:150px}.font-clearview p{font-size:12px;font-size:.75rem;line-height:20px}.row{position:relative}.section-row{padding:20px 0;position:relative}.section-row:first-child{padding-top:0}.section-row:first-child h2{margin-top:-5px}.section-row h4{text-transform:uppercase}.section-description{line-height:20px}.section-row-description{font-size:12px;font-size:.75rem;line-height:18px;margin:5px 0}.section-row-description+.section-row-description{margin-top:20px}.section-buttons,.section-download-button{margin-top:5px;position:absolute;right:10px}.section-image{margin:20px 0;width:100%}.font-face-showcase{font-size:44px;font-size:2.75rem;line-height:54px;margin:20px 0}#pill-buttons{background:url(images/pill-buttons-diagram.png) 360px 50px no-repeat}#pill-buttons h2{margin-top:0}#pill-buttons .section-row .icon-cross{color:#888;font-size:30px;font-size:1.875rem}.colored-buttons-wrapper{margin-bottom:40px}.colored-buttons-container{-webkit-transition:background .3s ease-out;-moz-transition:background .3s ease-out;transition:background .3s ease-out;margin:0 0 20px;overflow:hidden;padding:20px 0}#forms{background:url(images/forms-diagram.png) 360px 100px no-repeat}.switches label{display:inline-block;margin:10px 0 15px;text-align:center;width:100%}.switches .span2{text-align:center}.dev-notes{background:#eaeaea;border-radius:3px;display:none;margin-bottom:50px;padding:20px}.show-dev-notes .dev-notes{display:block}.dev-notes .tabs{margin-top:20px}.dev-notes .tabs li a{background:#aaa;border:0;border-bottom:0;border-radius:0;color:#333;font-family:arial;font-size:10px;font-size:.625rem;height:auto;line-height:18px;margin-left:2px;padding:5px 15px 2px}.dev-notes .tabs li:first-child a{margin-left:0}.dev-notes .tabs li:hover a{background:#181818}.dev-notes .tabs li.active a{background:#272822}.dev-notes .tabs li.active a,.dev-notes .tabs li:hover a{color:#fff}pre.line-numbers{background-color:#272822;border-radius:0 0 3px 3px;border:0;margin:0;padding-bottom:30px;padding-left:50px;padding-top:30px;word-wrap:normal}pre.line-numbers.with-example{border-radius:0 0 3px 3px;overflow:visible;padding-bottom:10px;padding-left:40px;position:relative}pre.notes{padding-top:0;padding-bottom:0}.dev-notes-header{margin:0 0 10px;z-index:10;-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0}.dev-notes.with-tabs .dev-notes-header{margin:0;padding-bottom:0}.dev-notes .title,.dev-notes p{margin:10px 0 0;color:#777;font-size:12px;font-size:.75rem}.dev-notes p:first-of-type{margin-top:0}.dev-notes .title{font-weight:600;margin:0 0 5px}.dev-notes .title:before{content:'Dev Notes: '}.dev-notes .close{position:absolute;top:0;right:0;color:#777;font-size:12px;font-size:.75rem;padding:7px 0 7px 10px;text-align:right}.dev-notes .close:hover{color:#F9432C}.dev-notes-example-title{margin:0 0 10px;color:#777}.dev-notes-wrapper{margin:0;background:#272822;padding:20px;border-radius:0 3px 3px}.dev-notes-example{margin:0;padding:20px;background:#fff;position:relative;overflow:hidden}.dev-notes-example:last-child{margin-bottom:0}.dev-notes-js-link{position:absolute;right:10px;top:10px;font-family:arial;font-size:10px;font-size:.625rem;color:#444;padding:5px;background:#ddd;border:1px solid #ccc;border-radius:3px}.dev-notes-js-link:hover{background-color:#fff}.navbar .body-color-selector>a{color:#6f6f6f}.navbar .body-color-selector-item{height:50px;padding:0 10px;-moz-box-sizing:border-box;box-sizing:border-box}.navbar .body-color-selector-color{text-indent:-9999px;width:25px;height:25px;border-radius:100%;float:right;margin-top:12px;background-color:#DADADA}.body-color-selector-gray .body-color-selector-color{background-color:#DADADA}.body-color-selector-white .body-color-selector-color{background-color:#fff}.font-showcase-row>[class*=span]:first-child{border-top:1px solid #d3d3d3;padding-top:35px}.font-showcase-row h4{font-family:arial;font-size:12px;font-size:.75rem;font-weight:100;text-transform:uppercase}h4.font-showcase-font-example,h4.font-showcase-font-name{text-transform:none}.font-showcase-info{font-family:arial;font-size:12px;font-size:.75rem;color:#888}.h6 .font-showcase-info{margin-top:-10px}.font-showcase-row .section-row-description{margin-bottom:20px}.font-showcase-row.display-prices .right-col .size-half{margin-bottom:15px}.font-showcase-row .display-prices-small{margin-top:30px}.font-showcase-details .details-label{margin-top:22px}.color-circle{display:inline-block;width:100px;height:100px;border-radius:100%}.next-section-link{margin-top:50px;display:inline-block;text-decoration:none;border-bottom:1px solid transparent}.next-section-link:hover{color:#FC411E;border-bottom-color:#FC411E;text-decoration:none}.next-section-link:after{content:'\e6da';font-family:atticons;font-size:12px;font-size:.75rem;margin-left:5px}#breadcrumbs .section-row{padding-top:0}#breadcrumbs .section-description{margin:0}#photo-video-controls{background:url(../images/video-photo-controls.png) right 60px no-repeat}#photo-video-controls .section-description{margin-bottom:70px}[data-role=actions-bar]{background:#F2F2F2;position:relative;z-index:1;padding-top:0;padding-bottom:25px;margin-bottom:10px;overflow:hidden}[data-role=actions-bar]:after{content:'';position:absolute;display:block;bottom:0;left:10px;right:10px;border-bottom:1px solid #d3d3d3}.color-white [data-role=actions-bar]{background:#fff}[data-role=actions-bar] label{position:relative}[data-role=actions-bar] label span{text-transform:none;font-size:10px;font-size:.625rem}#iconography.affix{position:relative;padding-top:87px}#iconography.affix [data-role=actions-bar]{width:720px;top:50px;z-index:1;position:fixed;padding-top:35px;padding-bottom:25px}#total-icons-found{position:absolute;right:0}#iconography .section-row:first-child h2{margin-bottom:0}.columns{font-size:0}.columns.text-center{margin:0 auto}.col{display:inline-block;vertical-align:top;font-size:14px;font-size:.875rem;box-sizing:border-box}.size-col-10,.size-full{width:100%}.size-twofifths{width:40%}.size-threefifths{width:60%}.size-fourfifths{width:90%}.size-col-1,.size-onetenth{width:10%}.size-col-2,.size-twotenths{width:20%}.size-col-3,.size-threetenths{width:30%}.size-col-4,.size-fourtenths{width:40%}.size-col-5,.size-fivetenths{width:50%}.size-col-6,.size-sixtenths{width:60%}.size-col-7,.size-seventenths{width:70%}.size-col-8,.size-eighttenths{width:80%}.size-col-9,.size-ninetenths{width:90%}.no-margin{margin:0}.pull-right{float:right}.pull-left{float:left}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-uppercase{text-transform:uppercase}.text-underline{text-decoration:underline}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed}.font-clearview{font-family:arial}.font-omnes{font-family:arial}.font-omnes-light{font-family:omnes_att_light}.note{font-size:12px;font-size:.75rem;color:#ff3000}.size-full{width:100%}.size-half{width:50%}.size-onethird{width:33.333333%}.size-twothirds{width:66.666666%}.size-onefourth{width:25%}.size-onefifth{width:20%}.size-onesixth{width:16.666666%}.size-oneseventh{width:14.285714%}.size-oneeighth{width:12.5%}.size-onenineth{width:11.111111%}.size-onetenth{width:10%}.bg-color-primary{background-color:#067ab4}.bg-color-primary-hover{background-color:#199ddf}.bg-color-text{background-color:#444}.bg-color-inactive{background-color:#ddd}.bg-color-uielements{background-color:#777}.bg-color-table-hover{background-color:#e5e5e5}.bg-color-subtle-hover{background-color:#bbb}.bg-color-background{background-color:#ddd}.bg-color-buynow{background-color:#ff7200}.bg-color-warning{background-color:#fcb134}.bg-color-error{background-color:#ff4539}.bg-color-success{background-color:#6ebb1f}.text-color-primary{color:#067ab4}.text-color-primary-hover{color:#199ddf}.text-color-text{color:#444}.text-color-inactive{color:#ddd}.text-color-uielements{color:#777}.text-color-table-hover{color:#e5e5e5}.text-color-subtle-hover{color:#bbb}.text-color-background{color:#ddd}.text-color-buynow{color:#ff7200}.text-color-warning{color:#fcb134}.text-color-error{color:#ff4539}.text-color-success{color:#6ebb1f}.align-right{margin-left:0!important;left:-100%!important;right:0!important}.align-left{left:-1px!important;right:0!important;margin-left:0!important;border-top-right-radius:6px!important;border-top-left-radius:0!important}#horizontalScroll{height:80px;width:100px;border:1px solid #000;overflow-y:hidden}#horizontalScroll #dynamicWidth{border:0}#horizontalScroll div{width:40px;height:100%;border:1px dashed #000}#utilities ul{height:80px;width:100px;border:1px solid #000;margin-left:0}#utilities .accessibility-div{min-width:100px;min-height:100px;width:100px;height:100px;border:1px solid #000}#utilities .circle{display:block;max-width:40px;max-height:40px;padding:11px 0;-moz-box-sizing:border-box;box-sizing:border-box;background:#e5e5e5;border-radius:20px;position:relative;line-height:15px;color:#999;text-align:center;border:1px solid transparent;cursor:pointer}#utilities .circle span{display:block;font-size:10px;line-height:10px;text-align:center;color:#999;border:1px solid #999;position:absolute;height:18px;width:65px;top:18px;left:0;padding-top:20px;cursor:pointer}#utilities .color-on-focus:focus{background:#0574AC;border-color:#fff} \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/ebz/sandbox/styles/tbs.css b/ecomp-portal-BE/war/static/ebz/sandbox/styles/tbs.css
deleted file mode 100644
index cadb4846..00000000
--- a/ecomp-portal-BE/war/static/ebz/sandbox/styles/tbs.css
+++ /dev/null
@@ -1 +0,0 @@
-@charset "UTF-8";address,blockquote,dd,h1,h2,h3,h4,h5,h6,ol,p,pre,table,ul{margin:0;padding:0;margin-bottom:24px;margin-bottom:1.5rem}html{font-size:1em;line-height:1.5}body{margin:0}h1{font-size:48px;font-size:3rem;line-height:1}h2{font-size:36px;font-size:2.25rem;line-height:1.3333333333}h3{font-size:30px;font-size:1.875rem;line-height:1.6}h4{font-size:24px;font-size:1.5rem;line-height:1}h5{font-size:20px;font-size:1.25rem;line-height:1.2}h6{font-size:18px;font-size:1.125rem;line-height:1.3333333333}dd,ol,ul{margin-left:48px;margin-left:3rem}li>ol,li>ul{margin-bottom:0}code,kbd,pre,samp{font-family:monospace,monospace}blockquote{text-indent:-.41em;quotes:"“" "â€";margin-left:48px;margin-left:3rem}blockquote p:before{content:"“";content:open-quote}blockquote p:after{content:"";content:no-close-quote}blockquote p:last-of-type:after{content:"â€";content:close-quote}q{quotes:"‘" "’" "“" "â€"}q:before{content:"‘";content:open-quote}q:after{content:"’";content:close-quote}q q:before{content:"“";content:open-quote}q q:after{content:"â€";content:close-quote}q:first-child{display:inline-block;text-indent:-.22em}table{width:100%;border-collapse:collapse;border-spacing:0}td,th{padding:12px}#grid{position:absolute;top:0;left:50%;width:980px;margin-left:-490px;counter-reset:section;z-index:9999!important;pointer-events:none;outline:1px solid rgba(0,206,209,.1)}#grid:after{position:fixed;top:0;left:0;content:'Column: 20px Gutter: 20px Margin: 20px';display:block;max-width:90px;padding:3px;background-color:#000;color:#fff;font-size:10px;font-family:monospace;z-index:9999}#grid div.vert{width:20px;outline:solid rgba(0,206,209,.3);outline-width:1px;margin-right:20px;position:relative;background:rgba(255,0,0,.05);counter-increment:section}#grid div.vert.first-line{margin-left:20px}#grid div.vert::after{position:fixed;display:block;text-align:center;color:#fff;width:20px;content:counter(section);top:5px;font-size:8px;font-family:monospace}#grid div.vert:nth-child(24){position:absolute;top:0;right:0}#grid div.vert:nth-child(1),#grid div.vert:nth-child(10),#grid div.vert:nth-child(11),#grid div.vert:nth-child(12),#grid div.vert:nth-child(13),#grid div.vert:nth-child(14),#grid div.vert:nth-child(15),#grid div.vert:nth-child(16),#grid div.vert:nth-child(17),#grid div.vert:nth-child(18),#grid div.vert:nth-child(19),#grid div.vert:nth-child(2),#grid div.vert:nth-child(20),#grid div.vert:nth-child(21),#grid div.vert:nth-child(22),#grid div.vert:nth-child(23),#grid div.vert:nth-child(24),#grid div.vert:nth-child(3),#grid div.vert:nth-child(4),#grid div.vert:nth-child(5),#grid div.vert:nth-child(6),#grid div.vert:nth-child(7),#grid div.vert:nth-child(8),#grid div.vert:nth-child(9){display:inline-block!important}#grid div.vert:nth-child(25),#grid div.vert:nth-child(26),#grid div.vert:nth-child(27),#grid div.vert:nth-child(28),#grid div.vert:nth-child(29),#grid div.vert:nth-child(30),#grid div.vert:nth-child(31){display:none!important}#grid div.horiz{height:10px;border-bottom:1px dotted rgba(100,100,100,.2);margin:0;padding:0}.bg-prime-blue{background-color:#067ab4}.bg-secondary-gray{background-color:#666}.bg-light-blue{background-color:#bcc9d5}.bg-dark-gray{background-color:#444}.bg-dusty-blue{background-color:#97b1cf}.bg-warm-gray{background-color:#cccb9b}.bg-taupe{background-color:#cccb6c}.bg-green-highlight{background-color:#c4d63f}.bg-lime-highlight{background-color:#dad632}.bg-purple-highlight{background-color:#b6539c}.bg-magenta{background-color:#d71481}.bg-blue-highlight{background-color:#4cc8f3}.bg-ochre{background-color:#fab230}.bg-green{background-color:#4fa721}.bg-lime{background-color:#b6bd26}.bg-purple{background-color:#7f0e7c}.bg-burgundy{background-color:#b1103e}.bg-dark-blue{background-color:#0e2875}.bg-gold{background-color:#fd9827}.bg-teal{background-color:#20c6b2}.bg-mint-green{background-color:#9cfecd}.bg-yellow{background-color:#feed35}.bg-white{background-color:#fff}.alt.inline-list>li{display:inline-block;zoom:1;*display:inline;*vertical-align:auto;vertical-align:middle;float:none}.text-upper{text-transform:uppercase!important}body{font-family:arial}.font-showcase h1,.font-showcase h2,.font-showcase h3,.font-showcase h4,.font-showcase h5,.font-showcase h6{font-weight:100;letter-spacing:-1px;margin:10px 0;-webkit-font-smoothing:antialiased}.font-showcase h1{font-family:omnes_att_light;font-size:48px;font-size:3rem;line-height:48px}.font-showcase h2,.price{font-family:omnes_att_light;font-size:36px;font-size:2.25rem;line-height:36px}.font-showcase h3{font-family:arial;font-size:24px;font-size:1.5rem;line-height:28px}.font-showcase h4,.font-showcase h4.font-showcase-font-example,.font-showcase h4.font-showcase-font-name{font-family:arial;font-size:18px;font-size:1.125rem;line-height:22px;-webkit-font-smoothing:antialiased}.font-showcase h5{font-family:arial;font-size:14px;font-size:.875rem;line-height:20px;-webkit-font-smoothing:antialiased}.font-showcase h6{font-family:arial;font-size:11px;font-size:.6875rem;line-height:30px;font-weight:100;-webkit-font-smoothing:antialiased}.body-copy,.font-showcase p{font-family:arial;font-size:14px;font-size:.875rem;line-height:20px;-webkit-font-smoothing:antialiased}.body-copy-short{font-family:arial;font-size:12px;font-size:.75rem;line-height:15px;-webkit-font-smoothing:antialiased}p [class*=icon]{display:inline-block;vertical-align:middle;margin-top:-4px}.details-label{display:block;font-family:arial;font-size:11px;font-size:.6875rem;line-height:15px}.details-label+.price{line-height:28px}.price{letter-spacing:-1px;-webkit-font-smoothing:antialiased}.price sup{font-size:18px;font-size:1.125rem;vertical-align:baseline;top:-11px;margin:0 2px}.price-alt{font-size:24px;font-size:1.5rem;line-height:24px}.price-alt sup{font-size:12px;font-size:.75rem;top:-8px}.promo-tagline{font-family:omnes_att_medium_italic;font-size:16px;font-size:1rem;line-height:20px;display:inline-block;margin-bottom:5px;-webkit-font-smoothing:antialiased}.promo-text{font-family:clearview_att_italic;font-size:12px;font-size:.75rem;line-height:15px;display:inline-block;margin-bottom:5px;-webkit-font-smoothing:antialiased}.divider,.divider-dark,hr{border:0;border-bottom:1px solid #d3d3d3}.divider-light{border-color:#e5e5e5}dl{font-family:arial;color:#444;font-size:12px;font-size:.75rem}dt{font-family:arial;font-size:11px;font-size:.6875rem;display:block!important;margin:10px 0 5px!important;width:auto!important;text-transform:uppercase}dt a{font-family:arial;color:#067ab4;text-transform:none}dd{display:inline!important;line-height:20px}[data-highlight]{background-color:#c9e9f9;-webkit-animation:highlight-fade 3s infinite}@-webkit-keyframes highlight-fade{100%,80%{background-color:transparent}}.tabsbid{vertical-align:baseline;zoom:1;*display:inline;*vertical-align:auto;list-style:none;margin:0;padding:0;font-size:0;display:-webkit-inline-box}.simplified-tabs__item .active{border-bottom:solid 4px #444}.tabsbid--right{float:right}.tabsbid__item{display:inline-block;vertical-align:baseline;zoom:1;*display:inline;*vertical-align:auto;padding:0;margin:0}.tabsbid__item-link{display:inline-block;vertical-align:baseline;zoom:1;*display:inline;*vertical-align:auto;font-size:14px;font-size:.875rem;background-color:#f2f2f2;border:1px solid #888;color:#666;cursor:pointer;height:40px;line-height:39px;margin:0 0 0 -1px;padding:0 20px;text-align:center;text-decoration:none;text-transform:none;width:auto}.tabsbid__item--first .tabsbid__item-link,.tabsbid__item:first-child .tabsbid__item-link{border-radius:4px 0 0 4px;margin-left:0}.tabsbid__item--last .tabsbid__item-link,.tabsbid__item:last-child .tabsbid__item-link{border-radius:0 4px 4px 0}.tabsbid__item-link:hover{-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;transition:all .3s ease-out;background-color:#b2b2b2;color:#000;text-decoration:none}.tabsbid__item--active .tabsbid__item-link{background-color:#0574AC;border:1px solid #0574AC;color:#fff}.tabsbid--small .tabsbid__item-link{font-size:11px;font-size:.6875rem;padding:0 15px;height:30px;line-height:29px;margin:0 0 0 -5px}.tabsbid--light .tabsbid__item-link{background-color:#fff}.tabsbid--links{text-align:left;border-bottom:1px solid #888}.tabsbid--links .tabsbid__item-link{font-size:14px;font-size:.875rem;background-color:none;border:0;padding:0 15px 0 0}.tabsbid--links .tabsbid__item-link:hover{-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;transition:all .3s ease-out;background:0 0;color:#067ab4;text-decoration:none}.tabsbid--links .tabsbid__item--active .tabsbid__item-link{background:0 0;color:#067ab4}.tabsbid--icons .tabsbid__item--active .tabsbid__item-link,.tabsbid--icons .tabsbid__item-link,.tabsbid--icons .tabsbid__item-link:hover{font-size:28px;font-size:1.75rem;background:0 0;border:0;line-height:36px;margin-right:10px;padding:0}.tabsbid--icons .tabsbid__item-link [class^=icon-]{vertical-align:middle}.tabsbid--icons .tabsbid__item-link:hover{color:#067ab4}.tabsbid__content{width:100%}.tabsbid__pane{display:none}.tabsbid__pane--active{display:block}.tabsbid--image{display:inline-block;vertical-align:baseline;zoom:1;*display:inline;*vertical-align:auto;clear:both;float:none;list-style:none;margin:0;padding:20px 0 0;font-size:0}.tabsbid__item--image{display:inline-block;vertical-align:baseline;zoom:1;*display:inline;*vertical-align:auto;position:relative}.tabsbid__item--image img{margin:0 auto;opacity:.3}.tabsbid__item--image-title{color:#888}.tabsbid__item--image.tabsbid__item--active img,.tabsbid__item--image:hover img{margin:0 auto;opacity:1}.tabsbid__item--image.tabsbid__item--active .tabsbid__item--image-title,.tabsbid__item--image:hover .tabsbid__item--image-title{color:#067ab4}.tabsbid__item--image .tabsbid__item--image-link,.tabsbid__item--image.tabsbid__item--active{position:relative}.tabsbid__item--image.tabsbid__item--active:after,.tabsbid__item--image.tabsbid__item--active:before{position:absolute;bottom:-24px;left:50%;content:'';margin-left:-8px;border:8px solid transparent;z-index:3}.tabsbid__item--image.tabsbid__item--active:before{bottom:-23px;border-bottom-color:#d3d3d3}.tabsbid__item--image.tabsbid__item--active:after{border-bottom-color:#f2f2f2}.tabsbid__content--image{padding:15px 0;width:100%}.simplified-tabs{background-color:#f2f2f2;position:relative}.simplified-tabs:after{position:absolute;right:0;bottom:0;left:0;border-bottom:1px solid #888;content:''}.simplified-tabs .simplified-tabs__items{border-spacing:30px 0;display:table;list-style:none;margin:0;padding:0;margin-left:-30px;position:relative;table-layout:fixed}.simplified-tabs .simplified-tabs__items:after{position:absolute;right:40px;bottom:0;left:30px;border-bottom:1px solid #888;content:''}.simplified-tabs .simplified-tabs__item{width:auto;height:100%;-webkit-transition:color .15s ease-in-out;-moz-transition:color .15s ease-in-out;transition:color .15s ease-in-out;font-size:14px;font-size:.875rem;display:table-cell;font-family:arial;padding-bottom:17px;position:relative;text-align:center}.simplified-tabs .simplified-tabs__item:before{height:0;width:0;border-color:transparent;border-style:solid;border-width:10px;border-bottom-color:#888;position:absolute;right:0;bottom:0;left:50%;content:'';display:none;margin-left:-11px;z-index:1}.simplified-tabs .simplified-tabs__item:after{height:0;width:0;border-color:transparent;border-style:solid;border-width:10px;border-bottom-color:#f2f2f2;-webkit-transition:all .2s ease-out;-moz-transition:all .2s ease-out;transition:all .2s ease-out;position:absolute;right:0;bottom:-1px;left:50%;content:'';display:none;margin-left:-11px;z-index:1}.simplified-tabs .simplified-tabs__item:hover{color:#0091d9;cursor:pointer}.simplified-tabs .simplified-tabs__item a{color:inherit;outline:0;position:relative}.simplified-tabs .simplified-tabs__item a:before{position:absolute;top:-2px;right:-2px;bottom:-2px;left:-2px;display:inline-block;vertical-align:baseline;zoom:1;*display:inline;*vertical-align:auto;border:1px solid #39b1ec;content:'';opacity:0}.lt-ie9 .simplified-tabs .simplified-tabs__item a:before{content:none}.simplified-tabs .simplified-tabs__item a:focus:before{opacity:1}.lt-ie9 .simplified-tabs .simplified-tabs__item a:focus:before{content:''}.simplified-tabs .simplified-tabs__item.tabs__item--active{color:#0574AC;font-family:arial}.simplified-tabs .simplified-tabs__item.tabs__item--active:after,.simplified-tabs .simplified-tabs__item.tabs__item--active:before{display:block}.lt-ie9 .simplified-tabs .simplified-tabs__item.tabs__item--active:after,.lt-ie9 .simplified-tabs .simplified-tabs__item.tabs__item--active:before{content:' '}.simplified-tabs+.tabs__content{padding-top:19px}.simplified-tabs .tabs__pointer{width:20px;height:11px;left:-11px}.simplified-tabs .tabs__pointer:before{height:0;width:0;border-color:transparent;border-style:solid;border-width:10px;border-bottom-color:#888;left:-11px}.simplified-tabs .tabs__pointer:after{height:0;width:0;border-color:transparent;border-style:solid;border-width:10px;border-bottom-color:#f2f2f2;left:-11px}.tabs__pointer{width:28px;height:15px;position:absolute;bottom:0;left:-14px;display:none}.tabs__pointer:after,.tabs__pointer:before{content:'';z-index:3}.tabs__pointer:before{height:0;width:0;border-color:transparent;border-style:solid;border-width:14px;border-bottom-color:#6f6f6f;position:absolute;bottom:0;left:-14px}.tabs__pointer:after{height:0;width:0;border-color:transparent;border-style:solid;border-width:14px;border-bottom-color:#f2f2f2;position:absolute;bottom:-1px;left:-14px}.tabs--no-pointer .simplified-tabs__item:after,.tabs--no-pointer .simplified-tabs__item:before,.tabs--no-pointer .tabs__item--image:after,.tabs--no-pointer .tabs__item--image:before{display:none}.gtabs{margin-left:-30px}.gtabs .tabsbid__item{position:relative;bottom:-1px}.gtabs li.tabsbid__item--active{border-bottom:0}.gtabs ul{border-bottom:1px solid #888}.gtabs .tabsbid__item--first .tabsbid__item-link,.tabsbid__item:first-child .tabsbid__item-link{border-radius:4px 0 0}.gtabs .tabsbid__item--last .tabsbid__item-link,.tabsbid__item:last-child .tabsbid__item-link{border-radius:0 4px 0 0}.gtabs .tabsbid__item--active .tabsbid__item-link{background:#f2f2f2;border:1px solid #888;border-bottom:0;color:inherit;z-index:-2}.gtabs .tabsbid__item-link{background:#fff}.gtabs .tabsbid__item-link:hover{background-color:#bbb;color:#000;text-decoration:none}.tabsbid__item a:focus{text-decoration:none}.top-megamenu .megamenu-tabs{background-color:#067ab4;position:relative}.top-megamenu .megamenu-tabs ul{width:980px;margin:0 auto;display:block;list-style:none;padding:0}.top-megamenu .megamenu-tabs ul li{display:inline-block;text-align:left}.megamenu-tabs{background-color:#067ab4;position:relative}.megamenu-tabs ul{width:auto;display:block;list-style:none;padding:0}.megamenu-tabs ul li{display:inline-block;text-align:left}.megamenu-tabs .megamenu__items{border-spacing:30px 0}.megamenu-tabs .megamenu__item{width:auto;height:100%;-webkit-transition:color .15s ease-in-out;-moz-transition:color .15s ease-in-out;transition:color .15s ease-in-out;font-family:arial;font-size:16px;cursor:pointer;padding:13px 0;margin-right:30px;color:#fff}.megamenu-tabs .megamenu__item:hover{color:#BFE7FB;cursor:pointer}.megamenu-tabs .megamenu__item a{font-size:16px;color:#fff}position:relative .megamenu-tabs .megamenu__item a:focus:before{opacity:1}.lt-ie9 position:relative .megamenu-tabs .megamenu__item a:focus:before{content:''}.megamenu-tabs .megamenu__item.skip{text-align:left;text-indent:-9999px;color:transparent}.megamenu-tabs .megamenu__item.skip:focus{color:#fff;text-indent:0}.megamenu-tabs .megamenu__item.tabs__item--active{color:#fff}.megamenu-tabs .megamenu__item.tabs__item--active:after{height:0;width:0;border-color:transparent;border-style:solid;border-width:10px;border-bottom-color:#fff;-webkit-transition:all .2s ease-out;-moz-transition:all .2s ease-out;transition:all .2s ease-out;content:'';margin-left:12px;z-index:1;position:absolute;top:35px}.lt-ie9 .megamenu-tabs .megamenu__item.tabs__item--active:after{content:' '}.submenu-tabs{background-color:#fff;position:absolute;width:100%;left:0;top:55px;z-index:999;border-bottom:solid 1px #ddd}.submenu-tabs .megamenu__item{width:auto;height:100%;-webkit-transition:color .15s ease-in-out;-moz-transition:color .15s ease-in-out;transition:color .15s ease-in-out;color:#666;border-bottom:3px solid transparent;margin-right:40px;font-family:arial;font-size:16px;cursor:pointer;padding:14px 0 10px}.submenu-tabs .megamenu__item:hover{color:#444;cursor:pointer;font-family:arial}.submenu-tabs .megamenu__item a{font-size:16px;color:#000;position:relative}.submenu-tabs .megamenu__item a:focus:before{opacity:1}.lt-ie9 .submenu-tabs .megamenu__item a:focus:before{content:''}.submenu-tabs .megamenu__item.tabs__item--active{color:#fff;font-family:arial}.submenu-tabs .megamenu__item.tabs__item--active:after,.submenu-tabs .megamenu__item.tabs__item--active:before{display:none}.lt-ie9 .submenu-tabs .megamenu__item.tabs__item--active:after{content:' '}.submenu-tabs .sub__menu{position:absolute;z-index:999;left:0;width:100%;top:50px;background-color:#fff}.submenu-tabs .sub__menu .tabsbid__item{display:inline-block;vertical-align:baseline;zoom:1;*display:inline;*vertical-align:auto;width:auto;float:left;margin:20px 0 0;padding-right:20px}.submenu-tabs .sub__menu .tabsbid__item .links-list__item{border:0;color:#000;font-size:12px;font-family:arial}.submenu-tabs .sub__menu .tabsbid__item .links-list__item:hover{color:#199ddf;border:0}.submenu-tabs .sub__menu .tabsbid__item .title{font-family:arial;font-size:14px}.ie .submenu-tabs .sub__menu{top:51px}.subMenuHover{font-family:arial!important;color:#444!important;border-bottom:3px solid #067ab4!important;cursor:pointer!important}.skiptoBody{position:absolute;top:-1000px;left:-1000px;height:1px;width:1px;text-align:left;overflow:hidden}a.skiptoBody:focus{height:1px;width:1px;text-align:left;overflow:hidden} \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/css/att_angular_gridster/sandbox-gridster.css b/ecomp-portal-BE/war/static/fusion/css/att_angular_gridster/sandbox-gridster.css
deleted file mode 100644
index a9edba8f..00000000
--- a/ecomp-portal-BE/war/static/fusion/css/att_angular_gridster/sandbox-gridster.css
+++ /dev/null
@@ -1,173 +0,0 @@
-.gridster {
- position: relative;
- margin: auto;
- /* height: 0
- */}
-
-.gridster>ul {
- margin: 0;
- list-style: none;
- padding: 0
-}
-
-.gridster-item {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- list-style: none;
- z-index: 2;
- position: absolute;
- display: none
-}
-
-.gridster-loaded {
- -webkit-transition: height .3s;
- -moz-transition: height .3s;
- -o-transition: height .3s;
- transition: height .3s
-}
-
-.gridster-loaded .gridster-item {
- display: block;
- position: absolute;
- -webkit-transition: opacity .3s, left .3s, top .3s, width .3s, height .3s;
- -moz-transition: opacity .3s, left .3s, top .3s, width .3s, height .3s;
- -o-transition: opacity .3s, left .3s, top .3s, width .3s, height .3s;
- transition: opacity .3s, left .3s, top .3s, width .3s, height .3s;
- -webkit-transition-delay: 50ms;
- -moz-transition-delay: 50ms;
- -o-transition-delay: 50ms;
- transition-delay: 50ms
-}
-
-.gridster-loaded .gridster-preview-holder {
- display: none;
- z-index: 1;
- position: absolute;
- background-color: #067ab4;
- /*
- background-color: rgb(6, 122, 180);
- -ms-filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#067ab4', endColorstr='#067ab4'); IE
- opacity: 0.2;
- */
- border-color: #fff;
- -webkit-transition: width .2s, height .3s;
- -moz-transition: width .2s, height .3s;
- -o-transition: width .2s, height .3s;
- transition: width .2s, height .3s;
- -webkit-transition-delay: 50ms;
- -moz-transition-delay: 50ms;
- -o-transition-delay: 50ms;
- transition-delay: 50ms
-}
-
-.gridster-loaded .gridster-item.gridster-item-moving {
- -webkit-transition: none;
- -moz-transition: none;
- -o-transition: none;
- transition: none;
- opacity: 0.9;
-}
-
-.gridster-mobile {
- height: auto !important
-}
-
-.gridster-mobile .gridster-item {
- height: auto;
- position: static;
- float: none
-}
-
-.gridster-item.ng-leave.ng-leave-active {
- opacity: 0
-}
-
-.gridster-item.ng-enter {
- opacity: 1
-}
-
-.gridster-item-moving {
- z-index: 3
-}
-
-.gridster-item-resizable-handler {
- position: absolute;
- font-size: 1px;
- display: block
-}
-
-.handle-se {
- cursor: se-resize;
- width: 0;
- height: 0;
- right: 1px;
- bottom: 1px;
- border-style: solid;
- border-width: 0 0 12px 12px;
- border-color: transparent
-}
-
-.handle-ne {
- cursor: ne-resize;
- width: 12px;
- height: 12px;
- right: 1px;
- top: 1px
-}
-
-.handle-nw {
- cursor: nw-resize;
- width: 12px;
- height: 12px;
- left: 1px;
- top: 1px
-}
-
-.handle-sw {
- cursor: sw-resize;
- width: 12px;
- height: 12px;
- left: 1px;
- bottom: 1px
-}
-
-.handle-e {
- cursor: e-resize;
- width: 12px;
- bottom: 0;
- right: 1px;
- top: 0
-}
-
-.handle-s {
- cursor: s-resize;
- height: 12px;
- right: 0;
- bottom: 1px;
- left: 0
-}
-
-.handle-n {
- cursor: n-resize;
- height: 12px;
- right: 0;
- top: 1px;
- left: 0
-}
-
-.handle-w {
- cursor: w-resize;
- width: 12px;
- left: 1px;
- top: 0;
- bottom: 0
-}
-
-.gridster .gridster-item:hover .gridster-box {
- border: 1.5px solid #B3B2B3
-}
-
-.gridster .gridster-item:hover .handle-se {
- border-color: transparent transparent #ccc
-}
diff --git a/ecomp-portal-BE/war/static/fusion/css/att_angular_gridster/ui-gridster.css b/ecomp-portal-BE/war/static/fusion/css/att_angular_gridster/ui-gridster.css
deleted file mode 100644
index 827e354e..00000000
--- a/ecomp-portal-BE/war/static/fusion/css/att_angular_gridster/ui-gridster.css
+++ /dev/null
@@ -1,116 +0,0 @@
-/* ui-gridster.css */
-.gridster-container {
- background-color: #EFEFEF;
- color: #fff;
- border: 1px dashed;
- overflow-y: auto;
- overflow-x: hidden; }
-
-/* app css for attGridtser */
-.gridster-item-container {
- background-color: #FFFFFF;
- position: relative;
- margin-left: auto;
- margin-right: auto;
- min-height: 79px;
- height: 100%; }
- .gridster-item-container .gridster-item-header {
- /* gridster-item Header */
- position: relative;
- height: 50px !important;
- border: 1px solid #d3d3d3;
- border-bottom: 0;
- background-color: #E5E5E5;
- white-space: nowrap;
- text-overflow: ellipsis;
- z-index: 1;
- -webkit-border-radius: 2px 2px 0 0;
- -moz-border-radius: 2px 2px 0 0;
- -ms-border-radius: 2px 2px 0 0;
- -o-border-radius: 2px 2px 0 0;
- border-radius: 2px 2px 0 0;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- overflow: hidden;
- /* IE6-8 */ }
- .gridster-item-container .gridster-item-header .gridster-item-handle {
- cursor: move;
- margin: 12px;
- position: absolute;
- top: 0;
- left: 0;
- border: 0;
- vertical-align: middle;
- -ms-interpolation-mode: bicubic;
- display: block; }
- .gridster-item-container .gridster-item-header .gridster-item-header-content {
- line-height: 44px;
- margin-left: 26px;
- font-family: clearviewatt;
- font-size: 18px;
- color: #444444;
- float: left; }
- .gridster-item-container .gridster-item-header .gridster-item-sub-header-content {
- position: absolute;
- top: 29.5px;
- left: 26px;
- font-family: clearviewatt;
- font-size: 12px;
- color: #444444; }
- .gridster-item-container .gridster-item-header .gridster-item-header-buttons-container {
- position: absolute;
- right: 10px;
- top: 10px;
- overflow: hidden;
- text-align: right;
- height: 30px;
- color: #444444; }
- .gridster-item-container .gridster-item-body {
- /* gridster-item Body */
- position: absolute;
- width: 100%;
- top: 50px;
- left: 0;
- right: 0;
- bottom: 29px;
- border: 1px solid #d3d3d3;
- box-sizing: border-box;
- overflow: auto;
- color: #444444;
- /* text-align: center; */ }
- .gridster-item-container .gridster-item-footer {
- /* gridster-item Footer */
- position: absolute;
- bottom: 0;
- width: 100%;
- height: 29px !important;
- text-align: left;
- cursor: pointer;
- border: 1px solid #d3d3d3;
- border-top: 0;
- background-color: #F2F2F2;
- -webkit-border-radius: 0 0 2px 2px;
- -moz-border-radius: 0 0 2px 2px;
- -ms-border-radius: 0 0 2px 2px;
- -o-border-radius: 0 0 2px 2px;
- border-radius: 0 0 2px 2px;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- text-decoration: none;
- /* IE6-8 */ }
- .gridster-item-container .gridster-item-footer:hover {
- background-color: #E5E5E5;
- color: #565656;
- text-decoration: underline; }
- .gridster-item-container .gridster-item-footer .gridster-item-footer-content {
- line-height: 30px;
- font-family: clearviewatt;
- font-size: 12px;
- color: #565656;
- margin: 20px;
- text-decoration: none; }
- .gridster-item-container .gridster-item-footer .gridster-item-footer-content:hover {
- color: #199ddf;
- text-decoration: underline; }
diff --git a/ecomp-portal-BE/war/static/fusion/css/fusion-sunny.css b/ecomp-portal-BE/war/static/fusion/css/fusion-sunny.css
deleted file mode 100644
index c8306156..00000000
--- a/ecomp-portal-BE/war/static/fusion/css/fusion-sunny.css
+++ /dev/null
@@ -1,362 +0,0 @@
- input, textarea, select, div {
- font-family: Arial;
- font-size: 11px;
- font-weight: normal;
- }
-
- form {
- margin-top: 5px;
- }
-
-
- .applicationWindow { border-width: 0px 0px 1px 0px;
- border-style: solid;
- border-color: #959595;
- box-shadow: inset 0 0 10px #000000;
- margin-top: 10px;
- margin-bottom: 10px;
- margin-left: 10px;
- margin-right: 10px;
- }
-
- .feedbackMessage { width: 99%;
- font-family: Arial;
- font-size: 11px;
- color: #1f1f1f;
- padding: 3px;
- border: 1px #eeb420 solid;
- margin: 3px;
- background: #fff9e5;
- }
-
- .menubar {
- border-width: 0px 0px 0px 1px; border-style: solid; border-color: #959595;
- }
-
- .footer {
- /*clear: both;*/
- border-width: 0px 1px 0px 1px; border-style: solid; border-color: #959595;
- font-family: Verdana,Arial,Helvetica, sans-serif;
- font-size: 9px;
- padding: 10px 10px 30px 10px;
- background: white;
- }
-
- .pageTitle {
- font-family: Arial;
- font-size: 18px;
- font-weight: bold;
- margin-top: 5px;
- }
-
- .content {
- border-width: 0px 1px 0px 1px;
- border-style: solid;
- border-color: #959595;
- font-family: Arial;
- font-size: 11px;
- padding: 5px;
- background: white;
- /*height: 600px;*/
- }
-
- .popupContent {
- font-family: Arial;
- font-size: 11px;
- padding: 3px;
- }
-
- .logo {
- border-width: 0px 1px 0px 1px;
- border-style: solid;
- border-color: #959595;
- text-align: right;
- }
-
- .sep {
- border: 1px solid black
- }
-
- .attLogo { /*position: relative;*/
- float:left;
- padding-top: 25px;
- padding-left: 25px;
- }
-
- .applicationLogo { float:right;
- padding-top: 25px;
- padding-right: 25px;
- }
-
- .applinkWhite { font-family: Arial;
- font-size: 13px;
- font-weight: 900;
- color: #FFFFFF;
- text-decoration: none; }
-
- .terms { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 9px;
- }
-
- .broadcastMessage { color: red; }
- .broadcastMessageList { color: red; }
-
- .button {
- margin: 5px 1px 5px 1px;
- padding: 3px; }
-
- .toolbarbutton:hover {
- color:#005491;
- }
-
- .headerText { font-family: Arial;
- font-size: 15px;
- font-weight: 700;
- color: #000000; }
-
- .headerBackground { background: #336699; }
-
- .errorMessageText { font-family: Arial;
- font-size: 11px;
- font-weight: bold;
- color: red; }
-
-
- .normalText { font-family: Arial;
- font-size: 11px;
- color: #000000; }
-
- .normalTextRed { font-family: Arial;
- font-size: 11px;
- color: red; }
-
-
- .smallNormalText { font-family: Arial;
- font-size: 9px;
- color: #000000; }
-
- .tableBorder { border:1px outset teal }
-
- .validationError { background: #b9eaff; }
-
- .templatebody {
- background: url(../images/body_graphic.jpg) repeat-x;
- /*margin: 40px 80px 40px 80px;*/
- }
-
- /*--------------------- General Content ------------------------------------*/
-
- .relative {
- position:relative;
- }
-
- .clear{
- clear:both;
- }
-
- .left {
- float: left;
- }
-
- .leftCentered{
- float: left;
- text-align: center;
- }
-
- .right {
- float: right;
- }
-
- .rightAligned{
- text-align: right;
- }
-
- .centered {
- text-align: center;
- align: center;
- }
-
-
- .noWrap{
- white-space:nowrap;
- }
-
- .disabled {
- color:gray;
- cursor:hand;
- }
-
- /*--------------------- Tab styles -------------------------------------*/
-
- .current {
- font-weight: bold;
- border-width: 1px 1px 1px 1px;
- border-color: silver;
- border-style: solid;
- }
-
- .subTab {
- font-weight:bold;
- font-family: Arial;
- font-size: 11px;
- color: #0F3B82;
- }
-
-
- /*--------------------- Grid styles ------------------------------------*/
-
- /* Grid navigation and header styles */
- .gridFilterLabel {font-size: 7pt;
- font-align: justify;
- font-weight: bold;
- display: block;}
-
- .gridFilterText {height: 17px;
- font-size: 8pt;
- width: 60%;
- font-align: justify;}
-
- .gridNavigationBar { font-family:Arial,Verdana;
- font-size:11px;
- font-weight:normal;
- color:#000;
- margin: 0px;
- width: 100%;
- vertical-align: middle;
- }
-
- .gridNavigationBar .navLinks { float: left;
- margin-right:15px;
- padding-top: 2px;
- height: 19px;
- line-height: 19px;
- }
-
- .gridNavigationBar .pageControls { float: left;
- margin-right: 15px;
- height: 19px;
- line-height: 19px;
- }
-
- .gridNavigationBar .pageControls input { font-size: 8pt;
- height: 17px;
- vertical-align: middle;
- }
-
- .gridNavigationBar .pageInfo { float: right;
- vertical-align: middle;
- height: 19px;
- line-height: 19px;
- }
-
- .gridNavigationBar .pageInfo input { font-size: 8pt;
- height: 17px;
- vertical-align: middle;
- }
-
-
- .gridNavigationBar span { padding: 3px; }
-
- .gridNavigationBar a {
- text-decoration:underline;
- color:#000;
- font-weight:normal;
- }
-
- .gridNavigationBar img { vertical-align: middle; }
-
- .gridBulkUpdateRow {
- height: 35px;
- line-height: 35px;
- }
-
- .gridBulkUpdateRow input {
- vertical-align: middle;
- }
-
-
- /* dummy class used to lock the form elements of a grid - ex. bulk transaction processing */
- .alwaysEnabled {}
-
- .hidden {
- display: none;
- }
-
- .selectedPage {
- background-color:#C4DFFB;
- color: white;
- border-style: solid;
- border-width: 1px;
- border-color: gray;
- padding-left: 3px;
- padding-right: 3px;
- vertical-align: middle;
- }
-
- .selectedRow{
- /*background-color:#C4DFFB;*/
- }
-
- /* Action Item styles */
- .actionList {
- margin-left: -20px;
- margin-right: -10px;
- padding-left: 5px;
- }
-
- .actionList li {
- float:left;
- padding-left: 3px;
- padding-right: 3px;
- }
-
- .actionList li a {
- text-decoration:none;
- color:#000;
- }
-
- /* Filter Operator List styles */
-
- .filterList {
- margin: 0px;
- }
-
- .filterList li {
- list-style-type: none;
- padding:3px 3px 3px 2px;
- cursor:hand;
- font-size:11px;
- }
-
- .filterList li:hover {
- background: #404040;
- }
-
- .filterList li a {
- color: #000;
- text-decoration: none;
- }
-
- .filterList li:hover a {
- color: white;
- }
-
- .filterList li a:hover {
- text-decoration: none;
- color: white;
- }
-
- .filterListItem a {
- text-decoration:none;
- padding:3px 2px 3px 2px;
- }
-
-
- /*---------------------- Customized ZK Styles ------------------------------*/
-
- .z-datebox input, .z-timebox input {
- font-family: Arial;
- font-size: 11px;
- height: 15px;
- margin-top:1px;
- }
diff --git a/ecomp-portal-BE/war/static/fusion/css/jquery-ui.css b/ecomp-portal-BE/war/static/fusion/css/jquery-ui.css
deleted file mode 100644
index 1c22746c..00000000
--- a/ecomp-portal-BE/war/static/fusion/css/jquery-ui.css
+++ /dev/null
@@ -1,1225 +0,0 @@
-/*! jQuery UI - v1.11.4 - 2015-03-11
-* http://jqueryui.com
-* Includes: core.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, draggable.css, menu.css, progressbar.css, resizable.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css
-* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
-* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
-
-/* Layout helpers
-----------------------------------*/
-.ui-helper-hidden {
- display: none;
-}
-.ui-helper-hidden-accessible {
- border: 0;
- clip: rect(0 0 0 0);
- height: 1px;
- margin: -1px;
- overflow: hidden;
- padding: 0;
- position: absolute;
- width: 1px;
-}
-.ui-helper-reset {
- margin: 0;
- padding: 0;
- border: 0;
- outline: 0;
- line-height: 1.3;
- text-decoration: none;
- font-size: 100%;
- list-style: none;
-}
-.ui-helper-clearfix:before,
-.ui-helper-clearfix:after {
- content: "";
- display: table;
- border-collapse: collapse;
-}
-.ui-helper-clearfix:after {
- clear: both;
-}
-.ui-helper-clearfix {
- min-height: 0; /* support: IE7 */
-}
-.ui-helper-zfix {
- width: 100%;
- height: 100%;
- top: 0;
- left: 0;
- position: absolute;
- opacity: 0;
- filter:Alpha(Opacity=0); /* support: IE8 */
-}
-
-.ui-front {
- z-index: 100;
-}
-
-
-/* Interaction Cues
-----------------------------------*/
-.ui-state-disabled {
- cursor: default !important;
-}
-
-
-/* Icons
-----------------------------------*/
-
-/* states and images */
-.ui-icon {
- display: block;
- text-indent: -99999px;
- overflow: hidden;
- background-repeat: no-repeat;
-}
-
-
-/* Misc visuals
-----------------------------------*/
-
-/* Overlays */
-.ui-widget-overlay {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
-}
-.ui-accordion .ui-accordion-header {
- display: block;
- cursor: pointer;
- position: relative;
- margin: 2px 0 0 0;
- padding: .5em .5em .5em .7em;
- min-height: 0; /* support: IE7 */
- font-size: 100%;
-}
-.ui-accordion .ui-accordion-icons {
- padding-left: 2.2em;
-}
-.ui-accordion .ui-accordion-icons .ui-accordion-icons {
- padding-left: 2.2em;
-}
-.ui-accordion .ui-accordion-header .ui-accordion-header-icon {
- position: absolute;
- left: .5em;
- top: 50%;
- margin-top: -8px;
-}
-.ui-accordion .ui-accordion-content {
- padding: 1em 2.2em;
- border-top: 0;
- overflow: auto;
-}
-.ui-autocomplete {
- position: absolute;
- top: 0;
- left: 0;
- cursor: default;
-}
-.ui-button {
- display: inline-block;
- position: relative;
- padding: 0;
- line-height: normal;
- margin-right: .1em;
- cursor: pointer;
- vertical-align: middle;
- text-align: center;
- overflow: visible; /* removes extra width in IE */
-}
-.ui-button,
-.ui-button:link,
-.ui-button:visited,
-.ui-button:hover,
-.ui-button:active {
- text-decoration: none;
-}
-/* to make room for the icon, a width needs to be set here */
-.ui-button-icon-only {
- width: 2.2em;
-}
-/* button elements seem to need a little more width */
-button.ui-button-icon-only {
- width: 2.4em;
-}
-.ui-button-icons-only {
- width: 3.4em;
-}
-button.ui-button-icons-only {
- width: 3.7em;
-}
-
-/* button text element */
-.ui-button .ui-button-text {
- display: block;
- line-height: normal;
-}
-.ui-button-text-only .ui-button-text {
- padding: .4em 1em;
-}
-.ui-button-icon-only .ui-button-text,
-.ui-button-icons-only .ui-button-text {
- padding: .4em;
- text-indent: -9999999px;
-}
-.ui-button-text-icon-primary .ui-button-text,
-.ui-button-text-icons .ui-button-text {
- padding: .4em 1em .4em 2.1em;
-}
-.ui-button-text-icon-secondary .ui-button-text,
-.ui-button-text-icons .ui-button-text {
- padding: .4em 2.1em .4em 1em;
-}
-.ui-button-text-icons .ui-button-text {
- padding-left: 2.1em;
- padding-right: 2.1em;
-}
-/* no icon support for input elements, provide padding by default */
-input.ui-button {
- padding: .4em 1em;
-}
-
-/* button icon element(s) */
-.ui-button-icon-only .ui-icon,
-.ui-button-text-icon-primary .ui-icon,
-.ui-button-text-icon-secondary .ui-icon,
-.ui-button-text-icons .ui-icon,
-.ui-button-icons-only .ui-icon {
- position: absolute;
- top: 50%;
- margin-top: -8px;
-}
-.ui-button-icon-only .ui-icon {
- left: 50%;
- margin-left: -8px;
-}
-.ui-button-text-icon-primary .ui-button-icon-primary,
-.ui-button-text-icons .ui-button-icon-primary,
-.ui-button-icons-only .ui-button-icon-primary {
- left: .5em;
-}
-.ui-button-text-icon-secondary .ui-button-icon-secondary,
-.ui-button-text-icons .ui-button-icon-secondary,
-.ui-button-icons-only .ui-button-icon-secondary {
- right: .5em;
-}
-
-/* button sets */
-.ui-buttonset {
- margin-right: 7px;
-}
-.ui-buttonset .ui-button {
- margin-left: 0;
- margin-right: -.3em;
-}
-
-/* workarounds */
-/* reset extra padding in Firefox, see h5bp.com/l */
-input.ui-button::-moz-focus-inner,
-button.ui-button::-moz-focus-inner {
- border: 0;
- padding: 0;
-}
-.ui-datepicker {
- width: 17em;
- padding: .2em .2em 0;
- display: none;
-}
-.ui-datepicker .ui-datepicker-header {
- position: relative;
- padding: .2em 0;
-}
-.ui-datepicker .ui-datepicker-prev,
-.ui-datepicker .ui-datepicker-next {
- position: absolute;
- top: 2px;
- width: 1.8em;
- height: 1.8em;
-}
-.ui-datepicker .ui-datepicker-prev-hover,
-.ui-datepicker .ui-datepicker-next-hover {
- top: 1px;
-}
-.ui-datepicker .ui-datepicker-prev {
- left: 2px;
-}
-.ui-datepicker .ui-datepicker-next {
- right: 2px;
-}
-.ui-datepicker .ui-datepicker-prev-hover {
- left: 1px;
-}
-.ui-datepicker .ui-datepicker-next-hover {
- right: 1px;
-}
-.ui-datepicker .ui-datepicker-prev span,
-.ui-datepicker .ui-datepicker-next span {
- display: block;
- position: absolute;
- left: 50%;
- margin-left: -8px;
- top: 50%;
- margin-top: -8px;
-}
-.ui-datepicker .ui-datepicker-title {
- margin: 0 2.3em;
- line-height: 1.8em;
- text-align: center;
-}
-.ui-datepicker .ui-datepicker-title select {
- font-size: 1em;
- margin: 1px 0;
-}
-.ui-datepicker select.ui-datepicker-month,
-.ui-datepicker select.ui-datepicker-year {
- width: 45%;
-}
-.ui-datepicker table {
- width: 100%;
- font-size: .9em;
- border-collapse: collapse;
- margin: 0 0 .4em;
-}
-.ui-datepicker th {
- padding: .7em .3em;
- text-align: center;
- font-weight: bold;
- border: 0;
-}
-.ui-datepicker td {
- border: 0;
- padding: 1px;
-}
-.ui-datepicker td span,
-.ui-datepicker td a {
- display: block;
- padding: .2em;
- text-align: right;
- text-decoration: none;
-}
-.ui-datepicker .ui-datepicker-buttonpane {
- background-image: none;
- margin: .7em 0 0 0;
- padding: 0 .2em;
- border-left: 0;
- border-right: 0;
- border-bottom: 0;
-}
-.ui-datepicker .ui-datepicker-buttonpane button {
- float: right;
- margin: .5em .2em .4em;
- cursor: pointer;
- padding: .2em .6em .3em .6em;
- width: auto;
- overflow: visible;
-}
-.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
- float: left;
-}
-
-/* with multiple calendars */
-.ui-datepicker.ui-datepicker-multi {
- width: auto;
-}
-.ui-datepicker-multi .ui-datepicker-group {
- float: left;
-}
-.ui-datepicker-multi .ui-datepicker-group table {
- width: 95%;
- margin: 0 auto .4em;
-}
-.ui-datepicker-multi-2 .ui-datepicker-group {
- width: 50%;
-}
-.ui-datepicker-multi-3 .ui-datepicker-group {
- width: 33.3%;
-}
-.ui-datepicker-multi-4 .ui-datepicker-group {
- width: 25%;
-}
-.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
-.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
- border-left-width: 0;
-}
-.ui-datepicker-multi .ui-datepicker-buttonpane {
- clear: left;
-}
-.ui-datepicker-row-break {
- clear: both;
- width: 100%;
- font-size: 0;
-}
-
-/* RTL support */
-.ui-datepicker-rtl {
- direction: rtl;
-}
-.ui-datepicker-rtl .ui-datepicker-prev {
- right: 2px;
- left: auto;
-}
-.ui-datepicker-rtl .ui-datepicker-next {
- left: 2px;
- right: auto;
-}
-.ui-datepicker-rtl .ui-datepicker-prev:hover {
- right: 1px;
- left: auto;
-}
-.ui-datepicker-rtl .ui-datepicker-next:hover {
- left: 1px;
- right: auto;
-}
-.ui-datepicker-rtl .ui-datepicker-buttonpane {
- clear: right;
-}
-.ui-datepicker-rtl .ui-datepicker-buttonpane button {
- float: left;
-}
-.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
-.ui-datepicker-rtl .ui-datepicker-group {
- float: right;
-}
-.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
-.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
- border-right-width: 0;
- border-left-width: 1px;
-}
-.ui-dialog {
- overflow: hidden;
- position: absolute;
- top: 0;
- left: 0;
- padding: .2em;
- outline: 0;
-}
-.ui-dialog .ui-dialog-titlebar {
- padding: .4em 1em;
- position: relative;
-}
-.ui-dialog .ui-dialog-title {
- float: left;
- margin: .1em 0;
- white-space: nowrap;
- width: 90%;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-.ui-dialog .ui-dialog-titlebar-close {
- position: absolute;
- right: .3em;
- top: 50%;
- width: 20px;
- margin: -10px 0 0 0;
- padding: 1px;
- height: 20px;
-}
-.ui-dialog .ui-dialog-content {
- position: relative;
- border: 0;
- padding: .5em 1em;
- background: none;
- overflow: auto;
-}
-.ui-dialog .ui-dialog-buttonpane {
- text-align: left;
- border-width: 1px 0 0 0;
- background-image: none;
- margin-top: .5em;
- padding: .3em 1em .5em .4em;
-}
-.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
- float: right;
-}
-.ui-dialog .ui-dialog-buttonpane button {
- margin: .5em .4em .5em 0;
- cursor: pointer;
-}
-.ui-dialog .ui-resizable-se {
- width: 12px;
- height: 12px;
- right: -5px;
- bottom: -5px;
- background-position: 16px 16px;
-}
-.ui-draggable .ui-dialog-titlebar {
- cursor: move;
-}
-.ui-draggable-handle {
- -ms-touch-action: none;
- touch-action: none;
-}
-.ui-menu {
- list-style: none;
- padding: 0;
- margin: 0;
- display: block;
- outline: none;
-}
-.ui-menu .ui-menu {
- position: absolute;
-}
-.ui-menu .ui-menu-item {
- position: relative;
- margin: 0;
- padding: 3px 1em 3px .4em;
- cursor: pointer;
- min-height: 0; /* support: IE7 */
- /* support: IE10, see #8844 */
- list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
-}
-.ui-menu .ui-menu-divider {
- margin: 5px 0;
- height: 0;
- font-size: 0;
- line-height: 0;
- border-width: 1px 0 0 0;
-}
-.ui-menu .ui-state-focus,
-.ui-menu .ui-state-active {
- margin: -1px;
-}
-
-/* icon support */
-.ui-menu-icons {
- position: relative;
-}
-.ui-menu-icons .ui-menu-item {
- padding-left: 2em;
-}
-
-/* left-aligned */
-.ui-menu .ui-icon {
- position: absolute;
- top: 0;
- bottom: 0;
- left: .2em;
- margin: auto 0;
-}
-
-/* right-aligned */
-.ui-menu .ui-menu-icon {
- left: auto;
- right: 0;
-}
-.ui-progressbar {
- height: 2em;
- text-align: left;
- overflow: hidden;
-}
-.ui-progressbar .ui-progressbar-value {
- margin: -1px;
- height: 100%;
-}
-.ui-progressbar .ui-progressbar-overlay {
- background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");
- height: 100%;
- filter: alpha(opacity=25); /* support: IE8 */
- opacity: 0.25;
-}
-.ui-progressbar-indeterminate .ui-progressbar-value {
- background-image: none;
-}
-.ui-resizable {
- position: relative;
-}
-.ui-resizable-handle {
- position: absolute;
- font-size: 0.1px;
- display: block;
- -ms-touch-action: none;
- touch-action: none;
-}
-.ui-resizable-disabled .ui-resizable-handle,
-.ui-resizable-autohide .ui-resizable-handle {
- display: none;
-}
-.ui-resizable-n {
- cursor: n-resize;
- height: 7px;
- width: 100%;
- top: -5px;
- left: 0;
-}
-.ui-resizable-s {
- cursor: s-resize;
- height: 7px;
- width: 100%;
- bottom: -5px;
- left: 0;
-}
-.ui-resizable-e {
- cursor: e-resize;
- width: 7px;
- right: -5px;
- top: 0;
- height: 100%;
-}
-.ui-resizable-w {
- cursor: w-resize;
- width: 7px;
- left: -5px;
- top: 0;
- height: 100%;
-}
-.ui-resizable-se {
- cursor: se-resize;
- width: 12px;
- height: 12px;
- right: 1px;
- bottom: 1px;
-}
-.ui-resizable-sw {
- cursor: sw-resize;
- width: 9px;
- height: 9px;
- left: -5px;
- bottom: -5px;
-}
-.ui-resizable-nw {
- cursor: nw-resize;
- width: 9px;
- height: 9px;
- left: -5px;
- top: -5px;
-}
-.ui-resizable-ne {
- cursor: ne-resize;
- width: 9px;
- height: 9px;
- right: -5px;
- top: -5px;
-}
-.ui-selectable {
- -ms-touch-action: none;
- touch-action: none;
-}
-.ui-selectable-helper {
- position: absolute;
- z-index: 100;
- border: 1px dotted black;
-}
-.ui-selectmenu-menu {
- padding: 0;
- margin: 0;
- position: absolute;
- top: 0;
- left: 0;
- display: none;
-}
-.ui-selectmenu-menu .ui-menu {
- overflow: auto;
- /* Support: IE7 */
- overflow-x: hidden;
- padding-bottom: 1px;
-}
-.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup {
- font-size: 1em;
- font-weight: bold;
- line-height: 1.5;
- padding: 2px 0.4em;
- margin: 0.5em 0 0 0;
- height: auto;
- border: 0;
-}
-.ui-selectmenu-open {
- display: block;
-}
-.ui-selectmenu-button {
- display: inline-block;
- overflow: hidden;
- position: relative;
- text-decoration: none;
- cursor: pointer;
-}
-.ui-selectmenu-button span.ui-icon {
- right: 0.5em;
- left: auto;
- margin-top: -8px;
- position: absolute;
- top: 50%;
-}
-.ui-selectmenu-button span.ui-selectmenu-text {
- text-align: left;
- padding: 0.4em 2.1em 0.4em 1em;
- display: block;
- line-height: 1.4;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-.ui-slider {
- position: relative;
- text-align: left;
-}
-.ui-slider .ui-slider-handle {
- position: absolute;
- z-index: 2;
- width: 1.2em;
- height: 1.2em;
- cursor: default;
- -ms-touch-action: none;
- touch-action: none;
-}
-.ui-slider .ui-slider-range {
- position: absolute;
- z-index: 1;
- font-size: .7em;
- display: block;
- border: 0;
- background-position: 0 0;
-}
-
-/* support: IE8 - See #6727 */
-.ui-slider.ui-state-disabled .ui-slider-handle,
-.ui-slider.ui-state-disabled .ui-slider-range {
- filter: inherit;
-}
-
-.ui-slider-horizontal {
- height: .8em;
-}
-.ui-slider-horizontal .ui-slider-handle {
- top: -.3em;
- margin-left: -.6em;
-}
-.ui-slider-horizontal .ui-slider-range {
- top: 0;
- height: 100%;
-}
-.ui-slider-horizontal .ui-slider-range-min {
- left: 0;
-}
-.ui-slider-horizontal .ui-slider-range-max {
- right: 0;
-}
-
-.ui-slider-vertical {
- width: .8em;
- height: 100px;
-}
-.ui-slider-vertical .ui-slider-handle {
- left: -.3em;
- margin-left: 0;
- margin-bottom: -.6em;
-}
-.ui-slider-vertical .ui-slider-range {
- left: 0;
- width: 100%;
-}
-.ui-slider-vertical .ui-slider-range-min {
- bottom: 0;
-}
-.ui-slider-vertical .ui-slider-range-max {
- top: 0;
-}
-.ui-sortable-handle {
- -ms-touch-action: none;
- touch-action: none;
-}
-.ui-spinner {
- position: relative;
- display: inline-block;
- overflow: hidden;
- padding: 0;
- vertical-align: middle;
-}
-.ui-spinner-input {
- border: none;
- background: none;
- color: inherit;
- padding: 0;
- margin: .2em 0;
- vertical-align: middle;
- margin-left: .4em;
- margin-right: 22px;
-}
-.ui-spinner-button {
- width: 16px;
- height: 50%;
- font-size: .5em;
- padding: 0;
- margin: 0;
- text-align: center;
- position: absolute;
- cursor: default;
- display: block;
- overflow: hidden;
- right: 0;
-}
-/* more specificity required here to override default borders */
-.ui-spinner a.ui-spinner-button {
- border-top: none;
- border-bottom: none;
- border-right: none;
-}
-/* vertically center icon */
-.ui-spinner .ui-icon {
- position: absolute;
- margin-top: -8px;
- top: 50%;
- left: 0;
-}
-.ui-spinner-up {
- top: 0;
-}
-.ui-spinner-down {
- bottom: 0;
-}
-
-/* TR overrides */
-.ui-spinner .ui-icon-triangle-1-s {
- /* need to fix icons sprite */
- background-position: -65px -16px;
-}
-.ui-tabs {
- position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
- padding: .2em;
-}
-.ui-tabs .ui-tabs-nav {
- margin: 0;
- padding: .2em .2em 0;
-}
-.ui-tabs .ui-tabs-nav li {
- list-style: none;
- float: left;
- position: relative;
- top: 0;
- margin: 1px .2em 0 0;
- border-bottom-width: 0;
- padding: 0;
- white-space: nowrap;
-}
-.ui-tabs .ui-tabs-nav .ui-tabs-anchor {
- float: left;
- padding: .5em 1em;
- text-decoration: none;
-}
-.ui-tabs .ui-tabs-nav li.ui-tabs-active {
- margin-bottom: -1px;
- padding-bottom: 1px;
-}
-.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
-.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
-.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
- cursor: text;
-}
-.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
- cursor: pointer;
-}
-.ui-tabs .ui-tabs-panel {
- display: block;
- border-width: 0;
- padding: 1em 1.4em;
- background: none;
-}
-.ui-tooltip {
- padding: 8px;
- position: absolute;
- z-index: 9999;
- max-width: 300px;
- -webkit-box-shadow: 0 0 5px #aaa;
- box-shadow: 0 0 5px #aaa;
-}
-body .ui-tooltip {
- border-width: 2px;
-}
-
-/* Component containers
-----------------------------------*/
-.ui-widget {
- font-family: Verdana,Arial,sans-serif;
- font-size: 1.1em;
-}
-.ui-widget .ui-widget {
- font-size: 1em;
-}
-.ui-widget input,
-.ui-widget select,
-.ui-widget textarea,
-.ui-widget button {
- font-family: Verdana,Arial,sans-serif;
- font-size: 1em;
-}
-.ui-widget-content {
- border: 1px solid #aaaaaa;
- background: #ffffff url("images/ui-bg_flat_75_ffffff_40x100.png") 50% 50% repeat-x;
- color: #222222;
-}
-.ui-widget-content a {
- color: #222222;
-}
-.ui-widget-header {
- border: 1px solid #aaaaaa;
- background: #cccccc url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;
- color: #222222;
- font-weight: bold;
-}
-.ui-widget-header a {
- color: #222222;
-}
-
-/* Interaction states
-----------------------------------*/
-.ui-state-default,
-.ui-widget-content .ui-state-default,
-.ui-widget-header .ui-state-default {
- border: 1px solid #d3d3d3;
- background: #e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;
- font-weight: normal;
- color: #555555;
-}
-.ui-state-default a,
-.ui-state-default a:link,
-.ui-state-default a:visited {
- color: #555555;
- text-decoration: none;
-}
-.ui-state-hover,
-.ui-widget-content .ui-state-hover,
-.ui-widget-header .ui-state-hover,
-.ui-state-focus,
-.ui-widget-content .ui-state-focus,
-.ui-widget-header .ui-state-focus {
- border: 1px solid #999999;
- background: #dadada url("images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;
- font-weight: normal;
- color: #212121;
-}
-.ui-state-hover a,
-.ui-state-hover a:hover,
-.ui-state-hover a:link,
-.ui-state-hover a:visited,
-.ui-state-focus a,
-.ui-state-focus a:hover,
-.ui-state-focus a:link,
-.ui-state-focus a:visited {
- color: #212121;
- text-decoration: none;
-}
-.ui-state-active,
-.ui-widget-content .ui-state-active,
-.ui-widget-header .ui-state-active {
- border: 1px solid #aaaaaa;
- background: #ffffff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;
- font-weight: normal;
- color: #212121;
-}
-.ui-state-active a,
-.ui-state-active a:link,
-.ui-state-active a:visited {
- color: #212121;
- text-decoration: none;
-}
-
-/* Interaction Cues
-----------------------------------*/
-.ui-state-highlight,
-.ui-widget-content .ui-state-highlight,
-.ui-widget-header .ui-state-highlight {
- border: 1px solid #fcefa1;
- background: #fbf9ee url("images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;
- color: #363636;
-}
-.ui-state-highlight a,
-.ui-widget-content .ui-state-highlight a,
-.ui-widget-header .ui-state-highlight a {
- color: #363636;
-}
-.ui-state-error,
-.ui-widget-content .ui-state-error,
-.ui-widget-header .ui-state-error {
- border: 1px solid #cd0a0a;
- background: #fef1ec url("images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;
- color: #cd0a0a;
-}
-.ui-state-error a,
-.ui-widget-content .ui-state-error a,
-.ui-widget-header .ui-state-error a {
- color: #cd0a0a;
-}
-.ui-state-error-text,
-.ui-widget-content .ui-state-error-text,
-.ui-widget-header .ui-state-error-text {
- color: #cd0a0a;
-}
-.ui-priority-primary,
-.ui-widget-content .ui-priority-primary,
-.ui-widget-header .ui-priority-primary {
- font-weight: bold;
-}
-.ui-priority-secondary,
-.ui-widget-content .ui-priority-secondary,
-.ui-widget-header .ui-priority-secondary {
- opacity: .7;
- filter:Alpha(Opacity=70); /* support: IE8 */
- font-weight: normal;
-}
-.ui-state-disabled,
-.ui-widget-content .ui-state-disabled,
-.ui-widget-header .ui-state-disabled {
- opacity: .35;
- filter:Alpha(Opacity=35); /* support: IE8 */
- background-image: none;
-}
-.ui-state-disabled .ui-icon {
- filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
-}
-
-/* Icons
-----------------------------------*/
-
-/* states and images */
-.ui-icon {
- width: 16px;
- height: 16px;
-}
-.ui-icon,
-.ui-widget-content .ui-icon {
- background-image: url("images/ui-icons_222222_256x240.png");
-}
-.ui-widget-header .ui-icon {
- background-image: url("images/ui-icons_222222_256x240.png");
-}
-.ui-state-default .ui-icon {
- background-image: url("images/ui-icons_888888_256x240.png");
-}
-.ui-state-hover .ui-icon,
-.ui-state-focus .ui-icon {
- background-image: url("images/ui-icons_454545_256x240.png");
-}
-.ui-state-active .ui-icon {
- background-image: url("images/ui-icons_454545_256x240.png");
-}
-.ui-state-highlight .ui-icon {
- background-image: url("images/ui-icons_2e83ff_256x240.png");
-}
-.ui-state-error .ui-icon,
-.ui-state-error-text .ui-icon {
- background-image: url("images/ui-icons_cd0a0a_256x240.png");
-}
-
-/* positioning */
-.ui-icon-blank { background-position: 16px 16px; }
-.ui-icon-carat-1-n { background-position: 0 0; }
-.ui-icon-carat-1-ne { background-position: -16px 0; }
-.ui-icon-carat-1-e { background-position: -32px 0; }
-.ui-icon-carat-1-se { background-position: -48px 0; }
-.ui-icon-carat-1-s { background-position: -64px 0; }
-.ui-icon-carat-1-sw { background-position: -80px 0; }
-.ui-icon-carat-1-w { background-position: -96px 0; }
-.ui-icon-carat-1-nw { background-position: -112px 0; }
-.ui-icon-carat-2-n-s { background-position: -128px 0; }
-.ui-icon-carat-2-e-w { background-position: -144px 0; }
-.ui-icon-triangle-1-n { background-position: 0 -16px; }
-.ui-icon-triangle-1-ne { background-position: -16px -16px; }
-.ui-icon-triangle-1-e { background-position: -32px -16px; }
-.ui-icon-triangle-1-se { background-position: -48px -16px; }
-.ui-icon-triangle-1-s { background-position: -64px -16px; }
-.ui-icon-triangle-1-sw { background-position: -80px -16px; }
-.ui-icon-triangle-1-w { background-position: -96px -16px; }
-.ui-icon-triangle-1-nw { background-position: -112px -16px; }
-.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
-.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
-.ui-icon-arrow-1-n { background-position: 0 -32px; }
-.ui-icon-arrow-1-ne { background-position: -16px -32px; }
-.ui-icon-arrow-1-e { background-position: -32px -32px; }
-.ui-icon-arrow-1-se { background-position: -48px -32px; }
-.ui-icon-arrow-1-s { background-position: -64px -32px; }
-.ui-icon-arrow-1-sw { background-position: -80px -32px; }
-.ui-icon-arrow-1-w { background-position: -96px -32px; }
-.ui-icon-arrow-1-nw { background-position: -112px -32px; }
-.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
-.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
-.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
-.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
-.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
-.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
-.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
-.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
-.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
-.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
-.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
-.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
-.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
-.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
-.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
-.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
-.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
-.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
-.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
-.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
-.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
-.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
-.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
-.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
-.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
-.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
-.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
-.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
-.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
-.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
-.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
-.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
-.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
-.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
-.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
-.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
-.ui-icon-arrow-4 { background-position: 0 -80px; }
-.ui-icon-arrow-4-diag { background-position: -16px -80px; }
-.ui-icon-extlink { background-position: -32px -80px; }
-.ui-icon-newwin { background-position: -48px -80px; }
-.ui-icon-refresh { background-position: -64px -80px; }
-.ui-icon-shuffle { background-position: -80px -80px; }
-.ui-icon-transfer-e-w { background-position: -96px -80px; }
-.ui-icon-transferthick-e-w { background-position: -112px -80px; }
-.ui-icon-folder-collapsed { background-position: 0 -96px; }
-.ui-icon-folder-open { background-position: -16px -96px; }
-.ui-icon-document { background-position: -32px -96px; }
-.ui-icon-document-b { background-position: -48px -96px; }
-.ui-icon-note { background-position: -64px -96px; }
-.ui-icon-mail-closed { background-position: -80px -96px; }
-.ui-icon-mail-open { background-position: -96px -96px; }
-.ui-icon-suitcase { background-position: -112px -96px; }
-.ui-icon-comment { background-position: -128px -96px; }
-.ui-icon-person { background-position: -144px -96px; }
-.ui-icon-print { background-position: -160px -96px; }
-.ui-icon-trash { background-position: -176px -96px; }
-.ui-icon-locked { background-position: -192px -96px; }
-.ui-icon-unlocked { background-position: -208px -96px; }
-.ui-icon-bookmark { background-position: -224px -96px; }
-.ui-icon-tag { background-position: -240px -96px; }
-.ui-icon-home { background-position: 0 -112px; }
-.ui-icon-flag { background-position: -16px -112px; }
-.ui-icon-calendar { background-position: -32px -112px; }
-.ui-icon-cart { background-position: -48px -112px; }
-.ui-icon-pencil { background-position: -64px -112px; }
-.ui-icon-clock { background-position: -80px -112px; }
-.ui-icon-disk { background-position: -96px -112px; }
-.ui-icon-calculator { background-position: -112px -112px; }
-.ui-icon-zoomin { background-position: -128px -112px; }
-.ui-icon-zoomout { background-position: -144px -112px; }
-.ui-icon-search { background-position: -160px -112px; }
-.ui-icon-wrench { background-position: -176px -112px; }
-.ui-icon-gear { background-position: -192px -112px; }
-.ui-icon-heart { background-position: -208px -112px; }
-.ui-icon-star { background-position: -224px -112px; }
-.ui-icon-link { background-position: -240px -112px; }
-.ui-icon-cancel { background-position: 0 -128px; }
-.ui-icon-plus { background-position: -16px -128px; }
-.ui-icon-plusthick { background-position: -32px -128px; }
-.ui-icon-minus { background-position: -48px -128px; }
-.ui-icon-minusthick { background-position: -64px -128px; }
-.ui-icon-close { background-position: -80px -128px; }
-.ui-icon-closethick { background-position: -96px -128px; }
-.ui-icon-key { background-position: -112px -128px; }
-.ui-icon-lightbulb { background-position: -128px -128px; }
-.ui-icon-scissors { background-position: -144px -128px; }
-.ui-icon-clipboard { background-position: -160px -128px; }
-.ui-icon-copy { background-position: -176px -128px; }
-.ui-icon-contact { background-position: -192px -128px; }
-.ui-icon-image { background-position: -208px -128px; }
-.ui-icon-video { background-position: -224px -128px; }
-.ui-icon-script { background-position: -240px -128px; }
-.ui-icon-alert { background-position: 0 -144px; }
-.ui-icon-info { background-position: -16px -144px; }
-.ui-icon-notice { background-position: -32px -144px; }
-.ui-icon-help { background-position: -48px -144px; }
-.ui-icon-check { background-position: -64px -144px; }
-.ui-icon-bullet { background-position: -80px -144px; }
-.ui-icon-radio-on { background-position: -96px -144px; }
-.ui-icon-radio-off { background-position: -112px -144px; }
-.ui-icon-pin-w { background-position: -128px -144px; }
-.ui-icon-pin-s { background-position: -144px -144px; }
-.ui-icon-play { background-position: 0 -160px; }
-.ui-icon-pause { background-position: -16px -160px; }
-.ui-icon-seek-next { background-position: -32px -160px; }
-.ui-icon-seek-prev { background-position: -48px -160px; }
-.ui-icon-seek-end { background-position: -64px -160px; }
-.ui-icon-seek-start { background-position: -80px -160px; }
-/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
-.ui-icon-seek-first { background-position: -80px -160px; }
-.ui-icon-stop { background-position: -96px -160px; }
-.ui-icon-eject { background-position: -112px -160px; }
-.ui-icon-volume-off { background-position: -128px -160px; }
-.ui-icon-volume-on { background-position: -144px -160px; }
-.ui-icon-power { background-position: 0 -176px; }
-.ui-icon-signal-diag { background-position: -16px -176px; }
-.ui-icon-signal { background-position: -32px -176px; }
-.ui-icon-battery-0 { background-position: -48px -176px; }
-.ui-icon-battery-1 { background-position: -64px -176px; }
-.ui-icon-battery-2 { background-position: -80px -176px; }
-.ui-icon-battery-3 { background-position: -96px -176px; }
-.ui-icon-circle-plus { background-position: 0 -192px; }
-.ui-icon-circle-minus { background-position: -16px -192px; }
-.ui-icon-circle-close { background-position: -32px -192px; }
-.ui-icon-circle-triangle-e { background-position: -48px -192px; }
-.ui-icon-circle-triangle-s { background-position: -64px -192px; }
-.ui-icon-circle-triangle-w { background-position: -80px -192px; }
-.ui-icon-circle-triangle-n { background-position: -96px -192px; }
-.ui-icon-circle-arrow-e { background-position: -112px -192px; }
-.ui-icon-circle-arrow-s { background-position: -128px -192px; }
-.ui-icon-circle-arrow-w { background-position: -144px -192px; }
-.ui-icon-circle-arrow-n { background-position: -160px -192px; }
-.ui-icon-circle-zoomin { background-position: -176px -192px; }
-.ui-icon-circle-zoomout { background-position: -192px -192px; }
-.ui-icon-circle-check { background-position: -208px -192px; }
-.ui-icon-circlesmall-plus { background-position: 0 -208px; }
-.ui-icon-circlesmall-minus { background-position: -16px -208px; }
-.ui-icon-circlesmall-close { background-position: -32px -208px; }
-.ui-icon-squaresmall-plus { background-position: -48px -208px; }
-.ui-icon-squaresmall-minus { background-position: -64px -208px; }
-.ui-icon-squaresmall-close { background-position: -80px -208px; }
-.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
-.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
-.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
-.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
-.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
-.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
-
-
-/* Misc visuals
-----------------------------------*/
-
-/* Corner radius */
-.ui-corner-all,
-.ui-corner-top,
-.ui-corner-left,
-.ui-corner-tl {
- border-top-left-radius: 4px;
-}
-.ui-corner-all,
-.ui-corner-top,
-.ui-corner-right,
-.ui-corner-tr {
- border-top-right-radius: 4px;
-}
-.ui-corner-all,
-.ui-corner-bottom,
-.ui-corner-left,
-.ui-corner-bl {
- border-bottom-left-radius: 4px;
-}
-.ui-corner-all,
-.ui-corner-bottom,
-.ui-corner-right,
-.ui-corner-br {
- border-bottom-right-radius: 4px;
-}
-
-/* Overlays */
-.ui-widget-overlay {
- background: #aaaaaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;
- opacity: .3;
- filter: Alpha(Opacity=30); /* support: IE8 */
-}
-.ui-widget-shadow {
- margin: -8px 0 0 -8px;
- padding: 8px;
- background: #aaaaaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;
- opacity: .3;
- filter: Alpha(Opacity=30); /* support: IE8 */
- border-radius: 8px;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/css/layout/layout-default-latest.css b/ecomp-portal-BE/war/static/fusion/css/layout/layout-default-latest.css
deleted file mode 100644
index aa382de3..00000000
--- a/ecomp-portal-BE/war/static/fusion/css/layout/layout-default-latest.css
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * Default Layout Theme
- *
- * Created for jquery.layout
- *
- * Copyright (c) 2010
- * Fabrizio Balliano (http://www.fabrizioballiano.net)
- * Kevin Dalman (http://allpro.net)
- *
- * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
- * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
- *
- * Last Updated: 2010-02-10
- * NOTE: For best code readability, view this with a fixed-space font and tabs equal to 4-chars
- */
-
-/*
- * DEFAULT FONT
- * Just to make demo-pages look better - not actually relevant to Layout!
- */
-body {
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: 100%;
- *font-size: 80%;
-}
-
-/*
- * PANES & CONTENT-DIVs
- */
-.ui-layout-pane { /* all 'panes' */
- background: #FFF;
- border: 1px solid #BBB;
- padding: 10px;
- overflow: auto;
- /* DO NOT add scrolling (or padding) to 'panes' that have a content-div,
- otherwise you may get double-scrollbars - on the pane AND on the content-div
- - use ui-layout-wrapper class if pane has a content-div
- - use ui-layout-container if pane has an inner-layout
- */
- }
- /* (scrolling) content-div inside pane allows for fixed header(s) and/or footer(s) */
- .ui-layout-content {
- padding: 10px;
- position: relative; /* contain floated or positioned elements */
- overflow: auto; /* add scrolling to content-div */
- }
-
-/*
- * UTILITY CLASSES
- * Must come AFTER pane-class above so will override
- * These classes are NOT auto-generated and are NOT used by Layout
- */
-.layout-child-container,
-.layout-content-container {
- padding: 0;
- overflow: hidden;
-}
-.layout-child-container {
- border: 0; /* remove border because inner-layout-panes probably have borders */
-}
-.layout-scroll {
- overflow: auto;
-}
-.layout-hide {
- display: none;
-}
-
-/*
- * RESIZER-BARS
- */
-.ui-layout-resizer { /* all 'resizer-bars' */
- background: #DDD;
- border: 1px solid #BBB;
- border-width: 0;
- }
- .ui-layout-resizer-drag { /* REAL resizer while resize in progress */
- }
- .ui-layout-resizer-hover { /* affects both open and closed states */
- }
- /* NOTE: It looks best when 'hover' and 'dragging' are set to the same color,
- otherwise color shifts while dragging when bar can't keep up with mouse */
- .ui-layout-resizer-open-hover , /* hover-color to 'resize' */
- .ui-layout-resizer-dragging { /* resizer beging 'dragging' */
- background: #C4E1A4;
- }
- .ui-layout-resizer-dragging { /* CLONED resizer being dragged */
- border: 1px solid #BBB;
- }
- .ui-layout-resizer-north-dragging,
- .ui-layout-resizer-south-dragging {
- border-width: 1px 0;
- }
- .ui-layout-resizer-west-dragging,
- .ui-layout-resizer-east-dragging {
- border-width: 0 1px;
- }
- /* NOTE: Add a 'dragging-limit' color to provide visual feedback when resizer hits min/max size limits */
- .ui-layout-resizer-dragging-limit { /* CLONED resizer at min or max size-limit */
- background: #E1A4A4; /* red */
- }
-
- .ui-layout-resizer-closed-hover { /* hover-color to 'slide open' */
- background: #EBD5AA;
- }
- .ui-layout-resizer-sliding { /* resizer when pane is 'slid open' */
- opacity: .10; /* show only a slight shadow */
- filter: alpha(opacity=10);
- }
- .ui-layout-resizer-sliding-hover { /* sliding resizer - hover */
- opacity: 1.00; /* on-hover, show the resizer-bar normally */
- filter: alpha(opacity=100);
- }
- /* sliding resizer - add 'outside-border' to resizer on-hover
- * this sample illustrates how to target specific panes and states */
- .ui-layout-resizer-north-sliding-hover { border-bottom-width: 1px; }
- .ui-layout-resizer-south-sliding-hover { border-top-width: 1px; }
- .ui-layout-resizer-west-sliding-hover { border-right-width: 1px; }
- .ui-layout-resizer-east-sliding-hover { border-left-width: 1px; }
-
-/*
- * TOGGLER-BUTTONS
- */
-.ui-layout-toggler {
- border: 1px solid #BBB; /* match pane-border */
- background-color: #BBB;
- }
- .ui-layout-resizer-hover .ui-layout-toggler {
- opacity: .60;
- filter: alpha(opacity=60);
- }
- .ui-layout-toggler-hover , /* need when NOT resizable */
- .ui-layout-resizer-hover .ui-layout-toggler-hover { /* need specificity when IS resizable */
- background-color: #FC6;
- opacity: 1.00;
- filter: alpha(opacity=100);
- }
- .ui-layout-toggler-north ,
- .ui-layout-toggler-south {
- border-width: 0 1px; /* left/right borders */
- }
- .ui-layout-toggler-west ,
- .ui-layout-toggler-east {
- border-width: 1px 0; /* top/bottom borders */
- }
- /* hide the toggler-button when the pane is 'slid open' */
- .ui-layout-resizer-sliding .ui-layout-toggler {
- display: none;
- }
- /*
- * style the text we put INSIDE the togglers
- */
- .ui-layout-toggler .content {
- color: #666;
- font-size: 12px;
- font-weight: bold;
- width: 100%;
- padding-bottom: 0.35ex; /* to 'vertically center' text inside text-span */
- }
-
-/*
- * PANE-MASKS
- * these styles are hard-coded on mask elems, but are also
- * included here as !important to ensure will overrides any generic styles
- */
-.ui-layout-mask {
- border: none !important;
- padding: 0 !important;
- margin: 0 !important;
- overflow: hidden !important;
- position: absolute !important;
- opacity: 0 !important;
- filter: Alpha(Opacity="0") !important;
-}
-.ui-layout-mask-inside-pane { /* masks always inside pane EXCEPT when pane is an iframe */
- top: 0 !important;
- left: 0 !important;
- width: 100% !important;
- height: 100% !important;
-}
-div.ui-layout-mask {} /* standard mask for iframes */
-iframe.ui-layout-mask {} /* extra mask for objects/applets */
-
-/*
- * Default printing styles
- */
-@media print {
- /*
- * Unless you want to print the layout as it appears onscreen,
- * these html/body styles are needed to allow the content to 'flow'
- */
- html {
- height: auto !important;
- overflow: visible !important;
- }
- body.ui-layout-container {
- position: static !important;
- top: auto !important;
- bottom: auto !important;
- left: auto !important;
- right: auto !important;
- /* only IE6 has container width & height set by Layout */
- _width: auto !important;
- _height: auto !important;
- }
- .ui-layout-resizer, .ui-layout-toggler {
- display: none !important;
- }
- /*
- * Default pane print styles disables positioning, borders and backgrounds.
- * You can modify these styles however it suit your needs.
- */
- .ui-layout-pane {
- border: none !important;
- background: transparent !important;
- position: relative !important;
- top: auto !important;
- bottom: auto !important;
- left: auto !important;
- right: auto !important;
- width: auto !important;
- height: auto !important;
- overflow: visible !important;
- }
-} \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/d3/css/nv.d3.css b/ecomp-portal-BE/war/static/fusion/d3/css/nv.d3.css
deleted file mode 100644
index 28ccd053..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/css/nv.d3.css
+++ /dev/null
@@ -1,656 +0,0 @@
-
-/********************
- * HTML CSS
- */
-
-
-.chartWrap {
- margin: 0;
- padding: 0;
- overflow: hidden;
-}
-
-
-/********************
- * TOOLTIP CSS
- */
-
-.nvtooltip {
- position: absolute;
- background-color: rgba(255,255,255,1);
- padding: 10px;
- border: 1px solid #ddd;
- z-index: 10000;
-
- font-family: Arial;
- font-size: 13px;
-
- transition: opacity 500ms linear;
- -moz-transition: opacity 500ms linear;
- -webkit-transition: opacity 500ms linear;
-
- transition-delay: 500ms;
- -moz-transition-delay: 500ms;
- -webkit-transition-delay: 500ms;
-
- -moz-box-shadow: 4px 4px 8px rgba(0,0,0,.5);
- -webkit-box-shadow: 4px 4px 8px rgba(0,0,0,.5);
- box-shadow: 4px 4px 8px rgba(0,0,0,.5);
-
- -moz-border-radius: 10px;
- border-radius: 10px;
-
- pointer-events: none;
-
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
-}
-
-.nvtooltip h3 {
- margin: 0;
- padding: 0;
- text-align: center;
-}
-
-.nvtooltip p {
- margin: 0;
- padding: 0;
- text-align: center;
-}
-
-.nvtooltip span {
- display: inline-block;
- margin: 2px 0;
-}
-
-.nvtooltip-pending-removal {
- position: absolute;
- pointer-events: none;
-}
-
-
-/********************
- * SVG CSS
- */
-
-
-svg {
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- /* Trying to get SVG to act like a greedy block in all browsers */
- display: block;
- width:100%;
- height:100%;
-}
-
-
-svg text {
- font: normal 12px Arial;
-}
-
-svg .title {
- font: bold 14px Arial;
-}
-
-.nvd3 .nv-background {
- fill: white;
- fill-opacity: 0;
- /*
- pointer-events: none;
- */
-}
-
-.nvd3.nv-noData {
- font-size: 18px;
- font-weight: bolf;
-}
-
-
-/**********
-* Brush
-*/
-
-.nv-brush .extent {
- fill-opacity: .125;
- shape-rendering: crispEdges;
-}
-
-
-
-/**********
-* Legend
-*/
-
-.nvd3 .nv-legend .nv-series {
- cursor: pointer;
-}
-
-.nvd3 .nv-legend .disabled circle {
- fill-opacity: 0;
-}
-
-
-
-/**********
-* Axes
-*/
-
-.nvd3 .nv-axis path {
- fill: none;
- stroke: #000;
- stroke-opacity: .75;
- shape-rendering: crispEdges;
-}
-
-.nvd3 .nv-axis path.domain {
- stroke-opacity: .75;
-}
-
-.nvd3 .nv-axis.nv-x path.domain {
- stroke-opacity: 0;
-}
-
-.nvd3 .nv-axis line {
- fill: none;
- stroke: #000;
- stroke-opacity: .25;
- shape-rendering: crispEdges;
-}
-
-.nvd3 .nv-axis line.zero {
- stroke-opacity: .75;
-}
-
-.nvd3 .nv-axis .nv-axisMaxMin text {
- font-weight: bold;
-}
-
-.nvd3 .x .nv-axis .nv-axisMaxMin text,
-.nvd3 .x2 .nv-axis .nv-axisMaxMin text,
-.nvd3 .x3 .nv-axis .nv-axisMaxMin text {
- text-anchor: middle
-}
-
-
-
-/**********
-* Brush
-*/
-
-.nv-brush .resize path {
- fill: #eee;
- stroke: #666;
-}
-
-
-
-/**********
-* Bars
-*/
-
-.nvd3 .nv-bars .negative rect {
- zfill: brown;
-}
-
-.nvd3 .nv-bars rect {
- zfill: steelblue;
- fill-opacity: .75;
-
- transition: fill-opacity 250ms linear;
- -moz-transition: fill-opacity 250ms linear;
- -webkit-transition: fill-opacity 250ms linear;
-}
-
-.nvd3 .nv-bars rect:hover {
- fill-opacity: 1;
-}
-
-.nvd3 .nv-bars .hover rect {
- fill: lightblue;
-}
-
-.nvd3 .nv-bars text {
- fill: rgba(0,0,0,0);
-}
-
-.nvd3 .nv-bars .hover text {
- fill: rgba(0,0,0,1);
-}
-
-
-/**********
-* Bars
-*/
-
-.nvd3 .nv-multibar .nv-groups rect,
-.nvd3 .nv-multibarHorizontal .nv-groups rect,
-.nvd3 .nv-discretebar .nv-groups rect {
- stroke-opacity: 0;
-
- transition: fill-opacity 250ms linear;
- -moz-transition: fill-opacity 250ms linear;
- -webkit-transition: fill-opacity 250ms linear;
-}
-
-.nvd3 .nv-multibar .nv-groups rect:hover,
-.nvd3 .nv-multibarHorizontal .nv-groups rect:hover,
-.nvd3 .nv-discretebar .nv-groups rect:hover {
- fill-opacity: 1;
-}
-
-.nvd3 .nv-discretebar .nv-groups text,
-.nvd3 .nv-multibarHorizontal .nv-groups text {
- font-weight: bold;
- fill: rgba(0,0,0,1);
- stroke: rgba(0,0,0,0);
-}
-
-/***********
-* Pie Chart
-*/
-
-.nvd3.nv-pie path {
- stroke-opacity: 0;
-
- transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity 250ms linear;
- -moz-transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity 250ms linear;
- -webkit-transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity 250ms linear;
-
-}
-
-.nvd3.nv-pie .nv-slice text {
- stroke: #000;
- stroke-width: 0;
-}
-
-.nvd3.nv-pie path {
- stroke: #fff;
- stroke-width: 1px;
- stroke-opacity: 1;
-}
-
-.nvd3.nv-pie .hover path {
- fill-opacity: .7;
-/*
- stroke-width: 6px;
- stroke-opacity: 1;
-*/
-}
-
-.nvd3.nv-pie .nv-label rect {
- fill-opacity: 0;
- stroke-opacity: 0;
-}
-
-/**********
-* Lines
-*/
-
-.nvd3 .nv-groups path.nv-line {
- fill: none;
- stroke-width: 2.5px;
- /*
- stroke-linecap: round;
- shape-rendering: geometricPrecision;
-
- transition: stroke-width 250ms linear;
- -moz-transition: stroke-width 250ms linear;
- -webkit-transition: stroke-width 250ms linear;
-
- transition-delay: 250ms
- -moz-transition-delay: 250ms;
- -webkit-transition-delay: 250ms;
- */
-}
-
-.nvd3 .nv-groups path.nv-area {
- stroke: none;
- /*
- stroke-linecap: round;
- shape-rendering: geometricPrecision;
-
- stroke-width: 2.5px;
- transition: stroke-width 250ms linear;
- -moz-transition: stroke-width 250ms linear;
- -webkit-transition: stroke-width 250ms linear;
-
- transition-delay: 250ms
- -moz-transition-delay: 250ms;
- -webkit-transition-delay: 250ms;
- */
-}
-
-.nvd3 .nv-line.hover path {
- stroke-width: 6px;
-}
-
-/*
-.nvd3.scatter .groups .point {
- fill-opacity: 0.1;
- stroke-opacity: 0.1;
-}
- */
-
-.nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point {
- fill-opacity: 0;
- stroke-opacity: 0;
-}
-
-.nvd3.nv-scatter.nv-single-point .nv-groups .nv-point {
- fill-opacity: .5 !important;
- stroke-opacity: .5 !important;
-}
-
-
-.nvd3 .nv-groups .nv-point {
- transition: stroke-width 250ms linear, stroke-opacity 250ms linear;
- -moz-transition: stroke-width 250ms linear, stroke-opacity 250ms linear;
- -webkit-transition: stroke-width 250ms linear, stroke-opacity 250ms linear;
-}
-
-.nvd3.nv-scatter .nv-groups .nv-point.hover,
-.nvd3 .nv-groups .nv-point.hover {
- stroke-width: 20px;
- fill-opacity: .5 !important;
- stroke-opacity: .5 !important;
-}
-
-
-.nvd3 .nv-point-paths path {
- stroke: #aaa;
- stroke-opacity: 0;
- fill: #eee;
- fill-opacity: 0;
-}
-
-
-
-.nvd3 .nv-indexLine {
- cursor: ew-resize;
-}
-
-
-/**********
-* Distribution
-*/
-
-.nvd3 .nv-distribution {
- pointer-events: none;
-}
-
-
-
-/**********
-* Scatter
-*/
-
-/* **Attempting to remove this for useVoronoi(false), need to see if it's required anywhere
-.nvd3 .nv-groups .nv-point {
- pointer-events: none;
-}
-*/
-
-.nvd3 .nv-groups .nv-point.hover {
- stroke-width: 20px;
- stroke-opacity: .5;
-}
-
-.nvd3 .nv-scatter .nv-point.hover {
- fill-opacity: 1;
-}
-
-/*
-.nv-group.hover .nv-point {
- fill-opacity: 1;
-}
-*/
-
-
-/**********
-* Stacked Area
-*/
-
-.nvd3.nv-stackedarea path.nv-area {
- fill-opacity: .7;
- /*
- stroke-opacity: .65;
- fill-opacity: 1;
- */
- stroke-opacity: 0;
-
- transition: fill-opacity 250ms linear, stroke-opacity 250ms linear;
- -moz-transition: fill-opacity 250ms linear, stroke-opacity 250ms linear;
- -webkit-transition: fill-opacity 250ms linear, stroke-opacity 250ms linear;
-
- /*
- transition-delay: 500ms;
- -moz-transition-delay: 500ms;
- -webkit-transition-delay: 500ms;
- */
-
-}
-
-.nvd3.nv-stackedarea path.nv-area.hover {
- fill-opacity: .9;
- /*
- stroke-opacity: .85;
- */
-}
-/*
-.d3stackedarea .groups path {
- stroke-opacity: 0;
-}
- */
-
-
-
-.nvd3.nv-stackedarea .nv-groups .nv-point {
- stroke-opacity: 0;
- fill-opacity: 0;
-}
-
-.nvd3.nv-stackedarea .nv-groups .nv-point.hover {
- stroke-width: 20px;
- stroke-opacity: .75;
- fill-opacity: 1;
-}
-
-
-
-/**********
-* Line Plus Bar
-*/
-
-.nvd3.nv-linePlusBar .nv-bar rect {
- fill-opacity: .75;
-}
-
-.nvd3.nv-linePlusBar .nv-bar rect:hover {
- fill-opacity: 1;
-}
-
-
-/**********
-* Bullet
-*/
-
-.nvd3.nv-bullet { font: 10px sans-serif; }
-.nvd3.nv-bullet .nv-measure { fill-opacity: .8; }
-.nvd3.nv-bullet .nv-measure:hover { fill-opacity: 1; }
-.nvd3.nv-bullet .nv-marker { stroke: #000; stroke-width: 2px; }
-.nvd3.nv-bullet .nv-markerTriangle { stroke: #000; fill: #fff; stroke-width: 1.5px; }
-.nvd3.nv-bullet .nv-tick line { stroke: #666; stroke-width: .5px; }
-.nvd3.nv-bullet .nv-range.nv-s0 { fill: #eee; }
-.nvd3.nv-bullet .nv-range.nv-s1 { fill: #ddd; }
-.nvd3.nv-bullet .nv-range.nv-s2 { fill: #ccc; }
-.nvd3.nv-bullet .nv-title { font-size: 14px; font-weight: bold; }
-.nvd3.nv-bullet .nv-subtitle { fill: #999; }
-
-
-.nvd3.nv-bullet .nv-range {
- fill: #999;
- fill-opacity: .4;
-}
-.nvd3.nv-bullet .nv-range:hover {
- fill-opacity: .7;
-}
-
-
-
-/**********
-* Sparkline
-*/
-
-.nvd3.nv-sparkline path {
- fill: none;
-}
-
-.nvd3.nv-sparklineplus g.nv-hoverValue {
- pointer-events: none;
-}
-
-.nvd3.nv-sparklineplus .nv-hoverValue line {
- stroke: #333;
- stroke-width: 1.5px;
- }
-
-.nvd3.nv-sparklineplus,
-.nvd3.nv-sparklineplus g {
- pointer-events: all;
-}
-
-.nvd3 .nv-hoverArea {
- fill-opacity: 0;
- stroke-opacity: 0;
-}
-
-.nvd3.nv-sparklineplus .nv-xValue,
-.nvd3.nv-sparklineplus .nv-yValue {
- /*
- stroke: #666;
- */
- stroke-width: 0;
- font-size: .9em;
- font-weight: normal;
-}
-
-.nvd3.nv-sparklineplus .nv-yValue {
- stroke: #f66;
-}
-
-.nvd3.nv-sparklineplus .nv-maxValue {
- stroke: #2ca02c;
- fill: #2ca02c;
-}
-
-.nvd3.nv-sparklineplus .nv-minValue {
- stroke: #d62728;
- fill: #d62728;
-}
-
-.nvd3.nv-sparklineplus .nv-currentValue {
- /*
- stroke: #444;
- fill: #000;
- */
- font-weight: bold;
- font-size: 1.1em;
-}
-
-/**********
-* historical stock
-*/
-
-.nvd3.nv-ohlcBar .nv-ticks .nv-tick {
- stroke-width: 2px;
-}
-
-.nvd3.nv-ohlcBar .nv-ticks .nv-tick.hover {
- stroke-width: 4px;
-}
-
-.nvd3.nv-ohlcBar .nv-ticks .nv-tick.positive {
- stroke: #2ca02c;
-}
-
-.nvd3.nv-ohlcBar .nv-ticks .nv-tick.negative {
- stroke: #d62728;
-}
-
-.nvd3.nv-historicalStockChart .nv-axis .nv-axislabel {
- font-weight: bold;
-}
-
-.nvd3.nv-historicalStockChart .nv-dragTarget {
- fill-opacity: 0;
- stroke: none;
- cursor: move;
-}
-
-.nvd3 .nv-brush .extent {
- /*
- cursor: ew-resize !important;
- */
- fill-opacity: 0 !important;
-}
-
-.nvd3 .nv-brushBackground rect {
- stroke: #000;
- stroke-width: .4;
- fill: #fff;
- fill-opacity: .7;
-}
-
-
-
-/**********
-* Indented Tree
-*/
-
-
-/**
- * TODO: the following 3 selectors are based on classes used in the example. I should either make them standard and leave them here, or move to a CSS file not included in the library
- */
-.nvd3.nv-indentedtree .name {
- margin-left: 5px;
-}
-
-.nvd3.nv-indentedtree .clickable {
- color: #08C;
- cursor: pointer;
-}
-
-.nvd3.nv-indentedtree span.clickable:hover {
- color: #005580;
- text-decoration: underline;
-}
-
-
-.nvd3.nv-indentedtree .nv-childrenCount {
- display: inline-block;
- margin-left: 5px;
-}
-
-.nvd3.nv-indentedtree .nv-treeicon {
- cursor: pointer;
- /*
- cursor: n-resize;
- */
-}
-
-.nvd3.nv-indentedtree .nv-treeicon.nv-folded {
- cursor: pointer;
- /*
- cursor: s-resize;
- */
-}
-
-
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/cie.js b/ecomp-portal-BE/war/static/fusion/d3/js/cie.js
deleted file mode 100644
index 45f01329..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/cie.js
+++ /dev/null
@@ -1,155 +0,0 @@
-(function(d3) {
- var cie = d3.cie = {};
-
- cie.lab = function(l, a, b) {
- return arguments.length === 1
- ? (l instanceof Lab ? lab(l.l, l.a, l.b)
- : (l instanceof Lch ? lch_lab(l.l, l.c, l.h)
- : rgb_lab((l = d3.rgb(l)).r, l.g, l.b)))
- : lab(+l, +a, +b);
- };
-
- cie.lch = function(l, c, h) {
- return arguments.length === 1
- ? (l instanceof Lch ? lch(l.l, l.c, l.h)
- : (l instanceof Lab ? lab_lch(l.l, l.a, l.b)
- : lab_lch((l = rgb_lab((l = d3.rgb(l)).r, l.g, l.b)).l, l.a, l.b)))
- : lch(+l, +c, +h);
- };
-
- cie.interpolateLab = function(a, b) {
- a = cie.lab(a);
- b = cie.lab(b);
- var al = a.l,
- aa = a.a,
- ab = a.b,
- bl = b.l - al,
- ba = b.a - aa,
- bb = b.b - ab;
- return function(t) {
- return lab_rgb(al + bl * t, aa + ba * t, ab + bb * t) + "";
- };
- };
-
- cie.interpolateLch = function(a, b) {
- a = cie.lch(a);
- b = cie.lch(b);
- var al = a.l,
- ac = a.c,
- ah = a.h,
- bl = b.l - al,
- bc = b.c - ac,
- bh = b.h - ah;
- if (bh > 180) bh -= 360; else if (bh < -180) bh += 360; // shortest path
- return function(t) {
- return lch_lab(al + bl * t, ac + bc * t, ah + bh * t) + "";
- };
- };
-
- function lab(l, a, b) {
- return new Lab(l, a, b);
- }
-
- function Lab(l, a, b) {
- this.l = l;
- this.a = a;
- this.b = b;
- }
-
- Lab.prototype.brighter = function(k) {
- return lab(Math.min(100, this.l + K * (arguments.length ? k : 1)), this.a, this.b);
- };
-
- Lab.prototype.darker = function(k) {
- return lab(Math.max(0, this.l - K * (arguments.length ? k : 1)), this.a, this.b);
- };
-
- Lab.prototype.rgb = function() {
- return lab_rgb(this.l, this.a, this.b);
- };
-
- Lab.prototype.toString = function() {
- return this.rgb() + "";
- };
-
- function lch(l, c, h) {
- return new Lch(l, c, h);
- }
-
- function Lch(l, c, h) {
- this.l = l;
- this.c = c;
- this.h = h;
- }
-
- Lch.prototype.brighter = function(k) {
- return lch(Math.min(100, this.l + K * (arguments.length ? k : 1)), this.c, this.h);
- };
-
- Lch.prototype.darker = function(k) {
- return lch(Math.max(0, this.l - K * (arguments.length ? k : 1)), this.c, this.h);
- };
-
- Lch.prototype.rgb = function() {
- return lch_lab(this.l, this.c, this.h).rgb();
- };
-
- Lch.prototype.toString = function() {
- return this.rgb() + "";
- };
-
- // Corresponds roughly to RGB brighter/darker
- var K = 18;
-
- // D65 standard referent
- var X = 0.950470, Y = 1, Z = 1.088830;
-
- function lab_rgb(l, a, b) {
- var y = (l + 16) / 116, x = y + a / 500, z = y - b / 200;
- x = lab_xyz(x) * X;
- y = lab_xyz(y) * Y;
- z = lab_xyz(z) * Z;
- return d3.rgb(
- xyz_rgb( 3.2404542 * x - 1.5371385 * y - 0.4985314 * z),
- xyz_rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z),
- xyz_rgb( 0.0556434 * x - 0.2040259 * y + 1.0572252 * z)
- );
- }
-
- function rgb_lab(r, g, b) {
- r = rgb_xyz(r);
- g = rgb_xyz(g);
- b = rgb_xyz(b);
- var x = xyz_lab((0.4124564 * r + 0.3575761 * g + 0.1804375 * b) / X),
- y = xyz_lab((0.2126729 * r + 0.7151522 * g + 0.0721750 * b) / Y),
- z = xyz_lab((0.0193339 * r + 0.1191920 * g + 0.9503041 * b) / Z);
- return lab(116 * y - 16, 500 * (x - y), 200 * (y - z));
- }
-
- function lab_lch(l, a, b) {
- var c = Math.sqrt(a * a + b * b),
- h = Math.atan2(b, a) / Math.PI * 180;
- return lch(l, c, h);
- }
-
- function lch_lab(l, c, h) {
- h = h * Math.PI / 180;
- return lab(l, Math.cos(h) * c, Math.sin(h) * c);
- }
-
- function lab_xyz(x) {
- return x > 0.206893034 ? x * x * x : (x - 4 / 29) / 7.787037;
- }
-
- function xyz_lab(x) {
- return x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787037 * x + 4 / 29;
- }
-
- function xyz_rgb(r) {
- return Math.round(255 * (r <= 0.00304 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - 0.055));
- }
-
- function rgb_xyz(r) {
- return (r /= 255) <= 0.04045 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4);
- }
-})(d3);
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/colorbrewer.js b/ecomp-portal-BE/war/static/fusion/d3/js/colorbrewer.js
deleted file mode 100644
index 2295527b..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/colorbrewer.js
+++ /dev/null
@@ -1,302 +0,0 @@
-// This product includes color specifications and designs developed by Cynthia Brewer (http://colorbrewer.org/).
-var colorbrewer = {YlGn: {
-3: ["#f7fcb9","#addd8e","#31a354"],
-4: ["#ffffcc","#c2e699","#78c679","#238443"],
-5: ["#ffffcc","#c2e699","#78c679","#31a354","#006837"],
-6: ["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],
-7: ["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],
-8: ["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],
-9: ["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]
-},YlGnBu: {
-3: ["#edf8b1","#7fcdbb","#2c7fb8"],
-4: ["#ffffcc","#a1dab4","#41b6c4","#225ea8"],
-5: ["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],
-6: ["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],
-7: ["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],
-8: ["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],
-9: ["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]
-},GnBu: {
-3: ["#e0f3db","#a8ddb5","#43a2ca"],
-4: ["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],
-5: ["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],
-6: ["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],
-7: ["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],
-8: ["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],
-9: ["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]
-},BuGn: {
-3: ["#e5f5f9","#99d8c9","#2ca25f"],
-4: ["#edf8fb","#b2e2e2","#66c2a4","#238b45"],
-5: ["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],
-6: ["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],
-7: ["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],
-8: ["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],
-9: ["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]
-},PuBuGn: {
-3: ["#ece2f0","#a6bddb","#1c9099"],
-4: ["#f6eff7","#bdc9e1","#67a9cf","#02818a"],
-5: ["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],
-6: ["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],
-7: ["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],
-8: ["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],
-9: ["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]
-},PuBu: {
-3: ["#ece7f2","#a6bddb","#2b8cbe"],
-4: ["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],
-5: ["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],
-6: ["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],
-7: ["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],
-8: ["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],
-9: ["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]
-},BuPu: {
-3: ["#e0ecf4","#9ebcda","#8856a7"],
-4: ["#edf8fb","#b3cde3","#8c96c6","#88419d"],
-5: ["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],
-6: ["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],
-7: ["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],
-8: ["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],
-9: ["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]
-},RdPu: {
-3: ["#fde0dd","#fa9fb5","#c51b8a"],
-4: ["#feebe2","#fbb4b9","#f768a1","#ae017e"],
-5: ["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],
-6: ["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],
-7: ["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],
-8: ["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],
-9: ["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]
-},PuRd: {
-3: ["#e7e1ef","#c994c7","#dd1c77"],
-4: ["#f1eef6","#d7b5d8","#df65b0","#ce1256"],
-5: ["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],
-6: ["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],
-7: ["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],
-8: ["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],
-9: ["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]
-},OrRd: {
-3: ["#fee8c8","#fdbb84","#e34a33"],
-4: ["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],
-5: ["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],
-6: ["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],
-7: ["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],
-8: ["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],
-9: ["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]
-},YlOrRd: {
-3: ["#ffeda0","#feb24c","#f03b20"],
-4: ["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],
-5: ["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],
-6: ["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],
-7: ["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],
-8: ["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],
-9: ["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]
-},YlOrBr: {
-3: ["#fff7bc","#fec44f","#d95f0e"],
-4: ["#ffffd4","#fed98e","#fe9929","#cc4c02"],
-5: ["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],
-6: ["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],
-7: ["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],
-8: ["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],
-9: ["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]
-},Purples: {
-3: ["#efedf5","#bcbddc","#756bb1"],
-4: ["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],
-5: ["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],
-6: ["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],
-7: ["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],
-8: ["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],
-9: ["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]
-},Blues: {
-3: ["#deebf7","#9ecae1","#3182bd"],
-4: ["#eff3ff","#bdd7e7","#6baed6","#2171b5"],
-5: ["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],
-6: ["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],
-7: ["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],
-8: ["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],
-9: ["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]
-},Greens: {
-3: ["#e5f5e0","#a1d99b","#31a354"],
-4: ["#edf8e9","#bae4b3","#74c476","#238b45"],
-5: ["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],
-6: ["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],
-7: ["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],
-8: ["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],
-9: ["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]
-},Oranges: {
-3: ["#fee6ce","#fdae6b","#e6550d"],
-4: ["#feedde","#fdbe85","#fd8d3c","#d94701"],
-5: ["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],
-6: ["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],
-7: ["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],
-8: ["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],
-9: ["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]
-},Reds: {
-3: ["#fee0d2","#fc9272","#de2d26"],
-4: ["#fee5d9","#fcae91","#fb6a4a","#cb181d"],
-5: ["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],
-6: ["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],
-7: ["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],
-8: ["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],
-9: ["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]
-},Greys: {
-3: ["#f0f0f0","#bdbdbd","#636363"],
-4: ["#f7f7f7","#cccccc","#969696","#525252"],
-5: ["#f7f7f7","#cccccc","#969696","#636363","#252525"],
-6: ["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],
-7: ["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],
-8: ["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],
-9: ["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]
-},PuOr: {
-3: ["#f1a340","#f7f7f7","#998ec3"],
-4: ["#e66101","#fdb863","#b2abd2","#5e3c99"],
-5: ["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],
-6: ["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],
-7: ["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],
-8: ["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],
-9: ["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],
-10: ["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],
-11: ["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]
-},BrBG: {
-3: ["#d8b365","#f5f5f5","#5ab4ac"],
-4: ["#a6611a","#dfc27d","#80cdc1","#018571"],
-5: ["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],
-6: ["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],
-7: ["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],
-8: ["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],
-9: ["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],
-10: ["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],
-11: ["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]
-},PRGn: {
-3: ["#af8dc3","#f7f7f7","#7fbf7b"],
-4: ["#7b3294","#c2a5cf","#a6dba0","#008837"],
-5: ["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],
-6: ["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],
-7: ["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],
-8: ["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],
-9: ["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],
-10: ["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],
-11: ["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]
-},PiYG: {
-3: ["#e9a3c9","#f7f7f7","#a1d76a"],
-4: ["#d01c8b","#f1b6da","#b8e186","#4dac26"],
-5: ["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],
-6: ["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],
-7: ["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],
-8: ["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],
-9: ["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],
-10: ["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],
-11: ["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]
-},RdBu: {
-3: ["#ef8a62","#f7f7f7","#67a9cf"],
-4: ["#ca0020","#f4a582","#92c5de","#0571b0"],
-5: ["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],
-6: ["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],
-7: ["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],
-8: ["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],
-9: ["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],
-10: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],
-11: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]
-},RdGy: {
-3: ["#ef8a62","#ffffff","#999999"],
-4: ["#ca0020","#f4a582","#bababa","#404040"],
-5: ["#ca0020","#f4a582","#ffffff","#bababa","#404040"],
-6: ["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],
-7: ["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],
-8: ["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],
-9: ["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],
-10: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],
-11: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]
-},RdYlBu: {
-3: ["#fc8d59","#ffffbf","#91bfdb"],
-4: ["#d7191c","#fdae61","#abd9e9","#2c7bb6"],
-5: ["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],
-6: ["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],
-7: ["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],
-8: ["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],
-9: ["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],
-10: ["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],
-11: ["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]
-},Spectral: {
-3: ["#fc8d59","#ffffbf","#99d594"],
-4: ["#d7191c","#fdae61","#abdda4","#2b83ba"],
-5: ["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],
-6: ["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],
-7: ["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],
-8: ["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],
-9: ["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],
-10: ["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],
-11: ["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]
-},RdYlGn: {
-3: ["#fc8d59","#ffffbf","#91cf60"],
-4: ["#d7191c","#fdae61","#a6d96a","#1a9641"],
-5: ["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],
-6: ["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],
-7: ["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],
-8: ["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],
-9: ["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],
-10: ["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],
-11: ["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]
-},Accent: {
-3: ["#7fc97f","#beaed4","#fdc086"],
-4: ["#7fc97f","#beaed4","#fdc086","#ffff99"],
-5: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],
-6: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],
-7: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],
-8: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]
-},Dark2: {
-3: ["#1b9e77","#d95f02","#7570b3"],
-4: ["#1b9e77","#d95f02","#7570b3","#e7298a"],
-5: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],
-6: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],
-7: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],
-8: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]
-},Paired: {
-3: ["#a6cee3","#1f78b4","#b2df8a"],
-4: ["#a6cee3","#1f78b4","#b2df8a","#33a02c"],
-5: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],
-6: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],
-7: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],
-8: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],
-9: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],
-10: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],
-11: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],
-12: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]
-},Pastel1: {
-3: ["#fbb4ae","#b3cde3","#ccebc5"],
-4: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],
-5: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],
-6: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],
-7: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],
-8: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],
-9: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]
-},Pastel2: {
-3: ["#b3e2cd","#fdcdac","#cbd5e8"],
-4: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],
-5: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],
-6: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],
-7: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],
-8: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]
-},Set1: {
-3: ["#e41a1c","#377eb8","#4daf4a"],
-4: ["#e41a1c","#377eb8","#4daf4a","#984ea3"],
-5: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],
-6: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],
-7: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],
-8: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],
-9: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]
-},Set2: {
-3: ["#66c2a5","#fc8d62","#8da0cb"],
-4: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],
-5: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],
-6: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],
-7: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],
-8: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]
-},Set3: {
-3: ["#8dd3c7","#ffffb3","#bebada"],
-4: ["#8dd3c7","#ffffb3","#bebada","#fb8072"],
-5: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],
-6: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],
-7: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],
-8: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],
-9: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],
-10: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],
-11: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],
-12: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]
-}};
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/core.js b/ecomp-portal-BE/war/static/fusion/d3/js/core.js
deleted file mode 100644
index 912de8d8..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/core.js
+++ /dev/null
@@ -1,122 +0,0 @@
-
-var nv = window.nv || {};
-
-
-nv.version = '1.1.13b';
-nv.dev = true //set false when in production
-
-window.nv = nv;
-
-nv.tooltip = {}; // For the tooltip system
-nv.utils = nv.utils || {}; // Utility subsystem
-nv.models = {}; //stores all the possible models/components
-nv.charts = {}; //stores all the ready to use charts
-nv.graphs = []; //stores all the graphs currently on the page
-nv.logs = {}; //stores some statistics and potential error messages
-
-nv.dispatch = d3.dispatch('render_start', 'render_end');
-
-// *************************************************************************
-// Development render timers - disabled if dev = false
-
-if (nv.dev) {
- nv.dispatch.on('render_start', function(e) {
- nv.logs.startTime = +new Date();
- });
-
- nv.dispatch.on('render_end', function(e) {
- nv.logs.endTime = +new Date();
- nv.logs.totalTime = nv.logs.endTime - nv.logs.startTime;
- nv.log('total', nv.logs.totalTime); // used for development, to keep track of graph generation times
- });
-}
-
-// ********************************************
-// Public Core NV functions
-
-// Logs all arguments, and returns the last so you can test things in place
-// Note: in IE8 console.log is an object not a function, and if modernizr is used
-// then calling Function.prototype.bind with with anything other than a function
-// causes a TypeError to be thrown.
-nv.log = function() {
- if (nv.dev && console.log && console.log.apply)
- console.log.apply(console, arguments)
- else if (nv.dev && typeof console.log == "function" && Function.prototype.bind) {
- var log = Function.prototype.bind.call(console.log, console);
- log.apply(console, arguments);
- }
- return arguments[arguments.length - 1];
-};
-
-
-nv.render = function render(step) {
- step = step || 1; // number of graphs to generate in each timeout loop
-
- nv.render.active = true;
- nv.dispatch.render_start();
-
- setTimeout(function() {
- var chart, graph;
-
- for (var i = 0; i < step && (graph = nv.render.queue[i]); i++) {
- chart = graph.generate();
- if (typeof graph.callback == typeof(Function)) graph.callback(chart);
- nv.graphs.push(chart);
- }
-
- nv.render.queue.splice(0, i);
-
- if (nv.render.queue.length) setTimeout(arguments.callee, 0);
- else { nv.render.active = false; nv.dispatch.render_end(); }
- }, 0);
-};
-
-nv.render.active = false;
-nv.render.queue = [];
-
-nv.addGraph = function(obj) {
- if (typeof arguments[0] === typeof(Function))
- obj = {generate: arguments[0], callback: arguments[1]};
-
- nv.render.queue.push(obj);
-
- if (!nv.render.active) nv.render();
-};
-
-nv.identity = function(d) { return d; };
-
-nv.strip = function(s) { return s.replace(/(\s|&)/g,''); };
-
-function daysInMonth(month,year) {
- return (new Date(year, month+1, 0)).getDate();
-}
-
-function d3_time_range(floor, step, number) {
- return function(t0, t1, dt) {
- var time = floor(t0), times = [];
- if (time < t0) step(time);
- if (dt > 1) {
- while (time < t1) {
- var date = new Date(+time);
- if ((number(date) % dt === 0)) times.push(date);
- step(time);
- }
- } else {
- while (time < t1) { times.push(new Date(+time)); step(time); }
- }
- return times;
- };
-}
-
-d3.time.monthEnd = function(date) {
- return new Date(date.getFullYear(), date.getMonth(), 0);
-};
-
-d3.time.monthEnds = d3_time_range(d3.time.monthEnd, function(date) {
- date.setUTCDate(date.getUTCDate() + 1);
- date.setDate(daysInMonth(date.getMonth() + 1, date.getFullYear()));
- }, function(date) {
- return date.getMonth();
- }
-);
-
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/crossfilter.js b/ecomp-portal-BE/war/static/fusion/d3/js/crossfilter.js
deleted file mode 100644
index 1aaabca2..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/crossfilter.js
+++ /dev/null
@@ -1,1180 +0,0 @@
-(function(exports){
-crossfilter.version = "1.0.3";
-function crossfilter_identity(d) {
- return d;
-}
-crossfilter.permute = permute;
-
-function permute(array, index) {
- for (var i = 0, n = index.length, copy = new Array(n); i < n; ++i) {
- copy[i] = array[index[i]];
- }
- return copy;
-}
-var bisect = crossfilter.bisect = bisect_by(crossfilter_identity);
-
-bisect.by = bisect_by;
-
-function bisect_by(f) {
-
- // Locate the insertion point for x in a to maintain sorted order. The
- // arguments lo and hi may be used to specify a subset of the array which
- // should be considered; by default the entire array is used. If x is already
- // present in a, the insertion point will be before (to the left of) any
- // existing entries. The return value is suitable for use as the first
- // argument to `array.splice` assuming that a is already sorted.
- //
- // The returned insertion point i partitions the array a into two halves so
- // that all v < x for v in a[lo:i] for the left side and all v >= x for v in
- // a[i:hi] for the right side.
- function bisectLeft(a, x, lo, hi) {
- while (lo < hi) {
- var mid = lo + hi >> 1;
- if (f(a[mid]) < x) lo = mid + 1;
- else hi = mid;
- }
- return lo;
- }
-
- // Similar to bisectLeft, but returns an insertion point which comes after (to
- // the right of) any existing entries of x in a.
- //
- // The returned insertion point i partitions the array into two halves so that
- // all v <= x for v in a[lo:i] for the left side and all v > x for v in
- // a[i:hi] for the right side.
- function bisectRight(a, x, lo, hi) {
- while (lo < hi) {
- var mid = lo + hi >> 1;
- if (x < f(a[mid])) hi = mid;
- else lo = mid + 1;
- }
- return lo;
- }
-
- bisectRight.right = bisectRight;
- bisectRight.left = bisectLeft;
- return bisectRight;
-}
-var heap = crossfilter.heap = heap_by(crossfilter_identity);
-
-heap.by = heap_by;
-
-function heap_by(f) {
-
- // Builds a binary heap within the specified array a[lo:hi]. The heap has the
- // property such that the parent a[lo+i] is always less than or equal to its
- // two children: a[lo+2*i+1] and a[lo+2*i+2].
- function heap(a, lo, hi) {
- var n = hi - lo,
- i = (n >>> 1) + 1;
- while (--i > 0) sift(a, i, n, lo);
- return a;
- }
-
- // Sorts the specified array a[lo:hi] in descending order, assuming it is
- // already a heap.
- function sort(a, lo, hi) {
- var n = hi - lo,
- t;
- while (--n > 0) t = a[lo], a[lo] = a[lo + n], a[lo + n] = t, sift(a, 1, n, lo);
- return a;
- }
-
- // Sifts the element a[lo+i-1] down the heap, where the heap is the contiguous
- // slice of array a[lo:lo+n]. This method can also be used to update the heap
- // incrementally, without incurring the full cost of reconstructing the heap.
- function sift(a, i, n, lo) {
- var d = a[--lo + i],
- x = f(d),
- child;
- while ((child = i << 1) <= n) {
- if (child < n && f(a[lo + child]) > f(a[lo + child + 1])) child++;
- if (x <= f(a[lo + child])) break;
- a[lo + i] = a[lo + child];
- i = child;
- }
- a[lo + i] = d;
- }
-
- heap.sort = sort;
- return heap;
-}
-var heapselect = crossfilter.heapselect = heapselect_by(crossfilter_identity);
-
-heapselect.by = heapselect_by;
-
-function heapselect_by(f) {
- var heap = heap_by(f);
-
- // Returns a new array containing the top k elements in the array a[lo:hi].
- // The returned array is not sorted, but maintains the heap property. If k is
- // greater than hi - lo, then fewer than k elements will be returned. The
- // order of elements in a is unchanged by this operation.
- function heapselect(a, lo, hi, k) {
- var queue = new Array(k = Math.min(hi - lo, k)),
- min,
- i,
- x,
- d;
-
- for (i = 0; i < k; ++i) queue[i] = a[lo++];
- heap(queue, 0, k);
-
- if (lo < hi) {
- min = f(queue[0]);
- do {
- if (x = f(d = a[lo]) > min) {
- queue[0] = d;
- min = f(heap(queue, 0, k)[0]);
- }
- } while (++lo < hi);
- }
-
- return queue;
- }
-
- return heapselect;
-}
-var insertionsort = crossfilter.insertionsort = insertionsort_by(crossfilter_identity);
-
-insertionsort.by = insertionsort_by;
-
-function insertionsort_by(f) {
-
- function insertionsort(a, lo, hi) {
- for (var i = lo + 1; i < hi; ++i) {
- for (var j = i, t = a[i], x = f(t); j > lo && f(a[j - 1]) > x; --j) {
- a[j] = a[j - 1];
- }
- a[j] = t;
- }
- return a;
- }
-
- return insertionsort;
-}
-// Algorithm designed by Vladimir Yaroslavskiy.
-// Implementation based on the Dart project; see lib/dart/LICENSE for details.
-
-var quicksort = crossfilter.quicksort = quicksort_by(crossfilter_identity);
-
-quicksort.by = quicksort_by;
-
-function quicksort_by(f) {
- var insertionsort = insertionsort_by(f);
-
- function sort(a, lo, hi) {
- return (hi - lo < quicksort_sizeThreshold
- ? insertionsort
- : quicksort)(a, lo, hi);
- }
-
- function quicksort(a, lo, hi) {
-
- // Compute the two pivots by looking at 5 elements.
- var sixth = (hi - lo) / 6 | 0,
- i1 = lo + sixth,
- i5 = hi - 1 - sixth,
- i3 = lo + hi - 1 >> 1, // The midpoint.
- i2 = i3 - sixth,
- i4 = i3 + sixth;
-
- var e1 = a[i1], x1 = f(e1),
- e2 = a[i2], x2 = f(e2),
- e3 = a[i3], x3 = f(e3),
- e4 = a[i4], x4 = f(e4),
- e5 = a[i5], x5 = f(e5);
-
- var t;
-
- // Sort the selected 5 elements using a sorting network.
- if (x1 > x2) t = e1, e1 = e2, e2 = t, t = x1, x1 = x2, x2 = t;
- if (x4 > x5) t = e4, e4 = e5, e5 = t, t = x4, x4 = x5, x5 = t;
- if (x1 > x3) t = e1, e1 = e3, e3 = t, t = x1, x1 = x3, x3 = t;
- if (x2 > x3) t = e2, e2 = e3, e3 = t, t = x2, x2 = x3, x3 = t;
- if (x1 > x4) t = e1, e1 = e4, e4 = t, t = x1, x1 = x4, x4 = t;
- if (x3 > x4) t = e3, e3 = e4, e4 = t, t = x3, x3 = x4, x4 = t;
- if (x2 > x5) t = e2, e2 = e5, e5 = t, t = x2, x2 = x5, x5 = t;
- if (x2 > x3) t = e2, e2 = e3, e3 = t, t = x2, x2 = x3, x3 = t;
- if (x4 > x5) t = e4, e4 = e5, e5 = t, t = x4, x4 = x5, x5 = t;
-
- var pivot1 = e2, pivotValue1 = x2,
- pivot2 = e4, pivotValue2 = x4;
-
- // e2 and e4 have been saved in the pivot variables. They will be written
- // back, once the partitioning is finished.
- a[i1] = e1;
- a[i2] = a[lo];
- a[i3] = e3;
- a[i4] = a[hi - 1];
- a[i5] = e5;
-
- var less = lo + 1, // First element in the middle partition.
- great = hi - 2; // Last element in the middle partition.
-
- // Note that for value comparison, <, <=, >= and > coerce to a primitive via
- // Object.prototype.valueOf; == and === do not, so in order to be consistent
- // with natural order (such as for Date objects), we must do two compares.
- var pivotsEqual = pivotValue1 <= pivotValue2 && pivotValue1 >= pivotValue2;
- if (pivotsEqual) {
-
- // Degenerated case where the partitioning becomes a dutch national flag
- // problem.
- //
- // [ | < pivot | == pivot | unpartitioned | > pivot | ]
- // ^ ^ ^ ^ ^
- // left less k great right
- //
- // a[left] and a[right] are undefined and are filled after the
- // partitioning.
- //
- // Invariants:
- // 1) for x in ]left, less[ : x < pivot.
- // 2) for x in [less, k[ : x == pivot.
- // 3) for x in ]great, right[ : x > pivot.
- for (var k = less; k <= great; ++k) {
- var ek = a[k], xk = f(ek);
- if (xk < pivotValue1) {
- if (k !== less) {
- a[k] = a[less];
- a[less] = ek;
- }
- ++less;
- } else if (xk > pivotValue1) {
-
- // Find the first element <= pivot in the range [k - 1, great] and
- // put [:ek:] there. We know that such an element must exist:
- // When k == less, then el3 (which is equal to pivot) lies in the
- // interval. Otherwise a[k - 1] == pivot and the search stops at k-1.
- // Note that in the latter case invariant 2 will be violated for a
- // short amount of time. The invariant will be restored when the
- // pivots are put into their final positions.
- while (true) {
- var greatValue = f(a[great]);
- if (greatValue > pivotValue1) {
- great--;
- // This is the only location in the while-loop where a new
- // iteration is started.
- continue;
- } else if (greatValue < pivotValue1) {
- // Triple exchange.
- a[k] = a[less];
- a[less++] = a[great];
- a[great--] = ek;
- break;
- } else {
- a[k] = a[great];
- a[great--] = ek;
- // Note: if great < k then we will exit the outer loop and fix
- // invariant 2 (which we just violated).
- break;
- }
- }
- }
- }
- } else {
-
- // We partition the list into three parts:
- // 1. < pivot1
- // 2. >= pivot1 && <= pivot2
- // 3. > pivot2
- //
- // During the loop we have:
- // [ | < pivot1 | >= pivot1 && <= pivot2 | unpartitioned | > pivot2 | ]
- // ^ ^ ^ ^ ^
- // left less k great right
- //
- // a[left] and a[right] are undefined and are filled after the
- // partitioning.
- //
- // Invariants:
- // 1. for x in ]left, less[ : x < pivot1
- // 2. for x in [less, k[ : pivot1 <= x && x <= pivot2
- // 3. for x in ]great, right[ : x > pivot2
- for (var k = less; k <= great; k++) {
- var ek = a[k], xk = f(ek);
- if (xk < pivotValue1) {
- if (k !== less) {
- a[k] = a[less];
- a[less] = ek;
- }
- ++less;
- } else {
- if (xk > pivotValue2) {
- while (true) {
- var greatValue = f(a[great]);
- if (greatValue > pivotValue2) {
- great--;
- if (great < k) break;
- // This is the only location inside the loop where a new
- // iteration is started.
- continue;
- } else {
- // a[great] <= pivot2.
- if (greatValue < pivotValue1) {
- // Triple exchange.
- a[k] = a[less];
- a[less++] = a[great];
- a[great--] = ek;
- } else {
- // a[great] >= pivot1.
- a[k] = a[great];
- a[great--] = ek;
- }
- break;
- }
- }
- }
- }
- }
- }
-
- // Move pivots into their final positions.
- // We shrunk the list from both sides (a[left] and a[right] have
- // meaningless values in them) and now we move elements from the first
- // and third partition into these locations so that we can store the
- // pivots.
- a[lo] = a[less - 1];
- a[less - 1] = pivot1;
- a[hi - 1] = a[great + 1];
- a[great + 1] = pivot2;
-
- // The list is now partitioned into three partitions:
- // [ < pivot1 | >= pivot1 && <= pivot2 | > pivot2 ]
- // ^ ^ ^ ^
- // left less great right
-
- // Recursive descent. (Don't include the pivot values.)
- sort(a, lo, less - 1);
- sort(a, great + 2, hi);
-
- if (pivotsEqual) {
- // All elements in the second partition are equal to the pivot. No
- // need to sort them.
- return a;
- }
-
- // In theory it should be enough to call _doSort recursively on the second
- // partition.
- // The Android source however removes the pivot elements from the recursive
- // call if the second partition is too large (more than 2/3 of the list).
- if (less < i1 && great > i5) {
- var lessValue, greatValue;
- while ((lessValue = f(a[less])) <= pivotValue1 && lessValue >= pivotValue1) ++less;
- while ((greatValue = f(a[great])) <= pivotValue2 && greatValue >= pivotValue2) --great;
-
- // Copy paste of the previous 3-way partitioning with adaptions.
- //
- // We partition the list into three parts:
- // 1. == pivot1
- // 2. > pivot1 && < pivot2
- // 3. == pivot2
- //
- // During the loop we have:
- // [ == pivot1 | > pivot1 && < pivot2 | unpartitioned | == pivot2 ]
- // ^ ^ ^
- // less k great
- //
- // Invariants:
- // 1. for x in [ *, less[ : x == pivot1
- // 2. for x in [less, k[ : pivot1 < x && x < pivot2
- // 3. for x in ]great, * ] : x == pivot2
- for (var k = less; k <= great; k++) {
- var ek = a[k], xk = f(ek);
- if (xk <= pivotValue1 && xk >= pivotValue1) {
- if (k !== less) {
- a[k] = a[less];
- a[less] = ek;
- }
- less++;
- } else {
- if (xk <= pivotValue2 && xk >= pivotValue2) {
- while (true) {
- var greatValue = f(a[great]);
- if (greatValue <= pivotValue2 && greatValue >= pivotValue2) {
- great--;
- if (great < k) break;
- // This is the only location inside the loop where a new
- // iteration is started.
- continue;
- } else {
- // a[great] < pivot2.
- if (greatValue < pivotValue1) {
- // Triple exchange.
- a[k] = a[less];
- a[less++] = a[great];
- a[great--] = ek;
- } else {
- // a[great] == pivot1.
- a[k] = a[great];
- a[great--] = ek;
- }
- break;
- }
- }
- }
- }
- }
- }
-
- // The second partition has now been cleared of pivot elements and looks
- // as follows:
- // [ * | > pivot1 && < pivot2 | * ]
- // ^ ^
- // less great
- // Sort the second partition using recursive descent.
-
- // The second partition looks as follows:
- // [ * | >= pivot1 && <= pivot2 | * ]
- // ^ ^
- // less great
- // Simply sort it by recursive descent.
-
- return sort(a, less, great + 1);
- }
-
- return sort;
-}
-
-var quicksort_sizeThreshold = 32;
-var crossfilter_array8 = crossfilter_arrayUntyped,
- crossfilter_array16 = crossfilter_arrayUntyped,
- crossfilter_array32 = crossfilter_arrayUntyped,
- crossfilter_arrayLengthen = crossfilter_identity,
- crossfilter_arrayWiden = crossfilter_identity;
-
-if (typeof Uint8Array !== "undefined") {
- crossfilter_array8 = function(n) { return new Uint8Array(n); };
- crossfilter_array16 = function(n) { return new Uint16Array(n); };
- crossfilter_array32 = function(n) { return new Uint32Array(n); };
-
- crossfilter_arrayLengthen = function(array, length) {
- var copy = new array.constructor(length);
- copy.set(array);
- return copy;
- };
-
- crossfilter_arrayWiden = function(array, width) {
- var copy;
- switch (width) {
- case 16: copy = crossfilter_array16(array.length); break;
- case 32: copy = crossfilter_array32(array.length); break;
- default: throw new Error("invalid array width!");
- }
- copy.set(array);
- return copy;
- };
-}
-
-function crossfilter_arrayUntyped(n) {
- return new Array(n);
-}
-function crossfilter_filterExact(bisect, value) {
- return function(values) {
- var n = values.length;
- return [bisect.left(values, value, 0, n), bisect.right(values, value, 0, n)];
- };
-}
-
-function crossfilter_filterRange(bisect, range) {
- var min = range[0],
- max = range[1];
- return function(values) {
- var n = values.length;
- return [bisect.left(values, min, 0, n), bisect.left(values, max, 0, n)];
- };
-}
-
-function crossfilter_filterAll(values) {
- return [0, values.length];
-}
-function crossfilter_null() {
- return null;
-}
-function crossfilter_zero() {
- return 0;
-}
-function crossfilter_reduceIncrement(p) {
- return p + 1;
-}
-
-function crossfilter_reduceDecrement(p) {
- return p - 1;
-}
-
-function crossfilter_reduceAdd(f) {
- return function(p, v) {
- return p + +f(v);
- };
-}
-
-function crossfilter_reduceSubtract(f) {
- return function(p, v) {
- return p - f(v);
- };
-}
-exports.crossfilter = crossfilter;
-
-function crossfilter() {
- var crossfilter = {
- add: add,
- dimension: dimension,
- groupAll: groupAll,
- size: size
- };
-
- var data = [], // the records
- n = 0, // the number of records; data.length
- m = 0, // number of dimensions in use
- M = 8, // number of dimensions that can fit in `filters`
- filters = crossfilter_array8(0), // M bits per record; 1 is filtered out
- filterListeners = [], // when the filters change
- dataListeners = []; // when data is added
-
- // Adds the specified new records to this crossfilter.
- function add(newData) {
- var n0 = n,
- n1 = newData.length;
-
- // If there's actually new data to add…
- // Merge the new data into the existing data.
- // Lengthen the filter bitset to handle the new records.
- // Notify listeners (dimensions and groups) that new data is available.
- if (n1) {
- data = data.concat(newData);
- filters = crossfilter_arrayLengthen(filters, n += n1);
- dataListeners.forEach(function(l) { l(newData, n0, n1); });
- }
-
- return crossfilter;
- }
-
- // Adds a new dimension with the specified value accessor function.
- function dimension(value) {
- var dimension = {
- filter: filter,
- filterExact: filterExact,
- filterRange: filterRange,
- filterAll: filterAll,
- top: top,
- group: group,
- groupAll: groupAll
- };
-
- var one = 1 << m++, // bit mask, e.g., 00001000
- zero = ~one, // inverted one, e.g., 11110111
- values, // sorted, cached array
- index, // value rank ↦ object id
- newValues, // temporary array storing newly-added values
- newIndex, // temporary array storing newly-added index
- sort = quicksort_by(function(i) { return newValues[i]; }),
- refilter = crossfilter_filterAll, // for recomputing filter
- indexListeners = [], // when data is added
- lo0 = 0,
- hi0 = 0;
-
- // Updating a dimension is a two-stage process. First, we must update the
- // associated filters for the newly-added records. Once all dimensions have
- // updated their filters, the groups are notified to update.
- dataListeners.unshift(preAdd);
- dataListeners.push(postAdd);
-
- // Incorporate any existing data into this dimension, and make sure that the
- // filter bitset is wide enough to handle the new dimension.
- if (m > M) filters = crossfilter_arrayWiden(filters, M <<= 1);
- preAdd(data, 0, n);
- postAdd(data, 0, n);
-
- // Incorporates the specified new records into this dimension.
- // This function is responsible for updating filters, values, and index.
- function preAdd(newData, n0, n1) {
-
- // Permute new values into natural order using a sorted index.
- newValues = newData.map(value);
- newIndex = sort(crossfilter_range(n1), 0, n1);
- newValues = permute(newValues, newIndex);
-
- // Bisect newValues to determine which new records are selected.
- var bounds = refilter(newValues), lo1 = bounds[0], hi1 = bounds[1], i;
- for (i = 0; i < lo1; ++i) filters[newIndex[i] + n0] |= one;
- for (i = hi1; i < n1; ++i) filters[newIndex[i] + n0] |= one;
-
- // If this dimension previously had no data, then we don't need to do the
- // more expensive merge operation; use the new values and index as-is.
- if (!n0) {
- values = newValues;
- index = newIndex;
- lo0 = lo1;
- hi0 = hi1;
- return;
- }
-
- var oldValues = values,
- oldIndex = index,
- i0 = 0,
- i1 = 0;
-
- // Otherwise, create new arrays into which to merge new and old.
- values = new Array(n);
- index = crossfilter_index(n, n);
-
- // Merge the old and new sorted values, and old and new index.
- for (i = 0; i0 < n0 && i1 < n1; ++i) {
- if (oldValues[i0] < newValues[i1]) {
- values[i] = oldValues[i0];
- index[i] = oldIndex[i0++];
- } else {
- values[i] = newValues[i1];
- index[i] = newIndex[i1++] + n0;
- }
- }
-
- // Add any remaining old values.
- for (; i0 < n0; ++i0, ++i) {
- values[i] = oldValues[i0];
- index[i] = oldIndex[i0];
- }
-
- // Add any remaining new values.
- for (; i1 < n1; ++i1, ++i) {
- values[i] = newValues[i1];
- index[i] = newIndex[i1] + n0;
- }
-
- // Bisect again to recompute lo0 and hi0.
- bounds = refilter(values), lo0 = bounds[0], hi0 = bounds[1];
- }
-
- // When all filters have updated, notify index listeners of the new values.
- function postAdd(newData, n0, n1) {
- indexListeners.forEach(function(l) { l(newValues, newIndex, n0, n1); });
- newValues = newIndex = null;
- }
-
- // Updates the selected values based on the specified bounds [lo, hi].
- // This implementation is used by all the public filter methods.
- function filterIndex(bounds) {
- var i,
- j,
- k,
- lo1 = bounds[0],
- hi1 = bounds[1],
- added = [],
- removed = [];
-
- // Fast incremental update based on previous lo index.
- if (lo1 < lo0) {
- for (i = lo1, j = Math.min(lo0, hi1); i < j; ++i) {
- filters[k = index[i]] ^= one;
- added.push(k);
- }
- } else if (lo1 > lo0) {
- for (i = lo0, j = Math.min(lo1, hi0); i < j; ++i) {
- filters[k = index[i]] ^= one;
- removed.push(k);
- }
- }
-
- // Fast incremental update based on previous hi index.
- if (hi1 > hi0) {
- for (i = Math.max(lo1, hi0), j = hi1; i < j; ++i) {
- filters[k = index[i]] ^= one;
- added.push(k);
- }
- } else if (hi1 < hi0) {
- for (i = Math.max(lo0, hi1), j = hi0; i < j; ++i) {
- filters[k = index[i]] ^= one;
- removed.push(k);
- }
- }
-
- lo0 = lo1;
- hi0 = hi1;
- filterListeners.forEach(function(l) { l(one, added, removed); });
- return dimension;
- }
-
- // Filters this dimension using the specified range, value, or null.
- // If the range is null, this is equivalent to filterAll.
- // If the range is an array, this is equivalent to filterRange.
- // Otherwise, this is equivalent to filterExact.
- function filter(range) {
- return range == null
- ? filterAll() : Array.isArray(range)
- ? filterRange(range)
- : filterExact(range);
- }
-
- // Filters this dimension to select the exact value.
- function filterExact(value) {
- return filterIndex((refilter = crossfilter_filterExact(bisect, value))(values));
- }
-
- // Filters this dimension to select the specified range [lo, hi].
- // The lower bound is inclusive, and the upper bound is exclusive.
- function filterRange(range) {
- return filterIndex((refilter = crossfilter_filterRange(bisect, range))(values));
- }
-
- // Clears any filters on this dimension.
- function filterAll() {
- return filterIndex((refilter = crossfilter_filterAll)(values));
- }
-
- // Returns the top K selected records, based on this dimension's order.
- // Note: observes this dimension's filter, unlike group and groupAll.
- function top(k) {
- var array = [],
- i = hi0,
- j;
-
- while (--i >= lo0 && k > 0) {
- if (!filters[j = index[i]]) {
- array.push(data[j]);
- --k;
- }
- }
-
- return array;
- }
-
- // Adds a new group to this dimension, using the specified key function.
- function group(key) {
- var group = {
- top: top,
- all: all,
- reduce: reduce,
- reduceCount: reduceCount,
- reduceSum: reduceSum,
- order: order,
- orderNatural: orderNatural,
- size: size
- };
-
- var groups, // array of {key, value}
- groupIndex, // object id ↦ group id
- groupWidth = 8,
- groupCapacity = crossfilter_capacity(groupWidth),
- k = 0, // cardinality
- select,
- heap,
- reduceAdd,
- reduceRemove,
- reduceInitial,
- update = crossfilter_null,
- reset = crossfilter_null,
- resetNeeded = true;
-
- if (arguments.length < 1) key = crossfilter_identity;
-
- // The group listens to the crossfilter for when any dimension changes, so
- // that it can update the associated reduce values. It must also listen to
- // the parent dimension for when data is added, and compute new keys.
- filterListeners.push(update);
- indexListeners.push(add);
-
- // Incorporate any existing data into the grouping.
- add(values, index, 0, n);
-
- // Incorporates the specified new values into this group.
- // This function is responsible for updating groups and groupIndex.
- function add(newValues, newIndex, n0, n1) {
- var oldGroups = groups,
- reIndex = crossfilter_index(k, groupCapacity),
- add = reduceAdd,
- initial = reduceInitial,
- k0 = k, // old cardinality
- i0 = 0, // index of old group
- i1 = 0, // index of new record
- j, // object id
- g0, // old group
- x0, // old key
- x1, // new key
- g, // group to add
- x; // key of group to add
-
- // If a reset is needed, we don't need to update the reduce values.
- if (resetNeeded) add = initial = crossfilter_null;
-
- // Reset the new groups (k is a lower bound).
- // Also, make sure that groupIndex exists and is long enough.
- groups = new Array(k), k = 0;
- groupIndex = k0 > 1 ? crossfilter_arrayLengthen(groupIndex, n) : crossfilter_index(n, groupCapacity);
-
- // Get the first old key (x0 of g0), if it exists.
- if (k0) x0 = (g0 = oldGroups[0]).key;
-
- // Find the first new key (x1), skipping NaN keys.
- while (i1 < n1 && !((x1 = key(newValues[i1])) >= x1)) ++i1;
-
- // While new keys remain…
- while (i1 < n1) {
-
- // Determine the lesser of the two current keys; new and old.
- // If there are no old keys remaining, then always add the new key.
- if (g0 && x0 <= x1) {
- g = g0, x = x0;
-
- // Record the new index of the old group.
- reIndex[i0] = k;
-
- // Retrieve the next old key.
- if (g0 = oldGroups[++i0]) x0 = g0.key;
- } else {
- g = {key: x1, value: initial()}, x = x1;
- }
-
- // Add the lesser group.
- groups[k] = g;
-
- // Add any selected records belonging to the added group, while
- // advancing the new key and populating the associated group index.
- while (!(x1 > x)) {
- groupIndex[j = newIndex[i1] + n0] = k;
- if (!(filters[j] & zero)) g.value = add(g.value, data[j]);
- if (++i1 >= n1) break;
- x1 = key(newValues[i1]);
- }
-
- groupIncrement();
- }
-
- // Add any remaining old groups that were greater than all new keys.
- // No incremental reduce is needed; these groups have no new records.
- // Also record the new index of the old group.
- while (i0 < k0) {
- groups[reIndex[i0] = k] = oldGroups[i0++];
- groupIncrement();
- }
-
- // If we added any new groups before any old groups,
- // update the group index of all the old records.
- if (k > i0) for (i0 = 0; i0 < n0; ++i0) {
- groupIndex[i0] = reIndex[groupIndex[i0]];
- }
-
- // Modify the update and reset behavior based on the cardinality.
- // If the cardinality is less than or equal to one, then the groupIndex
- // is not needed. If the cardinality is zero, then there are no records
- // and therefore no groups to update or reset. Note that we also must
- // change the registered listener to point to the new method.
- j = filterListeners.indexOf(update);
- if (k > 1) {
- update = updateMany;
- reset = resetMany;
- } else {
- if (k === 1) {
- update = updateOne;
- reset = resetOne;
- } else {
- update = crossfilter_null;
- reset = crossfilter_null;
- }
- groupIndex = null;
- }
- filterListeners[j] = update;
-
- // Count the number of added groups,
- // and widen the group index as needed.
- function groupIncrement() {
- if (++k === groupCapacity) {
- reIndex = crossfilter_arrayWiden(reIndex, groupWidth <<= 1);
- groupIndex = crossfilter_arrayWiden(groupIndex, groupWidth);
- groupCapacity = crossfilter_capacity(groupWidth);
- }
- }
- }
-
- // Reduces the specified selected or deselected records.
- // This function is only used when the cardinality is greater than 1.
- function updateMany(filterOne, added, removed) {
- if (filterOne === one || resetNeeded) return;
-
- var i,
- k,
- n,
- g;
-
- // Add the added values.
- for (i = 0, n = added.length; i < n; ++i) {
- if (!(filters[k = added[i]] & zero)) {
- g = groups[groupIndex[k]];
- g.value = reduceAdd(g.value, data[k]);
- }
- }
-
- // Remove the removed values.
- for (i = 0, n = removed.length; i < n; ++i) {
- if ((filters[k = removed[i]] & zero) === filterOne) {
- g = groups[groupIndex[k]];
- g.value = reduceRemove(g.value, data[k]);
- }
- }
- }
-
- // Reduces the specified selected or deselected records.
- // This function is only used when the cardinality is 1.
- function updateOne(filterOne, added, removed) {
- if (filterOne === one || resetNeeded) return;
-
- var i,
- k,
- n,
- g = groups[0];
-
- // Add the added values.
- for (i = 0, n = added.length; i < n; ++i) {
- if (!(filters[k = added[i]] & zero)) {
- g.value = reduceAdd(g.value, data[k]);
- }
- }
-
- // Remove the removed values.
- for (i = 0, n = removed.length; i < n; ++i) {
- if ((filters[k = removed[i]] & zero) === filterOne) {
- g.value = reduceRemove(g.value, data[k]);
- }
- }
- }
-
- // Recomputes the group reduce values from scratch.
- // This function is only used when the cardinality is greater than 1.
- function resetMany() {
- var i,
- g;
-
- // Reset all group values.
- for (i = 0; i < k; ++i) {
- groups[i].value = reduceInitial();
- }
-
- // Add any selected records.
- for (i = 0; i < n; ++i) {
- if (!(filters[i] & zero)) {
- g = groups[groupIndex[i]];
- g.value = reduceAdd(g.value, data[i]);
- }
- }
- }
-
- // Recomputes the group reduce values from scratch.
- // This function is only used when the cardinality is 1.
- function resetOne() {
- var i,
- g = groups[0];
-
- // Reset the singleton group values.
- g.value = reduceInitial();
-
- // Add any selected records.
- for (i = 0; i < n; ++i) {
- if (!(filters[i] & zero)) {
- g.value = reduceAdd(g.value, data[i]);
- }
- }
- }
-
- // Returns the array of group values, in the dimension's natural order.
- function all() {
- if (resetNeeded) reset(), resetNeeded = false;
- return groups;
- }
-
- // Returns a new array containing the top K group values, in reduce order.
- function top(k) {
- var top = select(all(), 0, groups.length, k);
- return heap.sort(top, 0, top.length);
- }
-
- // Sets the reduce behavior for this group to use the specified functions.
- // This method lazily recomputes the reduce values, waiting until needed.
- function reduce(add, remove, initial) {
- reduceAdd = add;
- reduceRemove = remove;
- reduceInitial = initial;
- resetNeeded = true;
- return group;
- }
-
- // A convenience method for reducing by count.
- function reduceCount() {
- return reduce(crossfilter_reduceIncrement, crossfilter_reduceDecrement, crossfilter_zero);
- }
-
- // A convenience method for reducing by sum(value).
- function reduceSum(value) {
- return reduce(crossfilter_reduceAdd(value), crossfilter_reduceSubtract(value), crossfilter_zero);
- }
-
- // Sets the reduce order, using the specified accessor.
- function order(value) {
- select = heapselect_by(valueOf);
- heap = heap_by(valueOf);
- function valueOf(d) { return value(d.value); }
- return group;
- }
-
- // A convenience method for natural ordering by reduce value.
- function orderNatural() {
- return order(crossfilter_identity);
- }
-
- // Returns the cardinality of this group, irrespective of any filters.
- function size() {
- return k;
- }
-
- return reduceCount().orderNatural();
- }
-
- // A convenience function for generating a singleton group.
- function groupAll() {
- var g = group(crossfilter_null), all = g.all;
- delete g.all;
- delete g.top;
- delete g.order;
- delete g.orderNatural;
- delete g.size;
- g.value = function() { return all()[0].value; };
- return g;
- }
-
- return dimension;
- }
-
- // A convenience method for groupAll on a dummy dimension.
- // This implementation can be optimized since it is always cardinality 1.
- function groupAll() {
- var group = {
- reduce: reduce,
- reduceCount: reduceCount,
- reduceSum: reduceSum,
- value: value
- };
-
- var reduceValue,
- reduceAdd,
- reduceRemove,
- reduceInitial,
- resetNeeded = true;
-
- // The group listens to the crossfilter for when any dimension changes, so
- // that it can update the reduce value. It must also listen to the parent
- // dimension for when data is added.
- filterListeners.push(update);
- dataListeners.push(add);
-
- // For consistency; actually a no-op since resetNeeded is true.
- add(data, 0, n);
-
- // Incorporates the specified new values into this group.
- function add(newData, n0, n1) {
- var i;
-
- if (resetNeeded) return;
-
- // Add the added values.
- for (i = n0; i < n; ++i) {
- if (!filters[i]) {
- reduceValue = reduceAdd(reduceValue, data[i]);
- }
- }
- }
-
- // Reduces the specified selected or deselected records.
- function update(filterOne, added, removed) {
- var i,
- k,
- n;
-
- if (resetNeeded) return;
-
- // Add the added values.
- for (i = 0, n = added.length; i < n; ++i) {
- if (!filters[k = added[i]]) {
- reduceValue = reduceAdd(reduceValue, data[k]);
- }
- }
-
- // Remove the removed values.
- for (i = 0, n = removed.length; i < n; ++i) {
- if (filters[k = removed[i]] === filterOne) {
- reduceValue = reduceRemove(reduceValue, data[k]);
- }
- }
- }
-
- // Recomputes the group reduce value from scratch.
- function reset() {
- var i;
-
- reduceValue = reduceInitial();
-
- for (i = 0; i < n; ++i) {
- if (!filters[i]) {
- reduceValue = reduceAdd(reduceValue, data[i]);
- }
- }
- }
-
- // Sets the reduce behavior for this group to use the specified functions.
- // This method lazily recomputes the reduce value, waiting until needed.
- function reduce(add, remove, initial) {
- reduceAdd = add;
- reduceRemove = remove;
- reduceInitial = initial;
- resetNeeded = true;
- return group;
- }
-
- // A convenience method for reducing by count.
- function reduceCount() {
- return reduce(crossfilter_reduceIncrement, crossfilter_reduceDecrement, crossfilter_zero);
- }
-
- // A convenience method for reducing by sum(value).
- function reduceSum(value) {
- return reduce(crossfilter_reduceAdd(value), crossfilter_reduceSubtract(value), crossfilter_zero);
- }
-
- // Returns the computed reduce value.
- function value() {
- if (resetNeeded) reset(), resetNeeded = false;
- return reduceValue;
- }
-
- return reduceCount();
- }
-
- // Returns the number of records in this crossfilter, irrespective of any filters.
- function size() {
- return n;
- }
-
- return arguments.length
- ? add(arguments[0])
- : crossfilter;
-}
-
-// Returns an array of size n, big enough to store ids up to m.
-function crossfilter_index(n, m) {
- return (m < 0x101
- ? crossfilter_array8 : m < 0x10001
- ? crossfilter_array16
- : crossfilter_array32)(n);
-}
-
-// Constructs a new array of size n, with sequential values from 0 to n - 1.
-function crossfilter_range(n) {
- var range = crossfilter_index(n, n);
- for (var i = -1; ++i < n;) range[i] = i;
- return range;
-}
-
-function crossfilter_capacity(w) {
- return w === 8
- ? 0x100 : w === 16
- ? 0x10000
- : 0x100000000;
-}
-})(this);
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/crossfilter.min.js b/ecomp-portal-BE/war/static/fusion/d3/js/crossfilter.min.js
deleted file mode 100644
index 981f0d64..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/crossfilter.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(a){function b(a){return a}function c(a,b){for(var c=0,d=b.length,e=new Array(d);c<d;++c)e[c]=a[b[c]];return e}function e(a){function b(b,c,d,e){while(d<e){var f=d+e>>1;a(b[f])<c?d=f+1:e=f}return d}function c(b,c,d,e){while(d<e){var f=d+e>>1;c<a(b[f])?e=f:d=f+1}return d}return c.right=c,c.left=b,c}function g(a){function b(a,b,c){var e=c-b,f=(e>>>1)+1;while(--f>0)d(a,f,e,b);return a}function c(a,b,c){var e=c-b,f;while(--e>0)f=a[b],a[b]=a[b+e],a[b+e]=f,d(a,1,e,b);return a}function d(b,c,d,e){var f=b[--e+c],g=a(f),h;while((h=c<<1)<=d){h<d&&a(b[e+h])>a(b[e+h+1])&&h++;if(g<=a(b[e+h]))break;b[e+c]=b[e+h],c=h}b[e+c]=f}return b.sort=c,b}function i(a){function c(c,d,e,f){var g=new Array(f=Math.min(e-d,f)),h,i,j,k;for(i=0;i<f;++i)g[i]=c[d++];b(g,0,f);if(d<e){h=a(g[0]);do if(j=a(k=c[d])>h)g[0]=k,h=a(b(g,0,f)[0]);while(++d<e)}return g}var b=g(a);return c}function k(a){function b(b,c,d){for(var e=c+1;e<d;++e){for(var f=e,g=b[e],h=a(g);f>c&&a(b[f-1])>h;--f)b[f]=b[f-1];b[f]=g}return b}return b}function m(a){function c(a,c,e){return(e-c<n?b:d)(a,c,e)}function d(b,d,e){var f=(e-d)/6|0,g=d+f,h=e-1-f,i=d+e-1>>1,j=i-f,k=i+f,l=b[g],m=a(l),n=b[j],o=a(n),p=b[i],q=a(p),r=b[k],s=a(r),t=b[h],u=a(t),v;m>o&&(v=l,l=n,n=v,v=m,m=o,o=v),s>u&&(v=r,r=t,t=v,v=s,s=u,u=v),m>q&&(v=l,l=p,p=v,v=m,m=q,q=v),o>q&&(v=n,n=p,p=v,v=o,o=q,q=v),m>s&&(v=l,l=r,r=v,v=m,m=s,s=v),q>s&&(v=p,p=r,r=v,v=q,q=s,s=v),o>u&&(v=n,n=t,t=v,v=o,o=u,u=v),o>q&&(v=n,n=p,p=v,v=o,o=q,q=v),s>u&&(v=r,r=t,t=v,v=s,s=u,u=v);var w=n,x=o,y=r,z=s;b[g]=l,b[j]=b[d],b[i]=p,b[k]=b[e-1],b[h]=t;var A=d+1,B=e-2,C=x<=z&&x>=z;if(C)for(var D=A;D<=B;++D){var E=b[D],F=a(E);if(F<x)D!==A&&(b[D]=b[A],b[A]=E),++A;else if(F>x)for(;;){var G=a(b[B]);if(G>x){B--;continue}if(G<x){b[D]=b[A],b[A++]=b[B],b[B--]=E;break}b[D]=b[B],b[B--]=E;break}}else for(var D=A;D<=B;D++){var E=b[D],F=a(E);if(F<x)D!==A&&(b[D]=b[A],b[A]=E),++A;else if(F>z)for(;;){var G=a(b[B]);if(G>z){B--;if(B<D)break;continue}G<x?(b[D]=b[A],b[A++]=b[B],b[B--]=E):(b[D]=b[B],b[B--]=E);break}}b[d]=b[A-1],b[A-1]=w,b[e-1]=b[B+1],b[B+1]=y,c(b,d,A-1),c(b,B+2,e);if(C)return b;if(A<g&&B>h){var H,G;while((H=a(b[A]))<=x&&H>=x)++A;while((G=a(b[B]))<=z&&G>=z)--B;for(var D=A;D<=B;D++){var E=b[D],F=a(E);if(F<=x&&F>=x)D!==A&&(b[D]=b[A],b[A]=E),A++;else if(F<=z&&F>=z)for(;;){var G=a(b[B]);if(G<=z&&G>=z){B--;if(B<D)break;continue}G<x?(b[D]=b[A],b[A++]=b[B],b[B--]=E):(b[D]=b[B],b[B--]=E);break}}}return c(b,A,B+1)}var b=k(a);return c}function t(a){return new Array(a)}function u(a,b){return function(c){var d=c.length;return[a.left(c,b,0,d),a.right(c,b,0,d)]}}function v(a,b){var c=b[0],d=b[1];return function(b){var e=b.length;return[a.left(b,c,0,e),a.left(b,d,0,e)]}}function w(a){return[0,a.length]}function x(){return null}function y(){return 0}function z(a){return a+1}function A(a){return a-1}function B(a){return function(b,c){return b+ +a(c)}}function C(a){return function(b,c){return b-a(c)}}function D(){function p(b){var c=f,d=b.length;return d&&(e=e.concat(b),k=r(k,f+=d),n.forEach(function(a){a(b,c,d)})),a}function q(a){function P(b,d,e){H=b.map(a),I=J(F(e),0,e),H=c(H,I);var g=K(H),h=g[0],i=g[1],j;for(j=0;j<h;++j)k[I[j]+d]|=p;for(j=i;j<e;++j)k[I[j]+d]|=p;if(!d){t=H,D=I,N=h,O=i;return}var l=t,m=D,n=0,o=0;t=new Array(f),D=E(f,f);for(j=0;n<d&&o<e;++j)l[n]<H[o]?(t[j]=l[n],D[j]=m[n++]):(t[j]=H[o],D[j]=I[o++]+d);for(;n<d;++n,++j)t[j]=l[n],D[j]=m[n];for(;o<e;++o,++j)t[j]=H[o],D[j]=I[o]+d;g=K(t),N=g[0],O=g[1]}function Q(a,b,c){L.forEach(function(a){a(H,I,b,c)}),H=I=null}function R(a){var b,c,d,e=a[0],f=a[1],g=[],h=[];if(e<N)for(b=e,c=Math.min(N,f);b<c;++b)k[d=D[b]]^=p,g.push(d);else if(e>N)for(b=N,c=Math.min(e,O);b<c;++b)k[d=D[b]]^=p,h.push(d);if(f>O)for(b=Math.max(e,O),c=f;b<c;++b)k[d=D[b]]^=p,g.push(d);else if(f<O)for(b=Math.max(N,f),c=O;b<c;++b)k[d=D[b]]^=p,h.push(d);return N=e,O=f,l.forEach(function(a){a(p,g,h)}),o}function S(a){return a==null?V():Array.isArray(a)?U(a):T(a)}function T(a){return R((K=u(d,a))(t))}function U(a){return R((K=v(d,a))(t))}function V(){return R((K=w)(t))}function W(a){var b=[],c=O,d;while(--c>=N&&a>0)k[d=D[c]]||(b.push(e[d]),--a);return b}function X(a){function K(b,c,g,i){function Q(){++n===m&&(p=s(p,j<<=1),h=s(h,j),m=G(j))}var o=d,p=E(n,m),t=v,u=F,w=n,y=0,z=0,A,B,C,D,K,L;J&&(t=u=x),d=new Array(n),n=0,h=w>1?r(h,f):E(f,m),w&&(C=(B=o[0]).key);while(z<i&&!((D=a(b[z]))>=D))++z;while(z<i){if(B&&C<=D){K=B,L=C,p[y]=n;if(B=o[++y])C=B.key}else K={key:D,value:u()},L=D;d[n]=K;while(!(D>L)){h[A=c[z]+g]=n,k[A]&q||(K.value=t(K.value,e[A]));if(++z>=i)break;D=a(b[z])}Q()}while(y<w)d[p[y]=n]=o[y++],Q();if(n>y)for(y=0;y<g;++y)h[y]=p[h[y]];A=l.indexOf(H),n>1?(H=M,I=O):(n===1?(H=N,I=P):(H=x,I=x),h=null),l[A]=H}function M(a,b,c){if(a===p||J)return;var f,g,i,j;for(f=0,i=b.length;f<i;++f)k[g=b[f]]&q||(j=d[h[g]],j.value=v(j.value,e[g]));for(f=0,i=c.length;f<i;++f)(k[g=c[f]]&q)===a&&(j=d[h[g]],j.value=w(j.value,e[g]))}function N(a,b,c){if(a===p||J)return;var f,g,h,i=d[0];for(f=0,h=b.length;f<h;++f)k[g=b[f]]&q||(i.value=v(i.value,e[g]));for(f=0,h=c.length;f<h;++f)(k[g=c[f]]&q)===a&&(i.value=w(i.value,e[g]))}function O(){var a,b;for(a=0;a<n;++a)d[a].value=F();for(a=0;a<f;++a)k[a]&q||(b=d[h[a]],b.value=v(b.value,e[a]))}function P(){var a,b=d[0];b.value=F();for(a=0;a<f;++a)k[a]&q||(b.value=v(b.value,e[a]))}function Q(){return J&&(I(),J=!1),d}function R(a){var b=o(Q(),0,d.length,a);return u.sort(b,0,b.length)}function S(a,b,d){return v=a,w=b,F=d,J=!0,c}function T(){return S(z,A,y)}function U(a){return S(B(a),C(a),y)}function V(a){function b(b){return a(b.value)}return o=i(b),u=g(b),c}function W(){return V(b)}function X(){return n}var c={top:R,all:Q,reduce:S,reduceCount:T,reduceSum:U,order:V,orderNatural:W,size:X},d,h,j=8,m=G(j),n=0,o,u,v,w,F,H=x,I=x,J=!0;return arguments.length<1&&(a=b),l.push(H),L.push(K),K(t,D,0,f),T().orderNatural()}function Y(){var a=X(x),b=a.all;return delete a.all,delete a.top,delete a.order,delete a.orderNatural,delete a.size,a.value=function(){return b()[0].value},a}var o={filter:S,filterExact:T,filterRange:U,filterAll:V,top:W,group:X,groupAll:Y},p=1<<h++,q=~p,t,D,H,I,J=m(function(a){return H[a]}),K=w,L=[],N=0,O=0;return n.unshift(P),n.push(Q),h>j&&(k=s(k,j<<=1)),P(e,0,f),Q(e,0,f),o}function t(){function i(a,d,g){var i;if(h)return;for(i=d;i<f;++i)k[i]||(b=c(b,e[i]))}function j(a,f,g){var i,j,l;if(h)return;for(i=0,l=f.length;i<l;++i)k[j=f[i]]||(b=c(b,e[j]));for(i=0,l=g.length;i<l;++i)k[j=g[i]]===a&&(b=d(b,e[j]))}function m(){var a;b=g();for(a=0;a<f;++a)k[a]||(b=c(b,e[a]))}function o(b,e,f){return c=b,d=e,g=f,h=!0,a}function p(){return o(z,A,y)}function q(a){return o(B(a),C(a),y)}function r(){return h&&(m(),h=!1),b}var a={reduce:o,reduceCount:p,reduceSum:q,value:r},b,c,d,g,h=!0;return l.push(j),n.push(i),i(e,0,f),p()}function D(){return f}var a={add:p,dimension:q,groupAll:t,size:D},e=[],f=0,h=0,j=8,k=o(0),l=[],n=[];return arguments.length?p(arguments[0]):a}function E(a,b){return(b<257?o:b<65537?p:q)(a)}function F(a){var b=E(a,a);for(var c=-1;++c<a;)b[c]=c;return b}function G(a){return a===8?256:a===16?65536:4294967296}D.version="1.0.3",D.permute=c;var d=D.bisect=e(b);d.by=e;var f=D.heap=g(b);f.by=g;var h=D.heapselect=i(b);h.by=i;var j=D.insertionsort=k(b);j.by=k;var l=D.quicksort=m(b);l.by=m;var n=32,o=t,p=t,q=t,r=b,s=b;typeof Uint8Array!="undefined"&&(o=function(a){return new Uint8Array(a)},p=function(a){return new Uint16Array(a)},q=function(a){return new Uint32Array(a)},r=function(a,b){var c=new a.constructor(b);return c.set(a),c},s=function(a,b){var c;switch(b){case 16:c=p(a.length);break;case 32:c=q(a.length);break;default:throw new Error("invalid array width!")}return c.set(a),c}),a.crossfilter=D})(this); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/d3.geom.js b/ecomp-portal-BE/war/static/fusion/d3/js/d3.geom.js
deleted file mode 100644
index a19bb16e..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/d3.geom.js
+++ /dev/null
@@ -1,816 +0,0 @@
-(function(){d3.geom = {};
-/**
- * Computes a contour for a given input grid function using the <a
- * href="http://en.wikipedia.org/wiki/Marching_squares">marching
- * squares</a> algorithm. Returns the contour polygon as an array of points.
- *
- * @param grid a two-input function(x, y) that returns true for values
- * inside the contour and false for values outside the contour.
- * @param start an optional starting point [x, y] on the grid.
- * @returns polygon [[x1, y1], [x2, y2], …]
- */
-d3.geom.contour = function(grid, start) {
- var s = start || d3_geom_contourStart(grid), // starting point
- c = [], // contour polygon
- x = s[0], // current x position
- y = s[1], // current y position
- dx = 0, // next x direction
- dy = 0, // next y direction
- pdx = NaN, // previous x direction
- pdy = NaN, // previous y direction
- i = 0;
-
- do {
- // determine marching squares index
- i = 0;
- if (grid(x-1, y-1)) i += 1;
- if (grid(x, y-1)) i += 2;
- if (grid(x-1, y )) i += 4;
- if (grid(x, y )) i += 8;
-
- // determine next direction
- if (i == 6) {
- dx = pdy == -1 ? -1 : 1;
- dy = 0;
- } else if (i == 9) {
- dx = 0;
- dy = pdx == 1 ? -1 : 1;
- } else {
- dx = d3_geom_contourDx[i];
- dy = d3_geom_contourDy[i];
- }
-
- // update contour polygon
- if (dx != pdx && dy != pdy) {
- c.push([x, y]);
- pdx = dx;
- pdy = dy;
- }
-
- x += dx;
- y += dy;
- } while (s[0] != x || s[1] != y);
-
- return c;
-};
-
-// lookup tables for marching directions
-var d3_geom_contourDx = [1, 0, 1, 1,-1, 0,-1, 1,0, 0,0,0,-1, 0,-1,NaN],
- d3_geom_contourDy = [0,-1, 0, 0, 0,-1, 0, 0,1,-1,1,1, 0,-1, 0,NaN];
-
-function d3_geom_contourStart(grid) {
- var x = 0,
- y = 0;
-
- // search for a starting point; begin at origin
- // and proceed along outward-expanding diagonals
- while (true) {
- if (grid(x,y)) {
- return [x,y];
- }
- if (x == 0) {
- x = y + 1;
- y = 0;
- } else {
- x = x - 1;
- y = y + 1;
- }
- }
-}/**
- * Computes the 2D convex hull of a set of points using Graham's scanning
- * algorithm. The algorithm has been implemented as described in Cormen,
- * Leiserson, and Rivest's Introduction to Algorithms. The running time of
- * this algorithm is O(n log n), where n is the number of input points.
- *
- * @param vertices [[x1, y1], [x2, y2], …]
- * @returns polygon [[x1, y1], [x2, y2], …]
- */
-d3.geom.hull = function(vertices) {
- if (vertices.length < 3) return [];
-
- var len = vertices.length,
- plen = len - 1,
- points = [],
- stack = [],
- i, j, h = 0, x1, y1, x2, y2, u, v, a, sp;
-
- // find the starting ref point: leftmost point with the minimum y coord
- for (i=1; i<len; ++i) {
- if (vertices[i][1] < vertices[h][1]) {
- h = i;
- } else if (vertices[i][1] == vertices[h][1]) {
- h = (vertices[i][0] < vertices[h][0] ? i : h);
- }
- }
-
- // calculate polar angles from ref point and sort
- for (i=0; i<len; ++i) {
- if (i == h) continue;
- y1 = vertices[i][1] - vertices[h][1];
- x1 = vertices[i][0] - vertices[h][0];
- points.push({angle: Math.atan2(y1, x1), index: i});
- }
- points.sort(function(a, b) { return a.angle - b.angle; });
-
- // toss out duplicate angles
- a = points[0].angle;
- v = points[0].index;
- u = 0;
- for (i=1; i<plen; ++i) {
- j = points[i].index;
- if (a == points[i].angle) {
- // keep angle for point most distant from the reference
- x1 = vertices[v][0] - vertices[h][0];
- y1 = vertices[v][1] - vertices[h][1];
- x2 = vertices[j][0] - vertices[h][0];
- y2 = vertices[j][1] - vertices[h][1];
- if ((x1*x1 + y1*y1) >= (x2*x2 + y2*y2)) {
- points[i].index = -1;
- } else {
- points[u].index = -1;
- a = points[i].angle;
- u = i;
- v = j;
- }
- } else {
- a = points[i].angle;
- u = i;
- v = j;
- }
- }
-
- // initialize the stack
- stack.push(h);
- for (i=0, j=0; i<2; ++j) {
- if (points[j].index != -1) {
- stack.push(points[j].index);
- i++;
- }
- }
- sp = stack.length;
-
- // do graham's scan
- for (; j<plen; ++j) {
- if (points[j].index == -1) continue; // skip tossed out points
- while (!d3_geom_hullCCW(stack[sp-2], stack[sp-1], points[j].index, vertices)) {
- --sp;
- }
- stack[sp++] = points[j].index;
- }
-
- // construct the hull
- var poly = [];
- for (i=0; i<sp; ++i) {
- poly.push(vertices[stack[i]]);
- }
- return poly;
-}
-
-// are three points in counter-clockwise order?
-function d3_geom_hullCCW(i1, i2, i3, v) {
- var t, a, b, c, d, e, f;
- t = v[i1]; a = t[0]; b = t[1];
- t = v[i2]; c = t[0]; d = t[1];
- t = v[i3]; e = t[0]; f = t[1];
- return ((f-b)*(c-a) - (d-b)*(e-a)) > 0;
-}// Note: requires coordinates to be counterclockwise and convex!
-d3.geom.polygon = function(coordinates) {
-
- coordinates.area = function() {
- var i = 0,
- n = coordinates.length,
- a = coordinates[n - 1][0] * coordinates[0][1],
- b = coordinates[n - 1][1] * coordinates[0][0];
- while (++i < n) {
- a += coordinates[i - 1][0] * coordinates[i][1];
- b += coordinates[i - 1][1] * coordinates[i][0];
- }
- return (b - a) * .5;
- };
-
- coordinates.centroid = function(k) {
- var i = -1,
- n = coordinates.length - 1,
- x = 0,
- y = 0,
- a,
- b,
- c;
- if (!arguments.length) k = 1 / (6 * coordinates.area());
- while (++i < n) {
- a = coordinates[i];
- b = coordinates[i + 1];
- c = a[0] * b[1] - b[0] * a[1];
- x += (a[0] + b[0]) * c;
- y += (a[1] + b[1]) * c;
- }
- return [x * k, y * k];
- };
-
- // The Sutherland-Hodgman clipping algorithm.
- coordinates.clip = function(subject) {
- var input,
- i = -1,
- n = coordinates.length,
- j,
- m,
- a = coordinates[n - 1],
- b,
- c,
- d;
- while (++i < n) {
- input = subject.slice();
- subject.length = 0;
- b = coordinates[i];
- c = input[(m = input.length) - 1];
- j = -1;
- while (++j < m) {
- d = input[j];
- if (d3_geom_polygonInside(d, a, b)) {
- if (!d3_geom_polygonInside(c, a, b)) {
- subject.push(d3_geom_polygonIntersect(c, d, a, b));
- }
- subject.push(d);
- } else if (d3_geom_polygonInside(c, a, b)) {
- subject.push(d3_geom_polygonIntersect(c, d, a, b));
- }
- c = d;
- }
- a = b;
- }
- return subject;
- };
-
- return coordinates;
-};
-
-function d3_geom_polygonInside(p, a, b) {
- return (b[0] - a[0]) * (p[1] - a[1]) < (b[1] - a[1]) * (p[0] - a[0]);
-}
-
-// Intersect two infinite lines cd and ab.
-function d3_geom_polygonIntersect(c, d, a, b) {
- var x1 = c[0], x2 = d[0], x3 = a[0], x4 = b[0],
- y1 = c[1], y2 = d[1], y3 = a[1], y4 = b[1],
- x13 = x1 - x3,
- x21 = x2 - x1,
- x43 = x4 - x3,
- y13 = y1 - y3,
- y21 = y2 - y1,
- y43 = y4 - y3,
- ua = (x43 * y13 - y43 * x13) / (y43 * x21 - x43 * y21);
- return [x1 + ua * x21, y1 + ua * y21];
-}
-// Adapted from Nicolas Garcia Belmonte's JIT implementation:
-// http://blog.thejit.org/2010/02/12/voronoi-tessellation/
-// http://blog.thejit.org/assets/voronoijs/voronoi.js
-// See lib/jit/LICENSE for details.
-
-/**
- * @param vertices [[x1, y1], [x2, y2], …]
- * @returns polygons [[[x1, y1], [x2, y2], …], …]
- */
-d3.geom.voronoi = function(vertices) {
- var polygons = vertices.map(function() { return []; });
-
- // Note: we expect the caller to clip the polygons, if needed.
- d3_voronoi_tessellate(vertices, function(e) {
- var s1,
- s2,
- x1,
- x2,
- y1,
- y2;
- if (e.a == 1 && e.b >= 0) {
- s1 = e.ep.r;
- s2 = e.ep.l;
- } else {
- s1 = e.ep.l;
- s2 = e.ep.r;
- }
- if (e.a == 1) {
- y1 = s1 ? s1.y : -1e6;
- x1 = e.c - e.b * y1;
- y2 = s2 ? s2.y : 1e6;
- x2 = e.c - e.b * y2;
- } else {
- x1 = s1 ? s1.x : -1e6;
- y1 = e.c - e.a * x1;
- x2 = s2 ? s2.x : 1e6;
- y2 = e.c - e.a * x2;
- }
- var v1 = [x1, y1],
- v2 = [x2, y2];
- polygons[e.region.l.index].push(v1, v2);
- polygons[e.region.r.index].push(v1, v2);
- });
-
- // Reconnect the polygon segments into counterclockwise loops.
- return polygons.map(function(polygon, i) {
- var cx = vertices[i][0],
- cy = vertices[i][1];
- polygon.forEach(function(v) {
- v.angle = Math.atan2(v[0] - cx, v[1] - cy);
- });
- return polygon.sort(function(a, b) {
- return a.angle - b.angle;
- }).filter(function(d, i) {
- return !i || (d.angle - polygon[i - 1].angle > 1e-10);
- });
- });
-};
-
-var d3_voronoi_opposite = {"l": "r", "r": "l"};
-
-function d3_voronoi_tessellate(vertices, callback) {
-
- var Sites = {
- list: vertices
- .map(function(v, i) {
- return {
- index: i,
- x: v[0],
- y: v[1]
- };
- })
- .sort(function(a, b) {
- return a.y < b.y ? -1
- : a.y > b.y ? 1
- : a.x < b.x ? -1
- : a.x > b.x ? 1
- : 0;
- }),
- bottomSite: null
- };
-
- var EdgeList = {
- list: [],
- leftEnd: null,
- rightEnd: null,
-
- init: function() {
- EdgeList.leftEnd = EdgeList.createHalfEdge(null, "l");
- EdgeList.rightEnd = EdgeList.createHalfEdge(null, "l");
- EdgeList.leftEnd.r = EdgeList.rightEnd;
- EdgeList.rightEnd.l = EdgeList.leftEnd;
- EdgeList.list.unshift(EdgeList.leftEnd, EdgeList.rightEnd);
- },
-
- createHalfEdge: function(edge, side) {
- return {
- edge: edge,
- side: side,
- vertex: null,
- "l": null,
- "r": null
- };
- },
-
- insert: function(lb, he) {
- he.l = lb;
- he.r = lb.r;
- lb.r.l = he;
- lb.r = he;
- },
-
- leftBound: function(p) {
- var he = EdgeList.leftEnd;
- do {
- he = he.r;
- } while (he != EdgeList.rightEnd && Geom.rightOf(he, p));
- he = he.l;
- return he;
- },
-
- del: function(he) {
- he.l.r = he.r;
- he.r.l = he.l;
- he.edge = null;
- },
-
- right: function(he) {
- return he.r;
- },
-
- left: function(he) {
- return he.l;
- },
-
- leftRegion: function(he) {
- return he.edge == null
- ? Sites.bottomSite
- : he.edge.region[he.side];
- },
-
- rightRegion: function(he) {
- return he.edge == null
- ? Sites.bottomSite
- : he.edge.region[d3_voronoi_opposite[he.side]];
- }
- };
-
- var Geom = {
-
- bisect: function(s1, s2) {
- var newEdge = {
- region: {"l": s1, "r": s2},
- ep: {"l": null, "r": null}
- };
-
- var dx = s2.x - s1.x,
- dy = s2.y - s1.y,
- adx = dx > 0 ? dx : -dx,
- ady = dy > 0 ? dy : -dy;
-
- newEdge.c = s1.x * dx + s1.y * dy
- + (dx * dx + dy * dy) * .5;
-
- if (adx > ady) {
- newEdge.a = 1;
- newEdge.b = dy / dx;
- newEdge.c /= dx;
- } else {
- newEdge.b = 1;
- newEdge.a = dx / dy;
- newEdge.c /= dy;
- }
-
- return newEdge;
- },
-
- intersect: function(el1, el2) {
- var e1 = el1.edge,
- e2 = el2.edge;
- if (!e1 || !e2 || (e1.region.r == e2.region.r)) {
- return null;
- }
- var d = (e1.a * e2.b) - (e1.b * e2.a);
- if (Math.abs(d) < 1e-10) {
- return null;
- }
- var xint = (e1.c * e2.b - e2.c * e1.b) / d,
- yint = (e2.c * e1.a - e1.c * e2.a) / d,
- e1r = e1.region.r,
- e2r = e2.region.r,
- el,
- e;
- if ((e1r.y < e2r.y) ||
- (e1r.y == e2r.y && e1r.x < e2r.x)) {
- el = el1;
- e = e1;
- } else {
- el = el2;
- e = e2;
- }
- var rightOfSite = (xint >= e.region.r.x);
- if ((rightOfSite && (el.side == "l")) ||
- (!rightOfSite && (el.side == "r"))) {
- return null;
- }
- return {
- x: xint,
- y: yint
- };
- },
-
- rightOf: function(he, p) {
- var e = he.edge,
- topsite = e.region.r,
- rightOfSite = (p.x > topsite.x);
-
- if (rightOfSite && (he.side == "l")) {
- return 1;
- }
- if (!rightOfSite && (he.side == "r")) {
- return 0;
- }
- if (e.a == 1) {
- var dyp = p.y - topsite.y,
- dxp = p.x - topsite.x,
- fast = 0,
- above = 0;
-
- if ((!rightOfSite && (e.b < 0)) ||
- (rightOfSite && (e.b >= 0))) {
- above = fast = (dyp >= e.b * dxp);
- } else {
- above = ((p.x + p.y * e.b) > e.c);
- if (e.b < 0) {
- above = !above;
- }
- if (!above) {
- fast = 1;
- }
- }
- if (!fast) {
- var dxs = topsite.x - e.region.l.x;
- above = (e.b * (dxp * dxp - dyp * dyp)) <
- (dxs * dyp * (1 + 2 * dxp / dxs + e.b * e.b));
-
- if (e.b < 0) {
- above = !above;
- }
- }
- } else /* e.b == 1 */ {
- var yl = e.c - e.a * p.x,
- t1 = p.y - yl,
- t2 = p.x - topsite.x,
- t3 = yl - topsite.y;
-
- above = (t1 * t1) > (t2 * t2 + t3 * t3);
- }
- return he.side == "l" ? above : !above;
- },
-
- endPoint: function(edge, side, site) {
- edge.ep[side] = site;
- if (!edge.ep[d3_voronoi_opposite[side]]) return;
- callback(edge);
- },
-
- distance: function(s, t) {
- var dx = s.x - t.x,
- dy = s.y - t.y;
- return Math.sqrt(dx * dx + dy * dy);
- }
- };
-
- var EventQueue = {
- list: [],
-
- insert: function(he, site, offset) {
- he.vertex = site;
- he.ystar = site.y + offset;
- for (var i=0, list=EventQueue.list, l=list.length; i<l; i++) {
- var next = list[i];
- if (he.ystar > next.ystar ||
- (he.ystar == next.ystar &&
- site.x > next.vertex.x)) {
- continue;
- } else {
- break;
- }
- }
- list.splice(i, 0, he);
- },
-
- del: function(he) {
- for (var i=0, ls=EventQueue.list, l=ls.length; i<l && (ls[i] != he); ++i) {}
- ls.splice(i, 1);
- },
-
- empty: function() { return EventQueue.list.length == 0; },
-
- nextEvent: function(he) {
- for (var i=0, ls=EventQueue.list, l=ls.length; i<l; ++i) {
- if (ls[i] == he) return ls[i+1];
- }
- return null;
- },
-
- min: function() {
- var elem = EventQueue.list[0];
- return {
- x: elem.vertex.x,
- y: elem.ystar
- };
- },
-
- extractMin: function() {
- return EventQueue.list.shift();
- }
- };
-
- EdgeList.init();
- Sites.bottomSite = Sites.list.shift();
-
- var newSite = Sites.list.shift(), newIntStar;
- var lbnd, rbnd, llbnd, rrbnd, bisector;
- var bot, top, temp, p, v;
- var e, pm;
-
- while (true) {
- if (!EventQueue.empty()) {
- newIntStar = EventQueue.min();
- }
- if (newSite && (EventQueue.empty()
- || newSite.y < newIntStar.y
- || (newSite.y == newIntStar.y
- && newSite.x < newIntStar.x))) { //new site is smallest
- lbnd = EdgeList.leftBound(newSite);
- rbnd = EdgeList.right(lbnd);
- bot = EdgeList.rightRegion(lbnd);
- e = Geom.bisect(bot, newSite);
- bisector = EdgeList.createHalfEdge(e, "l");
- EdgeList.insert(lbnd, bisector);
- p = Geom.intersect(lbnd, bisector);
- if (p) {
- EventQueue.del(lbnd);
- EventQueue.insert(lbnd, p, Geom.distance(p, newSite));
- }
- lbnd = bisector;
- bisector = EdgeList.createHalfEdge(e, "r");
- EdgeList.insert(lbnd, bisector);
- p = Geom.intersect(bisector, rbnd);
- if (p) {
- EventQueue.insert(bisector, p, Geom.distance(p, newSite));
- }
- newSite = Sites.list.shift();
- } else if (!EventQueue.empty()) { //intersection is smallest
- lbnd = EventQueue.extractMin();
- llbnd = EdgeList.left(lbnd);
- rbnd = EdgeList.right(lbnd);
- rrbnd = EdgeList.right(rbnd);
- bot = EdgeList.leftRegion(lbnd);
- top = EdgeList.rightRegion(rbnd);
- v = lbnd.vertex;
- Geom.endPoint(lbnd.edge, lbnd.side, v);
- Geom.endPoint(rbnd.edge, rbnd.side, v);
- EdgeList.del(lbnd);
- EventQueue.del(rbnd);
- EdgeList.del(rbnd);
- pm = "l";
- if (bot.y > top.y) {
- temp = bot;
- bot = top;
- top = temp;
- pm = "r";
- }
- e = Geom.bisect(bot, top);
- bisector = EdgeList.createHalfEdge(e, pm);
- EdgeList.insert(llbnd, bisector);
- Geom.endPoint(e, d3_voronoi_opposite[pm], v);
- p = Geom.intersect(llbnd, bisector);
- if (p) {
- EventQueue.del(llbnd);
- EventQueue.insert(llbnd, p, Geom.distance(p, bot));
- }
- p = Geom.intersect(bisector, rrbnd);
- if (p) {
- EventQueue.insert(bisector, p, Geom.distance(p, bot));
- }
- } else {
- break;
- }
- }//end while
-
- for (lbnd = EdgeList.right(EdgeList.leftEnd);
- lbnd != EdgeList.rightEnd;
- lbnd = EdgeList.right(lbnd)) {
- callback(lbnd.edge);
- }
-}
-/**
-* @param vertices [[x1, y1], [x2, y2], …]
-* @returns triangles [[[x1, y1], [x2, y2], [x3, y3]], …]
- */
-d3.geom.delaunay = function(vertices) {
- var edges = vertices.map(function() { return []; }),
- triangles = [];
-
- // Use the Voronoi tessellation to determine Delaunay edges.
- d3_voronoi_tessellate(vertices, function(e) {
- edges[e.region.l.index].push(vertices[e.region.r.index]);
- });
-
- // Reconnect the edges into counterclockwise triangles.
- edges.forEach(function(edge, i) {
- var v = vertices[i],
- cx = v[0],
- cy = v[1];
- edge.forEach(function(v) {
- v.angle = Math.atan2(v[0] - cx, v[1] - cy);
- });
- edge.sort(function(a, b) {
- return a.angle - b.angle;
- });
- for (var j = 0, m = edge.length - 1; j < m; j++) {
- triangles.push([v, edge[j], edge[j + 1]]);
- }
- });
-
- return triangles;
-};
-/**
- * Constructs a new quadtree for the specified array of points. A quadtree is a
- * two-dimensional recursive spatial subdivision. This implementation uses
- * square partitions, dividing each square into four equally-sized squares. Each
- * point exists in a unique node; if multiple points are in the same position,
- * some points may be stored on internal nodes rather than leaf nodes. Quadtrees
- * can be used to accelerate various spatial operations, such as the Barnes-Hut
- * approximation for computing n-body forces, or collision detection.
- *
- * @param points [[x1, y1], [x2, y2], …]
- * @return quadtree root {left: boolean, nodes: […], point: [x, y]}
- */
-d3.geom.quadtree = function(points) {
- var p,
- i = -1,
- n = points.length;
-
- /* Compute bounds. */
- var x1 = Number.POSITIVE_INFINITY, y1 = x1,
- x2 = Number.NEGATIVE_INFINITY, y2 = x2;
- while (++i < n) {
- p = points[i];
- if (p[0] < x1) x1 = p[0];
- if (p[1] < y1) y1 = p[1];
- if (p[0] > x2) x2 = p[0];
- if (p[1] > y2) y2 = p[1];
- }
-
- /* Squarify the bounds. */
- var dx = x2 - x1,
- dy = y2 - y1;
- if (dx > dy) y2 = y1 + dx;
- else x2 = x1 + dy;
-
- /**
- * @ignore Recursively inserts the specified point <i>p</i> at the node
- * <i>n</i> or one of its descendants. The bounds are defined by [<i>x1</i>,
- * <i>x2</i>] and [<i>y1</i>, <i>y2</i>].
- */
- function insert(n, p, x1, y1, x2, y2) {
- if (isNaN(p[0]) || isNaN(p[1])) return; // ignore invalid points
- if (n.leaf) {
- var v = n.point;
- if (v) {
- /*
- * If the point at this leaf node is at the same position as the new
- * point we are adding, we leave the point associated with the
- * internal node while adding the new point to a child node. This
- * avoids infinite recursion.
- */
- if ((Math.abs(v[0] - p[0]) + Math.abs(v[1] - p[1])) < .01) {
- insertChild(n, p, x1, y1, x2, y2);
- } else {
- n.point = null;
- insertChild(n, v, x1, y1, x2, y2);
- insertChild(n, p, x1, y1, x2, y2);
- }
- } else {
- n.point = p;
- }
- } else {
- insertChild(n, p, x1, y1, x2, y2);
- }
- }
-
- /**
- * @ignore Recursively inserts the specified point <i>p</i> into a
- * descendant of node <i>n</i>. The bounds are defined by [<i>x1</i>,
- * <i>x2</i>] and [<i>y1</i>, <i>y2</i>].
- */
- function insertChild(n, p, x1, y1, x2, y2) {
- /* Compute the split point, and the quadrant in which to insert p. */
- var sx = (x1 + x2) * .5,
- sy = (y1 + y2) * .5,
- right = p[0] >= sx,
- bottom = p[1] >= sy,
- i = (bottom << 1) + right;
-
- /* Recursively insert into the child node. */
- n.leaf = false;
- n = n.nodes[i] || (n.nodes[i] = d3_geom_quadtreeNode());
-
- /* Update the bounds as we recurse. */
- if (right) x1 = sx; else x2 = sx;
- if (bottom) y1 = sy; else y2 = sy;
- insert(n, p, x1, y1, x2, y2);
- }
-
- /* Create the root node. */
- var root = d3_geom_quadtreeNode();
-
- /* Insert all points. */
- i = -1;
- while (++i < n) insert(root, points[i], x1, y1, x2, y2);
-
- /* Register a visitor function for the root. */
- root.visit = function(f) {
- d3_geom_quadtreeVisit(f, root, x1, y1, x2, y2);
- };
-
- return root;
-};
-
-function d3_geom_quadtreeNode() {
- return {
- leaf: true,
- nodes: [],
- point: null
- };
-}
-
-function d3_geom_quadtreeVisit(f, node, x1, y1, x2, y2) {
- if (!f(node, x1, y1, x2, y2)) {
- var sx = (x1 + x2) * .5,
- sy = (y1 + y2) * .5,
- children = node.nodes;
- if (children[0]) d3_geom_quadtreeVisit(f, children[0], x1, y1, sx, sy);
- if (children[1]) d3_geom_quadtreeVisit(f, children[1], sx, y1, x2, sy);
- if (children[2]) d3_geom_quadtreeVisit(f, children[2], x1, sy, sx, y2);
- if (children[3]) d3_geom_quadtreeVisit(f, children[3], sx, sy, x2, y2);
- }
-}
-})() \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/d3.js b/ecomp-portal-BE/war/static/fusion/d3/js/d3.js
deleted file mode 100644
index 7655eb78..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/d3.js
+++ /dev/null
@@ -1,5 +0,0 @@
-!function(){function n(n,t){return t>n?-1:n>t?1:n>=t?0:0/0}function t(n){return null===n?0/0:+n}function e(n){return!isNaN(n)}function r(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function u(n){return n.length}function i(n){for(var t=1;n*t%1;)t*=10;return t}function o(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function a(){this._=Object.create(null)}function c(n){return(n+="")===da||n[0]===ma?ma+n:n}function l(n){return(n+="")[0]===ma?n.slice(1):n}function s(n){return c(n)in this._}function f(n){return(n=c(n))in this._&&delete this._[n]}function h(){var n=[];for(var t in this._)n.push(l(t));return n}function g(){var n=0;for(var t in this._)++n;return n}function p(){for(var n in this._)return!1;return!0}function v(){this._=Object.create(null)}function d(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function m(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=ya.length;r>e;++e){var u=ya[e]+t;if(u in n)return u}}function y(){}function M(){}function x(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new a;return t.on=function(t,u){var i,o=r.get(t);return arguments.length<2?o&&o.on:(o&&(o.on=null,e=e.slice(0,i=e.indexOf(o)).concat(e.slice(i+1)),r.remove(t)),u&&e.push(r.set(t,{on:u})),n)},t}function b(){ta.event.preventDefault()}function _(){for(var n,t=ta.event;n=t.sourceEvent;)t=n;return t}function w(n){for(var t=new M,e=0,r=arguments.length;++e<r;)t[arguments[e]]=x(t);return t.of=function(e,r){return function(u){try{var i=u.sourceEvent=ta.event;u.target=n,ta.event=u,t[u.type].apply(e,r)}finally{ta.event=i}}},t}function S(n){return xa(n,ka),n}function k(n){return"function"==typeof n?n:function(){return ba(n,this)}}function E(n){return"function"==typeof n?n:function(){return _a(n,this)}}function A(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=ta.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?a:o:n.local?i:u}function N(n){return n.trim().replace(/\s+/g," ")}function C(n){return new RegExp("(?:^|\\s+)"+ta.requote(n)+"(?:\\s+|$)","g")}function z(n){return(n+"").trim().split(/^|\s+/)}function q(n,t){function e(){for(var e=-1;++e<u;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<u;)n[e](this,r)}n=z(n).map(L);var u=n.length;return"function"==typeof t?r:e}function L(n){var t=C(n);return function(e,r){if(u=e.classList)return r?u.add(n):u.remove(n);var u=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||e.setAttribute("class",N(u+" "+n))):e.setAttribute("class",N(u.replace(t," ")))}}function T(n,t,e){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,e)}function i(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?i:u}function R(n,t){function e(){delete this[n]}function r(){this[n]=t}function u(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?u:r}function D(n){return"function"==typeof n?n:(n=ta.ns.qualify(n)).local?function(){return this.ownerDocument.createElementNS(n.space,n.local)}:function(){return this.ownerDocument.createElementNS(this.namespaceURI,n)}}function P(){var n=this.parentNode;n&&n.removeChild(this)}function U(n){return{__data__:n}}function j(n){return function(){return Sa(this,n)}}function F(t){return arguments.length||(t=n),function(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}}function H(n,t){for(var e=0,r=n.length;r>e;e++)for(var u,i=n[e],o=0,a=i.length;a>o;o++)(u=i[o])&&t(u,o,e);return n}function O(n){return xa(n,Aa),n}function Y(n){var t,e;return function(r,u,i){var o,a=n[i].update,c=a.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(o=a[t])&&++t<c;);return o}}function I(n){var t=n.__transition__;t&&++t.active}function Z(n,t,e){function r(){var t=this[o];t&&(this.removeEventListener(n,t,t.$),delete this[o])}function u(){var u=c(t,ra(arguments));r.call(this),this.addEventListener(n,this[o]=u,u.$=e),u._=t}function i(){var t,e=new RegExp("^__on([^.]+)"+ta.requote(n)+"$");for(var r in this)if(t=r.match(e)){var u=this[r];this.removeEventListener(t[1],u,u.$),delete this[r]}}var o="__on"+n,a=n.indexOf("."),c=V;a>0&&(n=n.slice(0,a));var l=Ca.get(n);return l&&(n=l,c=X),a?t?u:r:t?y:i}function V(n,t){return function(e){var r=ta.event;ta.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{ta.event=r}}}function X(n,t){var e=V(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function $(){var n=".dragsuppress-"+ ++qa,t="click"+n,e=ta.select(oa).on("touchmove"+n,b).on("dragstart"+n,b).on("selectstart"+n,b);if(za){var r=ia.style,u=r[za];r[za]="none"}return function(i){if(e.on(n,null),za&&(r[za]=u),i){var o=function(){e.on(t,null)};e.on(t,function(){b(),o()},!0),setTimeout(o,0)}}}function B(n,t){t.changedTouches&&(t=t.changedTouches[0]);var e=n.ownerSVGElement||n;if(e.createSVGPoint){var r=e.createSVGPoint();if(0>La&&(oa.scrollX||oa.scrollY)){e=ta.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var u=e[0][0].getScreenCTM();La=!(u.f||u.e),e.remove()}return La?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(n.getScreenCTM().inverse()),[r.x,r.y]}var i=n.getBoundingClientRect();return[t.clientX-i.left-n.clientLeft,t.clientY-i.top-n.clientTop]}function W(){return ta.event.changedTouches[0].identifier}function J(){return ta.event.target}function G(){return oa}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nt(n){return n>1?0:-1>n?Da:Math.acos(n)}function tt(n){return n>1?ja:-1>n?-ja:Math.asin(n)}function et(n){return((n=Math.exp(n))-1/n)/2}function rt(n){return((n=Math.exp(n))+1/n)/2}function ut(n){return((n=Math.exp(2*n))-1)/(n+1)}function it(n){return(n=Math.sin(n/2))*n}function ot(){}function at(n,t,e){return this instanceof at?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof at?new at(n.h,n.s,n.l):bt(""+n,_t,at):new at(n,t,e)}function ct(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(o-i)*n/60:180>n?o:240>n?i+(o-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,o=.5>=e?e*(1+t):e+t-e*t,i=2*e-o,new mt(u(n+120),u(n),u(n-120))}function lt(n,t,e){return this instanceof lt?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof lt?new lt(n.h,n.c,n.l):n instanceof ft?gt(n.l,n.a,n.b):gt((n=wt((n=ta.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new lt(n,t,e)}function st(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new ft(e,Math.cos(n*=Fa)*t,Math.sin(n)*t)}function ft(n,t,e){return this instanceof ft?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof ft?new ft(n.l,n.a,n.b):n instanceof lt?st(n.h,n.c,n.l):wt((n=mt(n)).r,n.g,n.b):new ft(n,t,e)}function ht(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=pt(u)*Ja,r=pt(r)*Ga,i=pt(i)*Ka,new mt(dt(3.2404542*u-1.5371385*r-.4985314*i),dt(-.969266*u+1.8760108*r+.041556*i),dt(.0556434*u-.2040259*r+1.0572252*i))}function gt(n,t,e){return n>0?new lt(Math.atan2(e,t)*Ha,Math.sqrt(t*t+e*e),n):new lt(0/0,0/0,n)}function pt(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function vt(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function dt(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function mt(n,t,e){return this instanceof mt?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof mt?new mt(n.r,n.g,n.b):bt(""+n,mt,ct):new mt(n,t,e)}function yt(n){return new mt(n>>16,255&n>>8,255&n)}function Mt(n){return yt(n)+""}function xt(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function bt(n,t,e){var r,u,i,o=0,a=0,c=0;if(r=/([a-z]+)\((.*)\)/i.exec(n))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(kt(u[0]),kt(u[1]),kt(u[2]))}return(i=tc.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(o=(3840&i)>>4,o=o>>4|o,a=240&i,a=a>>4|a,c=15&i,c=c<<4|c):7===n.length&&(o=(16711680&i)>>16,a=(65280&i)>>8,c=255&i)),t(o,a,c))}function _t(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-i,c=(o+i)/2;return a?(u=.5>c?a/(o+i):a/(2-o-i),r=n==o?(t-e)/a+(e>t?6:0):t==o?(e-n)/a+2:(n-t)/a+4,r*=60):(r=0/0,u=c>0&&1>c?0:r),new at(r,u,c)}function wt(n,t,e){n=St(n),t=St(t),e=St(e);var r=vt((.4124564*n+.3575761*t+.1804375*e)/Ja),u=vt((.2126729*n+.7151522*t+.072175*e)/Ga),i=vt((.0193339*n+.119192*t+.9503041*e)/Ka);return ft(116*u-16,500*(r-u),200*(u-i))}function St(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function kt(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function Et(n){return"function"==typeof n?n:function(){return n}}function At(n){return n}function Nt(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Ct(t,e,n,r)}}function Ct(n,t,e,r){function u(){var n,t=c.status;if(!t&&qt(c)||t>=200&&300>t||304===t){try{n=e.call(i,c)}catch(r){return o.error.call(i,r),void 0}o.load.call(i,n)}else o.error.call(i,c)}var i={},o=ta.dispatch("beforesend","progress","load","error"),a={},c=new XMLHttpRequest,l=null;return!oa.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(n)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=u:c.onreadystatechange=function(){c.readyState>3&&u()},c.onprogress=function(n){var t=ta.event;ta.event=n;try{o.progress.call(i,c)}finally{ta.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(l=n,i):l},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(ra(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),c.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),c.setRequestHeader)for(var s in a)c.setRequestHeader(s,a[s]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=l&&(c.responseType=l),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),o.beforesend.call(i,c),c.send(null==r?null:r),i},i.abort=function(){return c.abort(),i},ta.rebind(i,o,"on"),null==r?i:i.get(zt(r))}function zt(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function qt(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function Lt(){var n=Tt(),t=Rt()-n;t>24?(isFinite(t)&&(clearTimeout(ic),ic=setTimeout(Lt,t)),uc=0):(uc=1,ac(Lt))}function Tt(){var n=Date.now();for(oc=ec;oc;)n>=oc.t&&(oc.f=oc.c(n-oc.t)),oc=oc.n;return n}function Rt(){for(var n,t=ec,e=1/0;t;)t.f?t=n?n.n=t.n:ec=t.n:(t.t<e&&(e=t.t),t=(n=t).n);return rc=n,e}function Dt(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Pt(n,t){var e=Math.pow(10,3*va(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function Ut(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r&&e?function(n,t){for(var u=n.length,i=[],o=0,a=r[0],c=0;u>0&&a>0&&(c+a+1>t&&(a=Math.max(1,t-c)),i.push(n.substring(u-=a,u+a)),!((c+=a+1)>t));)a=r[o=(o+1)%r.length];return i.reverse().join(e)}:At;return function(n){var e=lc.exec(n),r=e[1]||" ",o=e[2]||">",a=e[3]||"-",c=e[4]||"",l=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(l||"0"===r&&"="===o)&&(l=r="0",o="="),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===c&&(v="0"+g.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===c&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=sc.get(g)||jt;var M=l&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===a?"":a;if(0>p){var c=ta.formatPrefix(n,h);n=c.scale(n),e=c.symbol+d}else n*=p;n=g(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!l&&f&&(x=i(x,1/0));var S=v.length+x.length+b.length+(M?0:u.length),k=s>S?new Array(S=s-S+1).join(r):"";return M&&(x=i(k+x,k.length?s-b.length:1/0)),u+=v,n=x+b,("<"===o?u+n+k:">"===o?k+u+n:"^"===o?k.substring(0,S>>=1)+u+n+k.substring(S):u+(M?n:k+n))+e}}}function jt(n){return n+""}function Ft(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ht(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new hc(e-1)),1),e}function i(n,e){return t(n=new hc(+n),e),n}function o(n,r,i){var o=u(n),a=[];if(i>1)for(;r>o;)e(o)%i||a.push(new Date(+o)),t(o,1);else for(;r>o;)a.push(new Date(+o)),t(o,1);return a}function a(n,t,e){try{hc=Ft;var r=new Ft;return r._=n,o(r,t,e)}finally{hc=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=o;var c=n.utc=Ot(n);return c.floor=c,c.round=Ot(r),c.ceil=Ot(u),c.offset=Ot(i),c.range=a,n}function Ot(n){return function(t,e){try{hc=Ft;var r=new Ft;return r._=t,n(r,e)._}finally{hc=Date}}}function Yt(n){function t(n){function t(t){for(var e,u,i,o=[],a=-1,c=0;++a<r;)37===n.charCodeAt(a)&&(o.push(n.slice(c,a)),null!=(u=pc[e=n.charAt(++a)])&&(e=n.charAt(++a)),(i=N[e])&&(e=i(t,null==u?"e"===e?" ":"0":u)),o.push(e),c=a+1);return o.push(n.slice(c,a)),o.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=e(r,n,t,0);if(u!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&hc!==Ft,o=new(i?Ft:hc);return"j"in r?o.setFullYear(r.y,0,r.j):"w"in r&&("W"in r||"U"in r)?(o.setFullYear(r.y,0,1),o.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(o.getDay()+5)%7:r.w+7*r.U-(o.getDay()+6)%7)):o.setFullYear(r.y,r.m,r.d),o.setHours(r.H+(0|r.Z/100),r.M+r.Z%100,r.S,r.L),i?o._:o},t.toString=function(){return n},t}function e(n,t,e,r){for(var u,i,o,a=0,c=t.length,l=e.length;c>a;){if(r>=l)return-1;if(u=t.charCodeAt(a++),37===u){if(o=t.charAt(a++),i=C[o in pc?t.charAt(a++):o],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){E.lastIndex=0;var r=E.exec(t.slice(e));return r?(n.m=A.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,N.c.toString(),t,r)}function c(n,t,r){return e(n,N.x.toString(),t,r)}function l(n,t,r){return e(n,N.X.toString(),t,r)}function s(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{hc=Ft;var t=new hc;return t._=n,r(t)}finally{hc=Date}}var r=t(n);return e.parse=function(n){try{hc=Ft;var t=r.parse(n);return t&&t._}finally{hc=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ce;var M=ta.map(),x=Zt(v),b=Vt(v),_=Zt(d),w=Vt(d),S=Zt(m),k=Vt(m),E=Zt(y),A=Vt(y);p.forEach(function(n,t){M.set(n.toLowerCase(),t)});var N={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return It(n.getDate(),t,2)},e:function(n,t){return It(n.getDate(),t,2)},H:function(n,t){return It(n.getHours(),t,2)},I:function(n,t){return It(n.getHours()%12||12,t,2)},j:function(n,t){return It(1+fc.dayOfYear(n),t,3)},L:function(n,t){return It(n.getMilliseconds(),t,3)},m:function(n,t){return It(n.getMonth()+1,t,2)},M:function(n,t){return It(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return It(n.getSeconds(),t,2)},U:function(n,t){return It(fc.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return It(fc.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return It(n.getFullYear()%100,t,2)},Y:function(n,t){return It(n.getFullYear()%1e4,t,4)},Z:oe,"%":function(){return"%"}},C={a:r,A:u,b:i,B:o,c:a,d:ne,e:ne,H:ee,I:ee,j:te,L:ie,m:Qt,M:re,p:s,S:ue,U:$t,w:Xt,W:Bt,x:c,X:l,y:Jt,Y:Wt,Z:Gt,"%":ae};return t}function It(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function Zt(n){return new RegExp("^(?:"+n.map(ta.requote).join("|")+")","i")}function Vt(n){for(var t=new a,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function Xt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function $t(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Bt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Wt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Jt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.y=Kt(+r[0]),e+r[0].length):-1}function Gt(n,t,e){return/^[+-]\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Kt(n){return n+(n>68?1900:2e3)}function Qt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function ne(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function te(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function ee(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function re(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function ue(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function ie(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function oe(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=0|va(t)/60,u=va(t)%60;return e+It(r,"0",2)+It(u,"0",2)}function ae(n,t,e){dc.lastIndex=0;var r=dc.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ce(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function le(){}function se(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function fe(n,t){n&&xc.hasOwnProperty(n.type)&&xc[n.type](n,t)}function he(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++u<i;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function ge(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)he(n[e],t,1);t.polygonEnd()}function pe(){function n(n,t){n*=Fa,t=t*Fa/2+Da/4;var e=n-r,o=e>=0?1:-1,a=o*e,c=Math.cos(t),l=Math.sin(t),s=i*l,f=u*c+s*Math.cos(a),h=s*o*Math.sin(a);_c.add(Math.atan2(h,f)),r=n,u=c,i=l}var t,e,r,u,i;wc.point=function(o,a){wc.point=n,r=(t=o)*Fa,u=Math.cos(a=(e=a)*Fa/2+Da/4),i=Math.sin(a)},wc.lineEnd=function(){n(t,e)}}function ve(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function de(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function me(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function ye(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function Me(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function xe(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function be(n){return[Math.atan2(n[1],n[0]),tt(n[2])]}function _e(n,t){return va(n[0]-t[0])<Ta&&va(n[1]-t[1])<Ta}function we(n,t){n*=Fa;var e=Math.cos(t*=Fa);Se(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function Se(n,t,e){++Sc,Ec+=(n-Ec)/Sc,Ac+=(t-Ac)/Sc,Nc+=(e-Nc)/Sc}function ke(){function n(n,u){n*=Fa;var i=Math.cos(u*=Fa),o=i*Math.cos(n),a=i*Math.sin(n),c=Math.sin(u),l=Math.atan2(Math.sqrt((l=e*c-r*a)*l+(l=r*o-t*c)*l+(l=t*a-e*o)*l),t*o+e*a+r*c);kc+=l,Cc+=l*(t+(t=o)),zc+=l*(e+(e=a)),qc+=l*(r+(r=c)),Se(t,e,r)}var t,e,r;Dc.point=function(u,i){u*=Fa;var o=Math.cos(i*=Fa);t=o*Math.cos(u),e=o*Math.sin(u),r=Math.sin(i),Dc.point=n,Se(t,e,r)}}function Ee(){Dc.point=we}function Ae(){function n(n,t){n*=Fa;var e=Math.cos(t*=Fa),o=e*Math.cos(n),a=e*Math.sin(n),c=Math.sin(t),l=u*c-i*a,s=i*o-r*c,f=r*a-u*o,h=Math.sqrt(l*l+s*s+f*f),g=r*o+u*a+i*c,p=h&&-nt(g)/h,v=Math.atan2(h,g);Lc+=p*l,Tc+=p*s,Rc+=p*f,kc+=v,Cc+=v*(r+(r=o)),zc+=v*(u+(u=a)),qc+=v*(i+(i=c)),Se(r,u,i)}var t,e,r,u,i;Dc.point=function(o,a){t=o,e=a,Dc.point=n,o*=Fa;var c=Math.cos(a*=Fa);r=c*Math.cos(o),u=c*Math.sin(o),i=Math.sin(a),Se(r,u,i)},Dc.lineEnd=function(){n(t,e),Dc.lineEnd=Ee,Dc.point=we}}function Ne(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function Ce(){return!0}function ze(n,t,e,r,u){var i=[],o=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(_e(e,r)){u.lineStart();for(var a=0;t>a;++a)u.point((e=n[a])[0],e[1]);return u.lineEnd(),void 0}var c=new Le(e,n,null,!0),l=new Le(e,null,c,!1);c.o=l,i.push(c),o.push(l),c=new Le(r,n,null,!1),l=new Le(r,null,c,!0),c.o=l,i.push(c),o.push(l)}}),o.sort(t),qe(i),qe(o),i.length){for(var a=0,c=e,l=o.length;l>a;++a)o[a].e=c=!c;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var a=0,l=s.length;l>a;++a)u.point((f=s[a])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var a=s.length-1;a>=0;--a)u.point((f=s[a])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function qe(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r<t;)u.n=e=n[r],e.p=u,u=e;u.n=e=n[0],e.p=u}}function Le(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Te(n,t,e,r){return function(u,i){function o(t,e){var r=u(t,e);n(t=r[0],e=r[1])&&i.point(t,e)}function a(n,t){var e=u(n,t);d.point(e[0],e[1])}function c(){y.point=a,d.lineStart()}function l(){y.point=o,d.lineEnd()}function s(n,t){v.push([n,t]);var e=u(n,t);x.point(e[0],e[1])}function f(){x.lineStart(),v=[]}function h(){s(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(v.pop(),p.push(v),v=null,r)if(1&t){n=e[0];var u,r=n.length-1,o=-1;if(r>0){for(b||(i.polygonStart(),b=!0),i.lineStart();++o<r;)i.point((u=n[o])[0],u[1]);i.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Re))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:o,lineStart:c,lineEnd:l,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=o,y.lineStart=c,y.lineEnd=l,g=ta.merge(g);var n=He(m,p);g.length?(b||(i.polygonStart(),b=!0),ze(g,Pe,n,e,i)):n&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},M=De(),x=t(M),b=!1;return y}}function Re(n){return n.length>1}function De(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:y,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Pe(n,t){return((n=n.x)[0]<0?n[1]-ja-Ta:ja-n[1])-((t=t.x)[0]<0?t[1]-ja-Ta:ja-t[1])}function Ue(n){var t,e=0/0,r=0/0,u=0/0;return{lineStart:function(){n.lineStart(),t=1},point:function(i,o){var a=i>0?Da:-Da,c=va(i-e);va(c-Da)<Ta?(n.point(e,r=(r+o)/2>0?ja:-ja),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(i,r),t=0):u!==a&&c>=Da&&(va(e-u)<Ta&&(e-=u*Ta),va(i-a)<Ta&&(i-=a*Ta),r=je(e,r,i,o),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),t=0),n.point(e=i,r=o),u=a},lineEnd:function(){n.lineEnd(),e=r=0/0},clean:function(){return 2-t}}}function je(n,t,e,r){var u,i,o=Math.sin(n-e);return va(o)>Ta?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*o)):(t+r)/2}function Fe(n,t,e,r){var u;if(null==n)u=e*ja,r.point(-Da,u),r.point(0,u),r.point(Da,u),r.point(Da,0),r.point(Da,-u),r.point(0,-u),r.point(-Da,-u),r.point(-Da,0),r.point(-Da,u);else if(va(n[0]-t[0])>Ta){var i=n[0]<t[0]?Da:-Da;u=e*i/2,r.point(-i,u),r.point(0,u),r.point(i,u)}else r.point(t[0],t[1])}function He(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,o=0;_c.reset();for(var a=0,c=t.length;c>a;++a){var l=t[a],s=l.length;if(s)for(var f=l[0],h=f[0],g=f[1]/2+Da/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=l[d];var m=n[0],y=n[1]/2+Da/4,M=Math.sin(y),x=Math.cos(y),b=m-h,_=b>=0?1:-1,w=_*b,S=w>Da,k=p*M;if(_c.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),i+=S?b+_*Pa:b,S^h>=e^m>=e){var E=me(ve(f),ve(n));xe(E);var A=me(u,E);xe(A);var N=(S^b>=0?-1:1)*tt(A[2]);(r>N||r===N&&(E[0]||E[1]))&&(o+=S^b>=0?1:-1)}if(!d++)break;h=m,p=M,v=x,f=n}}return(-Ta>i||Ta>i&&0>_c)^1&o}function Oe(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,c,l,s;return{lineStart:function(){l=c=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=o?v?0:u(f,h):v?u(f+(0>f?Da:-Da),h):0;if(!e&&(l=c=v)&&n.lineStart(),v!==c&&(g=r(e,p),(_e(e,g)||_e(p,g))&&(p[0]+=Ta,p[1]+=Ta,v=t(p[0],p[1]))),v!==c)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(a&&e&&o^v){var m;d&i||!(m=r(p,e,!0))||(s=0,o?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&_e(e,p)||n.point(p[0],p[1]),e=p,c=v,i=d},lineEnd:function(){c&&n.lineEnd(),e=null},clean:function(){return s|(l&&c)<<1}}}function r(n,t,e){var r=ve(n),u=ve(t),o=[1,0,0],a=me(r,u),c=de(a,a),l=a[0],s=c-l*l;if(!s)return!e&&n;var f=i*c/s,h=-i*l/s,g=me(o,a),p=Me(o,f),v=Me(a,h);ye(p,v);var d=g,m=de(p,d),y=de(d,d),M=m*m-y*(de(p,p)-1);if(!(0>M)){var x=Math.sqrt(M),b=Me(d,(-m-x)/y);if(ye(b,p),b=be(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],E=t[1];w>S&&(_=w,w=S,S=_);var A=S-w,N=va(A-Da)<Ta,C=N||Ta>A;if(!N&&k>E&&(_=k,k=E,E=_),C?N?k+E>0^b[1]<(va(b[0]-w)<Ta?k:E):k<=b[1]&&b[1]<=E:A>Da^(w<=b[0]&&b[0]<=S)){var z=Me(d,(-m+x)/y);return ye(z,p),[b,be(z)]}}}function u(t,e){var r=o?n:Da-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),o=i>0,a=va(i)>Ta,c=pr(n,6*Fa);return Te(t,e,c,o?[0,-n]:[-Da,n-Da])}function Ye(n,t,e,r){return function(u){var i,o=u.a,a=u.b,c=o.x,l=o.y,s=a.x,f=a.y,h=0,g=1,p=s-c,v=f-l;if(i=n-c,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-c,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-l,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-l,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:c+h*p,y:l+h*v}),1>g&&(u.b={x:c+g*p,y:l+g*v}),u}}}}}}function Ie(n,t,e,r){function u(r,u){return va(r[0]-n)<Ta?u>0?0:3:va(r[0]-e)<Ta?u>0?2:1:va(r[1]-t)<Ta?u>0?1:0:u>0?3:2}function i(n,t){return o(n.x,t.x)}function o(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function c(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,o=1,a=d[u],c=a.length,l=a[0];c>o;++o)i=a[o],l[1]<=r?i[1]>r&&Q(l,i,n)>0&&++t:i[1]<=r&&Q(l,i,n)<0&&--t,l=i;return 0!==t}function l(i,a,c,l){var s=0,f=0;if(null==i||(s=u(i,c))!==(f=u(a,c))||o(i,a)<0^c>0){do l.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+c+4)%4)!==f)}else l.point(a[0],a[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&a.point(n,t)}function h(){C.point=p,d&&d.push(m=[]),S=!0,w=!1,b=_=0/0}function g(){v&&(p(y,M),x&&w&&A.rejoin(),v.push(A.buffer())),C.point=f,w&&a.lineEnd()}function p(n,t){n=Math.max(-Uc,Math.min(Uc,n)),t=Math.max(-Uc,Math.min(Uc,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,M=t,x=e,S=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&w)a.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};N(r)?(w||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),k=!1):e&&(a.lineStart(),a.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,m,y,M,x,b,_,w,S,k,E=a,A=De(),N=Ye(n,t,e,r),C={point:f,lineStart:h,lineEnd:g,polygonStart:function(){a=A,v=[],d=[],k=!0},polygonEnd:function(){a=E,v=ta.merge(v);var t=c([n,r]),e=k&&t,u=v.length;(e||u)&&(a.polygonStart(),e&&(a.lineStart(),l(null,null,1,a),a.lineEnd()),u&&ze(v,i,t,l,a),a.polygonEnd()),v=d=m=null}};return C}}function Ze(n){var t=0,e=Da/3,r=or(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*Da/180,e=n[1]*Da/180):[180*(t/Da),180*(e/Da)]},u}function Ve(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),o-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),o=Math.sqrt(i)/u;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/u,tt((i-(n*n+e*e)*u*u)/(2*u))]},e}function Xe(){function n(n,t){Fc+=u*n-r*t,r=n,u=t}var t,e,r,u;Zc.point=function(i,o){Zc.point=n,t=r=i,e=u=o},Zc.lineEnd=function(){n(t,e)}}function $e(n,t){Hc>n&&(Hc=n),n>Yc&&(Yc=n),Oc>t&&(Oc=t),t>Ic&&(Ic=t)}function Be(){function n(n,t){o.push("M",n,",",t,i)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function u(){o.push("Z")}var i=We(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return i=We(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function We(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Je(n,t){Ec+=n,Ac+=t,++Nc}function Ge(){function n(n,r){var u=n-t,i=r-e,o=Math.sqrt(u*u+i*i);Cc+=o*(t+n)/2,zc+=o*(e+r)/2,qc+=o,Je(t=n,e=r)}var t,e;Xc.point=function(r,u){Xc.point=n,Je(t=r,e=u)}}function Ke(){Xc.point=Je}function Qe(){function n(n,t){var e=n-r,i=t-u,o=Math.sqrt(e*e+i*i);Cc+=o*(r+n)/2,zc+=o*(u+t)/2,qc+=o,o=u*n-r*t,Lc+=o*(r+n),Tc+=o*(u+t),Rc+=3*o,Je(r=n,u=t)}var t,e,r,u;Xc.point=function(i,o){Xc.point=n,Je(t=r=i,e=u=o)},Xc.lineEnd=function(){n(t,e)}}function nr(n){function t(t,e){n.moveTo(t+o,e),n.arc(t,e,o,0,Pa)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function u(){a.point=t}function i(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:u,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=u,a.point=t},pointRadius:function(n){return o=n,a},result:y};return a}function tr(n){function t(n){return(a?r:e)(n)}function e(t){return ur(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=0/0,S.point=i,t.lineStart()}function i(e,r){var i=ve([e,r]),o=n(e,r);u(M,x,y,b,_,w,M=o[0],x=o[1],y=e,b=i[0],_=i[1],w=i[2],a,t),t.point(M,x)}function o(){S.point=e,t.lineEnd()}function c(){r(),S.point=l,S.lineEnd=s}function l(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,a,t),S.lineEnd=o,o()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=c},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,a,c,l,s,f,h,g,p,v,d,m){var y=s-t,M=f-e,x=y*y+M*M;if(x>4*i&&d--){var b=a+g,_=c+p,w=l+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),E=va(va(w)-1)<Ta||va(r-h)<Ta?(r+h)/2:Math.atan2(_,b),A=n(E,k),N=A[0],C=A[1],z=N-t,q=C-e,L=M*z-y*q;
-(L*L/x>i||va((y*z+M*q)/x-.5)>.3||o>a*g+c*p+l*v)&&(u(t,e,r,a,c,l,N,C,E,b/=S,_/=S,w,d,m),m.point(N,C),u(N,C,E,b,_,w,s,f,h,g,p,v,d,m))}}var i=.5,o=Math.cos(30*Fa),a=16;return t.precision=function(n){return arguments.length?(a=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function er(n){var t=tr(function(t,e){return n([t*Ha,e*Ha])});return function(n){return ar(t(n))}}function rr(n){this.stream=n}function ur(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ir(n){return or(function(){return n})()}function or(n){function t(n){return n=a(n[0]*Fa,n[1]*Fa),[n[0]*h+c,l-n[1]*h]}function e(n){return n=a.invert((n[0]-c)/h,(l-n[1])/h),n&&[n[0]*Ha,n[1]*Ha]}function r(){a=Ne(o=sr(m,y,M),i);var n=i(v,d);return c=g-n[0]*h,l=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,o,a,c,l,s,f=tr(function(n,t){return n=i(n,t),[n[0]*h+c,l-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,y=0,M=0,x=Pc,b=At,_=null,w=null;return t.stream=function(n){return s&&(s.valid=!1),s=ar(x(o,f(b(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(x=null==n?(_=n,Pc):Oe((_=+n)*Fa),u()):_},t.clipExtent=function(n){return arguments.length?(w=n,b=n?Ie(n[0][0],n[0][1],n[1][0],n[1][1]):At,u()):w},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Fa,d=n[1]%360*Fa,r()):[v*Ha,d*Ha]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Fa,y=n[1]%360*Fa,M=n.length>2?n[2]%360*Fa:0,r()):[m*Ha,y*Ha,M*Ha]},ta.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function ar(n){return ur(n,function(t,e){n.point(t*Fa,e*Fa)})}function cr(n,t){return[n,t]}function lr(n,t){return[n>Da?n-Pa:-Da>n?n+Pa:n,t]}function sr(n,t,e){return n?t||e?Ne(hr(n),gr(t,e)):hr(n):t||e?gr(t,e):lr}function fr(n){return function(t,e){return t+=n,[t>Da?t-Pa:-Da>t?t+Pa:t,e]}}function hr(n){var t=fr(n);return t.invert=fr(-n),t}function gr(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),s=l*r+a*u;return[Math.atan2(c*i-s*o,a*r-l*u),tt(s*i+c*o)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),s=l*i-c*o;return[Math.atan2(c*i+l*o,a*r+s*u),tt(s*r-a*u)]},e}function pr(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,o,a){var c=o*t;null!=u?(u=vr(e,u),i=vr(e,i),(o>0?i>u:u>i)&&(u+=o*Pa)):(u=n+o*Pa,i=n-.5*c);for(var l,s=u;o>0?s>i:i>s;s-=c)a.point((l=be([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],l[1])}}function vr(n,t){var e=ve(t);e[0]-=n,xe(e);var r=nt(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Ta)%(2*Math.PI)}function dr(n,t,e){var r=ta.range(n,t-Ta,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function mr(n,t,e){var r=ta.range(n,t-Ta,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function yr(n){return n.source}function Mr(n){return n.target}function xr(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),o=Math.cos(r),a=Math.sin(r),c=u*Math.cos(n),l=u*Math.sin(n),s=o*Math.cos(e),f=o*Math.sin(e),h=2*Math.asin(Math.sqrt(it(r-t)+u*o*it(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*c+t*s,u=e*l+t*f,o=e*i+t*a;return[Math.atan2(u,r)*Ha,Math.atan2(o,Math.sqrt(r*r+u*u))*Ha]}:function(){return[n*Ha,t*Ha]};return p.distance=h,p}function br(){function n(n,u){var i=Math.sin(u*=Fa),o=Math.cos(u),a=va((n*=Fa)-t),c=Math.cos(a);$c+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=r*i-e*o*c)*a),e*i+r*o*c),t=n,e=i,r=o}var t,e,r;Bc.point=function(u,i){t=u*Fa,e=Math.sin(i*=Fa),r=Math.cos(i),Bc.point=n},Bc.lineEnd=function(){Bc.point=Bc.lineEnd=y}}function _r(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),o=Math.cos(u);return[Math.atan2(n*i,r*o),Math.asin(r&&e*i/r)]},e}function wr(n,t){function e(n,t){o>0?-ja+Ta>t&&(t=-ja+Ta):t>ja-Ta&&(t=ja-Ta);var e=o/Math.pow(u(t),i);return[e*Math.sin(i*n),o-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(Da/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),o=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=o-t,r=K(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(o/r,1/i))-ja]},e):kr}function Sr(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return va(u)<Ta?cr:(e.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/u,i-K(u)*Math.sqrt(n*n+e*e)]},e)}function kr(n,t){return[n,Math.log(Math.tan(Da/4+t/2))]}function Er(n){var t,e=ir(n),r=e.scale,u=e.translate,i=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=u.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var o=i.apply(e,arguments);if(o===e){if(t=null==n){var a=Da*r(),c=u();i([[c[0]-a,c[1]-a],[c[0]+a,c[1]+a]])}}else t&&(o=null);return o},e.clipExtent(null)}function Ar(n,t){return[Math.log(Math.tan(Da/4+t/2)),-n]}function Nr(n){return n[0]}function Cr(n){return n[1]}function zr(n){for(var t=n.length,e=[0,1],r=2,u=2;t>u;u++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function qr(n,t){return n[0]-t[0]||n[1]-t[1]}function Lr(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Tr(n,t,e,r){var u=n[0],i=e[0],o=t[0]-u,a=r[0]-i,c=n[1],l=e[1],s=t[1]-c,f=r[1]-l,h=(a*(c-l)-f*(u-i))/(f*o-a*s);return[u+h*o,c+h*s]}function Rr(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Dr(){eu(this),this.edge=this.site=this.circle=null}function Pr(n){var t=ol.pop()||new Dr;return t.site=n,t}function Ur(n){$r(n),rl.remove(n),ol.push(n),eu(n)}function jr(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,o=n.N,a=[n];Ur(n);for(var c=i;c.circle&&va(e-c.circle.x)<Ta&&va(r-c.circle.cy)<Ta;)i=c.P,a.unshift(c),Ur(c),c=i;a.unshift(c),$r(c);for(var l=o;l.circle&&va(e-l.circle.x)<Ta&&va(r-l.circle.cy)<Ta;)o=l.N,a.push(l),Ur(l),l=o;a.push(l),$r(l);var s,f=a.length;for(s=1;f>s;++s)l=a[s],c=a[s-1],Qr(l.edge,c.site,l.site,u);c=a[0],l=a[f-1],l.edge=Gr(c.site,l.site,null,u),Xr(c),Xr(l)}function Fr(n){for(var t,e,r,u,i=n.x,o=n.y,a=rl._;a;)if(r=Hr(a,o)-i,r>Ta)a=a.L;else{if(u=i-Or(a,o),!(u>Ta)){r>-Ta?(t=a.P,e=a):u>-Ta?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var c=Pr(n);if(rl.insert(t,c),t||e){if(t===e)return $r(t),e=Pr(t.site),rl.insert(c,e),c.edge=e.edge=Gr(t.site,c.site),Xr(t),Xr(e),void 0;if(!e)return c.edge=Gr(t.site,c.site),void 0;$r(t),$r(e);var l=t.site,s=l.x,f=l.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,M=v*v+d*d,x={x:(d*y-g*M)/m+s,y:(h*M-v*y)/m+f};Qr(e.edge,l,p,x),c.edge=Gr(l,n,null,x),e.edge=Gr(n,p,null,x),Xr(t),Xr(e)}}function Hr(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var o=n.P;if(!o)return-1/0;e=o.site;var a=e.x,c=e.y,l=c-t;if(!l)return a;var s=a-r,f=1/i-1/l,h=s/l;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*l)-c+l/2+u-i/2)))/f+r:(r+a)/2}function Or(n,t){var e=n.N;if(e)return Hr(e,t);var r=n.site;return r.y===t?r.x:1/0}function Yr(n){this.site=n,this.edges=[]}function Ir(n){for(var t,e,r,u,i,o,a,c,l,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=el,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(a=i.edges,c=a.length,o=0;c>o;)s=a[o].end(),r=s.x,u=s.y,l=a[++o%c].start(),t=l.x,e=l.y,(va(r-t)>Ta||va(u-e)>Ta)&&(a.splice(o,0,new nu(Kr(i.site,s,va(r-f)<Ta&&p-u>Ta?{x:f,y:va(t-f)<Ta?e:p}:va(u-p)<Ta&&h-r>Ta?{x:va(e-p)<Ta?t:h,y:p}:va(r-h)<Ta&&u-g>Ta?{x:h,y:va(t-h)<Ta?e:g}:va(u-g)<Ta&&r-f>Ta?{x:va(e-g)<Ta?t:f,y:g}:null),i.site,null)),++c)}function Zr(n,t){return t.angle-n.angle}function Vr(){eu(this),this.x=this.y=this.arc=this.site=this.cy=null}function Xr(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,u=n.site,i=e.site;if(r!==i){var o=u.x,a=u.y,c=r.x-o,l=r.y-a,s=i.x-o,f=i.y-a,h=2*(c*f-l*s);if(!(h>=-Ra)){var g=c*c+l*l,p=s*s+f*f,v=(f*g-l*p)/h,d=(c*p-s*g)/h,f=d+a,m=al.pop()||new Vr;m.arc=n,m.site=u,m.x=v+o,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,M=il._;M;)if(m.y<M.y||m.y===M.y&&m.x<=M.x){if(!M.L){y=M.P;break}M=M.L}else{if(!M.R){y=M;break}M=M.R}il.insert(y,m),y||(ul=m)}}}}function $r(n){var t=n.circle;t&&(t.P||(ul=t.N),il.remove(t),al.push(t),eu(t),n.circle=null)}function Br(n){for(var t,e=tl,r=Ye(n[0][0],n[0][1],n[1][0],n[1][1]),u=e.length;u--;)t=e[u],(!Wr(t,n)||!r(t)||va(t.a.x-t.b.x)<Ta&&va(t.a.y-t.b.y)<Ta)&&(t.a=t.b=null,e.splice(u,1))}function Wr(n,t){var e=n.b;if(e)return!0;var r,u,i=n.a,o=t[0][0],a=t[1][0],c=t[0][1],l=t[1][1],s=n.l,f=n.r,h=s.x,g=s.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(o>d||d>=a)return;if(h>p){if(i){if(i.y>=l)return}else i={x:d,y:c};e={x:d,y:l}}else{if(i){if(i.y<c)return}else i={x:d,y:l};e={x:d,y:c}}}else if(r=(h-p)/(v-g),u=m-r*d,-1>r||r>1)if(h>p){if(i){if(i.y>=l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else{if(i){if(i.y<c)return}else i={x:(l-u)/r,y:l};e={x:(c-u)/r,y:c}}else if(v>g){if(i){if(i.x>=a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}else{if(i){if(i.x<o)return}else i={x:a,y:r*a+u};e={x:o,y:r*o+u}}return n.a=i,n.b=e,!0}function Jr(n,t){this.l=n,this.r=t,this.a=this.b=null}function Gr(n,t,e,r){var u=new Jr(n,t);return tl.push(u),e&&Qr(u,n,t,e),r&&Qr(u,t,n,r),el[n.i].edges.push(new nu(u,n,t)),el[t.i].edges.push(new nu(u,t,n)),u}function Kr(n,t,e){var r=new Jr(n,null);return r.a=t,r.b=e,tl.push(r),r}function Qr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function nu(n,t,e){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function tu(){this._=null}function eu(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ru(n,t){var e=t,r=t.R,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function uu(n,t){var e=t,r=t.L,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function iu(n){for(;n.L;)n=n.L;return n}function ou(n,t){var e,r,u,i=n.sort(au).pop();for(tl=[],el=new Array(n.length),rl=new tu,il=new tu;;)if(u=ul,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==e||i.y!==r)&&(el[i.i]=new Yr(i),Fr(i),e=i.x,r=i.y),i=n.pop();else{if(!u)break;jr(u.arc)}t&&(Br(t),Ir(t));var o={cells:el,edges:tl};return rl=il=tl=el=null,o}function au(n,t){return t.y-n.y||t.x-n.x}function cu(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function lu(n){return n.x}function su(n){return n.y}function fu(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function hu(n,t,e,r,u,i){if(!n(t,e,r,u,i)){var o=.5*(e+u),a=.5*(r+i),c=t.nodes;c[0]&&hu(n,c[0],e,r,o,a),c[1]&&hu(n,c[1],o,r,u,a),c[2]&&hu(n,c[2],e,a,o,i),c[3]&&hu(n,c[3],o,a,u,i)}}function gu(n,t,e,r,u,i,o){var a,c=1/0;return function l(n,s,f,h,g){if(!(s>i||f>o||r>h||u>g)){if(p=n.point){var p,v=t-p[0],d=e-p[1],m=v*v+d*d;if(c>m){var y=Math.sqrt(c=m);r=t-y,u=e-y,i=t+y,o=e+y,a=p}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+g),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:l(n,s,f,x,b);break;case 1:l(n,x,f,h,b);break;case 2:l(n,s,b,x,g);break;case 3:l(n,x,b,h,g)}}}(n,r,u,i,o),a}function pu(n,t){n=ta.rgb(n),t=ta.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,o=t.g-r,a=t.b-u;return function(n){return"#"+xt(Math.round(e+i*n))+xt(Math.round(r+o*n))+xt(Math.round(u+a*n))}}function vu(n,t){var e,r={},u={};for(e in n)e in t?r[e]=yu(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function du(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function mu(n,t){var e,r,u,i=ll.lastIndex=sl.lastIndex=0,o=-1,a=[],c=[];for(n+="",t+="";(e=ll.exec(n))&&(r=sl.exec(t));)(u=r.index)>i&&(u=t.slice(i,u),a[o]?a[o]+=u:a[++o]=u),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,c.push({i:o,x:du(e,r)})),i=sl.lastIndex;return i<t.length&&(u=t.slice(i),a[o]?a[o]+=u:a[++o]=u),a.length<2?c[0]?(t=c[0].x,function(n){return t(n)+""}):function(){return t}:(t=c.length,function(n){for(var e,r=0;t>r;++r)a[(e=c[r]).i]=e.x(n);return a.join("")})}function yu(n,t){for(var e,r=ta.interpolators.length;--r>=0&&!(e=ta.interpolators[r](n,t)););return e}function Mu(n,t){var e,r=[],u=[],i=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;a>e;++e)r.push(yu(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;o>e;++e)u[e]=t[e];return function(n){for(e=0;a>e;++e)u[e]=r[e](n);return u}}function xu(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function bu(n){return function(t){return 1-n(1-t)}}function _u(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function wu(n){return n*n}function Su(n){return n*n*n}function ku(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Eu(n){return function(t){return Math.pow(t,n)}}function Au(n){return 1-Math.cos(n*ja)}function Nu(n){return Math.pow(2,10*(n-1))}function Cu(n){return 1-Math.sqrt(1-n*n)}function zu(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Pa*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Pa/t)}}function qu(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Lu(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Tu(n,t){n=ta.hcl(n),t=ta.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,o=t.c-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return st(e+i*n,r+o*n,u+a*n)+""}}function Ru(n,t){n=ta.hsl(n),t=ta.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,o=t.s-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return ct(e+i*n,r+o*n,u+a*n)+""}}function Du(n,t){n=ta.lab(n),t=ta.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,o=t.a-r,a=t.b-u;return function(n){return ht(e+i*n,r+o*n,u+a*n)+""}}function Pu(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function Uu(n){var t=[n.a,n.b],e=[n.c,n.d],r=Fu(t),u=ju(t,e),i=Fu(Hu(e,t,-u))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Ha,this.translate=[n.e,n.f],this.scale=[r,i],this.skew=i?Math.atan2(u,i)*Ha:0}function ju(n,t){return n[0]*t[0]+n[1]*t[1]}function Fu(n){var t=Math.sqrt(ju(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Hu(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ou(n,t){var e,r=[],u=[],i=ta.transform(n),o=ta.transform(t),a=i.translate,c=o.translate,l=i.rotate,s=o.rotate,f=i.skew,h=o.skew,g=i.scale,p=o.scale;return a[0]!=c[0]||a[1]!=c[1]?(r.push("translate(",null,",",null,")"),u.push({i:1,x:du(a[0],c[0])},{i:3,x:du(a[1],c[1])})):c[0]||c[1]?r.push("translate("+c+")"):r.push(""),l!=s?(l-s>180?s+=360:s-l>180&&(l+=360),u.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:du(l,s)})):s&&r.push(r.pop()+"rotate("+s+")"),f!=h?u.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:du(f,h)}):h&&r.push(r.pop()+"skewX("+h+")"),g[0]!=p[0]||g[1]!=p[1]?(e=r.push(r.pop()+"scale(",null,",",null,")"),u.push({i:e-4,x:du(g[0],p[0])},{i:e-2,x:du(g[1],p[1])})):(1!=p[0]||1!=p[1])&&r.push(r.pop()+"scale("+p+")"),e=u.length,function(n){for(var t,i=-1;++i<e;)r[(t=u[i]).i]=t.x(n);return r.join("")}}function Yu(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Iu(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Zu(n){for(var t=n.source,e=n.target,r=Xu(t,e),u=[t];t!==r;)t=t.parent,u.push(t);for(var i=u.length;e!==r;)u.splice(i,0,e),e=e.parent;return u}function Vu(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Xu(n,t){if(n===t)return n;for(var e=Vu(n),r=Vu(t),u=e.pop(),i=r.pop(),o=null;u===i;)o=u,u=e.pop(),i=r.pop();return o}function $u(n){n.fixed|=2}function Bu(n){n.fixed&=-7}function Wu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function Ju(n){n.fixed&=-5}function Gu(n,t,e){var r=0,u=0;if(n.charge=0,!n.leaf)for(var i,o=n.nodes,a=o.length,c=-1;++c<a;)i=o[c],null!=i&&(Gu(i,t,e),n.charge+=i.charge,r+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var l=t*e[n.point.index];n.charge+=n.pointCharge=l,r+=l*n.point.x,u+=l*n.point.y}n.cx=r/n.charge,n.cy=u/n.charge}function Ku(n,t){return ta.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=ui,n}function Qu(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(u=n.children)&&(r=u.length))for(var r,u;--r>=0;)e.push(u[r])}function ni(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,o=-1;++o<u;)e.push(i[o]);for(;null!=(n=r.pop());)t(n)}function ti(n){return n.children}function ei(n){return n.value}function ri(n,t){return t.value-n.value}function ui(n){return ta.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function ii(n){return n.x}function oi(n){return n.y}function ai(n,t,e){n.y0=t,n.y=e}function ci(n){return ta.range(n.length)}function li(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function si(n){for(var t,e=1,r=0,u=n[0][1],i=n.length;i>e;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function fi(n){return n.reduce(hi,0)}function hi(n,t){return n+t[1]}function gi(n,t){return pi(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function pi(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function vi(n){return[ta.min(n),ta.max(n)]}function di(n,t){return n.value-t.value}function mi(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function yi(n,t){n._pack_next=t,t._pack_prev=n}function Mi(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function xi(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(l=e.length)){var e,r,u,i,o,a,c,l,s=1/0,f=-1/0,h=1/0,g=-1/0;if(e.forEach(bi),r=e[0],r.x=-r.r,r.y=0,t(r),l>1&&(u=e[1],u.x=u.r,u.y=0,t(u),l>2))for(i=e[2],Si(r,u,i),t(i),mi(r,i),r._pack_prev=i,mi(i,u),u=r._pack_next,o=3;l>o;o++){Si(r,u,i=e[o]);var p=0,v=1,d=1;for(a=u._pack_next;a!==u;a=a._pack_next,v++)if(Mi(a,i)){p=1;break}if(1==p)for(c=r._pack_prev;c!==a._pack_prev&&!Mi(c,i);c=c._pack_prev,d++);p?(d>v||v==d&&u.r<r.r?yi(r,u=a):yi(r=c,u),o--):(mi(r,i),u=i,t(i))}var m=(s+f)/2,y=(h+g)/2,M=0;for(o=0;l>o;o++)i=e[o],i.x-=m,i.y-=y,M=Math.max(M,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=M,e.forEach(_i)}}function bi(n){n._pack_next=n._pack_prev=n}function _i(n){delete n._pack_next,delete n._pack_prev}function wi(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,o=u.length;++i<o;)wi(u[i],t,e,r)}function Si(n,t,e){var r=n.r+e.r,u=t.x-n.x,i=t.y-n.y;if(r&&(u||i)){var o=t.r+e.r,a=u*u+i*i;o*=o,r*=r;var c=.5+(r-o)/(2*a),l=Math.sqrt(Math.max(0,2*o*(r+a)-(r-=a)*r-o*o))/(2*a);e.x=n.x+c*u+l*i,e.y=n.y+c*i-l*u}else e.x=n.x+r,e.y=n.y}function ki(n,t){return n.parent==t.parent?1:2}function Ei(n){var t=n.children;return t.length?t[0]:n.t}function Ai(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ni(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Ci(n){for(var t,e=0,r=0,u=n.children,i=u.length;--i>=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function zi(n,t,e){return n.a.parent===t.parent?n.a:e}function qi(n){return 1+ta.max(n,function(n){return n.y})}function Li(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Ti(n){var t=n.children;return t&&t.length?Ti(t[0]):n}function Ri(n){var t,e=n.children;return e&&(t=e.length)?Ri(e[t-1]):n}function Di(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Pi(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Ui(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function ji(n){return n.rangeExtent?n.rangeExtent():Ui(n.range())}function Fi(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Hi(n,t){var e,r=0,u=n.length-1,i=n[r],o=n[u];return i>o&&(e=r,r=u,u=e,e=i,i=o,o=e),n[r]=t.floor(i),n[u]=t.ceil(o),n}function Oi(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:bl}function Yi(n,t,e,r){var u=[],i=[],o=0,a=Math.min(n.length,t.length)-1;for(n[a]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++o<=a;)u.push(e(n[o-1],n[o])),i.push(r(t[o-1],t[o]));return function(t){var e=ta.bisect(n,t,1,a)-1;return i[e](u[e](t))}}function Ii(n,t,e,r){function u(){var u=Math.min(n.length,t.length)>2?Yi:Fi,c=r?Iu:Yu;return o=u(n,t,c,e),a=u(t,n,c,yu),i}function i(n){return o(n)}var o,a;return i.invert=function(n){return a(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Pu)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return $i(n,t)},i.tickFormat=function(t,e){return Bi(n,t,e)},i.nice=function(t){return Vi(n,t),u()},i.copy=function(){return Ii(n,t,e,r)},u()}function Zi(n,t){return ta.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Vi(n,t){return Hi(n,Oi(Xi(n,t)[2]))}function Xi(n,t){null==t&&(t=10);var e=Ui(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function $i(n,t){return ta.range.apply(ta,Xi(n,t))}function Bi(n,t,e){var r=Xi(n,t);if(e){var u=lc.exec(e);if(u.shift(),"s"===u[8]){var i=ta.formatPrefix(Math.max(va(r[0]),va(r[1])));return u[7]||(u[7]="."+Wi(i.scale(r[2]))),u[8]="f",e=ta.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+Ji(u[8],r)),e=u.join("")}else e=",."+Wi(r[2])+"f";return ta.format(e)}function Wi(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function Ji(n,t){var e=Wi(t[2]);return n in _l?Math.abs(e-Wi(Math.max(va(t[0]),va(t[1]))))+ +("e"!==n):e-2*("%"===n)}function Gi(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(u(t))}return o.invert=function(t){return i(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),o):t},o.nice=function(){var t=Hi(r.map(u),e?Math:Sl);return n.domain(t),r=t.map(i),o},o.ticks=function(){var n=Ui(r),o=[],a=n[0],c=n[1],l=Math.floor(u(a)),s=Math.ceil(u(c)),f=t%1?2:t;if(isFinite(s-l)){if(e){for(;s>l;l++)for(var h=1;f>h;h++)o.push(i(l)*h);o.push(i(l))}else for(o.push(i(l));l++<s;)for(var h=f-1;h>0;h--)o.push(i(l)*h);for(l=0;o[l]<a;l++);for(s=o.length;o[s-1]>c;s--);o=o.slice(l,s)}return o},o.tickFormat=function(n,t){if(!arguments.length)return wl;arguments.length<2?t=wl:"function"!=typeof t&&(t=ta.format(t));var r,a=Math.max(.1,n/o.ticks().length),c=e?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(n){return n/i(c(u(n)+r))<=a?t(n):""}},o.copy=function(){return Gi(n.copy(),t,e,r)},Zi(o,n)}function Ki(n,t,e){function r(t){return n(u(t))}var u=Qi(t),i=Qi(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return $i(e,n)},r.tickFormat=function(n,t){return Bi(e,n,t)},r.nice=function(n){return r.domain(Vi(e,n))},r.exponent=function(o){return arguments.length?(u=Qi(t=o),i=Qi(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return Ki(n.copy(),t,e)},Zi(r,n)}function Qi(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function no(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):0/0))-1)%i.length]}function r(t,e){return ta.range(n.length).map(function(n){return t+e*n})}var u,i,o;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new a;for(var i,o=-1,c=r.length;++o<c;)u.has(i=r[o])||u.set(i,n.push(i));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(i=n,o=0,t={t:"range",a:arguments},e):i},e.rangePoints=function(u,a){arguments.length<2&&(a=0);var c=u[0],l=u[1],s=n.length<2?(c=(c+l)/2,0):(l-c)/(n.length-1+a);return i=r(c+s*a/2,s),o=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(u,a){arguments.length<2&&(a=0);var c=u[0],l=u[1],s=n.length<2?(c=l=Math.round((c+l)/2),0):0|(l-c)/(n.length-1+a);return i=r(c+Math.round(s*a/2+(l-c-(n.length-1+a)*s)/2),s),o=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(u,a,c){arguments.length<2&&(a=0),arguments.length<3&&(c=a);var l=u[1]<u[0],s=u[l-0],f=u[1-l],h=(f-s)/(n.length-a+2*c);return i=r(s+h*c,h),l&&i.reverse(),o=h*(1-a),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(u,a,c){arguments.length<2&&(a=0),arguments.length<3&&(c=a);var l=u[1]<u[0],s=u[l-0],f=u[1-l],h=Math.floor((f-s)/(n.length-a+2*c));return i=r(s+Math.round((f-s-(n.length-a)*h)/2),h),l&&i.reverse(),o=Math.round(h*(1-a)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return o},e.rangeExtent=function(){return Ui(t.a[0])},e.copy=function(){return no(n,t)},e.domain(n)}function to(r,u){function i(){var n=0,t=u.length;for(a=[];++n<t;)a[n-1]=ta.quantile(r,n/t);return o}function o(n){return isNaN(n=+n)?void 0:u[ta.bisect(a,n)]}var a;return o.domain=function(u){return arguments.length?(r=u.map(t).filter(e).sort(n),i()):r},o.range=function(n){return arguments.length?(u=n,i()):u},o.quantiles=function(){return a},o.invertExtent=function(n){return n=u.indexOf(n),0>n?[0/0,0/0]:[n>0?a[n-1]:r[0],n<a.length?a[n]:r[r.length-1]]},o.copy=function(){return to(r,u)},i()}function eo(n,t,e){function r(t){return e[Math.max(0,Math.min(o,Math.floor(i*(t-n))))]}function u(){return i=e.length/(t-n),o=e.length-1,r}var i,o;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],u()):[n,t]},r.range=function(n){return arguments.length?(e=n,u()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?0/0:t/i+n,[t,t+1/i]},r.copy=function(){return eo(n,t,e)},u()}function ro(n,t){function e(e){return e>=e?t[ta.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return ro(n,t)},e}function uo(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return $i(n,t)},t.tickFormat=function(t,e){return Bi(n,t,e)},t.copy=function(){return uo(n)},t}function io(){return 0}function oo(n){return n.innerRadius}function ao(n){return n.outerRadius}function co(n){return n.startAngle}function lo(n){return n.endAngle}function so(n){return n&&n.padAngle}function fo(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function ho(n,t,e,r,u){var i=n[0]-t[0],o=n[1]-t[1],a=(u?r:-r)/Math.sqrt(i*i+o*o),c=a*o,l=-a*i,s=n[0]+c,f=n[1]+l,h=t[0]+c,g=t[1]+l,p=(s+h)/2,v=(f+g)/2,d=h-s,m=g-f,y=d*d+m*m,M=e-r,x=s*g-h*f,b=(0>m?-1:1)*Math.sqrt(M*M*y-x*x),_=(x*m-d*b)/y,w=(-x*d-m*b)/y,S=(x*m+d*b)/y,k=(-x*d+m*b)/y,E=_-p,A=w-v,N=S-p,C=k-v;return E*E+A*A>N*N+C*C&&(_=S,w=k),[[_-c,w-l],[_*e/M,w*e/M]]}function go(n){function t(t){function o(){l.push("M",i(n(s),a))}for(var c,l=[],s=[],f=-1,h=t.length,g=Et(e),p=Et(r);++f<h;)u.call(this,c=t[f],f)?s.push([+g.call(this,c,f),+p.call(this,c,f)]):s.length&&(o(),s=[]);return s.length&&o(),l.length?l.join(""):null}var e=Nr,r=Cr,u=Ce,i=po,o=i.key,a=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(o="function"==typeof n?i=n:(i=zl.get(n)||po).key,t):o},t.tension=function(n){return arguments.length?(a=n,t):a},t}function po(n){return n.join("L")}function vo(n){return po(n)+"Z"}function mo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&u.push("H",r[0]),u.join("")}function yo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("V",(r=n[t])[1],"H",r[0]);return u.join("")}function Mo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r=n[t])[0],"V",r[1]);return u.join("")}function xo(n,t){return n.length<4?po(n):n[1]+wo(n.slice(1,-1),So(n,t))}function bo(n,t){return n.length<3?po(n):n[0]+wo((n.push(n[0]),n),So([n[n.length-2]].concat(n,[n[1]]),t))}function _o(n,t){return n.length<3?po(n):n[0]+wo(n,So(n,t))}function wo(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return po(n);var e=n.length!=t.length,r="",u=n[0],i=n[1],o=t[0],a=o,c=1;if(e&&(r+="Q"+(i[0]-2*o[0]/3)+","+(i[1]-2*o[1]/3)+","+i[0]+","+i[1],u=n[1],c=2),t.length>1){a=t[1],i=n[c],c++,r+="C"+(u[0]+o[0])+","+(u[1]+o[1])+","+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1];for(var l=2;l<t.length;l++,c++)i=n[c],a=t[l],r+="S"+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1]}if(e){var s=n[c];r+="Q"+(i[0]+2*a[0]/3)+","+(i[1]+2*a[1]/3)+","+s[0]+","+s[1]}return r}function So(n,t){for(var e,r=[],u=(1-t)/2,i=n[0],o=n[1],a=1,c=n.length;++a<c;)e=i,i=o,o=n[a],r.push([u*(o[0]-e[0]),u*(o[1]-e[1])]);return r}function ko(n){if(n.length<3)return po(n);var t=1,e=n.length,r=n[0],u=r[0],i=r[1],o=[u,u,u,(r=n[1])[0]],a=[i,i,i,r[1]],c=[u,",",i,"L",Co(Tl,o),",",Co(Tl,a)];for(n.push(n[e-1]);++t<=e;)r=n[t],o.shift(),o.push(r[0]),a.shift(),a.push(r[1]),zo(c,o,a);return n.pop(),c.push("L",r),c.join("")}function Eo(n){if(n.length<4)return po(n);for(var t,e=[],r=-1,u=n.length,i=[0],o=[0];++r<3;)t=n[r],i.push(t[0]),o.push(t[1]);for(e.push(Co(Tl,i)+","+Co(Tl,o)),--r;++r<u;)t=n[r],i.shift(),i.push(t[0]),o.shift(),o.push(t[1]),zo(e,i,o);return e.join("")}function Ao(n){for(var t,e,r=-1,u=n.length,i=u+4,o=[],a=[];++r<4;)e=n[r%u],o.push(e[0]),a.push(e[1]);for(t=[Co(Tl,o),",",Co(Tl,a)],--r;++r<i;)e=n[r%u],o.shift(),o.push(e[0]),a.shift(),a.push(e[1]),zo(t,o,a);return t.join("")}function No(n,t){var e=n.length-1;if(e)for(var r,u,i=n[0][0],o=n[0][1],a=n[e][0]-i,c=n[e][1]-o,l=-1;++l<=e;)r=n[l],u=l/e,r[0]=t*r[0]+(1-t)*(i+u*a),r[1]=t*r[1]+(1-t)*(o+u*c);return ko(n)}function Co(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function zo(n,t,e){n.push("C",Co(ql,t),",",Co(ql,e),",",Co(Ll,t),",",Co(Ll,e),",",Co(Tl,t),",",Co(Tl,e))}function qo(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Lo(n){for(var t=0,e=n.length-1,r=[],u=n[0],i=n[1],o=r[0]=qo(u,i);++t<e;)r[t]=(o+(o=qo(u=i,i=n[t+1])))/2;return r[t]=o,r}function To(n){for(var t,e,r,u,i=[],o=Lo(n),a=-1,c=n.length-1;++a<c;)t=qo(n[a],n[a+1]),va(t)<Ta?o[a]=o[a+1]=0:(e=o[a]/t,r=o[a+1]/t,u=e*e+r*r,u>9&&(u=3*t/Math.sqrt(u),o[a]=u*e,o[a+1]=u*r));for(a=-1;++a<=c;)u=(n[Math.min(c,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),i.push([u||0,o[a]*u||0]);return i}function Ro(n){return n.length<3?po(n):n[0]+wo(n,To(n))}function Do(n){for(var t,e,r,u=-1,i=n.length;++u<i;)t=n[u],e=t[0],r=t[1]-ja,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Po(n){function t(t){function c(){v.push("M",a(n(m),f),s,l(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,M=t.length,x=Et(e),b=Et(u),_=e===r?function(){return g}:Et(r),w=u===i?function(){return p}:Et(i);++y<M;)o.call(this,h=t[y],y)?(d.push([g=+x.call(this,h,y),p=+b.call(this,h,y)]),m.push([+_.call(this,h,y),+w.call(this,h,y)])):d.length&&(c(),d=[],m=[]);return d.length&&c(),v.length?v.join(""):null}var e=Nr,r=Nr,u=0,i=Cr,o=Ce,a=po,c=a.key,l=a,s="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(o=n,t):o},t.interpolate=function(n){return arguments.length?(c="function"==typeof n?a=n:(a=zl.get(n)||po).key,l=a.reverse||a,s=a.closed?"M":"L",t):c
-},t.tension=function(n){return arguments.length?(f=n,t):f},t}function Uo(n){return n.radius}function jo(n){return[n.x,n.y]}function Fo(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-ja;return[e*Math.cos(r),e*Math.sin(r)]}}function Ho(){return 64}function Oo(){return"circle"}function Yo(n){var t=Math.sqrt(n/Da);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Io(n,t,e){return xa(n,Fl),n.namespace=t,n.id=e,n}function Zo(n,t,e,r){var u=n.id,i=n.namespace;return H(n,"function"==typeof e?function(n,o,a){n[i][u].tween.set(t,r(e.call(n,n.__data__,o,a)))}:(e=r(e),function(n){n[i][u].tween.set(t,e)}))}function Vo(n){return null==n&&(n=""),function(){this.textContent=n}}function Xo(n){return null==n?"__transition__":"__transition_"+n+"__"}function $o(n,t,e,r,u){var i=n[e]||(n[e]={active:0,count:0}),o=i[r];if(!o){var c=u.time;o=i[r]={tween:new a,time:c,ease:u.ease,delay:u.delay,duration:u.duration},u=null,++i.count,ta.timer(function(u){function a(e){return i.active>r?s(!1):(i.active=r,o.event&&o.event.start.call(n,f,t),o.tween.forEach(function(e,r){(r=r.call(n,f,t))&&d.push(r)}),ta.timer(function(){return v.c=l(e||1)?Ce:l,1},0,c),void 0)}function l(t){if(i.active!==r)return s(!1);for(var e=t/p,u=h(e),o=d.length;o>0;)d[--o].call(n,u);return e>=1?s(!0):void 0}function s(u){return o.event&&o.event[u?"end":"interrupt"].call(n,f,t),--i.count?delete i[r]:delete n[e],1}var f=n.__data__,h=o.ease,g=o.delay,p=o.duration,v=oc,d=[];return v.t=g+c,u>=g?a(u-g):(v.c=a,void 0)},0,c)}}function Bo(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function Wo(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function Jo(n){return n.toISOString()}function Go(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=ta.bisect(Bl,u);return i==Bl.length?[t.year,Xi(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/Bl[i-1]<Bl[i]/u?i-1:i]:[Gl,Xi(n,e)[2]]}return r.invert=function(t){return Ko(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(Ko)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,Ko(+e+1),t).length}var i=r.domain(),o=Ui(i),a=null==n?u(o,10):"number"==typeof n&&u(o,n);return a&&(n=a[0],t=a[1]),r.domain(Hi(i,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=Ko(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=Ko(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Ui(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],Ko(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return Go(n.copy(),t,e)},Zi(r,n)}function Ko(n){return new Date(n)}function Qo(n){return JSON.parse(n.responseText)}function na(n){var t=ua.createRange();return t.selectNode(ua.body),t.createContextualFragment(n.responseText)}var ta={version:"3.5.0pre"};Date.now||(Date.now=function(){return+new Date});var ea=[].slice,ra=function(n){return ea.call(n)},ua=document,ia=ua.documentElement,oa=window;try{ra(ia.childNodes)[0].nodeType}catch(aa){ra=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}try{ua.createElement("div").style.setProperty("opacity",0,"")}catch(ca){var la=oa.Element.prototype,sa=la.setAttribute,fa=la.setAttributeNS,ha=oa.CSSStyleDeclaration.prototype,ga=ha.setProperty;la.setAttribute=function(n,t){sa.call(this,n,t+"")},la.setAttributeNS=function(n,t,e){fa.call(this,n,t,e+"")},ha.setProperty=function(n,t,e){ga.call(this,n,t+"",e)}}ta.ascending=n,ta.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:0/0},ta.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&e>r&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&e>r&&(e=r)}return e},ta.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&r>e&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&r>e&&(e=r)}return e},ta.extent=function(n,t){var e,r,u,i=-1,o=n.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=n[i])&&r>=r){e=u=r;break}for(;++i<o;)null!=(r=n[i])&&(e>r&&(e=r),r>u&&(u=r))}else{for(;++i<o;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=u=r;break}for(;++i<o;)null!=(r=t.call(n,n[i],i))&&(e>r&&(e=r),r>u&&(u=r))}return[e,u]},ta.sum=function(n,t){var r,u=0,i=n.length,o=-1;if(1===arguments.length)for(;++o<i;)e(r=+n[o])&&(u+=r);else for(;++o<i;)e(r=+t.call(n,n[o],o))&&(u+=r);return u},ta.mean=function(n,r){var u,i=0,o=n.length,a=-1,c=o;if(1===arguments.length)for(;++a<o;)e(u=t(n[a]))?i+=u:--c;else for(;++a<o;)e(u=t(r.call(n,n[a],a)))?i+=u:--c;return c?i/c:void 0},ta.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),u=+n[r-1],i=e-r;return i?u+i*(n[r]-u):u},ta.median=function(r,u){var i,o=[],a=r.length,c=-1;if(1===arguments.length)for(;++c<a;)e(i=t(r[c]))&&o.push(i);else for(;++c<a;)e(i=t(u.call(r,r[c],c)))&&o.push(i);return o.length?ta.quantile(o.sort(n),.5):void 0};var pa=r(n);ta.bisectLeft=pa.left,ta.bisect=ta.bisectRight=pa.right,ta.bisector=function(t){return r(1===t.length?function(e,r){return n(t(e),r)}:t)},ta.shuffle=function(n,t,e){(i=arguments.length)<3&&(e=n.length,2>i&&(t=0));for(var r,u,i=e-t;i;)u=0|Math.random()*i--,r=n[i+t],n[i+t]=n[u+t],n[u+t]=r;return n},ta.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},ta.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},ta.zip=function(){if(!(r=arguments.length))return[];for(var n=-1,t=ta.min(arguments,u),e=new Array(t);++n<t;)for(var r,i=-1,o=e[n]=new Array(r);++i<r;)o[i]=arguments[i][n];return e},ta.transpose=function(n){return ta.zip.apply(ta,n)},ta.keys=function(n){var t=[];for(var e in n)t.push(e);return t},ta.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},ta.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},ta.merge=function(n){for(var t,e,r,u=n.length,i=-1,o=0;++i<u;)o+=n[i].length;for(e=new Array(o);--u>=0;)for(r=n[u],t=r.length;--t>=0;)e[--o]=r[t];return e};var va=Math.abs;ta.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),1/0===(t-n)/e)throw new Error("infinite range");var r,u=[],o=i(va(e)),a=-1;if(n*=o,t*=o,e*=o,0>e)for(;(r=n+e*++a)>t;)u.push(r/o);else for(;(r=n+e*++a)<t;)u.push(r/o);return u},ta.map=function(n,t){var e=new a;if(n instanceof a)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,u=-1,i=n.length;if(1===arguments.length)for(;++u<i;)e.set(u,n[u]);else for(;++u<i;)e.set(t.call(n,r=n[u],u),r)}else for(var o in n)e.set(o,n[o]);return e};var da="__proto__",ma="\x00";o(a,{has:s,get:function(n){return this._[c(n)]},set:function(n,t){return this._[c(n)]=t},remove:f,keys:h,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:l(t),value:this._[t]});return n},size:g,empty:p,forEach:function(n){for(var t in this._)n.call(this,l(t),this._[t])}}),ta.nest=function(){function n(t,o,c){if(c>=i.length)return r?r.call(u,o):e?o.sort(e):o;for(var l,s,f,h,g=-1,p=o.length,v=i[c++],d=new a;++g<p;)(h=d.get(l=v(s=o[g])))?h.push(s):d.set(l,[s]);return t?(s=t(),f=function(e,r){s.set(e,n(t,r,c))}):(s={},f=function(e,r){s[e]=n(t,r,c)}),d.forEach(f),s}function t(n,e){if(e>=i.length)return n;var r=[],u=o[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],o=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(ta.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return o[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},ta.set=function(n){var t=new v;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},o(v,{has:s,add:function(n){return this._[c(n+="")]=!0,n},remove:f,values:h,size:g,empty:p,forEach:function(n){for(var t in this._)n.call(this,l(t))}}),ta.behavior={},ta.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r<u;)n[e=arguments[r]]=d(n,t,t[e]);return n};var ya=["webkit","ms","moz","Moz","o","O"];ta.dispatch=function(){for(var n=new M,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=x(n);return n},M.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},ta.event=null,ta.requote=function(n){return n.replace(Ma,"\\$&")};var Ma=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,xa={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ba=function(n,t){return t.querySelector(n)},_a=function(n,t){return t.querySelectorAll(n)},wa=ia.matches||ia[m(ia,"matchesSelector")],Sa=function(n,t){return wa.call(n,t)};"function"==typeof Sizzle&&(ba=function(n,t){return Sizzle(n,t)[0]||null},_a=Sizzle,Sa=Sizzle.matchesSelector),ta.selection=function(){return Na};var ka=ta.selection.prototype=[];ka.select=function(n){var t,e,r,u,i=[];n=k(n);for(var o=-1,a=this.length;++o<a;){i.push(t=[]),t.parentNode=(r=this[o]).parentNode;for(var c=-1,l=r.length;++c<l;)(u=r[c])?(t.push(e=n.call(u,u.__data__,c,o)),e&&"__data__"in u&&(e.__data__=u.__data__)):t.push(null)}return S(i)},ka.selectAll=function(n){var t,e,r=[];n=E(n);for(var u=-1,i=this.length;++u<i;)for(var o=this[u],a=-1,c=o.length;++a<c;)(e=o[a])&&(r.push(t=ra(n.call(e,e.__data__,a,u))),t.parentNode=e);return S(r)};var Ea={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};ta.ns={prefix:Ea,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&(e=n.slice(0,t),n=n.slice(t+1)),Ea.hasOwnProperty(e)?{space:Ea[e],local:n}:n}},ka.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=ta.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(A(t,n[t]));return this}return this.each(A(n,t))},ka.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=z(n)).length,u=-1;if(t=e.classList){for(;++u<r;)if(!t.contains(n[u]))return!1}else for(t=e.getAttribute("class");++u<r;)if(!C(n[u]).test(t))return!1;return!0}for(t in n)this.each(q(t,n[t]));return this}return this.each(q(n,t))},ka.style=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t="");for(e in n)this.each(T(e,n[e],t));return this}if(2>r)return oa.getComputedStyle(this.node(),null).getPropertyValue(n);e=""}return this.each(T(n,t,e))},ka.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},ka.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},ka.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},ka.append=function(n){return n=D(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},ka.insert=function(n,t){return n=D(n),t=k(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},ka.remove=function(){return this.each(P)},ka.data=function(n,t){function e(n,e){var r,u,i,o=n.length,f=e.length,h=Math.min(o,f),g=new Array(f),p=new Array(f),v=new Array(o);if(t){var d,m=new a,y=new Array(o);for(r=-1;++r<o;)m.has(d=t.call(u=n[r],u.__data__,r))?v[r]=u:m.set(d,u),y[r]=d;for(r=-1;++r<f;)(u=m.get(d=t.call(e,i=e[r],r)))?u!==!0&&(g[r]=u,u.__data__=i):p[r]=U(i),m.set(d,!0);for(r=-1;++r<o;)m.get(y[r])!==!0&&(v[r]=n[r])}else{for(r=-1;++r<h;)u=n[r],i=e[r],u?(u.__data__=i,g[r]=u):p[r]=U(i);for(;f>r;++r)p[r]=U(e[r]);for(;o>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,c.push(p),l.push(g),s.push(v)}var r,u,i=-1,o=this.length;if(!arguments.length){for(n=new Array(o=(r=this[0]).length);++i<o;)(u=r[i])&&(n[i]=u.__data__);return n}var c=O([]),l=S([]),s=S([]);if("function"==typeof n)for(;++i<o;)e(r=this[i],n.call(r,r.parentNode.__data__,i));else for(;++i<o;)e(r=this[i],n);return l.enter=function(){return c},l.exit=function(){return s},l},ka.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},ka.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=j(n));for(var i=0,o=this.length;o>i;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return S(u)},ka.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],u=r.length-1,i=r[u];--u>=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},ka.sort=function(n){n=F.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},ka.each=function(n){return H(this,function(t,e,r){n.call(t,t.__data__,e,r)})},ka.call=function(n){var t=ra(arguments);return n.apply(t[0]=this,t),this},ka.empty=function(){return!this.node()},ka.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},ka.size=function(){var n=0;return H(this,function(){++n}),n};var Aa=[];ta.selection.enter=O,ta.selection.enter.prototype=Aa,Aa.append=ka.append,Aa.empty=ka.empty,Aa.node=ka.node,Aa.call=ka.call,Aa.size=ka.size,Aa.select=function(n){for(var t,e,r,u,i,o=[],a=-1,c=this.length;++a<c;){r=(u=this[a]).update,o.push(t=[]),t.parentNode=u.parentNode;for(var l=-1,s=u.length;++l<s;)(i=u[l])?(t.push(r[l]=e=n.call(u.parentNode,i.__data__,l,a)),e.__data__=i.__data__):t.push(null)}return S(o)},Aa.insert=function(n,t){return arguments.length<2&&(t=Y(this)),ka.insert.call(this,n,t)},ka.transition=function(n){for(var t,e,r=Dl||++Hl,u=Xo(n),i=[],o=Pl||{time:Date.now(),ease:ku,delay:0,duration:250},a=-1,c=this.length;++a<c;){i.push(t=[]);for(var l=this[a],s=-1,f=l.length;++s<f;)(e=l[s])&&$o(e,s,u,r,o),t.push(e)}return Io(i,u,r)},ka.interrupt=function(n){var t=Xo(n);return this.each(function(){var n=this[t];n&&++n.active})},ta.select=function(n){var t=["string"==typeof n?ba(n,ua):n];return t.parentNode=ia,S([t])},ta.selectAll=function(n){var t=ra("string"==typeof n?_a(n,ua):n);return t.parentNode=ia,S([t])};var Na=ta.select(ia);ka.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(Z(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(Z(n,t,e))};var Ca=ta.map({mouseenter:"mouseover",mouseleave:"mouseout"});Ca.forEach(function(n){"on"+n in ua&&Ca.remove(n)});var za="onselectstart"in ua?null:m(ia.style,"userSelect"),qa=0;ta.mouse=function(n){return B(n,_())};var La=/WebKit/.test(oa.navigator.userAgent)?-1:0;ta.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=_().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return B(n,r)},ta.behavior.drag=function(){function n(){this.on("mousedown.drag",u).on("touchstart.drag",i)}function t(n,t,u,i,o){return function(){function a(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],p|=n|e,M=r,g({type:"drag",x:r[0]+l[0],y:r[1]+l[1],dx:n,dy:e}))}function c(){t(h,v)&&(m.on(i+d,null).on(o+d,null),y(p&&ta.event.target===f),g({type:"dragend"}))}var l,s=this,f=ta.event.target,h=s.parentNode,g=e.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=ta.select(u()).on(i+d,a).on(o+d,c),y=$(),M=t(h,v);r?(l=r.apply(s,arguments),l=[l.x-M[0],l.y-M[1]]):l=[0,0],g({type:"dragstart"})}}var e=w(n,"drag","dragstart","dragend"),r=null,u=t(y,ta.mouse,G,"mousemove","mouseup"),i=t(W,ta.touch,J,"touchmove","touchend");return n.origin=function(t){return arguments.length?(r=t,n):r},ta.rebind(n,e,"on")},ta.touches=function(n,t){return arguments.length<2&&(t=_().touches),t?ra(t).map(function(t){var e=B(n,t);return e.identifier=t.identifier,e}):[]};var Ta=1e-6,Ra=Ta*Ta,Da=Math.PI,Pa=2*Da,Ua=Pa-Ta,ja=Da/2,Fa=Da/180,Ha=180/Da,Oa=Math.SQRT2,Ya=2,Ia=4;ta.interpolateZoom=function(n,t){function e(n){var t=n*y;if(m){var e=rt(v),o=i/(Ya*h)*(e*ut(Oa*t+v)-et(v));return[r+o*l,u+o*s,i*e/rt(Oa*t+v)]}return[r+n*l,u+n*s,i*Math.exp(Oa*t)]}var r=n[0],u=n[1],i=n[2],o=t[0],a=t[1],c=t[2],l=o-r,s=a-u,f=l*l+s*s,h=Math.sqrt(f),g=(c*c-i*i+Ia*f)/(2*i*Ya*h),p=(c*c-i*i-Ia*f)/(2*c*Ya*h),v=Math.log(Math.sqrt(g*g+1)-g),d=Math.log(Math.sqrt(p*p+1)-p),m=d-v,y=(m||Math.log(c/i))/Oa;return e.duration=1e3*y,e},ta.behavior.zoom=function(){function n(n){n.on(C,s).on(Xa+".zoom",h).on("dblclick.zoom",g).on(L,f)}function t(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function e(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function r(n){k.k=Math.max(A[0],Math.min(A[1],n))}function u(n,t){t=e(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function i(t,e,i,o){t.__chart__={x:k.x,y:k.y,k:k.k},r(Math.pow(2,o)),u(v=e,i),ta.select(t).transition().duration(350).call(n.event)}function o(){x&&x.domain(M.range().map(function(n){return(n-k.x)/k.k}).map(M.invert)),S&&S.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function a(n){N++||n({type:"zoomstart"})}function c(n){o(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function l(n){--N||n({type:"zoomend"}),v=null}function s(){function n(){s=1,u(ta.mouse(r),h),c(o)}function e(){f.on(z,null).on(q,null),g(s&&ta.event.target===i),l(o)}var r=this,i=ta.event.target,o=T.of(r,arguments),s=0,f=ta.select(oa).on(z,n).on(q,e),h=t(ta.mouse(r)),g=$();I(r),a(o)}function f(){function n(){var n=ta.touches(p);return g=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=t(n))}),n}function e(){var t=ta.event.target;ta.select(t).on(x,o).on(_,h),w.push(t);for(var e=ta.event.changedTouches,r=0,u=e.length;u>r;++r)d[e[r].identifier]=null;var a=n(),c=Date.now();if(1===a.length){if(500>c-y){var l=a[0];i(p,l,d[l.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),b()}y=c}else if(a.length>1){var l=a[0],s=a[1],f=l[0]-s[0],g=l[1]-s[1];m=f*f+g*g}}function o(){var n,t,e,i,o=ta.touches(p);I(p);for(var a=0,l=o.length;l>a;++a,i=null)if(e=o[a],i=d[e.identifier]){if(t)break;n=e,t=i}if(i){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+i[0])/2,(t[1]+i[1])/2],r(f*g)}y=null,u(n,t),c(v)}function h(){if(ta.event.touches.length){for(var t=ta.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}ta.selectAll(w).on(M,null),S.on(C,s).on(L,f),E(),l(v)}var g,p=this,v=T.of(p,arguments),d={},m=0,M=".zoom-"+ta.event.changedTouches[0].identifier,x="touchmove"+M,_="touchend"+M,w=[],S=ta.select(p),E=$();e(),a(v),S.on(C,null).on(L,e)}function h(){var n=T.of(this,arguments);m?clearTimeout(m):(p=t(v=d||ta.mouse(this)),I(this),a(n)),m=setTimeout(function(){m=null,l(n)},50),b(),r(Math.pow(2,.002*Za())*k.k),u(v,p),c(n)}function g(){var n=ta.mouse(this),e=Math.log(k.k)/Math.LN2;i(this,n,t(n),ta.event.shiftKey?Math.ceil(e)-1:Math.floor(e)+1)}var p,v,d,m,y,M,x,_,S,k={x:0,y:0,k:1},E=[960,500],A=Va,N=0,C="mousedown.zoom",z="mousemove.zoom",q="mouseup.zoom",L="touchstart.zoom",T=w(n,"zoomstart","zoom","zoomend");return n.event=function(n){n.each(function(){var n=T.of(this,arguments),t=k;Dl?ta.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},a(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],u=v?v[0]:e/2,i=v?v[1]:r/2,o=ta.interpolateZoom([(u-k.x)/k.k,(i-k.y)/k.k,e/k.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=o(t),a=e/r[2];this.__chart__=k={x:u-r[0]*a,y:i-r[1]*a,k:a},c(n)}}).each("interrupt.zoom",function(){l(n)}).each("end.zoom",function(){l(n)}):(this.__chart__=k,a(n),c(n),l(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},o(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:+t},o(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Va:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(d=t&&[+t[0],+t[1]],n):d},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.x=function(t){return arguments.length?(x=t,M=t.copy(),k={x:0,y:0,k:1},n):x},n.y=function(t){return arguments.length?(S=t,_=t.copy(),k={x:0,y:0,k:1},n):S},ta.rebind(n,T,"on")};var Za,Va=[0,1/0],Xa="onwheel"in ua?(Za=function(){return-ta.event.deltaY*(ta.event.deltaMode?120:1)},"wheel"):"onmousewheel"in ua?(Za=function(){return ta.event.wheelDelta},"mousewheel"):(Za=function(){return-ta.event.detail},"MozMousePixelScroll");ta.color=ot,ot.prototype.toString=function(){return this.rgb()+""},ta.hsl=at;var $a=at.prototype=new ot;$a.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new at(this.h,this.s,this.l/n)},$a.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new at(this.h,this.s,n*this.l)},$a.rgb=function(){return ct(this.h,this.s,this.l)},ta.hcl=lt;var Ba=lt.prototype=new ot;Ba.brighter=function(n){return new lt(this.h,this.c,Math.min(100,this.l+Wa*(arguments.length?n:1)))},Ba.darker=function(n){return new lt(this.h,this.c,Math.max(0,this.l-Wa*(arguments.length?n:1)))},Ba.rgb=function(){return st(this.h,this.c,this.l).rgb()},ta.lab=ft;var Wa=18,Ja=.95047,Ga=1,Ka=1.08883,Qa=ft.prototype=new ot;Qa.brighter=function(n){return new ft(Math.min(100,this.l+Wa*(arguments.length?n:1)),this.a,this.b)},Qa.darker=function(n){return new ft(Math.max(0,this.l-Wa*(arguments.length?n:1)),this.a,this.b)},Qa.rgb=function(){return ht(this.l,this.a,this.b)},ta.rgb=mt;var nc=mt.prototype=new ot;nc.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new mt(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new mt(u,u,u)},nc.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new mt(n*this.r,n*this.g,n*this.b)},nc.hsl=function(){return _t(this.r,this.g,this.b)},nc.toString=function(){return"#"+xt(this.r)+xt(this.g)+xt(this.b)};var tc=ta.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});tc.forEach(function(n,t){tc.set(n,yt(t))}),ta.functor=Et,ta.xhr=Nt(At),ta.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var o=Ct(n,t,null==e?r:u(e),i);return o.row=function(n){return arguments.length?o.response(null==(e=n)?r:u(n)):e},o}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(o).join(n)}function o(n){return a.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var a=new RegExp('["'+n+"\n]"),c=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=l)return o;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++<l;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}s=e+2;var r=n.charCodeAt(e+1);return 13===r?(u=!0,10===n.charCodeAt(e+2)&&++s):10===r&&(u=!0),n.slice(t+1,e).replace(/""/g,'"')}for(;l>s;){var r=n.charCodeAt(s++),a=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++a);else if(r!==c)continue;return n.slice(t,s-a)}return n.slice(t)}for(var r,u,i={},o={},a=[],l=n.length,s=0,f=0;(r=e())!==o;){for(var h=[];r!==i&&r!==o;)h.push(r),r=e();t&&null==(h=t(h,f++))||a.push(h)}return a},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new v,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(o).join(n)].concat(t.map(function(t){return u.map(function(n){return o(t[n])}).join(n)})).join("\n")},e.formatRows=function(n){return n.map(i).join("\n")},e},ta.csv=ta.dsv(",","text/csv"),ta.tsv=ta.dsv(" ","text/tab-separated-values");var ec,rc,uc,ic,oc,ac=oa[m(oa,"requestAnimationFrame")]||function(n){setTimeout(n,17)};ta.timer=function(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,f:!1,n:null};rc?rc.n=i:ec=i,rc=i,uc||(ic=clearTimeout(ic),uc=1,ac(Lt))},ta.timer.flush=function(){Tt(),Rt()},ta.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var cc=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Pt);ta.formatPrefix=function(n,t){var e=0;return n&&(0>n&&(n*=-1),t&&(n=ta.round(n,Dt(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),cc[8+e/3]};var lc=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,sc=ta.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=ta.round(n,Dt(n,t))).toFixed(Math.max(0,Math.min(20,Dt(n*(1+1e-15),t))))}}),fc=ta.time={},hc=Date;Ft.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){gc.setUTCDate.apply(this._,arguments)},setDay:function(){gc.setUTCDay.apply(this._,arguments)},setFullYear:function(){gc.setUTCFullYear.apply(this._,arguments)},setHours:function(){gc.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){gc.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){gc.setUTCMinutes.apply(this._,arguments)},setMonth:function(){gc.setUTCMonth.apply(this._,arguments)},setSeconds:function(){gc.setUTCSeconds.apply(this._,arguments)},setTime:function(){gc.setTime.apply(this._,arguments)}};var gc=Date.prototype;fc.year=Ht(function(n){return n=fc.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),fc.years=fc.year.range,fc.years.utc=fc.year.utc.range,fc.day=Ht(function(n){var t=new hc(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),fc.days=fc.day.range,fc.days.utc=fc.day.utc.range,fc.dayOfYear=function(n){var t=fc.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=fc[n]=Ht(function(n){return(n=fc.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=fc.year(n).getDay();return Math.floor((fc.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});fc[n+"s"]=e.range,fc[n+"s"].utc=e.utc.range,fc[n+"OfYear"]=function(n){var e=fc.year(n).getDay();return Math.floor((fc.dayOfYear(n)+(e+t)%7)/7)}}),fc.week=fc.sunday,fc.weeks=fc.sunday.range,fc.weeks.utc=fc.sunday.utc.range,fc.weekOfYear=fc.sundayOfYear;var pc={"-":"",_:" ",0:"0"},vc=/^\s*\d+/,dc=/^%/;ta.locale=function(n){return{numberFormat:Ut(n),timeFormat:Yt(n)}};var mc=ta.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});ta.format=mc.numberFormat,ta.geo={},le.prototype={s:0,t:0,add:function(n){se(n,this.t,yc),se(yc.s,this.s,this),this.s?this.t+=yc.t:this.s=yc.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var yc=new le;ta.geo.stream=function(n,t){n&&Mc.hasOwnProperty(n.type)?Mc[n.type](n,t):fe(n,t)};var Mc={Feature:function(n,t){fe(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++r<u;)fe(e[r].geometry,t)}},xc={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){he(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)he(e[r],t,0)},Polygon:function(n,t){ge(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)ge(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,u=e.length;++r<u;)fe(e[r],t)
-}};ta.geo.area=function(n){return bc=0,ta.geo.stream(n,wc),bc};var bc,_c=new le,wc={sphere:function(){bc+=4*Da},point:y,lineStart:y,lineEnd:y,polygonStart:function(){_c.reset(),wc.lineStart=pe},polygonEnd:function(){var n=2*_c;bc+=0>n?4*Da+n:n,wc.lineStart=wc.lineEnd=wc.point=y}};ta.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=ve([t*Fa,e*Fa]);if(m){var u=me(m,r),i=[u[1],-u[0],0],o=me(i,u);xe(o),o=be(o);var c=t-p,l=c>0?1:-1,v=o[0]*Ha*l,d=va(c)>180;if(d^(v>l*p&&l*t>v)){var y=o[1]*Ha;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>l*p&&l*t>v)){var y=-o[1]*Ha;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=va(r)>180?r+(r>0?360:-360):r}else v=n,d=e;wc.point(n,e),t(n,e)}function i(){wc.lineStart()}function o(){u(v,d),wc.lineEnd(),va(y)>Ta&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function a(n,t){return(t-=n)<0?t+360:t}function c(n,t){return n[0]-t[0]}function l(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var s,f,h,g,p,v,d,m,y,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=u,b.lineStart=i,b.lineEnd=o,y=0,wc.polygonStart()},polygonEnd:function(){wc.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>_c?(s=-(h=180),f=-(g=90)):y>Ta?g=90:-Ta>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){g=h=-(s=f=1/0),M=[],ta.geo.stream(n,b);var t=M.length;if(t){M.sort(c);for(var e,r=1,u=M[0],i=[u];t>r;++r)e=M[r],l(e[0],u)||l(e[1],u)?(a(u[0],e[1])>a(u[0],u[1])&&(u[1]=e[1]),a(e[0],u[1])>a(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var o,e,p=-1/0,t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(o=a(u[1],e[0]))>p&&(p=o,s=e[0],h=u[1])}return M=x=null,1/0===s||1/0===f?[[0/0,0/0],[0/0,0/0]]:[[s,f],[h,g]]}}(),ta.geo.centroid=function(n){Sc=kc=Ec=Ac=Nc=Cc=zc=qc=Lc=Tc=Rc=0,ta.geo.stream(n,Dc);var t=Lc,e=Tc,r=Rc,u=t*t+e*e+r*r;return Ra>u&&(t=Cc,e=zc,r=qc,Ta>kc&&(t=Ec,e=Ac,r=Nc),u=t*t+e*e+r*r,Ra>u)?[0/0,0/0]:[Math.atan2(e,t)*Ha,tt(r/Math.sqrt(u))*Ha]};var Sc,kc,Ec,Ac,Nc,Cc,zc,qc,Lc,Tc,Rc,Dc={sphere:y,point:we,lineStart:ke,lineEnd:Ee,polygonStart:function(){Dc.lineStart=Ae},polygonEnd:function(){Dc.lineStart=ke}},Pc=Te(Ce,Ue,Fe,[-Da,-Da/2]),Uc=1e9;ta.geo.clipExtent=function(){var n,t,e,r,u,i,o={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(a){return arguments.length?(i=Ie(n=+a[0][0],t=+a[0][1],e=+a[1][0],r=+a[1][1]),u&&(u.valid=!1,u=null),o):[[n,t],[e,r]]}};return o.extent([[0,0],[960,500]])},(ta.geo.conicEqualArea=function(){return Ze(Ve)}).raw=Ve,ta.geo.albers=function(){return ta.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},ta.geo.albersUsa=function(){function n(n){var i=n[0],o=n[1];return t=null,e(i,o),t||(r(i,o),t)||u(i,o),t}var t,e,r,u,i=ta.geo.albers(),o=ta.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=ta.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?o:u>=.166&&.234>u&&r>=-.214&&-.115>r?a:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),o.precision(t),a.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),o.scale(.35*t),a.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var l=i.scale(),s=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[s-.455*l,f-.238*l],[s+.455*l,f+.238*l]]).stream(c).point,r=o.translate([s-.307*l,f+.201*l]).clipExtent([[s-.425*l+Ta,f+.12*l+Ta],[s-.214*l-Ta,f+.234*l-Ta]]).stream(c).point,u=a.translate([s-.205*l,f+.212*l]).clipExtent([[s-.214*l+Ta,f+.166*l+Ta],[s-.115*l-Ta,f+.234*l-Ta]]).stream(c).point,n},n.scale(1070)};var jc,Fc,Hc,Oc,Yc,Ic,Zc={point:y,lineStart:y,lineEnd:y,polygonStart:function(){Fc=0,Zc.lineStart=Xe},polygonEnd:function(){Zc.lineStart=Zc.lineEnd=Zc.point=y,jc+=va(Fc/2)}},Vc={point:$e,lineStart:y,lineEnd:y,polygonStart:y,polygonEnd:y},Xc={point:Je,lineStart:Ge,lineEnd:Ke,polygonStart:function(){Xc.lineStart=Qe},polygonEnd:function(){Xc.point=Je,Xc.lineStart=Ge,Xc.lineEnd=Ke}};ta.geo.path=function(){function n(n){return n&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=u(i)),ta.geo.stream(n,o)),i.result()}function t(){return o=null,n}var e,r,u,i,o,a=4.5;return n.area=function(n){return jc=0,ta.geo.stream(n,u(Zc)),jc},n.centroid=function(n){return Ec=Ac=Nc=Cc=zc=qc=Lc=Tc=Rc=0,ta.geo.stream(n,u(Xc)),Rc?[Lc/Rc,Tc/Rc]:qc?[Cc/qc,zc/qc]:Nc?[Ec/Nc,Ac/Nc]:[0/0,0/0]},n.bounds=function(n){return Yc=Ic=-(Hc=Oc=1/0),ta.geo.stream(n,u(Vc)),[[Hc,Oc],[Yc,Ic]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||er(n):At,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new Be:new nr(n),"function"!=typeof a&&i.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(i.pointRadius(+t),+t),n):a},n.projection(ta.geo.albersUsa()).context(null)},ta.geo.transform=function(n){return{stream:function(t){var e=new rr(t);for(var r in n)e[r]=n[r];return e}}},rr.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},ta.geo.projection=ir,ta.geo.projectionMutator=or,(ta.geo.equirectangular=function(){return ir(cr)}).raw=cr.invert=cr,ta.geo.rotation=function(n){function t(t){return t=n(t[0]*Fa,t[1]*Fa),t[0]*=Ha,t[1]*=Ha,t}return n=sr(n[0]%360*Fa,n[1]*Fa,n.length>2?n[2]*Fa:0),t.invert=function(t){return t=n.invert(t[0]*Fa,t[1]*Fa),t[0]*=Ha,t[1]*=Ha,t},t},lr.invert=cr,ta.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=sr(-n[0]*Fa,-n[1]*Fa,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Ha,n[1]*=Ha}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=pr((t=+r)*Fa,u*Fa),n):t},n.precision=function(r){return arguments.length?(e=pr(t*Fa,(u=+r)*Fa),n):u},n.angle(90)},ta.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Fa,u=n[1]*Fa,i=t[1]*Fa,o=Math.sin(r),a=Math.cos(r),c=Math.sin(u),l=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*o)*e+(e=l*s-c*f*a)*e),c*s+l*f*a)},ta.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return ta.range(Math.ceil(i/d)*d,u,d).map(h).concat(ta.range(Math.ceil(l/m)*m,c,m).map(g)).concat(ta.range(Math.ceil(r/p)*p,e,p).filter(function(n){return va(n%d)>Ta}).map(s)).concat(ta.range(Math.ceil(a/v)*v,o,v).filter(function(n){return va(n%m)>Ta}).map(f))}var e,r,u,i,o,a,c,l,s,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(c).slice(1),h(u).reverse().slice(1),g(l).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],l=+t[0][1],c=+t[1][1],i>u&&(t=i,i=u,u=t),l>c&&(t=l,l=c,c=t),n.precision(y)):[[i,l],[u,c]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),n.precision(y)):[[r,a],[e,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,s=dr(a,o,90),f=mr(r,e,y),h=dr(l,c,90),g=mr(i,u,y),n):y},n.majorExtent([[-180,-90+Ta],[180,90-Ta]]).minorExtent([[-180,-80-Ta],[180,80+Ta]])},ta.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=yr,u=Mr;return n.distance=function(){return ta.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},ta.geo.interpolate=function(n,t){return xr(n[0]*Fa,n[1]*Fa,t[0]*Fa,t[1]*Fa)},ta.geo.length=function(n){return $c=0,ta.geo.stream(n,Bc),$c};var $c,Bc={sphere:y,point:y,lineStart:br,lineEnd:y,polygonStart:y,polygonEnd:y},Wc=_r(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(ta.geo.azimuthalEqualArea=function(){return ir(Wc)}).raw=Wc;var Jc=_r(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},At);(ta.geo.azimuthalEquidistant=function(){return ir(Jc)}).raw=Jc,(ta.geo.conicConformal=function(){return Ze(wr)}).raw=wr,(ta.geo.conicEquidistant=function(){return Ze(Sr)}).raw=Sr;var Gc=_r(function(n){return 1/n},Math.atan);(ta.geo.gnomonic=function(){return ir(Gc)}).raw=Gc,kr.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-ja]},(ta.geo.mercator=function(){return Er(kr)}).raw=kr;var Kc=_r(function(){return 1},Math.asin);(ta.geo.orthographic=function(){return ir(Kc)}).raw=Kc;var Qc=_r(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(ta.geo.stereographic=function(){return ir(Qc)}).raw=Qc,Ar.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-ja]},(ta.geo.transverseMercator=function(){var n=Er(Ar),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ar,ta.geom={},ta.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=Et(e),i=Et(r),o=n.length,a=[],c=[];for(t=0;o>t;t++)a.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(a.sort(qr),t=0;o>t;t++)c.push([a[t][0],-a[t][1]]);var l=zr(a),s=zr(c),f=s[0]===l[0],h=s[s.length-1]===l[l.length-1],g=[];for(t=l.length-1;t>=0;--t)g.push(n[a[l[t]][2]]);for(t=+f;t<s.length-h;++t)g.push(n[a[s[t]][2]]);return g}var e=Nr,r=Cr;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},ta.geom.polygon=function(n){return xa(n,nl),n};var nl=ta.geom.polygon.prototype=[];nl.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t<e;)n=r,r=this[t],u+=n[1]*r[0]-n[0]*r[1];return.5*u},nl.centroid=function(n){var t,e,r=-1,u=this.length,i=0,o=0,a=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++r<u;)t=a,a=this[r],e=t[0]*a[1]-a[0]*t[1],i+=(t[0]+a[0])*e,o+=(t[1]+a[1])*e;return[i*n,o*n]},nl.clip=function(n){for(var t,e,r,u,i,o,a=Rr(n),c=-1,l=this.length-Rr(this),s=this[l-1];++c<l;){for(t=n.slice(),n.length=0,u=this[c],i=t[(r=t.length-a)-1],e=-1;++e<r;)o=t[e],Lr(o,s,u)?(Lr(i,s,u)||n.push(Tr(i,o,s,u)),n.push(o)):Lr(i,s,u)&&n.push(Tr(i,o,s,u)),i=o;a&&n.push(n[0]),s=u}return n};var tl,el,rl,ul,il,ol=[],al=[];Yr.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Zr),t.length},nu.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},tu.prototype={insert:function(n,t){var e,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=iu(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(u=r.R,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.R&&(ru(this,e),n=e,e=n.U),e.C=!1,r.C=!0,uu(this,r))):(u=r.L,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.L&&(uu(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ru(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,u=n.U,i=n.L,o=n.R;if(e=i?o?iu(o):i:o,u?u.L===n?u.L=e:u.R=e:this._=e,i&&o?(r=e.C,e.C=n.C,e.L=i,i.U=e,e!==o?(u=e.U,e.U=n.U,n=e.R,u.L=n,e.R=o,o.U=e):(e.U=u,u=e,n=e.R)):(r=n.C,n=e),n&&(n.U=u),!r){if(n&&n.C)return n.C=!1,void 0;do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,ru(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,uu(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,ru(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,uu(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ru(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,uu(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},ta.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=a[0][0],u=a[0][1],i=a[1][0],o=a[1][1];return ou(e(n),a).cells.forEach(function(e,a){var c=e.edges,l=e.site,s=t[a]=c.length?c.map(function(n){var t=n.start();return[t.x,t.y]}):l.x>=r&&l.x<=i&&l.y>=u&&l.y<=o?[[r,o],[i,o],[i,u],[r,u]]:[];s.point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Ta)*Ta,y:Math.round(o(n,t)/Ta)*Ta,i:t}})}var r=Nr,u=Cr,i=r,o=u,a=cl;return n?t(n):(t.links=function(n){return ou(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return ou(e(n)).cells.forEach(function(e,r){for(var u,i,o=e.site,a=e.edges.sort(Zr),c=-1,l=a.length,s=a[l-1].edge,f=s.l===o?s.r:s.l;++c<l;)u=s,i=f,s=a[c].edge,f=s.l===o?s.r:s.l,r<i.i&&r<f.i&&cu(o,i,f)<0&&t.push([n[r],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=Et(r=n),t):r},t.y=function(n){return arguments.length?(o=Et(u=n),t):u},t.clipExtent=function(n){return arguments.length?(a=null==n?cl:n,t):a===cl?null:a},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):a===cl?null:a&&a[1]},t)};var cl=[[-1e6,-1e6],[1e6,1e6]];ta.geom.delaunay=function(n){return ta.geom.voronoi().triangles(n)},ta.geom.quadtree=function(n,t,e,r,u){function i(n){function i(n,t,e,r,u,i,o,a){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var c=n.x,s=n.y;if(null!=c)if(va(c-e)+va(s-r)<.01)l(n,t,e,r,u,i,o,a);else{var f=n.point;n.x=n.y=n.point=null,l(n,f,c,s,u,i,o,a),l(n,t,e,r,u,i,o,a)}else n.x=e,n.y=r,n.point=t}else l(n,t,e,r,u,i,o,a)}function l(n,t,e,r,u,o,a,c){var l=.5*(u+a),s=.5*(o+c),f=e>=l,h=r>=s,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=fu()),f?u=l:a=l,h?o=s:c=s,i(n,t,e,r,u,o,a,c)}var s,f,h,g,p,v,d,m,y,M=Et(a),x=Et(c);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,o)for(g=0;p>g;++g)s=n[g],s.x<v&&(v=s.x),s.y<d&&(d=s.y),s.x>m&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(g=0;p>g;++g){var b=+M(s=n[g],g),_=+x(s,g);v>b&&(v=b),d>_&&(d=_),b>m&&(m=b),_>y&&(y=_),f.push(b),h.push(_)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=fu();if(k.add=function(n){i(k,n,+M(n,++g),+x(n,g),v,d,m,y)},k.visit=function(n){hu(n,k,v,d,m,y)},k.find=function(n){return gu(k,n[0],n[1],v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=s=null,k}var o,a=Nr,c=Cr;return(o=arguments.length)?(a=lu,c=su,3===o&&(u=e,r=t,e=t=0),i(n)):(i.x=function(n){return arguments.length?(a=n,i):a},i.y=function(n){return arguments.length?(c=n,i):c},i.extent=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,e],[r,u]]},i.size=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=e=0,r=+n[0],u=+n[1]),i):null==t?null:[r-t,u-e]},i)},ta.interpolateRgb=pu,ta.interpolateObject=vu,ta.interpolateNumber=du,ta.interpolateString=mu;var ll=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,sl=new RegExp(ll.source,"g");ta.interpolate=yu,ta.interpolators=[function(n,t){var e=typeof t;return("string"===e?tc.has(t)||/^(#|rgb\(|hsl\()/.test(t)?pu:mu:t instanceof ot?pu:Array.isArray(t)?Mu:"object"===e&&isNaN(t)?vu:du)(n,t)}],ta.interpolateArray=Mu;var fl=function(){return At},hl=ta.map({linear:fl,poly:Eu,quad:function(){return wu},cubic:function(){return Su},sin:function(){return Au},exp:function(){return Nu},circle:function(){return Cu},elastic:zu,back:qu,bounce:function(){return Lu}}),gl=ta.map({"in":At,out:bu,"in-out":_u,"out-in":function(n){return _u(bu(n))}});ta.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=hl.get(e)||fl,r=gl.get(r)||At,xu(r(e.apply(null,ea.call(arguments,1))))},ta.interpolateHcl=Tu,ta.interpolateHsl=Ru,ta.interpolateLab=Du,ta.interpolateRound=Pu,ta.transform=function(n){var t=ua.createElementNS(ta.ns.prefix.svg,"g");return(ta.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new Uu(e?e.matrix:pl)})(n)},Uu.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var pl={a:1,b:0,c:0,d:1,e:0,f:0};ta.interpolateTransform=Ou,ta.layout={},ta.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Zu(n[e]));return t}},ta.layout.chord=function(){function n(){var n,l,f,h,g,p={},v=[],d=ta.range(i),m=[];for(e=[],r=[],n=0,h=-1;++h<i;){for(l=0,g=-1;++g<i;)l+=u[h][g];v.push(l),m.push(ta.range(i)),n+=l}for(o&&d.sort(function(n,t){return o(v[n],v[t])}),a&&m.forEach(function(n,t){n.sort(function(n,e){return a(u[t][n],u[t][e])})}),n=(Pa-s*i)/n,l=0,h=-1;++h<i;){for(f=l,g=-1;++g<i;){var y=d[h],M=m[y][g],x=u[y][M],b=l,_=l+=x*n;p[y+"-"+M]={index:y,subindex:M,startAngle:b,endAngle:_,value:x}}r[y]={index:y,startAngle:f,endAngle:l,value:(l-f)/n},l+=s}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}c&&t()}function t(){e.sort(function(n,t){return c((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,u,i,o,a,c,l={},s=0;return l.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,e=r=null,l):u},l.padding=function(n){return arguments.length?(s=n,e=r=null,l):s},l.sortGroups=function(n){return arguments.length?(o=n,e=r=null,l):o},l.sortSubgroups=function(n){return arguments.length?(a=n,e=null,l):a},l.sortChords=function(n){return arguments.length?(c=n,e&&t(),l):c},l.chords=function(){return e||n(),e},l.groups=function(){return r||n(),r},l},ta.layout.force=function(){function n(n){return function(t,e,r,u){if(t.point!==n){var i=t.cx-n.x,o=t.cy-n.y,a=u-e,c=i*i+o*o;if(c>a*a/d){if(p>c){var l=t.charge/c;n.px-=i*l,n.py-=o*l}return!0}if(t.point&&c&&p>c){var l=t.pointCharge/c;n.px-=i*l,n.py-=o*l}}return!t.charge}}function t(n){n.px=ta.event.x,n.py=ta.event.y,a.resume()}var e,r,u,i,o,a={},c=ta.dispatch("start","tick","end"),l=[1,1],s=.9,f=vl,h=dl,g=-30,p=ml,v=.1,d=.64,m=[],y=[];return a.tick=function(){if((r*=.99)<.005)return c.end({type:"end",alpha:r=0}),!0;var t,e,a,f,h,p,d,M,x,b=m.length,_=y.length;for(e=0;_>e;++e)a=y[e],f=a.source,h=a.target,M=h.x-f.x,x=h.y-f.y,(p=M*M+x*x)&&(p=r*i[e]*((p=Math.sqrt(p))-u[e])/p,M*=p,x*=p,h.x-=M*(d=f.weight/(h.weight+f.weight)),h.y-=x*d,f.x+=M*(d=1-d),f.y+=x*d);if((d=r*v)&&(M=l[0]/2,x=l[1]/2,e=-1,d))for(;++e<b;)a=m[e],a.x+=(M-a.x)*d,a.y+=(x-a.y)*d;if(g)for(Gu(t=ta.geom.quadtree(m),r,o),e=-1;++e<b;)(a=m[e]).fixed||t.visit(n(a));for(e=-1;++e<b;)a=m[e],a.fixed?(a.x=a.px,a.y=a.py):(a.x-=(a.px-(a.px=a.x))*s,a.y-=(a.py-(a.py=a.y))*s);c.tick({type:"tick",alpha:r})},a.nodes=function(n){return arguments.length?(m=n,a):m},a.links=function(n){return arguments.length?(y=n,a):y},a.size=function(n){return arguments.length?(l=n,a):l},a.linkDistance=function(n){return arguments.length?(f="function"==typeof n?n:+n,a):f},a.distance=a.linkDistance,a.linkStrength=function(n){return arguments.length?(h="function"==typeof n?n:+n,a):h},a.friction=function(n){return arguments.length?(s=+n,a):s},a.charge=function(n){return arguments.length?(g="function"==typeof n?n:+n,a):g},a.chargeDistance=function(n){return arguments.length?(p=n*n,a):Math.sqrt(p)},a.gravity=function(n){return arguments.length?(v=+n,a):v},a.theta=function(n){return arguments.length?(d=n*n,a):Math.sqrt(d)},a.alpha=function(n){return arguments.length?(n=+n,r?r=n>0?n:0:n>0&&(c.start({type:"start",alpha:r=n}),ta.timer(a.tick)),a):r},a.start=function(){function n(n,r){if(!e){for(e=new Array(c),a=0;c>a;++a)e[a]=[];for(a=0;l>a;++a){var u=y[a];e[u.source.index].push(u.target),e[u.target.index].push(u.source)}}for(var i,o=e[t],a=-1,l=o.length;++a<l;)if(!isNaN(i=o[a][n]))return i;return Math.random()*r}var t,e,r,c=m.length,s=y.length,p=l[0],v=l[1];for(t=0;c>t;++t)(r=m[t]).index=t,r.weight=0;for(t=0;s>t;++t)r=y[t],"number"==typeof r.source&&(r.source=m[r.source]),"number"==typeof r.target&&(r.target=m[r.target]),++r.source.weight,++r.target.weight;for(t=0;c>t;++t)r=m[t],isNaN(r.x)&&(r.x=n("x",p)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(u=[],"function"==typeof f)for(t=0;s>t;++t)u[t]=+f.call(this,y[t],t);else for(t=0;s>t;++t)u[t]=f;if(i=[],"function"==typeof h)for(t=0;s>t;++t)i[t]=+h.call(this,y[t],t);else for(t=0;s>t;++t)i[t]=h;if(o=[],"function"==typeof g)for(t=0;c>t;++t)o[t]=+g.call(this,m[t],t);else for(t=0;c>t;++t)o[t]=g;return a.resume()},a.resume=function(){return a.alpha(.1)},a.stop=function(){return a.alpha(0)},a.drag=function(){return e||(e=ta.behavior.drag().origin(At).on("dragstart.force",$u).on("drag.force",t).on("dragend.force",Bu)),arguments.length?(this.on("mouseover.force",Wu).on("mouseout.force",Ju).call(e),void 0):e},ta.rebind(a,c,"on")};var vl=20,dl=1,ml=1/0;ta.layout.hierarchy=function(){function n(u){var i,o=[u],a=[];for(u.depth=0;null!=(i=o.pop());)if(a.push(i),(l=e.call(n,i,i.depth))&&(c=l.length)){for(var c,l,s;--c>=0;)o.push(s=l[c]),s.parent=i,s.depth=i.depth+1;r&&(i.value=0),i.children=l}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return ni(u,function(n){var e,u;t&&(e=n.children)&&e.sort(t),r&&(u=n.parent)&&(u.value+=n.value)}),a}var t=ri,e=ti,r=ei;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(Qu(t,function(n){n.children&&(n.value=0)}),ni(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},ta.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(o=i.length)){var o,a,c,l=-1;for(r=t.value?r/t.value:0;++l<o;)n(a=i[l],e,c=a.value*r,u),e+=c}}function t(n){var e=n.children,r=0;if(e&&(u=e.length))for(var u,i=-1;++i<u;)r=Math.max(r,t(e[i]));return 1+r}function e(e,i){var o=r.call(this,e,i);return n(o[0],0,u[0],u[1]/t(o[0])),o}var r=ta.layout.hierarchy(),u=[1,1];return e.size=function(n){return arguments.length?(u=n,e):u},Ku(e,r)},ta.layout.pie=function(){function n(o){var a,c=o.length,l=o.map(function(e,r){return+t.call(n,e,r)}),s=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof u?u.apply(this,arguments):u)-s,h=Math.min(Math.abs(f)/c,+("function"==typeof i?i.apply(this,arguments):i)),g=h*(0>f?-1:1),p=(f-c*g)/ta.sum(l),v=ta.range(c),d=[];return null!=e&&v.sort(e===yl?function(n,t){return l[t]-l[n]}:function(n,t){return e(o[n],o[t])}),v.forEach(function(n){d[n]={data:o[n],value:a=l[n],startAngle:s,endAngle:s+=a*p+g,padAngle:h}}),d}var t=Number,e=yl,r=0,u=Pa,i=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var yl={};ta.layout.stack=function(){function n(a,c){if(!(h=a.length))return a;var l=a.map(function(e,r){return t.call(n,e,r)}),s=l.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),o.call(n,t,e)]})}),f=e.call(n,s,c);l=ta.permute(l,f),s=ta.permute(s,f);var h,g,p,v,d=r.call(n,s,c),m=l[0].length;for(p=0;m>p;++p)for(u.call(n,l[0][p],v=d[p],s[0][p][1]),g=1;h>g;++g)u.call(n,l[g][p],v+=s[g-1][p][1],s[g][p][1]);return a}var t=At,e=ci,r=li,u=ai,i=ii,o=oi;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:Ml.get(t)||ci,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:xl.get(t)||li,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(o=t,n):o},n.out=function(t){return arguments.length?(u=t,n):u},n};var Ml=ta.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(si),i=n.map(fi),o=ta.range(r).sort(function(n,t){return u[n]-u[t]}),a=0,c=0,l=[],s=[];for(t=0;r>t;++t)e=o[t],c>a?(a+=i[e],l.push(e)):(c+=i[e],s.push(e));return s.reverse().concat(l)},reverse:function(n){return ta.range(n.length).reverse()},"default":ci}),xl=ta.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,o=[],a=0,c=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>a&&(a=r),o.push(r)}for(e=0;i>e;++e)c[e]=(a-o[e])/2;return c},wiggle:function(n){var t,e,r,u,i,o,a,c,l,s=n.length,f=n[0],h=f.length,g=[];for(g[0]=c=l=0,e=1;h>e;++e){for(t=0,u=0;s>t;++t)u+=n[t][e][1];for(t=0,i=0,a=f[e][0]-f[e-1][0];s>t;++t){for(r=0,o=(n[t][e][1]-n[t][e-1][1])/(2*a);t>r;++r)o+=(n[r][e][1]-n[r][e-1][1])/a;i+=o*n[t][e][1]}g[e]=c-=u?i/u*a:0,l>c&&(l=c)}for(e=0;h>e;++e)g[e]-=l;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,o=1/u,a=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=o}for(e=0;i>e;++e)a[e]=0;return a},zero:li});ta.layout.histogram=function(){function n(n,i){for(var o,a,c=[],l=n.map(e,this),s=r.call(this,l,i),f=u.call(this,s,l,i),i=-1,h=l.length,g=f.length-1,p=t?1:1/h;++i<g;)o=c[i]=[],o.dx=f[i+1]-(o.x=f[i]),o.y=0;if(g>0)for(i=-1;++i<h;)a=l[i],a>=s[0]&&a<=s[1]&&(o=c[ta.bisect(f,a,1,g)-1],o.y+=p,o.push(n[i]));return c}var t=!0,e=Number,r=vi,u=gi;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=Et(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return pi(n,t)}:Et(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},ta.layout.pack=function(){function n(n,i){var o=e.call(this,n,i),a=o[0],c=u[0],l=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,ni(a,function(n){n.r=+s(n.value)}),ni(a,xi),r){var f=r*(t?1:Math.max(2*a.r/c,2*a.r/l))/2;ni(a,function(n){n.r+=f}),ni(a,xi),ni(a,function(n){n.r-=f})}return wi(a,c/2,l/2,t?1:1/Math.max(2*a.r/c,2*a.r/l)),o}var t,e=ta.layout.hierarchy().sort(di),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},Ku(n,e)},ta.layout.tree=function(){function n(n,u){var s=o.call(this,n,u),f=s[0],h=t(f);if(ni(h,e),h.parent.m=-h.z,Qu(h,r),l)Qu(f,i);else{var g=f,p=f,v=f;Qu(f,function(n){n.x<g.x&&(g=n),n.x>p.x&&(p=n),n.depth>v.depth&&(v=n)});var d=a(g,p)/2-g.x,m=c[0]/(p.x+a(p,g)/2+d),y=c[1]/(v.depth||1);Qu(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var u,i=t.children,o=0,a=i.length;a>o;++o)r.push((i[o]=u={_:i[o],parent:t,children:(u=i[o].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=u);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Ci(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+a(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+a(n._,r._));n.parent.A=u(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,e){if(t){for(var r,u=n,i=n,o=t,c=u.parent.children[0],l=u.m,s=i.m,f=o.m,h=c.m;o=Ai(o),u=Ei(u),o&&u;)c=Ei(c),i=Ai(i),i.a=n,r=o.z+f-u.z-l+a(o._,u._),r>0&&(Ni(zi(o,n,e),n,r),l+=r,s+=r),f+=o.m,l+=u.m,h+=c.m,s+=i.m;o&&!Ai(i)&&(i.t=o,i.m+=f-s),u&&!Ei(c)&&(c.t=u,c.m+=l-h,e=n)}return e}function i(n){n.x*=c[0],n.y=n.depth*c[1]}var o=ta.layout.hierarchy().sort(null).value(null),a=ki,c=[1,1],l=null;return n.separation=function(t){return arguments.length?(a=t,n):a},n.size=function(t){return arguments.length?(l=null==(c=t)?i:null,n):l?null:c},n.nodeSize=function(t){return arguments.length?(l=null==(c=t)?null:i,n):l?c:null},Ku(n,o)},ta.layout.cluster=function(){function n(n,i){var o,a=t.call(this,n,i),c=a[0],l=0;ni(c,function(n){var t=n.children;t&&t.length?(n.x=Li(t),n.y=qi(t)):(n.x=o?l+=e(n,o):0,n.y=0,o=n)});var s=Ti(c),f=Ri(c),h=s.x-e(s,f)/2,g=f.x+e(f,s)/2;return ni(c,u?function(n){n.x=(n.x-c.x)*r[0],n.y=(c.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(c.y?n.y/c.y:1))*r[1]}),a}var t=ta.layout.hierarchy().sort(null).value(null),e=ki,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},Ku(n,t)},ta.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++u<i;)r=(e=n[u]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var o,a,c,l=f(e),s=[],h=i.slice(),p=1/0,v="slice"===g?l.dx:"dice"===g?l.dy:"slice-dice"===g?1&e.depth?l.dy:l.dx:Math.min(l.dx,l.dy);for(n(h,l.dx*l.dy/e.value),s.area=0;(c=h.length)>0;)s.push(o=h[c-1]),s.area+=o.area,"squarify"!==g||(a=r(s,v))<=p?(h.pop(),p=a):(s.area-=s.pop().area,u(s,v,l,!1),v=Math.min(l.dx,l.dy),s.length=s.area=0,p=1/0);s.length&&(u(s,v,l,!0),s.length=s.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,o=f(t),a=r.slice(),c=[];for(n(a,o.dx*o.dy/t.value),c.area=0;i=a.pop();)c.push(i),c.area+=i.area,null!=i.z&&(u(c,i.z?o.dx:o.dy,o,!a.length),c.length=c.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,o=-1,a=n.length;++o<a;)(e=n[o].area)&&(i>e&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,o=n.length,a=e.x,l=e.y,s=t?c(n.area/t):0;if(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++i<o;)u=n[i],u.x=a,u.y=l,u.dy=s,a+=u.dx=Math.min(e.x+e.dx-a,s?c(u.area/s):0);u.z=!0,u.dx+=e.x+e.dx-a,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);++i<o;)u=n[i],u.x=a,u.y=l,u.dx=s,l+=u.dy=Math.min(e.y+e.dy-l,s?c(u.area/s):0);u.z=!1,u.dy+=e.y+e.dy-l,e.x+=s,e.dx-=s}}function i(r){var u=o||a(r),i=u[0];return i.x=0,i.y=0,i.dx=l[0],i.dy=l[1],o&&a.revalue(i),n([i],i.dx*i.dy/i.value),(o?e:t)(i),h&&(o=u),u}var o,a=ta.layout.hierarchy(),c=Math.round,l=[1,1],s=null,f=Di,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(l=n,i):l},i.padding=function(n){function t(t){var e=n.call(i,t,t.depth);return null==e?Di(t):Pi(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Pi(t,n)}if(!arguments.length)return s;var r;return f=null==(s=n)?Di:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,i},i.round=function(n){return arguments.length?(c=n?Math.round:Number,i):c!=Number},i.sticky=function(n){return arguments.length?(h=n,o=null,i):h},i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},Ku(i,a)},ta.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)
-}},logNormal:function(){var n=ta.random.normal.apply(ta,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=ta.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},ta.scale={};var bl={floor:At,ceil:At};ta.scale.linear=function(){return Ii([0,1],[0,1],yu,!1)};var _l={s:1,g:1,p:1,r:1,e:1};ta.scale.log=function(){return Gi(ta.scale.linear().domain([0,1]),10,!0,[1,10])};var wl=ta.format(".0e"),Sl={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};ta.scale.pow=function(){return Ki(ta.scale.linear(),1,[0,1])},ta.scale.sqrt=function(){return ta.scale.pow().exponent(.5)},ta.scale.ordinal=function(){return no([],{t:"range",a:[[]]})},ta.scale.category10=function(){return ta.scale.ordinal().range(kl)},ta.scale.category20=function(){return ta.scale.ordinal().range(El)},ta.scale.category20b=function(){return ta.scale.ordinal().range(Al)},ta.scale.category20c=function(){return ta.scale.ordinal().range(Nl)};var kl=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Mt),El=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Mt),Al=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Mt),Nl=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Mt);ta.scale.quantile=function(){return to([],[])},ta.scale.quantize=function(){return eo(0,1,[0,1])},ta.scale.threshold=function(){return ro([.5],[0,1])},ta.scale.identity=function(){return uo([0,1])},ta.svg={},ta.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),l=Math.max(0,+r.apply(this,arguments)),s=o.apply(this,arguments)-ja,f=a.apply(this,arguments)-ja,h=Math.abs(f-s),g=s>f?0:1;if(n>l&&(p=l,l=n,n=p),h>=Ua)return t(l,g)+(n?t(n,1-g):"")+"Z";var p,v,d,m,y,M,x,b,_,w,S,k,E=0,A=0,N=[];if((m=(+c.apply(this,arguments)||0)/2)&&(d=i===Cl?Math.sqrt(n*n+l*l):+i.apply(this,arguments),g||(A*=-1),l&&(A=tt(d/l*Math.sin(m))),n&&(E=tt(d/n*Math.sin(m)))),l){y=l*Math.cos(s+A),M=l*Math.sin(s+A),x=l*Math.cos(f-A),b=l*Math.sin(f-A);var C=Math.abs(f-s-2*A)<=Da?0:1;if(A&&fo(y,M,x,b)===g^C){var z=(s+f)/2;y=l*Math.cos(z),M=l*Math.sin(z),x=b=null}}else y=M=0;if(n){_=n*Math.cos(f-E),w=n*Math.sin(f-E),S=n*Math.cos(s+E),k=n*Math.sin(s+E);var q=Math.abs(s-f+2*E)<=Da?0:1;if(E&&fo(_,w,S,k)===1-g^q){var L=(s+f)/2;_=n*Math.cos(L),w=n*Math.sin(L),S=k=null}}else _=w=0;if((p=Math.min(Math.abs(l-n)/2,+u.apply(this,arguments)))>.001){v=l>n^g?0:1;var T=null==S?[_,w]:null==x?[y,M]:Tr([y,M],[S,k],[x,b],[_,w]),R=y-T[0],D=M-T[1],P=x-T[0],U=b-T[1],j=1/Math.sin(Math.acos((R*P+D*U)/(Math.sqrt(R*R+D*D)*Math.sqrt(P*P+U*U)))/2),F=Math.sqrt(T[0]*T[0]+T[1]*T[1]);if(null!=x){var H=Math.min(p,(l-F)/(j+1)),O=ho(null==S?[_,w]:[S,k],[y,M],l,H,g),Y=ho([x,b],[_,w],l,H,g);p===H?N.push("M",O[0],"A",H,",",H," 0 0,",v," ",O[1],"A",l,",",l," 0 ",1-g^fo(O[1][0],O[1][1],Y[1][0],Y[1][1]),",",g," ",Y[1],"A",H,",",H," 0 0,",v," ",Y[0]):N.push("M",O[0],"A",H,",",H," 0 1,",v," ",Y[0])}else N.push("M",y,",",M);if(null!=S){var I=Math.min(p,(n-F)/(j-1)),Z=ho([y,M],[S,k],n,-I,g),V=ho([_,w],null==x?[y,M]:[x,b],n,-I,g);p===I?N.push("L",V[0],"A",I,",",I," 0 0,",v," ",V[1],"A",n,",",n," 0 ",g^fo(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-g," ",Z[1],"A",I,",",I," 0 0,",v," ",Z[0]):N.push("L",V[0],"A",I,",",I," 0 0,",v," ",Z[0])}else N.push("L",_,",",w)}else N.push("M",y,",",M),null!=x&&N.push("A",l,",",l," 0 ",C,",",g," ",x,",",b),N.push("L",_,",",w),null!=S&&N.push("A",n,",",n," 0 ",q,",",1-g," ",S,",",k);return N.push("Z"),N.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=oo,r=ao,u=io,i=Cl,o=co,a=lo,c=so;return n.innerRadius=function(t){return arguments.length?(e=Et(t),n):e},n.outerRadius=function(t){return arguments.length?(r=Et(t),n):r},n.cornerRadius=function(t){return arguments.length?(u=Et(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==Cl?Cl:Et(t),n):i},n.startAngle=function(t){return arguments.length?(o=Et(t),n):o},n.endAngle=function(t){return arguments.length?(a=Et(t),n):a},n.padAngle=function(t){return arguments.length?(c=Et(t),n):c},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-ja;return[Math.cos(t)*n,Math.sin(t)*n]},n};var Cl="auto";ta.svg.line=function(){return go(At)};var zl=ta.map({linear:po,"linear-closed":vo,step:mo,"step-before":yo,"step-after":Mo,basis:ko,"basis-open":Eo,"basis-closed":Ao,bundle:No,cardinal:_o,"cardinal-open":xo,"cardinal-closed":bo,monotone:Ro});zl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var ql=[0,2/3,1/3,0],Ll=[0,1/3,2/3,0],Tl=[0,1/6,2/3,1/6];ta.svg.line.radial=function(){var n=go(Do);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},yo.reverse=Mo,Mo.reverse=yo,ta.svg.area=function(){return Po(At)},ta.svg.area.radial=function(){var n=Po(Do);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},ta.svg.chord=function(){function n(n,a){var c=t(this,i,n,a),l=t(this,o,n,a);return"M"+c.p0+r(c.r,c.p1,c.a1-c.a0)+(e(c,l)?u(c.r,c.p1,c.r,c.p0):u(c.r,c.p1,l.r,l.p0)+r(l.r,l.p1,l.a1-l.a0)+u(l.r,l.p1,c.r,c.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=a.call(n,u,r),o=c.call(n,u,r)-ja,s=l.call(n,u,r)-ja;return{r:i,a0:o,a1:s,p0:[i*Math.cos(o),i*Math.sin(o)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>Da)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=yr,o=Mr,a=Uo,c=co,l=lo;return n.radius=function(t){return arguments.length?(a=Et(t),n):a},n.source=function(t){return arguments.length?(i=Et(t),n):i},n.target=function(t){return arguments.length?(o=Et(t),n):o},n.startAngle=function(t){return arguments.length?(c=Et(t),n):c},n.endAngle=function(t){return arguments.length?(l=Et(t),n):l},n},ta.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),o=e.call(this,n,u),a=(i.y+o.y)/2,c=[i,{x:i.x,y:a},{x:o.x,y:a},o];return c=c.map(r),"M"+c[0]+"C"+c[1]+" "+c[2]+" "+c[3]}var t=yr,e=Mr,r=jo;return n.source=function(e){return arguments.length?(t=Et(e),n):t},n.target=function(t){return arguments.length?(e=Et(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},ta.svg.diagonal.radial=function(){var n=ta.svg.diagonal(),t=jo,e=n.projection;return n.projection=function(n){return arguments.length?e(Fo(t=n)):t},n},ta.svg.symbol=function(){function n(n,r){return(Rl.get(t.call(this,n,r))||Yo)(e.call(this,n,r))}var t=Oo,e=Ho;return n.type=function(e){return arguments.length?(t=Et(e),n):t},n.size=function(t){return arguments.length?(e=Et(t),n):e},n};var Rl=ta.map({circle:Yo,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*jl)),e=t*jl;return"M0,"+-t+"L"+e+",0"+" 0,"+t+" "+-e+",0"+"Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/Ul),e=t*Ul/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/Ul),e=t*Ul/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});ta.svg.symbolTypes=Rl.keys();var Dl,Pl,Ul=Math.sqrt(3),jl=Math.tan(30*Fa),Fl=[],Hl=0;Fl.call=ka.call,Fl.empty=ka.empty,Fl.node=ka.node,Fl.size=ka.size,ta.transition=function(n){return arguments.length?Dl?n.transition():n:Na.transition()},ta.transition.prototype=Fl,Fl.select=function(n){var t,e,r,u=this.id,i=this.namespace,o=[];n=k(n);for(var a=-1,c=this.length;++a<c;){o.push(t=[]);for(var l=this[a],s=-1,f=l.length;++s<f;)(r=l[s])&&(e=n.call(r,r.__data__,s,a))?("__data__"in r&&(e.__data__=r.__data__),$o(e,s,i,u,r[i][u]),t.push(e)):t.push(null)}return Io(o,i,u)},Fl.selectAll=function(n){var t,e,r,u,i,o=this.id,a=this.namespace,c=[];n=E(n);for(var l=-1,s=this.length;++l<s;)for(var f=this[l],h=-1,g=f.length;++h<g;)if(r=f[h]){i=r[a][o],e=n.call(r,r.__data__,h,l),c.push(t=[]);for(var p=-1,v=e.length;++p<v;)(u=e[p])&&$o(u,p,a,o,i),t.push(u)}return Io(c,a,o)},Fl.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=j(n));for(var i=0,o=this.length;o>i;i++){u.push(t=[]);for(var e=this[i],a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return Io(u,this.namespace,this.id)},Fl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):H(this,null==t?function(t){t[r][e].tween.remove(n)}:function(u){u[r][e].tween.set(n,t)})},Fl.attr=function(n,t){function e(){this.removeAttribute(a)}function r(){this.removeAttributeNS(a.space,a.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(a);return e!==n&&(t=o(e,n),function(n){this.setAttribute(a,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(a.space,a.local);return e!==n&&(t=o(e,n),function(n){this.setAttributeNS(a.space,a.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var o="transform"==n?Ou:yu,a=ta.ns.qualify(n);return Zo(this,"attr."+n,t,a.local?i:u)},Fl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=ta.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Fl.style=function(n,t,e){function r(){this.style.removeProperty(n)}function u(t){return null==t?r:(t+="",function(){var r,u=oa.getComputedStyle(this,null).getPropertyValue(n);return u!==t&&(r=yu(u,t),function(t){this.style.setProperty(n,r(t),e)})})}var i=arguments.length;if(3>i){if("string"!=typeof n){2>i&&(t="");for(e in n)this.style(e,n[e],t);return this}e=""}return Zo(this,"style."+n,t,u)},Fl.styleTween=function(n,t,e){function r(r,u){var i=t.call(this,r,u,oa.getComputedStyle(this,null).getPropertyValue(n));return i&&function(t){this.style.setProperty(n,i(t),e)}}return arguments.length<3&&(e=""),this.tween("style."+n,r)},Fl.text=function(n){return Zo(this,"text",n,Vo)},Fl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Fl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=ta.ease.apply(ta,arguments)),H(this,function(r){r[e][t].ease=n}))},Fl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:H(this,"function"==typeof n?function(r,u,i){r[e][t].delay=+n.call(r,r.__data__,u,i)}:(n=+n,function(r){r[e][t].delay=n}))},Fl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:H(this,"function"==typeof n?function(r,u,i){r[e][t].duration=Math.max(1,n.call(r,r.__data__,u,i))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Fl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var u=Pl,i=Dl;Dl=e,H(this,function(t,u,i){Pl=t[r][e],n.call(t,t.__data__,u,i)}),Pl=u,Dl=i}else H(this,function(u){var i=u[r][e];(i.event||(i.event=ta.dispatch("start","end","interrupt"))).on(n,t)});return this},Fl.transition=function(){for(var n,t,e,r,u=this.id,i=++Hl,o=this.namespace,a=[],c=0,l=this.length;l>c;c++){a.push(n=[]);for(var t=this[c],s=0,f=t.length;f>s;s++)(e=t[s])&&(r=e[o][u],$o(e,s,o,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Io(a,o,i)},ta.svg.axis=function(){function n(n){n.each(function(){var n,l=ta.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==c?f.ticks?f.ticks.apply(f,a):f.domain():c,g=null==t?f.tickFormat?f.tickFormat.apply(f,a):At:t,p=l.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Ta),d=ta.transition(p.exit()).style("opacity",Ta).remove(),m=ta.transition(p.order()).style("opacity",1),y=Math.max(u,0)+o,M=ji(f),x=l.selectAll(".domain").data([0]),b=(x.enter().append("path").attr("class","domain"),ta.transition(x));v.append("line"),v.append("text");var _,w,S,k,E=v.select("line"),A=m.select("line"),N=p.select("text").text(g),C=v.select("text"),z=m.select("text"),q="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=Bo,_="x",S="y",w="x2",k="y2",N.attr("dy",0>q?"0em":".71em").style("text-anchor","middle"),b.attr("d","M"+M[0]+","+q*i+"V0H"+M[1]+"V"+q*i)):(n=Wo,_="y",S="x",w="y2",k="x2",N.attr("dy",".32em").style("text-anchor",0>q?"end":"start"),b.attr("d","M"+q*i+","+M[0]+"H0V"+M[1]+"H"+q*i)),E.attr(k,q*u),C.attr(S,q*y),A.attr(w,0).attr(k,q*u),z.attr(_,0).attr(S,q*y),f.rangeBand){var L=f,T=L.rangeBand()/2;s=f=function(n){return L(n)+T}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,e=ta.scale.linear(),r=Ol,u=6,i=6,o=3,a=[10],c=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Yl?t+"":Ol,n):r},n.ticks=function(){return arguments.length?(a=arguments,n):a},n.tickValues=function(t){return arguments.length?(c=t,n):c},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(o=+t,n):o},n.tickSubdivide=function(){return arguments.length&&n},n};var Ol="bottom",Yl={top:1,right:1,bottom:1,left:1};ta.svg.brush=function(){function n(i){i.each(function(){var i=ta.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",u).on("touchstart.brush",u),o=i.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),i.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=i.selectAll(".resize").data(p,At);a.exit().remove(),a.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return Il[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",n.empty()?"none":null);var s,f=ta.transition(i),h=ta.transition(o);c&&(s=ji(c),h.attr("x",s[0]).attr("width",s[1]-s[0]),e(f)),l&&(s=ji(l),h.attr("y",s[0]).attr("height",s[1]-s[0]),r(f)),t(f)})}function t(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+s[+/e$/.test(n)]+","+f[+/^s/.test(n)]+")"})}function e(n){n.select(".extent").attr("x",s[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",s[1]-s[0])}function r(n){n.select(".extent").attr("y",f[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1]-f[0])}function u(){function u(){32==ta.event.keyCode&&(N||(y=null,z[0]-=s[1],z[1]-=f[1],N=2),b())}function p(){32==ta.event.keyCode&&2==N&&(z[0]+=s[1],z[1]+=f[1],N=0,b())}function v(){var n=ta.mouse(x),u=!1;M&&(n[0]+=M[0],n[1]+=M[1]),N||(ta.event.altKey?(y||(y=[(s[0]+s[1])/2,(f[0]+f[1])/2]),z[0]=s[+(n[0]<y[0])],z[1]=f[+(n[1]<y[1])]):y=null),E&&d(n,c,0)&&(e(S),u=!0),A&&d(n,l,1)&&(r(S),u=!0),u&&(t(S),w({type:"brush",mode:N?"move":"resize"}))}function d(n,t,e){var r,u,a=ji(t),c=a[0],l=a[1],p=z[e],v=e?f:s,d=v[1]-v[0];return N&&(c-=p,l-=d+p),r=(e?g:h)?Math.max(c,Math.min(l,n[e])):n[e],N?u=(r+=p)+d:(y&&(p=Math.max(c,Math.min(l,2*y[e]-r))),r>p?(u=r,r=p):u=p),v[0]!=r||v[1]!=u?(e?o=null:i=null,v[0]=r,v[1]=u,!0):void 0}function m(){v(),S.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),ta.select("body").style("cursor",null),q.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),C(),w({type:"brushend"})}var y,M,x=this,_=ta.select(ta.event.target),w=a.of(x,arguments),S=ta.select(x),k=_.datum(),E=!/^(n|s)$/.test(k)&&c,A=!/^(e|w)$/.test(k)&&l,N=_.classed("extent"),C=$(),z=ta.mouse(x),q=ta.select(oa).on("keydown.brush",u).on("keyup.brush",p);if(ta.event.changedTouches?q.on("touchmove.brush",v).on("touchend.brush",m):q.on("mousemove.brush",v).on("mouseup.brush",m),S.interrupt().selectAll("*").interrupt(),N)z[0]=s[0]-z[0],z[1]=f[0]-z[1];else if(k){var L=+/w$/.test(k),T=+/^n/.test(k);M=[s[1-L]-z[0],f[1-T]-z[1]],z[0]=s[L],z[1]=f[T]}else ta.event.altKey&&(y=z.slice());S.style("pointer-events","none").selectAll(".resize").style("display",null),ta.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),v()}var i,o,a=w(n,"brushstart","brush","brushend"),c=null,l=null,s=[0,0],f=[0,0],h=!0,g=!0,p=Zl[0];return n.event=function(n){n.each(function(){var n=a.of(this,arguments),t={x:s,y:f,i:i,j:o},e=this.__chart__||t;this.__chart__=t,Dl?ta.select(this).transition().each("start.brush",function(){i=e.i,o=e.j,s=e.x,f=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=Mu(s,t.x),r=Mu(f,t.y);return i=o=null,function(u){s=t.x=e(u),f=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){i=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,p=Zl[!c<<1|!l],n):c},n.y=function(t){return arguments.length?(l=t,p=Zl[!c<<1|!l],n):l},n.clamp=function(t){return arguments.length?(c&&l?(h=!!t[0],g=!!t[1]):c?h=!!t:l&&(g=!!t),n):c&&l?[h,g]:c?h:l?g:null},n.extent=function(t){var e,r,u,a,h;return arguments.length?(c&&(e=t[0],r=t[1],l&&(e=e[0],r=r[0]),i=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(h=e,e=r,r=h),(e!=s[0]||r!=s[1])&&(s=[e,r])),l&&(u=t[0],a=t[1],c&&(u=u[1],a=a[1]),o=[u,a],l.invert&&(u=l(u),a=l(a)),u>a&&(h=u,u=a,a=h),(u!=f[0]||a!=f[1])&&(f=[u,a])),n):(c&&(i?(e=i[0],r=i[1]):(e=s[0],r=s[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(h=e,e=r,r=h))),l&&(o?(u=o[0],a=o[1]):(u=f[0],a=f[1],l.invert&&(u=l.invert(u),a=l.invert(a)),u>a&&(h=u,u=a,a=h))),c&&l?[[e,u],[r,a]]:c?[e,r]:l&&[u,a])},n.clear=function(){return n.empty()||(s=[0,0],f=[0,0],i=o=null),n},n.empty=function(){return!!c&&s[0]==s[1]||!!l&&f[0]==f[1]},ta.rebind(n,a,"on")};var Il={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Zl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Vl=fc.format=mc.timeFormat,Xl=Vl.utc,$l=Xl("%Y-%m-%dT%H:%M:%S.%LZ");Vl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Jo:$l,Jo.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},Jo.toString=$l.toString,fc.second=Ht(function(n){return new hc(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),fc.seconds=fc.second.range,fc.seconds.utc=fc.second.utc.range,fc.minute=Ht(function(n){return new hc(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),fc.minutes=fc.minute.range,fc.minutes.utc=fc.minute.utc.range,fc.hour=Ht(function(n){var t=n.getTimezoneOffset()/60;return new hc(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),fc.hours=fc.hour.range,fc.hours.utc=fc.hour.utc.range,fc.month=Ht(function(n){return n=fc.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),fc.months=fc.month.range,fc.months.utc=fc.month.utc.range;var Bl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Wl=[[fc.second,1],[fc.second,5],[fc.second,15],[fc.second,30],[fc.minute,1],[fc.minute,5],[fc.minute,15],[fc.minute,30],[fc.hour,1],[fc.hour,3],[fc.hour,6],[fc.hour,12],[fc.day,1],[fc.day,2],[fc.week,1],[fc.month,1],[fc.month,3],[fc.year,1]],Jl=Vl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",Ce]]),Gl={range:function(n,t,e){return ta.range(Math.ceil(n/e)*e,+t,e).map(Ko)},floor:At,ceil:At};Wl.year=fc.year,fc.scale=function(){return Go(ta.scale.linear(),Wl,Jl)};var Kl=Wl.map(function(n){return[n[0].utc,n[1]]}),Ql=Xl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",Ce]]);Kl.year=fc.year.utc,fc.scale.utc=function(){return Go(ta.scale.linear(),Kl,Ql)},ta.text=Nt(function(n){return n.responseText}),ta.json=function(n,t){return Ct(n,"application/json",Qo,t)},ta.html=function(n,t){return Ct(n,"text/html",na,t)},ta.xml=Nt(function(n){return n.responseXML}),"function"==typeof define&&define.amd?define(ta):"object"==typeof module&&module.exports&&(module.exports=ta),this.d3=ta}(); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/d3.layout.cloud.js b/ecomp-portal-BE/war/static/fusion/d3/js/d3.layout.cloud.js
deleted file mode 100644
index 44c4f7de..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/d3.layout.cloud.js
+++ /dev/null
@@ -1,433 +0,0 @@
-// Word cloud layout by Jason Davies, http://www.jasondavies.com/word-cloud/
-// Algorithm due to Jonathan Feinberg, http://static.mrfeinberg.com/bv_ch03.pdf
-(function() {
- function cloud() {
- var size = [256, 256],
- text = cloudText,
- font = cloudFont,
- fontSize = cloudFontSize,
- fontStyle = cloudFontNormal,
- fontWeight = cloudFontNormal,
- rotate = cloudRotate,
- padding = cloudPadding,
- spiral = archimedeanSpiral,
- words = [],
- timeInterval = Infinity,
- event = d3.dispatch("word", "end"),
- timer = null,
- cloud = {};
-
- cloud.start = function() {
- var board = zeroArray((size[0] >> 5) * size[1]),
- bounds = null,
- n = words.length,
- i = -1,
- tags = [],
- data = words.map(function(d, i) {
- d.text = text.call(this, d, i);
- d.font = font.call(this, d, i);
- d.style = fontStyle.call(this, d, i);
- d.weight = fontWeight.call(this, d, i);
- d.rotate = rotate.call(this, d, i);
- d.size = ~~fontSize.call(this, d, i);
- d.padding = padding.call(this, d, i);
- return d;
- }).sort(function(a, b) { return b.size - a.size; });
-// createMask();
-/* var bd = 3000;
- while (bd < 4000) {
- board[bd] = -1;
- bd++
- }
- */
- function createMask()
- {
- d3.select("body").append("canvas").attr("id", "maskCanvas")
- maskCanvas = document.getElementById('maskCanvas'),
- maskCanvas.width = 85;
- maskCanvas.height = 85;
- maskContext = maskCanvas.getContext('2d');
- maskImage = new Image();
- maskImage.src = 'mask.png';
- maskImage.onload = function(){
- maskContext.drawImage(maskImage,0,0,85,85 * maskImage.height / maskImage.width);
- maskData = maskContext.getImageData(0,0,85,85).data;
-/*
- var hh = 0;
- while (hh < maskData.length) {
- if (hh%4 == 0) {
- if (maskData[hh] == 0) {
- board[~~(hh/4)] = -1;
- }
- }
- hh++;
- }
- */
-
- }
- }
- if (timer) clearInterval(timer);
- timer = setInterval(step, 0);
- step();
-
- return cloud;
-
- function step() {
- var start = +new Date,
- d;
- while (+new Date - start < timeInterval && ++i < n && timer) {
- d = data[i];
- d.x = (size[0] * (Math.random() + .5)) >> 1;
- d.y = (size[1] * (Math.random() + .5)) >> 1;
- cloudSprite(d, data, i);
- if (d.hasText && place(board, d, bounds)) {
- tags.push(d);
- event.word(d);
- if (bounds) cloudBounds(bounds, d);
- else bounds = [{x: d.x + d.x0, y: d.y + d.y0}, {x: d.x + d.x1, y: d.y + d.y1}];
- // Temporary hack
- d.x -= size[0] >> 1;
- d.y -= size[1] >> 1;
- }
- }
- if (i >= n) {
- cloud.stop();
- event.end(tags, bounds);
- }
- }
- }
-
- cloud.stop = function() {
- if (timer) {
- clearInterval(timer);
- timer = null;
- }
- return cloud;
- };
-
- cloud.timeInterval = function(x) {
- if (!arguments.length) return timeInterval;
- timeInterval = x == null ? Infinity : x;
- return cloud;
- };
-
- function place(board, tag, bounds) {
- var perimeter = [{x: 0, y: 0}, {x: size[0], y: size[1]}],
- startX = tag.x,
- startY = tag.y,
- maxDelta = Math.sqrt(size[0] * size[0] + size[1] * size[1]),
- s = spiral(size),
- dt = Math.random() < .5 ? 1 : -1,
- t = -dt,
- dxdy,
- dx,
- dy;
-
- while (dxdy = s(t += dt)) {
- dx = ~~dxdy[0];
- dy = ~~dxdy[1];
-
- if (Math.min(dx, dy) > maxDelta) break;
-
- tag.x = startX + dx;
- tag.y = startY + dy;
-
- if (tag.x + tag.x0 < 0 || tag.y + tag.y0 < 0 ||
- tag.x + tag.x1 > size[0] || tag.y + tag.y1 > size[1]) continue;
- // TODO only check for collisions within current bounds.
- if (!bounds || !cloudCollide(tag, board, size[0])) {
- if (!bounds || collideRects(tag, bounds)) {
- var sprite = tag.sprite,
- w = tag.width >> 5,
- sw = size[0] >> 5,
- lx = tag.x - (w << 4),
- sx = lx & 0x7f,
- msx = 32 - sx,
- h = tag.y1 - tag.y0,
- x = (tag.y + tag.y0) * sw + (lx >> 5),
- last;
- for (var j = 0; j < h; j++) {
- last = 0;
- for (var i = 0; i <= w; i++) {
- board[x + i] |= (last << msx) | (i < w ? (last = sprite[j * w + i]) >>> sx : 0);
- }
- x += sw;
- }
- delete tag.sprite;
- return true;
- }
- }
- }
- return false;
- }
-
- cloud.words = function(x) {
- if (!arguments.length) return words;
- words = x;
- return cloud;
- };
-
- cloud.size = function(x) {
- if (!arguments.length) return size;
- size = [+x[0], +x[1]];
- return cloud;
- };
-
- cloud.font = function(x) {
- if (!arguments.length) return font;
- font = d3.functor(x);
- return cloud;
- };
-
- cloud.fontStyle = function(x) {
- if (!arguments.length) return fontStyle;
- fontStyle = d3.functor(x);
- return cloud;
- };
-
- cloud.fontWeight = function(x) {
- if (!arguments.length) return fontWeight;
- fontWeight = d3.functor(x);
- return cloud;
- };
-
- cloud.rotate = function(x) {
- if (!arguments.length) return rotate;
- rotate = d3.functor(x);
- return cloud;
- };
-
- cloud.text = function(x) {
- if (!arguments.length) return text;
- text = d3.functor(x);
- return cloud;
- };
-
- cloud.spiral = function(x) {
- if (!arguments.length) return spiral;
- spiral = spirals[x + ""] || x;
- return cloud;
- };
-
- cloud.fontSize = function(x) {
- if (!arguments.length) return fontSize;
- fontSize = d3.functor(x);
- return cloud;
- };
-
- cloud.padding = function(x) {
- if (!arguments.length) return padding;
- padding = d3.functor(x);
- return cloud;
- };
-
- return d3.rebind(cloud, event, "on");
- }
-
- function cloudText(d) {
- return d.text;
- }
-
- function cloudFont() {
- return "serif";
- }
-
- function cloudFontNormal() {
- return "normal";
- }
-
- function cloudFontSize(d) {
- return Math.sqrt(d.value);
- }
-
- function cloudRotate() {
- return (~~(Math.random() * 6) - 3) * 30;
- }
-
- function cloudPadding() {
- return 1;
- }
-
- // Fetches a monochrome sprite bitmap for the specified text.
- // Load in batches for speed.
- function cloudSprite(d, data, di) {
- if (d.sprite) return;
- c.clearRect(0, 0, (cw << 5) / ratio, ch / ratio);
- var x = 0,
- y = 0,
- maxh = 0,
- n = data.length;
- --di;
- while (++di < n) {
- d = data[di];
- c.save();
- c.font = d.style + " " + d.weight + " " + ~~((d.size + 1) / ratio) + "px " + d.font;
- var w = c.measureText(d.text + "m").width * ratio,
- h = d.size << 1;
- if (d.rotate) {
- var sr = Math.sin(d.rotate * cloudRadians),
- cr = Math.cos(d.rotate * cloudRadians),
- wcr = w * cr,
- wsr = w * sr,
- hcr = h * cr,
- hsr = h * sr;
- w = (Math.max(Math.abs(wcr + hsr), Math.abs(wcr - hsr)) + 0x1f) >> 5 << 5;
- h = ~~Math.max(Math.abs(wsr + hcr), Math.abs(wsr - hcr));
- } else {
- w = (w + 0x1f) >> 5 << 5;
- }
- if (h > maxh) maxh = h;
- if (x + w >= (cw << 5)) {
- x = 0;
- y += maxh;
- maxh = 0;
- }
- if (y + h >= ch) break;
- c.translate((x + (w >> 1)) / ratio, (y + (h >> 1)) / ratio);
- if (d.rotate) c.rotate(d.rotate * cloudRadians);
- c.fillText(d.text, 0, 0);
- if (d.padding) c.lineWidth = 2 * d.padding, c.strokeText(d.text, 0, 0);
- c.restore();
- d.width = w;
- d.height = h;
- d.xoff = x;
- d.yoff = y;
- d.x1 = w >> 1;
- d.y1 = h >> 1;
- d.x0 = -d.x1;
- d.y0 = -d.y1;
- d.hasText = true;
- x += w;
- }
- var pixels = c.getImageData(0, 0, (cw << 5) / ratio, ch / ratio).data,
- sprite = [];
- while (--di >= 0) {
- d = data[di];
- if (!d.hasText) continue;
- var w = d.width,
- w32 = w >> 5,
- h = d.y1 - d.y0;
- // Zero the buffer
- for (var i = 0; i < h * w32; i++) sprite[i] = 0;
- x = d.xoff;
- if (x == null) return;
- y = d.yoff;
- var seen = 0,
- seenRow = -1;
- for (var j = 0; j < h; j++) {
- for (var i = 0; i < w; i++) {
- var k = w32 * j + (i >> 5),
- m = pixels[((y + j) * (cw << 5) + (x + i)) << 2] ? 1 << (31 - (i % 32)) : 0;
- sprite[k] |= m;
- seen |= m;
- }
- if (seen) seenRow = j;
- else {
- d.y0++;
- h--;
- j--;
- y++;
- }
- }
- d.y1 = d.y0 + seenRow;
- d.sprite = sprite.slice(0, (d.y1 - d.y0) * w32);
- }
- }
-
- // Use mask-based collision detection.
- function cloudCollide(tag, board, sw) {
- sw >>= 5;
- var sprite = tag.sprite,
- w = tag.width >> 5,
- lx = tag.x - (w << 4),
- sx = lx & 0x7f,
- msx = 32 - sx,
- h = tag.y1 - tag.y0,
- x = (tag.y + tag.y0) * sw + (lx >> 5),
- last;
- for (var j = 0; j < h; j++) {
- last = 0;
- for (var i = 0; i <= w; i++) {
- if (((last << msx) | (i < w ? (last = sprite[j * w + i]) >>> sx : 0))
- & board[x + i]) return true;
- }
- x += sw;
- }
- return false;
- }
-
- function cloudBounds(bounds, d) {
- var b0 = bounds[0],
- b1 = bounds[1];
- if (d.x + d.x0 < b0.x) b0.x = d.x + d.x0;
- if (d.y + d.y0 < b0.y) b0.y = d.y + d.y0;
- if (d.x + d.x1 > b1.x) b1.x = d.x + d.x1;
- if (d.y + d.y1 > b1.y) b1.y = d.y + d.y1;
- }
-
- function collideRects(a, b) {
- return a.x + a.x1 > b[0].x && a.x + a.x0 < b[1].x && a.y + a.y1 > b[0].y && a.y + a.y0 < b[1].y;
- }
-
- function archimedeanSpiral(size) {
- var e = size[0] / size[1];
- return function(t) {
- return [e * (t *= .1) * Math.cos(t), t * Math.sin(t)];
- };
- }
-
- function rectangularSpiral(size) {
- var dy = 4,
- dx = dy * size[0] / size[1],
- x = 0,
- y = 0;
- return function(t) {
- var sign = t < 0 ? -1 : 1;
- // See triangular numbers: T_n = n * (n + 1) / 2.
- switch ((Math.sqrt(1 + 4 * sign * t) - sign) & 3) {
- case 0: x += dx; break;
- case 1: y += dy; break;
- case 2: x -= dx; break;
- default: y -= dy; break;
- }
- return [x, y];
- };
- }
-
- // TODO reuse arrays?
- function zeroArray(n) {
- var a = [],
- i = -1;
- while (++i < n) a[i] = 0;
- return a;
- }
-
- var cloudRadians = Math.PI / 180,
- cw = 1 << 11 >> 5,
- ch = 1 << 11,
- canvas,
- ratio = 1;
-
- if (typeof document !== "undefined") {
- canvas = document.createElement("canvas");
- canvas.width = 1;
- canvas.height = 1;
- ratio = Math.sqrt(canvas.getContext("2d").getImageData(0, 0, 1, 1).data.length >> 2);
- canvas.width = (cw << 5) / ratio;
- canvas.height = ch / ratio;
- } else {
- // Attempt to use node-canvas.
- canvas = new Canvas(cw << 5, ch);
- }
-
- var c = canvas.getContext("2d"),
- spirals = {
- archimedean: archimedeanSpiral,
- rectangular: rectangularSpiral
- };
- c.fillStyle = c.strokeStyle = "red";
- c.textAlign = "center";
-
- if (typeof module === "object" && module.exports) module.exports = cloud;
- else (d3.layout || (d3.layout = {})).cloud = cloud;
-})(); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/d3.layout.js b/ecomp-portal-BE/war/static/fusion/d3/js/d3.layout.js
deleted file mode 100644
index abc5ebef..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/d3.layout.js
+++ /dev/null
@@ -1,908 +0,0 @@
-(function(){d3.layout = {};
-d3.layout.chord = function() {
- var chord = {},
- chords,
- groups,
- matrix,
- n,
- padding = 0,
- sortGroups,
- sortSubgroups,
- sortChords;
-
- function relayout() {
- var subgroups = {},
- groupSums = [],
- groupIndex = d3.range(n),
- subgroupIndex = [],
- k,
- x,
- x0,
- i,
- j;
-
- chords = [];
- groups = [];
-
- // Compute the sum.
- k = 0, i = -1; while (++i < n) {
- x = 0, j = -1; while (++j < n) {
- x += matrix[i][j];
- }
- groupSums.push(x);
- subgroupIndex.push(d3.range(n));
- k += x;
- }
-
- // Sort groups…
- if (sortGroups) {
- groupIndex.sort(function(a, b) {
- return sortGroups(groupSums[a], groupSums[b]);
- });
- }
-
- // Sort subgroups…
- if (sortSubgroups) {
- subgroupIndex.forEach(function(d, i) {
- d.sort(function(a, b) {
- return sortSubgroups(matrix[i][a], matrix[i][b]);
- });
- });
- }
-
- // Convert the sum to scaling factor for [0, 2pi].
- // TODO Allow start and end angle to be specified.
- // TODO Allow padding to be specified as percentage?
- k = (2 * Math.PI - padding * n) / k;
-
- // Compute the start and end angle for each group and subgroup.
- x = 0, i = -1; while (++i < n) {
- x0 = x, j = -1; while (++j < n) {
- var di = groupIndex[i],
- dj = subgroupIndex[i][j],
- v = matrix[di][dj];
- subgroups[di + "-" + dj] = {
- index: di,
- subindex: dj,
- startAngle: x,
- endAngle: x += v * k,
- value: v
- };
- }
- groups.push({
- index: di,
- startAngle: x0,
- endAngle: x,
- value: (x - x0) / k
- });
- x += padding;
- }
-
- // Generate chords for each (non-empty) subgroup-subgroup link.
- i = -1; while (++i < n) {
- j = i - 1; while (++j < n) {
- var source = subgroups[i + "-" + j],
- target = subgroups[j + "-" + i];
- if (source.value || target.value) {
- chords.push({
- source: source,
- target: target
- })
- }
- }
- }
-
- if (sortChords) resort();
- }
-
- function resort() {
- chords.sort(function(a, b) {
- a = Math.min(a.source.value, a.target.value);
- b = Math.min(b.source.value, b.target.value);
- return sortChords(a, b);
- });
- }
-
- chord.matrix = function(x) {
- if (!arguments.length) return matrix;
- n = (matrix = x) && matrix.length;
- chords = groups = null;
- return chord;
- };
-
- chord.padding = function(x) {
- if (!arguments.length) return padding;
- padding = x;
- chords = groups = null;
- return chord;
- };
-
- chord.sortGroups = function(x) {
- if (!arguments.length) return sortGroups;
- sortGroups = x;
- chords = groups = null;
- return chord;
- };
-
- chord.sortSubgroups = function(x) {
- if (!arguments.length) return sortSubgroups;
- sortSubgroups = x;
- chords = null;
- return chord;
- };
-
- chord.sortChords = function(x) {
- if (!arguments.length) return sortChords;
- sortChords = x;
- if (chords) resort();
- return chord;
- };
-
- chord.chords = function() {
- if (!chords) relayout();
- return chords;
- };
-
- chord.groups = function() {
- if (!groups) relayout();
- return groups;
- };
-
- return chord;
-};
-// A rudimentary force layout using Gauss-Seidel.
-d3.layout.force = function() {
- var force = {},
- event = d3.dispatch("tick"),
- size = [1, 1],
- alpha = .5,
- distance = 30,
- interval,
- nodes,
- links,
- distances;
-
- function tick() {
- var n = distances.length,
- i, // current index
- o, // current link
- s, // current source
- t, // current target
- l, // current distance
- x, // x-distance
- y; // y-distance
-
- // gauss-seidel relaxation
- for (i = 0; i < n; ++i) {
- o = distances[i];
- s = o.source;
- t = o.target;
- x = t.x - s.x;
- y = t.y - s.y;
- if (l = Math.sqrt(x * x + y * y)) {
- l = alpha / (o.distance * o.distance) * (l - distance * o.distance) / l;
- x *= l;
- y *= l;
- if (!t.fixed) {
- t.x -= x;
- t.y -= y;
- }
- if (!s.fixed) {
- s.x += x;
- s.y += y;
- }
- }
- }
-
- event.tick.dispatch({type: "tick"});
-
- // simulated annealing, basically
- return (alpha *= .99) < .005;
- }
-
- force.on = function(type, listener) {
- event[type].add(listener);
- return force;
- };
-
- force.nodes = function(x) {
- if (!arguments.length) return nodes;
- nodes = x;
- return force;
- };
-
- force.links = function(x) {
- if (!arguments.length) return links;
- links = x;
- return force;
- };
-
- force.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return force;
- };
-
- force.distance = function(d) {
- if (!arguments.length) return distance;
- distance = d;
- return force;
- };
-
- force.start = function() {
- var i,
- j,
- k,
- n = nodes.length,
- m = links.length,
- w = size[0],
- h = size[1],
- o;
-
- var paths = [];
- for (i = 0; i < n; ++i) {
- o = nodes[i];
- o.x = o.x || Math.random() * w;
- o.y = o.y || Math.random() * h;
- o.fixed = 0;
- paths[i] = [];
- for (j = 0; j < n; ++j) {
- paths[i][j] = Infinity;
- }
- paths[i][i] = 0;
- }
-
- for (i = 0; i < m; ++i) {
- o = links[i];
- paths[o.source][o.target] = 1;
- paths[o.target][o.source] = 1;
- o.source = nodes[o.source];
- o.target = nodes[o.target];
- }
-
- // Floyd-Warshall
- for (k = 0; k < n; ++k) {
- for (i = 0; i < n; ++i) {
- for (j = 0; j < n; ++j) {
- paths[i][j] = Math.min(paths[i][j], paths[i][k] + paths[k][j]);
- }
- }
- }
-
- distances = [];
- for (i = 0; i < n; ++i) {
- for (j = i + 1; j < n; ++j) {
- distances.push({
- source: nodes[i],
- target: nodes[j],
- distance: paths[i][j] * paths[i][j]
- });
- }
- }
-
- distances.sort(function(a, b) {
- return a.distance - b.distance;
- });
-
- d3.timer(tick);
- return force;
- };
-
- force.resume = function() {
- alpha = .1;
- d3.timer(tick);
- return force;
- };
-
- force.stop = function() {
- alpha = 0;
- return force;
- };
-
- // use `node.call(force.drag)` to make nodes draggable
- force.drag = function() {
- var node, element;
-
- this
- .on("mouseover", function(d) { d.fixed = true; })
- .on("mouseout", function(d) { if (d != node) d.fixed = false; })
- .on("mousedown", mousedown);
-
- d3.select(window)
- .on("mousemove", mousemove)
- .on("mouseup", mouseup);
-
- function mousedown(d) {
- (node = d).fixed = true;
- element = this;
- d3.event.preventDefault();
- }
-
- function mousemove() {
- if (!node) return;
- var m = d3.svg.mouse(element);
- node.x = m[0];
- node.y = m[1];
- force.resume(); // restart annealing
- }
-
- function mouseup() {
- if (!node) return;
- mousemove();
- node.fixed = false;
- node = element = null;
- }
-
- return force;
- };
-
- return force;
-};
-d3.layout.partition = function() {
- var hierarchy = d3.layout.hierarchy(),
- size = [1, 1]; // width, height
-
- function position(node, x, dx, dy) {
- var children = node.children;
- node.x = x;
- node.y = node.depth * dy;
- node.dx = dx;
- node.dy = dy;
- if (children) {
- var i = -1,
- n = children.length,
- c,
- d;
- dx /= node.value;
- while (++i < n) {
- position(c = children[i], x, d = c.value * dx, dy);
- x += d;
- }
- }
- }
-
- function depth(node) {
- var children = node.children,
- d = 0;
- if (children) {
- var i = -1,
- n = children.length;
- while (++i < n) d = Math.max(d, depth(children[i]));
- }
- return 1 + d;
- }
-
- function partition(d, i) {
- var nodes = hierarchy.call(this, d, i);
- position(nodes[0], 0, size[0], size[1] / depth(nodes[0]));
- return nodes;
- }
-
- partition.sort = d3.rebind(partition, hierarchy.sort);
- partition.children = d3.rebind(partition, hierarchy.children);
- partition.value = d3.rebind(partition, hierarchy.value);
-
- partition.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return partition;
- };
-
- return partition;
-};
-d3.layout.pie = function() {
- var value = Number,
- sort = null,
- startAngle = 0,
- endAngle = 2 * Math.PI;
-
- function pie(data, i) {
-
- // Compute the start angle.
- var a = +(typeof startAngle == "function"
- ? startAngle.apply(this, arguments)
- : startAngle);
-
- // Compute the angular range (end - start).
- var k = (typeof endAngle == "function"
- ? endAngle.apply(this, arguments)
- : endAngle) - startAngle;
-
- // Optionally sort the data.
- var index = d3.range(data.length);
- if (sort != null) index.sort(function(i, j) {
- return sort(data[i], data[j]);
- });
-
- // Compute the numeric values for each data element.
- var values = data.map(value);
-
- // Convert k into a scale factor from value to angle, using the sum.
- k /= values.reduce(function(p, d) { return p + d; }, 0);
-
- // Compute the arcs!
- var arcs = index.map(function(i) {
- return {
- value: d = values[i],
- startAngle: a,
- endAngle: a += d * k
- };
- });
-
- // Return the arcs in the original data's order.
- return data.map(function(d, i) {
- return arcs[index[i]];
- });
- }
-
- /**
- * Specifies the value function *x*, which returns a nonnegative numeric value
- * for each datum. The default value function is `Number`. The value function
- * is passed two arguments: the current datum and the current index.
- */
- pie.value = function(x) {
- if (!arguments.length) return value;
- value = x;
- return pie;
- };
-
- /**
- * Specifies a sort comparison operator *x*. The comparator is passed two data
- * elements from the data array, a and b; it returns a negative value if a is
- * less than b, a positive value if a is greater than b, and zero if a equals
- * b.
- */
- pie.sort = function(x) {
- if (!arguments.length) return sort;
- sort = x;
- return pie;
- };
-
- /**
- * Specifies the overall start angle of the pie chart. Defaults to 0. The
- * start angle can be specified either as a constant or as a function; in the
- * case of a function, it is evaluated once per array (as opposed to per
- * element).
- */
- pie.startAngle = function(x) {
- if (!arguments.length) return startAngle;
- startAngle = x;
- return pie;
- };
-
- /**
- * Specifies the overall end angle of the pie chart. Defaults to 2Ï€. The
- * end angle can be specified either as a constant or as a function; in the
- * case of a function, it is evaluated once per array (as opposed to per
- * element).
- */
- pie.endAngle = function(x) {
- if (!arguments.length) return endAngle;
- endAngle = x;
- return pie;
- };
-
- return pie;
-};
-// data is two-dimensional array of x,y; we populate y0
-// TODO perhaps make the `x`, `y` and `y0` structure customizable
-d3.layout.stack = function() {
- var order = "default",
- offset = "zero";
-
- function stack(data) {
- var n = data.length,
- m = data[0].length,
- i,
- j,
- y0;
-
- // compute the order of series
- var index = d3_layout_stackOrders[order](data);
-
- // set y0 on the baseline
- d3_layout_stackOffsets[offset](data, index);
-
- // propagate offset to other series
- for (j = 0; j < m; ++j) {
- for (i = 1, y0 = data[index[0]][j].y0; i < n; ++i) {
- data[index[i]][j].y0 = y0 += data[index[i - 1]][j].y;
- }
- }
-
- return data;
- }
-
- stack.order = function(x) {
- if (!arguments.length) return order;
- order = x;
- return stack;
- };
-
- stack.offset = function(x) {
- if (!arguments.length) return offset;
- offset = x;
- return stack;
- };
-
- return stack;
-}
-
-var d3_layout_stackOrders = {
-
- "inside-out": function(data) {
- var n = data.length,
- i,
- j,
- max = data.map(d3_layout_stackMaxIndex),
- sums = data.map(d3_layout_stackReduceSum),
- index = d3.range(n).sort(function(a, b) { return max[a] - max[b]; }),
- top = 0,
- bottom = 0,
- tops = [],
- bottoms = [];
- for (i = 0; i < n; i++) {
- j = index[i];
- if (top < bottom) {
- top += sums[j];
- tops.push(j);
- } else {
- bottom += sums[j];
- bottoms.push(j);
- }
- }
- return bottoms.reverse().concat(tops);
- },
-
- "reverse": function(data) {
- return d3.range(data.length).reverse();
- },
-
- "default": function(data) {
- return d3.range(data.length);
- }
-
-};
-
-var d3_layout_stackOffsets = {
-
- "silhouette": function(data, index) {
- var n = data.length,
- m = data[0].length,
- sums = [],
- max = 0,
- i,
- j,
- o;
- for (j = 0; j < m; ++j) {
- for (i = 0, o = 0; i < n; i++) o += data[i][j].y;
- if (o > max) max = o;
- sums.push(o);
- }
- for (j = 0, i = index[0]; j < m; ++j) {
- data[i][j].y0 = (max - sums[j]) / 2;
- }
- },
-
- "wiggle": function(data, index) {
- var n = data.length,
- x = data[0],
- m = x.length,
- max = 0,
- i,
- j,
- k,
- ii,
- ik,
- i0 = index[0],
- s1,
- s2,
- s3,
- dx,
- o,
- o0;
- data[i0][0].y0 = o = o0 = 0;
- for (j = 1; j < m; ++j) {
- for (i = 0, s1 = 0; i < n; ++i) s1 += data[i][j].y;
- for (i = 0, s2 = 0, dx = x[j].x - x[j - 1].x; i < n; ++i) {
- for (k = 0, ii = index[i], s3 = (data[ii][j].y - data[ii][j - 1].y) / (2 * dx); k < i; ++k) {
- s3 += (data[ik = index[k]][j].y - data[ik][j - 1].y) / dx;
- }
- s2 += s3 * data[ii][j].y;
- }
- data[i0][j].y0 = o -= s1 ? s2 / s1 * dx : 0;
- if (o < o0) o0 = o;
- }
- for (j = 0; j < m; ++j) data[i0][j].y0 -= o0;
- },
-
- "zero": function(data, index) {
- var j = 0,
- m = data[0].length,
- i0 = index[0];
- for (; j < m; ++j) data[i0][j].y0 = 0;
- }
-
-};
-
-function d3_layout_stackReduceSum(d) {
- return d.reduce(d3_layout_stackSum, 0);
-}
-
-function d3_layout_stackMaxIndex(array) {
- var i = 1,
- j = 0,
- v = array[0].y,
- k,
- n = array.length;
- for (; i < n; ++i) {
- if ((k = array[i].y) > v) {
- j = i;
- v = k;
- }
- }
- return j;
-}
-
-function d3_layout_stackSum(p, d) {
- return p + d.y;
-}
-d3.layout.hierarchy = function() {
- var sort = d3_layout_hierarchySort,
- children = d3_layout_hierarchyChildren,
- value = d3_layout_hierarchyValue;
-
- // Recursively compute the node depth and value.
- // Also converts the data representation into a standard hierarchy structure.
- function recurse(data, depth, nodes) {
- var datas = children.call(hierarchy, data, depth),
- node = {depth: depth, data: data};
- nodes.push(node);
- if (datas) {
- var i = -1,
- n = datas.length,
- c = node.children = [],
- v = 0,
- j = depth + 1;
- while (++i < n) {
- d = recurse(datas[i], j, nodes);
- if (d.value > 0) { // ignore NaN, negative, etc.
- c.push(d);
- v += d.value;
- d.parent = node;
- }
- }
- if (sort) c.sort(sort);
- node.value = v;
- } else {
- node.value = value.call(hierarchy, data, depth);
- }
- return node;
- }
-
- // Recursively re-evaluates the node value.
- function revalue(node, depth) {
- var children = node.children,
- v = 0;
- if (children) {
- var i = -1,
- n = children.length,
- j = depth + 1;
- while (++i < n) v += revalue(children[i], j);
- } else {
- v = value.call(hierarchy, node.data, depth);
- }
- return node.value = v;
- }
-
- function hierarchy(d) {
- var nodes = [];
- recurse(d, 0, nodes);
- return nodes;
- }
-
- hierarchy.sort = function(x) {
- if (!arguments.length) return sort;
- sort = x;
- return hierarchy;
- };
-
- hierarchy.children = function(x) {
- if (!arguments.length) return children;
- children = x;
- return hierarchy;
- };
-
- hierarchy.value = function(x) {
- if (!arguments.length) return value;
- value = x;
- return hierarchy;
- };
-
- // Re-evaluates the `value` property for the specified hierarchy.
- hierarchy.revalue = function(root) {
- revalue(root, 0);
- return root;
- };
-
- return hierarchy;
-}
-
-function d3_layout_hierarchyChildren(d) {
- return d.children;
-}
-
-function d3_layout_hierarchyValue(d) {
- return d.value;
-}
-
-function d3_layout_hierarchySort(a, b) {
- return b.value - a.value;
-}
-// Squarified Treemaps by Mark Bruls, Kees Huizing, and Jarke J. van Wijk
-d3.layout.treemap = function() {
- var hierarchy = d3.layout.hierarchy(),
- round = Math.round,
- size = [1, 1], // width, height
- sticky = false,
- stickies;
-
- // Recursively compute the node area based on value & scale.
- function scale(node, k) {
- var children = node.children;
- node.area = node.value * k;
- if (children) {
- var i = -1,
- n = children.length;
- while (++i < n) scale(children[i], k);
- }
- }
-
- // Recursively arranges the specified node's children into squarified rows.
- function squarify(node) {
- if (!node.children) return;
- var rect = {x: node.x, y: node.y, dx: node.dx, dy: node.dy},
- row = [],
- children = node.children.slice(), // copy-on-write
- child,
- best = Infinity, // the best row score so far
- score, // the current row score
- u = Math.min(rect.dx, rect.dy), // initial orientation
- n;
- row.area = 0;
- while ((n = children.length) > 0) {
- row.push(child = children[n - 1]);
- row.area += child.area;
- if ((score = worst(row, u)) <= best) { // continue with this orientation
- children.pop();
- best = score;
- } else { // abort, and try a different orientation
- row.area -= row.pop().area;
- position(row, u, rect, false);
- u = Math.min(rect.dx, rect.dy);
- row.length = row.area = 0;
- best = Infinity;
- }
- }
- if (row.length) {
- position(row, u, rect, true);
- row.length = row.area = 0;
- }
- node.children.forEach(squarify);
- }
-
- // Recursively resizes the specified node's children into existing rows.
- // Preserves the existing layout!
- function stickify(node) {
- if (!node.children) return;
- var rect = {x: node.x, y: node.y, dx: node.dx, dy: node.dy},
- children = node.children.slice(), // copy-on-write
- child,
- row = [];
- row.area = 0;
- while (child = children.pop()) {
- row.push(child);
- row.area += child.area;
- if (child.z != null) {
- position(row, child.z ? rect.dx : rect.dy, rect, !children.length);
- row.length = row.area = 0;
- }
- }
- node.children.forEach(stickify);
- }
-
- // Computes the score for the specified row, as the worst aspect ratio.
- function worst(row, u) {
- var s = row.area,
- r,
- rmax = 0,
- rmin = Infinity,
- i = -1,
- n = row.length;
- while (++i < n) {
- r = row[i].area;
- if (r < rmin) rmin = r;
- if (r > rmax) rmax = r;
- }
- s *= s;
- u *= u;
- return Math.max((u * rmax) / s, s / (u * rmin));
- }
-
- // Positions the specified row of nodes. Modifies `rect`.
- function position(row, u, rect, flush) {
- var i = -1,
- n = row.length,
- x = rect.x,
- y = rect.y,
- v = u ? round(row.area / u) : 0,
- o;
- if (u == rect.dx) { // horizontal subdivision
- if (flush || v > rect.dy) v = rect.dy; // over+underflow
- while (++i < n) {
- o = row[i];
- o.x = x;
- o.y = y;
- o.dy = v;
- x += o.dx = round(o.area / v);
- }
- o.z = true;
- o.dx += rect.x + rect.dx - x; // rounding error
- rect.y += v;
- rect.dy -= v;
- } else { // vertical subdivision
- if (flush || v > rect.dx) v = rect.dx; // over+underflow
- while (++i < n) {
- o = row[i];
- o.x = x;
- o.y = y;
- o.dx = v;
- y += o.dy = round(o.area / v);
- }
- o.z = false;
- o.dy += rect.y + rect.dy - y; // rounding error
- rect.x += v;
- rect.dx -= v;
- }
- }
-
- function treemap(d) {
- var nodes = stickies || hierarchy(d),
- root = nodes[0];
- root.x = 0;
- root.y = 0;
- root.dx = size[0];
- root.dy = size[1];
- if (stickies) hierarchy.revalue(root);
- scale(root, size[0] * size[1] / root.value);
- (stickies ? stickify : squarify)(root);
- if (sticky) stickies = nodes;
- return nodes;
- }
-
- treemap.sort = d3.rebind(treemap, hierarchy.sort);
- treemap.children = d3.rebind(treemap, hierarchy.children);
- treemap.value = d3.rebind(treemap, hierarchy.value);
-
- treemap.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return treemap;
- };
-
- treemap.round = function(x) {
- if (!arguments.length) return round != Number;
- round = x ? Math.round : Number;
- return treemap;
- };
-
- treemap.sticky = function(x) {
- if (!arguments.length) return sticky;
- sticky = x;
- stickies = null;
- return treemap;
- };
-
- return treemap;
-};
-})() \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/d3.v2.js b/ecomp-portal-BE/war/static/fusion/d3/js/d3.v2.js
deleted file mode 100644
index 78c4dbca..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/d3.v2.js
+++ /dev/null
@@ -1,7037 +0,0 @@
-(function() {
- function d3_class(ctor, properties) {
- try {
- for (var key in properties) {
- Object.defineProperty(ctor.prototype, key, {
- value: properties[key],
- enumerable: false
- });
- }
- } catch (e) {
- ctor.prototype = properties;
- }
- }
- function d3_arrayCopy(pseudoarray) {
- var i = -1, n = pseudoarray.length, array = [];
- while (++i < n) array.push(pseudoarray[i]);
- return array;
- }
- function d3_arraySlice(pseudoarray) {
- return Array.prototype.slice.call(pseudoarray);
- }
- function d3_Map() {}
- function d3_identity(d) {
- return d;
- }
- function d3_this() {
- return this;
- }
- function d3_true() {
- return true;
- }
- function d3_functor(v) {
- return typeof v === "function" ? v : function() {
- return v;
- };
- }
- function d3_rebind(target, source, method) {
- return function() {
- var value = method.apply(source, arguments);
- return arguments.length ? target : value;
- };
- }
- function d3_number(x) {
- return x != null && !isNaN(x);
- }
- function d3_zipLength(d) {
- return d.length;
- }
- function d3_splitter(d) {
- return d == null;
- }
- function d3_collapse(s) {
- return s.trim().replace(/\s+/g, " ");
- }
- function d3_range_integerScale(x) {
- var k = 1;
- while (x * k % 1) k *= 10;
- return k;
- }
- function d3_dispatch() {}
- function d3_dispatch_event(dispatch) {
- function event() {
- var z = listeners, i = -1, n = z.length, l;
- while (++i < n) if (l = z[i].on) l.apply(this, arguments);
- return dispatch;
- }
- var listeners = [], listenerByName = new d3_Map;
- event.on = function(name, listener) {
- var l = listenerByName.get(name), i;
- if (arguments.length < 2) return l && l.on;
- if (l) {
- l.on = null;
- listeners = listeners.slice(0, i = listeners.indexOf(l)).concat(listeners.slice(i + 1));
- listenerByName.remove(name);
- }
- if (listener) listeners.push(listenerByName.set(name, {
- on: listener
- }));
- return dispatch;
- };
- return event;
- }
- function d3_format_precision(x, p) {
- return p - (x ? 1 + Math.floor(Math.log(x + Math.pow(10, 1 + Math.floor(Math.log(x) / Math.LN10) - p)) / Math.LN10) : 1);
- }
- function d3_format_typeDefault(x) {
- return x + "";
- }
- function d3_format_group(value) {
- var i = value.lastIndexOf("."), f = i >= 0 ? value.substring(i) : (i = value.length, ""), t = [];
- while (i > 0) t.push(value.substring(i -= 3, i + 3));
- return t.reverse().join(",") + f;
- }
- function d3_formatPrefix(d, i) {
- var k = Math.pow(10, Math.abs(8 - i) * 3);
- return {
- scale: i > 8 ? function(d) {
- return d / k;
- } : function(d) {
- return d * k;
- },
- symbol: d
- };
- }
- function d3_ease_clamp(f) {
- return function(t) {
- return t <= 0 ? 0 : t >= 1 ? 1 : f(t);
- };
- }
- function d3_ease_reverse(f) {
- return function(t) {
- return 1 - f(1 - t);
- };
- }
- function d3_ease_reflect(f) {
- return function(t) {
- return .5 * (t < .5 ? f(2 * t) : 2 - f(2 - 2 * t));
- };
- }
- function d3_ease_identity(t) {
- return t;
- }
- function d3_ease_poly(e) {
- return function(t) {
- return Math.pow(t, e);
- };
- }
- function d3_ease_sin(t) {
- return 1 - Math.cos(t * Math.PI / 2);
- }
- function d3_ease_exp(t) {
- return Math.pow(2, 10 * (t - 1));
- }
- function d3_ease_circle(t) {
- return 1 - Math.sqrt(1 - t * t);
- }
- function d3_ease_elastic(a, p) {
- var s;
- if (arguments.length < 2) p = .45;
- if (arguments.length < 1) {
- a = 1;
- s = p / 4;
- } else s = p / (2 * Math.PI) * Math.asin(1 / a);
- return function(t) {
- return 1 + a * Math.pow(2, 10 * -t) * Math.sin((t - s) * 2 * Math.PI / p);
- };
- }
- function d3_ease_back(s) {
- if (!s) s = 1.70158;
- return function(t) {
- return t * t * ((s + 1) * t - s);
- };
- }
- function d3_ease_bounce(t) {
- return t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375;
- }
- function d3_eventCancel() {
- d3.event.stopPropagation();
- d3.event.preventDefault();
- }
- function d3_eventSource() {
- var e = d3.event, s;
- while (s = e.sourceEvent) e = s;
- return e;
- }
- function d3_eventDispatch(target) {
- var dispatch = new d3_dispatch, i = 0, n = arguments.length;
- while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);
- dispatch.of = function(thiz, argumentz) {
- return function(e1) {
- try {
- var e0 = e1.sourceEvent = d3.event;
- e1.target = target;
- d3.event = e1;
- dispatch[e1.type].apply(thiz, argumentz);
- } finally {
- d3.event = e0;
- }
- };
- };
- return dispatch;
- }
- function d3_transform(m) {
- var r0 = [ m.a, m.b ], r1 = [ m.c, m.d ], kx = d3_transformNormalize(r0), kz = d3_transformDot(r0, r1), ky = d3_transformNormalize(d3_transformCombine(r1, r0, -kz)) || 0;
- if (r0[0] * r1[1] < r1[0] * r0[1]) {
- r0[0] *= -1;
- r0[1] *= -1;
- kx *= -1;
- kz *= -1;
- }
- this.rotate = (kx ? Math.atan2(r0[1], r0[0]) : Math.atan2(-r1[0], r1[1])) * d3_transformDegrees;
- this.translate = [ m.e, m.f ];
- this.scale = [ kx, ky ];
- this.skew = ky ? Math.atan2(kz, ky) * d3_transformDegrees : 0;
- }
- function d3_transformDot(a, b) {
- return a[0] * b[0] + a[1] * b[1];
- }
- function d3_transformNormalize(a) {
- var k = Math.sqrt(d3_transformDot(a, a));
- if (k) {
- a[0] /= k;
- a[1] /= k;
- }
- return k;
- }
- function d3_transformCombine(a, b, k) {
- a[0] += k * b[0];
- a[1] += k * b[1];
- return a;
- }
- function d3_interpolateByName(name) {
- return name == "transform" ? d3.interpolateTransform : d3.interpolate;
- }
- function d3_uninterpolateNumber(a, b) {
- b = b - (a = +a) ? 1 / (b - a) : 0;
- return function(x) {
- return (x - a) * b;
- };
- }
- function d3_uninterpolateClamp(a, b) {
- b = b - (a = +a) ? 1 / (b - a) : 0;
- return function(x) {
- return Math.max(0, Math.min(1, (x - a) * b));
- };
- }
- function d3_rgb(r, g, b) {
- return new d3_Rgb(r, g, b);
- }
- function d3_Rgb(r, g, b) {
- this.r = r;
- this.g = g;
- this.b = b;
- }
- function d3_rgb_hex(v) {
- return v < 16 ? "0" + Math.max(0, v).toString(16) : Math.min(255, v).toString(16);
- }
- function d3_rgb_parse(format, rgb, hsl) {
- var r = 0, g = 0, b = 0, m1, m2, name;
- m1 = /([a-z]+)\((.*)\)/i.exec(format);
- if (m1) {
- m2 = m1[2].split(",");
- switch (m1[1]) {
- case "hsl":
- {
- return hsl(parseFloat(m2[0]), parseFloat(m2[1]) / 100, parseFloat(m2[2]) / 100);
- }
- case "rgb":
- {
- return rgb(d3_rgb_parseNumber(m2[0]), d3_rgb_parseNumber(m2[1]), d3_rgb_parseNumber(m2[2]));
- }
- }
- }
- if (name = d3_rgb_names.get(format)) return rgb(name.r, name.g, name.b);
- if (format != null && format.charAt(0) === "#") {
- if (format.length === 4) {
- r = format.charAt(1);
- r += r;
- g = format.charAt(2);
- g += g;
- b = format.charAt(3);
- b += b;
- } else if (format.length === 7) {
- r = format.substring(1, 3);
- g = format.substring(3, 5);
- b = format.substring(5, 7);
- }
- r = parseInt(r, 16);
- g = parseInt(g, 16);
- b = parseInt(b, 16);
- }
- return rgb(r, g, b);
- }
- function d3_rgb_hsl(r, g, b) {
- var min = Math.min(r /= 255, g /= 255, b /= 255), max = Math.max(r, g, b), d = max - min, h, s, l = (max + min) / 2;
- if (d) {
- s = l < .5 ? d / (max + min) : d / (2 - max - min);
- if (r == max) h = (g - b) / d + (g < b ? 6 : 0); else if (g == max) h = (b - r) / d + 2; else h = (r - g) / d + 4;
- h *= 60;
- } else {
- s = h = 0;
- }
- return d3_hsl(h, s, l);
- }
- function d3_rgb_lab(r, g, b) {
- r = d3_rgb_xyz(r);
- g = d3_rgb_xyz(g);
- b = d3_rgb_xyz(b);
- var x = d3_xyz_lab((.4124564 * r + .3575761 * g + .1804375 * b) / d3_lab_X), y = d3_xyz_lab((.2126729 * r + .7151522 * g + .072175 * b) / d3_lab_Y), z = d3_xyz_lab((.0193339 * r + .119192 * g + .9503041 * b) / d3_lab_Z);
- return d3_lab(116 * y - 16, 500 * (x - y), 200 * (y - z));
- }
- function d3_rgb_xyz(r) {
- return (r /= 255) <= .04045 ? r / 12.92 : Math.pow((r + .055) / 1.055, 2.4);
- }
- function d3_rgb_parseNumber(c) {
- var f = parseFloat(c);
- return c.charAt(c.length - 1) === "%" ? Math.round(f * 2.55) : f;
- }
- function d3_hsl(h, s, l) {
- return new d3_Hsl(h, s, l);
- }
- function d3_Hsl(h, s, l) {
- this.h = h;
- this.s = s;
- this.l = l;
- }
- function d3_hsl_rgb(h, s, l) {
- function v(h) {
- if (h > 360) h -= 360; else if (h < 0) h += 360;
- if (h < 60) return m1 + (m2 - m1) * h / 60;
- if (h < 180) return m2;
- if (h < 240) return m1 + (m2 - m1) * (240 - h) / 60;
- return m1;
- }
- function vv(h) {
- return Math.round(v(h) * 255);
- }
- var m1, m2;
- h = h % 360;
- if (h < 0) h += 360;
- s = s < 0 ? 0 : s > 1 ? 1 : s;
- l = l < 0 ? 0 : l > 1 ? 1 : l;
- m2 = l <= .5 ? l * (1 + s) : l + s - l * s;
- m1 = 2 * l - m2;
- return d3_rgb(vv(h + 120), vv(h), vv(h - 120));
- }
- function d3_hcl(h, c, l) {
- return new d3_Hcl(h, c, l);
- }
- function d3_Hcl(h, c, l) {
- this.h = h;
- this.c = c;
- this.l = l;
- }
- function d3_hcl_lab(h, c, l) {
- return d3_lab(l, Math.cos(h *= Math.PI / 180) * c, Math.sin(h) * c);
- }
- function d3_lab(l, a, b) {
- return new d3_Lab(l, a, b);
- }
- function d3_Lab(l, a, b) {
- this.l = l;
- this.a = a;
- this.b = b;
- }
- function d3_lab_rgb(l, a, b) {
- var y = (l + 16) / 116, x = y + a / 500, z = y - b / 200;
- x = d3_lab_xyz(x) * d3_lab_X;
- y = d3_lab_xyz(y) * d3_lab_Y;
- z = d3_lab_xyz(z) * d3_lab_Z;
- return d3_rgb(d3_xyz_rgb(3.2404542 * x - 1.5371385 * y - .4985314 * z), d3_xyz_rgb(-.969266 * x + 1.8760108 * y + .041556 * z), d3_xyz_rgb(.0556434 * x - .2040259 * y + 1.0572252 * z));
- }
- function d3_lab_hcl(l, a, b) {
- return d3_hcl(Math.atan2(b, a) / Math.PI * 180, Math.sqrt(a * a + b * b), l);
- }
- function d3_lab_xyz(x) {
- return x > .206893034 ? x * x * x : (x - 4 / 29) / 7.787037;
- }
- function d3_xyz_lab(x) {
- return x > .008856 ? Math.pow(x, 1 / 3) : 7.787037 * x + 4 / 29;
- }
- function d3_xyz_rgb(r) {
- return Math.round(255 * (r <= .00304 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - .055));
- }
- function d3_selection(groups) {
- d3_arraySubclass(groups, d3_selectionPrototype);
- return groups;
- }
- function d3_selection_selector(selector) {
- return function() {
- return d3_select(selector, this);
- };
- }
- function d3_selection_selectorAll(selector) {
- return function() {
- return d3_selectAll(selector, this);
- };
- }
- function d3_selection_attr(name, value) {
- function attrNull() {
- this.removeAttribute(name);
- }
- function attrNullNS() {
- this.removeAttributeNS(name.space, name.local);
- }
- function attrConstant() {
- this.setAttribute(name, value);
- }
- function attrConstantNS() {
- this.setAttributeNS(name.space, name.local, value);
- }
- function attrFunction() {
- var x = value.apply(this, arguments);
- if (x == null) this.removeAttribute(name); else this.setAttribute(name, x);
- }
- function attrFunctionNS() {
- var x = value.apply(this, arguments);
- if (x == null) this.removeAttributeNS(name.space, name.local); else this.setAttributeNS(name.space, name.local, x);
- }
- name = d3.ns.qualify(name);
- return value == null ? name.local ? attrNullNS : attrNull : typeof value === "function" ? name.local ? attrFunctionNS : attrFunction : name.local ? attrConstantNS : attrConstant;
- }
- function d3_selection_classedRe(name) {
- return new RegExp("(?:^|\\s+)" + d3.requote(name) + "(?:\\s+|$)", "g");
- }
- function d3_selection_classed(name, value) {
- function classedConstant() {
- var i = -1;
- while (++i < n) name[i](this, value);
- }
- function classedFunction() {
- var i = -1, x = value.apply(this, arguments);
- while (++i < n) name[i](this, x);
- }
- name = name.trim().split(/\s+/).map(d3_selection_classedName);
- var n = name.length;
- return typeof value === "function" ? classedFunction : classedConstant;
- }
- function d3_selection_classedName(name) {
- var re = d3_selection_classedRe(name);
- return function(node, value) {
- if (c = node.classList) return value ? c.add(name) : c.remove(name);
- var c = node.className, cb = c.baseVal != null, cv = cb ? c.baseVal : c;
- if (value) {
- re.lastIndex = 0;
- if (!re.test(cv)) {
- cv = d3_collapse(cv + " " + name);
- if (cb) c.baseVal = cv; else node.className = cv;
- }
- } else if (cv) {
- cv = d3_collapse(cv.replace(re, " "));
- if (cb) c.baseVal = cv; else node.className = cv;
- }
- };
- }
- function d3_selection_style(name, value, priority) {
- function styleNull() {
- this.style.removeProperty(name);
- }
- function styleConstant() {
- this.style.setProperty(name, value, priority);
- }
- function styleFunction() {
- var x = value.apply(this, arguments);
- if (x == null) this.style.removeProperty(name); else this.style.setProperty(name, x, priority);
- }
- return value == null ? styleNull : typeof value === "function" ? styleFunction : styleConstant;
- }
- function d3_selection_property(name, value) {
- function propertyNull() {
- delete this[name];
- }
- function propertyConstant() {
- this[name] = value;
- }
- function propertyFunction() {
- var x = value.apply(this, arguments);
- if (x == null) delete this[name]; else this[name] = x;
- }
- return value == null ? propertyNull : typeof value === "function" ? propertyFunction : propertyConstant;
- }
- function d3_selection_dataNode(data) {
- return {
- __data__: data
- };
- }
- function d3_selection_filter(selector) {
- return function() {
- return d3_selectMatches(this, selector);
- };
- }
- function d3_selection_sortComparator(comparator) {
- if (!arguments.length) comparator = d3.ascending;
- return function(a, b) {
- return comparator(a && a.__data__, b && b.__data__);
- };
- }
- function d3_selection_on(type, listener, capture) {
- function onRemove() {
- var wrapper = this[name];
- if (wrapper) {
- this.removeEventListener(type, wrapper, wrapper.$);
- delete this[name];
- }
- }
- function onAdd() {
- function wrapper(e) {
- var o = d3.event;
- d3.event = e;
- args[0] = node.__data__;
- try {
- listener.apply(node, args);
- } finally {
- d3.event = o;
- }
- }
- var node = this, args = arguments;
- onRemove.call(this);
- this.addEventListener(type, this[name] = wrapper, wrapper.$ = capture);
- wrapper._ = listener;
- }
- var name = "__on" + type, i = type.indexOf(".");
- if (i > 0) type = type.substring(0, i);
- return listener ? onAdd : onRemove;
- }
- function d3_selection_each(groups, callback) {
- for (var j = 0, m = groups.length; j < m; j++) {
- for (var group = groups[j], i = 0, n = group.length, node; i < n; i++) {
- if (node = group[i]) callback(node, i, j);
- }
- }
- return groups;
- }
- function d3_selection_enter(selection) {
- d3_arraySubclass(selection, d3_selection_enterPrototype);
- return selection;
- }
- function d3_transition(groups, id, time) {
- d3_arraySubclass(groups, d3_transitionPrototype);
- var tweens = new d3_Map, event = d3.dispatch("start", "end"), ease = d3_transitionEase;
- groups.id = id;
- groups.time = time;
- groups.tween = function(name, tween) {
- if (arguments.length < 2) return tweens.get(name);
- if (tween == null) tweens.remove(name); else tweens.set(name, tween);
- return groups;
- };
- groups.ease = function(value) {
- if (!arguments.length) return ease;
- ease = typeof value === "function" ? value : d3.ease.apply(d3, arguments);
- return groups;
- };
- groups.each = function(type, listener) {
- if (arguments.length < 2) return d3_transition_each.call(groups, type);
- event.on(type, listener);
- return groups;
- };
- d3.timer(function(elapsed) {
- return d3_selection_each(groups, function(node, i, j) {
- function start(elapsed) {
- if (lock.active > id) return stop();
- lock.active = id;
- tweens.forEach(function(key, value) {
- if (value = value.call(node, d, i)) {
- tweened.push(value);
- }
- });
- event.start.call(node, d, i);
- if (!tick(elapsed)) d3.timer(tick, 0, time);
- return 1;
- }
- function tick(elapsed) {
- if (lock.active !== id) return stop();
- var t = (elapsed - delay) / duration, e = ease(t), n = tweened.length;
- while (n > 0) {
- tweened[--n].call(node, e);
- }
- if (t >= 1) {
- stop();
- d3_transitionId = id;
- event.end.call(node, d, i);
- d3_transitionId = 0;
- return 1;
- }
- }
- function stop() {
- if (!--lock.count) delete node.__transition__;
- return 1;
- }
- var tweened = [], delay = node.delay, duration = node.duration, lock = (node = node.node).__transition__ || (node.__transition__ = {
- active: 0,
- count: 0
- }), d = node.__data__;
- ++lock.count;
- delay <= elapsed ? start(elapsed) : d3.timer(start, delay, time);
- });
- }, 0, time);
- return groups;
- }
- function d3_transition_each(callback) {
- var id = d3_transitionId, ease = d3_transitionEase, delay = d3_transitionDelay, duration = d3_transitionDuration;
- d3_transitionId = this.id;
- d3_transitionEase = this.ease();
- d3_selection_each(this, function(node, i, j) {
- d3_transitionDelay = node.delay;
- d3_transitionDuration = node.duration;
- callback.call(node = node.node, node.__data__, i, j);
- });
- d3_transitionId = id;
- d3_transitionEase = ease;
- d3_transitionDelay = delay;
- d3_transitionDuration = duration;
- return this;
- }
- function d3_tweenNull(d, i, a) {
- return a != "" && d3_tweenRemove;
- }
- function d3_tweenByName(b, name) {
- return d3.tween(b, d3_interpolateByName(name));
- }
- function d3_timer_step() {
- var elapsed, now = Date.now(), t1 = d3_timer_queue;
- while (t1) {
- elapsed = now - t1.then;
- if (elapsed >= t1.delay) t1.flush = t1.callback(elapsed);
- t1 = t1.next;
- }
- var delay = d3_timer_flush() - now;
- if (delay > 24) {
- if (isFinite(delay)) {
- clearTimeout(d3_timer_timeout);
- d3_timer_timeout = setTimeout(d3_timer_step, delay);
- }
- d3_timer_interval = 0;
- } else {
- d3_timer_interval = 1;
- d3_timer_frame(d3_timer_step);
- }
- }
- function d3_timer_flush() {
- var t0 = null, t1 = d3_timer_queue, then = Infinity;
- while (t1) {
- if (t1.flush) {
- t1 = t0 ? t0.next = t1.next : d3_timer_queue = t1.next;
- } else {
- then = Math.min(then, t1.then + t1.delay);
- t1 = (t0 = t1).next;
- }
- }
- return then;
- }
- function d3_mousePoint(container, e) {
- var svg = container.ownerSVGElement || container;
- if (svg.createSVGPoint) {
- var point = svg.createSVGPoint();
- if (d3_mouse_bug44083 < 0 && (window.scrollX || window.scrollY)) {
- svg = d3.select(document.body).append("svg").style("position", "absolute").style("top", 0).style("left", 0);
- var ctm = svg[0][0].getScreenCTM();
- d3_mouse_bug44083 = !(ctm.f || ctm.e);
- svg.remove();
- }
- if (d3_mouse_bug44083) {
- point.x = e.pageX;
- point.y = e.pageY;
- } else {
- point.x = e.clientX;
- point.y = e.clientY;
- }
- point = point.matrixTransform(container.getScreenCTM().inverse());
- return [ point.x, point.y ];
- }
- var rect = container.getBoundingClientRect();
- return [ e.clientX - rect.left - container.clientLeft, e.clientY - rect.top - container.clientTop ];
- }
- function d3_noop() {}
- function d3_scaleExtent(domain) {
- var start = domain[0], stop = domain[domain.length - 1];
- return start < stop ? [ start, stop ] : [ stop, start ];
- }
- function d3_scaleRange(scale) {
- return scale.rangeExtent ? scale.rangeExtent() : d3_scaleExtent(scale.range());
- }
- function d3_scale_nice(domain, nice) {
- var i0 = 0, i1 = domain.length - 1, x0 = domain[i0], x1 = domain[i1], dx;
- if (x1 < x0) {
- dx = i0, i0 = i1, i1 = dx;
- dx = x0, x0 = x1, x1 = dx;
- }
- if (nice = nice(x1 - x0)) {
- domain[i0] = nice.floor(x0);
- domain[i1] = nice.ceil(x1);
- }
- return domain;
- }
- function d3_scale_niceDefault() {
- return Math;
- }
- function d3_scale_linear(domain, range, interpolate, clamp) {
- function rescale() {
- var linear = Math.min(domain.length, range.length) > 2 ? d3_scale_polylinear : d3_scale_bilinear, uninterpolate = clamp ? d3_uninterpolateClamp : d3_uninterpolateNumber;
- output = linear(domain, range, uninterpolate, interpolate);
- input = linear(range, domain, uninterpolate, d3.interpolate);
- return scale;
- }
- function scale(x) {
- return output(x);
- }
- var output, input;
- scale.invert = function(y) {
- return input(y);
- };
- scale.domain = function(x) {
- if (!arguments.length) return domain;
- domain = x.map(Number);
- return rescale();
- };
- scale.range = function(x) {
- if (!arguments.length) return range;
- range = x;
- return rescale();
- };
- scale.rangeRound = function(x) {
- return scale.range(x).interpolate(d3.interpolateRound);
- };
- scale.clamp = function(x) {
- if (!arguments.length) return clamp;
- clamp = x;
- return rescale();
- };
- scale.interpolate = function(x) {
- if (!arguments.length) return interpolate;
- interpolate = x;
- return rescale();
- };
- scale.ticks = function(m) {
- return d3_scale_linearTicks(domain, m);
- };
- scale.tickFormat = function(m) {
- return d3_scale_linearTickFormat(domain, m);
- };
- scale.nice = function() {
- d3_scale_nice(domain, d3_scale_linearNice);
- return rescale();
- };
- scale.copy = function() {
- return d3_scale_linear(domain, range, interpolate, clamp);
- };
- return rescale();
- }
- function d3_scale_linearRebind(scale, linear) {
- return d3.rebind(scale, linear, "range", "rangeRound", "interpolate", "clamp");
- }
- function d3_scale_linearNice(dx) {
- dx = Math.pow(10, Math.round(Math.log(dx) / Math.LN10) - 1);
- return dx && {
- floor: function(x) {
- return Math.floor(x / dx) * dx;
- },
- ceil: function(x) {
- return Math.ceil(x / dx) * dx;
- }
- };
- }
- function d3_scale_linearTickRange(domain, m) {
- var extent = d3_scaleExtent(domain), span = extent[1] - extent[0], step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)), err = m / span * step;
- if (err <= .15) step *= 10; else if (err <= .35) step *= 5; else if (err <= .75) step *= 2;
- extent[0] = Math.ceil(extent[0] / step) * step;
- extent[1] = Math.floor(extent[1] / step) * step + step * .5;
- extent[2] = step;
- return extent;
- }
- function d3_scale_linearTicks(domain, m) {
- return d3.range.apply(d3, d3_scale_linearTickRange(domain, m));
- }
- function d3_scale_linearTickFormat(domain, m) {
- return d3.format(",." + Math.max(0, -Math.floor(Math.log(d3_scale_linearTickRange(domain, m)[2]) / Math.LN10 + .01)) + "f");
- }
- function d3_scale_bilinear(domain, range, uninterpolate, interpolate) {
- var u = uninterpolate(domain[0], domain[1]), i = interpolate(range[0], range[1]);
- return function(x) {
- return i(u(x));
- };
- }
- function d3_scale_polylinear(domain, range, uninterpolate, interpolate) {
- var u = [], i = [], j = 0, k = Math.min(domain.length, range.length) - 1;
- if (domain[k] < domain[0]) {
- domain = domain.slice().reverse();
- range = range.slice().reverse();
- }
- while (++j <= k) {
- u.push(uninterpolate(domain[j - 1], domain[j]));
- i.push(interpolate(range[j - 1], range[j]));
- }
- return function(x) {
- var j = d3.bisect(domain, x, 1, k) - 1;
- return i[j](u[j](x));
- };
- }
- function d3_scale_log(linear, log) {
- function scale(x) {
- return linear(log(x));
- }
- var pow = log.pow;
- scale.invert = function(x) {
- return pow(linear.invert(x));
- };
- scale.domain = function(x) {
- if (!arguments.length) return linear.domain().map(pow);
- log = x[0] < 0 ? d3_scale_logn : d3_scale_logp;
- pow = log.pow;
- linear.domain(x.map(log));
- return scale;
- };
- scale.nice = function() {
- linear.domain(d3_scale_nice(linear.domain(), d3_scale_niceDefault));
- return scale;
- };
- scale.ticks = function() {
- var extent = d3_scaleExtent(linear.domain()), ticks = [];
- if (extent.every(isFinite)) {
- var i = Math.floor(extent[0]), j = Math.ceil(extent[1]), u = pow(extent[0]), v = pow(extent[1]);
- if (log === d3_scale_logn) {
- ticks.push(pow(i));
- for (; i++ < j; ) for (var k = 9; k > 0; k--) ticks.push(pow(i) * k);
- } else {
- for (; i < j; i++) for (var k = 1; k < 10; k++) ticks.push(pow(i) * k);
- ticks.push(pow(i));
- }
- for (i = 0; ticks[i] < u; i++) {}
- for (j = ticks.length; ticks[j - 1] > v; j--) {}
- ticks = ticks.slice(i, j);
- }
- return ticks;
- };
- scale.tickFormat = function(n, format) {
- if (arguments.length < 2) format = d3_scale_logFormat;
- if (arguments.length < 1) return format;
- var k = Math.max(.1, n / scale.ticks().length), f = log === d3_scale_logn ? (e = -1e-12, Math.floor) : (e = 1e-12, Math.ceil), e;
- return function(d) {
- return d / pow(f(log(d) + e)) <= k ? format(d) : "";
- };
- };
- scale.copy = function() {
- return d3_scale_log(linear.copy(), log);
- };
- return d3_scale_linearRebind(scale, linear);
- }
- function d3_scale_logp(x) {
- return Math.log(x < 0 ? 0 : x) / Math.LN10;
- }
- function d3_scale_logn(x) {
- return -Math.log(x > 0 ? 0 : -x) / Math.LN10;
- }
- function d3_scale_pow(linear, exponent) {
- function scale(x) {
- return linear(powp(x));
- }
- var powp = d3_scale_powPow(exponent), powb = d3_scale_powPow(1 / exponent);
- scale.invert = function(x) {
- return powb(linear.invert(x));
- };
- scale.domain = function(x) {
- if (!arguments.length) return linear.domain().map(powb);
- linear.domain(x.map(powp));
- return scale;
- };
- scale.ticks = function(m) {
- return d3_scale_linearTicks(scale.domain(), m);
- };
- scale.tickFormat = function(m) {
- return d3_scale_linearTickFormat(scale.domain(), m);
- };
- scale.nice = function() {
- return scale.domain(d3_scale_nice(scale.domain(), d3_scale_linearNice));
- };
- scale.exponent = function(x) {
- if (!arguments.length) return exponent;
- var domain = scale.domain();
- powp = d3_scale_powPow(exponent = x);
- powb = d3_scale_powPow(1 / exponent);
- return scale.domain(domain);
- };
- scale.copy = function() {
- return d3_scale_pow(linear.copy(), exponent);
- };
- return d3_scale_linearRebind(scale, linear);
- }
- function d3_scale_powPow(e) {
- return function(x) {
- return x < 0 ? -Math.pow(-x, e) : Math.pow(x, e);
- };
- }
- function d3_scale_ordinal(domain, ranger) {
- function scale(x) {
- return range[((index.get(x) || index.set(x, domain.push(x))) - 1) % range.length];
- }
- function steps(start, step) {
- return d3.range(domain.length).map(function(i) {
- return start + step * i;
- });
- }
- var index, range, rangeBand;
- scale.domain = function(x) {
- if (!arguments.length) return domain;
- domain = [];
- index = new d3_Map;
- var i = -1, n = x.length, xi;
- while (++i < n) if (!index.has(xi = x[i])) index.set(xi, domain.push(xi));
- return scale[ranger.t].apply(scale, ranger.a);
- };
- scale.range = function(x) {
- if (!arguments.length) return range;
- range = x;
- rangeBand = 0;
- ranger = {
- t: "range",
- a: arguments
- };
- return scale;
- };
- scale.rangePoints = function(x, padding) {
- if (arguments.length < 2) padding = 0;
- var start = x[0], stop = x[1], step = (stop - start) / (Math.max(1, domain.length - 1) + padding);
- range = steps(domain.length < 2 ? (start + stop) / 2 : start + step * padding / 2, step);
- rangeBand = 0;
- ranger = {
- t: "rangePoints",
- a: arguments
- };
- return scale;
- };
- scale.rangeBands = function(x, padding, outerPadding) {
- if (arguments.length < 2) padding = 0;
- if (arguments.length < 3) outerPadding = padding;
- var reverse = x[1] < x[0], start = x[reverse - 0], stop = x[1 - reverse], step = (stop - start) / (domain.length - padding + 2 * outerPadding);
- range = steps(start + step * outerPadding, step);
- if (reverse) range.reverse();
- rangeBand = step * (1 - padding);
- ranger = {
- t: "rangeBands",
- a: arguments
- };
- return scale;
- };
- scale.rangeRoundBands = function(x, padding, outerPadding) {
- if (arguments.length < 2) padding = 0;
- if (arguments.length < 3) outerPadding = padding;
- var reverse = x[1] < x[0], start = x[reverse - 0], stop = x[1 - reverse], step = Math.floor((stop - start) / (domain.length - padding + 2 * outerPadding)), error = stop - start - (domain.length - padding) * step;
- range = steps(start + Math.round(error / 2), step);
- if (reverse) range.reverse();
- rangeBand = Math.round(step * (1 - padding));
- ranger = {
- t: "rangeRoundBands",
- a: arguments
- };
- return scale;
- };
- scale.rangeBand = function() {
- return rangeBand;
- };
- scale.rangeExtent = function() {
- return d3_scaleExtent(ranger.a[0]);
- };
- scale.copy = function() {
- return d3_scale_ordinal(domain, ranger);
- };
- return scale.domain(domain);
- }
- function d3_scale_quantile(domain, range) {
- function rescale() {
- var k = 0, n = domain.length, q = range.length;
- thresholds = [];
- while (++k < q) thresholds[k - 1] = d3.quantile(domain, k / q);
- return scale;
- }
- function scale(x) {
- if (isNaN(x = +x)) return NaN;
- return range[d3.bisect(thresholds, x)];
- }
- var thresholds;
- scale.domain = function(x) {
- if (!arguments.length) return domain;
- domain = x.filter(function(d) {
- return !isNaN(d);
- }).sort(d3.ascending);
- return rescale();
- };
- scale.range = function(x) {
- if (!arguments.length) return range;
- range = x;
- return rescale();
- };
- scale.quantiles = function() {
- return thresholds;
- };
- scale.copy = function() {
- return d3_scale_quantile(domain, range);
- };
- return rescale();
- }
- function d3_scale_quantize(x0, x1, range) {
- function scale(x) {
- return range[Math.max(0, Math.min(i, Math.floor(kx * (x - x0))))];
- }
- function rescale() {
- kx = range.length / (x1 - x0);
- i = range.length - 1;
- return scale;
- }
- var kx, i;
- scale.domain = function(x) {
- if (!arguments.length) return [ x0, x1 ];
- x0 = +x[0];
- x1 = +x[x.length - 1];
- return rescale();
- };
- scale.range = function(x) {
- if (!arguments.length) return range;
- range = x;
- return rescale();
- };
- scale.copy = function() {
- return d3_scale_quantize(x0, x1, range);
- };
- return rescale();
- }
- function d3_scale_threshold(domain, range) {
- function scale(x) {
- return range[d3.bisect(domain, x)];
- }
- scale.domain = function(_) {
- if (!arguments.length) return domain;
- domain = _;
- return scale;
- };
- scale.range = function(_) {
- if (!arguments.length) return range;
- range = _;
- return scale;
- };
- scale.copy = function() {
- return d3_scale_threshold(domain, range);
- };
- return scale;
- }
- function d3_scale_identity(domain) {
- function identity(x) {
- return +x;
- }
- identity.invert = identity;
- identity.domain = identity.range = function(x) {
- if (!arguments.length) return domain;
- domain = x.map(identity);
- return identity;
- };
- identity.ticks = function(m) {
- return d3_scale_linearTicks(domain, m);
- };
- identity.tickFormat = function(m) {
- return d3_scale_linearTickFormat(domain, m);
- };
- identity.copy = function() {
- return d3_scale_identity(domain);
- };
- return identity;
- }
- function d3_svg_arcInnerRadius(d) {
- return d.innerRadius;
- }
- function d3_svg_arcOuterRadius(d) {
- return d.outerRadius;
- }
- function d3_svg_arcStartAngle(d) {
- return d.startAngle;
- }
- function d3_svg_arcEndAngle(d) {
- return d.endAngle;
- }
- function d3_svg_line(projection) {
- function line(data) {
- function segment() {
- segments.push("M", interpolate(projection(points), tension));
- }
- var segments = [], points = [], i = -1, n = data.length, d, fx = d3_functor(x), fy = d3_functor(y);
- while (++i < n) {
- if (defined.call(this, d = data[i], i)) {
- points.push([ +fx.call(this, d, i), +fy.call(this, d, i) ]);
- } else if (points.length) {
- segment();
- points = [];
- }
- }
- if (points.length) segment();
- return segments.length ? segments.join("") : null;
- }
- var x = d3_svg_lineX, y = d3_svg_lineY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, tension = .7;
- line.x = function(_) {
- if (!arguments.length) return x;
- x = _;
- return line;
- };
- line.y = function(_) {
- if (!arguments.length) return y;
- y = _;
- return line;
- };
- line.defined = function(_) {
- if (!arguments.length) return defined;
- defined = _;
- return line;
- };
- line.interpolate = function(_) {
- if (!arguments.length) return interpolateKey;
- if (typeof _ === "function") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key;
- return line;
- };
- line.tension = function(_) {
- if (!arguments.length) return tension;
- tension = _;
- return line;
- };
- return line;
- }
- function d3_svg_lineX(d) {
- return d[0];
- }
- function d3_svg_lineY(d) {
- return d[1];
- }
- function d3_svg_lineLinear(points) {
- return points.join("L");
- }
- function d3_svg_lineLinearClosed(points) {
- return d3_svg_lineLinear(points) + "Z";
- }
- function d3_svg_lineStepBefore(points) {
- var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ];
- while (++i < n) path.push("V", (p = points[i])[1], "H", p[0]);
- return path.join("");
- }
- function d3_svg_lineStepAfter(points) {
- var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ];
- while (++i < n) path.push("H", (p = points[i])[0], "V", p[1]);
- return path.join("");
- }
- function d3_svg_lineCardinalOpen(points, tension) {
- return points.length < 4 ? d3_svg_lineLinear(points) : points[1] + d3_svg_lineHermite(points.slice(1, points.length - 1), d3_svg_lineCardinalTangents(points, tension));
- }
- function d3_svg_lineCardinalClosed(points, tension) {
- return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite((points.push(points[0]), points), d3_svg_lineCardinalTangents([ points[points.length - 2] ].concat(points, [ points[1] ]), tension));
- }
- function d3_svg_lineCardinal(points, tension, closed) {
- return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite(points, d3_svg_lineCardinalTangents(points, tension));
- }
- function d3_svg_lineHermite(points, tangents) {
- if (tangents.length < 1 || points.length != tangents.length && points.length != tangents.length + 2) {
- return d3_svg_lineLinear(points);
- }
- var quad = points.length != tangents.length, path = "", p0 = points[0], p = points[1], t0 = tangents[0], t = t0, pi = 1;
- if (quad) {
- path += "Q" + (p[0] - t0[0] * 2 / 3) + "," + (p[1] - t0[1] * 2 / 3) + "," + p[0] + "," + p[1];
- p0 = points[1];
- pi = 2;
- }
- if (tangents.length > 1) {
- t = tangents[1];
- p = points[pi];
- pi++;
- path += "C" + (p0[0] + t0[0]) + "," + (p0[1] + t0[1]) + "," + (p[0] - t[0]) + "," + (p[1] - t[1]) + "," + p[0] + "," + p[1];
- for (var i = 2; i < tangents.length; i++, pi++) {
- p = points[pi];
- t = tangents[i];
- path += "S" + (p[0] - t[0]) + "," + (p[1] - t[1]) + "," + p[0] + "," + p[1];
- }
- }
- if (quad) {
- var lp = points[pi];
- path += "Q" + (p[0] + t[0] * 2 / 3) + "," + (p[1] + t[1] * 2 / 3) + "," + lp[0] + "," + lp[1];
- }
- return path;
- }
- function d3_svg_lineCardinalTangents(points, tension) {
- var tangents = [], a = (1 - tension) / 2, p0, p1 = points[0], p2 = points[1], i = 1, n = points.length;
- while (++i < n) {
- p0 = p1;
- p1 = p2;
- p2 = points[i];
- tangents.push([ a * (p2[0] - p0[0]), a * (p2[1] - p0[1]) ]);
- }
- return tangents;
- }
- function d3_svg_lineBasis(points) {
- if (points.length < 3) return d3_svg_lineLinear(points);
- var i = 1, n = points.length, pi = points[0], x0 = pi[0], y0 = pi[1], px = [ x0, x0, x0, (pi = points[1])[0] ], py = [ y0, y0, y0, pi[1] ], path = [ x0, ",", y0 ];
- d3_svg_lineBasisBezier(path, px, py);
- while (++i < n) {
- pi = points[i];
- px.shift();
- px.push(pi[0]);
- py.shift();
- py.push(pi[1]);
- d3_svg_lineBasisBezier(path, px, py);
- }
- i = -1;
- while (++i < 2) {
- px.shift();
- px.push(pi[0]);
- py.shift();
- py.push(pi[1]);
- d3_svg_lineBasisBezier(path, px, py);
- }
- return path.join("");
- }
- function d3_svg_lineBasisOpen(points) {
- if (points.length < 4) return d3_svg_lineLinear(points);
- var path = [], i = -1, n = points.length, pi, px = [ 0 ], py = [ 0 ];
- while (++i < 3) {
- pi = points[i];
- px.push(pi[0]);
- py.push(pi[1]);
- }
- path.push(d3_svg_lineDot4(d3_svg_lineBasisBezier3, px) + "," + d3_svg_lineDot4(d3_svg_lineBasisBezier3, py));
- --i;
- while (++i < n) {
- pi = points[i];
- px.shift();
- px.push(pi[0]);
- py.shift();
- py.push(pi[1]);
- d3_svg_lineBasisBezier(path, px, py);
- }
- return path.join("");
- }
- function d3_svg_lineBasisClosed(points) {
- var path, i = -1, n = points.length, m = n + 4, pi, px = [], py = [];
- while (++i < 4) {
- pi = points[i % n];
- px.push(pi[0]);
- py.push(pi[1]);
- }
- path = [ d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, py) ];
- --i;
- while (++i < m) {
- pi = points[i % n];
- px.shift();
- px.push(pi[0]);
- py.shift();
- py.push(pi[1]);
- d3_svg_lineBasisBezier(path, px, py);
- }
- return path.join("");
- }
- function d3_svg_lineBundle(points, tension) {
- var n = points.length - 1;
- if (n) {
- var x0 = points[0][0], y0 = points[0][1], dx = points[n][0] - x0, dy = points[n][1] - y0, i = -1, p, t;
- while (++i <= n) {
- p = points[i];
- t = i / n;
- p[0] = tension * p[0] + (1 - tension) * (x0 + t * dx);
- p[1] = tension * p[1] + (1 - tension) * (y0 + t * dy);
- }
- }
- return d3_svg_lineBasis(points);
- }
- function d3_svg_lineDot4(a, b) {
- return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];
- }
- function d3_svg_lineBasisBezier(path, x, y) {
- path.push("C", d3_svg_lineDot4(d3_svg_lineBasisBezier1, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier1, y), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, y), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, y));
- }
- function d3_svg_lineSlope(p0, p1) {
- return (p1[1] - p0[1]) / (p1[0] - p0[0]);
- }
- function d3_svg_lineFiniteDifferences(points) {
- var i = 0, j = points.length - 1, m = [], p0 = points[0], p1 = points[1], d = m[0] = d3_svg_lineSlope(p0, p1);
- while (++i < j) {
- m[i] = (d + (d = d3_svg_lineSlope(p0 = p1, p1 = points[i + 1]))) / 2;
- }
- m[i] = d;
- return m;
- }
- function d3_svg_lineMonotoneTangents(points) {
- var tangents = [], d, a, b, s, m = d3_svg_lineFiniteDifferences(points), i = -1, j = points.length - 1;
- while (++i < j) {
- d = d3_svg_lineSlope(points[i], points[i + 1]);
- if (Math.abs(d) < 1e-6) {
- m[i] = m[i + 1] = 0;
- } else {
- a = m[i] / d;
- b = m[i + 1] / d;
- s = a * a + b * b;
- if (s > 9) {
- s = d * 3 / Math.sqrt(s);
- m[i] = s * a;
- m[i + 1] = s * b;
- }
- }
- }
- i = -1;
- while (++i <= j) {
- s = (points[Math.min(j, i + 1)][0] - points[Math.max(0, i - 1)][0]) / (6 * (1 + m[i] * m[i]));
- tangents.push([ s || 0, m[i] * s || 0 ]);
- }
- return tangents;
- }
- function d3_svg_lineMonotone(points) {
- return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite(points, d3_svg_lineMonotoneTangents(points));
- }
- function d3_svg_lineRadial(points) {
- var point, i = -1, n = points.length, r, a;
- while (++i < n) {
- point = points[i];
- r = point[0];
- a = point[1] + d3_svg_arcOffset;
- point[0] = r * Math.cos(a);
- point[1] = r * Math.sin(a);
- }
- return points;
- }
- function d3_svg_area(projection) {
- function area(data) {
- function segment() {
- segments.push("M", interpolate(projection(points1), tension), L, interpolateReverse(projection(points0.reverse()), tension), "Z");
- }
- var segments = [], points0 = [], points1 = [], i = -1, n = data.length, d, fx0 = d3_functor(x0), fy0 = d3_functor(y0), fx1 = x0 === x1 ? function() {
- return x;
- } : d3_functor(x1), fy1 = y0 === y1 ? function() {
- return y;
- } : d3_functor(y1), x, y;
- while (++i < n) {
- if (defined.call(this, d = data[i], i)) {
- points0.push([ x = +fx0.call(this, d, i), y = +fy0.call(this, d, i) ]);
- points1.push([ +fx1.call(this, d, i), +fy1.call(this, d, i) ]);
- } else if (points0.length) {
- segment();
- points0 = [];
- points1 = [];
- }
- }
- if (points0.length) segment();
- return segments.length ? segments.join("") : null;
- }
- var x0 = d3_svg_lineX, x1 = d3_svg_lineX, y0 = 0, y1 = d3_svg_lineY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, interpolateReverse = interpolate, L = "L", tension = .7;
- area.x = function(_) {
- if (!arguments.length) return x1;
- x0 = x1 = _;
- return area;
- };
- area.x0 = function(_) {
- if (!arguments.length) return x0;
- x0 = _;
- return area;
- };
- area.x1 = function(_) {
- if (!arguments.length) return x1;
- x1 = _;
- return area;
- };
- area.y = function(_) {
- if (!arguments.length) return y1;
- y0 = y1 = _;
- return area;
- };
- area.y0 = function(_) {
- if (!arguments.length) return y0;
- y0 = _;
- return area;
- };
- area.y1 = function(_) {
- if (!arguments.length) return y1;
- y1 = _;
- return area;
- };
- area.defined = function(_) {
- if (!arguments.length) return defined;
- defined = _;
- return area;
- };
- area.interpolate = function(_) {
- if (!arguments.length) return interpolateKey;
- if (typeof _ === "function") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key;
- interpolateReverse = interpolate.reverse || interpolate;
- L = interpolate.closed ? "M" : "L";
- return area;
- };
- area.tension = function(_) {
- if (!arguments.length) return tension;
- tension = _;
- return area;
- };
- return area;
- }
- function d3_svg_chordSource(d) {
- return d.source;
- }
- function d3_svg_chordTarget(d) {
- return d.target;
- }
- function d3_svg_chordRadius(d) {
- return d.radius;
- }
- function d3_svg_chordStartAngle(d) {
- return d.startAngle;
- }
- function d3_svg_chordEndAngle(d) {
- return d.endAngle;
- }
- function d3_svg_diagonalProjection(d) {
- return [ d.x, d.y ];
- }
- function d3_svg_diagonalRadialProjection(projection) {
- return function() {
- var d = projection.apply(this, arguments), r = d[0], a = d[1] + d3_svg_arcOffset;
- return [ r * Math.cos(a), r * Math.sin(a) ];
- };
- }
- function d3_svg_symbolSize() {
- return 64;
- }
- function d3_svg_symbolType() {
- return "circle";
- }
- function d3_svg_symbolCircle(size) {
- var r = Math.sqrt(size / Math.PI);
- return "M0," + r + "A" + r + "," + r + " 0 1,1 0," + -r + "A" + r + "," + r + " 0 1,1 0," + r + "Z";
- }
- function d3_svg_axisX(selection, x) {
- selection.attr("transform", function(d) {
- return "translate(" + x(d) + ",0)";
- });
- }
- function d3_svg_axisY(selection, y) {
- selection.attr("transform", function(d) {
- return "translate(0," + y(d) + ")";
- });
- }
- function d3_svg_axisSubdivide(scale, ticks, m) {
- subticks = [];
- if (m && ticks.length > 1) {
- var extent = d3_scaleExtent(scale.domain()), subticks, i = -1, n = ticks.length, d = (ticks[1] - ticks[0]) / ++m, j, v;
- while (++i < n) {
- for (j = m; --j > 0; ) {
- if ((v = +ticks[i] - j * d) >= extent[0]) {
- subticks.push(v);
- }
- }
- }
- for (--i, j = 0; ++j < m && (v = +ticks[i] + j * d) < extent[1]; ) {
- subticks.push(v);
- }
- }
- return subticks;
- }
- function d3_behavior_zoomDelta() {
- if (!d3_behavior_zoomDiv) {
- d3_behavior_zoomDiv = d3.select("body").append("div").style("visibility", "hidden").style("top", 0).style("height", 0).style("width", 0).style("overflow-y", "scroll").append("div").style("height", "2000px").node().parentNode;
- }
- var e = d3.event, delta;
- try {
- d3_behavior_zoomDiv.scrollTop = 1e3;
- d3_behavior_zoomDiv.dispatchEvent(e);
- delta = 1e3 - d3_behavior_zoomDiv.scrollTop;
- } catch (error) {
- delta = e.wheelDelta || -e.detail * 5;
- }
- return delta;
- }
- function d3_layout_bundlePath(link) {
- var start = link.source, end = link.target, lca = d3_layout_bundleLeastCommonAncestor(start, end), points = [ start ];
- while (start !== lca) {
- start = start.parent;
- points.push(start);
- }
- var k = points.length;
- while (end !== lca) {
- points.splice(k, 0, end);
- end = end.parent;
- }
- return points;
- }
- function d3_layout_bundleAncestors(node) {
- var ancestors = [], parent = node.parent;
- while (parent != null) {
- ancestors.push(node);
- node = parent;
- parent = parent.parent;
- }
- ancestors.push(node);
- return ancestors;
- }
- function d3_layout_bundleLeastCommonAncestor(a, b) {
- if (a === b) return a;
- var aNodes = d3_layout_bundleAncestors(a), bNodes = d3_layout_bundleAncestors(b), aNode = aNodes.pop(), bNode = bNodes.pop(), sharedNode = null;
- while (aNode === bNode) {
- sharedNode = aNode;
- aNode = aNodes.pop();
- bNode = bNodes.pop();
- }
- return sharedNode;
- }
- function d3_layout_forceDragstart(d) {
- d.fixed |= 2;
- }
- function d3_layout_forceDragend(d) {
- d.fixed &= 1;
- }
- function d3_layout_forceMouseover(d) {
- d.fixed |= 4;
- }
- function d3_layout_forceMouseout(d) {
- d.fixed &= 3;
- }
- function d3_layout_forceAccumulate(quad, alpha, charges) {
- var cx = 0, cy = 0;
- quad.charge = 0;
- if (!quad.leaf) {
- var nodes = quad.nodes, n = nodes.length, i = -1, c;
- while (++i < n) {
- c = nodes[i];
- if (c == null) continue;
- d3_layout_forceAccumulate(c, alpha, charges);
- quad.charge += c.charge;
- cx += c.charge * c.cx;
- cy += c.charge * c.cy;
- }
- }
- if (quad.point) {
- if (!quad.leaf) {
- quad.point.x += Math.random() - .5;
- quad.point.y += Math.random() - .5;
- }
- var k = alpha * charges[quad.point.index];
- quad.charge += quad.pointCharge = k;
- cx += k * quad.point.x;
- cy += k * quad.point.y;
- }
- quad.cx = cx / quad.charge;
- quad.cy = cy / quad.charge;
- }
- function d3_layout_forceLinkDistance(link) {
- return 20;
- }
- function d3_layout_forceLinkStrength(link) {
- return 1;
- }
- function d3_layout_stackX(d) {
- return d.x;
- }
- function d3_layout_stackY(d) {
- return d.y;
- }
- function d3_layout_stackOut(d, y0, y) {
- d.y0 = y0;
- d.y = y;
- }
- function d3_layout_stackOrderDefault(data) {
- return d3.range(data.length);
- }
- function d3_layout_stackOffsetZero(data) {
- var j = -1, m = data[0].length, y0 = [];
- while (++j < m) y0[j] = 0;
- return y0;
- }
- function d3_layout_stackMaxIndex(array) {
- var i = 1, j = 0, v = array[0][1], k, n = array.length;
- for (; i < n; ++i) {
- if ((k = array[i][1]) > v) {
- j = i;
- v = k;
- }
- }
- return j;
- }
- function d3_layout_stackReduceSum(d) {
- return d.reduce(d3_layout_stackSum, 0);
- }
- function d3_layout_stackSum(p, d) {
- return p + d[1];
- }
- function d3_layout_histogramBinSturges(range, values) {
- return d3_layout_histogramBinFixed(range, Math.ceil(Math.log(values.length) / Math.LN2 + 1));
- }
- function d3_layout_histogramBinFixed(range, n) {
- var x = -1, b = +range[0], m = (range[1] - b) / n, f = [];
- while (++x <= n) f[x] = m * x + b;
- return f;
- }
- function d3_layout_histogramRange(values) {
- return [ d3.min(values), d3.max(values) ];
- }
- function d3_layout_hierarchyRebind(object, hierarchy) {
- d3.rebind(object, hierarchy, "sort", "children", "value");
- object.links = d3_layout_hierarchyLinks;
- object.nodes = function(d) {
- d3_layout_hierarchyInline = true;
- return (object.nodes = object)(d);
- };
- return object;
- }
- function d3_layout_hierarchyChildren(d) {
- return d.children;
- }
- function d3_layout_hierarchyValue(d) {
- return d.value;
- }
- function d3_layout_hierarchySort(a, b) {
- return b.value - a.value;
- }
- function d3_layout_hierarchyLinks(nodes) {
- return d3.merge(nodes.map(function(parent) {
- return (parent.children || []).map(function(child) {
- return {
- source: parent,
- target: child
- };
- });
- }));
- }
- function d3_layout_packSort(a, b) {
- return a.value - b.value;
- }
- function d3_layout_packInsert(a, b) {
- var c = a._pack_next;
- a._pack_next = b;
- b._pack_prev = a;
- b._pack_next = c;
- c._pack_prev = b;
- }
- function d3_layout_packSplice(a, b) {
- a._pack_next = b;
- b._pack_prev = a;
- }
- function d3_layout_packIntersects(a, b) {
- var dx = b.x - a.x, dy = b.y - a.y, dr = a.r + b.r;
- return dr * dr - dx * dx - dy * dy > .001;
- }
- function d3_layout_packSiblings(node) {
- function bound(node) {
- xMin = Math.min(node.x - node.r, xMin);
- xMax = Math.max(node.x + node.r, xMax);
- yMin = Math.min(node.y - node.r, yMin);
- yMax = Math.max(node.y + node.r, yMax);
- }
- if (!(nodes = node.children) || !(n = nodes.length)) return;
- var nodes, xMin = Infinity, xMax = -Infinity, yMin = Infinity, yMax = -Infinity, a, b, c, i, j, k, n;
- nodes.forEach(d3_layout_packLink);
- a = nodes[0];
- a.x = -a.r;
- a.y = 0;
- bound(a);
- if (n > 1) {
- b = nodes[1];
- b.x = b.r;
- b.y = 0;
- bound(b);
- if (n > 2) {
- c = nodes[2];
- d3_layout_packPlace(a, b, c);
- bound(c);
- d3_layout_packInsert(a, c);
- a._pack_prev = c;
- d3_layout_packInsert(c, b);
- b = a._pack_next;
- for (i = 3; i < n; i++) {
- d3_layout_packPlace(a, b, c = nodes[i]);
- var isect = 0, s1 = 1, s2 = 1;
- for (j = b._pack_next; j !== b; j = j._pack_next, s1++) {
- if (d3_layout_packIntersects(j, c)) {
- isect = 1;
- break;
- }
- }
- if (isect == 1) {
- for (k = a._pack_prev; k !== j._pack_prev; k = k._pack_prev, s2++) {
- if (d3_layout_packIntersects(k, c)) {
- break;
- }
- }
- }
- if (isect) {
- if (s1 < s2 || s1 == s2 && b.r < a.r) d3_layout_packSplice(a, b = j); else d3_layout_packSplice(a = k, b);
- i--;
- } else {
- d3_layout_packInsert(a, c);
- b = c;
- bound(c);
- }
- }
- }
- }
- var cx = (xMin + xMax) / 2, cy = (yMin + yMax) / 2, cr = 0;
- for (i = 0; i < n; i++) {
- c = nodes[i];
- c.x -= cx;
- c.y -= cy;
- cr = Math.max(cr, c.r + Math.sqrt(c.x * c.x + c.y * c.y));
- }
- node.r = cr;
- nodes.forEach(d3_layout_packUnlink);
- }
- function d3_layout_packLink(node) {
- node._pack_next = node._pack_prev = node;
- }
- function d3_layout_packUnlink(node) {
- delete node._pack_next;
- delete node._pack_prev;
- }
- function d3_layout_packTransform(node, x, y, k) {
- var children = node.children;
- node.x = x += k * node.x;
- node.y = y += k * node.y;
- node.r *= k;
- if (children) {
- var i = -1, n = children.length;
- while (++i < n) d3_layout_packTransform(children[i], x, y, k);
- }
- }
- function d3_layout_packPlace(a, b, c) {
- var db = a.r + c.r, dx = b.x - a.x, dy = b.y - a.y;
- if (db && (dx || dy)) {
- var da = b.r + c.r, dc = dx * dx + dy * dy;
- da *= da;
- db *= db;
- var x = .5 + (db - da) / (2 * dc), y = Math.sqrt(Math.max(0, 2 * da * (db + dc) - (db -= dc) * db - da * da)) / (2 * dc);
- c.x = a.x + x * dx + y * dy;
- c.y = a.y + x * dy - y * dx;
- } else {
- c.x = a.x + db;
- c.y = a.y;
- }
- }
- function d3_layout_clusterY(children) {
- return 1 + d3.max(children, function(child) {
- return child.y;
- });
- }
- function d3_layout_clusterX(children) {
- return children.reduce(function(x, child) {
- return x + child.x;
- }, 0) / children.length;
- }
- function d3_layout_clusterLeft(node) {
- var children = node.children;
- return children && children.length ? d3_layout_clusterLeft(children[0]) : node;
- }
- function d3_layout_clusterRight(node) {
- var children = node.children, n;
- return children && (n = children.length) ? d3_layout_clusterRight(children[n - 1]) : node;
- }
- function d3_layout_treeSeparation(a, b) {
- return a.parent == b.parent ? 1 : 2;
- }
- function d3_layout_treeLeft(node) {
- var children = node.children;
- return children && children.length ? children[0] : node._tree.thread;
- }
- function d3_layout_treeRight(node) {
- var children = node.children, n;
- return children && (n = children.length) ? children[n - 1] : node._tree.thread;
- }
- function d3_layout_treeSearch(node, compare) {
- var children = node.children;
- if (children && (n = children.length)) {
- var child, n, i = -1;
- while (++i < n) {
- if (compare(child = d3_layout_treeSearch(children[i], compare), node) > 0) {
- node = child;
- }
- }
- }
- return node;
- }
- function d3_layout_treeRightmost(a, b) {
- return a.x - b.x;
- }
- function d3_layout_treeLeftmost(a, b) {
- return b.x - a.x;
- }
- function d3_layout_treeDeepest(a, b) {
- return a.depth - b.depth;
- }
- function d3_layout_treeVisitAfter(node, callback) {
- function visit(node, previousSibling) {
- var children = node.children;
- if (children && (n = children.length)) {
- var child, previousChild = null, i = -1, n;
- while (++i < n) {
- child = children[i];
- visit(child, previousChild);
- previousChild = child;
- }
- }
- callback(node, previousSibling);
- }
- visit(node, null);
- }
- function d3_layout_treeShift(node) {
- var shift = 0, change = 0, children = node.children, i = children.length, child;
- while (--i >= 0) {
- child = children[i]._tree;
- child.prelim += shift;
- child.mod += shift;
- shift += child.shift + (change += child.change);
- }
- }
- function d3_layout_treeMove(ancestor, node, shift) {
- ancestor = ancestor._tree;
- node = node._tree;
- var change = shift / (node.number - ancestor.number);
- ancestor.change += change;
- node.change -= change;
- node.shift += shift;
- node.prelim += shift;
- node.mod += shift;
- }
- function d3_layout_treeAncestor(vim, node, ancestor) {
- return vim._tree.ancestor.parent == node.parent ? vim._tree.ancestor : ancestor;
- }
- function d3_layout_treemapPadNull(node) {
- return {
- x: node.x,
- y: node.y,
- dx: node.dx,
- dy: node.dy
- };
- }
- function d3_layout_treemapPad(node, padding) {
- var x = node.x + padding[3], y = node.y + padding[0], dx = node.dx - padding[1] - padding[3], dy = node.dy - padding[0] - padding[2];
- if (dx < 0) {
- x += dx / 2;
- dx = 0;
- }
- if (dy < 0) {
- y += dy / 2;
- dy = 0;
- }
- return {
- x: x,
- y: y,
- dx: dx,
- dy: dy
- };
- }
- function d3_dsv(delimiter, mimeType) {
- function dsv(url, callback) {
- d3.text(url, mimeType, function(text) {
- callback(text && dsv.parse(text));
- });
- }
- function formatRow(row) {
- return row.map(formatValue).join(delimiter);
- }
- function formatValue(text) {
- return reFormat.test(text) ? '"' + text.replace(/\"/g, '""') + '"' : text;
- }
- var reParse = new RegExp("\r\n|[" + delimiter + "\r\n]", "g"), reFormat = new RegExp('["' + delimiter + "\n]"), delimiterCode = delimiter.charCodeAt(0);
- dsv.parse = function(text) {
- var header;
- return dsv.parseRows(text, function(row, i) {
- if (i) {
- var o = {}, j = -1, m = header.length;
- while (++j < m) o[header[j]] = row[j];
- return o;
- } else {
- header = row;
- return null;
- }
- });
- };
- dsv.parseRows = function(text, f) {
- function token() {
- if (reParse.lastIndex >= text.length) return EOF;
- if (eol) {
- eol = false;
- return EOL;
- }
- var j = reParse.lastIndex;
- if (text.charCodeAt(j) === 34) {
- var i = j;
- while (i++ < text.length) {
- if (text.charCodeAt(i) === 34) {
- if (text.charCodeAt(i + 1) !== 34) break;
- i++;
- }
- }
- reParse.lastIndex = i + 2;
- var c = text.charCodeAt(i + 1);
- if (c === 13) {
- eol = true;
- if (text.charCodeAt(i + 2) === 10) reParse.lastIndex++;
- } else if (c === 10) {
- eol = true;
- }
- return text.substring(j + 1, i).replace(/""/g, '"');
- }
- var m = reParse.exec(text);
- if (m) {
- eol = m[0].charCodeAt(0) !== delimiterCode;
- return text.substring(j, m.index);
- }
- reParse.lastIndex = text.length;
- return text.substring(j);
- }
- var EOL = {}, EOF = {}, rows = [], n = 0, t, eol;
- reParse.lastIndex = 0;
- while ((t = token()) !== EOF) {
- var a = [];
- while (t !== EOL && t !== EOF) {
- a.push(t);
- t = token();
- }
- if (f && !(a = f(a, n++))) continue;
- rows.push(a);
- }
- return rows;
- };
- dsv.format = function(rows) {
- return rows.map(formatRow).join("\n");
- };
- return dsv;
- }
- function d3_geo_type(types, defaultValue) {
- return function(object) {
- return object && types.hasOwnProperty(object.type) ? types[object.type](object) : defaultValue;
- };
- }
- function d3_path_circle(radius) {
- return "m0," + radius + "a" + radius + "," + radius + " 0 1,1 0," + -2 * radius + "a" + radius + "," + radius + " 0 1,1 0," + +2 * radius + "z";
- }
- function d3_geo_bounds(o, f) {
- if (d3_geo_boundsTypes.hasOwnProperty(o.type)) d3_geo_boundsTypes[o.type](o, f);
- }
- function d3_geo_boundsFeature(o, f) {
- d3_geo_bounds(o.geometry, f);
- }
- function d3_geo_boundsFeatureCollection(o, f) {
- for (var a = o.features, i = 0, n = a.length; i < n; i++) {
- d3_geo_bounds(a[i].geometry, f);
- }
- }
- function d3_geo_boundsGeometryCollection(o, f) {
- for (var a = o.geometries, i = 0, n = a.length; i < n; i++) {
- d3_geo_bounds(a[i], f);
- }
- }
- function d3_geo_boundsLineString(o, f) {
- for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) {
- f.apply(null, a[i]);
- }
- }
- function d3_geo_boundsMultiLineString(o, f) {
- for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) {
- for (var b = a[i], j = 0, m = b.length; j < m; j++) {
- f.apply(null, b[j]);
- }
- }
- }
- function d3_geo_boundsMultiPolygon(o, f) {
- for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) {
- for (var b = a[i][0], j = 0, m = b.length; j < m; j++) {
- f.apply(null, b[j]);
- }
- }
- }
- function d3_geo_boundsPoint(o, f) {
- f.apply(null, o.coordinates);
- }
- function d3_geo_boundsPolygon(o, f) {
- for (var a = o.coordinates[0], i = 0, n = a.length; i < n; i++) {
- f.apply(null, a[i]);
- }
- }
- function d3_geo_greatArcSource(d) {
- return d.source;
- }
- function d3_geo_greatArcTarget(d) {
- return d.target;
- }
- function d3_geo_greatArcInterpolator() {
- function interpolate(t) {
- var B = Math.sin(t *= d) * k, A = Math.sin(d - t) * k, x = A * kx0 + B * kx1, y = A * ky0 + B * ky1, z = A * sy0 + B * sy1;
- return [ Math.atan2(y, x) / d3_geo_radians, Math.atan2(z, Math.sqrt(x * x + y * y)) / d3_geo_radians ];
- }
- var x0, y0, cy0, sy0, kx0, ky0, x1, y1, cy1, sy1, kx1, ky1, d, k;
- interpolate.distance = function() {
- if (d == null) k = 1 / Math.sin(d = Math.acos(Math.max(-1, Math.min(1, sy0 * sy1 + cy0 * cy1 * Math.cos(x1 - x0)))));
- return d;
- };
- interpolate.source = function(_) {
- var cx0 = Math.cos(x0 = _[0] * d3_geo_radians), sx0 = Math.sin(x0);
- cy0 = Math.cos(y0 = _[1] * d3_geo_radians);
- sy0 = Math.sin(y0);
- kx0 = cy0 * cx0;
- ky0 = cy0 * sx0;
- d = null;
- return interpolate;
- };
- interpolate.target = function(_) {
- var cx1 = Math.cos(x1 = _[0] * d3_geo_radians), sx1 = Math.sin(x1);
- cy1 = Math.cos(y1 = _[1] * d3_geo_radians);
- sy1 = Math.sin(y1);
- kx1 = cy1 * cx1;
- ky1 = cy1 * sx1;
- d = null;
- return interpolate;
- };
- return interpolate;
- }
- function d3_geo_greatArcInterpolate(a, b) {
- var i = d3_geo_greatArcInterpolator().source(a).target(b);
- i.distance();
- return i;
- }
- function d3_geom_contourStart(grid) {
- var x = 0, y = 0;
- while (true) {
- if (grid(x, y)) {
- return [ x, y ];
- }
- if (x === 0) {
- x = y + 1;
- y = 0;
- } else {
- x = x - 1;
- y = y + 1;
- }
- }
- }
- function d3_geom_hullCCW(i1, i2, i3, v) {
- var t, a, b, c, d, e, f;
- t = v[i1];
- a = t[0];
- b = t[1];
- t = v[i2];
- c = t[0];
- d = t[1];
- t = v[i3];
- e = t[0];
- f = t[1];
- return (f - b) * (c - a) - (d - b) * (e - a) > 0;
- }
- function d3_geom_polygonInside(p, a, b) {
- return (b[0] - a[0]) * (p[1] - a[1]) < (b[1] - a[1]) * (p[0] - a[0]);
- }
- function d3_geom_polygonIntersect(c, d, a, b) {
- var x1 = c[0], x2 = d[0], x3 = a[0], x4 = b[0], y1 = c[1], y2 = d[1], y3 = a[1], y4 = b[1], x13 = x1 - x3, x21 = x2 - x1, x43 = x4 - x3, y13 = y1 - y3, y21 = y2 - y1, y43 = y4 - y3, ua = (x43 * y13 - y43 * x13) / (y43 * x21 - x43 * y21);
- return [ x1 + ua * x21, y1 + ua * y21 ];
- }
- function d3_voronoi_tessellate(vertices, callback) {
- var Sites = {
- list: vertices.map(function(v, i) {
- return {
- index: i,
- x: v[0],
- y: v[1]
- };
- }).sort(function(a, b) {
- return a.y < b.y ? -1 : a.y > b.y ? 1 : a.x < b.x ? -1 : a.x > b.x ? 1 : 0;
- }),
- bottomSite: null
- };
- var EdgeList = {
- list: [],
- leftEnd: null,
- rightEnd: null,
- init: function() {
- EdgeList.leftEnd = EdgeList.createHalfEdge(null, "l");
- EdgeList.rightEnd = EdgeList.createHalfEdge(null, "l");
- EdgeList.leftEnd.r = EdgeList.rightEnd;
- EdgeList.rightEnd.l = EdgeList.leftEnd;
- EdgeList.list.unshift(EdgeList.leftEnd, EdgeList.rightEnd);
- },
- createHalfEdge: function(edge, side) {
- return {
- edge: edge,
- side: side,
- vertex: null,
- l: null,
- r: null
- };
- },
- insert: function(lb, he) {
- he.l = lb;
- he.r = lb.r;
- lb.r.l = he;
- lb.r = he;
- },
- leftBound: function(p) {
- var he = EdgeList.leftEnd;
- do {
- he = he.r;
- } while (he != EdgeList.rightEnd && Geom.rightOf(he, p));
- he = he.l;
- return he;
- },
- del: function(he) {
- he.l.r = he.r;
- he.r.l = he.l;
- he.edge = null;
- },
- right: function(he) {
- return he.r;
- },
- left: function(he) {
- return he.l;
- },
- leftRegion: function(he) {
- return he.edge == null ? Sites.bottomSite : he.edge.region[he.side];
- },
- rightRegion: function(he) {
- return he.edge == null ? Sites.bottomSite : he.edge.region[d3_voronoi_opposite[he.side]];
- }
- };
- var Geom = {
- bisect: function(s1, s2) {
- var newEdge = {
- region: {
- l: s1,
- r: s2
- },
- ep: {
- l: null,
- r: null
- }
- };
- var dx = s2.x - s1.x, dy = s2.y - s1.y, adx = dx > 0 ? dx : -dx, ady = dy > 0 ? dy : -dy;
- newEdge.c = s1.x * dx + s1.y * dy + (dx * dx + dy * dy) * .5;
- if (adx > ady) {
- newEdge.a = 1;
- newEdge.b = dy / dx;
- newEdge.c /= dx;
- } else {
- newEdge.b = 1;
- newEdge.a = dx / dy;
- newEdge.c /= dy;
- }
- return newEdge;
- },
- intersect: function(el1, el2) {
- var e1 = el1.edge, e2 = el2.edge;
- if (!e1 || !e2 || e1.region.r == e2.region.r) {
- return null;
- }
- var d = e1.a * e2.b - e1.b * e2.a;
- if (Math.abs(d) < 1e-10) {
- return null;
- }
- var xint = (e1.c * e2.b - e2.c * e1.b) / d, yint = (e2.c * e1.a - e1.c * e2.a) / d, e1r = e1.region.r, e2r = e2.region.r, el, e;
- if (e1r.y < e2r.y || e1r.y == e2r.y && e1r.x < e2r.x) {
- el = el1;
- e = e1;
- } else {
- el = el2;
- e = e2;
- }
- var rightOfSite = xint >= e.region.r.x;
- if (rightOfSite && el.side === "l" || !rightOfSite && el.side === "r") {
- return null;
- }
- return {
- x: xint,
- y: yint
- };
- },
- rightOf: function(he, p) {
- var e = he.edge, topsite = e.region.r, rightOfSite = p.x > topsite.x;
- if (rightOfSite && he.side === "l") {
- return 1;
- }
- if (!rightOfSite && he.side === "r") {
- return 0;
- }
- if (e.a === 1) {
- var dyp = p.y - topsite.y, dxp = p.x - topsite.x, fast = 0, above = 0;
- if (!rightOfSite && e.b < 0 || rightOfSite && e.b >= 0) {
- above = fast = dyp >= e.b * dxp;
- } else {
- above = p.x + p.y * e.b > e.c;
- if (e.b < 0) {
- above = !above;
- }
- if (!above) {
- fast = 1;
- }
- }
- if (!fast) {
- var dxs = topsite.x - e.region.l.x;
- above = e.b * (dxp * dxp - dyp * dyp) < dxs * dyp * (1 + 2 * dxp / dxs + e.b * e.b);
- if (e.b < 0) {
- above = !above;
- }
- }
- } else {
- var yl = e.c - e.a * p.x, t1 = p.y - yl, t2 = p.x - topsite.x, t3 = yl - topsite.y;
- above = t1 * t1 > t2 * t2 + t3 * t3;
- }
- return he.side === "l" ? above : !above;
- },
- endPoint: function(edge, side, site) {
- edge.ep[side] = site;
- if (!edge.ep[d3_voronoi_opposite[side]]) return;
- callback(edge);
- },
- distance: function(s, t) {
- var dx = s.x - t.x, dy = s.y - t.y;
- return Math.sqrt(dx * dx + dy * dy);
- }
- };
- var EventQueue = {
- list: [],
- insert: function(he, site, offset) {
- he.vertex = site;
- he.ystar = site.y + offset;
- for (var i = 0, list = EventQueue.list, l = list.length; i < l; i++) {
- var next = list[i];
- if (he.ystar > next.ystar || he.ystar == next.ystar && site.x > next.vertex.x) {
- continue;
- } else {
- break;
- }
- }
- list.splice(i, 0, he);
- },
- del: function(he) {
- for (var i = 0, ls = EventQueue.list, l = ls.length; i < l && ls[i] != he; ++i) {}
- ls.splice(i, 1);
- },
- empty: function() {
- return EventQueue.list.length === 0;
- },
- nextEvent: function(he) {
- for (var i = 0, ls = EventQueue.list, l = ls.length; i < l; ++i) {
- if (ls[i] == he) return ls[i + 1];
- }
- return null;
- },
- min: function() {
- var elem = EventQueue.list[0];
- return {
- x: elem.vertex.x,
- y: elem.ystar
- };
- },
- extractMin: function() {
- return EventQueue.list.shift();
- }
- };
- EdgeList.init();
- Sites.bottomSite = Sites.list.shift();
- var newSite = Sites.list.shift(), newIntStar;
- var lbnd, rbnd, llbnd, rrbnd, bisector;
- var bot, top, temp, p, v;
- var e, pm;
- while (true) {
- if (!EventQueue.empty()) {
- newIntStar = EventQueue.min();
- }
- if (newSite && (EventQueue.empty() || newSite.y < newIntStar.y || newSite.y == newIntStar.y && newSite.x < newIntStar.x)) {
- lbnd = EdgeList.leftBound(newSite);
- rbnd = EdgeList.right(lbnd);
- bot = EdgeList.rightRegion(lbnd);
- e = Geom.bisect(bot, newSite);
- bisector = EdgeList.createHalfEdge(e, "l");
- EdgeList.insert(lbnd, bisector);
- p = Geom.intersect(lbnd, bisector);
- if (p) {
- EventQueue.del(lbnd);
- EventQueue.insert(lbnd, p, Geom.distance(p, newSite));
- }
- lbnd = bisector;
- bisector = EdgeList.createHalfEdge(e, "r");
- EdgeList.insert(lbnd, bisector);
- p = Geom.intersect(bisector, rbnd);
- if (p) {
- EventQueue.insert(bisector, p, Geom.distance(p, newSite));
- }
- newSite = Sites.list.shift();
- } else if (!EventQueue.empty()) {
- lbnd = EventQueue.extractMin();
- llbnd = EdgeList.left(lbnd);
- rbnd = EdgeList.right(lbnd);
- rrbnd = EdgeList.right(rbnd);
- bot = EdgeList.leftRegion(lbnd);
- top = EdgeList.rightRegion(rbnd);
- v = lbnd.vertex;
- Geom.endPoint(lbnd.edge, lbnd.side, v);
- Geom.endPoint(rbnd.edge, rbnd.side, v);
- EdgeList.del(lbnd);
- EventQueue.del(rbnd);
- EdgeList.del(rbnd);
- pm = "l";
- if (bot.y > top.y) {
- temp = bot;
- bot = top;
- top = temp;
- pm = "r";
- }
- e = Geom.bisect(bot, top);
- bisector = EdgeList.createHalfEdge(e, pm);
- EdgeList.insert(llbnd, bisector);
- Geom.endPoint(e, d3_voronoi_opposite[pm], v);
- p = Geom.intersect(llbnd, bisector);
- if (p) {
- EventQueue.del(llbnd);
- EventQueue.insert(llbnd, p, Geom.distance(p, bot));
- }
- p = Geom.intersect(bisector, rrbnd);
- if (p) {
- EventQueue.insert(bisector, p, Geom.distance(p, bot));
- }
- } else {
- break;
- }
- }
- for (lbnd = EdgeList.right(EdgeList.leftEnd); lbnd != EdgeList.rightEnd; lbnd = EdgeList.right(lbnd)) {
- callback(lbnd.edge);
- }
- }
- function d3_geom_quadtreeNode() {
- return {
- leaf: true,
- nodes: [],
- point: null
- };
- }
- function d3_geom_quadtreeVisit(f, node, x1, y1, x2, y2) {
- if (!f(node, x1, y1, x2, y2)) {
- var sx = (x1 + x2) * .5, sy = (y1 + y2) * .5, children = node.nodes;
- if (children[0]) d3_geom_quadtreeVisit(f, children[0], x1, y1, sx, sy);
- if (children[1]) d3_geom_quadtreeVisit(f, children[1], sx, y1, x2, sy);
- if (children[2]) d3_geom_quadtreeVisit(f, children[2], x1, sy, sx, y2);
- if (children[3]) d3_geom_quadtreeVisit(f, children[3], sx, sy, x2, y2);
- }
- }
- function d3_geom_quadtreePoint(p) {
- return {
- x: p[0],
- y: p[1]
- };
- }
- function d3_time_utc() {
- this._ = new Date(arguments.length > 1 ? Date.UTC.apply(this, arguments) : arguments[0]);
- }
- function d3_time_formatAbbreviate(name) {
- return name.substring(0, 3);
- }
- function d3_time_parse(date, template, string, j) {
- var c, p, i = 0, n = template.length, m = string.length;
- while (i < n) {
- if (j >= m) return -1;
- c = template.charCodeAt(i++);
- if (c == 37) {
- p = d3_time_parsers[template.charAt(i++)];
- if (!p || (j = p(date, string, j)) < 0) return -1;
- } else if (c != string.charCodeAt(j++)) {
- return -1;
- }
- }
- return j;
- }
- function d3_time_formatRe(names) {
- return new RegExp("^(?:" + names.map(d3.requote).join("|") + ")", "i");
- }
- function d3_time_formatLookup(names) {
- var map = new d3_Map, i = -1, n = names.length;
- while (++i < n) map.set(names[i].toLowerCase(), i);
- return map;
- }
- function d3_time_parseWeekdayAbbrev(date, string, i) {
- d3_time_dayAbbrevRe.lastIndex = 0;
- var n = d3_time_dayAbbrevRe.exec(string.substring(i));
- return n ? i += n[0].length : -1;
- }
- function d3_time_parseWeekday(date, string, i) {
- d3_time_dayRe.lastIndex = 0;
- var n = d3_time_dayRe.exec(string.substring(i));
- return n ? i += n[0].length : -1;
- }
- function d3_time_parseMonthAbbrev(date, string, i) {
- d3_time_monthAbbrevRe.lastIndex = 0;
- var n = d3_time_monthAbbrevRe.exec(string.substring(i));
- return n ? (date.m = d3_time_monthAbbrevLookup.get(n[0].toLowerCase()), i += n[0].length) : -1;
- }
- function d3_time_parseMonth(date, string, i) {
- d3_time_monthRe.lastIndex = 0;
- var n = d3_time_monthRe.exec(string.substring(i));
- return n ? (date.m = d3_time_monthLookup.get(n[0].toLowerCase()), i += n[0].length) : -1;
- }
- function d3_time_parseLocaleFull(date, string, i) {
- return d3_time_parse(date, d3_time_formats.c.toString(), string, i);
- }
- function d3_time_parseLocaleDate(date, string, i) {
- return d3_time_parse(date, d3_time_formats.x.toString(), string, i);
- }
- function d3_time_parseLocaleTime(date, string, i) {
- return d3_time_parse(date, d3_time_formats.X.toString(), string, i);
- }
- function d3_time_parseFullYear(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 4));
- return n ? (date.y = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseYear(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.y = d3_time_expandYear(+n[0]), i += n[0].length) : -1;
- }
- function d3_time_expandYear(d) {
- return d + (d > 68 ? 1900 : 2e3);
- }
- function d3_time_parseMonthNumber(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.m = n[0] - 1, i += n[0].length) : -1;
- }
- function d3_time_parseDay(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.d = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseHour24(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.H = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseMinutes(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.M = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseSeconds(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.S = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseMilliseconds(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 3));
- return n ? (date.L = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseAmPm(date, string, i) {
- var n = d3_time_amPmLookup.get(string.substring(i, i += 2).toLowerCase());
- return n == null ? -1 : (date.p = n, i);
- }
- function d3_time_zone(d) {
- var z = d.getTimezoneOffset(), zs = z > 0 ? "-" : "+", zh = ~~(Math.abs(z) / 60), zm = Math.abs(z) % 60;
- return zs + d3_time_zfill2(zh) + d3_time_zfill2(zm);
- }
- function d3_time_formatIsoNative(date) {
- return date.toISOString();
- }
- function d3_time_interval(local, step, number) {
- function round(date) {
- var d0 = local(date), d1 = offset(d0, 1);
- return date - d0 < d1 - date ? d0 : d1;
- }
- function ceil(date) {
- step(date = local(new d3_time(date - 1)), 1);
- return date;
- }
- function offset(date, k) {
- step(date = new d3_time(+date), k);
- return date;
- }
- function range(t0, t1, dt) {
- var time = ceil(t0), times = [];
- if (dt > 1) {
- while (time < t1) {
- if (!(number(time) % dt)) times.push(new Date(+time));
- step(time, 1);
- }
- } else {
- while (time < t1) times.push(new Date(+time)), step(time, 1);
- }
- return times;
- }
- function range_utc(t0, t1, dt) {
- try {
- d3_time = d3_time_utc;
- var utc = new d3_time_utc;
- utc._ = t0;
- return range(utc, t1, dt);
- } finally {
- d3_time = Date;
- }
- }
- local.floor = local;
- local.round = round;
- local.ceil = ceil;
- local.offset = offset;
- local.range = range;
- var utc = local.utc = d3_time_interval_utc(local);
- utc.floor = utc;
- utc.round = d3_time_interval_utc(round);
- utc.ceil = d3_time_interval_utc(ceil);
- utc.offset = d3_time_interval_utc(offset);
- utc.range = range_utc;
- return local;
- }
- function d3_time_interval_utc(method) {
- return function(date, k) {
- try {
- d3_time = d3_time_utc;
- var utc = new d3_time_utc;
- utc._ = date;
- return method(utc, k)._;
- } finally {
- d3_time = Date;
- }
- };
- }
- function d3_time_scale(linear, methods, format) {
- function scale(x) {
- return linear(x);
- }
- scale.invert = function(x) {
- return d3_time_scaleDate(linear.invert(x));
- };
- scale.domain = function(x) {
- if (!arguments.length) return linear.domain().map(d3_time_scaleDate);
- linear.domain(x);
- return scale;
- };
- scale.nice = function(m) {
- return scale.domain(d3_scale_nice(scale.domain(), function() {
- return m;
- }));
- };
- scale.ticks = function(m, k) {
- var extent = d3_time_scaleExtent(scale.domain());
- if (typeof m !== "function") {
- var span = extent[1] - extent[0], target = span / m, i = d3.bisect(d3_time_scaleSteps, target);
- if (i == d3_time_scaleSteps.length) return methods.year(extent, m);
- if (!i) return linear.ticks(m).map(d3_time_scaleDate);
- if (Math.log(target / d3_time_scaleSteps[i - 1]) < Math.log(d3_time_scaleSteps[i] / target)) --i;
- m = methods[i];
- k = m[1];
- m = m[0].range;
- }
- return m(extent[0], new Date(+extent[1] + 1), k);
- };
- scale.tickFormat = function() {
- return format;
- };
- scale.copy = function() {
- return d3_time_scale(linear.copy(), methods, format);
- };
- return d3.rebind(scale, linear, "range", "rangeRound", "interpolate", "clamp");
- }
- function d3_time_scaleExtent(domain) {
- var start = domain[0], stop = domain[domain.length - 1];
- return start < stop ? [ start, stop ] : [ stop, start ];
- }
- function d3_time_scaleDate(t) {
- return new Date(t);
- }
- function d3_time_scaleFormat(formats) {
- return function(date) {
- var i = formats.length - 1, f = formats[i];
- while (!f[1](date)) f = formats[--i];
- return f[0](date);
- };
- }
- function d3_time_scaleSetYear(y) {
- var d = new Date(y, 0, 1);
- d.setFullYear(y);
- return d;
- }
- function d3_time_scaleGetYear(d) {
- var y = d.getFullYear(), d0 = d3_time_scaleSetYear(y), d1 = d3_time_scaleSetYear(y + 1);
- return y + (d - d0) / (d1 - d0);
- }
- function d3_time_scaleUTCSetYear(y) {
- var d = new Date(Date.UTC(y, 0, 1));
- d.setUTCFullYear(y);
- return d;
- }
- function d3_time_scaleUTCGetYear(d) {
- var y = d.getUTCFullYear(), d0 = d3_time_scaleUTCSetYear(y), d1 = d3_time_scaleUTCSetYear(y + 1);
- return y + (d - d0) / (d1 - d0);
- }
- if (!Date.now) Date.now = function() {
- return +(new Date);
- };
- try {
- document.createElement("div").style.setProperty("opacity", 0, "");
- } catch (error) {
- var d3_style_prototype = CSSStyleDeclaration.prototype, d3_style_setProperty = d3_style_prototype.setProperty;
- d3_style_prototype.setProperty = function(name, value, priority) {
- d3_style_setProperty.call(this, name, value + "", priority);
- };
- }
- d3 = {
- version: "2.10.2"
- };
- var d3_array = d3_arraySlice;
- try {
- d3_array(document.documentElement.childNodes)[0].nodeType;
- } catch (e) {
- d3_array = d3_arrayCopy;
- }
- var d3_arraySubclass = [].__proto__ ? function(array, prototype) {
- array.__proto__ = prototype;
- } : function(array, prototype) {
- for (var property in prototype) array[property] = prototype[property];
- };
- d3.map = function(object) {
- var map = new d3_Map;
- for (var key in object) map.set(key, object[key]);
- return map;
- };
- d3_class(d3_Map, {
- has: function(key) {
- return d3_map_prefix + key in this;
- },
- get: function(key) {
- return this[d3_map_prefix + key];
- },
- set: function(key, value) {
- return this[d3_map_prefix + key] = value;
- },
- remove: function(key) {
- key = d3_map_prefix + key;
- return key in this && delete this[key];
- },
- keys: function() {
- var keys = [];
- this.forEach(function(key) {
- keys.push(key);
- });
- return keys;
- },
- values: function() {
- var values = [];
- this.forEach(function(key, value) {
- values.push(value);
- });
- return values;
- },
- entries: function() {
- var entries = [];
- this.forEach(function(key, value) {
- entries.push({
- key: key,
- value: value
- });
- });
- return entries;
- },
- forEach: function(f) {
- for (var key in this) {
- if (key.charCodeAt(0) === d3_map_prefixCode) {
- f.call(this, key.substring(1), this[key]);
- }
- }
- }
- });
- var d3_map_prefix = "\0", d3_map_prefixCode = d3_map_prefix.charCodeAt(0);
- d3.functor = d3_functor;
- d3.rebind = function(target, source) {
- var i = 1, n = arguments.length, method;
- while (++i < n) target[method = arguments[i]] = d3_rebind(target, source, source[method]);
- return target;
- };
- d3.ascending = function(a, b) {
- return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
- };
- d3.descending = function(a, b) {
- return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
- };
- d3.mean = function(array, f) {
- var n = array.length, a, m = 0, i = -1, j = 0;
- if (arguments.length === 1) {
- while (++i < n) if (d3_number(a = array[i])) m += (a - m) / ++j;
- } else {
- while (++i < n) if (d3_number(a = f.call(array, array[i], i))) m += (a - m) / ++j;
- }
- return j ? m : undefined;
- };
- d3.median = function(array, f) {
- if (arguments.length > 1) array = array.map(f);
- array = array.filter(d3_number);
- return array.length ? d3.quantile(array.sort(d3.ascending), .5) : undefined;
- };
- d3.min = function(array, f) {
- var i = -1, n = array.length, a, b;
- if (arguments.length === 1) {
- while (++i < n && ((a = array[i]) == null || a != a)) a = undefined;
- while (++i < n) if ((b = array[i]) != null && a > b) a = b;
- } else {
- while (++i < n && ((a = f.call(array, array[i], i)) == null || a != a)) a = undefined;
- while (++i < n) if ((b = f.call(array, array[i], i)) != null && a > b) a = b;
- }
- return a;
- };
- d3.max = function(array, f) {
- var i = -1, n = array.length, a, b;
- if (arguments.length === 1) {
- while (++i < n && ((a = array[i]) == null || a != a)) a = undefined;
- while (++i < n) if ((b = array[i]) != null && b > a) a = b;
- } else {
- while (++i < n && ((a = f.call(array, array[i], i)) == null || a != a)) a = undefined;
- while (++i < n) if ((b = f.call(array, array[i], i)) != null && b > a) a = b;
- }
- return a;
- };
- d3.extent = function(array, f) {
- var i = -1, n = array.length, a, b, c;
- if (arguments.length === 1) {
- while (++i < n && ((a = c = array[i]) == null || a != a)) a = c = undefined;
- while (++i < n) if ((b = array[i]) != null) {
- if (a > b) a = b;
- if (c < b) c = b;
- }
- } else {
- while (++i < n && ((a = c = f.call(array, array[i], i)) == null || a != a)) a = undefined;
- while (++i < n) if ((b = f.call(array, array[i], i)) != null) {
- if (a > b) a = b;
- if (c < b) c = b;
- }
- }
- return [ a, c ];
- };
- d3.random = {
- normal: function(µ, σ) {
- var n = arguments.length;
- if (n < 2) σ = 1;
- if (n < 1) µ = 0;
- return function() {
- var x, y, r;
- do {
- x = Math.random() * 2 - 1;
- y = Math.random() * 2 - 1;
- r = x * x + y * y;
- } while (!r || r > 1);
- return µ + σ * x * Math.sqrt(-2 * Math.log(r) / r);
- };
- },
- logNormal: function(µ, σ) {
- var n = arguments.length;
- if (n < 2) σ = 1;
- if (n < 1) µ = 0;
- var random = d3.random.normal();
- return function() {
- return Math.exp(µ + σ * random());
- };
- },
- irwinHall: function(m) {
- return function() {
- for (var s = 0, j = 0; j < m; j++) s += Math.random();
- return s / m;
- };
- }
- };
- d3.sum = function(array, f) {
- var s = 0, n = array.length, a, i = -1;
- if (arguments.length === 1) {
- while (++i < n) if (!isNaN(a = +array[i])) s += a;
- } else {
- while (++i < n) if (!isNaN(a = +f.call(array, array[i], i))) s += a;
- }
- return s;
- };
- d3.quantile = function(values, p) {
- var H = (values.length - 1) * p + 1, h = Math.floor(H), v = values[h - 1], e = H - h;
- return e ? v + e * (values[h] - v) : v;
- };
- d3.transpose = function(matrix) {
- return d3.zip.apply(d3, matrix);
- };
- d3.zip = function() {
- if (!(n = arguments.length)) return [];
- for (var i = -1, m = d3.min(arguments, d3_zipLength), zips = new Array(m); ++i < m; ) {
- for (var j = -1, n, zip = zips[i] = new Array(n); ++j < n; ) {
- zip[j] = arguments[j][i];
- }
- }
- return zips;
- };
- d3.bisector = function(f) {
- return {
- left: function(a, x, lo, hi) {
- if (arguments.length < 3) lo = 0;
- if (arguments.length < 4) hi = a.length;
- while (lo < hi) {
- var mid = lo + hi >>> 1;
- if (f.call(a, a[mid], mid) < x) lo = mid + 1; else hi = mid;
- }
- return lo;
- },
- right: function(a, x, lo, hi) {
- if (arguments.length < 3) lo = 0;
- if (arguments.length < 4) hi = a.length;
- while (lo < hi) {
- var mid = lo + hi >>> 1;
- if (x < f.call(a, a[mid], mid)) hi = mid; else lo = mid + 1;
- }
- return lo;
- }
- };
- };
- var d3_bisector = d3.bisector(function(d) {
- return d;
- });
- d3.bisectLeft = d3_bisector.left;
- d3.bisect = d3.bisectRight = d3_bisector.right;
- d3.first = function(array, f) {
- var i = 0, n = array.length, a = array[0], b;
- if (arguments.length === 1) f = d3.ascending;
- while (++i < n) {
- if (f.call(array, a, b = array[i]) > 0) {
- a = b;
- }
- }
- return a;
- };
- d3.last = function(array, f) {
- var i = 0, n = array.length, a = array[0], b;
- if (arguments.length === 1) f = d3.ascending;
- while (++i < n) {
- if (f.call(array, a, b = array[i]) <= 0) {
- a = b;
- }
- }
- return a;
- };
- d3.nest = function() {
- function map(array, depth) {
- if (depth >= keys.length) return rollup ? rollup.call(nest, array) : sortValues ? array.sort(sortValues) : array;
- var i = -1, n = array.length, key = keys[depth++], keyValue, object, valuesByKey = new d3_Map, values, o = {};
- while (++i < n) {
- if (values = valuesByKey.get(keyValue = key(object = array[i]))) {
- values.push(object);
- } else {
- valuesByKey.set(keyValue, [ object ]);
- }
- }
- valuesByKey.forEach(function(keyValue, values) {
- o[keyValue] = map(values, depth);
- });
- return o;
- }
- function entries(map, depth) {
- if (depth >= keys.length) return map;
- var a = [], sortKey = sortKeys[depth++], key;
- for (key in map) {
- a.push({
- key: key,
- values: entries(map[key], depth)
- });
- }
- if (sortKey) a.sort(function(a, b) {
- return sortKey(a.key, b.key);
- });
- return a;
- }
- var nest = {}, keys = [], sortKeys = [], sortValues, rollup;
- nest.map = function(array) {
- return map(array, 0);
- };
- nest.entries = function(array) {
- return entries(map(array, 0), 0);
- };
- nest.key = function(d) {
- keys.push(d);
- return nest;
- };
- nest.sortKeys = function(order) {
- sortKeys[keys.length - 1] = order;
- return nest;
- };
- nest.sortValues = function(order) {
- sortValues = order;
- return nest;
- };
- nest.rollup = function(f) {
- rollup = f;
- return nest;
- };
- return nest;
- };
- d3.keys = function(map) {
- var keys = [];
- for (var key in map) keys.push(key);
- return keys;
- };
- d3.values = function(map) {
- var values = [];
- for (var key in map) values.push(map[key]);
- return values;
- };
- d3.entries = function(map) {
- var entries = [];
- for (var key in map) entries.push({
- key: key,
- value: map[key]
- });
- return entries;
- };
- d3.permute = function(array, indexes) {
- var permutes = [], i = -1, n = indexes.length;
- while (++i < n) permutes[i] = array[indexes[i]];
- return permutes;
- };
- d3.merge = function(arrays) {
- return Array.prototype.concat.apply([], arrays);
- };
- d3.split = function(array, f) {
- var arrays = [], values = [], value, i = -1, n = array.length;
- if (arguments.length < 2) f = d3_splitter;
- while (++i < n) {
- if (f.call(values, value = array[i], i)) {
- values = [];
- } else {
- if (!values.length) arrays.push(values);
- values.push(value);
- }
- }
- return arrays;
- };
- d3.range = function(start, stop, step) {
- if (arguments.length < 3) {
- step = 1;
- if (arguments.length < 2) {
- stop = start;
- start = 0;
- }
- }
- if ((stop - start) / step === Infinity) throw new Error("infinite range");
- var range = [], k = d3_range_integerScale(Math.abs(step)), i = -1, j;
- start *= k, stop *= k, step *= k;
- if (step < 0) while ((j = start + step * ++i) > stop) range.push(j / k); else while ((j = start + step * ++i) < stop) range.push(j / k);
- return range;
- };
- d3.requote = function(s) {
- return s.replace(d3_requote_re, "\\$&");
- };
- var d3_requote_re = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;
- d3.round = function(x, n) {
- return n ? Math.round(x * (n = Math.pow(10, n))) / n : Math.round(x);
- };
- d3.xhr = function(url, mime, callback) {
- var req = new XMLHttpRequest;
- if (arguments.length < 3) callback = mime, mime = null; else if (mime && req.overrideMimeType) req.overrideMimeType(mime);
- req.open("GET", url, true);
- if (mime) req.setRequestHeader("Accept", mime);
- req.onreadystatechange = function() {
- if (req.readyState === 4) {
- var s = req.status;
- callback(!s && req.response || s >= 200 && s < 300 || s === 304 ? req : null);
- }
- };
- req.send(null);
- };
- d3.text = function(url, mime, callback) {
- function ready(req) {
- callback(req && req.responseText);
- }
- if (arguments.length < 3) {
- callback = mime;
- mime = null;
- }
- d3.xhr(url, mime, ready);
- };
- d3.json = function(url, callback) {
- d3.text(url, "application/json", function(text) {
- callback(text ? JSON.parse(text) : null);
- });
- };
- d3.html = function(url, callback) {
- d3.text(url, "text/html", function(text) {
- if (text != null) {
- var range = document.createRange();
- range.selectNode(document.body);
- text = range.createContextualFragment(text);
- }
- callback(text);
- });
- };
- d3.xml = function(url, mime, callback) {
- function ready(req) {
- callback(req && req.responseXML);
- }
- if (arguments.length < 3) {
- callback = mime;
- mime = null;
- }
- d3.xhr(url, mime, ready);
- };
- var d3_nsPrefix = {
- svg: "http://www.w3.org/2000/svg",
- xhtml: "http://www.w3.org/1999/xhtml",
- xlink: "http://www.w3.org/1999/xlink",
- xml: "http://www.w3.org/XML/1998/namespace",
- xmlns: "http://www.w3.org/2000/xmlns/"
- };
- d3.ns = {
- prefix: d3_nsPrefix,
- qualify: function(name) {
- var i = name.indexOf(":"), prefix = name;
- if (i >= 0) {
- prefix = name.substring(0, i);
- name = name.substring(i + 1);
- }
- return d3_nsPrefix.hasOwnProperty(prefix) ? {
- space: d3_nsPrefix[prefix],
- local: name
- } : name;
- }
- };
- d3.dispatch = function() {
- var dispatch = new d3_dispatch, i = -1, n = arguments.length;
- while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);
- return dispatch;
- };
- d3_dispatch.prototype.on = function(type, listener) {
- var i = type.indexOf("."), name = "";
- if (i > 0) {
- name = type.substring(i + 1);
- type = type.substring(0, i);
- }
- return arguments.length < 2 ? this[type].on(name) : this[type].on(name, listener);
- };
- d3.format = function(specifier) {
- var match = d3_format_re.exec(specifier), fill = match[1] || " ", sign = match[3] || "", zfill = match[5], width = +match[6], comma = match[7], precision = match[8], type = match[9], scale = 1, suffix = "", integer = false;
- if (precision) precision = +precision.substring(1);
- if (zfill) {
- fill = "0";
- if (comma) width -= Math.floor((width - 1) / 4);
- }
- switch (type) {
- case "n":
- comma = true;
- type = "g";
- break;
- case "%":
- scale = 100;
- suffix = "%";
- type = "f";
- break;
- case "p":
- scale = 100;
- suffix = "%";
- type = "r";
- break;
- case "d":
- integer = true;
- precision = 0;
- break;
- case "s":
- scale = -1;
- type = "r";
- break;
- }
- if (type == "r" && !precision) type = "g";
- type = d3_format_types.get(type) || d3_format_typeDefault;
- return function(value) {
- if (integer && value % 1) return "";
- var negative = value < 0 && (value = -value) ? "-" : sign;
- if (scale < 0) {
- var prefix = d3.formatPrefix(value, precision);
- value = prefix.scale(value);
- suffix = prefix.symbol;
- } else {
- value *= scale;
- }
- value = type(value, precision);
- if (zfill) {
- var length = value.length + negative.length;
- if (length < width) value = (new Array(width - length + 1)).join(fill) + value;
- if (comma) value = d3_format_group(value);
- value = negative + value;
- } else {
- if (comma) value = d3_format_group(value);
- value = negative + value;
- var length = value.length;
- if (length < width) value = (new Array(width - length + 1)).join(fill) + value;
- }
- return value + suffix;
- };
- };
- var d3_format_re = /(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/;
- var d3_format_types = d3.map({
- g: function(x, p) {
- return x.toPrecision(p);
- },
- e: function(x, p) {
- return x.toExponential(p);
- },
- f: function(x, p) {
- return x.toFixed(p);
- },
- r: function(x, p) {
- return d3.round(x, p = d3_format_precision(x, p)).toFixed(Math.max(0, Math.min(20, p)));
- }
- });
- var d3_formatPrefixes = [ "y", "z", "a", "f", "p", "n", "μ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y" ].map(d3_formatPrefix);
- d3.formatPrefix = function(value, precision) {
- var i = 0;
- if (value) {
- if (value < 0) value *= -1;
- if (precision) value = d3.round(value, d3_format_precision(value, precision));
- i = 1 + Math.floor(1e-12 + Math.log(value) / Math.LN10);
- i = Math.max(-24, Math.min(24, Math.floor((i <= 0 ? i + 1 : i - 1) / 3) * 3));
- }
- return d3_formatPrefixes[8 + i / 3];
- };
- var d3_ease_quad = d3_ease_poly(2), d3_ease_cubic = d3_ease_poly(3), d3_ease_default = function() {
- return d3_ease_identity;
- };
- var d3_ease = d3.map({
- linear: d3_ease_default,
- poly: d3_ease_poly,
- quad: function() {
- return d3_ease_quad;
- },
- cubic: function() {
- return d3_ease_cubic;
- },
- sin: function() {
- return d3_ease_sin;
- },
- exp: function() {
- return d3_ease_exp;
- },
- circle: function() {
- return d3_ease_circle;
- },
- elastic: d3_ease_elastic,
- back: d3_ease_back,
- bounce: function() {
- return d3_ease_bounce;
- }
- });
- var d3_ease_mode = d3.map({
- "in": d3_ease_identity,
- out: d3_ease_reverse,
- "in-out": d3_ease_reflect,
- "out-in": function(f) {
- return d3_ease_reflect(d3_ease_reverse(f));
- }
- });
- d3.ease = function(name) {
- var i = name.indexOf("-"), t = i >= 0 ? name.substring(0, i) : name, m = i >= 0 ? name.substring(i + 1) : "in";
- t = d3_ease.get(t) || d3_ease_default;
- m = d3_ease_mode.get(m) || d3_ease_identity;
- return d3_ease_clamp(m(t.apply(null, Array.prototype.slice.call(arguments, 1))));
- };
- d3.event = null;
- d3.transform = function(string) {
- var g = document.createElementNS(d3.ns.prefix.svg, "g");
- return (d3.transform = function(string) {
- g.setAttribute("transform", string);
- var t = g.transform.baseVal.consolidate();
- return new d3_transform(t ? t.matrix : d3_transformIdentity);
- })(string);
- };
- d3_transform.prototype.toString = function() {
- return "translate(" + this.translate + ")rotate(" + this.rotate + ")skewX(" + this.skew + ")scale(" + this.scale + ")";
- };
- var d3_transformDegrees = 180 / Math.PI, d3_transformIdentity = {
- a: 1,
- b: 0,
- c: 0,
- d: 1,
- e: 0,
- f: 0
- };
- d3.interpolate = function(a, b) {
- var i = d3.interpolators.length, f;
- while (--i >= 0 && !(f = d3.interpolators[i](a, b))) ;
- return f;
- };
- d3.interpolateNumber = function(a, b) {
- b -= a;
- return function(t) {
- return a + b * t;
- };
- };
- d3.interpolateRound = function(a, b) {
- b -= a;
- return function(t) {
- return Math.round(a + b * t);
- };
- };
- d3.interpolateString = function(a, b) {
- var m, i, j, s0 = 0, s1 = 0, s = [], q = [], n, o;
- d3_interpolate_number.lastIndex = 0;
- for (i = 0; m = d3_interpolate_number.exec(b); ++i) {
- if (m.index) s.push(b.substring(s0, s1 = m.index));
- q.push({
- i: s.length,
- x: m[0]
- });
- s.push(null);
- s0 = d3_interpolate_number.lastIndex;
- }
- if (s0 < b.length) s.push(b.substring(s0));
- for (i = 0, n = q.length; (m = d3_interpolate_number.exec(a)) && i < n; ++i) {
- o = q[i];
- if (o.x == m[0]) {
- if (o.i) {
- if (s[o.i + 1] == null) {
- s[o.i - 1] += o.x;
- s.splice(o.i, 1);
- for (j = i + 1; j < n; ++j) q[j].i--;
- } else {
- s[o.i - 1] += o.x + s[o.i + 1];
- s.splice(o.i, 2);
- for (j = i + 1; j < n; ++j) q[j].i -= 2;
- }
- } else {
- if (s[o.i + 1] == null) {
- s[o.i] = o.x;
- } else {
- s[o.i] = o.x + s[o.i + 1];
- s.splice(o.i + 1, 1);
- for (j = i + 1; j < n; ++j) q[j].i--;
- }
- }
- q.splice(i, 1);
- n--;
- i--;
- } else {
- o.x = d3.interpolateNumber(parseFloat(m[0]), parseFloat(o.x));
- }
- }
- while (i < n) {
- o = q.pop();
- if (s[o.i + 1] == null) {
- s[o.i] = o.x;
- } else {
- s[o.i] = o.x + s[o.i + 1];
- s.splice(o.i + 1, 1);
- }
- n--;
- }
- if (s.length === 1) {
- return s[0] == null ? q[0].x : function() {
- return b;
- };
- }
- return function(t) {
- for (i = 0; i < n; ++i) s[(o = q[i]).i] = o.x(t);
- return s.join("");
- };
- };
- d3.interpolateTransform = function(a, b) {
- var s = [], q = [], n, A = d3.transform(a), B = d3.transform(b), ta = A.translate, tb = B.translate, ra = A.rotate, rb = B.rotate, wa = A.skew, wb = B.skew, ka = A.scale, kb = B.scale;
- if (ta[0] != tb[0] || ta[1] != tb[1]) {
- s.push("translate(", null, ",", null, ")");
- q.push({
- i: 1,
- x: d3.interpolateNumber(ta[0], tb[0])
- }, {
- i: 3,
- x: d3.interpolateNumber(ta[1], tb[1])
- });
- } else if (tb[0] || tb[1]) {
- s.push("translate(" + tb + ")");
- } else {
- s.push("");
- }
- if (ra != rb) {
- if (ra - rb > 180) rb += 360; else if (rb - ra > 180) ra += 360;
- q.push({
- i: s.push(s.pop() + "rotate(", null, ")") - 2,
- x: d3.interpolateNumber(ra, rb)
- });
- } else if (rb) {
- s.push(s.pop() + "rotate(" + rb + ")");
- }
- if (wa != wb) {
- q.push({
- i: s.push(s.pop() + "skewX(", null, ")") - 2,
- x: d3.interpolateNumber(wa, wb)
- });
- } else if (wb) {
- s.push(s.pop() + "skewX(" + wb + ")");
- }
- if (ka[0] != kb[0] || ka[1] != kb[1]) {
- n = s.push(s.pop() + "scale(", null, ",", null, ")");
- q.push({
- i: n - 4,
- x: d3.interpolateNumber(ka[0], kb[0])
- }, {
- i: n - 2,
- x: d3.interpolateNumber(ka[1], kb[1])
- });
- } else if (kb[0] != 1 || kb[1] != 1) {
- s.push(s.pop() + "scale(" + kb + ")");
- }
- n = q.length;
- return function(t) {
- var i = -1, o;
- while (++i < n) s[(o = q[i]).i] = o.x(t);
- return s.join("");
- };
- };
- d3.interpolateRgb = function(a, b) {
- a = d3.rgb(a);
- b = d3.rgb(b);
- var ar = a.r, ag = a.g, ab = a.b, br = b.r - ar, bg = b.g - ag, bb = b.b - ab;
- return function(t) {
- return "#" + d3_rgb_hex(Math.round(ar + br * t)) + d3_rgb_hex(Math.round(ag + bg * t)) + d3_rgb_hex(Math.round(ab + bb * t));
- };
- };
- d3.interpolateHsl = function(a, b) {
- a = d3.hsl(a);
- b = d3.hsl(b);
- var h0 = a.h, s0 = a.s, l0 = a.l, h1 = b.h - h0, s1 = b.s - s0, l1 = b.l - l0;
- if (h1 > 180) h1 -= 360; else if (h1 < -180) h1 += 360;
- return function(t) {
- return d3_hsl_rgb(h0 + h1 * t, s0 + s1 * t, l0 + l1 * t) + "";
- };
- };
- d3.interpolateLab = function(a, b) {
- a = d3.lab(a);
- b = d3.lab(b);
- var al = a.l, aa = a.a, ab = a.b, bl = b.l - al, ba = b.a - aa, bb = b.b - ab;
- return function(t) {
- return d3_lab_rgb(al + bl * t, aa + ba * t, ab + bb * t) + "";
- };
- };
- d3.interpolateHcl = function(a, b) {
- a = d3.hcl(a);
- b = d3.hcl(b);
- var ah = a.h, ac = a.c, al = a.l, bh = b.h - ah, bc = b.c - ac, bl = b.l - al;
- if (bh > 180) bh -= 360; else if (bh < -180) bh += 360;
- return function(t) {
- return d3_hcl_lab(ah + bh * t, ac + bc * t, al + bl * t) + "";
- };
- };
- d3.interpolateArray = function(a, b) {
- var x = [], c = [], na = a.length, nb = b.length, n0 = Math.min(a.length, b.length), i;
- for (i = 0; i < n0; ++i) x.push(d3.interpolate(a[i], b[i]));
- for (; i < na; ++i) c[i] = a[i];
- for (; i < nb; ++i) c[i] = b[i];
- return function(t) {
- for (i = 0; i < n0; ++i) c[i] = x[i](t);
- return c;
- };
- };
- d3.interpolateObject = function(a, b) {
- var i = {}, c = {}, k;
- for (k in a) {
- if (k in b) {
- i[k] = d3_interpolateByName(k)(a[k], b[k]);
- } else {
- c[k] = a[k];
- }
- }
- for (k in b) {
- if (!(k in a)) {
- c[k] = b[k];
- }
- }
- return function(t) {
- for (k in i) c[k] = i[k](t);
- return c;
- };
- };
- var d3_interpolate_number = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;
- d3.interpolators = [ d3.interpolateObject, function(a, b) {
- return b instanceof Array && d3.interpolateArray(a, b);
- }, function(a, b) {
- return (typeof a === "string" || typeof b === "string") && d3.interpolateString(a + "", b + "");
- }, function(a, b) {
- return (typeof b === "string" ? d3_rgb_names.has(b) || /^(#|rgb\(|hsl\()/.test(b) : b instanceof d3_Rgb || b instanceof d3_Hsl) && d3.interpolateRgb(a, b);
- }, function(a, b) {
- return !isNaN(a = +a) && !isNaN(b = +b) && d3.interpolateNumber(a, b);
- } ];
- d3.rgb = function(r, g, b) {
- return arguments.length === 1 ? r instanceof d3_Rgb ? d3_rgb(r.r, r.g, r.b) : d3_rgb_parse("" + r, d3_rgb, d3_hsl_rgb) : d3_rgb(~~r, ~~g, ~~b);
- };
- d3_Rgb.prototype.brighter = function(k) {
- k = Math.pow(.7, arguments.length ? k : 1);
- var r = this.r, g = this.g, b = this.b, i = 30;
- if (!r && !g && !b) return d3_rgb(i, i, i);
- if (r && r < i) r = i;
- if (g && g < i) g = i;
- if (b && b < i) b = i;
- return d3_rgb(Math.min(255, Math.floor(r / k)), Math.min(255, Math.floor(g / k)), Math.min(255, Math.floor(b / k)));
- };
- d3_Rgb.prototype.darker = function(k) {
- k = Math.pow(.7, arguments.length ? k : 1);
- return d3_rgb(Math.floor(k * this.r), Math.floor(k * this.g), Math.floor(k * this.b));
- };
- d3_Rgb.prototype.hsl = function() {
- return d3_rgb_hsl(this.r, this.g, this.b);
- };
- d3_Rgb.prototype.toString = function() {
- return "#" + d3_rgb_hex(this.r) + d3_rgb_hex(this.g) + d3_rgb_hex(this.b);
- };
- var d3_rgb_names = d3.map({
- aliceblue: "#f0f8ff",
- antiquewhite: "#faebd7",
- aqua: "#00ffff",
- aquamarine: "#7fffd4",
- azure: "#f0ffff",
- beige: "#f5f5dc",
- bisque: "#ffe4c4",
- black: "#000000",
- blanchedalmond: "#ffebcd",
- blue: "#0000ff",
- blueviolet: "#8a2be2",
- brown: "#a52a2a",
- burlywood: "#deb887",
- cadetblue: "#5f9ea0",
- chartreuse: "#7fff00",
- chocolate: "#d2691e",
- coral: "#ff7f50",
- cornflowerblue: "#6495ed",
- cornsilk: "#fff8dc",
- crimson: "#dc143c",
- cyan: "#00ffff",
- darkblue: "#00008b",
- darkcyan: "#008b8b",
- darkgoldenrod: "#b8860b",
- darkgray: "#a9a9a9",
- darkgreen: "#006400",
- darkgrey: "#a9a9a9",
- darkkhaki: "#bdb76b",
- darkmagenta: "#8b008b",
- darkolivegreen: "#556b2f",
- darkorange: "#ff8c00",
- darkorchid: "#9932cc",
- darkred: "#8b0000",
- darksalmon: "#e9967a",
- darkseagreen: "#8fbc8f",
- darkslateblue: "#483d8b",
- darkslategray: "#2f4f4f",
- darkslategrey: "#2f4f4f",
- darkturquoise: "#00ced1",
- darkviolet: "#9400d3",
- deeppink: "#ff1493",
- deepskyblue: "#00bfff",
- dimgray: "#696969",
- dimgrey: "#696969",
- dodgerblue: "#1e90ff",
- firebrick: "#b22222",
- floralwhite: "#fffaf0",
- forestgreen: "#228b22",
- fuchsia: "#ff00ff",
- gainsboro: "#dcdcdc",
- ghostwhite: "#f8f8ff",
- gold: "#ffd700",
- goldenrod: "#daa520",
- gray: "#808080",
- green: "#008000",
- greenyellow: "#adff2f",
- grey: "#808080",
- honeydew: "#f0fff0",
- hotpink: "#ff69b4",
- indianred: "#cd5c5c",
- indigo: "#4b0082",
- ivory: "#fffff0",
- khaki: "#f0e68c",
- lavender: "#e6e6fa",
- lavenderblush: "#fff0f5",
- lawngreen: "#7cfc00",
- lemonchiffon: "#fffacd",
- lightblue: "#add8e6",
- lightcoral: "#f08080",
- lightcyan: "#e0ffff",
- lightgoldenrodyellow: "#fafad2",
- lightgray: "#d3d3d3",
- lightgreen: "#90ee90",
- lightgrey: "#d3d3d3",
- lightpink: "#ffb6c1",
- lightsalmon: "#ffa07a",
- lightseagreen: "#20b2aa",
- lightskyblue: "#87cefa",
- lightslategray: "#778899",
- lightslategrey: "#778899",
- lightsteelblue: "#b0c4de",
- lightyellow: "#ffffe0",
- lime: "#00ff00",
- limegreen: "#32cd32",
- linen: "#faf0e6",
- magenta: "#ff00ff",
- maroon: "#800000",
- mediumaquamarine: "#66cdaa",
- mediumblue: "#0000cd",
- mediumorchid: "#ba55d3",
- mediumpurple: "#9370db",
- mediumseagreen: "#3cb371",
- mediumslateblue: "#7b68ee",
- mediumspringgreen: "#00fa9a",
- mediumturquoise: "#48d1cc",
- mediumvioletred: "#c71585",
- midnightblue: "#191970",
- mintcream: "#f5fffa",
- mistyrose: "#ffe4e1",
- moccasin: "#ffe4b5",
- navajowhite: "#ffdead",
- navy: "#000080",
- oldlace: "#fdf5e6",
- olive: "#808000",
- olivedrab: "#6b8e23",
- orange: "#ffa500",
- orangered: "#ff4500",
- orchid: "#da70d6",
- palegoldenrod: "#eee8aa",
- palegreen: "#98fb98",
- paleturquoise: "#afeeee",
- palevioletred: "#db7093",
- papayawhip: "#ffefd5",
- peachpuff: "#ffdab9",
- peru: "#cd853f",
- pink: "#ffc0cb",
- plum: "#dda0dd",
- powderblue: "#b0e0e6",
- purple: "#800080",
- red: "#ff0000",
- rosybrown: "#bc8f8f",
- royalblue: "#4169e1",
- saddlebrown: "#8b4513",
- salmon: "#fa8072",
- sandybrown: "#f4a460",
- seagreen: "#2e8b57",
- seashell: "#fff5ee",
- sienna: "#a0522d",
- silver: "#c0c0c0",
- skyblue: "#87ceeb",
- slateblue: "#6a5acd",
- slategray: "#708090",
- slategrey: "#708090",
- snow: "#fffafa",
- springgreen: "#00ff7f",
- steelblue: "#4682b4",
- tan: "#d2b48c",
- teal: "#008080",
- thistle: "#d8bfd8",
- tomato: "#ff6347",
- turquoise: "#40e0d0",
- violet: "#ee82ee",
- wheat: "#f5deb3",
- white: "#ffffff",
- whitesmoke: "#f5f5f5",
- yellow: "#ffff00",
- yellowgreen: "#9acd32"
- });
- d3_rgb_names.forEach(function(key, value) {
- d3_rgb_names.set(key, d3_rgb_parse(value, d3_rgb, d3_hsl_rgb));
- });
- d3.hsl = function(h, s, l) {
- return arguments.length === 1 ? h instanceof d3_Hsl ? d3_hsl(h.h, h.s, h.l) : d3_rgb_parse("" + h, d3_rgb_hsl, d3_hsl) : d3_hsl(+h, +s, +l);
- };
- d3_Hsl.prototype.brighter = function(k) {
- k = Math.pow(.7, arguments.length ? k : 1);
- return d3_hsl(this.h, this.s, this.l / k);
- };
- d3_Hsl.prototype.darker = function(k) {
- k = Math.pow(.7, arguments.length ? k : 1);
- return d3_hsl(this.h, this.s, k * this.l);
- };
- d3_Hsl.prototype.rgb = function() {
- return d3_hsl_rgb(this.h, this.s, this.l);
- };
- d3_Hsl.prototype.toString = function() {
- return this.rgb().toString();
- };
- d3.hcl = function(h, c, l) {
- return arguments.length === 1 ? h instanceof d3_Hcl ? d3_hcl(h.h, h.c, h.l) : h instanceof d3_Lab ? d3_lab_hcl(h.l, h.a, h.b) : d3_lab_hcl((h = d3_rgb_lab((h = d3.rgb(h)).r, h.g, h.b)).l, h.a, h.b) : d3_hcl(+h, +c, +l);
- };
- d3_Hcl.prototype.brighter = function(k) {
- return d3_hcl(this.h, this.c, Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)));
- };
- d3_Hcl.prototype.darker = function(k) {
- return d3_hcl(this.h, this.c, Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)));
- };
- d3_Hcl.prototype.rgb = function() {
- return d3_hcl_lab(this.h, this.c, this.l).rgb();
- };
- d3_Hcl.prototype.toString = function() {
- return this.rgb() + "";
- };
- d3.lab = function(l, a, b) {
- return arguments.length === 1 ? l instanceof d3_Lab ? d3_lab(l.l, l.a, l.b) : l instanceof d3_Hcl ? d3_hcl_lab(l.l, l.c, l.h) : d3_rgb_lab((l = d3.rgb(l)).r, l.g, l.b) : d3_lab(+l, +a, +b);
- };
- var d3_lab_K = 18;
- var d3_lab_X = .95047, d3_lab_Y = 1, d3_lab_Z = 1.08883;
- d3_Lab.prototype.brighter = function(k) {
- return d3_lab(Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);
- };
- d3_Lab.prototype.darker = function(k) {
- return d3_lab(Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);
- };
- d3_Lab.prototype.rgb = function() {
- return d3_lab_rgb(this.l, this.a, this.b);
- };
- d3_Lab.prototype.toString = function() {
- return this.rgb() + "";
- };
- var d3_select = function(s, n) {
- return n.querySelector(s);
- }, d3_selectAll = function(s, n) {
- return n.querySelectorAll(s);
- }, d3_selectRoot = document.documentElement, d3_selectMatcher = d3_selectRoot.matchesSelector || d3_selectRoot.webkitMatchesSelector || d3_selectRoot.mozMatchesSelector || d3_selectRoot.msMatchesSelector || d3_selectRoot.oMatchesSelector, d3_selectMatches = function(n, s) {
- return d3_selectMatcher.call(n, s);
- };
- if (typeof Sizzle === "function") {
- d3_select = function(s, n) {
- return Sizzle(s, n)[0] || null;
- };
- d3_selectAll = function(s, n) {
- return Sizzle.uniqueSort(Sizzle(s, n));
- };
- d3_selectMatches = Sizzle.matchesSelector;
- }
- var d3_selectionPrototype = [];
- d3.selection = function() {
- return d3_selectionRoot;
- };
- d3.selection.prototype = d3_selectionPrototype;
- d3_selectionPrototype.select = function(selector) {
- var subgroups = [], subgroup, subnode, group, node;
- if (typeof selector !== "function") selector = d3_selection_selector(selector);
- for (var j = -1, m = this.length; ++j < m; ) {
- subgroups.push(subgroup = []);
- subgroup.parentNode = (group = this[j]).parentNode;
- for (var i = -1, n = group.length; ++i < n; ) {
- if (node = group[i]) {
- subgroup.push(subnode = selector.call(node, node.__data__, i));
- if (subnode && "__data__" in node) subnode.__data__ = node.__data__;
- } else {
- subgroup.push(null);
- }
- }
- }
- return d3_selection(subgroups);
- };
- d3_selectionPrototype.selectAll = function(selector) {
- var subgroups = [], subgroup, node;
- if (typeof selector !== "function") selector = d3_selection_selectorAll(selector);
- for (var j = -1, m = this.length; ++j < m; ) {
- for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
- if (node = group[i]) {
- subgroups.push(subgroup = d3_array(selector.call(node, node.__data__, i)));
- subgroup.parentNode = node;
- }
- }
- }
- return d3_selection(subgroups);
- };
- d3_selectionPrototype.attr = function(name, value) {
- if (arguments.length < 2) {
- if (typeof name === "string") {
- var node = this.node();
- name = d3.ns.qualify(name);
- return name.local ? node.getAttributeNS(name.space, name.local) : node.getAttribute(name);
- }
- for (value in name) this.each(d3_selection_attr(value, name[value]));
- return this;
- }
- return this.each(d3_selection_attr(name, value));
- };
- d3_selectionPrototype.classed = function(name, value) {
- if (arguments.length < 2) {
- if (typeof name === "string") {
- var node = this.node(), n = (name = name.trim().split(/^|\s+/g)).length, i = -1;
- if (value = node.classList) {
- while (++i < n) if (!value.contains(name[i])) return false;
- } else {
- value = node.className;
- if (value.baseVal != null) value = value.baseVal;
- while (++i < n) if (!d3_selection_classedRe(name[i]).test(value)) return false;
- }
- return true;
- }
- for (value in name) this.each(d3_selection_classed(value, name[value]));
- return this;
- }
- return this.each(d3_selection_classed(name, value));
- };
- d3_selectionPrototype.style = function(name, value, priority) {
- var n = arguments.length;
- if (n < 3) {
- if (typeof name !== "string") {
- if (n < 2) value = "";
- for (priority in name) this.each(d3_selection_style(priority, name[priority], value));
- return this;
- }
- if (n < 2) return window.getComputedStyle(this.node(), null).getPropertyValue(name);
- priority = "";
- }
- return this.each(d3_selection_style(name, value, priority));
- };
- d3_selectionPrototype.property = function(name, value) {
- if (arguments.length < 2) {
- if (typeof name === "string") return this.node()[name];
- for (value in name) this.each(d3_selection_property(value, name[value]));
- return this;
- }
- return this.each(d3_selection_property(name, value));
- };
- d3_selectionPrototype.text = function(value) {
- return arguments.length < 1 ? this.node().textContent : this.each(typeof value === "function" ? function() {
- var v = value.apply(this, arguments);
- this.textContent = v == null ? "" : v;
- } : value == null ? function() {
- this.textContent = "";
- } : function() {
- this.textContent = value;
- });
- };
- d3_selectionPrototype.html = function(value) {
- return arguments.length < 1 ? this.node().innerHTML : this.each(typeof value === "function" ? function() {
- var v = value.apply(this, arguments);
- this.innerHTML = v == null ? "" : v;
- } : value == null ? function() {
- this.innerHTML = "";
- } : function() {
- this.innerHTML = value;
- });
- };
- d3_selectionPrototype.append = function(name) {
- function append() {
- return this.appendChild(document.createElementNS(this.namespaceURI, name));
- }
- function appendNS() {
- return this.appendChild(document.createElementNS(name.space, name.local));
- }
- name = d3.ns.qualify(name);
- return this.select(name.local ? appendNS : append);
- };
- d3_selectionPrototype.insert = function(name, before) {
- function insert() {
- return this.insertBefore(document.createElementNS(this.namespaceURI, name), d3_select(before, this));
- }
- function insertNS() {
- return this.insertBefore(document.createElementNS(name.space, name.local), d3_select(before, this));
- }
- name = d3.ns.qualify(name);
- return this.select(name.local ? insertNS : insert);
- };
- d3_selectionPrototype.remove = function() {
- return this.each(function() {
- var parent = this.parentNode;
- if (parent) parent.removeChild(this);
- });
- };
- d3_selectionPrototype.data = function(value, key) {
- function bind(group, groupData) {
- var i, n = group.length, m = groupData.length, n0 = Math.min(n, m), n1 = Math.max(n, m), updateNodes = [], enterNodes = [], exitNodes = [], node, nodeData;
- if (key) {
- var nodeByKeyValue = new d3_Map, keyValues = [], keyValue, j = groupData.length;
- for (i = -1; ++i < n; ) {
- keyValue = key.call(node = group[i], node.__data__, i);
- if (nodeByKeyValue.has(keyValue)) {
- exitNodes[j++] = node;
- } else {
- nodeByKeyValue.set(keyValue, node);
- }
- keyValues.push(keyValue);
- }
- for (i = -1; ++i < m; ) {
- keyValue = key.call(groupData, nodeData = groupData[i], i);
- if (nodeByKeyValue.has(keyValue)) {
- updateNodes[i] = node = nodeByKeyValue.get(keyValue);
- node.__data__ = nodeData;
- enterNodes[i] = exitNodes[i] = null;
- } else {
- enterNodes[i] = d3_selection_dataNode(nodeData);
- updateNodes[i] = exitNodes[i] = null;
- }
- nodeByKeyValue.remove(keyValue);
- }
- for (i = -1; ++i < n; ) {
- if (nodeByKeyValue.has(keyValues[i])) {
- exitNodes[i] = group[i];
- }
- }
- } else {
- for (i = -1; ++i < n0; ) {
- node = group[i];
- nodeData = groupData[i];
- if (node) {
- node.__data__ = nodeData;
- updateNodes[i] = node;
- enterNodes[i] = exitNodes[i] = null;
- } else {
- enterNodes[i] = d3_selection_dataNode(nodeData);
- updateNodes[i] = exitNodes[i] = null;
- }
- }
- for (; i < m; ++i) {
- enterNodes[i] = d3_selection_dataNode(groupData[i]);
- updateNodes[i] = exitNodes[i] = null;
- }
- for (; i < n1; ++i) {
- exitNodes[i] = group[i];
- enterNodes[i] = updateNodes[i] = null;
- }
- }
- enterNodes.update = updateNodes;
- enterNodes.parentNode = updateNodes.parentNode = exitNodes.parentNode = group.parentNode;
- enter.push(enterNodes);
- update.push(updateNodes);
- exit.push(exitNodes);
- }
- var i = -1, n = this.length, group, node;
- if (!arguments.length) {
- value = new Array(n = (group = this[0]).length);
- while (++i < n) {
- if (node = group[i]) {
- value[i] = node.__data__;
- }
- }
- return value;
- }
- var enter = d3_selection_enter([]), update = d3_selection([]), exit = d3_selection([]);
- if (typeof value === "function") {
- while (++i < n) {
- bind(group = this[i], value.call(group, group.parentNode.__data__, i));
- }
- } else {
- while (++i < n) {
- bind(group = this[i], value);
- }
- }
- update.enter = function() {
- return enter;
- };
- update.exit = function() {
- return exit;
- };
- return update;
- };
- d3_selectionPrototype.datum = d3_selectionPrototype.map = function(value) {
- return arguments.length < 1 ? this.property("__data__") : this.property("__data__", value);
- };
- d3_selectionPrototype.filter = function(filter) {
- var subgroups = [], subgroup, group, node;
- if (typeof filter !== "function") filter = d3_selection_filter(filter);
- for (var j = 0, m = this.length; j < m; j++) {
- subgroups.push(subgroup = []);
- subgroup.parentNode = (group = this[j]).parentNode;
- for (var i = 0, n = group.length; i < n; i++) {
- if ((node = group[i]) && filter.call(node, node.__data__, i)) {
- subgroup.push(node);
- }
- }
- }
- return d3_selection(subgroups);
- };
- d3_selectionPrototype.order = function() {
- for (var j = -1, m = this.length; ++j < m; ) {
- for (var group = this[j], i = group.length - 1, next = group[i], node; --i >= 0; ) {
- if (node = group[i]) {
- if (next && next !== node.nextSibling) next.parentNode.insertBefore(node, next);
- next = node;
- }
- }
- }
- return this;
- };
- d3_selectionPrototype.sort = function(comparator) {
- comparator = d3_selection_sortComparator.apply(this, arguments);
- for (var j = -1, m = this.length; ++j < m; ) this[j].sort(comparator);
- return this.order();
- };
- d3_selectionPrototype.on = function(type, listener, capture) {
- var n = arguments.length;
- if (n < 3) {
- if (typeof type !== "string") {
- if (n < 2) listener = false;
- for (capture in type) this.each(d3_selection_on(capture, type[capture], listener));
- return this;
- }
- if (n < 2) return (n = this.node()["__on" + type]) && n._;
- capture = false;
- }
- return this.each(d3_selection_on(type, listener, capture));
- };
- d3_selectionPrototype.each = function(callback) {
- return d3_selection_each(this, function(node, i, j) {
- callback.call(node, node.__data__, i, j);
- });
- };
- d3_selectionPrototype.call = function(callback) {
- callback.apply(this, (arguments[0] = this, arguments));
- return this;
- };
- d3_selectionPrototype.empty = function() {
- return !this.node();
- };
- d3_selectionPrototype.node = function(callback) {
- for (var j = 0, m = this.length; j < m; j++) {
- for (var group = this[j], i = 0, n = group.length; i < n; i++) {
- var node = group[i];
- if (node) return node;
- }
- }
- return null;
- };
- d3_selectionPrototype.transition = function() {
- var subgroups = [], subgroup, node;
- for (var j = -1, m = this.length; ++j < m; ) {
- subgroups.push(subgroup = []);
- for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
- subgroup.push((node = group[i]) ? {
- node: node,
- delay: d3_transitionDelay,
- duration: d3_transitionDuration
- } : null);
- }
- }
- return d3_transition(subgroups, d3_transitionId || ++d3_transitionNextId, Date.now());
- };
- var d3_selectionRoot = d3_selection([ [ document ] ]);
- d3_selectionRoot[0].parentNode = d3_selectRoot;
- d3.select = function(selector) {
- return typeof selector === "string" ? d3_selectionRoot.select(selector) : d3_selection([ [ selector ] ]);
- };
- d3.selectAll = function(selector) {
- return typeof selector === "string" ? d3_selectionRoot.selectAll(selector) : d3_selection([ d3_array(selector) ]);
- };
- var d3_selection_enterPrototype = [];
- d3.selection.enter = d3_selection_enter;
- d3.selection.enter.prototype = d3_selection_enterPrototype;
- d3_selection_enterPrototype.append = d3_selectionPrototype.append;
- d3_selection_enterPrototype.insert = d3_selectionPrototype.insert;
- d3_selection_enterPrototype.empty = d3_selectionPrototype.empty;
- d3_selection_enterPrototype.node = d3_selectionPrototype.node;
- d3_selection_enterPrototype.select = function(selector) {
- var subgroups = [], subgroup, subnode, upgroup, group, node;
- for (var j = -1, m = this.length; ++j < m; ) {
- upgroup = (group = this[j]).update;
- subgroups.push(subgroup = []);
- subgroup.parentNode = group.parentNode;
- for (var i = -1, n = group.length; ++i < n; ) {
- if (node = group[i]) {
- subgroup.push(upgroup[i] = subnode = selector.call(group.parentNode, node.__data__, i));
- subnode.__data__ = node.__data__;
- } else {
- subgroup.push(null);
- }
- }
- }
- return d3_selection(subgroups);
- };
- var d3_transitionPrototype = [], d3_transitionNextId = 0, d3_transitionId = 0, d3_transitionDefaultDelay = 0, d3_transitionDefaultDuration = 250, d3_transitionDefaultEase = d3.ease("cubic-in-out"), d3_transitionDelay = d3_transitionDefaultDelay, d3_transitionDuration = d3_transitionDefaultDuration, d3_transitionEase = d3_transitionDefaultEase;
- d3_transitionPrototype.call = d3_selectionPrototype.call;
- d3.transition = function(selection) {
- return arguments.length ? d3_transitionId ? selection.transition() : selection : d3_selectionRoot.transition();
- };
- d3.transition.prototype = d3_transitionPrototype;
- d3_transitionPrototype.select = function(selector) {
- var subgroups = [], subgroup, subnode, node;
- if (typeof selector !== "function") selector = d3_selection_selector(selector);
- for (var j = -1, m = this.length; ++j < m; ) {
- subgroups.push(subgroup = []);
- for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
- if ((node = group[i]) && (subnode = selector.call(node.node, node.node.__data__, i))) {
- if ("__data__" in node.node) subnode.__data__ = node.node.__data__;
- subgroup.push({
- node: subnode,
- delay: node.delay,
- duration: node.duration
- });
- } else {
- subgroup.push(null);
- }
- }
- }
- return d3_transition(subgroups, this.id, this.time).ease(this.ease());
- };
- d3_transitionPrototype.selectAll = function(selector) {
- var subgroups = [], subgroup, subnodes, node;
- if (typeof selector !== "function") selector = d3_selection_selectorAll(selector);
- for (var j = -1, m = this.length; ++j < m; ) {
- for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
- if (node = group[i]) {
- subnodes = selector.call(node.node, node.node.__data__, i);
- subgroups.push(subgroup = []);
- for (var k = -1, o = subnodes.length; ++k < o; ) {
- subgroup.push({
- node: subnodes[k],
- delay: node.delay,
- duration: node.duration
- });
- }
- }
- }
- }
- return d3_transition(subgroups, this.id, this.time).ease(this.ease());
- };
- d3_transitionPrototype.filter = function(filter) {
- var subgroups = [], subgroup, group, node;
- if (typeof filter !== "function") filter = d3_selection_filter(filter);
- for (var j = 0, m = this.length; j < m; j++) {
- subgroups.push(subgroup = []);
- for (var group = this[j], i = 0, n = group.length; i < n; i++) {
- if ((node = group[i]) && filter.call(node.node, node.node.__data__, i)) {
- subgroup.push(node);
- }
- }
- }
- return d3_transition(subgroups, this.id, this.time).ease(this.ease());
- };
- d3_transitionPrototype.attr = function(name, value) {
- if (arguments.length < 2) {
- for (value in name) this.attrTween(value, d3_tweenByName(name[value], value));
- return this;
- }
- return this.attrTween(name, d3_tweenByName(value, name));
- };
- d3_transitionPrototype.attrTween = function(nameNS, tween) {
- function attrTween(d, i) {
- var f = tween.call(this, d, i, this.getAttribute(name));
- return f === d3_tweenRemove ? (this.removeAttribute(name), null) : f && function(t) {
- this.setAttribute(name, f(t));
- };
- }
- function attrTweenNS(d, i) {
- var f = tween.call(this, d, i, this.getAttributeNS(name.space, name.local));
- return f === d3_tweenRemove ? (this.removeAttributeNS(name.space, name.local), null) : f && function(t) {
- this.setAttributeNS(name.space, name.local, f(t));
- };
- }
- var name = d3.ns.qualify(nameNS);
- return this.tween("attr." + nameNS, name.local ? attrTweenNS : attrTween);
- };
- d3_transitionPrototype.style = function(name, value, priority) {
- var n = arguments.length;
- if (n < 3) {
- if (typeof name !== "string") {
- if (n < 2) value = "";
- for (priority in name) this.styleTween(priority, d3_tweenByName(name[priority], priority), value);
- return this;
- }
- priority = "";
- }
- return this.styleTween(name, d3_tweenByName(value, name), priority);
- };
- d3_transitionPrototype.styleTween = function(name, tween, priority) {
- if (arguments.length < 3) priority = "";
- return this.tween("style." + name, function(d, i) {
- var f = tween.call(this, d, i, window.getComputedStyle(this, null).getPropertyValue(name));
- return f === d3_tweenRemove ? (this.style.removeProperty(name), null) : f && function(t) {
- this.style.setProperty(name, f(t), priority);
- };
- });
- };
- d3_transitionPrototype.text = function(value) {
- return this.tween("text", function(d, i) {
- this.textContent = typeof value === "function" ? value.call(this, d, i) : value;
- });
- };
- d3_transitionPrototype.remove = function() {
- return this.each("end.transition", function() {
- var p;
- if (!this.__transition__ && (p = this.parentNode)) p.removeChild(this);
- });
- };
- d3_transitionPrototype.delay = function(value) {
- return d3_selection_each(this, typeof value === "function" ? function(node, i, j) {
- node.delay = value.call(node = node.node, node.__data__, i, j) | 0;
- } : (value = value | 0, function(node) {
- node.delay = value;
- }));
- };
- d3_transitionPrototype.duration = function(value) {
- return d3_selection_each(this, typeof value === "function" ? function(node, i, j) {
- node.duration = Math.max(1, value.call(node = node.node, node.__data__, i, j) | 0);
- } : (value = Math.max(1, value | 0), function(node) {
- node.duration = value;
- }));
- };
- d3_transitionPrototype.transition = function() {
- return this.select(d3_this);
- };
- d3.tween = function(b, interpolate) {
- function tweenFunction(d, i, a) {
- var v = b.call(this, d, i);
- return v == null ? a != "" && d3_tweenRemove : a != v && interpolate(a, v);
- }
- function tweenString(d, i, a) {
- return a != b && interpolate(a, b);
- }
- return typeof b === "function" ? tweenFunction : b == null ? d3_tweenNull : (b += "", tweenString);
- };
- var d3_tweenRemove = {};
- var d3_timer_queue = null, d3_timer_interval, d3_timer_timeout;
- d3.timer = function(callback, delay, then) {
- var found = false, t0, t1 = d3_timer_queue;
- if (arguments.length < 3) {
- if (arguments.length < 2) delay = 0; else if (!isFinite(delay)) return;
- then = Date.now();
- }
- while (t1) {
- if (t1.callback === callback) {
- t1.then = then;
- t1.delay = delay;
- found = true;
- break;
- }
- t0 = t1;
- t1 = t1.next;
- }
- if (!found) d3_timer_queue = {
- callback: callback,
- then: then,
- delay: delay,
- next: d3_timer_queue
- };
- if (!d3_timer_interval) {
- d3_timer_timeout = clearTimeout(d3_timer_timeout);
- d3_timer_interval = 1;
- d3_timer_frame(d3_timer_step);
- }
- };
- d3.timer.flush = function() {
- var elapsed, now = Date.now(), t1 = d3_timer_queue;
- while (t1) {
- elapsed = now - t1.then;
- if (!t1.delay) t1.flush = t1.callback(elapsed);
- t1 = t1.next;
- }
- d3_timer_flush();
- };
- var d3_timer_frame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(callback) {
- setTimeout(callback, 17);
- };
- d3.mouse = function(container) {
- return d3_mousePoint(container, d3_eventSource());
- };
- var d3_mouse_bug44083 = /WebKit/.test(navigator.userAgent) ? -1 : 0;
- d3.touches = function(container, touches) {
- if (arguments.length < 2) touches = d3_eventSource().touches;
- return touches ? d3_array(touches).map(function(touch) {
- var point = d3_mousePoint(container, touch);
- point.identifier = touch.identifier;
- return point;
- }) : [];
- };
- d3.scale = {};
- d3.scale.linear = function() {
- return d3_scale_linear([ 0, 1 ], [ 0, 1 ], d3.interpolate, false);
- };
- d3.scale.log = function() {
- return d3_scale_log(d3.scale.linear(), d3_scale_logp);
- };
- var d3_scale_logFormat = d3.format(".0e");
- d3_scale_logp.pow = function(x) {
- return Math.pow(10, x);
- };
- d3_scale_logn.pow = function(x) {
- return -Math.pow(10, -x);
- };
- d3.scale.pow = function() {
- return d3_scale_pow(d3.scale.linear(), 1);
- };
- d3.scale.sqrt = function() {
- return d3.scale.pow().exponent(.5);
- };
- d3.scale.ordinal = function() {
- return d3_scale_ordinal([], {
- t: "range",
- a: [ [] ]
- });
- };
- d3.scale.category10 = function() {
- return d3.scale.ordinal().range(d3_category10);
- };
- d3.scale.category20 = function() {
- return d3.scale.ordinal().range(d3_category20);
- };
- d3.scale.category20b = function() {
- return d3.scale.ordinal().range(d3_category20b);
- };
- d3.scale.category20c = function() {
- return d3.scale.ordinal().range(d3_category20c);
- };
- d3.scale.category50 = function() {
- return d3.scale.ordinal().range(d3_category50);
- };
- var d3_category10 = [ "#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf" ];
- var d3_category20 = [ "#1f77b4", "#aec7e8", "#ff7f0e", "#ffbb78", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5", "#8c564b", "#c49c94", "#e377c2", "#f7b6d2", "#7f7f7f", "#c7c7c7", "#bcbd22", "#dbdb8d", "#17becf", "#9edae5" ];
- var d3_category20b = [ "#393b79", "#5254a3", "#6b6ecf", "#9c9ede", "#637939", "#8ca252", "#b5cf6b", "#cedb9c", "#8c6d31", "#bd9e39", "#e7ba52", "#e7cb94", "#843c39", "#ad494a", "#d6616b", "#e7969c", "#7b4173", "#a55194", "#ce6dbd", "#de9ed6" ];
- var d3_category20c = [ "#3182bd", "#6baed6", "#9ecae1", "#c6dbef", "#e6550d", "#fd8d3c", "#fdae6b", "#fdd0a2", "#31a354", "#74c476", "#a1d99b", "#c7e9c0", "#756bb1", "#9e9ac8", "#bcbddc", "#dadaeb", "#636363", "#969696", "#bdbdbd", "#d9d9d9" ];
- var d3_category50 = ["#1f77b4", "#ff7f0e", "#2ca02c", "#8c864b", "#9467bd", "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf","#DC143C","#800080","#0000FF","#008000","#D2691E","#FF0000","#000000","#DB7093","#FF00FF","#7B68EE","#1f77b6", "#9edae5", "#393b79", "#5254a3", "#6b6ecf", "#9c9ede", "#637939", "#8ca252", "#b5cf6b", "#cedb9c", "#8c6d31", "#bd9e39", "#aec7e8", "#e7ba52", "#ffbb78", "#e7cb94", "#98df8a", "#843c39", "#ff9896", "#ad494a", "#c5b0d5", "#d6616b", "#c49c94", "#e7969c", "#f7b6d2", "#fd8d3c", "#c7c7c7", "#7b4173", "#dbdb8d", "#a55194", ];
- d3.scale.quantile = function() {
- return d3_scale_quantile([], []);
- };
- d3.scale.quantize = function() {
- return d3_scale_quantize(0, 1, [ 0, 1 ]);
- };
- d3.scale.threshold = function() {
- return d3_scale_threshold([ .5 ], [ 0, 1 ]);
- };
- d3.scale.identity = function() {
- return d3_scale_identity([ 0, 1 ]);
- };
- d3.svg = {};
- d3.svg.arc = function() {
- function arc() {
- var r0 = innerRadius.apply(this, arguments), r1 = outerRadius.apply(this, arguments), a0 = startAngle.apply(this, arguments) + d3_svg_arcOffset, a1 = endAngle.apply(this, arguments) + d3_svg_arcOffset, da = (a1 < a0 && (da = a0, a0 = a1, a1 = da), a1 - a0), df = da < Math.PI ? "0" : "1", c0 = Math.cos(a0), s0 = Math.sin(a0), c1 = Math.cos(a1), s1 = Math.sin(a1);
- return da >= d3_svg_arcMax ? r0 ? "M0," + r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + -r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 + "M0," + r0 + "A" + r0 + "," + r0 + " 0 1,0 0," + -r0 + "A" + r0 + "," + r0 + " 0 1,0 0," + r0 + "Z" : "M0," + r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + -r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 + "Z" : r0 ? "M" + r1 * c0 + "," + r1 * s0 + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1 + "L" + r0 * c1 + "," + r0 * s1 + "A" + r0 + "," + r0 + " 0 " + df + ",0 " + r0 * c0 + "," + r0 * s0 + "Z" : "M" + r1 * c0 + "," + r1 * s0 + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1 + "L0,0" + "Z";
- }
- var innerRadius = d3_svg_arcInnerRadius, outerRadius = d3_svg_arcOuterRadius, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle;
- arc.innerRadius = function(v) {
- if (!arguments.length) return innerRadius;
- innerRadius = d3_functor(v);
- return arc;
- };
- arc.outerRadius = function(v) {
- if (!arguments.length) return outerRadius;
- outerRadius = d3_functor(v);
- return arc;
- };
- arc.startAngle = function(v) {
- if (!arguments.length) return startAngle;
- startAngle = d3_functor(v);
- return arc;
- };
- arc.endAngle = function(v) {
- if (!arguments.length) return endAngle;
- endAngle = d3_functor(v);
- return arc;
- };
- arc.centroid = function() {
- var r = (innerRadius.apply(this, arguments) + outerRadius.apply(this, arguments)) / 2, a = (startAngle.apply(this, arguments) + endAngle.apply(this, arguments)) / 2 + d3_svg_arcOffset;
- return [ Math.cos(a) * r, Math.sin(a) * r ];
- };
- return arc;
- };
- var d3_svg_arcOffset = -Math.PI / 2, d3_svg_arcMax = 2 * Math.PI - 1e-6;
- d3.svg.line = function() {
- return d3_svg_line(d3_identity);
- };
- var d3_svg_lineInterpolators = d3.map({
- linear: d3_svg_lineLinear,
- "linear-closed": d3_svg_lineLinearClosed,
- "step-before": d3_svg_lineStepBefore,
- "step-after": d3_svg_lineStepAfter,
- basis: d3_svg_lineBasis,
- "basis-open": d3_svg_lineBasisOpen,
- "basis-closed": d3_svg_lineBasisClosed,
- bundle: d3_svg_lineBundle,
- cardinal: d3_svg_lineCardinal,
- "cardinal-open": d3_svg_lineCardinalOpen,
- "cardinal-closed": d3_svg_lineCardinalClosed,
- monotone: d3_svg_lineMonotone
- });
- d3_svg_lineInterpolators.forEach(function(key, value) {
- value.key = key;
- value.closed = /-closed$/.test(key);
- });
- var d3_svg_lineBasisBezier1 = [ 0, 2 / 3, 1 / 3, 0 ], d3_svg_lineBasisBezier2 = [ 0, 1 / 3, 2 / 3, 0 ], d3_svg_lineBasisBezier3 = [ 0, 1 / 6, 2 / 3, 1 / 6 ];
- d3.svg.line.radial = function() {
- var line = d3_svg_line(d3_svg_lineRadial);
- line.radius = line.x, delete line.x;
- line.angle = line.y, delete line.y;
- return line;
- };
- d3_svg_lineStepBefore.reverse = d3_svg_lineStepAfter;
- d3_svg_lineStepAfter.reverse = d3_svg_lineStepBefore;
- d3.svg.area = function() {
- return d3_svg_area(d3_identity);
- };
- d3.svg.area.radial = function() {
- var area = d3_svg_area(d3_svg_lineRadial);
- area.radius = area.x, delete area.x;
- area.innerRadius = area.x0, delete area.x0;
- area.outerRadius = area.x1, delete area.x1;
- area.angle = area.y, delete area.y;
- area.startAngle = area.y0, delete area.y0;
- area.endAngle = area.y1, delete area.y1;
- return area;
- };
- d3.svg.chord = function() {
- function chord(d, i) {
- var s = subgroup(this, source, d, i), t = subgroup(this, target, d, i);
- return "M" + s.p0 + arc(s.r, s.p1, s.a1 - s.a0) + (equals(s, t) ? curve(s.r, s.p1, s.r, s.p0) : curve(s.r, s.p1, t.r, t.p0) + arc(t.r, t.p1, t.a1 - t.a0) + curve(t.r, t.p1, s.r, s.p0)) + "Z";
- }
- function subgroup(self, f, d, i) {
- var subgroup = f.call(self, d, i), r = radius.call(self, subgroup, i), a0 = startAngle.call(self, subgroup, i) + d3_svg_arcOffset, a1 = endAngle.call(self, subgroup, i) + d3_svg_arcOffset;
- return {
- r: r,
- a0: a0,
- a1: a1,
- p0: [ r * Math.cos(a0), r * Math.sin(a0) ],
- p1: [ r * Math.cos(a1), r * Math.sin(a1) ]
- };
- }
- function equals(a, b) {
- return a.a0 == b.a0 && a.a1 == b.a1;
- }
- function arc(r, p, a) {
- return "A" + r + "," + r + " 0 " + +(a > Math.PI) + ",1 " + p;
- }
- function curve(r0, p0, r1, p1) {
- return "Q 0,0 " + p1;
- }
- var source = d3_svg_chordSource, target = d3_svg_chordTarget, radius = d3_svg_chordRadius, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle;
- chord.radius = function(v) {
- if (!arguments.length) return radius;
- radius = d3_functor(v);
- return chord;
- };
- chord.source = function(v) {
- if (!arguments.length) return source;
- source = d3_functor(v);
- return chord;
- };
- chord.target = function(v) {
- if (!arguments.length) return target;
- target = d3_functor(v);
- return chord;
- };
- chord.startAngle = function(v) {
- if (!arguments.length) return startAngle;
- startAngle = d3_functor(v);
- return chord;
- };
- chord.endAngle = function(v) {
- if (!arguments.length) return endAngle;
- endAngle = d3_functor(v);
- return chord;
- };
- return chord;
- };
- d3.svg.diagonal = function() {
- function diagonal(d, i) {
- var p0 = source.call(this, d, i), p3 = target.call(this, d, i), m = (p0.y + p3.y) / 2, p = [ p0, {
- x: p0.x,
- y: m
- }, {
- x: p3.x,
- y: m
- }, p3 ];
- p = p.map(projection);
- return "M" + p[0] + "C" + p[1] + " " + p[2] + " " + p[3];
- }
- var source = d3_svg_chordSource, target = d3_svg_chordTarget, projection = d3_svg_diagonalProjection;
- diagonal.source = function(x) {
- if (!arguments.length) return source;
- source = d3_functor(x);
- return diagonal;
- };
- diagonal.target = function(x) {
- if (!arguments.length) return target;
- target = d3_functor(x);
- return diagonal;
- };
- diagonal.projection = function(x) {
- if (!arguments.length) return projection;
- projection = x;
- return diagonal;
- };
- return diagonal;
- };
- d3.svg.diagonal.radial = function() {
- var diagonal = d3.svg.diagonal(), projection = d3_svg_diagonalProjection, projection_ = diagonal.projection;
- diagonal.projection = function(x) {
- return arguments.length ? projection_(d3_svg_diagonalRadialProjection(projection = x)) : projection;
- };
- return diagonal;
- };
- d3.svg.mouse = d3.mouse;
- d3.svg.touches = d3.touches;
- d3.svg.symbol = function() {
- function symbol(d, i) {
- return (d3_svg_symbols.get(type.call(this, d, i)) || d3_svg_symbolCircle)(size.call(this, d, i));
- }
- var type = d3_svg_symbolType, size = d3_svg_symbolSize;
- symbol.type = function(x) {
- if (!arguments.length) return type;
- type = d3_functor(x);
- return symbol;
- };
- symbol.size = function(x) {
- if (!arguments.length) return size;
- size = d3_functor(x);
- return symbol;
- };
- return symbol;
- };
- var d3_svg_symbols = d3.map({
- circle: d3_svg_symbolCircle,
- cross: function(size) {
- var r = Math.sqrt(size / 5) / 2;
- return "M" + -3 * r + "," + -r + "H" + -r + "V" + -3 * r + "H" + r + "V" + -r + "H" + 3 * r + "V" + r + "H" + r + "V" + 3 * r + "H" + -r + "V" + r + "H" + -3 * r + "Z";
- },
- diamond: function(size) {
- var ry = Math.sqrt(size / (2 * d3_svg_symbolTan30)), rx = ry * d3_svg_symbolTan30;
- return "M0," + -ry + "L" + rx + ",0" + " 0," + ry + " " + -rx + ",0" + "Z";
- },
- square: function(size) {
- var r = Math.sqrt(size) / 2;
- return "M" + -r + "," + -r + "L" + r + "," + -r + " " + r + "," + r + " " + -r + "," + r + "Z";
- },
- "triangle-down": function(size) {
- var rx = Math.sqrt(size / d3_svg_symbolSqrt3), ry = rx * d3_svg_symbolSqrt3 / 2;
- return "M0," + ry + "L" + rx + "," + -ry + " " + -rx + "," + -ry + "Z";
- },
- "triangle-up": function(size) {
- var rx = Math.sqrt(size / d3_svg_symbolSqrt3), ry = rx * d3_svg_symbolSqrt3 / 2;
- return "M0," + -ry + "L" + rx + "," + ry + " " + -rx + "," + ry + "Z";
- }
- });
- d3.svg.symbolTypes = d3_svg_symbols.keys();
- var d3_svg_symbolSqrt3 = Math.sqrt(3), d3_svg_symbolTan30 = Math.tan(30 * Math.PI / 180);
- d3.svg.axis = function() {
- function axis(g) {
- g.each(function() {
- var g = d3.select(this);
- var ticks = tickValues == null ? scale.ticks ? scale.ticks.apply(scale, tickArguments_) : scale.domain() : tickValues, tickFormat = tickFormat_ == null ? scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments_) : String : tickFormat_;
- var subticks = d3_svg_axisSubdivide(scale, ticks, tickSubdivide), subtick = g.selectAll(".minor").data(subticks, String), subtickEnter = subtick.enter().insert("line", "g").attr("class", "tick minor").style("opacity", 1e-6), subtickExit = d3.transition(subtick.exit()).style("opacity", 1e-6).remove(), subtickUpdate = d3.transition(subtick).style("opacity", 1);
- var tick = g.selectAll("g").data(ticks, String), tickEnter = tick.enter().insert("g", "path").style("opacity", 1e-6), tickExit = d3.transition(tick.exit()).style("opacity", 1e-6).remove(), tickUpdate = d3.transition(tick).style("opacity", 1), tickTransform;
- var range = d3_scaleRange(scale), path = g.selectAll(".domain").data([ 0 ]), pathEnter = path.enter().append("path").attr("class", "domain"), pathUpdate = d3.transition(path);
- var scale1 = scale.copy(), scale0 = this.__chart__ || scale1;
- this.__chart__ = scale1;
- tickEnter.append("line").attr("class", "tick");
- tickEnter.append("text");
- var lineEnter = tickEnter.select("line"), lineUpdate = tickUpdate.select("line"), text = tick.select("text").text(tickFormat), textEnter = tickEnter.select("text"), textUpdate = tickUpdate.select("text");
- switch (orient) {
- case "bottom":
- {
- tickTransform = d3_svg_axisX;
- subtickEnter.attr("y2", tickMinorSize);
- subtickUpdate.attr("x2", 0).attr("y2", tickMinorSize);
- lineEnter.attr("y2", tickMajorSize);
- textEnter.attr("y", Math.max(tickMajorSize, 0) + tickPadding);
- lineUpdate.attr("x2", 0).attr("y2", tickMajorSize);
- textUpdate.attr("x", 0).attr("y", Math.max(tickMajorSize, 0) + tickPadding);
- text.attr("dy", ".71em").attr("text-anchor", "middle");
- pathUpdate.attr("d", "M" + range[0] + "," + tickEndSize + "V0H" + range[1] + "V" + tickEndSize);
- break;
- }
- case "top":
- {
- tickTransform = d3_svg_axisX;
- subtickEnter.attr("y2", -tickMinorSize);
- subtickUpdate.attr("x2", 0).attr("y2", -tickMinorSize);
- lineEnter.attr("y2", -tickMajorSize);
- textEnter.attr("y", -(Math.max(tickMajorSize, 0) + tickPadding));
- lineUpdate.attr("x2", 0).attr("y2", -tickMajorSize);
- textUpdate.attr("x", 0).attr("y", -(Math.max(tickMajorSize, 0) + tickPadding));
- text.attr("dy", "0em").attr("text-anchor", "middle");
- pathUpdate.attr("d", "M" + range[0] + "," + -tickEndSize + "V0H" + range[1] + "V" + -tickEndSize);
- break;
- }
- case "left":
- {
- tickTransform = d3_svg_axisY;
- subtickEnter.attr("x2", -tickMinorSize);
- subtickUpdate.attr("x2", -tickMinorSize).attr("y2", 0);
- lineEnter.attr("x2", -tickMajorSize);
- textEnter.attr("x", -(Math.max(tickMajorSize, 0) + tickPadding));
- lineUpdate.attr("x2", -tickMajorSize).attr("y2", 0);
- textUpdate.attr("x", -(Math.max(tickMajorSize, 0) + tickPadding)).attr("y", 0);
- text.attr("dy", ".32em").attr("text-anchor", "end");
- pathUpdate.attr("d", "M" + -tickEndSize + "," + range[0] + "H0V" + range[1] + "H" + -tickEndSize);
- break;
- }
- case "right":
- {
- tickTransform = d3_svg_axisY;
- subtickEnter.attr("x2", tickMinorSize);
- subtickUpdate.attr("x2", tickMinorSize).attr("y2", 0);
- lineEnter.attr("x2", tickMajorSize);
- textEnter.attr("x", Math.max(tickMajorSize, 0) + tickPadding);
- lineUpdate.attr("x2", tickMajorSize).attr("y2", 0);
- textUpdate.attr("x", Math.max(tickMajorSize, 0) + tickPadding).attr("y", 0);
- text.attr("dy", ".32em").attr("text-anchor", "start");
- pathUpdate.attr("d", "M" + tickEndSize + "," + range[0] + "H0V" + range[1] + "H" + tickEndSize);
- break;
- }
- }
- if (scale.ticks) {
- tickEnter.call(tickTransform, scale0);
- tickUpdate.call(tickTransform, scale1);
- tickExit.call(tickTransform, scale1);
- subtickEnter.call(tickTransform, scale0);
- subtickUpdate.call(tickTransform, scale1);
- subtickExit.call(tickTransform, scale1);
- } else {
- var dx = scale1.rangeBand() / 2, x = function(d) {
- return scale1(d) + dx;
- };
- tickEnter.call(tickTransform, x);
- tickUpdate.call(tickTransform, x);
- }
- });
- }
- var scale = d3.scale.linear(), orient = "bottom", tickMajorSize = 6, tickMinorSize = 6, tickEndSize = 6, tickPadding = 3, tickArguments_ = [ 10 ], tickValues = null, tickFormat_, tickSubdivide = 0;
- axis.scale = function(x) {
- if (!arguments.length) return scale;
- scale = x;
- return axis;
- };
- axis.orient = function(x) {
- if (!arguments.length) return orient;
- orient = x;
- return axis;
- };
- axis.ticks = function() {
- if (!arguments.length) return tickArguments_;
- tickArguments_ = arguments;
- return axis;
- };
- axis.tickValues = function(x) {
- if (!arguments.length) return tickValues;
- tickValues = x;
- return axis;
- };
- axis.tickFormat = function(x) {
- if (!arguments.length) return tickFormat_;
- tickFormat_ = x;
- return axis;
- };
- axis.tickSize = function(x, y, z) {
- if (!arguments.length) return tickMajorSize;
- var n = arguments.length - 1;
- tickMajorSize = +x;
- tickMinorSize = n > 1 ? +y : tickMajorSize;
- tickEndSize = n > 0 ? +arguments[n] : tickMajorSize;
- return axis;
- };
- axis.tickPadding = function(x) {
- if (!arguments.length) return tickPadding;
- tickPadding = +x;
- return axis;
- };
- axis.tickSubdivide = function(x) {
- if (!arguments.length) return tickSubdivide;
- tickSubdivide = +x;
- return axis;
- };
- return axis;
- };
- d3.svg.brush = function() {
- function brush(g) {
- g.each(function() {
- var g = d3.select(this), bg = g.selectAll(".background").data([ 0 ]), fg = g.selectAll(".extent").data([ 0 ]), tz = g.selectAll(".resize").data(resizes, String), e;
- g.style("pointer-events", "all").on("mousedown.brush", brushstart).on("touchstart.brush", brushstart);
- bg.enter().append("rect").attr("class", "background").style("visibility", "hidden").style("cursor", "crosshair");
- fg.enter().append("rect").attr("class", "extent").style("cursor", "move");
- tz.enter().append("g").attr("class", function(d) {
- return "resize " + d;
- }).style("cursor", function(d) {
- return d3_svg_brushCursor[d];
- }).append("rect").attr("x", function(d) {
- return /[ew]$/.test(d) ? -3 : null;
- }).attr("y", function(d) {
- return /^[ns]/.test(d) ? -3 : null;
- }).attr("width", 6).attr("height", 6).style("visibility", "hidden");
- tz.style("display", brush.empty() ? "none" : null);
- tz.exit().remove();
- if (x) {
- e = d3_scaleRange(x);
- bg.attr("x", e[0]).attr("width", e[1] - e[0]);
- redrawX(g);
- }
- if (y) {
- e = d3_scaleRange(y);
- bg.attr("y", e[0]).attr("height", e[1] - e[0]);
- redrawY(g);
- }
- redraw(g);
- });
- }
- function redraw(g) {
- g.selectAll(".resize").attr("transform", function(d) {
- return "translate(" + extent[+/e$/.test(d)][0] + "," + extent[+/^s/.test(d)][1] + ")";
- });
- }
- function redrawX(g) {
- g.select(".extent").attr("x", extent[0][0]);
- g.selectAll(".extent,.n>rect,.s>rect").attr("width", extent[1][0] - extent[0][0]);
- }
- function redrawY(g) {
- g.select(".extent").attr("y", extent[0][1]);
- g.selectAll(".extent,.e>rect,.w>rect").attr("height", extent[1][1] - extent[0][1]);
- }
- function brushstart() {
- function mouse() {
- var touches = d3.event.changedTouches;
- return touches ? d3.touches(target, touches)[0] : d3.mouse(target);
- }
- function keydown() {
- if (d3.event.keyCode == 32) {
- if (!dragging) {
- center = null;
- origin[0] -= extent[1][0];
- origin[1] -= extent[1][1];
- dragging = 2;
- }
- d3_eventCancel();
- }
- }
- function keyup() {
- if (d3.event.keyCode == 32 && dragging == 2) {
- origin[0] += extent[1][0];
- origin[1] += extent[1][1];
- dragging = 0;
- d3_eventCancel();
- }
- }
- function brushmove() {
- var point = mouse(), moved = false;
- if (offset) {
- point[0] += offset[0];
- point[1] += offset[1];
- }
- if (!dragging) {
- if (d3.event.altKey) {
- if (!center) center = [ (extent[0][0] + extent[1][0]) / 2, (extent[0][1] + extent[1][1]) / 2 ];
- origin[0] = extent[+(point[0] < center[0])][0];
- origin[1] = extent[+(point[1] < center[1])][1];
- } else center = null;
- }
- if (resizingX && move1(point, x, 0)) {
- redrawX(g);
- moved = true;
- }
- if (resizingY && move1(point, y, 1)) {
- redrawY(g);
- moved = true;
- }
- if (moved) {
- redraw(g);
- event_({
- type: "brush",
- mode: dragging ? "move" : "resize"
- });
- }
- }
- function move1(point, scale, i) {
- var range = d3_scaleRange(scale), r0 = range[0], r1 = range[1], position = origin[i], size = extent[1][i] - extent[0][i], min, max;
- if (dragging) {
- r0 -= position;
- r1 -= size + position;
- }
- min = Math.max(r0, Math.min(r1, point[i]));
- if (dragging) {
- max = (min += position) + size;
- } else {
- if (center) position = Math.max(r0, Math.min(r1, 2 * center[i] - min));
- if (position < min) {
- max = min;
- min = position;
- } else {
- max = position;
- }
- }
- if (extent[0][i] !== min || extent[1][i] !== max) {
- extentDomain = null;
- extent[0][i] = min;
- extent[1][i] = max;
- return true;
- }
- }
- function brushend() {
- brushmove();
- g.style("pointer-events", "all").selectAll(".resize").style("display", brush.empty() ? "none" : null);
- d3.select("body").style("cursor", null);
- w.on("mousemove.brush", null).on("mouseup.brush", null).on("touchmove.brush", null).on("touchend.brush", null).on("keydown.brush", null).on("keyup.brush", null);
- event_({
- type: "brushend"
- });
- d3_eventCancel();
- }
- var target = this, eventTarget = d3.select(d3.event.target), event_ = event.of(target, arguments), g = d3.select(target), resizing = eventTarget.datum(), resizingX = !/^(n|s)$/.test(resizing) && x, resizingY = !/^(e|w)$/.test(resizing) && y, dragging = eventTarget.classed("extent"), center, origin = mouse(), offset;
- var w = d3.select(window).on("mousemove.brush", brushmove).on("mouseup.brush", brushend).on("touchmove.brush", brushmove).on("touchend.brush", brushend).on("keydown.brush", keydown).on("keyup.brush", keyup);
- if (dragging) {
- origin[0] = extent[0][0] - origin[0];
- origin[1] = extent[0][1] - origin[1];
- } else if (resizing) {
- var ex = +/w$/.test(resizing), ey = +/^n/.test(resizing);
- offset = [ extent[1 - ex][0] - origin[0], extent[1 - ey][1] - origin[1] ];
- origin[0] = extent[ex][0];
- origin[1] = extent[ey][1];
- } else if (d3.event.altKey) center = origin.slice();
- g.style("pointer-events", "none").selectAll(".resize").style("display", null);
- d3.select("body").style("cursor", eventTarget.style("cursor"));
- event_({
- type: "brushstart"
- });
- brushmove();
- d3_eventCancel();
- }
- var event = d3_eventDispatch(brush, "brushstart", "brush", "brushend"), x = null, y = null, resizes = d3_svg_brushResizes[0], extent = [ [ 0, 0 ], [ 0, 0 ] ], extentDomain;
- brush.x = function(z) {
- if (!arguments.length) return x;
- x = z;
- resizes = d3_svg_brushResizes[!x << 1 | !y];
- return brush;
- };
- brush.y = function(z) {
- if (!arguments.length) return y;
- y = z;
- resizes = d3_svg_brushResizes[!x << 1 | !y];
- return brush;
- };
- brush.extent = function(z) {
- var x0, x1, y0, y1, t;
- if (!arguments.length) {
- z = extentDomain || extent;
- if (x) {
- x0 = z[0][0], x1 = z[1][0];
- if (!extentDomain) {
- x0 = extent[0][0], x1 = extent[1][0];
- if (x.invert) x0 = x.invert(x0), x1 = x.invert(x1);
- if (x1 < x0) t = x0, x0 = x1, x1 = t;
- }
- }
- if (y) {
- y0 = z[0][1], y1 = z[1][1];
- if (!extentDomain) {
- y0 = extent[0][1], y1 = extent[1][1];
- if (y.invert) y0 = y.invert(y0), y1 = y.invert(y1);
- if (y1 < y0) t = y0, y0 = y1, y1 = t;
- }
- }
- return x && y ? [ [ x0, y0 ], [ x1, y1 ] ] : x ? [ x0, x1 ] : y && [ y0, y1 ];
- }
- extentDomain = [ [ 0, 0 ], [ 0, 0 ] ];
- if (x) {
- x0 = z[0], x1 = z[1];
- if (y) x0 = x0[0], x1 = x1[0];
- extentDomain[0][0] = x0, extentDomain[1][0] = x1;
- if (x.invert) x0 = x(x0), x1 = x(x1);
- if (x1 < x0) t = x0, x0 = x1, x1 = t;
- extent[0][0] = x0 | 0, extent[1][0] = x1 | 0;
- }
- if (y) {
- y0 = z[0], y1 = z[1];
- if (x) y0 = y0[1], y1 = y1[1];
- extentDomain[0][1] = y0, extentDomain[1][1] = y1;
- if (y.invert) y0 = y(y0), y1 = y(y1);
- if (y1 < y0) t = y0, y0 = y1, y1 = t;
- extent[0][1] = y0 | 0, extent[1][1] = y1 | 0;
- }
- return brush;
- };
- brush.clear = function() {
- extentDomain = null;
- extent[0][0] = extent[0][1] = extent[1][0] = extent[1][1] = 0;
- return brush;
- };
- brush.empty = function() {
- return x && extent[0][0] === extent[1][0] || y && extent[0][1] === extent[1][1];
- };
- return d3.rebind(brush, event, "on");
- };
- var d3_svg_brushCursor = {
- n: "ns-resize",
- e: "ew-resize",
- s: "ns-resize",
- w: "ew-resize",
- nw: "nwse-resize",
- ne: "nesw-resize",
- se: "nwse-resize",
- sw: "nesw-resize"
- };
- var d3_svg_brushResizes = [ [ "n", "e", "s", "w", "nw", "ne", "se", "sw" ], [ "e", "w" ], [ "n", "s" ], [] ];
- d3.behavior = {};
- d3.behavior.drag = function() {
- function drag() {
- this.on("mousedown.drag", mousedown).on("touchstart.drag", mousedown);
- }
- function mousedown() {
- function point() {
- var p = target.parentNode;
- return touchId ? d3.touches(p).filter(function(p) {
- return p.identifier === touchId;
- })[0] : d3.mouse(p);
- }
- function dragmove() {
- if (!target.parentNode) return dragend();
- var p = point(), dx = p[0] - origin_[0], dy = p[1] - origin_[1];
- moved |= dx | dy;
- origin_ = p;
- d3_eventCancel();
- event_({
- type: "drag",
- x: p[0] + offset[0],
- y: p[1] + offset[1],
- dx: dx,
- dy: dy
- });
- }
- function dragend() {
- event_({
- type: "dragend"
- });
- if (moved) {
- d3_eventCancel();
- if (d3.event.target === eventTarget) w.on("click.drag", click, true);
- }
- w.on(touchId ? "touchmove.drag-" + touchId : "mousemove.drag", null).on(touchId ? "touchend.drag-" + touchId : "mouseup.drag", null);
- }
- function click() {
- d3_eventCancel();
- w.on("click.drag", null);
- }
- var target = this, event_ = event.of(target, arguments), eventTarget = d3.event.target, touchId = d3.event.touches && d3.event.changedTouches[0].identifier, offset, origin_ = point(), moved = 0;
- var w = d3.select(window).on(touchId ? "touchmove.drag-" + touchId : "mousemove.drag", dragmove).on(touchId ? "touchend.drag-" + touchId : "mouseup.drag", dragend, true);
- if (origin) {
- offset = origin.apply(target, arguments);
- offset = [ offset.x - origin_[0], offset.y - origin_[1] ];
- } else {
- offset = [ 0, 0 ];
- }
- if (!touchId) d3_eventCancel();
- event_({
- type: "dragstart"
- });
- }
- var event = d3_eventDispatch(drag, "drag", "dragstart", "dragend"), origin = null;
- drag.origin = function(x) {
- if (!arguments.length) return origin;
- origin = x;
- return drag;
- };
- return d3.rebind(drag, event, "on");
- };
- d3.behavior.zoom = function() {
- function zoom() {
- this.on("mousedown.zoom", mousedown).on("mousewheel.zoom", mousewheel).on("mousemove.zoom", mousemove).on("DOMMouseScroll.zoom", mousewheel).on("dblclick.zoom", dblclick).on("touchstart.zoom", touchstart).on("touchmove.zoom", touchmove).on("touchend.zoom", touchstart);
- }
- function location(p) {
- return [ (p[0] - translate[0]) / scale, (p[1] - translate[1]) / scale ];
- }
- function point(l) {
- return [ l[0] * scale + translate[0], l[1] * scale + translate[1] ];
- }
- function scaleTo(s) {
- scale = Math.max(scaleExtent[0], Math.min(scaleExtent[1], s));
- }
- function translateTo(p, l) {
- l = point(l);
- translate[0] += p[0] - l[0];
- translate[1] += p[1] - l[1];
- }
- function dispatch(event) {
- if (x1) x1.domain(x0.range().map(function(x) {
- return (x - translate[0]) / scale;
- }).map(x0.invert));
- if (y1) y1.domain(y0.range().map(function(y) {
- return (y - translate[1]) / scale;
- }).map(y0.invert));
- d3.event.preventDefault();
- event({
- type: "zoom",
- scale: scale,
- translate: translate
- });
- }
- function mousedown() {
- function mousemove() {
- moved = 1;
- translateTo(d3.mouse(target), l);
- dispatch(event_);
- }
- function mouseup() {
- if (moved) d3_eventCancel();
- w.on("mousemove.zoom", null).on("mouseup.zoom", null);
- if (moved && d3.event.target === eventTarget) w.on("click.zoom", click, true);
- }
- function click() {
- d3_eventCancel();
- w.on("click.zoom", null);
- }
- var target = this, event_ = event.of(target, arguments), eventTarget = d3.event.target, moved = 0, w = d3.select(window).on("mousemove.zoom", mousemove).on("mouseup.zoom", mouseup), l = location(d3.mouse(target));
- window.focus();
- d3_eventCancel();
- }
- function mousewheel() {
- if (!translate0) translate0 = location(d3.mouse(this));
- scaleTo(Math.pow(2, d3_behavior_zoomDelta() * .002) * scale);
- translateTo(d3.mouse(this), translate0);
- dispatch(event.of(this, arguments));
- }
- function mousemove() {
- translate0 = null;
- }
- function dblclick() {
- var p = d3.mouse(this), l = location(p);
- scaleTo(d3.event.shiftKey ? scale / 2 : scale * 2);
- translateTo(p, l);
- dispatch(event.of(this, arguments));
- }
- function touchstart() {
- var touches = d3.touches(this), now = Date.now();
- scale0 = scale;
- translate0 = {};
- touches.forEach(function(t) {
- translate0[t.identifier] = location(t);
- });
- d3_eventCancel();
- if (touches.length === 1) {
- if (now - touchtime < 500) {
- var p = touches[0], l = location(touches[0]);
- scaleTo(scale * 2);
- translateTo(p, l);
- dispatch(event.of(this, arguments));
- }
- touchtime = now;
- }
- }
- function touchmove() {
- var touches = d3.touches(this), p0 = touches[0], l0 = translate0[p0.identifier];
- if (p1 = touches[1]) {
- var p1, l1 = translate0[p1.identifier];
- p0 = [ (p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2 ];
- l0 = [ (l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2 ];
- scaleTo(d3.event.scale * scale0);
- }
- translateTo(p0, l0);
- touchtime = null;
- dispatch(event.of(this, arguments));
- }
- var translate = [ 0, 0 ], translate0, scale = 1, scale0, scaleExtent = d3_behavior_zoomInfinity, event = d3_eventDispatch(zoom, "zoom"), x0, x1, y0, y1, touchtime;
- zoom.translate = function(x) {
- if (!arguments.length) return translate;
- translate = x.map(Number);
- return zoom;
- };
- zoom.scale = function(x) {
- if (!arguments.length) return scale;
- scale = +x;
- return zoom;
- };
- zoom.scaleExtent = function(x) {
- if (!arguments.length) return scaleExtent;
- scaleExtent = x == null ? d3_behavior_zoomInfinity : x.map(Number);
- return zoom;
- };
- zoom.x = function(z) {
- if (!arguments.length) return x1;
- x1 = z;
- x0 = z.copy();
- return zoom;
- };
- zoom.y = function(z) {
- if (!arguments.length) return y1;
- y1 = z;
- y0 = z.copy();
- return zoom;
- };
- return d3.rebind(zoom, event, "on");
- };
- var d3_behavior_zoomDiv, d3_behavior_zoomInfinity = [ 0, Infinity ];
- d3.layout = {};
- d3.layout.bundle = function() {
- return function(links) {
- var paths = [], i = -1, n = links.length;
- while (++i < n) paths.push(d3_layout_bundlePath(links[i]));
- return paths;
- };
- };
- d3.layout.chord = function() {
- function relayout() {
- var subgroups = {}, groupSums = [], groupIndex = d3.range(n), subgroupIndex = [], k, x, x0, i, j;
- chords = [];
- groups = [];
- k = 0, i = -1;
- while (++i < n) {
- x = 0, j = -1;
- while (++j < n) {
- x += matrix[i][j];
- }
- groupSums.push(x);
- subgroupIndex.push(d3.range(n));
- k += x;
- }
- if (sortGroups) {
- groupIndex.sort(function(a, b) {
- return sortGroups(groupSums[a], groupSums[b]);
- });
- }
- if (sortSubgroups) {
- subgroupIndex.forEach(function(d, i) {
- d.sort(function(a, b) {
- return sortSubgroups(matrix[i][a], matrix[i][b]);
- });
- });
- }
- k = (2 * Math.PI - padding * n) / k;
- x = 0, i = -1;
- while (++i < n) {
- x0 = x, j = -1;
- while (++j < n) {
- var di = groupIndex[i], dj = subgroupIndex[di][j], v = matrix[di][dj], a0 = x, a1 = x += v * k;
- subgroups[di + "-" + dj] = {
- index: di,
- subindex: dj,
- startAngle: a0,
- endAngle: a1,
- value: v
- };
- }
- groups[di] = {
- index: di,
- startAngle: x0,
- endAngle: x,
- value: (x - x0) / k
- };
- x += padding;
- }
- i = -1;
- while (++i < n) {
- j = i - 1;
- while (++j < n) {
- var source = subgroups[i + "-" + j], target = subgroups[j + "-" + i];
- if (source.value || target.value) {
- chords.push(source.value < target.value ? {
- source: target,
- target: source
- } : {
- source: source,
- target: target
- });
- }
- }
- }
- if (sortChords) resort();
- }
- function resort() {
- chords.sort(function(a, b) {
- return sortChords((a.source.value + a.target.value) / 2, (b.source.value + b.target.value) / 2);
- });
- }
- var chord = {}, chords, groups, matrix, n, padding = 0, sortGroups, sortSubgroups, sortChords;
- chord.matrix = function(x) {
- if (!arguments.length) return matrix;
- n = (matrix = x) && matrix.length;
- chords = groups = null;
- return chord;
- };
- chord.padding = function(x) {
- if (!arguments.length) return padding;
- padding = x;
- chords = groups = null;
- return chord;
- };
- chord.sortGroups = function(x) {
- if (!arguments.length) return sortGroups;
- sortGroups = x;
- chords = groups = null;
- return chord;
- };
- chord.sortSubgroups = function(x) {
- if (!arguments.length) return sortSubgroups;
- sortSubgroups = x;
- chords = null;
- return chord;
- };
- chord.sortChords = function(x) {
- if (!arguments.length) return sortChords;
- sortChords = x;
- if (chords) resort();
- return chord;
- };
- chord.chords = function() {
- if (!chords) relayout();
- return chords;
- };
- chord.groups = function() {
- if (!groups) relayout();
- return groups;
- };
- return chord;
- };
- d3.layout.force = function() {
- function repulse(node) {
- return function(quad, x1, y1, x2, y2) {
- if (quad.point !== node) {
- var dx = quad.cx - node.x, dy = quad.cy - node.y, dn = 1 / Math.sqrt(dx * dx + dy * dy);
- if ((x2 - x1) * dn < theta) {
- var k = quad.charge * dn * dn;
- node.px -= dx * k;
- node.py -= dy * k;
- return true;
- }
- if (quad.point && isFinite(dn)) {
- var k = quad.pointCharge * dn * dn;
- node.px -= dx * k;
- node.py -= dy * k;
- }
- }
- return !quad.charge;
- };
- }
- function dragmove(d) {
- d.px = d3.event.x;
- d.py = d3.event.y;
- force.resume();
- }
- var force = {}, event = d3.dispatch("start", "tick", "end"), size = [ 1, 1 ], drag, alpha, friction = .9, linkDistance = d3_layout_forceLinkDistance, linkStrength = d3_layout_forceLinkStrength, charge = -30, gravity = .1, theta = .8, interval, nodes = [], links = [], distances, strengths, charges;
- force.tick = function() {
- if ((alpha *= .99) < .005) {
- event.end({
- type: "end",
- alpha: alpha = 0
- });
- return true;
- }
- var n = nodes.length, m = links.length, q, i, o, s, t, l, k, x, y;
- for (i = 0; i < m; ++i) {
- o = links[i];
- s = o.source;
- t = o.target;
- x = t.x - s.x;
- y = t.y - s.y;
- if (l = x * x + y * y) {
- l = alpha * strengths[i] * ((l = Math.sqrt(l)) - distances[i]) / l;
- x *= l;
- y *= l;
- t.x -= x * (k = s.weight / (t.weight + s.weight));
- t.y -= y * k;
- s.x += x * (k = 1 - k);
- s.y += y * k;
- }
- }
- if (k = alpha * gravity) {
- x = size[0] / 2;
- y = size[1] / 2;
- i = -1;
- if (k) while (++i < n) {
- o = nodes[i];
- o.x += (x - o.x) * k;
- o.y += (y - o.y) * k;
- }
- }
- if (charge) {
- d3_layout_forceAccumulate(q = d3.geom.quadtree(nodes), alpha, charges);
- i = -1;
- while (++i < n) {
- if (!(o = nodes[i]).fixed) {
- q.visit(repulse(o));
- }
- }
- }
- i = -1;
- while (++i < n) {
- o = nodes[i];
- if (o.fixed) {
- o.x = o.px;
- o.y = o.py;
- } else {
- o.x -= (o.px - (o.px = o.x)) * friction;
- o.y -= (o.py - (o.py = o.y)) * friction;
- }
- }
- event.tick({
- type: "tick",
- alpha: alpha
- });
- };
- force.nodes = function(x) {
- if (!arguments.length) return nodes;
- nodes = x;
- return force;
- };
- force.links = function(x) {
- if (!arguments.length) return links;
- links = x;
- return force;
- };
- force.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return force;
- };
- force.linkDistance = function(x) {
- if (!arguments.length) return linkDistance;
- linkDistance = d3_functor(x);
- return force;
- };
- force.distance = force.linkDistance;
- force.linkStrength = function(x) {
- if (!arguments.length) return linkStrength;
- linkStrength = d3_functor(x);
- return force;
- };
- force.friction = function(x) {
- if (!arguments.length) return friction;
- friction = x;
- return force;
- };
- force.charge = function(x) {
- if (!arguments.length) return charge;
- charge = typeof x === "function" ? x : +x;
- return force;
- };
- force.gravity = function(x) {
- if (!arguments.length) return gravity;
- gravity = x;
- return force;
- };
- force.theta = function(x) {
- if (!arguments.length) return theta;
- theta = x;
- return force;
- };
- force.alpha = function(x) {
- if (!arguments.length) return alpha;
- if (alpha) {
- if (x > 0) alpha = x; else alpha = 0;
- } else if (x > 0) {
- event.start({
- type: "start",
- alpha: alpha = x
- });
- d3.timer(force.tick);
- }
- return force;
- };
- force.start = function() {
- function position(dimension, size) {
- var neighbors = neighbor(i), j = -1, m = neighbors.length, x;
- while (++j < m) if (!isNaN(x = neighbors[j][dimension])) return x;
- return Math.random() * size;
- }
- function neighbor() {
- if (!neighbors) {
- neighbors = [];
- for (j = 0; j < n; ++j) {
- neighbors[j] = [];
- }
- for (j = 0; j < m; ++j) {
- var o = links[j];
- neighbors[o.source.index].push(o.target);
- neighbors[o.target.index].push(o.source);
- }
- }
- return neighbors[i];
- }
- var i, j, n = nodes.length, m = links.length, w = size[0], h = size[1], neighbors, o;
- for (i = 0; i < n; ++i) {
- (o = nodes[i]).index = i;
- o.weight = 0;
- }
- distances = [];
- strengths = [];
- for (i = 0; i < m; ++i) {
- o = links[i];
- if (typeof o.source == "number") o.source = nodes[o.source];
- if (typeof o.target == "number") o.target = nodes[o.target];
- distances[i] = linkDistance.call(this, o, i);
- strengths[i] = linkStrength.call(this, o, i);
- ++o.source.weight;
- ++o.target.weight;
- }
- for (i = 0; i < n; ++i) {
- o = nodes[i];
- if (isNaN(o.x)) o.x = position("x", w);
- if (isNaN(o.y)) o.y = position("y", h);
- if (isNaN(o.px)) o.px = o.x;
- if (isNaN(o.py)) o.py = o.y;
- }
- charges = [];
- if (typeof charge === "function") {
- for (i = 0; i < n; ++i) {
- charges[i] = +charge.call(this, nodes[i], i);
- }
- } else {
- for (i = 0; i < n; ++i) {
- charges[i] = charge;
- }
- }
- return force.resume();
- };
- force.resume = function() {
- return force.alpha(.1);
- };
- force.stop = function() {
- return force.alpha(0);
- };
- force.drag = function() {
- if (!drag) drag = d3.behavior.drag().origin(d3_identity).on("dragstart", d3_layout_forceDragstart).on("drag", dragmove).on("dragend", d3_layout_forceDragend);
- this.on("mouseover.force", d3_layout_forceMouseover).on("mouseout.force", d3_layout_forceMouseout).call(drag);
- };
- return d3.rebind(force, event, "on");
- };
- d3.layout.partition = function() {
- function position(node, x, dx, dy) {
- var children = node.children;
- node.x = x;
- node.y = node.depth * dy;
- node.dx = dx;
- node.dy = dy;
- if (children && (n = children.length)) {
- var i = -1, n, c, d;
- dx = node.value ? dx / node.value : 0;
- while (++i < n) {
- position(c = children[i], x, d = c.value * dx, dy);
- x += d;
- }
- }
- }
- function depth(node) {
- var children = node.children, d = 0;
- if (children && (n = children.length)) {
- var i = -1, n;
- while (++i < n) d = Math.max(d, depth(children[i]));
- }
- return 1 + d;
- }
- function partition(d, i) {
- var nodes = hierarchy.call(this, d, i);
- position(nodes[0], 0, size[0], size[1] / depth(nodes[0]));
- return nodes;
- }
- var hierarchy = d3.layout.hierarchy(), size = [ 1, 1 ];
- partition.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return partition;
- };
- return d3_layout_hierarchyRebind(partition, hierarchy);
- };
- d3.layout.pie = function() {
- function pie(data, i) {
- var values = data.map(function(d, i) {
- return +value.call(pie, d, i);
- });
- var a = +(typeof startAngle === "function" ? startAngle.apply(this, arguments) : startAngle);
- var k = ((typeof endAngle === "function" ? endAngle.apply(this, arguments) : endAngle) - startAngle) / d3.sum(values);
- var index = d3.range(data.length);
- if (sort != null) index.sort(sort === d3_layout_pieSortByValue ? function(i, j) {
- return values[j] - values[i];
- } : function(i, j) {
- return sort(data[i], data[j]);
- });
- var arcs = [];
- index.forEach(function(i) {
- var d;
- arcs[i] = {
- data: data[i],
- value: d = values[i],
- startAngle: a,
- endAngle: a += d * k
- };
- });
- return arcs;
- }
- var value = Number, sort = d3_layout_pieSortByValue, startAngle = 0, endAngle = 2 * Math.PI;
- pie.value = function(x) {
- if (!arguments.length) return value;
- value = x;
- return pie;
- };
- pie.sort = function(x) {
- if (!arguments.length) return sort;
- sort = x;
- return pie;
- };
- pie.startAngle = function(x) {
- if (!arguments.length) return startAngle;
- startAngle = x;
- return pie;
- };
- pie.endAngle = function(x) {
- if (!arguments.length) return endAngle;
- endAngle = x;
- return pie;
- };
- return pie;
- };
- var d3_layout_pieSortByValue = {};
- d3.layout.stack = function() {
- function stack(data, index) {
- var series = data.map(function(d, i) {
- return values.call(stack, d, i);
- });
- var points = series.map(function(d, i) {
- return d.map(function(v, i) {
- return [ x.call(stack, v, i), y.call(stack, v, i) ];
- });
- });
- var orders = order.call(stack, points, index);
- series = d3.permute(series, orders);
- points = d3.permute(points, orders);
- var offsets = offset.call(stack, points, index);
- var n = series.length, m = series[0].length, i, j, o;
- for (j = 0; j < m; ++j) {
- out.call(stack, series[0][j], o = offsets[j], points[0][j][1]);
- for (i = 1; i < n; ++i) {
- out.call(stack, series[i][j], o += points[i - 1][j][1], points[i][j][1]);
- }
- }
- return data;
- }
- var values = d3_identity, order = d3_layout_stackOrderDefault, offset = d3_layout_stackOffsetZero, out = d3_layout_stackOut, x = d3_layout_stackX, y = d3_layout_stackY;
- stack.values = function(x) {
- if (!arguments.length) return values;
- values = x;
- return stack;
- };
- stack.order = function(x) {
- if (!arguments.length) return order;
- order = typeof x === "function" ? x : d3_layout_stackOrders.get(x) || d3_layout_stackOrderDefault;
- return stack;
- };
- stack.offset = function(x) {
- if (!arguments.length) return offset;
- offset = typeof x === "function" ? x : d3_layout_stackOffsets.get(x) || d3_layout_stackOffsetZero;
- return stack;
- };
- stack.x = function(z) {
- if (!arguments.length) return x;
- x = z;
- return stack;
- };
- stack.y = function(z) {
- if (!arguments.length) return y;
- y = z;
- return stack;
- };
- stack.out = function(z) {
- if (!arguments.length) return out;
- out = z;
- return stack;
- };
- return stack;
- };
- var d3_layout_stackOrders = d3.map({
- "inside-out": function(data) {
- var n = data.length, i, j, max = data.map(d3_layout_stackMaxIndex), sums = data.map(d3_layout_stackReduceSum), index = d3.range(n).sort(function(a, b) {
- return max[a] - max[b];
- }), top = 0, bottom = 0, tops = [], bottoms = [];
- for (i = 0; i < n; ++i) {
- j = index[i];
- if (top < bottom) {
- top += sums[j];
- tops.push(j);
- } else {
- bottom += sums[j];
- bottoms.push(j);
- }
- }
- return bottoms.reverse().concat(tops);
- },
- reverse: function(data) {
- return d3.range(data.length).reverse();
- },
- "default": d3_layout_stackOrderDefault
- });
- var d3_layout_stackOffsets = d3.map({
- silhouette: function(data) {
- var n = data.length, m = data[0].length, sums = [], max = 0, i, j, o, y0 = [];
- for (j = 0; j < m; ++j) {
- for (i = 0, o = 0; i < n; i++) o += data[i][j][1];
- if (o > max) max = o;
- sums.push(o);
- }
- for (j = 0; j < m; ++j) {
- y0[j] = (max - sums[j]) / 2;
- }
- return y0;
- },
- wiggle: function(data) {
- var n = data.length, x = data[0], m = x.length, max = 0, i, j, k, s1, s2, s3, dx, o, o0, y0 = [];
- y0[0] = o = o0 = 0;
- for (j = 1; j < m; ++j) {
- for (i = 0, s1 = 0; i < n; ++i) s1 += data[i][j][1];
- for (i = 0, s2 = 0, dx = x[j][0] - x[j - 1][0]; i < n; ++i) {
- for (k = 0, s3 = (data[i][j][1] - data[i][j - 1][1]) / (2 * dx); k < i; ++k) {
- s3 += (data[k][j][1] - data[k][j - 1][1]) / dx;
- }
- s2 += s3 * data[i][j][1];
- }
- y0[j] = o -= s1 ? s2 / s1 * dx : 0;
- if (o < o0) o0 = o;
- }
- for (j = 0; j < m; ++j) y0[j] -= o0;
- return y0;
- },
- expand: function(data) {
- var n = data.length, m = data[0].length, k = 1 / n, i, j, o, y0 = [];
- for (j = 0; j < m; ++j) {
- for (i = 0, o = 0; i < n; i++) o += data[i][j][1];
- if (o) for (i = 0; i < n; i++) data[i][j][1] /= o; else for (i = 0; i < n; i++) data[i][j][1] = k;
- }
- for (j = 0; j < m; ++j) y0[j] = 0;
- return y0;
- },
- zero: d3_layout_stackOffsetZero
- });
- d3.layout.histogram = function() {
- function histogram(data, i) {
- var bins = [], values = data.map(valuer, this), range = ranger.call(this, values, i), thresholds = binner.call(this, range, values, i), bin, i = -1, n = values.length, m = thresholds.length - 1, k = frequency ? 1 : 1 / n, x;
- while (++i < m) {
- bin = bins[i] = [];
- bin.dx = thresholds[i + 1] - (bin.x = thresholds[i]);
- bin.y = 0;
- }
- if (m > 0) {
- i = -1;
- while (++i < n) {
- x = values[i];
- if (x >= range[0] && x <= range[1]) {
- bin = bins[d3.bisect(thresholds, x, 1, m) - 1];
- bin.y += k;
- bin.push(data[i]);
- }
- }
- }
- return bins;
- }
- var frequency = true, valuer = Number, ranger = d3_layout_histogramRange, binner = d3_layout_histogramBinSturges;
- histogram.value = function(x) {
- if (!arguments.length) return valuer;
- valuer = x;
- return histogram;
- };
- histogram.range = function(x) {
- if (!arguments.length) return ranger;
- ranger = d3_functor(x);
- return histogram;
- };
- histogram.bins = function(x) {
- if (!arguments.length) return binner;
- binner = typeof x === "number" ? function(range) {
- return d3_layout_histogramBinFixed(range, x);
- } : d3_functor(x);
- return histogram;
- };
- histogram.frequency = function(x) {
- if (!arguments.length) return frequency;
- frequency = !!x;
- return histogram;
- };
- return histogram;
- };
- d3.layout.hierarchy = function() {
- function recurse(data, depth, nodes) {
- var childs = children.call(hierarchy, data, depth), node = d3_layout_hierarchyInline ? data : {
- data: data
- };
- node.depth = depth;
- nodes.push(node);
- if (childs && (n = childs.length)) {
- var i = -1, n, c = node.children = [], v = 0, j = depth + 1, d;
- while (++i < n) {
- d = recurse(childs[i], j, nodes);
- d.parent = node;
- c.push(d);
- v += d.value;
- }
- if (sort) c.sort(sort);
- if (value) node.value = v;
- } else if (value) {
- node.value = +value.call(hierarchy, data, depth) || 0;
- }
- return node;
- }
- function revalue(node, depth) {
- var children = node.children, v = 0;
- if (children && (n = children.length)) {
- var i = -1, n, j = depth + 1;
- while (++i < n) v += revalue(children[i], j);
- } else if (value) {
- v = +value.call(hierarchy, d3_layout_hierarchyInline ? node : node.data, depth) || 0;
- }
- if (value) node.value = v;
- return v;
- }
- function hierarchy(d) {
- var nodes = [];
- recurse(d, 0, nodes);
- return nodes;
- }
- var sort = d3_layout_hierarchySort, children = d3_layout_hierarchyChildren, value = d3_layout_hierarchyValue;
- hierarchy.sort = function(x) {
- if (!arguments.length) return sort;
- sort = x;
- return hierarchy;
- };
- hierarchy.children = function(x) {
- if (!arguments.length) return children;
- children = x;
- return hierarchy;
- };
- hierarchy.value = function(x) {
- if (!arguments.length) return value;
- value = x;
- return hierarchy;
- };
- hierarchy.revalue = function(root) {
- revalue(root, 0);
- return root;
- };
- return hierarchy;
- };
- var d3_layout_hierarchyInline = false;
- d3.layout.pack = function() {
- function pack(d, i) {
- var nodes = hierarchy.call(this, d, i), root = nodes[0];
- root.x = 0;
- root.y = 0;
- d3_layout_treeVisitAfter(root, function(d) {
- d.r = Math.sqrt(d.value);
- });
- d3_layout_treeVisitAfter(root, d3_layout_packSiblings);
- var w = size[0], h = size[1], k = Math.max(2 * root.r / w, 2 * root.r / h);
- if (padding > 0) {
- var dr = padding * k / 2;
- d3_layout_treeVisitAfter(root, function(d) {
- d.r += dr;
- });
- d3_layout_treeVisitAfter(root, d3_layout_packSiblings);
- d3_layout_treeVisitAfter(root, function(d) {
- d.r -= dr;
- });
- k = Math.max(2 * root.r / w, 2 * root.r / h);
- }
- d3_layout_packTransform(root, w / 2, h / 2, 1 / k);
- return nodes;
- }
- var hierarchy = d3.layout.hierarchy().sort(d3_layout_packSort), padding = 0, size = [ 1, 1 ];
- pack.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return pack;
- };
- pack.padding = function(_) {
- if (!arguments.length) return padding;
- padding = +_;
- return pack;
- };
- return d3_layout_hierarchyRebind(pack, hierarchy);
- };
- d3.layout.cluster = function() {
- function cluster(d, i) {
- var nodes = hierarchy.call(this, d, i), root = nodes[0], previousNode, x = 0, kx, ky;
- d3_layout_treeVisitAfter(root, function(node) {
- var children = node.children;
- if (children && children.length) {
- node.x = d3_layout_clusterX(children);
- node.y = d3_layout_clusterY(children);
- } else {
- node.x = previousNode ? x += separation(node, previousNode) : 0;
- node.y = 0;
- previousNode = node;
- }
- });
- var left = d3_layout_clusterLeft(root), right = d3_layout_clusterRight(root), x0 = left.x - separation(left, right) / 2, x1 = right.x + separation(right, left) / 2;
- d3_layout_treeVisitAfter(root, function(node) {
- node.x = (node.x - x0) / (x1 - x0) * size[0];
- node.y = (1 - (root.y ? node.y / root.y : 1)) * size[1];
- });
- return nodes;
- }
- var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ];
- cluster.separation = function(x) {
- if (!arguments.length) return separation;
- separation = x;
- return cluster;
- };
- cluster.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return cluster;
- };
- return d3_layout_hierarchyRebind(cluster, hierarchy);
- };
- d3.layout.tree = function() {
- function tree(d, i) {
- function firstWalk(node, previousSibling) {
- var children = node.children, layout = node._tree;
- if (children && (n = children.length)) {
- var n, firstChild = children[0], previousChild, ancestor = firstChild, child, i = -1;
- while (++i < n) {
- child = children[i];
- firstWalk(child, previousChild);
- ancestor = apportion(child, previousChild, ancestor);
- previousChild = child;
- }
- d3_layout_treeShift(node);
- var midpoint = .5 * (firstChild._tree.prelim + child._tree.prelim);
- if (previousSibling) {
- layout.prelim = previousSibling._tree.prelim + separation(node, previousSibling);
- layout.mod = layout.prelim - midpoint;
- } else {
- layout.prelim = midpoint;
- }
- } else {
- if (previousSibling) {
- layout.prelim = previousSibling._tree.prelim + separation(node, previousSibling);
- }
- }
- }
- function secondWalk(node, x) {
- node.x = node._tree.prelim + x;
- var children = node.children;
- if (children && (n = children.length)) {
- var i = -1, n;
- x += node._tree.mod;
- while (++i < n) {
- secondWalk(children[i], x);
- }
- }
- }
- function apportion(node, previousSibling, ancestor) {
- if (previousSibling) {
- var vip = node, vop = node, vim = previousSibling, vom = node.parent.children[0], sip = vip._tree.mod, sop = vop._tree.mod, sim = vim._tree.mod, som = vom._tree.mod, shift;
- while (vim = d3_layout_treeRight(vim), vip = d3_layout_treeLeft(vip), vim && vip) {
- vom = d3_layout_treeLeft(vom);
- vop = d3_layout_treeRight(vop);
- vop._tree.ancestor = node;
- shift = vim._tree.prelim + sim - vip._tree.prelim - sip + separation(vim, vip);
- if (shift > 0) {
- d3_layout_treeMove(d3_layout_treeAncestor(vim, node, ancestor), node, shift);
- sip += shift;
- sop += shift;
- }
- sim += vim._tree.mod;
- sip += vip._tree.mod;
- som += vom._tree.mod;
- sop += vop._tree.mod;
- }
- if (vim && !d3_layout_treeRight(vop)) {
- vop._tree.thread = vim;
- vop._tree.mod += sim - sop;
- }
- if (vip && !d3_layout_treeLeft(vom)) {
- vom._tree.thread = vip;
- vom._tree.mod += sip - som;
- ancestor = node;
- }
- }
- return ancestor;
- }
- var nodes = hierarchy.call(this, d, i), root = nodes[0];
- d3_layout_treeVisitAfter(root, function(node, previousSibling) {
- node._tree = {
- ancestor: node,
- prelim: 0,
- mod: 0,
- change: 0,
- shift: 0,
- number: previousSibling ? previousSibling._tree.number + 1 : 0
- };
- });
- firstWalk(root);
- secondWalk(root, -root._tree.prelim);
- var left = d3_layout_treeSearch(root, d3_layout_treeLeftmost), right = d3_layout_treeSearch(root, d3_layout_treeRightmost), deep = d3_layout_treeSearch(root, d3_layout_treeDeepest), x0 = left.x - separation(left, right) / 2, x1 = right.x + separation(right, left) / 2, y1 = deep.depth || 1;
- d3_layout_treeVisitAfter(root, function(node) {
- node.x = (node.x - x0) / (x1 - x0) * size[0];
- node.y = node.depth / y1 * size[1];
- delete node._tree;
- });
- return nodes;
- }
- var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ];
- tree.separation = function(x) {
- if (!arguments.length) return separation;
- separation = x;
- return tree;
- };
- tree.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return tree;
- };
- return d3_layout_hierarchyRebind(tree, hierarchy);
- };
- d3.layout.treemap = function() {
- function scale(children, k) {
- var i = -1, n = children.length, child, area;
- while (++i < n) {
- area = (child = children[i]).value * (k < 0 ? 0 : k);
- child.area = isNaN(area) || area <= 0 ? 0 : area;
- }
- }
- function squarify(node) {
- var children = node.children;
- if (children && children.length) {
- var rect = pad(node), row = [], remaining = children.slice(), child, best = Infinity, score, u = Math.min(rect.dx, rect.dy), n;
- scale(remaining, rect.dx * rect.dy / node.value);
- row.area = 0;
- while ((n = remaining.length) > 0) {
- row.push(child = remaining[n - 1]);
- row.area += child.area;
- if ((score = worst(row, u)) <= best) {
- remaining.pop();
- best = score;
- } else {
- row.area -= row.pop().area;
- position(row, u, rect, false);
- u = Math.min(rect.dx, rect.dy);
- row.length = row.area = 0;
- best = Infinity;
- }
- }
- if (row.length) {
- position(row, u, rect, true);
- row.length = row.area = 0;
- }
- children.forEach(squarify);
- }
- }
- function stickify(node) {
- var children = node.children;
- if (children && children.length) {
- var rect = pad(node), remaining = children.slice(), child, row = [];
- scale(remaining, rect.dx * rect.dy / node.value);
- row.area = 0;
- while (child = remaining.pop()) {
- row.push(child);
- row.area += child.area;
- if (child.z != null) {
- position(row, child.z ? rect.dx : rect.dy, rect, !remaining.length);
- row.length = row.area = 0;
- }
- }
- children.forEach(stickify);
- }
- }
- function worst(row, u) {
- var s = row.area, r, rmax = 0, rmin = Infinity, i = -1, n = row.length;
- while (++i < n) {
- if (!(r = row[i].area)) continue;
- if (r < rmin) rmin = r;
- if (r > rmax) rmax = r;
- }
- s *= s;
- u *= u;
- return s ? Math.max(u * rmax * ratio / s, s / (u * rmin * ratio)) : Infinity;
- }
- function position(row, u, rect, flush) {
- var i = -1, n = row.length, x = rect.x, y = rect.y, v = u ? round(row.area / u) : 0, o;
- if (u == rect.dx) {
- if (flush || v > rect.dy) v = rect.dy;
- while (++i < n) {
- o = row[i];
- o.x = x;
- o.y = y;
- o.dy = v;
- x += o.dx = Math.min(rect.x + rect.dx - x, v ? round(o.area / v) : 0);
- }
- o.z = true;
- o.dx += rect.x + rect.dx - x;
- rect.y += v;
- rect.dy -= v;
- } else {
- if (flush || v > rect.dx) v = rect.dx;
- while (++i < n) {
- o = row[i];
- o.x = x;
- o.y = y;
- o.dx = v;
- y += o.dy = Math.min(rect.y + rect.dy - y, v ? round(o.area / v) : 0);
- }
- o.z = false;
- o.dy += rect.y + rect.dy - y;
- rect.x += v;
- rect.dx -= v;
- }
- }
- function treemap(d) {
- var nodes = stickies || hierarchy(d), root = nodes[0];
- root.x = 0;
- root.y = 0;
- root.dx = size[0];
- root.dy = size[1];
- if (stickies) hierarchy.revalue(root);
- scale([ root ], root.dx * root.dy / root.value);
- (stickies ? stickify : squarify)(root);
- if (sticky) stickies = nodes;
- return nodes;
- }
- var hierarchy = d3.layout.hierarchy(), round = Math.round, size = [ 1, 1 ], padding = null, pad = d3_layout_treemapPadNull, sticky = false, stickies, ratio = .5 * (1 + Math.sqrt(5));
- treemap.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return treemap;
- };
- treemap.padding = function(x) {
- function padFunction(node) {
- var p = x.call(treemap, node, node.depth);
- return p == null ? d3_layout_treemapPadNull(node) : d3_layout_treemapPad(node, typeof p === "number" ? [ p, p, p, p ] : p);
- }
- function padConstant(node) {
- return d3_layout_treemapPad(node, x);
- }
- if (!arguments.length) return padding;
- var type;
- pad = (padding = x) == null ? d3_layout_treemapPadNull : (type = typeof x) === "function" ? padFunction : type === "number" ? (x = [ x, x, x, x ], padConstant) : padConstant;
- return treemap;
- };
- treemap.round = function(x) {
- if (!arguments.length) return round != Number;
- round = x ? Math.round : Number;
- return treemap;
- };
- treemap.sticky = function(x) {
- if (!arguments.length) return sticky;
- sticky = x;
- stickies = null;
- return treemap;
- };
- treemap.ratio = function(x) {
- if (!arguments.length) return ratio;
- ratio = x;
- return treemap;
- };
- return d3_layout_hierarchyRebind(treemap, hierarchy);
- };
- d3.csv = d3_dsv(",", "text/csv");
- d3.tsv = d3_dsv(" ", "text/tab-separated-values");
- d3.geo = {};
- var d3_geo_radians = Math.PI / 180;
- d3.geo.azimuthal = function() {
- function azimuthal(coordinates) {
- var x1 = coordinates[0] * d3_geo_radians - x0, y1 = coordinates[1] * d3_geo_radians, cx1 = Math.cos(x1), sx1 = Math.sin(x1), cy1 = Math.cos(y1), sy1 = Math.sin(y1), cc = mode !== "orthographic" ? sy0 * sy1 + cy0 * cy1 * cx1 : null, c, k = mode === "stereographic" ? 1 / (1 + cc) : mode === "gnomonic" ? 1 / cc : mode === "equidistant" ? (c = Math.acos(cc), c ? c / Math.sin(c) : 0) : mode === "equalarea" ? Math.sqrt(2 / (1 + cc)) : 1, x = k * cy1 * sx1, y = k * (sy0 * cy1 * cx1 - cy0 * sy1);
- return [ scale * x + translate[0], scale * y + translate[1] ];
- }
- var mode = "orthographic", origin, scale = 200, translate = [ 480, 250 ], x0, y0, cy0, sy0;
- azimuthal.invert = function(coordinates) {
- var x = (coordinates[0] - translate[0]) / scale, y = (coordinates[1] - translate[1]) / scale, p = Math.sqrt(x * x + y * y), c = mode === "stereographic" ? 2 * Math.atan(p) : mode === "gnomonic" ? Math.atan(p) : mode === "equidistant" ? p : mode === "equalarea" ? 2 * Math.asin(.5 * p) : Math.asin(p), sc = Math.sin(c), cc = Math.cos(c);
- return [ (x0 + Math.atan2(x * sc, p * cy0 * cc + y * sy0 * sc)) / d3_geo_radians, Math.asin(cc * sy0 - (p ? y * sc * cy0 / p : 0)) / d3_geo_radians ];
- };
- azimuthal.mode = function(x) {
- if (!arguments.length) return mode;
- mode = x + "";
- return azimuthal;
- };
- azimuthal.origin = function(x) {
- if (!arguments.length) return origin;
- origin = x;
- x0 = origin[0] * d3_geo_radians;
- y0 = origin[1] * d3_geo_radians;
- cy0 = Math.cos(y0);
- sy0 = Math.sin(y0);
- return azimuthal;
- };
- azimuthal.scale = function(x) {
- if (!arguments.length) return scale;
- scale = +x;
- return azimuthal;
- };
- azimuthal.translate = function(x) {
- if (!arguments.length) return translate;
- translate = [ +x[0], +x[1] ];
- return azimuthal;
- };
- return azimuthal.origin([ 0, 0 ]);
- };
- d3.geo.albers = function() {
- function albers(coordinates) {
- var t = n * (d3_geo_radians * coordinates[0] - lng0), p = Math.sqrt(C - 2 * n * Math.sin(d3_geo_radians * coordinates[1])) / n;
- return [ scale * p * Math.sin(t) + translate[0], scale * (p * Math.cos(t) - p0) + translate[1] ];
- }
- function reload() {
- var phi1 = d3_geo_radians * parallels[0], phi2 = d3_geo_radians * parallels[1], lat0 = d3_geo_radians * origin[1], s = Math.sin(phi1), c = Math.cos(phi1);
- lng0 = d3_geo_radians * origin[0];
- n = .5 * (s + Math.sin(phi2));
- C = c * c + 2 * n * s;
- p0 = Math.sqrt(C - 2 * n * Math.sin(lat0)) / n;
- return albers;
- }
- var origin = [ -98, 38 ], parallels = [ 29.5, 45.5 ], scale = 1e3, translate = [ 480, 250 ], lng0, n, C, p0;
- albers.invert = function(coordinates) {
- var x = (coordinates[0] - translate[0]) / scale, y = (coordinates[1] - translate[1]) / scale, p0y = p0 + y, t = Math.atan2(x, p0y), p = Math.sqrt(x * x + p0y * p0y);
- return [ (lng0 + t / n) / d3_geo_radians, Math.asin((C - p * p * n * n) / (2 * n)) / d3_geo_radians ];
- };
- albers.origin = function(x) {
- if (!arguments.length) return origin;
- origin = [ +x[0], +x[1] ];
- return reload();
- };
- albers.parallels = function(x) {
- if (!arguments.length) return parallels;
- parallels = [ +x[0], +x[1] ];
- return reload();
- };
- albers.scale = function(x) {
- if (!arguments.length) return scale;
- scale = +x;
- return albers;
- };
- albers.translate = function(x) {
- if (!arguments.length) return translate;
- translate = [ +x[0], +x[1] ];
- return albers;
- };
- return reload();
- };
- d3.geo.albersUsa = function() {
- function albersUsa(coordinates) {
- var lon = coordinates[0], lat = coordinates[1];
- return (lat > 50 ? alaska : lon < -140 ? hawaii : lat < 21 ? puertoRico : lower48)(coordinates);
- }
- var lower48 = d3.geo.albers();
- var alaska = d3.geo.albers().origin([ -160, 60 ]).parallels([ 55, 65 ]);
- var hawaii = d3.geo.albers().origin([ -160, 20 ]).parallels([ 8, 18 ]);
- var puertoRico = d3.geo.albers().origin([ -60, 10 ]).parallels([ 8, 18 ]);
- albersUsa.scale = function(x) {
- if (!arguments.length) return lower48.scale();
- lower48.scale(x);
- alaska.scale(x * .6);
- hawaii.scale(x);
- puertoRico.scale(x * 1.5);
- return albersUsa.translate(lower48.translate());
- };
- albersUsa.translate = function(x) {
- if (!arguments.length) return lower48.translate();
- var dz = lower48.scale() / 1e3, dx = x[0], dy = x[1];
- lower48.translate(x);
- alaska.translate([ dx - 400 * dz, dy + 170 * dz ]);
- hawaii.translate([ dx - 190 * dz, dy + 200 * dz ]);
- puertoRico.translate([ dx + 580 * dz, dy + 430 * dz ]);
- return albersUsa;
- };
- return albersUsa.scale(lower48.scale());
- };
- d3.geo.bonne = function() {
- function bonne(coordinates) {
- var x = coordinates[0] * d3_geo_radians - x0, y = coordinates[1] * d3_geo_radians - y0;
- if (y1) {
- var p = c1 + y1 - y, E = x * Math.cos(y) / p;
- x = p * Math.sin(E);
- y = p * Math.cos(E) - c1;
- } else {
- x *= Math.cos(y);
- y *= -1;
- }
- return [ scale * x + translate[0], scale * y + translate[1] ];
- }
- var scale = 200, translate = [ 480, 250 ], x0, y0, y1, c1;
- bonne.invert = function(coordinates) {
- var x = (coordinates[0] - translate[0]) / scale, y = (coordinates[1] - translate[1]) / scale;
- if (y1) {
- var c = c1 + y, p = Math.sqrt(x * x + c * c);
- y = c1 + y1 - p;
- x = x0 + p * Math.atan2(x, c) / Math.cos(y);
- } else {
- y *= -1;
- x /= Math.cos(y);
- }
- return [ x / d3_geo_radians, y / d3_geo_radians ];
- };
- bonne.parallel = function(x) {
- if (!arguments.length) return y1 / d3_geo_radians;
- c1 = 1 / Math.tan(y1 = x * d3_geo_radians);
- return bonne;
- };
- bonne.origin = function(x) {
- if (!arguments.length) return [ x0 / d3_geo_radians, y0 / d3_geo_radians ];
- x0 = x[0] * d3_geo_radians;
- y0 = x[1] * d3_geo_radians;
- return bonne;
- };
- bonne.scale = function(x) {
- if (!arguments.length) return scale;
- scale = +x;
- return bonne;
- };
- bonne.translate = function(x) {
- if (!arguments.length) return translate;
- translate = [ +x[0], +x[1] ];
- return bonne;
- };
- return bonne.origin([ 0, 0 ]).parallel(45);
- };
- d3.geo.equirectangular = function() {
- function equirectangular(coordinates) {
- var x = coordinates[0] / 360, y = -coordinates[1] / 360;
- return [ scale * x + translate[0], scale * y + translate[1] ];
- }
- var scale = 500, translate = [ 480, 250 ];
- equirectangular.invert = function(coordinates) {
- var x = (coordinates[0] - translate[0]) / scale, y = (coordinates[1] - translate[1]) / scale;
- return [ 360 * x, -360 * y ];
- };
- equirectangular.scale = function(x) {
- if (!arguments.length) return scale;
- scale = +x;
- return equirectangular;
- };
- equirectangular.translate = function(x) {
- if (!arguments.length) return translate;
- translate = [ +x[0], +x[1] ];
- return equirectangular;
- };
- return equirectangular;
- };
- d3.geo.mercator = function() {
- function mercator(coordinates) {
- var x = coordinates[0] / 360, y = -(Math.log(Math.tan(Math.PI / 4 + coordinates[1] * d3_geo_radians / 2)) / d3_geo_radians) / 360;
- return [ scale * x + translate[0], scale * Math.max(-.5, Math.min(.5, y)) + translate[1] ];
- }
- var scale = 500, translate = [ 480, 250 ];
- mercator.invert = function(coordinates) {
- var x = (coordinates[0] - translate[0]) / scale, y = (coordinates[1] - translate[1]) / scale;
- return [ 360 * x, 2 * Math.atan(Math.exp(-360 * y * d3_geo_radians)) / d3_geo_radians - 90 ];
- };
- mercator.scale = function(x) {
- if (!arguments.length) return scale;
- scale = +x;
- return mercator;
- };
- mercator.translate = function(x) {
- if (!arguments.length) return translate;
- translate = [ +x[0], +x[1] ];
- return mercator;
- };
- return mercator;
- };
- d3.geo.path = function() {
- function path(d, i) {
- if (typeof pointRadius === "function") pointCircle = d3_path_circle(pointRadius.apply(this, arguments));
- pathType(d);
- var result = buffer.length ? buffer.join("") : null;
- buffer = [];
- return result;
- }
- function project(coordinates) {
- return projection(coordinates).join(",");
- }
- function polygonArea(coordinates) {
- var sum = area(coordinates[0]), i = 0, n = coordinates.length;
- while (++i < n) sum -= area(coordinates[i]);
- return sum;
- }
- function polygonCentroid(coordinates) {
- var polygon = d3.geom.polygon(coordinates[0].map(projection)), area = polygon.area(), centroid = polygon.centroid(area < 0 ? (area *= -1, 1) : -1), x = centroid[0], y = centroid[1], z = area, i = 0, n = coordinates.length;
- while (++i < n) {
- polygon = d3.geom.polygon(coordinates[i].map(projection));
- area = polygon.area();
- centroid = polygon.centroid(area < 0 ? (area *= -1, 1) : -1);
- x -= centroid[0];
- y -= centroid[1];
- z -= area;
- }
- return [ x, y, 6 * z ];
- }
- function area(coordinates) {
- return Math.abs(d3.geom.polygon(coordinates.map(projection)).area());
- }
- var pointRadius = 4.5, pointCircle = d3_path_circle(pointRadius), projection = d3.geo.albersUsa(), buffer = [];
- var pathType = d3_geo_type({
- FeatureCollection: function(o) {
- var features = o.features, i = -1, n = features.length;
- while (++i < n) buffer.push(pathType(features[i].geometry));
- },
- Feature: function(o) {
- pathType(o.geometry);
- },
- Point: function(o) {
- buffer.push("M", project(o.coordinates), pointCircle);
- },
- MultiPoint: function(o) {
- var coordinates = o.coordinates, i = -1, n = coordinates.length;
- while (++i < n) buffer.push("M", project(coordinates[i]), pointCircle);
- },
- LineString: function(o) {
- var coordinates = o.coordinates, i = -1, n = coordinates.length;
- buffer.push("M");
- while (++i < n) buffer.push(project(coordinates[i]), "L");
- buffer.pop();
- },
- MultiLineString: function(o) {
- var coordinates = o.coordinates, i = -1, n = coordinates.length, subcoordinates, j, m;
- while (++i < n) {
- subcoordinates = coordinates[i];
- j = -1;
- m = subcoordinates.length;
- buffer.push("M");
- while (++j < m) buffer.push(project(subcoordinates[j]), "L");
- buffer.pop();
- }
- },
- Polygon: function(o) {
- var coordinates = o.coordinates, i = -1, n = coordinates.length, subcoordinates, j, m;
- while (++i < n) {
- subcoordinates = coordinates[i];
- j = -1;
- if ((m = subcoordinates.length - 1) > 0) {
- buffer.push("M");
- while (++j < m) buffer.push(project(subcoordinates[j]), "L");
- buffer[buffer.length - 1] = "Z";
- }
- }
- },
- MultiPolygon: function(o) {
- var coordinates = o.coordinates, i = -1, n = coordinates.length, subcoordinates, j, m, subsubcoordinates, k, p;
- while (++i < n) {
- subcoordinates = coordinates[i];
- j = -1;
- m = subcoordinates.length;
- while (++j < m) {
- subsubcoordinates = subcoordinates[j];
- k = -1;
- if ((p = subsubcoordinates.length - 1) > 0) {
- buffer.push("M");
- while (++k < p) buffer.push(project(subsubcoordinates[k]), "L");
- buffer[buffer.length - 1] = "Z";
- }
- }
- }
- },
- GeometryCollection: function(o) {
- var geometries = o.geometries, i = -1, n = geometries.length;
- while (++i < n) buffer.push(pathType(geometries[i]));
- }
- });
- var areaType = path.area = d3_geo_type({
- FeatureCollection: function(o) {
- var area = 0, features = o.features, i = -1, n = features.length;
- while (++i < n) area += areaType(features[i]);
- return area;
- },
- Feature: function(o) {
- return areaType(o.geometry);
- },
- Polygon: function(o) {
- return polygonArea(o.coordinates);
- },
- MultiPolygon: function(o) {
- var sum = 0, coordinates = o.coordinates, i = -1, n = coordinates.length;
- while (++i < n) sum += polygonArea(coordinates[i]);
- return sum;
- },
- GeometryCollection: function(o) {
- var sum = 0, geometries = o.geometries, i = -1, n = geometries.length;
- while (++i < n) sum += areaType(geometries[i]);
- return sum;
- }
- }, 0);
- var centroidType = path.centroid = d3_geo_type({
- Feature: function(o) {
- return centroidType(o.geometry);
- },
- Polygon: function(o) {
- var centroid = polygonCentroid(o.coordinates);
- return [ centroid[0] / centroid[2], centroid[1] / centroid[2] ];
- },
- MultiPolygon: function(o) {
- var area = 0, coordinates = o.coordinates, centroid, x = 0, y = 0, z = 0, i = -1, n = coordinates.length;
- while (++i < n) {
- centroid = polygonCentroid(coordinates[i]);
- x += centroid[0];
- y += centroid[1];
- z += centroid[2];
- }
- return [ x / z, y / z ];
- }
- });
- path.projection = function(x) {
- projection = x;
- return path;
- };
- path.pointRadius = function(x) {
- if (typeof x === "function") pointRadius = x; else {
- pointRadius = +x;
- pointCircle = d3_path_circle(pointRadius);
- }
- return path;
- };
- return path;
- };
- d3.geo.bounds = function(feature) {
- var left = Infinity, bottom = Infinity, right = -Infinity, top = -Infinity;
- d3_geo_bounds(feature, function(x, y) {
- if (x < left) left = x;
- if (x > right) right = x;
- if (y < bottom) bottom = y;
- if (y > top) top = y;
- });
- return [ [ left, bottom ], [ right, top ] ];
- };
- var d3_geo_boundsTypes = {
- Feature: d3_geo_boundsFeature,
- FeatureCollection: d3_geo_boundsFeatureCollection,
- GeometryCollection: d3_geo_boundsGeometryCollection,
- LineString: d3_geo_boundsLineString,
- MultiLineString: d3_geo_boundsMultiLineString,
- MultiPoint: d3_geo_boundsLineString,
- MultiPolygon: d3_geo_boundsMultiPolygon,
- Point: d3_geo_boundsPoint,
- Polygon: d3_geo_boundsPolygon
- };
- d3.geo.circle = function() {
- function circle() {}
- function visible(point) {
- return arc.distance(point) < radians;
- }
- function clip(coordinates) {
- var i = -1, n = coordinates.length, clipped = [], p0, p1, p2, d0, d1;
- while (++i < n) {
- d1 = arc.distance(p2 = coordinates[i]);
- if (d1 < radians) {
- if (p1) clipped.push(d3_geo_greatArcInterpolate(p1, p2)((d0 - radians) / (d0 - d1)));
- clipped.push(p2);
- p0 = p1 = null;
- } else {
- p1 = p2;
- if (!p0 && clipped.length) {
- clipped.push(d3_geo_greatArcInterpolate(clipped[clipped.length - 1], p1)((radians - d0) / (d1 - d0)));
- p0 = p1;
- }
- }
- d0 = d1;
- }
- p0 = coordinates[0];
- p1 = clipped[0];
- if (p1 && p2[0] === p0[0] && p2[1] === p0[1] && !(p2[0] === p1[0] && p2[1] === p1[1])) {
- clipped.push(p1);
- }
- return resample(clipped);
- }
- function resample(coordinates) {
- var i = 0, n = coordinates.length, j, m, resampled = n ? [ coordinates[0] ] : coordinates, resamples, origin = arc.source();
- while (++i < n) {
- resamples = arc.source(coordinates[i - 1])(coordinates[i]).coordinates;
- for (j = 0, m = resamples.length; ++j < m; ) resampled.push(resamples[j]);
- }
- arc.source(origin);
- return resampled;
- }
- var origin = [ 0, 0 ], degrees = 90 - .01, radians = degrees * d3_geo_radians, arc = d3.geo.greatArc().source(origin).target(d3_identity);
- circle.clip = function(d) {
- if (typeof origin === "function") arc.source(origin.apply(this, arguments));
- return clipType(d) || null;
- };
- var clipType = d3_geo_type({
- FeatureCollection: function(o) {
- var features = o.features.map(clipType).filter(d3_identity);
- return features && (o = Object.create(o), o.features = features, o);
- },
- Feature: function(o) {
- var geometry = clipType(o.geometry);
- return geometry && (o = Object.create(o), o.geometry = geometry, o);
- },
- Point: function(o) {
- return visible(o.coordinates) && o;
- },
- MultiPoint: function(o) {
- var coordinates = o.coordinates.filter(visible);
- return coordinates.length && {
- type: o.type,
- coordinates: coordinates
- };
- },
- LineString: function(o) {
- var coordinates = clip(o.coordinates);
- return coordinates.length && (o = Object.create(o), o.coordinates = coordinates, o);
- },
- MultiLineString: function(o) {
- var coordinates = o.coordinates.map(clip).filter(function(d) {
- return d.length;
- });
- return coordinates.length && (o = Object.create(o), o.coordinates = coordinates, o);
- },
- Polygon: function(o) {
- var coordinates = o.coordinates.map(clip);
- return coordinates[0].length && (o = Object.create(o), o.coordinates = coordinates, o);
- },
- MultiPolygon: function(o) {
- var coordinates = o.coordinates.map(function(d) {
- return d.map(clip);
- }).filter(function(d) {
- return d[0].length;
- });
- return coordinates.length && (o = Object.create(o), o.coordinates = coordinates, o);
- },
- GeometryCollection: function(o) {
- var geometries = o.geometries.map(clipType).filter(d3_identity);
- return geometries.length && (o = Object.create(o), o.geometries = geometries, o);
- }
- });
- circle.origin = function(x) {
- if (!arguments.length) return origin;
- origin = x;
- if (typeof origin !== "function") arc.source(origin);
- return circle;
- };
- circle.angle = function(x) {
- if (!arguments.length) return degrees;
- radians = (degrees = +x) * d3_geo_radians;
- return circle;
- };
- return d3.rebind(circle, arc, "precision");
- };
- d3.geo.greatArc = function() {
- function greatArc() {
- var d = greatArc.distance.apply(this, arguments), t = 0, dt = precision / d, coordinates = [ p0 ];
- while ((t += dt) < 1) coordinates.push(interpolate(t));
- coordinates.push(p1);
- return {
- type: "LineString",
- coordinates: coordinates
- };
- }
- var source = d3_geo_greatArcSource, p0, target = d3_geo_greatArcTarget, p1, precision = 6 * d3_geo_radians, interpolate = d3_geo_greatArcInterpolator();
- greatArc.distance = function() {
- if (typeof source === "function") interpolate.source(p0 = source.apply(this, arguments));
- if (typeof target === "function") interpolate.target(p1 = target.apply(this, arguments));
- return interpolate.distance();
- };
- greatArc.source = function(_) {
- if (!arguments.length) return source;
- source = _;
- if (typeof source !== "function") interpolate.source(p0 = source);
- return greatArc;
- };
- greatArc.target = function(_) {
- if (!arguments.length) return target;
- target = _;
- if (typeof target !== "function") interpolate.target(p1 = target);
- return greatArc;
- };
- greatArc.precision = function(_) {
- if (!arguments.length) return precision / d3_geo_radians;
- precision = _ * d3_geo_radians;
- return greatArc;
- };
- return greatArc;
- };
- d3.geo.greatCircle = d3.geo.circle;
- d3.geom = {};
- d3.geom.contour = function(grid, start) {
- var s = start || d3_geom_contourStart(grid), c = [], x = s[0], y = s[1], dx = 0, dy = 0, pdx = NaN, pdy = NaN, i = 0;
- do {
- i = 0;
- if (grid(x - 1, y - 1)) i += 1;
- if (grid(x, y - 1)) i += 2;
- if (grid(x - 1, y)) i += 4;
- if (grid(x, y)) i += 8;
- if (i === 6) {
- dx = pdy === -1 ? -1 : 1;
- dy = 0;
- } else if (i === 9) {
- dx = 0;
- dy = pdx === 1 ? -1 : 1;
- } else {
- dx = d3_geom_contourDx[i];
- dy = d3_geom_contourDy[i];
- }
- if (dx != pdx && dy != pdy) {
- c.push([ x, y ]);
- pdx = dx;
- pdy = dy;
- }
- x += dx;
- y += dy;
- } while (s[0] != x || s[1] != y);
- return c;
- };
- var d3_geom_contourDx = [ 1, 0, 1, 1, -1, 0, -1, 1, 0, 0, 0, 0, -1, 0, -1, NaN ], d3_geom_contourDy = [ 0, -1, 0, 0, 0, -1, 0, 0, 1, -1, 1, 1, 0, -1, 0, NaN ];
- d3.geom.hull = function(vertices) {
- if (vertices.length < 3) return [];
- var len = vertices.length, plen = len - 1, points = [], stack = [], i, j, h = 0, x1, y1, x2, y2, u, v, a, sp;
- for (i = 1; i < len; ++i) {
- if (vertices[i][1] < vertices[h][1]) {
- h = i;
- } else if (vertices[i][1] == vertices[h][1]) {
- h = vertices[i][0] < vertices[h][0] ? i : h;
- }
- }
- for (i = 0; i < len; ++i) {
- if (i === h) continue;
- y1 = vertices[i][1] - vertices[h][1];
- x1 = vertices[i][0] - vertices[h][0];
- points.push({
- angle: Math.atan2(y1, x1),
- index: i
- });
- }
- points.sort(function(a, b) {
- return a.angle - b.angle;
- });
- a = points[0].angle;
- v = points[0].index;
- u = 0;
- for (i = 1; i < plen; ++i) {
- j = points[i].index;
- if (a == points[i].angle) {
- x1 = vertices[v][0] - vertices[h][0];
- y1 = vertices[v][1] - vertices[h][1];
- x2 = vertices[j][0] - vertices[h][0];
- y2 = vertices[j][1] - vertices[h][1];
- if (x1 * x1 + y1 * y1 >= x2 * x2 + y2 * y2) {
- points[i].index = -1;
- } else {
- points[u].index = -1;
- a = points[i].angle;
- u = i;
- v = j;
- }
- } else {
- a = points[i].angle;
- u = i;
- v = j;
- }
- }
- stack.push(h);
- for (i = 0, j = 0; i < 2; ++j) {
- if (points[j].index !== -1) {
- stack.push(points[j].index);
- i++;
- }
- }
- sp = stack.length;
- for (; j < plen; ++j) {
- if (points[j].index === -1) continue;
- while (!d3_geom_hullCCW(stack[sp - 2], stack[sp - 1], points[j].index, vertices)) {
- --sp;
- }
- stack[sp++] = points[j].index;
- }
- var poly = [];
- for (i = 0; i < sp; ++i) {
- poly.push(vertices[stack[i]]);
- }
- return poly;
- };
- d3.geom.polygon = function(coordinates) {
- coordinates.area = function() {
- var i = 0, n = coordinates.length, a = coordinates[n - 1][0] * coordinates[0][1], b = coordinates[n - 1][1] * coordinates[0][0];
- while (++i < n) {
- a += coordinates[i - 1][0] * coordinates[i][1];
- b += coordinates[i - 1][1] * coordinates[i][0];
- }
- return (b - a) * .5;
- };
- coordinates.centroid = function(k) {
- var i = -1, n = coordinates.length, x = 0, y = 0, a, b = coordinates[n - 1], c;
- if (!arguments.length) k = -1 / (6 * coordinates.area());
- while (++i < n) {
- a = b;
- b = coordinates[i];
- c = a[0] * b[1] - b[0] * a[1];
- x += (a[0] + b[0]) * c;
- y += (a[1] + b[1]) * c;
- }
- return [ x * k, y * k ];
- };
- coordinates.clip = function(subject) {
- var input, i = -1, n = coordinates.length, j, m, a = coordinates[n - 1], b, c, d;
- while (++i < n) {
- input = subject.slice();
- subject.length = 0;
- b = coordinates[i];
- c = input[(m = input.length) - 1];
- j = -1;
- while (++j < m) {
- d = input[j];
- if (d3_geom_polygonInside(d, a, b)) {
- if (!d3_geom_polygonInside(c, a, b)) {
- subject.push(d3_geom_polygonIntersect(c, d, a, b));
- }
- subject.push(d);
- } else if (d3_geom_polygonInside(c, a, b)) {
- subject.push(d3_geom_polygonIntersect(c, d, a, b));
- }
- c = d;
- }
- a = b;
- }
- return subject;
- };
- return coordinates;
- };
- d3.geom.voronoi = function(vertices) {
- var polygons = vertices.map(function() {
- return [];
- });
- d3_voronoi_tessellate(vertices, function(e) {
- var s1, s2, x1, x2, y1, y2;
- if (e.a === 1 && e.b >= 0) {
- s1 = e.ep.r;
- s2 = e.ep.l;
- } else {
- s1 = e.ep.l;
- s2 = e.ep.r;
- }
- if (e.a === 1) {
- y1 = s1 ? s1.y : -1e6;
- x1 = e.c - e.b * y1;
- y2 = s2 ? s2.y : 1e6;
- x2 = e.c - e.b * y2;
- } else {
- x1 = s1 ? s1.x : -1e6;
- y1 = e.c - e.a * x1;
- x2 = s2 ? s2.x : 1e6;
- y2 = e.c - e.a * x2;
- }
- var v1 = [ x1, y1 ], v2 = [ x2, y2 ];
- polygons[e.region.l.index].push(v1, v2);
- polygons[e.region.r.index].push(v1, v2);
- });
- return polygons.map(function(polygon, i) {
- var cx = vertices[i][0], cy = vertices[i][1];
- polygon.forEach(function(v) {
- v.angle = Math.atan2(v[0] - cx, v[1] - cy);
- });
- return polygon.sort(function(a, b) {
- return a.angle - b.angle;
- }).filter(function(d, i) {
- return !i || d.angle - polygon[i - 1].angle > 1e-10;
- });
- });
- };
- var d3_voronoi_opposite = {
- l: "r",
- r: "l"
- };
- d3.geom.delaunay = function(vertices) {
- var edges = vertices.map(function() {
- return [];
- }), triangles = [];
- d3_voronoi_tessellate(vertices, function(e) {
- edges[e.region.l.index].push(vertices[e.region.r.index]);
- });
- edges.forEach(function(edge, i) {
- var v = vertices[i], cx = v[0], cy = v[1];
- edge.forEach(function(v) {
- v.angle = Math.atan2(v[0] - cx, v[1] - cy);
- });
- edge.sort(function(a, b) {
- return a.angle - b.angle;
- });
- for (var j = 0, m = edge.length - 1; j < m; j++) {
- triangles.push([ v, edge[j], edge[j + 1] ]);
- }
- });
- return triangles;
- };
- d3.geom.quadtree = function(points, x1, y1, x2, y2) {
- function insert(n, p, x1, y1, x2, y2) {
- if (isNaN(p.x) || isNaN(p.y)) return;
- if (n.leaf) {
- var v = n.point;
- if (v) {
- if (Math.abs(v.x - p.x) + Math.abs(v.y - p.y) < .01) {
- insertChild(n, p, x1, y1, x2, y2);
- } else {
- n.point = null;
- insertChild(n, v, x1, y1, x2, y2);
- insertChild(n, p, x1, y1, x2, y2);
- }
- } else {
- n.point = p;
- }
- } else {
- insertChild(n, p, x1, y1, x2, y2);
- }
- }
- function insertChild(n, p, x1, y1, x2, y2) {
- var sx = (x1 + x2) * .5, sy = (y1 + y2) * .5, right = p.x >= sx, bottom = p.y >= sy, i = (bottom << 1) + right;
- n.leaf = false;
- n = n.nodes[i] || (n.nodes[i] = d3_geom_quadtreeNode());
- if (right) x1 = sx; else x2 = sx;
- if (bottom) y1 = sy; else y2 = sy;
- insert(n, p, x1, y1, x2, y2);
- }
- var p, i = -1, n = points.length;
- if (n && isNaN(points[0].x)) points = points.map(d3_geom_quadtreePoint);
- if (arguments.length < 5) {
- if (arguments.length === 3) {
- y2 = x2 = y1;
- y1 = x1;
- } else {
- x1 = y1 = Infinity;
- x2 = y2 = -Infinity;
- while (++i < n) {
- p = points[i];
- if (p.x < x1) x1 = p.x;
- if (p.y < y1) y1 = p.y;
- if (p.x > x2) x2 = p.x;
- if (p.y > y2) y2 = p.y;
- }
- var dx = x2 - x1, dy = y2 - y1;
- if (dx > dy) y2 = y1 + dx; else x2 = x1 + dy;
- }
- }
- var root = d3_geom_quadtreeNode();
- root.add = function(p) {
- insert(root, p, x1, y1, x2, y2);
- };
- root.visit = function(f) {
- d3_geom_quadtreeVisit(f, root, x1, y1, x2, y2);
- };
- points.forEach(root.add);
- return root;
- };
- d3.time = {};
- var d3_time = Date, d3_time_daySymbols = [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ];
- d3_time_utc.prototype = {
- getDate: function() {
- return this._.getUTCDate();
- },
- getDay: function() {
- return this._.getUTCDay();
- },
- getFullYear: function() {
- return this._.getUTCFullYear();
- },
- getHours: function() {
- return this._.getUTCHours();
- },
- getMilliseconds: function() {
- return this._.getUTCMilliseconds();
- },
- getMinutes: function() {
- return this._.getUTCMinutes();
- },
- getMonth: function() {
- return this._.getUTCMonth();
- },
- getSeconds: function() {
- return this._.getUTCSeconds();
- },
- getTime: function() {
- return this._.getTime();
- },
- getTimezoneOffset: function() {
- return 0;
- },
- valueOf: function() {
- return this._.valueOf();
- },
- setDate: function() {
- d3_time_prototype.setUTCDate.apply(this._, arguments);
- },
- setDay: function() {
- d3_time_prototype.setUTCDay.apply(this._, arguments);
- },
- setFullYear: function() {
- d3_time_prototype.setUTCFullYear.apply(this._, arguments);
- },
- setHours: function() {
- d3_time_prototype.setUTCHours.apply(this._, arguments);
- },
- setMilliseconds: function() {
- d3_time_prototype.setUTCMilliseconds.apply(this._, arguments);
- },
- setMinutes: function() {
- d3_time_prototype.setUTCMinutes.apply(this._, arguments);
- },
- setMonth: function() {
- d3_time_prototype.setUTCMonth.apply(this._, arguments);
- },
- setSeconds: function() {
- d3_time_prototype.setUTCSeconds.apply(this._, arguments);
- },
- setTime: function() {
- d3_time_prototype.setTime.apply(this._, arguments);
- }
- };
- var d3_time_prototype = Date.prototype;
- var d3_time_formatDateTime = "%a %b %e %H:%M:%S %Y", d3_time_formatDate = "%m/%d/%y", d3_time_formatTime = "%H:%M:%S";
- var d3_time_days = d3_time_daySymbols, d3_time_dayAbbreviations = d3_time_days.map(d3_time_formatAbbreviate), d3_time_months = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ], d3_time_monthAbbreviations = d3_time_months.map(d3_time_formatAbbreviate);
- d3.time.format = function(template) {
- function format(date) {
- var string = [], i = -1, j = 0, c, f;
- while (++i < n) {
- if (template.charCodeAt(i) == 37) {
- string.push(template.substring(j, i), (f = d3_time_formats[c = template.charAt(++i)]) ? f(date) : c);
- j = i + 1;
- }
- }
- string.push(template.substring(j, i));
- return string.join("");
- }
- var n = template.length;
- format.parse = function(string) {
- var d = {
- y: 1900,
- m: 0,
- d: 1,
- H: 0,
- M: 0,
- S: 0,
- L: 0
- }, i = d3_time_parse(d, template, string, 0);
- if (i != string.length) return null;
- if ("p" in d) d.H = d.H % 12 + d.p * 12;
- var date = new d3_time;
- date.setFullYear(d.y, d.m, d.d);
- date.setHours(d.H, d.M, d.S, d.L);
- return date;
- };
- format.toString = function() {
- return template;
- };
- return format;
- };
- var d3_time_zfill2 = d3.format("02d"), d3_time_zfill3 = d3.format("03d"), d3_time_zfill4 = d3.format("04d"), d3_time_sfill2 = d3.format("2d");
- var d3_time_dayRe = d3_time_formatRe(d3_time_days), d3_time_dayAbbrevRe = d3_time_formatRe(d3_time_dayAbbreviations), d3_time_monthRe = d3_time_formatRe(d3_time_months), d3_time_monthLookup = d3_time_formatLookup(d3_time_months), d3_time_monthAbbrevRe = d3_time_formatRe(d3_time_monthAbbreviations), d3_time_monthAbbrevLookup = d3_time_formatLookup(d3_time_monthAbbreviations);
- var d3_time_formats = {
- a: function(d) {
- return d3_time_dayAbbreviations[d.getDay()];
- },
- A: function(d) {
- return d3_time_days[d.getDay()];
- },
- b: function(d) {
- return d3_time_monthAbbreviations[d.getMonth()];
- },
- B: function(d) {
- return d3_time_months[d.getMonth()];
- },
- c: d3.time.format(d3_time_formatDateTime),
- d: function(d) {
- return d3_time_zfill2(d.getDate());
- },
- e: function(d) {
- return d3_time_sfill2(d.getDate());
- },
- H: function(d) {
- return d3_time_zfill2(d.getHours());
- },
- I: function(d) {
- return d3_time_zfill2(d.getHours() % 12 || 12);
- },
- j: function(d) {
- return d3_time_zfill3(1 + d3.time.dayOfYear(d));
- },
- L: function(d) {
- return d3_time_zfill3(d.getMilliseconds());
- },
- m: function(d) {
- return d3_time_zfill2(d.getMonth() + 1);
- },
- M: function(d) {
- return d3_time_zfill2(d.getMinutes());
- },
- p: function(d) {
- return d.getHours() >= 12 ? "PM" : "AM";
- },
- S: function(d) {
- return d3_time_zfill2(d.getSeconds());
- },
- U: function(d) {
- return d3_time_zfill2(d3.time.sundayOfYear(d));
- },
- w: function(d) {
- return d.getDay();
- },
- W: function(d) {
- return d3_time_zfill2(d3.time.mondayOfYear(d));
- },
- x: d3.time.format(d3_time_formatDate),
- X: d3.time.format(d3_time_formatTime),
- y: function(d) {
- return d3_time_zfill2(d.getFullYear() % 100);
- },
- Y: function(d) {
- return d3_time_zfill4(d.getFullYear() % 1e4);
- },
- Z: d3_time_zone,
- "%": function(d) {
- return "%";
- }
- };
- var d3_time_parsers = {
- a: d3_time_parseWeekdayAbbrev,
- A: d3_time_parseWeekday,
- b: d3_time_parseMonthAbbrev,
- B: d3_time_parseMonth,
- c: d3_time_parseLocaleFull,
- d: d3_time_parseDay,
- e: d3_time_parseDay,
- H: d3_time_parseHour24,
- I: d3_time_parseHour24,
- L: d3_time_parseMilliseconds,
- m: d3_time_parseMonthNumber,
- M: d3_time_parseMinutes,
- p: d3_time_parseAmPm,
- S: d3_time_parseSeconds,
- x: d3_time_parseLocaleDate,
- X: d3_time_parseLocaleTime,
- y: d3_time_parseYear,
- Y: d3_time_parseFullYear
- };
- var d3_time_numberRe = /^\s*\d+/;
- var d3_time_amPmLookup = d3.map({
- am: 0,
- pm: 1
- });
- d3.time.format.utc = function(template) {
- function format(date) {
- try {
- d3_time = d3_time_utc;
- var utc = new d3_time;
- utc._ = date;
- return local(utc);
- } finally {
- d3_time = Date;
- }
- }
- var local = d3.time.format(template);
- format.parse = function(string) {
- try {
- d3_time = d3_time_utc;
- var date = local.parse(string);
- return date && date._;
- } finally {
- d3_time = Date;
- }
- };
- format.toString = local.toString;
- return format;
- };
- var d3_time_formatIso = d3.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ");
- d3.time.format.iso = Date.prototype.toISOString ? d3_time_formatIsoNative : d3_time_formatIso;
- d3_time_formatIsoNative.parse = function(string) {
- var date = new Date(string);
- return isNaN(date) ? null : date;
- };
- d3_time_formatIsoNative.toString = d3_time_formatIso.toString;
- d3.time.second = d3_time_interval(function(date) {
- return new d3_time(Math.floor(date / 1e3) * 1e3);
- }, function(date, offset) {
- date.setTime(date.getTime() + Math.floor(offset) * 1e3);
- }, function(date) {
- return date.getSeconds();
- });
- d3.time.seconds = d3.time.second.range;
- d3.time.seconds.utc = d3.time.second.utc.range;
- d3.time.minute = d3_time_interval(function(date) {
- return new d3_time(Math.floor(date / 6e4) * 6e4);
- }, function(date, offset) {
- date.setTime(date.getTime() + Math.floor(offset) * 6e4);
- }, function(date) {
- return date.getMinutes();
- });
- d3.time.minutes = d3.time.minute.range;
- d3.time.minutes.utc = d3.time.minute.utc.range;
- d3.time.hour = d3_time_interval(function(date) {
- var timezone = date.getTimezoneOffset() / 60;
- return new d3_time((Math.floor(date / 36e5 - timezone) + timezone) * 36e5);
- }, function(date, offset) {
- date.setTime(date.getTime() + Math.floor(offset) * 36e5);
- }, function(date) {
- return date.getHours();
- });
- d3.time.hours = d3.time.hour.range;
- d3.time.hours.utc = d3.time.hour.utc.range;
- d3.time.day = d3_time_interval(function(date) {
- var day = new d3_time(1970, 0);
- day.setFullYear(date.getFullYear(), date.getMonth(), date.getDate());
- return day;
- }, function(date, offset) {
- date.setDate(date.getDate() + offset);
- }, function(date) {
- return date.getDate() - 1;
- });
- d3.time.days = d3.time.day.range;
- d3.time.days.utc = d3.time.day.utc.range;
- d3.time.dayOfYear = function(date) {
- var year = d3.time.year(date);
- return Math.floor((date - year - (date.getTimezoneOffset() - year.getTimezoneOffset()) * 6e4) / 864e5);
- };
- d3_time_daySymbols.forEach(function(day, i) {
- day = day.toLowerCase();
- i = 7 - i;
- var interval = d3.time[day] = d3_time_interval(function(date) {
- (date = d3.time.day(date)).setDate(date.getDate() - (date.getDay() + i) % 7);
- return date;
- }, function(date, offset) {
- date.setDate(date.getDate() + Math.floor(offset) * 7);
- }, function(date) {
- var day = d3.time.year(date).getDay();
- return Math.floor((d3.time.dayOfYear(date) + (day + i) % 7) / 7) - (day !== i);
- });
- d3.time[day + "s"] = interval.range;
- d3.time[day + "s"].utc = interval.utc.range;
- d3.time[day + "OfYear"] = function(date) {
- var day = d3.time.year(date).getDay();
- return Math.floor((d3.time.dayOfYear(date) + (day + i) % 7) / 7);
- };
- });
- d3.time.week = d3.time.sunday;
- d3.time.weeks = d3.time.sunday.range;
- d3.time.weeks.utc = d3.time.sunday.utc.range;
- d3.time.weekOfYear = d3.time.sundayOfYear;
- d3.time.month = d3_time_interval(function(date) {
- date = d3.time.day(date);
- date.setDate(1);
- return date;
- }, function(date, offset) {
- date.setMonth(date.getMonth() + offset);
- }, function(date) {
- return date.getMonth();
- });
- d3.time.months = d3.time.month.range;
- d3.time.months.utc = d3.time.month.utc.range;
- d3.time.year = d3_time_interval(function(date) {
- date = d3.time.day(date);
- date.setMonth(0, 1);
- return date;
- }, function(date, offset) {
- date.setFullYear(date.getFullYear() + offset);
- }, function(date) {
- return date.getFullYear();
- });
- d3.time.years = d3.time.year.range;
- d3.time.years.utc = d3.time.year.utc.range;
- var d3_time_scaleSteps = [ 1e3, 5e3, 15e3, 3e4, 6e4, 3e5, 9e5, 18e5, 36e5, 108e5, 216e5, 432e5, 864e5, 1728e5, 6048e5, 2592e6, 7776e6, 31536e6 ];
- var d3_time_scaleLocalMethods = [ [ d3.time.second, 1 ], [ d3.time.second, 5 ], [ d3.time.second, 15 ], [ d3.time.second, 30 ], [ d3.time.minute, 1 ], [ d3.time.minute, 5 ], [ d3.time.minute, 15 ], [ d3.time.minute, 30 ], [ d3.time.hour, 1 ], [ d3.time.hour, 3 ], [ d3.time.hour, 6 ], [ d3.time.hour, 12 ], [ d3.time.day, 1 ], [ d3.time.day, 2 ], [ d3.time.week, 1 ], [ d3.time.month, 1 ], [ d3.time.month, 3 ], [ d3.time.year, 1 ] ];
- var d3_time_scaleLocalFormats = [ [ d3.time.format("%Y"), function(d) {
- return true;
- } ], [ d3.time.format("%B"), function(d) {
- return d.getMonth();
- } ], [ d3.time.format("%b %d"), function(d) {
- return d.getDate() != 1;
- } ], [ d3.time.format("%a %d"), function(d) {
- return d.getDay() && d.getDate() != 1;
- } ], [ d3.time.format("%I %p"), function(d) {
- return d.getHours();
- } ], [ d3.time.format("%I:%M"), function(d) {
- return d.getMinutes();
- } ], [ d3.time.format(":%S"), function(d) {
- return d.getSeconds();
- } ], [ d3.time.format(".%L"), function(d) {
- return d.getMilliseconds();
- } ] ];
- var d3_time_scaleLinear = d3.scale.linear(), d3_time_scaleLocalFormat = d3_time_scaleFormat(d3_time_scaleLocalFormats);
- d3_time_scaleLocalMethods.year = function(extent, m) {
- return d3_time_scaleLinear.domain(extent.map(d3_time_scaleGetYear)).ticks(m).map(d3_time_scaleSetYear);
- };
- d3.time.scale = function() {
- return d3_time_scale(d3.scale.linear(), d3_time_scaleLocalMethods, d3_time_scaleLocalFormat);
- };
- var d3_time_scaleUTCMethods = d3_time_scaleLocalMethods.map(function(m) {
- return [ m[0].utc, m[1] ];
- });
- var d3_time_scaleUTCFormats = [ [ d3.time.format.utc("%Y"), function(d) {
- return true;
- } ], [ d3.time.format.utc("%B"), function(d) {
- return d.getUTCMonth();
- } ], [ d3.time.format.utc("%b %d"), function(d) {
- return d.getUTCDate() != 1;
- } ], [ d3.time.format.utc("%a %d"), function(d) {
- return d.getUTCDay() && d.getUTCDate() != 1;
- } ], [ d3.time.format.utc("%I %p"), function(d) {
- return d.getUTCHours();
- } ], [ d3.time.format.utc("%I:%M"), function(d) {
- return d.getUTCMinutes();
- } ], [ d3.time.format.utc(":%S"), function(d) {
- return d.getUTCSeconds();
- } ], [ d3.time.format.utc(".%L"), function(d) {
- return d.getUTCMilliseconds();
- } ] ];
- var d3_time_scaleUTCFormat = d3_time_scaleFormat(d3_time_scaleUTCFormats);
- d3_time_scaleUTCMethods.year = function(extent, m) {
- return d3_time_scaleLinear.domain(extent.map(d3_time_scaleUTCGetYear)).ticks(m).map(d3_time_scaleUTCSetYear);
- };
- d3.time.scale.utc = function() {
- return d3_time_scale(d3.scale.linear(), d3_time_scaleUTCMethods, d3_time_scaleUTCFormat);
- };
-})(); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/d3.v2.min.js b/ecomp-portal-BE/war/static/fusion/d3/js/d3.v2.min.js
deleted file mode 100644
index cc47f1ea..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/d3.v2.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-(function(){function e(e,t){try{for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}catch(r){e.prototype=t}}function t(e){var t=-1,n=e.length,r=[];while(++t<n)r.push(e[t]);return r}function n(e){return Array.prototype.slice.call(e)}function r(){}function i(e){return e}function s(){return this}function o(){return!0}function u(e){return typeof e=="function"?e:function(){return e}}function a(e,t,n){return function(){var r=n.apply(t,arguments);return arguments.length?e:r}}function f(e){return e!=null&&!isNaN(e)}function l(e){return e.length}function c(e){return e==null}function h(e){return e.trim().replace(/\s+/g," ")}function p(e){var t=1;while(e*t%1)t*=10;return t}function d(){}function v(e){function t(){var t=n,r=-1,i=t.length,s;while(++r<i)(s=t[r].on)&&s.apply(this,arguments);return e}var n=[],i=new r;return t.on=function(t,r){var s=i.get(t),o;return arguments.length<2?s&&s.on:(s&&(s.on=null,n=n.slice(0,o=n.indexOf(s)).concat(n.slice(o+1)),i.remove(t)),r&&n.push(i.set(t,{on:r})),e)},t}function m(e,t){return t-(e?1+Math.floor(Math.log(e+Math.pow(10,1+Math.floor(Math.log(e)/Math.LN10)-t))/Math.LN10):1)}function g(e){return e+""}function y(e){var t=e.lastIndexOf("."),n=t>=0?e.substring(t):(t=e.length,""),r=[];while(t>0)r.push(e.substring(t-=3,t+3));return r.reverse().join(",")+n}function b(e,t){var n=Math.pow(10,Math.abs(8-t)*3);return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}function w(e){return function(t){return t<=0?0:t>=1?1:e(t)}}function E(e){return function(t){return 1-e(1-t)}}function S(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function x(e){return e}function T(e){return function(t){return Math.pow(t,e)}}function N(e){return 1-Math.cos(e*Math.PI/2)}function C(e){return Math.pow(2,10*(e-1))}function k(e){return 1-Math.sqrt(1-e*e)}function L(e,t){var n;return arguments.length<2&&(t=.45),arguments.length<1?(e=1,n=t/4):n=t/(2*Math.PI)*Math.asin(1/e),function(r){return 1+e*Math.pow(2,10*-r)*Math.sin((r-n)*2*Math.PI/t)}}function A(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}}function O(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function M(){d3.event.stopPropagation(),d3.event.preventDefault()}function _(){var e=d3.event,t;while(t=e.sourceEvent)e=t;return e}function D(e){var t=new d,n=0,r=arguments.length;while(++n<r)t[arguments[n]]=v(t);return t.of=function(n,r){return function(i){try{var s=i.sourceEvent=d3.event;i.target=e,d3.event=i,t[i.type].apply(n,r)}finally{d3.event=s}}},t}function P(e){var t=[e.a,e.b],n=[e.c,e.d],r=B(t),i=H(t,n),s=B(j(n,t,-i))||0;t[0]*n[1]<n[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,i*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-n[0],n[1]))*fs,this.translate=[e.e,e.f],this.scale=[r,s],this.skew=s?Math.atan2(i,s)*fs:0}function H(e,t){return e[0]*t[0]+e[1]*t[1]}function B(e){var t=Math.sqrt(H(e,e));return t&&(e[0]/=t,e[1]/=t),t}function j(e,t,n){return e[0]+=n*t[0],e[1]+=n*t[1],e}function F(e){return e=="transform"?d3.interpolateTransform:d3.interpolate}function I(e,t){return t=t-(e=+e)?1/(t-e):0,function(n){return(n-e)*t}}function q(e,t){return t=t-(e=+e)?1/(t-e):0,function(n){return Math.max(0,Math.min(1,(n-e)*t))}}function R(e,t,n){return new U(e,t,n)}function U(e,t,n){this.r=e,this.g=t,this.b=n}function z(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function W(e,t,n){var r=0,i=0,s=0,o,u,a;o=/([a-z]+)\((.*)\)/i.exec(e);if(o){u=o[2].split(",");switch(o[1]){case"hsl":return n(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(J(u[0]),J(u[1]),J(u[2]))}}return(a=hs.get(e))?t(a.r,a.g,a.b):(e!=null&&e.charAt(0)==="#"&&(e.length===4?(r=e.charAt(1),r+=r,i=e.charAt(2),i+=i,s=e.charAt(3),s+=s):e.length===7&&(r=e.substring(1,3),i=e.substring(3,5),s=e.substring(5,7)),r=parseInt(r,16),i=parseInt(i,16),s=parseInt(s,16)),t(r,i,s))}function X(e,t,n){var r=Math.min(e/=255,t/=255,n/=255),i=Math.max(e,t,n),s=i-r,o,u,a=(i+r)/2;return s?(u=a<.5?s/(i+r):s/(2-i-r),e==i?o=(t-n)/s+(t<n?6:0):t==i?o=(n-e)/s+2:o=(e-t)/s+4,o*=60):u=o=0,K(o,u,a)}function V(e,t,n){e=$(e),t=$(t),n=$(n);var r=ot((.4124564*e+.3575761*t+.1804375*n)/ds),i=ot((.2126729*e+.7151522*t+.072175*n)/vs),s=ot((.0193339*e+.119192*t+.9503041*n)/ms);return tt(116*i-16,500*(r-i),200*(i-s))}function $(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function J(e){var t=parseFloat(e);return e.charAt(e.length-1)==="%"?Math.round(t*2.55):t}function K(e,t,n){return new Q(e,t,n)}function Q(e,t,n){this.h=e,this.s=t,this.l=n}function G(e,t,n){function r(e){return e>360?e-=360:e<0&&(e+=360),e<60?s+(o-s)*e/60:e<180?o:e<240?s+(o-s)*(240-e)/60:s}function i(e){return Math.round(r(e)*255)}var s,o;return e%=360,e<0&&(e+=360),t=t<0?0:t>1?1:t,n=n<0?0:n>1?1:n,o=n<=.5?n*(1+t):n+t-n*t,s=2*n-o,R(i(e+120),i(e),i(e-120))}function Y(e,t,n){return new Z(e,t,n)}function Z(e,t,n){this.h=e,this.c=t,this.l=n}function et(e,t,n){return tt(n,Math.cos(e*=Math.PI/180)*t,Math.sin(e)*t)}function tt(e,t,n){return new nt(e,t,n)}function nt(e,t,n){this.l=e,this.a=t,this.b=n}function rt(e,t,n){var r=(e+16)/116,i=r+t/500,s=r-n/200;return i=st(i)*ds,r=st(r)*vs,s=st(s)*ms,R(ut(3.2404542*i-1.5371385*r-.4985314*s),ut(-0.969266*i+1.8760108*r+.041556*s),ut(.0556434*i-.2040259*r+1.0572252*s))}function it(e,t,n){return Y(Math.atan2(n,t)/Math.PI*180,Math.sqrt(t*t+n*n),e)}function st(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function ot(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function ut(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function at(e){return Ki(e,Ss),e}function ft(e){return function(){return gs(e,this)}}function lt(e){return function(){return ys(e,this)}}function ct(e,t){function n(){this.removeAttribute(e)}function r(){this.removeAttributeNS(e.space,e.local)}function i(){this.setAttribute(e,t)}function s(){this.setAttributeNS(e.space,e.local,t)}function o(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}function u(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}return e=d3.ns.qualify(e),t==null?e.local?r:n:typeof t=="function"?e.local?u:o:e.local?s:i}function ht(e){return new RegExp("(?:^|\\s+)"+d3.requote(e)+"(?:\\s+|$)","g")}function pt(e,t){function n(){var n=-1;while(++n<i)e[n](this,t)}function r(){var n=-1,r=t.apply(this,arguments);while(++n<i)e[n](this,r)}e=e.trim().split(/\s+/).map(dt);var i=e.length;return typeof t=="function"?r:n}function dt(e){var t=ht(e);return function(n,r){if(i=n.classList)return r?i.add(e):i.remove(e);var i=n.className,s=i.baseVal!=null,o=s?i.baseVal:i;r?(t.lastIndex=0,t.test(o)||(o=h(o+" "+e),s?i.baseVal=o:n.className=o)):o&&(o=h(o.replace(t," ")),s?i.baseVal=o:n.className=o)}}function vt(e,t,n){function r(){this.style.removeProperty(e)}function i(){this.style.setProperty(e,t,n)}function s(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}return t==null?r:typeof t=="function"?s:i}function mt(e,t){function n(){delete this[e]}function r(){this[e]=t}function i(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}return t==null?n:typeof t=="function"?i:r}function gt(e){return{__data__:e}}function yt(e){return function(){return Es(this,e)}}function bt(e){return arguments.length||(e=d3.ascending),function(t,n){return e(t&&t.__data__,n&&n.__data__)}}function wt(e,t,n){function r(){var t=this[s];t&&(this.removeEventListener(e,t,t.$),delete this[s])}function i(){function i(e){var n=d3.event;d3.event=e,u[0]=o.__data__;try{t.apply(o,u)}finally{d3.event=n}}var o=this,u=arguments;r.call(this),this.addEventListener(e,this[s]=i,i.$=n),i._=t}var s="__on"+e,o=e.indexOf(".");return o>0&&(e=e.substring(0,o)),t?i:r}function Et(e,t){for(var n=0,r=e.length;n<r;n++)for(var i=e[n],s=0,o=i.length,u;s<o;s++)(u=i[s])&&t(u,s,n);return e}function St(e){return Ki(e,Ts),e}function xt(e,t,n){Ki(e,Ns);var i=new r,s=d3.dispatch("start","end"),o=Ds;return e.id=t,e.time=n,e.tween=function(t,n){return arguments.length<2?i.get(t):(n==null?i.remove(t):i.set(t,n),e)},e.ease=function(t){return arguments.length?(o=typeof t=="function"?t:d3.ease.apply(d3,arguments),e):o},e.each=function(t,n){return arguments.length<2?Tt.call(e,t):(s.on(t,n),e)},d3.timer(function(r){return Et(e,function(e,u,a){function f(r){return v.active>t?c():(v.active=t,i.forEach(function(t,n){(n=n.call(e,m,u))&&h.push(n)}),s.start.call(e,m,u),l(r)||d3.timer(l,0,n),1)}function l(n){if(v.active!==t)return c();var r=(n-p)/d,i=o(r),a=h.length;while(a>0)h[--a].call(e,i);if(r>=1)return c(),ks=t,s.end.call(e,m,u),ks=0,1}function c(){return--v.count||delete e.__transition__,1}var h=[],p=e.delay,d=e.duration,v=(e=e.node).__transition__||(e.__transition__={active:0,count:0}),m=e.__data__;++v.count,p<=r?f(r):d3.timer(f,p,n)})},0,n),e}function Tt(e){var t=ks,n=Ds,r=Ms,i=_s;return ks=this.id,Ds=this.ease(),Et(this,function(t,n,r){Ms=t.delay,_s=t.duration,e.call(t=t.node,t.__data__,n,r)}),ks=t,Ds=n,Ms=r,_s=i,this}function Nt(e,t,n){return n!=""&&Ps}function Ct(e,t){return d3.tween(e,F(t))}function kt(){var e,t=Date.now(),n=Hs;while(n)e=t-n.then,e>=n.delay&&(n.flush=n.callback(e)),n=n.next;var r=Lt()-t;r>24?(isFinite(r)&&(clearTimeout(js),js=setTimeout(kt,r)),Bs=0):(Bs=1,Fs(kt))}function Lt(){var e=null,t=Hs,n=Infinity;while(t)t.flush?t=e?e.next=t.next:Hs=t.next:(n=Math.min(n,t.then+t.delay),t=(e=t).next);return n}function At(e,t){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();if(Is<0&&(window.scrollX||window.scrollY)){n=d3.select(document.body).append("svg").style("position","absolute").style("top",0).style("left",0);var i=n[0][0].getScreenCTM();Is=!i.f&&!i.e,n.remove()}return Is?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}var s=e.getBoundingClientRect();return[t.clientX-s.left-e.clientLeft,t.clientY-s.top-e.clientTop]}function Ot(){}function Mt(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function _t(e){return e.rangeExtent?e.rangeExtent():Mt(e.range())}function Dt(e,t){var n=0,r=e.length-1,i=e[n],s=e[r],o;s<i&&(o=n,n=r,r=o,o=i,i=s,s=o);if(t=t(s-i))e[n]=t.floor(i),e[r]=t.ceil(s);return e}function Pt(){return Math}function Ht(e,t,n,r){function i(){var i=Math.min(e.length,t.length)>2?Ut:Rt,a=r?q:I;return o=i(e,t,a,n),u=i(t,e,a,d3.interpolate),s}function s(e){return o(e)}var o,u;return s.invert=function(e){return u(e)},s.domain=function(t){return arguments.length?(e=t.map(Number),i()):e},s.range=function(e){return arguments.length?(t=e,i()):t},s.rangeRound=function(e){return s.range(e).interpolate(d3.interpolateRound)},s.clamp=function(e){return arguments.length?(r=e,i()):r},s.interpolate=function(e){return arguments.length?(n=e,i()):n},s.ticks=function(t){return It(e,t)},s.tickFormat=function(t){return qt(e,t)},s.nice=function(){return Dt(e,jt),i()},s.copy=function(){return Ht(e,t,n,r)},i()}function Bt(e,t){return d3.rebind(e,t,"range","rangeRound","interpolate","clamp")}function jt(e){return e=Math.pow(10,Math.round(Math.log(e)/Math.LN10)-1),e&&{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}}function Ft(e,t){var n=Mt(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),s=t/r*i;return s<=.15?i*=10:s<=.35?i*=5:s<=.75&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+i*.5,n[2]=i,n}function It(e,t){return d3.range.apply(d3,Ft(e,t))}function qt(e,t){return d3.format(",."+Math.max(0,-Math.floor(Math.log(Ft(e,t)[2])/Math.LN10+.01))+"f")}function Rt(e,t,n,r){var i=n(e[0],e[1]),s=r(t[0],t[1]);return function(e){return s(i(e))}}function Ut(e,t,n,r){var i=[],s=[],o=0,u=Math.min(e.length,t.length)-1;e[u]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());while(++o<=u)i.push(n(e[o-1],e[o])),s.push(r(t[o-1],t[o]));return function(t){var n=d3.bisect(e,t,1,u)-1;return s[n](i[n](t))}}function zt(e,t){function n(n){return e(t(n))}var r=t.pow;return n.invert=function(t){return r(e.invert(t))},n.domain=function(i){return arguments.length?(t=i[0]<0?Xt:Wt,r=t.pow,e.domain(i.map(t)),n):e.domain().map(r)},n.nice=function(){return e.domain(Dt(e.domain(),Pt)),n},n.ticks=function(){var n=Mt(e.domain()),i=[];if(n.every(isFinite)){var s=Math.floor(n[0]),o=Math.ceil(n[1]),u=r(n[0]),a=r(n[1]);if(t===Xt){i.push(r(s));for(;s++<o;)for(var f=9;f>0;f--)i.push(r(s)*f)}else{for(;s<o;s++)for(var f=1;f<10;f++)i.push(r(s)*f);i.push(r(s))}for(s=0;i[s]<u;s++);for(o=i.length;i[o-1]>a;o--);i=i.slice(s,o)}return i},n.tickFormat=function(e,i){arguments.length<2&&(i=qs);if(arguments.length<1)return i;var s=Math.max(.1,e/n.ticks().length),o=t===Xt?(u=-1e-12,Math.floor):(u=1e-12,Math.ceil),u;return function(e){return e/r(o(t(e)+u))<=s?i(e):""}},n.copy=function(){return zt(e.copy(),t)},Bt(n,e)}function Wt(e){return Math.log(e<0?0:e)/Math.LN10}function Xt(e){return-Math.log(e>0?0:-e)/Math.LN10}function Vt(e,t){function n(t){return e(r(t))}var r=$t(t),i=$t(1/t);return n.invert=function(t){return i(e.invert(t))},n.domain=function(t){return arguments.length?(e.domain(t.map(r)),n):e.domain().map(i)},n.ticks=function(e){return It(n.domain(),e)},n.tickFormat=function(e){return qt(n.domain(),e)},n.nice=function(){return n.domain(Dt(n.domain(),jt))},n.exponent=function(e){if(!arguments.length)return t;var s=n.domain();return r=$t(t=e),i=$t(1/t),n.domain(s)},n.copy=function(){return Vt(e.copy(),t)},Bt(n,e)}function $t(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Jt(e,t){function n(t){return o[((s.get(t)||s.set(t,e.push(t)))-1)%o.length]}function i(t,n){return d3.range(e.length).map(function(e){return t+n*e})}var s,o,u;return n.domain=function(i){if(!arguments.length)return e;e=[],s=new r;var o=-1,u=i.length,a;while(++o<u)s.has(a=i[o])||s.set(a,e.push(a));return n[t.t].apply(n,t.a)},n.range=function(e){return arguments.length?(o=e,u=0,t={t:"range",a:arguments},n):o},n.rangePoints=function(r,s){arguments.length<2&&(s=0);var a=r[0],f=r[1],l=(f-a)/(Math.max(1,e.length-1)+s);return o=i(e.length<2?(a+f)/2:a+l*s/2,l),u=0,t={t:"rangePoints",a:arguments},n},n.rangeBands=function(r,s,a){arguments.length<2&&(s=0),arguments.length<3&&(a=s);var f=r[1]<r[0],l=r[f-0],c=r[1-f],h=(c-l)/(e.length-s+2*a);return o=i(l+h*a,h),f&&o.reverse(),u=h*(1-s),t={t:"rangeBands",a:arguments},n},n.rangeRoundBands=function(r,s,a){arguments.length<2&&(s=0),arguments.length<3&&(a=s);var f=r[1]<r[0],l=r[f-0],c=r[1-f],h=Math.floor((c-l)/(e.length-s+2*a)),p=c-l-(e.length-s)*h;return o=i(l+Math.round(p/2),h),f&&o.reverse(),u=Math.round(h*(1-s)),t={t:"rangeRoundBands",a:arguments},n},n.rangeBand=function(){return u},n.rangeExtent=function(){return Mt(t.a[0])},n.copy=function(){return Jt(e,t)},n.domain(e)}function Kt(e,t){function n(){var n=0,s=e.length,o=t.length;i=[];while(++n<o)i[n-1]=d3.quantile(e,n/o);return r}function r(e){return isNaN(e=+e)?NaN:t[d3.bisect(i,e)]}var i;return r.domain=function(t){return arguments.length?(e=t.filter(function(e){return!isNaN(e)}).sort(d3.ascending),n()):e},r.range=function(e){return arguments.length?(t=e,n()):t},r.quantiles=function(){return i},r.copy=function(){return Kt(e,t)},n()}function Qt(e,t,n){function r(t){return n[Math.max(0,Math.min(o,Math.floor(s*(t-e))))]}function i(){return s=n.length/(t-e),o=n.length-1,r}var s,o;return r.domain=function(n){return arguments.length?(e=+n[0],t=+n[n.length-1],i()):[e,t]},r.range=function(e){return arguments.length?(n=e,i()):n},r.copy=function(){return Qt(e,t,n)},i()}function Gt(e,t){function n(n){return t[d3.bisect(e,n)]}return n.domain=function(t){return arguments.length?(e=t,n):e},n.range=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return Gt(e,t)},n}function Yt(e){function t(e){return+e}return t.invert=t,t.domain=t.range=function(n){return arguments.length?(e=n.map(t),t):e},t.ticks=function(t){return It(e,t)},t.tickFormat=function(t){return qt(e,t)},t.copy=function(){return Yt(e)},t}function Zt(e){return e.innerRadius}function en(e){return e.outerRadius}function tn(e){return e.startAngle}function nn(e){return e.endAngle}function rn(e){function t(t){function o(){a.push("M",s(e(l),f))}var a=[],l=[],c=-1,h=t.length,p,d=u(n),v=u(r);while(++c<h)i.call(this,p=t[c],c)?l.push([+d.call(this,p,c),+v.call(this,p,c)]):l.length&&(o(),l=[]);return l.length&&o(),a.length?a.join(""):null}var n=sn,r=on,i=o,s=un,a=s.key,f=.7;return t.x=function(e){return arguments.length?(n=e,t):n},t.y=function(e){return arguments.length?(r=e,t):r},t.defined=function(e){return arguments.length?(i=e,t):i},t.interpolate=function(e){return arguments.length?(typeof e=="function"?a=s=e:a=(s=$s.get(e)||un).key,t):a},t.tension=function(e){return arguments.length?(f=e,t):f},t}function sn(e){return e[0]}function on(e){return e[1]}function un(e){return e.join("L")}function an(e){return un(e)+"Z"}function fn(e){var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];while(++t<n)i.push("V",(r=e[t])[1],"H",r[0]);return i.join("")}function ln(e){var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];while(++t<n)i.push("H",(r=e[t])[0],"V",r[1]);return i.join("")}function cn(e,t){return e.length<4?un(e):e[1]+dn(e.slice(1,e.length-1),vn(e,t))}function hn(e,t){return e.length<3?un(e):e[0]+dn((e.push(e[0]),e),vn([e[e.length-2]].concat(e,[e[1]]),t))}function pn(e,t,n){return e.length<3?un(e):e[0]+dn(e,vn(e,t))}function dn(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return un(e);var n=e.length!=t.length,r="",i=e[0],s=e[1],o=t[0],u=o,a=1;n&&(r+="Q"+(s[0]-o[0]*2/3)+","+(s[1]-o[1]*2/3)+","+s[0]+","+s[1],i=e[1],a=2);if(t.length>1){u=t[1],s=e[a],a++,r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(s[0]-u[0])+","+(s[1]-u[1])+","+s[0]+","+s[1];for(var f=2;f<t.length;f++,a++)s=e[a],u=t[f],r+="S"+(s[0]-u[0])+","+(s[1]-u[1])+","+s[0]+","+s[1]}if(n){var l=e[a];r+="Q"+(s[0]+u[0]*2/3)+","+(s[1]+u[1]*2/3)+","+l[0]+","+l[1]}return r}function vn(e,t){var n=[],r=(1-t)/2,i,s=e[0],o=e[1],u=1,a=e.length;while(++u<a)i=s,s=o,o=e[u],n.push([r*(o[0]-i[0]),r*(o[1]-i[1])]);return n}function mn(e){if(e.length<3)return un(e);var t=1,n=e.length,r=e[0],i=r[0],s=r[1],o=[i,i,i,(r=e[1])[0]],u=[s,s,s,r[1]],a=[i,",",s];En(a,o,u);while(++t<n)r=e[t],o.shift(),o.push(r[0]),u.shift(),u.push(r[1]),En(a,o,u);t=-1;while(++t<2)o.shift(),o.push(r[0]),u.shift(),u.push(r[1]),En(a,o,u);return a.join("")}function gn(e){if(e.length<4)return un(e);var t=[],n=-1,r=e.length,i,s=[0],o=[0];while(++n<3)i=e[n],s.push(i[0]),o.push(i[1]);t.push(wn(Qs,s)+","+wn(Qs,o)),--n;while(++n<r)i=e[n],s.shift(),s.push(i[0]),o.shift(),o.push(i[1]),En(t,s,o);return t.join("")}function yn(e){var t,n=-1,r=e.length,i=r+4,s,o=[],u=[];while(++n<4)s=e[n%r],o.push(s[0]),u.push(s[1]);t=[wn(Qs,o),",",wn(Qs,u)],--n;while(++n<i)s=e[n%r],o.shift(),o.push(s[0]),u.shift(),u.push(s[1]),En(t,o,u);return t.join("")}function bn(e,t){var n=e.length-1;if(n){var r=e[0][0],i=e[0][1],s=e[n][0]-r,o=e[n][1]-i,u=-1,a,f;while(++u<=n)a=e[u],f=u/n,a[0]=t*a[0]+(1-t)*(r+f*s),a[1]=t*a[1]+(1-t)*(i+f*o)}return mn(e)}function wn(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function En(e,t,n){e.push("C",wn(Js,t),",",wn(Js,n),",",wn(Ks,t),",",wn(Ks,n),",",wn(Qs,t),",",wn(Qs,n))}function Sn(e,t){return(t[1]-e[1])/(t[0]-e[0])}function xn(e){var t=0,n=e.length-1,r=[],i=e[0],s=e[1],o=r[0]=Sn(i,s);while(++t<n)r[t]=(o+(o=Sn(i=s,s=e[t+1])))/2;return r[t]=o,r}function Tn(e){var t=[],n,r,i,s,o=xn(e),u=-1,a=e.length-1;while(++u<a)n=Sn(e[u],e[u+1]),Math.abs(n)<1e-6?o[u]=o[u+1]=0:(r=o[u]/n,i=o[u+1]/n,s=r*r+i*i,s>9&&(s=n*3/Math.sqrt(s),o[u]=s*r,o[u+1]=s*i));u=-1;while(++u<=a)s=(e[Math.min(a,u+1)][0]-e[Math.max(0,u-1)][0])/(6*(1+o[u]*o[u])),t.push([s||0,o[u]*s||0]);return t}function Nn(e){return e.length<3?un(e):e[0]+dn(e,Tn(e))}function Cn(e){var t,n=-1,r=e.length,i,s;while(++n<r)t=e[n],i=t[0],s=t[1]+Xs,t[0]=i*Math.cos(s),t[1]=i*Math.sin(s);return e}function kn(e){function t(t){function o(){l.push("M",f(e(v),p),h,c(e(d.reverse()),p),"Z")}var l=[],d=[],v=[],m=-1,g=t.length,y,b=u(n),w=u(i),E=n===r?function(){return x}:u(r),S=i===s?function(){return T}:u(s),x,T;while(++m<g)a.call(this,y=t[m],m)?(d.push([x=+b.call(this,y,m),T=+w.call(this,y,m)]),v.push([+E.call(this,y,m),+S.call(this,y,m)])):d.length&&(o(),d=[],v=[]);return d.length&&o(),l.length?l.join(""):null}var n=sn,r=sn,i=0,s=on,a=o,f=un,l=f.key,c=f,h="L",p=.7;return t.x=function(e){return arguments.length?(n=r=e,t):r},t.x0=function(e){return arguments.length?(n=e,t):n},t.x1=function(e){return arguments.length?(r=e,t):r},t.y=function(e){return arguments.length?(i=s=e,t):s},t.y0=function(e){return arguments.length?(i=e,t):i},t.y1=function(e){return arguments.length?(s=e,t):s},t.defined=function(e){return arguments.length?(a=e,t):a},t.interpolate=function(e){return arguments.length?(typeof e=="function"?l=f=e:l=(f=$s.get(e)||un).key,c=f.reverse||f,h=f.closed?"M":"L",t):l},t.tension=function(e){return arguments.length?(p=e,t):p},t}function Ln(e){return e.source}function An(e){return e.target}function On(e){return e.radius}function Mn(e){return e.startAngle}function _n(e){return e.endAngle}function Dn(e){return[e.x,e.y]}function Pn(e){return function(){var t=e.apply(this,arguments),n=t[0],r=t[1]+Xs;return[n*Math.cos(r),n*Math.sin(r)]}}function Hn(){return 64}function Bn(){return"circle"}function jn(e){var t=Math.sqrt(e/Math.PI);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+ -t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Fn(e,t){e.attr("transform",function(e){return"translate("+t(e)+",0)"})}function In(e,t){e.attr("transform",function(e){return"translate(0,"+t(e)+")"})}function qn(e,t,n){i=[];if(n&&t.length>1){var r=Mt(e.domain()),i,s=-1,o=t.length,u=(t[1]-t[0])/++n,a,f;while(++s<o)for(a=n;--a>0;)(f=+t[s]-a*u)>=r[0]&&i.push(f);for(--s,a=0;++a<n&&(f=+t[s]+a*u)<r[1];)i.push(f)}return i}function Rn(){no||(no=d3.select("body").append("div").style("visibility","hidden").style("top",0).style("height",0).style("width",0).style("overflow-y","scroll").append("div").style("height","2000px").node().parentNode);var e=d3.event,t;try{no.scrollTop=1e3,no.dispatchEvent(e),t=1e3-no.scrollTop}catch(n){t=e.wheelDelta||-e.detail*5}return t}function Un(e){var t=e.source,n=e.target,r=Wn(t,n),i=[t];while(t!==r)t=t.parent,i.push(t);var s=i.length;while(n!==r)i.splice(s,0,n),n=n.parent;return i}function zn(e){var t=[],n=e.parent;while(n!=null)t.push(e),e=n,n=n.parent;return t.push(e),t}function Wn(e,t){if(e===t)return e;var n=zn(e),r=zn(t),i=n.pop(),s=r.pop(),o=null;while(i===s)o=i,i=n.pop(),s=r.pop();return o}function Xn(e){e.fixed|=2}function Vn(e){e.fixed&=1}function $n(e){e.fixed|=4}function Jn(e){e.fixed&=3}function Kn(e,t,n){var r=0,i=0;e.charge=0;if(!e.leaf){var s=e.nodes,o=s.length,u=-1,a;while(++u<o){a=s[u];if(a==null)continue;Kn(a,t,n),e.charge+=a.charge,r+=a.charge*a.cx,i+=a.charge*a.cy}}if(e.point){e.leaf||(e.point.x+=Math.random()-.5,e.point.y+=Math.random()-.5);var f=t*n[e.point.index];e.charge+=e.pointCharge=f,r+=f*e.point.x,i+=f*e.point.y}e.cx=r/e.charge,e.cy=i/e.charge}function Qn(e){return 20}function Gn(e){return 1}function Yn(e){return e.x}function Zn(e){return e.y}function er(e,t,n){e.y0=t,e.y=n}function tr(e){return d3.range(e.length)}function nr(e){var t=-1,n=e[0].length,r=[];while(++t<n)r[t]=0;return r}function rr(e){var t=1,n=0,r=e[0][1],i,s=e.length;for(;t<s;++t)(i=e[t][1])>r&&(n=t,r=i);return n}function ir(e){return e.reduce(sr,0)}function sr(e,t){return e+t[1]}function or(e,t){return ur(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function ur(e,t){var n=-1,r=+e[0],i=(e[1]-r)/t,s=[];while(++n<=t)s[n]=i*n+r;return s}function ar(e){return[d3.min(e),d3.max(e)]}function fr(e,t){return d3.rebind(e,t,"sort","children","value"),e.links=pr,e.nodes=function(t){return uo=!0,(e.nodes=e)(t)},e}function lr(e){return e.children}function cr(e){return e.value}function hr(e,t){return t.value-e.value}function pr(e){return d3.merge(e.map(function(e){return(e.children||[]).map(function(t){return{source:e,target:t}})}))}function dr(e,t){return e.value-t.value}function vr(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function mr(e,t){e._pack_next=t,t._pack_prev=e}function gr(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return i*i-n*n-r*r>.001}function yr(e){function t(e){r=Math.min(e.x-e.r,r),i=Math.max(e.x+e.r,i),s=Math.min(e.y-e.r,s),o=Math.max(e.y+e.r,o)}if(!(n=e.children)||!(p=n.length))return;var n,r=Infinity,i=-Infinity,s=Infinity,o=-Infinity,u,a,f,l,c,h,p;n.forEach(br),u=n[0],u.x=-u.r,u.y=0,t(u);if(p>1){a=n[1],a.x=a.r,a.y=0,t(a);if(p>2){f=n[2],Sr(u,a,f),t(f),vr(u,f),u._pack_prev=f,vr(f,a),a=u._pack_next;for(l=3;l<p;l++){Sr(u,a,f=n[l]);var d=0,v=1,m=1;for(c=a._pack_next;c!==a;c=c._pack_next,v++)if(gr(c,f)){d=1;break}if(d==1)for(h=u._pack_prev;h!==c._pack_prev;h=h._pack_prev,m++)if(gr(h,f))break;d?(v<m||v==m&&a.r<u.r?mr(u,a=c):mr(u=h,a),l--):(vr(u,f),a=f,t(f))}}}var g=(r+i)/2,y=(s+o)/2,b=0;for(l=0;l<p;l++)f=n[l],f.x-=g,f.y-=y,b=Math.max(b,f.r+Math.sqrt(f.x*f.x+f.y*f.y));e.r=b,n.forEach(wr)}function br(e){e._pack_next=e._pack_prev=e}function wr(e){delete e._pack_next,delete e._pack_prev}function Er(e,t,n,r){var i=e.children;e.x=t+=r*e.x,e.y=n+=r*e.y,e.r*=r;if(i){var s=-1,o=i.length;while(++s<o)Er(i[s],t,n,r)}}function Sr(e,t,n){var r=e.r+n.r,i=t.x-e.x,s=t.y-e.y;if(r&&(i||s)){var o=t.r+n.r,u=i*i+s*s;o*=o,r*=r;var a=.5+(r-o)/(2*u),f=Math.sqrt(Math.max(0,2*o*(r+u)-(r-=u)*r-o*o))/(2*u);n.x=e.x+a*i+f*s,n.y=e.y+a*s-f*i}else n.x=e.x+r,n.y=e.y}function xr(e){return 1+d3.max(e,function(e){return e.y})}function Tr(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}function Nr(e){var t=e.children;return t&&t.length?Nr(t[0]):e}function Cr(e){var t=e.children,n;return t&&(n=t.length)?Cr(t[n-1]):e}function kr(e,t){return e.parent==t.parent?1:2}function Lr(e){var t=e.children;return t&&t.length?t[0]:e._tree.thread}function Ar(e){var t=e.children,n;return t&&(n=t.length)?t[n-1]:e._tree.thread}function Or(e,t){var n=e.children;if(n&&(i=n.length)){var r,i,s=-1;while(++s<i)t(r=Or(n[s],t),e)>0&&(e=r)}return e}function Mr(e,t){return e.x-t.x}function _r(e,t){return t.x-e.x}function Dr(e,t){return e.depth-t.depth}function Pr(e,t){function n(e,r){var i=e.children;if(i&&(a=i.length)){var s,o=null,u=-1,a;while(++u<a)s=i[u],n(s,o),o=s}t(e,r)}n(e,null)}function Hr(e){var t=0,n=0,r=e.children,i=r.length,s;while(--i>=0)s=r[i]._tree,s.prelim+=t,s.mod+=t,t+=s.shift+(n+=s.change)}function Br(e,t,n){e=e._tree,t=t._tree;var r=n/(t.number-e.number);e.change+=r,t.change-=r,t.shift+=n,t.prelim+=n,t.mod+=n}function jr(e,t,n){return e._tree.ancestor.parent==t.parent?e._tree.ancestor:n}function Fr(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function Ir(e,t){var n=e.x+t[3],r=e.y+t[0],i=e.dx-t[1]-t[3],s=e.dy-t[0]-t[2];return i<0&&(n+=i/2,i=0),s<0&&(r+=s/2,s=0),{x:n,y:r,dx:i,dy:s}}function qr(e,t){function n(e,r){d3.text(e,t,function(e){r(e&&n.parse(e))})}function r(t){return t.map(i).join(e)}function i(e){return o.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}var s=new RegExp("\r\n|["+e+"\r\n]","g"),o=new RegExp('["'+e+"\n]"),u=e.charCodeAt(0);return n.parse=function(e){var t;return n.parseRows(e,function(e,n){if(n){var r={},i=-1,s=t.length;while(++i<s)r[t[i]]=e[i];return r}return t=e,null})},n.parseRows=function(e,t){function n(){if(s.lastIndex>=e.length)return i;if(l)return l=!1,r;var t=s.lastIndex;if(e.charCodeAt(t)===34){var n=t;while(n++<e.length)if(e.charCodeAt(n)===34){if(e.charCodeAt(n+1)!==34)break;n++}s.lastIndex=n+2;var o=e.charCodeAt(n+1);return o===13?(l=!0,e.charCodeAt(n+2)===10&&s.lastIndex++):o===10&&(l=!0),e.substring(t+1,n).replace(/""/g,'"')}var a=s.exec(e);return a?(l=a[0].charCodeAt(0)!==u,e.substring(t,a.index)):(s.lastIndex=e.length,e.substring(t))}var r={},i={},o=[],a=0,f,l;s.lastIndex=0;while((f=n())!==i){var c=[];while(f!==r&&f!==i)c.push(f),f=n();if(t&&!(c=t(c,a++)))continue;o.push(c)}return o},n.format=function(e){return e.map(r).join("\n")},n}function Rr(e,t){return function(n){return n&&e.hasOwnProperty(n.type)?e[n.type](n):t}}function Ur(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+ -2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function zr(e,t){fo.hasOwnProperty(e.type)&&fo[e.type](e,t)}function Wr(e,t){zr(e.geometry,t)}function Xr(e,t){for(var n=e.features,r=0,i=n.length;r<i;r++)zr(n[r].geometry,t)}function Vr(e,t){for(var n=e.geometries,r=0,i=n.length;r<i;r++)zr(n[r],t)}function $r(e,t){for(var n=e.coordinates,r=0,i=n.length;r<i;r++)t.apply(null,n[r])}function Jr(e,t){for(var n=e.coordinates,r=0,i=n.length;r<i;r++)for(var s=n[r],o=0,u=s.length;o<u;o++)t.apply(null,s[o])}function Kr(e,t){for(var n=e.coordinates,r=0,i=n.length;r<i;r++)for(var s=n[r][0],o=0,u=s.length;o<u;o++)t.apply(null,s[o])}function Qr(e,t){t.apply(null,e.coordinates)}function Gr(e,t){for(var n=e.coordinates[0],r=0,i=n.length;r<i;r++)t.apply(null,n[r])}function Yr(e){return e.source}function Zr(e){return e.target}function ei(){function e(e){var t=Math.sin(e*=p)*d,n=Math.sin(p-e)*d,r=n*s+t*c,u=n*o+t*h,a=n*i+t*l;return[Math.atan2(u,r)/ao,Math.atan2(a,Math.sqrt(r*r+u*u))/ao]}var t,n,r,i,s,o,u,a,f,l,c,h,p,d;return e.distance=function(){return p==null&&(d=1/Math.sin(p=Math.acos(Math.max(-1,Math.min(1,i*l+r*f*Math.cos(u-t)))))),p},e.source=function(u){var a=Math.cos(t=u[0]*ao),f=Math.sin(t);return r=Math.cos(n=u[1]*ao),i=Math.sin(n),s=r*a,o=r*f,p=null,e},e.target=function(t){var n=Math.cos(u=t[0]*ao),r=Math.sin(u);return f=Math.cos(a=t[1]*ao),l=Math.sin(a),c=f*n,h=f*r,p=null,e},e}function ti(e,t){var n=ei().source(e).target(t);return n.distance(),n}function ni(e){var t=0,n=0;for(;;){if(e(t,n))return[t,n];t===0?(t=n+1,n=0):(t-=1,n+=1)}}function ri(e,t,n,r){var i,s,o,u,a,f,l;return i=r[e],s=i[0],o=i[1],i=r[t],u=i[0],a=i[1],i=r[n],f=i[0],l=i[1],(l-o)*(u-s)-(a-o)*(f-s)>0}function ii(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function si(e,t,n,r){var i=e[0],s=t[0],o=n[0],u=r[0],a=e[1],f=t[1],l=n[1],c=r[1],h=i-o,p=s-i,d=u-o,v=a-l,m=f-a,g=c-l,y=(d*v-g*h)/(g*p-d*m);return[i+y*p,a+y*m]}function oi(e,t){var n={list:e.map(function(e,t){return{index:t,x:e[0],y:e[1]}}).sort(function(e,t){return e.y<t.y?-1:e.y>t.y?1:e.x<t.x?-1:e.x>t.x?1:0}),bottomSite:null},r={list:[],leftEnd:null,rightEnd:null,init:function(){r.leftEnd=r.createHalfEdge(null,"l"),r.rightEnd=r.createHalfEdge(null,"l"),r.leftEnd.r=r.rightEnd,r.rightEnd.l=r.leftEnd,r.list.unshift(r.leftEnd,r.rightEnd)},createHalfEdge:function(e,t){return{edge:e,side:t,vertex:null,l:null,r:null}},insert:function(e,t){t.l=e,t.r=e.r,e.r.l=t,e.r=t},leftBound:function(e){var t=r.leftEnd;do t=t.r;while(t!=r.rightEnd&&i.rightOf(t,e));return t=t.l,t},del:function(e){e.l.r=e.r,e.r.l=e.l,e.edge=null},right:function(e){return e.r},left:function(e){return e.l},leftRegion:function(e){return e.edge==null?n.bottomSite:e.edge.region[e.side]},rightRegion:function(e){return e.edge==null?n.bottomSite:e.edge.region[ho[e.side]]}},i={bisect:function(e,t){var n={region:{l:e,r:t},ep:{l:null,r:null}},r=t.x-e.x,i=t.y-e.y,s=r>0?r:-r,o=i>0?i:-i;return n.c=e.x*r+e.y*i+(r*r+i*i)*.5,s>o?(n.a=1,n.b=i/r,n.c/=r):(n.b=1,n.a=r/i,n.c/=i),n},intersect:function(e,t){var n=e.edge,r=t.edge;if(!n||!r||n.region.r==r.region.r)return null;var i=n.a*r.b-n.b*r.a;if(Math.abs(i)<1e-10)return null;var s=(n.c*r.b-r.c*n.b)/i,o=(r.c*n.a-n.c*r.a)/i,u=n.region.r,a=r.region.r,f,l;u.y<a.y||u.y==a.y&&u.x<a.x?(f=e,l=n):(f=t,l=r);var c=s>=l.region.r.x;return c&&f.side==="l"||!c&&f.side==="r"?null:{x:s,y:o}},rightOf:function(e,t){var n=e.edge,r=n.region.r,i=t.x>r.x;if(i&&e.side==="l")return 1;if(!i&&e.side==="r")return 0;if(n.a===1){var s=t.y-r.y,o=t.x-r.x,u=0,a=0;!i&&n.b<0||i&&n.b>=0?a=u=s>=n.b*o:(a=t.x+t.y*n.b>n.c,n.b<0&&(a=!a),a||(u=1));if(!u){var f=r.x-n.region.l.x;a=n.b*(o*o-s*s)<f*s*(1+2*o/f+n.b*n.b),n.b<0&&(a=!a)}}else{var l=n.c-n.a*t.x,c=t.y-l,h=t.x-r.x,p=l-r.y;a=c*c>h*h+p*p}return e.side==="l"?a:!a},endPoint:function(e,n,r){e.ep[n]=r;if(!e.ep[ho[n]])return;t(e)},distance:function(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}},s={list:[],insert:function(e,t,n){e.vertex=t,e.ystar=t.y+n;for(var r=0,i=s.list,o=i.length;r<o;r++){var u=i[r];if(e.ystar>u.ystar||e.ystar==u.ystar&&t.x>u.vertex.x)continue;break}i.splice(r,0,e)},del:function(e){for(var t=0,n=s.list,r=n.length;t<r&&n[t]!=e;++t);n.splice(t,1)},empty:function(){return s.list.length===0},nextEvent:function(e){for(var t=0,n=s.list,r=n.length;t<r;++t)if(n[t]==e)return n[t+1];return null},min:function(){var e=s.list[0];return{x:e.vertex.x,y:e.ystar}},extractMin:function(){return s.list.shift()}};r.init(),n.bottomSite=n.list.shift();var o=n.list.shift(),u,a,f,l,c,h,p,d,v,m,g,y,b;for(;;){s.empty()||(u=s.min());if(o&&(s.empty()||o.y<u.y||o.y==u.y&&o.x<u.x))a=r.leftBound(o),f=r.right(a),p=r.rightRegion(a),y=i.bisect(p,o),h=r.createHalfEdge(y,"l"),r.insert(a,h),m=i.intersect(a,h),m&&(s.del(a),s.insert(a,m,i.distance(m,o))),a=h,h=r.createHalfEdge(y,"r"
-),r.insert(a,h),m=i.intersect(h,f),m&&s.insert(h,m,i.distance(m,o)),o=n.list.shift();else{if(!!s.empty())break;a=s.extractMin(),l=r.left(a),f=r.right(a),c=r.right(f),p=r.leftRegion(a),d=r.rightRegion(f),g=a.vertex,i.endPoint(a.edge,a.side,g),i.endPoint(f.edge,f.side,g),r.del(a),s.del(f),r.del(f),b="l",p.y>d.y&&(v=p,p=d,d=v,b="r"),y=i.bisect(p,d),h=r.createHalfEdge(y,b),r.insert(l,h),i.endPoint(y,ho[b],g),m=i.intersect(l,h),m&&(s.del(l),s.insert(l,m,i.distance(m,p))),m=i.intersect(h,c),m&&s.insert(h,m,i.distance(m,p))}}for(a=r.right(r.leftEnd);a!=r.rightEnd;a=r.right(a))t(a.edge)}function ui(){return{leaf:!0,nodes:[],point:null}}function ai(e,t,n,r,i,s){if(!e(t,n,r,i,s)){var o=(n+i)*.5,u=(r+s)*.5,a=t.nodes;a[0]&&ai(e,a[0],n,r,o,u),a[1]&&ai(e,a[1],o,r,i,u),a[2]&&ai(e,a[2],n,u,o,s),a[3]&&ai(e,a[3],o,u,i,s)}}function fi(e){return{x:e[0],y:e[1]}}function li(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function ci(e){return e.substring(0,3)}function hi(e,t,n,r){var i,s,o=0,u=t.length,a=n.length;while(o<u){if(r>=a)return-1;i=t.charCodeAt(o++);if(i==37){s=Ho[t.charAt(o++)];if(!s||(r=s(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}function pi(e){return new RegExp("^(?:"+e.map(d3.requote).join("|")+")","i")}function di(e){var t=new r,n=-1,i=e.length;while(++n<i)t.set(e[n].toLowerCase(),n);return t}function vi(e,t,n){Ao.lastIndex=0;var r=Ao.exec(t.substring(n));return r?n+=r[0].length:-1}function mi(e,t,n){Lo.lastIndex=0;var r=Lo.exec(t.substring(n));return r?n+=r[0].length:-1}function gi(e,t,n){_o.lastIndex=0;var r=_o.exec(t.substring(n));return r?(e.m=Do.get(r[0].toLowerCase()),n+=r[0].length):-1}function yi(e,t,n){Oo.lastIndex=0;var r=Oo.exec(t.substring(n));return r?(e.m=Mo.get(r[0].toLowerCase()),n+=r[0].length):-1}function bi(e,t,n){return hi(e,Po.c.toString(),t,n)}function wi(e,t,n){return hi(e,Po.x.toString(),t,n)}function Ei(e,t,n){return hi(e,Po.X.toString(),t,n)}function Si(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+4));return r?(e.y=+r[0],n+=r[0].length):-1}function xi(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+2));return r?(e.y=Ti(+r[0]),n+=r[0].length):-1}function Ti(e){return e+(e>68?1900:2e3)}function Ni(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+2));return r?(e.m=r[0]-1,n+=r[0].length):-1}function Ci(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+2));return r?(e.d=+r[0],n+=r[0].length):-1}function ki(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+2));return r?(e.H=+r[0],n+=r[0].length):-1}function Li(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+2));return r?(e.M=+r[0],n+=r[0].length):-1}function Ai(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+2));return r?(e.S=+r[0],n+=r[0].length):-1}function Oi(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+3));return r?(e.L=+r[0],n+=r[0].length):-1}function Mi(e,t,n){var r=jo.get(t.substring(n,n+=2).toLowerCase());return r==null?-1:(e.p=r,n)}function _i(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=~~(Math.abs(t)/60),i=Math.abs(t)%60;return n+To(r)+To(i)}function Di(e){return e.toISOString()}function Pi(e,t,n){function r(t){var n=e(t),r=s(n,1);return t-n<r-t?n:r}function i(n){return t(n=e(new po(n-1)),1),n}function s(e,n){return t(e=new po(+e),n),e}function o(e,r,s){var o=i(e),u=[];if(s>1)while(o<r)n(o)%s||u.push(new Date(+o)),t(o,1);else while(o<r)u.push(new Date(+o)),t(o,1);return u}function u(e,t,n){try{po=li;var r=new li;return r._=e,o(r,t,n)}finally{po=Date}}e.floor=e,e.round=r,e.ceil=i,e.offset=s,e.range=o;var a=e.utc=Hi(e);return a.floor=a,a.round=Hi(r),a.ceil=Hi(i),a.offset=Hi(s),a.range=u,e}function Hi(e){return function(t,n){try{po=li;var r=new li;return r._=t,e(r,n)._}finally{po=Date}}}function Bi(e,t,n){function r(t){return e(t)}return r.invert=function(t){return Fi(e.invert(t))},r.domain=function(t){return arguments.length?(e.domain(t),r):e.domain().map(Fi)},r.nice=function(e){return r.domain(Dt(r.domain(),function(){return e}))},r.ticks=function(n,i){var s=ji(r.domain());if(typeof n!="function"){var o=s[1]-s[0],u=o/n,a=d3.bisect(Io,u);if(a==Io.length)return t.year(s,n);if(!a)return e.ticks(n).map(Fi);Math.log(u/Io[a-1])<Math.log(Io[a]/u)&&--a,n=t[a],i=n[1],n=n[0].range}return n(s[0],new Date(+s[1]+1),i)},r.tickFormat=function(){return n},r.copy=function(){return Bi(e.copy(),t,n)},d3.rebind(r,e,"range","rangeRound","interpolate","clamp")}function ji(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function Fi(e){return new Date(e)}function Ii(e){return function(t){var n=e.length-1,r=e[n];while(!r[1](t))r=e[--n];return r[0](t)}}function qi(e){var t=new Date(e,0,1);return t.setFullYear(e),t}function Ri(e){var t=e.getFullYear(),n=qi(t),r=qi(t+1);return t+(e-n)/(r-n)}function Ui(e){var t=new Date(Date.UTC(e,0,1));return t.setUTCFullYear(e),t}function zi(e){var t=e.getUTCFullYear(),n=Ui(t),r=Ui(t+1);return t+(e-n)/(r-n)}Date.now||(Date.now=function(){return+(new Date)});try{document.createElement("div").style.setProperty("opacity",0,"")}catch(Wi){var Xi=CSSStyleDeclaration.prototype,Vi=Xi.setProperty;Xi.setProperty=function(e,t,n){Vi.call(this,e,t+"",n)}}d3={version:"2.10.2"};var $i=n;try{$i(document.documentElement.childNodes)[0].nodeType}catch(Ji){$i=t}var Ki=[].__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]};d3.map=function(e){var t=new r;for(var n in e)t.set(n,e[n]);return t},e(r,{has:function(e){return Qi+e in this},get:function(e){return this[Qi+e]},set:function(e,t){return this[Qi+e]=t},remove:function(e){return e=Qi+e,e in this&&delete this[e]},keys:function(){var e=[];return this.forEach(function(t){e.push(t)}),e},values:function(){var e=[];return this.forEach(function(t,n){e.push(n)}),e},entries:function(){var e=[];return this.forEach(function(t,n){e.push({key:t,value:n})}),e},forEach:function(e){for(var t in this)t.charCodeAt(0)===Gi&&e.call(this,t.substring(1),this[t])}});var Qi="\0",Gi=Qi.charCodeAt(0);d3.functor=u,d3.rebind=function(e,t){var n=1,r=arguments.length,i;while(++n<r)e[i=arguments[n]]=a(e,t,t[i]);return e},d3.ascending=function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN},d3.descending=function(e,t){return t<e?-1:t>e?1:t>=e?0:NaN},d3.mean=function(e,t){var n=e.length,r,i=0,s=-1,o=0;if(arguments.length===1)while(++s<n)f(r=e[s])&&(i+=(r-i)/++o);else while(++s<n)f(r=t.call(e,e[s],s))&&(i+=(r-i)/++o);return o?i:undefined},d3.median=function(e,t){return arguments.length>1&&(e=e.map(t)),e=e.filter(f),e.length?d3.quantile(e.sort(d3.ascending),.5):undefined},d3.min=function(e,t){var n=-1,r=e.length,i,s;if(arguments.length===1){while(++n<r&&((i=e[n])==null||i!=i))i=undefined;while(++n<r)(s=e[n])!=null&&i>s&&(i=s)}else{while(++n<r&&((i=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)(s=t.call(e,e[n],n))!=null&&i>s&&(i=s)}return i},d3.max=function(e,t){var n=-1,r=e.length,i,s;if(arguments.length===1){while(++n<r&&((i=e[n])==null||i!=i))i=undefined;while(++n<r)(s=e[n])!=null&&s>i&&(i=s)}else{while(++n<r&&((i=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)(s=t.call(e,e[n],n))!=null&&s>i&&(i=s)}return i},d3.extent=function(e,t){var n=-1,r=e.length,i,s,o;if(arguments.length===1){while(++n<r&&((i=o=e[n])==null||i!=i))i=o=undefined;while(++n<r)(s=e[n])!=null&&(i>s&&(i=s),o<s&&(o=s))}else{while(++n<r&&((i=o=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)(s=t.call(e,e[n],n))!=null&&(i>s&&(i=s),o<s&&(o=s))}return[i,o]},d3.random={normal:function(e,t){var n=arguments.length;return n<2&&(t=1),n<1&&(e=0),function(){var n,r,i;do n=Math.random()*2-1,r=Math.random()*2-1,i=n*n+r*r;while(!i||i>1);return e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(e,t){var n=arguments.length;n<2&&(t=1),n<1&&(e=0);var r=d3.random.normal();return function(){return Math.exp(e+t*r())}},irwinHall:function(e){return function(){for(var t=0,n=0;n<e;n++)t+=Math.random();return t/e}}},d3.sum=function(e,t){var n=0,r=e.length,i,s=-1;if(arguments.length===1)while(++s<r)isNaN(i=+e[s])||(n+=i);else while(++s<r)isNaN(i=+t.call(e,e[s],s))||(n+=i);return n},d3.quantile=function(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=e[r-1],s=n-r;return s?i+s*(e[r]-i):i},d3.transpose=function(e){return d3.zip.apply(d3,e)},d3.zip=function(){if(!(i=arguments.length))return[];for(var e=-1,t=d3.min(arguments,l),n=new Array(t);++e<t;)for(var r=-1,i,s=n[e]=new Array(i);++r<i;)s[r]=arguments[r][e];return n},d3.bisector=function(e){return{left:function(t,n,r,i){arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);while(r<i){var s=r+i>>>1;e.call(t,t[s],s)<n?r=s+1:i=s}return r},right:function(t,n,r,i){arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);while(r<i){var s=r+i>>>1;n<e.call(t,t[s],s)?i=s:r=s+1}return r}}};var Yi=d3.bisector(function(e){return e});d3.bisectLeft=Yi.left,d3.bisect=d3.bisectRight=Yi.right,d3.first=function(e,t){var n=0,r=e.length,i=e[0],s;arguments.length===1&&(t=d3.ascending);while(++n<r)t.call(e,i,s=e[n])>0&&(i=s);return i},d3.last=function(e,t){var n=0,r=e.length,i=e[0],s;arguments.length===1&&(t=d3.ascending);while(++n<r)t.call(e,i,s=e[n])<=0&&(i=s);return i},d3.nest=function(){function e(t,s){if(s>=i.length)return u?u.call(n,t):o?t.sort(o):t;var a=-1,f=t.length,l=i[s++],c,h,p=new r,d,v={};while(++a<f)(d=p.get(c=l(h=t[a])))?d.push(h):p.set(c,[h]);return p.forEach(function(t,n){v[t]=e(n,s)}),v}function t(e,n){if(n>=i.length)return e;var r=[],o=s[n++],u;for(u in e)r.push({key:u,values:t(e[u],n)});return o&&r.sort(function(e,t){return o(e.key,t.key)}),r}var n={},i=[],s=[],o,u;return n.map=function(t){return e(t,0)},n.entries=function(n){return t(e(n,0),0)},n.key=function(e){return i.push(e),n},n.sortKeys=function(e){return s[i.length-1]=e,n},n.sortValues=function(e){return o=e,n},n.rollup=function(e){return u=e,n},n},d3.keys=function(e){var t=[];for(var n in e)t.push(n);return t},d3.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t},d3.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t},d3.permute=function(e,t){var n=[],r=-1,i=t.length;while(++r<i)n[r]=e[t[r]];return n},d3.merge=function(e){return Array.prototype.concat.apply([],e)},d3.split=function(e,t){var n=[],r=[],i,s=-1,o=e.length;arguments.length<2&&(t=c);while(++s<o)t.call(r,i=e[s],s)?r=[]:(r.length||n.push(r),r.push(i));return n},d3.range=function(e,t,n){arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0));if((t-e)/n===Infinity)throw new Error("infinite range");var r=[],i=p(Math.abs(n)),s=-1,o;e*=i,t*=i,n*=i;if(n<0)while((o=e+n*++s)>t)r.push(o/i);else while((o=e+n*++s)<t)r.push(o/i);return r},d3.requote=function(e){return e.replace(Zi,"\\$&")};var Zi=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;d3.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},d3.xhr=function(e,t,n){var r=new XMLHttpRequest;arguments.length<3?(n=t,t=null):t&&r.overrideMimeType&&r.overrideMimeType(t),r.open("GET",e,!0),t&&r.setRequestHeader("Accept",t),r.onreadystatechange=function(){if(r.readyState===4){var e=r.status;n(!e&&r.response||e>=200&&e<300||e===304?r:null)}},r.send(null)},d3.text=function(e,t,n){function r(e){n(e&&e.responseText)}arguments.length<3&&(n=t,t=null),d3.xhr(e,t,r)},d3.json=function(e,t){d3.text(e,"application/json",function(e){t(e?JSON.parse(e):null)})},d3.html=function(e,t){d3.text(e,"text/html",function(e){if(e!=null){var n=document.createRange();n.selectNode(document.body),e=n.createContextualFragment(e)}t(e)})},d3.xml=function(e,t,n){function r(e){n(e&&e.responseXML)}arguments.length<3&&(n=t,t=null),d3.xhr(e,t,r)};var es={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};d3.ns={prefix:es,qualify:function(e){var t=e.indexOf(":"),n=e;return t>=0&&(n=e.substring(0,t),e=e.substring(t+1)),es.hasOwnProperty(n)?{space:es[n],local:e}:e}},d3.dispatch=function(){var e=new d,t=-1,n=arguments.length;while(++t<n)e[arguments[t]]=v(e);return e},d.prototype.on=function(e,t){var n=e.indexOf("."),r="";return n>0&&(r=e.substring(n+1),e=e.substring(0,n)),arguments.length<2?this[e].on(r):this[e].on(r,t)},d3.format=function(e){var t=ts.exec(e),n=t[1]||" ",r=t[3]||"",i=t[5],s=+t[6],o=t[7],u=t[8],a=t[9],f=1,l="",c=!1;u&&(u=+u.substring(1)),i&&(n="0",o&&(s-=Math.floor((s-1)/4)));switch(a){case"n":o=!0,a="g";break;case"%":f=100,l="%",a="f";break;case"p":f=100,l="%",a="r";break;case"d":c=!0,u=0;break;case"s":f=-1,a="r"}return a=="r"&&!u&&(a="g"),a=ns.get(a)||g,function(e){if(c&&e%1)return"";var t=e<0&&(e=-e)?"-":r;if(f<0){var h=d3.formatPrefix(e,u);e=h.scale(e),l=h.symbol}else e*=f;e=a(e,u);if(i){var p=e.length+t.length;p<s&&(e=(new Array(s-p+1)).join(n)+e),o&&(e=y(e)),e=t+e}else{o&&(e=y(e)),e=t+e;var p=e.length;p<s&&(e=(new Array(s-p+1)).join(n)+e)}return e+l}};var ts=/(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/,ns=d3.map({g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(e,t){return d3.round(e,t=m(e,t)).toFixed(Math.max(0,Math.min(20,t)))}}),rs=["y","z","a","f","p","n","μ","m","","k","M","G","T","P","E","Z","Y"].map(b);d3.formatPrefix=function(e,t){var n=0;return e&&(e<0&&(e*=-1),t&&(e=d3.round(e,m(e,t))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,Math.floor((n<=0?n+1:n-1)/3)*3))),rs[8+n/3]};var is=T(2),ss=T(3),os=function(){return x},us=d3.map({linear:os,poly:T,quad:function(){return is},cubic:function(){return ss},sin:function(){return N},exp:function(){return C},circle:function(){return k},elastic:L,back:A,bounce:function(){return O}}),as=d3.map({"in":x,out:E,"in-out":S,"out-in":function(e){return S(E(e))}});d3.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.substring(0,t):e,r=t>=0?e.substring(t+1):"in";return n=us.get(n)||os,r=as.get(r)||x,w(r(n.apply(null,Array.prototype.slice.call(arguments,1))))},d3.event=null,d3.transform=function(e){var t=document.createElementNS(d3.ns.prefix.svg,"g");return(d3.transform=function(e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate();return new P(n?n.matrix:ls)})(e)},P.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var fs=180/Math.PI,ls={a:1,b:0,c:0,d:1,e:0,f:0};d3.interpolate=function(e,t){var n=d3.interpolators.length,r;while(--n>=0&&!(r=d3.interpolators[n](e,t)));return r},d3.interpolateNumber=function(e,t){return t-=e,function(n){return e+t*n}},d3.interpolateRound=function(e,t){return t-=e,function(n){return Math.round(e+t*n)}},d3.interpolateString=function(e,t){var n,r,i,s=0,o=0,u=[],a=[],f,l;cs.lastIndex=0;for(r=0;n=cs.exec(t);++r)n.index&&u.push(t.substring(s,o=n.index)),a.push({i:u.length,x:n[0]}),u.push(null),s=cs.lastIndex;s<t.length&&u.push(t.substring(s));for(r=0,f=a.length;(n=cs.exec(e))&&r<f;++r){l=a[r];if(l.x==n[0]){if(l.i)if(u[l.i+1]==null){u[l.i-1]+=l.x,u.splice(l.i,1);for(i=r+1;i<f;++i)a[i].i--}else{u[l.i-1]+=l.x+u[l.i+1],u.splice(l.i,2);for(i=r+1;i<f;++i)a[i].i-=2}else if(u[l.i+1]==null)u[l.i]=l.x;else{u[l.i]=l.x+u[l.i+1],u.splice(l.i+1,1);for(i=r+1;i<f;++i)a[i].i--}a.splice(r,1),f--,r--}else l.x=d3.interpolateNumber(parseFloat(n[0]),parseFloat(l.x))}while(r<f)l=a.pop(),u[l.i+1]==null?u[l.i]=l.x:(u[l.i]=l.x+u[l.i+1],u.splice(l.i+1,1)),f--;return u.length===1?u[0]==null?a[0].x:function(){return t}:function(e){for(r=0;r<f;++r)u[(l=a[r]).i]=l.x(e);return u.join("")}},d3.interpolateTransform=function(e,t){var n=[],r=[],i,s=d3.transform(e),o=d3.transform(t),u=s.translate,a=o.translate,f=s.rotate,l=o.rotate,c=s.skew,h=o.skew,p=s.scale,d=o.scale;return u[0]!=a[0]||u[1]!=a[1]?(n.push("translate(",null,",",null,")"),r.push({i:1,x:d3.interpolateNumber(u[0],a[0])},{i:3,x:d3.interpolateNumber(u[1],a[1])})):a[0]||a[1]?n.push("translate("+a+")"):n.push(""),f!=l?(f-l>180?l+=360:l-f>180&&(f+=360),r.push({i:n.push(n.pop()+"rotate(",null,")")-2,x:d3.interpolateNumber(f,l)})):l&&n.push(n.pop()+"rotate("+l+")"),c!=h?r.push({i:n.push(n.pop()+"skewX(",null,")")-2,x:d3.interpolateNumber(c,h)}):h&&n.push(n.pop()+"skewX("+h+")"),p[0]!=d[0]||p[1]!=d[1]?(i=n.push(n.pop()+"scale(",null,",",null,")"),r.push({i:i-4,x:d3.interpolateNumber(p[0],d[0])},{i:i-2,x:d3.interpolateNumber(p[1],d[1])})):(d[0]!=1||d[1]!=1)&&n.push(n.pop()+"scale("+d+")"),i=r.length,function(e){var t=-1,s;while(++t<i)n[(s=r[t]).i]=s.x(e);return n.join("")}},d3.interpolateRgb=function(e,t){e=d3.rgb(e),t=d3.rgb(t);var n=e.r,r=e.g,i=e.b,s=t.r-n,o=t.g-r,u=t.b-i;return function(e){return"#"+z(Math.round(n+s*e))+z(Math.round(r+o*e))+z(Math.round(i+u*e))}},d3.interpolateHsl=function(e,t){e=d3.hsl(e),t=d3.hsl(t);var n=e.h,r=e.s,i=e.l,s=t.h-n,o=t.s-r,u=t.l-i;return s>180?s-=360:s<-180&&(s+=360),function(e){return G(n+s*e,r+o*e,i+u*e)+""}},d3.interpolateLab=function(e,t){e=d3.lab(e),t=d3.lab(t);var n=e.l,r=e.a,i=e.b,s=t.l-n,o=t.a-r,u=t.b-i;return function(e){return rt(n+s*e,r+o*e,i+u*e)+""}},d3.interpolateHcl=function(e,t){e=d3.hcl(e),t=d3.hcl(t);var n=e.h,r=e.c,i=e.l,s=t.h-n,o=t.c-r,u=t.l-i;return s>180?s-=360:s<-180&&(s+=360),function(e){return et(n+s*e,r+o*e,i+u*e)+""}},d3.interpolateArray=function(e,t){var n=[],r=[],i=e.length,s=t.length,o=Math.min(e.length,t.length),u;for(u=0;u<o;++u)n.push(d3.interpolate(e[u],t[u]));for(;u<i;++u)r[u]=e[u];for(;u<s;++u)r[u]=t[u];return function(e){for(u=0;u<o;++u)r[u]=n[u](e);return r}},d3.interpolateObject=function(e,t){var n={},r={},i;for(i in e)i in t?n[i]=F(i)(e[i],t[i]):r[i]=e[i];for(i in t)i in e||(r[i]=t[i]);return function(e){for(i in n)r[i]=n[i](e);return r}};var cs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;d3.interpolators=[d3.interpolateObject,function(e,t){return t instanceof Array&&d3.interpolateArray(e,t)},function(e,t){return(typeof e=="string"||typeof t=="string")&&d3.interpolateString(e+"",t+"")},function(e,t){return(typeof t=="string"?hs.has(t)||/^(#|rgb\(|hsl\()/.test(t):t instanceof U||t instanceof Q)&&d3.interpolateRgb(e,t)},function(e,t){return!isNaN(e=+e)&&!isNaN(t=+t)&&d3.interpolateNumber(e,t)}],d3.rgb=function(e,t,n){return arguments.length===1?e instanceof U?R(e.r,e.g,e.b):W(""+e,R,G):R(~~e,~~t,~~n)},U.prototype.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,i=30;return!t&&!n&&!r?R(i,i,i):(t&&t<i&&(t=i),n&&n<i&&(n=i),r&&r<i&&(r=i),R(Math.min(255,Math.floor(t/e)),Math.min(255,Math.floor(n/e)),Math.min(255,Math.floor(r/e))))},U.prototype.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),R(Math.floor(e*this.r),Math.floor(e*this.g),Math.floor(e*this.b))},U.prototype.hsl=function(){return X(this.r,this.g,this.b)},U.prototype.toString=function(){return"#"+z(this.r)+z(this.g)+z(this.b)};var hs=d3.map({aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"});hs.forEach(function(e,t){hs.set(e,W(t,R,G))}),d3.hsl=function(e,t,n){return arguments.length===1?e instanceof Q?K(e.h,e.s,e.l):W(""+e,X,K):K(+e,+t,+n)},Q.prototype.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),K(this.h,this.s,this.l/e)},Q.prototype.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),K(this.h,this.s,e*this.l)},Q.prototype.rgb=function(){return G(this.h,this.s,this.l)},Q.prototype.toString=function(){return this.rgb().toString()},d3.hcl=function(e,t,n){return arguments.length===1?e instanceof Z?Y(e.h,e.c,e.l):e instanceof nt?it(e.l,e.a,e.b):it((e=V((e=d3.rgb(e)).r,e.g,e.b)).l,e.a,e.b):Y(+e,+t,+n)},Z.prototype.brighter=function(e){return Y(this.h,this.c,Math.min(100,this.l+ps*(arguments.length?e:1)))},Z.prototype.darker=function(e){return Y(this.h,this.c,Math.max(0,this.l-ps*(arguments.length?e:1)))},Z.prototype.rgb=function(){return et(this.h,this.c,this.l).rgb()},Z.prototype.toString=function(){return this.rgb()+""},d3.lab=function(e,t,n){return arguments.length===1?e instanceof nt?tt(e.l,e.a,e.b):e instanceof Z?et(e.l,e.c,e.h):V((e=d3.rgb(e)).r,e.g,e.b):tt(+e,+t,+n)};var ps=18,ds=.95047,vs=1,ms=1.08883;nt.prototype.brighter=function(e){return tt(Math.min(100,this.l+ps*(arguments.length?e:1)),this.a,this.b)},nt.prototype.darker=function(e){return tt(Math.max(0,this.l-ps*(arguments.length?e:1)),this.a,this.b)},nt.prototype.rgb=function(){return rt(this.l,this.a,this.b)},nt.prototype.toString=function(){return this.rgb()+""};var gs=function(e,t){return t.querySelector(e)},ys=function(e,t){return t.querySelectorAll(e)},bs=document.documentElement,ws=bs.matchesSelector||bs.webkitMatchesSelector||bs.mozMatchesSelector||bs.msMatchesSelector||bs.oMatchesSelector,Es=function(e,t){return ws.call(e,t)};typeof Sizzle=="function"&&(gs=function(e,t){return Sizzle(e,t)[0]||null},ys=function(e,t){return Sizzle.uniqueSort(Sizzle(e,t))},Es=Sizzle.matchesSelector);var Ss=[];d3.selection=function(){return xs},d3.selection.prototype=Ss,Ss.select=function(e){var t=[],n,r,i,s;typeof e!="function"&&(e=ft(e));for(var o=-1,u=this.length;++o<u;){t.push(n=[]),n.parentNode=(i=this[o]).parentNode;for(var a=-1,f=i.length;++a<f;)(s=i[a])?(n.push(r=e.call(s,s.__data__,a)),r&&"__data__"in s&&(r.__data__=s.__data__)):n.push(null)}return at(t)},Ss.selectAll=function(e){var t=[],n,r;typeof e!="function"&&(e=lt(e));for(var i=-1,s=this.length;++i<s;)for(var o=this[i],u=-1,a=o.length;++u<a;)if(r=o[u])t.push(n=$i(e.call(r,r.__data__,u))),n.parentNode=r;return at(t)},Ss.attr=function(e,t){if(arguments.length<2){if(typeof e=="string"){var n=this.node();return e=d3.ns.qualify(e),e.local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(ct(t,e[t]));return this}return this.each(ct(e,t))},Ss.classed=function(e,t){if(arguments.length<2){if(typeof e=="string"){var n=this.node(),r=(e=e.trim().split(/^|\s+/g)).length,i=-1;if(t=n.classList){while(++i<r)if(!t.contains(e[i]))return!1}else{t=n.className,t.baseVal!=null&&(t=t.baseVal);while(++i<r)if(!ht(e[i]).test(t))return!1}return!0}for(t in e)this.each(pt(t,e[t]));return this}return this.each(pt(e,t))},Ss.style=function(e,t,n){var r=arguments.length;if(r<3){if(typeof e!="string"){r<2&&(t="");for(n in e)this.each(vt(n,e[n],t));return this}if(r<2)return window.getComputedStyle(this.node(),null).getPropertyValue(e);n=""}return this.each(vt(e,t,n))},Ss.property=function(e,t){if(arguments.length<2){if(typeof e=="string")return this.node()[e];for(t in e)this.each(mt(t,e[t]));return this}return this.each(mt(e,t))},Ss.text=function(e){return arguments.length<1?this.node().textContent:this.each(typeof e=="function"?function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}:e==null?function(){this.textContent=""}:function(){this.textContent=e})},Ss.html=function(e){return arguments.length<1?this.node().innerHTML:this.each(typeof e=="function"?function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}:e==null?function(){this.innerHTML=""}:function(){this.innerHTML=e})},Ss.append=function(e){function t(){return this.appendChild(document.createElementNS(this.namespaceURI,e))}function n(){return this.appendChild(document.createElementNS(e.space,e.local))}return e=d3.ns.qualify(e),this.select(e.local?n:t)},Ss.insert=function(e,t){function n(){return this.insertBefore(document.createElementNS(this.namespaceURI,e),gs(t,this))}function r(){return this.insertBefore(document.createElementNS(e.space,e.local),gs(t,this))}return e=d3.ns.qualify(e),this.select(e.local?r:n)},Ss.remove=function(){return this.each(function(){var e=this.parentNode;e&&e.removeChild(this)})},Ss.data=function(e,t){function n(e,n){var i,s=e.length,o=n.length,u=Math.min(s,o),c=Math.max(s,o),h=[],p=[],d=[],v,m;if(t){var g=new r,y=[],b,w=n.length;for(i=-1;++i<s;)b=t.call(v=e[i],v.__data__,i),g.has(b)?d[w++]=v:g.set(b,v),y.push(b);for(i=-1;++i<o;)b=t.call(n,m=n[i],i),g.has(b)?(h[i]=v=g.get(b),v.__data__=m,p[i]=d[i]=null):(p[i]=gt(m),h[i]=d[i]=null),g.remove(b);for(i=-1;++i<s;)g.has(y[i])&&(d[i]=e[i])}else{for(i=-1;++i<u;)v=e[i],m=n[i],v?(v.__data__=m,h[i]=v,p[i]=d[i]=null):(p[i]=gt(m),h[i]=d[i]=null);for(;i<o;++i)p[i]=gt(n[i]),h[i]=d[i]=null;for(;i<c;++i)d[i]=e[i],p[i]=h[i]=null}p.update=h,p.parentNode=h.parentNode=d.parentNode=e.parentNode,a.push(p),f.push(h),l.push(d)}var i=-1,s=this.length,o,u;if(!arguments.length){e=new Array(s=(o=this[0]).length);while(++i<s)if(u=o[i])e[i]=u.__data__;return e}var a=St([]),f=at([]),l=at([]);if(typeof e=="function")while(++i<s)n(o=this[i],e.call(o,o.parentNode.__data__,i));else while(++i<s)n(o=this[i],e);return f.enter=function(){return a},f.exit=function(){return l},f},Ss.datum=Ss.map=function(e){return arguments.length<1?this.property("__data__"):this.property("__data__",e)},Ss.filter=function(e){var t=[],n,r,i;typeof e!="function"&&(e=yt(e));for(var s=0,o=this.length;s<o;s++){t.push(n=[]),n.parentNode=(r=this[s]).parentNode;for(var u=0,a=r.length;u<a;u++)(i=r[u])&&e.call(i,i.__data__,u)&&n.push(i)}return at(t)},Ss.order=function(){for(var e=-1,t=this.length;++e<t;)for(var n=this[e],r=n.length-1,i=n[r],s;--r>=0;)if(s=n[r])i&&i!==s.nextSibling&&i.parentNode.insertBefore(s,i),i=s;return this},Ss.sort=function(e){e=bt.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()},Ss.on=function(e,t,n){var r=arguments.length;if(r<3){if(typeof e!="string"){r<2&&(t=!1);for(n in e)this.each(wt(n,e[n],t));return this}if(r<2)return(r=this.node()["__on"+e])&&r._;n=!1}return this.each(wt(e,t,n))},Ss.each=function(e){return Et(this,function(t,n,r){e.call(t,t.__data__,n,r)})},Ss.call=function(e){return e.apply(this,(arguments[0]=this,arguments)),this},Ss.empty=function(){return!this.node()},Ss.node=function(e){for(var t=0,n=this.length;t<n;t++)for(var r=this[t],i=0,s=r.length;i<s;i++){var o=r[i];if(o)return o}return null},Ss.transition=function(){var e=[],t,n;for(var r=-1,i=this.length;++r<i;){e.push(t=[]);for(var s=this[r],o=-1,u=s.length;++o<u;)t.push((n=s[o])?{node:n,delay:Ms,duration:_s}:null)}return xt(e,ks||++Cs,Date.now())};var xs=at([[document]]);xs[0].parentNode=bs,d3.select=function(e){return typeof e=="string"?xs.select(e):at([[e]])},d3.selectAll=function(e){return typeof e=="string"?xs.selectAll(e):at([$i(e)])};var Ts=[];d3.selection.enter=St,d3.selection.enter.prototype=Ts,Ts.append=Ss.append,Ts.insert=Ss.insert,Ts.empty=Ss.empty,Ts.node=Ss.node,Ts.select=function(e){var t=[],n,r,i,s,o;for(var u=-1,a=this.length;++u<a;){i=(s=this[u]).update,t.push(n=[]),n.parentNode=s.parentNode;for(var f=-1,l=s.length;++f<l;)(o=s[f])?(n.push(i[f]=r=e.call(s.parentNode,o.__data__,f)),r.__data__=o.__data__):n.push(null)}return at(t)};var Ns=[],Cs=0,ks=0,Ls=0,As=250,Os=d3.ease("cubic-in-out"),Ms=Ls,_s=As,Ds=Os;Ns.call=Ss.call,d3.transition=function(e){return arguments.length?ks?e.transition():e:xs.transition()},d3.transition.prototype=Ns,Ns.select=function(e){var t=[],n,r,i;typeof e!="function"&&(e=ft(e));for(var s=-1,o=this.length;++s<o;){t.push(n=[]);for(var u=this[s],a=-1,f=u.length;++a<f;)(i=u[a])&&(r=e.call(i.node,i.node.__data__,a))?("__data__"in i.node&&(r.__data__=i.node.__data__),n.push({node:r,delay:i.delay,duration:i.duration})):n.push(null)}return xt(t,this.id,this.time).ease(this.ease())},Ns.selectAll=function(e){var t=[],n,r,i;typeof e!="function"&&(e=lt(e));for(var s=-1,o=this.length;++s<o;)for(var u=this[s],a=-1,f=u.length;++a<f;)if(i=u[a]){r=e.call(i.node,i.node.__data__,a),t.push(n=[]);for(var l=-1,c=r.length;++l<c;)n.push({node:r[l],delay:i.delay,duration:i.duration})}return xt(t,this.id,this.time).ease(this.ease())},Ns.filter=function(e){var t=[],n,r,i;typeof e!="function"&&(e=yt(e));for(var s=0,o=this.length;s<o;s++){t.push(n=[]);for(var r=this[s],u=0,a=r.length;u<a;u++)(i=r[u])&&e.call(i.node,i.node.__data__,u)&&n.push(i)}return xt(t,this.id,this.time).ease(this.ease())},Ns.attr=function(e,t){if(arguments.length<2){for(t in e)this.attrTween(t,Ct(e[t],t));return this}return this.attrTween(e,Ct(t,e))},Ns.attrTween=function(e,t){function n(e,n){var r=t.call(this,e,n,this.getAttribute(i));return r===Ps?(this.removeAttribute(i),null):r&&function(e){this.setAttribute(i,r(e))}}function r(e,n){var r=t.call(this,e,n,this.getAttributeNS(i.space,i.local));return r===Ps?(this.removeAttributeNS(i.space,i.local),null):r&&function(e){this.setAttributeNS(i.space,i.local,r(e))}}var i=d3.ns.qualify(e);return this.tween("attr."+e,i.local?r:n)},Ns.style=function(e,t,n){var r=arguments.length;if(r<3){if(typeof e!="string"){r<2&&(t="");for(n in e)this.styleTween(n,Ct(e[n],n),t);return this}n=""}return this.styleTween(e,Ct(t,e),n)},Ns.styleTween=function(e,t,n){return arguments.length<3&&(n=""),this.tween("style."+e,function(r,i){var s=t.call(this,r,i,window.getComputedStyle(this,null).getPropertyValue(e));return s===Ps?(this.style.removeProperty(e),null):s&&function(t){this.style.setProperty(e,s(t),n)}})},Ns.text=function(e){return this.tween("text",function(t,n){this.textContent=typeof e=="function"?e.call(this,t,n):e})},Ns.remove=function(){return this.each("end.transition",function(){var e;!this.__transition__&&(e=this.parentNode)&&e.removeChild(this)})},Ns.delay=function(e){return Et(this,typeof e=="function"?function(t,n,r){t.delay=e.call(t=t.node,t.__data__,n,r)|0}:(e|=0,function(t){t.delay=e}))},Ns.duration=function(e){return Et(this,typeof e=="function"?function(t,n,r){t.duration=Math.max(1,e.call(t=t.node,t.__data__,n,r)|0)}:(e=Math.max(1,e|0),function(t){t.duration=e}))},Ns.transition=function(){return this.select(s)},d3.tween=function(e,t){function n(n,r,i){var s=e.call(this,n,r);return s==null?i!=""&&Ps:i!=s&&t(i,s)}function r(n,r,i){return i!=e&&t(i,e)}return typeof e=="function"?n:e==null?Nt:(e+="",r)};var Ps={},Hs=null,Bs,js;d3.timer=function(e,t,n){var r=!1,i,s=Hs;if(arguments.length<3){if(arguments.length<2)t=0;else if(!isFinite(t))return;n=Date.now()}while(s){if(s.callback===e){s.then=n,s.delay=t,r=!0;break}i=s,s=s.next}r||(Hs={callback:e,then:n,delay:t,next:Hs}),Bs||(js=clearTimeout(js),Bs=1,Fs(kt))},d3.timer.flush=function(){var e,t=Date.now(),n=Hs;while(n)e=t-n.then,n.delay||(n.flush=n.callback(e)),n=n.next;Lt()};var Fs=window.requestAnimationFrame||window.webkitRequestAnimationFrame||
-window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,17)};d3.mouse=function(e){return At(e,_())};var Is=/WebKit/.test(navigator.userAgent)?-1:0;d3.touches=function(e,t){return arguments.length<2&&(t=_().touches),t?$i(t).map(function(t){var n=At(e,t);return n.identifier=t.identifier,n}):[]},d3.scale={},d3.scale.linear=function(){return Ht([0,1],[0,1],d3.interpolate,!1)},d3.scale.log=function(){return zt(d3.scale.linear(),Wt)};var qs=d3.format(".0e");Wt.pow=function(e){return Math.pow(10,e)},Xt.pow=function(e){return-Math.pow(10,-e)},d3.scale.pow=function(){return Vt(d3.scale.linear(),1)},d3.scale.sqrt=function(){return d3.scale.pow().exponent(.5)},d3.scale.ordinal=function(){return Jt([],{t:"range",a:[[]]})},d3.scale.category10=function(){return d3.scale.ordinal().range(Rs)},d3.scale.category20=function(){return d3.scale.ordinal().range(Us)},d3.scale.category20b=function(){return d3.scale.ordinal().range(zs)},d3.scale.category20c=function(){return d3.scale.ordinal().range(Ws)};var Rs=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],Us=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],zs=["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"],Ws=["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"];d3.scale.quantile=function(){return Kt([],[])},d3.scale.quantize=function(){return Qt(0,1,[0,1])},d3.scale.threshold=function(){return Gt([.5],[0,1])},d3.scale.identity=function(){return Yt([0,1])},d3.svg={},d3.svg.arc=function(){function e(){var e=t.apply(this,arguments),s=n.apply(this,arguments),o=r.apply(this,arguments)+Xs,u=i.apply(this,arguments)+Xs,a=(u<o&&(a=o,o=u,u=a),u-o),f=a<Math.PI?"0":"1",l=Math.cos(o),c=Math.sin(o),h=Math.cos(u),p=Math.sin(u);return a>=Vs?e?"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+ -s+"A"+s+","+s+" 0 1,1 0,"+s+"M0,"+e+"A"+e+","+e+" 0 1,0 0,"+ -e+"A"+e+","+e+" 0 1,0 0,"+e+"Z":"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+ -s+"A"+s+","+s+" 0 1,1 0,"+s+"Z":e?"M"+s*l+","+s*c+"A"+s+","+s+" 0 "+f+",1 "+s*h+","+s*p+"L"+e*h+","+e*p+"A"+e+","+e+" 0 "+f+",0 "+e*l+","+e*c+"Z":"M"+s*l+","+s*c+"A"+s+","+s+" 0 "+f+",1 "+s*h+","+s*p+"L0,0"+"Z"}var t=Zt,n=en,r=tn,i=nn;return e.innerRadius=function(n){return arguments.length?(t=u(n),e):t},e.outerRadius=function(t){return arguments.length?(n=u(t),e):n},e.startAngle=function(t){return arguments.length?(r=u(t),e):r},e.endAngle=function(t){return arguments.length?(i=u(t),e):i},e.centroid=function(){var e=(t.apply(this,arguments)+n.apply(this,arguments))/2,s=(r.apply(this,arguments)+i.apply(this,arguments))/2+Xs;return[Math.cos(s)*e,Math.sin(s)*e]},e};var Xs=-Math.PI/2,Vs=2*Math.PI-1e-6;d3.svg.line=function(){return rn(i)};var $s=d3.map({linear:un,"linear-closed":an,"step-before":fn,"step-after":ln,basis:mn,"basis-open":gn,"basis-closed":yn,bundle:bn,cardinal:pn,"cardinal-open":cn,"cardinal-closed":hn,monotone:Nn});$s.forEach(function(e,t){t.key=e,t.closed=/-closed$/.test(e)});var Js=[0,2/3,1/3,0],Ks=[0,1/3,2/3,0],Qs=[0,1/6,2/3,1/6];d3.svg.line.radial=function(){var e=rn(Cn);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},fn.reverse=ln,ln.reverse=fn,d3.svg.area=function(){return kn(i)},d3.svg.area.radial=function(){var e=kn(Cn);return e.radius=e.x,delete e.x,e.innerRadius=e.x0,delete e.x0,e.outerRadius=e.x1,delete e.x1,e.angle=e.y,delete e.y,e.startAngle=e.y0,delete e.y0,e.endAngle=e.y1,delete e.y1,e},d3.svg.chord=function(){function e(e,u){var a=t(this,s,e,u),f=t(this,o,e,u);return"M"+a.p0+r(a.r,a.p1,a.a1-a.a0)+(n(a,f)?i(a.r,a.p1,a.r,a.p0):i(a.r,a.p1,f.r,f.p0)+r(f.r,f.p1,f.a1-f.a0)+i(f.r,f.p1,a.r,a.p0))+"Z"}function t(e,t,n,r){var i=t.call(e,n,r),s=a.call(e,i,r),o=f.call(e,i,r)+Xs,u=l.call(e,i,r)+Xs;return{r:s,a0:o,a1:u,p0:[s*Math.cos(o),s*Math.sin(o)],p1:[s*Math.cos(u),s*Math.sin(u)]}}function n(e,t){return e.a0==t.a0&&e.a1==t.a1}function r(e,t,n){return"A"+e+","+e+" 0 "+ +(n>Math.PI)+",1 "+t}function i(e,t,n,r){return"Q 0,0 "+r}var s=Ln,o=An,a=On,f=tn,l=nn;return e.radius=function(t){return arguments.length?(a=u(t),e):a},e.source=function(t){return arguments.length?(s=u(t),e):s},e.target=function(t){return arguments.length?(o=u(t),e):o},e.startAngle=function(t){return arguments.length?(f=u(t),e):f},e.endAngle=function(t){return arguments.length?(l=u(t),e):l},e},d3.svg.diagonal=function(){function e(e,i){var s=t.call(this,e,i),o=n.call(this,e,i),u=(s.y+o.y)/2,a=[s,{x:s.x,y:u},{x:o.x,y:u},o];return a=a.map(r),"M"+a[0]+"C"+a[1]+" "+a[2]+" "+a[3]}var t=Ln,n=An,r=Dn;return e.source=function(n){return arguments.length?(t=u(n),e):t},e.target=function(t){return arguments.length?(n=u(t),e):n},e.projection=function(t){return arguments.length?(r=t,e):r},e},d3.svg.diagonal.radial=function(){var e=d3.svg.diagonal(),t=Dn,n=e.projection;return e.projection=function(e){return arguments.length?n(Pn(t=e)):t},e},d3.svg.mouse=d3.mouse,d3.svg.touches=d3.touches,d3.svg.symbol=function(){function e(e,r){return(Gs.get(t.call(this,e,r))||jn)(n.call(this,e,r))}var t=Bn,n=Hn;return e.type=function(n){return arguments.length?(t=u(n),e):t},e.size=function(t){return arguments.length?(n=u(t),e):n},e};var Gs=d3.map({circle:jn,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+ -3*t+","+ -t+"H"+ -t+"V"+ -3*t+"H"+t+"V"+ -t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+ -t+"V"+t+"H"+ -3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Zs)),n=t*Zs;return"M0,"+ -t+"L"+n+",0"+" 0,"+t+" "+ -n+",0"+"Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+ -t+","+ -t+"L"+t+","+ -t+" "+t+","+t+" "+ -t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Ys),n=t*Ys/2;return"M0,"+n+"L"+t+","+ -n+" "+ -t+","+ -n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Ys),n=t*Ys/2;return"M0,"+ -n+"L"+t+","+n+" "+ -t+","+n+"Z"}});d3.svg.symbolTypes=Gs.keys();var Ys=Math.sqrt(3),Zs=Math.tan(30*Math.PI/180);d3.svg.axis=function(){function e(e){e.each(function(){var e=d3.select(this),c=a==null?t.ticks?t.ticks.apply(t,u):t.domain():a,h=f==null?t.tickFormat?t.tickFormat.apply(t,u):String:f,p=qn(t,c,l),d=e.selectAll(".minor").data(p,String),v=d.enter().insert("line","g").attr("class","tick minor").style("opacity",1e-6),m=d3.transition(d.exit()).style("opacity",1e-6).remove(),g=d3.transition(d).style("opacity",1),y=e.selectAll("g").data(c,String),b=y.enter().insert("g","path").style("opacity",1e-6),w=d3.transition(y.exit()).style("opacity",1e-6).remove(),E=d3.transition(y).style("opacity",1),S,x=_t(t),T=e.selectAll(".domain").data([0]),N=T.enter().append("path").attr("class","domain"),C=d3.transition(T),k=t.copy(),L=this.__chart__||k;this.__chart__=k,b.append("line").attr("class","tick"),b.append("text");var A=b.select("line"),O=E.select("line"),M=y.select("text").text(h),_=b.select("text"),D=E.select("text");switch(n){case"bottom":S=Fn,v.attr("y2",i),g.attr("x2",0).attr("y2",i),A.attr("y2",r),_.attr("y",Math.max(r,0)+o),O.attr("x2",0).attr("y2",r),D.attr("x",0).attr("y",Math.max(r,0)+o),M.attr("dy",".71em").attr("text-anchor","middle"),C.attr("d","M"+x[0]+","+s+"V0H"+x[1]+"V"+s);break;case"top":S=Fn,v.attr("y2",-i),g.attr("x2",0).attr("y2",-i),A.attr("y2",-r),_.attr("y",-(Math.max(r,0)+o)),O.attr("x2",0).attr("y2",-r),D.attr("x",0).attr("y",-(Math.max(r,0)+o)),M.attr("dy","0em").attr("text-anchor","middle"),C.attr("d","M"+x[0]+","+ -s+"V0H"+x[1]+"V"+ -s);break;case"left":S=In,v.attr("x2",-i),g.attr("x2",-i).attr("y2",0),A.attr("x2",-r),_.attr("x",-(Math.max(r,0)+o)),O.attr("x2",-r).attr("y2",0),D.attr("x",-(Math.max(r,0)+o)).attr("y",0),M.attr("dy",".32em").attr("text-anchor","end"),C.attr("d","M"+ -s+","+x[0]+"H0V"+x[1]+"H"+ -s);break;case"right":S=In,v.attr("x2",i),g.attr("x2",i).attr("y2",0),A.attr("x2",r),_.attr("x",Math.max(r,0)+o),O.attr("x2",r).attr("y2",0),D.attr("x",Math.max(r,0)+o).attr("y",0),M.attr("dy",".32em").attr("text-anchor","start"),C.attr("d","M"+s+","+x[0]+"H0V"+x[1]+"H"+s)}if(t.ticks)b.call(S,L),E.call(S,k),w.call(S,k),v.call(S,L),g.call(S,k),m.call(S,k);else{var P=k.rangeBand()/2,H=function(e){return k(e)+P};b.call(S,H),E.call(S,H)}})}var t=d3.scale.linear(),n="bottom",r=6,i=6,s=6,o=3,u=[10],a=null,f,l=0;return e.scale=function(n){return arguments.length?(t=n,e):t},e.orient=function(t){return arguments.length?(n=t,e):n},e.ticks=function(){return arguments.length?(u=arguments,e):u},e.tickValues=function(t){return arguments.length?(a=t,e):a},e.tickFormat=function(t){return arguments.length?(f=t,e):f},e.tickSize=function(t,n,o){if(!arguments.length)return r;var u=arguments.length-1;return r=+t,i=u>1?+n:r,s=u>0?+arguments[u]:r,e},e.tickPadding=function(t){return arguments.length?(o=+t,e):o},e.tickSubdivide=function(t){return arguments.length?(l=+t,e):l},e},d3.svg.brush=function(){function e(s){s.each(function(){var s=d3.select(this),f=s.selectAll(".background").data([0]),l=s.selectAll(".extent").data([0]),c=s.selectAll(".resize").data(a,String),h;s.style("pointer-events","all").on("mousedown.brush",i).on("touchstart.brush",i),f.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),l.enter().append("rect").attr("class","extent").style("cursor","move"),c.enter().append("g").attr("class",function(e){return"resize "+e}).style("cursor",function(e){return eo[e]}).append("rect").attr("x",function(e){return/[ew]$/.test(e)?-3:null}).attr("y",function(e){return/^[ns]/.test(e)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),c.style("display",e.empty()?"none":null),c.exit().remove(),o&&(h=_t(o),f.attr("x",h[0]).attr("width",h[1]-h[0]),n(s)),u&&(h=_t(u),f.attr("y",h[0]).attr("height",h[1]-h[0]),r(s)),t(s)})}function t(e){e.selectAll(".resize").attr("transform",function(e){return"translate("+f[+/e$/.test(e)][0]+","+f[+/^s/.test(e)][1]+")"})}function n(e){e.select(".extent").attr("x",f[0][0]),e.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1][0]-f[0][0])}function r(e){e.select(".extent").attr("y",f[0][1]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1][1]-f[0][1])}function i(){function i(){var e=d3.event.changedTouches;return e?d3.touches(v,e)[0]:d3.mouse(v)}function a(){d3.event.keyCode==32&&(S||(x=null,T[0]-=f[1][0],T[1]-=f[1][1],S=2),M())}function c(){d3.event.keyCode==32&&S==2&&(T[0]+=f[1][0],T[1]+=f[1][1],S=0,M())}function h(){var e=i(),s=!1;N&&(e[0]+=N[0],e[1]+=N[1]),S||(d3.event.altKey?(x||(x=[(f[0][0]+f[1][0])/2,(f[0][1]+f[1][1])/2]),T[0]=f[+(e[0]<x[0])][0],T[1]=f[+(e[1]<x[1])][1]):x=null),w&&p(e,o,0)&&(n(y),s=!0),E&&p(e,u,1)&&(r(y),s=!0),s&&(t(y),g({type:"brush",mode:S?"move":"resize"}))}function p(e,t,n){var r=_t(t),i=r[0],s=r[1],o=T[n],u=f[1][n]-f[0][n],a,c;S&&(i-=o,s-=u+o),a=Math.max(i,Math.min(s,e[n])),S?c=(a+=o)+u:(x&&(o=Math.max(i,Math.min(s,2*x[n]-a))),o<a?(c=a,a=o):c=o);if(f[0][n]!==a||f[1][n]!==c)return l=null,f[0][n]=a,f[1][n]=c,!0}function d(){h(),y.style("pointer-events","all").selectAll(".resize").style("display",e.empty()?"none":null),d3.select("body").style("cursor",null),C.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),g({type:"brushend"}),M()}var v=this,m=d3.select(d3.event.target),g=s.of(v,arguments),y=d3.select(v),b=m.datum(),w=!/^(n|s)$/.test(b)&&o,E=!/^(e|w)$/.test(b)&&u,S=m.classed("extent"),x,T=i(),N,C=d3.select(window).on("mousemove.brush",h).on("mouseup.brush",d).on("touchmove.brush",h).on("touchend.brush",d).on("keydown.brush",a).on("keyup.brush",c);if(S)T[0]=f[0][0]-T[0],T[1]=f[0][1]-T[1];else if(b){var k=+/w$/.test(b),L=+/^n/.test(b);N=[f[1-k][0]-T[0],f[1-L][1]-T[1]],T[0]=f[k][0],T[1]=f[L][1]}else d3.event.altKey&&(x=T.slice());y.style("pointer-events","none").selectAll(".resize").style("display",null),d3.select("body").style("cursor",m.style("cursor")),g({type:"brushstart"}),h(),M()}var s=D(e,"brushstart","brush","brushend"),o=null,u=null,a=to[0],f=[[0,0],[0,0]],l;return e.x=function(t){return arguments.length?(o=t,a=to[!o<<1|!u],e):o},e.y=function(t){return arguments.length?(u=t,a=to[!o<<1|!u],e):u},e.extent=function(t){var n,r,i,s,a;return arguments.length?(l=[[0,0],[0,0]],o&&(n=t[0],r=t[1],u&&(n=n[0],r=r[0]),l[0][0]=n,l[1][0]=r,o.invert&&(n=o(n),r=o(r)),r<n&&(a=n,n=r,r=a),f[0][0]=n|0,f[1][0]=r|0),u&&(i=t[0],s=t[1],o&&(i=i[1],s=s[1]),l[0][1]=i,l[1][1]=s,u.invert&&(i=u(i),s=u(s)),s<i&&(a=i,i=s,s=a),f[0][1]=i|0,f[1][1]=s|0),e):(t=l||f,o&&(n=t[0][0],r=t[1][0],l||(n=f[0][0],r=f[1][0],o.invert&&(n=o.invert(n),r=o.invert(r)),r<n&&(a=n,n=r,r=a))),u&&(i=t[0][1],s=t[1][1],l||(i=f[0][1],s=f[1][1],u.invert&&(i=u.invert(i),s=u.invert(s)),s<i&&(a=i,i=s,s=a))),o&&u?[[n,i],[r,s]]:o?[n,r]:u&&[i,s])},e.clear=function(){return l=null,f[0][0]=f[0][1]=f[1][0]=f[1][1]=0,e},e.empty=function(){return o&&f[0][0]===f[1][0]||u&&f[0][1]===f[1][1]},d3.rebind(e,s,"on")};var eo={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},to=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];d3.behavior={},d3.behavior.drag=function(){function e(){this.on("mousedown.drag",t).on("touchstart.drag",t)}function t(){function e(){var e=o.parentNode;return f?d3.touches(e).filter(function(e){return e.identifier===f})[0]:d3.mouse(e)}function t(){if(!o.parentNode)return i();var t=e(),n=t[0]-c[0],r=t[1]-c[1];h|=n|r,c=t,M(),u({type:"drag",x:t[0]+l[0],y:t[1]+l[1],dx:n,dy:r})}function i(){u({type:"dragend"}),h&&(M(),d3.event.target===a&&p.on("click.drag",s,!0)),p.on(f?"touchmove.drag-"+f:"mousemove.drag",null).on(f?"touchend.drag-"+f:"mouseup.drag",null)}function s(){M(),p.on("click.drag",null)}var o=this,u=n.of(o,arguments),a=d3.event.target,f=d3.event.touches&&d3.event.changedTouches[0].identifier,l,c=e(),h=0,p=d3.select(window).on(f?"touchmove.drag-"+f:"mousemove.drag",t).on(f?"touchend.drag-"+f:"mouseup.drag",i,!0);r?(l=r.apply(o,arguments),l=[l.x-c[0],l.y-c[1]]):l=[0,0],f||M(),u({type:"dragstart"})}var n=D(e,"drag","dragstart","dragend"),r=null;return e.origin=function(t){return arguments.length?(r=t,e):r},d3.rebind(e,n,"on")},d3.behavior.zoom=function(){function e(){this.on("mousedown.zoom",o).on("mousewheel.zoom",u).on("mousemove.zoom",a).on("DOMMouseScroll.zoom",u).on("dblclick.zoom",f).on("touchstart.zoom",l).on("touchmove.zoom",c).on("touchend.zoom",l)}function t(e){return[(e[0]-h[0])/d,(e[1]-h[1])/d]}function n(e){return[e[0]*d+h[0],e[1]*d+h[1]]}function r(e){d=Math.max(m[0],Math.min(m[1],e))}function i(e,t){t=n(t),h[0]+=e[0]-t[0],h[1]+=e[1]-t[1]}function s(e){b&&b.domain(y.range().map(function(e){return(e-h[0])/d}).map(y.invert)),E&&E.domain(w.range().map(function(e){return(e-h[1])/d}).map(w.invert)),d3.event.preventDefault(),e({type:"zoom",scale:d,translate:h})}function o(){function e(){f=1,i(d3.mouse(o),c),s(u)}function n(){f&&M(),l.on("mousemove.zoom",null).on("mouseup.zoom",null),f&&d3.event.target===a&&l.on("click.zoom",r,!0)}function r(){M(),l.on("click.zoom",null)}var o=this,u=g.of(o,arguments),a=d3.event.target,f=0,l=d3.select(window).on("mousemove.zoom",e).on("mouseup.zoom",n),c=t(d3.mouse(o));window.focus(),M()}function u(){p||(p=t(d3.mouse(this))),r(Math.pow(2,Rn()*.002)*d),i(d3.mouse(this),p),s(g.of(this,arguments))}function a(){p=null}function f(){var e=d3.mouse(this),n=t(e);r(d3.event.shiftKey?d/2:d*2),i(e,n),s(g.of(this,arguments))}function l(){var e=d3.touches(this),n=Date.now();v=d,p={},e.forEach(function(e){p[e.identifier]=t(e)}),M();if(e.length===1){if(n-S<500){var o=e[0],u=t(e[0]);r(d*2),i(o,u),s(g.of(this,arguments))}S=n}}function c(){var e=d3.touches(this),t=e[0],n=p[t.identifier];if(o=e[1]){var o,u=p[o.identifier];t=[(t[0]+o[0])/2,(t[1]+o[1])/2],n=[(n[0]+u[0])/2,(n[1]+u[1])/2],r(d3.event.scale*v)}i(t,n),S=null,s(g.of(this,arguments))}var h=[0,0],p,d=1,v,m=ro,g=D(e,"zoom"),y,b,w,E,S;return e.translate=function(t){return arguments.length?(h=t.map(Number),e):h},e.scale=function(t){return arguments.length?(d=+t,e):d},e.scaleExtent=function(t){return arguments.length?(m=t==null?ro:t.map(Number),e):m},e.x=function(t){return arguments.length?(b=t,y=t.copy(),e):b},e.y=function(t){return arguments.length?(E=t,w=t.copy(),e):E},d3.rebind(e,g,"on")};var no,ro=[0,Infinity];d3.layout={},d3.layout.bundle=function(){return function(e){var t=[],n=-1,r=e.length;while(++n<r)t.push(Un(e[n]));return t}},d3.layout.chord=function(){function e(){var e={},n=[],c=d3.range(o),h=[],p,d,v,m,g;r=[],i=[],p=0,m=-1;while(++m<o){d=0,g=-1;while(++g<o)d+=s[m][g];n.push(d),h.push(d3.range(o)),p+=d}a&&c.sort(function(e,t){return a(n[e],n[t])}),f&&h.forEach(function(e,t){e.sort(function(e,n){return f(s[t][e],s[t][n])})}),p=(2*Math.PI-u*o)/p,d=0,m=-1;while(++m<o){v=d,g=-1;while(++g<o){var y=c[m],b=h[y][g],w=s[y][b],E=d,S=d+=w*p;e[y+"-"+b]={index:y,subindex:b,startAngle:E,endAngle:S,value:w}}i[y]={index:y,startAngle:v,endAngle:d,value:(d-v)/p},d+=u}m=-1;while(++m<o){g=m-1;while(++g<o){var x=e[m+"-"+g],T=e[g+"-"+m];(x.value||T.value)&&r.push(x.value<T.value?{source:T,target:x}:{source:x,target:T})}}l&&t()}function t(){r.sort(function(e,t){return l((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)})}var n={},r,i,s,o,u=0,a,f,l;return n.matrix=function(e){return arguments.length?(o=(s=e)&&s.length,r=i=null,n):s},n.padding=function(e){return arguments.length?(u=e,r=i=null,n):u},n.sortGroups=function(e){return arguments.length?(a=e,r=i=null,n):a},n.sortSubgroups=function(e){return arguments.length?(f=e,r=null,n):f},n.sortChords=function(e){return arguments.length?(l=e,r&&t(),n):l},n.chords=function(){return r||e(),r},n.groups=function(){return i||e(),i},n},d3.layout.force=function(){function e(e){return function(t,n,r,i,s){if(t.point!==e){var o=t.cx-e.x,u=t.cy-e.y,a=1/Math.sqrt(o*o+u*u);if((i-n)*a<d){var f=t.charge*a*a;return e.px-=o*f,e.py-=u*f,!0}if(t.point&&isFinite(a)){var f=t.pointCharge*a*a;e.px-=o*f,e.py-=u*f}}return!t.charge}}function t(e){e.px=d3.event.x,e.py=d3.event.y,n.resume()}var n={},r=d3.dispatch("start","tick","end"),s=[1,1],o,a,f=.9,l=Qn,c=Gn,h=-30,p=.1,d=.8,v,m=[],g=[],y,b,w;return n.tick=function(){if((a*=.99)<.005)return r.end({type:"end",alpha:a=0}),!0;var t=m.length,n=g.length,i,o,u,l,c,d,v,E,S;for(o=0;o<n;++o){u=g[o],l=u.source,c=u.target,E=c.x-l.x,S=c.y-l.y;if(d=E*E+S*S)d=a*b[o]*((d=Math.sqrt(d))-y[o])/d,E*=d,S*=d,c.x-=E*(v=l.weight/(c.weight+l.weight)),c.y-=S*v,l.x+=E*(v=1-v),l.y+=S*v}if(v=a*p){E=s[0]/2,S=s[1]/2,o=-1;if(v)while(++o<t)u=m[o],u.x+=(E-u.x)*v,u.y+=(S-u.y)*v}if(h){Kn(i=d3.geom.quadtree(m),a,w),o=-1;while(++o<t)(u=m[o]).fixed||i.visit(e(u))}o=-1;while(++o<t)u=m[o],u.fixed?(u.x=u.px,u.y=u.py):(u.x-=(u.px-(u.px=u.x))*f,u.y-=(u.py-(u.py=u.y))*f);r.tick({type:"tick",alpha:a})},n.nodes=function(e){return arguments.length?(m=e,n):m},n.links=function(e){return arguments.length?(g=e,n):g},n.size=function(e){return arguments.length?(s=e,n):s},n.linkDistance=function(e){return arguments.length?(l=u(e),n):l},n.distance=n.linkDistance,n.linkStrength=function(e){return arguments.length?(c=u(e),n):c},n.friction=function(e){return arguments.length?(f=e,n):f},n.charge=function(e){return arguments.length?(h=typeof e=="function"?e:+e,n):h},n.gravity=function(e){return arguments.length?(p=e,n):p},n.theta=function(e){return arguments.length?(d=e,n):d},n.alpha=function(e){return arguments.length?(a?e>0?a=e:a=0:e>0&&(r.start({type:"start",alpha:a=e}),d3.timer(n.tick)),n):a},n.start=function(){function e(e,n){var i=t(r),s=-1,o=i.length,u;while(++s<o)if(!isNaN(u=i[s][e]))return u;return Math.random()*n}function t(){if(!p){p=[];for(i=0;i<o;++i)p[i]=[];for(i=0;i<u;++i){var e=g[i];p[e.source.index].push(e.target),p[e.target.index].push(e.source)}}return p[r]}var r,i,o=m.length,u=g.length,a=s[0],f=s[1],p,d;for(r=0;r<o;++r)(d=m[r]).index=r,d.weight=0;y=[],b=[];for(r=0;r<u;++r)d=g[r],typeof d.source=="number"&&(d.source=m[d.source]),typeof d.target=="number"&&(d.target=m[d.target]),y[r]=l.call(this,d,r),b[r]=c.call(this,d,r),++d.source.weight,++d.target.weight;for(r=0;r<o;++r)d=m[r],isNaN(d.x)&&(d.x=e("x",a)),isNaN(d.y)&&(d.y=e("y",f)),isNaN(d.px)&&(d.px=d.x),isNaN(d.py)&&(d.py=d.y);w=[];if(typeof h=="function")for(r=0;r<o;++r)w[r]=+h.call(this,m[r],r);else for(r=0;r<o;++r)w[r]=h;return n.resume()},n.resume=function(){return n.alpha(.1)},n.stop=function(){return n.alpha(0)},n.drag=function(){o||(o=d3.behavior.drag().origin(i).on("dragstart",Xn).on("drag",t).on("dragend",Vn)),this.on("mouseover.force",$n).on("mouseout.force",Jn).call(o)},d3.rebind(n,r,"on")},d3.layout.partition=function(){function e(t,n,r,i){var s=t.children;t.x=n,t.y=t.depth*i,t.dx=r,t.dy=i;if(s&&(u=s.length)){var o=-1,u,a,f;r=t.value?r/t.value:0;while(++o<u)e(a=s[o],n,f=a.value*r,i),n+=f}}function t(e){var n=e.children,r=0;if(n&&(s=n.length)){var i=-1,s;while(++i<s)r=Math.max(r,t(n[i]))}return 1+r}function n(n,s){var o=r.call(this,n,s);return e(o[0],0,i[0],i[1]/t(o[0])),o}var r=d3.layout.hierarchy(),i=[1,1];return n.size=function(e){return arguments.length?(i=e,n):i},fr(n,r)},d3.layout.pie=function(){function e(s,o){var u=s.map(function(n,r){return+t.call(e,n,r)}),a=+(typeof r=="function"?r.apply(this,arguments):r),f=((typeof i=="function"?i.apply(this,arguments):i)-r)/d3.sum(u),l=d3.range(s.length);n!=null&&l.sort(n===io?function(e,t){return u[t]-u[e]}:function(e,t){return n(s[e],s[t])});var c=[];return l.forEach(function(e){var t;c[e]={data:s[e],value:t=u[e],startAngle:a,endAngle:a+=t*f}}),c}var t=Number,n=io,r=0,i=2*Math.PI;return e.value=function(n){return arguments.length?(t=n,e):t},e.sort=function(t){return arguments.length?(n=t,e):n},e.startAngle=function(t){return arguments.length?(r=t,e):r},e.endAngle=function(t){return arguments.length?(i=t,e):i},e};var io={};d3.layout.stack=function(){function e(i,a){var f=i.map(function(n,r){return t.call(e,n,r)}),l=f.map(function(t,n){return t.map(function(t,n){return[o.call(e,t,n),u.call(e,t,n)]})}),c=n.call(e,l,a);f=d3.permute(f,c),l=d3.permute(l,c);var h=r.call(e,l,a),p=f.length,d=f[0].length,v,m,g;for(m=0;m<d;++m){s.call(e,f[0][m],g=h[m],l[0][m][1]);for(v=1;v<p;++v)s.call(e,f[v][m],g+=l[v-1][m][1],l[v][m][1])}return i}var t=i,n=tr,r=nr,s=er,o=Yn,u=Zn;return e.values=function(n){return arguments.length?(t=n,e):t},e.order=function(t){return arguments.length?(n=typeof t=="function"?t:so.get(t)||tr,e):n},e.offset=function(t){return arguments.length?(r=typeof t=="function"?t:oo.get(t)||nr,e):r},e.x=function(t){return arguments.length?(o=t,e):o},e.y=function(t){return arguments.length?(u=t,e):u},e.out=function(t){return arguments.length?(s=t,e):s},e};var so=d3.map({"inside-out":function(e){var t=e.length,n,r,i=e.map(rr),s=e.map(ir),o=d3.range(t).sort(function(e,t){return i[e]-i[t]}),u=0,a=0,f=[],l=[];for(n=0;n<t;++n)r=o[n],u<a?(u+=s[r],f.push(r)):(a+=s[r],l.push(r));return l.reverse().concat(f)},reverse:function(e){return d3.range(e.length).reverse()},"default":tr}),oo=d3.map({silhouette:function(e){var t=e.length,n=e[0].length,r=[],i=0,s,o,u,a=[];for(o=0;o<n;++o){for(s=0,u=0;s<t;s++)u+=e[s][o][1];u>i&&(i=u),r.push(u)}for(o=0;o<n;++o)a[o]=(i-r[o])/2;return a},wiggle:function(e){var t=e.length,n=e[0],r=n.length,i=0,s,o,u,a,f,l,c,h,p,d=[];d[0]=h=p=0;for(o=1;o<r;++o){for(s=0,a=0;s<t;++s)a+=e[s][o][1];for(s=0,f=0,c=n[o][0]-n[o-1][0];s<t;++s){for(u=0,l=(e[s][o][1]-e[s][o-1][1])/(2*c);u<s;++u)l+=(e[u][o][1]-e[u][o-1][1])/c;f+=l*e[s][o][1]}d[o]=h-=a?f/a*c:0,h<p&&(p=h)}for(o=0;o<r;++o)d[o]-=p;return d},expand:function(e){var t=e.length,n=e[0].length,r=1/t,i,s,o,u=[];for(s=0;s<n;++s){for(i=0,o=0;i<t;i++)o+=e[i][s][1];if(o)for(i=0;i<t;i++)e[i][s][1]/=o;else for(i=0;i<t;i++)e[i][s][1]=r}for(s=0;s<n;++s)u[s]=0;return u},zero:nr});d3.layout.histogram=function(){function e(e,s){var o=[],u=e.map(n,this),a=r.call(this,u,s),f=i.call(this,a,u,s),l,s=-1,c=u.length,h=f.length-1,p=t?1:1/c,d;while(++s<h)l=o[s]=[],l.dx=f[s+1]-(l.x=f[s]),l.y=0;if(h>0){s=-1;while(++s<c)d=u[s],d>=a[0]&&d<=a[1]&&(l=o[d3.bisect(f,d,1,h)-1],l.y+=p,l.push(e[s]))}return o}var t=!0,n=Number,r=ar,i=or;return e.value=function(t){return arguments.length?(n=t,e):n},e.range=function(t){return arguments.length?(r=u(t),e):r},e.bins=function(t){return arguments.length?(i=typeof t=="number"?function(e){return ur(e,t)}:u(t),e):i},e.frequency=function(n){return arguments.length?(t=!!n,e):t},e},d3.layout.hierarchy=function(){function e(t,o,u){var a=i.call(n,t,o),f=uo?t:{data:t};f.depth=o,u.push(f);if(a&&(c=a.length)){var l=-1,c,h=f.children=[],p=0,d=o+1,v;while(++l<c)v=e(a[l],d,u),v.parent=f,h.push(v),p+=v.value;r&&h.sort(r),s&&(f.value=p)}else s&&(f.value=+s.call(n,t,o)||0);return f}function t(e,r){var i=e.children,o=0;if(i&&(a=i.length)){var u=-1,a,f=r+1;while(++u<a)o+=t(i[u],f)}else s&&(o=+s.call(n,uo?e:e.data,r)||0);return s&&(e.value=o),o}function n(t){var n=[];return e(t,0,n),n}var r=hr,i=lr,s=cr;return n.sort=function(e){return arguments.length?(r=e,n):r},n.children=function(e){return arguments.length?(i=e,n):i},n.value=function(e){return arguments.length?(s=e,n):s},n.revalue=function(e){return t(e,0),e},n};var uo=!1;d3.layout.pack=function(){function e(e,i){var s=t.call(this,e,i),o=s[0];o.x=0,o.y=0,Pr(o,function(e){e.r=Math.sqrt(e.value)}),Pr(o,yr);var u=r[0],a=r[1],f=Math.max(2*o.r/u,2*o.r/a);if(n>0){var l=n*f/2;Pr(o,function(e){e.r+=l}),Pr(o,yr),Pr(o,function(e){e.r-=l}),f=Math.max(2*o.r/u,2*o.r/a)}return Er(o,u/2,a/2,1/f),s}var t=d3.layout.hierarchy().sort(dr),n=0,r=[1,1];return e.size=function(t){return arguments.length?(r=t,e):r},e.padding=function(t){return arguments.length?(n=+t,e):n},fr(e,t)},d3.layout.cluster=function(){function e(e,i){var s=t.call(this,e,i),o=s[0],u,a=0,f,l;Pr(o,function(e){var t=e.children;t&&t.length?(e.x=Tr(t),e.y=xr(t)):(e.x=u?a+=n(e,u):0,e.y=0,u=e)});var c=Nr(o),h=Cr(o),p=c.x-n(c,h)/2,d=h.x+n(h,c)/2;return Pr(o,function(e){e.x=(e.x-p)/(d-p)*r[0],e.y=(1-(o.y?e.y/o.y:1))*r[1]}),s}var t=d3.layout.hierarchy().sort(null).value(null),n=kr,r=[1,1];return e.separation=function(t){return arguments.length?(n=t,e):n},e.size=function(t){return arguments.length?(r=t,e):r},fr(e,t)},d3.layout.tree=function(){function e(e,i){function s(e,t){var r=e.children,i=e._tree;if(r&&(o=r.length)){var o,a=r[0],f,l=a,c,h=-1;while(++h<o)c=r[h],s(c,f),l=u(c,f,l),f=c;Hr(e);var p=.5*(a._tree.prelim+c._tree.prelim);t?(i.prelim=t._tree.prelim+n(e,t),i.mod=i.prelim-p):i.prelim=p}else t&&(i.prelim=t._tree.prelim+n(e,t))}function o(e,t){e.x=e._tree.prelim+t;var n=e.children;if(n&&(i=n.length)){var r=-1,i;t+=e._tree.mod;while(++r<i)o(n[r],t)}}function u(e,t,r){if(t){var i=e,s=e,o=t,u=e.parent.children[0],a=i._tree.mod,f=s._tree.mod,l=o._tree.mod,c=u._tree.mod,h;while(o=Ar(o),i=Lr(i),o&&i)u=Lr(u),s=Ar(s),s._tree.ancestor=e,h=o._tree.prelim+l-i._tree.prelim-a+n(o,i),h>0&&(Br(jr(o,e,r),e,h),a+=h,f+=h),l+=o._tree.mod,a+=i._tree.mod,c+=u._tree.mod,f+=s._tree.mod;o&&!Ar(s)&&(s._tree.thread=o,s._tree.mod+=l-f),i&&!Lr(u)&&(u._tree.thread=i,u._tree.mod+=a-c,r=e)}return r}var a=t.call(this,e,i),f=a[0];Pr(f,function(e,t){e._tree={ancestor:e,prelim:0,mod:0,change:0,shift:0,number:t?t._tree.number+1:0}}),s(f),o(f,-f._tree.prelim);var l=Or(f,_r),c=Or(f,Mr),h=Or(f,Dr),p=l.x-n(l,c)/2,d=c.x+n(c,l)/2,v=h.depth||1;return Pr(f,function(e){e.x=(e.x-p)/(d-p)*r[0],e.y=e.depth/v*r[1],delete e._tree}),a}var t=d3.layout.hierarchy().sort(null).value(null),n=kr,r=[1,1];return e.separation=function(t){return arguments.length?(n=t,e):n},e.size=function(t){return arguments.length?(r=t,e):r},fr(e,t)},d3.layout.treemap=function(){function e(e,t){var n=-1,r=e.length,i,s;while(++n<r)s=(i=e[n]).value*(t<0?0:t),i.area=isNaN(s)||s<=0?0:s}function t(n){var s=n.children;if(s&&s.length){var o=l(n),u=[],a=s.slice(),f,c=Infinity,h,p=Math.min(o.dx,o.dy),d;e(a,o.dx*o.dy/n.value),u.area=0;while((d=a.length)>0)u.push(f=a[d-1]),u.area+=f.area,(h=r(u,p))<=c?(a.pop(),c=h):(u.area-=u.pop().area,i(u,p,o,!1),p=Math.min(o.dx,o.dy),u.length=u.area=0,c=Infinity);u.length&&(i(u,p,o,!0),u.length=u.area=0),s.forEach(t)}}function n(t){var r=t.children;if(r&&r.length){var s=l(t),o=r.slice(),u,a=[];e(o,s.dx*s.dy/t.value),a.area=0;while(u=o.pop())a.push(u),a.area+=u.area,u.z!=null&&(i(a,u.z?s.dx:s.dy,s,!o.length),a.length=a.area=0);r.forEach(n)}}function r(e,t){var n=e.area,r,i=0,s=Infinity,o=-1,u=e.length;while(++o<u){if(!(r=e[o].area))continue;r<s&&(s=r),r>i&&(i=r)}return n*=n,t*=t,n?Math.max(t*i*p/n,n/(t*s*p)):Infinity}function i(e,t,n,r){var i=-1,s=e.length,o=n.x,a=n.y,f=t?u(e.area/t):0,l;if(t==n.dx){if(r||f>n.dy)f=n.dy;while(++i<s)l=e[i],l.x=o,l.y=a,l.dy=f,o+=l.dx=Math.min(n.x+n.dx-o,f?u(l.area/f):0);l.z=!0,l.dx+=n.x+n.dx-o,n.y+=f,n.dy-=f}else{if(r||f>n.dx)f=n.dx;while(++i<s)l=e[i],l.x=o,l.y=a,l.dx=f,a+=l.dy=Math.min(n.y+n.dy-a,f?u(l.area/f):0);l.z=!1,l.dy+=n.y+n.dy-a,n.x+=f,n.dx-=f}}function s(r){var i=h||o(r),s=i[0];return s.x=0,s.y=0,s.dx=a[0],s.dy=a[1],h&&o.revalue(s),e([s],s.dx*s.dy/s.value),(h?n:t)(s),c&&(h=i),i}var o=d3.layout.hierarchy(),u=Math.round,a=[1,1],f=null,l=Fr,c=!1,h,p=.5*(1+Math.sqrt(5));return s.size=function(e){return arguments.length?(a=e,s):a},s.padding=function(e){function t(t){var n=e.call(s,t,t.depth);return n==null?Fr(t):Ir(t,typeof n=="number"?[n,n,n,n]:n)}function n(t){return Ir(t,e)}if(!arguments.length)return f;var r;return l=(f=e)==null?Fr:(r=typeof e)==="function"?t:r==="number"?(e=[e,e,e,e],n):n,s},s.round=function(e){return arguments.length?(u=e?Math.round:Number,s):u!=Number},s.sticky=function(e){return arguments.length?(c=e,h=null,s):c},s.ratio=function(e){return arguments.length?(p=e,s):p},fr(s,o)},d3.csv=qr(",","text/csv"),d3.tsv=qr(" ","text/tab-separated-values"),d3.geo={};var ao=Math.PI/180;d3.geo.azimuthal=function(){function e(e){var n=e[0]*ao-s,o=e[1]*ao,f=Math.cos(n),l=Math.sin(n),c=Math.cos(o),h=Math.sin(o),p=t!=="orthographic"?a*h+u*c*f:null,d,v=t==="stereographic"?1/(1+p):t==="gnomonic"?1/p:t==="equidistant"?(d=Math.acos(p),d?d/Math.sin(d):0):t==="equalarea"?Math.sqrt(2/(1+p)):1,m=v*c*l,g=v*(a*c*f-u*h);return[r*m+i[0],r*g+i[1]]}var t="orthographic",n,r=200,i=[480,250],s,o,u,a;return e.invert=function(e){var n=(e[0]-i[0])/r,o=(e[1]-i[1])/r,f=Math.sqrt(n*n+o*o),l=t==="stereographic"?2*Math.atan(f):t==="gnomonic"?Math.atan(f):t==="equidistant"?f:t==="equalarea"?2*Math.asin(.5*f):Math.asin(f),c=Math.sin(l),h=Math.cos(l);return[(s+Math.atan2(n*c,f*u*h+o*a*c))/ao,Math.asin(h*a-(f?o*c*u/f:0))/ao]},e.mode=function(n){return arguments.length?(t=n+"",e):t},e.origin=function(t){return arguments.length?(n=t,s=n[0]*ao,o=n[1]*ao,u=Math.cos(o),a=Math.sin(o),e):n},e.scale=function(t){return arguments.length?(r=+t,e):r},e.translate=function(t){return arguments.length?(i=[+t[0],+t[1]],e):i},e.origin([0,0])},d3.geo.albers=function(){function e(e){var t=u*(ao*e[0]-o),n=Math.sqrt(a-2*u*Math.sin(ao*e[1]))/u;return[i*n*Math.sin(t)+s[0],i*(n*Math.cos(t)-f)+s[1]]}function t(){var t=ao*r[0],i=ao*r[1],s=ao*n[1],l=Math.sin(t),c=Math.cos(t);return o=ao*n[0],u=.5*(l+Math.sin(i)),a=c*c+2*u*l,f=Math.sqrt(a-2*u*Math.sin(s))/u,e}var n=[-98,38],r=[29.5,45.5],i=1e3,s=[480,250],o,u,a,f;return e.invert=function(e){var t=(e[0]-s[0])/i,n=(e[1]-s[1])/i,r=f+n,l=Math.atan2(t,r),c=Math.sqrt(t*t+r*r);return[(o+l/u)/ao,Math.asin((a-c*c*u*u)/(2*u))/ao]},e.origin=function(e){return arguments.length?(n=[+e[0],+e[1]],t()):n},e.parallels=function(e){return arguments.length?(r=[+e[0],+e[1]],t()):r},e.scale=function(t){return arguments.length?(i=+t,e):i},e.translate=function(t){return arguments.length?(s=[+t[0],+t[1]],e):s},t()},d3.geo.albersUsa=function(){function e(e){var s=e[0],o=e[1];return(o>50?n:s<-140?r:o<21?i:t)(e)}var t=d3.geo.albers(),n=d3.geo.albers().origin([-160,60]).parallels([55,65]),r=d3.geo.albers().origin([-160,20]).parallels([8,18]),i=d3.geo.albers().origin([-60,10]).parallels([8,18]);return e.scale=function(s){return arguments.length?(t.scale(s),n.scale(s*.6),r.scale(s),i.scale(s*1.5),e.translate(t.translate())):t.scale()},e.translate=function(s){if(!arguments.length)return t.translate();var o=t.scale()/1e3,u=s[0],a=s[1];return t.translate(s),n.translate([u-400*o,a+170*o]),r.translate([u-190*o,a+200*o]),i.translate([u+580*o,a+430*o]),e},e.scale(t.scale())},d3.geo.bonne=function(){function e(e){var u=e[0]*ao-r,a=e[1]*ao-i;if(s){var f=o+s-a,l=u*Math.cos(a)/f;u=f*Math.sin(l),a=f*Math.cos(l)-o}else u*=Math.cos(a),a*=-1;return[t*u+n[0],t*a+n[1]]}var t=200,n=[480,250],r,i,s,o;return e.invert=function(e){var i=(e[0]-n[0])/t,u=(e[1]-n[1])/t;if(s){var a=o+u,f=Math.sqrt(i*i+a*a);u=o+s-f,i=r+f*Math.atan2(i,a)/Math.cos(u)}else u*=-1,i/=Math.cos(u);return[i/ao,u/ao]},e.parallel=function(t){return arguments.length?(o=1/Math.tan
-(s=t*ao),e):s/ao},e.origin=function(t){return arguments.length?(r=t[0]*ao,i=t[1]*ao,e):[r/ao,i/ao]},e.scale=function(n){return arguments.length?(t=+n,e):t},e.translate=function(t){return arguments.length?(n=[+t[0],+t[1]],e):n},e.origin([0,0]).parallel(45)},d3.geo.equirectangular=function(){function e(e){var r=e[0]/360,i=-e[1]/360;return[t*r+n[0],t*i+n[1]]}var t=500,n=[480,250];return e.invert=function(e){var r=(e[0]-n[0])/t,i=(e[1]-n[1])/t;return[360*r,-360*i]},e.scale=function(n){return arguments.length?(t=+n,e):t},e.translate=function(t){return arguments.length?(n=[+t[0],+t[1]],e):n},e},d3.geo.mercator=function(){function e(e){var r=e[0]/360,i=-(Math.log(Math.tan(Math.PI/4+e[1]*ao/2))/ao)/360;return[t*r+n[0],t*Math.max(-0.5,Math.min(.5,i))+n[1]]}var t=500,n=[480,250];return e.invert=function(e){var r=(e[0]-n[0])/t,i=(e[1]-n[1])/t;return[360*r,2*Math.atan(Math.exp(-360*i*ao))/ao-90]},e.scale=function(n){return arguments.length?(t=+n,e):t},e.translate=function(t){return arguments.length?(n=[+t[0],+t[1]],e):n},e},d3.geo.path=function(){function e(e,t){typeof s=="function"&&(o=Ur(s.apply(this,arguments))),f(e);var n=a.length?a.join(""):null;return a=[],n}function t(e){return u(e).join(",")}function n(e){var t=i(e[0]),n=0,r=e.length;while(++n<r)t-=i(e[n]);return t}function r(e){var t=d3.geom.polygon(e[0].map(u)),n=t.area(),r=t.centroid(n<0?(n*=-1,1):-1),i=r[0],s=r[1],o=n,a=0,f=e.length;while(++a<f)t=d3.geom.polygon(e[a].map(u)),n=t.area(),r=t.centroid(n<0?(n*=-1,1):-1),i-=r[0],s-=r[1],o-=n;return[i,s,6*o]}function i(e){return Math.abs(d3.geom.polygon(e.map(u)).area())}var s=4.5,o=Ur(s),u=d3.geo.albersUsa(),a=[],f=Rr({FeatureCollection:function(e){var t=e.features,n=-1,r=t.length;while(++n<r)a.push(f(t[n].geometry))},Feature:function(e){f(e.geometry)},Point:function(e){a.push("M",t(e.coordinates),o)},MultiPoint:function(e){var n=e.coordinates,r=-1,i=n.length;while(++r<i)a.push("M",t(n[r]),o)},LineString:function(e){var n=e.coordinates,r=-1,i=n.length;a.push("M");while(++r<i)a.push(t(n[r]),"L");a.pop()},MultiLineString:function(e){var n=e.coordinates,r=-1,i=n.length,s,o,u;while(++r<i){s=n[r],o=-1,u=s.length,a.push("M");while(++o<u)a.push(t(s[o]),"L");a.pop()}},Polygon:function(e){var n=e.coordinates,r=-1,i=n.length,s,o,u;while(++r<i){s=n[r],o=-1;if((u=s.length-1)>0){a.push("M");while(++o<u)a.push(t(s[o]),"L");a[a.length-1]="Z"}}},MultiPolygon:function(e){var n=e.coordinates,r=-1,i=n.length,s,o,u,f,l,c;while(++r<i){s=n[r],o=-1,u=s.length;while(++o<u){f=s[o],l=-1;if((c=f.length-1)>0){a.push("M");while(++l<c)a.push(t(f[l]),"L");a[a.length-1]="Z"}}}},GeometryCollection:function(e){var t=e.geometries,n=-1,r=t.length;while(++n<r)a.push(f(t[n]))}}),l=e.area=Rr({FeatureCollection:function(e){var t=0,n=e.features,r=-1,i=n.length;while(++r<i)t+=l(n[r]);return t},Feature:function(e){return l(e.geometry)},Polygon:function(e){return n(e.coordinates)},MultiPolygon:function(e){var t=0,r=e.coordinates,i=-1,s=r.length;while(++i<s)t+=n(r[i]);return t},GeometryCollection:function(e){var t=0,n=e.geometries,r=-1,i=n.length;while(++r<i)t+=l(n[r]);return t}},0),c=e.centroid=Rr({Feature:function(e){return c(e.geometry)},Polygon:function(e){var t=r(e.coordinates);return[t[0]/t[2],t[1]/t[2]]},MultiPolygon:function(e){var t=0,n=e.coordinates,i,s=0,o=0,u=0,a=-1,f=n.length;while(++a<f)i=r(n[a]),s+=i[0],o+=i[1],u+=i[2];return[s/u,o/u]}});return e.projection=function(t){return u=t,e},e.pointRadius=function(t){return typeof t=="function"?s=t:(s=+t,o=Ur(s)),e},e},d3.geo.bounds=function(e){var t=Infinity,n=Infinity,r=-Infinity,i=-Infinity;return zr(e,function(e,s){e<t&&(t=e),e>r&&(r=e),s<n&&(n=s),s>i&&(i=s)}),[[t,n],[r,i]]};var fo={Feature:Wr,FeatureCollection:Xr,GeometryCollection:Vr,LineString:$r,MultiLineString:Jr,MultiPoint:$r,MultiPolygon:Kr,Point:Qr,Polygon:Gr};d3.geo.circle=function(){function e(){}function t(e){return a.distance(e)<u}function n(e){var t=-1,n=e.length,i=[],s,o,f,l,c;while(++t<n)c=a.distance(f=e[t]),c<u?(o&&i.push(ti(o,f)((l-u)/(l-c))),i.push(f),s=o=null):(o=f,!s&&i.length&&(i.push(ti(i[i.length-1],o)((u-l)/(c-l))),s=o)),l=c;return s=e[0],o=i[0],o&&f[0]===s[0]&&f[1]===s[1]&&(f[0]!==o[0]||f[1]!==o[1])&&i.push(o),r(i)}function r(e){var t=0,n=e.length,r,i,s=n?[e[0]]:e,o,u=a.source();while(++t<n){o=a.source(e[t-1])(e[t]).coordinates;for(r=0,i=o.length;++r<i;)s.push(o[r])}return a.source(u),s}var s=[0,0],o=89.99,u=o*ao,a=d3.geo.greatArc().source(s).target(i);e.clip=function(e){return typeof s=="function"&&a.source(s.apply(this,arguments)),f(e)||null};var f=Rr({FeatureCollection:function(e){var t=e.features.map(f).filter(i);return t&&(e=Object.create(e),e.features=t,e)},Feature:function(e){var t=f(e.geometry);return t&&(e=Object.create(e),e.geometry=t,e)},Point:function(e){return t(e.coordinates)&&e},MultiPoint:function(e){var n=e.coordinates.filter(t);return n.length&&{type:e.type,coordinates:n}},LineString:function(e){var t=n(e.coordinates);return t.length&&(e=Object.create(e),e.coordinates=t,e)},MultiLineString:function(e){var t=e.coordinates.map(n).filter(function(e){return e.length});return t.length&&(e=Object.create(e),e.coordinates=t,e)},Polygon:function(e){var t=e.coordinates.map(n);return t[0].length&&(e=Object.create(e),e.coordinates=t,e)},MultiPolygon:function(e){var t=e.coordinates.map(function(e){return e.map(n)}).filter(function(e){return e[0].length});return t.length&&(e=Object.create(e),e.coordinates=t,e)},GeometryCollection:function(e){var t=e.geometries.map(f).filter(i);return t.length&&(e=Object.create(e),e.geometries=t,e)}});return e.origin=function(t){return arguments.length?(s=t,typeof s!="function"&&a.source(s),e):s},e.angle=function(t){return arguments.length?(u=(o=+t)*ao,e):o},d3.rebind(e,a,"precision")},d3.geo.greatArc=function(){function e(){var t=e.distance.apply(this,arguments),r=0,u=s/t,a=[n];while((r+=u)<1)a.push(o(r));return a.push(i),{type:"LineString",coordinates:a}}var t=Yr,n,r=Zr,i,s=6*ao,o=ei();return e.distance=function(){return typeof t=="function"&&o.source(n=t.apply(this,arguments)),typeof r=="function"&&o.target(i=r.apply(this,arguments)),o.distance()},e.source=function(r){return arguments.length?(t=r,typeof t!="function"&&o.source(n=t),e):t},e.target=function(t){return arguments.length?(r=t,typeof r!="function"&&o.target(i=r),e):r},e.precision=function(t){return arguments.length?(s=t*ao,e):s/ao},e},d3.geo.greatCircle=d3.geo.circle,d3.geom={},d3.geom.contour=function(e,t){var n=t||ni(e),r=[],i=n[0],s=n[1],o=0,u=0,a=NaN,f=NaN,l=0;do l=0,e(i-1,s-1)&&(l+=1),e(i,s-1)&&(l+=2),e(i-1,s)&&(l+=4),e(i,s)&&(l+=8),l===6?(o=f===-1?-1:1,u=0):l===9?(o=0,u=a===1?-1:1):(o=lo[l],u=co[l]),o!=a&&u!=f&&(r.push([i,s]),a=o,f=u),i+=o,s+=u;while(n[0]!=i||n[1]!=s);return r};var lo=[1,0,1,1,-1,0,-1,1,0,0,0,0,-1,0,-1,NaN],co=[0,-1,0,0,0,-1,0,0,1,-1,1,1,0,-1,0,NaN];d3.geom.hull=function(e){if(e.length<3)return[];var t=e.length,n=t-1,r=[],i=[],s,o,u=0,a,f,l,c,h,p,d,v;for(s=1;s<t;++s)e[s][1]<e[u][1]?u=s:e[s][1]==e[u][1]&&(u=e[s][0]<e[u][0]?s:u);for(s=0;s<t;++s){if(s===u)continue;f=e[s][1]-e[u][1],a=e[s][0]-e[u][0],r.push({angle:Math.atan2(f,a),index:s})}r.sort(function(e,t){return e.angle-t.angle}),d=r[0].angle,p=r[0].index,h=0;for(s=1;s<n;++s)o=r[s].index,d==r[s].angle?(a=e[p][0]-e[u][0],f=e[p][1]-e[u][1],l=e[o][0]-e[u][0],c=e[o][1]-e[u][1],a*a+f*f>=l*l+c*c?r[s].index=-1:(r[h].index=-1,d=r[s].angle,h=s,p=o)):(d=r[s].angle,h=s,p=o);i.push(u);for(s=0,o=0;s<2;++o)r[o].index!==-1&&(i.push(r[o].index),s++);v=i.length;for(;o<n;++o){if(r[o].index===-1)continue;while(!ri(i[v-2],i[v-1],r[o].index,e))--v;i[v++]=r[o].index}var m=[];for(s=0;s<v;++s)m.push(e[i[s]]);return m},d3.geom.polygon=function(e){return e.area=function(){var t=0,n=e.length,r=e[n-1][0]*e[0][1],i=e[n-1][1]*e[0][0];while(++t<n)r+=e[t-1][0]*e[t][1],i+=e[t-1][1]*e[t][0];return(i-r)*.5},e.centroid=function(t){var n=-1,r=e.length,i=0,s=0,o,u=e[r-1],a;arguments.length||(t=-1/(6*e.area()));while(++n<r)o=u,u=e[n],a=o[0]*u[1]-u[0]*o[1],i+=(o[0]+u[0])*a,s+=(o[1]+u[1])*a;return[i*t,s*t]},e.clip=function(t){var n,r=-1,i=e.length,s,o,u=e[i-1],a,f,l;while(++r<i){n=t.slice(),t.length=0,a=e[r],f=n[(o=n.length)-1],s=-1;while(++s<o)l=n[s],ii(l,u,a)?(ii(f,u,a)||t.push(si(f,l,u,a)),t.push(l)):ii(f,u,a)&&t.push(si(f,l,u,a)),f=l;u=a}return t},e},d3.geom.voronoi=function(e){var t=e.map(function(){return[]});return oi(e,function(e){var n,r,i,s,o,u;e.a===1&&e.b>=0?(n=e.ep.r,r=e.ep.l):(n=e.ep.l,r=e.ep.r),e.a===1?(o=n?n.y:-1e6,i=e.c-e.b*o,u=r?r.y:1e6,s=e.c-e.b*u):(i=n?n.x:-1e6,o=e.c-e.a*i,s=r?r.x:1e6,u=e.c-e.a*s);var a=[i,o],f=[s,u];t[e.region.l.index].push(a,f),t[e.region.r.index].push(a,f)}),t.map(function(t,n){var r=e[n][0],i=e[n][1];return t.forEach(function(e){e.angle=Math.atan2(e[0]-r,e[1]-i)}),t.sort(function(e,t){return e.angle-t.angle}).filter(function(e,n){return!n||e.angle-t[n-1].angle>1e-10})})};var ho={l:"r",r:"l"};d3.geom.delaunay=function(e){var t=e.map(function(){return[]}),n=[];return oi(e,function(n){t[n.region.l.index].push(e[n.region.r.index])}),t.forEach(function(t,r){var i=e[r],s=i[0],o=i[1];t.forEach(function(e){e.angle=Math.atan2(e[0]-s,e[1]-o)}),t.sort(function(e,t){return e.angle-t.angle});for(var u=0,a=t.length-1;u<a;u++)n.push([i,t[u],t[u+1]])}),n},d3.geom.quadtree=function(e,t,n,r,i){function s(e,t,n,r,i,s){if(isNaN(t.x)||isNaN(t.y))return;if(e.leaf){var u=e.point;u?Math.abs(u.x-t.x)+Math.abs(u.y-t.y)<.01?o(e,t,n,r,i,s):(e.point=null,o(e,u,n,r,i,s),o(e,t,n,r,i,s)):e.point=t}else o(e,t,n,r,i,s)}function o(e,t,n,r,i,o){var u=(n+i)*.5,a=(r+o)*.5,f=t.x>=u,l=t.y>=a,c=(l<<1)+f;e.leaf=!1,e=e.nodes[c]||(e.nodes[c]=ui()),f?n=u:i=u,l?r=a:o=a,s(e,t,n,r,i,o)}var u,a=-1,f=e.length;f&&isNaN(e[0].x)&&(e=e.map(fi));if(arguments.length<5)if(arguments.length===3)i=r=n,n=t;else{t=n=Infinity,r=i=-Infinity;while(++a<f)u=e[a],u.x<t&&(t=u.x),u.y<n&&(n=u.y),u.x>r&&(r=u.x),u.y>i&&(i=u.y);var l=r-t,c=i-n;l>c?i=n+l:r=t+c}var h=ui();return h.add=function(e){s(h,e,t,n,r,i)},h.visit=function(e){ai(e,h,t,n,r,i)},e.forEach(h.add),h},d3.time={};var po=Date,vo=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];li.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){mo.setUTCDate.apply(this._,arguments)},setDay:function(){mo.setUTCDay.apply(this._,arguments)},setFullYear:function(){mo.setUTCFullYear.apply(this._,arguments)},setHours:function(){mo.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){mo.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){mo.setUTCMinutes.apply(this._,arguments)},setMonth:function(){mo.setUTCMonth.apply(this._,arguments)},setSeconds:function(){mo.setUTCSeconds.apply(this._,arguments)},setTime:function(){mo.setTime.apply(this._,arguments)}};var mo=Date.prototype,go="%a %b %e %H:%M:%S %Y",yo="%m/%d/%y",bo="%H:%M:%S",wo=vo,Eo=wo.map(ci),So=["January","February","March","April","May","June","July","August","September","October","November","December"],xo=So.map(ci);d3.time.format=function(e){function t(t){var r=[],i=-1,s=0,o,u;while(++i<n)e.charCodeAt(i)==37&&(r.push(e.substring(s,i),(u=Po[o=e.charAt(++i)])?u(t):o),s=i+1);return r.push(e.substring(s,i)),r.join("")}var n=e.length;return t.parse=function(t){var n={y:1900,m:0,d:1,H:0,M:0,S:0,L:0},r=hi(n,e,t,0);if(r!=t.length)return null;"p"in n&&(n.H=n.H%12+n.p*12);var i=new po;return i.setFullYear(n.y,n.m,n.d),i.setHours(n.H,n.M,n.S,n.L),i},t.toString=function(){return e},t};var To=d3.format("02d"),No=d3.format("03d"),Co=d3.format("04d"),ko=d3.format("2d"),Lo=pi(wo),Ao=pi(Eo),Oo=pi(So),Mo=di(So),_o=pi(xo),Do=di(xo),Po={a:function(e){return Eo[e.getDay()]},A:function(e){return wo[e.getDay()]},b:function(e){return xo[e.getMonth()]},B:function(e){return So[e.getMonth()]},c:d3.time.format(go),d:function(e){return To(e.getDate())},e:function(e){return ko(e.getDate())},H:function(e){return To(e.getHours())},I:function(e){return To(e.getHours()%12||12)},j:function(e){return No(1+d3.time.dayOfYear(e))},L:function(e){return No(e.getMilliseconds())},m:function(e){return To(e.getMonth()+1)},M:function(e){return To(e.getMinutes())},p:function(e){return e.getHours()>=12?"PM":"AM"},S:function(e){return To(e.getSeconds())},U:function(e){return To(d3.time.sundayOfYear(e))},w:function(e){return e.getDay()},W:function(e){return To(d3.time.mondayOfYear(e))},x:d3.time.format(yo),X:d3.time.format(bo),y:function(e){return To(e.getFullYear()%100)},Y:function(e){return Co(e.getFullYear()%1e4)},Z:_i,"%":function(e){return"%"}},Ho={a:vi,A:mi,b:gi,B:yi,c:bi,d:Ci,e:Ci,H:ki,I:ki,L:Oi,m:Ni,M:Li,p:Mi,S:Ai,x:wi,X:Ei,y:xi,Y:Si},Bo=/^\s*\d+/,jo=d3.map({am:0,pm:1});d3.time.format.utc=function(e){function t(e){try{po=li;var t=new po;return t._=e,n(t)}finally{po=Date}}var n=d3.time.format(e);return t.parse=function(e){try{po=li;var t=n.parse(e);return t&&t._}finally{po=Date}},t.toString=n.toString,t};var Fo=d3.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ");d3.time.format.iso=Date.prototype.toISOString?Di:Fo,Di.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},Di.toString=Fo.toString,d3.time.second=Pi(function(e){return new po(Math.floor(e/1e3)*1e3)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*1e3)},function(e){return e.getSeconds()}),d3.time.seconds=d3.time.second.range,d3.time.seconds.utc=d3.time.second.utc.range,d3.time.minute=Pi(function(e){return new po(Math.floor(e/6e4)*6e4)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*6e4)},function(e){return e.getMinutes()}),d3.time.minutes=d3.time.minute.range,d3.time.minutes.utc=d3.time.minute.utc.range,d3.time.hour=Pi(function(e){var t=e.getTimezoneOffset()/60;return new po((Math.floor(e/36e5-t)+t)*36e5)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*36e5)},function(e){return e.getHours()}),d3.time.hours=d3.time.hour.range,d3.time.hours.utc=d3.time.hour.utc.range,d3.time.day=Pi(function(e){var t=new po(1970,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t},function(e,t){e.setDate(e.getDate()+t)},function(e){return e.getDate()-1}),d3.time.days=d3.time.day.range,d3.time.days.utc=d3.time.day.utc.range,d3.time.dayOfYear=function(e){var t=d3.time.year(e);return Math.floor((e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5)},vo.forEach(function(e,t){e=e.toLowerCase(),t=7-t;var n=d3.time[e]=Pi(function(e){return(e=d3.time.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e},function(e,t){e.setDate(e.getDate()+Math.floor(t)*7)},function(e){var n=d3.time.year(e).getDay();return Math.floor((d3.time.dayOfYear(e)+(n+t)%7)/7)-(n!==t)});d3.time[e+"s"]=n.range,d3.time[e+"s"].utc=n.utc.range,d3.time[e+"OfYear"]=function(e){var n=d3.time.year(e).getDay();return Math.floor((d3.time.dayOfYear(e)+(n+t)%7)/7)}}),d3.time.week=d3.time.sunday,d3.time.weeks=d3.time.sunday.range,d3.time.weeks.utc=d3.time.sunday.utc.range,d3.time.weekOfYear=d3.time.sundayOfYear,d3.time.month=Pi(function(e){return e=d3.time.day(e),e.setDate(1),e},function(e,t){e.setMonth(e.getMonth()+t)},function(e){return e.getMonth()}),d3.time.months=d3.time.month.range,d3.time.months.utc=d3.time.month.utc.range,d3.time.year=Pi(function(e){return e=d3.time.day(e),e.setMonth(0,1),e},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e){return e.getFullYear()}),d3.time.years=d3.time.year.range,d3.time.years.utc=d3.time.year.utc.range;var Io=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],qo=[[d3.time.second,1],[d3.time.second,5],[d3.time.second,15],[d3.time.second,30],[d3.time.minute,1],[d3.time.minute,5],[d3.time.minute,15],[d3.time.minute,30],[d3.time.hour,1],[d3.time.hour,3],[d3.time.hour,6],[d3.time.hour,12],[d3.time.day,1],[d3.time.day,2],[d3.time.week,1],[d3.time.month,1],[d3.time.month,3],[d3.time.year,1]],Ro=[[d3.time.format("%Y"),function(e){return!0}],[d3.time.format("%B"),function(e){return e.getMonth()}],[d3.time.format("%b %d"),function(e){return e.getDate()!=1}],[d3.time.format("%a %d"),function(e){return e.getDay()&&e.getDate()!=1}],[d3.time.format("%I %p"),function(e){return e.getHours()}],[d3.time.format("%I:%M"),function(e){return e.getMinutes()}],[d3.time.format(":%S"),function(e){return e.getSeconds()}],[d3.time.format(".%L"),function(e){return e.getMilliseconds()}]],Uo=d3.scale.linear(),zo=Ii(Ro);qo.year=function(e,t){return Uo.domain(e.map(Ri)).ticks(t).map(qi)},d3.time.scale=function(){return Bi(d3.scale.linear(),qo,zo)};var Wo=qo.map(function(e){return[e[0].utc,e[1]]}),Xo=[[d3.time.format.utc("%Y"),function(e){return!0}],[d3.time.format.utc("%B"),function(e){return e.getUTCMonth()}],[d3.time.format.utc("%b %d"),function(e){return e.getUTCDate()!=1}],[d3.time.format.utc("%a %d"),function(e){return e.getUTCDay()&&e.getUTCDate()!=1}],[d3.time.format.utc("%I %p"),function(e){return e.getUTCHours()}],[d3.time.format.utc("%I:%M"),function(e){return e.getUTCMinutes()}],[d3.time.format.utc(":%S"),function(e){return e.getUTCSeconds()}],[d3.time.format.utc(".%L"),function(e){return e.getUTCMilliseconds()}]],Vo=Ii(Xo);Wo.year=function(e,t){return Uo.domain(e.map(zi)).ticks(t).map(Ui)},d3.time.scale.utc=function(){return Bi(d3.scale.linear(),Wo,Vo)}})(); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/d3.v3.min.js b/ecomp-portal-BE/war/static/fusion/d3/js/d3.v3.min.js
deleted file mode 100644
index 7975878f..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/d3.v3.min.js
+++ /dev/null
@@ -1 +0,0 @@
-d3=function(){function o(e){return e!=null&&!isNaN(e)}function a(e){return e.length}function f(e){var t=1;while(e*t%1)t*=10;return t}function l(e,t){try{for(var n in t){Object.defineProperty(e.prototype,n,{value:t[n],enumerable:false})}}catch(r){e.prototype=t}}function c(){}function d(){}function v(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}function m(){}function g(e){function r(){var n=t,r=-1,i=n.length,s;while(++r<i)if(s=n[r].on)s.apply(this,arguments);return e}var t=[],n=new c;r.on=function(r,i){var s=n.get(r),o;if(arguments.length<2)return s&&s.on;if(s){s.on=null;t=t.slice(0,o=t.indexOf(s)).concat(t.slice(o+1));n.remove(r)}if(i)t.push(n.set(r,{on:i}));return e};return r}function y(){e.event.stopPropagation();e.event.preventDefault()}function w(){var t=e.event,n;while(n=t.sourceEvent)t=n;return t}function E(e,t){function n(){e.on(t,null)}e.on(t,function(){y();n()},true);setTimeout(n,0)}function S(t){var n=new m,r=0,i=arguments.length;while(++r<i)n[arguments[r]]=g(n);n.of=function(r,i){return function(s){try{var o=s.sourceEvent=e.event;s.target=t;e.event=s;n[s.type].apply(r,i)}finally{e.event=o}}};return n}function T(r,i){var s=r.ownerSVGElement||r;if(s.createSVGPoint){var o=s.createSVGPoint();if(x<0&&(n.scrollX||n.scrollY)){s=e.select(t.body).append("svg").style("position","absolute").style("top",0).style("left",0);var u=s[0][0].getScreenCTM();x=!(u.f||u.e);s.remove()}if(x){o.x=i.pageX;o.y=i.pageY}else{o.x=i.clientX;o.y=i.clientY}o=o.matrixTransform(r.getScreenCTM().inverse());return[o.x,o.y]}var a=r.getBoundingClientRect();return[i.clientX-a.left-r.clientLeft,i.clientY-a.top-r.clientTop]}function C(e){var t=-1,n=e.length,r=[];while(++t<n)r.push(e[t]);return r}function k(e){return Array.prototype.slice.call(e)}function O(e){A(e,B);return e}function j(e){return function(){return M(e,this)}}function F(e){return function(){return _(e,this)}}function q(t,n){function r(){this.removeAttribute(t)}function i(){this.removeAttributeNS(t.space,t.local)}function s(){this.setAttribute(t,n)}function o(){this.setAttributeNS(t.space,t.local,n)}function u(){var e=n.apply(this,arguments);if(e==null)this.removeAttribute(t);else this.setAttribute(t,e)}function a(){var e=n.apply(this,arguments);if(e==null)this.removeAttributeNS(t.space,t.local);else this.setAttributeNS(t.space,t.local,e)}t=e.ns.qualify(t);return n==null?t.local?i:r:typeof n==="function"?t.local?a:u:t.local?o:s}function R(e){return e.trim().replace(/\s+/g," ")}function z(t){return new RegExp("(?:^|\\s+)"+e.requote(t)+"(?:\\s+|$)","g")}function W(e,t){function r(){var r=-1;while(++r<n)e[r](this,t)}function i(){var r=-1,i=t.apply(this,arguments);while(++r<n)e[r](this,i)}e=e.trim().split(/\s+/).map(X);var n=e.length;return typeof t==="function"?i:r}function X(e){var t=z(e);return function(n,r){if(i=n.classList)return r?i.add(e):i.remove(e);var i=n.getAttribute("class")||"";if(r){t.lastIndex=0;if(!t.test(i))n.setAttribute("class",R(i+" "+e))}else{n.setAttribute("class",R(i.replace(t," ")))}}}function V(e,t,n){function r(){this.style.removeProperty(e)}function i(){this.style.setProperty(e,t,n)}function s(){var r=t.apply(this,arguments);if(r==null)this.style.removeProperty(e);else this.style.setProperty(e,r,n)}return t==null?r:typeof t==="function"?s:i}function $(e,t){function n(){delete this[e]}function r(){this[e]=t}function i(){var n=t.apply(this,arguments);if(n==null)delete this[e];else this[e]=n}return t==null?n:typeof t==="function"?i:r}function J(e){return{__data__:e}}function K(e){return function(){return H(this,e)}}function Q(t){if(!arguments.length)t=e.ascending;return function(e,n){return!e-!n||t(e.__data__,n.__data__)}}function G(){}function Y(t,n,r){function a(){var e=this[i];if(e){this.removeEventListener(t,e,e.$);delete this[i]}}function f(){var e=o(n,N(arguments));a.call(this);this.addEventListener(t,this[i]=e,e.$=r);e._=n}function l(){var n=new RegExp("^__on([^.]+)"+e.requote(t)+"$"),r;for(var i in this){if(r=i.match(n)){var s=this[i];this.removeEventListener(r[1],s,s.$);delete this[i]}}}var i="__on"+t,s=t.indexOf("."),o=et;if(s>0)t=t.substring(0,s);var u=Z.get(t);if(u)t=u,o=tt;return s?n?f:a:n?G:l}function et(t,n){return function(r){var i=e.event;e.event=r;n[0]=this.__data__;try{t.apply(this,n)}finally{e.event=i}}}function tt(e,t){var n=et(e,t);return function(e){var t=this,r=e.relatedTarget;if(!r||r!==t&&!(r.compareDocumentPosition(t)&8)){n.call(t,e)}}}function nt(e,t){for(var n=0,r=e.length;n<r;n++){for(var i=e[n],s=0,o=i.length,u;s<o;s++){if(u=i[s])t(u,s,n)}}return e}function rt(e){A(e,it);return e}function ft(){}function lt(e,t,n){return new ct(e,t,n)}function ct(e,t,n){this.h=e;this.s=t;this.l=n}function pt(e,t,n){function s(e){if(e>360)e-=360;else if(e<0)e+=360;if(e<60)return r+(i-r)*e/60;if(e<180)return i;if(e<240)return r+(i-r)*(240-e)/60;return r}function o(e){return Math.round(s(e)*255)}var r,i;e=e%360;if(e<0)e+=360;t=t<0?0:t>1?1:t;n=n<0?0:n>1?1:n;i=n<=.5?n*(1+t):n+t-n*t;r=2*n-i;return qt(o(e+120),o(e),o(e-120))}function yt(e){return e>0?1:e<0?-1:0}function bt(e){return Math.acos(Math.max(-1,Math.min(1,e)))}function wt(e){return e>1?dt/2:e<-1?-dt/2:Math.asin(e)}function Et(e){return(Math.exp(e)-Math.exp(-e))/2}function St(e){return(Math.exp(e)+Math.exp(-e))/2}function xt(e){return(e=Math.sin(e/2))*e}function Tt(e,t,n){return new Nt(e,t,n)}function Nt(e,t,n){this.h=e;this.c=t;this.l=n}function kt(e,t,n){return Lt(n,Math.cos(e*=mt)*t,Math.sin(e)*t)}function Lt(e,t,n){return new At(e,t,n)}function At(e,t,n){this.l=e;this.a=t;this.b=n}function Ht(e,t,n){var r=(e+16)/116,i=r+t/500,s=r-n/200;i=jt(i)*Mt;r=jt(r)*_t;s=jt(s)*Dt;return qt(It(3.2404542*i-1.5371385*r-.4985314*s),It(-.969266*i+1.8760108*r+.041556*s),It(.0556434*i-.2040259*r+1.0572252*s))}function Bt(e,t,n){return Tt(Math.atan2(n,t)*gt,Math.sqrt(t*t+n*n),e)}function jt(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function Ft(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function It(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function qt(e,t,n){return new Rt(e,t,n)}function Rt(e,t,n){this.r=e;this.g=t;this.b=n}function zt(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function Wt(e,t,n){var r=0,i=0,s=0,o,u,a;o=/([a-z]+)\((.*)\)/i.exec(e);if(o){u=o[2].split(",");switch(o[1]){case"hsl":{return n(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100)};case"rgb":{return t(Jt(u[0]),Jt(u[1]),Jt(u[2]))}}}if(a=Kt.get(e))return t(a.r,a.g,a.b);if(e!=null&&e.charAt(0)==="#"){if(e.length===4){r=e.charAt(1);r+=r;i=e.charAt(2);i+=i;s=e.charAt(3);s+=s}else if(e.length===7){r=e.substring(1,3);i=e.substring(3,5);s=e.substring(5,7)}r=parseInt(r,16);i=parseInt(i,16);s=parseInt(s,16)}return t(r,i,s)}function Xt(e,t,n){var r=Math.min(e/=255,t/=255,n/=255),i=Math.max(e,t,n),s=i-r,o,u,a=(i+r)/2;if(s){u=a<.5?s/(i+r):s/(2-i-r);if(e==i)o=(t-n)/s+(t<n?6:0);else if(t==i)o=(n-e)/s+2;else o=(e-t)/s+4;o*=60}else{u=o=0}return lt(o,u,a)}function Vt(e,t,n){e=$t(e);t=$t(t);n=$t(n);var r=Ft((.4124564*e+.3575761*t+.1804375*n)/Mt),i=Ft((.2126729*e+.7151522*t+.072175*n)/_t),s=Ft((.0193339*e+.119192*t+.9503041*n)/Dt);return Lt(116*i-16,500*(r-i),200*(i-s))}function $t(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Jt(e){var t=parseFloat(e);return e.charAt(e.length-1)==="%"?Math.round(t*2.55):t}function Qt(e){return typeof e==="function"?e:function(){return e}}function Gt(e){return e}function Yt(e){return e.length===1?function(t,n){e(t==null?n:null)}:e}function Zt(t,n){function s(t,r,i){if(arguments.length<3)i=r,r=null;var s=e.xhr(t,n,i);s.row=function(e){return arguments.length?s.response((r=e)==null?o:u(e)):r};return s.row(r)}function o(e){return s.parse(e.responseText)}function u(e){return function(t){return s.parse(t.responseText,e)}}function a(e){return e.map(f).join(t)}function f(e){return r.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}var r=new RegExp('["'+t+"\n]"),i=t.charCodeAt(0);s.parse=function(e,t){var n;return s.parseRows(e,function(e,r){if(n)return n(e,r-1);var i=new Function("d","return {"+e.map(function(e,t){return JSON.stringify(e)+": d["+t+"]"}).join(",")+"}");n=t?function(e,n){return t(i(e),n)}:i})};s.parseRows=function(e,t){function c(){if(u>=o)return r;if(l)return l=false,n;var t=u;if(e.charCodeAt(t)===34){var s=t;while(s++<o){if(e.charCodeAt(s)===34){if(e.charCodeAt(s+1)!==34)break;++s}}u=s+2;var a=e.charCodeAt(s+1);if(a===13){l=true;if(e.charCodeAt(s+2)===10)++u}else if(a===10){l=true}return e.substring(t+1,s).replace(/""/g,'"')}while(u<o){var a=e.charCodeAt(u++),f=1;if(a===10)l=true;else if(a===13){l=true;if(e.charCodeAt(u)===10)++u,++f}else if(a!==i)continue;return e.substring(t,u-f)}return e.substring(t)}var n={},r={},s=[],o=e.length,u=0,a=0,f,l;while((f=c())!==r){var h=[];while(f!==n&&f!==r){h.push(f);f=c()}if(t&&!(h=t(h,a++)))continue;s.push(h)}return s};s.format=function(e){if(Array.isArray(e[0]))return s.formatRows(e);var n=new d,r=[];e.forEach(function(e){for(var t in e){if(!n.has(t)){r.push(n.add(t))}}});return[r.map(f).join(t)].concat(e.map(function(e){return r.map(function(t){return f(e[t])}).join(t)})).join("\n")};s.formatRows=function(e){return e.map(a).join("\n")};return s}function on(){var e,t=Date.now(),n=nn;while(n){e=t-n.then;if(e>=n.delay)n.flush=n.callback(e);n=n.next}var r=un()-t;if(r>24){if(isFinite(r)){clearTimeout(sn);sn=setTimeout(on,r)}rn=0}else{rn=1;an(on)}}function un(){var e=null,t=nn,n=Infinity;while(t){if(t.flush){delete tn[t.callback.id];t=e?e.next=t.next:nn=t.next}else{n=Math.min(n,t.then+t.delay);t=(e=t).next}}return n}function pn(e,t){var n=Math.pow(10,Math.abs(8-t)*3);return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}function mn(e,t){return t-(e?Math.ceil(Math.log(e)/Math.LN10):1)}function gn(e){return e+""}function wn(e,t){if(e&&Sn.hasOwnProperty(e.type)){Sn[e.type](e,t)}}function xn(e,t,n){var r=-1,i=e.length-n,s;t.lineStart();while(++r<i)s=e[r],t.point(s[0],s[1]);t.lineEnd()}function Tn(e,t){var n=-1,r=e.length;t.polygonStart();while(++n<r)xn(e[n],t,1);t.polygonEnd()}function An(){function s(e,t){e*=mt;t=t*mt/2+dt/4;var s=e-n,o=Math.cos(t),u=Math.sin(t),a=i*u,f=Cn,l=kn,c=r*o+a*Math.cos(s),h=a*Math.sin(s);Cn=f*c-l*h;kn=l*c+f*h;n=e,r=o,i=u}var e,t,n,r,i;Ln.point=function(o,u){Ln.point=s;n=(e=o)*mt,r=Math.cos(u=(t=u)*mt/2+dt/4),i=Math.sin(u)};Ln.lineEnd=function(){s(e,t)}}function On(t){function u(e,t){if(e<n)n=e;if(e>i)i=e;if(t<r)r=t;if(t>s)s=t}function a(){o.point=o.lineEnd=G}var n,r,i,s;var o={point:u,lineStart:G,lineEnd:G,polygonStart:function(){o.lineEnd=a},polygonEnd:function(){o.point=u}};return function(u){s=i=-(n=r=Infinity);e.geo.stream(u,t(o));return[[n,r],[i,s]]}}function jn(e,t){if(Mn)return;++_n;e*=mt;var n=Math.cos(t*=mt);Dn+=(n*Math.cos(e)-Dn)/_n;Pn+=(n*Math.sin(e)-Pn)/_n;Hn+=(Math.sin(t)-Hn)/_n}function Fn(){var e,t;Mn=1;In();Mn=2;var n=Bn.point;Bn.point=function(r,i){n(e=r,t=i)};Bn.lineEnd=function(){Bn.point(e,t);qn();Bn.lineEnd=qn}}function In(){function r(r,i){r*=mt;var s=Math.cos(i*=mt),o=s*Math.cos(r),u=s*Math.sin(r),a=Math.sin(i),f=Math.atan2(Math.sqrt((f=t*a-n*u)*f+(f=n*o-e*a)*f+(f=e*u-t*o)*f),e*o+t*u+n*a);_n+=f;Dn+=f*(e+(e=o));Pn+=f*(t+(t=u));Hn+=f*(n+(n=a))}var e,t,n;if(Mn>1)return;if(Mn<1){Mn=1;_n=Dn=Pn=Hn=0}Bn.point=function(i,s){i*=mt;var o=Math.cos(s*=mt);e=o*Math.cos(i);t=o*Math.sin(i);n=Math.sin(s);Bn.point=r}}function qn(){Bn.point=jn}function Rn(e){var t=e[0],n=e[1],r=Math.cos(n);return[r*Math.cos(t),r*Math.sin(t),Math.sin(n)]}function Un(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function zn(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Wn(e,t){e[0]+=t[0];e[1]+=t[1];e[2]+=t[2]}function Xn(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Vn(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t;e[1]/=t;e[2]/=t}function $n(){return true}function Jn(e){return[Math.atan2(e[1],e[0]),Math.asin(Math.max(-1,Math.min(1,e[2])))]}function Kn(e,t){return Math.abs(e[0]-t[0])<vt&&Math.abs(e[1]-t[1])<vt}function Qn(e,t,n,r,i){var s=[],o=[];e.forEach(function(e){if((t=e.length-1)<=0)return;var t,n=e[0],r=e[t];if(Kn(n,r)){i.lineStart();for(var u=0;u<t;++u)i.point((n=e[u])[0],n[1]);i.lineEnd();return}var a={point:n,points:e,other:null,visited:false,entry:true,subject:true},f={point:n,points:[n],other:a,visited:false,entry:false,subject:false};a.other=f;s.push(a);o.push(f);a={point:r,points:[r],other:null,visited:false,entry:false,subject:true};f={point:r,points:[r],other:a,visited:false,entry:true,subject:false};a.other=f;s.push(a);o.push(f)});o.sort(t);Gn(s);Gn(o);if(!s.length)return;if(n)for(var u=1,a=!n(o[0].point),f=o.length;u<f;++u){o[u].entry=a=!a}var l=s[0],c,h,p;while(1){c=l;while(c.visited)if((c=c.next)===l)return;h=c.points;i.lineStart();do{c.visited=c.other.visited=true;if(c.entry){if(c.subject){for(var u=0;u<h.length;u++)i.point((p=h[u])[0],p[1])}else{r(c.point,c.next.point,1,i)}c=c.next}else{if(c.subject){h=c.prev.points;for(var u=h.length;--u>=0;)i.point((p=h[u])[0],p[1])}else{r(c.point,c.prev.point,-1,i)}c=c.prev}c=c.other;h=c.points}while(!c.visited);i.lineEnd()}}function Gn(e){if(!(t=e.length))return;var t,n=0,r=e[0],i;while(++n<t){r.next=i=e[n];i.prev=r;r=i}r.next=i=e[0];i.prev=r}function Yn(t,n,r){return function(i){function u(e,n){if(t(e,n))i.point(e,n)}function a(e,t){s.point(e,t)}function f(){o.point=a;s.lineStart()}function l(){o.point=u;s.lineEnd()}function y(e,t){m.point(e,t);g.push([e,t])}function b(){m.lineStart();g=[]}function w(){y(g[0][0],g[0][1]);m.lineEnd();var e=m.clean(),t=v.buffer(),n,r=t.length;if(!r){d=true;p+=tr(g,-1);g=null;return}g=null;if(e&1){n=t[0];h+=tr(n,1);var r=n.length-1,s=-1,o;i.lineStart();while(++s<r)i.point((o=n[s])[0],o[1]);i.lineEnd();return}if(r>1&&e&2)t.push(t.pop().concat(t.shift()));c.push(t.filter(Zn))}var s=n(i);var o={point:u,lineStart:f,lineEnd:l,polygonStart:function(){o.point=y;o.lineStart=b;o.lineEnd=w;d=false;p=h=0;c=[];i.polygonStart()},polygonEnd:function(){o.point=u;o.lineStart=f;o.lineEnd=l;c=e.merge(c);if(c.length){Qn(c,nr,null,r,i)}else if(h<-vt||d&&p<-vt){i.lineStart();r(null,null,1,i);i.lineEnd()}i.polygonEnd();c=null},sphere:function(){i.polygonStart();i.lineStart();r(null,null,1,i);i.lineEnd();i.polygonEnd()}};var c,h,p,d;var v=er(),m=n(v),g;return o}}function Zn(e){return e.length>1}function er(){var e=[],t;return{lineStart:function(){e.push(t=[])},point:function(e,n){t.push([e,n])},lineEnd:G,buffer:function(){var n=e;e=[];t=null;return n},rejoin:function(){if(e.length>1)e.push(e.pop().concat(e.shift()))}}}function tr(e,t){if(!(n=e.length))return 0;var n,r=0,i=0,s=e[0],o=s[0],u=s[1],a=Math.cos(u),f=Math.atan2(t*Math.sin(o)*a,Math.sin(u)),l=1-t*Math.cos(o)*a,c=f,h,p;while(++r<n){s=e[r];a=Math.cos(u=s[1]);h=Math.atan2(t*Math.sin(o=s[0])*a,Math.sin(u));p=1-t*Math.cos(o)*a;if(Math.abs(l-2)<vt&&Math.abs(p-2)<vt)continue;if(Math.abs(p)<vt||Math.abs(l)<vt){}else if(Math.abs(Math.abs(h-f)-dt)<vt){if(p+l>2)i+=4*(h-f)}else if(Math.abs(l-2)<vt)i+=4*(h-c);else i+=((3*dt+h-f)%(2*dt)-dt)*(l+p);c=f,f=h,l=p}return i}function nr(e,t){return((e=e.point)[0]<0?e[1]-dt/2-vt:dt/2-e[1])-((t=t.point)[0]<0?t[1]-dt/2-vt:dt/2-t[1])}function ir(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart();i=1},point:function(s,o){var u=s>0?dt:-dt,a=Math.abs(s-t);if(Math.abs(a-dt)<vt){e.point(t,n=(n+o)/2>0?dt/2:-dt/2);e.point(r,n);e.lineEnd();e.lineStart();e.point(u,n);e.point(s,n);i=0}else if(r!==u&&a>=dt){if(Math.abs(t-r)<vt)t-=r*vt;if(Math.abs(s-u)<vt)s-=u*vt;n=sr(t,n,s,o);e.point(r,n);e.lineEnd();e.lineStart();e.point(u,n);i=0}e.point(t=s,n=o);r=u},lineEnd:function(){e.lineEnd();t=n=NaN},clean:function(){return 2-i}}}function sr(e,t,n,r){var i,s,o=Math.sin(e-n);return Math.abs(o)>vt?Math.atan((Math.sin(t)*(s=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(t))*Math.sin(e))/(i*s*o)):(t+r)/2}function or(e,t,n,r){var i;if(e==null){i=n*dt/2;r.point(-dt,i);r.point(0,i);r.point(dt,i);r.point(dt,0);r.point(dt,-i);r.point(0,-i);r.point(-dt,-i);r.point(-dt,0);r.point(-dt,i)}else if(Math.abs(e[0]-t[0])>vt){var s=(e[0]<t[0]?1:-1)*dt;i=n*s/2;r.point(-s,i);r.point(0,i);r.point(s,i)}else{r.point(t[0],t[1])}}function ur(e){function s(e,n){return Math.cos(e)*Math.cos(n)>t}function o(e){var t,i,o,f,l;return{lineStart:function(){f=o=false;l=1},point:function(c,h){var p=[c,h],d,v=s(c,h),m=n?v?0:a(c,h):v?a(c+(c<0?dt:-dt),h):0;if(!t&&(f=o=v))e.lineStart();if(v!==o){d=u(t,p);if(Kn(t,d)||Kn(p,d)){p[0]+=vt;p[1]+=vt;v=s(p[0],p[1])}}if(v!==o){l=0;if(v){e.lineStart();d=u(p,t);e.point(d[0],d[1])}else{d=u(t,p);e.point(d[0],d[1]);e.lineEnd()}t=d}else if(r&&t&&n^v){var g;if(!(m&i)&&(g=u(p,t,true))){l=0;if(n){e.lineStart();e.point(g[0][0],g[0][1]);e.point(g[1][0],g[1][1]);e.lineEnd()}else{e.point(g[1][0],g[1][1]);e.lineEnd();e.lineStart();e.point(g[0][0],g[0][1])}}}if(v&&(!t||!Kn(t,p))){e.point(p[0],p[1])}t=p,o=v,i=m},lineEnd:function(){if(o)e.lineEnd();t=null},clean:function(){return l|(f&&o)<<1}}}function u(e,n,r){var i=Rn(e),s=Rn(n);var o=[1,0,0],u=zn(i,s),a=Un(u,u),f=u[0],l=a-f*f;if(!l)return!r&&e;var c=t*a/l,h=-t*f/l,p=zn(o,u),d=Xn(o,c),v=Xn(u,h);Wn(d,v);var m=p,g=Un(d,m),y=Un(m,m),b=g*g-y*(Un(d,d)-1);if(b<0)return;var w=Math.sqrt(b),E=Xn(m,(-g-w)/y);Wn(E,d);E=Jn(E);if(!r)return E;var S=e[0],x=n[0],T=e[1],N=n[1],C;if(x<S)C=S,S=x,x=C;var k=x-S,L=Math.abs(k-dt)<vt,A=L||k<vt;if(!L&&N<T)C=T,T=N,N=C;if(A?L?T+N>0^E[1]<(Math.abs(E[0]-S)<vt?T:N):T<=E[1]&&E[1]<=N:k>dt^(S<=E[0]&&E[0]<=x)){var O=Xn(m,(-g+w)/y);Wn(O,d);return[E,Jn(O)]}}function a(t,r){var i=n?e:dt-e,s=0;if(t<-i)s|=1;else if(t>i)s|=2;if(r<-i)s|=4;else if(r>i)s|=8;return s}var t=Math.cos(e),n=t>0,r=Math.abs(t)>vt,i=Er(e,6*mt);return Yn(s,o,i)}function fr(t,n,r,i){function s(e,i){return Math.abs(e[0]-t)<vt?i>0?0:3:Math.abs(e[0]-r)<vt?i>0?2:1:Math.abs(e[1]-n)<vt?i>0?1:0:i>0?3:2}function o(e,t){return u(e.point,t.point)}function u(e,t){var n=s(e,1),r=s(t,1);return n!==r?n-r:n===0?t[1]-e[1]:n===1?e[0]-t[0]:n===2?e[1]-t[1]:t[0]-e[0]}function a(e,s){var o=s[0]-e[0],u=s[1]-e[1],a=[0,1];if(Math.abs(o)<vt&&Math.abs(u)<vt)return t<=e[0]&&e[0]<=r&&n<=e[1]&&e[1]<=i;if(lr(t-e[0],o,a)&&lr(e[0]-r,-o,a)&&lr(n-e[1],u,a)&&lr(e[1]-i,-u,a)){if(a[1]<1){s[0]=e[0]+a[1]*o;s[1]=e[1]+a[1]*u}if(a[0]>0){e[0]+=a[0]*o;e[1]+=a[0]*u}return true}return false}return function(f){function m(e){var o=s(e,-1),u=g([o===0||o===3?t:r,o>1?i:n]);return u}function g(e){var t=0,n=p.length,r=e[1];for(var i=0;i<n;++i){for(var s=1,o=p[i],u=o.length,a=o[0];s<u;++s){b=o[s];if(a[1]<=r){if(b[1]>r&&y(a,b,e)>0)++t}else{if(b[1]<=r&&y(a,b,e)<0)--t}a=b}}return t!==0}function y(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(n[0]-e[0])*(t[1]-e[1])}function w(e,o,a,f){var l=0,c=0;if(e==null||(l=s(e,a))!==(c=s(o,a))||u(e,o)<0^a>0){do{f.point(l===0||l===3?t:r,l>1?i:n)}while((l=(l+a+4)%4)!==c)}else{f.point(o[0],o[1])}}function E(e,s){return t<=e&&e<=r&&n<=s&&s<=i}function S(e,t){if(E(e,t))f.point(e,t)}function O(){v.point=_;if(p)p.push(d=[]);A=true;L=false;C=k=NaN}function M(){if(h){_(x,T);if(N&&L)c.rejoin();h.push(c.buffer())}v.point=S;if(L)f.lineEnd()}function _(e,t){e=Math.max(-ar,Math.min(ar,e));t=Math.max(-ar,Math.min(ar,t));var n=E(e,t);if(p)d.push([e,t]);if(A){x=e,T=t,N=n;A=false;if(n){f.lineStart();f.point(e,t)}}else{if(n&&L)f.point(e,t);else{var r=[C,k],i=[e,t];if(a(r,i)){if(!L){f.lineStart();f.point(r[0],r[1])}f.point(i[0],i[1]);if(!n)f.lineEnd()}else{f.lineStart();f.point(e,t)}}}C=e,k=t,L=n}var l=f,c=er(),h,p,d;var v={point:S,lineStart:O,lineEnd:M,polygonStart:function(){f=c;h=[];p=[]},polygonEnd:function(){f=l;if((h=e.merge(h)).length){f.polygonStart();Qn(h,o,m,w,f);f.polygonEnd()}else if(g([t,n])){f.polygonStart(),f.lineStart();w(null,null,1,f);f.lineEnd(),f.polygonEnd()}h=p=d=null}};var x,T,N,C,k,L,A;return v}}function lr(e,t,n){if(Math.abs(t)<vt)return e<=0;var r=e/t;if(t>0){if(r>n[1])return false;if(r>n[0])n[0]=r}else{if(r<n[0])return false;if(r<n[1])n[1]=r}return true}function cr(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}if(e.invert&&t.invert)n.invert=function(n,r){return n=t.invert(n,r),n&&e.invert(n[0],n[1])};return n}function hr(e){function r(t){function c(n,r){n=e(n,r);t.point(n[0],n[1])}function h(){s=NaN;l.point=p;t.lineStart()}function p(l,c){var h=Rn([l,c]),p=e(l,c);i(s,o,r,u,a,f,s=p[0],o=p[1],r=l,u=h[0],a=h[1],f=h[2],n,t);t.point(s,o)}function d(){l.point=c;t.lineEnd()}function v(){var e,c,v,m,g,y,b;h();l.point=function(t,n){p(e=t,c=n),v=s,m=o,g=u,y=a,b=f;l.point=p};l.lineEnd=function(){i(s,o,r,u,a,f,v,m,e,g,y,b,n,t);l.lineEnd=d;d()}}var r,s,o,u,a,f;var l={point:c,lineStart:h,lineEnd:d,polygonStart:function(){t.polygonStart();l.lineStart=v},polygonEnd:function(){t.polygonEnd();l.lineStart=h}};return l}function i(n,r,s,o,u,a,f,l,c,h,p,d,v,m){var g=f-n,y=l-r,b=g*g+y*y;if(b>4*t&&v--){var w=o+h,E=u+p,S=a+d,x=Math.sqrt(w*w+E*E+S*S),T=Math.asin(S/=x),N=Math.abs(Math.abs(S)-1)<vt?(s+c)/2:Math.atan2(E,w),C=e(N,T),k=C[0],L=C[1],A=k-n,O=L-r,M=y*A-g*O;if(M*M/b>t||Math.abs((g*A+y*O)/b-.5)>.3){i(n,r,s,o,u,a,k,L,N,w/=x,E/=x,S,v,m);m.point(k,L);i(k,L,N,w,E,S,f,l,c,h,p,d,v,m)}}}var t=.5,n=16;r.precision=function(e){if(!arguments.length)return Math.sqrt(t);n=(t=e*e)>0&&16;return r};return r}function pr(e){return dr(function(){return e})()}function dr(t){function w(e){e=i(e[0]*mt,e[1]*mt);return[e[0]*o+d,v-e[1]*o]}function E(e){e=i.invert((e[0]-d)/o,(v-e[1])/o);return e&&[e[0]*gt,e[1]*gt]}function S(){i=cr(r=gr(c,h,p),n);var e=n(f,l);d=u-e[0]*o;v=a+e[1]*o;return w}var n,r,i,s=hr(function(e,t){e=n(e,t);return[e[0]*o+d,v-e[1]*o]}),o=150,u=480,a=250,f=0,l=0,c=0,h=0,p=0,d,v,m=rr,g=Gt,y=null,b=null;w.stream=function(e){return vr(r,m(s(g(e))))};w.clipAngle=function(e){if(!arguments.length)return y;m=e==null?(y=e,rr):ur((y=+e)*mt);return w};w.clipExtent=function(e){if(!arguments.length)return b;b=e;g=e==null?Gt:fr(e[0][0],e[0][1],e[1][0],e[1][1]);return w};w.scale=function(e){if(!arguments.length)return o;o=+e;return S()};w.translate=function(e){if(!arguments.length)return[u,a];u=+e[0];a=+e[1];return S()};w.center=function(e){if(!arguments.length)return[f*gt,l*gt];f=e[0]%360*mt;l=e[1]%360*mt;return S()};w.rotate=function(e){if(!arguments.length)return[c*gt,h*gt,p*gt];c=e[0]%360*mt;h=e[1]%360*mt;p=e.length>2?e[2]%360*mt:0;return S()};e.rebind(w,s,"precision");return function(){n=t.apply(this,arguments);w.invert=n.invert&&E;return S()}}function vr(e,t){return{point:function(n,r){r=e(n*mt,r*mt),n=r[0];t.point(n>dt?n-2*dt:n<-dt?n+2*dt:n,r[1])},sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function mr(e,t){return[e,t]}function gr(e,t,n){return e?t||n?cr(br(e),wr(t,n)):br(e):t||n?wr(t,n):mr}function yr(e){return function(t,n){return t+=e,[t>dt?t-2*dt:t<-dt?t+2*dt:t,n]}}function br(e){var t=yr(e);t.invert=yr(-e);return t}function wr(e,t){function o(e,t){var o=Math.cos(t),u=Math.cos(e)*o,a=Math.sin(e)*o,f=Math.sin(t),l=f*n+u*r;return[Math.atan2(a*i-l*s,u*n-f*r),Math.asin(Math.max(-1,Math.min(1,l*i+a*s)))]}var n=Math.cos(e),r=Math.sin(e),i=Math.cos(t),s=Math.sin(t);o.invert=function(e,t){var o=Math.cos(t),u=Math.cos(e)*o,a=Math.sin(e)*o,f=Math.sin(t),l=f*i-a*s;return[Math.atan2(a*i+f*s,u*n+l*r),Math.asin(Math.max(-1,Math.min(1,l*n-u*r)))]};return o}function Er(e,t){var n=Math.cos(e),r=Math.sin(e);return function(i,s,o,u){if(i!=null){i=Sr(n,i);s=Sr(n,s);if(o>0?i<s:i>s)i+=o*2*dt}else{i=e+o*2*dt;s=e}var a;for(var f=o*t,l=i;o>0?l>s:l<s;l-=f){u.point((a=Jn([n,-r*Math.cos(l),-r*Math.sin(l)]))[0],a[1])}}}function Sr(e,t){var n=Rn(t);n[0]-=e;Vn(n);var r=bt(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-vt)%(2*Math.PI)}function xr(t,n,r){var i=e.range(t,n-vt,r).concat(n);return function(e){return i.map(function(t){return[e,t]})}}function Tr(t,n,r){var i=e.range(t,n-vt,r).concat(n);return function(e){return i.map(function(t){return[t,e]})}}function Nr(e){return e.source}function Cr(e){return e.target}function kr(e,t,n,r){var i=Math.cos(t),s=Math.sin(t),o=Math.cos(r),u=Math.sin(r),a=i*Math.cos(e),f=i*Math.sin(e),l=o*Math.cos(n),c=o*Math.sin(n),h=2*Math.asin(Math.sqrt(xt(r-t)+i*o*xt(n-e))),p=1/Math.sin(h);var d=h?function(e){var t=Math.sin(e*=h)*p,n=Math.sin(h-e)*p,r=n*a+t*l,i=n*f+t*c,o=n*s+t*u;return[Math.atan2(i,r)*gt,Math.atan2(o,Math.sqrt(r*r+i*i))*gt]}:function(){return[e*gt,t*gt]};d.distance=h;return d}function Or(){function r(r,i){var s=Math.sin(i*=mt),o=Math.cos(i),u=Math.abs((r*=mt)-e),a=Math.cos(u);Lr+=Math.atan2(Math.sqrt((u=o*Math.sin(u))*u+(u=n*s-t*o*a)*u),t*s+n*o*a);e=r,t=s,n=o}var e,t,n;Ar.point=function(i,s){e=i*mt,t=Math.sin(s*=mt),n=Math.cos(s);Ar.point=r};Ar.lineEnd=function(){Ar.point=Ar.lineEnd=G}}function Mr(e){var t=0,n=dt/3,r=dr(e),i=r(t,n);i.parallels=function(e){if(!arguments.length)return[t/dt*180,n/dt*180];return r(t=e[0]*dt/180,n=e[1]*dt/180)};return i}function _r(e,t){function o(e,t){var n=Math.sqrt(i-2*r*Math.sin(t))/r;return[n*Math.sin(e*=r),s-n*Math.cos(e)]}var n=Math.sin(e),r=(n+Math.sin(t))/2,i=1+n*(2*r-n),s=Math.sqrt(i)/r;o.invert=function(e,t){var n=s-t;return[Math.atan2(e,n)/r,Math.asin((i-(e*e+n*n)*r*r)/(2*r))]};return o}function Dr(e,t){var n=e(t[0]),r=e([.5*(t[0][0]+t[1][0]),t[0][1]]),i=e([t[1][0],t[0][1]]),s=e(t[1]);var o=r[1]-n[1],u=r[0]-n[0],a=i[1]-r[1],f=i[0]-r[0];var l=o/u,c=a/f;var h=.5*(l*c*(n[1]-i[1])+c*(n[0]+r[0])-l*(r[0]+i[0]))/(c-l),p=(.5*(n[0]+r[0])-h)/l+.5*(n[1]+r[1]);var d=s[0]-h,v=s[1]-p,m=n[0]-h,g=n[1]-p,y=d*d+v*v,b=m*m+g*g;var w=Math.atan2(v,d),E=Math.atan2(g,m);return function(t){var n=t[0]-h,r=t[1]-p,i=n*n+r*r,s=Math.atan2(r,n);if(y<i&&i<b&&w<s&&s<E)return e.invert(t)}}function jr(){function i(e,t){Hr+=r*e-n*t;n=e,r=t}var e,t,n,r;Br.point=function(s,o){Br.point=i;e=n=s,t=r=o};Br.lineEnd=function(){i(e,t)}}function Fr(){function r(n,r){t.push("M",n,",",r,e)}function i(e,r){t.push("M",e,",",r);n.point=s}function s(e,n){t.push("L",e,",",n)}function o(){n.point=r}function u(){t.push("Z")}var e=Xr(4.5),t=[];var n={point:r,lineStart:function(){n.point=i},lineEnd:o,polygonStart:function(){n.lineEnd=u},polygonEnd:function(){n.lineEnd=o;n.point=r},pointRadius:function(t){e=Xr(t);return n},result:function(){if(t.length){var e=t.join("");t=[];return e}}};return n}function qr(e,t){if(Mn)return;Dn+=e;Pn+=t;++Hn}function Rr(){function n(n,r){var i=n-e,s=r-t,o=Math.sqrt(i*i+s*s);Dn+=o*(e+n)/2;Pn+=o*(t+r)/2;Hn+=o;e=n,t=r}var e,t;if(Mn!==1){if(Mn<1){Mn=1;Dn=Pn=Hn=0}else return}Ir.point=function(r,i){Ir.point=n;e=r,t=i}}function Ur(){Ir.point=qr}function zr(){function i(e,t){var i=r*e-n*t;Dn+=i*(n+e);Pn+=i*(r+t);Hn+=i*3;n=e,r=t}var e,t,n,r;if(Mn<2){Mn=2;Dn=Pn=Hn=0}Ir.point=function(s,o){Ir.point=i;e=n=s,t=r=o};Ir.lineEnd=function(){i(e,t)}}function Wr(e){function r(n,r){e.moveTo(n,r);e.arc(n,r,t,0,2*dt)}function i(t,r){e.moveTo(t,r);n.point=s}function s(t,n){e.lineTo(t,n)}function o(){n.point=r}function u(){e.closePath()}var t=4.5;var n={point:r,lineStart:function(){n.point=i},lineEnd:o,polygonStart:function(){n.lineEnd=u},polygonEnd:function(){n.lineEnd=o;n.point=r},pointRadius:function(e){t=e;return n},result:G};return n}function Xr(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+ -2*e+"a"+e+","+e+" 0 1,1 0,"+ +2*e+"z"}function Vr(e){var t=hr(function(t,n){return e([t*gt,n*gt])});return function(e){e=t(e);return{point:function(t,n){e.point(t*mt,n*mt)},sphere:function(){e.sphere()},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}}}}function $r(e,t){function n(t,n){var r=Math.cos(t),i=Math.cos(n),s=e(r*i);return[s*i*Math.sin(t),s*Math.sin(n)]}n.invert=function(e,n){var r=Math.sqrt(e*e+n*n),i=t(r),s=Math.sin(i),o=Math.cos(i);return[Math.atan2(e*s,r*o),Math.asin(r&&n*s/r)]};return n}function Qr(e,t){function o(e,t){var n=Math.abs(Math.abs(t)-dt/2)<vt?0:s/Math.pow(r(t),i);return[n*Math.sin(i*e),s-n*Math.cos(i*e)]}var n=Math.cos(e),r=function(e){return Math.tan(dt/4+e/2)},i=e===t?Math.sin(e):Math.log(n/Math.cos(t))/Math.log(r(t)/r(e)),s=n*Math.pow(r(e),i)/i;if(!i)return Zr;o.invert=function(e,t){var n=s-t,r=yt(i)*Math.sqrt(e*e+n*n);return[Math.atan2(e,n)/i,2*Math.atan(Math.pow(s/r,1/i))-dt/2]};return o}function Gr(e,t){function s(e,t){var n=i-t;return[n*Math.sin(r*e),i-n*Math.cos(r*e)]}var n=Math.cos(e),r=e===t?Math.sin(e):(n-Math.cos(t))/(t-e),i=n/r+e;if(Math.abs(r)<vt)return mr;s.invert=function(e,t){var n=i-t;return[Math.atan2(e,n)/r,i-yt(r)*Math.sqrt(e*e+n*n)]};return s}function Zr(e,t){return[e,Math.log(Math.tan(dt/4+t/2))]}function ei(e){var t=pr(e),n=t.scale,r=t.translate,i=t.clipExtent,s;t.scale=function(){var e=n.apply(t,arguments);return e===t?s?t.clipExtent(null):t:e};t.translate=function(){var e=r.apply(t,arguments);return e===t?s?t.clipExtent(null):t:e};t.clipExtent=function(e){var o=i.apply(t,arguments);if(o===t){if(s=e==null){var u=dt*n(),a=r();i([[a[0]-u,a[1]-u],[a[0]+u,a[1]+u]])}}else if(s){o=null}return o};return t.clipExtent(null)}function ri(e,t){var n=Math.cos(t)*Math.sin(e);return[Math.log((1+n)/(1-n))/2,Math.atan2(Math.tan(t),Math.cos(e))]}function ii(e){function u(s){function d(){u.push("M",i(e(a),o))}var u=[],a=[],f=-1,l=s.length,c,h=Qt(t),p=Qt(n);while(++f<l){if(r.call(this,c=s[f],f)){a.push([+h.call(this,c,f),+p.call(this,c,f)])}else if(a.length){d();a=[]}}if(a.length)d();return u.length?u.join(""):null}var t=si,n=oi,r=$n,i=ai,s=i.key,o=.7;u.x=function(e){if(!arguments.length)return t;t=e;return u};u.y=function(e){if(!arguments.length)return n;n=e;return u};u.defined=function(e){if(!arguments.length)return r;r=e;return u};u.interpolate=function(e){if(!arguments.length)return s;if(typeof e==="function")s=i=e;else s=(i=ui.get(e)||ai).key;return u};u.tension=function(e){if(!arguments.length)return o;o=e;return u};return u}function si(e){return e[0]}function oi(e){return e[1]}function ai(e){return e.join("L")}function fi(e){return ai(e)+"Z"}function li(e){var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];while(++t<n)i.push("V",(r=e[t])[1],"H",r[0]);return i.join("")}function ci(e){var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];while(++t<n)i.push("H",(r=e[t])[0],"V",r[1]);return i.join("")}function hi(e,t){return e.length<4?ai(e):e[1]+vi(e.slice(1,e.length-1),mi(e,t))}function pi(e,t){return e.length<3?ai(e):e[0]+vi((e.push(e[0]),e),mi([e[e.length-2]].concat(e,[e[1]]),t))}function di(e,t){return e.length<3?ai(e):e[0]+vi(e,mi(e,t))}function vi(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2){return ai(e)}var n=e.length!=t.length,r="",i=e[0],s=e[1],o=t[0],u=o,a=1;if(n){r+="Q"+(s[0]-o[0]*2/3)+","+(s[1]-o[1]*2/3)+","+s[0]+","+s[1];i=e[1];a=2}if(t.length>1){u=t[1];s=e[a];a++;r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(s[0]-u[0])+","+(s[1]-u[1])+","+s[0]+","+s[1];for(var f=2;f<t.length;f++,a++){s=e[a];u=t[f];r+="S"+(s[0]-u[0])+","+(s[1]-u[1])+","+s[0]+","+s[1]}}if(n){var l=e[a];r+="Q"+(s[0]+u[0]*2/3)+","+(s[1]+u[1]*2/3)+","+l[0]+","+l[1]}return r}function mi(e,t){var n=[],r=(1-t)/2,i,s=e[0],o=e[1],u=1,a=e.length;while(++u<a){i=s;s=o;o=e[u];n.push([r*(o[0]-i[0]),r*(o[1]-i[1])])}return n}function gi(e){if(e.length<3)return ai(e);var t=1,n=e.length,r=e[0],i=r[0],s=r[1],o=[i,i,i,(r=e[1])[0]],u=[s,s,s,r[1]],a=[i,",",s];Ni(a,o,u);while(++t<n){r=e[t];o.shift();o.push(r[0]);u.shift();u.push(r[1]);Ni(a,o,u)}t=-1;while(++t<2){o.shift();o.push(r[0]);u.shift();u.push(r[1]);Ni(a,o,u)}return a.join("")}function yi(e){if(e.length<4)return ai(e);var t=[],n=-1,r=e.length,i,s=[0],o=[0];while(++n<3){i=e[n];s.push(i[0]);o.push(i[1])}t.push(Ei(Ti,s)+","+Ei(Ti,o));--n;while(++n<r){i=e[n];s.shift();s.push(i[0]);o.shift();o.push(i[1]);Ni(t,s,o)}return t.join("")}function bi(e){var t,n=-1,r=e.length,i=r+4,s,o=[],u=[];while(++n<4){s=e[n%r];o.push(s[0]);u.push(s[1])}t=[Ei(Ti,o),",",Ei(Ti,u)];--n;while(++n<i){s=e[n%r];o.shift();o.push(s[0]);u.shift();u.push(s[1]);Ni(t,o,u)}return t.join("")}function wi(e,t){var n=e.length-1;if(n){var r=e[0][0],i=e[0][1],s=e[n][0]-r,o=e[n][1]-i,u=-1,a,f;while(++u<=n){a=e[u];f=u/n;a[0]=t*a[0]+(1-t)*(r+f*s);a[1]=t*a[1]+(1-t)*(i+f*o)}}return gi(e)}function Ei(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function Ni(e,t,n){e.push("C",Ei(Si,t),",",Ei(Si,n),",",Ei(xi,t),",",Ei(xi,n),",",Ei(Ti,t),",",Ei(Ti,n))}function Ci(e,t){return(t[1]-e[1])/(t[0]-e[0])}function ki(e){var t=0,n=e.length-1,r=[],i=e[0],s=e[1],o=r[0]=Ci(i,s);while(++t<n){r[t]=(o+(o=Ci(i=s,s=e[t+1])))/2}r[t]=o;return r}function Li(e){var t=[],n,r,i,s,o=ki(e),u=-1,a=e.length-1;while(++u<a){n=Ci(e[u],e[u+1]);if(Math.abs(n)<1e-6){o[u]=o[u+1]=0}else{r=o[u]/n;i=o[u+1]/n;s=r*r+i*i;if(s>9){s=n*3/Math.sqrt(s);o[u]=s*r;o[u+1]=s*i}}}u=-1;while(++u<=a){s=(e[Math.min(a,u+1)][0]-e[Math.max(0,u-1)][0])/(6*(1+o[u]*o[u]));t.push([s||0,o[u]*s||0])}return t}function Ai(e){return e.length<3?ai(e):e[0]+vi(e,Li(e))}function Oi(e,t,n,r){var i,s,o,u,a,f,l;i=r[e];s=i[0];o=i[1];i=r[t];u=i[0];a=i[1];i=r[n];f=i[0];l=i[1];return(l-o)*(u-s)-(a-o)*(f-s)>0}function Mi(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function _i(e,t,n,r){var i=e[0],s=n[0],o=t[0]-i,u=r[0]-s,a=e[1],f=n[1],l=t[1]-a,c=r[1]-f,h=(u*(a-f)-c*(i-s))/(c*o-u*l);return[i+h*o,a+h*l]}function Pi(e,t){var n={list:e.map(function(e,t){return{index:t,x:e[0],y:e[1]}}).sort(function(e,t){return e.y<t.y?-1:e.y>t.y?1:e.x<t.x?-1:e.x>t.x?1:0}),bottomSite:null};var r={list:[],leftEnd:null,rightEnd:null,init:function(){r.leftEnd=r.createHalfEdge(null,"l");r.rightEnd=r.createHalfEdge(null,"l");r.leftEnd.r=r.rightEnd;r.rightEnd.l=r.leftEnd;r.list.unshift(r.leftEnd,r.rightEnd)},createHalfEdge:function(e,t){return{edge:e,side:t,vertex:null,l:null,r:null}},insert:function(e,t){t.l=e;t.r=e.r;e.r.l=t;e.r=t},leftBound:function(e){var t=r.leftEnd;do{t=t.r}while(t!=r.rightEnd&&i.rightOf(t,e));t=t.l;return t},del:function(e){e.l.r=e.r;e.r.l=e.l;e.edge=null},right:function(e){return e.r},left:function(e){return e.l},leftRegion:function(e){return e.edge==null?n.bottomSite:e.edge.region[e.side]},rightRegion:function(e){return e.edge==null?n.bottomSite:e.edge.region[Di[e.side]]}};var i={bisect:function(e,t){var n={region:{l:e,r:t},ep:{l:null,r:null}};var r=t.x-e.x,i=t.y-e.y,s=r>0?r:-r,o=i>0?i:-i;n.c=e.x*r+e.y*i+(r*r+i*i)*.5;if(s>o){n.a=1;n.b=i/r;n.c/=r}else{n.b=1;n.a=r/i;n.c/=i}return n},intersect:function(e,t){var n=e.edge,r=t.edge;if(!n||!r||n.region.r==r.region.r){return null}var i=n.a*r.b-n.b*r.a;if(Math.abs(i)<1e-10){return null}var s=(n.c*r.b-r.c*n.b)/i,o=(r.c*n.a-n.c*r.a)/i,u=n.region.r,a=r.region.r,f,l;if(u.y<a.y||u.y==a.y&&u.x<a.x){f=e;l=n}else{f=t;l=r}var c=s>=l.region.r.x;if(c&&f.side==="l"||!c&&f.side==="r"){return null}return{x:s,y:o}},rightOf:function(e,t){var n=e.edge,r=n.region.r,i=t.x>r.x;if(i&&e.side==="l"){return 1}if(!i&&e.side==="r"){return 0}if(n.a===1){var s=t.y-r.y,o=t.x-r.x,u=0,a=0;if(!i&&n.b<0||i&&n.b>=0){a=u=s>=n.b*o}else{a=t.x+t.y*n.b>n.c;if(n.b<0){a=!a}if(!a){u=1}}if(!u){var f=r.x-n.region.l.x;a=n.b*(o*o-s*s)<f*s*(1+2*o/f+n.b*n.b);if(n.b<0){a=!a}}}else{var l=n.c-n.a*t.x,c=t.y-l,h=t.x-r.x,p=l-r.y;a=c*c>h*h+p*p}return e.side==="l"?a:!a},endPoint:function(e,n,r){e.ep[n]=r;if(!e.ep[Di[n]])return;t(e)},distance:function(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}};var s={list:[],insert:function(e,t,n){e.vertex=t;e.ystar=t.y+n;for(var r=0,i=s.list,o=i.length;r<o;r++){var u=i[r];if(e.ystar>u.ystar||e.ystar==u.ystar&&t.x>u.vertex.x){continue}else{break}}i.splice(r,0,e)},del:function(e){for(var t=0,n=s.list,r=n.length;t<r&&n[t]!=e;++t){}n.splice(t,1)},empty:function(){return s.list.length===0},nextEvent:function(e){for(var t=0,n=s.list,r=n.length;t<r;++t){if(n[t]==e)return n[t+1]}return null},min:function(){var e=s.list[0];return{x:e.vertex.x,y:e.ystar}},extractMin:function(){return s.list.shift()}};r.init();n.bottomSite=n.list.shift();var o=n.list.shift(),u;var a,f,l,c,h;var p,d,v,m,g;var y,b;while(true){if(!s.empty()){u=s.min()}if(o&&(s.empty()||o.y<u.y||o.y==u.y&&o.x<u.x)){a=r.leftBound(o);f=r.right(a);p=r.rightRegion(a);y=i.bisect(p,o);h=r.createHalfEdge(y,"l");r.insert(a,h);m=i.intersect(a,h);if(m){s.del(a);s.insert(a,m,i.distance(m,o))}a=h;h=r.createHalfEdge(y,"r");r.insert(a,h);m=i.intersect(h,f);if(m){s.insert(h,m,i.distance(m,o))}o=n.list.shift()}else if(!s.empty()){a=s.extractMin();l=r.left(a);f=r.right(a);c=r.right(f);p=r.leftRegion(a);d=r.rightRegion(f);g=a.vertex;i.endPoint(a.edge,a.side,g);i.endPoint(f.edge,f.side,g);r.del(a);s.del(f);r.del(f);b="l";if(p.y>d.y){v=p;p=d;d=v;b="r"}y=i.bisect(p,d);h=r.createHalfEdge(y,b);r.insert(l,h);i.endPoint(y,Di[b],g);m=i.intersect(l,h);if(m){s.del(l);s.insert(l,m,i.distance(m,p))}m=i.intersect(h,c);if(m){s.insert(h,m,i.distance(m,p))}}else{break}}for(a=r.right(r.leftEnd);a!=r.rightEnd;a=r.right(a)){t(a.edge)}}function Hi(e){return e.x}function Bi(e){return e.y}function ji(){return{leaf:true,nodes:[],point:null,x:null,y:null}}function Fi(e,t,n,r,i,s){if(!e(t,n,r,i,s)){var o=(n+i)*.5,u=(r+s)*.5,a=t.nodes;if(a[0])Fi(e,a[0],n,r,o,u);if(a[1])Fi(e,a[1],o,r,i,u);if(a[2])Fi(e,a[2],n,u,o,s);if(a[3])Fi(e,a[3],o,u,i,s)}}function Ii(t,n){t=e.rgb(t);n=e.rgb(n);var r=t.r,i=t.g,s=t.b,o=n.r-r,u=n.g-i,a=n.b-s;return function(e){return"#"+zt(Math.round(r+o*e))+zt(Math.round(i+u*e))+zt(Math.round(s+a*e))}}function qi(e){var t=[e.a,e.b],n=[e.c,e.d],r=Ui(t),i=Ri(t,n),s=Ui(zi(n,t,-i))||0;if(t[0]*n[1]<n[0]*t[1]){t[0]*=-1;t[1]*=-1;r*=-1;i*=-1}this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-n[0],n[1]))*gt;this.translate=[e.e,e.f];this.scale=[r,s];this.skew=s?Math.atan2(i,s)*gt:0}function Ri(e,t){return e[0]*t[0]+e[1]*t[1]}function Ui(e){var t=Math.sqrt(Ri(e,e));if(t){e[0]/=t;e[1]/=t}return t}function zi(e,t,n){e[0]+=n*t[0];e[1]+=n*t[1];return e}function Xi(e,t){t-=e=+e;return function(n){return e+t*n}}function Vi(t,n){var r=[],i=[],s,o=e.transform(t),u=e.transform(n),a=o.translate,f=u.translate,l=o.rotate,c=u.rotate,h=o.skew,p=u.skew,d=o.scale,v=u.scale;if(a[0]!=f[0]||a[1]!=f[1]){r.push("translate(",null,",",null,")");i.push({i:1,x:Xi(a[0],f[0])},{i:3,x:Xi(a[1],f[1])})}else if(f[0]||f[1]){r.push("translate("+f+")")}else{r.push("")}if(l!=c){if(l-c>180)c+=360;else if(c-l>180)l+=360;i.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:Xi(l,c)})}else if(c){r.push(r.pop()+"rotate("+c+")")}if(h!=p){i.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:Xi(h,p)})}else if(p){r.push(r.pop()+"skewX("+p+")")}if(d[0]!=v[0]||d[1]!=v[1]){s=r.push(r.pop()+"scale(",null,",",null,")");i.push({i:s-4,x:Xi(d[0],v[0])},{i:s-2,x:Xi(d[1],v[1])})}else if(v[0]!=1||v[1]!=1){r.push(r.pop()+"scale("+v+")")}s=i.length;return function(e){var t=-1,n;while(++t<s)r[(n=i[t]).i]=n.x(e);return r.join("")}}function $i(e,t){var n={},r={},i;for(i in e){if(i in t){n[i]=Gi(i)(e[i],t[i])}else{r[i]=e[i]}}for(i in t){if(!(i in e)){r[i]=t[i]}}return function(e){for(i in n)r[i]=n[i](e);return r}}function Ji(e,t){var n,r,i,s=0,o=0,u=[],a=[],f,l;e=e+"",t=t+"";Ki.lastIndex=0;for(r=0;n=Ki.exec(t);++r){if(n.index)u.push(t.substring(s,o=n.index));a.push({i:u.length,x:n[0]});u.push(null);s=Ki.lastIndex}if(s<t.length)u.push(t.substring(s));for(r=0,f=a.length;(n=Ki.exec(e))&&r<f;++r){l=a[r];if(l.x==n[0]){if(l.i){if(u[l.i+1]==null){u[l.i-1]+=l.x;u.splice(l.i,1);for(i=r+1;i<f;++i)a[i].i--}else{u[l.i-1]+=l.x+u[l.i+1];u.splice(l.i,2);for(i=r+1;i<f;++i)a[i].i-=2}}else{if(u[l.i+1]==null){u[l.i]=l.x}else{u[l.i]=l.x+u[l.i+1];u.splice(l.i+1,1);for(i=r+1;i<f;++i)a[i].i--}}a.splice(r,1);f--;r--}else{l.x=Xi(parseFloat(n[0]),parseFloat(l.x))}}while(r<f){l=a.pop();if(u[l.i+1]==null){u[l.i]=l.x}else{u[l.i]=l.x+u[l.i+1];u.splice(l.i+1,1)}f--}if(u.length===1){return u[0]==null?a[0].x:function(){return t}}return function(e){for(r=0;r<f;++r)u[(l=a[r]).i]=l.x(e);return u.join("")}}function Qi(t,n){var r=e.interpolators.length,i;while(--r>=0&&!(i=e.interpolators[r](t,n)));return i}function Gi(e){return e=="transform"?Vi:Qi}function Yi(e,t){var n=[],r=[],i=e.length,s=t.length,o=Math.min(e.length,t.length),u;for(u=0;u<o;++u)n.push(Qi(e[u],t[u]));for(;u<i;++u)r[u]=e[u];for(;u<s;++u)r[u]=t[u];return function(e){for(u=0;u<o;++u)r[u]=n[u](e);return r}}function ns(e){return function(t){return t<=0?0:t>=1?1:e(t)}}function rs(e){return function(t){return 1-e(1-t)}}function is(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function ss(e){return e*e}function os(e){return e*e*e}function us(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}function as(e){return function(t){return Math.pow(t,e)}}function fs(e){return 1-Math.cos(e*dt/2)}function ls(e){return Math.pow(2,10*(e-1))}function cs(e){return 1-Math.sqrt(1-e*e)}function hs(e,t){var n;if(arguments.length<2)t=.45;if(arguments.length)n=t/(2*dt)*Math.asin(1/e);else e=1,n=t/4;return function(r){return 1+e*Math.pow(2,10*-r)*Math.sin((r-n)*2*dt/t)}}function ps(e){if(!e)e=1.70158;return function(t){return t*t*((e+1)*t-e)}}function ds(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function vs(t,n){t=e.hcl(t);n=e.hcl(n);var r=t.h,i=t.c,s=t.l,o=n.h-r,u=n.c-i,a=n.l-s;if(o>180)o-=360;else if(o<-180)o+=360;return function(e){return kt(r+o*e,i+u*e,s+a*e)+""}}function ms(t,n){t=e.hsl(t);n=e.hsl(n);var r=t.h,i=t.s,s=t.l,o=n.h-r,u=n.s-i,a=n.l-s;if(o>180)o-=360;else if(o<-180)o+=360;return function(e){return pt(r+o*e,i+u*e,s+a*e)+""}}function gs(t,n){t=e.lab(t);n=e.lab(n);var r=t.l,i=t.a,s=t.b,o=n.l-r,u=n.a-i,a=n.b-s;return function(e){return Ht(r+o*e,i+u*e,s+a*e)+""}}function ys(e,t){t-=e;return function(n){return Math.round(e+t*n)}}function bs(e,t){t=t-(e=+e)?1/(t-e):0;return function(n){return(n-e)*t}}function ws(e,t){t=t-(e=+e)?1/(t-e):0;return function(n){return Math.max(0,Math.min(1,(n-e)*t))}}function Es(e){var t=e.source,n=e.target,r=xs(t,n),i=[t];while(t!==r){t=t.parent;i.push(t)}var s=i.length;while(n!==r){i.splice(s,0,n);n=n.parent}return i}function Ss(e){var t=[],n=e.parent;while(n!=null){t.push(e);e=n;n=n.parent}t.push(e);return t}function xs(e,t){if(e===t)return e;var n=Ss(e),r=Ss(t),i=n.pop(),s=r.pop(),o=null;while(i===s){o=i;i=n.pop();s=r.pop()}return o}function Ts(e){e.fixed|=2}function Ns(e){e.fixed&=~6}function Cs(e){e.fixed|=4;e.px=e.x,e.py=e.y}function ks(e){e.fixed&=~4}function Ls(e,t,n){var r=0,i=0;e.charge=0;if(!e.leaf){var s=e.nodes,o=s.length,u=-1,a;while(++u<o){a=s[u];if(a==null)continue;Ls(a,t,n);e.charge+=a.charge;r+=a.charge*a.cx;i+=a.charge*a.cy}}if(e.point){if(!e.leaf){e.point.x+=Math.random()-.5;e.point.y+=Math.random()-.5}var f=t*n[e.point.index];e.charge+=e.pointCharge=f;r+=f*e.point.x;i+=f*e.point.y}e.cx=r/e.charge;e.cy=i/e.charge}function Ms(t,n){e.rebind(t,n,"sort","children","value");t.nodes=t;t.links=Hs;return t}function _s(e){return e.children}function Ds(e){return e.value}function Ps(e,t){return t.value-e.value}function Hs(t){return e.merge(t.map(function(e){return(e.children||[]).map(function(t){return{source:e,target:t}})}))}function js(e){return e.x}function Fs(e){return e.y}function Is(e,t,n){e.y0=t;e.y=n}function Us(t){return e.range(t.length)}function zs(e){var t=-1,n=e[0].length,r=[];while(++t<n)r[t]=0;return r}function Ws(e){var t=1,n=0,r=e[0][1],i,s=e.length;for(;t<s;++t){if((i=e[t][1])>r){n=t;r=i}}return n}function Xs(e){return e.reduce(Vs,0)}function Vs(e,t){return e+t[1]}function $s(e,t){return Js(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function Js(e,t){var n=-1,r=+e[0],i=(e[1]-r)/t,s=[];while(++n<=t)s[n]=i*n+r;return s}function Ks(t){return[e.min(t),e.max(t)]}function Qs(e,t){return e.parent==t.parent?1:2}function Gs(e){var t=e.children;return t&&t.length?t[0]:e._tree.thread}function Ys(e){var t=e.children,n;return t&&(n=t.length)?t[n-1]:e._tree.thread}function Zs(e,t){var n=e.children;if(n&&(i=n.length)){var r,i,s=-1;while(++s<i){if(t(r=Zs(n[s],t),e)>0){e=r}}}return e}function eo(e,t){return e.x-t.x}function to(e,t){return t.x-e.x}function no(e,t){return e.depth-t.depth}function ro(e,t){function n(e,r){var i=e.children;if(i&&(a=i.length)){var s,o=null,u=-1,a;while(++u<a){s=i[u];n(s,o);o=s}}t(e,r)}n(e,null)}function io(e){var t=0,n=0,r=e.children,i=r.length,s;while(--i>=0){s=r[i]._tree;s.prelim+=t;s.mod+=t;t+=s.shift+(n+=s.change)}}function so(e,t,n){e=e._tree;t=t._tree;var r=n/(t.number-e.number);e.change+=r;t.change-=r;t.shift+=n;t.prelim+=n;t.mod+=n}function oo(e,t,n){return e._tree.ancestor.parent==t.parent?e._tree.ancestor:n}function uo(e,t){return e.value-t.value}function ao(e,t){var n=e._pack_next;e._pack_next=t;t._pack_prev=e;t._pack_next=n;n._pack_prev=t}function fo(e,t){e._pack_next=t;t._pack_prev=e}function lo(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return i*i-n*n-r*r>.001}function co(e){function p(e){n=Math.min(e.x-e.r,n);r=Math.max(e.x+e.r,r);i=Math.min(e.y-e.r,i);s=Math.max(e.y+e.r,s)}if(!(t=e.children)||!(h=t.length))return;var t,n=Infinity,r=-Infinity,i=Infinity,s=-Infinity,o,u,a,f,l,c,h;t.forEach(ho);o=t[0];o.x=-o.r;o.y=0;p(o);if(h>1){u=t[1];u.x=u.r;u.y=0;p(u);if(h>2){a=t[2];mo(o,u,a);p(a);ao(o,a);o._pack_prev=a;ao(a,u);u=o._pack_next;for(f=3;f<h;f++){mo(o,u,a=t[f]);var d=0,v=1,m=1;for(l=u._pack_next;l!==u;l=l._pack_next,v++){if(lo(l,a)){d=1;break}}if(d==1){for(c=o._pack_prev;c!==l._pack_prev;c=c._pack_prev,m++){if(lo(c,a)){break}}}if(d){if(v<m||v==m&&u.r<o.r)fo(o,u=l);else fo(o=c,u);f--}else{ao(o,a);u=a;p(a)}}}}var g=(n+r)/2,y=(i+s)/2,b=0;for(f=0;f<h;f++){a=t[f];a.x-=g;a.y-=y;b=Math.max(b,a.r+Math.sqrt(a.x*a.x+a.y*a.y))}e.r=b;t.forEach(po)}function ho(e){e._pack_next=e._pack_prev=e}function po(e){delete e._pack_next;delete e._pack_prev}function vo(e,t,n,r){var i=e.children;e.x=t+=r*e.x;e.y=n+=r*e.y;e.r*=r;if(i){var s=-1,o=i.length;while(++s<o)vo(i[s],t,n,r)}}function mo(e,t,n){var r=e.r+n.r,i=t.x-e.x,s=t.y-e.y;if(r&&(i||s)){var o=t.r+n.r,u=i*i+s*s;o*=o;r*=r;var a=.5+(r-o)/(2*u),f=Math.sqrt(Math.max(0,2*o*(r+u)-(r-=u)*r-o*o))/(2*u);n.x=e.x+a*i+f*s;n.y=e.y+a*s-f*i}else{n.x=e.x+r;n.y=e.y}}function go(t){return 1+e.max(t,function(e){return e.y})}function yo(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}function bo(e){var t=e.children;return t&&t.length?bo(t[0]):e}function wo(e){var t=e.children,n;return t&&(n=t.length)?wo(t[n-1]):e}function Eo(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function So(e,t){var n=e.x+t[3],r=e.y+t[0],i=e.dx-t[1]-t[3],s=e.dy-t[0]-t[2];if(i<0){n+=i/2;i=0}if(s<0){r+=s/2;s=0}return{x:n,y:r,dx:i,dy:s}}function xo(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function To(e){return e.rangeExtent?e.rangeExtent():xo(e.range())}function No(e,t,n,r){var i=n(e[0],e[1]),s=r(t[0],t[1]);return function(e){return s(i(e))}}function Co(e,t){var n=0,r=e.length-1,i=e[n],s=e[r],o;if(s<i){o=n,n=r,r=o;o=i,i=s,s=o}if(t=t(s-i)){e[n]=t.floor(i);e[r]=t.ceil(s)}return e}function ko(t,n,r,i){var s=[],o=[],u=0,a=Math.min(t.length,n.length)-1;if(t[a]<t[0]){t=t.slice().reverse();n=n.slice().reverse()}while(++u<=a){s.push(r(t[u-1],t[u]));o.push(i(n[u-1],n[u]))}return function(n){var r=e.bisect(t,n,1,a)-1;return o[r](s[r](n))}}function Lo(e,t,n,r){function o(){var o=Math.min(e.length,t.length)>2?ko:No,a=r?ws:bs;i=o(e,t,a,n);s=o(t,e,a,Qi);return u}function u(e){return i(e)}var i,s;u.invert=function(e){return s(e)};u.domain=function(t){if(!arguments.length)return e;e=t.map(Number);return o()};u.range=function(e){if(!arguments.length)return t;t=e;return o()};u.rangeRound=function(e){return u.range(e).interpolate(ys)};u.clamp=function(e){if(!arguments.length)return r;r=e;return o()};u.interpolate=function(e){if(!arguments.length)return n;n=e;return o()};u.ticks=function(t){return _o(e,t)};u.tickFormat=function(t,n){return Do(e,t,n)};u.nice=function(){Co(e,Oo);return o()};u.copy=function(){return Lo(e,t,n,r)};return o()}function Ao(t,n){return e.rebind(t,n,"range","rangeRound","interpolate","clamp")}function Oo(e){e=Math.pow(10,Math.round(Math.log(e)/Math.LN10)-1);return e&&{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}}function Mo(e,t){var n=xo(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),s=t/r*i;if(s<=.15)i*=10;else if(s<=.35)i*=5;else if(s<=.75)i*=2;n[0]=Math.ceil(n[0]/i)*i;n[1]=Math.floor(n[1]/i)*i+i*.5;n[2]=i;return n}function _o(t,n){return e.range.apply(e,Mo(t,n))}function Do(t,n,r){var i=-Math.floor(Math.log(Mo(t,n)[2])/Math.LN10+.01);return e.format(r?r.replace(dn,function(e,t,n,r,s,o,u,a,f,l){return[t,n,r,s,o,u,a,f||"."+(i-(l==="%")*2),l].join("")}):",."+i+"f")}function Po(e,t,n,r){function i(t){return e(n(t))}i.invert=function(t){return r(e.invert(t))};i.domain=function(t){if(!arguments.length)return e.domain().map(r);if(t[0]<0)n=Fo,r=Io;else n=Bo,r=jo;e.domain(t.map(n));return i};i.base=function(e){if(!arguments.length)return t;t=+e;return i};i.nice=function(){e.domain(Co(e.domain(),qo(t)));return i};i.ticks=function(){var i=xo(e.domain()),s=[];if(i.every(isFinite)){var o=Math.log(t),u=Math.floor(i[0]/o),a=Math.ceil(i[1]/o),f=r(i[0]),l=r(i[1]),c=t%1?2:t;if(n===Fo){s.push(-Math.pow(t,-u));for(;u++<a;)for(var h=c-1;h>0;h--)s.push(-Math.pow(t,-u)*h)}else{for(;u<a;u++)for(var h=1;h<c;h++)s.push(Math.pow(t,u)*h);s.push(Math.pow(t,u))}for(u=0;s[u]<f;u++){}for(a=s.length;s[a-1]>l;a--){}s=s.slice(u,a)}return s};i.tickFormat=function(e,s){if(arguments.length<2)s=Ho;if(!arguments.length)return s;var o=Math.log(t),u=Math.max(.1,e/i.ticks().length),a=n===Fo?(f=-1e-12,Math.floor):(f=1e-12,Math.ceil),f;return function(e){return e/r(o*a(n(e)/o+f))<=u?s(e):""}};i.copy=function(){return Po(e.copy(),t,n,r)};return Ao(i,e)}function Bo(e){return Math.log(e<0?0:e)}function jo(e){return Math.exp(e)}function Fo(e){return-Math.log(e>0?0:-e)}function Io(e){return-Math.exp(-e)}function qo(e){e=Math.log(e);var t={floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}};return function(){return t}}function Ro(e,t){function i(t){return e(n(t))}var n=Uo(t),r=Uo(1/t);i.invert=function(t){return r(e.invert(t))};i.domain=function(t){if(!arguments.length)return e.domain().map(r);e.domain(t.map(n));return i};i.ticks=function(e){return _o(i.domain(),e)};i.tickFormat=function(e,t){return Do(i.domain(),e,t)};i.nice=function(){return i.domain(Co(i.domain(),Oo))};i.exponent=function(e){if(!arguments.length)return t;var s=i.domain();n=Uo(t=e);r=Uo(1/t);return i.domain(s)};i.copy=function(){return Ro(e.copy(),t)};return Ao(i,e)}function Uo(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function zo(t,n){function o(e){return i[((r.get(e)||r.set(e,t.push(e)))-1)%i.length]}function u(n,r){return e.range(t.length).map(function(e){return n+r*e})}var r,i,s;o.domain=function(e){if(!arguments.length)return t;t=[];r=new c;var i=-1,s=e.length,u;while(++i<s)if(!r.has(u=e[i]))r.set(u,t.push(u));return o[n.t].apply(o,n.a)};o.range=function(e){if(!arguments.length)return i;i=e;s=0;n={t:"range",a:arguments};return o};o.rangePoints=function(e,r){if(arguments.length<2)r=0;var a=e[0],f=e[1],l=(f-a)/(Math.max(1,t.length-1)+r);i=u(t.length<2?(a+f)/2:a+l*r/2,l);s=0;n={t:"rangePoints",a:arguments};return o};o.rangeBands=function(e,r,a){if(arguments.length<2)r=0;if(arguments.length<3)a=r;var f=e[1]<e[0],l=e[f-0],c=e[1-f],h=(c-l)/(t.length-r+2*a);i=u(l+h*a,h);if(f)i.reverse();s=h*(1-r);n={t:"rangeBands",a:arguments};return o};o.rangeRoundBands=function(e,r,a){if(arguments.length<2)r=0;if(arguments.length<3)a=r;var f=e[1]<e[0],l=e[f-0],c=e[1-f],h=Math.floor((c-l)/(t.length-r+2*a)),p=c-l-(t.length-r)*h;i=u(l+Math.round(p/2),h);if(f)i.reverse();s=Math.round(h*(1-r));n={t:"rangeRoundBands",a:arguments};return o};o.rangeBand=function(){if(s<=50)return s;else return 50};o.rangeExtent=function(){return xo(n.a[0])};o.copy=function(){return zo(t,n)};return o.domain(t)}function Ko(t,n){function i(){var i=0,o=n.length;r=[];while(++i<o)r[i-1]=e.quantile(t,i/o);return s}function s(t){if(isNaN(t=+t))return NaN;return n[e.bisect(r,t)]}var r;s.domain=function(n){if(!arguments.length)return t;t=n.filter(function(e){return!isNaN(e)}).sort(e.ascending);return i()};s.range=function(e){if(!arguments.length)return n;n=e;return i()};s.quantiles=function(){return r};s.copy=function(){return Ko(t,n)};return i()}function Qo(e,t,n){function s(t){return n[Math.max(0,Math.min(i,Math.floor(r*(t-e))))]}function o(){r=n.length/(t-e);i=n.length-1;return s}var r,i;s.domain=function(n){if(!arguments.length)return[e,t];e=+n[0];t=+n[n.length-1];return o()};s.range=function(e){if(!arguments.length)return n;n=e;return o()};s.copy=function(){return Qo(e,t,n)};return o()}function Go(t,n){function r(r){return n[e.bisect(t,r)]}r.domain=function(e){if(!arguments.length)return t;t=e;return r};r.range=function(e){if(!arguments.length)return n;n=e;return r};r.copy=function(){return Go(t,n)};return r}function Yo(e){function t(e){return+e}t.invert=t;t.domain=t.range=function(n){if(!arguments.length)return e;e=n.map(t);return t};t.ticks=function(t){return _o(e,t)};t.tickFormat=function(t,n){return Do(e,t,n)};t.copy=function(){return Yo(e)};return t}function tu(e){return e.innerRadius}function nu(e){return e.outerRadius}function ru(e){return e.startAngle}function iu(e){return e.endAngle}function su(e){var t,n=-1,r=e.length,i,s;while(++n<r){t=e[n];i=t[0];s=t[1]+Zo;t[0]=i*Math.cos(s);t[1]=i*Math.sin(s)}return e}function ou(e){function c(u){function x(){c.push("M",o(e(p),l),f,a(e(h.reverse()),l),"Z")}var c=[],h=[],p=[],d=-1,v=u.length,m,g=Qt(t),y=Qt(r),b=t===n?function(){return E}:Qt(n),w=r===i?function(){return S}:Qt(i),E,S;while(++d<v){if(s.call(this,m=u[d],d)){h.push([E=+g.call(this,m,d),S=+y.call(this,m,d)]);p.push([+b.call(this,m,d),+w.call(this,m,d)])}else if(h.length){x();h=[];p=[]}}if(h.length)x();return c.length?c.join(""):null}var t=si,n=si,r=0,i=oi,s=$n,o=ai,u=o.key,a=o,f="L",l=.7;c.x=function(e){if(!arguments.length)return n;t=n=e;return c};c.x0=function(e){if(!arguments.length)return t;t=e;return c};c.x1=function(e){if(!arguments.length)return n;n=e;return c};c.y=function(e){if(!arguments.length)return i;r=i=e;return c};c.y0=function(e){if(!arguments.length)return r;r=e;return c};c.y1=function(e){if(!arguments.length)return i;i=e;return c};c.defined=function(e){if(!arguments.length)return s;s=e;return c};c.interpolate=function(e){if(!arguments.length)return u;if(typeof e==="function")u=o=e;else u=(o=ui.get(e)||ai).key;a=o.reverse||o;f=o.closed?"M":"L";return c};c.tension=function(e){if(!arguments.length)return l;l=e;return c};return c}function uu(e){return e.radius}function au(e){return[e.x,e.y]}function fu(e){return function(){var t=e.apply(this,arguments),n=t[0],r=t[1]+Zo;return[n*Math.cos(r),n*Math.sin(r)]}}function lu(){return 64}function cu(){return"circle"}function hu(e){var t=Math.sqrt(e/dt);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+ -t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function mu(e,t){A(e,gu);e.id=t;return e}function Eu(e,t,n,r){var i=e.id;return nt(e,typeof n==="function"?function(e,s,o){e.__transition__[i].tween.set(t,r(n.call(e,e.__data__,s,o)))}:(n=r(n),function(e){e.__transition__[i].tween.set(t,n)}))}function Su(e){if(e==null)e="";return function(){this.textContent=e}}function xu(t,n,r,i){var s=t.__transition__||(t.__transition__={active:0,count:0}),o=s[r];if(!o){var u=i.time;o=s[r]={tween:new c,event:e.dispatch("start","end"),time:u,ease:i.ease,delay:i.delay,duration:i.duration};++s.count;e.timer(function(i){function d(i){if(s.active>r)return m();s.active=r;l.start.call(t,a,n);o.tween.forEach(function(e,r){if(r=r.call(t,a,n)){p.push(r)}});if(!v(i))e.timer(v,0,u);return 1}function v(e){if(s.active!==r)return m();var i=(e-c)/h,o=f(i),u=p.length;while(u>0){p[--u].call(t,o)}if(i>=1){m();l.end.call(t,a,n);return 1}}function m(){if(--s.count)delete s[r];else delete t.__transition__;return 1}var a=t.__data__,f=o.ease,l=o.event,c=o.delay,h=o.duration,p=[];return c<=i?d(i):e.timer(d,c,u),1},0,u);return o}}function Cu(e,t){e.attr("transform",function(e){return"translate("+t(e)+",0)"})}function ku(e,t){e.attr("transform",function(e){return"translate(0,"+t(e)+")"})}function Lu(e,t,n){i=[];if(n&&t.length>1){var r=xo(e.domain()),i,s=-1,o=t.length,u=(t[1]-t[0])/++n,a,f;while(++s<o){for(a=n;--a>0;){if((f=+t[s]-a*u)>=r[0]){i.push(f)}}}for(--s,a=0;++a<n&&(f=+t[s]+a*u)<r[1];){i.push(f)}}return i}function Du(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Uu(e,t,n){function r(t){var n=e(t),r=s(n,1);return t-n<r-t?n:r}function i(n){t(n=e(new Mu(n-1)),1);return n}function s(e,n){t(e=new Mu(+e),n);return e}function o(e,r,s){var o=i(e),u=[];if(s>1){while(o<r){if(!(n(o)%s))u.push(new Date(+o));t(o,1)}}else{while(o<r)u.push(new Date(+o)),t(o,1)}return u}function u(e,t,n){try{Mu=Du;var r=new Du;r._=e;return o(r,t,n)}finally{Mu=Date}}e.floor=e;e.round=r;e.ceil=i;e.offset=s;e.range=o;var a=e.utc=zu(e);a.floor=a;a.round=zu(r);a.ceil=zu(i);a.offset=zu(s);a.range=u;return e}function zu(e){return function(t,n){try{Mu=Du;var r=new Du;r._=t;return e(r,n)._}finally{Mu=Date}}}function Wu(e,t,n,r){var i,s,o=0,u=t.length,a=n.length;while(o<u){if(r>=a)return-1;i=t.charCodeAt(o++);if(i===37){s=na[t.charAt(o++)];if(!s||(r=s(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++)){return-1}}return r}function Xu(t){return new RegExp("^(?:"+t.map(e.requote).join("|")+")","i")}function Vu(e){var t=new c,n=-1,r=e.length;while(++n<r)t.set(e[n].toLowerCase(),n);return t}function $u(e,t,n){e+="";var r=e.length;return r<n?(new Array(n-r+1)).join(t)+e:e}function ra(e,t,n){Ku.lastIndex=0;var r=Ku.exec(t.substring(n));return r?n+=r[0].length:-1}function ia(e,t,n){Ju.lastIndex=0;var r=Ju.exec(t.substring(n));return r?n+=r[0].length:-1}function sa(e,t,n){Yu.lastIndex=0;var r=Yu.exec(t.substring(n));return r?(e.m=Zu.get(r[0].toLowerCase()),n+=r[0].length):-1}function oa(e,t,n){Qu.lastIndex=0;var r=Qu.exec(t.substring(n));return r?(e.m=Gu.get(r[0].toLowerCase()),n+=r[0].length):-1}function ua(e,t,n){return Wu(e,ta.c.toString(),t,n)}function aa(e,t,n){return Wu(e,ta.x.toString(),t,n)}function fa(e,t,n){return Wu(e,ta.X.toString(),t,n)}function la(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+4));return r?(e.y=+r[0],n+=r[0].length):-1}function ca(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+2));return r?(e.y=ha(+r[0]),n+=r[0].length):-1}function ha(e){return e+(e>68?1900:2e3)}function pa(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+2));return r?(e.m=r[0]-1,n+=r[0].length):-1}function da(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+2));return r?(e.d=+r[0],n+=r[0].length):-1}function va(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+2));return r?(e.H=+r[0],n+=r[0].length):-1}function ma(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+2));return r?(e.M=+r[0],n+=r[0].length):-1}function ga(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+2));return r?(e.S=+r[0],n+=r[0].length):-1}function ya(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+3));return r?(e.L=+r[0],n+=r[0].length):-1}function wa(e,t,n){var r=Ea.get(t.substring(n,n+=2).toLowerCase());return r==null?-1:(e.p=r,n)}function Sa(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=~~(Math.abs(t)/60),i=Math.abs(t)%60;return n+$u(r,"0",2)+$u(i,"0",2)}function Ta(e){return e.toISOString()}function Na(t,n,r){function i(e){return t(e)}i.invert=function(e){return ka(t.invert(e))};i.domain=function(e){if(!arguments.length)return t.domain().map(ka);t.domain(e);return i};i.nice=function(e){return i.domain(Co(i.domain(),function(){return e}))};i.ticks=function(r,s){var o=Ca(i.domain());if(typeof r!=="function"){var u=o[1]-o[0],a=u/r,f=e.bisect(Ma,a);if(f==Ma.length)return n.year(o,r);if(!f)return t.ticks(r).map(ka);if(Math.log(a/Ma[f-1])<Math.log(Ma[f]/a))--f;r=n[f];s=r[1];r=r[0].range}return r(o[0],new Date(+o[1]+1),s)};i.tickFormat=function(){return r};i.copy=function(){return Na(t.copy(),n,r)};return e.rebind(i,t,"range","rangeRound","interpolate","clamp")}function Ca(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function ka(e){return new Date(e)}function La(e){return function(t){var n=e.length-1,r=e[n];while(!r[1](t))r=e[--n];return r[0](t)}}function Aa(e){var t=new Date(e,0,1);t.setFullYear(e);return t}function Oa(e){var t=e.getFullYear(),n=Aa(t),r=Aa(t+1);return t+(e-n)/(r-n)}function Ia(e){var t=new Date(Date.UTC(e,0,1));t.setUTCFullYear(e);return t}function qa(e){var t=e.getUTCFullYear(),n=Ia(t),r=Ia(t+1);return t+(e-n)/(r-n)}function Ra(e){return e.responseText}function Ua(e){return JSON.parse(e.responseText)}function za(e){var n=t.createRange();n.selectNode(t.body);return n.createContextualFragment(e.responseText)}function Wa(e){return e.responseXML}var e={version:"3.1.5"};if(!Date.now)Date.now=function(){return+(new Date)};var t=document,n=window;try{t.createElement("div").style.setProperty("opacity",0,"")}catch(r){var i=n.CSSStyleDeclaration.prototype,s=i.setProperty;i.setProperty=function(e,t,n){s.call(this,e,t+"",n)}}e.ascending=function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN};e.descending=function(e,t){return t<e?-1:t>e?1:t>=e?0:NaN};e.min=function(e,t){var n=-1,r=e.length,i,s;if(arguments.length===1){while(++n<r&&((i=e[n])==null||i!=i))i=undefined;while(++n<r)if((s=e[n])!=null&&i>s)i=s}else{while(++n<r&&((i=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)if((s=t.call(e,e[n],n))!=null&&i>s)i=s}return i};e.max=function(e,t){var n=-1,r=e.length,i,s;if(arguments.length===1){while(++n<r&&((i=e[n])==null||i!=i))i=undefined;while(++n<r)if((s=e[n])!=null&&s>i)i=s}else{while(++n<r&&((i=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)if((s=t.call(e,e[n],n))!=null&&s>i)i=s}return i};e.extent=function(e,t){var n=-1,r=e.length,i,s,o;if(arguments.length===1){while(++n<r&&((i=o=e[n])==null||i!=i))i=o=undefined;while(++n<r)if((s=e[n])!=null){if(i>s)i=s;if(o<s)o=s}}else{while(++n<r&&((i=o=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)if((s=t.call(e,e[n],n))!=null){if(i>s)i=s;if(o<s)o=s}}return[i,o]};e.sum=function(e,t){var n=0,r=e.length,i,s=-1;if(arguments.length===1){while(++s<r)if(!isNaN(i=+e[s]))n+=i}else{while(++s<r)if(!isNaN(i=+t.call(e,e[s],s)))n+=i}return n};e.mean=function(e,t){var n=e.length,r,i=0,s=-1,u=0;if(arguments.length===1){while(++s<n)if(o(r=e[s]))i+=(r-i)/++u}else{while(++s<n)if(o(r=t.call(e,e[s],s)))i+=(r-i)/++u}return u?i:undefined};e.quantile=function(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=+e[r-1],s=n-r;return s?i+s*(e[r]-i):i};e.median=function(t,n){if(arguments.length>1)t=t.map(n);t=t.filter(o);return t.length?e.quantile(t.sort(e.ascending),.5):undefined};e.bisector=function(e){return{left:function(t,n,r,i){if(arguments.length<3)r=0;if(arguments.length<4)i=t.length;while(r<i){var s=r+i>>>1;if(e.call(t,t[s],s)<n)r=s+1;else i=s}return r},right:function(t,n,r,i){if(arguments.length<3)r=0;if(arguments.length<4)i=t.length;while(r<i){var s=r+i>>>1;if(n<e.call(t,t[s],s))i=s;else r=s+1}return r}}};var u=e.bisector(function(e){return e});e.bisectLeft=u.left;e.bisect=e.bisectRight=u.right;e.shuffle=function(e){var t=e.length,n,r;while(t){r=Math.random()*t--|0;n=e[t],e[t]=e[r],e[r]=n}return e};e.permute=function(e,t){var n=[],r=-1,i=t.length;while(++r<i)n[r]=e[t[r]];return n};e.zip=function(){if(!(s=arguments.length))return[];for(var t=-1,n=e.min(arguments,a),r=new Array(n);++t<n;){for(var i=-1,s,o=r[t]=new Array(s);++i<s;){o[i]=arguments[i][t]}}return r};e.transpose=function(t){return e.zip.apply(e,t)};e.keys=function(e){var t=[];for(var n in e)t.push(n);return t};e.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t};e.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t};e.merge=function(e){return Array.prototype.concat.apply([],e)};e.range=function(e,t,n){if(arguments.length<3){n=1;if(arguments.length<2){t=e;e=0}}if((t-e)/n===Infinity)throw new Error("infinite range");var r=[],i=f(Math.abs(n)),s=-1,o;e*=i,t*=i,n*=i;if(n<0)while((o=e+n*++s)>t)r.push(o/i);else while((o=e+n*++s)<t)r.push(o/i);return r};e.map=function(e){var t=new c;for(var n in e)t.set(n,e[n]);return t};l(c,{has:function(e){return h+e in this},get:function(e){return this[h+e]},set:function(e,t){return this[h+e]=t},remove:function(e){e=h+e;return e in this&&delete this[e]},keys:function(){var e=[];this.forEach(function(t){e.push(t)});return e},values:function(){var e=[];this.forEach(function(t,n){e.push(n)});return e},entries:function(){var e=[];this.forEach(function(t,n){e.push({key:t,value:n})});return e},forEach:function(e){for(var t in this){if(t.charCodeAt(0)===p){e.call(this,t.substring(1),this[t])}}}});var h="\0",p=h.charCodeAt(0);e.nest=function(){function o(e,r,u){if(u>=n.length)return s?s.call(t,r):i?r.sort(i):r;var a=-1,f=r.length,l=n[u++],h,p,d,v=new c,m;while(++a<f){if(m=v.get(h=l(p=r[a]))){m.push(p)}else{v.set(h,[p])}}if(e){p=e();d=function(t,n){p.set(t,o(e,n,u))}}else{p={};d=function(t,n){p[t]=o(e,n,u)}}v.forEach(d);return p}function u(e,t){if(t>=n.length)return e;var i=[],s=r[t++];e.forEach(function(e,n){i.push({key:e,values:u(n,t)})});return s?i.sort(function(e,t){return s(e.key,t.key)}):i}var t={},n=[],r=[],i,s;t.map=function(e,t){return o(t,e,0)};t.entries=function(t){return u(o(e.map,t,0),0)};t.key=function(e){n.push(e);return t};t.sortKeys=function(e){r[n.length-1]=e;return t};t.sortValues=function(e){i=e;return t};t.rollup=function(e){s=e;return t};return t};e.set=function(e){var t=new d;if(e)for(var n=0;n<e.length;n++)t.add(e[n]);return t};l(d,{has:function(e){return h+e in this},add:function(e){this[h+e]=true;return e},remove:function(e){e=h+e;return e in this&&delete this[e]},values:function(){var e=[];this.forEach(function(t){e.push(t)});return e},forEach:function(e){for(var t in this){if(t.charCodeAt(0)===p){e.call(this,t.substring(1))}}}});e.behavior={};e.rebind=function(e,t){var n=1,r=arguments.length,i;while(++n<r)e[i=arguments[n]]=v(e,t,t[i]);return e};e.dispatch=function(){var e=new m,t=-1,n=arguments.length;while(++t<n)e[arguments[t]]=g(e);return e};m.prototype.on=function(e,t){var n=e.indexOf("."),r="";if(n>=0){r=e.substring(n+1);e=e.substring(0,n)}if(e)return arguments.length<2?this[e].on(r):this[e].on(r,t);if(arguments.length===2){if(t==null)for(e in this){if(this.hasOwnProperty(e))this[e].on(r,null)}return this}};e.event=null;e.mouse=function(e){return T(e,w())};var x=/WebKit/.test(n.navigator.userAgent)?-1:0;var N=k;try{N(t.documentElement.childNodes)[0].nodeType}catch(L){N=C}var A=[].__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]};e.touches=function(e,t){if(arguments.length<2)t=w().touches;return t?N(t).map(function(t){var n=T(e,t);n.identifier=t.identifier;return n}):[]};e.behavior.drag=function(){function i(){this.on("mousedown.drag",s).on("touchstart.drag",s)}function s(){function h(){var t=i.parentNode;return u!=null?e.touches(t).filter(function(e){return e.identifier===u})[0]:e.mouse(t)}function p(){if(!i.parentNode)return d();var e=h(),t=e[0]-f[0],n=e[1]-f[1];l|=t|n;f=e;y();s({type:"drag",x:e[0]+a[0],y:e[1]+a[1],dx:t,dy:n})}function d(){s({type:"dragend"});if(l){y();if(e.event.target===o)E(c,"click")}c.on(u!=null?"touchmove.drag-"+u:"mousemove.drag",null).on(u!=null?"touchend.drag-"+u:"mouseup.drag",null)}var i=this,s=t.of(i,arguments),o=e.event.target,u=e.event.touches?e.event.changedTouches[0].identifier:null,a,f=h(),l=0;var c=e.select(n).on(u!=null?"touchmove.drag-"+u:"mousemove.drag",p).on(u!=null?"touchend.drag-"+u:"mouseup.drag",d,true);if(r){a=r.apply(i,arguments);a=[a.x-f[0],a.y-f[1]]}else{a=[0,0]}if(u==null)y();s({type:"dragstart"})}var t=S(i,"drag","dragstart","dragend"),r=null;i.origin=function(e){if(!arguments.length)return r;r=e;return i};return e.rebind(i,t,"on")};var M=function(e,t){return t.querySelector(e)},_=function(e,t){return t.querySelectorAll(e)},D=t.documentElement,P=D.matchesSelector||D.webkitMatchesSelector||D.mozMatchesSelector||D.msMatchesSelector||D.oMatchesSelector,H=function(e,t){return P.call(e,t)};if(typeof Sizzle==="function"){M=function(e,t){return Sizzle(e,t)[0]||null};_=function(e,t){return Sizzle.uniqueSort(Sizzle(e,t))};H=Sizzle.matchesSelector}var B=[];e.selection=function(){return st};e.selection.prototype=B;B.select=function(e){var t=[],n,r,i,s;if(typeof e!=="function")e=j(e);for(var o=-1,u=this.length;++o<u;){t.push(n=[]);n.parentNode=(i=this[o]).parentNode;for(var a=-1,f=i.length;++a<f;){if(s=i[a]){n.push(r=e.call(s,s.__data__,a));if(r&&"__data__"in s)r.__data__=s.__data__}else{n.push(null)}}}return O(t)};B.selectAll=function(e){var t=[],n,r;if(typeof e!=="function")e=F(e);for(var i=-1,s=this.length;++i<s;){for(var o=this[i],u=-1,a=o.length;++u<a;){if(r=o[u]){t.push(n=N(e.call(r,r.__data__,u)));n.parentNode=r}}}return O(t)};var I={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};e.ns={prefix:I,qualify:function(e){var t=e.indexOf(":"),n=e;if(t>=0){n=e.substring(0,t);e=e.substring(t+1)}return I.hasOwnProperty(n)?{space:I[n],local:e}:e}};B.attr=function(t,n){if(arguments.length<2){if(typeof t==="string"){var r=this.node();t=e.ns.qualify(t);return t.local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(n in t)this.each(q(n,t[n]));return this}return this.each(q(t,n))};e.requote=function(e){return e.replace(U,"\\$&")};var U=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;B.classed=function(e,t){if(arguments.length<2){if(typeof e==="string"){var n=this.node(),r=(e=e.trim().split(/^|\s+/g)).length,i=-1;if(t=n.classList){while(++i<r)if(!t.contains(e[i]))return false}else{t=n.getAttribute("class");while(++i<r)if(!z(e[i]).test(t))return false}return true}for(t in e)this.each(W(t,e[t]));return this}return this.each(W(e,t))};B.style=function(e,t,r){var i=arguments.length;if(i<3){if(typeof e!=="string"){if(i<2)t="";for(r in e)this.each(V(r,e[r],t));return this}if(i<2)return n.getComputedStyle(this.node(),null).getPropertyValue(e);r=""}return this.each(V(e,t,r))};B.property=function(e,t){if(arguments.length<2){if(typeof e==="string")return this.node()[e];for(t in e)this.each($(t,e[t]));return this}return this.each($(e,t))};B.text=function(e){return arguments.length?this.each(typeof e==="function"?function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}:e==null?function(){this.textContent=""}:function(){this.textContent=e}):this.node().textContent};B.html=function(e){return arguments.length?this.each(typeof e==="function"?function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}:e==null?function(){this.innerHTML=""}:function(){this.innerHTML=e}):this.node().innerHTML};B.append=function(n){function r(){return this.appendChild(t.createElementNS(this.namespaceURI,n))}function i(){return this.appendChild(t.createElementNS(n.space,n.local))}n=e.ns.qualify(n);return this.select(n.local?i:r)};B.insert=function(n,r){function i(e,i){return this.insertBefore(t.createElementNS(this.namespaceURI,n),r.call(this,e,i))}function s(e,i){return this.insertBefore(t.createElementNS(n.space,n.local),r.call(this,e,i))}n=e.ns.qualify(n);if(typeof r!=="function")r=j(r);return this.select(n.local?s:i)};B.remove=function(){return this.each(function(){var e=this.parentNode;if(e)e.removeChild(this)})};B.data=function(e,t){function o(e,n){var r,i=e.length,s=n.length,o=Math.min(i,s),l=new Array(s),h=new Array(s),p=new Array(i),d,v;if(t){var m=new c,g=new c,y=[],b;for(r=-1;++r<i;){b=t.call(d=e[r],d.__data__,r);if(m.has(b)){p[r]=d}else{m.set(b,d)}y.push(b)}for(r=-1;++r<s;){b=t.call(n,v=n[r],r);if(d=m.get(b)){l[r]=d;d.__data__=v}else if(!g.has(b)){h[r]=J(v)}g.set(b,v);m.remove(b)}for(r=-1;++r<i;){if(m.has(y[r])){p[r]=e[r]}}}else{for(r=-1;++r<o;){d=e[r];v=n[r];if(d){d.__data__=v;l[r]=d}else{h[r]=J(v)}}for(;r<s;++r){h[r]=J(n[r])}for(;r<i;++r){p[r]=e[r]}}h.update=l;h.parentNode=l.parentNode=p.parentNode=e.parentNode;u.push(h);a.push(l);f.push(p)}var n=-1,r=this.length,i,s;if(!arguments.length){e=new Array(r=(i=this[0]).length);while(++n<r){if(s=i[n]){e[n]=s.__data__}}return e}var u=rt([]),a=O([]),f=O([]);if(typeof e==="function"){while(++n<r){o(i=this[n],e.call(i,i.parentNode.__data__,n))}}else{while(++n<r){o(i=this[n],e)}}a.enter=function(){return u};a.exit=function(){return f};return a};B.datum=function(e){return arguments.length?this.property("__data__",e):this.property("__data__")};B.filter=function(e){var t=[],n,r,i;if(typeof e!=="function")e=K(e);for(var s=0,o=this.length;s<o;s++){t.push(n=[]);n.parentNode=(r=this[s]).parentNode;for(var u=0,a=r.length;u<a;u++){if((i=r[u])&&e.call(i,i.__data__,u)){n.push(i)}}}return O(t)};B.order=function(){for(var e=-1,t=this.length;++e<t;){for(var n=this[e],r=n.length-1,i=n[r],s;--r>=0;){if(s=n[r]){if(i&&i!==s.nextSibling)i.parentNode.insertBefore(s,i);i=s}}}return this};B.sort=function(e){e=Q.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()};B.on=function(e,t,n){var r=arguments.length;if(r<3){if(typeof e!=="string"){if(r<2)t=false;for(n in e)this.each(Y(n,e[n],t));return this}if(r<2)return(r=this.node()["__on"+e])&&r._;n=false}return this.each(Y(e,t,n))};var Z=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});Z.forEach(function(e){if("on"+e in t)Z.remove(e)});B.each=function(e){return nt(this,function(t,n,r){e.call(t,t.__data__,n,r)})};B.call=function(e){var t=N(arguments);e.apply(t[0]=this,t);return this};B.empty=function(){return!this.node()};B.node=function(){for(var e=0,t=this.length;e<t;e++){for(var n=this[e],r=0,i=n.length;r<i;r++){var s=n[r];if(s)return s}}return null};var it=[];e.selection.enter=rt;e.selection.enter.prototype=it;it.append=B.append;it.insert=B.insert;it.empty=B.empty;it.node=B.node;it.select=function(e){var t=[],n,r,i,s,o;for(var u=-1,a=this.length;++u<a;){i=(s=this[u]).update;t.push(n=[]);n.parentNode=s.parentNode;for(var f=-1,l=s.length;++f<l;){if(o=s[f]){n.push(i[f]=r=e.call(s.parentNode,o.__data__,f));r.__data__=o.__data__}else{n.push(null)}}}return O(t)};B.transition=function(){var e=bu||++yu,t=[],n,r,i=Object.create(wu);i.time=Date.now();for(var s=-1,o=this.length;++s<o;){t.push(n=[]);for(var u=this[s],a=-1,f=u.length;++a<f;){if(r=u[a])xu(r,a,e,i);n.push(r)}}return mu(t,e)};var st=O([[t]]);st[0].parentNode=D;e.select=function(e){return typeof e==="string"?st.select(e):O([[e]])};e.selectAll=function(e){return typeof e==="string"?st.selectAll(e):O([N(e)])};e.behavior.zoom=function(){function p(){this.on("mousedown.zoom",x).on("mousemove.zoom",N).on(at+".zoom",T).on("dblclick.zoom",C).on("touchstart.zoom",k).on("touchmove.zoom",L).on("touchend.zoom",k)}function d(e){return[(e[0]-t[0])/i,(e[1]-t[1])/i]}function v(e){return[e[0]*i+t[0],e[1]*i+t[1]]}function m(e){i=Math.max(o[0],Math.min(o[1],e))}function g(e,n){n=v(n);t[0]+=e[0]-n[0];t[1]+=e[1]-n[1]}function b(){if(f)f.domain(a.range().map(function(e){return(e-t[0])/i}).map(a.invert));if(c)c.domain(l.range().map(function(e){return(e-t[1])/i}).map(l.invert))}function w(n){b();e.event.preventDefault();n({type:"zoom",scale:i,translate:t})}function x(){function f(){s=1;g(e.mouse(t),a);w(r)}function l(){if(s)y();o.on("mousemove.zoom",null).on("mouseup.zoom",null);if(s&&e.event.target===i)E(o,"click.zoom")}var t=this,r=u.of(t,arguments),i=e.event.target,s=0,o=e.select(n).on("mousemove.zoom",f).on("mouseup.zoom",l),a=d(e.mouse(t));n.focus();y()}function T(){if(!r)r=d(e.mouse(this));m(Math.pow(2,ut()*.002)*i);g(e.mouse(this),r);w(u.of(this,arguments))}function N(){r=null}function C(){var t=e.mouse(this),n=d(t),r=Math.log(i)/Math.LN2;m(Math.pow(2,e.event.shiftKey?Math.ceil(r)-1:Math.floor(r)+1));g(t,n);w(u.of(this,arguments))}function k(){var t=e.touches(this),n=Date.now();s=i;r={};t.forEach(function(e){r[e.identifier]=d(e)});y();if(t.length===1){if(n-h<500){var o=t[0],a=d(t[0]);m(i*2);g(o,a);w(u.of(this,arguments))}h=n}}function L(){var t=e.touches(this),n=t[0],i=r[n.identifier];if(o=t[1]){var o,a=r[o.identifier];n=[(n[0]+o[0])/2,(n[1]+o[1])/2];i=[(i[0]+a[0])/2,(i[1]+a[1])/2];m(e.event.scale*s)}g(n,i);h=null;w(u.of(this,arguments))}var t=[0,0],r,i=1,s,o=ot,u=S(p,"zoom"),a,f,l,c,h;p.translate=function(e){if(!arguments.length)return t;t=e.map(Number);b();return p};p.scale=function(e){if(!arguments.length)return i;i=+e;b();return p};p.scaleExtent=function(e){if(!arguments.length)return o;o=e==null?ot:e.map(Number);return p};p.x=function(e){if(!arguments.length)return f;f=e;a=e.copy();t=[0,0];i=1;return p};p.y=function(e){if(!arguments.length)return c;c=e;l=e.copy();t=[0,0];i=1;return p};return e.rebind(p,u,"on")};var ot=[0,Infinity];var ut,at="onwheel"in t?(ut=function(){return-e.event.deltaY*(e.event.deltaMode?120:1)},"wheel"):"onmousewheel"in t?(ut=function(){return e.event.wheelDelta},"mousewheel"):(ut=function(){return-e.event.detail},"MozMousePixelScroll");ft.prototype.toString=function(){return this.rgb()+""};e.hsl=function(e,t,n){return arguments.length===1?e instanceof ct?lt(e.h,e.s,e.l):Wt(""+e,Xt,lt):lt(+e,+t,+n)};var ht=ct.prototype=new ft;ht.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);return lt(this.h,this.s,this.l/e)};ht.darker=function(e){e=Math.pow(.7,arguments.length?e:1);return lt(this.h,this.s,e*this.l)};ht.rgb=function(){return pt(this.h,this.s,this.l)};var dt=Math.PI,vt=1e-6,mt=dt/180,gt=180/dt;e.hcl=function(t,n,r){return arguments.length===1?t instanceof Nt?Tt(t.h,t.c,t.l):t instanceof At?Bt(t.l,t.a,t.b):Bt((t=Vt((t=e.rgb(t)).r,t.g,t.b)).l,t.a,t.b):Tt(+t,+n,+r)};var Ct=Nt.prototype=new ft;Ct.brighter=function(e){return Tt(this.h,this.c,Math.min(100,this.l+Ot*(arguments.length?e:1)))};Ct.darker=function(e){return Tt(this.h,this.c,Math.max(0,this.l-Ot*(arguments.length?e:1)))};Ct.rgb=function(){return kt(this.h,this.c,this.l).rgb()};e.lab=function(t,n,r){return arguments.length===1?t instanceof At?Lt(t.l,t.a,t.b):t instanceof Nt?kt(t.l,t.c,t.h):Vt((t=e.rgb(t)).r,t.g,t.b):Lt(+t,+n,+r)};var Ot=18;var Mt=.95047,_t=1,Dt=1.08883;var Pt=At.prototype=new ft;Pt.brighter=function(e){return Lt(Math.min(100,this.l+Ot*(arguments.length?e:1)),this.a,this.b)};Pt.darker=function(e){return Lt(Math.max(0,this.l-Ot*(arguments.length?e:1)),this.a,this.b)};Pt.rgb=function(){return Ht(this.l,this.a,this.b)};e.rgb=function(e,t,n){return arguments.length===1?e instanceof Rt?qt(e.r,e.g,e.b):Wt(""+e,qt,pt):qt(~~e,~~t,~~n)};var Ut=Rt.prototype=new ft;Ut.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,i=30;if(!t&&!n&&!r)return qt(i,i,i);if(t&&t<i)t=i;if(n&&n<i)n=i;if(r&&r<i)r=i;return qt(Math.min(255,Math.floor(t/e)),Math.min(255,Math.floor(n/e)),Math.min(255,Math.floor(r/e)))};Ut.darker=function(e){e=Math.pow(.7,arguments.length?e:1);return qt(Math.floor(e*this.r),Math.floor(e*this.g),Math.floor(e*this.b))};Ut.hsl=function(){return Xt(this.r,this.g,this.b)};Ut.toString=function(){return"#"+zt(this.r)+zt(this.g)+zt(this.b)};var Kt=e.map({aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"});Kt.forEach(function(e,t){Kt.set(e,Wt(t,qt,pt))});e.functor=Qt;e.xhr=function(t,r,i){function l(){var e=f.status;!e&&f.responseText||e>=200&&e<300||e===304?o.load.call(s,a.call(s,f)):o.error.call(s,f)}var s={},o=e.dispatch("progress","load","error"),u={},a=Gt,f=new(n.XDomainRequest&&/^(http(s)?:)?\/\//.test(t)?XDomainRequest:XMLHttpRequest);"onload"in f?f.onload=f.onerror=l:f.onreadystatechange=function(){f.readyState>3&&l()};f.onprogress=function(t){var n=e.event;e.event=t;try{o.progress.call(s,f)}finally{e.event=n}};s.header=function(e,t){e=(e+"").toLowerCase();if(arguments.length<2)return u[e];if(t==null)delete u[e];else u[e]=t+"";return s};s.mimeType=function(e){if(!arguments.length)return r;r=e==null?null:e+"";return s};s.response=function(e){a=e;return s};["get","post"].forEach(function(e){s[e]=function(){return s.send.apply(s,[e].concat(N(arguments)))}});s.send=function(e,n,i){if(arguments.length===2&&typeof n==="function")i=n,n=null;f.open(e,t,true);if(r!=null&&!("accept"in u))u["accept"]=r+",*/*";if(f.setRequestHeader)for(var o in u)f.setRequestHeader(o,u[o]);if(r!=null&&f.overrideMimeType)f.overrideMimeType(r);if(i!=null)s.on("error",i).on("load",function(e){i(null,e)});f.send(n==null?null:n);return s};s.abort=function(){f.abort();return s};e.rebind(s,o,"on");if(arguments.length===2&&typeof r==="function")i=r,r=null;return i==null?s:s.get(Yt(i))};e.csv=Zt(",","text/csv");e.tsv=Zt(" ","text/tab-separated-values");var en=0,tn={},nn=null,rn,sn;e.timer=function(e,t,n){if(arguments.length<3){if(arguments.length<2)t=0;else if(!isFinite(t))return;n=Date.now()}var r=tn[e.id];if(r&&r.callback===e){r.then=n;r.delay=t}else tn[e.id=++en]=nn={callback:e,then:n,delay:t,next:nn};if(!rn){sn=clearTimeout(sn);rn=1;an(on)}};e.timer.flush=function(){var e,t=Date.now(),n=nn;while(n){e=t-n.then;if(!n.delay)n.flush=n.callback(e);n=n.next}un()};var an=n.requestAnimationFrame||n.webkitRequestAnimationFrame||n.mozRequestAnimationFrame||n.oRequestAnimationFrame||n.msRequestAnimationFrame||function(e){setTimeout(e,17)};var fn=".",ln=",",cn=[3,3];var hn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(pn);e.formatPrefix=function(t,n){var r=0;if(t){if(t<0)t*=-1;if(n)t=e.round(t,mn(t,n));r=1+Math.floor(1e-12+Math.log(t)/Math.LN10);r=Math.max(-24,Math.min(24,Math.floor((r<=0?r+1:r-1)/3)*3))}return hn[8+r/3]};e.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)};e.format=function(t){var n=dn.exec(t),r=n[1]||" ",i=n[2]||">",s=n[3]||"",o=n[4]||"",u=n[5],a=+n[6],f=n[7],l=n[8],c=n[9],h=1,p="",d=false;if(l)l=+l.substring(1);if(u||r==="0"&&i==="="){u=r="0";i="=";if(f)a-=Math.floor((a-1)/4)}switch(c){case"n":f=true;c="g";break;case"%":h=100;p="%";c="f";break;case"p":h=100;p="%";c="r";break;case"b":case"o":case"x":case"X":if(o)o="0"+c.toLowerCase();case"c":case"d":d=true;l=0;break;case"s":h=-1;c="r";break}if(o==="#")o="";if(c=="r"&&!l)c="g";if(l!=null){if(c=="g")l=Math.max(1,Math.min(21,l));else if(c=="e"||c=="f")l=Math.max(0,Math.min(20,l))}c=vn.get(c)||gn;var v=u&&f;return function(t){if(d&&t%1)return"";var n=t<0||t===0&&1/t<0?(t=-t,"-"):s;if(h<0){var m=e.formatPrefix(t,l);t=m.scale(t);p=m.symbol}else{t*=h}t=c(t,l);if(!u&&f)t=yn(t);var g=o.length+t.length+(v?0:n.length),y=g<a?(new Array(g=a-g+1)).join(r):"";if(v)t=yn(y+t);if(fn)t.replace(".",fn);n+=o;return(i==="<"?n+t+y:i===">"?y+n+t:i==="^"?y.substring(0,g>>=1)+n+t+y.substring(g):n+(v?t:y+t))+p}};var dn=/(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i;var vn=e.map({b:function(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(t,n){return(t=e.round(t,mn(t,n))).toFixed(Math.max(0,Math.min(20,mn(t*(1+1e-15),n))))}});var yn=Gt;if(cn){var bn=cn.length;yn=function(e){var t=e.lastIndexOf("."),n=t>=0?"."+e.substring(t+1):(t=e.length,""),r=[],i=0,s=cn[0];while(t>0&&s>0){r.push(e.substring(t-=s,t+s));s=cn[i=(i+1)%bn]}return r.reverse().join(ln||"")+n}}e.geo={};e.geo.stream=function(e,t){if(e&&En.hasOwnProperty(e.type)){En[e.type](e,t)}else{wn(e,t)}};var En={Feature:function(e,t){wn(e.geometry,t)},FeatureCollection:function(e,t){var n=e.features,r=-1,i=n.length;while(++r<i)wn(n[r].geometry,t)}};var Sn={Sphere:function(e,t){t.sphere()},Point:function(e,t){var n=e.coordinates;t.point(n[0],n[1])},MultiPoint:function(e,t){var n=e.coordinates,r=-1,i=n.length,s;while(++r<i)s=n[r],t.point(s[0],s[1])},LineString:function(e,t){xn(e.coordinates,t,0)},MultiLineString:function(e,t){var n=e.coordinates,r=-1,i=n.length;while(++r<i)xn(n[r],t,0)},Polygon:function(e,t){Tn(e.coordinates,t)},MultiPolygon:function(e,t){var n=e.coordinates,r=-1,i=n.length;while(++r<i)Tn(n[r],t)},GeometryCollection:function(e,t){var n=e.geometries,r=-1,i=n.length;while(++r<i)wn(n[r],t)}};e.geo.area=function(t){Nn=0;e.geo.stream(t,Ln);return Nn};var Nn,Cn,kn;var Ln={sphere:function(){Nn+=4*dt},point:G,lineStart:G,lineEnd:G,polygonStart:function(){Cn=1,kn=0;Ln.lineStart=An},polygonEnd:function(){var e=2*Math.atan2(kn,Cn);Nn+=e<0?4*dt+e:e;Ln.lineStart=Ln.lineEnd=Ln.point=G}};e.geo.bounds=On(Gt);e.geo.centroid=function(t){Mn=_n=Dn=Pn=Hn=0;e.geo.stream(t,Bn);var n;if(_n&&Math.abs(n=Math.sqrt(Dn*Dn+Pn*Pn+Hn*Hn))>vt){return[Math.atan2(Pn,Dn)*gt,Math.asin(Math.max(-1,Math.min(1,Hn/n)))*gt]}};var Mn,_n,Dn,Pn,Hn;var Bn={sphere:function(){if(Mn<2){Mn=2;_n=Dn=Pn=Hn=0}},point:jn,lineStart:In,lineEnd:qn,polygonStart:function(){if(Mn<2){Mn=2;_n=Dn=Pn=Hn=0}Bn.lineStart=Fn},polygonEnd:function(){Bn.lineStart=In}};var rr=Yn($n,ir,or);var ar=1e9;e.geo.projection=pr;e.geo.projectionMutator=dr;(e.geo.equirectangular=function(){return pr(mr)}).raw=mr.invert=mr;e.geo.rotation=function(e){function t(t){t=e(t[0]*mt,t[1]*mt);return t[0]*=gt,t[1]*=gt,t}e=gr(e[0]%360*mt,e[1]*mt,e.length>2?e[2]*mt:0);t.invert=function(t){t=e.invert(t[0]*mt,t[1]*mt);return t[0]*=gt,t[1]*=gt,t};return t};e.geo.circle=function(){function i(){var t=typeof e==="function"?e.apply(this,arguments):e,n=gr(-t[0]*mt,-t[1]*mt,0).invert,i=[];r(null,null,1,{point:function(e,t){i.push(e=n(e,t));e[0]*=gt,e[1]*=gt}});return{type:"Polygon",coordinates:[i]}}var e=[0,0],t,n=6,r;i.origin=function(t){if(!arguments.length)return e;e=t;return i};i.angle=function(e){if(!arguments.length)return t;r=Er((t=+e)*mt,n*mt);return i};i.precision=function(e){if(!arguments.length)return n;r=Er(t*mt,(n=+e)*mt);return i};return i.angle(90)};e.geo.distance=function(e,t){var n=(t[0]-e[0])*mt,r=e[1]*mt,i=t[1]*mt,s=Math.sin(n),o=Math.cos(n),u=Math.sin(r),a=Math.cos(r),f=Math.sin(i),l=Math.cos(i),c;return Math.atan2(Math.sqrt((c=l*s)*c+(c=a*f-u*l*o)*c),u*f+a*l*o)};e.geo.graticule=function(){function y(){return{type:"MultiLineString",coordinates:b()}}function b(){return e.range(Math.ceil(i/c)*c,r,c).map(v).concat(e.range(Math.ceil(a/h)*h,u,h).map(m)).concat(e.range(Math.ceil(n/f)*f,t,f).filter(function(e){return Math.abs(e%c)>vt}).map(p)).concat(e.range(Math.ceil(o/l)*l,s,l).filter(function(e){return Math.abs(e%h)>vt}).map(d))}var t,n,r,i,s,o,u,a,f=10,l=f,c=90,h=360,p,d,v,m,g=2.5;y.lines=function(){return b().map(function(e){return{type:"LineString",coordinates:e}})};y.outline=function(){return{type:"Polygon",coordinates:[v(i).concat(m(u).slice(1),v(r).reverse().slice(1),m(a).reverse().slice(1))]}};y.extent=function(e){if(!arguments.length)return y.minorExtent();return y.majorExtent(e).minorExtent(e)};y.majorExtent=function(e){if(!arguments.length)return[[i,a],[r,u]];i=+e[0][0],r=+e[1][0];a=+e[0][1],u=+e[1][1];if(i>r)e=i,i=r,r=e;if(a>u)e=a,a=u,u=e;return y.precision(g)};y.minorExtent=function(e){if(!arguments.length)return[[n,o],[t,s]];n=+e[0][0],t=+e[1][0];o=+e[0][1],s=+e[1][1];if(n>t)e=n,n=t,t=e;if(o>s)e=o,o=s,s=e;return y.precision(g)};y.step=function(e){if(!arguments.length)return y.minorStep();return y.majorStep(e).minorStep(e)};y.majorStep=function(e){if(!arguments.length)return[c,h];c=+e[0],h=+e[1];return y};y.minorStep=function(e){if(!arguments.length)return[f,l];f=+e[0],l=+e[1];return y};y.precision=function(e){if(!arguments.length)return g;g=+e;p=xr(o,s,90);d=Tr(n,t,g);v=xr(a,u,90);m=Tr(i,r,g);return y};return y.majorExtent([[-180,-90+vt],[180,90-vt]]).minorExtent([[-180,-80-vt],[180,80+vt]])};e.geo.greatArc=function(){function s(){return{type:"LineString",coordinates:[n||t.apply(this,arguments),i||r.apply(this,arguments)]}}var t=Nr,n,r=Cr,i;s.distance=function(){return e.geo.distance(n||t.apply(this,arguments),i||r.apply(this,arguments))};s.source=function(e){if(!arguments.length)return t;t=e,n=typeof e==="function"?null:e;return s};s.target=function(e){if(!arguments.length)return r;r=e,i=typeof e==="function"?null:e;return s};s.precision=function(){return arguments.length?s:0};return s};e.geo.interpolate=function(e,t){return kr(e[0]*mt,e[1]*mt,t[0]*mt,t[1]*mt)};e.geo.length=function(t){Lr=0;e.geo.stream(t,Ar);return Lr};var Lr;var Ar={sphere:G,point:G,lineStart:Or,lineEnd:G,polygonStart:G,polygonEnd:G};(e.geo.conicEqualArea=function(){return Mr(_r)}).raw=_r;e.geo.albersUsa=function(){function a(e){return f(e)(e)}function f(e){var s=e[0],o=e[1];return o>50?n:s<-140?r:o<21?i:t}var t=e.geo.conicEqualArea().rotate([98,0]).center([0,38]).parallels([29.5,45.5]);var n=e.geo.conicEqualArea().rotate([160,0]).center([0,60]).parallels([55,65]);var r=e.geo.conicEqualArea().rotate([160,0]).center([0,20]).parallels([8,18]);var i=e.geo.conicEqualArea().rotate([60,0]).center([0,10]).parallels([8,18]);var s,o,u;a.invert=function(e){return s(e)||o(e)||u(e)||t.invert(e)};a.scale=function(e){if(!arguments.length)return t.scale();t.scale(e);n.scale(e*.6);r.scale(e);i.scale(e*1.5);return a.translate(t.translate())};a.translate=function(e){if(!arguments.length)return t.translate();var f=t.scale(),l=e[0],c=e[1];t.translate(e);n.translate([l-.4*f,c+.17*f]);r.translate([l-.19*f,c+.2*f]);i.translate([l+.58*f,c+.43*f]);s=Dr(n,[[-180,50],[-130,72]]);o=Dr(r,[[-164,18],[-154,24]]);u=Dr(i,[[-67.5,17.5],[-65,19]]);return a};return a.scale(1e3)};var Pr,Hr,Br={point:G,lineStart:G,lineEnd:G,polygonStart:function(){Hr=0;Br.lineStart=jr},polygonEnd:function(){Br.lineStart=Br.lineEnd=Br.point=G;Pr+=Math.abs(Hr/2)}};var Ir={point:qr,lineStart:Rr,lineEnd:Ur,polygonStart:function(){Ir.lineStart=zr},polygonEnd:function(){Ir.point=qr;Ir.lineStart=Rr;Ir.lineEnd=Ur}};e.geo.path=function(){function o(n){if(n)e.geo.stream(n,i(s.pointRadius(typeof t==="function"?+t.apply(this,arguments):t)));return s.result()}var t=4.5,n,r,i,s;o.area=function(t){Pr=0;e.geo.stream(t,i(Br));return Pr};o.centroid=function(t){Mn=Dn=Pn=Hn=0;e.geo.stream(t,i(Ir));return Hn?[Dn/Hn,Pn/Hn]:undefined};o.bounds=function(e){return On(i)(e)};o.projection=function(e){if(!arguments.length)return n;i=(n=e)?e.stream||Vr(e):Gt;return o};o.context=function(e){if(!arguments.length)return r;s=(r=e)==null?new Fr:new Wr(e);return o};o.pointRadius=function(e){if(!arguments.length)return t;t=typeof e==="function"?e:+e;return o};return o.projection(e.geo.albersUsa()).context(null)};e.geo.albers=function(){return e.geo.conicEqualArea().parallels([29.5,45.5]).rotate([98,0]).center([0,38]).scale(1e3)};var Jr=$r(function(e){return Math.sqrt(2/(1+e))},function(e){return 2*Math.asin(e/2)});(e.geo.azimuthalEqualArea=function(){return pr(Jr)}).raw=Jr;var Kr=$r(function(e){var t=Math.acos(e);return t&&t/Math.sin(t)},Gt);(e.geo.azimuthalEquidistant=function(){return pr(Kr)}).raw=Kr;(e.geo.conicConformal=function(){return Mr(Qr)}).raw=Qr;(e.geo.conicEquidistant=function(){return Mr(Gr)}).raw=Gr;var Yr=$r(function(e){return 1/e},Math.atan);(e.geo.gnomonic=function(){return pr(Yr)}).raw=Yr;Zr.invert=function(e,t){return[e,2*Math.atan(Math.exp(t))-dt/2]};(e.geo.mercator=function(){return ei(Zr)}).raw=Zr;var ti=$r(function(){return 1},Math.asin);(e.geo.orthographic=function(){return pr(ti)}).raw=ti;var ni=$r(function(e){return 1/(1+e)},function(e){return 2*Math.atan(e)});(e.geo.stereographic=function(){return pr(ni)}).raw=ni;ri.invert=function(e,t){return[Math.atan2(Et(e),Math.cos(t)),wt(Math.sin(t)/St(e))]};(e.geo.transverseMercator=function(){return ei(ri)}).raw=ri;e.geom={};e.svg={};e.svg.line=function(){return ii(Gt)};var ui=e.map({linear:ai,"linear-closed":fi,"step-before":li,"step-after":ci,basis:gi,"basis-open":yi,"basis-closed":bi,bundle:wi,cardinal:di,"cardinal-open":hi,"cardinal-closed":pi,monotone:Ai});ui.forEach(function(e,t){t.key=e;t.closed=/-closed$/.test(e)});var Si=[0,2/3,1/3,0],xi=[0,1/3,2/3,0],Ti=[0,1/6,2/3,1/6];e.geom.hull=function(e){function r(e){if(e.length<3)return[];var r=Qt(t),i=Qt(n),s=e.length,o,u=s-1,a=[],f=[],l,c,h,p=0,d,v,m,g,y,b,w,E;if(r===si&&n===oi)o=e;else for(c=0,o=[];c<s;++c){o.push([+r.call(this,l=e[c],c),+i.call(this,l,c)])}for(c=1;c<s;++c){if(o[c][1]<o[p][1]){p=c}else if(o[c][1]==o[p][1]){p=o[c][0]<o[p][0]?c:p}}for(c=0;c<s;++c){if(c===p)continue;v=o[c][1]-o[p][1];d=o[c][0]-o[p][0];a.push({angle:Math.atan2(v,d),index:c})}a.sort(function(e,t){return e.angle-t.angle});w=a[0].angle;b=a[0].index;y=0;for(c=1;c<u;++c){h=a[c].index;if(w==a[c].angle){d=o[b][0]-o[p][0];v=o[b][1]-o[p][1];m=o[h][0]-o[p][0];g=o[h][1]-o[p][1];if(d*d+v*v>=m*m+g*g){a[c].index=-1}else{a[y].index=-1;w=a[c].angle;y=c;b=h}}else{w=a[c].angle;y=c;b=h}}f.push(p);for(c=0,h=0;c<2;++h){if(a[h].index!==-1){f.push(a[h].index);c++}}E=f.length;for(;h<u;++h){if(a[h].index===-1)continue;while(!Oi(f[E-2],f[E-1],a[h].index,o)){--E}f[E++]=a[h].index}var S=[];for(c=0;c<E;++c){S.push(e[f[c]])}return S}var t=si,n=oi;if(arguments.length)return r(e);r.x=function(e){return arguments.length?(t=e,r):t};r.y=function(e){return arguments.length?(n=e,r):n};return r};e.geom.polygon=function(e){e.area=function(){var t=0,n=e.length,r=e[n-1][1]*e[0][0]-e[n-1][0]*e[0][1];while(++t<n){r+=e[t-1][1]*e[t][0]-e[t-1][0]*e[t][1]}return r*.5};e.centroid=function(t){var n=-1,r=e.length,i=0,s=0,o,u=e[r-1],a;if(!arguments.length)t=-1/(6*e.area());while(++n<r){o=u;u=e[n];a=o[0]*u[1]-u[0]*o[1];i+=(o[0]+u[0])*a;s+=(o[1]+u[1])*a}return[i*t,s*t]};e.clip=function(t){var n,r=-1,i=e.length,s,o,u=e[i-1],a,f,l;while(++r<i){n=t.slice();t.length=0;a=e[r];f=n[(o=n.length)-1];s=-1;while(++s<o){l=n[s];if(Mi(l,u,a)){if(!Mi(f,u,a)){t.push(_i(f,l,u,a))}t.push(l)}else if(Mi(f,u,a)){t.push(_i(f,l,u,a))}f=l}u=a}return t};return e};e.geom.delaunay=function(e){var t=e.map(function(){return[]}),n=[];Pi(e,function(n){t[n.region.l.index].push(e[n.region.r.index])});t.forEach(function(t,r){var i=e[r],s=i[0],o=i[1];t.forEach(function(e){e.angle=Math.atan2(e[0]-s,e[1]-o)});t.sort(function(e,t){return e.angle-t.angle});for(var u=0,a=t.length-1;u<a;u++){n.push([i,t[u],t[u+1]])}});return n};e.geom.voronoi=function(t){function o(t){var n,o=t.map(function(){return[]}),u=Qt(r),a=Qt(i),f,l,c=t.length,h=1e6;if(u===si&&a===oi)n=t;else for(n=[],l=0;l<c;++l){n.push([+u.call(this,f=t[l],l),+a.call(this,f,l)])}Pi(n,function(e){var t,n,r,i,s,u;if(e.a===1&&e.b>=0){t=e.ep.r;n=e.ep.l}else{t=e.ep.l;n=e.ep.r}if(e.a===1){s=t?t.y:-h;r=e.c-e.b*s;u=n?n.y:h;i=e.c-e.b*u}else{r=t?t.x:-h;s=e.c-e.a*r;i=n?n.x:h;u=e.c-e.a*i}var a=[r,s],f=[i,u];o[e.region.l.index].push(a,f);o[e.region.r.index].push(a,f)});o=o.map(function(t,r){var i=n[r][0],s=n[r][1],o=t.map(function(e){return Math.atan2(e[0]-i,e[1]-s)}),u=e.range(t.length).sort(function(e,t){return o[e]-o[t]});return u.filter(function(e,t){return!t||o[e]-o[u[t-1]]>vt}).map(function(e){return t[e]})});o.forEach(function(e,t){var r=e.length;if(!r)return e.push([-h,-h],[-h,h],[h,h],[h,-h]);if(r>2)return;var i=n[t],s=e[0],o=e[1],u=i[0],a=i[1],f=s[0],l=s[1],c=o[0],p=o[1],d=Math.abs(c-f),v=p-l;if(Math.abs(v)<vt){var m=a<l?-h:h;e.push([-h,m],[h,m])}else if(d<vt){var g=u<f?-h:h;e.push([g,-h],[g,h])}else{var m=(c-f)*(l-a)<(f-u)*(p-l)?h:-h,y=Math.abs(v)-d;if(Math.abs(y)<vt){e.push([v<0?m:-m,m])}else{if(y>0)m*=-1;e.push([-h,m],[h,m])}}});if(s)for(l=0;l<c;++l)s(o[l]);for(l=0;l<c;++l)o[l].point=t[l];return o}var n=null,r=si,i=oi,s;if(arguments.length)return o(t);o.x=function(e){return arguments.length?(r=e,o):r};o.y=function(e){return arguments.length?(i=e,o):i};o.size=function(t){if(!arguments.length)return n;if(t==null){s=null}else{n=[+t[0],+t[1]];s=e.geom.polygon([[0,0],[0,n[1]],n,[n[0],0]]).clip}return o};o.links=function(e){var t,n=e.map(function(){return[]}),s=[],o=Qt(r),u=Qt(i),a,f,l=e.length;if(o===si&&u===oi)t=e;else for(f=0;f<l;++f){t.push([+o.call(this,a=e[f],f),+u.call(this,a,f)])}Pi(t,function(t){var r=t.region.l.index,i=t.region.r.index;if(n[r][i])return;n[r][i]=n[i][r]=true;s.push({source:e[r],target:e[i]})});return s};o.triangles=function(t){if(r===si&&i===oi)return e.geom.delaunay(t);var n,s,o=Qt(r),u=Qt(i),a,f,l;for(f=0,n=[],l=t.length;f<l;++f){s=[+o.call(this,a=t[f],f),+u.call(this,a,f)];s.data=a;n.push(s)}return e.geom.delaunay(n).map(function(e){return e.map(function(e){return e.data})})};return o};var Di={l:"r",r:"l"};e.geom.quadtree=function(e,t,n,r,i){function a(e){function x(e,t,n,r,i,s,o,u){if(isNaN(n)||isNaN(r))return;if(e.leaf){var a=e.x,f=e.y;if(a!=null){if(Math.abs(a-n)+Math.abs(f-r)<.01){T(e,t,n,r,i,s,o,u)}else{var l=e.point;e.x=e.y=e.point=null;T(e,l,a,f,i,s,o,u);T(e,t,n,r,i,s,o,u)}}else{e.x=n,e.y=r,e.point=t}}else{T(e,t,n,r,i,s,o,u)}}function T(e,t,n,r,i,s,o,u){var a=(i+o)*.5,f=(s+u)*.5,l=n>=a,c=r>=f,h=(c<<1)+l;e.leaf=false;e=e.nodes[h]||(e.nodes[h]=ji());if(l)i=a;else o=a;if(c)s=f;else u=f;x(e,t,n,r,i,s,o,u)}var a,f=Qt(s),l=Qt(o),c,h,p,d,v,m,g,y;if(t!=null){v=t,m=n,g=r,y=i}else{g=y=-(v=m=Infinity);c=[],h=[];d=e.length;if(u)for(p=0;p<d;++p){a=e[p];if(a.x<v)v=a.x;if(a.y<m)m=a.y;if(a.x>g)g=a.x;if(a.y>y)y=a.y;c.push(a.x);h.push(a.y)}else for(p=0;p<d;++p){var b=+f(a=e[p],p),w=+l(a,p);if(b<v)v=b;if(w<m)m=w;if(b>g)g=b;if(w>y)y=w;c.push(b);h.push(w)}}var E=g-v,S=y-m;if(E>S)y=m+E;else g=v+S;var N=ji();N.add=function(e){x(N,e,+f(e,++p),+l(e,p),v,m,g,y)};N.visit=function(e){Fi(e,N,v,m,g,y)};p=-1;if(t==null){while(++p<d){x(N,e[p],c[p],h[p],v,m,g,y)}--p}else e.forEach(N.add);c=h=e=a=null;return N}var s=si,o=oi,u;if(u=arguments.length){s=Hi;o=Bi;if(u===3){i=n;r=t;n=t=0}return a(e)}a.x=function(e){return arguments.length?(s=e,a):s};a.y=function(e){return arguments.length?(o=e,a):o};a.size=function(e){if(!arguments.length)return t==null?null:[r,i];if(e==null){t=n=r=i=null}else{t=n=0;r=+e[0],i=+e[1]}return a};return a};e.interpolateRgb=Ii;e.transform=function(n){var r=t.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(e){r.setAttribute("transform",e);var t=r.transform.baseVal.consolidate();return new qi(t?t.matrix:Wi)})(n)};qi.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Wi={a:1,b:0,c:0,d:1,e:0,f:0};e.interpolateNumber=Xi;e.interpolateTransform=Vi;e.interpolateObject=$i;e.interpolateString=Ji;var Ki=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;e.interpolate=Qi;e.interpolators=[function(e,t){var n=typeof t;return(n==="string"||n!==typeof e?Kt.has(t)||/^(#|rgb\(|hsl\()/.test(t)?Ii:Ji:t instanceof ft?Ii:n==="object"?Array.isArray(t)?Yi:$i:Xi)(e,t)}];e.interpolateArray=Yi;var Zi=function(){return Gt};var es=e.map({linear:Zi,poly:as,quad:function(){return ss},cubic:function(){return os},sin:function(){return fs},exp:function(){return ls},circle:function(){return cs},elastic:hs,back:ps,bounce:function(){return ds}});var ts=e.map({"in":Gt,out:rs,"in-out":is,"out-in":function(e){return is(rs(e))}});e.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.substring(0,t):e,r=t>=0?e.substring(t+1):"in";n=es.get(n)||Zi;r=ts.get(r)||Gt;return ns(r(n.apply(null,Array.prototype.slice.call(arguments,1))))};e.interpolateHcl=vs;e.interpolateHsl=ms;e.interpolateLab=gs;e.interpolateRound=ys;e.layout={};e.layout.bundle=function(){return function(e){var t=[],n=-1,r=e.length;while(++n<r)t.push(Es(e[n]));return t}};e.layout.chord=function(){function l(){var t={},l=[],h=e.range(s),p=[],d,v,m,g,y;n=[];r=[];d=0,g=-1;while(++g<s){v=0,y=-1;while(++y<s){v+=i[g][y]}l.push(v);p.push(e.range(s));d+=v}if(u){h.sort(function(e,t){return u(l[e],l[t])})}if(a){p.forEach(function(e,t){e.sort(function(e,n){return a(i[t][e],i[t][n])})})}d=(2*dt-o*s)/d;v=0,g=-1;while(++g<s){m=v,y=-1;while(++y<s){var b=h[g],w=p[b][y],E=i[b][w],S=v,x=v+=E*d;t[b+"-"+w]={index:b,subindex:w,startAngle:S,endAngle:x,value:E}}r[b]={index:b,startAngle:m,endAngle:v,value:(v-m)/d};v+=o}g=-1;while(++g<s){y=g-1;while(++y<s){var T=t[g+"-"+y],N=t[y+"-"+g];if(T.value||N.value){n.push(T.value<N.value?{source:N,target:T}:{source:T,target:N})}}}if(f)c()}function c(){n.sort(function(e,t){return f((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)})}var t={},n,r,i,s,o=0,u,a,f;t.matrix=function(e){if(!arguments.length)return i;s=(i=e)&&i.length;n=r=null;return t};t.padding=function(e){if(!arguments.length)return o;o=e;n=r=null;return t};t.sortGroups=function(e){if(!arguments.length)return u;u=e;n=r=null;return t};t.sortSubgroups=function(e){if(!arguments.length)return a;a=e;n=null;return t};t.sortChords=function(e){if(!arguments.length)return f;f=e;if(n)c();return t};t.chords=function(){if(!n)l();return n};t.groups=function(){if(!r)l();return r};return t};e.layout.force=function(){function g(e){return function(t,n,r,i){if(t.point!==e){var s=t.cx-e.x,o=t.cy-e.y,u=1/Math.sqrt(s*s+o*o);if((i-n)*u<c){var a=t.charge*u*u;e.px-=s*a;e.py-=o*a;return true}if(t.point&&isFinite(u)){var a=t.pointCharge*u*u;e.px-=s*a;e.py-=o*a}}return!t.charge}}function y(n){n.px=e.event.x,n.py=e.event.y;t.resume()}var t={},n=e.dispatch("start","tick","end"),r=[1,1],i,s,o=.9,u=As,a=Os,f=-30,l=.1,c=.8,h=[],p=[],d,v,m;t.tick=function(){if((s*=.99)<.005){n.end({type:"end",alpha:s=0});return true}var t=h.length,i=p.length,u,a,c,y,b,w,E,S,x;for(a=0;a<i;++a){c=p[a];y=c.source;b=c.target;S=b.x-y.x;x=b.y-y.y;if(w=S*S+x*x){w=s*v[a]*((w=Math.sqrt(w))-d[a])/w;S*=w;x*=w;b.x-=S*(E=y.weight/(b.weight+y.weight));b.y-=x*E;y.x+=S*(E=1-E);y.y+=x*E}}if(E=s*l){S=r[0]/2;x=r[1]/2;a=-1;if(E)while(++a<t){c=h[a];c.x+=(S-c.x)*E;c.y+=(x-c.y)*E}}if(f){Ls(u=e.geom.quadtree(h),s,m);a=-1;while(++a<t){if(!(c=h[a]).fixed){u.visit(g(c))}}}a=-1;while(++a<t){c=h[a];if(c.fixed){c.x=c.px;c.y=c.py}else{c.x-=(c.px-(c.px=c.x))*o;c.y-=(c.py-(c.py=c.y))*o}}n.tick({type:"tick",alpha:s})};t.nodes=function(e){if(!arguments.length)return h;h=e;return t};t.links=function(e){if(!arguments.length)return p;p=e;return t};t.size=function(e){if(!arguments.length)return r;r=e;return t};t.linkDistance=function(e){if(!arguments.length)return u;u=typeof e==="function"?e:+e;return t};t.distance=t.linkDistance;t.linkStrength=function(e){if(!arguments.length)return a;a=typeof e==="function"?e:+e;return t};t.friction=function(e){if(!arguments.length)return o;o=+e;return t};t.charge=function(e){if(!arguments.length)return f;f=typeof e==="function"?e:+e;return t};t.gravity=function(e){if(!arguments.length)return l;l=+e;return t};t.theta=function(e){if(!arguments.length)return c;c=+e;return t};t.alpha=function(r){if(!arguments.length)return s;r=+r;if(s){if(r>0)s=r;else s=0}else if(r>0){n.start({type:"start",alpha:s=r});e.timer(t.tick)}return t};t.start=function(){function y(t,n){var r=b(e),i=-1,s=r.length,o;while(++i<s)if(!isNaN(o=r[i][t]))return o;return Math.random()*n}function b(){if(!c){c=[];for(n=0;n<i;++n){c[n]=[]}for(n=0;n<s;++n){var t=p[n];c[t.source.index].push(t.target);c[t.target.index].push(t.source)}}return c[e]}var e,n,i=h.length,s=p.length,o=r[0],l=r[1],c,g;for(e=0;e<i;++e){(g=h[e]).index=e;g.weight=0}for(e=0;e<s;++e){g=p[e];if(typeof g.source=="number")g.source=h[g.source];if(typeof g.target=="number")g.target=h[g.target];++g.source.weight;++g.target.weight}for(e=0;e<i;++e){g=h[e];if(isNaN(g.x))g.x=y("x",o);if(isNaN(g.y))g.y=y("y",l);if(isNaN(g.px))g.px=g.x;if(isNaN(g.py))g.py=g.y}d=[];if(typeof u==="function")for(e=0;e<s;++e)d[e]=+u.call(this,p[e],e);else for(e=0;e<s;++e)d[e]=u;v=[];if(typeof a==="function")for(e=0;e<s;++e)v[e]=+a.call(this,p[e],e);else for(e=0;e<s;++e)v[e]=a;m=[];if(typeof f==="function")for(e=0;e<i;++e)m[e]=+f.call(this,h[e],e);else for(e=0;e<i;++e)m[e]=f;return t.resume()};t.resume=function(){return t.alpha(.1)};t.stop=function(){return t.alpha(0)};t.drag=function(){if(!i)i=e.behavior.drag().origin(Gt).on("dragstart.force",Ts).on("drag.force",y).on("dragend.force",Ns);if(!arguments.length)return i;this.on("mouseover.force",Cs).on("mouseout.force",ks).call(i)};return e.rebind(t,n,"on")};var As=20,Os=1;e.layout.hierarchy=function(){function r(i,o,u){var a=t.call(s,i,o);i.depth=o;u.push(i);if(a&&(l=a.length)){var f=-1,l,c=i.children=[],h=0,p=o+1,d;while(++f<l){d=r(a[f],p,u);d.parent=i;c.push(d);h+=d.value}if(e)c.sort(e);if(n)i.value=h}else if(n){i.value=+n.call(s,i,o)||0}return i}function i(e,t){var r=e.children,o=0;if(r&&(a=r.length)){var u=-1,a,f=t+1;while(++u<a)o+=i(r[u],f)}else if(n){o=+n.call(s,e,t)||0}if(n)e.value=o;return o}function s(e){var t=[];r(e,0,t);return t}var e=Ps,t=_s,n=Ds;s.sort=function(t){if(!arguments.length)return e;e=t;return s};s.children=function(e){if(!arguments.length)return t;t=e;return s};s.value=function(e){if(!arguments.length)return n;n=e;return s};s.revalue=function(e){i(e,0);return e};return s};e.layout.partition=function(){function r(e,t,n,i){var s=e.children;e.x=t;e.y=e.depth*i;e.dx=n;e.dy=i;if(s&&(u=s.length)){var o=-1,u,a,f;n=e.value?n/e.value:0;while(++o<u){r(a=s[o],t,f=a.value*n,i);t+=f}}}function i(e){var t=e.children,n=0;if(t&&(s=t.length)){var r=-1,s;while(++r<s)n=Math.max(n,i(t[r]))}return 1+n}function s(e,s){var o=t.call(this,e,s);r(o[0],0,n[0],n[1]/i(o[0]));return o}var t=e.layout.hierarchy(),n=[1,1];s.size=function(e){if(!arguments.length)return n;n=e;return s};return Ms(s,t)};e.layout.pie=function(){function s(o){var u=o.map(function(e,n){return+t.call(s,e,n)});var a=+(typeof r==="function"?r.apply(this,arguments):r);var f=((typeof i==="function"?i.apply(this,arguments):i)-a)/e.sum(u);var l=e.range(o.length);if(n!=null)l.sort(n===Bs?function(e,t){return u[t]-u[e]}:function(e,t){return n(o[e],o[t])});var c=[];l.forEach(function(e){var t;c[e]={data:o[e],value:t=u[e],startAngle:a,endAngle:a+=t*f}});return c}var t=Number,n=Bs,r=0,i=2*dt;s.value=function(e){if(!arguments.length)return t;t=e;return s};s.sort=function(e){if(!arguments.length)return n;n=e;return s};s.startAngle=function(e){if(!arguments.length)return r;r=e;return s};s.endAngle=function(e){if(!arguments.length)return i;i=e;return s};return s};var Bs={};e.layout.stack=function(){function u(a,f){var l=a.map(function(e,n){return t.call(u,e,n)});var c=l.map(function(e){return e.map(function(e,t){return[s.call(u,e,t),o.call(u,e,t)]})});var h=n.call(u,c,f);l=e.permute(l,h);c=e.permute(c,h);var p=r.call(u,c,f);var d=l.length,v=l[0].length,m,g,y;for(g=0;g<v;++g){i.call(u,l[0][g],y=p[g],c[0][g][1]);for(m=1;m<d;++m){i.call(u,l[m][g],y+=c[m-1][g][1],c[m][g][1])}}return a}var t=Gt,n=Us,r=zs,i=Is,s=js,o=Fs;u.values=function(e){if(!arguments.length)return t;t=e;return u};u.order=function(e){if(!arguments.length)return n;n=typeof e==="function"?e:qs.get(e)||Us;return u};u.offset=function(e){if(!arguments.length)return r;r=typeof e==="function"?e:Rs.get(e)||zs;return u};u.x=function(e){if(!arguments.length)return s;s=e;return u};u.y=function(e){if(!arguments.length)return o;o=e;return u};u.out=function(e){if(!arguments.length)return i;i=e;return u};return u};var qs=e.map({"inside-out":function(t){var n=t.length,r,i,s=t.map(Ws),o=t.map(Xs),u=e.range(n).sort(function(e,t){return s[e]-s[t]}),a=0,f=0,l=[],c=[];for(r=0;r<n;++r){i=u[r];if(a<f){a+=o[i];l.push(i)}else{f+=o[i];c.push(i)}}return c.reverse().concat(l)},reverse:function(t){return e.range(t.length).reverse()},"default":Us});var Rs=e.map({silhouette:function(e){var t=e.length,n=e[0].length,r=[],i=0,s,o,u,a=[];for(o=0;o<n;++o){for(s=0,u=0;s<t;s++)u+=e[s][o][1];if(u>i)i=u;r.push(u)}for(o=0;o<n;++o){a[o]=(i-r[o])/2}return a},wiggle:function(e){var t=e.length,n=e[0],r=n.length,i,s,o,u,a,f,l,c,h,p=[];p[0]=c=h=0;for(s=1;s<r;++s){for(i=0,u=0;i<t;++i)u+=e[i][s][1];for(i=0,a=0,l=n[s][0]-n[s-1][0];i<t;++i){for(o=0,f=(e[i][s][1]-e[i][s-1][1])/(2*l);o<i;++o){f+=(e[o][s][1]-e[o][s-1][1])/l}a+=f*e[i][s][1]}p[s]=c-=u?a/u*l:0;if(c<h)h=c}for(s=0;s<r;++s)p[s]-=h;return p},expand:function(e){var t=e.length,n=e[0].length,r=1/t,i,s,o,u=[];for(s=0;s<n;++s){for(i=0,o=0;i<t;i++)o+=e[i][s][1];if(o)for(i=0;i<t;i++)e[i][s][1]/=o;else for(i=0;i<t;i++)e[i][s][1]=r}for(s=0;s<n;++s)u[s]=0;return u},zero:zs});e.layout.histogram=function(){function s(s,o){var u=[],a=s.map(n,this),f=r.call(this,a,o),l=i.call(this,f,a,o),c,o=-1,h=a.length,p=l.length-1,d=t?1:1/h,v;while(++o<p){c=u[o]=[];c.dx=l[o+1]-(c.x=l[o]);c.y=0}if(p>0){o=-1;while(++o<h){v=a[o];if(v>=f[0]&&v<=f[1]){c=u[e.bisect(l,v,1,p)-1];c.y+=d;c.push(s[o])}}}return u}var t=true,n=Number,r=Ks,i=$s;s.value=function(e){if(!arguments.length)return n;n=e;return s};s.range=function(e){if(!arguments.length)return r;r=Qt(e);return s};s.bins=function(e){if(!arguments.length)return i;i=typeof e==="number"?function(t){return Js(t,e)}:Qt(e);return s};s.frequency=function(e){if(!arguments.length)return t;t=!!e;return s};return s};e.layout.tree=function(){function i(e,i){function u(e,t){var r=e.children,i=e._tree;if(r&&(s=r.length)){var s,o=r[0],a,l=o,c,h=-1;while(++h<s){c=r[h];u(c,a);l=f(c,a,l);a=c}io(e);var p=.5*(o._tree.prelim+c._tree.prelim);if(t){i.prelim=t._tree.prelim+n(e,t);i.mod=i.prelim-p}else{i.prelim=p}}else{if(t){i.prelim=t._tree.prelim+n(e,t)}}}function a(e,t){e.x=e._tree.prelim+t;var n=e.children;if(n&&(i=n.length)){var r=-1,i;t+=e._tree.mod;while(++r<i){a(n[r],t)}}}function f(e,t,r){if(t){var i=e,s=e,o=t,u=e.parent.children[0],a=i._tree.mod,f=s._tree.mod,l=o._tree.mod,c=u._tree.mod,h;while(o=Ys(o),i=Gs(i),o&&i){u=Gs(u);s=Ys(s);s._tree.ancestor=e;h=o._tree.prelim+l-i._tree.prelim-a+n(o,i);if(h>0){so(oo(o,e,r),e,h);a+=h;f+=h}l+=o._tree.mod;a+=i._tree.mod;c+=u._tree.mod;f+=s._tree.mod}if(o&&!Ys(s)){s._tree.thread=o;s._tree.mod+=l-f}if(i&&!Gs(u)){u._tree.thread=i;u._tree.mod+=a-c;r=e}}return r}var s=t.call(this,e,i),o=s[0];ro(o,function(e,t){e._tree={ancestor:e,prelim:0,mod:0,change:0,shift:0,number:t?t._tree.number+1:0}});u(o);a(o,-o._tree.prelim);var l=Zs(o,to),c=Zs(o,eo),h=Zs(o,no),p=l.x-n(l,c)/2,d=c.x+n(c,l)/2,v=h.depth||1;ro(o,function(e){e.x=(e.x-p)/(d-p)*r[0];e.y=e.depth/v*r[1];delete e._tree});return s}var t=e.layout.hierarchy().sort(null).value(null),n=Qs,r=[1,1];i.separation=function(e){if(!arguments.length)return n;n=e;return i};i.size=function(e){if(!arguments.length)return r;r=e;return i};return Ms(i,t)};e.layout.pack=function(){function i(e,i){var s=t.call(this,e,i),o=s[0];o.x=0;o.y=0;ro(o,function(e){e.r=Math.sqrt(e.value)});ro(o,co);var u=r[0],a=r[1],f=Math.max(2*o.r/u,2*o.r/a);if(n>0){var l=n*f/2;ro(o,function(e){e.r+=l});ro(o,co);ro(o,function(e){e.r-=l});f=Math.max(2*o.r/u,2*o.r/a)}vo(o,u/2,a/2,1/f);return s}var t=e.layout.hierarchy().sort(uo),n=0,r=[1,1];i.size=function(e){if(!arguments.length)return r;r=e;return i};i.padding=function(e){if(!arguments.length)return n;n=+e;return i};return Ms(i,t)};e.layout.cluster=function(){function i(e,i){var s=t.call(this,e,i),o=s[0],u,a=0;ro(o,function(e){var t=e.children;if(t&&t.length){e.x=yo(t);e.y=go(t)}else{e.x=u?a+=n(e,u):0;e.y=0;u=e}});var f=bo(o),l=wo(o),c=f.x-n(f,l)/2,h=l.x+n(l,f)/2;ro(o,function(e){e.x=(e.x-c)/(h-c)*r[0];e.y=(1-(o.y?e.y/o.y:1))*r[1]});return s}var t=e.layout.hierarchy().sort(null).value(null),n=Qs,r=[1,1];i.separation=function(e){if(!arguments.length)return n;n=e;return i};i.size=function(e){if(!arguments.length)return r;r=e;return i};return Ms(i,t)};e.layout.treemap=function(){function l(e,t){var n=-1,r=e.length,i,s;while(++n<r){s=(i=e[n]).value*(t<0?0:t);i.area=isNaN(s)||s<=0?0:s}}function c(e){var t=e.children;if(t&&t.length){var n=s(e),r=[],i=t.slice(),o,u=Infinity,f,h=a==="slice"?n.dx:a==="dice"?n.dy:a==="slice-dice"?e.depth&1?n.dy:n.dx:Math.min(n.dx,n.dy),v;l(i,n.dx*n.dy/e.value);r.area=0;while((v=i.length)>0){r.push(o=i[v-1]);r.area+=o.area;if(a!=="squarify"||(f=p(r,h))<=u){i.pop();u=f}else{r.area-=r.pop().area;d(r,h,n,false);h=Math.min(n.dx,n.dy);r.length=r.area=0;u=Infinity}}if(r.length){d(r,h,n,true);r.length=r.area=0}t.forEach(c)}}function h(e){var t=e.children;if(t&&t.length){var n=s(e),r=t.slice(),i,o=[];l(r,n.dx*n.dy/e.value);o.area=0;while(i=r.pop()){o.push(i);o.area+=i.area;if(i.z!=null){d(o,i.z?n.dx:n.dy,n,!r.length);o.length=o.area=0}}t.forEach(h)}}function p(e,t){var n=e.area,r,i=0,s=Infinity,o=-1,u=e.length;while(++o<u){if(!(r=e[o].area))continue;if(r<s)s=r;if(r>i)i=r}n*=n;t*=t;return n?Math.max(t*i*f/n,n/(t*s*f)):Infinity}function d(e,t,r,i){var s=-1,o=e.length,u=r.x,a=r.y,f=t?n(e.area/t):0,l;if(t==r.dx){if(i||f>r.dy)f=r.dy;while(++s<o){l=e[s];l.x=u;l.y=a;l.dy=f;u+=l.dx=Math.min(r.x+r.dx-u,f?n(l.area/f):0)}l.z=true;l.dx+=r.x+r.dx-u;r.y+=f;r.dy-=f}else{if(i||f>r.dx)f=r.dx;while(++s<o){l=e[s];l.x=u;l.y=a;l.dx=f;a+=l.dy=Math.min(r.y+r.dy-a,f?n(l.area/f):0)}l.z=false;l.dy+=r.y+r.dy-a;r.x+=f;r.dx-=f}}function v(e){var n=u||t(e),i=n[0];i.x=0;i.y=0;i.dx=r[0];i.dy=r[1];if(u)t.revalue(i);l([i],i.dx*i.dy/i.value);(u?h:c)(i);if(o)u=n;return n}var t=e.layout.hierarchy(),n=Math.round,r=[1,1],i=null,s=Eo,o=false,u,a="squarify",f=.5*(1+Math.sqrt(5));v.size=function(e){if(!arguments.length)return r;r=e;return v};v.padding=function(e){function t(t){var n=e.call(v,t,t.depth);return n==null?Eo(t):So(t,typeof n==="number"?[n,n,n,n]:n)}function n(t){return So(t,e)}if(!arguments.length)return i;var r;s=(i=e)==null?Eo:(r=typeof e)==="function"?t:r==="number"?(e=[e,e,e,e],n):n;return v};v.round=function(e){if(!arguments.length)return n!=Number;n=e?Math.round:Number;return v};v.sticky=function(e){if(!arguments.length)return o;o=e;u=null;return v};v.ratio=function(e){if(!arguments.length)return f;f=e;return v};v.mode=function(e){if(!arguments.length)return a;a=e+"";return v};return Ms(v,t)};e.random={normal:function(e,t){var n=arguments.length;if(n<2)t=1;if(n<1)e=0;return function(){var n,r,i;do{n=Math.random()*2-1;r=Math.random()*2-1;i=n*n+r*r}while(!i||i>1);return e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=e.random.normal.apply(e,arguments);return function(){return Math.exp(t())}},irwinHall:function(e){return function(){for(var t=0,n=0;n<e;n++)t+=Math.random();return t/e}}};e.scale={};e.scale.linear=function(){return Lo([0,1],[0,1],Qi,false)};e.scale.log=function(){return Po(e.scale.linear().domain([0,Math.LN10]),10,Bo,jo)};var Ho=e.format(".0e");e.scale.pow=function(){return Ro(e.scale.linear(),1)};e.scale.sqrt=function(){return e.scale.pow().exponent(.5)};e.scale.ordinal=function(){return zo([],{t:"range",a:[[]]})};e.scale.category10=function(){return e.scale.ordinal().range(Wo)};e.scale.category20=function(){return e.scale.ordinal().range(Xo)};e.scale.category20b=function(){return e.scale.ordinal().range(Vo)};e.scale.category20c=function(){return e.scale.ordinal().range($o)};e.scale.category50=function(){return e.scale.ordinal().range(Jo)};var Wo=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];var Xo=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"];var Vo=["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"];var $o=["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"];var Jo=["#1f77b4","#ff7f0e","#2ca02c","#8c864b","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf","#DC143C","#800080","#0000FF","#008000","#D2691E","#FF0000","#000000","#DB7093","#FF00FF","#7B68EE","#1f77b6","#9edae5","#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#aec7e8","#e7ba52","#ffbb78","#e7cb94","#98df8a","#843c39","#ff9896","#ad494a","#c5b0d5","#d6616b","#c49c94","#e7969c","#f7b6d2","#fd8d3c","#c7c7c7","#7b4173","#dbdb8d","#a55194"];e.scale.quantile=function(){return Ko([],[])};e.scale.quantize=function(){return Qo(0,1,[0,1])};e.scale.threshold=function(){return Go([.5],[0,1])};e.scale.identity=function(){return Yo([0,1])};e.svg.arc=function(){function i(){var i=e.apply(this,arguments),s=t.apply(this,arguments),o=n.apply(this,arguments)+Zo,u=r.apply(this,arguments)+Zo,a=(u<o&&(a=o,o=u,u=a),u-o),f=a<dt?"0":"1",l=Math.cos(o),c=Math.sin(o),h=Math.cos(u),p=Math.sin(u);return a>=eu?i?"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+ -s+"A"+s+","+s+" 0 1,1 0,"+s+"M0,"+i+"A"+i+","+i+" 0 1,0 0,"+ -i+"A"+i+","+i+" 0 1,0 0,"+i+"Z":"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+ -s+"A"+s+","+s+" 0 1,1 0,"+s+"Z":i?"M"+s*l+","+s*c+"A"+s+","+s+" 0 "+f+",1 "+s*h+","+s*p+"L"+i*h+","+i*p+"A"+i+","+i+" 0 "+f+",0 "+i*l+","+i*c+"Z":"M"+s*l+","+s*c+"A"+s+","+s+" 0 "+f+",1 "+s*h+","+s*p+"L0,0"+"Z"}var e=tu,t=nu,n=ru,r=iu;i.innerRadius=function(t){if(!arguments.length)return e;e=Qt(t);return i};i.outerRadius=function(e){if(!arguments.length)return t;t=Qt(e);return i};i.startAngle=function(e){if(!arguments.length)return n;n=Qt(e);return i};i.endAngle=function(e){if(!arguments.length)return r;r=Qt(e);return i};i.centroid=function(){var i=(e.apply(this,arguments)+t.apply(this,arguments))/2,s=(n.apply(this,arguments)+r.apply(this,arguments))/2+Zo;return[Math.cos(s)*i,Math.sin(s)*i]};return i};var Zo=-dt/2,eu=2*dt-1e-6;e.svg.line.radial=function(){var e=ii(su);e.radius=e.x,delete e.x;e.angle=e.y,delete e.y;return e};li.reverse=ci;ci.reverse=li;e.svg.area=function(){return ou(Gt)};e.svg.area.radial=function(){var e=ou(su);e.radius=e.x,delete e.x;e.innerRadius=e.x0,delete e.x0;e.outerRadius=e.x1,delete e.x1;e.angle=e.y,delete e.y;e.startAngle=e.y0,delete e.y0;e.endAngle=e.y1,delete e.y1;return e};e.svg.chord=function(){function s(n,r){var i=o(this,e,n,r),s=o(this,t,n,r);return"M"+i.p0+a(i.r,i.p1,i.a1-i.a0)+(u(i,s)?f(i.r,i.p1,i.r,i.p0):f(i.r,i.p1,s.r,s.p0)+a(s.r,s.p1,s.a1-s.a0)+f(s.r,s.p1,i.r,i.p0))+"Z"}function o(e,t,s,o){var u=t.call(e,s,o),a=n.call(e,u,o),f=r.call(e,u,o)+Zo,l=i.call(e,u,o)+Zo;return{r:a,a0:f,a1:l,p0:[a*Math.cos(f),a*Math.sin(f)],p1:[a*Math.cos(l),a*Math.sin(l)]}}function u(e,t){return e.a0==t.a0&&e.a1==t.a1}function a(e,t,n){return"A"+e+","+e+" 0 "+ +(n>dt)+",1 "+t}function f(e,t,n,r){return"Q 0,0 "+r}var e=Nr,t=Cr,n=uu,r=ru,i=iu;s.radius=function(e){if(!arguments.length)return n;n=Qt(e);return s};s.source=function(t){if(!arguments.length)return e;e=Qt(t);return s};s.target=function(e){if(!arguments.length)return t;t=Qt(e);return s};s.startAngle=function(e){if(!arguments.length)return r;r=Qt(e);return s};s.endAngle=function(e){if(!arguments.length)return i;i=Qt(e);return s};return s};e.svg.diagonal=function(){function r(r,i){var s=e.call(this,r,i),o=t.call(this,r,i),u=(s.y+o.y)/2,a=[s,{x:s.x,y:u},{x:o.x,y:u},o];a=a.map(n);return"M"+a[0]+"C"+a[1]+" "+a[2]+" "+a[3]}var e=Nr,t=Cr,n=au;r.source=function(t){if(!arguments.length)return e;e=Qt(t);return r};r.target=function(e){if(!arguments.length)return t;t=Qt(e);return r};r.projection=function(e){if(!arguments.length)return n;n=e;return r};return r};e.svg.diagonal.radial=function(){var t=e.svg.diagonal(),n=au,r=t.projection;t.projection=function(e){return arguments.length?r(fu(n=e)):n};return t};e.svg.symbol=function(){function n(n,r){return(pu.get(e.call(this,n,r))||hu)(t.call(this,n,r))}var e=cu,t=lu;n.type=function(t){if(!arguments.length)return e;e=Qt(t);return n};n.size=function(e){if(!arguments.length)return t;t=Qt(e);return n};return n};var pu=e.map({circle:hu,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+ -3*t+","+ -t+"H"+ -t+"V"+ -3*t+"H"+t+"V"+ -t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+ -t+"V"+t+"H"+ -3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*vu)),n=t*vu;return"M0,"+ -t+"L"+n+",0"+" 0,"+t+" "+ -n+",0"+"Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+ -t+","+ -t+"L"+t+","+ -t+" "+t+","+t+" "+ -t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/du),n=t*du/2;return"M0,"+n+"L"+t+","+ -n+" "+ -t+","+ -n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/du),n=t*du/2;return"M0,"+ -n+"L"+t+","+n+" "+ -t+","+n+"Z"}});e.svg.symbolTypes=pu.keys();var du=Math.sqrt(3),vu=Math.tan(30*mt);var gu=[],yu=0,bu,wu={ease:us,delay:0,duration:250};gu.call=B.call;gu.empty=B.empty;gu.node=B.node;e.transition=function(e){return arguments.length?bu?e.transition():e:st.transition()};e.transition.prototype=gu;gu.select=function(e){var t=this.id,n=[],r,i,s;if(typeof e!=="function")e=j(e);for(var o=-1,u=this.length;++o<u;){n.push(r=[]);for(var a=this[o],f=-1,l=a.length;++f<l;){if((s=a[f])&&(i=e.call(s,s.__data__,f))){if("__data__"in s)i.__data__=s.__data__;xu(i,f,t,s.__transition__[t]);r.push(i)}else{r.push(null)}}}return mu(n,t)};gu.selectAll=function(e){var t=this.id,n=[],r,i,s,o,u;if(typeof e!=="function")e=F(e);for(var a=-1,f=this.length;++a<f;){for(var l=this[a],c=-1,h=l.length;++c<h;){if(s=l[c]){u=s.__transition__[t];i=e.call(s,s.__data__,c);n.push(r=[]);for(var p=-1,d=i.length;++p<d;){xu(o=i[p],p,t,u);r.push(o)}}}}return mu(n,t)};gu.filter=function(e){var t=[],n,r,i;if(typeof e!=="function")e=K(e);for(var s=0,o=this.length;s<o;s++){t.push(n=[]);for(var r=this[s],u=0,a=r.length;u<a;u++){if((i=r[u])&&e.call(i,i.__data__,u)){n.push(i)}}}return mu(t,this.id,this.time).ease(this.ease())};gu.tween=function(e,t){var n=this.id;if(arguments.length<2)return this.node().__transition__[n].tween.get(e);return nt(this,t==null?function(t){t.__transition__[n].tween.remove(e)}:function(r){r.__transition__[n].tween.set(e,t)})};gu.attr=function(t,n){function s(){this.removeAttribute(i)}function o(){this.removeAttributeNS(i.space,i.local)}if(arguments.length<2){for(n in t)this.attr(n,t[n]);return this}var r=Gi(t),i=e.ns.qualify(t);return Eu(this,"attr."+t,n,function(e){function t(){var t=this.getAttribute(i),n;return t!==e&&(n=r(t,e),function(e){this.setAttribute(i,n(e))})}function n(){var t=this.getAttributeNS(i.space,i.local),n;return t!==e&&(n=r(t,e),function(e){this.setAttributeNS(i.space,i.local,n(e))})}return e==null?i.local?o:s:(e+="",i.local?n:t)})};gu.attrTween=function(t,n){function i(e,t){var i=n.call(this,e,t,this.getAttribute(r));return i&&function(e){this.setAttribute(r,i(e))}}function s(e,t){var i=n.call(this,e,t,this.getAttributeNS(r.space,r.local));return i&&function(e){this.setAttributeNS(r.space,r.local,i(e))}}var r=e.ns.qualify(t);return this.tween("attr."+t,r.local?s:i)};gu.style=function(e,t,r){function o(){this.style.removeProperty(e)}var i=arguments.length;if(i<3){if(typeof e!=="string"){if(i<2)t="";for(r in e)this.style(r,e[r],t);return this}r=""}var s=Gi(e);return Eu(this,"style."+e,t,function(t){function i(){var i=n.getComputedStyle(this,null).getPropertyValue(e),o;return i!==t&&(o=s(i,t),function(t){this.style.setProperty(e,o(t),r)})}return t==null?o:(t+="",i)})};gu.styleTween=function(e,t,r){if(arguments.length<3)r="";return this.tween("style."+e,function(i,s){var o=t.call(this,i,s,n.getComputedStyle(this,null).getPropertyValue(e));return o&&function(t){this.style.setProperty(e,o(t),r)}})};gu.text=function(e){return Eu(this,"text",e,Su)};gu.remove=function(){return this.each("end.transition",function(){var e;if(!this.__transition__&&(e=this.parentNode))e.removeChild(this)})};gu.ease=function(t){var n=this.id;if(arguments.length<1)return this.node().__transition__[n].ease;if(typeof t!=="function")t=e.ease.apply(e,arguments);return nt(this,function(e){e.__transition__[n].ease=t})};gu.delay=function(e){var t=this.id;return nt(this,typeof e==="function"?function(n,r,i){n.__transition__[t].delay=e.call(n,n.__data__,r,i)|0}:(e|=0,function(n){n.__transition__[t].delay=e}))};gu.duration=function(e){var t=this.id;return nt(this,typeof e==="function"?function(n,r,i){n.__transition__[t].duration=Math.max(1,e.call(n,n.__data__,r,i)|0)}:(e=Math.max(1,e|0),function(n){n.__transition__[t].duration=e}))};gu.each=function(e,t){var n=this.id;if(arguments.length<2){var r=wu,i=bu;bu=n;nt(this,function(t,r,i){wu=t.__transition__[n];e.call(t,t.__data__,r,i)});wu=r;bu=i}else{nt(this,function(r){r.__transition__[n].event.on(e,t)})}return this};gu.transition=function(){var e=this.id,t=++yu,n=[],r,i,s,o;for(var u=0,a=this.length;u<a;u++){n.push(r=[]);for(var i=this[u],f=0,l=i.length;f<l;f++){if(s=i[f]){o=Object.create(s.__transition__[e]);o.delay+=o.duration;xu(s,f,t,o)}r.push(s)}}return mu(n,t)};e.svg.axis=function(){function c(c){c.each(function(){var c=e.select(this);var h=a==null?t.ticks?t.ticks.apply(t,u):t.domain():a,p=f==null?t.tickFormat?t.tickFormat.apply(t,u):String:f;var d=Lu(t,h,l),v=c.selectAll(".tick.minor").data(d,String),m=v.enter().insert("line",".tick").attr("class","tick minor").style("opacity",1e-6),g=e.transition(v.exit()).style("opacity",1e-6).remove(),y=e.transition(v).style("opacity",1);var b=c.selectAll(".tick.major").data(h,String),w=b.enter().insert("g","path").attr("class","tick major").style("opacity",1e-6),E=e.transition(b.exit()).style("opacity",1e-6).remove(),S=e.transition(b).style("opacity",1),x;var T=To(t),N=c.selectAll(".domain").data([0]),C=(N.enter().append("path").attr("class","domain"),e.transition(N));var k=t.copy(),L=this.__chart__||k;this.__chart__=k;w.append("line");w.append("text");var A=w.select("line"),O=S.select("line"),M=b.select("text").text(p),_=w.select("text"),D=S.select("text");switch(n){case"bottom":{x=Cu;m.attr("y2",i);y.attr("x2",0).attr("y2",i);A.attr("y2",r);_.attr("y",Math.max(r,0)+o);O.attr("x2",0).attr("y2",r);D.attr("x",0).attr("y",Math.max(r,0)+o);M.attr("dy",".71em").style("text-anchor","middle");C.attr("d","M"+T[0]+","+s+"V0H"+T[1]+"V"+s);break};case"top":{x=Cu;m.attr("y2",-i);y.attr("x2",0).attr("y2",-i);A.attr("y2",-r);_.attr("y",-(Math.max(r,0)+o));O.attr("x2",0).attr("y2",-r);D.attr("x",0).attr("y",-(Math.max(r,0)+o));M.attr("dy","0em").style("text-anchor","middle");C.attr("d","M"+T[0]+","+ -s+"V0H"+T[1]+"V"+ -s);break};case"left":{x=ku;m.attr("x2",-i);y.attr("x2",-i).attr("y2",0);A.attr("x2",-r);_.attr("x",-(Math.max(r,0)+o));O.attr("x2",-r).attr("y2",0);D.attr("x",-(Math.max(r,0)+o)).attr("y",0);M.attr("dy",".32em").style("text-anchor","end");C.attr("d","M"+ -s+","+T[0]+"H0V"+T[1]+"H"+ -s);break};case"right":{x=ku;m.attr("x2",i);y.attr("x2",i).attr("y2",0);A.attr("x2",r);_.attr("x",Math.max(r,0)+o);O.attr("x2",r).attr("y2",0);D.attr("x",Math.max(r,0)+o).attr("y",0);M.attr("dy",".32em").style("text-anchor","start");C.attr("d","M"+s+","+T[0]+"H0V"+T[1]+"H"+s);break}}if(t.ticks){w.call(x,L);S.call(x,k);E.call(x,k);m.call(x,L);y.call(x,k);g.call(x,k)}else{var P=k.rangeBand()/2,H=function(e){return k(e)+P};w.call(x,H);S.call(x,H)}})}var t=e.scale.linear(),n=Tu,r=6,i=6,s=6,o=3,u=[10],a=null,f,l=0;c.scale=function(e){if(!arguments.length)return t;t=e;return c};c.orient=function(e){if(!arguments.length)return n;n=e in Nu?e+"":Tu;return c};c.ticks=function(){if(!arguments.length)return u;u=arguments;return c};c.tickValues=function(e){if(!arguments.length)return a;a=e;return c};c.tickFormat=function(e){if(!arguments.length)return f;f=e;return c};c.tickSize=function(e,t){if(!arguments.length)return r;var n=arguments.length-1;r=+e;i=n>1?+t:r;s=n>0?+arguments[n]:r;return c};c.tickPadding=function(e){if(!arguments.length)return o;o=+e;return c};c.tickSubdivide=function(e){if(!arguments.length)return l;l=+e;return c};return c};var Tu="bottom",Nu={top:1,right:1,bottom:1,left:1};e.svg.brush=function(){function a(t){t.each(function(){var t=e.select(this),n=t.selectAll(".background").data([0]),o=t.selectAll(".extent").data([0]),u=t.selectAll(".resize").data(s,String),p;t.style("pointer-events","all").on("mousedown.brush",h).on("touchstart.brush",h);n.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair");o.enter().append("rect").attr("class","extent").style("cursor","move");u.enter().append("g").attr("class",function(e){return"resize "+e}).style("cursor",function(e){return Au[e]}).append("rect").attr("x",function(e){return/[ew]$/.test(e)?-3:null}).attr("y",function(e){return/^[ns]/.test(e)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden");u.style("display",a.empty()?"none":null);u.exit().remove();if(r){p=To(r);n.attr("x",p[0]).attr("width",p[1]-p[0]);l(t)}if(i){p=To(i);n.attr("y",p[0]).attr("height",p[1]-p[0]);c(t)}f(t)})}function f(e){e.selectAll(".resize").attr("transform",function(e){return"translate("+o[+/e$/.test(e)][0]+","+o[+/^s/.test(e)][1]+")"})}function l(e){e.select(".extent").attr("x",o[0][0]);e.selectAll(".extent,.n>rect,.s>rect").attr("width",o[1][0]-o[0][0])}function c(e){e.select(".extent").attr("y",o[0][1]);e.selectAll(".extent,.e>rect,.w>rect").attr("height",o[1][1]-o[0][1])}function h(){function C(){var t=e.event.changedTouches;return t?e.touches(s,t)[0]:e.mouse(s)}function k(){if(e.event.keyCode==32){if(!b){w=null;E[0]-=o[1][0];E[1]-=o[1][1];b=2}y()}}function L(){if(e.event.keyCode==32&&b==2){E[0]+=o[1][0];E[1]+=o[1][1];b=0;y()}}function A(){var t=C(),n=false;if(S){t[0]+=S[0];t[1]+=S[1]}if(!b){if(e.event.altKey){if(!w)w=[(o[0][0]+o[1][0])/2,(o[0][1]+o[1][1])/2];E[0]=o[+(t[0]<w[0])][0];E[1]=o[+(t[1]<w[1])][1]}else w=null}if(m&&O(t,r,0)){l(d);n=true}if(g&&O(t,i,1)){c(d);n=true}if(n){f(d);p({type:"brush",mode:b?"move":"resize"})}}function O(e,t,n){var r=To(t),i=r[0],s=r[1],a=E[n],f=o[1][n]-o[0][n],l,c;if(b){i-=a;s-=f+a}l=Math.max(i,Math.min(s,e[n]));if(b){c=(l+=a)+f}else{if(w)a=Math.max(i,Math.min(s,2*w[n]-l));if(a<l){c=l;l=a}else{c=a}}if(o[0][n]!==l||o[1][n]!==c){u=null;o[0][n]=l;o[1][n]=c;return true}}function M(){A();d.style("pointer-events","all").selectAll(".resize").style("display",a.empty()?"none":null);e.select("body").style("cursor",null);x.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null);p({type:"brushend"});y()}var s=this,h=e.select(e.event.target),p=t.of(s,arguments),d=e.select(s),v=h.datum(),m=!/^(n|s)$/.test(v)&&r,g=!/^(e|w)$/.test(v)&&i,b=h.classed("extent"),w,E=C(),S;var x=e.select(n).on("mousemove.brush",A).on("mouseup.brush",M).on("touchmove.brush",A).on("touchend.brush",M).on("keydown.brush",k).on("keyup.brush",L);if(b){E[0]=o[0][0]-E[0];E[1]=o[0][1]-E[1]}else if(v){var T=+/w$/.test(v),N=+/^n/.test(v);S=[o[1-T][0]-E[0],o[1-N][1]-E[1]];E[0]=o[T][0];E[1]=o[N][1]}else if(e.event.altKey)w=E.slice();d.style("pointer-events","none").selectAll(".resize").style("display",null);e.select("body").style("cursor",h.style("cursor"));p({type:"brushstart"});A();y()}var t=S(a,"brushstart","brush","brushend"),r=null,i=null,s=Ou[0],o=[[0,0],[0,0]],u;a.x=function(e){if(!arguments.length)return r;r=e;s=Ou[!r<<1|!i];return a};a.y=function(e){if(!arguments.length)return i;i=e;s=Ou[!r<<1|!i];return a};a.extent=function(e){var t,n,s,f,l;if(!arguments.length){e=u||o;if(r){t=e[0][0],n=e[1][0];if(!u){t=o[0][0],n=o[1][0];if(r.invert)t=r.invert(t),n=r.invert(n);if(n<t)l=t,t=n,n=l}}if(i){s=e[0][1],f=e[1][1];if(!u){s=o[0][1],f=o[1][1];if(i.invert)s=i.invert(s),f=i.invert(f);if(f<s)l=s,s=f,f=l}}return r&&i?[[t,s],[n,f]]:r?[t,n]:i&&[s,f]}u=[[0,0],[0,0]];if(r){t=e[0],n=e[1];if(i)t=t[0],n=n[0];u[0][0]=t,u[1][0]=n;if(r.invert)t=r(t),n=r(n);if(n<t)l=t,t=n,n=l;o[0][0]=t|0,o[1][0]=n|0}if(i){s=e[0],f=e[1];if(r)s=s[1],f=f[1];u[0][1]=s,u[1][1]=f;if(i.invert)s=i(s),f=i(f);if(f<s)l=s,s=f,f=l;o[0][1]=s|0,o[1][1]=f|0}return a};a.clear=function(){u=null;o[0][0]=o[0][1]=o[1][0]=o[1][1]=0;return a};a.empty=function(){return r&&o[0][0]===o[1][0]||i&&o[0][1]===o[1][1]};return e.rebind(a,t,"on")};var Au={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"};var Ou=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];e.time={};var Mu=Date,_u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];Du.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Pu.setUTCDate.apply(this._,arguments)},setDay:function(){Pu.setUTCDay.apply(this._,arguments)},setFullYear:function(){Pu.setUTCFullYear.apply(this._,arguments)},setHours:function(){Pu.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Pu.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Pu.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Pu.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Pu.setUTCSeconds.apply(this._,arguments)},setTime:function(){Pu.setTime.apply(this._,arguments)}};var Pu=Date.prototype;var Hu="%a %b %e %X %Y",Bu="%m/%d/%Y",ju="%H:%M:%S";var Fu=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Iu=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],qu=["January","February","March","April","May","June","July","August","September","October","November","December"],Ru=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.time.year=Uu(function(t){t=e.time.day(t);t.setMonth(0,1);return t},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e){return e.getFullYear()});e.time.years=e.time.year.range;e.time.years.utc=e.time.year.utc.range;e.time.day=Uu(function(e){var t=new Mu(1970,0);t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate());return t},function(e,t){e.setDate(e.getDate()+t)},function(e){return e.getDate()-1});e.time.days=e.time.day.range;e.time.days.utc=e.time.day.utc.range;e.time.dayOfYear=function(t){var n=e.time.year(t);return Math.floor((t-n-(t.getTimezoneOffset()-n.getTimezoneOffset())*6e4)/864e5)};_u.forEach(function(t,n){t=t.toLowerCase();n=7-n;var r=e.time[t]=Uu(function(t){(t=e.time.day(t)).setDate(t.getDate()-(t.getDay()+n)%7);return t},function(e,t){e.setDate(e.getDate()+Math.floor(t)*7)},function(t){var r=e.time.year(t).getDay();return Math.floor((e.time.dayOfYear(t)+(r+n)%7)/7)-(r!==n)});e.time[t+"s"]=r.range;e.time[t+"s"].utc=r.utc.range;e.time[t+"OfYear"]=function(t){var r=e.time.year(t).getDay();return Math.floor((e.time.dayOfYear(t)+(r+n)%7)/7)}});e.time.week=e.time.sunday;e.time.weeks=e.time.sunday.range;e.time.weeks.utc=e.time.sunday.utc.range;e.time.weekOfYear=e.time.sundayOfYear;e.time.format=function(e){function n(n){var r=[],i=-1,s=0,o,u,a;while(++i<t){if(e.charCodeAt(i)===37){r.push(e.substring(s,i));if((u=ea[o=e.charAt(++i)])!=null)o=e.charAt(++i);if(a=ta[o])o=a(n,u==null?o==="e"?" ":"0":u);r.push(o);s=i+1}}r.push(e.substring(s,i));return r.join("")}var t=e.length;n.parse=function(t){var n={y:1900,m:0,d:1,H:0,M:0,S:0,L:0},r=Wu(n,e,t,0);if(r!=t.length)return null;if("p"in n)n.H=n.H%12+n.p*12;var i=new Mu;i.setFullYear(n.y,n.m,n.d);i.setHours(n.H,n.M,n.S,n.L);return i};n.toString=function(){return e};return n};var Ju=Xu(Fu),Ku=Xu(Iu),Qu=Xu(qu),Gu=Vu(qu),Yu=Xu(Ru),Zu=Vu(Ru);var ea={"-":"",_:" ",0:"0"};var ta={a:function(e){return Iu[e.getDay()]},A:function(e){return Fu[e.getDay()]},b:function(e){return Ru[e.getMonth()]},B:function(e){return qu[e.getMonth()]},c:e.time.format(Hu),d:function(e,t){return $u(e.getDate(),t,2)},e:function(e,t){return $u(e.getDate(),t,2)},H:function(e,t){return $u(e.getHours(),t,2)},I:function(e,t){return $u(e.getHours()%12||12,t,2)},j:function(t,n){return $u(1+e.time.dayOfYear(t),n,3)},L:function(e,t){return $u(e.getMilliseconds(),t,3)},m:function(e,t){return $u(e.getMonth()+1,t,2)},M:function(e,t){return $u(e.getMinutes(),t,2)},p:function(e){return e.getHours()>=12?"PM":"AM"},S:function(e,t){return $u(e.getSeconds(),t,2)},U:function(t,n){return $u(e.time.sundayOfYear(t),n,2)},w:function(e){return e.getDay()},W:function(t,n){return $u(e.time.mondayOfYear(t),n,2)},x:e.time.format(Bu),X:e.time.format(ju),y:function(e,t){return $u(e.getFullYear()%100,t,2)},Y:function(e,t){return $u(e.getFullYear()%1e4,t,4)},Z:Sa,"%":function(){return"%"}};var na={a:ra,A:ia,b:sa,B:oa,c:ua,d:da,e:da,H:va,I:va,L:ya,m:pa,M:ma,p:wa,S:ga,x:aa,X:fa,y:ca,Y:la};var ba=/^\s*\d+/;var Ea=e.map({am:0,pm:1});e.time.format.utc=function(t){function r(e){try{Mu=Du;var t=new Mu;t._=e;return n(t)}finally{Mu=Date}}var n=e.time.format(t);r.parse=function(e){try{Mu=Du;var t=n.parse(e);return t&&t._}finally{Mu=Date}};r.toString=n.toString;return r};var xa=e.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ");e.time.format.iso=Date.prototype.toISOString&&+(new Date("2000-01-01T00:00:00.000Z"))?Ta:xa;Ta.parse=function(e){var t=new Date(e);return isNaN(t)?null:t};Ta.toString=xa.toString;e.time.second=Uu(function(e){return new Mu(Math.floor(e/1e3)*1e3)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*1e3)},function(e){return e.getSeconds()});e.time.seconds=e.time.second.range;e.time.seconds.utc=e.time.second.utc.range;e.time.minute=Uu(function(e){return new Mu(Math.floor(e/6e4)*6e4)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*6e4)},function(e){return e.getMinutes()});e.time.minutes=e.time.minute.range;e.time.minutes.utc=e.time.minute.utc.range;e.time.hour=Uu(function(e){var t=e.getTimezoneOffset()/60;return new Mu((Math.floor(e/36e5-t)+t)*36e5)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*36e5)},function(e){return e.getHours()});e.time.hours=e.time.hour.range;e.time.hours.utc=e.time.hour.utc.range;e.time.month=Uu(function(t){t=e.time.day(t);t.setDate(1);return t},function(e,t){e.setMonth(e.getMonth()+t)},function(e){return e.getMonth()});e.time.months=e.time.month.range;e.time.months.utc=e.time.month.utc.range;var Ma=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6];var _a=[[e.time.second,1],[e.time.second,5],[e.time.second,15],[e.time.second,30],[e.time.minute,1],[e.time.minute,5],[e.time.minute,15],[e.time.minute,30],[e.time.hour,1],[e.time.hour,3],[e.time.hour,6],[e.time.hour,12],[e.time.day,1],[e.time.day,2],[e.time.week,1],[e.time.month,1],[e.time.month,3],[e.time.year,1]];var Da=[[e.time.format("%Y"),$n],[e.time.format("%B"),function(e){return e.getMonth()}],[e.time.format("%b %d"),function(e){return e.getDate()!=1}],[e.time.format("%a %d"),function(e){return e.getDay()&&e.getDate()!=1}],[e.time.format("%I %p"),function(e){return e.getHours()}],[e.time.format("%I:%M"),function(e){return e.getMinutes()}],[e.time.format(":%S"),function(e){return e.getSeconds()}],[e.time.format(".%L"),function(e){return e.getMilliseconds()}]];var Pa=e.scale.linear(),Ha=La(Da);_a.year=function(e,t){return Pa.domain(e.map(Oa)).ticks(t).map(Aa)};e.time.scale=function(){return Na(e.scale.linear(),_a,Ha)};var Ba=_a.map(function(e){return[e[0].utc,e[1]]});var ja=[[e.time.format.utc("%Y"),$n],[e.time.format.utc("%B"),function(e){return e.getUTCMonth()}],[e.time.format.utc("%b %d"),function(e){return e.getUTCDate()!=1}],[e.time.format.utc("%a %d"),function(e){return e.getUTCDay()&&e.getUTCDate()!=1}],[e.time.format.utc("%I %p"),function(e){return e.getUTCHours()}],[e.time.format.utc("%I:%M"),function(e){return e.getUTCMinutes()}],[e.time.format.utc(":%S"),function(e){return e.getUTCSeconds()}],[e.time.format.utc(".%L"),function(e){return e.getUTCMilliseconds()}]];var Fa=La(ja);Ba.year=function(e,t){return Pa.domain(e.map(qa)).ticks(t).map(Ia)};e.time.scale.utc=function(){return Na(e.scale.linear(),Ba,Fa)};e.text=function(){return e.xhr.apply(e,arguments).response(Ra)};e.json=function(t,n){return e.xhr(t,"application/json",n).response(Ua)};e.html=function(t,n){return e.xhr(t,"text/html",n).response(za)};e.xml=function(){return e.xhr.apply(e,arguments).response(Wa)};return e}() \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/fisheye.js b/ecomp-portal-BE/war/static/fusion/d3/js/fisheye.js
deleted file mode 100644
index e1addd7b..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/fisheye.js
+++ /dev/null
@@ -1,86 +0,0 @@
-(function() {
- d3.fisheye = {
- scale: function(scaleType) {
- return d3_fisheye_scale(scaleType(), 3, 0);
- },
- circular: function() {
- var radius = 200,
- distortion = 2,
- k0,
- k1,
- focus = [0, 0];
-
- function fisheye(d) {
- var dx = d.x - focus[0],
- dy = d.y - focus[1],
- dd = Math.sqrt(dx * dx + dy * dy);
- if (!dd || dd >= radius) return {x: d.x, y: d.y, z: 1};
- var k = k0 * (1 - Math.exp(-dd * k1)) / dd * .75 + .25;
- return {x: focus[0] + dx * k, y: focus[1] + dy * k, z: Math.min(k, 10)};
- }
-
- function rescale() {
- k0 = Math.exp(distortion);
- k0 = k0 / (k0 - 1) * radius;
- k1 = distortion / radius;
- return fisheye;
- }
-
- fisheye.radius = function(_) {
- if (!arguments.length) return radius;
- radius = +_;
- return rescale();
- };
-
- fisheye.distortion = function(_) {
- if (!arguments.length) return distortion;
- distortion = +_;
- return rescale();
- };
-
- fisheye.focus = function(_) {
- if (!arguments.length) return focus;
- focus = _;
- return fisheye;
- };
-
- return rescale();
- }
- };
-
- function d3_fisheye_scale(scale, d, a) {
-
- function fisheye(_) {
- var x = scale(_),
- left = x < a,
- v,
- range = d3.extent(scale.range()),
- min = range[0],
- max = range[1],
- m = left ? a - min : max - a;
- if (m == 0) m = max - min;
- return (left ? -1 : 1) * m * (d + 1) / (d + (m / Math.abs(x - a))) + a;
- }
-
- fisheye.distortion = function(_) {
- if (!arguments.length) return d;
- d = +_;
- return fisheye;
- };
-
- fisheye.focus = function(_) {
- if (!arguments.length) return a;
- a = +_;
- return fisheye;
- };
-
- fisheye.copy = function() {
- return d3_fisheye_scale(scale.copy(), d, a);
- };
-
- fisheye.nice = scale.nice;
- fisheye.ticks = scale.ticks;
- fisheye.tickFormat = scale.tickFormat;
- return d3.rebind(fisheye, scale, "domain", "range");
- }
-})();
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/hive.js b/ecomp-portal-BE/war/static/fusion/d3/js/hive.js
deleted file mode 100644
index 06e53aed..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/hive.js
+++ /dev/null
@@ -1,80 +0,0 @@
-d3.hive = {};
-
-d3.hive.link = function() {
- var source = function(d) { return d.source; },
- target = function(d) { return d.target; },
- angle = function(d) { return d.angle; },
- startRadius = function(d) { return d.radius; },
- endRadius = startRadius,
- arcOffset = -Math.PI / 2;
-
- function link(d, i) {
- var s = node(source, this, d, i),
- t = node(target, this, d, i),
- x;
- if (t.a < s.a) x = t, t = s, s = x;
- if (t.a - s.a > Math.PI) s.a += 2 * Math.PI;
- var a1 = s.a + (t.a - s.a) / 3,
- a2 = t.a - (t.a - s.a) / 3;
- return s.r0 - s.r1 || t.r0 - t.r1
- ? "M" + Math.cos(s.a) * s.r0 + "," + Math.sin(s.a) * s.r0
- + "L" + Math.cos(s.a) * s.r1 + "," + Math.sin(s.a) * s.r1
- + "C" + Math.cos(a1) * s.r1 + "," + Math.sin(a1) * s.r1
- + " " + Math.cos(a2) * t.r1 + "," + Math.sin(a2) * t.r1
- + " " + Math.cos(t.a) * t.r1 + "," + Math.sin(t.a) * t.r1
- + "L" + Math.cos(t.a) * t.r0 + "," + Math.sin(t.a) * t.r0
- + "C" + Math.cos(a2) * t.r0 + "," + Math.sin(a2) * t.r0
- + " " + Math.cos(a1) * s.r0 + "," + Math.sin(a1) * s.r0
- + " " + Math.cos(s.a) * s.r0 + "," + Math.sin(s.a) * s.r0
- : "M" + Math.cos(s.a) * s.r0 + "," + Math.sin(s.a) * s.r0
- + "C" + Math.cos(a1) * s.r1 + "," + Math.sin(a1) * s.r1
- + " " + Math.cos(a2) * t.r1 + "," + Math.sin(a2) * t.r1
- + " " + Math.cos(t.a) * t.r1 + "," + Math.sin(t.a) * t.r1;
- }
-
- function node(method, thiz, d, i) {
- var node = method.call(thiz, d, i),
- a = +(typeof angle === "function" ? angle.call(thiz, node, i) : angle) + arcOffset,
- r0 = +(typeof startRadius === "function" ? startRadius.call(thiz, node, i) : startRadius),
- r1 = (startRadius === endRadius ? r0 : +(typeof endRadius === "function" ? endRadius.call(thiz, node, i) : endRadius));
- return {r0: r0, r1: r1, a: a};
- }
-
- link.source = function(_) {
- if (!arguments.length) return source;
- source = _;
- return link;
- };
-
- link.target = function(_) {
- if (!arguments.length) return target;
- target = _;
- return link;
- };
-
- link.angle = function(_) {
- if (!arguments.length) return angle;
- angle = _;
- return link;
- };
-
- link.radius = function(_) {
- if (!arguments.length) return startRadius;
- startRadius = endRadius = _;
- return link;
- };
-
- link.startRadius = function(_) {
- if (!arguments.length) return startRadius;
- startRadius = _;
- return link;
- };
-
- link.endRadius = function(_) {
- if (!arguments.length) return endRadius;
- endRadius = _;
- return link;
- };
-
- return link;
-};
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/horizon.js b/ecomp-portal-BE/war/static/fusion/d3/js/horizon.js
deleted file mode 100644
index d84c6567..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/horizon.js
+++ /dev/null
@@ -1,192 +0,0 @@
-(function() {
- d3.horizon = function() {
- var bands = 1, // between 1 and 5, typically
- mode = "offset", // or mirror
- interpolate = "linear", // or basis, monotone, step-before, etc.
- x = d3_horizonX,
- y = d3_horizonY,
- w = 960,
- h = 40,
- duration = 0;
-
- var color = d3.scale.linear()
- .domain([-1, 0, 1])
- .range(["#d62728", "#fff", "#1f77b4"]);
-
- // For each small multiple…
- function horizon(g) {
- g.each(function(d, i) {
- var g = d3.select(this),
- n = 2 * bands + 1,
- xMin = Infinity,
- xMax = -Infinity,
- yMax = -Infinity,
- x0, // old x-scale
- y0, // old y-scale
- id; // unique id for paths
-
- // Compute x- and y-values along with extents.
- var data = d.map(function(d, i) {
- var xv = x.call(this, d, i),
- yv = y.call(this, d, i);
- if (xv < xMin) xMin = xv;
- if (xv > xMax) xMax = xv;
- if (-yv > yMax) yMax = -yv;
- if (yv > yMax) yMax = yv;
- return [xv, yv];
- });
-
- // Compute the new x- and y-scales, and transform.
- var x1 = d3.scale.linear().domain([xMin, xMax]).range([0, w]),
- y1 = d3.scale.linear().domain([0, yMax]).range([0, h * bands]),
- t1 = d3_horizonTransform(bands, h, mode);
-
- // Retrieve the old scales, if this is an update.
- if (this.__chart__) {
- x0 = this.__chart__.x;
- y0 = this.__chart__.y;
- t0 = this.__chart__.t;
- id = this.__chart__.id;
- } else {
- x0 = x1.copy();
- y0 = y1.copy();
- t0 = t1;
- id = ++d3_horizonId;
- }
-
- // We'll use a defs to store the area path and the clip path.
- var defs = g.selectAll("defs")
- .data([null]);
-
- // The clip path is a simple rect.
- defs.enter().append("defs").append("clipPath")
- .attr("id", "d3_horizon_clip" + id)
- .append("rect")
- .attr("width", w)
- .attr("height", h);
-
- defs.select("rect").transition()
- .duration(duration)
- .attr("width", w)
- .attr("height", h);
-
- // We'll use a container to clip all horizon layers at once.
- g.selectAll("g")
- .data([null])
- .enter().append("g")
- .attr("clip-path", "url(#d3_horizon_clip" + id + ")");
-
- // Instantiate each copy of the path with different transforms.
- var path = g.select("g").selectAll("path")
- .data(d3.range(-1, -bands - 1, -1).concat(d3.range(1, bands + 1)), Number);
-
- var d0 = d3_horizonArea
- .interpolate(interpolate)
- .x(function(d) { return x0(d[0]); })
- .y0(h * bands)
- .y1(function(d) { return h * bands - y0(d[1]); })
- (data);
-
- var d1 = d3_horizonArea
- .x(function(d) { return x1(d[0]); })
- .y1(function(d) { return h * bands - y1(d[1]); })
- (data);
-
- path.enter().append("path")
- .style("fill", color)
- .attr("transform", t0)
- .attr("d", d0);
-
- path.transition()
- .duration(duration)
- .style("fill", color)
- .attr("transform", t1)
- .attr("d", d1);
-
- path.exit().transition()
- .duration(duration)
- .attr("transform", t1)
- .attr("d", d1)
- .remove();
-
- // Stash the new scales.
- this.__chart__ = {x: x1, y: y1, t: t1, id: id};
- });
- d3.timer.flush();
- }
-
- horizon.duration = function(x) {
- if (!arguments.length) return duration;
- duration = +x;
- return horizon;
- };
-
- horizon.bands = function(x) {
- if (!arguments.length) return bands;
- bands = +x;
- color.domain([-bands, 0, bands]);
- return horizon;
- };
-
- horizon.mode = function(x) {
- if (!arguments.length) return mode;
- mode = x + "";
- return horizon;
- };
-
- horizon.colors = function(x) {
- if (!arguments.length) return color.range();
- color.range(x);
- return horizon;
- };
-
- horizon.interpolate = function(x) {
- if (!arguments.length) return interpolate;
- interpolate = x + "";
- return horizon;
- };
-
- horizon.x = function(z) {
- if (!arguments.length) return x;
- x = z;
- return horizon;
- };
-
- horizon.y = function(z) {
- if (!arguments.length) return y;
- y = z;
- return horizon;
- };
-
- horizon.width = function(x) {
- if (!arguments.length) return w;
- w = +x;
- return horizon;
- };
-
- horizon.height = function(x) {
- if (!arguments.length) return h;
- h = +x;
- return horizon;
- };
-
- return horizon;
- };
-
- var d3_horizonArea = d3.svg.area(),
- d3_horizonId = 0;
-
- function d3_horizonX(d) {
- return d[0];
- }
-
- function d3_horizonY(d) {
- return d[1];
- }
-
- function d3_horizonTransform(bands, h, mode) {
- return mode == "offset"
- ? function(d) { return "translate(0," + (d + (d < 0) - bands) * h + ")"; }
- : function(d) { return (d < 0 ? "scale(1,-1)" : "") + "translate(0," + (d - bands) * h + ")"; };
- }
-})();
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/interactiveLayer.js b/ecomp-portal-BE/war/static/fusion/d3/js/interactiveLayer.js
deleted file mode 100644
index 4dfb68dc..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/interactiveLayer.js
+++ /dev/null
@@ -1,251 +0,0 @@
-/* Utility class to handle creation of an interactive layer.
-This places a rectangle on top of the chart. When you mouse move over it, it sends a dispatch
-containing the X-coordinate. It can also render a vertical line where the mouse is located.
-
-dispatch.elementMousemove is the important event to latch onto. It is fired whenever the mouse moves over
-the rectangle. The dispatch is given one object which contains the mouseX/Y location.
-It also has 'pointXValue', which is the conversion of mouseX to the x-axis scale.
-*/
-nv.interactiveGuideline = function() {
- "use strict";
- var tooltip = nv.models.tooltip();
- //Public settings
- var width = null
- , height = null
- //Please pass in the bounding chart's top and left margins
- //This is important for calculating the correct mouseX/Y positions.
- , margin = {left: 0, top: 0}
- , xScale = d3.scale.linear()
- , yScale = d3.scale.linear()
- , dispatch = d3.dispatch('elementMousemove', 'elementMouseout','elementDblclick')
- , showGuideLine = true
- , svgContainer = null
- //Must pass in the bounding chart's <svg> container.
- //The mousemove event is attached to this container.
- ;
-
- //Private variables
- var isMSIE = navigator.userAgent.indexOf("MSIE") !== -1 //Check user-agent for Microsoft Internet Explorer.
- ;
-
-
- function layer(selection) {
- selection.each(function(data) {
- var container = d3.select(this);
-
- var availableWidth = (width || 960), availableHeight = (height || 400);
-
- var wrap = container.selectAll("g.nv-wrap.nv-interactiveLineLayer").data([data]);
- var wrapEnter = wrap.enter()
- .append("g").attr("class", " nv-wrap nv-interactiveLineLayer");
-
-
- wrapEnter.append("g").attr("class","nv-interactiveGuideLine");
-
- if (!svgContainer) {
- return;
- }
-
- function mouseHandler() {
- var d3mouse = d3.mouse(this);
- var mouseX = d3mouse[0];
- var mouseY = d3mouse[1];
- var subtractMargin = true;
- var mouseOutAnyReason = false;
- if (isMSIE) {
- /*
- D3.js (or maybe SVG.getScreenCTM) has a nasty bug in Internet Explorer 10.
- d3.mouse() returns incorrect X,Y mouse coordinates when mouse moving
- over a rect in IE 10.
- However, d3.event.offsetX/Y also returns the mouse coordinates
- relative to the triggering <rect>. So we use offsetX/Y on IE.
- */
- mouseX = d3.event.offsetX;
- mouseY = d3.event.offsetY;
-
- /*
- On IE, if you attach a mouse event listener to the <svg> container,
- it will actually trigger it for all the child elements (like <path>, <circle>, etc).
- When this happens on IE, the offsetX/Y is set to where ever the child element
- is located.
- As a result, we do NOT need to subtract margins to figure out the mouse X/Y
- position under this scenario. Removing the line below *will* cause
- the interactive layer to not work right on IE.
- */
- if(d3.event.target.tagName !== "svg")
- subtractMargin = false;
-
- if (d3.event.target.className.baseVal.match("nv-legend"))
- mouseOutAnyReason = true;
-
- }
-
- if(subtractMargin) {
- mouseX -= margin.left;
- mouseY -= margin.top;
- }
-
- /* If mouseX/Y is outside of the chart's bounds,
- trigger a mouseOut event.
- */
- if (mouseX < 0 || mouseY < 0
- || mouseX > availableWidth || mouseY > availableHeight
- || (d3.event.relatedTarget && d3.event.relatedTarget.ownerSVGElement === undefined)
- || mouseOutAnyReason
- )
- {
- if (isMSIE) {
- if (d3.event.relatedTarget
- && d3.event.relatedTarget.ownerSVGElement === undefined
- && d3.event.relatedTarget.className.match(tooltip.nvPointerEventsClass)) {
- return;
- }
- }
- dispatch.elementMouseout({
- mouseX: mouseX,
- mouseY: mouseY
- });
- layer.renderGuideLine(null); //hide the guideline
- return;
- }
-
- var pointXValue = xScale.invert(mouseX);
- dispatch.elementMousemove({
- mouseX: mouseX,
- mouseY: mouseY,
- pointXValue: pointXValue
- });
-
- //If user double clicks the layer, fire a elementDblclick dispatch.
- if (d3.event.type === "dblclick") {
- dispatch.elementDblclick({
- mouseX: mouseX,
- mouseY: mouseY,
- pointXValue: pointXValue
- });
- }
- }
-
- svgContainer
- .on("mousemove",mouseHandler, true)
- .on("mouseout" ,mouseHandler,true)
- .on("dblclick" ,mouseHandler)
- ;
-
- //Draws a vertical guideline at the given X postion.
- layer.renderGuideLine = function(x) {
- if (!showGuideLine) return;
- var line = wrap.select(".nv-interactiveGuideLine")
- .selectAll("line")
- .data((x != null) ? [nv.utils.NaNtoZero(x)] : [], String);
-
- line.enter()
- .append("line")
- .attr("class", "nv-guideline")
- .attr("x1", function(d) { return d;})
- .attr("x2", function(d) { return d;})
- .attr("y1", availableHeight)
- .attr("y2",0)
- ;
- line.exit().remove();
-
- }
- });
- }
-
- layer.dispatch = dispatch;
- layer.tooltip = tooltip;
-
- layer.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return layer;
- };
-
- layer.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return layer;
- };
-
- layer.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return layer;
- };
-
- layer.xScale = function(_) {
- if (!arguments.length) return xScale;
- xScale = _;
- return layer;
- };
-
- layer.showGuideLine = function(_) {
- if (!arguments.length) return showGuideLine;
- showGuideLine = _;
- return layer;
- };
-
- layer.svgContainer = function(_) {
- if (!arguments.length) return svgContainer;
- svgContainer = _;
- return layer;
- };
-
-
- return layer;
-};
-
-/* Utility class that uses d3.bisect to find the index in a given array, where a search value can be inserted.
-This is different from normal bisectLeft; this function finds the nearest index to insert the search value.
-
-For instance, lets say your array is [1,2,3,5,10,30], and you search for 28.
-Normal d3.bisectLeft will return 4, because 28 is inserted after the number 10. But interactiveBisect will return 5
-because 28 is closer to 30 than 10.
-
-Unit tests can be found in: interactiveBisectTest.html
-
-Has the following known issues:
- * Will not work if the data points move backwards (ie, 10,9,8,7, etc) or if the data points are in random order.
- * Won't work if there are duplicate x coordinate values.
-*/
-nv.interactiveBisect = function (values, searchVal, xAccessor) {
- "use strict";
- if (! values instanceof Array) return null;
- if (typeof xAccessor !== 'function') xAccessor = function(d,i) { return d.x;}
-
- var bisect = d3.bisector(xAccessor).left;
- var index = d3.max([0, bisect(values,searchVal) - 1]);
- var currentValue = xAccessor(values[index], index);
- if (typeof currentValue === 'undefined') currentValue = index;
-
- if (currentValue === searchVal) return index; //found exact match
-
- var nextIndex = d3.min([index+1, values.length - 1]);
- var nextValue = xAccessor(values[nextIndex], nextIndex);
- if (typeof nextValue === 'undefined') nextValue = nextIndex;
-
- if (Math.abs(nextValue - searchVal) >= Math.abs(currentValue - searchVal))
- return index;
- else
- return nextIndex
-};
-
-/*
-Returns the index in the array "values" that is closest to searchVal.
-Only returns an index if searchVal is within some "threshold".
-Otherwise, returns null.
-*/
-nv.nearestValueIndex = function (values, searchVal, threshold) {
- "use strict";
- var yDistMax = Infinity, indexToHighlight = null;
- values.forEach(function(d,i) {
- var delta = Math.abs(searchVal - d);
- if ( delta <= yDistMax && delta < threshold) {
- yDistMax = delta;
- indexToHighlight = i;
- }
- });
- return indexToHighlight;
-}; \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/intro.js b/ecomp-portal-BE/war/static/fusion/d3/js/intro.js
deleted file mode 100644
index af50383e..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/intro.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/axis-min.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/axis-min.js
deleted file mode 100644
index 1101dde5..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/axis-min.js
+++ /dev/null
@@ -1 +0,0 @@
-nv.models.axis=function(){function o(d){return d.each(function(d){var o=d3.select(this),p=o.selectAll("g.nv-wrap.nv-axis").data([d]),q=p.enter().append("g").attr("class","nvd3 nv-wrap nv-axis");q.append("g");var s=p.select("g");null!==m?a.ticks(m):("top"==a.orient()||"bottom"==a.orient())&&a.ticks(Math.abs(e.range()[1]-e.range()[0])/100),d3.transition(s).call(a),n=n||a.scale();var t=a.tickFormat();null==t&&(t=n.tickFormat());var u=s.selectAll("text.nv-axislabel").data([f||null]);switch(u.exit().remove(),a.orient()){case"top":u.enter().append("text").attr("class","nv-axislabel").attr("text-anchor","middle").attr("y",0);var v=2==e.range().length?e.range()[1]:e.range()[e.range().length-1]+(e.range()[1]-e.range()[0]);if(u.attr("x",v/2),g){var w=p.selectAll("g.nv-axisMaxMin").data(e.domain());w.enter().append("g").attr("class","nv-axisMaxMin").append("text"),w.exit().remove(),w.attr("transform",function(a){return"translate("+e(a)+",0)"}).select("text").attr("dy","0em").attr("y",-a.tickPadding()).attr("text-anchor","middle").text(function(a){var c=t(a);return(""+c).match("NaN")?"":c}),d3.transition(w).attr("transform",function(a,b){return"translate("+e.range()[b]+",0)"})}break;case"bottom":var x=36,y=30,z=s.selectAll("g").select("text");if(i%360){z.each(function(){var c=this.getBBox().width;c>y&&(y=c)});var A=Math.abs(Math.sin(i*Math.PI/180)),x=(A?A*y:y)+30;z.attr("transform",function(){return"rotate("+i+" 0,0)"}).attr("text-anchor",i%360>0?"start":"end")}u.enter().append("text").attr("class","nv-axislabel").attr("text-anchor","middle").attr("y",x);var v=2==e.range().length?e.range()[1]:e.range()[e.range().length-1]+(e.range()[1]-e.range()[0]);if(u.attr("x",v/2),g){var w=p.selectAll("g.nv-axisMaxMin").data([e.domain()[0],e.domain()[e.domain().length-1]]);w.enter().append("g").attr("class","nv-axisMaxMin").append("text"),w.exit().remove(),w.attr("transform",function(a){return"translate("+(e(a)+(l?e.rangeBand()/2:0))+",0)"}).select("text").attr("dy",".71em").attr("y",a.tickPadding()).attr("transform",function(){return"rotate("+i+" 0,0)"}).attr("text-anchor",i?i%360>0?"start":"end":"middle").text(function(a){var c=t(a);return(""+c).match("NaN")?"":c}),d3.transition(w).attr("transform",function(a){return"translate("+(e(a)+(l?e.rangeBand()/2:0))+",0)"})}k&&z.attr("transform",function(a,b){return"translate(0,"+(0==b%2?"0":"12")+")"});break;case"right":if(u.enter().append("text").attr("class","nv-axislabel").attr("text-anchor",j?"middle":"begin").attr("transform",j?"rotate(90)":"").attr("y",j?-Math.max(b.right,c)+30:-10),u.attr("x",j?e.range()[0]/2:a.tickPadding()),g){var w=p.selectAll("g.nv-axisMaxMin").data(e.domain());w.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0),w.exit().remove(),w.attr("transform",function(a){return"translate(0,"+e(a)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",a.tickPadding()).attr("text-anchor","start").text(function(a){var c=t(a);return(""+c).match("NaN")?"":c}),d3.transition(w).attr("transform",function(a,b){return"translate(0,"+e.range()[b]+")"}).select("text").style("opacity",1)}break;case"left":if(u.enter().append("text").attr("class","nv-axislabel").attr("text-anchor",j?"middle":"begin").attr("transform",j?"rotate(-90)":"").attr("y",j?-Math.max(b.left,c)+0:-10),u.attr("x",j?-e.range()[0]/2:-a.tickPadding()),g){var w=p.selectAll("g.nv-axisMaxMin").data(e.domain());w.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0),w.exit().remove(),w.attr("transform",function(a){return"translate(0,"+e(a)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",-a.tickPadding()).attr("text-anchor","start").text(function(a){var c=t(a);return(""+c).match("NaN")?"":c}),d3.transition(w).attr("transform",function(a,b){return"translate(0,"+e.range()[b]+")"}).select("text").style("opacity",1)}}if(u.text(function(a){return a}),!g||"left"!==a.orient()&&"right"!==a.orient()||(s.selectAll("g").each(function(a){d3.select(this).select("text").attr("opacity",1),(e(a)<e.range()[1]+10||e(a)>e.range()[0]-10)&&((a>1e-10||-1e-10>a)&&d3.select(this).attr("opacity",0),d3.select(this).select("text").attr("opacity",0))}),e.domain()[0]==e.domain()[1]&&0==e.domain()[0]&&p.selectAll("g.nv-axisMaxMin").style("opacity",function(a,b){return b?0:1})),g&&("top"===a.orient()||"bottom"===a.orient())){var B=[];p.selectAll("g.nv-axisMaxMin").each(function(a,b){try{b?B.push(e(a)-this.getBBox().width-4):B.push(e(a)+this.getBBox().width+4)}catch(c){b?B.push(e(a)-4):B.push(e(a)+4)}}),s.selectAll("g").each(function(a){(e(a)<B[0]||e(a)>B[1])&&(a>1e-10||-1e-10>a?d3.select(this).remove():d3.select(this).select("text").remove())})}h&&s.selectAll("line.tick").filter(function(a){return!parseFloat(Math.round(1e5*a)/1e6)}).classed("zero",!0),n=e.copy()}),o}var a=d3.svg.axis(),b={top:0,right:0,bottom:0,left:0},c=75,d=60,e=d3.scale.linear(),f=null,g=!1,h=!0,i=0,j=!0,k=!1,l=!1,m=null;a.scale(e).orient("bottom").tickFormat(function(a){return a});var n;return o.axis=a,d3.rebind(o,a,"orient","tickValues","tickSubdivide","tickSize","tickPadding","tickFormat"),d3.rebind(o,e,"domain","range","rangeBand","rangeBands"),o.margin=function(a){return arguments.length?(b.top=a.top!==void 0?a.top:b.top,b.right=a.right!==void 0?a.right:b.right,b.bottom=a.bottom!==void 0?a.bottom:b.bottom,b.left=a.left!==void 0?a.left:b.left,o):b},o.width=function(a){return arguments.length?(c=a,o):c},o.ticks=function(a){return arguments.length?(m=a,o):m},o.height=function(a){return arguments.length?(d=a,o):d},o.axisLabel=function(a){return arguments.length?(f=a,o):f},o.showMaxMin=function(a){return arguments.length?(g=a,o):g},o.highlightZero=function(a){return arguments.length?(h=a,o):h},o.scale=function(b){return arguments.length?(e=b,a.scale(e),l="function"==typeof e.rangeBands,d3.rebind(o,e,"domain","range","rangeBand","rangeBands"),o):e},o.rotateYLabel=function(a){return arguments.length?(j=a,o):j},o.rotateLabels=function(a){return arguments.length?(i=a,o):i},o.staggerLabels=function(a){return arguments.length?(k=a,o):k},o}; \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/axis.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/axis.js
deleted file mode 100644
index 9895c3f0..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/axis.js
+++ /dev/null
@@ -1,470 +0,0 @@
-nv.models.axis = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var axis = d3.svg.axis()
- ;
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 75 //only used for tickLabel currently
- , height = 60 //only used for tickLabel currently
- , scale = d3.scale.linear()
- , axisLabelText = null
- , showMaxMin = true //TODO: showMaxMin should be disabled on all ordinal scaled axes
- , highlightZero = true
- , rotateLabels = 0
- , rotateYLabel = true
- , staggerLabels = false
- , isOrdinal = false
- , ticks = null
- , logScale = false
- , axisLabelDistance = 12 //The larger this number is, the closer the axis label is to the axis.
- ;
-
- axis
- .scale(scale)
- .orient('bottom')
- .tickFormat(function(d) { return d })
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var scale0;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-axis').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-axis');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- //------------------------------------------------------------
-
-
- if (ticks !== null)
- axis.ticks(ticks);
- else if (axis.orient() == 'top' || axis.orient() == 'bottom')
- axis.ticks(Math.abs(scale.range()[1] - scale.range()[0]) / 100);
-
-
- //TODO: consider calculating width/height based on whether or not label is added, for reference in charts using this component
-
-
- g.transition().call(axis);
-
- scale0 = scale0 || axis.scale();
-
- var fmt = axis.tickFormat();
- if (fmt == null) {
- fmt = scale0.tickFormat();
- }
-
- var axisLabel = g.selectAll('text.nv-axislabel')
- .data([axisLabelText || null]);
- axisLabel.exit().remove();
- switch (axis.orient()) {
- case 'top':
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- var w = (scale.range().length==2) ? scale.range()[1] : (scale.range()[scale.range().length-1]+(scale.range()[1]-scale.range()[0]));
- axisLabel
- .attr('text-anchor', 'middle')
- .attr('y', 0)
- .attr('x', w/2);
- if (showMaxMin) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- .data(scale.domain());
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text');
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(' + scale(d) + ',0)'
- })
- .select('text')
- .attr('dy', '0em')
- .attr('y', -axis.tickPadding())
- .attr('text-anchor', 'middle')
- .text(function(d,i) {
- //var v = fmt(d);
- var v = d;
- if(logScale) {
- v = Math.pow(10,v);
- v = fmt(v);
- //fmt = d3.format(',.2f');
- //v = fmt(v);
- } else
- v = fmt(v);
- return ('' + v).match('NaN') ? '' : v;
- });
- axisMaxMin.transition()
- .attr('transform', function(d,i) {
- return 'translate(' + scale.range()[i] + ',0)'
- });
- }
- break;
- case 'bottom':
- var xLabelMargin = 36;
- var maxTextWidth = 30;
- var xTicks = g.selectAll('g').select("text");
- if (rotateLabels%360) {
- //Calculate the longest xTick width
- xTicks.each(function(d,i){
- var width = this.getBBox().width;
- if(width > maxTextWidth) maxTextWidth = width;
- });
- //Convert to radians before calculating sin. Add 30 to margin for healthy padding.
- var sin = Math.abs(Math.sin(rotateLabels*Math.PI/180));
- var xLabelMargin = (sin ? sin*maxTextWidth : maxTextWidth)+30;
- //Rotate all xTicks
- xTicks
- .attr('transform', function(d,i,j) { return 'rotate(' + rotateLabels + ' 0,0)' })
- .style('text-anchor', rotateLabels%360 > 0 ? 'start' : 'end');
- }
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- var w = (scale.range().length==2) ? scale.range()[1] : (scale.range()[scale.range().length-1]+(scale.range()[1]-scale.range()[0]));
- axisLabel
- .attr('text-anchor', 'middle')
- .attr('y', xLabelMargin)
- .attr('x', w/2);
- if (showMaxMin) {
- //if (showMaxMin && !isOrdinal) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- //.data(scale.domain())
- .data([scale.domain()[0], scale.domain()[scale.domain().length - 1]]);
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text');
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(' + (scale(d) + (isOrdinal ? scale.rangeBand() / 2 : 0)) + ',0)'
- })
- .select('text')
- .attr('dy', '.71em')
- .attr('y', axis.tickPadding())
- .attr('transform', function(d,i,j) { return 'rotate(' + rotateLabels + ' 0,0)' })
- .style('text-anchor', rotateLabels ? (rotateLabels%360 > 0 ? 'start' : 'end') : 'middle')
- .text(function(d,i) {
- //var v = fmt(d);
- var v = d;
- if(logScale) {
- v = Math.pow(10,v);
- v = fmt(v);
- //fmt = d3.format(',.2f');
- //v = fmt(v);
- } else
- v = fmt(v);
- return ('' + v).match('NaN') ? '' : v;
- });
- axisMaxMin.transition()
- .attr('transform', function(d,i) {
- //return 'translate(' + scale.range()[i] + ',0)'
- //return 'translate(' + scale(d) + ',0)'
- return 'translate(' + (scale(d) + (isOrdinal ? scale.rangeBand() / 2 : 0)) + ',0)'
- });
- }
- if (staggerLabels)
- xTicks
- .attr('transform', function(d,i) { return 'translate(0,' + (i % 2 == 0 ? '0' : '12') + ')' });
-
- break;
- case 'right':
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- axisLabel
- .style('text-anchor', rotateYLabel ? 'middle' : 'begin')
- .attr('transform', rotateYLabel ? 'rotate(90)' : '')
- .attr('y', rotateYLabel ? (-Math.max(margin.right,width) + 12) : -10) //TODO: consider calculating this based on largest tick width... OR at least expose this on chart
- .attr('x', rotateYLabel ? (scale.range()[0] / 2) : axis.tickPadding());
- if (showMaxMin) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- .data(scale.domain());
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text')
- .style('opacity', 0);
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale(d) + ')'
- })
- .select('text')
- .attr('dy', '.32em')
- .attr('y', 0)
- .attr('x', axis.tickPadding())
- .style('text-anchor', 'start')
- .text(function(d,i) {
- //var v = fmt(d);
- var v = d;
- if(logScale) {
- v = Math.pow(10,v);
- v = fmt(v);
- //fmt = d3.format(',.2f');
- //v = fmt(v);
- } else
- v = fmt(v);
- return ('' + v).match('NaN') ? '' : v;
- });
- axisMaxMin.transition()
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale.range()[i] + ')'
- })
- .select('text')
- .style('opacity', 1);
- }
- break;
- case 'left':
- /*
- //For dynamically placing the label. Can be used with dynamically-sized chart axis margins
- var yTicks = g.selectAll('g').select("text");
- yTicks.each(function(d,i){
- var labelPadding = this.getBBox().width + axis.tickPadding() + 16;
- if(labelPadding > width) width = labelPadding;
- });
- */
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- axisLabel
- .style('text-anchor', rotateYLabel ? 'middle' : 'end')
- .attr('transform', rotateYLabel ? 'rotate(-90)' : '')
- .attr('y', rotateYLabel ? (-Math.max(margin.left,width) + axisLabelDistance) : -10) //TODO: consider calculating this based on largest tick width... OR at least expose this on chart
- .attr('x', rotateYLabel ? (-scale.range()[0] / 2) : -axis.tickPadding());
- if (showMaxMin) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- .data(scale.domain());
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text')
- .style('opacity', 0);
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale0(d) + ')'
- })
- .select('text')
- .attr('dy', '.32em')
- .attr('y', 0)
- .attr('x', -axis.tickPadding())
- .attr('text-anchor', 'end')
- .text(function(d,i) {
- //var v = fmt(d);
- var v = d;
- if(logScale) {
- v = Math.pow(10,v);
- v = fmt(v);
- //fmt = d3.format(',.2f');
- //v = fmt(v);
- } else
- v = fmt(v);
- return ('' + v).match('NaN') ? '' : v;
- });
- axisMaxMin.transition()
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale.range()[i] + ')'
- })
- .select('text')
- .style('opacity', 1);
- }
- break;
- }
- axisLabel
- .text(function(d) { return d });
-
-
- if (showMaxMin && (axis.orient() === 'left' || axis.orient() === 'right')) {
- //check if max and min overlap other values, if so, hide the values that overlap
- g.selectAll('g') // the g's wrapping each tick
- .each(function(d,i) {
- d3.select(this).select('text').attr('opacity', 1);
- var v;
- if(logScale) {
- v = Math.pow(10,d);
- v = fmt(v);
- //fmt = d3.format(',.2f');
- //v = fmt(v);
- } else {
- v = fmt(d);
- }
-
- //d3.select(this).select('text').text(fmt(Math.pow(10,d)));
- d3.select(this).select('text').text(v);
- if (scale(d) < scale.range()[1] + 10 || scale(d) > scale.range()[0] - 10) { // 10 is assuming text height is 16... if d is 0, leave it!
- if (d > 1e-10 || d < -1e-10) // accounts for minor floating point errors... though could be problematic if the scale is EXTREMELY SMALL
- d3.select(this).attr('opacity', 0);
-
- d3.select(this).select('text').attr('opacity', 0); // Don't remove the ZERO line!!
- }
- });
-
- //if Max and Min = 0 only show min, Issue #281
- if (scale.domain()[0] == scale.domain()[1] && scale.domain()[0] == 0)
- wrap.selectAll('g.nv-axisMaxMin')
- .style('opacity', function(d,i) { return !i ? 1 : 0 });
-
- }
-
- if (showMaxMin && (axis.orient() === 'top' || axis.orient() === 'bottom')) {
- var maxMinRange = [];
- wrap.selectAll('g.nv-axisMaxMin')
- .each(function(d,i) {
- try {
- if (i) // i== 1, max position
- maxMinRange.push(scale(d) - this.getBBox().width - 4) //assuming the max and min labels are as wide as the next tick (with an extra 4 pixels just in case)
- else // i==0, min position
- maxMinRange.push(scale(d) + this.getBBox().width + 4)
- }catch (err) {
- if (i) // i== 1, max position
- maxMinRange.push(scale(d) - 4) //assuming the max and min labels are as wide as the next tick (with an extra 4 pixels just in case)
- else // i==0, min position
- maxMinRange.push(scale(d) + 4)
- }
- });
- g.selectAll('g') // the g's wrapping each tick
- .each(function(d,i) {
- var v;
- if(logScale) {
- v = Math.pow(10,d);
- //v = fmt(v);
- //fmt = d3.format(',.2f');
- v = fmt(v);
- } else {
- v = fmt(d);
- }
- //alert(v);
-
- //d3.select(this).select('text').text(fmt(Math.pow(10,d)));
- d3.select(this).select('text').text(v);
-
- if (scale(d) < maxMinRange[0] || scale(d) > maxMinRange[1]) {
- if (d > 1e-10 || d < -1e-10) // accounts for minor floating point errors... though could be problematic if the scale is EXTREMELY SMALL
- d3.select(this).remove();
- else
- d3.select(this).select('text').remove(); // Don't remove the ZERO line!!
- }
- });
- }
-
-
- //highlight zero line ... Maybe should not be an option and should just be in CSS?
- if (highlightZero)
- g.selectAll('.tick')
- .filter(function(d) { return !parseFloat(Math.round(d.__data__*100000)/1000000) && (d.__data__ !== undefined) }) //this is because sometimes the 0 tick is a very small fraction, TODO: think of cleaner technique
- .classed('zero', true);
-
- //store old scales for use in transitions on update
- scale0 = scale.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.axis = axis;
-
- d3.rebind(chart, axis, 'orient', 'tickValues', 'tickSubdivide', 'tickSize', 'tickPadding', 'tickFormat');
- d3.rebind(chart, scale, 'domain', 'range', 'rangeBand', 'rangeBands'); //these are also accessible by chart.scale(), but added common ones directly for ease of use
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if(!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- }
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.ticks = function(_) {
- if (!arguments.length) return ticks;
- ticks = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.axisLabel = function(_) {
- if (!arguments.length) return axisLabelText;
- axisLabelText = _;
- return chart;
- }
-
- chart.showMaxMin = function(_) {
- if (!arguments.length) return showMaxMin;
- showMaxMin = _;
- return chart;
- }
-
- chart.logScale = function(_) {
- if (!arguments.length) return logScale;
- logScale = _;
- return chart;
- }
-
- chart.highlightZero = function(_) {
- if (!arguments.length) return highlightZero;
- highlightZero = _;
- return chart;
- }
-
- chart.scale = function(_) {
- if (!arguments.length) return scale;
- scale = _;
- axis.scale(scale);
- isOrdinal = typeof scale.rangeBands === 'function';
- d3.rebind(chart, scale, 'domain', 'range', 'rangeBand', 'rangeBands');
- return chart;
- }
-
- chart.rotateYLabel = function(_) {
- if(!arguments.length) return rotateYLabel;
- rotateYLabel = _;
- return chart;
- }
-
- chart.rotateLabels = function(_) {
- if(!arguments.length) return rotateLabels;
- rotateLabels = _;
- return chart;
- }
-
- chart.staggerLabels = function(_) {
- if (!arguments.length) return staggerLabels;
- staggerLabels = _;
- return chart;
- };
-
- chart.axisLabelDistance = function(_) {
- if (!arguments.length) return axisLabelDistance;
- axisLabelDistance = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/axis.min.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/axis.min.js
deleted file mode 100644
index 6c8ad6ab..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/axis.min.js
+++ /dev/null
@@ -1 +0,0 @@
-nv.models.axis=function(){"use strict";function m(r){r.each(function(r){var m=d3.select(this);var g=m.selectAll("g.nv-wrap.nv-axis").data([r]);var y=g.enter().append("g").attr("class","nvd3 nv-wrap nv-axis");var b=y.append("g");var w=g.select("g");if(h!==null)e.ticks(h);else if(e.orient()=="top"||e.orient()=="bottom")e.ticks(Math.abs(i.range()[1]-i.range()[0])/100);w.transition().call(e);v=v||e.scale();var E=e.tickFormat();if(E==null){E=v.tickFormat()}var S=w.selectAll("text.nv-axislabel").data([s||null]);S.exit().remove();switch(e.orient()){case"top":S.enter().append("text").attr("class","nv-axislabel");var x=i.range().length==2?i.range()[1]:i.range()[i.range().length-1]+(i.range()[1]-i.range()[0]);S.attr("text-anchor","middle").attr("y",0).attr("x",x/2);if(o){var T=g.selectAll("g.nv-axisMaxMin").data(i.domain());T.enter().append("g").attr("class","nv-axisMaxMin").append("text");T.exit().remove();T.attr("transform",function(e,t){return"translate("+i(e)+",0)"}).select("text").attr("dy","0em").attr("y",-e.tickPadding()).attr("text-anchor","middle").text(function(e,t){var n=e;if(p){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate("+i.range()[t]+",0)"})}break;case"bottom":var N=36;var C=30;var k=w.selectAll("g").select("text");if(a%360){k.each(function(e,t){var n=this.getBBox().width;if(n>C)C=n});var L=Math.abs(Math.sin(a*Math.PI/180));var N=(L?L*C:C)+30;k.attr("transform",function(e,t,n){return"rotate("+a+" 0,0)"}).style("text-anchor",a%360>0?"start":"end")}S.enter().append("text").attr("class","nv-axislabel");var x=i.range().length==2?i.range()[1]:i.range()[i.range().length-1]+(i.range()[1]-i.range()[0]);S.attr("text-anchor","middle").attr("y",N).attr("x",x/2);if(o){var T=g.selectAll("g.nv-axisMaxMin").data([i.domain()[0],i.domain()[i.domain().length-1]]);T.enter().append("g").attr("class","nv-axisMaxMin").append("text");T.exit().remove();T.attr("transform",function(e,t){return"translate("+(i(e)+(c?i.rangeBand()/2:0))+",0)"}).select("text").attr("dy",".71em").attr("y",e.tickPadding()).attr("transform",function(e,t,n){return"rotate("+a+" 0,0)"}).style("text-anchor",a?a%360>0?"start":"end":"middle").text(function(e,t){var n=e;if(p){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate("+(i(e)+(c?i.rangeBand()/2:0))+",0)"})}if(l)k.attr("transform",function(e,t){return"translate(0,"+(t%2==0?"0":"12")+")"});break;case"right":S.enter().append("text").attr("class","nv-axislabel");S.style("text-anchor",f?"middle":"begin").attr("transform",f?"rotate(90)":"").attr("y",f?-Math.max(t.right,n)+12:-10).attr("x",f?i.range()[0]/2:e.tickPadding());if(o){var T=g.selectAll("g.nv-axisMaxMin").data(i.domain());T.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0);T.exit().remove();T.attr("transform",function(e,t){return"translate(0,"+i(e)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",e.tickPadding()).style("text-anchor","start").text(function(e,t){var n=e;if(p){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate(0,"+i.range()[t]+")"}).select("text").style("opacity",1)}break;case"left":S.enter().append("text").attr("class","nv-axislabel");S.style("text-anchor",f?"middle":"end").attr("transform",f?"rotate(-90)":"").attr("y",f?-Math.max(t.left,n)+d:-10).attr("x",f?-i.range()[0]/2:-e.tickPadding());if(o){var T=g.selectAll("g.nv-axisMaxMin").data(i.domain());T.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0);T.exit().remove();T.attr("transform",function(e,t){return"translate(0,"+v(e)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",-e.tickPadding()).attr("text-anchor","end").text(function(e,t){var n=e;if(p){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate(0,"+i.range()[t]+")"}).select("text").style("opacity",1)}break}S.text(function(e){return e});if(o&&(e.orient()==="left"||e.orient()==="right")){w.selectAll("g").each(function(e,t){d3.select(this).select("text").attr("opacity",1);var n;if(p){n=Math.pow(10,e);n=E(n)}else{n=E(e)}d3.select(this).select("text").text(n);if(i(e)<i.range()[1]+10||i(e)>i.range()[0]-10){if(e>1e-10||e<-1e-10)d3.select(this).attr("opacity",0);d3.select(this).select("text").attr("opacity",0)}});if(i.domain()[0]==i.domain()[1]&&i.domain()[0]==0)g.selectAll("g.nv-axisMaxMin").style("opacity",function(e,t){return!t?1:0})}if(o&&(e.orient()==="top"||e.orient()==="bottom")){var A=[];g.selectAll("g.nv-axisMaxMin").each(function(e,t){try{if(t)A.push(i(e)-this.getBBox().width-4);else A.push(i(e)+this.getBBox().width+4)}catch(n){if(t)A.push(i(e)-4);else A.push(i(e)+4)}});w.selectAll("g").each(function(e,t){var n;if(p){n=Math.pow(10,e);n=E(n)}else{n=E(e)}d3.select(this).select("text").text(n);if(i(e)<A[0]||i(e)>A[1]){if(e>1e-10||e<-1e-10)d3.select(this).remove();else d3.select(this).select("text").remove()}})}if(u)w.selectAll(".tick").filter(function(e){return!parseFloat(Math.round(e.__data__*1e5)/1e6)&&e.__data__!==undefined}).classed("zero",true);v=i.copy()});return m}var e=d3.svg.axis();var t={top:0,right:0,bottom:0,left:0},n=75,r=60,i=d3.scale.linear(),s=null,o=true,u=true,a=0,f=true,l=false,c=false,h=null,p=false,d=12;e.scale(i).orient("bottom").tickFormat(function(e){return e});var v;m.axis=e;d3.rebind(m,e,"orient","tickValues","tickSubdivide","tickSize","tickPadding","tickFormat");d3.rebind(m,i,"domain","range","rangeBand","rangeBands");m.options=nv.utils.optionsFunc.bind(m);m.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return m};m.width=function(e){if(!arguments.length)return n;n=e;return m};m.ticks=function(e){if(!arguments.length)return h;h=e;return m};m.height=function(e){if(!arguments.length)return r;r=e;return m};m.axisLabel=function(e){if(!arguments.length)return s;s=e;return m};m.showMaxMin=function(e){if(!arguments.length)return o;o=e;return m};m.logScale=function(e){if(!arguments.length)return p;p=e;return m};m.highlightZero=function(e){if(!arguments.length)return u;u=e;return m};m.scale=function(t){if(!arguments.length)return i;i=t;e.scale(i);c=typeof i.rangeBands==="function";d3.rebind(m,i,"domain","range","rangeBand","rangeBands");return m};m.rotateYLabel=function(e){if(!arguments.length)return f;f=e;return m};m.rotateLabels=function(e){if(!arguments.length)return a;a=e;return m};m.staggerLabels=function(e){if(!arguments.length)return l;l=e;return m};m.axisLabelDistance=function(e){if(!arguments.length)return d;d=e;return m};return m} \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/backup/bullet.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/backup/bullet.js
deleted file mode 100644
index 86ebeb0f..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/backup/bullet.js
+++ /dev/null
@@ -1,250 +0,0 @@
-
-// Chart design based on the recommendations of Stephen Few. Implementation
-// based on the work of Clint Ivy, Jamie Love, and Jason Davies.
-// http://projects.instantcognition.com/protovis/bulletchart/
-
-nv.models.bullet = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , orient = 'left' // TODO top & bottom
- , reverse = false
- , ranges = function(d) { return d.ranges }
- , markers = function(d) { return d.markers }
- , measures = function(d) { return d.measures }
- , forceX = [0] // List of numbers to Force into the X scale (ie. 0, or a max / min, etc.)
- , width = 380
- , height = 30
- , tickFormat = null
- , dispatch = d3.dispatch('elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(d, i) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this),
- mainGroup = nv.log(this.parentNode.parentNode).getAttribute('transform'),
- heightFromTop = nv.log(parseInt(mainGroup.replace(/.*,(\d+)\)/,"$1"))); //TODO: There should be a smarter way to get this value
-
- var rangez = ranges.call(this, d, i).slice().sort(d3.descending),
- markerz = markers.call(this, d, i).slice().sort(d3.descending),
- measurez = measures.call(this, d, i).slice().sort(d3.descending);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- // Compute the new x-scale.
- var MaxX = Math.max(rangez[0] ? rangez[0]:0 , markerz[0] ? markerz[0] : 0 , measurez[0] ? measurez[0] : 0)
- var x1 = d3.scale.linear()
- .domain([0, MaxX]).nice() // TODO: need to allow forceX and forceY, and xDomain, yDomain
- .range(reverse ? [availableWidth, 0] : [0, availableWidth]);
-
- // Retrieve the old x-scale, if this is an update.
- var x0 = this.__chart__ || d3.scale.linear()
- .domain([0, Infinity])
- .range(x1.range());
-
- // Stash the new scale.
- this.__chart__ = x1;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-bullet').data([d]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-bullet');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- var w0 = function(d) { return Math.abs(x0(d) - x0(0)) }, // TODO: could optimize by precalculating x0(0) and x1(0)
- w1 = function(d) { return Math.abs(x1(d) - x1(0)) };
-
-
- // Update the range rects.
- var range = g.selectAll('rect.nv-range')
- .data(rangez);
-
- range.enter().append('rect')
- .attr('class', function(d, i) { return 'nv-range nv-s' + i; })
- .attr('width', w0)
- .attr('height', availableHeight)
- .attr('x', reverse ? x0 : 0)
- .on('mouseover', function(d,i) {
- dispatch.elementMouseover({
- value: d,
- label: (i <= 0) ? 'Maximum' : (i > 1) ? 'Minimum' : 'Mean', //TODO: make these labels a variable
- pos: [x1(d), heightFromTop]
- })
- })
- .on('mouseout', function(d,i) {
- dispatch.elementMouseout({
- value: d,
- label: (i <= 0) ? 'Minimum' : (i >=1) ? 'Maximum' : 'Mean' //TODO: make these labels a variable
- })
- })
-
- d3.transition(range)
- .attr('x', reverse ? x1 : 0)
- .attr('width', w1)
- .attr('height', availableHeight);
-
-
- // Update the measure rects.
- var measure = g.selectAll('rect.nv-measure')
- .data(measurez);
-
- measure.enter().append('rect')
- .attr('class', function(d, i) { return 'nv-measure nv-s' + i; })
- .attr('width', w0)
- .attr('height', availableHeight / 3)
- .attr('x', reverse ? x0 : 0)
- .attr('y', availableHeight / 3)
- .on('mouseover', function(d) {
- dispatch.elementMouseover({
- value: d,
- label: 'Current', //TODO: make these labels a variable
- pos: [x1(d), heightFromTop]
- })
- })
- .on('mouseout', function(d) {
- dispatch.elementMouseout({
- value: d,
- label: 'Current' //TODO: make these labels a variable
- })
- })
-
- d3.transition(measure)
- .attr('width', w1)
- .attr('height', availableHeight / 3)
- .attr('x', reverse ? x1 : 0)
- .attr('y', availableHeight / 3);
-
-
-
- // Update the marker lines.
- var marker = g.selectAll('path.nv-markerTriangle')
- .data(markerz);
-
- var h3 = availableHeight / 6;
- marker.enter().append('path')
- .attr('class', 'nv-markerTriangle')
- .attr('transform', function(d) { return 'translate(' + x0(d) + ',' + (availableHeight / 2) + ')' })
- .attr('d', 'M0,' + h3 + 'L' + h3 + ',' + (-h3) + ' ' + (-h3) + ',' + (-h3) + 'Z')
- .on('mouseover', function(d,i) {
- dispatch.elementMouseover({
- value: d,
- label: 'Previous',
- pos: [x1(d), heightFromTop]
- })
- })
- .on('mouseout', function(d,i) {
- dispatch.elementMouseout({
- value: d,
- label: 'Previous'
- })
- });
-
- d3.transition(marker)
- .attr('transform', function(d) { return 'translate(' + x1(d) + ',' + (availableHeight / 2) + ')' });
-
- marker.exit().remove();
-
- });
-
- d3.timer.flush();
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- // left, right, top, bottom
- chart.orient = function(_) {
- if (!arguments.length) return orient;
- orient = _;
- reverse = orient == 'right' || orient == 'bottom';
- return chart;
- };
-
- // ranges (bad, satisfactory, good)
- chart.ranges = function(_) {
- if (!arguments.length) return ranges;
- ranges = _;
- return chart;
- };
-
- // markers (previous, goal)
- chart.markers = function(_) {
- if (!arguments.length) return markers;
- markers = _;
- return chart;
- };
-
- // measures (actual, forecast)
- chart.measures = function(_) {
- if (!arguments.length) return measures;
- measures = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.tickFormat = function(_) {
- if (!arguments.length) return tickFormat;
- tickFormat = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-};
-
-
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/backup/bulletChart.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/backup/bulletChart.js
deleted file mode 100644
index a2a0f077..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/backup/bulletChart.js
+++ /dev/null
@@ -1,349 +0,0 @@
-
-// Chart design based on the recommendations of Stephen Few. Implementation
-// based on the work of Clint Ivy, Jamie Love, and Jason Davies.
-// http://projects.instantcognition.com/protovis/bulletchart/
-nv.models.bulletChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var bullet = nv.models.bullet()
- ;
-
- var orient = 'left' // TODO top & bottom
- , reverse = false
- , margin = {top: 5, right: 40, bottom: 20, left: 120}
- , ranges = function(d) { return d.ranges }
- , markers = function(d) { return d.markers }
- , measures = function(d) { return d.measures }
- , width = null
- , height = 55
- , tickFormat = null
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + e.label + '</h3>' +
- '<p>' + e.value + '</p>'
- }
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, parentElement) {
- var offsetElement = parentElement.parentNode.parentNode,
- left = e.pos[0] + offsetElement.offsetLeft + margin.left,
- top = e.pos[1] + offsetElement.offsetTop + margin.top;
-
- var content = '<h3>' + e.label + '</h3>' +
- '<p>' + e.value + '</p>';
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'e' : 'w', null, offsetElement.parentNode);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(d, i) {
- var container = d3.select(this);
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- that = this;
-
-
- chart.update = function() { chart(selection) };
- chart.container = this;
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- /*
- // Disabled until I figure out a better way to check for no data with the bullet chart
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
- */
-
- //------------------------------------------------------------
-
-
-
- var rangez = ranges.call(this, d, i).slice().sort(d3.descending),
- markerz = markers.call(this, d, i).slice().sort(d3.descending),
- measurez = measures.call(this, d, i).slice().sort(d3.descending);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-bulletChart').data([d]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-bulletChart');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-bulletWrap');
- gEnter.append('g').attr('class', 'nv-titles');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + ( margin.top + i*height )+ ')');
-
- //------------------------------------------------------------
-
-
- // Compute the new x-scale.
- var MaxX = Math.max(rangez[0] ? rangez[0]:0 , markerz[0] ? markerz[0] : 0 , measurez[0] ? measurez[0] : 0)
- var x1 = d3.scale.linear()
- .domain([0, MaxX]).nice() // TODO: need to allow forceX and forceY, and xDomain, yDomain
- .range(reverse ? [availableWidth, 0] : [0, availableWidth]);
-
- // Retrieve the old x-scale, if this is an update.
- var x0 = this.__chart__ || d3.scale.linear()
- .domain([0, Infinity])
- .range(x1.range());
-
- // Stash the new scale.
- this.__chart__ = x1;
-
- /*
- // Derive width-scales from the x-scales.
- var w0 = bulletWidth(x0),
- w1 = bulletWidth(x1);
-
- function bulletWidth(x) {
- var x0 = x(0);
- return function(d) {
- return Math.abs(x(d) - x(0));
- };
- }
-
- function bulletTranslate(x) {
- return function(d) {
- return 'translate(' + x(d) + ',0)';
- };
- }
- */
-
- var w0 = function(d) { return Math.abs(x0(d) - x0(0)) }, // TODO: could optimize by precalculating x0(0) and x1(0)
- w1 = function(d) { return Math.abs(x1(d) - x1(0)) };
-
-
- var title = gEnter.select('.nv-titles').append("g")
- .attr("text-anchor", "end")
- .attr("transform", "translate(-6," + (height - margin.top - margin.bottom) / 2 + ")");
- title.append("text")
- .attr("class", "nv-title")
- .text(function(d) { return d.title; });
-
- title.append("text")
- .attr("class", "nv-subtitle")
- .attr("dy", "1em")
- .text(function(d) { return d.subtitle; });
-
-
-
- bullet
- .width(availableWidth)
- .height(availableHeight)
-
- var bulletWrap = g.select('.nv-bulletWrap');
-
- d3.transition(bulletWrap).call(bullet);
-
-
-
- // Compute the tick format.
- var format = tickFormat || x1.tickFormat(8);
-
- // Update the tick groups.
- var tick = g.selectAll('g.nv-tick')
- .data(x1.ticks(8), function(d) {
- return this.textContent || format(d);
- });
-
- // Initialize the ticks with the old scale, x0.
- var tickEnter = tick.enter().append('g')
- .attr('class', 'nv-tick')
- .attr('transform', function(d) { return 'translate(' + x0(d) + ',0)' })
- .style('opacity', 1e-6);
-
- tickEnter.append('line')
- .attr('y1', availableHeight)
- .attr('y2', availableHeight * 7 / 6);
-
- tickEnter.append('text')
- .attr('text-anchor', 'middle')
- .attr('dy', '1em')
- .attr('y', availableHeight * 7 / 6)
- .text(format);
-
- // Transition the entering ticks to the new scale, x1.
- d3.transition(tickEnter)
- .attr('transform', function(d) { return 'translate(' + x1(d) + ',0)' })
- .style('opacity', 1);
-
- // Transition the updating ticks to the new scale, x1.
- var tickUpdate = d3.transition(tick)
- .attr('transform', function(d) { return 'translate(' + x1(d) + ',0)' })
- .style('opacity', 1);
-
- tickUpdate.select('line')
- .attr('y1', availableHeight)
- .attr('y2', availableHeight * 7 / 6);
-
- tickUpdate.select('text')
- .attr('y', availableHeight * 7 / 6);
-
- // Transition the exiting ticks to the new scale, x1.
- d3.transition(tick.exit())
- .attr('transform', function(d) { return 'translate(' + x1(d) + ',0)' })
- .style('opacity', 1e-6)
- .remove();
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
- });
-
- d3.timer.flush();
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- bullet.dispatch.on('elementMouseover.tooltip', function(e) {
- dispatch.tooltipShow(e);
- });
-
- bullet.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.bullet = bullet;
-
- // left, right, top, bottom
- chart.orient = function(x) {
- if (!arguments.length) return orient;
- orient = x;
- reverse = orient == 'right' || orient == 'bottom';
- return chart;
- };
-
- // ranges (bad, satisfactory, good)
- chart.ranges = function(x) {
- if (!arguments.length) return ranges;
- ranges = x;
- return chart;
- };
-
- // markers (previous, goal)
- chart.markers = function(x) {
- if (!arguments.length) return markers;
- markers = x;
- return chart;
- };
-
- // measures (actual, forecast)
- chart.measures = function(x) {
- if (!arguments.length) return measures;
- measures = x;
- return chart;
- };
-
- chart.width = function(x) {
- if (!arguments.length) return width;
- width = x;
- return chart;
- };
-
- chart.height = function(x) {
- if (!arguments.length) return height;
- height = x;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.tickFormat = function(x) {
- if (!arguments.length) return tickFormat;
- tickFormat = x;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-};
-
-
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/boilerplate.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/boilerplate.js
deleted file mode 100644
index 3d2360a6..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/boilerplate.js
+++ /dev/null
@@ -1,104 +0,0 @@
-
-nv.models.chartName = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
-
- var margin = {top: 30, right: 10, bottom: 10, left: 10}
- , width = 960
- , height = 500
- , color = nv.utils.getColor(d3.scale.category20c().range())
- , dispatch = d3.dispatch('stateChange', 'changeState')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-chartName').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-chartName');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- gEnter.append('g').attr('class', 'nv-mainWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_)
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/bullet.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/bullet.js
deleted file mode 100644
index 9b9bf4d1..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/bullet.js
+++ /dev/null
@@ -1,385 +0,0 @@
-
-// Chart design based on the recommendations of Stephen Few. Implementation
-// based on the work of Clint Ivy, Jamie Love, and Jason Davies.
-// http://projects.instantcognition.com/protovis/bulletchart/
-
-nv.models.bullet = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , orient = 'left' // TODO top & bottom
- , reverse = false
- , ranges = function(d) { return d.ranges }
- , markers = function(d) { return d.markers }
- , measures = function(d) { return d.measures }
- , rangeLabels = function(d) { return d.rangeLabels ? d.rangeLabels : [] }
- , markerLabels = function(d) { return d.markerLabels ? d.markerLabels : [] }
- , measureLabels = function(d) { return d.measureLabels ? d.measureLabels : [] }
- , forceX = [0] // List of numbers to Force into the X scale (ie. 0, or a max / min, etc.)
- , width = 380
- , height = 30
- , tickFormat = null
- , color = nv.utils.getColor(['#1f77b4'])
- , dispatch = d3.dispatch('elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(d, i) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- var rangez = ranges.call(this, d, i).slice().sort(d3.descending),
- markerz = markers.call(this, d, i).slice().sort(d3.descending),
- measurez = measures.call(this, d, i).slice().sort(d3.descending),
- rangeLabelz = rangeLabels.call(this, d, i).slice(),
- markerLabelz = markerLabels.call(this, d, i).slice(),
- measureLabelz = measureLabels.call(this, d, i).slice();
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- // Compute the new x-scale.
- var x1 = d3.scale.linear()
- .domain( d3.extent(d3.merge([forceX, rangez])) )
- .range(reverse ? [availableWidth, 0] : [0, availableWidth]);
-
- // Retrieve the old x-scale, if this is an update.
- var x0 = this.__chart__ || d3.scale.linear()
- .domain([0, Infinity])
- .range(x1.range());
-
- // Stash the new scale.
- this.__chart__ = x1;
-
-
- var rangeMin = d3.min(rangez), //rangez[2]
- rangeMax = d3.max(rangez), //rangez[0]
- rangeAvg = rangez[1];
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-bullet').data([d]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-bullet');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('rect').attr('class', 'nv-range nv-rangeMax');
- gEnter.append('rect').attr('class', 'nv-range nv-rangeAvg');
- gEnter.append('rect').attr('class', 'nv-range nv-rangeMin');
- gEnter.append('rect').attr('class', 'nv-measure');
- gEnter.append('path').attr('class', 'nv-markerTriangle');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- var w0 = function(d) { return Math.abs(x0(d) - x0(0)) }, // TODO: could optimize by precalculating x0(0) and x1(0)
- w1 = function(d) { return Math.abs(x1(d) - x1(0)) };
- var xp0 = function(d) { return d < 0 ? x0(d) : x0(0) },
- xp1 = function(d) { return d < 0 ? x1(d) : x1(0) };
-
-
- g.select('rect.nv-rangeMax')
- .attr('height', availableHeight)
- .attr('width', w1(rangeMax > 0 ? rangeMax : rangeMin))
- .attr('x', xp1(rangeMax > 0 ? rangeMax : rangeMin))
- .datum(rangeMax > 0 ? rangeMax : rangeMin)
- /*
- .attr('x', rangeMin < 0 ?
- rangeMax > 0 ?
- x1(rangeMin)
- : x1(rangeMax)
- : x1(0))
- */
-
- g.select('rect.nv-rangeAvg')
- .attr('height', availableHeight)
- .attr('width', w1(rangeAvg))
- .attr('x', xp1(rangeAvg))
- .datum(rangeAvg)
- /*
- .attr('width', rangeMax <= 0 ?
- x1(rangeMax) - x1(rangeAvg)
- : x1(rangeAvg) - x1(rangeMin))
- .attr('x', rangeMax <= 0 ?
- x1(rangeAvg)
- : x1(rangeMin))
- */
-
- g.select('rect.nv-rangeMin')
- .attr('height', availableHeight)
- .attr('width', w1(rangeMax))
- .attr('x', xp1(rangeMax))
- .attr('width', w1(rangeMax > 0 ? rangeMin : rangeMax))
- .attr('x', xp1(rangeMax > 0 ? rangeMin : rangeMax))
- .datum(rangeMax > 0 ? rangeMin : rangeMax)
- /*
- .attr('width', rangeMax <= 0 ?
- x1(rangeAvg) - x1(rangeMin)
- : x1(rangeMax) - x1(rangeAvg))
- .attr('x', rangeMax <= 0 ?
- x1(rangeMin)
- : x1(rangeAvg))
- */
-
- g.select('rect.nv-measure')
- .style('fill', color)
- .attr('height', availableHeight / 3)
- .attr('y', availableHeight / 3)
- .attr('width', measurez < 0 ?
- x1(0) - x1(measurez[0])
- : x1(measurez[0]) - x1(0))
- .attr('x', xp1(measurez))
- .on('mouseover', function() {
- dispatch.elementMouseover({
- value: measurez[0],
- label: measureLabelz[0] || 'Current',
- pos: [x1(measurez[0]), availableHeight/2]
- })
- })
- .on('mouseout', function() {
- dispatch.elementMouseout({
- value: measurez[0],
- label: measureLabelz[0] || 'Current'
- })
- })
-
- var h3 = availableHeight / 6;
- if (markerz[0]) {
- g.selectAll('path.nv-markerTriangle')
- .attr('transform', function(d) { return 'translate(' + x1(markerz[0]) + ',' + (availableHeight / 2) + ')' })
- .attr('d', 'M0,' + h3 + 'L' + h3 + ',' + (-h3) + ' ' + (-h3) + ',' + (-h3) + 'Z')
- .on('mouseover', function() {
- dispatch.elementMouseover({
- value: markerz[0],
- label: markerLabelz[0] || 'Previous',
- pos: [x1(markerz[0]), availableHeight/2]
- })
- })
- .on('mouseout', function() {
- dispatch.elementMouseout({
- value: markerz[0],
- label: markerLabelz[0] || 'Previous'
- })
- });
- } else {
- g.selectAll('path.nv-markerTriangle').remove();
- }
-
-
- wrap.selectAll('.nv-range')
- .on('mouseover', function(d,i) {
- var label = rangeLabelz[i] || (!i ? "Maximum" : i == 1 ? "Mean" : "Minimum");
-
- dispatch.elementMouseover({
- value: d,
- label: label,
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d,i) {
- var label = rangeLabelz[i] || (!i ? "Maximum" : i == 1 ? "Mean" : "Minimum");
-
- dispatch.elementMouseout({
- value: d,
- label: label
- })
- })
-
-/* // THIS IS THE PREVIOUS BULLET IMPLEMENTATION, WILL REMOVE SHORTLY
- // Update the range rects.
- var range = g.selectAll('rect.nv-range')
- .data(rangez);
-
- range.enter().append('rect')
- .attr('class', function(d, i) { return 'nv-range nv-s' + i; })
- .attr('width', w0)
- .attr('height', availableHeight)
- .attr('x', reverse ? x0 : 0)
- .on('mouseover', function(d,i) {
- dispatch.elementMouseover({
- value: d,
- label: (i <= 0) ? 'Maximum' : (i > 1) ? 'Minimum' : 'Mean', //TODO: make these labels a variable
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d,i) {
- dispatch.elementMouseout({
- value: d,
- label: (i <= 0) ? 'Minimum' : (i >=1) ? 'Maximum' : 'Mean' //TODO: make these labels a variable
- })
- })
-
- d3.transition(range)
- .attr('x', reverse ? x1 : 0)
- .attr('width', w1)
- .attr('height', availableHeight);
-
-
- // Update the measure rects.
- var measure = g.selectAll('rect.nv-measure')
- .data(measurez);
-
- measure.enter().append('rect')
- .attr('class', function(d, i) { return 'nv-measure nv-s' + i; })
- .style('fill', function(d,i) { return color(d,i ) })
- .attr('width', w0)
- .attr('height', availableHeight / 3)
- .attr('x', reverse ? x0 : 0)
- .attr('y', availableHeight / 3)
- .on('mouseover', function(d) {
- dispatch.elementMouseover({
- value: d,
- label: 'Current', //TODO: make these labels a variable
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d) {
- dispatch.elementMouseout({
- value: d,
- label: 'Current' //TODO: make these labels a variable
- })
- })
-
- d3.transition(measure)
- .attr('width', w1)
- .attr('height', availableHeight / 3)
- .attr('x', reverse ? x1 : 0)
- .attr('y', availableHeight / 3);
-
-
-
- // Update the marker lines.
- var marker = g.selectAll('path.nv-markerTriangle')
- .data(markerz);
-
- var h3 = availableHeight / 6;
- marker.enter().append('path')
- .attr('class', 'nv-markerTriangle')
- .attr('transform', function(d) { return 'translate(' + x0(d) + ',' + (availableHeight / 2) + ')' })
- .attr('d', 'M0,' + h3 + 'L' + h3 + ',' + (-h3) + ' ' + (-h3) + ',' + (-h3) + 'Z')
- .on('mouseover', function(d,i) {
- dispatch.elementMouseover({
- value: d,
- label: 'Previous',
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d,i) {
- dispatch.elementMouseout({
- value: d,
- label: 'Previous'
- })
- });
-
- d3.transition(marker)
- .attr('transform', function(d) { return 'translate(' + (x1(d) - x1(0)) + ',' + (availableHeight / 2) + ')' });
-
- marker.exit().remove();
-*/
-
- });
-
- // d3.timer.flush(); // Not needed?
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- // left, right, top, bottom
- chart.orient = function(_) {
- if (!arguments.length) return orient;
- orient = _;
- reverse = orient == 'right' || orient == 'bottom';
- return chart;
- };
-
- // ranges (bad, satisfactory, good)
- chart.ranges = function(_) {
- if (!arguments.length) return ranges;
- ranges = _;
- return chart;
- };
-
- // markers (previous, goal)
- chart.markers = function(_) {
- if (!arguments.length) return markers;
- markers = _;
- return chart;
- };
-
- // measures (actual, forecast)
- chart.measures = function(_) {
- if (!arguments.length) return measures;
- measures = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.tickFormat = function(_) {
- if (!arguments.length) return tickFormat;
- tickFormat = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-};
-
-
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/bulletChart.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/bulletChart.js
deleted file mode 100644
index fa5bd596..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/bulletChart.js
+++ /dev/null
@@ -1,343 +0,0 @@
-
-// Chart design based on the recommendations of Stephen Few. Implementation
-// based on the work of Clint Ivy, Jamie Love, and Jason Davies.
-// http://projects.instantcognition.com/protovis/bulletchart/
-nv.models.bulletChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var bullet = nv.models.bullet()
- ;
-
- var orient = 'left' // TODO top & bottom
- , reverse = false
- , margin = {top: 5, right: 40, bottom: 20, left: 120}
- , ranges = function(d) { return d.ranges }
- , markers = function(d) { return d.markers }
- , measures = function(d) { return d.measures }
- , width = null
- , height = 55
- , tickFormat = null
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + x + '</h3>' +
- '<p>' + y + '</p>'
- }
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ) + margin.left,
- top = e.pos[1] + ( offsetElement.offsetTop || 0) + margin.top,
- content = tooltip(e.key, e.label, e.value, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'e' : 'w', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(d, i) {
- var container = d3.select(this);
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- that = this;
-
-
- chart.update = function() { chart(selection) };
- chart.container = this;
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!d || !ranges.call(this, d, i)) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', 18 + margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
-
- var rangez = ranges.call(this, d, i).slice().sort(d3.descending),
- markerz = markers.call(this, d, i).slice().sort(d3.descending),
- measurez = measures.call(this, d, i).slice().sort(d3.descending);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-bulletChart').data([d]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-bulletChart');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-bulletWrap');
- gEnter.append('g').attr('class', 'nv-titles');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- // Compute the new x-scale.
- var x1 = d3.scale.linear()
- .domain([0, Math.max(rangez[0], markerz[0], measurez[0])]) // TODO: need to allow forceX and forceY, and xDomain, yDomain
- .range(reverse ? [availableWidth, 0] : [0, availableWidth]);
-
- // Retrieve the old x-scale, if this is an update.
- var x0 = this.__chart__ || d3.scale.linear()
- .domain([0, Infinity])
- .range(x1.range());
-
- // Stash the new scale.
- this.__chart__ = x1;
-
- /*
- // Derive width-scales from the x-scales.
- var w0 = bulletWidth(x0),
- w1 = bulletWidth(x1);
-
- function bulletWidth(x) {
- var x0 = x(0);
- return function(d) {
- return Math.abs(x(d) - x(0));
- };
- }
-
- function bulletTranslate(x) {
- return function(d) {
- return 'translate(' + x(d) + ',0)';
- };
- }
- */
-
- var w0 = function(d) { return Math.abs(x0(d) - x0(0)) }, // TODO: could optimize by precalculating x0(0) and x1(0)
- w1 = function(d) { return Math.abs(x1(d) - x1(0)) };
-
-
- var title = gEnter.select('.nv-titles').append('g')
- .attr('text-anchor', 'end')
- .attr('transform', 'translate(-6,' + (height - margin.top - margin.bottom) / 2 + ')');
- title.append('text')
- .attr('class', 'nv-title')
- .text(function(d) { return d.title; });
-
- title.append('text')
- .attr('class', 'nv-subtitle')
- .attr('dy', '1em')
- .text(function(d) { return d.subtitle; });
-
-
-
- bullet
- .width(availableWidth)
- .height(availableHeight)
-
- var bulletWrap = g.select('.nv-bulletWrap');
-
- d3.transition(bulletWrap).call(bullet);
-
-
-
- // Compute the tick format.
- var format = tickFormat || x1.tickFormat( availableWidth / 100 );
-
- // Update the tick groups.
- var tick = g.selectAll('g.nv-tick')
- .data(x1.ticks( availableWidth / 50 ), function(d) {
- return this.textContent || format(d);
- });
-
- // Initialize the ticks with the old scale, x0.
- var tickEnter = tick.enter().append('g')
- .attr('class', 'nv-tick')
- .attr('transform', function(d) { return 'translate(' + x0(d) + ',0)' })
- .style('opacity', 1e-6);
-
- tickEnter.append('line')
- .attr('y1', availableHeight)
- .attr('y2', availableHeight * 7 / 6);
-
- tickEnter.append('text')
- .attr('text-anchor', 'middle')
- .attr('dy', '1em')
- .attr('y', availableHeight * 7 / 6)
- .text(format);
-
-
- // Transition the updating ticks to the new scale, x1.
- var tickUpdate = d3.transition(tick)
- .attr('transform', function(d) { return 'translate(' + x1(d) + ',0)' })
- .style('opacity', 1);
-
- tickUpdate.select('line')
- .attr('y1', availableHeight)
- .attr('y2', availableHeight * 7 / 6);
-
- tickUpdate.select('text')
- .attr('y', availableHeight * 7 / 6);
-
- // Transition the exiting ticks to the new scale, x1.
- d3.transition(tick.exit())
- .attr('transform', function(d) { return 'translate(' + x1(d) + ',0)' })
- .style('opacity', 1e-6)
- .remove();
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- dispatch.on('tooltipShow', function(e) {
- e.key = d.title;
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
- });
-
- d3.timer.flush();
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- bullet.dispatch.on('elementMouseover.tooltip', function(e) {
- dispatch.tooltipShow(e);
- });
-
- bullet.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.bullet = bullet;
-
- d3.rebind(chart, bullet, 'color');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- // left, right, top, bottom
- chart.orient = function(x) {
- if (!arguments.length) return orient;
- orient = x;
- reverse = orient == 'right' || orient == 'bottom';
- return chart;
- };
-
- // ranges (bad, satisfactory, good)
- chart.ranges = function(x) {
- if (!arguments.length) return ranges;
- ranges = x;
- return chart;
- };
-
- // markers (previous, goal)
- chart.markers = function(x) {
- if (!arguments.length) return markers;
- markers = x;
- return chart;
- };
-
- // measures (actual, forecast)
- chart.measures = function(x) {
- if (!arguments.length) return measures;
- measures = x;
- return chart;
- };
-
- chart.width = function(x) {
- if (!arguments.length) return width;
- width = x;
- return chart;
- };
-
- chart.height = function(x) {
- if (!arguments.length) return height;
- height = x;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.tickFormat = function(x) {
- if (!arguments.length) return tickFormat;
- tickFormat = x;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-};
-
-
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/cumulativeLineChart.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/cumulativeLineChart.js
deleted file mode 100644
index 00f193cf..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/cumulativeLineChart.js
+++ /dev/null
@@ -1,782 +0,0 @@
-
-nv.models.cumulativeLineChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- , interactiveLayer = nv.interactiveGuideline()
- ;
-
- var margin = {top: 30, right: 30, bottom: 50, left: 60}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , tooltips = true
- , showControls = true
- , useInteractiveGuideline = false
- , rescaleY = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , id = lines.id()
- , state = { index: 0, rescaleY: rescaleY }
- , defaultState = null
- , noData = 'No Data Available.'
- , average = function(d) { return d.average }
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , transitionDuration = 250
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- ;
-
- //============================================================
- controls.updateState(false);
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var dx = d3.scale.linear()
- , index = {i: 0, x: 0}
- ;
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
-/*
- //Moved to see if we can get better behavior to fix issue #315
- var indexDrag = d3.behavior.drag()
- .on('dragstart', dragStart)
- .on('drag', dragMove)
- .on('dragend', dragEnd);
-
- function dragStart(d,i) {
- d3.select(chart.container)
- .style('cursor', 'ew-resize');
- }
-
- function dragMove(d,i) {
- d.x += d3.event.dx;
- d.i = Math.round(dx.invert(d.x));
-
- d3.select(this).attr('transform', 'translate(' + dx(d.i) + ',0)');
- chart.update();
- }
-
- function dragEnd(d,i) {
- d3.select(chart.container)
- .style('cursor', 'auto');
- chart.update();
- }
-*/
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this).classed('nv-chart-' + id, true),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- var indexDrag = d3.behavior.drag()
- .on('dragstart', dragStart)
- .on('drag', dragMove)
- .on('dragend', dragEnd);
-
-
- function dragStart(d,i) {
- d3.select(chart.container)
- .style('cursor', 'ew-resize');
- }
-
- function dragMove(d,i) {
- index.x = d3.event.x;
- index.i = Math.round(dx.invert(index.x));
- updateZero();
- }
-
- function dragEnd(d,i) {
- d3.select(chart.container)
- .style('cursor', 'auto');
-
- // update state and send stateChange with new index
- state.index = index.i;
- dispatch.stateChange(state);
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = lines.xScale();
- y = lines.yScale();
-
-
- if (!rescaleY) {
- var seriesDomains = data
- .filter(function(series) { return !series.disabled })
- .map(function(series,i) {
- var initialDomain = d3.extent(series.values, lines.y());
-
- //account for series being disabled when losing 95% or more
- if (initialDomain[0] < -.95) initialDomain[0] = -.95;
-
- return [
- (initialDomain[0] - initialDomain[1]) / (1 + initialDomain[1]),
- (initialDomain[1] - initialDomain[0]) / (1 + initialDomain[0])
- ];
- });
-
- var completeDomain = [
- d3.min(seriesDomains, function(d) { return d[0] }),
- d3.max(seriesDomains, function(d) { return d[1] })
- ]
-
- lines.yDomain(completeDomain);
- } else {
- lines.yDomain(null);
- }
-
-
- dx .domain([0, data[0].values.length - 1]) //Assumes all series have same length
- .range([0, availableWidth])
- .clamp(true);
-
- //------------------------------------------------------------
-
-
- var data = indexify(index.i, data);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
- var interactivePointerEvents = (useInteractiveGuideline) ? "none" : "all";
- var wrap = container.selectAll('g.nv-wrap.nv-cumulativeLine').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-cumulativeLine').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-interactive');
- gEnter.append('g').attr('class', 'nv-x nv-axis').style("pointer-events","none");
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-background');
- gEnter.append('g').attr('class', 'nv-linesWrap').style("pointer-events",interactivePointerEvents);
- gEnter.append('g').attr('class', 'nv-avgLinesWrap').style("pointer-events","none");
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Re-scale y-axis', disabled: !rescaleY }
- ];
-
- controls.width(140).color(['#444', '#444', '#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- // Show error if series goes below 100%
- var tempDisabled = data.filter(function(d) { return d.tempDisabled });
-
- wrap.select('.tempDisabled').remove(); //clean-up and prevent duplicates
- if (tempDisabled.length) {
- wrap.append('text').attr('class', 'tempDisabled')
- .attr('x', availableWidth / 2)
- .attr('y', '-.71em')
- .style('text-anchor', 'end')
- .text(tempDisabled.map(function(d) { return d.key }).join(', ') + ' values cannot be calculated for this time period.');
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- //------------------------------------------------------------
- //Set up interactive layer
- if (useInteractiveGuideline) {
- interactiveLayer
- .width(availableWidth)
- .height(availableHeight)
- .margin({left:margin.left,top:margin.top})
- .svgContainer(container)
- .xScale(x);
- wrap.select(".nv-interactive").call(interactiveLayer);
- }
-
- gEnter.select('.nv-background')
- .append('rect');
-
- g.select('.nv-background rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- lines
- //.x(function(d) { return d.x })
- .y(function(d) { return d.display.y })
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].tempDisabled; }));
-
-
-
- var linesWrap = g.select('.nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled && !d.tempDisabled }));
-
- //d3.transition(linesWrap).call(lines);
- linesWrap.call(lines);
-
- /*Handle average lines [AN-612] ----------------------------*/
-
- //Store a series index number in the data array.
- data.forEach(function(d,i) {
- d.seriesIndex = i;
- });
-
- var avgLineData = data.filter(function(d) {
- return !d.disabled && !!average(d);
- });
-
- var avgLines = g.select(".nv-avgLinesWrap").selectAll("line")
- .data(avgLineData, function(d) { return d.key; });
-
- var getAvgLineY = function(d) {
- //If average lines go off the svg element, clamp them to the svg bounds.
- var yVal = y(average(d));
- if (yVal < 0) return 0;
- if (yVal > availableHeight) return availableHeight;
- return yVal;
- };
-
- avgLines.enter()
- .append('line')
- .style('stroke-width',2)
- .style('stroke-dasharray','10,10')
- .style('stroke',function (d,i) {
- return lines.color()(d,d.seriesIndex);
- })
- .attr('x1',0)
- .attr('x2',availableWidth)
- .attr('y1', getAvgLineY)
- .attr('y2', getAvgLineY);
-
- avgLines
- .style('stroke-opacity',function(d){
- //If average lines go offscreen, make them transparent
- var yVal = y(average(d));
- if (yVal < 0 || yVal > availableHeight) return 0;
- return 1;
- })
- .attr('x1',0)
- .attr('x2',availableWidth)
- .attr('y1', getAvgLineY)
- .attr('y2', getAvgLineY);
-
- avgLines.exit().remove();
-
- //Create index line -----------------------------------------
-
- var indexLine = linesWrap.selectAll('.nv-indexLine')
- .data([index]);
- indexLine.enter().append('rect').attr('class', 'nv-indexLine')
- .attr('width', 3)
- .attr('x', -2)
- .attr('fill', 'red')
- .attr('fill-opacity', .5)
- .style("pointer-events","all")
- .call(indexDrag)
-
- indexLine
- .attr('transform', function(d) { return 'translate(' + dx(d.i) + ',0)' })
- .attr('height', availableHeight)
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- //Suggest how many ticks based on the chart width and D3 should listen (70 is the optimal number for MM/DD/YY dates)
- .ticks( Math.min(data[0].values.length,availableWidth/70) )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
- }
-
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
- }
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
-
- function updateZero() {
- indexLine
- .data([index]);
-
- //When dragging the index line, turn off line transitions.
- // Then turn them back on when done dragging.
- var oldDuration = chart.transitionDuration();
- chart.transitionDuration(0);
- chart.update();
- chart.transitionDuration(oldDuration);
- }
-
- g.select('.nv-background rect')
- .on('click', function() {
- index.x = d3.mouse(this)[0];
- index.i = Math.round(dx.invert(index.x));
-
- // update state and send stateChange with new index
- state.index = index.i;
- dispatch.stateChange(state);
-
- updateZero();
- });
-
- lines.dispatch.on('elementClick', function(e) {
- index.i = e.pointIndex;
- index.x = dx(index.i);
-
- // update state and send stateChange with new index
- state.index = index.i;
- dispatch.stateChange(state);
-
- updateZero();
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
- rescaleY = !d.disabled;
-
- state.rescaleY = rescaleY;
- dispatch.stateChange(state);
- chart.update();
- });
-
-
- legend.dispatch.on('stateChange', function(newState) {
- state.disabled = newState.disabled;
- dispatch.stateChange(state);
- chart.update();
- });
-
- interactiveLayer.dispatch.on('elementMousemove', function(e) {
- lines.clearHighlights();
- var singlePoint, pointIndex, pointXLocation, allData = [];
-
-
- data
- .filter(function(series, i) {
- series.seriesIndex = i;
- return !series.disabled;
- })
- .forEach(function(series,i) {
- pointIndex = nv.interactiveBisect(series.values, e.pointXValue, chart.x());
- lines.highlightPoint(i, pointIndex, true);
- var point = series.values[pointIndex];
- if (typeof point === 'undefined') return;
- if (typeof singlePoint === 'undefined') singlePoint = point;
- if (typeof pointXLocation === 'undefined') pointXLocation = chart.xScale()(chart.x()(point,pointIndex));
- allData.push({
- key: series.key,
- value: chart.y()(point, pointIndex),
- color: color(series,series.seriesIndex)
- });
- });
-
- //Highlight the tooltip entry based on which point the mouse is closest to.
- if (allData.length > 2) {
- var yValue = chart.yScale().invert(e.mouseY);
- var domainExtent = Math.abs(chart.yScale().domain()[0] - chart.yScale().domain()[1]);
- var threshold = 0.03 * domainExtent;
- var indexToHighlight = nv.nearestValueIndex(allData.map(function(d){return d.value}),yValue,threshold);
- if (indexToHighlight !== null)
- allData[indexToHighlight].highlight = true;
- }
-
- var xValue = xAxis.tickFormat()(chart.x()(singlePoint,pointIndex), pointIndex);
- interactiveLayer.tooltip
- .position({left: pointXLocation + margin.left, top: e.mouseY + margin.top})
- .chartContainer(that.parentNode)
- .enabled(tooltips)
- .valueFormatter(function(d,i) {
- return yAxis.tickFormat()(d);
- })
- .data(
- {
- value: xValue,
- series: allData
- }
- )();
-
- interactiveLayer.renderGuideLine(pointXLocation);
-
- });
-
- interactiveLayer.dispatch.on("elementMouseout",function(e) {
- dispatch.tooltipHide();
- lines.clearHighlights();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
-
- if (typeof e.index !== 'undefined') {
- index.i = e.index;
- index.x = dx(index.i);
-
- state.index = e.index;
-
- indexLine
- .data([index]);
- }
-
-
- if (typeof e.rescaleY !== 'undefined') {
- rescaleY = e.rescaleY;
- }
-
- chart.update();
- });
-
- //============================================================
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.lines = lines;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.interactiveLayer = interactiveLayer;
-
- d3.rebind(chart, lines, 'defined', 'isArea', 'x', 'y', 'xScale','yScale', 'size', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi','useVoronoi', 'id');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.rescaleY = function(_) {
- if (!arguments.length) return rescaleY;
- rescaleY = _;
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.useInteractiveGuideline = function(_) {
- if(!arguments.length) return useInteractiveGuideline;
- useInteractiveGuideline = _;
- if (_ === true) {
- chart.interactive(false);
- chart.useVoronoi(false);
- }
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.average = function(_) {
- if(!arguments.length) return average;
- average = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- //============================================================
- // Functions
- //------------------------------------------------------------
-
- /* Normalize the data according to an index point. */
- function indexify(idx, data) {
- return data.map(function(line, i) {
- if (!line.values) {
- return line;
- }
- var v = lines.y()(line.values[idx], idx);
-
- //TODO: implement check below, and disable series if series loses 100% or more cause divide by 0 issue
- if (v < -.95) {
- //if a series loses more than 100%, calculations fail.. anything close can cause major distortion (but is mathematically correct till it hits 100)
- line.tempDisabled = true;
- return line;
- }
-
- line.tempDisabled = false;
-
- line.values = line.values.map(function(point, pointIndex) {
- point.display = {'y': (lines.y()(point, pointIndex) - v) / (1 + v) };
- return point;
- })
-
- return line;
- })
- }
-
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/discreteBar.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/discreteBar.js
deleted file mode 100644
index a20f5829..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/discreteBar.js
+++ /dev/null
@@ -1,349 +0,0 @@
-//TODO: consider deprecating by adding necessary features to multiBar model
-nv.models.discreteBar = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.ordinal()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceY = [0] // 0 is forced by default.. this makes sense for the majority of bar graphs... user can always do chart.forceY([]) to remove
- , color = nv.utils.defaultColor()
- , showValues = false
- , valueFormat = d3.format(',.2f')
- , xDomain
- , yDomain
- , xRange
- , yRange
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- , rectClass = 'discreteBar'
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //add series index to each data point for reference
- data.forEach(function(series, i) {
- series.values.forEach(function(point) {
- point.series = i;
- });
- });
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain) ? [] : // if we know xDomain and yDomain, no need to calculate
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), y0: d.y0 }
- })
- });
-
- x .domain(xDomain || d3.merge(seriesData).map(function(d) { return d.x }))
- .rangeBands(xRange || [0, availableWidth], .1);
-
- y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.y }).concat(forceY)));
-
-
- // If showValues, pad the Y axis range to account for label height
- if (showValues) y.range(yRange || [availableHeight - (y.domain()[0] < 0 ? 12 : 0), y.domain()[1] > 0 ? 12 : 0]);
- else y.range(yRange || [availableHeight, 0]);
-
- //store old scales if they exist
- x0 = x0 || x;
- y0 = y0 || y.copy().range([y(0),y(0)]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-discretebar').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-discretebar');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-groups');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- //TODO: by definition, the discrete bar should not have multiple groups, will modify/remove later
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- groups.exit()
- .transition()
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover });
- groups
- .transition()
- .style('stroke-opacity', 1)
- .style('fill-opacity', .75);
-
-
- var bars = groups.selectAll('g.nv-bar')
- .data(function(d) { return d.values });
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('g')
- .attr('transform', function(d,i,j) {
- return 'translate(' + (x(getX(d,i)) + x.rangeBand() * .05 ) + ', ' + y(0) + ')'
- })
- .on('mouseover', function(d,i) { //TODO: figure out why j works above, but not here
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (d.series + .5) / data.length), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (d.series + .5) / data.length), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (d.series + .5) / data.length), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- });
-
- barsEnter.append('rect')
- .attr('height', 0)
- .attr('width', x.rangeBand() * .9 / data.length )
-
- if (showValues) {
- barsEnter.append('text')
- .attr('text-anchor', 'middle')
- ;
-
- bars.select('text')
- .text(function(d,i) { return valueFormat(getY(d,i)) })
- .transition()
- .attr('x', x.rangeBand() * .9 / 2)
- .attr('y', function(d,i) { return getY(d,i) < 0 ? y(getY(d,i)) - y(0) + 12 : -4 })
-
- ;
- } else {
- bars.selectAll('text').remove();
- }
-
- bars
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive' })
- .style('fill', function(d,i) { return d.color || color(d,i) })
- .style('stroke', function(d,i) { return d.color || color(d,i) })
- .select('rect')
- .attr('class', rectClass)
- .transition()
- .attr('width', x.rangeBand() * .9 / data.length);
- bars.transition()
- //.delay(function(d,i) { return i * 1200 / data[0].values.length })
- .attr('transform', function(d,i) {
- var left = x(getX(d,i)) + x.rangeBand() * .05,
- top = getY(d,i) < 0 ?
- y(0) :
- y(0) - y(getY(d,i)) < 1 ?
- y(0) - 1 : //make 1 px positive bars show up above y=0
- y(getY(d,i));
-
- return 'translate(' + left + ', ' + top + ')'
- })
- .select('rect')
- .attr('height', function(d,i) {
- return Math.max(Math.abs(y(getY(d,i)) - y((yDomain && yDomain[0]) || 0)) || 1)
- });
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.showValues = function(_) {
- if (!arguments.length) return showValues;
- showValues = _;
- return chart;
- };
-
- chart.valueFormat= function(_) {
- if (!arguments.length) return valueFormat;
- valueFormat = _;
- return chart;
- };
-
- chart.rectClass= function(_) {
- if (!arguments.length) return rectClass;
- rectClass = _;
- return chart;
- };
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/discreteBarChart.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/discreteBarChart.js
deleted file mode 100644
index 48a48164..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/discreteBarChart.js
+++ /dev/null
@@ -1,333 +0,0 @@
-
-nv.models.discreteBarChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var discretebar = nv.models.discreteBar()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- ;
-
- var margin = {top: 15, right: 10, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.getColor()
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , staggerLabels = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + x + '</h3>' +
- '<p>' + y + '</p>'
- }
- , x
- , y
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'beforeUpdate')
- , transitionDuration = 250
- ;
-
- xAxis
- .orient('bottom')
- .highlightZero(false)
- .showMaxMin(false)
- .tickFormat(function(d) { return d })
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- .tickFormat(d3.format(',.1f'))
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(discretebar.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(discretebar.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() {
- dispatch.beforeUpdate();
- container.transition().duration(transitionDuration).call(chart);
- };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = discretebar.xScale();
- y = discretebar.yScale().clamp(true);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-discreteBarWithAxes').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-discreteBarWithAxes').append('g');
- var defsEnter = gEnter.append('defs');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
-
- g.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- discretebar
- .width(availableWidth)
- .height(availableHeight);
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- barsWrap.transition().call(discretebar);
-
- //------------------------------------------------------------
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-x-label-clip-' + discretebar.id())
- .append('rect');
-
- g.select('#nv-x-label-clip-' + discretebar.id() + ' rect')
- .attr('width', x.rangeBand() * (staggerLabels ? 2 : 1))
- .attr('height', 16)
- .attr('x', -x.rangeBand() / (staggerLabels ? 1 : 2 ));
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + (y.range()[0] + ((discretebar.showValues() && y.domain()[0] < 0) ? 16 : 0)) + ')');
- //d3.transition(g.select('.nv-x.nv-axis'))
- g.select('.nv-x.nv-axis').transition()
- .call(xAxis);
-
-
- var xTicks = g.select('.nv-x.nv-axis').selectAll('g');
-
- if (staggerLabels) {
- xTicks
- .selectAll('text')
- .attr('transform', function(d,i,j) { return 'translate(0,' + (j % 2 == 0 ? '5' : '17') + ')' })
- }
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis').transition()
- .call(yAxis);
- }
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- discretebar.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- discretebar.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.discretebar = discretebar;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, discretebar, 'x', 'y', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'id', 'showValues', 'valueFormat');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- discretebar.color(color);
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.staggerLabels = function(_) {
- if (!arguments.length) return staggerLabels;
- staggerLabels = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/distribution.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/distribution.js
deleted file mode 100644
index 62a74655..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/distribution.js
+++ /dev/null
@@ -1,148 +0,0 @@
-
-nv.models.distribution = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 400 //technically width or height depending on x or y....
- , size = 8
- , axis = 'x' // 'x' or 'y'... horizontal or vertical
- , getData = function(d) { return d[axis] } // defaults d.x or d.y
- , color = nv.utils.defaultColor()
- , scale = d3.scale.linear()
- , domain
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var scale0;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableLength = width - (axis === 'x' ? margin.left + margin.right : margin.top + margin.bottom),
- naxis = axis == 'x' ? 'y' : 'x',
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- scale0 = scale0 || scale;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-distribution').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-distribution');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')')
-
- //------------------------------------------------------------
-
-
- var distWrap = g.selectAll('g.nv-dist')
- .data(function(d) { return d }, function(d) { return d.key });
-
- distWrap.enter().append('g');
- distWrap
- .attr('class', function(d,i) { return 'nv-dist nv-series-' + i })
- .style('stroke', function(d,i) { return color(d, i) });
-
- var dist = distWrap.selectAll('line.nv-dist' + axis)
- .data(function(d) { return d.values })
- dist.enter().append('line')
- .attr(axis + '1', function(d,i) { return scale0(getData(d,i)) })
- .attr(axis + '2', function(d,i) { return scale0(getData(d,i)) })
- distWrap.exit().selectAll('line.nv-dist' + axis)
- .transition()
- .attr(axis + '1', function(d,i) { return scale(getData(d,i)) })
- .attr(axis + '2', function(d,i) { return scale(getData(d,i)) })
- .style('stroke-opacity', 0)
- .remove();
- dist
- .attr('class', function(d,i) { return 'nv-dist' + axis + ' nv-dist' + axis + '-' + i })
- .attr(naxis + '1', 0)
- .attr(naxis + '2', size);
- dist
- .transition()
- .attr(axis + '1', function(d,i) { return scale(getData(d,i)) })
- .attr(axis + '2', function(d,i) { return scale(getData(d,i)) })
-
-
- scale0 = scale.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.axis = function(_) {
- if (!arguments.length) return axis;
- axis = _;
- return chart;
- };
-
- chart.size = function(_) {
- if (!arguments.length) return size;
- size = _;
- return chart;
- };
-
- chart.getData = function(_) {
- if (!arguments.length) return getData;
- getData = d3.functor(_);
- return chart;
- };
-
- chart.scale = function(_) {
- if (!arguments.length) return scale;
- scale = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/historicalBar.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/historicalBar.js
deleted file mode 100644
index 2a6c644d..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/historicalBar.js
+++ /dev/null
@@ -1,331 +0,0 @@
-//TODO: consider deprecating and using multibar with single series for this
-nv.models.historicalBar = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceX = []
- , forceY = [0]
- , padData = false
- , clipEdge = true
- , color = nv.utils.defaultColor()
- , xDomain
- , yDomain
- , xRange
- , yRange
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- , interactive = true
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x .domain(xDomain || d3.extent(data[0].values.map(getX).concat(forceX) ))
-
- if (padData)
- x.range(xRange || [availableWidth * .5 / data[0].values.length, availableWidth * (data[0].values.length - .5) / data[0].values.length ]);
- else
- x.range(xRange || [0, availableWidth]);
-
- y .domain(yDomain || d3.extent(data[0].values.map(getY).concat(forceY) ))
- .range(yRange || [availableHeight, 0]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
-
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-historicalBar-' + id).data([data[0].values]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-historicalBar-' + id);
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-bars');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- container
- .on('click', function(d,i) {
- dispatch.chartClick({
- data: d,
- index: i,
- pos: d3.event,
- id: id
- });
- });
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-chart-clip-path-' + id)
- .append('rect');
-
- wrap.select('#nv-chart-clip-path-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-chart-clip-path-' + id + ')' : '');
-
-
-
- var bars = wrap.select('.nv-bars').selectAll('.nv-bar')
- .data(function(d) { return d }, function(d,i) {return getX(d,i)});
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('rect')
- //.attr('class', function(d,i,j) { return (getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive') + ' nv-bar-' + j + '-' + i })
- .attr('x', 0 )
- .attr('y', function(d,i) { return nv.utils.NaNtoZero(y(Math.max(0, getY(d,i)))) })
- .attr('height', function(d,i) { return nv.utils.NaNtoZero(Math.abs(y(getY(d,i)) - y(0))) })
- .attr('transform', function(d,i) { return 'translate(' + (x(getX(d,i)) - availableWidth / data[0].values.length * .45) + ',0)'; })
- .on('mouseover', function(d,i) {
- if (!interactive) return;
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- point: d,
- series: data[0],
- pos: [x(getX(d,i)), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
-
- })
- .on('mouseout', function(d,i) {
- if (!interactive) return;
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- point: d,
- series: data[0],
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- if (!interactive) return;
- dispatch.elementClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- if (!interactive) return;
- dispatch.elementDblClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- });
-
- bars
- .attr('fill', function(d,i) { return color(d, i); })
- .attr('class', function(d,i,j) { return (getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive') + ' nv-bar-' + j + '-' + i })
- .transition()
- .attr('transform', function(d,i) { return 'translate(' + (x(getX(d,i)) - availableWidth / data[0].values.length * .45) + ',0)'; })
- //TODO: better width calculations that don't assume always uniform data spacing;w
- .attr('width', (availableWidth / data[0].values.length) * .9 );
-
-
- bars.transition()
- .attr('y', function(d,i) {
- var rval = getY(d,i) < 0 ?
- y(0) :
- y(0) - y(getY(d,i)) < 1 ?
- y(0) - 1 :
- y(getY(d,i));
- return nv.utils.NaNtoZero(rval);
- })
- .attr('height', function(d,i) { return nv.utils.NaNtoZero(Math.max(Math.abs(y(getY(d,i)) - y(0)),1)) });
-
- });
-
- return chart;
- }
-
- //Create methods to allow outside functions to highlight a specific bar.
- chart.highlightPoint = function(pointIndex, isHoverOver) {
- d3.select(".nv-historicalBar-" + id)
- .select(".nv-bars .nv-bar-0-" + pointIndex)
- .classed("hover", isHoverOver)
- ;
- };
-
- chart.clearHighlights = function() {
- d3.select(".nv-historicalBar-" + id)
- .select(".nv-bars .nv-bar.hover")
- .classed("hover", false)
- ;
- };
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.padData = function(_) {
- if (!arguments.length) return padData;
- padData = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.interactive = function(_) {
- if(!arguments.length) return interactive;
- interactive = false;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/historicalBarChart.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/historicalBarChart.js
deleted file mode 100644
index a5b4a097..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/historicalBarChart.js
+++ /dev/null
@@ -1,419 +0,0 @@
-
-nv.models.historicalBarChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var bars = nv.models.historicalBar()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- ;
-
-
- var margin = {top: 30, right: 90, bottom: 50, left: 90}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , showLegend = false
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , x
- , y
- , state = {}
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , transitionDuration = 250
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient( (rightAlignYAxis) ? 'right' : 'left')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
-
- // New addition to calculate position if SVG is scaled with viewBox, may move TODO: consider implementing everywhere else
- if (offsetElement) {
- var svg = d3.select(offsetElement).select('svg');
- var viewBox = (svg.node()) ? svg.attr('viewBox') : null;
- if (viewBox) {
- viewBox = viewBox.split(' ');
- var ratio = parseInt(svg.style('width')) / viewBox[2];
- e.pos[0] = e.pos[0] * ratio;
- e.pos[1] = e.pos[1] * ratio;
- }
- }
-
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(bars.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(bars.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = bars.xScale();
- y = bars.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-historicalBarChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-historicalBarChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- bars
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- barsWrap.transition().call(bars);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- g.select('.nv-x.nv-axis')
- .transition()
- .call(xAxis);
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis')
- .transition()
- .call(yAxis);
- }
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- selection.transition().call(chart);
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- selection.call(chart);
- });
-
- //============================================================
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- bars.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.bars = bars;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, bars, 'defined', 'isArea', 'x', 'y', 'size', 'xScale', 'yScale',
- 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id', 'interpolate','highlightPoint','clearHighlights', 'interactive');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/indentedTree.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/indentedTree.js
deleted file mode 100644
index 18c2700f..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/indentedTree.js
+++ /dev/null
@@ -1,337 +0,0 @@
-nv.models.indentedTree = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0} //TODO: implement, maybe as margin on the containing div
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor()
- , id = Math.floor(Math.random() * 10000)
- , header = true
- , filterZero = false
- , noData = "No Data Available."
- , childIndent = 20
- , columns = [{key:'key', label: 'Name', type:'text'}] //TODO: consider functions like chart.addColumn, chart.removeColumn, instead of a block like this
- , tableClass = null
- , iconOpen = 'images/grey-plus.png' //TODO: consider removing this and replacing with a '+' or '-' unless user defines images
- , iconClose = 'images/grey-minus.png'
- , dispatch = d3.dispatch('elementClick', 'elementDblclick', 'elementMouseover', 'elementMouseout')
- , getUrl = function(d) { return d.url }
- ;
-
- //============================================================
-
- var idx = 0;
-
- function chart(selection) {
- selection.each(function(data) {
- var depth = 1,
- container = d3.select(this);
-
- var tree = d3.layout.tree()
- .children(function(d) { return d.values })
- .size([height, childIndent]); //Not sure if this is needed now that the result is HTML
-
- chart.update = function() { container.transition().duration(600).call(chart) };
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
- if (!data[0]) data[0] = {key: noData};
-
- //------------------------------------------------------------
-
-
- var nodes = tree.nodes(data[0]);
-
- // nodes.map(function(d) {
- // d.id = i++;
- // })
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('div').data([[nodes]]);
- var wrapEnter = wrap.enter().append('div').attr('class', 'nvd3 nv-wrap nv-indentedtree');
- var tableEnter = wrapEnter.append('table');
- var table = wrap.select('table').attr('width', '100%').attr('class', tableClass);
-
- //------------------------------------------------------------
-
-
- if (header) {
- var thead = tableEnter.append('thead');
-
- var theadRow1 = thead.append('tr');
-
- columns.forEach(function(column) {
- theadRow1
- .append('th')
- .attr('width', column.width ? column.width : '10%')
- .style('text-align', column.type == 'numeric' ? 'right' : 'left')
- .append('span')
- .text(column.label);
- });
- }
-
-
- var tbody = table.selectAll('tbody')
- .data(function(d) { return d });
- tbody.enter().append('tbody');
-
-
-
- //compute max generations
- depth = d3.max(nodes, function(node) { return node.depth });
- tree.size([height, depth * childIndent]); //TODO: see if this is necessary at all
-
-
- // Update the nodes…
- var node = tbody.selectAll('tr')
- // .data(function(d) { return d; }, function(d) { return d.id || (d.id == ++i)});
- .data(function(d) { return d.filter(function(d) { return (filterZero && !d.children) ? filterZero(d) : true; } )}, function(d,i) { return d.id || (d.id || ++idx)});
- //.style('display', 'table-row'); //TODO: see if this does anything
-
- node.exit().remove();
-
- node.select('img.nv-treeicon')
- .attr('src', icon)
- .classed('folded', folded);
-
- var nodeEnter = node.enter().append('tr');
-
-
- columns.forEach(function(column, index) {
-
- var nodeName = nodeEnter.append('td')
- .style('padding-left', function(d) { return (index ? 0 : d.depth * childIndent + 12 + (icon(d) ? 0 : 16)) + 'px' }, 'important') //TODO: check why I did the ternary here
- .style('text-align', column.type == 'numeric' ? 'right' : 'left');
-
-
- if (index == 0) {
- nodeName.append('img')
- .classed('nv-treeicon', true)
- .classed('nv-folded', folded)
- .attr('src', icon)
- .style('width', '14px')
- .style('height', '14px')
- .style('padding', '0 1px')
- .style('display', function(d) { return icon(d) ? 'inline-block' : 'none'; })
- .on('click', click);
- }
-
-
- nodeName.each(function(d) {
- if (!index && getUrl(d))
- d3.select(this)
- .append('a')
- .attr('href',getUrl)
- .attr('class', d3.functor(column.classes))
- .append('span')
- else
- d3.select(this)
- .append('span')
-
- d3.select(this).select('span')
- .attr('class', d3.functor(column.classes) )
- .text(function(d) { return column.format ? column.format(d) :
- (d[column.key] || '-') });
- });
-
- if (column.showCount) {
- nodeName.append('span')
- .attr('class', 'nv-childrenCount');
-
- node.selectAll('span.nv-childrenCount').text(function(d) {
- return ((d.values && d.values.length) || (d._values && d._values.length)) ? //If this is a parent
- '(' + ((d.values && (d.values.filter(function(d) { return filterZero ? filterZero(d) : true; }).length)) //If children are in values check its children and filter
- || (d._values && d._values.filter(function(d) { return filterZero ? filterZero(d) : true; }).length) //Otherwise, do the same, but with the other name, _values...
- || 0) + ')' //This is the catch-all in case there are no children after a filter
- : '' //If this is not a parent, just give an empty string
- });
- }
-
- // if (column.click)
- // nodeName.select('span').on('click', column.click);
-
- });
-
- node
- .order()
- .on('click', function(d) {
- dispatch.elementClick({
- row: this, //TODO: decide whether or not this should be consistent with scatter/line events or should be an html link (a href)
- data: d,
- pos: [d.x, d.y]
- });
- })
- .on('dblclick', function(d) {
- dispatch.elementDblclick({
- row: this,
- data: d,
- pos: [d.x, d.y]
- });
- })
- .on('mouseover', function(d) {
- dispatch.elementMouseover({
- row: this,
- data: d,
- pos: [d.x, d.y]
- });
- })
- .on('mouseout', function(d) {
- dispatch.elementMouseout({
- row: this,
- data: d,
- pos: [d.x, d.y]
- });
- });
-
-
-
-
- // Toggle children on click.
- function click(d, _, unshift) {
- d3.event.stopPropagation();
-
- if(d3.event.shiftKey && !unshift) {
- //If you shift-click, it'll toggle fold all the children, instead of itself
- d3.event.shiftKey = false;
- d.values && d.values.forEach(function(node){
- if (node.values || node._values) {
- click(node, 0, true);
- }
- });
- return true;
- }
- if(!hasChildren(d)) {
- //download file
- //window.location.href = d.url;
- return true;
- }
- if (d.values) {
- d._values = d.values;
- d.values = null;
- } else {
- d.values = d._values;
- d._values = null;
- }
- chart.update();
- }
-
-
- function icon(d) {
- return (d._values && d._values.length) ? iconOpen : (d.values && d.values.length) ? iconClose : '';
- }
-
- function folded(d) {
- return (d._values && d._values.length);
- }
-
- function hasChildren(d) {
- var values = d.values || d._values;
-
- return (values && values.length);
- }
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- scatter.color(color);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.header = function(_) {
- if (!arguments.length) return header;
- header = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.filterZero = function(_) {
- if (!arguments.length) return filterZero;
- filterZero = _;
- return chart;
- };
-
- chart.columns = function(_) {
- if (!arguments.length) return columns;
- columns = _;
- return chart;
- };
-
- chart.tableClass = function(_) {
- if (!arguments.length) return tableClass;
- tableClass = _;
- return chart;
- };
-
- chart.iconOpen = function(_){
- if (!arguments.length) return iconOpen;
- iconOpen = _;
- return chart;
- }
-
- chart.iconClose = function(_){
- if (!arguments.length) return iconClose;
- iconClose = _;
- return chart;
- }
-
- chart.getUrl = function(_){
- if (!arguments.length) return getUrl;
- getUrl = _;
- return chart;
- }
-
- //============================================================
-
-
- return chart;
-}; \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/legend.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/legend.js
deleted file mode 100644
index 21f9f9a4..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/legend.js
+++ /dev/null
@@ -1,270 +0,0 @@
-nv.models.legend = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 5, right: 0, bottom: 5, left: 0}
- , width = 400
- , height = 20
- , getKey = function(d) { return d.key }
- , color = nv.utils.defaultColor()
- , align = true
- , rightAlign = true
- , updateState = true //If true, legend will update data.disabled and trigger a 'stateChange' dispatch.
- , radioButtonMode = false //If true, clicking legend items will cause it to behave like a radio button. (only one can be selected at a time)
- , dispatch = d3.dispatch('legendClick', 'legendDblclick', 'legendMouseover', 'legendMouseout', 'stateChange')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-legend').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-legend').append('g');
- var g = wrap.select('g');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- var series = g.selectAll('.nv-series')
- .data(function(d) { return d });
- var seriesEnter = series.enter().append('g').attr('class', 'nv-series')
- .on('mouseover', function(d,i) {
- dispatch.legendMouseover(d,i); //TODO: Make consistent with other event objects
- })
- .on('mouseout', function(d,i) {
- dispatch.legendMouseout(d,i);
- })
- .on('click', function(d,i) {
- dispatch.legendClick(d,i);
- if (updateState) {
- if (radioButtonMode) {
- //Radio button mode: set every series to disabled,
- // and enable the clicked series.
- data.forEach(function(series) { series.disabled = true});
- d.disabled = false;
- }
- else {
- d.disabled = !d.disabled;
- if (data.every(function(series) { return series.disabled})) {
- //the default behavior of NVD3 legends is, if every single series
- // is disabled, turn all series' back on.
- data.forEach(function(series) { series.disabled = false});
- }
- }
- dispatch.stateChange({
- disabled: data.map(function(d) { return !!d.disabled })
- });
- }
- })
- .on('dblclick', function(d,i) {
- dispatch.legendDblclick(d,i);
- if (updateState) {
- //the default behavior of NVD3 legends, when double clicking one,
- // is to set all other series' to false, and make the double clicked series enabled.
- data.forEach(function(series) {
- series.disabled = true;
- });
- d.disabled = false;
- dispatch.stateChange({
- disabled: data.map(function(d) { return !!d.disabled })
- });
- }
- });
- seriesEnter.append('circle')
- .style('stroke-width', 2)
- .attr('class','nv-legend-symbol')
- .attr('r', 5);
- seriesEnter.append('text')
- .attr('text-anchor', 'start')
- .attr('class','nv-legend-text')
- .attr('dy', '.32em')
- .attr('dx', '8');
- series.classed('disabled', function(d) { return d.disabled });
- series.exit().remove();
- series.select('circle')
- .style('fill', function(d,i) { return d.color || color(d,i)})
- .style('stroke', function(d,i) { return d.color || color(d, i) });
- series.select('text').text(getKey);
-
-
- //TODO: implement fixed-width and max-width options (max-width is especially useful with the align option)
-
- // NEW ALIGNING CODE, TODO: clean up
- if (align) {
-
- var seriesWidths = [];
- series.each(function(d,i) {
- var legendText = d3.select(this).select('text');
- var nodeTextLength;
- try {
- nodeTextLength = legendText.node().getComputedTextLength();
- }
- catch(e) {
- nodeTextLength = nv.utils.calcApproxTextWidth(legendText);
- }
-
- seriesWidths.push(nodeTextLength + 28); // 28 is ~ the width of the circle plus some padding
- });
-
- var seriesPerRow = 0;
- var legendWidth = 0;
- var columnWidths = [];
-
- while ( legendWidth < availableWidth && seriesPerRow < seriesWidths.length) {
- columnWidths[seriesPerRow] = seriesWidths[seriesPerRow];
- legendWidth += seriesWidths[seriesPerRow++];
- }
- if (seriesPerRow === 0) seriesPerRow = 1; //minimum of one series per row
-
-
- while ( legendWidth > availableWidth && seriesPerRow > 1 ) {
- columnWidths = [];
- seriesPerRow--;
-
- for (var k = 0; k < seriesWidths.length; k++) {
- if (seriesWidths[k] > (columnWidths[k % seriesPerRow] || 0) )
- columnWidths[k % seriesPerRow] = seriesWidths[k];
- }
-
- legendWidth = columnWidths.reduce(function(prev, cur, index, array) {
- return prev + cur;
- });
- }
-
- var xPositions = [];
- for (var i = 0, curX = 0; i < seriesPerRow; i++) {
- xPositions[i] = curX;
- curX += columnWidths[i];
- }
-
- series
- .attr('transform', function(d, i) {
- return 'translate(' + xPositions[i % seriesPerRow] + ',' + (5 + Math.floor(i / seriesPerRow) * 20) + ')';
- });
-
- //position legend as far right as possible within the total width
- if (rightAlign) {
- g.attr('transform', 'translate(' + (width - margin.right - legendWidth) + ',' + margin.top + ')');
- }
- else {
- g.attr('transform', 'translate(0' + ',' + margin.top + ')');
- }
-
- height = margin.top + margin.bottom + (Math.ceil(seriesWidths.length / seriesPerRow) * 20);
-
- } else {
-
- var ypos = 5,
- newxpos = 5,
- maxwidth = 0,
- xpos;
- series
- .attr('transform', function(d, i) {
- var length = d3.select(this).select('text').node().getComputedTextLength() + 28;
- xpos = newxpos;
-
- if (width < margin.left + margin.right + xpos + length) {
- newxpos = xpos = 5;
- ypos += 20;
- }
-
- newxpos += length;
- if (newxpos > maxwidth) maxwidth = newxpos;
-
- return 'translate(' + xpos + ',' + ypos + ')';
- });
-
- //position legend as far right as possible within the total width
- g.attr('transform', 'translate(' + (width - margin.right - maxwidth) + ',' + margin.top + ')');
-
- height = margin.top + margin.bottom + ypos + 15;
-
- }
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.key = function(_) {
- if (!arguments.length) return getKey;
- getKey = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.align = function(_) {
- if (!arguments.length) return align;
- align = _;
- return chart;
- };
-
- chart.rightAlign = function(_) {
- if (!arguments.length) return rightAlign;
- rightAlign = _;
- return chart;
- };
-
- chart.updateState = function(_) {
- if (!arguments.length) return updateState;
- updateState = _;
- return chart;
- };
-
- chart.radioButtonMode = function(_) {
- if (!arguments.length) return radioButtonMode;
- radioButtonMode = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/line.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/line.js
deleted file mode 100644
index 855cc541..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/line.js
+++ /dev/null
@@ -1,284 +0,0 @@
-
-nv.models.line = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var scatter = nv.models.scatter()
- ;
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor() // a function that returns a color
- , getX = function(d) { return d.x } // accessor to get the x value from a data point
- , getY = function(d) { return d.y } // accessor to get the y value from a data point
- , defined = function(d,i) { return !isNaN(getY(d,i)) && getY(d,i) !== null } // allows a line to be not continuous when it is not defined
- , isArea = function(d) { return d.area } // decides if a line is an area or just a line
- , clipEdge = false // if true, masks lines within x and y scale
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , interpolate = "linear" // controls the line interpolation
- ;
-
- scatter
- .size(16) // default size
- .sizeDomain([16,256]) //set to speed up calculation, needs to be unset if there is a custom size accessor
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0 //used to store previous scales
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = scatter.xScale();
- y = scatter.yScale();
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-line').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-line');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- gEnter.append('g').attr('class', 'nv-groups');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
-
- var scatterWrap = wrap.select('.nv-scatterWrap');
- //.datum(data); // Data automatically trickles down from the wrap
-
- scatterWrap.transition().call(scatter);
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + scatter.id())
- .append('rect');
-
- wrap.select('#nv-edge-clip-' + scatter.id() + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + scatter.id() + ')' : '');
- scatterWrap
- .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + scatter.id() + ')' : '');
-
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- groups.exit()
- .transition()
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i)});
- groups
- .transition()
- .style('stroke-opacity', 1)
- .style('fill-opacity', .5);
-
-
-
- var areaPaths = groups.selectAll('path.nv-area')
- .data(function(d) { return isArea(d) ? [d] : [] }); // this is done differently than lines because I need to check if series is an area
- areaPaths.enter().append('path')
- .attr('class', 'nv-area')
- .attr('d', function(d) {
- return d3.svg.area()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return nv.utils.NaNtoZero(x0(getX(d,i))) })
- .y0(function(d,i) { return nv.utils.NaNtoZero(y0(getY(d,i))) })
- .y1(function(d,i) { return y0( y.domain()[0] <= 0 ? y.domain()[1] >= 0 ? 0 : y.domain()[1] : y.domain()[0] ) })
- //.y1(function(d,i) { return y0(0) }) //assuming 0 is within y domain.. may need to tweak this
- .apply(this, [d.values])
- });
- groups.exit().selectAll('path.nv-area')
- .remove();
-
- areaPaths
- .transition()
- .attr('d', function(d) {
- return d3.svg.area()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return nv.utils.NaNtoZero(x(getX(d,i))) })
- .y0(function(d,i) { return nv.utils.NaNtoZero(y(getY(d,i))) })
- .y1(function(d,i) { return y( y.domain()[0] <= 0 ? y.domain()[1] >= 0 ? 0 : y.domain()[1] : y.domain()[0] ) })
- //.y1(function(d,i) { return y0(0) }) //assuming 0 is within y domain.. may need to tweak this
- .apply(this, [d.values])
- });
-
-
-
- var linePaths = groups.selectAll('path.nv-line')
- .data(function(d) { return [d.values] });
- linePaths.enter().append('path')
- .attr('class', 'nv-line')
- .attr('d',
- d3.svg.line()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return nv.utils.NaNtoZero(x0(getX(d,i))) })
- .y(function(d,i) { return nv.utils.NaNtoZero(y0(getY(d,i))) })
- );
- groups.exit().selectAll('path.nv-line')
- .transition()
- .attr('d',
- d3.svg.line()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return nv.utils.NaNtoZero(x(getX(d,i))) })
- .y(function(d,i) { return nv.utils.NaNtoZero(y(getY(d,i))) })
- );
- linePaths
- .transition()
- .attr('d',
- d3.svg.line()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return nv.utils.NaNtoZero(x(getX(d,i))) })
- .y(function(d,i) { return nv.utils.NaNtoZero(y(getY(d,i))) })
- );
-
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = scatter.dispatch;
- chart.scatter = scatter;
-
- d3.rebind(chart, scatter, 'id', 'interactive', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'xRange', 'yRange',
- 'sizeDomain', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'useVoronoi', 'clipRadius', 'padData','highlightPoint','clearHighlights');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- scatter.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- scatter.y(_);
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- scatter.color(color);
- return chart;
- };
-
- chart.interpolate = function(_) {
- if (!arguments.length) return interpolate;
- interpolate = _;
- return chart;
- };
-
- chart.defined = function(_) {
- if (!arguments.length) return defined;
- defined = _;
- return chart;
- };
-
- chart.isArea = function(_) {
- if (!arguments.length) return isArea;
- isArea = d3.functor(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/lineChart.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/lineChart.js
deleted file mode 100644
index a4ffcf6a..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/lineChart.js
+++ /dev/null
@@ -1,465 +0,0 @@
-
-nv.models.lineChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , interactiveLayer = nv.interactiveGuideline()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , useInteractiveGuideline = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , x
- , y
- , state = {}
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , transitionDuration = 250
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = lines.xScale();
- y = lines.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-lineChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-lineChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append("rect").style("opacity",0);
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-linesWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-interactive');
-
- g.select("rect").attr("width",availableWidth).attr("height",availableHeight);
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
-
- //------------------------------------------------------------
- //Set up interactive layer
- if (useInteractiveGuideline) {
- interactiveLayer
- .width(availableWidth)
- .height(availableHeight)
- .margin({left:margin.left, top:margin.top})
- .svgContainer(container)
- .xScale(x);
- wrap.select(".nv-interactive").call(interactiveLayer);
- }
-
-
- lines
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
-
-
- var linesWrap = g.select('.nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- linesWrap.transition().call(lines);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- g.select('.nv-x.nv-axis')
- .transition()
- .call(xAxis);
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis')
- .transition()
- .call(yAxis);
- }
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('stateChange', function(newState) {
- state = newState;
- dispatch.stateChange(state);
- chart.update();
- });
-
- interactiveLayer.dispatch.on('elementMousemove', function(e) {
- lines.clearHighlights();
- var singlePoint, pointIndex, pointXLocation, allData = [];
- data
- .filter(function(series, i) {
- series.seriesIndex = i;
- return !series.disabled;
- })
- .forEach(function(series,i) {
- pointIndex = nv.interactiveBisect(series.values, e.pointXValue, chart.x());
- lines.highlightPoint(i, pointIndex, true);
- var point = series.values[pointIndex];
- if (typeof point === 'undefined') return;
- if (typeof singlePoint === 'undefined') singlePoint = point;
- if (typeof pointXLocation === 'undefined') pointXLocation = chart.xScale()(chart.x()(point,pointIndex));
- allData.push({
- key: series.key,
- value: chart.y()(point, pointIndex),
- color: color(series,series.seriesIndex)
- });
- });
- //Highlight the tooltip entry based on which point the mouse is closest to.
- if (allData.length > 2) {
- var yValue = chart.yScale().invert(e.mouseY);
- var domainExtent = Math.abs(chart.yScale().domain()[0] - chart.yScale().domain()[1]);
- var threshold = 0.03 * domainExtent;
- var indexToHighlight = nv.nearestValueIndex(allData.map(function(d){return d.value}),yValue,threshold);
- if (indexToHighlight !== null)
- allData[indexToHighlight].highlight = true;
- }
-
- var xValue = xAxis.tickFormat()(chart.x()(singlePoint,pointIndex));
- interactiveLayer.tooltip
- .position({left: pointXLocation + margin.left, top: e.mouseY + margin.top})
- .chartContainer(that.parentNode)
- .enabled(tooltips)
- .valueFormatter(function(d,i) {
- return yAxis.tickFormat()(d);
- })
- .data(
- {
- value: xValue,
- series: allData
- }
- )();
-
- interactiveLayer.renderGuideLine(pointXLocation);
-
- });
-
- interactiveLayer.dispatch.on("elementMouseout",function(e) {
- dispatch.tooltipHide();
- lines.clearHighlights();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.lines = lines;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.interactiveLayer = interactiveLayer;
-
- d3.rebind(chart, lines, 'defined', 'isArea', 'x', 'y', 'size', 'xScale', 'yScale', 'xDomain', 'yDomain', 'xRange', 'yRange'
- , 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'useVoronoi','id', 'interpolate');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.useInteractiveGuideline = function(_) {
- if(!arguments.length) return useInteractiveGuideline;
- useInteractiveGuideline = _;
- if (_ === true) {
- chart.interactive(false);
- chart.useVoronoi(false);
- }
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/linePlusBarChart.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/linePlusBarChart.js
deleted file mode 100644
index 77fcbab7..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/linePlusBarChart.js
+++ /dev/null
@@ -1,433 +0,0 @@
-
-nv.models.linePlusBarChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , bars = nv.models.historicalBar()
- , xAxis = nv.models.axis()
- , y1Axis = nv.models.axis()
- , y2Axis = nv.models.axis()
- , legend = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 60, bottom: 50, left: 60}
- , width = null
- , height = null
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , color = nv.utils.defaultColor()
- , showLegend = true
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>';
- }
- , x
- , y1
- , y2
- , state = {}
- , defaultState = null
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- ;
-
- bars
- .padData(true)
- ;
- lines
- .clipEdge(false)
- .padData(true)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(7)
- .highlightZero(false)
- ;
- y1Axis
- .orient('left')
- ;
- y2Axis
- .orient('right')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = (e.series.bar ? y1Axis : y2Axis).tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- }
- ;
-
- //------------------------------------------------------------
-
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart); };
- // chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- var dataBars = data.filter(function(d) { return !d.disabled && d.bar });
- var dataLines = data.filter(function(d) { return !d.bar }); // removed the !d.disabled clause here to fix Issue #240
-
- //x = xAxis.scale();
- x = dataLines.filter(function(d) { return !d.disabled; }).length && dataLines.filter(function(d) { return !d.disabled; })[0].values.length ? lines.xScale() : bars.xScale();
- //x = dataLines.filter(function(d) { return !d.disabled; }).length ? lines.xScale() : bars.xScale(); //old code before change above
- y1 = bars.yScale();
- y2 = lines.yScale();
-
- //------------------------------------------------------------
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('g.nv-wrap.nv-linePlusBar').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-linePlusBar').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y1 nv-axis');
- gEnter.append('g').attr('class', 'nv-y2 nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-linesWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- g.select('.nv-legendWrap')
- .datum(data.map(function(series) {
- series.originalKey = series.originalKey === undefined ? series.key : series.originalKey;
- series.key = series.originalKey + (series.bar ? ' (left axis)' : ' (right axis)');
- return series;
- }))
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + ( availableWidth / 2 ) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
-
- lines
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].bar }))
-
- bars
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && data[i].bar }))
-
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(dataBars.length ? dataBars : [{values:[]}])
-
- var linesWrap = g.select('.nv-linesWrap')
- .datum(dataLines[0] && !dataLines[0].disabled ? dataLines : [{values:[]}] );
- //.datum(!dataLines[0].disabled ? dataLines : [{values:dataLines[0].values.map(function(d) { return [d[0], null] }) }] );
-
- d3.transition(barsWrap).call(bars);
- d3.transition(linesWrap).call(lines);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y1.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
-
-
- y1Axis
- .scale(y1)
- .ticks( availableHeight / 36 )
- .tickSize(-availableWidth, 0);
-
- d3.transition(g.select('.nv-y1.nv-axis'))
- .style('opacity', dataBars.length ? 1 : 0)
- .call(y1Axis);
-
-
- y2Axis
- .scale(y2)
- .ticks( availableHeight / 36 )
- .tickSize(dataBars.length ? 0 : -availableWidth, 0); // Show the y2 rules only if y1 has none
-
- g.select('.nv-y2.nv-axis')
- .style('opacity', dataLines.length ? 1 : 0)
- .attr('transform', 'translate(' + availableWidth + ',0)');
- //.attr('transform', 'translate(' + x.range()[1] + ',0)');
-
- d3.transition(g.select('.nv-y2.nv-axis'))
- .call(y2Axis);
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('stateChange', function(newState) {
- state = newState;
- dispatch.stateChange(state);
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.legend = legend;
- chart.lines = lines;
- chart.bars = bars;
- chart.xAxis = xAxis;
- chart.y1Axis = y1Axis;
- chart.y2Axis = y2Axis;
-
- d3.rebind(chart, lines, 'defined', 'size', 'clipVoronoi', 'interpolate');
- //TODO: consider rebinding x, y and some other stuff, and simply do soemthign lile bars.x(lines.x()), etc.
- //d3.rebind(chart, lines, 'x', 'y', 'size', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- lines.x(_);
- bars.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- lines.y(_);
- bars.y(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/linePlusBarWithFocusChart.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/linePlusBarWithFocusChart.js
deleted file mode 100644
index 2ef31137..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/linePlusBarWithFocusChart.js
+++ /dev/null
@@ -1,658 +0,0 @@
-
-nv.models.linePlusBarWithFocusChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , lines2 = nv.models.line()
- , bars = nv.models.historicalBar()
- , bars2 = nv.models.historicalBar()
- , xAxis = nv.models.axis()
- , x2Axis = nv.models.axis()
- , y1Axis = nv.models.axis()
- , y2Axis = nv.models.axis()
- , y3Axis = nv.models.axis()
- , y4Axis = nv.models.axis()
- , legend = nv.models.legend()
- , brush = d3.svg.brush()
- ;
-
- var margin = {top: 30, right: 30, bottom: 30, left: 60}
- , margin2 = {top: 0, right: 30, bottom: 20, left: 60}
- , width = null
- , height = null
- , height2 = 100
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , color = nv.utils.defaultColor()
- , showLegend = true
- , extent
- , brushExtent = null
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>';
- }
- , x
- , x2
- , y1
- , y2
- , y3
- , y4
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'brush')
- , transitionDuration = 0
- ;
-
- lines
- .clipEdge(true)
- ;
- lines2
- .interactive(false)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(5)
- ;
- y1Axis
- .orient('left')
- ;
- y2Axis
- .orient('right')
- ;
- x2Axis
- .orient('bottom')
- .tickPadding(5)
- ;
- y3Axis
- .orient('left')
- ;
- y4Axis
- .orient('right')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- if (extent) {
- e.pointIndex += Math.ceil(extent[0]);
- }
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = (e.series.bar ? y1Axis : y2Axis).tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //------------------------------------------------------------
-
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2,
- availableHeight2 = height2 - margin2.top - margin2.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart); };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight1 / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- var dataBars = data.filter(function(d) { return !d.disabled && d.bar });
- var dataLines = data.filter(function(d) { return !d.bar }); // removed the !d.disabled clause here to fix Issue #240
-
- x = bars.xScale();
- x2 = x2Axis.scale();
- y1 = bars.yScale();
- y2 = lines.yScale();
- y3 = bars2.yScale();
- y4 = lines2.yScale();
-
- var series1 = data
- .filter(function(d) { return !d.disabled && d.bar })
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i) }
- })
- });
-
- var series2 = data
- .filter(function(d) { return !d.disabled && !d.bar })
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i) }
- })
- });
-
- x .range([0, availableWidth]);
-
- x2 .domain(d3.extent(d3.merge(series1.concat(series2)), function(d) { return d.x } ))
- .range([0, availableWidth]);
-
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-linePlusBar').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-linePlusBar').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- var focusEnter = gEnter.append('g').attr('class', 'nv-focus');
- focusEnter.append('g').attr('class', 'nv-x nv-axis');
- focusEnter.append('g').attr('class', 'nv-y1 nv-axis');
- focusEnter.append('g').attr('class', 'nv-y2 nv-axis');
- focusEnter.append('g').attr('class', 'nv-barsWrap');
- focusEnter.append('g').attr('class', 'nv-linesWrap');
-
- var contextEnter = gEnter.append('g').attr('class', 'nv-context');
- contextEnter.append('g').attr('class', 'nv-x nv-axis');
- contextEnter.append('g').attr('class', 'nv-y1 nv-axis');
- contextEnter.append('g').attr('class', 'nv-y2 nv-axis');
- contextEnter.append('g').attr('class', 'nv-barsWrap');
- contextEnter.append('g').attr('class', 'nv-linesWrap');
- contextEnter.append('g').attr('class', 'nv-brushBackground');
- contextEnter.append('g').attr('class', 'nv-x nv-brush');
-
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- g.select('.nv-legendWrap')
- .datum(data.map(function(series) {
- series.originalKey = series.originalKey === undefined ? series.key : series.originalKey;
- series.key = series.originalKey + (series.bar ? ' (left axis)' : ' (right axis)');
- return series;
- }))
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + ( availableWidth / 2 ) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Context Components
-
- bars2
- .width(availableWidth)
- .height(availableHeight2)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && data[i].bar }));
-
- lines2
- .width(availableWidth)
- .height(availableHeight2)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].bar }));
-
- var bars2Wrap = g.select('.nv-context .nv-barsWrap')
- .datum(dataBars.length ? dataBars : [{values:[]}]);
-
- var lines2Wrap = g.select('.nv-context .nv-linesWrap')
- .datum(!dataLines[0].disabled ? dataLines : [{values:[]}]);
-
- g.select('.nv-context')
- .attr('transform', 'translate(0,' + ( availableHeight1 + margin.bottom + margin2.top) + ')')
-
- bars2Wrap.transition().call(bars2);
- lines2Wrap.transition().call(lines2);
-
- //------------------------------------------------------------
-
-
-
- //------------------------------------------------------------
- // Setup Brush
-
- brush
- .x(x2)
- .on('brush', onBrush);
-
- if (brushExtent) brush.extent(brushExtent);
-
- var brushBG = g.select('.nv-brushBackground').selectAll('g')
- .data([brushExtent || brush.extent()])
-
- var brushBGenter = brushBG.enter()
- .append('g');
-
- brushBGenter.append('rect')
- .attr('class', 'left')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- brushBGenter.append('rect')
- .attr('class', 'right')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- var gBrush = g.select('.nv-x.nv-brush')
- .call(brush);
- gBrush.selectAll('rect')
- //.attr('y', -5)
- .attr('height', availableHeight2);
- gBrush.selectAll('.resize').append('path').attr('d', resizePath);
-
- //------------------------------------------------------------
-
- //------------------------------------------------------------
- // Setup Secondary (Context) Axes
-
- x2Axis
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight2, 0);
-
- g.select('.nv-context .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y3.range()[0] + ')');
- g.select('.nv-context .nv-x.nv-axis').transition()
- .call(x2Axis);
-
-
- y3Axis
- .scale(y3)
- .ticks( availableHeight2 / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-context .nv-y1.nv-axis')
- .style('opacity', dataBars.length ? 1 : 0)
- .attr('transform', 'translate(0,' + x2.range()[0] + ')');
-
- g.select('.nv-context .nv-y1.nv-axis').transition()
- .call(y3Axis);
-
-
- y4Axis
- .scale(y4)
- .ticks( availableHeight2 / 36 )
- .tickSize(dataBars.length ? 0 : -availableWidth, 0); // Show the y2 rules only if y1 has none
-
- g.select('.nv-context .nv-y2.nv-axis')
- .style('opacity', dataLines.length ? 1 : 0)
- .attr('transform', 'translate(' + x2.range()[1] + ',0)');
-
- g.select('.nv-context .nv-y2.nv-axis').transition()
- .call(y4Axis);
-
- //------------------------------------------------------------
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('stateChange', function(newState) {
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
-
- //============================================================
- // Functions
- //------------------------------------------------------------
-
- // Taken from crossfilter (http://square.github.com/crossfilter/)
- function resizePath(d) {
- var e = +(d == 'e'),
- x = e ? 1 : -1,
- y = availableHeight2 / 3;
- return 'M' + (.5 * x) + ',' + y
- + 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6)
- + 'V' + (2 * y - 6)
- + 'A6,6 0 0 ' + e + ' ' + (.5 * x) + ',' + (2 * y)
- + 'Z'
- + 'M' + (2.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8)
- + 'M' + (4.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8);
- }
-
-
- function updateBrushBG() {
- if (!brush.empty()) brush.extent(brushExtent);
- brushBG
- .data([brush.empty() ? x2.domain() : brushExtent])
- .each(function(d,i) {
- var leftWidth = x2(d[0]) - x2.range()[0],
- rightWidth = x2.range()[1] - x2(d[1]);
- d3.select(this).select('.left')
- .attr('width', leftWidth < 0 ? 0 : leftWidth);
-
- d3.select(this).select('.right')
- .attr('x', x2(d[1]))
- .attr('width', rightWidth < 0 ? 0 : rightWidth);
- });
- }
-
-
- function onBrush() {
- brushExtent = brush.empty() ? null : brush.extent();
- extent = brush.empty() ? x2.domain() : brush.extent();
-
-
- dispatch.brush({extent: extent, brush: brush});
-
- updateBrushBG();
-
-
- //------------------------------------------------------------
- // Prepare Main (Focus) Bars and Lines
-
- bars
- .width(availableWidth)
- .height(availableHeight1)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && data[i].bar }));
-
-
- lines
- .width(availableWidth)
- .height(availableHeight1)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].bar }));
-
- var focusBarsWrap = g.select('.nv-focus .nv-barsWrap')
- .datum(!dataBars.length ? [{values:[]}] :
- dataBars
- .map(function(d,i) {
- return {
- key: d.key,
- values: d.values.filter(function(d,i) {
- return bars.x()(d,i) >= extent[0] && bars.x()(d,i) <= extent[1];
- })
- }
- })
- );
-
- var focusLinesWrap = g.select('.nv-focus .nv-linesWrap')
- .datum(dataLines[0].disabled ? [{values:[]}] :
- dataLines
- .map(function(d,i) {
- return {
- key: d.key,
- values: d.values.filter(function(d,i) {
- return lines.x()(d,i) >= extent[0] && lines.x()(d,i) <= extent[1];
- })
- }
- })
- );
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Update Main (Focus) X Axis
-
- if (dataBars.length) {
- x = bars.xScale();
- } else {
- x = lines.xScale();
- }
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight1, 0);
-
- xAxis.domain([Math.ceil(extent[0]), Math.floor(extent[1])]);
-
- g.select('.nv-x.nv-axis').transition().duration(transitionDuration)
- .call(xAxis);
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Update Main (Focus) Bars and Lines
-
- focusBarsWrap.transition().duration(transitionDuration).call(bars);
- focusLinesWrap.transition().duration(transitionDuration).call(lines);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup and Update Main (Focus) Y Axes
-
- g.select('.nv-focus .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y1.range()[0] + ')');
-
-
- y1Axis
- .scale(y1)
- .ticks( availableHeight1 / 36 )
- .tickSize(-availableWidth, 0);
-
- g.select('.nv-focus .nv-y1.nv-axis')
- .style('opacity', dataBars.length ? 1 : 0);
-
-
- y2Axis
- .scale(y2)
- .ticks( availableHeight1 / 36 )
- .tickSize(dataBars.length ? 0 : -availableWidth, 0); // Show the y2 rules only if y1 has none
-
- g.select('.nv-focus .nv-y2.nv-axis')
- .style('opacity', dataLines.length ? 1 : 0)
- .attr('transform', 'translate(' + x.range()[1] + ',0)');
-
- g.select('.nv-focus .nv-y1.nv-axis').transition().duration(transitionDuration)
- .call(y1Axis);
- g.select('.nv-focus .nv-y2.nv-axis').transition().duration(transitionDuration)
- .call(y2Axis);
- }
-
- //============================================================
-
- onBrush();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.legend = legend;
- chart.lines = lines;
- chart.lines2 = lines2;
- chart.bars = bars;
- chart.bars2 = bars2;
- chart.xAxis = xAxis;
- chart.x2Axis = x2Axis;
- chart.y1Axis = y1Axis;
- chart.y2Axis = y2Axis;
- chart.y3Axis = y3Axis;
- chart.y4Axis = y4Axis;
-
- d3.rebind(chart, lines, 'defined', 'size', 'clipVoronoi', 'interpolate');
- //TODO: consider rebinding x, y and some other stuff, and simply do soemthign lile bars.x(lines.x()), etc.
- //d3.rebind(chart, lines, 'x', 'y', 'size', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- lines.x(_);
- bars.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- lines.y(_);
- bars.y(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.brushExtent = function(_) {
- if (!arguments.length) return brushExtent;
- brushExtent = _;
- return chart;
- };
-
-
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/lineWithFisheye.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/lineWithFisheye.js
deleted file mode 100644
index 2b411672..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/lineWithFisheye.js
+++ /dev/null
@@ -1,200 +0,0 @@
-
-nv.models.line = function() {
- "use strict";
- //Default Settings
- var margin = {top: 0, right: 0, bottom: 0, left: 0},
- width = 960,
- height = 500,
- color = nv.utils.defaultColor(), // function that returns colors
- id = Math.floor(Math.random() * 10000), //Create semi-unique ID incase user doesn't select one
- getX = function(d) { return d.x }, // accessor to get the x value from a data point
- getY = function(d) { return d.y }, // accessor to get the y value from a data point
- clipEdge = false, // if true, masks lines within x and y scale
- interpolate = "linear"; // controls the line interpolation
-
-
- var scatter = nv.models.scatter()
- .id(id)
- .size(16) // default size
- .sizeDomain([16,256]), //set to speed up calculation, needs to be unset if there is a custom size accessor
- //x = scatter.xScale(),
- //y = scatter.yScale(),
- x, y,
- x0, y0, timeoutID;
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom;
-
- //get the scales inscase scatter scale was set manually
- x = x || scatter.xScale();
- y = y || scatter.yScale();
-
- //store old scales if they exist
- x0 = x0 || x;
- y0 = y0 || y;
-
-
- var wrap = d3.select(this).selectAll('g.nv-wrap.nv-line').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-line');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- wrapEnter.append('g').attr('class', 'nv-scatterWrap');
- var scatterWrap = wrap.select('.nv-scatterWrap').datum(data);
-
- gEnter.append('g').attr('class', 'nv-groups');
-
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
-
- d3.transition(scatterWrap).call(scatter);
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
-
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
- scatterWrap
- .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- d3.transition(groups.exit())
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i) })
- d3.transition(groups)
- .style('stroke-opacity', 1)
- .style('fill-opacity', .5)
-
-
- var paths = groups.selectAll('path')
- .data(function(d, i) { return [d.values] });
- paths.enter().append('path')
- .attr('class', 'nv-line')
- .attr('d', d3.svg.line()
- .interpolate(interpolate)
- .x(function(d,i) { return x0(getX(d,i)) })
- .y(function(d,i) { return y0(getY(d,i)) })
- );
- d3.transition(groups.exit().selectAll('path'))
- .attr('d', d3.svg.line()
- .interpolate(interpolate)
- .x(function(d,i) { return x(getX(d,i)) })
- .y(function(d,i) { return y(getY(d,i)) })
- )
- .remove(); // redundant? line is already being removed
- d3.transition(paths)
- .attr('d', d3.svg.line()
- .interpolate(interpolate)
- .x(function(d,i) { return x(getX(d,i)) })
- .y(function(d,i) { return y(getY(d,i)) })
- );
-
-
- //store old scales for use in transitions on update, to animate from old to new positions
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- chart.dispatch = scatter.dispatch;
-
- d3.rebind(chart, scatter, 'interactive', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'xRange', 'yRange', 'sizeDomain', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'clipRadius');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- scatter.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- scatter.y(_);
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- scatter.color(color);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.interpolate = function(_) {
- if (!arguments.length) return interpolate;
- interpolate = _;
- return chart;
- };
-
- chart.defined = function(_) {
- if (!arguments.length) return defined;
- defined = _;
- return chart;
- };
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/lineWithFisheyeChart.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/lineWithFisheyeChart.js
deleted file mode 100644
index ad894190..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/lineWithFisheyeChart.js
+++ /dev/null
@@ -1,297 +0,0 @@
-
-nv.models.lineChart = function() {
- "use strict";
- var margin = {top: 30, right: 20, bottom: 50, left: 60},
- color = nv.utils.defaultColor(),
- width = null,
- height = null,
- showLegend = true,
- showControls = true,
- fisheye = 0,
- pauseFisheye = false,
- tooltips = true,
- tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- },
- noData = "No Data Available."
- ;
-
-
- var x = d3.fisheye.scale(d3.scale.linear).distortion(0);
-
- var lines = nv.models.line().xScale(x),
- //x = lines.xScale(),
- y = lines.yScale(),
- xAxis = nv.models.axis().scale(x).orient('bottom').tickPadding(5),
- yAxis = nv.models.axis().scale(y).orient('left'),
- legend = nv.models.legend().height(30),
- controls = nv.models.legend().height(30).updateState(false),
- dispatch = d3.dispatch('tooltipShow', 'tooltipHide');
-
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
-
- var controlsData = [
- { key: 'Magnify', disabled: true }
- ];
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart) };
- chart.container = this; // I need a reference to the container in order to have outside code check if the chart is visible or not
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- container.append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('x', availableWidth / 2)
- .attr('y', availableHeight / 2)
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle')
- .text(noData);
- return chart;
- } else {
- container.select('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
-
- var wrap = container.selectAll('g.nv-wrap.nv-lineChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-lineChart').append('g');
-
-
- gEnter.append('rect')
- .attr('class', 'nvd3 nv-background')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-linesWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
-
- var g = wrap.select('g');
-
-
-
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- if (showControls) {
- controls.width(180).color(['#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
-
-
- lines
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
-
-
-
- g.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- var linesWrap = g.select('.nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(linesWrap).call(lines);
-
-
-
- xAxis
- //.scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
-
-
- yAxis
- //.scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
-
-
-
- g.select('.nv-background').on('mousemove', updateFisheye);
- g.select('.nv-background').on('click', function() { pauseFisheye = !pauseFisheye; });
- //g.select('.point-paths').on('mousemove', updateFisheye);
-
-
- function updateFisheye() {
- if (pauseFisheye) {
- //g.select('.background') .style('pointer-events', 'none');
- g.select('.nv-point-paths').style('pointer-events', 'all');
- return false;
- }
-
- g.select('.nv-background') .style('pointer-events', 'all');
- g.select('.nv-point-paths').style('pointer-events', 'none' );
-
- var mouse = d3.mouse(this);
- linesWrap.call(lines);
- g.select('.nv-x.nv-axis').call(xAxis);
- x.distortion(fisheye).focus(mouse[0]);
- }
-
-
- controls.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- fisheye = d.disabled ? 0 : 5;
- g.select('.nv-background') .style('pointer-events', d.disabled ? 'none' : 'all');
- g.select('.nv-point-paths').style('pointer-events', d.disabled ? 'all' : 'none' );
-
- //scatter.interactive(d.disabled);
- //tooltips = d.disabled;
-
- if (d.disabled) {
- x.distortion(fisheye).focus(0);
-
- linesWrap.call(lines);
- g.select('.nv-x.nv-axis').call(xAxis);
- } else {
- pauseFisheye = false;
- }
-
- chart.update();
- });
-
-
- legend.dispatch.on('stateChange', function(newState) {
- chart.update();
- });
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
- if (tooltips) dispatch.on('tooltipShow', function(e) { showTooltip(e, that.parentNode) } ); // TODO: maybe merge with above?
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
- if (tooltips) dispatch.on('tooltipHide', nv.tooltip.cleanup);
-
- });
-
- return chart;
- }
-
-
- chart.dispatch = dispatch;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, lines, 'defined', 'x', 'y', 'size', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id', 'interpolate');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/lineWithFocusChart.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/lineWithFocusChart.js
deleted file mode 100644
index 0afd28bd..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/lineWithFocusChart.js
+++ /dev/null
@@ -1,574 +0,0 @@
-nv.models.lineWithFocusChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , lines2 = nv.models.line()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , x2Axis = nv.models.axis()
- , y2Axis = nv.models.axis()
- , legend = nv.models.legend()
- , brush = d3.svg.brush()
- ;
-
- var margin = {top: 30, right: 30, bottom: 30, left: 60}
- , margin2 = {top: 0, right: 30, bottom: 20, left: 60}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , height2 = 100
- , x
- , y
- , x2
- , y2
- , showLegend = true
- , brushExtent = null
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'brush')
- , transitionDuration = 250
- ;
-
- lines
- .clipEdge(true)
- ;
- lines2
- .interactive(false)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(5)
- ;
- yAxis
- .orient('left')
- ;
- x2Axis
- .orient('bottom')
- .tickPadding(5)
- ;
- y2Axis
- .orient('left')
- ;
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2,
- availableHeight2 = height2 - margin2.top - margin2.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart) };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight1 / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = lines.xScale();
- y = lines.yScale();
- x2 = lines2.xScale();
- y2 = lines2.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-lineWithFocusChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-lineWithFocusChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- var focusEnter = gEnter.append('g').attr('class', 'nv-focus');
- focusEnter.append('g').attr('class', 'nv-x nv-axis');
- focusEnter.append('g').attr('class', 'nv-y nv-axis');
- focusEnter.append('g').attr('class', 'nv-linesWrap');
-
- var contextEnter = gEnter.append('g').attr('class', 'nv-context');
- contextEnter.append('g').attr('class', 'nv-x nv-axis');
- contextEnter.append('g').attr('class', 'nv-y nv-axis');
- contextEnter.append('g').attr('class', 'nv-linesWrap');
- contextEnter.append('g').attr('class', 'nv-brushBackground');
- contextEnter.append('g').attr('class', 'nv-x nv-brush');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- lines
- .width(availableWidth)
- .height(availableHeight1)
- .color(
- data
- .map(function(d,i) {
- return d.color || color(d, i);
- })
- .filter(function(d,i) {
- return !data[i].disabled;
- })
- );
-
- lines2
- .defined(lines.defined())
- .width(availableWidth)
- .height(availableHeight2)
- .color(
- data
- .map(function(d,i) {
- return d.color || color(d, i);
- })
- .filter(function(d,i) {
- return !data[i].disabled;
- })
- );
-
- g.select('.nv-context')
- .attr('transform', 'translate(0,' + ( availableHeight1 + margin.bottom + margin2.top) + ')')
-
- var contextLinesWrap = g.select('.nv-context .nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(contextLinesWrap).call(lines2);
-
- //------------------------------------------------------------
-
-
- /*
- var focusLinesWrap = g.select('.nv-focus .nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(focusLinesWrap).call(lines);
- */
-
-
- //------------------------------------------------------------
- // Setup Main (Focus) Axes
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight1, 0);
-
- yAxis
- .scale(y)
- .ticks( availableHeight1 / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-focus .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + availableHeight1 + ')');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Brush
-
- brush
- .x(x2)
- .on('brush', function() {
- //When brushing, turn off transitions because chart needs to change immediately.
- var oldTransition = chart.transitionDuration();
- chart.transitionDuration(0);
- onBrush();
- chart.transitionDuration(oldTransition);
- });
-
- if (brushExtent) brush.extent(brushExtent);
-
- var brushBG = g.select('.nv-brushBackground').selectAll('g')
- .data([brushExtent || brush.extent()])
-
- var brushBGenter = brushBG.enter()
- .append('g');
-
- brushBGenter.append('rect')
- .attr('class', 'left')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- brushBGenter.append('rect')
- .attr('class', 'right')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- var gBrush = g.select('.nv-x.nv-brush')
- .call(brush);
- gBrush.selectAll('rect')
- //.attr('y', -5)
- .attr('height', availableHeight2);
- gBrush.selectAll('.resize').append('path').attr('d', resizePath);
-
- onBrush();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Secondary (Context) Axes
-
- x2Axis
- .scale(x2)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight2, 0);
-
- g.select('.nv-context .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y2.range()[0] + ')');
- d3.transition(g.select('.nv-context .nv-x.nv-axis'))
- .call(x2Axis);
-
-
- y2Axis
- .scale(y2)
- .ticks( availableHeight2 / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-context .nv-y.nv-axis'))
- .call(y2Axis);
-
- g.select('.nv-context .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y2.range()[0] + ')');
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('stateChange', function(newState) {
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
-
- //============================================================
- // Functions
- //------------------------------------------------------------
-
- // Taken from crossfilter (http://square.github.com/crossfilter/)
- function resizePath(d) {
- var e = +(d == 'e'),
- x = e ? 1 : -1,
- y = availableHeight2 / 3;
- return 'M' + (.5 * x) + ',' + y
- + 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6)
- + 'V' + (2 * y - 6)
- + 'A6,6 0 0 ' + e + ' ' + (.5 * x) + ',' + (2 * y)
- + 'Z'
- + 'M' + (2.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8)
- + 'M' + (4.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8);
- }
-
-
- function updateBrushBG() {
- if (!brush.empty()) brush.extent(brushExtent);
- brushBG
- .data([brush.empty() ? x2.domain() : brushExtent])
- .each(function(d,i) {
- var leftWidth = x2(d[0]) - x.range()[0],
- rightWidth = x.range()[1] - x2(d[1]);
- d3.select(this).select('.left')
- .attr('width', leftWidth < 0 ? 0 : leftWidth);
-
- d3.select(this).select('.right')
- .attr('x', x2(d[1]))
- .attr('width', rightWidth < 0 ? 0 : rightWidth);
- });
- }
-
-
- function onBrush() {
- brushExtent = brush.empty() ? null : brush.extent();
- var extent = brush.empty() ? x2.domain() : brush.extent();
-
- //The brush extent cannot be less than one. If it is, don't update the line chart.
- if (Math.abs(extent[0] - extent[1]) <= 1) {
- return;
- }
-
- dispatch.brush({extent: extent, brush: brush});
-
-
- updateBrushBG();
-
- // Update Main (Focus)
- var focusLinesWrap = g.select('.nv-focus .nv-linesWrap')
- .datum(
- data
- .filter(function(d) { return !d.disabled })
- .map(function(d,i) {
- return {
- key: d.key,
- values: d.values.filter(function(d,i) {
- return lines.x()(d,i) >= extent[0] && lines.x()(d,i) <= extent[1];
- })
- }
- })
- );
- focusLinesWrap.transition().duration(transitionDuration).call(lines);
-
-
- // Update Main (Focus) Axes
- g.select('.nv-focus .nv-x.nv-axis').transition().duration(transitionDuration)
- .call(xAxis);
- g.select('.nv-focus .nv-y.nv-axis').transition().duration(transitionDuration)
- .call(yAxis);
- }
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.legend = legend;
- chart.lines = lines;
- chart.lines2 = lines2;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.x2Axis = x2Axis;
- chart.y2Axis = y2Axis;
-
- d3.rebind(chart, lines, 'defined', 'isArea', 'size', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return lines.x;
- lines.x(_);
- lines2.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return lines.y;
- lines.y(_);
- lines2.y(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.margin2 = function(_) {
- if (!arguments.length) return margin2;
- margin2 = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.height2 = function(_) {
- if (!arguments.length) return height2;
- height2 = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color =nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.interpolate = function(_) {
- if (!arguments.length) return lines.interpolate();
- lines.interpolate(_);
- lines2.interpolate(_);
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- // Chart has multiple similar Axes, to prevent code duplication, probably need to link all axis functions manually like below
- chart.xTickFormat = function(_) {
- if (!arguments.length) return xAxis.tickFormat();
- xAxis.tickFormat(_);
- x2Axis.tickFormat(_);
- return chart;
- };
-
- chart.yTickFormat = function(_) {
- if (!arguments.length) return yAxis.tickFormat();
- yAxis.tickFormat(_);
- y2Axis.tickFormat(_);
- return chart;
- };
-
- chart.brushExtent = function(_) {
- if (!arguments.length) return brushExtent;
- brushExtent = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/multiBar.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/multiBar.js
deleted file mode 100644
index 1085919b..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/multiBar.js
+++ /dev/null
@@ -1,461 +0,0 @@
-
-nv.models.multiBar = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , x = d3.scale.ordinal()
- , y = d3.scale.linear()
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceY = [0] // 0 is forced by default.. this makes sense for the majority of bar graphs... user can always do chart.forceY([]) to remove
- , clipEdge = true
- , stacked = false
- , stackOffset = 'zero' // options include 'silhouette', 'wiggle', 'expand', 'zero', or a custom function
- , color = nv.utils.defaultColor()
- , hideable = false
- , barColor = null // adding the ability to set the color for each rather than the whole group
- , disabled // used in conjunction with barColor to communicate from multiBarHorizontalChart what series are disabled
- , delay = 1200
- , xDomain
- , yDomain
- , xRange
- , yRange
- , groupSpacing = 0.1
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0 //used to store previous scales
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- if(hideable && data.length) hideable = [{
- values: data[0].values.map(function(d) {
- return {
- x: d.x,
- y: 0,
- series: d.series,
- size: 0.01
- };}
- )}];
-
- if (stacked)
- data = d3.layout.stack()
- .offset(stackOffset)
- .values(function(d){ return d.values })
- .y(getY)
- (!data.length && hideable ? hideable : data);
-
-
- //add series index to each data point for reference
- data.forEach(function(series, i) {
- series.values.forEach(function(point) {
- point.series = i;
- });
- });
-
-
- //------------------------------------------------------------
- // HACK for negative value stacking
- if (stacked)
- data[0].values.map(function(d,i) {
- var posBase = 0, negBase = 0;
- data.map(function(d) {
- var f = d.values[i]
- f.size = Math.abs(f.y);
- if (f.y<0) {
- f.y1 = negBase;
- negBase = negBase - f.size;
- } else
- {
- f.y1 = f.size + posBase;
- posBase = posBase + f.size;
- }
- });
- });
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain) ? [] : // if we know xDomain and yDomain, no need to calculate
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), y0: d.y0, y1: d.y1 }
- })
- });
-
- x .domain(xDomain || d3.merge(seriesData).map(function(d) { return d.x }))
- .rangeBands(xRange || [0, availableWidth], groupSpacing);
-
- //y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.y + (stacked ? d.y1 : 0) }).concat(forceY)))
- y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return stacked ? (d.y > 0 ? d.y1 : d.y1 + d.y ) : d.y }).concat(forceY)))
- .range(yRange || [availableHeight, 0]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multibar').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multibar');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- gEnter.append('g').attr('class', 'nv-groups');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d,i) { return i });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- groups.exit()
- .transition()
- .selectAll('rect.nv-bar')
- .delay(function(d,i) {
- return i * delay/ data[0].values.length;
- })
- .attr('y', function(d) { return stacked ? y0(d.y0) : y0(0) })
- .attr('height', 0)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i) });
- groups
- .transition()
- .style('stroke-opacity', 1)
- .style('fill-opacity', .75);
-
-
- var bars = groups.selectAll('rect.nv-bar')
- .data(function(d) { return (hideable && !data.length) ? hideable.values : d.values });
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('rect')
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
- .attr('x', function(d,i,j) {
- return stacked ? 0 : (j * x.rangeBand() / data.length )
- })
- .attr('y', function(d) { return y0(stacked ? d.y0 : 0) })
- .attr('height', 0)
- .attr('width', x.rangeBand() / (stacked ? 1 : data.length) )
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',0)'; })
- ;
- bars
- .style('fill', function(d,i,j){ return color(d, j, i); })
- .style('stroke', function(d,i,j){ return color(d, j, i); })
- .on('mouseover', function(d,i) { //TODO: figure out why j works above, but not here
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- });
- bars
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
- .transition()
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',0)'; })
-
- if (barColor) {
- if (!disabled) disabled = data.map(function() { return true });
- bars
- .style('fill', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); })
- .style('stroke', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); });
- }
-
-
- if (stacked)
- bars.transition()
- .delay(function(d,i) {
-
- return i * delay / data[0].values.length;
- })
- .attr('y', function(d,i) {
-
- return y((stacked ? d.y1 : 0));
- })
- .attr('height', function(d,i) {
- return Math.max(Math.abs(y(d.y + (stacked ? d.y0 : 0)) - y((stacked ? d.y0 : 0))),1);
- })
- .attr('x', function(d,i) {
- return stacked ? 0 : (d.series * x.rangeBand() / data.length )
- })
- .attr('width', x.rangeBand() / (stacked ? 1 : data.length) );
- else
- bars.transition()
- .delay(function(d,i) {
- return i * delay/ data[0].values.length;
- })
- .attr('x', function(d,i) {
- return d.series * x.rangeBand() / data.length
- })
- .attr('width', x.rangeBand() / data.length)
- .attr('y', function(d,i) {
- return getY(d,i) < 0 ?
- y(0) :
- y(0) - y(getY(d,i)) < 1 ?
- y(0) - 1 :
- y(getY(d,i)) || 0;
- })
- .attr('height', function(d,i) {
- return Math.max(Math.abs(y(getY(d,i)) - y(0)),1) || 0;
- });
-
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.stacked = function(_) {
- if (!arguments.length) return stacked;
- stacked = _;
- return chart;
- };
-
- chart.stackOffset = function(_) {
- if (!arguments.length) return stackOffset;
- stackOffset = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.barColor = function(_) {
- if (!arguments.length) return barColor;
- barColor = nv.utils.getColor(_);
- return chart;
- };
-
- chart.disabled = function(_) {
- if (!arguments.length) return disabled;
- disabled = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.hideable = function(_) {
- if (!arguments.length) return hideable;
- hideable = _;
- return chart;
- };
-
- chart.delay = function(_) {
- if (!arguments.length) return delay;
- delay = _;
- return chart;
- };
-
- chart.groupSpacing = function(_) {
- if (!arguments.length) return groupSpacing;
- groupSpacing = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/multiBarChart.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/multiBarChart.js
deleted file mode 100644
index 0323063f..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/multiBarChart.js
+++ /dev/null
@@ -1,524 +0,0 @@
-
-nv.models.multiBarChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var multibar = nv.models.multiBar()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , showControls = true
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , reduceXTicks = true // if false a tick will show for every data point
- , staggerLabels = false
- , rotateLabels = 0
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' on ' + x + '</p>'
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , state = { stacked: false }
- , defaultState = null
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , controlWidth = function() { return showControls ? 180 : 0 }
- , transitionDuration = 250
- ;
-
- multibar
- .stacked(false)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(7)
- .highlightZero(true)
- .showMaxMin(false)
- .tickFormat(function(d) { return d })
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- .tickFormat(d3.format(',.1f'))
- ;
-
- controls.updateState(false);
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(multibar.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(multibar.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = multibar.xScale();
- y = multibar.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multiBarWithLegend').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multiBarWithLegend').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth - controlWidth());
-
- if (multibar.barColor())
- data.forEach(function(series,i) {
- series.color = d3.rgb('#ccc').darker(i * 1.5).toString();
- })
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + controlWidth() + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Grouped', disabled: multibar.stacked() },
- { key: 'Stacked', disabled: !multibar.stacked() }
- ];
-
- controls.width(controlWidth()).color(['#444', '#444', '#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- multibar
- .disabled(data.map(function(series) { return series.disabled }))
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- barsWrap.transition().call(multibar);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- g.select('.nv-x.nv-axis').transition()
- .call(xAxis);
-
- var xTicks = g.select('.nv-x.nv-axis > g').selectAll('g');
-
- xTicks
- .selectAll('line, text')
- .style('opacity', 1)
-
- if (staggerLabels) {
- var getTranslate = function(x,y) {
- return "translate(" + x + "," + y + ")";
- };
-
- var staggerUp = 5, staggerDown = 17; //pixels to stagger by
- // Issue #140
- xTicks
- .selectAll("text")
- .attr('transform', function(d,i,j) {
- return getTranslate(0, (j % 2 == 0 ? staggerUp : staggerDown));
- });
-
- var totalInBetweenTicks = d3.selectAll(".nv-x.nv-axis .nv-wrap g g text")[0].length;
- g.selectAll(".nv-x.nv-axis .nv-axisMaxMin text")
- .attr("transform", function(d,i) {
- return getTranslate(0, (i === 0 || totalInBetweenTicks % 2 !== 0) ? staggerDown : staggerUp);
- });
- }
-
- if (reduceXTicks)
- xTicks
- .filter(function(d,i) {
- return i % Math.ceil(data[0].values.length / (availableWidth / 100)) !== 0;
- })
- .selectAll('text, line')
- .style('opacity', 0);
-
- if(rotateLabels)
- xTicks
- .selectAll('.tick text')
- .attr('transform', 'rotate(' + rotateLabels + ' 0,0)')
- .style('text-anchor', rotateLabels > 0 ? 'start' : 'end');
-
- g.select('.nv-x.nv-axis').selectAll('g.nv-axisMaxMin text')
- .style('opacity', 1);
- }
-
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis').transition()
- .call(yAxis);
- }
-
-
- //------------------------------------------------------------
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('stateChange', function(newState) {
- state = newState;
- dispatch.stateChange(state);
- chart.update();
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- if (!d.disabled) return;
- controlsData = controlsData.map(function(s) {
- s.disabled = true;
- return s;
- });
- d.disabled = false;
-
- switch (d.key) {
- case 'Grouped':
- multibar.stacked(false);
- break;
- case 'Stacked':
- multibar.stacked(true);
- break;
- }
-
- state.stacked = multibar.stacked();
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode)
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- if (typeof e.stacked !== 'undefined') {
- multibar.stacked(e.stacked);
- state.stacked = e.stacked;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- multibar.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- multibar.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.multibar = multibar;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, multibar, 'x', 'y', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'clipEdge',
- 'id', 'stacked', 'stackOffset', 'delay', 'barColor','groupSpacing');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.reduceXTicks= function(_) {
- if (!arguments.length) return reduceXTicks;
- reduceXTicks = _;
- return chart;
- };
-
- chart.rotateLabels = function(_) {
- if (!arguments.length) return rotateLabels;
- rotateLabels = _;
- return chart;
- }
-
- chart.staggerLabels = function(_) {
- if (!arguments.length) return staggerLabels;
- staggerLabels = _;
- return chart;
- };
-
- chart.tooltip = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/multiBarHorizontal.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/multiBarHorizontal.js
deleted file mode 100644
index d16d4605..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/multiBarHorizontal.js
+++ /dev/null
@@ -1,424 +0,0 @@
-
-nv.models.multiBarHorizontal = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.ordinal()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceY = [0] // 0 is forced by default.. this makes sense for the majority of bar graphs... user can always do chart.forceY([]) to remove
- , color = nv.utils.defaultColor()
- , barColor = null // adding the ability to set the color for each rather than the whole group
- , disabled // used in conjunction with barColor to communicate from multiBarHorizontalChart what series are disabled
- , stacked = false
- , showValues = false
- , valuePadding = 60
- , valueFormat = d3.format(',.2f')
- , delay = 1200
- , xDomain
- , yDomain
- , xRange
- , yRange
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0 //used to store previous scales
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- if (stacked)
- data = d3.layout.stack()
- .offset('zero')
- .values(function(d){ return d.values })
- .y(getY)
- (data);
-
-
- //add series index to each data point for reference
- data.forEach(function(series, i) {
- series.values.forEach(function(point) {
- point.series = i;
- });
- });
-
-
-
- //------------------------------------------------------------
- // HACK for negative value stacking
- if (stacked)
- data[0].values.map(function(d,i) {
- var posBase = 0, negBase = 0;
- data.map(function(d) {
- var f = d.values[i]
- f.size = Math.abs(f.y);
- if (f.y<0) {
- f.y1 = negBase - f.size;
- negBase = negBase - f.size;
- } else
- {
- f.y1 = posBase;
- posBase = posBase + f.size;
- }
- });
- });
-
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain) ? [] : // if we know xDomain and yDomain, no need to calculate
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), y0: d.y0, y1: d.y1 }
- })
- });
-
- x .domain(xDomain || d3.merge(seriesData).map(function(d) { return d.x }))
- .rangeBands(xRange || [0, availableHeight], .1);
-
- //y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.y + (stacked ? d.y0 : 0) }).concat(forceY)))
- y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return stacked ? (d.y > 0 ? d.y1 + d.y : d.y1 ) : d.y }).concat(forceY)))
-
- if (showValues && !stacked)
- y.range(yRange || [(y.domain()[0] < 0 ? valuePadding : 0), availableWidth - (y.domain()[1] > 0 ? valuePadding : 0) ]);
- else
- y.range(yRange || [0, availableWidth]);
-
- x0 = x0 || x;
- y0 = y0 || d3.scale.linear().domain(y.domain()).range([y(0),y(0)]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('g.nv-wrap.nv-multibarHorizontal').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multibarHorizontal');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-groups');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d,i) { return i });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- groups.exit().transition()
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i) });
- groups.transition()
- .style('stroke-opacity', 1)
- .style('fill-opacity', .75);
-
-
- var bars = groups.selectAll('g.nv-bar')
- .data(function(d) { return d.values });
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('g')
- .attr('transform', function(d,i,j) {
- return 'translate(' + y0(stacked ? d.y0 : 0) + ',' + (stacked ? 0 : (j * x.rangeBand() / data.length ) + x(getX(d,i))) + ')'
- });
-
- barsEnter.append('rect')
- .attr('width', 0)
- .attr('height', x.rangeBand() / (stacked ? 1 : data.length) )
-
- bars
- .on('mouseover', function(d,i) { //TODO: figure out why j works above, but not here
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [ y(getY(d,i) + (stacked ? d.y0 : 0)), x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length) ],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- });
-
-
- barsEnter.append('text');
-
- if (showValues && !stacked) {
- bars.select('text')
- .attr('text-anchor', function(d,i) { return getY(d,i) < 0 ? 'end' : 'start' })
- .attr('y', x.rangeBand() / (data.length * 2))
- .attr('dy', '.32em')
- .text(function(d,i) { return valueFormat(getY(d,i)) })
- bars.transition()
- .select('text')
- .attr('x', function(d,i) { return getY(d,i) < 0 ? -4 : y(getY(d,i)) - y(0) + 4 })
- } else {
- bars.selectAll('text').text('');
- }
-
- bars
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
-
- if (barColor) {
- if (!disabled) disabled = data.map(function() { return true });
- bars
- .style('fill', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); })
- .style('stroke', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); });
- }
-
- if (stacked)
- bars.transition()
- .attr('transform', function(d,i) {
- return 'translate(' + y(d.y1) + ',' + x(getX(d,i)) + ')'
- })
- .select('rect')
- .attr('width', function(d,i) {
- return Math.abs(y(getY(d,i) + d.y0) - y(d.y0))
- })
- .attr('height', x.rangeBand() );
- else
- bars.transition()
- .attr('transform', function(d,i) {
- //TODO: stacked must be all positive or all negative, not both?
- return 'translate(' +
- (getY(d,i) < 0 ? y(getY(d,i)) : y(0))
- + ',' +
- (d.series * x.rangeBand() / data.length
- +
- x(getX(d,i)) )
- + ')'
- })
- .select('rect')
- .attr('height', x.rangeBand() / data.length )
- .attr('width', function(d,i) {
- return Math.max(Math.abs(y(getY(d,i)) - y(0)),1)
- });
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.stacked = function(_) {
- if (!arguments.length) return stacked;
- stacked = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.barColor = function(_) {
- if (!arguments.length) return barColor;
- barColor = nv.utils.getColor(_);
- return chart;
- };
-
- chart.disabled = function(_) {
- if (!arguments.length) return disabled;
- disabled = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.delay = function(_) {
- if (!arguments.length) return delay;
- delay = _;
- return chart;
- };
-
- chart.showValues = function(_) {
- if (!arguments.length) return showValues;
- showValues = _;
- return chart;
- };
-
- chart.valueFormat= function(_) {
- if (!arguments.length) return valueFormat;
- valueFormat = _;
- return chart;
- };
-
- chart.valuePadding = function(_) {
- if (!arguments.length) return valuePadding;
- valuePadding = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/multiBarHorizontalChart.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/multiBarHorizontalChart.js
deleted file mode 100644
index 02aa6fa4..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/multiBarHorizontalChart.js
+++ /dev/null
@@ -1,434 +0,0 @@
-
-nv.models.multiBarHorizontalChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var multibar = nv.models.multiBarHorizontal()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend().height(30)
- , controls = nv.models.legend().height(30)
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , showControls = true
- , showLegend = true
- , stacked = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + ' - ' + x + '</h3>' +
- '<p>' + y + '</p>'
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , state = { stacked: stacked }
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , controlWidth = function() { return showControls ? 180 : 0 }
- , transitionDuration = 250
- ;
-
- multibar
- .stacked(stacked)
- ;
- xAxis
- .orient('left')
- .tickPadding(5)
- .highlightZero(false)
- .showMaxMin(false)
- .tickFormat(function(d) { return d })
- ;
- yAxis
- .orient('bottom')
- .tickFormat(d3.format(',.1f'))
- ;
-
- controls.updateState(false);
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(multibar.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(multibar.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'e' : 'w', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = multibar.xScale();
- y = multibar.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multiBarHorizontalChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multiBarHorizontalChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth - controlWidth());
-
- if (multibar.barColor())
- data.forEach(function(series,i) {
- series.color = d3.rgb('#ccc').darker(i * 1.5).toString();
- })
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + controlWidth() + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Grouped', disabled: multibar.stacked() },
- { key: 'Stacked', disabled: !multibar.stacked() }
- ];
-
- controls.width(controlWidth()).color(['#444', '#444', '#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- multibar
- .disabled(data.map(function(series) { return series.disabled }))
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- barsWrap.transition().call(multibar);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( availableHeight / 24 )
- .tickSize(-availableWidth, 0);
-
- g.select('.nv-x.nv-axis').transition()
- .call(xAxis);
-
- var xTicks = g.select('.nv-x.nv-axis').selectAll('g');
-
- xTicks
- .selectAll('line, text')
- .style('opacity', 1)
-
-
- yAxis
- .scale(y)
- .ticks( availableWidth / 100 )
- .tickSize( -availableHeight, 0);
-
- g.select('.nv-y.nv-axis')
- .attr('transform', 'translate(0,' + availableHeight + ')');
- g.select('.nv-y.nv-axis').transition()
- .call(yAxis);
-
- //------------------------------------------------------------
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('stateChange', function(newState) {
- state = newState;
- dispatch.stateChange(state);
- chart.update();
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- if (!d.disabled) return;
- controlsData = controlsData.map(function(s) {
- s.disabled = true;
- return s;
- });
- d.disabled = false;
-
- switch (d.key) {
- case 'Grouped':
- multibar.stacked(false);
- break;
- case 'Stacked':
- multibar.stacked(true);
- break;
- }
-
- state.stacked = multibar.stacked();
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- if (typeof e.stacked !== 'undefined') {
- multibar.stacked(e.stacked);
- state.stacked = e.stacked;
- }
-
- selection.call(chart);
- });
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- multibar.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- multibar.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.multibar = multibar;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, multibar, 'x', 'y', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'clipEdge', 'id', 'delay', 'showValues', 'valueFormat', 'stacked', 'barColor');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltip = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/multiBarTimeSeries.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/multiBarTimeSeries.js
deleted file mode 100644
index abc062c3..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/multiBarTimeSeries.js
+++ /dev/null
@@ -1,384 +0,0 @@
-nv.models.multiBarTimeSeries = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , x = d3.time.scale()
- , y = d3.scale.linear()
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceY = [0] // 0 is forced by default.. this makes sense for the majority of bar graphs... user can always do chart.forceY([]) to remove
- , clipEdge = true
- , stacked = false
- , color = nv.utils.defaultColor()
- , delay = 1200
- , xDomain
- , yDomain
- , xRange
- , yRange
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0 //used to store previous scales
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- if (stacked)
- data = d3.layout.stack()
- .offset('zero')
- .values(function(d){ return d.values })
- .y(getY)
- (data);
-
-
- //add series index to each data point for reference
- data.forEach(function(series, i) {
- series.values.forEach(function(point) {
- point.series = i;
- });
- });
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain) ? [] : // if we know xDomain and yDomain, no need to calculate
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), y0: d.y0 }
- })
- });
-
- x .domain(xDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.x })))
- .range(xRange || [0, availableWidth]);
-
- y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.y + (stacked ? d.y0 : 0) }).concat(forceY)))
- .range(yRange || [availableHeight, 0]);
-
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multibar').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multibar');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- gEnter.append('g').attr('class', 'nv-groups');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- d3.transition(groups.exit())
- //.style('stroke-opacity', 1e-6)
- //.style('fill-opacity', 1e-6)
- .selectAll('rect.nv-bar')
- .delay(function(d,i) { return i * delay/ data[0].values.length })
- .attr('y', function(d) { return stacked ? y0(d.y0) : y0(0) })
- .attr('height', 0)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i) });
- d3.transition(groups)
- .style('stroke-opacity', 1)
- .style('fill-opacity', .75);
-
-
- var bars = groups.selectAll('rect.nv-bar')
- .data(function(d) { return d.values });
-
- bars.exit().remove();
-
- var maxElements = 0;
- for(var ei=0; ei<seriesData.length; ei+=1) {
- maxElements = Math.max(seriesData[ei].length, maxElements);
- }
-
- var bandWidth = (availableWidth / maxElements)-0.1;
- var barWidth = bandWidth / data.length;
-
- var barsEnter = bars.enter().append('rect')
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
- .attr('x', function(d,i,j) {
- return stacked ? 0 : (i * bandWidth) + ( j * barWidth )
- })
- .attr('y', function(d) { return y0(stacked ? d.y0 : 0) })
- .attr('height', 0)
- .attr('width', stacked ? bandWidth : barWidth );
- bars
- .on('mouseover', function(d,i) { //TODO: figure out why j works above, but not here
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (barWidth * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (barWidth * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (barWidth * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- });
- bars
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',0)'; })
- if (stacked)
- d3.transition(bars)
- .delay(function(d,i) { return i * delay / data[0].values.length })
- .attr('y', function(d,i) {
- return y(getY(d,i) + (stacked ? d.y0 : 0));
- })
- .attr('height', function(d,i) {
- return Math.abs(y(d.y + (stacked ? d.y0 : 0)) - y((stacked ? d.y0 : 0)))
- })
- .each('end', function() {
- d3.transition(d3.select(this))
- .attr('x', function(d,i) {
- return stacked ? 0 : (i * bandWidth) + ( j * barWidth )
- })
- .attr('width', stacked ? bandWidth : barWidth );
- })
- else
- d3.transition(bars)
- .delay(function(d,i) { return i * delay/ data[0].values.length })
- .attr('x', function(d,i) {
- return d.series * barWidth
- })
- .attr('width', barWidth)
- .each('end', function() {
- d3.transition(d3.select(this))
- .attr('y', function(d,i) {
- return getY(d,i) < 0 ?
- y(0) :
- y(getY(d,i))
- })
- .attr('height', function(d,i) {
- return Math.abs(y(getY(d,i)) - y(0))
- });
- })
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.stacked = function(_) {
- if (!arguments.length) return stacked;
- stacked = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.delay = function(_) {
- if (!arguments.length) return delay;
- delay = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/multiBarTimeSeriesChart.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/multiBarTimeSeriesChart.js
deleted file mode 100644
index 5aebafa7..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/multiBarTimeSeriesChart.js
+++ /dev/null
@@ -1,405 +0,0 @@
-nv.models.multiBarTimeSeriesChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var multibar = nv.models.multiBarTimeSeries()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , showControls = true
- , showLegend = true
- , reduceXTicks = true // if false a tick will show for every data point
- , rotateLabels = 0
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' on ' + x + '</p>'
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide')
- ;
-
- multibar
- .stacked(false)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(7)
- .highlightZero(false)
- .showMaxMin(false)
- ;
- yAxis
- .orient('left')
- .tickFormat(d3.format(',.1f'))
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(multibar.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(multibar.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { selection.transition().call(chart) };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = multibar.xScale();
- y = multibar.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multiBarWithLegend').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multiBarWithLegend').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth / 2);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + (availableWidth / 2) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Grouped', disabled: multibar.stacked() },
- { key: 'Stacked', disabled: !multibar.stacked() }
- ];
-
- controls.width(180).color(['#444', '#444', '#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- multibar
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(barsWrap).call(multibar);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks(availableWidth / 100)
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
-
- var xTicks = g.select('.nv-x.nv-axis > g').selectAll('g');
-
- xTicks
- .selectAll('line, text')
- .style('opacity', 1)
-
- if (reduceXTicks)
- xTicks
- .filter(function(d,i) {
- return i % Math.ceil(data[0].values.length / (availableWidth / 100)) !== 0;
- })
- .selectAll('text, line')
- .style('opacity', 0);
-
- if(rotateLabels)
- xTicks
- .selectAll('text')
- .attr('transform', function(d,i,j) { return 'rotate('+rotateLabels+' 0,0)' })
- .attr('text-transform', rotateLabels > 0 ? 'start' : 'end');
-
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
-
- //------------------------------------------------------------
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- selection.transition().call(chart);
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- if (!d.disabled) return;
- controlsData = controlsData.map(function(s) {
- s.disabled = true;
- return s;
- });
- d.disabled = false;
-
- switch (d.key) {
- case 'Grouped':
- multibar.stacked(false);
- break;
- case 'Stacked':
- multibar.stacked(true);
- break;
- }
-
- selection.transition().call(chart);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode)
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- multibar.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- multibar.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.multibar = multibar;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, multibar, 'x', 'y', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'clipEdge', 'id', 'stacked', 'delay');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.reduceXTicks= function(_) {
- if (!arguments.length) return reduceXTicks;
- reduceXTicks = _;
- return chart;
- };
-
- chart.rotateLabels = function(_) {
- if (!arguments.length) return rotateLabels;
- rotateLabels = _;
- return chart;
- }
-
- chart.tooltip = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/multiChart.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/multiChart.js
deleted file mode 100644
index e3e2c5e8..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/multiChart.js
+++ /dev/null
@@ -1,452 +0,0 @@
-nv.models.multiChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60},
- color = d3.scale.category20().range(),
- width = null,
- height = null,
- showLegend = true,
- tooltips = true,
- tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- },
- x,
- y,
- yDomain1,
- yDomain2
- ; //can be accessed via chart.lines.[x/y]Scale()
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x = d3.scale.linear(),
- yScale1 = d3.scale.linear(),
- yScale2 = d3.scale.linear(),
-
- lines1 = nv.models.line().yScale(yScale1),
- lines2 = nv.models.line().yScale(yScale2),
-
- bars1 = nv.models.multiBar().stacked(false).yScale(yScale1),
- bars2 = nv.models.multiBar().stacked(false).yScale(yScale2),
-
- stack1 = nv.models.stackedArea().yScale(yScale1),
- stack2 = nv.models.stackedArea().yScale(yScale2),
-
- xAxis = nv.models.axis().scale(x).orient('bottom').tickPadding(5),
- yAxis1 = nv.models.axis().scale(yScale1).orient('left'),
- yAxis2 = nv.models.axis().scale(yScale2).orient('right'),
-
- legend = nv.models.legend().height(30),
- dispatch = d3.dispatch('tooltipShow', 'tooltipHide');
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines1.x()(e.point, e.pointIndex)),
- y = ((e.series.yAxis == 2) ? yAxis2 : yAxis1).tickFormat()(lines1.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, undefined, undefined, offsetElement.offsetParent);
- };
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- chart.update = function() { container.transition().call(chart); };
- chart.container = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- var dataLines1 = data.filter(function(d) {return !d.disabled && d.type == 'line' && d.yAxis == 1})
- var dataLines2 = data.filter(function(d) {return !d.disabled && d.type == 'line' && d.yAxis == 2})
- var dataBars1 = data.filter(function(d) {return !d.disabled && d.type == 'bar' && d.yAxis == 1})
- var dataBars2 = data.filter(function(d) {return !d.disabled && d.type == 'bar' && d.yAxis == 2})
- var dataStack1 = data.filter(function(d) {return !d.disabled && d.type == 'area' && d.yAxis == 1})
- var dataStack2 = data.filter(function(d) {return !d.disabled && d.type == 'area' && d.yAxis == 2})
-
- var series1 = data.filter(function(d) {return !d.disabled && d.yAxis == 1})
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: d.x, y: d.y }
- })
- })
-
- var series2 = data.filter(function(d) {return !d.disabled && d.yAxis == 2})
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: d.x, y: d.y }
- })
- })
-
- x .domain(d3.extent(d3.merge(series1.concat(series2)), function(d) { return d.x } ))
- .range([0, availableWidth]);
-
- var wrap = container.selectAll('g.wrap.multiChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'wrap nvd3 multiChart').append('g');
-
- gEnter.append('g').attr('class', 'x axis');
- gEnter.append('g').attr('class', 'y1 axis');
- gEnter.append('g').attr('class', 'y2 axis');
- gEnter.append('g').attr('class', 'lines1Wrap');
- gEnter.append('g').attr('class', 'lines2Wrap');
- gEnter.append('g').attr('class', 'bars1Wrap');
- gEnter.append('g').attr('class', 'bars2Wrap');
- gEnter.append('g').attr('class', 'stack1Wrap');
- gEnter.append('g').attr('class', 'stack2Wrap');
- gEnter.append('g').attr('class', 'legendWrap');
-
- var g = wrap.select('g');
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- g.select('.legendWrap')
- .datum(data.map(function(series) {
- series.originalKey = series.originalKey === undefined ? series.key : series.originalKey;
- series.key = series.originalKey + (series.yAxis == 1 ? '' : ' (right axis)');
- return series;
- }))
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.legendWrap')
- .attr('transform', 'translate(' + ( availableWidth / 2 ) + ',' + (-margin.top) +')');
- }
-
-
- lines1
- .width(availableWidth)
- .height(availableHeight)
- .interpolate("monotone")
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 1 && data[i].type == 'line'}));
-
- lines2
- .width(availableWidth)
- .height(availableHeight)
- .interpolate("monotone")
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 2 && data[i].type == 'line'}));
-
- bars1
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 1 && data[i].type == 'bar'}));
-
- bars2
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 2 && data[i].type == 'bar'}));
-
- stack1
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 1 && data[i].type == 'area'}));
-
- stack2
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 2 && data[i].type == 'area'}));
-
- g.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- var lines1Wrap = g.select('.lines1Wrap')
- .datum(dataLines1)
- var bars1Wrap = g.select('.bars1Wrap')
- .datum(dataBars1)
- var stack1Wrap = g.select('.stack1Wrap')
- .datum(dataStack1)
-
- var lines2Wrap = g.select('.lines2Wrap')
- .datum(dataLines2)
- var bars2Wrap = g.select('.bars2Wrap')
- .datum(dataBars2)
- var stack2Wrap = g.select('.stack2Wrap')
- .datum(dataStack2)
-
- var extraValue1 = dataStack1.length ? dataStack1.map(function(a){return a.values}).reduce(function(a,b){
- return a.map(function(aVal,i){return {x: aVal.x, y: aVal.y + b[i].y}})
- }).concat([{x:0, y:0}]) : []
- var extraValue2 = dataStack2.length ? dataStack2.map(function(a){return a.values}).reduce(function(a,b){
- return a.map(function(aVal,i){return {x: aVal.x, y: aVal.y + b[i].y}})
- }).concat([{x:0, y:0}]) : []
-
- yScale1 .domain(yDomain1 || d3.extent(d3.merge(series1).concat(extraValue1), function(d) { return d.y } ))
- .range([0, availableHeight])
-
- yScale2 .domain(yDomain2 || d3.extent(d3.merge(series2).concat(extraValue2), function(d) { return d.y } ))
- .range([0, availableHeight])
-
- lines1.yDomain(yScale1.domain())
- bars1.yDomain(yScale1.domain())
- stack1.yDomain(yScale1.domain())
-
- lines2.yDomain(yScale2.domain())
- bars2.yDomain(yScale2.domain())
- stack2.yDomain(yScale2.domain())
-
- if(dataStack1.length){d3.transition(stack1Wrap).call(stack1);}
- if(dataStack2.length){d3.transition(stack2Wrap).call(stack2);}
-
- if(dataBars1.length){d3.transition(bars1Wrap).call(bars1);}
- if(dataBars2.length){d3.transition(bars2Wrap).call(bars2);}
-
- if(dataLines1.length){d3.transition(lines1Wrap).call(lines1);}
- if(dataLines2.length){d3.transition(lines2Wrap).call(lines2);}
-
-
-
- xAxis
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.x.axis')
- .attr('transform', 'translate(0,' + availableHeight + ')');
- d3.transition(g.select('.x.axis'))
- .call(xAxis);
-
- yAxis1
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
-
- d3.transition(g.select('.y1.axis'))
- .call(yAxis1);
-
- yAxis2
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.y2.axis'))
- .call(yAxis2);
-
- g.select('.y2.axis')
- .style('opacity', series2.length ? 1 : 0)
- .attr('transform', 'translate(' + x.range()[1] + ',0)');
-
- legend.dispatch.on('stateChange', function(newState) {
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines1.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines1.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- lines2.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines2.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars1.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars1.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars2.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars2.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- stack1.dispatch.on('tooltipShow', function(e) {
- //disable tooltips when value ~= 0
- //// TODO: consider removing points from voronoi that have 0 value instead of this hack
- if (!Math.round(stack1.y()(e.point) * 100)) { // 100 will not be good for very small numbers... will have to think about making this valu dynamic, based on data range
- setTimeout(function() { d3.selectAll('.point.hover').classed('hover', false) }, 0);
- return false;
- }
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
-
- stack1.dispatch.on('tooltipHide', function(e) {
- dispatch.tooltipHide(e);
- });
-
- stack2.dispatch.on('tooltipShow', function(e) {
- //disable tooltips when value ~= 0
- //// TODO: consider removing points from voronoi that have 0 value instead of this hack
- if (!Math.round(stack2.y()(e.point) * 100)) { // 100 will not be good for very small numbers... will have to think about making this valu dynamic, based on data range
- setTimeout(function() { d3.selectAll('.point.hover').classed('hover', false) }, 0);
- return false;
- }
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
-
- stack2.dispatch.on('tooltipHide', function(e) {
- dispatch.tooltipHide(e);
- });
-
- lines1.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines1.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- lines2.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines2.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
-
-
- //============================================================
- // Global getters and setters
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.lines1 = lines1;
- chart.lines2 = lines2;
- chart.bars1 = bars1;
- chart.bars2 = bars2;
- chart.stack1 = stack1;
- chart.stack2 = stack2;
- chart.xAxis = xAxis;
- chart.yAxis1 = yAxis1;
- chart.yAxis2 = yAxis2;
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- lines1.x(_);
- bars1.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- lines1.y(_);
- bars1.y(_);
- return chart;
- };
-
- chart.yDomain1 = function(_) {
- if (!arguments.length) return yDomain1;
- yDomain1 = _;
- return chart;
- };
-
- chart.yDomain2 = function(_) {
- if (!arguments.length) return yDomain2;
- yDomain2 = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = _;
- legend.color(_);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- return chart;
-}
-
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/ohlcBar.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/ohlcBar.js
deleted file mode 100644
index 46f2b60c..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/ohlcBar.js
+++ /dev/null
@@ -1,380 +0,0 @@
-
-nv.models.ohlcBar = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , getOpen = function(d) { return d.open }
- , getClose = function(d) { return d.close }
- , getHigh = function(d) { return d.high }
- , getLow = function(d) { return d.low }
- , forceX = []
- , forceY = []
- , padData = false // If true, adds half a data points width to front and back, for lining up a line chart with a bar chart
- , clipEdge = true
- , color = nv.utils.defaultColor()
- , xDomain
- , yDomain
- , xRange
- , yRange
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- //TODO: store old scales for transitions
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x .domain(xDomain || d3.extent(data[0].values.map(getX).concat(forceX) ));
-
- if (padData)
- x.range(xRange || [availableWidth * .5 / data[0].values.length, availableWidth * (data[0].values.length - .5) / data[0].values.length ]);
- else
- x.range(xRange || [0, availableWidth]);
-
- y .domain(yDomain || [
- d3.min(data[0].values.map(getLow).concat(forceY)),
- d3.max(data[0].values.map(getHigh).concat(forceY))
- ])
- .range(yRange || [availableHeight, 0]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('g.nv-wrap.nv-ohlcBar').data([data[0].values]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-ohlcBar');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-ticks');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- container
- .on('click', function(d,i) {
- dispatch.chartClick({
- data: d,
- index: i,
- pos: d3.event,
- id: id
- });
- });
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-chart-clip-path-' + id)
- .append('rect');
-
- wrap.select('#nv-chart-clip-path-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-chart-clip-path-' + id + ')' : '');
-
-
-
- var ticks = wrap.select('.nv-ticks').selectAll('.nv-tick')
- .data(function(d) { return d });
-
- ticks.exit().remove();
-
-
- var ticksEnter = ticks.enter().append('path')
- .attr('class', function(d,i,j) { return (getOpen(d,i) > getClose(d,i) ? 'nv-tick negative' : 'nv-tick positive') + ' nv-tick-' + j + '-' + i })
- .attr('d', function(d,i) {
- var w = (availableWidth / data[0].values.length) * .9;
- return 'm0,0l0,'
- + (y(getOpen(d,i))
- - y(getHigh(d,i)))
- + 'l'
- + (-w/2)
- + ',0l'
- + (w/2)
- + ',0l0,'
- + (y(getLow(d,i)) - y(getOpen(d,i)))
- + 'l0,'
- + (y(getClose(d,i))
- - y(getLow(d,i)))
- + 'l'
- + (w/2)
- + ',0l'
- + (-w/2)
- + ',0z';
- })
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',' + y(getHigh(d,i)) + ')'; })
- //.attr('fill', function(d,i) { return color[0]; })
- //.attr('stroke', function(d,i) { return color[0]; })
- //.attr('x', 0 )
- //.attr('y', function(d,i) { return y(Math.max(0, getY(d,i))) })
- //.attr('height', function(d,i) { return Math.abs(y(getY(d,i)) - y(0)) })
- .on('mouseover', function(d,i) {
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- point: d,
- series: data[0],
- pos: [x(getX(d,i)), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
-
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- point: d,
- series: data[0],
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- });
-
- ticks
- .attr('class', function(d,i,j) { return (getOpen(d,i) > getClose(d,i) ? 'nv-tick negative' : 'nv-tick positive') + ' nv-tick-' + j + '-' + i })
- d3.transition(ticks)
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',' + y(getHigh(d,i)) + ')'; })
- .attr('d', function(d,i) {
- var w = (availableWidth / data[0].values.length) * .9;
- return 'm0,0l0,'
- + (y(getOpen(d,i))
- - y(getHigh(d,i)))
- + 'l'
- + (-w/2)
- + ',0l'
- + (w/2)
- + ',0l0,'
- + (y(getLow(d,i))
- - y(getOpen(d,i)))
- + 'l0,'
- + (y(getClose(d,i))
- - y(getLow(d,i)))
- + 'l'
- + (w/2)
- + ',0l'
- + (-w/2)
- + ',0z';
- })
- //.attr('width', (availableWidth / data[0].values.length) * .9 )
-
-
- //d3.transition(ticks)
- //.attr('y', function(d,i) { return y(Math.max(0, getY(d,i))) })
- //.attr('height', function(d,i) { return Math.abs(y(getY(d,i)) - y(0)) });
- //.order(); // not sure if this makes any sense for this model
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.open = function(_) {
- if (!arguments.length) return getOpen;
- getOpen = _;
- return chart;
- };
-
- chart.close = function(_) {
- if (!arguments.length) return getClose;
- getClose = _;
- return chart;
- };
-
- chart.high = function(_) {
- if (!arguments.length) return getHigh;
- getHigh = _;
- return chart;
- };
-
- chart.low = function(_) {
- if (!arguments.length) return getLow;
- getLow = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.padData = function(_) {
- if (!arguments.length) return padData;
- padData = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/parallelCoordinates.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/parallelCoordinates.js
deleted file mode 100644
index 107154f7..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/parallelCoordinates.js
+++ /dev/null
@@ -1,239 +0,0 @@
-
-//Code adapted from Jason Davies' "Parallel Coordinates"
-// http://bl.ocks.org/jasondavies/1341281
-
-nv.models.parallelCoordinates = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
-
- var margin = {top: 30, right: 10, bottom: 10, left: 10}
- , width = 960
- , height = 500
- , x = d3.scale.ordinal()
- , y = {}
- , dimensions = []
- , color = nv.utils.getColor(d3.scale.category20c().range())
- , axisLabel = function(d) { return d; }
- , filters = []
- , active = []
- , dispatch = d3.dispatch('brush')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- active = data; //set all active before first brush call
-
- chart.update = function() { }; //This is a placeholder until this chart is made resizeable
-
- //------------------------------------------------------------
- // Setup Scales
-
- x
- .rangePoints([0, availableWidth], 1)
- .domain(dimensions);
-
- // Extract the list of dimensions and create a scale for each.
- dimensions.forEach(function(d) {
- y[d] = d3.scale.linear()
- .domain(d3.extent(data, function(p) { return +p[d]; }))
- .range([availableHeight, 0]);
-
- y[d].brush = d3.svg.brush().y(y[d]).on('brush', brush);
-
- return d != 'name';
- })
-
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-parallelCoordinates').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-parallelCoordinates');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- gEnter.append('g').attr('class', 'nv-parallelCoordinatesWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- var line = d3.svg.line(),
- axis = d3.svg.axis().orient('left'),
- background,
- foreground;
-
-
- // Add grey background lines for context.
- background = gEnter.append('g')
- .attr('class', 'background')
- .selectAll('path')
- .data(data)
- .enter().append('path')
- .attr('d', path)
- ;
-
- // Add blue foreground lines for focus.
- foreground = gEnter.append('g')
- .attr('class', 'foreground')
- .selectAll('path')
- .data(data)
- .enter().append('path')
- .attr('d', path)
- ;
-
- // Add a group element for each dimension.
- var dimension = g.selectAll('.dimension')
- .data(dimensions)
- .enter().append('g')
- .attr('class', 'dimension')
- .attr('transform', function(d) { return 'translate(' + x(d) + ',0)'; });
-
- // Add an axis and title.
- dimension.append('g')
- .attr('class', 'axis')
- .each(function(d) { d3.select(this).call(axis.scale(y[d])); })
- .append('text')
- .attr('text-anchor', 'middle')
- .attr('y', -9)
- .text(String);
-
- // Add and store a brush for each axis.
- dimension.append('g')
- .attr('class', 'brush')
- .each(function(d) { d3.select(this).call(y[d].brush); })
- .selectAll('rect')
- .attr('x', -8)
- .attr('width', 16);
-
-
- // Returns the path for a given data point.
- function path(d) {
- return line(dimensions.map(function(p) { return [x(p), y[p](d[p])]; }));
- }
-
- // Handles a brush event, toggling the display of foreground lines.
- function brush() {
- var actives = dimensions.filter(function(p) { return !y[p].brush.empty(); }),
- extents = actives.map(function(p) { return y[p].brush.extent(); });
-
- filters = []; //erase current filters
- actives.forEach(function(d,i) {
- filters[i] = {
- dimension: d,
- extent: extents[i]
- }
- });
-
- active = []; //erase current active list
- foreground.style('display', function(d) {
- var isActive = actives.every(function(p, i) {
- return extents[i][0] <= d[p] && d[p] <= extents[i][1];
- });
- if (isActive) active.push(d);
- return isActive ? null : 'none';
- });
-
- dispatch.brush({
- filters: filters,
- active: active
- });
-
- }
-
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
-
- chart.dispatch = dispatch;
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_)
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.dimensions = function(_) {
- if (!arguments.length) return dimensions;
- dimensions = _;
- return chart;
- };
-
- chart.filters = function() {
- return filters;
- };
-
- chart.active = function() {
- return active;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/pie.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/pie.js
deleted file mode 100644
index 2099c8f3..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/pie.js
+++ /dev/null
@@ -1,400 +0,0 @@
-nv.models.pie = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 500
- , height = 500
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , getDescription = function(d) { return d.description }
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , color = nv.utils.defaultColor()
- , valueFormat = d3.format(',.2f')
- , showLabels = true
- , pieLabelsOutside = true
- , donutLabelsOutside = false
- , labelType = "key"
- , labelThreshold = .02 //if slice percentage is under this, don't show label
- , donut = false
- , labelSunbeamLayout = false
- , startAngle = false
- , endAngle = false
- , donutRatio = 0.5
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- radius = Math.min(availableWidth, availableHeight) / 2,
- arcRadius = radius-(radius / 5),
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- //var wrap = container.selectAll('.nv-wrap.nv-pie').data([data]);
- var wrap = container.selectAll('.nv-wrap.nv-pie').data(data);
- var wrapEnter = wrap.enter().append('g').attr('class','nvd3 nv-wrap nv-pie nv-chart-' + id);
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-pie');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
- g.select('.nv-pie').attr('transform', 'translate(' + availableWidth / 2 + ',' + availableHeight / 2 + ')');
-
- //------------------------------------------------------------
-
-
- container
- .on('click', function(d,i) {
- dispatch.chartClick({
- data: d,
- index: i,
- pos: d3.event,
- id: id
- });
- });
-
-
- var arc = d3.svg.arc()
- .outerRadius(arcRadius);
-
- if (startAngle) arc.startAngle(startAngle)
- if (endAngle) arc.endAngle(endAngle);
- if (donut) arc.innerRadius(radius * donutRatio);
-
- // Setup the Pie chart and choose the data element
- var pie = d3.layout.pie()
- .sort(null)
- .value(function(d) { return d.disabled ? 0 : getY(d) });
-
- var slices = wrap.select('.nv-pie').selectAll('.nv-slice')
- .data(pie);
-
- slices.exit().remove();
-
- var ae = slices.enter().append('g')
- .attr('class', 'nv-slice')
- .on('mouseover', function(d,i){
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- pointIndex: i,
- pos: [d3.event.pageX, d3.event.pageY],
- id: id
- });
- })
- .on('mouseout', function(d,i){
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- index: i,
- id: id
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- index: i,
- pos: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- index: i,
- pos: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- });
-
- slices
- .attr('fill', function(d,i) { return color(d, i); })
- .attr('stroke', function(d,i) { return color(d, i); });
-
- var paths = ae.append('path')
- .each(function(d) { this._current = d; });
- //.attr('d', arc);
-
- d3.transition(slices.select('path'))
- .attr('d', arc);
- //.attrTween('d', arcTween);
-
- if (showLabels) {
- // This does the normal label
- var labelsArc = d3.svg.arc().innerRadius(0);
-
- if (pieLabelsOutside){ labelsArc = arc; }
-
- if (donutLabelsOutside) { labelsArc = d3.svg.arc().outerRadius(arc.outerRadius()); }
-
- ae.append("g").classed("nv-label", true)
- .each(function(d, i) {
- var group = d3.select(this);
-
- group
- .attr('transform', function(d) {
- if (labelSunbeamLayout) {
- d.outerRadius = arcRadius + 10; // Set Outer Coordinate
- d.innerRadius = arcRadius + 15; // Set Inner Coordinate
- var rotateAngle = (d.startAngle + d.endAngle) / 2 * (180 / Math.PI);
- if ((d.startAngle+d.endAngle)/2 < Math.PI) {
- rotateAngle -= 90;
- } else {
- rotateAngle += 90;
- }
- return 'translate(' + labelsArc.centroid(d) + ') rotate(' + rotateAngle + ')';
- } else {
- d.outerRadius = radius + 10; // Set Outer Coordinate
- d.innerRadius = radius + 15; // Set Inner Coordinate
- return 'translate(' + labelsArc.centroid(d) + ')'
- }
- });
-
- group.append('rect')
- .style('stroke', '#fff')
- .style('fill', '#fff')
- .attr("rx", 3)
- .attr("ry", 3);
-
- group.append('text')
- .style('text-anchor', labelSunbeamLayout ? ((d.startAngle + d.endAngle) / 2 < Math.PI ? 'start' : 'end') : 'middle') //center the text on it's origin or begin/end if orthogonal aligned
- .style('fill', '#000')
-
-
- });
-
- slices.select(".nv-label").transition()
- .attr('transform', function(d) {
- if (labelSunbeamLayout) {
- d.outerRadius = arcRadius + 10; // Set Outer Coordinate
- d.innerRadius = arcRadius + 15; // Set Inner Coordinate
- var rotateAngle = (d.startAngle + d.endAngle) / 2 * (180 / Math.PI);
- if ((d.startAngle+d.endAngle)/2 < Math.PI) {
- rotateAngle -= 90;
- } else {
- rotateAngle += 90;
- }
- return 'translate(' + labelsArc.centroid(d) + ') rotate(' + rotateAngle + ')';
- } else {
- d.outerRadius = radius + 10; // Set Outer Coordinate
- d.innerRadius = radius + 15; // Set Inner Coordinate
- return 'translate(' + labelsArc.centroid(d) + ')'
- }
- });
-
- slices.each(function(d, i) {
- var slice = d3.select(this);
-
- slice
- .select(".nv-label text")
- .style('text-anchor', labelSunbeamLayout ? ((d.startAngle + d.endAngle) / 2 < Math.PI ? 'start' : 'end') : 'middle') //center the text on it's origin or begin/end if orthogonal aligned
- .text(function(d, i) {
- var percent = (d.endAngle - d.startAngle) / (2 * Math.PI);
- return Math.round(percent*1001/10)+"%";
- /*var labelTypes = {
- "key" : getX(d.data),
- "value": getY(d.data),
- "percent": d3.format('%')(percent)
- };
- return (d.value && percent > labelThreshold) ? labelTypes[labelType] : '';
- */
- });
-
- var textBox = slice.select('text').node().getBBox();
- slice.select(".nv-label rect")
- .attr("width", textBox.width + 10)
- .attr("height", textBox.height + 10)
- .attr("transform", function() {
- return "translate(" + [textBox.x - 5, textBox.y - 5] + ")";
- });
- });
- }
-
-
- // Computes the angle of an arc, converting from radians to degrees.
- function angle(d) {
- var a = (d.startAngle + d.endAngle) * 90 / Math.PI - 90;
- return a > 90 ? a - 180 : a;
- }
-
- function arcTween(a) {
- a.endAngle = isNaN(a.endAngle) ? 0 : a.endAngle;
- a.startAngle = isNaN(a.startAngle) ? 0 : a.startAngle;
- if (!donut) a.innerRadius = 0;
- var i = d3.interpolate(this._current, a);
- this._current = i(0);
- return function(t) {
- return arc(i(t));
- };
- }
-
- function tweenPie(b) {
- b.innerRadius = 0;
- var i = d3.interpolate({startAngle: 0, endAngle: 0}, b);
- return function(t) {
- return arc(i(t));
- };
- }
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.values = function(_) {
- nv.log("pie.values() is no longer supported.");
- return chart;
- };
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- };
-
- chart.description = function(_) {
- if (!arguments.length) return getDescription;
- getDescription = _;
- return chart;
- };
-
- chart.showLabels = function(_) {
- if (!arguments.length) return showLabels;
- showLabels = _;
- return chart;
- };
-
- chart.labelSunbeamLayout = function(_) {
- if (!arguments.length) return labelSunbeamLayout;
- labelSunbeamLayout = _;
- return chart;
- };
-
- chart.donutLabelsOutside = function(_) {
- if (!arguments.length) return donutLabelsOutside;
- donutLabelsOutside = _;
- return chart;
- };
-
- chart.pieLabelsOutside = function(_) {
- if (!arguments.length) return pieLabelsOutside;
- pieLabelsOutside = _;
- return chart;
- };
-
- chart.labelType = function(_) {
- if (!arguments.length) return labelType;
- labelType = _;
- labelType = labelType || "key";
- return chart;
- };
-
- chart.donut = function(_) {
- if (!arguments.length) return donut;
- donut = _;
- return chart;
- };
-
- chart.donutRatio = function(_) {
- if (!arguments.length) return donutRatio;
- donutRatio = _;
- return chart;
- };
-
- chart.startAngle = function(_) {
- if (!arguments.length) return startAngle;
- startAngle = _;
- return chart;
- };
-
- chart.endAngle = function(_) {
- if (!arguments.length) return endAngle;
- endAngle = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.valueFormat = function(_) {
- if (!arguments.length) return valueFormat;
- valueFormat = _;
- return chart;
- };
-
- chart.labelThreshold = function(_) {
- if (!arguments.length) return labelThreshold;
- labelThreshold = _;
- return chart;
- };
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/pieChart.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/pieChart.js
deleted file mode 100644
index b4303fd6..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/pieChart.js
+++ /dev/null
@@ -1,292 +0,0 @@
-nv.models.pieChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var pie = nv.models.pie()
- , legend = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 20, bottom: 20, left: 20}
- , width = null
- , height = null
- , showLegend = true
- , color = nv.utils.defaultColor()
- , tooltips = false
- , tooltip = function(key, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + '</p>'
- }
- , state = {}
- , defaultState = null
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var tooltipLabel = pie.description()(e.point) || pie.x()(e.point)
- var left = e.pos[0] + ( (offsetElement && offsetElement.offsetLeft) || 0 ),
- top = e.pos[1] + ( (offsetElement && offsetElement.offsetTop) || 0),
- y = pie.valueFormat()(pie.y()(e.point)),
- content = tooltip(tooltipLabel, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart); };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-pieChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-pieChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-pieWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend
- .width( availableWidth )
- .key(pie.x());
-
- wrap.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- pie
- .width(availableWidth)
- .height(availableHeight);
-
-
- var pieWrap = g.select('.nv-pieWrap')
- .datum([data]);
-
- d3.transition(pieWrap).call(pie);
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- /*legend.dispatch.on('stateChange', function(newState) {
- state = newState;
- dispatch.stateChange(state);
- chart.update();
- });*/
-
- pie.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- pie.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.legend = legend;
- chart.dispatch = dispatch;
- chart.pie = pie;
-
- d3.rebind(chart, pie, 'valueFormat', 'values', 'x', 'y', 'description', 'id', 'showLabels', 'donutLabelsOutside', 'pieLabelsOutside', 'labelType', 'donut', 'donutRatio', 'labelThreshold');
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- pie.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/scatter.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/scatter.js
deleted file mode 100644
index 16cbee65..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/scatter.js
+++ /dev/null
@@ -1,674 +0,0 @@
-
-nv.models.scatter = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor() // chooses color
- , id = Math.floor(Math.random() * 100000) //Create semi-unique ID incase user doesn't select one
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , z = d3.scale.linear() //linear because d3.svg.shape.size is treated as area
- , getX = function(d) { return d.x } // accessor to get the x value
- , getY = function(d) { return d.y } // accessor to get the y value
- , getSize = function(d) { return d.size || 1} // accessor to get the point size
- , getShape = function(d) { return d.shape || 'circle' } // accessor to get point shape
- , onlyCircles = true // Set to false to use shapes
- , forceX = [] // List of numbers to Force into the X scale (ie. 0, or a max / min, etc.)
- , forceY = [] // List of numbers to Force into the Y scale
- , forceSize = [] // List of numbers to Force into the Size scale
- , interactive = true // If true, plots a voronoi overlay for advanced point intersection
- , pointKey = null
- , pointActive = function(d) { return !d.notActive } // any points that return false will be filtered out
- , padData = false // If true, adds half a data points width to front and back, for lining up a line chart with a bar chart
- , padDataOuter = .1 //outerPadding to imitate ordinal scale outer padding
- , clipEdge = false // if true, masks points within x and y scale
- , clipVoronoi = true // if true, masks each point with a circle... can turn off to slightly increase performance
- , clipRadius = function() { return 25 } // function to get the radius for voronoi point clips
- , xDomain = null // Override x domain (skips the calculation from data)
- , yDomain = null // Override y domain
- , xRange = null // Override x range
- , yRange = null // Override y range
- , sizeDomain = null // Override point size domain
- , sizeRange = null
- , singlePoint = false
- , dispatch = d3.dispatch('elementClick', 'elementMouseover', 'elementMouseout')
- , useVoronoi = true
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0, z0 // used to store previous scales
- , timeoutID
- , needsUpdate = false // Flag for when the points are visually updating, but the interactive layer is behind, to disable tooltips
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- //add series index to each data point for reference
- data.forEach(function(series, i) {
- series.values.forEach(function(point) {
- point.series = i;
- });
- });
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain && sizeDomain) ? [] : // if we know xDomain and yDomain and sizeDomain, no need to calculate.... if Size is constant remember to set sizeDomain to speed up performance
- d3.merge(
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), size: getSize(d,i) }
- })
- })
- );
-
- x .domain(xDomain || d3.extent(seriesData.map(function(d) { return d.x; }).concat(forceX)))
-
- if (padData && data[0])
- x.range(xRange || [(availableWidth * padDataOuter + availableWidth) / (2 *data[0].values.length), availableWidth - availableWidth * (1 + padDataOuter) / (2 * data[0].values.length) ]);
- //x.range([availableWidth * .5 / data[0].values.length, availableWidth * (data[0].values.length - .5) / data[0].values.length ]);
- else
- x.range(xRange || [0, availableWidth]);
-
- y .domain(yDomain || d3.extent(seriesData.map(function(d) { return d.y }).concat(forceY)))
- .range(yRange || [availableHeight, 0]);
-
- z .domain(sizeDomain || d3.extent(seriesData.map(function(d) { return d.size }).concat(forceSize)))
- .range(sizeRange || [16, 256]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1] || y.domain()[0] === y.domain()[1]) singlePoint = true;
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] - y.domain()[0] * 0.01, y.domain()[1] + y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
- if ( isNaN(x.domain()[0])) {
- x.domain([-1,1]);
- }
-
- if ( isNaN(y.domain()[0])) {
- y.domain([-1,1]);
- }
-
-
- x0 = x0 || x;
- y0 = y0 || y;
- z0 = z0 || z;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-scatter').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-scatter nv-chart-' + id + (singlePoint ? ' nv-single-point' : ''));
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-groups');
- gEnter.append('g').attr('class', 'nv-point-paths');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
-
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
-
- function updateInteractiveLayer() {
-
- if (!interactive) return false;
-
- var eventElements;
-
- var vertices = d3.merge(data.map(function(group, groupIndex) {
- return group.values
- .map(function(point, pointIndex) {
- // *Adding noise to make duplicates very unlikely
- // *Injecting series and point index for reference
- /* *Adding a 'jitter' to the points, because there's an issue in d3.geom.voronoi.
- */
- var pX = getX(point,pointIndex);
- var pY = getY(point,pointIndex);
-
- return [x(pX)+ Math.random() * 1e-7,
- y(pY)+ Math.random() * 1e-7,
- groupIndex,
- pointIndex, point]; //temp hack to add noise untill I think of a better way so there are no duplicates
- })
- .filter(function(pointArray, pointIndex) {
- return pointActive(pointArray[4], pointIndex); // Issue #237.. move filter to after map, so pointIndex is correct!
- })
- })
- );
-
-
-
- //inject series and point index for reference into voronoi
- if (useVoronoi === true) {
-
- if (clipVoronoi) {
- var pointClipsEnter = wrap.select('defs').selectAll('.nv-point-clips')
- .data([id])
- .enter();
-
- pointClipsEnter.append('clipPath')
- .attr('class', 'nv-point-clips')
- .attr('id', 'nv-points-clip-' + id);
-
- var pointClips = wrap.select('#nv-points-clip-' + id).selectAll('circle')
- .data(vertices);
- pointClips.enter().append('circle')
- .attr('r', clipRadius);
- pointClips.exit().remove();
- pointClips
- .attr('cx', function(d) { return d[0] })
- .attr('cy', function(d) { return d[1] });
-
- wrap.select('.nv-point-paths')
- .attr('clip-path', 'url(#nv-points-clip-' + id + ')');
- }
-
-
- if(vertices.length) {
- // Issue #283 - Adding 2 dummy points to the voronoi b/c voronoi requires min 3 points to work
- vertices.push([x.range()[0] - 20, y.range()[0] - 20, null, null]);
- vertices.push([x.range()[1] + 20, y.range()[1] + 20, null, null]);
- vertices.push([x.range()[0] - 20, y.range()[0] + 20, null, null]);
- vertices.push([x.range()[1] + 20, y.range()[1] - 20, null, null]);
- }
-
- var bounds = d3.geom.polygon([
- [-10,-10],
- [-10,height + 10],
- [width + 10,height + 10],
- [width + 10,-10]
- ]);
-
- var voronoi = d3.geom.voronoi(vertices).map(function(d, i) {
- return {
- 'data': bounds.clip(d),
- 'series': vertices[i][2],
- 'point': vertices[i][3]
- }
- });
-
-
- var pointPaths = wrap.select('.nv-point-paths').selectAll('path')
- .data(voronoi);
- pointPaths.enter().append('path')
- .attr('class', function(d,i) { return 'nv-path-'+i; });
- pointPaths.exit().remove();
- pointPaths
- .attr('d', function(d) {
- if (d.data.length === 0)
- return 'M 0 0'
- else
- return 'M' + d.data.join('L') + 'Z';
- });
-
- var mouseEventCallback = function(d,mDispatch) {
- if (needsUpdate) return 0;
- var series = data[d.series];
- if (typeof series === 'undefined') return;
-
- var point = series.values[d.point];
-
- mDispatch({
- point: point,
- series: series,
- pos: [x(getX(point, d.point)) + margin.left, y(getY(point, d.point)) + margin.top],
- seriesIndex: d.series,
- pointIndex: d.point
- });
- };
-
- pointPaths
- .on('click', function(d) {
- mouseEventCallback(d, dispatch.elementClick);
- })
- .on('mouseover', function(d) {
- mouseEventCallback(d, dispatch.elementMouseover);
- })
- .on('mouseout', function(d, i) {
- mouseEventCallback(d, dispatch.elementMouseout);
- });
-
-
- } else {
- /*
- // bring data in form needed for click handlers
- var dataWithPoints = vertices.map(function(d, i) {
- return {
- 'data': d,
- 'series': vertices[i][2],
- 'point': vertices[i][3]
- }
- });
- */
-
- // add event handlers to points instead voronoi paths
- wrap.select('.nv-groups').selectAll('.nv-group')
- .selectAll('.nv-point')
- //.data(dataWithPoints)
- //.style('pointer-events', 'auto') // recativate events, disabled by css
- .on('click', function(d,i) {
- //nv.log('test', d, i);
- if (needsUpdate || !data[d.series]) return 0; //check if this is a dummy point
- var series = data[d.series],
- point = series.values[i];
-
- dispatch.elementClick({
- point: point,
- series: series,
- pos: [x(getX(point, i)) + margin.left, y(getY(point, i)) + margin.top],
- seriesIndex: d.series,
- pointIndex: i
- });
- })
- .on('mouseover', function(d,i) {
- if (needsUpdate || !data[d.series]) return 0; //check if this is a dummy point
- var series = data[d.series],
- point = series.values[i];
-
- dispatch.elementMouseover({
- point: point,
- series: series,
- pos: [x(getX(point, i)) + margin.left, y(getY(point, i)) + margin.top],
- seriesIndex: d.series,
- pointIndex: i
- });
- })
- .on('mouseout', function(d,i) {
- if (needsUpdate || !data[d.series]) return 0; //check if this is a dummy point
- var series = data[d.series],
- point = series.values[i];
-
- dispatch.elementMouseout({
- point: point,
- series: series,
- seriesIndex: d.series,
- pointIndex: i
- });
- });
- }
-
- needsUpdate = false;
- }
-
- needsUpdate = true;
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- groups.exit()
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover });
- groups
- .transition()
- .style('fill', function(d,i) { return color(d, i) })
- .style('stroke', function(d,i) { return color(d, i) })
- .style('stroke-opacity', 1)
- .style('fill-opacity', .5);
-
-
- if (onlyCircles) {
-
- var points = groups.selectAll('circle.nv-point')
- .data(function(d) { return d.values }, pointKey);
- points.enter().append('circle')
- .style('fill', function (d,i) { return d.color })
- .style('stroke', function (d,i) { return d.color })
- .attr('cx', function(d,i) { return nv.utils.NaNtoZero(x0(getX(d,i))) })
- .attr('cy', function(d,i) { return nv.utils.NaNtoZero(y0(getY(d,i))) })
- .attr('r', function(d,i) { return Math.sqrt(z(getSize(d,i))/Math.PI) });
- points.exit().remove();
- groups.exit().selectAll('path.nv-point').transition()
- .attr('cx', function(d,i) { return nv.utils.NaNtoZero(x(getX(d,i))) })
- .attr('cy', function(d,i) { return nv.utils.NaNtoZero(y(getY(d,i))) })
- .remove();
- points.each(function(d,i) {
- d3.select(this)
- .classed('nv-point', true)
- .classed('nv-point-' + i, true)
- .classed('hover',false)
- ;
- });
- points.transition()
- .attr('cx', function(d,i) { return nv.utils.NaNtoZero(x(getX(d,i))) })
- .attr('cy', function(d,i) { return nv.utils.NaNtoZero(y(getY(d,i))) })
- .attr('r', function(d,i) { return Math.sqrt(z(getSize(d,i))/Math.PI) });
-
- } else {
-
- var points = groups.selectAll('path.nv-point')
- .data(function(d) { return d.values });
- points.enter().append('path')
- .style('fill', function (d,i) { return d.color })
- .style('stroke', function (d,i) { return d.color })
- .attr('transform', function(d,i) {
- return 'translate(' + x0(getX(d,i)) + ',' + y0(getY(d,i)) + ')'
- })
- .attr('d',
- d3.svg.symbol()
- .type(getShape)
- .size(function(d,i) { return z(getSize(d,i)) })
- );
- points.exit().remove();
- groups.exit().selectAll('path.nv-point')
- .transition()
- .attr('transform', function(d,i) {
- return 'translate(' + x(getX(d,i)) + ',' + y(getY(d,i)) + ')'
- })
- .remove();
- points.each(function(d,i) {
- d3.select(this)
- .classed('nv-point', true)
- .classed('nv-point-' + i, true)
- .classed('hover',false)
- ;
- });
- points.transition()
- .attr('transform', function(d,i) {
- //nv.log(d,i,getX(d,i), x(getX(d,i)));
- return 'translate(' + x(getX(d,i)) + ',' + y(getY(d,i)) + ')'
- })
- .attr('d',
- d3.svg.symbol()
- .type(getShape)
- .size(function(d,i) { return z(getSize(d,i)) })
- );
- }
-
-
- // Delay updating the invisible interactive layer for smoother animation
- clearTimeout(timeoutID); // stop repeat calls to updateInteractiveLayer
- timeoutID = setTimeout(updateInteractiveLayer, 300);
- //updateInteractiveLayer();
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
- z0 = z.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
- chart.clearHighlights = function() {
- //Remove the 'hover' class from all highlighted points.
- d3.selectAll(".nv-chart-" + id + " .nv-point.hover").classed("hover",false);
- };
-
- chart.highlightPoint = function(seriesIndex,pointIndex,isHoverOver) {
- d3.select(".nv-chart-" + id + " .nv-series-" + seriesIndex + " .nv-point-" + pointIndex)
- .classed("hover",isHoverOver);
- };
-
-
- dispatch.on('elementMouseover.point', function(d) {
- if (interactive) chart.highlightPoint(d.seriesIndex,d.pointIndex,true);
- });
-
- dispatch.on('elementMouseout.point', function(d) {
- if (interactive) chart.highlightPoint(d.seriesIndex,d.pointIndex,false);
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = d3.functor(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- };
-
- chart.size = function(_) {
- if (!arguments.length) return getSize;
- getSize = d3.functor(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.zScale = function(_) {
- if (!arguments.length) return z;
- z = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.sizeDomain = function(_) {
- if (!arguments.length) return sizeDomain;
- sizeDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.sizeRange = function(_) {
- if (!arguments.length) return sizeRange;
- sizeRange = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.forceSize = function(_) {
- if (!arguments.length) return forceSize;
- forceSize = _;
- return chart;
- };
-
- chart.interactive = function(_) {
- if (!arguments.length) return interactive;
- interactive = _;
- return chart;
- };
-
- chart.pointKey = function(_) {
- if (!arguments.length) return pointKey;
- pointKey = _;
- return chart;
- };
-
- chart.pointActive = function(_) {
- if (!arguments.length) return pointActive;
- pointActive = _;
- return chart;
- };
-
- chart.padData = function(_) {
- if (!arguments.length) return padData;
- padData = _;
- return chart;
- };
-
- chart.padDataOuter = function(_) {
- if (!arguments.length) return padDataOuter;
- padDataOuter = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.clipVoronoi= function(_) {
- if (!arguments.length) return clipVoronoi;
- clipVoronoi = _;
- return chart;
- };
-
- chart.useVoronoi= function(_) {
- if (!arguments.length) return useVoronoi;
- useVoronoi = _;
- if (useVoronoi === false) {
- clipVoronoi = false;
- }
- return chart;
- };
-
- chart.clipRadius = function(_) {
- if (!arguments.length) return clipRadius;
- clipRadius = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.shape = function(_) {
- if (!arguments.length) return getShape;
- getShape = _;
- return chart;
- };
-
- chart.onlyCircles = function(_) {
- if (!arguments.length) return onlyCircles;
- onlyCircles = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.singlePoint = function(_) {
- if (!arguments.length) return singlePoint;
- singlePoint = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/scatterChart.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/scatterChart.js
deleted file mode 100644
index 65b6e387..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/scatterChart.js
+++ /dev/null
@@ -1,628 +0,0 @@
-nv.models.scatterChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var scatter = nv.models.scatter()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- , distX = nv.models.distribution()
- , distY = nv.models.distribution()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 75}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , x = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.xScale()
- , y = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.yScale()
- , xPadding = 0
- , yPadding = 0
- , showDistX = false
- , showDistY = false
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , showControls = !!d3.fisheye
- , fisheye = 0
- , pauseFisheye = false
- , tooltips = true
- , tooltipX = function(key, x, y) { return '<strong>' + x + '</strong>' }
- , tooltipY = function(key, x, y) { return '<strong>' + y + '</strong>' }
- , tooltip = null
- , state = {}
- , defaultState = null
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , noData = "No Data Available."
- , transitionDuration = 250
- ;
-
- scatter
- .xScale(x)
- .yScale(y)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(10)
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- .tickPadding(10)
- ;
- distX
- .axis('x')
- ;
- distY
- .axis('y')
- ;
-
- controls.updateState(false);
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0;
-
- var showTooltip = function(e, offsetElement) {
- //TODO: make tooltip style an option between single or dual on axes (maybe on all charts with axes?)
-
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- leftX = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- topX = y.range()[0] + margin.top + ( offsetElement.offsetTop || 0),
- leftY = x.range()[0] + margin.left + ( offsetElement.offsetLeft || 0 ),
- topY = e.pos[1] + ( offsetElement.offsetTop || 0),
- xVal = xAxis.tickFormat()(scatter.x()(e.point, e.pointIndex)),
- yVal = yAxis.tickFormat()(scatter.y()(e.point, e.pointIndex));
-
- if( tooltipX != null )
- nv.tooltip.show([leftX, topX], tooltipX(e.series.key, xVal, yVal, e, chart), 'n', 1, offsetElement, 'x-nvtooltip');
- if( tooltipY != null )
- nv.tooltip.show([leftY, topY], tooltipY(e.series.key, xVal, yVal, e, chart), 'e', 1, offsetElement, 'y-nvtooltip');
- if( tooltip != null )
- nv.tooltip.show([left, top], tooltip(e.series.key, xVal, yVal, e, chart), e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- var controlsData = [
- { key: 'Magnify', disabled: true }
- ];
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart); };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-scatterChart').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-scatterChart nv-chart-' + scatter.id());
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- // background for pointer events
- gEnter.append('rect').attr('class', 'nvd3 nv-background');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
- gEnter.append('g').attr('class', 'nv-distWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- var legendWidth = (showControls) ? availableWidth / 2 : availableWidth;
- legend.width(legendWidth);
-
- wrap.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(' + (availableWidth - legendWidth) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- controls.width(180).color(['#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
-
- if (xPadding !== 0)
- scatter.xDomain(null);
-
- if (yPadding !== 0)
- scatter.yDomain(null);
-
- wrap.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
-
- //Adjust for x and y padding
- if (xPadding !== 0) {
- var xRange = x.domain()[1] - x.domain()[0];
- scatter.xDomain([x.domain()[0] - (xPadding * xRange), x.domain()[1] + (xPadding * xRange)]);
- }
-
- if (yPadding !== 0) {
- var yRange = y.domain()[1] - y.domain()[0];
- scatter.yDomain([y.domain()[0] - (yPadding * yRange), y.domain()[1] + (yPadding * yRange)]);
- }
-
- //Only need to update the scatter again if x/yPadding changed the domain.
- if (yPadding !== 0 || xPadding !== 0) {
- wrap.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( xAxis.ticks() && xAxis.ticks().length ? xAxis.ticks() : availableWidth / 100 )
- .tickSize( -availableHeight , 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .call(xAxis);
-
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( yAxis.ticks() && yAxis.ticks().length ? yAxis.ticks() : availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis')
- .call(yAxis);
- }
-
-
- if (showDistX) {
- distX
- .getData(scatter.x())
- .scale(x)
- .width(availableWidth)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionX');
- g.select('.nv-distributionX')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- }
-
- if (showDistY) {
- distY
- .getData(scatter.y())
- .scale(y)
- .width(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionY');
- g.select('.nv-distributionY')
- .attr('transform',
- 'translate(' + (rightAlignYAxis ? availableWidth : -distY.size() ) + ',0)')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
- //------------------------------------------------------------
-
-
-
-
- if (d3.fisheye) {
- g.select('.nv-background')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g.select('.nv-background').on('mousemove', updateFisheye);
- g.select('.nv-background').on('click', function() { pauseFisheye = !pauseFisheye;});
- scatter.dispatch.on('elementClick.freezeFisheye', function() {
- pauseFisheye = !pauseFisheye;
- });
- }
-
-
- function updateFisheye() {
- if (pauseFisheye) {
- g.select('.nv-point-paths').style('pointer-events', 'all');
- return false;
- }
-
- g.select('.nv-point-paths').style('pointer-events', 'none' );
-
- var mouse = d3.mouse(this);
- x.distortion(fisheye).focus(mouse[0]);
- y.distortion(fisheye).focus(mouse[1]);
-
- g.select('.nv-scatterWrap')
- .call(scatter);
-
- if (showXAxis)
- g.select('.nv-x.nv-axis').call(xAxis);
-
- if (showYAxis)
- g.select('.nv-y.nv-axis').call(yAxis);
-
- g.select('.nv-distributionX')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- g.select('.nv-distributionY')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- controls.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- fisheye = d.disabled ? 0 : 2.5;
- g.select('.nv-background') .style('pointer-events', d.disabled ? 'none' : 'all');
- g.select('.nv-point-paths').style('pointer-events', d.disabled ? 'all' : 'none' );
-
- if (d.disabled) {
- x.distortion(fisheye).focus(0);
- y.distortion(fisheye).focus(0);
-
- g.select('.nv-scatterWrap').call(scatter);
- g.select('.nv-x.nv-axis').call(xAxis);
- g.select('.nv-y.nv-axis').call(yAxis);
- } else {
- pauseFisheye = false;
- }
-
- chart.update();
- });
-
- legend.dispatch.on('stateChange', function(newState) {
- state.disabled = newState.disabled;
- dispatch.stateChange(state);
- chart.update();
- });
-
- scatter.dispatch.on('elementMouseover.tooltip', function(e) {
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', function(d,i) { return e.pos[1] - availableHeight;});
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', e.pos[0] + distX.size());
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
-
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', 0);
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', distY.size());
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.scatter = scatter;
- chart.legend = legend;
- chart.controls = controls;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.distX = distX;
- chart.distY = distY;
-
- d3.rebind(chart, scatter, 'id', 'interactive', 'pointActive', 'x', 'y', 'shape', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'xRange', 'yRange', 'sizeDomain', 'sizeRange', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'clipRadius', 'useVoronoi');
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- distX.color(color);
- distY.color(color);
- return chart;
- };
-
- chart.showDistX = function(_) {
- if (!arguments.length) return showDistX;
- showDistX = _;
- return chart;
- };
-
- chart.showDistY = function(_) {
- if (!arguments.length) return showDistY;
- showDistY = _;
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
-
- chart.fisheye = function(_) {
- if (!arguments.length) return fisheye;
- fisheye = _;
- return chart;
- };
-
- chart.xPadding = function(_) {
- if (!arguments.length) return xPadding;
- xPadding = _;
- return chart;
- };
-
- chart.yPadding = function(_) {
- if (!arguments.length) return yPadding;
- yPadding = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltipXContent = function(_) {
- if (!arguments.length) return tooltipX;
- tooltipX = _;
- return chart;
- };
-
- chart.tooltipYContent = function(_) {
- if (!arguments.length) return tooltipY;
- tooltipY = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/scatterPlusLineChart.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/scatterPlusLineChart.js
deleted file mode 100644
index 23c87853..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/scatterPlusLineChart.js
+++ /dev/null
@@ -1,620 +0,0 @@
-
-nv.models.scatterPlusLineChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var scatter = nv.models.scatter()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- , distX = nv.models.distribution()
- , distY = nv.models.distribution()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 75}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , x = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.xScale()
- , y = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.yScale()
- , showDistX = false
- , showDistY = false
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , showControls = !!d3.fisheye
- , fisheye = 0
- , pauseFisheye = false
- , tooltips = true
- , tooltipX = function(key, x, y) { return '<strong>' + x + '</strong>' }
- , tooltipY = function(key, x, y) { return '<strong>' + y + '</strong>' }
- , tooltip = function(key, x, y, date) { return '<h3>' + key + '</h3>'
- + '<p>' + date + '</p>' }
- , state = {}
- , defaultState = null
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , noData = "No Data Available."
- , transitionDuration = 250
- ;
-
- scatter
- .xScale(x)
- .yScale(y)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(10)
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- .tickPadding(10)
- ;
- distX
- .axis('x')
- ;
- distY
- .axis('y')
- ;
-
- controls.updateState(false);
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0;
-
- var showTooltip = function(e, offsetElement) {
- //TODO: make tooltip style an option between single or dual on axes (maybe on all charts with axes?)
-
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- leftX = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- topX = y.range()[0] + margin.top + ( offsetElement.offsetTop || 0),
- leftY = x.range()[0] + margin.left + ( offsetElement.offsetLeft || 0 ),
- topY = e.pos[1] + ( offsetElement.offsetTop || 0),
- xVal = xAxis.tickFormat()(scatter.x()(e.point, e.pointIndex)),
- yVal = yAxis.tickFormat()(scatter.y()(e.point, e.pointIndex));
-
- if( tooltipX != null )
- nv.tooltip.show([leftX, topX], tooltipX(e.series.key, xVal, yVal, e, chart), 'n', 1, offsetElement, 'x-nvtooltip');
- if( tooltipY != null )
- nv.tooltip.show([leftY, topY], tooltipY(e.series.key, xVal, yVal, e, chart), 'e', 1, offsetElement, 'y-nvtooltip');
- if( tooltip != null )
- nv.tooltip.show([left, top], tooltip(e.series.key, xVal, yVal, e.point.tooltip, e, chart), e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- var controlsData = [
- { key: 'Magnify', disabled: true }
- ];
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart); };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = scatter.xScale();
- y = scatter.yScale();
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-scatterChart').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-scatterChart nv-chart-' + scatter.id());
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- // background for pointer events
- gEnter.append('rect').attr('class', 'nvd3 nv-background').style("pointer-events","none");
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
- gEnter.append('g').attr('class', 'nv-regressionLinesWrap');
- gEnter.append('g').attr('class', 'nv-distWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- wrap.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(' + (availableWidth / 2) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- controls.width(180).color(['#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
-
- wrap.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
-
- wrap.select('.nv-regressionLinesWrap')
- .attr('clip-path', 'url(#nv-edge-clip-' + scatter.id() + ')');
-
- var regWrap = wrap.select('.nv-regressionLinesWrap').selectAll('.nv-regLines')
- .data(function(d) {return d });
-
- regWrap.enter().append('g').attr('class', 'nv-regLines');
-
- var regLine = regWrap.selectAll('.nv-regLine').data(function(d){return [d]});
- var regLineEnter = regLine.enter()
- .append('line').attr('class', 'nv-regLine')
- .style('stroke-opacity', 0);
-
- regLine
- .transition()
- .attr('x1', x.range()[0])
- .attr('x2', x.range()[1])
- .attr('y1', function(d,i) {return y(x.domain()[0] * d.slope + d.intercept) })
- .attr('y2', function(d,i) { return y(x.domain()[1] * d.slope + d.intercept) })
- .style('stroke', function(d,i,j) { return color(d,j) })
- .style('stroke-opacity', function(d,i) {
- return (d.disabled || typeof d.slope === 'undefined' || typeof d.intercept === 'undefined') ? 0 : 1
- });
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( xAxis.ticks() ? xAxis.ticks() : availableWidth / 100 )
- .tickSize( -availableHeight , 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .call(xAxis);
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( yAxis.ticks() ? yAxis.ticks() : availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis')
- .call(yAxis);
- }
-
-
- if (showDistX) {
- distX
- .getData(scatter.x())
- .scale(x)
- .width(availableWidth)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionX');
- g.select('.nv-distributionX')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- }
-
- if (showDistY) {
- distY
- .getData(scatter.y())
- .scale(y)
- .width(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionY');
- g.select('.nv-distributionY')
- .attr('transform', 'translate(' + (rightAlignYAxis ? availableWidth : -distY.size() ) + ',0)')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
- //------------------------------------------------------------
-
-
-
-
- if (d3.fisheye) {
- g.select('.nv-background')
- .attr('width', availableWidth)
- .attr('height', availableHeight)
- ;
-
- g.select('.nv-background').on('mousemove', updateFisheye);
- g.select('.nv-background').on('click', function() { pauseFisheye = !pauseFisheye;});
- scatter.dispatch.on('elementClick.freezeFisheye', function() {
- pauseFisheye = !pauseFisheye;
- });
- }
-
-
- function updateFisheye() {
- if (pauseFisheye) {
- g.select('.nv-point-paths').style('pointer-events', 'all');
- return false;
- }
-
- g.select('.nv-point-paths').style('pointer-events', 'none' );
-
- var mouse = d3.mouse(this);
- x.distortion(fisheye).focus(mouse[0]);
- y.distortion(fisheye).focus(mouse[1]);
-
- g.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
-
- if (showXAxis)
- g.select('.nv-x.nv-axis').call(xAxis);
-
- if (showYAxis)
- g.select('.nv-y.nv-axis').call(yAxis);
-
- g.select('.nv-distributionX')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- g.select('.nv-distributionY')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- controls.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- fisheye = d.disabled ? 0 : 2.5;
- g.select('.nv-background') .style('pointer-events', d.disabled ? 'none' : 'all');
- g.select('.nv-point-paths').style('pointer-events', d.disabled ? 'all' : 'none' );
-
- if (d.disabled) {
- x.distortion(fisheye).focus(0);
- y.distortion(fisheye).focus(0);
-
- g.select('.nv-scatterWrap').call(scatter);
- g.select('.nv-x.nv-axis').call(xAxis);
- g.select('.nv-y.nv-axis').call(yAxis);
- } else {
- pauseFisheye = false;
- }
-
- chart.update();
- });
-
- legend.dispatch.on('stateChange', function(newState) {
- state = newState;
- dispatch.stateChange(state);
- chart.update();
- });
-
-
- scatter.dispatch.on('elementMouseover.tooltip', function(e) {
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', e.pos[1] - availableHeight);
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', e.pos[0] + distX.size());
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
-
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', 0);
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', distY.size());
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.scatter = scatter;
- chart.legend = legend;
- chart.controls = controls;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.distX = distX;
- chart.distY = distY;
-
- d3.rebind(chart, scatter, 'id', 'interactive', 'pointActive', 'x', 'y', 'shape', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'xRange', 'yRange', 'sizeDomain', 'sizeRange', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'clipRadius', 'useVoronoi');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- distX.color(color);
- distY.color(color);
- return chart;
- };
-
- chart.showDistX = function(_) {
- if (!arguments.length) return showDistX;
- showDistX = _;
- return chart;
- };
-
- chart.showDistY = function(_) {
- if (!arguments.length) return showDistY;
- showDistY = _;
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.fisheye = function(_) {
- if (!arguments.length) return fisheye;
- fisheye = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltipXContent = function(_) {
- if (!arguments.length) return tooltipX;
- tooltipX = _;
- return chart;
- };
-
- chart.tooltipYContent = function(_) {
- if (!arguments.length) return tooltipY;
- tooltipY = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/sparkline.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/sparkline.js
deleted file mode 100644
index e4c2e87b..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/sparkline.js
+++ /dev/null
@@ -1,194 +0,0 @@
-
-nv.models.sparkline = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 2, right: 0, bottom: 2, left: 0}
- , width = 400
- , height = 32
- , animate = true
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , color = nv.utils.getColor(['#000'])
- , xDomain
- , yDomain
- , xRange
- , yRange
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x .domain(xDomain || d3.extent(data, getX ))
- .range(xRange || [0, availableWidth]);
-
- y .domain(yDomain || d3.extent(data, getY ))
- .range(yRange || [availableHeight, 0]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-sparkline').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-sparkline');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')')
-
- //------------------------------------------------------------
-
-
- var paths = wrap.selectAll('path')
- .data(function(d) { return [d] });
- paths.enter().append('path');
- paths.exit().remove();
- paths
- .style('stroke', function(d,i) { return d.color || color(d, i) })
- .attr('d', d3.svg.line()
- .x(function(d,i) { return x(getX(d,i)) })
- .y(function(d,i) { return y(getY(d,i)) })
- );
-
-
- // TODO: Add CURRENT data point (Need Min, Mac, Current / Most recent)
- var points = wrap.selectAll('circle.nv-point')
- .data(function(data) {
- var yValues = data.map(function(d, i) { return getY(d,i); });
- function pointIndex(index) {
- if (index != -1) {
- var result = data[index];
- result.pointIndex = index;
- return result;
- } else {
- return null;
- }
- }
- var maxPoint = pointIndex(yValues.lastIndexOf(y.domain()[1])),
- minPoint = pointIndex(yValues.indexOf(y.domain()[0])),
- currentPoint = pointIndex(yValues.length - 1);
- return [minPoint, maxPoint, currentPoint].filter(function (d) {return d != null;});
- });
- points.enter().append('circle');
- points.exit().remove();
- points
- .attr('cx', function(d,i) { return x(getX(d,d.pointIndex)) })
- .attr('cy', function(d,i) { return y(getY(d,d.pointIndex)) })
- .attr('r', 2)
- .attr('class', function(d,i) {
- return getX(d, d.pointIndex) == x.domain()[1] ? 'nv-point nv-currentValue' :
- getY(d, d.pointIndex) == y.domain()[0] ? 'nv-point nv-minValue' : 'nv-point nv-maxValue'
- });
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = d3.functor(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.animate = function(_) {
- if (!arguments.length) return animate;
- animate = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/sparklinePlus.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/sparklinePlus.js
deleted file mode 100644
index 1535f8af..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/sparklinePlus.js
+++ /dev/null
@@ -1,295 +0,0 @@
-
-nv.models.sparklinePlus = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var sparkline = nv.models.sparkline();
-
- var margin = {top: 15, right: 100, bottom: 10, left: 50}
- , width = null
- , height = null
- , x
- , y
- , index = []
- , paused = false
- , xTickFormat = d3.format(',r')
- , yTickFormat = d3.format(',.2f')
- , showValue = true
- , alignValue = true
- , rightAlignValue = false
- , noData = "No Data Available."
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this);
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
-
- chart.update = function() { chart(selection) };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- var currentValue = sparkline.y()(data[data.length-1], data.length-1);
-
- //------------------------------------------------------------
-
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = sparkline.xScale();
- y = sparkline.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-sparklineplus').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-sparklineplus');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-sparklineWrap');
- gEnter.append('g').attr('class', 'nv-valueWrap');
- gEnter.append('g').attr('class', 'nv-hoverArea');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- var sparklineWrap = g.select('.nv-sparklineWrap');
-
- sparkline
- .width(availableWidth)
- .height(availableHeight);
-
- sparklineWrap
- .call(sparkline);
-
- //------------------------------------------------------------
-
-
- var valueWrap = g.select('.nv-valueWrap');
-
- var value = valueWrap.selectAll('.nv-currentValue')
- .data([currentValue]);
-
- value.enter().append('text').attr('class', 'nv-currentValue')
- .attr('dx', rightAlignValue ? -8 : 8)
- .attr('dy', '.9em')
- .style('text-anchor', rightAlignValue ? 'end' : 'start');
-
- value
- .attr('x', availableWidth + (rightAlignValue ? margin.right : 0))
- .attr('y', alignValue ? function(d) { return y(d) } : 0)
- .style('fill', sparkline.color()(data[data.length-1], data.length-1))
- .text(yTickFormat(currentValue));
-
-
-
- gEnter.select('.nv-hoverArea').append('rect')
- .on('mousemove', sparklineHover)
- .on('click', function() { paused = !paused })
- .on('mouseout', function() { index = []; updateValueLine(); });
- //.on('mouseout', function() { index = null; updateValueLine(); });
-
- g.select('.nv-hoverArea rect')
- .attr('transform', function(d) { return 'translate(' + -margin.left + ',' + -margin.top + ')' })
- .attr('width', availableWidth + margin.left + margin.right)
- .attr('height', availableHeight + margin.top);
-
-
-
- function updateValueLine() { //index is currently global (within the chart), may or may not keep it that way
- if (paused) return;
-
- var hoverValue = g.selectAll('.nv-hoverValue').data(index)
-
- var hoverEnter = hoverValue.enter()
- .append('g').attr('class', 'nv-hoverValue')
- .style('stroke-opacity', 0)
- .style('fill-opacity', 0);
-
- hoverValue.exit()
- .transition().duration(250)
- .style('stroke-opacity', 0)
- .style('fill-opacity', 0)
- .remove();
-
- hoverValue
- .attr('transform', function(d) { return 'translate(' + x(sparkline.x()(data[d],d)) + ',0)' })
- .transition().duration(250)
- .style('stroke-opacity', 1)
- .style('fill-opacity', 1);
-
- if (!index.length) return;
-
- hoverEnter.append('line')
- .attr('x1', 0)
- .attr('y1', -margin.top)
- .attr('x2', 0)
- .attr('y2', availableHeight);
-
-
- hoverEnter.append('text').attr('class', 'nv-xValue')
- .attr('x', -6)
- .attr('y', -margin.top)
- .attr('text-anchor', 'end')
- .attr('dy', '.9em')
-
-
- g.select('.nv-hoverValue .nv-xValue')
- .text(xTickFormat(sparkline.x()(data[index[0]], index[0])));
-
- hoverEnter.append('text').attr('class', 'nv-yValue')
- .attr('x', 6)
- .attr('y', -margin.top)
- .attr('text-anchor', 'start')
- .attr('dy', '.9em')
-
- g.select('.nv-hoverValue .nv-yValue')
- .text(yTickFormat(sparkline.y()(data[index[0]], index[0])));
-
- }
-
-
- function sparklineHover() {
- if (paused) return;
-
- var pos = d3.mouse(this)[0] - margin.left;
-
- function getClosestIndex(data, x) {
- var distance = Math.abs(sparkline.x()(data[0], 0) - x);
- var closestIndex = 0;
- for (var i = 0; i < data.length; i++){
- if (Math.abs(sparkline.x()(data[i], i) - x) < distance) {
- distance = Math.abs(sparkline.x()(data[i], i) - x);
- closestIndex = i;
- }
- }
- return closestIndex;
- }
-
- index = [getClosestIndex(data, Math.round(x.invert(pos)))];
-
- updateValueLine();
- }
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.sparkline = sparkline;
-
- d3.rebind(chart, sparkline, 'x', 'y', 'xScale', 'yScale', 'color');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xTickFormat = function(_) {
- if (!arguments.length) return xTickFormat;
- xTickFormat = _;
- return chart;
- };
-
- chart.yTickFormat = function(_) {
- if (!arguments.length) return yTickFormat;
- yTickFormat = _;
- return chart;
- };
-
- chart.showValue = function(_) {
- if (!arguments.length) return showValue;
- showValue = _;
- return chart;
- };
-
- chart.alignValue = function(_) {
- if (!arguments.length) return alignValue;
- alignValue = _;
- return chart;
- };
-
- chart.rightAlignValue = function(_) {
- if (!arguments.length) return rightAlignValue;
- rightAlignValue = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/stackedArea.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/stackedArea.js
deleted file mode 100644
index eefeb8fb..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/stackedArea.js
+++ /dev/null
@@ -1,368 +0,0 @@
-
-nv.models.stackedArea = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor() // a function that computes the color
- , id = Math.floor(Math.random() * 100000) //Create semi-unique ID incase user doesn't selet one
- , getX = function(d) { return d.x } // accessor to get the x value from a data point
- , getY = function(d) { return d.y } // accessor to get the y value from a data point
- , style = 'stack'
- , offset = 'zero'
- , order = 'default'
- , interpolate = 'linear' // controls the line interpolation
- , clipEdge = false // if true, masks lines within x and y scale
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , scatter = nv.models.scatter()
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'areaClick', 'areaMouseover', 'areaMouseout')
- ;
-
- scatter
- .size(2.2) // default size
- .sizeDomain([2.2,2.2]) // all the same size by default
- ;
-
- /************************************
- * offset:
- * 'wiggle' (stream)
- * 'zero' (stacked)
- * 'expand' (normalize to 100%)
- * 'silhouette' (simple centered)
- *
- * order:
- * 'inside-out' (stream)
- * 'default' (input order)
- ************************************/
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = scatter.xScale();
- y = scatter.yScale();
-
- //------------------------------------------------------------
-
- var dataRaw = data;
- // Injecting point index into each point because d3.layout.stack().out does not give index
- data.forEach(function(aseries, i) {
- aseries.seriesIndex = i;
- aseries.values = aseries.values.map(function(d, j) {
- d.index = j;
- d.seriesIndex = i;
- return d;
- });
- });
-
- var dataFiltered = data.filter(function(series) {
- return !series.disabled;
- });
-
- data = d3.layout.stack()
- .order(order)
- .offset(offset)
- .values(function(d) { return d.values }) //TODO: make values customizeable in EVERY model in this fashion
- .x(getX)
- .y(getY)
- .out(function(d, y0, y) {
- var yHeight = (getY(d) === 0) ? 0 : y;
- d.display = {
- y: yHeight,
- y0: y0
- };
- })
- (dataFiltered);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-stackedarea').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-stackedarea');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-areaWrap');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
- .x(getX)
- .y(function(d) { return d.display.y + d.display.y0 })
- .forceY([0])
- .color(data.map(function(d,i) {
- return d.color || color(d, d.seriesIndex);
- }));
-
-
- var scatterWrap = g.select('.nv-scatterWrap')
- .datum(data);
-
- scatterWrap.call(scatter);
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
-
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
- var area = d3.svg.area()
- .x(function(d,i) { return x(getX(d,i)) })
- .y0(function(d) {
- return y(d.display.y0)
- })
- .y1(function(d) {
- return y(d.display.y + d.display.y0)
- })
- .interpolate(interpolate);
-
- var zeroArea = d3.svg.area()
- .x(function(d,i) { return x(getX(d,i)) })
- .y0(function(d) { return y(d.display.y0) })
- .y1(function(d) { return y(d.display.y0) });
-
-
- var path = g.select('.nv-areaWrap').selectAll('path.nv-area')
- .data(function(d) { return d });
-
- path.enter().append('path').attr('class', function(d,i) { return 'nv-area nv-area-' + i })
- .attr('d', function(d,i){
- return zeroArea(d.values, d.seriesIndex);
- })
- .on('mouseover', function(d,i) {
- d3.select(this).classed('hover', true);
- dispatch.areaMouseover({
- point: d,
- series: d.key,
- pos: [d3.event.pageX, d3.event.pageY],
- seriesIndex: i
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.areaMouseout({
- point: d,
- series: d.key,
- pos: [d3.event.pageX, d3.event.pageY],
- seriesIndex: i
- });
- })
- .on('click', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.areaClick({
- point: d,
- series: d.key,
- pos: [d3.event.pageX, d3.event.pageY],
- seriesIndex: i
- });
- })
- path.exit().transition()
- .attr('d', function(d,i) { return zeroArea(d.values,i) })
- .remove();
- path
- .style('fill', function(d,i){
- return d.color || color(d, d.seriesIndex)
- })
- .style('stroke', function(d,i){ return d.color || color(d, d.seriesIndex) });
- path.transition()
- .attr('d', function(d,i) {
- return area(d.values,i)
- });
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementMouseover.area', function(e) {
- g.select('.nv-chart-' + id + ' .nv-area-' + e.seriesIndex).classed('hover', true);
- });
- scatter.dispatch.on('elementMouseout.area', function(e) {
- g.select('.nv-chart-' + id + ' .nv-area-' + e.seriesIndex).classed('hover', false);
- });
-
- //============================================================
- //Special offset functions
- chart.d3_stackedOffset_stackPercent = function(stackData) {
- var n = stackData.length, //How many series
- m = stackData[0].length, //how many points per series
- k = 1 / n,
- i,
- j,
- o,
- y0 = [];
-
- for (j = 0; j < m; ++j) { //Looping through all points
- for (i = 0, o = 0; i < dataRaw.length; i++) //looping through series'
- o += getY(dataRaw[i].values[j]) //total value of all points at a certian point in time.
-
- if (o) for (i = 0; i < n; i++)
- stackData[i][j][1] /= o;
- else
- for (i = 0; i < n; i++)
- stackData[i][j][1] = k;
- }
- for (j = 0; j < m; ++j) y0[j] = 0;
- return y0;
- };
-
- });
-
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementClick.area', function(e) {
- dispatch.areaClick(e);
- })
- scatter.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
- scatter.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- //============================================================
-
- //============================================================
- // Global getters and setters
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.scatter = scatter;
-
- d3.rebind(chart, scatter, 'interactive', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'xRange', 'yRange',
- 'sizeDomain', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'useVoronoi','clipRadius','highlightPoint','clearHighlights');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = d3.functor(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- }
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.offset = function(_) {
- if (!arguments.length) return offset;
- offset = _;
- return chart;
- };
-
- chart.order = function(_) {
- if (!arguments.length) return order;
- order = _;
- return chart;
- };
-
- //shortcut for offset + order
- chart.style = function(_) {
- if (!arguments.length) return style;
- style = _;
-
- switch (style) {
- case 'stack':
- chart.offset('zero');
- chart.order('default');
- break;
- case 'stream':
- chart.offset('wiggle');
- chart.order('inside-out');
- break;
- case 'stream-center':
- chart.offset('silhouette');
- chart.order('inside-out');
- break;
- case 'expand':
- chart.offset('expand');
- chart.order('default');
- break;
- case 'stack_percent':
- chart.offset(chart.d3_stackedOffset_stackPercent);
- chart.order('default');
- break;
- }
-
- return chart;
- };
-
- chart.interpolate = function(_) {
- if (!arguments.length) return interpolate;
- interpolate = _;
- return chart;
- };
- //============================================================
-
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/models/stackedAreaChart.js b/ecomp-portal-BE/war/static/fusion/d3/js/models/stackedAreaChart.js
deleted file mode 100644
index a036b8b0..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/models/stackedAreaChart.js
+++ /dev/null
@@ -1,629 +0,0 @@
-
-nv.models.stackedAreaChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var stacked = nv.models.stackedArea()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- , interactiveLayer = nv.interactiveGuideline()
- ;
-
- var margin = {top: 30, right: 25, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.defaultColor() // a function that takes in d, i and returns color
- , showControls = true
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , useInteractiveGuideline = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' on ' + x + '</p>'
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , yAxisTickFormat = d3.format(',.2f')
- , state = { style: stacked.style() }
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , controlWidth = 250
- , cData = ['Stacked','Stream','Expanded']
- , controlLabels = {}
- , transitionDuration = 250
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- ;
-
- controls.updateState(false);
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(stacked.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(stacked.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart); };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = stacked.xScale();
- y = stacked.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-stackedAreaChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-stackedAreaChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append("rect").style("opacity",0);
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-stackedWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
- gEnter.append('g').attr('class', 'nv-interactive');
-
- g.select("rect").attr("width",availableWidth).attr("height",availableHeight);
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- var legendWidth = (showControls) ? availableWidth - controlWidth : availableWidth;
- legend
- .width(legendWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + (availableWidth-legendWidth) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- {
- key: controlLabels.stacked || 'Stacked',
- metaKey: 'Stacked',
- disabled: stacked.style() != 'stack',
- style: 'stack'
- },
- {
- key: controlLabels.stream || 'Stream',
- metaKey: 'Stream',
- disabled: stacked.style() != 'stream',
- style: 'stream'
- },
- {
- key: controlLabels.expanded || 'Expanded',
- metaKey: 'Expanded',
- disabled: stacked.style() != 'expand',
- style: 'expand'
- },
- {
- key: controlLabels.stack_percent || 'Stack %',
- metaKey: 'Stack_Percent',
- disabled: stacked.style() != 'stack_percent',
- style: 'stack_percent'
- }
- ];
-
- controlWidth = (cData.length/3) * 260;
-
- controlsData = controlsData.filter(function(d) {
- return cData.indexOf(d.metaKey) !== -1;
- })
-
- controls
- .width( controlWidth )
- .color(['#444', '#444', '#444']);
-
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .call(controls);
-
-
- if ( margin.top != Math.max(controls.height(), legend.height()) ) {
- margin.top = Math.max(controls.height(), legend.height());
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
-
- g.select('.nv-controlsWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- //------------------------------------------------------------
- //Set up interactive layer
- if (useInteractiveGuideline) {
- interactiveLayer
- .width(availableWidth)
- .height(availableHeight)
- .margin({left: margin.left, top: margin.top})
- .svgContainer(container)
- .xScale(x);
- wrap.select(".nv-interactive").call(interactiveLayer);
- }
-
- stacked
- .width(availableWidth)
- .height(availableHeight)
-
- var stackedWrap = g.select('.nv-stackedWrap')
- .datum(data);
-
- stackedWrap.transition().call(stacked);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize( -availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + availableHeight + ')');
-
- g.select('.nv-x.nv-axis')
- .transition().duration(0)
- .call(xAxis);
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks(stacked.offset() == 'wiggle' ? 0 : availableHeight / 36)
- .tickSize(-availableWidth, 0)
- .setTickFormat( (stacked.style() == 'expand' || stacked.style() == 'stack_percent')
- ? d3.format('%') : yAxisTickFormat);
-
- g.select('.nv-y.nv-axis')
- .transition().duration(0)
- .call(yAxis);
- }
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- stacked.dispatch.on('areaClick.toggle', function(e) {
- if (data.filter(function(d) { return !d.disabled }).length === 1)
- data.forEach(function(d) {
- d.disabled = false;
- });
- else
- data.forEach(function(d,i) {
- d.disabled = (i != e.seriesIndex);
- });
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- legend.dispatch.on('stateChange', function(newState) {
- state.disabled = newState.disabled;
- dispatch.stateChange(state);
- chart.update();
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- if (!d.disabled) return;
-
- controlsData = controlsData.map(function(s) {
- s.disabled = true;
- return s;
- });
- d.disabled = false;
-
- stacked.style(d.style);
-
-
- state.style = stacked.style();
- dispatch.stateChange(state);
-
- chart.update();
- });
-
-
- interactiveLayer.dispatch.on('elementMousemove', function(e) {
- stacked.clearHighlights();
- var singlePoint, pointIndex, pointXLocation, allData = [];
- data
- .filter(function(series, i) {
- series.seriesIndex = i;
- return !series.disabled;
- })
- .forEach(function(series,i) {
- pointIndex = nv.interactiveBisect(series.values, e.pointXValue, chart.x());
- stacked.highlightPoint(i, pointIndex, true);
- var point = series.values[pointIndex];
- if (typeof point === 'undefined') return;
- if (typeof singlePoint === 'undefined') singlePoint = point;
- if (typeof pointXLocation === 'undefined') pointXLocation = chart.xScale()(chart.x()(point,pointIndex));
-
- //If we are in 'expand' mode, use the stacked percent value instead of raw value.
- var tooltipValue = (stacked.style() == 'expand') ? point.display.y : chart.y()(point,pointIndex);
- allData.push({
- key: series.key,
- value: tooltipValue,
- color: color(series,series.seriesIndex),
- stackedValue: point.display
- });
- });
-
- allData.reverse();
-
- //Highlight the tooltip entry based on which stack the mouse is closest to.
- if (allData.length > 2) {
- var yValue = chart.yScale().invert(e.mouseY);
- var yDistMax = Infinity, indexToHighlight = null;
- allData.forEach(function(series,i) {
- if ( yValue >= series.stackedValue.y0 && yValue <= (series.stackedValue.y0 + series.stackedValue.y))
- {
- indexToHighlight = i;
- return;
- }
- });
- if (indexToHighlight != null)
- allData[indexToHighlight].highlight = true;
- }
-
- var xValue = xAxis.tickFormat()(chart.x()(singlePoint,pointIndex));
-
- //If we are in 'expand' mode, force the format to be a percentage.
- var valueFormatter = (stacked.style() == 'expand') ?
- function(d,i) {return d3.format(".1%")(d);} :
- function(d,i) {return yAxis.tickFormat()(d); };
- interactiveLayer.tooltip
- .position({left: pointXLocation + margin.left, top: e.mouseY + margin.top})
- .chartContainer(that.parentNode)
- .enabled(tooltips)
- .valueFormatter(valueFormatter)
- .data(
- {
- value: xValue,
- series: allData
- }
- )();
-
- interactiveLayer.renderGuideLine(pointXLocation);
-
- });
-
- interactiveLayer.dispatch.on("elementMouseout",function(e) {
- dispatch.tooltipHide();
- stacked.clearHighlights();
- });
-
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- if (typeof e.style !== 'undefined') {
- stacked.style(e.style);
- }
-
- chart.update();
- });
-
- });
-
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- stacked.dispatch.on('tooltipShow', function(e) {
- //disable tooltips when value ~= 0
- //// TODO: consider removing points from voronoi that have 0 value instead of this hack
- /*
- if (!Math.round(stacked.y()(e.point) * 100)) { // 100 will not be good for very small numbers... will have to think about making this valu dynamic, based on data range
- setTimeout(function() { d3.selectAll('.point.hover').classed('hover', false) }, 0);
- return false;
- }
- */
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
-
- stacked.dispatch.on('tooltipHide', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.stacked = stacked;
- chart.legend = legend;
- chart.controls = controls;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.interactiveLayer = interactiveLayer;
-
- d3.rebind(chart, stacked, 'x', 'y', 'size', 'xScale', 'yScale', 'xDomain', 'yDomain', 'xRange', 'yRange', 'sizeDomain', 'interactive', 'useVoronoi', 'offset', 'order', 'style', 'clipEdge', 'forceX', 'forceY', 'forceSize', 'interpolate');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- stacked.color(color);
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.useInteractiveGuideline = function(_) {
- if(!arguments.length) return useInteractiveGuideline;
- useInteractiveGuideline = _;
- if (_ === true) {
- chart.interactive(false);
- chart.useVoronoi(false);
- }
- return chart;
- };
-
- chart.tooltip = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- chart.controlsData = function(_) {
- if (!arguments.length) return cData;
- cData = _;
- return chart;
- };
-
- chart.controlLabels = function(_) {
- if (!arguments.length) return controlLabels;
- if (typeof _ !== 'object') return controlLabels;
- controlLabels = _;
- return chart;
- };
-
- yAxis.setTickFormat = yAxis.tickFormat;
-
- yAxis.tickFormat = function(_) {
- if (!arguments.length) return yAxisTickFormat;
- yAxisTickFormat = _;
- return yAxis;
- };
-
-
- //============================================================
-
- return chart;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/nv.d3.js b/ecomp-portal-BE/war/static/fusion/d3/js/nv.d3.js
deleted file mode 100644
index 78586667..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/nv.d3.js
+++ /dev/null
@@ -1,13097 +0,0 @@
-(function(){
-
-var nv = window.nv || {};
-
-nv.version = '0.0.1a';
-nv.dev = true //set false when in production
-
-window.nv = nv;
-
-nv.tooltip = {}; // For the tooltip system
-nv.utils = {}; // Utility subsystem
-nv.models = {}; //stores all the possible models/components
-nv.charts = {}; //stores all the ready to use charts
-nv.graphs = []; //stores all the graphs currently on the page
-nv.logs = {}; //stores some statistics and potential error messages
-
-nv.dispatch = d3.dispatch('render_start', 'render_end');
-
-// *************************************************************************
-// Development render timers - disabled if dev = false
-
-if (nv.dev) {
- nv.dispatch.on('render_start', function(e) {
- nv.logs.startTime = +new Date();
- });
-
- nv.dispatch.on('render_end', function(e) {
- nv.logs.endTime = +new Date();
- nv.logs.totalTime = nv.logs.endTime - nv.logs.startTime;
- nv.log('total', nv.logs.totalTime); // used for development, to keep track of graph generation times
- });
-}
-
-// ********************************************
-// Public Core NV functions
-
-// Logs all arguments, and returns the last so you can test things in place
-nv.log = function() {
- if (nv.dev && console.log && console.log.apply)
- console.log.apply(console, arguments)
- else if (nv.dev && console.log && Function.prototype.bind) {
- var log = Function.prototype.bind.call(console.log, console);
- log.apply(console, arguments);
- }
- return arguments[arguments.length - 1];
-};
-
-
-nv.render = function render(step) {
- step = step || 1; // number of graphs to generate in each timeout loop
-
- nv.render.active = true;
- nv.dispatch.render_start();
-
- setTimeout(function() {
- var chart, graph;
-
- for (var i = 0; i < step && (graph = nv.render.queue[i]); i++) {
- chart = graph.generate();
- if (typeof graph.callback == typeof(Function)) graph.callback(chart);
- nv.graphs.push(chart);
- }
-
- nv.render.queue.splice(0, i);
-
- if (nv.render.queue.length) setTimeout(arguments.callee, 0);
- else { nv.render.active = false; nv.dispatch.render_end(); }
- }, 0);
-};
-
-nv.render.active = false;
-nv.render.queue = [];
-
-nv.addGraph = function(obj) {
- if (typeof arguments[0] === typeof(Function))
- obj = {generate: arguments[0], callback: arguments[1]};
-
- nv.render.queue.push(obj);
-
- if (!nv.render.active) nv.render();
-};
-
-nv.identity = function(d) { return d; };
-
-nv.strip = function(s) { return s.replace(/(\s|&)/g,''); };
-
-function daysInMonth(month,year) {
- return (new Date(year, month+1, 0)).getDate();
-}
-
-function d3_time_range(floor, step, number) {
- return function(t0, t1, dt) {
- var time = floor(t0), times = [];
- if (time < t0) step(time);
- if (dt > 1) {
- while (time < t1) {
- var date = new Date(+time);
- if ((number(date) % dt === 0)) times.push(date);
- step(time);
- }
- } else {
- while (time < t1) { times.push(new Date(+time)); step(time); }
- }
- return times;
- };
-}
-
-d3.time.monthEnd = function(date) {
- return new Date(date.getFullYear(), date.getMonth(), 0);
-};
-
-d3.time.monthEnds = d3_time_range(d3.time.monthEnd, function(date) {
- date.setUTCDate(date.getUTCDate() + 1);
- date.setDate(daysInMonth(date.getMonth() + 1, date.getFullYear()));
- }, function(date) {
- return date.getMonth();
- }
-);
-
-
-/*****
- * A no-frills tooltip implementation.
- *****/
-
-
-(function() {
-
- var nvtooltip = window.nv.tooltip = {};
-
- nvtooltip.show = function(pos, content, gravity, dist, parentContainer, classes) {
-
- var container = document.createElement('div');
- container.className = 'nvtooltip ' + (classes ? classes : 'xy-tooltip');
-
- gravity = gravity || 's';
- dist = dist || 20;
-
- var body = parentContainer;
- if ( !parentContainer || parentContainer.tagName.match(/g|svg/i)) {
- //If the parent element is an SVG element, place tooltip in the <body> element.
- body = document.getElementsByTagName('body')[0];
- }
-
- container.innerHTML = content;
- container.style.left = 0;
- container.style.top = 0;
- container.style.opacity = 0;
-
- body.appendChild(container);
-
- var height = parseInt(container.offsetHeight),
- width = parseInt(container.offsetWidth),
- windowWidth = nv.utils.windowSize().width,
- windowHeight = nv.utils.windowSize().height,
- scrollTop = window.scrollY,
- scrollLeft = window.scrollX,
- left, top;
-
- windowHeight = window.innerWidth >= document.body.scrollWidth ? windowHeight : windowHeight - 16;
- windowWidth = window.innerHeight >= document.body.scrollHeight ? windowWidth : windowWidth - 16;
-
- var tooltipTop = function ( Elem ) {
- var offsetTop = top;
- do {
- if( !isNaN( Elem.offsetTop ) ) {
- offsetTop += (Elem.offsetTop);
- }
- } while( Elem = Elem.offsetParent );
- return offsetTop;
- }
-
- var tooltipLeft = function ( Elem ) {
- var offsetLeft = left;
- do {
- if( !isNaN( Elem.offsetLeft ) ) {
- offsetLeft += (Elem.offsetLeft);
- }
- } while( Elem = Elem.offsetParent );
- return offsetLeft;
- }
-
- switch (gravity) {
- case 'e':
- left = pos[0] - width - dist;
- top = pos[1] - (height / 2);
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- if (tLeft < scrollLeft) left = pos[0] + dist > scrollLeft ? pos[0] + dist : scrollLeft - tLeft + left;
- if (tTop < scrollTop) top = scrollTop - tTop + top;
- if (tTop + height > scrollTop + windowHeight) top = scrollTop + windowHeight - tTop + top - height;
- break;
- case 'w':
- left = pos[0] + dist;
- top = pos[1] - (height / 2);
- if (tLeft + width > windowWidth) left = pos[0] - width - dist;
- if (tTop < scrollTop) top = scrollTop + 5;
- if (tTop + height > scrollTop + windowHeight) top = scrollTop - height - 5;
- break;
- case 'n':
- left = pos[0] - (width / 2) - 5;
- top = pos[1] + dist;
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- if (tLeft < scrollLeft) left = scrollLeft + 5;
- if (tLeft + width > windowWidth) left = left - width/2 + 5;
- if (tTop + height > scrollTop + windowHeight) top = scrollTop + windowHeight - tTop + top - height;
- break;
- case 's':
- left = pos[0] - (width / 2);
- top = pos[1] - height - dist;
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- if (tLeft < scrollLeft) left = scrollLeft + 5;
- if (tLeft + width > windowWidth) left = left - width/2 + 5;
- if (scrollTop > tTop) top = scrollTop;
- break;
- }
-
-
- container.style.left = left+'px';
- container.style.top = top+'px';
- container.style.opacity = 1;
- container.style.position = 'absolute'; //fix scroll bar issue
- container.style.pointerEvents = 'none'; //fix scroll bar issue
-
- return container;
- };
-
- nvtooltip.cleanup = function() {
-
- // Find the tooltips, mark them for removal by this class (so others cleanups won't find it)
- var tooltips = document.getElementsByClassName('nvtooltip');
- var purging = [];
- while(tooltips.length) {
- purging.push(tooltips[0]);
- tooltips[0].style.transitionDelay = '0 !important';
- tooltips[0].style.opacity = 0;
- tooltips[0].className = 'nvtooltip-pending-removal';
- }
-
-
- setTimeout(function() {
-
- while (purging.length) {
- var removeMe = purging.pop();
- removeMe.parentNode.removeChild(removeMe);
- }
- }, 500);
- };
-
-
-})();
-
-nv.utils.windowSize = function() {
- // Sane defaults
- var size = {width: 640, height: 480};
-
- // Earlier IE uses Doc.body
- if (document.body && document.body.offsetWidth) {
- size.width = document.body.offsetWidth;
- size.height = document.body.offsetHeight;
- }
-
- // IE can use depending on mode it is in
- if (document.compatMode=='CSS1Compat' &&
- document.documentElement &&
- document.documentElement.offsetWidth ) {
- size.width = document.documentElement.offsetWidth;
- size.height = document.documentElement.offsetHeight;
- }
-
- // Most recent browsers use
- if (window.innerWidth && window.innerHeight) {
- size.width = window.innerWidth;
- size.height = window.innerHeight;
- }
- return (size);
-};
-
-
-
-// Easy way to bind multiple functions to window.onresize
-// TODO: give a way to remove a function after its bound, other than removing all of them
-nv.utils.windowResize = function(fun){
- var oldresize = window.onresize;
-
- window.onresize = function(e) {
- if (typeof oldresize == 'function') oldresize(e);
- fun(e);
- }
-}
-
-// Backwards compatible way to implement more d3-like coloring of graphs.
-// If passed an array, wrap it in a function which implements the old default
-// behavior
-nv.utils.getColor = function(color) {
- if (!arguments.length) return nv.utils.defaultColor(); //if you pass in nothing, get default colors back
-
- if( Object.prototype.toString.call( color ) === '[object Array]' )
- return function(d, i) { return d.color || color[i % color.length]; };
- else
- return color;
- //can't really help it if someone passes rubbish as color
-}
-
-// Default color chooser uses the index of an object as before.
-nv.utils.defaultColor = function() {
- var colors = d3.scale.category20().range();
- return function(d, i) { return d.color || colors[i % colors.length] };
-}
-
-
-// Returns a color function that takes the result of 'getKey' for each series and
-// looks for a corresponding color from the dictionary,
-nv.utils.customTheme = function(dictionary, getKey, defaultColors) {
- getKey = getKey || function(series) { return series.key }; // use default series.key if getKey is undefined
- defaultColors = defaultColors || d3.scale.category20().range(); //default color function
-
- var defIndex = defaultColors.length; //current default color (going in reverse)
-
- return function(series, index) {
- var key = getKey(series);
-
- if (!defIndex) defIndex = defaultColors.length; //used all the default colors, start over
-
- if (typeof dictionary[key] !== "undefined")
- return (typeof dictionary[key] === "function") ? dictionary[key]() : dictionary[key];
- else
- return defaultColors[--defIndex]; // no match in dictionary, use default color
- }
-}
-
-
-
-// From the PJAX example on d3js.org, while this is not really directly needed
-// it's a very cool method for doing pjax, I may expand upon it a little bit,
-// open to suggestions on anything that may be useful
-nv.utils.pjax = function(links, content) {
- d3.selectAll(links).on("click", function() {
- history.pushState(this.href, this.textContent, this.href);
- load(this.href);
- d3.event.preventDefault();
- });
-
- function load(href) {
- d3.html(href, function(fragment) {
- var target = d3.select(content).node();
- target.parentNode.replaceChild(d3.select(fragment).select(content).node(), target);
- nv.utils.pjax(links, content);
- });
- }
-
- d3.select(window).on("popstate", function() {
- if (d3.event.state) load(d3.event.state);
- });
-}
-
-/* For situations where we want to approximate the width in pixels for an SVG:text element.
-Most common instance is when the element is in a display:none; container.
-Forumla is : text.length * font-size * constant_factor
-*/
-nv.utils.calcApproxTextWidth = function (svgTextElem) {
- if (svgTextElem instanceof d3.selection) {
- var fontSize = parseInt(svgTextElem.style("font-size").replace("px",""));
- var textLength = svgTextElem.text().length;
-
- return textLength * fontSize * 0.5;
- }
- return 0;
-};
-nv.models.axis = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var axis = d3.svg.axis()
- ;
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 75 //only used for tickLabel currently
- , height = 60 //only used for tickLabel currently
- , scale = d3.scale.linear()
- , axisLabelText = null
- , showMaxMin = true //TODO: showMaxMin should be disabled on all ordinal scaled axes
- , highlightZero = true
- , rotateLabels = 0
- , rotateYLabel = true
- , staggerLabels = false
- , isOrdinal = false
- , ticks = null
- , logScale=false
- ;
-
- axis
- .scale(scale)
- .orient('bottom')
- .tickFormat(function(d) { return d })
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var scale0;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-axis').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-axis');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- //------------------------------------------------------------
-
-
- if (ticks !== null)
- axis.ticks(ticks);
- else if (axis.orient() == 'top' || axis.orient() == 'bottom')
- axis.ticks(Math.abs(scale.range()[1] - scale.range()[0]) / 100);
-
-
- //TODO: consider calculating width/height based on whether or not label is added, for reference in charts using this component
-
-
- d3.transition(g)
- .call(axis);
-
- scale0 = scale0 || axis.scale();
-
- var fmt = axis.tickFormat();
- if (fmt == null) {
- fmt = scale0.tickFormat();
- }
-
- var axisLabel = g.selectAll('text.nv-axislabel')
- .data([axisLabelText || null]);
- axisLabel.exit().remove();
- switch (axis.orient()) {
- case 'top':
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- var w = (scale.range().length==2) ? scale.range()[1] : (scale.range()[scale.range().length-1]+(scale.range()[1]-scale.range()[0]));
- axisLabel
- .attr('text-anchor', 'middle')
- .attr('y', 0)
- .attr('x', w/2);
- if (showMaxMin) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- .data(scale.domain());
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text');
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(' + scale(d) + ',0)'
- })
- .select('text')
- .attr('dy', '0em')
- .attr('y', -axis.tickPadding())
- .attr('text-anchor', 'middle')
- .text(function(d,i) {
- var v = fmt(d);
- return ('' + v).match('NaN') ? '' : v;
- });
- d3.transition(axisMaxMin)
- .attr('transform', function(d,i) {
- return 'translate(' + scale.range()[i] + ',0)'
- });
- }
- break;
- case 'bottom':
- var xLabelMargin = 36;
- var maxTextWidth = 30;
- var xTicks = g.selectAll('g').select("text");
- if (rotateLabels%360) {
- //Calculate the longest xTick width
- xTicks.each(function(d,i){
- var width = this.getBBox().width;
- if(width > maxTextWidth) maxTextWidth = width;
- });
- //Convert to radians before calculating sin. Add 30 to margin for healthy padding.
- var sin = Math.abs(Math.sin(rotateLabels*Math.PI/180));
- var xLabelMargin = (sin ? sin*maxTextWidth : maxTextWidth)+30;
- //Rotate all xTicks
- xTicks
- .attr('transform', function(d,i,j) { return 'rotate(' + rotateLabels + ' 0,0)' })
- .attr('text-anchor', rotateLabels%360 > 0 ? 'start' : 'end');
- }
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- var w = (scale.range().length==2) ? scale.range()[1] : (scale.range()[scale.range().length-1]+(scale.range()[1]-scale.range()[0]));
- axisLabel
- .attr('text-anchor', 'middle')
- .attr('y', xLabelMargin)
- .attr('x', w/2);
- if (showMaxMin) {
- //if (showMaxMin && !isOrdinal) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- //.data(scale.domain())
- .data([scale.domain()[0], scale.domain()[scale.domain().length - 1]]);
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text');
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(' + (scale(d) + (isOrdinal ? scale.rangeBand() / 2 : 0)) + ',0)'
- })
- .select('text')
- .attr('dy', '.71em')
- .attr('y', axis.tickPadding())
- .attr('transform', function(d,i,j) { return 'rotate(' + rotateLabels + ' 0,0)' })
- .attr('text-anchor', rotateLabels ? (rotateLabels%360 > 0 ? 'start' : 'end') : 'middle')
- .text(function(d,i) {
- var v = fmt(d);
- return ('' + v).match('NaN') ? '' : v;
- });
- d3.transition(axisMaxMin)
- .attr('transform', function(d,i) {
- //return 'translate(' + scale.range()[i] + ',0)'
- //return 'translate(' + scale(d) + ',0)'
- return 'translate(' + (scale(d) + (isOrdinal ? scale.rangeBand() / 2 : 0)) + ',0)'
- });
- }
- if (staggerLabels)
- xTicks
- .attr('transform', function(d,i) { return 'translate(0,' + (i % 2 == 0 ? '0' : '12') + ')' });
-
- break;
- case 'right':
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- axisLabel
- .attr('text-anchor', rotateYLabel ? 'middle' : 'begin')
- .attr('transform', rotateYLabel ? 'rotate(90)' : '')
- .attr('y', rotateYLabel ? (-Math.max(margin.right,width) + 12) : -10) //TODO: consider calculating this based on largest tick width... OR at least expose this on chart
- .attr('x', rotateYLabel ? (scale.range()[0] / 2) : axis.tickPadding());
- if (showMaxMin) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- .data(scale.domain());
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text')
- .style('opacity', 0);
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale(d) + ')'
- })
- .select('text')
- .attr('dy', '.32em')
- .attr('y', 0)
- .attr('x', axis.tickPadding())
- .attr('text-anchor', 'start')
- .text(function(d,i) {
- var v = fmt(d);
- return ('' + v).match('NaN') ? '' : v;
- });
- d3.transition(axisMaxMin)
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale.range()[i] + ')'
- })
- .select('text')
- .style('opacity', 1);
- }
- break;
- case 'left':
- /*
- //For dynamically placing the label. Can be used with dynamically-sized chart axis margins
- var yTicks = g.selectAll('g').select("text");
- yTicks.each(function(d,i){
- var labelPadding = this.getBBox().width + axis.tickPadding() + 16;
- if(labelPadding > width) width = labelPadding;
- });
- */
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- axisLabel
- .attr('text-anchor', rotateYLabel ? 'middle' : 'end')
- .attr('transform', rotateYLabel ? 'rotate(-90)' : '')
- .attr('y', rotateYLabel ? (-Math.max(margin.left,width) + 12) : -10) //TODO: consider calculating this based on largest tick width... OR at least expose this on chart
- .attr('x', rotateYLabel ? (-scale.range()[0] / 2) : -axis.tickPadding());
- if (showMaxMin) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- .data(scale.domain());
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text')
- .style('opacity', 0);
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale0(d) + ')'
- })
- .select('text')
- .attr('dy', '.32em')
- .attr('y', 0)
- .attr('x', -axis.tickPadding())
- .attr('text-anchor', 'end')
- .text(function(d,i) {
- var v = fmt(d);
- return ('' + v).match('NaN') ? '' : v;
- });
- d3.transition(axisMaxMin)
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale.range()[i] + ')'
- })
- .select('text')
- .style('opacity', 1);
- }
- break;
- }
- axisLabel
- .text(function(d) { return d });
-
-
- if (showMaxMin && (axis.orient() === 'left' || axis.orient() === 'right')) {
- //check if max and min overlap other values, if so, hide the values that overlap
- g.selectAll('g') // the g's wrapping each tick
- .each(function(d,i) {
- d3.select(this).select('text').attr('opacity', 1);
- if (scale(d) < scale.range()[1] + 10 || scale(d) > scale.range()[0] - 10) { // 10 is assuming text height is 16... if d is 0, leave it!
- if (d > 1e-10 || d < -1e-10) // accounts for minor floating point errors... though could be problematic if the scale is EXTREMELY SMALL
- d3.select(this).attr('opacity', 0);
-
- d3.select(this).select('text').attr('opacity', 0); // Don't remove the ZERO line!!
- }
- });
-
- //if Max and Min = 0 only show min, Issue #281
- if (scale.domain()[0] == scale.domain()[1] && scale.domain()[0] == 0)
- wrap.selectAll('g.nv-axisMaxMin')
- .style('opacity', function(d,i) { return !i ? 1 : 0 });
-
- }
-
- if (showMaxMin && (axis.orient() === 'top' || axis.orient() === 'bottom')) {
- var maxMinRange = [];
- wrap.selectAll('g.nv-axisMaxMin')
- .each(function(d,i) {
- try {
- if (i) // i== 1, max position
- maxMinRange.push(scale(d) - this.getBBox().width - 4) //assuming the max and min labels are as wide as the next tick (with an extra 4 pixels just in case)
- else // i==0, min position
- maxMinRange.push(scale(d) + this.getBBox().width + 4)
- }catch (err) {
- if (i) // i== 1, max position
- maxMinRange.push(scale(d) - 4) //assuming the max and min labels are as wide as the next tick (with an extra 4 pixels just in case)
- else // i==0, min position
- maxMinRange.push(scale(d) + 4)
- }
- });
- g.selectAll('g') // the g's wrapping each tick
- .each(function(d,i) {
- if (scale(d) < maxMinRange[0] || scale(d) > maxMinRange[1]) {
- if (d > 1e-10 || d < -1e-10) // accounts for minor floating point errors... though could be problematic if the scale is EXTREMELY SMALL
- d3.select(this).remove();
- else
- d3.select(this).select('text').remove(); // Don't remove the ZERO line!!
- }
- });
- }
-
-
- //highlight zero line ... Maybe should not be an option and should just be in CSS?
- if (highlightZero)
- g.selectAll('.tick')
- .filter(function(d) { return !parseFloat(Math.round(d.__data__*100000)/1000000) && (d.__data__ !== undefined) }) //this is because sometimes the 0 tick is a very small fraction, TODO: think of cleaner technique
- .classed('zero', true);
-
- //store old scales for use in transitions on update
- scale0 = scale.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.axis = axis;
-
- d3.rebind(chart, axis, 'orient', 'tickValues', 'tickSubdivide', 'tickSize', 'tickPadding', 'tickFormat');
- d3.rebind(chart, scale, 'domain', 'range', 'rangeBand', 'rangeBands'); //these are also accessible by chart.scale(), but added common ones directly for ease of use
-
- chart.margin = function(_) {
- if(!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- }
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.ticks = function(_) {
- if (!arguments.length) return ticks;
- ticks = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.axisLabel = function(_) {
- if (!arguments.length) return axisLabelText;
- axisLabelText = _;
- return chart;
- }
-
- chart.showMaxMin = function(_) {
- if (!arguments.length) return showMaxMin;
- showMaxMin = _;
- return chart;
- }
-
- chart.highlightZero = function(_) {
- if (!arguments.length) return highlightZero;
- highlightZero = _;
- return chart;
- }
-
- chart.scale = function(_) {
- if (!arguments.length) return scale;
- scale = _;
- axis.scale(scale);
- isOrdinal = typeof scale.rangeBands === 'function';
- d3.rebind(chart, scale, 'domain', 'range', 'rangeBand', 'rangeBands');
- return chart;
- }
-
- chart.rotateYLabel = function(_) {
- if(!arguments.length) return rotateYLabel;
- rotateYLabel = _;
- return chart;
- }
-
- chart.rotateLabels = function(_) {
- if(!arguments.length) return rotateLabels;
- rotateLabels = _;
- return chart;
- }
-
- chart.staggerLabels = function(_) {
- if (!arguments.length) return staggerLabels;
- staggerLabels = _;
- return chart;
- };
-
-
- //============================================================
-
-
- return chart;
-}
-
-// Chart design based on the recommendations of Stephen Few. Implementation
-// based on the work of Clint Ivy, Jamie Love, and Jason Davies.
-// http://projects.instantcognition.com/protovis/bulletchart/
-
-nv.models.bullet = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , orient = 'left' // TODO top & bottom
- , reverse = false
- , ranges = function(d) { return d.ranges }
- , markers = function(d) { return d.markers }
- , measures = function(d) { return d.measures }
- , forceX = [0] // List of numbers to Force into the X scale (ie. 0, or a max / min, etc.)
- , width = 380
- , height = 30
- , tickFormat = null
- , color = nv.utils.getColor(['#1f77b4'])
- , dispatch = d3.dispatch('elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(d, i) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- var rangez = ranges.call(this, d, i).slice().sort(d3.descending),
- markerz = markers.call(this, d, i).slice().sort(d3.descending),
- measurez = measures.call(this, d, i).slice().sort(d3.descending);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- // Compute the new x-scale.
- var x1 = d3.scale.linear()
- .domain( d3.extent(d3.merge([forceX, rangez])) )
- .range(reverse ? [availableWidth, 0] : [0, availableWidth]);
-
- // Retrieve the old x-scale, if this is an update.
- var x0 = this.__chart__ || d3.scale.linear()
- .domain([0, Infinity])
- .range(x1.range());
-
- // Stash the new scale.
- this.__chart__ = x1;
-
-
- var rangeMin = d3.min(rangez), //rangez[2]
- rangeMax = d3.max(rangez), //rangez[0]
- rangeAvg = rangez[1];
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-bullet').data([d]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-bullet');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('rect').attr('class', 'nv-range nv-rangeMax');
- gEnter.append('rect').attr('class', 'nv-range nv-rangeAvg');
- gEnter.append('rect').attr('class', 'nv-range nv-rangeMin');
- gEnter.append('rect').attr('class', 'nv-measure');
- gEnter.append('path').attr('class', 'nv-markerTriangle');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- var w0 = function(d) { return Math.abs(x0(d) - x0(0)) }, // TODO: could optimize by precalculating x0(0) and x1(0)
- w1 = function(d) { return Math.abs(x1(d) - x1(0)) };
- var xp0 = function(d) { return d < 0 ? x0(d) : x0(0) },
- xp1 = function(d) { return d < 0 ? x1(d) : x1(0) };
-
-
- g.select('rect.nv-rangeMax')
- .attr('height', availableHeight)
- .attr('width', w1(rangeMax > 0 ? rangeMax : rangeMin))
- .attr('x', xp1(rangeMax > 0 ? rangeMax : rangeMin))
- .datum(rangeMax > 0 ? rangeMax : rangeMin)
- /*
- .attr('x', rangeMin < 0 ?
- rangeMax > 0 ?
- x1(rangeMin)
- : x1(rangeMax)
- : x1(0))
- */
-
- g.select('rect.nv-rangeAvg')
- .attr('height', availableHeight)
- .attr('width', w1(rangeAvg))
- .attr('x', xp1(rangeAvg))
- .datum(rangeAvg)
- /*
- .attr('width', rangeMax <= 0 ?
- x1(rangeMax) - x1(rangeAvg)
- : x1(rangeAvg) - x1(rangeMin))
- .attr('x', rangeMax <= 0 ?
- x1(rangeAvg)
- : x1(rangeMin))
- */
-
- g.select('rect.nv-rangeMin')
- .attr('height', availableHeight)
- .attr('width', w1(rangeMax))
- .attr('x', xp1(rangeMax))
- .attr('width', w1(rangeMax > 0 ? rangeMin : rangeMax))
- .attr('x', xp1(rangeMax > 0 ? rangeMin : rangeMax))
- .datum(rangeMax > 0 ? rangeMin : rangeMax)
- /*
- .attr('width', rangeMax <= 0 ?
- x1(rangeAvg) - x1(rangeMin)
- : x1(rangeMax) - x1(rangeAvg))
- .attr('x', rangeMax <= 0 ?
- x1(rangeMin)
- : x1(rangeAvg))
- */
-
- g.select('rect.nv-measure')
- .style('fill', color)
- .attr('height', availableHeight / 3)
- .attr('y', availableHeight / 3)
- .attr('width', measurez < 0 ?
- x1(0) - x1(measurez[0])
- : x1(measurez[0]) - x1(0))
- .attr('x', xp1(measurez))
- .on('mouseover', function() {
- dispatch.elementMouseover({
- value: measurez[0],
- label: 'Current',
- pos: [x1(measurez[0]), availableHeight/2]
- })
- })
- .on('mouseout', function() {
- dispatch.elementMouseout({
- value: measurez[0],
- label: 'Current'
- })
- })
-
- var h3 = availableHeight / 6;
- if (markerz[0]) {
- g.selectAll('path.nv-markerTriangle')
- .attr('transform', function(d) { return 'translate(' + x1(markerz[0]) + ',' + (availableHeight / 2) + ')' })
- .attr('d', 'M0,' + h3 + 'L' + h3 + ',' + (-h3) + ' ' + (-h3) + ',' + (-h3) + 'Z')
- .on('mouseover', function() {
- dispatch.elementMouseover({
- value: markerz[0],
- label: 'Previous',
- pos: [x1(markerz[0]), availableHeight/2]
- })
- })
- .on('mouseout', function() {
- dispatch.elementMouseout({
- value: markerz[0],
- label: 'Previous'
- })
- });
- } else {
- g.selectAll('path.nv-markerTriangle').remove();
- }
-
-
- wrap.selectAll('.nv-range')
- .on('mouseover', function(d,i) {
- var label = !i ? "Maximum" : i == 1 ? "Mean" : "Minimum";
-
- dispatch.elementMouseover({
- value: d,
- label: label,
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d,i) {
- var label = !i ? "Maximum" : i == 1 ? "Mean" : "Minimum";
-
- dispatch.elementMouseout({
- value: d,
- label: label
- })
- })
-
-/* // THIS IS THE PREVIOUS BULLET IMPLEMENTATION, WILL REMOVE SHORTLY
- // Update the range rects.
- var range = g.selectAll('rect.nv-range')
- .data(rangez);
-
- range.enter().append('rect')
- .attr('class', function(d, i) { return 'nv-range nv-s' + i; })
- .attr('width', w0)
- .attr('height', availableHeight)
- .attr('x', reverse ? x0 : 0)
- .on('mouseover', function(d,i) {
- dispatch.elementMouseover({
- value: d,
- label: (i <= 0) ? 'Maximum' : (i > 1) ? 'Minimum' : 'Mean', //TODO: make these labels a variable
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d,i) {
- dispatch.elementMouseout({
- value: d,
- label: (i <= 0) ? 'Minimum' : (i >=1) ? 'Maximum' : 'Mean' //TODO: make these labels a variable
- })
- })
-
- d3.transition(range)
- .attr('x', reverse ? x1 : 0)
- .attr('width', w1)
- .attr('height', availableHeight);
-
-
- // Update the measure rects.
- var measure = g.selectAll('rect.nv-measure')
- .data(measurez);
-
- measure.enter().append('rect')
- .attr('class', function(d, i) { return 'nv-measure nv-s' + i; })
- .style('fill', function(d,i) { return color(d,i ) })
- .attr('width', w0)
- .attr('height', availableHeight / 3)
- .attr('x', reverse ? x0 : 0)
- .attr('y', availableHeight / 3)
- .on('mouseover', function(d) {
- dispatch.elementMouseover({
- value: d,
- label: 'Current', //TODO: make these labels a variable
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d) {
- dispatch.elementMouseout({
- value: d,
- label: 'Current' //TODO: make these labels a variable
- })
- })
-
- d3.transition(measure)
- .attr('width', w1)
- .attr('height', availableHeight / 3)
- .attr('x', reverse ? x1 : 0)
- .attr('y', availableHeight / 3);
-
-
-
- // Update the marker lines.
- var marker = g.selectAll('path.nv-markerTriangle')
- .data(markerz);
-
- var h3 = availableHeight / 6;
- marker.enter().append('path')
- .attr('class', 'nv-markerTriangle')
- .attr('transform', function(d) { return 'translate(' + x0(d) + ',' + (availableHeight / 2) + ')' })
- .attr('d', 'M0,' + h3 + 'L' + h3 + ',' + (-h3) + ' ' + (-h3) + ',' + (-h3) + 'Z')
- .on('mouseover', function(d,i) {
- dispatch.elementMouseover({
- value: d,
- label: 'Previous',
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d,i) {
- dispatch.elementMouseout({
- value: d,
- label: 'Previous'
- })
- });
-
- d3.transition(marker)
- .attr('transform', function(d) { return 'translate(' + (x1(d) - x1(0)) + ',' + (availableHeight / 2) + ')' });
-
- marker.exit().remove();
-*/
-
- });
-
- // d3.timer.flush(); // Not needed?
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- // left, right, top, bottom
- chart.orient = function(_) {
- if (!arguments.length) return orient;
- orient = _;
- reverse = orient == 'right' || orient == 'bottom';
- return chart;
- };
-
- // ranges (bad, satisfactory, good)
- chart.ranges = function(_) {
- if (!arguments.length) return ranges;
- ranges = _;
- return chart;
- };
-
- // markers (previous, goal)
- chart.markers = function(_) {
- if (!arguments.length) return markers;
- markers = _;
- return chart;
- };
-
- // measures (actual, forecast)
- chart.measures = function(_) {
- if (!arguments.length) return measures;
- measures = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.tickFormat = function(_) {
- if (!arguments.length) return tickFormat;
- tickFormat = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-};
-
-
-
-// Chart design based on the recommendations of Stephen Few. Implementation
-// based on the work of Clint Ivy, Jamie Love, and Jason Davies.
-// http://projects.instantcognition.com/protovis/bulletchart/
-nv.models.bulletChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var bullet = nv.models.bullet()
- ;
-
- var orient = 'left' // TODO top & bottom
- , reverse = false
- , margin = {top: 5, right: 40, bottom: 20, left: 120}
- , ranges = function(d) { return d.ranges }
- , markers = function(d) { return d.markers }
- , measures = function(d) { return d.measures }
- , width = null
- , height = 55
- , tickFormat = null
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + x + '</h3>' +
- '<p>' + y + '</p>'
- }
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ) + margin.left,
- top = e.pos[1] + ( offsetElement.offsetTop || 0) + margin.top,
- content = tooltip(e.key, e.label, e.value, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'e' : 'w', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(d, i) {
- var container = d3.select(this);
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- that = this;
-
-
- chart.update = function() { chart(selection) };
- chart.container = this;
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!d || !ranges.call(this, d, i)) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', 18 + margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
-
- var rangez = ranges.call(this, d, i).slice().sort(d3.descending),
- markerz = markers.call(this, d, i).slice().sort(d3.descending),
- measurez = measures.call(this, d, i).slice().sort(d3.descending);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-bulletChart').data([d]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-bulletChart');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-bulletWrap');
- gEnter.append('g').attr('class', 'nv-titles');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- // Compute the new x-scale.
- var x1 = d3.scale.linear()
- .domain([0, Math.max(rangez[0], markerz[0], measurez[0])]) // TODO: need to allow forceX and forceY, and xDomain, yDomain
- .range(reverse ? [availableWidth, 0] : [0, availableWidth]);
-
- // Retrieve the old x-scale, if this is an update.
- var x0 = this.__chart__ || d3.scale.linear()
- .domain([0, Infinity])
- .range(x1.range());
-
- // Stash the new scale.
- this.__chart__ = x1;
-
- /*
- // Derive width-scales from the x-scales.
- var w0 = bulletWidth(x0),
- w1 = bulletWidth(x1);
-
- function bulletWidth(x) {
- var x0 = x(0);
- return function(d) {
- return Math.abs(x(d) - x(0));
- };
- }
-
- function bulletTranslate(x) {
- return function(d) {
- return 'translate(' + x(d) + ',0)';
- };
- }
- */
-
- var w0 = function(d) { return Math.abs(x0(d) - x0(0)) }, // TODO: could optimize by precalculating x0(0) and x1(0)
- w1 = function(d) { return Math.abs(x1(d) - x1(0)) };
-
-
- var title = gEnter.select('.nv-titles').append('g')
- .attr('text-anchor', 'end')
- .attr('transform', 'translate(-6,' + (height - margin.top - margin.bottom) / 2 + ')');
- title.append('text')
- .attr('class', 'nv-title')
- .text(function(d) { return d.title; });
-
- title.append('text')
- .attr('class', 'nv-subtitle')
- .attr('dy', '1em')
- .text(function(d) { return d.subtitle; });
-
-
-
- bullet
- .width(availableWidth)
- .height(availableHeight)
-
- var bulletWrap = g.select('.nv-bulletWrap');
-
- d3.transition(bulletWrap).call(bullet);
-
-
-
- // Compute the tick format.
- var format = tickFormat || x1.tickFormat( availableWidth / 100 );
-
- // Update the tick groups.
- var tick = g.selectAll('g.nv-tick')
- .data(x1.ticks( availableWidth / 50 ), function(d) {
- return this.textContent || format(d);
- });
-
- // Initialize the ticks with the old scale, x0.
- var tickEnter = tick.enter().append('g')
- .attr('class', 'nv-tick')
- .attr('transform', function(d) { return 'translate(' + x0(d) + ',0)' })
- .style('opacity', 1e-6);
-
- tickEnter.append('line')
- .attr('y1', availableHeight)
- .attr('y2', availableHeight * 7 / 6);
-
- tickEnter.append('text')
- .attr('text-anchor', 'middle')
- .attr('dy', '1em')
- .attr('y', availableHeight * 7 / 6)
- .text(format);
-
-
- // Transition the updating ticks to the new scale, x1.
- var tickUpdate = d3.transition(tick)
- .attr('transform', function(d) { return 'translate(' + x1(d) + ',0)' })
- .style('opacity', 1);
-
- tickUpdate.select('line')
- .attr('y1', availableHeight)
- .attr('y2', availableHeight * 7 / 6);
-
- tickUpdate.select('text')
- .attr('y', availableHeight * 7 / 6);
-
- // Transition the exiting ticks to the new scale, x1.
- d3.transition(tick.exit())
- .attr('transform', function(d) { return 'translate(' + x1(d) + ',0)' })
- .style('opacity', 1e-6)
- .remove();
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- dispatch.on('tooltipShow', function(e) {
- e.key = d.title;
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
- });
-
- d3.timer.flush();
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- bullet.dispatch.on('elementMouseover.tooltip', function(e) {
- dispatch.tooltipShow(e);
- });
-
- bullet.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.bullet = bullet;
-
- d3.rebind(chart, bullet, 'color');
-
- // left, right, top, bottom
- chart.orient = function(x) {
- if (!arguments.length) return orient;
- orient = x;
- reverse = orient == 'right' || orient == 'bottom';
- return chart;
- };
-
- // ranges (bad, satisfactory, good)
- chart.ranges = function(x) {
- if (!arguments.length) return ranges;
- ranges = x;
- return chart;
- };
-
- // markers (previous, goal)
- chart.markers = function(x) {
- if (!arguments.length) return markers;
- markers = x;
- return chart;
- };
-
- // measures (actual, forecast)
- chart.measures = function(x) {
- if (!arguments.length) return measures;
- measures = x;
- return chart;
- };
-
- chart.width = function(x) {
- if (!arguments.length) return width;
- width = x;
- return chart;
- };
-
- chart.height = function(x) {
- if (!arguments.length) return height;
- height = x;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.tickFormat = function(x) {
- if (!arguments.length) return tickFormat;
- tickFormat = x;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-};
-
-
-
-nv.models.cumulativeLineChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 30, bottom: 50, left: 60}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , showLegend = true
- , tooltips = true
- , showControls = true
- , rescaleY = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , id = lines.id()
- , state = { index: 0, rescaleY: rescaleY }
- , defaultState = null
- , noData = 'No Data Available.'
- , average = function(d) { return d.average }
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient('left')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var dx = d3.scale.linear()
- , index = {i: 0, x: 0}
- ;
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
-/*
- //Moved to see if we can get better behavior to fix issue #315
- var indexDrag = d3.behavior.drag()
- .on('dragstart', dragStart)
- .on('drag', dragMove)
- .on('dragend', dragEnd);
-
- function dragStart(d,i) {
- d3.select(chart.container)
- .style('cursor', 'ew-resize');
- }
-
- function dragMove(d,i) {
- d.x += d3.event.dx;
- d.i = Math.round(dx.invert(d.x));
-
- d3.select(this).attr('transform', 'translate(' + dx(d.i) + ',0)');
- chart.update();
- }
-
- function dragEnd(d,i) {
- d3.select(chart.container)
- .style('cursor', 'auto');
- chart.update();
- }
-*/
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this).classed('nv-chart-' + id, true),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() { container.transition().call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- var indexDrag = d3.behavior.drag()
- .on('dragstart', dragStart)
- .on('drag', dragMove)
- .on('dragend', dragEnd);
-
-
- function dragStart(d,i) {
- d3.select(chart.container)
- .style('cursor', 'ew-resize');
- }
-
- function dragMove(d,i) {
- index.x = d3.event.x;
- index.i = Math.round(dx.invert(index.x));
- updateZero();
- }
-
- function dragEnd(d,i) {
- d3.select(chart.container)
- .style('cursor', 'auto');
-
- // update state and send stateChange with new index
- state.index = index.i;
- dispatch.stateChange(state);
- }
-
-
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = lines.xScale();
- y = lines.yScale();
-
-
- if (!rescaleY) {
- var seriesDomains = data
- .filter(function(series) { return !series.disabled })
- .map(function(series,i) {
- var initialDomain = d3.extent(series.values, lines.y());
-
- //account for series being disabled when losing 95% or more
- if (initialDomain[0] < -.95) initialDomain[0] = -.95;
-
- return [
- (initialDomain[0] - initialDomain[1]) / (1 + initialDomain[1]),
- (initialDomain[1] - initialDomain[0]) / (1 + initialDomain[0])
- ];
- });
-
- var completeDomain = [
- d3.min(seriesDomains, function(d) { return d[0] }),
- d3.max(seriesDomains, function(d) { return d[1] })
- ]
-
- lines.yDomain(completeDomain);
- } else {
- lines.yDomain(null);
- }
-
-
- dx .domain([0, data[0].values.length - 1]) //Assumes all series have same length
- .range([0, availableWidth])
- .clamp(true);
-
- //------------------------------------------------------------
-
-
- var data = indexify(index.i, data);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-cumulativeLine').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-cumulativeLine').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-background');
- gEnter.append('g').attr('class', 'nv-linesWrap');
- gEnter.append('g').attr('class', 'nv-avgLinesWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Re-scale y-axis', disabled: !rescaleY }
- ];
-
- controls.width(140).color(['#444', '#444', '#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- // Show error if series goes below 100%
- var tempDisabled = data.filter(function(d) { return d.tempDisabled });
-
- wrap.select('.tempDisabled').remove(); //clean-up and prevent duplicates
- if (tempDisabled.length) {
- wrap.append('text').attr('class', 'tempDisabled')
- .attr('x', availableWidth / 2)
- .attr('y', '-.71em')
- .style('text-anchor', 'end')
- .text(tempDisabled.map(function(d) { return d.key }).join(', ') + ' values cannot be calculated for this time period.');
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- gEnter.select('.nv-background')
- .append('rect');
-
- g.select('.nv-background rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- lines
- //.x(function(d) { return d.x })
- .y(function(d) { return d.display.y })
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].tempDisabled; }));
-
-
-
- var linesWrap = g.select('.nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled && !d.tempDisabled }));
-
- //d3.transition(linesWrap).call(lines);
- linesWrap.call(lines);
-
- /*Handle average lines [AN-612] ----------------------------*/
-
- //Store a series index number in the data array.
- data.forEach(function(d,i) {
- d.seriesIndex = i;
- });
-
- var avgLineData = data.filter(function(d) {
- return !d.disabled && !!average(d);
- });
-
- var avgLines = g.select(".nv-avgLinesWrap").selectAll("line")
- .data(avgLineData, function(d) { return d.key; });
-
- avgLines.enter()
- .append('line')
- .style('stroke-width',2)
- .style('stroke-dasharray','10,10')
- .style('stroke',function (d,i) {
- return lines.color()(d,d.seriesIndex);
- })
- .attr('x1',0)
- .attr('x2',availableWidth)
- .attr('y1', function(d) { return y(average(d)); })
- .attr('y2', function(d) { return y(average(d)); });
-
- avgLines
- .attr('x1',0)
- .attr('x2',availableWidth)
- .attr('y1', function(d) { return y(average(d)); })
- .attr('y2', function(d) { return y(average(d)); });
-
- avgLines.exit().remove();
-
- //Create index line -----------------------------------------
-
- var indexLine = linesWrap.selectAll('.nv-indexLine')
- .data([index]);
- indexLine.enter().append('rect').attr('class', 'nv-indexLine')
- .attr('width', 3)
- .attr('x', -2)
- .attr('fill', 'red')
- .attr('fill-opacity', .5)
- .call(indexDrag)
-
- indexLine
- .attr('transform', function(d) { return 'translate(' + dx(d.i) + ',0)' })
- .attr('height', availableHeight)
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- //Suggest how many ticks based on the chart width and D3 should listen (70 is the optimal number for MM/DD/YY dates)
- .ticks( Math.min(data[0].values.length,availableWidth/70) )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
-
-
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
-
- function updateZero() {
- indexLine
- .data([index]);
-
- container.call(chart);
- }
-
- g.select('.nv-background rect')
- .on('click', function() {
- index.x = d3.mouse(this)[0];
- index.i = Math.round(dx.invert(index.x));
-
- // update state and send stateChange with new index
- state.index = index.i;
- dispatch.stateChange(state);
-
- updateZero();
- });
-
- lines.dispatch.on('elementClick', function(e) {
- index.i = e.pointIndex;
- index.x = dx(index.i);
-
- // update state and send stateChange with new index
- state.index = index.i;
- dispatch.stateChange(state);
-
- updateZero();
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
- rescaleY = !d.disabled;
-
- state.rescaleY = rescaleY;
- dispatch.stateChange(state);
-
- //selection.transition().call(chart);
- chart.update();
- });
-
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- //selection.transition().call(chart);
- chart.update();
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
-
-/*
- //
- legend.dispatch.on('legendMouseover', function(d, i) {
- d.hover = true;
- selection.transition().call(chart)
- });
-
- legend.dispatch.on('legendMouseout', function(d, i) {
- d.hover = false;
- selection.transition().call(chart)
- });
-*/
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
-
- if (typeof e.index !== 'undefined') {
- index.i = e.index;
- index.x = dx(index.i);
-
- state.index = e.index;
-
- indexLine
- .data([index]);
- }
-
-
- if (typeof e.rescaleY !== 'undefined') {
- rescaleY = e.rescaleY;
- }
-
- chart.update();
- });
-
- //============================================================
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.lines = lines;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, lines, 'defined', 'isArea', 'x', 'y', 'size', 'xDomain', 'yDomain', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.rescaleY = function(_) {
- if (!arguments.length) return rescaleY;
- rescaleY = _
- return rescaleY;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.average = function(_) {
- if(!arguments.length) return average;
- average = _;
- return chart;
- };
-
- //============================================================
-
-
- //============================================================
- // Functions
- //------------------------------------------------------------
-
- /* Normalize the data according to an index point. */
- function indexify(idx, data) {
- return data.map(function(line, i) {
- if (!line.values) {
- return line;
- }
- var v = lines.y()(line.values[idx], idx);
-
- //TODO: implement check below, and disable series if series loses 100% or more cause divide by 0 issue
- if (v < -.95) {
- //if a series loses more than 100%, calculations fail.. anything close can cause major distortion (but is mathematically correct till it hits 100)
- line.tempDisabled = true;
- return line;
- }
-
- line.tempDisabled = false;
-
- line.values = line.values.map(function(point, pointIndex) {
- point.display = {'y': (lines.y()(point, pointIndex) - v) / (1 + v) };
- return point;
- })
-
- return line;
- })
- }
-
- //============================================================
-
-
- return chart;
-}
-//TODO: consider deprecating by adding necessary features to multiBar model
-nv.models.discreteBar = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.ordinal()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceY = [0] // 0 is forced by default.. this makes sense for the majority of bar graphs... user can always do chart.forceY([]) to remove
- , color = nv.utils.defaultColor()
- , showValues = false
- , valueFormat = d3.format(',.2f')
- , xDomain
- , yDomain
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- , rectClass = 'discreteBar'
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //add series index to each data point for reference
- data = data.map(function(series, i) {
- series.values = series.values.map(function(point) {
- point.series = i;
- return point;
- });
- return series;
- });
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain) ? [] : // if we know xDomain and yDomain, no need to calculate
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), y0: d.y0 }
- })
- });
-
- x .domain(xDomain || d3.merge(seriesData).map(function(d) { return d.x }))
- .rangeBands([0, availableWidth], .1);
-
- y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.y }).concat(forceY)));
-
-
- // If showValues, pad the Y axis range to account for label height
- if (showValues) y.range([availableHeight - (y.domain()[0] < 0 ? 12 : 0), y.domain()[1] > 0 ? 12 : 0]);
- else y.range([availableHeight, 0]);
-
- //store old scales if they exist
- x0 = x0 || x;
- y0 = y0 || y.copy().range([y(0),y(0)]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-discretebar').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-discretebar');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-groups');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- //TODO: by definition, the discrete bar should not have multiple groups, will modify/remove later
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- d3.transition(groups.exit())
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover });
- d3.transition(groups)
- .style('stroke-opacity', 1)
- .style('fill-opacity', .75);
-
-
- var bars = groups.selectAll('g.nv-bar')
- .data(function(d) { return d.values });
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('g')
- .attr('transform', function(d,i,j) {
- return 'translate(' + (x(getX(d,i)) + x.rangeBand() * .05 ) + ', ' + y(0) + ')'
- })
- .on('mouseover', function(d,i) { //TODO: figure out why j works above, but not here
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (d.series + .5) / data.length), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (d.series + .5) / data.length), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (d.series + .5) / data.length), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- });
-
- barsEnter.append('rect')
- .attr('height', 0)
- .attr('width', x.rangeBand() * .9 / data.length )
-
- if (showValues) {
- barsEnter.append('text')
- .attr('text-anchor', 'middle')
- bars.select('text')
- .attr('x', x.rangeBand() * .9 / 2)
- .attr('y', function(d,i) { return getY(d,i) < 0 ? y(getY(d,i)) - y(0) + 12 : -4 })
- .text(function(d,i) { return valueFormat(getY(d,i)) });
- } else {
- bars.selectAll('text').remove();
- }
-
- bars
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive' })
- .style('fill', function(d,i) { return d.color || color(d,i) })
- .style('stroke', function(d,i) { return d.color || color(d,i) })
- .select('rect')
- .attr('class', rectClass)
- .attr('width', x.rangeBand() * .9 / data.length);
- d3.transition(bars)
- //.delay(function(d,i) { return i * 1200 / data[0].values.length })
- .attr('transform', function(d,i) {
- var left = x(getX(d,i)) + x.rangeBand() * .05,
- top = getY(d,i) < 0 ?
- y(0) :
- y(0) - y(getY(d,i)) < 1 ?
- y(0) - 1 : //make 1 px positive bars show up above y=0
- y(getY(d,i));
-
- return 'translate(' + left + ', ' + top + ')'
- })
- .select('rect')
- .attr('height', function(d,i) {
- return Math.max(Math.abs(y(getY(d,i)) - y(0)) || 1)
- });
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.showValues = function(_) {
- if (!arguments.length) return showValues;
- showValues = _;
- return chart;
- };
-
- chart.valueFormat= function(_) {
- if (!arguments.length) return valueFormat;
- valueFormat = _;
- return chart;
- };
-
- chart.rectClass= function(_) {
- if (!arguments.length) return rectClass;
- rectClass = _;
- return chart;
- }
- //============================================================
-
-
- return chart;
-}
-
-nv.models.discreteBarChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var discretebar = nv.models.discreteBar()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- ;
-
- var margin = {top: 15, right: 10, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.getColor()
- , staggerLabels = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + x + '</h3>' +
- '<p>' + y + '</p>'
- }
- , x
- , y
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'beforeUpdate')
- ;
-
- xAxis
- .orient('bottom')
- .highlightZero(false)
- .showMaxMin(false)
- .tickFormat(function(d) { return d })
- ;
- yAxis
- .orient('left')
- .tickFormat(d3.format(',.1f'))
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(discretebar.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(discretebar.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() { dispatch.beforeUpdate(); container.transition().call(chart); };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = discretebar.xScale();
- y = discretebar.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-discreteBarWithAxes').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-discreteBarWithAxes').append('g');
- var defsEnter = gEnter.append('defs');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
-
- g.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- discretebar
- .width(availableWidth)
- .height(availableHeight);
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(barsWrap).call(discretebar);
-
- //------------------------------------------------------------
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-x-label-clip-' + discretebar.id())
- .append('rect');
-
- g.select('#nv-x-label-clip-' + discretebar.id() + ' rect')
- .attr('width', x.rangeBand() * (staggerLabels ? 2 : 1))
- .attr('height', 16)
- .attr('x', -x.rangeBand() / (staggerLabels ? 1 : 2 ));
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + (y.range()[0] + ((discretebar.showValues() && y.domain()[0] < 0) ? 16 : 0)) + ')');
- //d3.transition(g.select('.nv-x.nv-axis'))
- g.select('.nv-x.nv-axis').transition().duration(0)
- .call(xAxis);
-
-
- var xTicks = g.select('.nv-x.nv-axis').selectAll('g');
-
- if (staggerLabels) {
- xTicks
- .selectAll('text')
- .attr('transform', function(d,i,j) { return 'translate(0,' + (j % 2 == 0 ? '5' : '17') + ')' })
- }
-
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- discretebar.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- discretebar.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.discretebar = discretebar;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, discretebar, 'x', 'y', 'xDomain', 'yDomain', 'forceX', 'forceY', 'id', 'showValues', 'valueFormat');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- discretebar.color(color);
- return chart;
- };
-
- chart.staggerLabels = function(_) {
- if (!arguments.length) return staggerLabels;
- staggerLabels = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.distribution = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 400 //technically width or height depending on x or y....
- , size = 8
- , axis = 'x' // 'x' or 'y'... horizontal or vertical
- , getData = function(d) { return d[axis] } // defaults d.x or d.y
- , color = nv.utils.defaultColor()
- , scale = d3.scale.linear()
- , domain
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var scale0;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableLength = width - (axis === 'x' ? margin.left + margin.right : margin.top + margin.bottom),
- naxis = axis == 'x' ? 'y' : 'x',
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- scale0 = scale0 || scale;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-distribution').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-distribution');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')')
-
- //------------------------------------------------------------
-
-
- var distWrap = g.selectAll('g.nv-dist')
- .data(function(d) { return d }, function(d) { return d.key });
-
- distWrap.enter().append('g');
- distWrap
- .attr('class', function(d,i) { return 'nv-dist nv-series-' + i })
- .style('stroke', function(d,i) { return color(d, i) });
-
- var dist = distWrap.selectAll('line.nv-dist' + axis)
- .data(function(d) { return d.values })
- dist.enter().append('line')
- .attr(axis + '1', function(d,i) { return scale0(getData(d,i)) })
- .attr(axis + '2', function(d,i) { return scale0(getData(d,i)) })
- d3.transition(distWrap.exit().selectAll('line.nv-dist' + axis))
- .attr(axis + '1', function(d,i) { return scale(getData(d,i)) })
- .attr(axis + '2', function(d,i) { return scale(getData(d,i)) })
- .style('stroke-opacity', 0)
- .remove();
- dist
- .attr('class', function(d,i) { return 'nv-dist' + axis + ' nv-dist' + axis + '-' + i })
- .attr(naxis + '1', 0)
- .attr(naxis + '2', size);
- d3.transition(dist)
- .attr(axis + '1', function(d,i) { return scale(getData(d,i)) })
- .attr(axis + '2', function(d,i) { return scale(getData(d,i)) })
-
-
- scale0 = scale.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.axis = function(_) {
- if (!arguments.length) return axis;
- axis = _;
- return chart;
- };
-
- chart.size = function(_) {
- if (!arguments.length) return size;
- size = _;
- return chart;
- };
-
- chart.getData = function(_) {
- if (!arguments.length) return getData;
- getData = d3.functor(_);
- return chart;
- };
-
- chart.scale = function(_) {
- if (!arguments.length) return scale;
- scale = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-//TODO: consider deprecating and using multibar with single series for this
-nv.models.historicalBar = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceX = []
- , forceY = [0]
- , padData = false
- , clipEdge = true
- , color = nv.utils.defaultColor()
- , xDomain
- , yDomain
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x .domain(xDomain || d3.extent(data[0].values.map(getX).concat(forceX) ))
-
- if (padData)
- x.range([availableWidth * .5 / data[0].values.length, availableWidth * (data[0].values.length - .5) / data[0].values.length ]);
- else
- x.range([0, availableWidth]);
-
- y .domain(yDomain || d3.extent(data[0].values.map(getY).concat(forceY) ))
- .range([availableHeight, 0]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1] || y.domain()[0] === y.domain()[1]) singlePoint = true;
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-bar').data([data[0].values]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-bar');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-bars');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- container
- .on('click', function(d,i) {
- dispatch.chartClick({
- data: d,
- index: i,
- pos: d3.event,
- id: id
- });
- });
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-chart-clip-path-' + id)
- .append('rect');
-
- wrap.select('#nv-chart-clip-path-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-chart-clip-path-' + id + ')' : '');
-
-
-
- var bars = wrap.select('.nv-bars').selectAll('.nv-bar')
- .data(function(d) { return d });
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('rect')
- //.attr('class', function(d,i,j) { return (getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive') + ' nv-bar-' + j + '-' + i })
- .attr('x', 0 )
- .attr('y', function(d,i) { return y(Math.max(0, getY(d,i))) })
- .attr('height', function(d,i) { return Math.abs(y(getY(d,i)) - y(0)) })
- .on('mouseover', function(d,i) {
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- point: d,
- series: data[0],
- pos: [x(getX(d,i)), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
-
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- point: d,
- series: data[0],
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- });
-
- bars
- .attr('fill', function(d,i) { return color(d, i); })
- .attr('class', function(d,i,j) { return (getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive') + ' nv-bar-' + j + '-' + i })
- .attr('transform', function(d,i) { return 'translate(' + (x(getX(d,i)) - availableWidth / data[0].values.length * .45) + ',0)'; }) //TODO: better width calculations that don't assume always uniform data spacing;w
- .attr('width', (availableWidth / data[0].values.length) * .9 )
-
-
- d3.transition(bars)
- //.attr('y', function(d,i) { return y(Math.max(0, getY(d,i))) })
- .attr('y', function(d,i) {
- return getY(d,i) < 0 ?
- y(0) :
- y(0) - y(getY(d,i)) < 1 ?
- y(0) - 1 :
- y(getY(d,i))
- })
- .attr('height', function(d,i) { return Math.max(Math.abs(y(getY(d,i)) - y(0)),1) });
- //.order(); // not sure if this makes any sense for this model
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.padData = function(_) {
- if (!arguments.length) return padData;
- padData = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.historicalBarChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var bars = nv.models.historicalBar()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 90, bottom: 50, left: 90}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , showLegend = false
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , x
- , y
- , state = {}
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient( (rightAlignYAxis) ? 'right' : 'left')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
-
- // New addition to calculate position if SVG is scaled with viewBox, may move TODO: consider implementing everywhere else
- if (offsetElement) {
- var svg = d3.select(offsetElement).select('svg');
- var viewBox = (svg.node()) ? svg.attr('viewBox') : null;
- if (viewBox) {
- viewBox = viewBox.split(' ');
- var ratio = parseInt(svg.style('width')) / viewBox[2];
- e.pos[0] = e.pos[0] * ratio;
- e.pos[1] = e.pos[1] * ratio;
- }
- }
-
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(bars.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(bars.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() { chart(selection) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = bars.xScale();
- y = bars.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-lineChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-lineChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- bars
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(barsWrap).call(bars);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- g.select('.nv-x.nv-axis')
- .transition()
- .call(xAxis);
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis')
- .transition().duration(0)
- .call(yAxis);
- }
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- selection.transition().call(chart);
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
-
-/*
- legend.dispatch.on('legendMouseover', function(d, i) {
- d.hover = true;
- selection.transition().call(chart)
- });
-
- legend.dispatch.on('legendMouseout', function(d, i) {
- d.hover = false;
- selection.transition().call(chart)
- });
-*/
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- selection.call(chart);
- });
-
- //============================================================
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- bars.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.bars = bars;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, bars, 'defined', 'isArea', 'x', 'y', 'size', 'xScale', 'yScale', 'xDomain', 'yDomain', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id', 'interpolate');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-nv.models.indentedTree = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0} //TODO: implement, maybe as margin on the containing div
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor()
- , id = Math.floor(Math.random() * 10000)
- , header = true
- , filterZero = false
- , noData = "No Data Available."
- , childIndent = 20
- , columns = [{key:'key', label: 'Name', type:'text'}] //TODO: consider functions like chart.addColumn, chart.removeColumn, instead of a block like this
- , tableClass = null
- , iconOpen = 'images/grey-plus.png' //TODO: consider removing this and replacing with a '+' or '-' unless user defines images
- , iconClose = 'images/grey-minus.png'
- , dispatch = d3.dispatch('elementClick', 'elementDblclick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
- var idx = 0;
-
- function chart(selection) {
- selection.each(function(data) {
- var depth = 1,
- container = d3.select(this);
-
- var tree = d3.layout.tree()
- .children(function(d) { return d.values })
- .size([height, childIndent]); //Not sure if this is needed now that the result is HTML
-
- chart.update = function() { container.transition().duration(600).call(chart) };
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
- if (!data[0]) data[0] = {key: noData};
-
- //------------------------------------------------------------
-
-
- var nodes = tree.nodes(data[0]);
-
- // nodes.map(function(d) {
- // d.id = i++;
- // })
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('div').data([[nodes]]);
- var wrapEnter = wrap.enter().append('div').attr('class', 'nvd3 nv-wrap nv-indentedtree');
- var tableEnter = wrapEnter.append('table');
- var table = wrap.select('table').attr('width', '100%').attr('class', tableClass);
-
- //------------------------------------------------------------
-
-
- if (header) {
- var thead = tableEnter.append('thead');
-
- var theadRow1 = thead.append('tr');
-
- columns.forEach(function(column) {
- theadRow1
- .append('th')
- .attr('width', column.width ? column.width : '10%')
- .style('text-align', column.type == 'numeric' ? 'right' : 'left')
- .append('span')
- .text(column.label);
- });
- }
-
-
- var tbody = table.selectAll('tbody')
- .data(function(d) { return d });
- tbody.enter().append('tbody');
-
-
-
- //compute max generations
- depth = d3.max(nodes, function(node) { return node.depth });
- tree.size([height, depth * childIndent]); //TODO: see if this is necessary at all
-
-
- // Update the nodes…
- var node = tbody.selectAll('tr')
- // .data(function(d) { return d; }, function(d) { return d.id || (d.id == ++i)});
- .data(function(d) { return d.filter(function(d) { return (filterZero && !d.children) ? filterZero(d) : true; } )}, function(d,i) { return d.id || (d.id || ++idx)});
- //.style('display', 'table-row'); //TODO: see if this does anything
-
- node.exit().remove();
-
- node.select('img.nv-treeicon')
- .attr('src', icon)
- .classed('folded', folded);
-
- var nodeEnter = node.enter().append('tr');
-
-
- columns.forEach(function(column, index) {
-
- var nodeName = nodeEnter.append('td')
- .style('padding-left', function(d) { return (index ? 0 : d.depth * childIndent + 12 + (icon(d) ? 0 : 16)) + 'px' }, 'important') //TODO: check why I did the ternary here
- .style('text-align', column.type == 'numeric' ? 'right' : 'left');
-
-
- if (index == 0) {
- nodeName.append('img')
- .classed('nv-treeicon', true)
- .classed('nv-folded', folded)
- .attr('src', icon)
- .style('width', '14px')
- .style('height', '14px')
- .style('padding', '0 1px')
- .style('display', function(d) { return icon(d) ? 'inline-block' : 'none'; })
- .on('click', click);
- }
-
-
- nodeName.append('span')
- .attr('class', d3.functor(column.classes) )
- .text(function(d) { return column.format ? column.format(d) :
- (d[column.key] || '-') });
-
- if (column.showCount) {
- nodeName.append('span')
- .attr('class', 'nv-childrenCount');
-
- node.selectAll('span.nv-childrenCount').text(function(d) {
- return ((d.values && d.values.length) || (d._values && d._values.length)) ? //If this is a parent
- '(' + ((d.values && (d.values.filter(function(d) { return filterZero ? filterZero(d) : true; }).length)) //If children are in values check its children and filter
- || (d._values && d._values.filter(function(d) { return filterZero ? filterZero(d) : true; }).length) //Otherwise, do the same, but with the other name, _values...
- || 0) + ')' //This is the catch-all in case there are no children after a filter
- : '' //If this is not a parent, just give an empty string
- });
- }
-
- if (column.click)
- nodeName.select('span').on('click', column.click);
-
- });
-
- node
- .order()
- .on('click', function(d) {
- dispatch.elementClick({
- row: this, //TODO: decide whether or not this should be consistent with scatter/line events or should be an html link (a href)
- data: d,
- pos: [d.x, d.y]
- });
- })
- .on('dblclick', function(d) {
- dispatch.elementDblclick({
- row: this,
- data: d,
- pos: [d.x, d.y]
- });
- })
- .on('mouseover', function(d) {
- dispatch.elementMouseover({
- row: this,
- data: d,
- pos: [d.x, d.y]
- });
- })
- .on('mouseout', function(d) {
- dispatch.elementMouseout({
- row: this,
- data: d,
- pos: [d.x, d.y]
- });
- });
-
-
-
-
- // Toggle children on click.
- function click(d, _, unshift) {
- d3.event.stopPropagation();
-
- if(d3.event.shiftKey && !unshift) {
- //If you shift-click, it'll toggle fold all the children, instead of itself
- d3.event.shiftKey = false;
- d.values && d.values.forEach(function(node){
- if (node.values || node._values) {
- click(node, 0, true);
- }
- });
- return true;
- }
- if(!hasChildren(d)) {
- //download file
- //window.location.href = d.url;
- return true;
- }
- if (d.values) {
- d._values = d.values;
- d.values = null;
- } else {
- d.values = d._values;
- d._values = null;
- }
- chart.update();
- }
-
-
- function icon(d) {
- return (d._values && d._values.length) ? iconOpen : (d.values && d.values.length) ? iconClose : '';
- }
-
- function folded(d) {
- return (d._values && d._values.length);
- }
-
- function hasChildren(d) {
- var values = d.values || d._values;
-
- return (values && values.length);
- }
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- scatter.color(color);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.header = function(_) {
- if (!arguments.length) return header;
- header = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.filterZero = function(_) {
- if (!arguments.length) return filterZero;
- filterZero = _;
- return chart;
- };
-
- chart.columns = function(_) {
- if (!arguments.length) return columns;
- columns = _;
- return chart;
- };
-
- chart.tableClass = function(_) {
- if (!arguments.length) return tableClass;
- tableClass = _;
- return chart;
- };
-
- chart.iconOpen = function(_){
- if (!arguments.length) return iconOpen;
- iconOpen = _;
- return chart;
- }
-
- chart.iconClose = function(_){
- if (!arguments.length) return iconClose;
- iconClose = _;
- return chart;
- }
-
- //============================================================
-
-
- return chart;
-};nv.models.legend = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 5, right: 0, bottom: 5, left: 0}
- , width = 400
- , height = 20
- , getKey = function(d) { return d.key }
- , color = nv.utils.defaultColor()
- , align = true
- , dispatch = d3.dispatch('legendClick', 'legendDblclick', 'legendMouseover', 'legendMouseout')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-legend').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-legend').append('g');
- var g = wrap.select('g');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- var series = g.selectAll('.nv-series')
- .data(function(d) { return d });
- var seriesEnter = series.enter().append('g').attr('class', 'nv-series')
- .on('mouseover', function(d,i) {
- dispatch.legendMouseover(d,i); //TODO: Make consistent with other event objects
- })
- .on('mouseout', function(d,i) {
- dispatch.legendMouseout(d,i);
- })
- .on('click', function(d,i) {
- dispatch.legendClick(d,i);
- })
- .on('dblclick', function(d,i) {
- dispatch.legendDblclick(d,i);
- });
- seriesEnter.append('circle')
- .style('stroke-width', 2)
- .attr('r', 5);
- seriesEnter.append('text')
- .attr('text-anchor', 'start')
- .attr('dy', '.32em')
- .attr('dx', '8');
- series.classed('disabled', function(d) { return d.disabled });
- series.exit().remove();
- series.select('circle')
- .style('fill', function(d,i) { return d.color || color(d,i)})
- .style('stroke', function(d,i) { return d.color || color(d, i) });
- series.select('text').text(getKey);
-
-
- //TODO: implement fixed-width and max-width options (max-width is especially useful with the align option)
-
- // NEW ALIGNING CODE, TODO: clean up
- if (align) {
-
- var seriesWidths = [];
- series.each(function(d,i) {
- var legendText = d3.select(this).select('text');
- var svgComputedTextLength = legendText.node().getComputedTextLength()
- || nv.utils.calcApproxTextWidth(legendText);
- seriesWidths.push(svgComputedTextLength + 28); // 28 is ~ the width of the circle plus some padding
- });
-
- //nv.log('Series Widths: ', JSON.stringify(seriesWidths));
-
- var seriesPerRow = 0;
- var legendWidth = 0;
- var columnWidths = [];
-
- while ( legendWidth < availableWidth && seriesPerRow < seriesWidths.length) {
- columnWidths[seriesPerRow] = seriesWidths[seriesPerRow];
- legendWidth += seriesWidths[seriesPerRow++];
- }
-
-
- while ( legendWidth > availableWidth && seriesPerRow > 1 ) {
- columnWidths = [];
- seriesPerRow--;
-
- for (k = 0; k < seriesWidths.length; k++) {
- if (seriesWidths[k] > (columnWidths[k % seriesPerRow] || 0) )
- columnWidths[k % seriesPerRow] = seriesWidths[k];
- }
-
- legendWidth = columnWidths.reduce(function(prev, cur, index, array) {
- return prev + cur;
- });
- }
- //console.log(columnWidths, legendWidth, seriesPerRow);
-
- var xPositions = [];
- for (var i = 0, curX = 0; i < seriesPerRow; i++) {
- xPositions[i] = curX;
- curX += columnWidths[i];
- }
-
- series
- .attr('transform', function(d, i) {
- return 'translate(' + xPositions[i % seriesPerRow] + ',' + (5 + Math.floor(i / seriesPerRow) * 20) + ')';
- });
-
- //position legend as far right as possible within the total width
- g.attr('transform', 'translate(' + (width - margin.right - legendWidth) + ',' + margin.top + ')');
-
- height = margin.top + margin.bottom + (Math.ceil(seriesWidths.length / seriesPerRow) * 20);
-
- } else {
-
- var ypos = 5,
- newxpos = 5,
- maxwidth = 0,
- xpos;
- series
- .attr('transform', function(d, i) {
- var length = d3.select(this).select('text').node().getComputedTextLength() + 28;
- xpos = newxpos;
-
- if (width < margin.left + margin.right + xpos + length) {
- newxpos = xpos = 5;
- ypos += 20;
- }
-
- newxpos += length;
- if (newxpos > maxwidth) maxwidth = newxpos;
-
- return 'translate(' + xpos + ',' + ypos + ')';
- });
-
- //position legend as far right as possible within the total width
- g.attr('transform', 'translate(' + (width - margin.right - maxwidth) + ',' + margin.top + ')');
-
- height = margin.top + margin.bottom + ypos + 15;
-
- }
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.key = function(_) {
- if (!arguments.length) return getKey;
- getKey = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.align = function(_) {
- if (!arguments.length) return align;
- align = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.line = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var scatter = nv.models.scatter()
- ;
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor() // a function that returns a color
- , getX = function(d) { return d.x } // accessor to get the x value from a data point
- , getY = function(d) { return d.y } // accessor to get the y value from a data point
- , defined = function(d,i) { return !isNaN(getY(d,i)) && getY(d,i) !== null } // allows a line to be not continuous when it is not defined
- , isArea = function(d) { return d.area } // decides if a line is an area or just a line
- , clipEdge = false // if true, masks lines within x and y scale
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , interpolate = "linear" // controls the line interpolation
- ;
-
- scatter
- .size(16) // default size
- .sizeDomain([16,256]) //set to speed up calculation, needs to be unset if there is a custom size accessor
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0 //used to store previous scales
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = scatter.xScale();
- y = scatter.yScale();
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-line').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-line');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- gEnter.append('g').attr('class', 'nv-groups');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
-
- var scatterWrap = wrap.select('.nv-scatterWrap');
- //.datum(data); // Data automatically trickles down from the wrap
-
- d3.transition(scatterWrap).call(scatter);
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + scatter.id())
- .append('rect');
-
- wrap.select('#nv-edge-clip-' + scatter.id() + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + scatter.id() + ')' : '');
- scatterWrap
- .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + scatter.id() + ')' : '');
-
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- d3.transition(groups.exit())
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i)});
- d3.transition(groups)
- .style('stroke-opacity', 1)
- .style('fill-opacity', .5);
-
-
-
- var areaPaths = groups.selectAll('path.nv-area')
- .data(function(d) { return isArea(d) ? [d] : [] }); // this is done differently than lines because I need to check if series is an area
- areaPaths.enter().append('path')
- .attr('class', 'nv-area')
- .attr('d', function(d) {
- return d3.svg.area()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return x0(getX(d,i)) })
- .y0(function(d,i) { return y0(getY(d,i)) })
- .y1(function(d,i) { return y0( y.domain()[0] <= 0 ? y.domain()[1] >= 0 ? 0 : y.domain()[1] : y.domain()[0] ) })
- //.y1(function(d,i) { return y0(0) }) //assuming 0 is within y domain.. may need to tweak this
- .apply(this, [d.values])
- });
- d3.transition(groups.exit().selectAll('path.nv-area'))
- .attr('d', function(d) {
- return d3.svg.area()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return x(getX(d,i)) })
- .y0(function(d,i) { return y(getY(d,i)) })
- .y1(function(d,i) { return y( y.domain()[0] <= 0 ? y.domain()[1] >= 0 ? 0 : y.domain()[1] : y.domain()[0] ) })
- //.y1(function(d,i) { return y0(0) }) //assuming 0 is within y domain.. may need to tweak this
- .apply(this, [d.values])
- });
- d3.transition(areaPaths)
- .attr('d', function(d) {
- return d3.svg.area()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return x(getX(d,i)) })
- .y0(function(d,i) { return y(getY(d,i)) })
- .y1(function(d,i) { return y( y.domain()[0] <= 0 ? y.domain()[1] >= 0 ? 0 : y.domain()[1] : y.domain()[0] ) })
- //.y1(function(d,i) { return y0(0) }) //assuming 0 is within y domain.. may need to tweak this
- .apply(this, [d.values])
- });
-
-
-
- var linePaths = groups.selectAll('path.nv-line')
- .data(function(d) { return [d.values] });
- linePaths.enter().append('path')
- .attr('class', 'nv-line')
- .attr('d',
- d3.svg.line()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return x0(getX(d,i)) })
- .y(function(d,i) { return y0(getY(d,i)) })
- );
- d3.transition(groups.exit().selectAll('path.nv-line'))
- .attr('d',
- d3.svg.line()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return x(getX(d,i)) })
- .y(function(d,i) { return y(getY(d,i)) })
- );
- d3.transition(linePaths)
- .attr('d',
- d3.svg.line()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return x(getX(d,i)) })
- .y(function(d,i) { return y(getY(d,i)) })
- );
-
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = scatter.dispatch;
- chart.scatter = scatter;
-
- d3.rebind(chart, scatter, 'id', 'interactive', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'sizeDomain', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'clipRadius', 'padData');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- scatter.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- scatter.y(_);
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- scatter.color(color);
- return chart;
- };
-
- chart.interpolate = function(_) {
- if (!arguments.length) return interpolate;
- interpolate = _;
- return chart;
- };
-
- chart.defined = function(_) {
- if (!arguments.length) return defined;
- defined = _;
- return chart;
- };
-
- chart.isArea = function(_) {
- if (!arguments.length) return isArea;
- isArea = d3.functor(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.lineChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- ;
-
-//set margin.right to 23 to fit dates on the x-axis within the chart
- var margin = {top: 30, right: 20, bottom: 50, left: 60}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , x
- , y
- , state = {}
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
-
- // New addition to calculate position if SVG is scaled with viewBox, may move TODO: consider implementing everywhere else
- if (offsetElement) {
- var svg = d3.select(offsetElement).select('svg');
- var viewBox = (svg.node()) ? svg.attr('viewBox') : null;
- if (viewBox) {
- viewBox = viewBox.split(' ');
- var ratio = parseInt(svg.style('width')) / viewBox[2];
- e.pos[0] = e.pos[0] * ratio;
- e.pos[1] = e.pos[1] * ratio;
- }
- }
-
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() { container.transition().call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = lines.xScale();
- y = lines.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-lineChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-lineChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-linesWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- lines
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
-
-
- var linesWrap = g.select('.nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(linesWrap).call(lines);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
- }
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- // container.transition().call(chart);
- chart.update();
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
-
-/*
- legend.dispatch.on('legendMouseover', function(d, i) {
- d.hover = true;
- selection.transition().call(chart)
- });
-
- legend.dispatch.on('legendMouseout', function(d, i) {
- d.hover = false;
- selection.transition().call(chart)
- });
-*/
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.lines = lines;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, lines, 'defined', 'isArea', 'x', 'y', 'size', 'xScale', 'yScale', 'xDomain', 'yDomain', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id', 'interpolate');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.linePlusBarChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , bars = nv.models.historicalBar()
- , xAxis = nv.models.axis()
- , y1Axis = nv.models.axis()
- , y2Axis = nv.models.axis()
- , legend = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 60, bottom: 50, left: 60}
- , width = null
- , height = null
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , color = nv.utils.defaultColor()
- , showLegend = true
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>';
- }
- , x
- , y1
- , y2
- , state = {}
- , defaultState = null
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- ;
-
- bars
- .padData(true)
- ;
- lines
- .clipEdge(false)
- .padData(true)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(7)
- .highlightZero(false)
- ;
- y1Axis
- .orient('left')
- ;
- y2Axis
- .orient('right')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = (e.series.bar ? y1Axis : y2Axis).tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- }
- ;
-
- //------------------------------------------------------------
-
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart); };
- // chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- var dataBars = data.filter(function(d) { return !d.disabled && d.bar });
- var dataLines = data.filter(function(d) { return !d.bar }); // removed the !d.disabled clause here to fix Issue #240
-
- //x = xAxis.scale();
- x = dataLines.filter(function(d) { return !d.disabled; }).length && dataLines.filter(function(d) { return !d.disabled; })[0].values.length ? lines.xScale() : bars.xScale();
- //x = dataLines.filter(function(d) { return !d.disabled; }).length ? lines.xScale() : bars.xScale(); //old code before change above
- y1 = bars.yScale();
- y2 = lines.yScale();
-
- //------------------------------------------------------------
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('g.nv-wrap.nv-linePlusBar').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-linePlusBar').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y1 nv-axis');
- gEnter.append('g').attr('class', 'nv-y2 nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-linesWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- g.select('.nv-legendWrap')
- .datum(data.map(function(series) {
- series.originalKey = series.originalKey === undefined ? series.key : series.originalKey;
- series.key = series.originalKey + (series.bar ? ' (left axis)' : ' (right axis)');
- return series;
- }))
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + ( availableWidth / 2 ) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
-
- lines
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].bar }))
-
- bars
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && data[i].bar }))
-
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(dataBars.length ? dataBars : [{values:[]}])
-
- var linesWrap = g.select('.nv-linesWrap')
- .datum(dataLines[0] && !dataLines[0].disabled ? dataLines : [{values:[]}] );
- //.datum(!dataLines[0].disabled ? dataLines : [{values:dataLines[0].values.map(function(d) { return [d[0], null] }) }] );
-
- d3.transition(barsWrap).call(bars);
- d3.transition(linesWrap).call(lines);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y1.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
-
-
- y1Axis
- .scale(y1)
- .ticks( availableHeight / 36 )
- .tickSize(-availableWidth, 0);
-
- d3.transition(g.select('.nv-y1.nv-axis'))
- .style('opacity', dataBars.length ? 1 : 0)
- .call(y1Axis);
-
-
- y2Axis
- .scale(y2)
- .ticks( availableHeight / 36 )
- .tickSize(dataBars.length ? 0 : -availableWidth, 0); // Show the y2 rules only if y1 has none
-
- g.select('.nv-y2.nv-axis')
- .style('opacity', dataLines.length ? 1 : 0)
- .attr('transform', 'translate(' + availableWidth + ',0)');
- //.attr('transform', 'translate(' + x.range()[1] + ',0)');
-
- d3.transition(g.select('.nv-y2.nv-axis'))
- .call(y2Axis);
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.legend = legend;
- chart.lines = lines;
- chart.bars = bars;
- chart.xAxis = xAxis;
- chart.y1Axis = y1Axis;
- chart.y2Axis = y2Axis;
-
- d3.rebind(chart, lines, 'defined', 'size', 'clipVoronoi', 'interpolate');
- //TODO: consider rebinding x, y and some other stuff, and simply do soemthign lile bars.x(lines.x()), etc.
- //d3.rebind(chart, lines, 'x', 'y', 'size', 'xDomain', 'yDomain', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- lines.x(_);
- bars.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- lines.y(_);
- bars.y(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.lineWithFocusChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , lines2 = nv.models.line()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , x2Axis = nv.models.axis()
- , y2Axis = nv.models.axis()
- , legend = nv.models.legend()
- , brush = d3.svg.brush()
- ;
-
- var margin = {top: 30, right: 30, bottom: 30, left: 60}
- , margin2 = {top: 0, right: 30, bottom: 20, left: 60}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , height2 = 100
- , x
- , y
- , x2
- , y2
- , showLegend = true
- , brushExtent = null
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'brush')
- ;
-
- lines
- .clipEdge(true)
- ;
- lines2
- .interactive(false)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(5)
- ;
- yAxis
- .orient('left')
- ;
- x2Axis
- .orient('bottom')
- .tickPadding(5)
- ;
- y2Axis
- .orient('left')
- ;
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2,
- availableHeight2 = height2 - margin2.top - margin2.bottom;
-
- chart.update = function() { container.transition().call(chart) };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight1 / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = lines.xScale();
- y = lines.yScale();
- x2 = lines2.xScale();
- y2 = lines2.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-lineWithFocusChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-lineWithFocusChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- var focusEnter = gEnter.append('g').attr('class', 'nv-focus');
- focusEnter.append('g').attr('class', 'nv-x nv-axis');
- focusEnter.append('g').attr('class', 'nv-y nv-axis');
- focusEnter.append('g').attr('class', 'nv-linesWrap');
-
- var contextEnter = gEnter.append('g').attr('class', 'nv-context');
- contextEnter.append('g').attr('class', 'nv-x nv-axis');
- contextEnter.append('g').attr('class', 'nv-y nv-axis');
- contextEnter.append('g').attr('class', 'nv-linesWrap');
- contextEnter.append('g').attr('class', 'nv-brushBackground');
- contextEnter.append('g').attr('class', 'nv-x nv-brush');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- lines
- .width(availableWidth)
- .height(availableHeight1)
- .color(
- data
- .map(function(d,i) {
- return d.color || color(d, i);
- })
- .filter(function(d,i) {
- return !data[i].disabled;
- })
- );
-
- lines2
- .defined(lines.defined())
- .width(availableWidth)
- .height(availableHeight2)
- .color(
- data
- .map(function(d,i) {
- return d.color || color(d, i);
- })
- .filter(function(d,i) {
- return !data[i].disabled;
- })
- );
-
- g.select('.nv-context')
- .attr('transform', 'translate(0,' + ( availableHeight1 + margin.bottom + margin2.top) + ')')
-
- var contextLinesWrap = g.select('.nv-context .nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(contextLinesWrap).call(lines2);
-
- //------------------------------------------------------------
-
-
- /*
- var focusLinesWrap = g.select('.nv-focus .nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(focusLinesWrap).call(lines);
- */
-
-
- //------------------------------------------------------------
- // Setup Main (Focus) Axes
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight1, 0);
-
- yAxis
- .scale(y)
- .ticks( availableHeight1 / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-focus .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + availableHeight1 + ')');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Brush
-
- brush
- .x(x2)
- .on('brush', onBrush);
-
- if (brushExtent) brush.extent(brushExtent);
-
- var brushBG = g.select('.nv-brushBackground').selectAll('g')
- .data([brushExtent || brush.extent()])
-
- var brushBGenter = brushBG.enter()
- .append('g');
-
- brushBGenter.append('rect')
- .attr('class', 'left')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- brushBGenter.append('rect')
- .attr('class', 'right')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- gBrush = g.select('.nv-x.nv-brush')
- .call(brush);
- gBrush.selectAll('rect')
- //.attr('y', -5)
- .attr('height', availableHeight2);
- gBrush.selectAll('.resize').append('path').attr('d', resizePath);
-
- onBrush();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Secondary (Context) Axes
-
- x2Axis
- .scale(x2)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight2, 0);
-
- g.select('.nv-context .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y2.range()[0] + ')');
- d3.transition(g.select('.nv-context .nv-x.nv-axis'))
- .call(x2Axis);
-
-
- y2Axis
- .scale(y2)
- .ticks( availableHeight2 / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-context .nv-y.nv-axis'))
- .call(y2Axis);
-
- g.select('.nv-context .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y2.range()[0] + ')');
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- container.transition().call(chart);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
-
- //============================================================
- // Functions
- //------------------------------------------------------------
-
- // Taken from crossfilter (http://square.github.com/crossfilter/)
- function resizePath(d) {
- var e = +(d == 'e'),
- x = e ? 1 : -1,
- y = availableHeight2 / 3;
- return 'M' + (.5 * x) + ',' + y
- + 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6)
- + 'V' + (2 * y - 6)
- + 'A6,6 0 0 ' + e + ' ' + (.5 * x) + ',' + (2 * y)
- + 'Z'
- + 'M' + (2.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8)
- + 'M' + (4.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8);
- }
-
-
- function updateBrushBG() {
- if (!brush.empty()) brush.extent(brushExtent);
- brushBG
- .data([brush.empty() ? x2.domain() : brushExtent])
- .each(function(d,i) {
- var leftWidth = x2(d[0]) - x.range()[0],
- rightWidth = x.range()[1] - x2(d[1]);
- d3.select(this).select('.left')
- .attr('width', leftWidth < 0 ? 0 : leftWidth);
-
- d3.select(this).select('.right')
- .attr('x', x2(d[1]))
- .attr('width', rightWidth < 0 ? 0 : rightWidth);
- });
- }
-
-
- function onBrush() {
- brushExtent = brush.empty() ? null : brush.extent();
- extent = brush.empty() ? x2.domain() : brush.extent();
-
-
- dispatch.brush({extent: extent, brush: brush});
-
-
- updateBrushBG();
-
- // Update Main (Focus)
- var focusLinesWrap = g.select('.nv-focus .nv-linesWrap')
- .datum(
- data
- .filter(function(d) { return !d.disabled })
- .map(function(d,i) {
- return {
- key: d.key,
- values: d.values.filter(function(d,i) {
- return lines.x()(d,i) >= extent[0] && lines.x()(d,i) <= extent[1];
- })
- }
- })
- );
- d3.transition(focusLinesWrap).call(lines);
-
-
- // Update Main (Focus) Axes
- d3.transition(g.select('.nv-focus .nv-x.nv-axis'))
- .call(xAxis);
- d3.transition(g.select('.nv-focus .nv-y.nv-axis'))
- .call(yAxis);
- }
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.legend = legend;
- chart.lines = lines;
- chart.lines2 = lines2;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.x2Axis = x2Axis;
- chart.y2Axis = y2Axis;
-
- d3.rebind(chart, lines, 'defined', 'isArea', 'size', 'xDomain', 'yDomain', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');
-
- chart.x = function(_) {
- if (!arguments.length) return lines.x;
- lines.x(_);
- lines2.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return lines.y;
- lines.y(_);
- lines2.y(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.margin2 = function(_) {
- if (!arguments.length) return margin2;
- margin2 = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.height2 = function(_) {
- if (!arguments.length) return height2;
- height2 = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color =nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.interpolate = function(_) {
- if (!arguments.length) return lines.interpolate();
- lines.interpolate(_);
- lines2.interpolate(_);
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- // Chart has multiple similar Axes, to prevent code duplication, probably need to link all axis functions manually like below
- chart.xTickFormat = function(_) {
- if (!arguments.length) return xAxis.tickFormat();
- xAxis.tickFormat(_);
- x2Axis.tickFormat(_);
- return chart;
- };
-
- chart.yTickFormat = function(_) {
- if (!arguments.length) return yAxis.tickFormat();
- yAxis.tickFormat(_);
- y2Axis.tickFormat(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.linePlusBarWithFocusChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , lines2 = nv.models.line()
- , bars = nv.models.historicalBar()
- , bars2 = nv.models.historicalBar()
- , xAxis = nv.models.axis()
- , x2Axis = nv.models.axis()
- , y1Axis = nv.models.axis()
- , y2Axis = nv.models.axis()
- , y3Axis = nv.models.axis()
- , y4Axis = nv.models.axis()
- , legend = nv.models.legend()
- , brush = d3.svg.brush()
- ;
-
- var margin = {top: 30, right: 30, bottom: 30, left: 60}
- , margin2 = {top: 0, right: 30, bottom: 20, left: 60}
- , width = null
- , height = null
- , height2 = 100
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , color = nv.utils.defaultColor()
- , showLegend = true
- , extent
- , brushExtent = null
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>';
- }
- , x
- , x2
- , y1
- , y2
- , y3
- , y4
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'brush')
- ;
-
- lines
- .clipEdge(true)
- ;
- lines2
- .interactive(false)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(5)
- ;
- y1Axis
- .orient('left')
- ;
- y2Axis
- .orient('right')
- ;
- x2Axis
- .orient('bottom')
- .tickPadding(5)
- ;
- y3Axis
- .orient('left')
- ;
- y4Axis
- .orient('right')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- if (extent) {
- e.pointIndex += Math.ceil(extent[0]);
- }
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = (e.series.bar ? y1Axis : y2Axis).tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //------------------------------------------------------------
-
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2,
- availableHeight2 = height2 - margin2.top - margin2.bottom;
-
- chart.update = function() { container.transition().call(chart); };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight1 / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- var dataBars = data.filter(function(d) { return !d.disabled && d.bar });
- var dataLines = data.filter(function(d) { return !d.bar }); // removed the !d.disabled clause here to fix Issue #240
-
- x = bars.xScale();
- x2 = x2Axis.scale();
- y1 = bars.yScale();
- y2 = lines.yScale();
- y3 = bars2.yScale();
- y4 = lines2.yScale();
-
- var series1 = data
- .filter(function(d) { return !d.disabled && d.bar })
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i) }
- })
- });
-
- var series2 = data
- .filter(function(d) { return !d.disabled && !d.bar })
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i) }
- })
- });
-
- x .range([0, availableWidth]);
-
- x2 .domain(d3.extent(d3.merge(series1.concat(series2)), function(d) { return d.x } ))
- .range([0, availableWidth]);
-
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-linePlusBar').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-linePlusBar').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- var focusEnter = gEnter.append('g').attr('class', 'nv-focus');
- focusEnter.append('g').attr('class', 'nv-x nv-axis');
- focusEnter.append('g').attr('class', 'nv-y1 nv-axis');
- focusEnter.append('g').attr('class', 'nv-y2 nv-axis');
- focusEnter.append('g').attr('class', 'nv-barsWrap');
- focusEnter.append('g').attr('class', 'nv-linesWrap');
-
- var contextEnter = gEnter.append('g').attr('class', 'nv-context');
- contextEnter.append('g').attr('class', 'nv-x nv-axis');
- contextEnter.append('g').attr('class', 'nv-y1 nv-axis');
- contextEnter.append('g').attr('class', 'nv-y2 nv-axis');
- contextEnter.append('g').attr('class', 'nv-barsWrap');
- contextEnter.append('g').attr('class', 'nv-linesWrap');
- contextEnter.append('g').attr('class', 'nv-brushBackground');
- contextEnter.append('g').attr('class', 'nv-x nv-brush');
-
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- g.select('.nv-legendWrap')
- .datum(data.map(function(series) {
- series.originalKey = series.originalKey === undefined ? series.key : series.originalKey;
- series.key = series.originalKey + (series.bar ? ' (left axis)' : ' (right axis)');
- return series;
- }))
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + ( availableWidth / 2 ) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Context Components
-
- bars2
- .width(availableWidth)
- .height(availableHeight2)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && data[i].bar }));
-
- lines2
- .width(availableWidth)
- .height(availableHeight2)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].bar }));
-
- var bars2Wrap = g.select('.nv-context .nv-barsWrap')
- .datum(dataBars.length ? dataBars : [{values:[]}]);
-
- var lines2Wrap = g.select('.nv-context .nv-linesWrap')
- .datum(!dataLines[0].disabled ? dataLines : [{values:[]}]);
-
- g.select('.nv-context')
- .attr('transform', 'translate(0,' + ( availableHeight1 + margin.bottom + margin2.top) + ')')
-
- d3.transition(bars2Wrap).call(bars2);
- d3.transition(lines2Wrap).call(lines2);
-
- //------------------------------------------------------------
-
-
-
- //------------------------------------------------------------
- // Setup Brush
-
- brush
- .x(x2)
- .on('brush', onBrush);
-
- if (brushExtent) brush.extent(brushExtent);
-
- var brushBG = g.select('.nv-brushBackground').selectAll('g')
- .data([brushExtent || brush.extent()])
-
- var brushBGenter = brushBG.enter()
- .append('g');
-
- brushBGenter.append('rect')
- .attr('class', 'left')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- brushBGenter.append('rect')
- .attr('class', 'right')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- var gBrush = g.select('.nv-x.nv-brush')
- .call(brush);
- gBrush.selectAll('rect')
- //.attr('y', -5)
- .attr('height', availableHeight2);
- gBrush.selectAll('.resize').append('path').attr('d', resizePath);
-
- //------------------------------------------------------------
-
- //------------------------------------------------------------
- // Setup Secondary (Context) Axes
-
- x2Axis
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight2, 0);
-
- g.select('.nv-context .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y3.range()[0] + ')');
- d3.transition(g.select('.nv-context .nv-x.nv-axis'))
- .call(x2Axis);
-
-
- y3Axis
- .scale(y3)
- .ticks( availableHeight2 / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-context .nv-y1.nv-axis')
- .style('opacity', dataBars.length ? 1 : 0)
- .attr('transform', 'translate(0,' + x2.range()[0] + ')');
-
- d3.transition(g.select('.nv-context .nv-y1.nv-axis'))
- .call(y3Axis);
-
-
- y4Axis
- .scale(y4)
- .ticks( availableHeight2 / 36 )
- .tickSize(dataBars.length ? 0 : -availableWidth, 0); // Show the y2 rules only if y1 has none
-
- g.select('.nv-context .nv-y2.nv-axis')
- .style('opacity', dataLines.length ? 1 : 0)
- .attr('transform', 'translate(' + x2.range()[1] + ',0)');
-
- d3.transition(g.select('.nv-context .nv-y2.nv-axis'))
- .call(y4Axis);
-
- //------------------------------------------------------------
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
-
- //============================================================
- // Functions
- //------------------------------------------------------------
-
- // Taken from crossfilter (http://square.github.com/crossfilter/)
- function resizePath(d) {
- var e = +(d == 'e'),
- x = e ? 1 : -1,
- y = availableHeight2 / 3;
- return 'M' + (.5 * x) + ',' + y
- + 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6)
- + 'V' + (2 * y - 6)
- + 'A6,6 0 0 ' + e + ' ' + (.5 * x) + ',' + (2 * y)
- + 'Z'
- + 'M' + (2.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8)
- + 'M' + (4.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8);
- }
-
-
- function updateBrushBG() {
- if (!brush.empty()) brush.extent(brushExtent);
- brushBG
- .data([brush.empty() ? x2.domain() : brushExtent])
- .each(function(d,i) {
- var leftWidth = x2(d[0]) - x2.range()[0],
- rightWidth = x2.range()[1] - x2(d[1]);
- d3.select(this).select('.left')
- .attr('width', leftWidth < 0 ? 0 : leftWidth);
-
- d3.select(this).select('.right')
- .attr('x', x2(d[1]))
- .attr('width', rightWidth < 0 ? 0 : rightWidth);
- });
- }
-
-
- function onBrush() {
- brushExtent = brush.empty() ? null : brush.extent();
- extent = brush.empty() ? x2.domain() : brush.extent();
-
-
- dispatch.brush({extent: extent, brush: brush});
-
- updateBrushBG();
-
-
- //------------------------------------------------------------
- // Prepare Main (Focus) Bars and Lines
-
- bars
- .width(availableWidth)
- .height(availableHeight1)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && data[i].bar }));
-
-
- lines
- .width(availableWidth)
- .height(availableHeight1)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].bar }));
-
- var focusBarsWrap = g.select('.nv-focus .nv-barsWrap')
- .datum(!dataBars.length ? [{values:[]}] :
- dataBars
- .map(function(d,i) {
- return {
- key: d.key,
- values: d.values.filter(function(d,i) {
- return bars.x()(d,i) >= extent[0] && bars.x()(d,i) <= extent[1];
- })
- }
- })
- );
-
- var focusLinesWrap = g.select('.nv-focus .nv-linesWrap')
- .datum(dataLines[0].disabled ? [{values:[]}] :
- dataLines
- .map(function(d,i) {
- return {
- key: d.key,
- values: d.values.filter(function(d,i) {
- return lines.x()(d,i) >= extent[0] && lines.x()(d,i) <= extent[1];
- })
- }
- })
- );
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Update Main (Focus) X Axis
-
- if (dataBars.length) {
- x = bars.xScale();
- } else {
- x = lines.xScale();
- }
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight1, 0);
-
- xAxis.domain([Math.ceil(extent[0]), Math.floor(extent[1])]);
-
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Update Main (Focus) Bars and Lines
-
- d3.transition(focusBarsWrap).call(bars);
- d3.transition(focusLinesWrap).call(lines);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup and Update Main (Focus) Y Axes
-
- g.select('.nv-focus .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y1.range()[0] + ')');
-
-
- y1Axis
- .scale(y1)
- .ticks( availableHeight1 / 36 )
- .tickSize(-availableWidth, 0);
-
- g.select('.nv-focus .nv-y1.nv-axis')
- .style('opacity', dataBars.length ? 1 : 0);
-
-
- y2Axis
- .scale(y2)
- .ticks( availableHeight1 / 36 )
- .tickSize(dataBars.length ? 0 : -availableWidth, 0); // Show the y2 rules only if y1 has none
-
- g.select('.nv-focus .nv-y2.nv-axis')
- .style('opacity', dataLines.length ? 1 : 0)
- .attr('transform', 'translate(' + x.range()[1] + ',0)');
-
- d3.transition(g.select('.nv-focus .nv-y1.nv-axis'))
- .call(y1Axis);
- d3.transition(g.select('.nv-focus .nv-y2.nv-axis'))
- .call(y2Axis);
- }
-
- //============================================================
-
- onBrush();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.legend = legend;
- chart.lines = lines;
- chart.lines2 = lines2;
- chart.bars = bars;
- chart.bars2 = bars2;
- chart.xAxis = xAxis;
- chart.x2Axis = x2Axis;
- chart.y1Axis = y1Axis;
- chart.y2Axis = y2Axis;
- chart.y3Axis = y3Axis;
- chart.y4Axis = y4Axis;
-
- d3.rebind(chart, lines, 'defined', 'size', 'clipVoronoi', 'interpolate');
- //TODO: consider rebinding x, y and some other stuff, and simply do soemthign lile bars.x(lines.x()), etc.
- //d3.rebind(chart, lines, 'x', 'y', 'size', 'xDomain', 'yDomain', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- lines.x(_);
- bars.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- lines.y(_);
- bars.y(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.brushExtent = function(_) {
- if (!arguments.length) return brushExtent;
- brushExtent = _;
- return chart;
- };
-
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.multiBar = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , x = d3.scale.ordinal()
- , y = d3.scale.linear()
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceY = [0] // 0 is forced by default.. this makes sense for the majority of bar graphs... user can always do chart.forceY([]) to remove
- , clipEdge = true
- , stacked = false
- , color = nv.utils.defaultColor()
- , hideable = false
- , barColor = null // adding the ability to set the color for each rather than the whole group
- , disabled // used in conjunction with barColor to communicate from multiBarHorizontalChart what series are disabled
- , delay = 1200
- , drawTime = 500
- , xDomain
- , yDomain
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0 //used to store previous scales
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- if(hideable && data.length) hideable = [{
- values: data[0].values.map(function(d) {
- return {
- x: d.x,
- y: 0,
- series: d.series,
- size: 0.01
- };}
- )}];
-
- if (stacked)
- data = d3.layout.stack()
- .offset('zero')
- .values(function(d){ return d.values })
- .y(getY)
- (!data.length && hideable ? hideable : data);
-
-
- //add series index to each data point for reference
- data = data.map(function(series, i) {
- series.values = series.values.map(function(point) {
- point.series = i;
- return point;
- });
- return series;
- });
-
-
- //------------------------------------------------------------
- // HACK for negative value stacking
- if (stacked)
- data[0].values.map(function(d,i) {
- var posBase = 0, negBase = 0;
- data.map(function(d) {
- var f = d.values[i]
- f.size = Math.abs(f.y);
- if (f.y<0) {
- f.y1 = negBase;
- negBase = negBase - f.size;
- } else
- {
- f.y1 = f.size + posBase;
- posBase = posBase + f.size;
- }
- });
- });
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain) ? [] : // if we know xDomain and yDomain, no need to calculate
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), y0: d.y0, y1: d.y1 }
- })
- });
-
- x .domain(d3.merge(seriesData).map(function(d) { return d.x }))
- .rangeBands([0, availableWidth], .1);
-
- //y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.y + (stacked ? d.y1 : 0) }).concat(forceY)))
- y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return stacked ? (d.y > 0 ? d.y1 : d.y1 + d.y ) : d.y }).concat(forceY)))
- .range([availableHeight, 0]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1] || y.domain()[0] === y.domain()[1]) singlePoint = true;
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multibar').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multibar');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- gEnter.append('g').attr('class', 'nv-groups');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
-
-
- groups.exit()
- .selectAll('rect.nv-bar')
- .transition()
- .delay(function(d,i) { return i * delay/ data[0].values.length })
- .attr('y', function(d) { return stacked ? y0(d.y0) : y0(0) })
- .attr('height', 0)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i) });
- d3.transition(groups)
- .style('stroke-opacity', 1)
- .style('fill-opacity', .75);
-
-
- var bars = groups.selectAll('rect.nv-bar')
- .data(function(d) { return (hideable && !data.length) ? hideable.values : d.values });
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('rect')
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
- .attr('x', function(d,i,j) {
- return stacked ? 0 : (j * x.rangeBand() / data.length )
- })
- .attr('y', function(d) { return y0(stacked ? d.y0 : 0) })
- .attr('height', 0)
- .attr('width', x.rangeBand() / (stacked ? 1 : data.length) );
- bars
- .style('fill', function(d,i,j){ return color(d, j, i); })
- .style('stroke', function(d,i,j){ return color(d, j, i); })
- .on('mouseover', function(d,i) { //TODO: figure out why j works above, but not here
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- });
- bars
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',0)'; })
-
- if (barColor) {
- if (!disabled) disabled = data.map(function() { return true });
- bars
- //.style('fill', barColor)
- //.style('stroke', barColor)
- //.style('fill', function(d,i,j) { return d3.rgb(barColor(d,i)).darker(j).toString(); })
- //.style('stroke', function(d,i,j) { return d3.rgb(barColor(d,i)).darker(j).toString(); })
- .style('fill', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); })
- .style('stroke', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); });
- }
-
-
- if (stacked)
- bars.transition()
-
- .delay(function(d,i) { return i * delay / data[0].values.length })
- .attr('y', function(d,i) {
-
- return y((stacked ? d.y1 : 0));
- })
- .attr('height', function(d,i) {
- if(d.y == null) return 0;
- return Math.max(Math.abs(y(d.y + (stacked ? d.y0 : 0)) - y((stacked ? d.y0 : 0))),1);
- })
- .each('end', function() {
- d3.select(this).transition().duration(drawTime)
- .attr('x', function(d,i) {
- return stacked ? 0 : (d.series * x.rangeBand() / data.length )
- })
- .attr('width', x.rangeBand() / (stacked ? 1 : data.length) );
- })
- else
- d3.transition(bars).duration(drawTime)
- .delay(function(d,i) { return i * delay/ data[0].values.length })
- .attr('x', function(d,i) {
- return d.series * x.rangeBand() / data.length
- })
- .attr('width', x.rangeBand() / data.length)
- .each('end', function() {
- d3.select(this).transition().duration(drawTime)
- .attr('y', function(d,i) {
- return getY(d,i) < 0 ?
- y(0) :
- y(0) - y(getY(d,i)) < 1 ?
- y(0) - 1 :
- y(getY(d,i)) || 0;
- })
- .attr('height', function(d,i) {
- if(d.y == null) return 0;
- return Math.max(Math.abs(y(getY(d,i)) - y(0)),1) || 0;
- });
- })
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.stacked = function(_) {
- if (!arguments.length) return stacked;
- stacked = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.barColor = function(_) {
- if (!arguments.length) return barColor;
- barColor = nv.utils.getColor(_);
- return chart;
- };
-
- chart.disabled = function(_) {
- if (!arguments.length) return disabled;
- disabled = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.hideable = function(_) {
- if (!arguments.length) return hideable;
- hideable = _;
- return chart;
- };
-
- chart.delay = function(_) {
- if (!arguments.length) return delay;
- delay = _;
- return chart;
- };
-
- chart.drawTime = function(_) {
- if (!arguments.length) return drawTime;
- drawTime = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.multiBarChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var multibar = nv.models.multiBar()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , showControls = true
- , showLegend = true
- , logScale = false
- , reduceXTicks = true // if false a tick will show for every data point
- , staggerLabels = false
- , rotateLabels = 0
- , tooltips = true
- , tooltip = function(key, x, y, e, graph, logScale) {
- //alert(y+ " " + logScale);
- if(logScale) {
- var fmt = d3.format(',.2f');
- return '<h3>' + key + '</h3>' +
- '<p>' + fmt(Math.pow(10,y)) + ' on ' + x + '</p>'
- } else {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' on ' + x + '</p>'
- }
-
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , state = { stacked: false }
- , defaultState = null
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , controlWidth = function() { return showControls ? 180 : 0 }
- ;
- multibar
- .stacked(false)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(7)
- .highlightZero(true)
- .showMaxMin(false)
- .tickFormat(function(d) { return d })
- ;
- yAxis
- .orient('left')
- .tickFormat(d3.format(',.1f'))
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(multibar.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(multibar.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart, logScale);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = multibar.xScale();
- y = multibar.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multiBarWithLegend').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multiBarWithLegend').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth - controlWidth());
-
- if (multibar.barColor())
- data.forEach(function(series,i) {
- series.color = d3.rgb('#ccc').darker(i * 1.5).toString();
- })
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + controlWidth() + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Grouped', disabled: multibar.stacked() },
- { key: 'Stacked', disabled: !multibar.stacked() }
- ];
-
- controls.width(controlWidth()).color(['#444', '#444', '#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- multibar
- .disabled(data.map(function(series) { return series.disabled }))
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(barsWrap).call(multibar);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
-
- var xTicks = g.select('.nv-x.nv-axis > g').selectAll('g');
-
- xTicks
- .selectAll('line, text')
- .style('opacity', 1)
-
- if (staggerLabels) {
- var getTranslate = function(x,y) {
- return "translate(" + x + "," + y + ")";
- };
-
- var staggerUp = 5, staggerDown = 17; //pixels to stagger by
- // Issue #140
- xTicks
- .selectAll("text")
- .attr('transform', function(d,i,j) {
- return getTranslate(0, (j % 2 == 0 ? staggerUp : staggerDown));
- });
-
- var totalInBetweenTicks = d3.selectAll(".nv-x.nv-axis .nv-wrap g g text")[0].length;
- g.selectAll(".nv-x.nv-axis .nv-axisMaxMin text")
- .attr("transform", function(d,i) {
- return getTranslate(0, (i === 0 || totalInBetweenTicks % 2 !== 0) ? staggerDown : staggerUp);
- });
- }
-
-
- if (reduceXTicks)
- xTicks
- .filter(function(d,i) {
- return i % Math.ceil(data[0].values.length / (availableWidth / 100)) !== 0;
- })
- .selectAll('text, line')
- .style('opacity', 0);
-
- if(rotateLabels)
- xTicks
- .selectAll('text')
- .attr('transform', 'rotate(' + rotateLabels + ' 0,0)')
- .attr('text-anchor', rotateLabels > 0 ? 'start' : 'end');
-
- g.select('.nv-x.nv-axis').selectAll('g.nv-axisMaxMin text')
- .style('opacity', 1);
-
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
-
- //------------------------------------------------------------
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
-
- controls.dispatch.on('legendClick', function(d,i) {
- if (!d.disabled) return;
- controlsData = controlsData.map(function(s) {
- s.disabled = true;
- return s;
- });
- d.disabled = false;
-
- switch (d.key) {
- case 'Grouped':
- multibar.stacked(false);
- break;
- case 'Stacked':
- multibar.stacked(true);
- break;
- }
-
- state.stacked = multibar.stacked();
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode)
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- if (typeof e.stacked !== 'undefined') {
- multibar.stacked(e.stacked);
- state.stacked = e.stacked;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- multibar.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- multibar.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.multibar = multibar;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, multibar, 'x', 'y', 'xDomain', 'yDomain', 'forceX', 'forceY', 'clipEdge', 'id', 'stacked', 'delay', 'barColor');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.logScale = function(_) {
- if (!arguments.length) return logScale;
- logScale = _;
- return chart;
- };
-
- chart.reduceXTicks= function(_) {
- if (!arguments.length) return reduceXTicks;
- reduceXTicks = _;
- return chart;
- };
-
- chart.rotateLabels = function(_) {
- if (!arguments.length) return rotateLabels;
- rotateLabels = _;
- return chart;
- }
-
- chart.staggerLabels = function(_) {
- if (!arguments.length) return staggerLabels;
- staggerLabels = _;
- return chart;
- };
-
- chart.tooltip = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.multiBarHorizontal = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.ordinal()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceY = [0] // 0 is forced by default.. this makes sense for the majority of bar graphs... user can always do chart.forceY([]) to remove
- , color = nv.utils.defaultColor()
- , barColor = null // adding the ability to set the color for each rather than the whole group
- , disabled // used in conjunction with barColor to communicate from multiBarHorizontalChart what series are disabled
- , stacked = false
- , showValues = false
- , valuePadding = 60
- , valueFormat = d3.format(',.2f')
- , delay = 1200
- , xDomain
- , yDomain
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0 //used to store previous scales
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- if (stacked)
- data = d3.layout.stack()
- .offset('zero')
- .values(function(d){ return d.values })
- .y(getY)
- (data);
-
-
- //add series index to each data point for reference
- data = data.map(function(series, i) {
- series.values = series.values.map(function(point) {
- point.series = i;
- return point;
- });
- return series;
- });
-
-
-
- //------------------------------------------------------------
- // HACK for negative value stacking
- if (stacked)
- data[0].values.map(function(d,i) {
- var posBase = 0, negBase = 0;
- data.map(function(d) {
- var f = d.values[i]
- f.size = Math.abs(f.y);
- if (f.y<0) {
- f.y1 = negBase - f.size;
- negBase = negBase - f.size;
- } else
- {
- f.y1 = posBase;
- posBase = posBase + f.size;
- }
- });
- });
-
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain) ? [] : // if we know xDomain and yDomain, no need to calculate
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), y0: d.y0, y1: d.y1 }
- })
- });
-
- x .domain(xDomain || d3.merge(seriesData).map(function(d) { return d.x }))
- .rangeBands([0, availableHeight], .1);
-
- //y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.y + (stacked ? d.y0 : 0) }).concat(forceY)))
- y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return stacked ? (d.y > 0 ? d.y1 + d.y : d.y1 ) : d.y }).concat(forceY)))
-
- if (showValues && !stacked)
- y.range([(y.domain()[0] < 0 ? valuePadding : 0), availableWidth - (y.domain()[1] > 0 ? valuePadding : 0) ]);
- else
- y.range([0, availableWidth]);
-
- x0 = x0 || x;
- y0 = y0 || d3.scale.linear().domain(y.domain()).range([y(0),y(0)]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('g.nv-wrap.nv-multibarHorizontal').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multibarHorizontal');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-groups');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- d3.transition(groups.exit())
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i) });
- d3.transition(groups)
- .style('stroke-opacity', 1)
- .style('fill-opacity', .75);
-
-
- var bars = groups.selectAll('g.nv-bar')
- .data(function(d) { return d.values });
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('g')
- .attr('transform', function(d,i,j) {
- return 'translate(' + y0(stacked ? d.y0 : 0) + ',' + (stacked ? 0 : (j * x.rangeBand() / data.length ) + x(getX(d,i))) + ')'
- });
-
- barsEnter.append('rect')
- .attr('width', 0)
- .attr('height', x.rangeBand() / (stacked ? 1 : data.length) )
-
- bars
- .on('mouseover', function(d,i) { //TODO: figure out why j works above, but not here
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [ y(getY(d,i) + (stacked ? d.y0 : 0)), x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length) ],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- });
-
-
- barsEnter.append('text');
-
- if (showValues && !stacked) {
- bars.select('text')
- .attr('text-anchor', function(d,i) { return getY(d,i) < 0 ? 'end' : 'start' })
- .attr('y', x.rangeBand() / (data.length * 2))
- .attr('dy', '.32em')
- .text(function(d,i) { return valueFormat(getY(d,i)) })
- d3.transition(bars)
- //.delay(function(d,i) { return i * delay / data[0].values.length })
- .select('text')
- .attr('x', function(d,i) { return getY(d,i) < 0 ? -4 : y(getY(d,i)) - y(0) + 4 })
- } else {
- //bars.selectAll('text').remove();
- bars.selectAll('text').text('');
- }
-
- bars
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
-
- if (barColor) {
- if (!disabled) disabled = data.map(function() { return true });
- bars
- //.style('fill', barColor)
- //.style('stroke', barColor)
- //.style('fill', function(d,i,j) { return d3.rgb(barColor(d,i)).darker(j).toString(); })
- //.style('stroke', function(d,i,j) { return d3.rgb(barColor(d,i)).darker(j).toString(); })
- .style('fill', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); })
- .style('stroke', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); });
- }
-
- if (stacked)
- d3.transition(bars)
- //.delay(function(d,i) { return i * delay / data[0].values.length })
- .attr('transform', function(d,i) {
- //return 'translate(' + y(d.y0) + ',0)'
- //return 'translate(' + y(d.y0) + ',' + x(getX(d,i)) + ')'
- return 'translate(' + y(d.y1) + ',' + x(getX(d,i)) + ')'
- })
- .select('rect')
- .attr('width', function(d,i) {
- return Math.abs(y(getY(d,i) + d.y0) - y(d.y0))
- })
- .attr('height', x.rangeBand() );
- else
- d3.transition(bars)
- //.delay(function(d,i) { return i * delay / data[0].values.length })
- .attr('transform', function(d,i) {
- //TODO: stacked must be all positive or all negative, not both?
- return 'translate(' +
- (getY(d,i) < 0 ? y(getY(d,i)) : y(0))
- + ',' +
- (d.series * x.rangeBand() / data.length
- +
- x(getX(d,i)) )
- + ')'
- })
- .select('rect')
- .attr('height', x.rangeBand() / data.length )
- .attr('width', function(d,i) {
- return Math.max(Math.abs(y(getY(d,i)) - y(0)),1)
- });
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.stacked = function(_) {
- if (!arguments.length) return stacked;
- stacked = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.barColor = function(_) {
- if (!arguments.length) return barColor;
- barColor = nv.utils.getColor(_);
- return chart;
- };
-
- chart.disabled = function(_) {
- if (!arguments.length) return disabled;
- disabled = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.delay = function(_) {
- if (!arguments.length) return delay;
- delay = _;
- return chart;
- };
-
- chart.showValues = function(_) {
- if (!arguments.length) return showValues;
- showValues = _;
- return chart;
- };
-
- chart.valueFormat= function(_) {
- if (!arguments.length) return valueFormat;
- valueFormat = _;
- return chart;
- };
-
- chart.valuePadding = function(_) {
- if (!arguments.length) return valuePadding;
- valuePadding = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.multiBarHorizontalChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var multibar = nv.models.multiBarHorizontal()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend().height(30)
- , controls = nv.models.legend().height(30)
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , showControls = true
- , showLegend = true
- , logScale = false
- , stacked = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph, logScale) {
- //alert(y+ " " + logScale + " " + Math.pow(10,y) + " " + Math.pow(10,y).toFixed(0));
- if(logScale) {
- //var fmt = d3.format(',.2f');
- return '<h3>' + key + ' - ' + x + '</h3>' +
- '<p>' + yAxis.tickFormat()(Math.pow(10,y)) + '</p>'
- } else {
- return '<h3>' + key + ' - ' + x + '</h3>' +
- '<p>' + y + '</p>'
- }
-
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , state = { stacked: stacked }
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , controlWidth = function() { return showControls ? 180 : 0 }
- ;
-
- multibar
- .stacked(stacked)
- ;
- xAxis
- .orient('left')
- .tickPadding(5)
- .highlightZero(false)
- .showMaxMin(false)
- .tickFormat(function(d) { return d })
- ;
- yAxis
- .orient('bottom')
- .tickFormat(d3.format(',.1f'))
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- //var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- //alert(offsetElement.offsetLeft + " " + e.pos[0]);
- var leftPos = 0;
- if(e.pos[0] >=200) leftPos = 200;
- else leftPos = e.pos[0];
- if(logScale)
- y = multibar.y()(e.point, e.pointIndex);
- else
- y = yAxis.tickFormat()(multibar.y()(e.point, e.pointIndex))
- var left = leftPos + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(multibar.x()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart, logScale);
- //alert("from tooltip " + multibar.y()(e.point, e.pointIndex));
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'e' : 'w', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = multibar.xScale();
- y = multibar.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multiBarHorizontalChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multiBarHorizontalChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth - controlWidth());
-
- if (multibar.barColor())
- data.forEach(function(series,i) {
- series.color = d3.rgb('#ccc').darker(i * 1.5).toString();
- })
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + controlWidth() + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Grouped', disabled: multibar.stacked() },
- { key: 'Stacked', disabled: !multibar.stacked() }
- ];
-
- controls.width(controlWidth()).color(['#444', '#444', '#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- multibar
- .disabled(data.map(function(series) { return series.disabled }))
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(barsWrap).call(multibar);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( availableHeight / 24 )
- .tickSize(-availableWidth, 0);
-
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
-
- var xTicks = g.select('.nv-x.nv-axis').selectAll('g');
-
- xTicks
- .selectAll('line, text')
- .style('opacity', 1)
-
-
- yAxis
- .scale(y)
- .ticks( availableWidth / 100 )
- .tickSize( -availableHeight, 0);
-
- g.select('.nv-y.nv-axis')
- .attr('transform', 'translate(0,' + availableHeight + ')');
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
-
- //------------------------------------------------------------
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- if (!d.disabled) return;
- controlsData = controlsData.map(function(s) {
- s.disabled = true;
- return s;
- });
- d.disabled = false;
-
- switch (d.key) {
- case 'Grouped':
- multibar.stacked(false);
- break;
- case 'Stacked':
- multibar.stacked(true);
- break;
- }
-
- state.stacked = multibar.stacked();
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- if (typeof e.stacked !== 'undefined') {
- multibar.stacked(e.stacked);
- state.stacked = e.stacked;
- }
-
- selection.call(chart);
- });
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- multibar.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- multibar.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.multibar = multibar;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, multibar, 'x', 'y', 'xDomain', 'yDomain', 'forceX', 'forceY', 'clipEdge', 'id', 'delay', 'showValues', 'valueFormat', 'stacked', 'barColor');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.logScale = function(_) {
- if (!arguments.length) return logScale;
- logScale = _;
- return chart;
- };
-
- chart.tooltip = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-nv.models.multiChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60},
- color = d3.scale.category20().range(),
- width = null,
- height = null,
- showLegend = true,
- tooltips = true,
- tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- },
- x, y; //can be accessed via chart.lines.[x/y]Scale()
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x = d3.scale.linear(),
- yScale1 = d3.scale.linear(),
- yScale2 = d3.scale.linear(),
-
- lines1 = nv.models.line().yScale(yScale1),
- lines2 = nv.models.line().yScale(yScale2),
-
- bars1 = nv.models.multiBar().stacked(false).yScale(yScale1),
- bars2 = nv.models.multiBar().stacked(false).yScale(yScale2),
-
- stack1 = nv.models.stackedArea().yScale(yScale1),
- stack2 = nv.models.stackedArea().yScale(yScale2),
-
- xAxis = nv.models.axis().scale(x).orient('bottom').tickPadding(5),
- yAxis1 = nv.models.axis().scale(yScale1).orient('left'),
- yAxis2 = nv.models.axis().scale(yScale2).orient('right'),
-
- legend = nv.models.legend().height(30),
- dispatch = d3.dispatch('tooltipShow', 'tooltipHide');
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines1.x()(e.point, e.pointIndex)),
- y = ((e.series.yAxis == 2) ? yAxis2 : yAxis1).tickFormat()(lines1.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, undefined, undefined, offsetElement.offsetParent);
- };
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- chart.update = function() { container.transition().call(chart); };
- chart.container = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- var dataLines1 = data.filter(function(d) {return !d.disabled && d.type == 'line' && d.yAxis == 1})
- var dataLines2 = data.filter(function(d) {return !d.disabled && d.type == 'line' && d.yAxis == 2})
- var dataBars1 = data.filter(function(d) {return !d.disabled && d.type == 'bar' && d.yAxis == 1})
- var dataBars2 = data.filter(function(d) {return !d.disabled && d.type == 'bar' && d.yAxis == 2})
- var dataStack1 = data.filter(function(d) {return !d.disabled && d.type == 'area' && d.yAxis == 1})
- var dataStack2 = data.filter(function(d) {return !d.disabled && d.type == 'area' && d.yAxis == 2})
-
- var series1 = data.filter(function(d) {return !d.disabled && d.yAxis == 1})
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: d.x, y: d.y }
- })
- })
-
- var series2 = data.filter(function(d) {return !d.disabled && d.yAxis == 2})
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: d.x, y: d.y }
- })
- })
-
- x .domain(d3.extent(d3.merge(series1.concat(series2)), function(d) { return d.x } ))
- .range([0, availableWidth]);
-
- var wrap = container.selectAll('g.wrap.multiChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'wrap nvd3 multiChart').append('g');
-
- gEnter.append('g').attr('class', 'x axis');
- gEnter.append('g').attr('class', 'y1 axis');
- gEnter.append('g').attr('class', 'y2 axis');
- gEnter.append('g').attr('class', 'lines1Wrap');
- gEnter.append('g').attr('class', 'lines2Wrap');
- gEnter.append('g').attr('class', 'bars1Wrap');
- gEnter.append('g').attr('class', 'bars2Wrap');
- gEnter.append('g').attr('class', 'stack1Wrap');
- gEnter.append('g').attr('class', 'stack2Wrap');
- gEnter.append('g').attr('class', 'legendWrap');
-
- var g = wrap.select('g');
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- g.select('.legendWrap')
- .datum(data.map(function(series) {
- series.originalKey = series.originalKey === undefined ? series.key : series.originalKey;
- series.key = series.originalKey + (series.yAxis == 1 ? '' : ' (right axis)');
- return series;
- }))
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.legendWrap')
- .attr('transform', 'translate(' + ( availableWidth / 2 ) + ',' + (-margin.top) +')');
- }
-
-
- lines1
- .width(availableWidth)
- .height(availableHeight)
- .interpolate("monotone")
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 1 && data[i].type == 'line'}));
-
- lines2
- .width(availableWidth)
- .height(availableHeight)
- .interpolate("monotone")
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 2 && data[i].type == 'line'}));
-
- bars1
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 1 && data[i].type == 'bar'}));
-
- bars2
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 2 && data[i].type == 'bar'}));
-
- stack1
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 1 && data[i].type == 'area'}));
-
- stack2
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 2 && data[i].type == 'area'}));
-
- g.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- var lines1Wrap = g.select('.lines1Wrap')
- .datum(dataLines1)
- var bars1Wrap = g.select('.bars1Wrap')
- .datum(dataBars1)
- var stack1Wrap = g.select('.stack1Wrap')
- .datum(dataStack1)
-
- var lines2Wrap = g.select('.lines2Wrap')
- .datum(dataLines2)
- var bars2Wrap = g.select('.bars2Wrap')
- .datum(dataBars2)
- var stack2Wrap = g.select('.stack2Wrap')
- .datum(dataStack2)
-
- var extraValue1 = dataStack1.length ? dataStack1.map(function(a){return a.values}).reduce(function(a,b){
- return a.map(function(aVal,i){return {x: aVal.x, y: aVal.y + b[i].y}})
- }).concat([{x:0, y:0}]) : []
- var extraValue2 = dataStack2.length ? dataStack2.map(function(a){return a.values}).reduce(function(a,b){
- return a.map(function(aVal,i){return {x: aVal.x, y: aVal.y + b[i].y}})
- }).concat([{x:0, y:0}]) : []
-
- yScale1 .domain(d3.extent(d3.merge(series1).concat(extraValue1), function(d) { return d.y } ))
- .range([0, availableHeight])
-
- yScale2 .domain(d3.extent(d3.merge(series2).concat(extraValue2), function(d) { return d.y } ))
- .range([0, availableHeight])
-
- lines1.yDomain(yScale1.domain())
- bars1.yDomain(yScale1.domain())
- stack1.yDomain(yScale1.domain())
-
- lines2.yDomain(yScale2.domain())
- bars2.yDomain(yScale2.domain())
- stack2.yDomain(yScale2.domain())
-
- if(dataStack1.length){d3.transition(stack1Wrap).call(stack1);}
- if(dataStack2.length){d3.transition(stack2Wrap).call(stack2);}
-
- if(dataBars1.length){d3.transition(bars1Wrap).call(bars1);}
- if(dataBars2.length){d3.transition(bars2Wrap).call(bars2);}
-
- if(dataLines1.length){d3.transition(lines1Wrap).call(lines1);}
- if(dataLines2.length){d3.transition(lines2Wrap).call(lines2);}
-
-
-
- xAxis
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.x.axis')
- .attr('transform', 'translate(0,' + availableHeight + ')');
- d3.transition(g.select('.x.axis'))
- .call(xAxis);
-
- yAxis1
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
-
- d3.transition(g.select('.y1.axis'))
- .call(yAxis1);
-
- yAxis2
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.y2.axis'))
- .call(yAxis2);
-
- g.select('.y2.axis')
- .style('opacity', series2.length ? 1 : 0)
- .attr('transform', 'translate(' + x.range()[1] + ',0)');
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
- if (series2.length <= 0) {
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.series').classed('disabled', false);
- return d;
- });
- }
- chart.update();
- }
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines1.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines1.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- lines2.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines2.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars1.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars1.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars2.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars2.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- stack1.dispatch.on('tooltipShow', function(e) {
- //disable tooltips when value ~= 0
- //// TODO: consider removing points from voronoi that have 0 value instead of this hack
- if (!Math.round(stack1.y()(e.point) * 100)) { // 100 will not be good for very small numbers... will have to think about making this valu dynamic, based on data range
- setTimeout(function() { d3.selectAll('.point.hover').classed('hover', false) }, 0);
- return false;
- }
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
-
- stack1.dispatch.on('tooltipHide', function(e) {
- dispatch.tooltipHide(e);
- });
-
- stack2.dispatch.on('tooltipShow', function(e) {
- //disable tooltips when value ~= 0
- //// TODO: consider removing points from voronoi that have 0 value instead of this hack
- if (!Math.round(stack2.y()(e.point) * 100)) { // 100 will not be good for very small numbers... will have to think about making this valu dynamic, based on data range
- setTimeout(function() { d3.selectAll('.point.hover').classed('hover', false) }, 0);
- return false;
- }
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
-
- stack2.dispatch.on('tooltipHide', function(e) {
- dispatch.tooltipHide(e);
- });
-
- lines1.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines1.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- lines2.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines2.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
-
-
- //============================================================
- // Global getters and setters
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.lines1 = lines1;
- chart.lines2 = lines2;
- chart.bars1 = bars1;
- chart.bars2 = bars2;
- chart.stack1 = stack1;
- chart.stack2 = stack2;
- chart.xAxis = xAxis;
- chart.yAxis1 = yAxis1;
- chart.yAxis2 = yAxis2;
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- lines1.x(_);
- bars1.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- lines1.y(_);
- bars1.y(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = _;
- legend.color(_);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- return chart;
-}
-
-
-nv.models.ohlcBar = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , getOpen = function(d) { return d.open }
- , getClose = function(d) { return d.close }
- , getHigh = function(d) { return d.high }
- , getLow = function(d) { return d.low }
- , forceX = []
- , forceY = []
- , padData = false // If true, adds half a data points width to front and back, for lining up a line chart with a bar chart
- , clipEdge = true
- , color = nv.utils.defaultColor()
- , xDomain
- , yDomain
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- //TODO: store old scales for transitions
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x .domain(xDomain || d3.extent(data[0].values.map(getX).concat(forceX) ));
-
- if (padData)
- x.range([availableWidth * .5 / data[0].values.length, availableWidth * (data[0].values.length - .5) / data[0].values.length ]);
- else
- x.range([0, availableWidth]);
-
- y .domain(yDomain || [
- d3.min(data[0].values.map(getLow).concat(forceY)),
- d3.max(data[0].values.map(getHigh).concat(forceY))
- ])
- .range([availableHeight, 0]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1] || y.domain()[0] === y.domain()[1]) singlePoint = true;
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('g.nv-wrap.nv-ohlcBar').data([data[0].values]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-ohlcBar');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-ticks');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- container
- .on('click', function(d,i) {
- dispatch.chartClick({
- data: d,
- index: i,
- pos: d3.event,
- id: id
- });
- });
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-chart-clip-path-' + id)
- .append('rect');
-
- wrap.select('#nv-chart-clip-path-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-chart-clip-path-' + id + ')' : '');
-
-
-
- var ticks = wrap.select('.nv-ticks').selectAll('.nv-tick')
- .data(function(d) { return d });
-
- ticks.exit().remove();
-
-
- var ticksEnter = ticks.enter().append('path')
- .attr('class', function(d,i,j) { return (getOpen(d,i) > getClose(d,i) ? 'nv-tick negative' : 'nv-tick positive') + ' nv-tick-' + j + '-' + i })
- .attr('d', function(d,i) {
- var w = (availableWidth / data[0].values.length) * .9;
- return 'm0,0l0,'
- + (y(getOpen(d,i))
- - y(getHigh(d,i)))
- + 'l'
- + (-w/2)
- + ',0l'
- + (w/2)
- + ',0l0,'
- + (y(getLow(d,i)) - y(getOpen(d,i)))
- + 'l0,'
- + (y(getClose(d,i))
- - y(getLow(d,i)))
- + 'l'
- + (w/2)
- + ',0l'
- + (-w/2)
- + ',0z';
- })
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',' + y(getHigh(d,i)) + ')'; })
- //.attr('fill', function(d,i) { return color[0]; })
- //.attr('stroke', function(d,i) { return color[0]; })
- //.attr('x', 0 )
- //.attr('y', function(d,i) { return y(Math.max(0, getY(d,i))) })
- //.attr('height', function(d,i) { return Math.abs(y(getY(d,i)) - y(0)) })
- .on('mouseover', function(d,i) {
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- point: d,
- series: data[0],
- pos: [x(getX(d,i)), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
-
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- point: d,
- series: data[0],
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- });
-
- ticks
- .attr('class', function(d,i,j) { return (getOpen(d,i) > getClose(d,i) ? 'nv-tick negative' : 'nv-tick positive') + ' nv-tick-' + j + '-' + i })
- d3.transition(ticks)
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',' + y(getHigh(d,i)) + ')'; })
- .attr('d', function(d,i) {
- var w = (availableWidth / data[0].values.length) * .9;
- return 'm0,0l0,'
- + (y(getOpen(d,i))
- - y(getHigh(d,i)))
- + 'l'
- + (-w/2)
- + ',0l'
- + (w/2)
- + ',0l0,'
- + (y(getLow(d,i))
- - y(getOpen(d,i)))
- + 'l0,'
- + (y(getClose(d,i))
- - y(getLow(d,i)))
- + 'l'
- + (w/2)
- + ',0l'
- + (-w/2)
- + ',0z';
- })
- //.attr('width', (availableWidth / data[0].values.length) * .9 )
-
-
- //d3.transition(ticks)
- //.attr('y', function(d,i) { return y(Math.max(0, getY(d,i))) })
- //.attr('height', function(d,i) { return Math.abs(y(getY(d,i)) - y(0)) });
- //.order(); // not sure if this makes any sense for this model
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.open = function(_) {
- if (!arguments.length) return getOpen;
- getOpen = _;
- return chart;
- };
-
- chart.close = function(_) {
- if (!arguments.length) return getClose;
- getClose = _;
- return chart;
- };
-
- chart.high = function(_) {
- if (!arguments.length) return getHigh;
- getHigh = _;
- return chart;
- };
-
- chart.low = function(_) {
- if (!arguments.length) return getLow;
- getLow = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.padData = function(_) {
- if (!arguments.length) return padData;
- padData = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-nv.models.pie = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 500
- , height = 500
- , getValues = function(d) { return d.values }
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , getDescription = function(d) { return d.description }
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , color = nv.utils.defaultColor()
- , valueFormat = d3.format(',.2f')
- , showLabels = true
- , pieLabelsOutside = true
- , donutLabelsOutside = false
- , labelThreshold = .02 //if slice percentage is under this, don't show label
- , donut = false
- , labelSunbeamLayout = false
- , startAngle = false
- , endAngle = false
- , donutRatio = 0.5
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- radius = Math.min(availableWidth, availableHeight) / 2,
- arcRadius = radius-(radius / 5),
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- //var wrap = container.selectAll('.nv-wrap.nv-pie').data([data]);
- var wrap = container.selectAll('.nv-wrap.nv-pie').data([getValues(data[0])]);
- var wrapEnter = wrap.enter().append('g').attr('class','nvd3 nv-wrap nv-pie nv-chart-' + id);
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-pie');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
- g.select('.nv-pie').attr('transform', 'translate(' + availableWidth / 2 + ',' + availableHeight / 2 + ')');
-
- //------------------------------------------------------------
-
-
- container
- .on('click', function(d,i) {
- dispatch.chartClick({
- data: d,
- index: i,
- pos: d3.event,
- id: id
- });
- });
-
-
- var arc = d3.svg.arc()
- .outerRadius(arcRadius);
-
- if (startAngle) arc.startAngle(startAngle)
- if (endAngle) arc.endAngle(endAngle);
- if (donut) arc.innerRadius(radius * donutRatio);
-
- // Setup the Pie chart and choose the data element
- var pie = d3.layout.pie()
- .sort(null)
- .value(function(d) { return d.disabled ? 0 : getY(d) });
-
- var slices = wrap.select('.nv-pie').selectAll('.nv-slice')
- .data(pie);
-
- slices.exit().remove();
-
- var ae = slices.enter().append('g')
- .attr('class', 'nv-slice')
- .on('mouseover', function(d,i){
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- pointIndex: i,
- pos: [d3.event.pageX, d3.event.pageY],
- id: id
- });
- })
- .on('mouseout', function(d,i){
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- index: i,
- id: id
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- index: i,
- pos: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- index: i,
- pos: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- });
-
- slices
- .attr('fill', function(d,i) { return color(d, i); })
- .attr('stroke', function(d,i) { return color(d, i); });
-
- var paths = ae.append('path')
- .each(function(d) { this._current = d; });
- //.attr('d', arc);
-
- d3.transition(slices.select('path'))
- .attr('d', arc)
- .attrTween('d', arcTween);
-
- if (showLabels) {
- // This does the normal label
- var labelsArc = d3.svg.arc().innerRadius(0);
-
- if (pieLabelsOutside){ labelsArc = arc; }
-
- if (donutLabelsOutside) { labelsArc = d3.svg.arc().outerRadius(arc.outerRadius()); }
-
- ae.append("g").classed("nv-label", true)
- .each(function(d, i) {
- var group = d3.select(this);
-
- group
- .attr('transform', function(d) {
- if (labelSunbeamLayout) {
- d.outerRadius = arcRadius + 10; // Set Outer Coordinate
- d.innerRadius = arcRadius + 15; // Set Inner Coordinate
- var rotateAngle = (d.startAngle + d.endAngle) / 2 * (180 / Math.PI);
- if ((d.startAngle+d.endAngle)/2 < Math.PI) {
- rotateAngle -= 90;
- } else {
- rotateAngle += 90;
- }
- return 'translate(' + labelsArc.centroid(d) + ') rotate(' + rotateAngle + ')';
- } else {
- d.outerRadius = radius + 10; // Set Outer Coordinate
- d.innerRadius = radius + 15; // Set Inner Coordinate
- return 'translate(' + labelsArc.centroid(d) + ')'
- }
- });
-
- group.append('rect')
- .style('stroke', '#fff')
- .style('fill', '#fff')
- .attr("rx", 3)
- .attr("ry", 3);
-
- group.append('text')
- .style('text-anchor', labelSunbeamLayout ? ((d.startAngle + d.endAngle) / 2 < Math.PI ? 'start' : 'end') : 'middle') //center the text on it's origin or begin/end if orthogonal aligned
- .style('fill', '#000')
-
-
- });
-
- slices.select(".nv-label").transition()
- .attr('transform', function(d) {
- if (labelSunbeamLayout) {
- d.outerRadius = arcRadius + 10; // Set Outer Coordinate
- d.innerRadius = arcRadius + 15; // Set Inner Coordinate
- var rotateAngle = (d.startAngle + d.endAngle) / 2 * (180 / Math.PI);
- if ((d.startAngle+d.endAngle)/2 < Math.PI) {
- rotateAngle -= 90;
- } else {
- rotateAngle += 90;
- }
- return 'translate(' + labelsArc.centroid(d) + ') rotate(' + rotateAngle + ')';
- } else {
- d.outerRadius = radius + 10; // Set Outer Coordinate
- d.innerRadius = radius + 15; // Set Inner Coordinate
- return 'translate(' + labelsArc.centroid(d) + ')'
- }
- });
-
- slices.each(function(d, i) {
- var slice = d3.select(this);
-
- slice
- .select(".nv-label text")
- .style('text-anchor', labelSunbeamLayout ? ((d.startAngle + d.endAngle) / 2 < Math.PI ? 'start' : 'end') : 'middle') //center the text on it's origin or begin/end if orthogonal aligned
- .text(function(d, i) {
- var percent = (d.endAngle - d.startAngle) / (2 * Math.PI);
- return (d.value && percent > labelThreshold) ? getX(d.data) : '';
- });
-
- var textBox = slice.select('text').node().getBBox();
- slice.select(".nv-label rect")
- .attr("width", textBox.width + 10)
- .attr("height", textBox.height + 10)
- .attr("transform", function() {
- return "translate(" + [textBox.x - 5, textBox.y - 5] + ")";
- });
- });
- }
-
-
- // Computes the angle of an arc, converting from radians to degrees.
- function angle(d) {
- var a = (d.startAngle + d.endAngle) * 90 / Math.PI - 90;
- return a > 90 ? a - 180 : a;
- }
-
- function arcTween(a) {
- a.endAngle = isNaN(a.endAngle) ? 0 : a.endAngle;
- a.startAngle = isNaN(a.startAngle) ? 0 : a.startAngle;
- if (!donut) a.innerRadius = 0;
- var i = d3.interpolate(this._current, a);
- this._current = i(0);
- return function(t) {
- return arc(i(t));
- };
- }
-
- function tweenPie(b) {
- b.innerRadius = 0;
- var i = d3.interpolate({startAngle: 0, endAngle: 0}, b);
- return function(t) {
- return arc(i(t));
- };
- }
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.values = function(_) {
- if (!arguments.length) return getValues;
- getValues = _;
- return chart;
- };
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- };
-
- chart.description = function(_) {
- if (!arguments.length) return getDescription;
- getDescription = _;
- return chart;
- };
-
- chart.showLabels = function(_) {
- if (!arguments.length) return showLabels;
- showLabels = _;
- return chart;
- };
-
- chart.labelSunbeamLayout = function(_) {
- if (!arguments.length) return labelSunbeamLayout;
- labelSunbeamLayout = _;
- return chart;
- };
-
- chart.donutLabelsOutside = function(_) {
- if (!arguments.length) return donutLabelsOutside;
- donutLabelsOutside = _;
- return chart;
- };
-
- chart.pieLabelsOutside = function(_) {
- if (!arguments.length) return pieLabelsOutside;
- pieLabelsOutside = _;
- return chart;
- };
-
- chart.donut = function(_) {
- if (!arguments.length) return donut;
- donut = _;
- return chart;
- };
-
- chart.donutRatio = function(_) {
- if (!arguments.length) return donutRatio;
- donutRatio = _;
- return chart;
- };
-
- chart.startAngle = function(_) {
- if (!arguments.length) return startAngle;
- startAngle = _;
- return chart;
- };
-
- chart.endAngle = function(_) {
- if (!arguments.length) return endAngle;
- endAngle = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.valueFormat = function(_) {
- if (!arguments.length) return valueFormat;
- valueFormat = _;
- return chart;
- };
-
- chart.labelThreshold = function(_) {
- if (!arguments.length) return labelThreshold;
- labelThreshold = _;
- return chart;
- };
- //============================================================
-
-
- return chart;
-}
-nv.models.pieChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var pie = nv.models.pie()
- , legend = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 20, bottom: 20, left: 20}
- , width = null
- , height = null
- , showLegend = true
- , color = nv.utils.defaultColor()
- , tooltips = true
- , tooltip = function(key, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + '</p>'
- }
- , state = {}
- , defaultState = null
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var tooltipLabel = pie.description()(e.point) || pie.x()(e.point)
- var left = e.pos[0] + ( (offsetElement && offsetElement.offsetLeft) || 0 ),
- top = e.pos[1] + ( (offsetElement && offsetElement.offsetTop) || 0),
- y = pie.valueFormat()(pie.y()(e.point)),
- content = tooltip(tooltipLabel, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart); };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data[0].map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data[0] || !data[0].length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-pieChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-pieChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-pieWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend
- .width( availableWidth )
- .key(pie.x());
-
- wrap.select('.nv-legendWrap')
- .datum(pie.values()(data[0]))
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- pie
- .width(availableWidth)
- .height(availableHeight);
-
-
- var pieWrap = g.select('.nv-pieWrap')
- .datum(data);
-
- d3.transition(pieWrap).call(pie);
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i, that) {
- d.disabled = !d.disabled;
-
- if (!pie.values()(data[0]).filter(function(d) { return !d.disabled }).length) {
- pie.values()(data[0]).map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data[0].map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- pie.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data[0].forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- pie.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.legend = legend;
- chart.dispatch = dispatch;
- chart.pie = pie;
-
- d3.rebind(chart, pie, 'valueFormat', 'values', 'x', 'y', 'description', 'id', 'showLabels', 'donutLabelsOutside', 'pieLabelsOutside', 'donut', 'donutRatio', 'labelThreshold');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- pie.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.scatter = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor() // chooses color
- , id = Math.floor(Math.random() * 100000) //Create semi-unique ID incase user doesn't select one
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , z = d3.scale.linear() //linear because d3.svg.shape.size is treated as area
- , getX = function(d) { return d.x } // accessor to get the x value
- , getY = function(d) { return d.y } // accessor to get the y value
- , getSize = function(d) { return d.size || 1} // accessor to get the point size
- , getShape = function(d) { return d.shape || 'circle' } // accessor to get point shape
- , onlyCircles = true // Set to false to use shapes
- , forceX = [] // List of numbers to Force into the X scale (ie. 0, or a max / min, etc.)
- , forceY = [] // List of numbers to Force into the Y scale
- , forceSize = [] // List of numbers to Force into the Size scale
- , interactive = true // If true, plots a voronoi overlay for advanced point intersection
- , pointKey = null
- , pointActive = function(d) { return !d.notActive } // any points that return false will be filtered out
- , padData = false // If true, adds half a data points width to front and back, for lining up a line chart with a bar chart
- , padDataOuter = .1 //outerPadding to imitate ordinal scale outer padding
- , clipEdge = false // if true, masks points within x and y scale
- , clipVoronoi = true // if true, masks each point with a circle... can turn off to slightly increase performance
- , clipRadius = function() { return 25 } // function to get the radius for voronoi point clips
- , xDomain = null // Override x domain (skips the calculation from data)
- , yDomain = null // Override y domain
- , sizeDomain = null // Override point size domain
- , sizeRange = null
- , singlePoint = false
- , dispatch = d3.dispatch('elementClick', 'elementMouseover', 'elementMouseout')
- , useVoronoi = true
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0, z0 // used to store previous scales
- , timeoutID
- , needsUpdate = false // Flag for when the points are visually updating, but the interactive layer is behind, to disable tooltips
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- //add series index to each data point for reference
- data = data.map(function(series, i) {
- series.values = series.values.map(function(point) {
- point.series = i;
- return point;
- });
- return series;
- });
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain && sizeDomain) ? [] : // if we know xDomain and yDomain and sizeDomain, no need to calculate.... if Size is constant remember to set sizeDomain to speed up performance
- d3.merge(
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), size: getSize(d,i) }
- })
- })
- );
-
- x .domain(xDomain || d3.extent(seriesData.map(function(d) { return d.x; }).concat(forceX)))
-
- if (padData && data[0])
- x.range([(availableWidth * padDataOuter + availableWidth) / (2 *data[0].values.length), availableWidth - availableWidth * (1 + padDataOuter) / (2 * data[0].values.length) ]);
- //x.range([availableWidth * .5 / data[0].values.length, availableWidth * (data[0].values.length - .5) / data[0].values.length ]);
- else
- x.range([0, availableWidth]);
-
- y .domain(yDomain || d3.extent(seriesData.map(function(d) { return d.y }).concat(forceY)))
- .range([availableHeight, 0]);
-
- z .domain(sizeDomain || d3.extent(seriesData.map(function(d) { return d.size }).concat(forceSize)))
- .range(sizeRange || [16, 256]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1] || y.domain()[0] === y.domain()[1]) singlePoint = true;
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
- if ( isNaN(x.domain()[0])) {
- x.domain([-1,1]);
- }
-
- if ( isNaN(y.domain()[0])) {
- y.domain([-1,1]);
- }
-
-
- x0 = x0 || x;
- y0 = y0 || y;
- z0 = z0 || z;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-scatter').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-scatter nv-chart-' + id + (singlePoint ? ' nv-single-point' : ''));
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-groups');
- gEnter.append('g').attr('class', 'nv-point-paths');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
-
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
-
- function updateInteractiveLayer() {
-
- if (!interactive) return false;
-
- var eventElements;
-
- var vertices = d3.merge(data.map(function(group, groupIndex) {
- return group.values
- .map(function(point, pointIndex) {
- // *Adding noise to make duplicates very unlikely
- // *Injecting series and point index for reference
- /* *Adding a 'jitter' to the points, because there's an issue in d3.geom.voronoi.
- */
- var pX = getX(point,pointIndex) + Math.random() * 1e-7;
- var pY = getY(point,pointIndex) + Math.random() * 1e-7;
-
- return [x(pX),
- y(pY),
- groupIndex,
- pointIndex, point]; //temp hack to add noise untill I think of a better way so there are no duplicates
- })
- .filter(function(pointArray, pointIndex) {
- return pointActive(pointArray[4], pointIndex); // Issue #237.. move filter to after map, so pointIndex is correct!
- })
- })
- );
-
-
-
- //inject series and point index for reference into voronoi
- if (useVoronoi === true) {
-
- if (clipVoronoi) {
- var pointClipsEnter = wrap.select('defs').selectAll('.nv-point-clips')
- .data([id])
- .enter();
-
- pointClipsEnter.append('clipPath')
- .attr('class', 'nv-point-clips')
- .attr('id', 'nv-points-clip-' + id);
-
- var pointClips = wrap.select('#nv-points-clip-' + id).selectAll('circle')
- .data(vertices);
- pointClips.enter().append('circle')
- .attr('r', clipRadius);
- pointClips.exit().remove();
- pointClips
- .attr('cx', function(d) { return d[0] })
- .attr('cy', function(d) { return d[1] });
-
- wrap.select('.nv-point-paths')
- .attr('clip-path', 'url(#nv-points-clip-' + id + ')');
- }
-
-
- if(vertices.length) {
- // Issue #283 - Adding 2 dummy points to the voronoi b/c voronoi requires min 3 points to work
- vertices.push([x.range()[0] - 20, y.range()[0] - 20, null, null]);
- vertices.push([x.range()[1] + 20, y.range()[1] + 20, null, null]);
- vertices.push([x.range()[0] - 20, y.range()[0] + 20, null, null]);
- vertices.push([x.range()[1] + 20, y.range()[1] - 20, null, null]);
- }
-
- var bounds = d3.geom.polygon([
- [-10,-10],
- [-10,height + 10],
- [width + 10,height + 10],
- [width + 10,-10]
- ]);
-
- var voronoi = d3.geom.voronoi(vertices).map(function(d, i) {
- return {
- 'data': bounds.clip(d),
- 'series': vertices[i][2],
- 'point': vertices[i][3]
- }
- });
-
-
- var pointPaths = wrap.select('.nv-point-paths').selectAll('path')
- .data(voronoi);
- pointPaths.enter().append('path')
- .attr('class', function(d,i) { return 'nv-path-'+i; });
- pointPaths.exit().remove();
- pointPaths
- .attr('d', function(d) {
- if (d.data.length === 0)
- return 'M 0 0'
- else
- return 'M' + d.data.join('L') + 'Z';
- });
-
- pointPaths
- .on('click', function(d) {
- if (needsUpdate) return 0;
- var series = data[d.series],
- point = series.values[d.point];
-
- dispatch.elementClick({
- point: point,
- series: series,
- pos: [x(getX(point, d.point)) + margin.left, y(getY(point, d.point)) + margin.top],
- seriesIndex: d.series,
- pointIndex: d.point
- });
- })
- .on('mouseover', function(d) {
- if (needsUpdate) return 0;
- var series = data[d.series],
- point = series.values[d.point];
-
- dispatch.elementMouseover({
- point: point,
- series: series,
- pos: [x(getX(point, d.point)) + margin.left, y(getY(point, d.point)) + margin.top],
- seriesIndex: d.series,
- pointIndex: d.point
- });
- })
- .on('mouseout', function(d, i) {
- if (needsUpdate) return 0;
- var series = data[d.series],
- point = series.values[d.point];
-
- dispatch.elementMouseout({
- point: point,
- series: series,
- seriesIndex: d.series,
- pointIndex: d.point
- });
- });
-
-
- } else {
- /*
- // bring data in form needed for click handlers
- var dataWithPoints = vertices.map(function(d, i) {
- return {
- 'data': d,
- 'series': vertices[i][2],
- 'point': vertices[i][3]
- }
- });
- */
-
- // add event handlers to points instead voronoi paths
- wrap.select('.nv-groups').selectAll('.nv-group')
- .selectAll('.nv-point')
- //.data(dataWithPoints)
- //.style('pointer-events', 'auto') // recativate events, disabled by css
- .on('click', function(d,i) {
- //nv.log('test', d, i);
- if (needsUpdate || !data[d.series]) return 0; //check if this is a dummy point
- var series = data[d.series],
- point = series.values[i];
-
- dispatch.elementClick({
- point: point,
- series: series,
- pos: [x(getX(point, i)) + margin.left, y(getY(point, i)) + margin.top],
- seriesIndex: d.series,
- pointIndex: i
- });
- })
- .on('mouseover', function(d,i) {
- if (needsUpdate || !data[d.series]) return 0; //check if this is a dummy point
- var series = data[d.series],
- point = series.values[i];
-
- dispatch.elementMouseover({
- point: point,
- series: series,
- pos: [x(getX(point, i)) + margin.left, y(getY(point, i)) + margin.top],
- seriesIndex: d.series,
- pointIndex: i
- });
- })
- .on('mouseout', function(d,i) {
- if (needsUpdate || !data[d.series]) return 0; //check if this is a dummy point
- var series = data[d.series],
- point = series.values[i];
-
- dispatch.elementMouseout({
- point: point,
- series: series,
- seriesIndex: d.series,
- pointIndex: i
- });
- });
- }
-
- needsUpdate = false;
- }
-
- needsUpdate = true;
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- d3.transition(groups.exit())
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover });
- d3.transition(groups)
- .style('fill', function(d,i) { return color(d, i) })
- .style('stroke', function(d,i) { return color(d, i) })
- .style('stroke-opacity', 1)
- .style('fill-opacity', .5);
-
-
- if (onlyCircles) {
-
- var points = groups.selectAll('circle.nv-point')
- .data(function(d) { return d.values }, pointKey);
- points.enter().append('circle')
- .attr('cx', function(d,i) { return x0(getX(d,i)) })
- .attr('cy', function(d,i) { return y0(getY(d,i)) })
- .attr('r', function(d,i) { return Math.sqrt(z(getSize(d,i))/Math.PI) });
- points.exit().remove();
- groups.exit().selectAll('path.nv-point').transition()
- .attr('cx', function(d,i) { return x(getX(d,i)) })
- .attr('cy', function(d,i) { return y(getY(d,i)) })
- .remove();
- points.each(function(d,i) {
- d3.select(this)
- .classed('nv-point', true)
- .classed('nv-point-' + i, true);
- });
- points.transition()
- .attr('cx', function(d,i) { return x(getX(d,i)) })
- .attr('cy', function(d,i) { return y(getY(d,i)) })
- .attr('r', function(d,i) { return Math.sqrt(z(getSize(d,i))/Math.PI) });
-
- } else {
-
- var points = groups.selectAll('path.nv-point')
- .data(function(d) { return d.values });
- points.enter().append('path')
- .attr('transform', function(d,i) {
- return 'translate(' + x0(getX(d,i)) + ',' + y0(getY(d,i)) + ')'
- })
- .attr('d',
- d3.svg.symbol()
- .type(getShape)
- .size(function(d,i) { return z(getSize(d,i)) })
- );
- points.exit().remove();
- d3.transition(groups.exit().selectAll('path.nv-point'))
- .attr('transform', function(d,i) {
- return 'translate(' + x(getX(d,i)) + ',' + y(getY(d,i)) + ')'
- })
- .remove();
- points.each(function(d,i) {
- d3.select(this)
- .classed('nv-point', true)
- .classed('nv-point-' + i, true);
- });
- points.transition()
- .attr('transform', function(d,i) {
- //nv.log(d,i,getX(d,i), x(getX(d,i)));
- return 'translate(' + x(getX(d,i)) + ',' + y(getY(d,i)) + ')'
- })
- .attr('d',
- d3.svg.symbol()
- .type(getShape)
- .size(function(d,i) { return z(getSize(d,i)) })
- );
- }
-
-
- // Delay updating the invisible interactive layer for smoother animation
- clearTimeout(timeoutID); // stop repeat calls to updateInteractiveLayer
- timeoutID = setTimeout(updateInteractiveLayer, 300);
- //updateInteractiveLayer();
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
- z0 = z.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- dispatch.on('elementMouseover.point', function(d) {
- if (interactive)
- d3.select('.nv-chart-' + id + ' .nv-series-' + d.seriesIndex + ' .nv-point-' + d.pointIndex)
- .classed('hover', true);
- });
-
- dispatch.on('elementMouseout.point', function(d) {
- if (interactive)
- d3.select('.nv-chart-' + id + ' .nv-series-' + d.seriesIndex + ' .nv-point-' + d.pointIndex)
- .classed('hover', false);
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = d3.functor(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- };
-
- chart.size = function(_) {
- if (!arguments.length) return getSize;
- getSize = d3.functor(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.zScale = function(_) {
- if (!arguments.length) return z;
- z = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.sizeDomain = function(_) {
- if (!arguments.length) return sizeDomain;
- sizeDomain = _;
- return chart;
- };
-
- chart.sizeRange = function(_) {
- if (!arguments.length) return sizeRange;
- sizeRange = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.forceSize = function(_) {
- if (!arguments.length) return forceSize;
- forceSize = _;
- return chart;
- };
-
- chart.interactive = function(_) {
- if (!arguments.length) return interactive;
- interactive = _;
- return chart;
- };
-
- chart.pointKey = function(_) {
- if (!arguments.length) return pointKey;
- pointKey = _;
- return chart;
- };
-
- chart.pointActive = function(_) {
- if (!arguments.length) return pointActive;
- pointActive = _;
- return chart;
- };
-
- chart.padData = function(_) {
- if (!arguments.length) return padData;
- padData = _;
- return chart;
- };
-
- chart.padDataOuter = function(_) {
- if (!arguments.length) return padDataOuter;
- padDataOuter = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.clipVoronoi= function(_) {
- if (!arguments.length) return clipVoronoi;
- clipVoronoi = _;
- return chart;
- };
-
- chart.useVoronoi= function(_) {
- if (!arguments.length) return useVoronoi;
- useVoronoi = _;
- if (useVoronoi === false) {
- clipVoronoi = false;
- }
- return chart;
- };
-
- chart.clipRadius = function(_) {
- if (!arguments.length) return clipRadius;
- clipRadius = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.shape = function(_) {
- if (!arguments.length) return getShape;
- getShape = _;
- return chart;
- };
-
- chart.onlyCircles = function(_) {
- if (!arguments.length) return onlyCircles;
- onlyCircles = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.singlePoint = function(_) {
- if (!arguments.length) return singlePoint;
- singlePoint = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.scatterChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var scatter = nv.models.scatter()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- , distX = nv.models.distribution()
- , distY = nv.models.distribution()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 75}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , x = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.xScale()
- , y = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.yScale()
- , xPadding = 0
- , yPadding = 0
- , showDistX = false
- , showDistY = false
- , showLegend = true
- , showControls = !!d3.fisheye
- , fisheye = 0
- , pauseFisheye = false
- , tooltips = true
- , tooltipX = function(key, x, y) { return '<strong>' + x + '</strong>' }
- , tooltipY = function(key, x, y) { return '<strong>' + y + '</strong>' }
- //, tooltip = function(key, x, y) { return '<h3>' + key + '</h3>' }
- , tooltip = null
- , state = {}
- , defaultState = null
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , noData = "No Data Available."
- ;
-
- scatter
- .xScale(x)
- .yScale(y)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(10)
- ;
- yAxis
- .orient('left')
- .tickPadding(10)
- ;
- distX
- .axis('x')
- ;
- distY
- .axis('y')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0;
-
- var showTooltip = function(e, offsetElement) {
- //TODO: make tooltip style an option between single or dual on axes (maybe on all charts with axes?)
-
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- leftX = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- topX = y.range()[0] + margin.top + ( offsetElement.offsetTop || 0),
- leftY = x.range()[0] + margin.left + ( offsetElement.offsetLeft || 0 ),
- topY = e.pos[1] + ( offsetElement.offsetTop || 0),
- xVal = xAxis.tickFormat()(scatter.x()(e.point, e.pointIndex)),
- yVal = yAxis.tickFormat()(scatter.y()(e.point, e.pointIndex));
-
- if( tooltipX != null )
- nv.tooltip.show([leftX, topX], tooltipX(e.series.key, xVal, yVal, e, chart), 'n', 1, offsetElement, 'x-nvtooltip');
- if( tooltipY != null )
- nv.tooltip.show([leftY, topY], tooltipY(e.series.key, xVal, yVal, e, chart), 'e', 1, offsetElement, 'y-nvtooltip');
- if( tooltip != null )
- nv.tooltip.show([left, top], tooltip(e.series.key, xVal, yVal, e, chart), e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- var controlsData = [
- { key: 'Magnify', disabled: true }
- ];
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart); };
- // chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-scatterChart').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-scatterChart nv-chart-' + scatter.id());
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- // background for pointer events
- gEnter.append('rect').attr('class', 'nvd3 nv-background');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
- gEnter.append('g').attr('class', 'nv-distWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- wrap.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(' + (availableWidth / 2) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- controls.width(180).color(['#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
- .xDomain(null)
- .yDomain(null)
-
- wrap.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
-
-
- //Adjust for x and y padding
- if (xPadding) {
- var xRange = x.domain()[1] - x.domain()[0];
- scatter.xDomain([x.domain()[0] - (xPadding * xRange), x.domain()[1] + (xPadding * xRange)]);
- }
-
- if (yPadding) {
- var yRange = y.domain()[1] - y.domain()[0];
- scatter.yDomain([y.domain()[0] - (yPadding * yRange), y.domain()[1] + (yPadding * yRange)]);
- }
-
- wrap.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( xAxis.ticks() && xAxis.ticks().length ? xAxis.ticks() : availableWidth / 100 )
- .tickSize( -availableHeight , 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .call(xAxis);
-
-
- yAxis
- .scale(y)
- .ticks( yAxis.ticks() && yAxis.ticks().length ? yAxis.ticks() : availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis')
- .call(yAxis);
-
-
- if (showDistX) {
- distX
- .getData(scatter.x())
- .scale(x)
- .width(availableWidth)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionX');
- g.select('.nv-distributionX')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- }
-
- if (showDistY) {
- distY
- .getData(scatter.y())
- .scale(y)
- .width(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionY');
- g.select('.nv-distributionY')
- .attr('transform', 'translate(-' + distY.size() + ',0)')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
- //------------------------------------------------------------
-
-
-
-
- if (d3.fisheye) {
- g.select('.nv-background')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g.select('.nv-background').on('mousemove', updateFisheye);
- g.select('.nv-background').on('click', function() { pauseFisheye = !pauseFisheye;});
- scatter.dispatch.on('elementClick.freezeFisheye', function() {
- pauseFisheye = !pauseFisheye;
- });
- }
-
-
- function updateFisheye() {
- if (pauseFisheye) {
- g.select('.nv-point-paths').style('pointer-events', 'all');
- return false;
- }
-
- g.select('.nv-point-paths').style('pointer-events', 'none' );
-
- var mouse = d3.mouse(this);
- x.distortion(fisheye).focus(mouse[0]);
- y.distortion(fisheye).focus(mouse[1]);
-
- g.select('.nv-scatterWrap')
- .call(scatter);
-
- g.select('.nv-x.nv-axis').call(xAxis);
- g.select('.nv-y.nv-axis').call(yAxis);
- g.select('.nv-distributionX')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- g.select('.nv-distributionY')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- controls.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- fisheye = d.disabled ? 0 : 2.5;
- g.select('.nv-background') .style('pointer-events', d.disabled ? 'none' : 'all');
- g.select('.nv-point-paths').style('pointer-events', d.disabled ? 'all' : 'none' );
-
- if (d.disabled) {
- x.distortion(fisheye).focus(0);
- y.distortion(fisheye).focus(0);
-
- g.select('.nv-scatterWrap').call(scatter);
- g.select('.nv-x.nv-axis').call(xAxis);
- g.select('.nv-y.nv-axis').call(yAxis);
- } else {
- pauseFisheye = false;
- }
-
- chart.update();
- });
-
- legend.dispatch.on('legendClick', function(d,i, that) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
-
- /*
- legend.dispatch.on('legendMouseover', function(d, i) {
- d.hover = true;
- chart(selection);
- });
-
- legend.dispatch.on('legendMouseout', function(d, i) {
- d.hover = false;
- chart(selection);
- });
- */
-
- scatter.dispatch.on('elementMouseover.tooltip', function(e) {
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', function(d,i) { return e.pos[1] - availableHeight;});
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', e.pos[0] + distX.size());
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
-
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', 0);
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', distY.size());
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.scatter = scatter;
- chart.legend = legend;
- chart.controls = controls;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.distX = distX;
- chart.distY = distY;
-
- d3.rebind(chart, scatter, 'id', 'interactive', 'pointActive', 'x', 'y', 'shape', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'sizeDomain', 'sizeRange', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'clipRadius', 'useVoronoi');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- distX.color(color);
- distY.color(color);
- return chart;
- };
-
- chart.showDistX = function(_) {
- if (!arguments.length) return showDistX;
- showDistX = _;
- return chart;
- };
-
- chart.showDistY = function(_) {
- if (!arguments.length) return showDistY;
- showDistY = _;
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.fisheye = function(_) {
- if (!arguments.length) return fisheye;
- fisheye = _;
- return chart;
- };
-
- chart.xPadding = function(_) {
- if (!arguments.length) return xPadding;
- xPadding = _;
- return chart;
- };
-
- chart.yPadding = function(_) {
- if (!arguments.length) return yPadding;
- yPadding = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltipXContent = function(_) {
- if (!arguments.length) return tooltipX;
- tooltipX = _;
- return chart;
- };
-
- chart.tooltipYContent = function(_) {
- if (!arguments.length) return tooltipY;
- tooltipY = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.scatterPlusLineChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var scatter = nv.models.scatter()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- , distX = nv.models.distribution()
- , distY = nv.models.distribution()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 75}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , x = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.xScale()
- , y = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.yScale()
- , showDistX = false
- , showDistY = false
- , showLegend = true
- , showControls = !!d3.fisheye
- , fisheye = 0
- , pauseFisheye = false
- , tooltips = true
- , tooltipX = function(key, x, y) { return '<strong>' + x + '</strong>' }
- , tooltipY = function(key, x, y) { return '<strong>' + y + '</strong>' }
- , tooltip = function(key, x, y, date) { return '<h3>' + key + '</h3>'
- + '<p>' + date + '</p>' }
- //, tooltip = null
- , state = {}
- , defaultState = null
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , noData = "No Data Available."
- ;
-
- scatter
- .xScale(x)
- .yScale(y)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(10)
- ;
- yAxis
- .orient('left')
- .tickPadding(10)
- ;
- distX
- .axis('x')
- ;
- distY
- .axis('y')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0;
-
- var showTooltip = function(e, offsetElement) {
- //TODO: make tooltip style an option between single or dual on axes (maybe on all charts with axes?)
-
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- leftX = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- topX = y.range()[0] + margin.top + ( offsetElement.offsetTop || 0),
- leftY = x.range()[0] + margin.left + ( offsetElement.offsetLeft || 0 ),
- topY = e.pos[1] + ( offsetElement.offsetTop || 0),
- xVal = xAxis.tickFormat()(scatter.x()(e.point, e.pointIndex)),
- yVal = yAxis.tickFormat()(scatter.y()(e.point, e.pointIndex));
-
- if( tooltipX != null )
- nv.tooltip.show([leftX, topX], tooltipX(e.series.key, xVal, yVal, e, chart), 'n', 1, offsetElement, 'x-nvtooltip');
- if( tooltipY != null )
- nv.tooltip.show([leftY, topY], tooltipY(e.series.key, xVal, yVal, e, chart), 'e', 1, offsetElement, 'y-nvtooltip');
- if( tooltip != null )
- nv.tooltip.show([left, top], tooltip(e.series.key, xVal, yVal, e.point.tooltip, e, chart), e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- var controlsData = [
- { key: 'Magnify', disabled: true }
- ];
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart); };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = scatter.xScale();
- y = scatter.yScale();
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-scatterChart').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-scatterChart nv-chart-' + scatter.id());
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- // background for pointer events
- gEnter.append('rect').attr('class', 'nvd3 nv-background')
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
- gEnter.append('g').attr('class', 'nv-regressionLinesWrap');
- gEnter.append('g').attr('class', 'nv-distWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- wrap.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(' + (availableWidth / 2) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- controls.width(180).color(['#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
-
- wrap.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
-
-
- wrap.select('.nv-regressionLinesWrap')
- .attr('clip-path', 'url(#nv-edge-clip-' + scatter.id() + ')');
-
- var regWrap = wrap.select('.nv-regressionLinesWrap').selectAll('.nv-regLines')
- .data(function(d) { return d });
-
- var reglines = regWrap.enter()
- .append('g').attr('class', 'nv-regLines')
- .append('line').attr('class', 'nv-regLine')
- .style('stroke-opacity', 0);
-
- //d3.transition(regWrap.selectAll('.nv-regLines line'))
- regWrap.selectAll('.nv-regLines line')
- .attr('x1', x.range()[0])
- .attr('x2', x.range()[1])
- .attr('y1', function(d,i) { return y(x.domain()[0] * d.slope + d.intercept) })
- .attr('y2', function(d,i) { return y(x.domain()[1] * d.slope + d.intercept) })
- .style('stroke', function(d,i,j) { return color(d,j) })
- .style('stroke-opacity', function(d,i) {
- return (d.disabled || typeof d.slope === 'undefined' || typeof d.intercept === 'undefined') ? 0 : 1
- });
-
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( xAxis.ticks() ? xAxis.ticks() : availableWidth / 100 )
- .tickSize( -availableHeight , 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .call(xAxis);
-
-
- yAxis
- .scale(y)
- .ticks( yAxis.ticks() ? yAxis.ticks() : availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis')
- .call(yAxis);
-
-
- if (showDistX) {
- distX
- .getData(scatter.x())
- .scale(x)
- .width(availableWidth)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionX');
- g.select('.nv-distributionX')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- }
-
- if (showDistY) {
- distY
- .getData(scatter.y())
- .scale(y)
- .width(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionY');
- g.select('.nv-distributionY')
- .attr('transform', 'translate(-' + distY.size() + ',0)')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
- //------------------------------------------------------------
-
-
-
-
- if (d3.fisheye) {
- g.select('.nv-background')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g.select('.nv-background').on('mousemove', updateFisheye);
- g.select('.nv-background').on('click', function() { pauseFisheye = !pauseFisheye;});
- scatter.dispatch.on('elementClick.freezeFisheye', function() {
- pauseFisheye = !pauseFisheye;
- });
- }
-
-
- function updateFisheye() {
- if (pauseFisheye) {
- g.select('.nv-point-paths').style('pointer-events', 'all');
- return false;
- }
-
- g.select('.nv-point-paths').style('pointer-events', 'none' );
-
- var mouse = d3.mouse(this);
- x.distortion(fisheye).focus(mouse[0]);
- y.distortion(fisheye).focus(mouse[1]);
-
- g.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
- g.select('.nv-x.nv-axis').call(xAxis);
- g.select('.nv-y.nv-axis').call(yAxis);
- g.select('.nv-distributionX')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- g.select('.nv-distributionY')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- controls.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- fisheye = d.disabled ? 0 : 2.5;
- g.select('.nv-background') .style('pointer-events', d.disabled ? 'none' : 'all');
- g.select('.nv-point-paths').style('pointer-events', d.disabled ? 'all' : 'none' );
-
- if (d.disabled) {
- x.distortion(fisheye).focus(0);
- y.distortion(fisheye).focus(0);
-
- g.select('.nv-scatterWrap').call(scatter);
- g.select('.nv-x.nv-axis').call(xAxis);
- g.select('.nv-y.nv-axis').call(yAxis);
- } else {
- pauseFisheye = false;
- }
-
- chart.update();
- });
-
- legend.dispatch.on('legendClick', function(d,i, that) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
-
- /*
- legend.dispatch.on('legendMouseover', function(d, i) {
- d.hover = true;
- chart(selection);
- });
-
- legend.dispatch.on('legendMouseout', function(d, i) {
- d.hover = false;
- chart(selection);
- });
- */
-
- scatter.dispatch.on('elementMouseover.tooltip', function(e) {
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', e.pos[1] - availableHeight);
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', e.pos[0] + distX.size());
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
-
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', 0);
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', distY.size());
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.scatter = scatter;
- chart.legend = legend;
- chart.controls = controls;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.distX = distX;
- chart.distY = distY;
-
- d3.rebind(chart, scatter, 'id', 'interactive', 'pointActive', 'x', 'y', 'shape', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'sizeDomain', 'sizeRange', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'clipRadius', 'useVoronoi');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- distX.color(color);
- distY.color(color);
- return chart;
- };
-
- chart.showDistX = function(_) {
- if (!arguments.length) return showDistX;
- showDistX = _;
- return chart;
- };
-
- chart.showDistY = function(_) {
- if (!arguments.length) return showDistY;
- showDistY = _;
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.fisheye = function(_) {
- if (!arguments.length) return fisheye;
- fisheye = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltipXContent = function(_) {
- if (!arguments.length) return tooltipX;
- tooltipX = _;
- return chart;
- };
-
- chart.tooltipYContent = function(_) {
- if (!arguments.length) return tooltipY;
- tooltipY = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.sparkline = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 2, right: 0, bottom: 2, left: 0}
- , width = 400
- , height = 32
- , animate = true
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , color = nv.utils.getColor(['#000'])
- , xDomain
- , yDomain
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x .domain(xDomain || d3.extent(data, getX ))
- .range([0, availableWidth]);
-
- y .domain(yDomain || d3.extent(data, getY ))
- .range([availableHeight, 0]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-sparkline').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-sparkline');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')')
-
- //------------------------------------------------------------
-
-
- var paths = wrap.selectAll('path')
- .data(function(d) { return [d] });
- paths.enter().append('path');
- paths.exit().remove();
- paths
- .style('stroke', function(d,i) { return d.color || color(d, i) })
- .attr('d', d3.svg.line()
- .x(function(d,i) { return x(getX(d,i)) })
- .y(function(d,i) { return y(getY(d,i)) })
- );
-
-
- // TODO: Add CURRENT data point (Need Min, Mac, Current / Most recent)
- var points = wrap.selectAll('circle.nv-point')
- .data(function(data) {
- var yValues = data.map(function(d, i) { return getY(d,i); });
- function pointIndex(index) {
- if (index != -1) {
- var result = data[index];
- result.pointIndex = index;
- return result;
- } else {
- return null;
- }
- }
- var maxPoint = pointIndex(yValues.lastIndexOf(y.domain()[1])),
- minPoint = pointIndex(yValues.indexOf(y.domain()[0])),
- currentPoint = pointIndex(yValues.length - 1);
- return [minPoint, maxPoint, currentPoint].filter(function (d) {return d != null;});
- });
- points.enter().append('circle');
- points.exit().remove();
- points
- .attr('cx', function(d,i) { return x(getX(d,d.pointIndex)) })
- .attr('cy', function(d,i) { return y(getY(d,d.pointIndex)) })
- .attr('r', 2)
- .attr('class', function(d,i) {
- return getX(d, d.pointIndex) == x.domain()[1] ? 'nv-point nv-currentValue' :
- getY(d, d.pointIndex) == y.domain()[0] ? 'nv-point nv-minValue' : 'nv-point nv-maxValue'
- });
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = d3.functor(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.animate = function(_) {
- if (!arguments.length) return animate;
- animate = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.sparklinePlus = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var sparkline = nv.models.sparkline();
-
- var margin = {top: 15, right: 100, bottom: 10, left: 50}
- , width = null
- , height = null
- , x
- , y
- , index = []
- , paused = false
- , xTickFormat = d3.format(',r')
- , yTickFormat = d3.format(',.2f')
- , showValue = true
- , alignValue = true
- , rightAlignValue = false
- , noData = "No Data Available."
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this);
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
-
- chart.update = function() { chart(selection) };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- var currentValue = sparkline.y()(data[data.length-1], data.length-1);
-
- //------------------------------------------------------------
-
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = sparkline.xScale();
- y = sparkline.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-sparklineplus').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-sparklineplus');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-sparklineWrap');
- gEnter.append('g').attr('class', 'nv-valueWrap');
- gEnter.append('g').attr('class', 'nv-hoverArea');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- var sparklineWrap = g.select('.nv-sparklineWrap');
-
- sparkline
- .width(availableWidth)
- .height(availableHeight);
-
- sparklineWrap
- .call(sparkline);
-
- //------------------------------------------------------------
-
-
- var valueWrap = g.select('.nv-valueWrap');
-
- var value = valueWrap.selectAll('.nv-currentValue')
- .data([currentValue]);
-
- value.enter().append('text').attr('class', 'nv-currentValue')
- .attr('dx', rightAlignValue ? -8 : 8)
- .attr('dy', '.9em')
- .style('text-anchor', rightAlignValue ? 'end' : 'start');
-
- value
- .attr('x', availableWidth + (rightAlignValue ? margin.right : 0))
- .attr('y', alignValue ? function(d) { return y(d) } : 0)
- .style('fill', sparkline.color()(data[data.length-1], data.length-1))
- .text(yTickFormat(currentValue));
-
-
-
- gEnter.select('.nv-hoverArea').append('rect')
- .on('mousemove', sparklineHover)
- .on('click', function() { paused = !paused })
- .on('mouseout', function() { index = []; updateValueLine(); });
- //.on('mouseout', function() { index = null; updateValueLine(); });
-
- g.select('.nv-hoverArea rect')
- .attr('transform', function(d) { return 'translate(' + -margin.left + ',' + -margin.top + ')' })
- .attr('width', availableWidth + margin.left + margin.right)
- .attr('height', availableHeight + margin.top);
-
-
-
- function updateValueLine() { //index is currently global (within the chart), may or may not keep it that way
- if (paused) return;
-
- var hoverValue = g.selectAll('.nv-hoverValue').data(index)
-
- var hoverEnter = hoverValue.enter()
- .append('g').attr('class', 'nv-hoverValue')
- .style('stroke-opacity', 0)
- .style('fill-opacity', 0);
-
- hoverValue.exit()
- .transition().duration(250)
- .style('stroke-opacity', 0)
- .style('fill-opacity', 0)
- .remove();
-
- hoverValue
- .attr('transform', function(d) { return 'translate(' + x(sparkline.x()(data[d],d)) + ',0)' })
- .transition().duration(250)
- .style('stroke-opacity', 1)
- .style('fill-opacity', 1);
-
- if (!index.length) return;
-
- hoverEnter.append('line')
- .attr('x1', 0)
- .attr('y1', -margin.top)
- .attr('x2', 0)
- .attr('y2', availableHeight);
-
-
- hoverEnter.append('text').attr('class', 'nv-xValue')
- .attr('x', -6)
- .attr('y', -margin.top)
- .attr('text-anchor', 'end')
- .attr('dy', '.9em')
-
-
- g.select('.nv-hoverValue .nv-xValue')
- .text(xTickFormat(sparkline.x()(data[index[0]], index[0])));
-
- hoverEnter.append('text').attr('class', 'nv-yValue')
- .attr('x', 6)
- .attr('y', -margin.top)
- .attr('text-anchor', 'start')
- .attr('dy', '.9em')
-
- g.select('.nv-hoverValue .nv-yValue')
- .text(yTickFormat(sparkline.y()(data[index[0]], index[0])));
-
- }
-
-
- function sparklineHover() {
- if (paused) return;
-
- var pos = d3.mouse(this)[0] - margin.left;
-
- function getClosestIndex(data, x) {
- var distance = Math.abs(sparkline.x()(data[0], 0) - x);
- var closestIndex = 0;
- for (var i = 0; i < data.length; i++){
- if (Math.abs(sparkline.x()(data[i], i) - x) < distance) {
- distance = Math.abs(sparkline.x()(data[i], i) - x);
- closestIndex = i;
- }
- }
- return closestIndex;
- }
-
- index = [getClosestIndex(data, Math.round(x.invert(pos)))];
-
- updateValueLine();
- }
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.sparkline = sparkline;
-
- d3.rebind(chart, sparkline, 'x', 'y', 'xScale', 'yScale', 'color');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xTickFormat = function(_) {
- if (!arguments.length) return xTickFormat;
- xTickFormat = _;
- return chart;
- };
-
- chart.yTickFormat = function(_) {
- if (!arguments.length) return yTickFormat;
- yTickFormat = _;
- return chart;
- };
-
- chart.showValue = function(_) {
- if (!arguments.length) return showValue;
- showValue = _;
- return chart;
- };
-
- chart.alignValue = function(_) {
- if (!arguments.length) return alignValue;
- alignValue = _;
- return chart;
- };
-
- chart.rightAlignValue = function(_) {
- if (!arguments.length) return rightAlignValue;
- rightAlignValue = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.stackedArea = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor() // a function that computes the color
- , id = Math.floor(Math.random() * 100000) //Create semi-unique ID incase user doesn't selet one
- , getX = function(d) { return d.x } // accessor to get the x value from a data point
- , getY = function(d) { return d.y } // accessor to get the y value from a data point
- , style = 'stack'
- , offset = 'zero'
- , order = 'default'
- , interpolate = 'linear' // controls the line interpolation
- , clipEdge = false // if true, masks lines within x and y scale
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , yAxisTooltipFormat = d3.format(',.3f')
- , scatter = nv.models.scatter()
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'areaClick', 'areaMouseover', 'areaMouseout')
- ;
-
- scatter
- .size(2.2) // default size
- .sizeDomain([2.2,2.2]) // all the same size by default
- ;
-
- /************************************
- * offset:
- * 'wiggle' (stream)
- * 'zero' (stacked)
- * 'expand' (normalize to 100%)
- * 'silhouette' (simple centered)
- *
- * order:
- * 'inside-out' (stream)
- * 'default' (input order)
- ************************************/
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = scatter.xScale();
- y = scatter.yScale();
-
- //------------------------------------------------------------
-
-
- // Injecting point index into each point because d3.layout.stack().out does not give index
- // ***Also storing getY(d,i) as stackedY so that it can be set to 0 if series is disabled
- data = data.map(function(aseries, i) {
- aseries.values = aseries.values.map(function(d, j) {
- d.index = j;
- d.stackedY = aseries.disabled ? 0 : getY(d,j);
- return d;
- })
- return aseries;
- });
-
-
- data = d3.layout.stack()
- .order(order)
- .offset(offset)
- .values(function(d) { return d.values }) //TODO: make values customizeable in EVERY model in this fashion
- .x(getX)
- .y(function(d) { return d.stackedY })
- .out(function(d, y0, y) {
- d.display = {
- y: y,
- y0: y0
- };
- })
- (data);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-stackedarea').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-stackedarea');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-areaWrap');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
- .x(getX)
- .y(function(d) { return d.display.y + d.display.y0 })
- .forceY([0])
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
-
-
- var scatterWrap = g.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- //d3.transition(scatterWrap).call(scatter);
- scatterWrap.call(scatter);
-
-
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
-
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
-
-
-
- var area = d3.svg.area()
- .x(function(d,i) { return x(getX(d,i)) })
- .y0(function(d) { return y(d.display.y0) })
- .y1(function(d) { return y(d.display.y + d.display.y0) })
- .interpolate(interpolate);
-
- var zeroArea = d3.svg.area()
- .x(function(d,i) { return x(getX(d,i)) })
- .y0(function(d) { return y(d.display.y0) })
- .y1(function(d) { return y(d.display.y0) });
-
-
- var path = g.select('.nv-areaWrap').selectAll('path.nv-area')
- .data(function(d) { return d });
- //.data(function(d) { return d }, function(d) { return d.key });
- path.enter().append('path').attr('class', function(d,i) { return 'nv-area nv-area-' + i })
- .on('mouseover', function(d,i) {
- d3.select(this).classed('hover', true);
- dispatch.areaMouseover({
- point: d,
- series: d.key,
- pos: [d3.event.pageX, d3.event.pageY],
- seriesIndex: i
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.areaMouseout({
- point: d,
- series: d.key,
- pos: [d3.event.pageX, d3.event.pageY],
- seriesIndex: i
- });
- })
- .on('click', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.areaClick({
- point: d,
- series: d.key,
- pos: [d3.event.pageX, d3.event.pageY],
- seriesIndex: i
- });
- })
- //d3.transition(path.exit())
- path.exit()
- .attr('d', function(d,i) { return zeroArea(d.values,i) })
- .remove();
- path
- .style('fill', function(d,i){ return d.color || color(d, i) })
- .style('stroke', function(d,i){ return d.color || color(d, i) });
- //d3.transition(path)
- path
- .attr('d', function(d,i) { return area(d.values,i) })
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementMouseover.area', function(e) {
- g.select('.nv-chart-' + id + ' .nv-area-' + e.seriesIndex).classed('hover', true);
- });
- scatter.dispatch.on('elementMouseout.area', function(e) {
- g.select('.nv-chart-' + id + ' .nv-area-' + e.seriesIndex).classed('hover', false);
- });
-
- //============================================================
-
- });
-
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementClick.area', function(e) {
- dispatch.areaClick(e);
- })
- scatter.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
- scatter.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- //============================================================
-
-
- //============================================================
- // Global getters and setters
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.scatter = scatter;
-
- d3.rebind(chart, scatter, 'interactive', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'sizeDomain', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'clipRadius');
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = d3.functor(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- }
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.offset = function(_) {
- if (!arguments.length) return offset;
- offset = _;
- return chart;
- };
-
- chart.order = function(_) {
- if (!arguments.length) return order;
- order = _;
- return chart;
- };
-
- //shortcut for offset + order
- chart.style = function(_) {
- if (!arguments.length) return style;
- style = _;
-
- switch (style) {
- case 'stack':
- chart.offset('zero');
- chart.order('default');
- break;
- case 'stream':
- chart.offset('wiggle');
- chart.order('inside-out');
- break;
- case 'stream-center':
- chart.offset('silhouette');
- chart.order('inside-out');
- break;
- case 'expand':
- chart.offset('expand');
- chart.order('default');
- break;
- }
-
- return chart;
- };
-
- chart.interpolate = function(_) {
- if (!arguments.length) return interpolate;
- interpolate = _;
- return interpolate;
-
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.stackedAreaChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var stacked = nv.models.stackedArea()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 25, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.defaultColor() // a function that takes in d, i and returns color
- , showControls = true
- , showLegend = true
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' on ' + x + '</p>'
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , yAxisTickFormat = d3.format(',.2f')
- , yAxisTooltipFormat = d3.format(',.3f')
- , state = { style: stacked.style() }
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , controlWidth = 250
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient('left')
- ;
- stacked.scatter
- .pointActive(function(d) {
- //console.log(stacked.y()(d), !!Math.round(stacked.y()(d) * 100));
- return !!Math.round(stacked.y()(d) * 100);
- })
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(stacked.x()(e.point, e.pointIndex)),
- //y = yAxis.tickFormat()(stacked.y()(e.point, e.pointIndex)),
- y = yAxisTooltipFormat(stacked.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart); };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = stacked.xScale();
- y = stacked.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-stackedAreaChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-stackedAreaChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-stackedWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend
- .width( availableWidth - controlWidth );
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + controlWidth + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Stacked', disabled: stacked.offset() != 'zero' },
- { key: 'Stream', disabled: stacked.offset() != 'wiggle' },
- { key: 'Expanded', disabled: stacked.offset() != 'expand' }
- ];
-
- controls
- .width( controlWidth )
- .color(['#444', '#444', '#444']);
-
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .call(controls);
-
-
- if ( margin.top != Math.max(controls.height(), legend.height()) ) {
- margin.top = Math.max(controls.height(), legend.height());
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
-
- g.select('.nv-controlsWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- stacked
- .width(availableWidth)
- .height(availableHeight)
-
- var stackedWrap = g.select('.nv-stackedWrap')
- .datum(data);
- //d3.transition(stackedWrap).call(stacked);
- stackedWrap.call(stacked);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize( -availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + availableHeight + ')');
- //d3.transition(g.select('.nv-x.nv-axis'))
- g.select('.nv-x.nv-axis')
- .transition().duration(0)
- .call(xAxis);
-
- yAxis
- .scale(y)
- .ticks(stacked.offset() == 'wiggle' ? 0 : availableHeight / 36)
- .tickSize(-availableWidth, 0)
- .setTickFormat(stacked.offset() == 'expand' ? d3.format('%') : yAxisTickFormat);
-
- //d3.transition(g.select('.nv-y.nv-axis'))
- g.select('.nv-y.nv-axis')
- .transition().duration(0)
- .call(yAxis);
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- stacked.dispatch.on('areaClick.toggle', function(e) {
- if (data.filter(function(d) { return !d.disabled }).length === 1)
- data = data.map(function(d) {
- d.disabled = false;
- return d
- });
- else
- data = data.map(function(d,i) {
- d.disabled = (i != e.seriesIndex);
- return d
- });
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- //selection.transition().call(chart);
- chart.update();
- });
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- //selection.transition().call(chart);
- chart.update();
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- if (!d.disabled) return;
-
- controlsData = controlsData.map(function(s) {
- s.disabled = true;
- return s;
- });
- d.disabled = false;
-
- switch (d.key) {
- case 'Stacked':
- stacked.style('stack');
- break;
- case 'Stream':
- stacked.style('stream');
- break;
- case 'Expanded':
- stacked.style('expand');
- break;
- }
-
- state.style = stacked.style();
- dispatch.stateChange(state);
-
- //selection.transition().call(chart);
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- if (typeof e.style !== 'undefined') {
- stacked.style(e.style);
- }
-
- chart.update();
- });
-
- });
-
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- stacked.dispatch.on('tooltipShow', function(e) {
- //disable tooltips when value ~= 0
- //// TODO: consider removing points from voronoi that have 0 value instead of this hack
- /*
- if (!Math.round(stacked.y()(e.point) * 100)) { // 100 will not be good for very small numbers... will have to think about making this valu dynamic, based on data range
- setTimeout(function() { d3.selectAll('.point.hover').classed('hover', false) }, 0);
- return false;
- }
- */
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
-
- stacked.dispatch.on('tooltipHide', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.stacked = stacked;
- chart.legend = legend;
- chart.controls = controls;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, stacked, 'x', 'y', 'size', 'xScale', 'yScale', 'xDomain', 'yDomain', 'sizeDomain', 'interactive', 'offset', 'order', 'style', 'clipEdge', 'forceX', 'forceY', 'forceSize', 'interpolate');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return getWidth;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return getHeight;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- stacked.color(color);
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltip = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.yAxisTooltipFormat = function(_) {
- if (!arguments.length) return yAxisTooltipFormat;
- yAxisTooltipFormat = _;
- return chart;
- };
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- yAxis.setTickFormat = yAxis.tickFormat;
-
- yAxis.tickFormat = function(_) {
- if (!arguments.length) return yAxisTickFormat;
- yAxisTickFormat = _;
- return yAxis;
- };
-
- //============================================================
-
- return chart;
-}
-})(); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/nv.d3.min.js b/ecomp-portal-BE/war/static/fusion/d3/js/nv.d3.min.js
deleted file mode 100644
index 892379c4..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/nv.d3.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){function t(e,t){return(new Date(t,e+1,0)).getDate()}function n(e,t,n){return function(r,i,s){var o=e(r),u=[];if(o<r)t(o);if(s>1){while(o<i){var a=new Date(+o);if(n(a)%s===0)u.push(a);t(o)}}else{while(o<i){u.push(new Date(+o));t(o)}}return u}}var e=window.nv||{};e.version="1.1.13b";e.dev=true;window.nv=e;e.tooltip={};e.utils=e.utils||{};e.models={};e.charts={};e.graphs=[];e.logs={};e.dispatch=d3.dispatch("render_start","render_end");if(e.dev){e.dispatch.on("render_start",function(t){e.logs.startTime=+(new Date)});e.dispatch.on("render_end",function(t){e.logs.endTime=+(new Date);e.logs.totalTime=e.logs.endTime-e.logs.startTime;e.log("total",e.logs.totalTime)})}e.log=function(){if(e.dev&&console.log&&console.log.apply)console.log.apply(console,arguments);else if(e.dev&&typeof console.log=="function"&&Function.prototype.bind){var t=Function.prototype.bind.call(console.log,console);t.apply(console,arguments)}return arguments[arguments.length-1]};e.render=function(n){n=n||1;e.render.active=true;e.dispatch.render_start();setTimeout(function(){var t,r;for(var i=0;i<n&&(r=e.render.queue[i]);i++){t=r.generate();if(typeof r.callback==typeof Function)r.callback(t);e.graphs.push(t)}e.render.queue.splice(0,i);if(e.render.queue.length)setTimeout(arguments.callee,0);else{e.render.active=false;e.dispatch.render_end()}},0)};e.render.active=false;e.render.queue=[];e.addGraph=function(t){if(typeof arguments[0]===typeof Function)t={generate:arguments[0],callback:arguments[1]};e.render.queue.push(t);if(!e.render.active)e.render()};e.identity=function(e){return e};e.strip=function(e){return e.replace(/(\s|&)/g,"")};d3.time.monthEnd=function(e){return new Date(e.getFullYear(),e.getMonth(),0)};d3.time.monthEnds=n(d3.time.monthEnd,function(e){e.setUTCDate(e.getUTCDate()+1);e.setDate(t(e.getMonth()+1,e.getFullYear()))},function(e){return e.getMonth()});e.interactiveGuideline=function(){"use strict";function c(o){o.each(function(o){function g(){var e=d3.mouse(this);var n=e[0];var r=e[1];var o=true;var a=false;if(l){n=d3.event.offsetX;r=d3.event.offsetY;if(d3.event.target.tagName!=="svg")o=false;if(d3.event.target.className.baseVal.match("nv-legend"))a=true}if(o){n-=i.left;r-=i.top}if(n<0||r<0||n>p||r>d||d3.event.relatedTarget&&d3.event.relatedTarget.ownerSVGElement===undefined||a){if(l){if(d3.event.relatedTarget&&d3.event.relatedTarget.ownerSVGElement===undefined&&d3.event.relatedTarget.className.match(t.nvPointerEventsClass)){return}}u.elementMouseout({mouseX:n,mouseY:r});c.renderGuideLine(null);return}var f=s.invert(n);u.elementMousemove({mouseX:n,mouseY:r,pointXValue:f});if(d3.event.type==="dblclick"){u.elementDblclick({mouseX:n,mouseY:r,pointXValue:f})}}var h=d3.select(this);var p=n||960,d=r||400;var v=h.selectAll("g.nv-wrap.nv-interactiveLineLayer").data([o]);var m=v.enter().append("g").attr("class"," nv-wrap nv-interactiveLineLayer");m.append("g").attr("class","nv-interactiveGuideLine");if(!f){return}f.on("mousemove",g,true).on("mouseout",g,true).on("dblclick",g);c.renderGuideLine=function(t){if(!a)return;var n=v.select(".nv-interactiveGuideLine").selectAll("line").data(t!=null?[e.utils.NaNtoZero(t)]:[],String);n.enter().append("line").attr("class","nv-guideline").attr("x1",function(e){return e}).attr("x2",function(e){return e}).attr("y1",d).attr("y2",0);n.exit().remove()}})}var t=e.models.tooltip();var n=null,r=null,i={left:0,top:0},s=d3.scale.linear(),o=d3.scale.linear(),u=d3.dispatch("elementMousemove","elementMouseout","elementDblclick"),a=true,f=null;var l=navigator.userAgent.indexOf("MSIE")!==-1;c.dispatch=u;c.tooltip=t;c.margin=function(e){if(!arguments.length)return i;i.top=typeof e.top!="undefined"?e.top:i.top;i.left=typeof e.left!="undefined"?e.left:i.left;return c};c.width=function(e){if(!arguments.length)return n;n=e;return c};c.height=function(e){if(!arguments.length)return r;r=e;return c};c.xScale=function(e){if(!arguments.length)return s;s=e;return c};c.showGuideLine=function(e){if(!arguments.length)return a;a=e;return c};c.svgContainer=function(e){if(!arguments.length)return f;f=e;return c};return c};e.interactiveBisect=function(e,t,n){"use strict";if(!e instanceof Array)return null;if(typeof n!=="function")n=function(e,t){return e.x};var r=d3.bisector(n).left;var i=d3.max([0,r(e,t)-1]);var s=n(e[i],i);if(typeof s==="undefined")s=i;if(s===t)return i;var o=d3.min([i+1,e.length-1]);var u=n(e[o],o);if(typeof u==="undefined")u=o;if(Math.abs(u-t)>=Math.abs(s-t))return i;else return o};e.nearestValueIndex=function(e,t,n){"use strict";var r=Infinity,i=null;e.forEach(function(e,s){var o=Math.abs(t-e);if(o<=r&&o<n){r=o;i=s}});return i};(function(){"use strict";window.nv.tooltip={};window.nv.models.tooltip=function(){function y(){if(a){var e=d3.select(a);if(e.node().tagName!=="svg"){e=e.select("svg")}var t=e.node()?e.attr("viewBox"):null;if(t){t=t.split(" ");var n=parseInt(e.style("width"))/t[2];l.left=l.left*n;l.top=l.top*n}}}function b(e){var t;if(a)t=d3.select(a);else t=d3.select("body");var n=t.select(".nvtooltip");if(n.node()===null){n=t.append("div").attr("class","nvtooltip "+(u?u:"xy-tooltip")).attr("id",h)}n.node().innerHTML=e;n.style("top",0).style("left",0).style("opacity",0);n.selectAll("div, table, td, tr").classed(p,true);n.classed(p,true);return n.node()}function w(){if(!c)return;if(!g(n))return;y();var t=l.left;var u=o!=null?o:l.top;var h=b(m(n));f=h;if(a){var p=a.getElementsByTagName("svg")[0];var d=p?p.getBoundingClientRect():a.getBoundingClientRect();var v={left:0,top:0};if(p){var E=p.getBoundingClientRect();var S=a.getBoundingClientRect();var x=E.top;if(x<0){var T=a.getBoundingClientRect();x=Math.abs(x)>T.height?0:x}v.top=Math.abs(x-S.top);v.left=Math.abs(E.left-S.left)}t+=a.offsetLeft+v.left-2*a.scrollLeft;u+=a.offsetTop+v.top-2*a.scrollTop}if(s&&s>0){u=Math.floor(u/s)*s}e.tooltip.calcTooltipPosition([t,u],r,i,h);return w}var t=null,n=null,r="w",i=50,s=25,o=null,u=null,a=null,f=null,l={left:null,top:null},c=true,h="nvtooltip-"+Math.floor(Math.random()*1e5);var p="nv-pointer-events-none";var d=function(e,t){return e};var v=function(e){return e};var m=function(e){if(t!=null)return t;if(e==null)return"";var n=d3.select(document.createElement("table"));var r=n.selectAll("thead").data([e]).enter().append("thead");r.append("tr").append("td").attr("colspan",3).append("strong").classed("x-value",true).html(v(e.value));var i=n.selectAll("tbody").data([e]).enter().append("tbody");var s=i.selectAll("tr").data(function(e){return e.series}).enter().append("tr").classed("highlight",function(e){return e.highlight});s.append("td").classed("legend-color-guide",true).append("div").style("background-color",function(e){return e.color});s.append("td").classed("key",true).html(function(e){return e.key});s.append("td").classed("value",true).html(function(e,t){return d(e.value,t)});s.selectAll("td").each(function(e){if(e.highlight){var t=d3.scale.linear().domain([0,1]).range(["#fff",e.color]);var n=.6;d3.select(this).style("border-bottom-color",t(n)).style("border-top-color",t(n))}});var o=n.node().outerHTML;if(e.footer!==undefined)o+="<div class='footer'>"+e.footer+"</div>";return o};var g=function(e){if(e&&e.series&&e.series.length>0)return true;return false};w.nvPointerEventsClass=p;w.content=function(e){if(!arguments.length)return t;t=e;return w};w.tooltipElem=function(){return f};w.contentGenerator=function(e){if(!arguments.length)return m;if(typeof e==="function"){m=e}return w};w.data=function(e){if(!arguments.length)return n;n=e;return w};w.gravity=function(e){if(!arguments.length)return r;r=e;return w};w.distance=function(e){if(!arguments.length)return i;i=e;return w};w.snapDistance=function(e){if(!arguments.length)return s;s=e;return w};w.classes=function(e){if(!arguments.length)return u;u=e;return w};w.chartContainer=function(e){if(!arguments.length)return a;a=e;return w};w.position=function(e){if(!arguments.length)return l;l.left=typeof e.left!=="undefined"?e.left:l.left;l.top=typeof e.top!=="undefined"?e.top:l.top;return w};w.fixedTop=function(e){if(!arguments.length)return o;o=e;return w};w.enabled=function(e){if(!arguments.length)return c;c=e;return w};w.valueFormatter=function(e){if(!arguments.length)return d;if(typeof e==="function"){d=e}return w};w.headerFormatter=function(e){if(!arguments.length)return v;if(typeof e==="function"){v=e}return w};w.id=function(){return h};return w};e.tooltip.show=function(t,n,r,i,s,o){var u=document.createElement("div");u.className="nvtooltip "+(o?o:"xy-tooltip");var a=s;if(!s||s.tagName.match(/g|svg/i)){a=document.getElementsByTagName("body")[0]}u.style.left=0;u.style.top=0;u.style.opacity=0;u.innerHTML=n;a.appendChild(u);if(s){t[0]=t[0]-s.scrollLeft;t[1]=t[1]-s.scrollTop}e.tooltip.calcTooltipPosition(t,r,i,u)};e.tooltip.findFirstNonSVGParent=function(e){while(e.tagName.match(/^g|svg$/i)!==null){e=e.parentNode}return e};e.tooltip.findTotalOffsetTop=function(e,t){var n=t;do{if(!isNaN(e.offsetTop)){n+=e.offsetTop}}while(e=e.offsetParent);return n};e.tooltip.findTotalOffsetLeft=function(e,t){var n=t;do{if(!isNaN(e.offsetLeft)){n+=e.offsetLeft}}while(e=e.offsetParent);return n};e.tooltip.calcTooltipPosition=function(t,n,r,i){var s=parseInt(i.offsetHeight),o=parseInt(i.offsetWidth),u=e.utils.windowSize().width,a=e.utils.windowSize().height,f=window.pageYOffset,l=window.pageXOffset,c,h;a=window.innerWidth>=document.body.scrollWidth?a:a-16;u=window.innerHeight>=document.body.scrollHeight?u:u-16;n=n||"s";r=r||20;var p=function(t){return e.tooltip.findTotalOffsetTop(t,h)};var d=function(t){return e.tooltip.findTotalOffsetLeft(t,c)};switch(n){case"e":c=t[0]-o-r;h=t[1]-s/2;var v=d(i);var m=p(i);if(v<l)c=t[0]+r>l?t[0]+r:l-v+c;if(m<f)h=f-m+h;if(m+s>f+a)h=f+a-m+h-s;break;case"w":c=t[0]+r;h=t[1]-s/2;var v=d(i);var m=p(i);if(v+o>u)c=t[0]-o-r;if(m<f)h=f+5;if(m+s>f+a)h=f+a-m+h-s;break;case"n":c=t[0]-o/2-5;h=t[1]+r;var v=d(i);var m=p(i);if(v<l)c=l+5;if(v+o>u)c=c-o/2+5;if(m+s>f+a)h=f+a-m+h-s;break;case"s":c=t[0]-o/2;h=t[1]-s-r;var v=d(i);var m=p(i);if(v<l)c=l+5;if(v+o>u)c=c-o/2+5;if(f>m)h=f;break;case"none":c=t[0];h=t[1]-r;var v=d(i);var m=p(i);break}i.style.left=c+"px";i.style.top=h+"px";i.style.opacity=1;i.style.position="absolute";return i};e.tooltip.cleanup=function(){var e=document.getElementsByClassName("nvtooltip");var t=[];while(e.length){t.push(e[0]);e[0].style.transitionDelay="0 !important";e[0].style.opacity=0;e[0].className="nvtooltip-pending-removal"}setTimeout(function(){while(t.length){var e=t.pop();e.parentNode.removeChild(e)}},500)}})();e.utils.windowSize=function(){var e={width:640,height:480};if(document.body&&document.body.offsetWidth){e.width=document.body.offsetWidth;e.height=document.body.offsetHeight}if(document.compatMode=="CSS1Compat"&&document.documentElement&&document.documentElement.offsetWidth){e.width=document.documentElement.offsetWidth;e.height=document.documentElement.offsetHeight}if(window.innerWidth&&window.innerHeight){e.width=window.innerWidth;e.height=window.innerHeight}return e};e.utils.windowResize=function(e){if(e===undefined)return;var t=window.onresize;window.onresize=function(n){if(typeof t=="function")t(n);e(n)}};e.utils.getColor=function(t){if(!arguments.length)return e.utils.defaultColor();if(Object.prototype.toString.call(t)==="[object Array]")return function(e,n){return e.color||t[n%t.length]};else return t};e.utils.defaultColor=function(){var e=d3.scale.category20().range();return function(t,n){return t.color||e[n%e.length]}};e.utils.customTheme=function(e,t,n){t=t||function(e){return e.key};n=n||d3.scale.category20().range();var r=n.length;return function(i,s){var o=t(i);if(!r)r=n.length;if(typeof e[o]!=="undefined")return typeof e[o]==="function"?e[o]():e[o];else return n[--r]}};e.utils.pjax=function(t,n){function r(r){d3.html(r,function(r){var i=d3.select(n).node();i.parentNode.replaceChild(d3.select(r).select(n).node(),i);e.utils.pjax(t,n)})}d3.selectAll(t).on("click",function(){history.pushState(this.href,this.textContent,this.href);r(this.href);d3.event.preventDefault()});d3.select(window).on("popstate",function(){if(d3.event.state)r(d3.event.state)})};e.utils.calcApproxTextWidth=function(e){if(e instanceof d3.selection){var t=parseInt(e.style("font-size").replace("px",""));var n=e.text().length;return n*t*.5}return 0};e.utils.NaNtoZero=function(e){if(typeof e!=="number"||isNaN(e)||e===null||e===Infinity)return 0;return e};e.utils.optionsFunc=function(e){if(e){d3.map(e).forEach(function(e,t){if(typeof this[e]==="function"){this[e](t)}}.bind(this))}return this};e.models.axis=function(){"use strict";function g(e){e.each(function(e){var i=d3.select(this);var g=i.selectAll("g.nv-wrap.nv-axis").data([e]);var y=g.enter().append("g").attr("class","nvd3 nv-wrap nv-axis");var b=y.append("g");var w=g.select("g");if(p!==null)t.ticks(p);else if(t.orient()=="top"||t.orient()=="bottom")t.ticks(Math.abs(s.range()[1]-s.range()[0])/100);w.transition().call(t);m=m||t.scale();var E=t.tickFormat();if(E==null){E=m.tickFormat()}var S=w.selectAll("text.nv-axislabel").data([o||null]);S.exit().remove();switch(t.orient()){case"top":S.enter().append("text").attr("class","nv-axislabel");var x=s.range().length==2?s.range()[1]:s.range()[s.range().length-1]+(s.range()[1]-s.range()[0]);S.attr("text-anchor","middle").attr("y",0).attr("x",x/2);if(u){var T=g.selectAll("g.nv-axisMaxMin").data(s.domain());T.enter().append("g").attr("class","nv-axisMaxMin").append("text");T.exit().remove();T.attr("transform",function(e,t){return"translate("+s(e)+",0)"}).select("text").attr("dy","0em").attr("y",-t.tickPadding()).attr("text-anchor","middle").text(function(e,t){var n=e;if(d){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate("+s.range()[t]+",0)"})}break;case"bottom":var N=36;var C=30;var k=w.selectAll("g").select("text");if(f%360){k.each(function(e,t){var n=this.getBBox().width;if(n>C)C=n});var L=Math.abs(Math.sin(f*Math.PI/180));var N=(L?L*C:C)+30;k.attr("transform",function(e,t,n){return"rotate("+f+" 0,0)"}).style("text-anchor",f%360>0?"start":"end")}S.enter().append("text").attr("class","nv-axislabel");var x=s.range().length==2?s.range()[1]:s.range()[s.range().length-1]+(s.range()[1]-s.range()[0]);S.attr("text-anchor","middle").attr("y",N).attr("x",x/2);if(u){var T=g.selectAll("g.nv-axisMaxMin").data([s.domain()[0],s.domain()[s.domain().length-1]]);T.enter().append("g").attr("class","nv-axisMaxMin").append("text");T.exit().remove();T.attr("transform",function(e,t){return"translate("+(s(e)+(h?s.rangeBand()/2:0))+",0)"}).select("text").attr("dy",".71em").attr("y",t.tickPadding()).attr("transform",function(e,t,n){return"rotate("+f+" 0,0)"}).style("text-anchor",f?f%360>0?"start":"end":"middle").text(function(e,t){var n=e;if(d){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate("+(s(e)+(h?s.rangeBand()/2:0))+",0)"})}if(c)k.attr("transform",function(e,t){return"translate(0,"+(t%2==0?"0":"12")+")"});break;case"right":S.enter().append("text").attr("class","nv-axislabel");S.style("text-anchor",l?"middle":"begin").attr("transform",l?"rotate(90)":"").attr("y",l?-Math.max(n.right,r)+12:-10).attr("x",l?s.range()[0]/2:t.tickPadding());if(u){var T=g.selectAll("g.nv-axisMaxMin").data(s.domain());T.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0);T.exit().remove();T.attr("transform",function(e,t){return"translate(0,"+s(e)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",t.tickPadding()).style("text-anchor","start").text(function(e,t){var n=e;if(d){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate(0,"+s.range()[t]+")"}).select("text").style("opacity",1)}break;case"left":S.enter().append("text").attr("class","nv-axislabel");S.style("text-anchor",l?"middle":"end").attr("transform",l?"rotate(-90)":"").attr("y",l?-Math.max(n.left,r)+v:-10).attr("x",l?-s.range()[0]/2:-t.tickPadding());if(u){var T=g.selectAll("g.nv-axisMaxMin").data(s.domain());T.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0);T.exit().remove();T.attr("transform",function(e,t){return"translate(0,"+m(e)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",-t.tickPadding()).attr("text-anchor","end").text(function(e,t){var n=e;if(d){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate(0,"+s.range()[t]+")"}).select("text").style("opacity",1)}break}S.text(function(e){return e});if(u&&(t.orient()==="left"||t.orient()==="right")){w.selectAll("g").each(function(e,t){d3.select(this).select("text").attr("opacity",1);var n;if(d){n=Math.pow(10,e);n=E(n)}else{n=E(e)}d3.select(this).select("text").text(n);if(s(e)<s.range()[1]+10||s(e)>s.range()[0]-10){if(e>1e-10||e<-1e-10)d3.select(this).attr("opacity",0);d3.select(this).select("text").attr("opacity",0)}});if(s.domain()[0]==s.domain()[1]&&s.domain()[0]==0)g.selectAll("g.nv-axisMaxMin").style("opacity",function(e,t){return!t?1:0})}if(u&&(t.orient()==="top"||t.orient()==="bottom")){var A=[];g.selectAll("g.nv-axisMaxMin").each(function(e,t){try{if(t)A.push(s(e)-this.getBBox().width-4);else A.push(s(e)+this.getBBox().width+4)}catch(n){if(t)A.push(s(e)-4);else A.push(s(e)+4)}});w.selectAll("g").each(function(e,t){var n;if(d){n=Math.pow(10,e);n=E(n)}else{n=E(e)}d3.select(this).select("text").text(n);if(s(e)<A[0]||s(e)>A[1]){if(e>1e-10||e<-1e-10)d3.select(this).remove();else d3.select(this).select("text").remove()}})}if(a)w.selectAll(".tick").filter(function(e){return!parseFloat(Math.round(e.__data__*1e5)/1e6)&&e.__data__!==undefined}).classed("zero",true);m=s.copy()});return g}var t=d3.svg.axis();var n={top:0,right:0,bottom:0,left:0},r=75,i=60,s=d3.scale.linear(),o=null,u=true,a=true,f=0,l=true,c=false,h=false,p=null,d=false,v=12;t.scale(s).orient("bottom").tickFormat(function(e){return e});var m;g.axis=t;d3.rebind(g,t,"orient","tickValues","tickSubdivide","tickSize","tickPadding","tickFormat");d3.rebind(g,s,"domain","range","rangeBand","rangeBands");g.options=e.utils.optionsFunc.bind(g);g.margin=function(e){if(!arguments.length)return n;n.top=typeof e.top!="undefined"?e.top:n.top;n.right=typeof e.right!="undefined"?e.right:n.right;n.bottom=typeof e.bottom!="undefined"?e.bottom:n.bottom;n.left=typeof e.left!="undefined"?e.left:n.left;return g};g.width=function(e){if(!arguments.length)return r;r=e;return g};g.ticks=function(e){if(!arguments.length)return p;p=e;return g};g.height=function(e){if(!arguments.length)return i;i=e;return g};g.axisLabel=function(e){if(!arguments.length)return o;o=e;return g};g.showMaxMin=function(e){if(!arguments.length)return u;u=e;return g};g.logScale=function(e){if(!arguments.length)return d;d=e;return g};g.highlightZero=function(e){if(!arguments.length)return a;a=e;return g};g.scale=function(e){if(!arguments.length)return s;s=e;t.scale(s);h=typeof s.rangeBands==="function";d3.rebind(g,s,"domain","range","rangeBand","rangeBands");return g};g.rotateYLabel=function(e){if(!arguments.length)return l;l=e;return g};g.rotateLabels=function(e){if(!arguments.length)return f;f=e;return g};g.staggerLabels=function(e){if(!arguments.length)return c;c=e;return g};g.axisLabelDistance=function(e){if(!arguments.length)return v;v=e;return g};return g};e.models.bullet=function(){"use strict";function m(e){e.each(function(e,n){var p=c-t.left-t.right,m=h-t.top-t.bottom,g=d3.select(this);var y=i.call(this,e,n).slice().sort(d3.descending),b=s.call(this,e,n).slice().sort(d3.descending),w=o.call(this,e,n).slice().sort(d3.descending),E=u.call(this,e,n).slice(),S=a.call(this,e,n).slice(),x=f.call(this,e,n).slice();var T=d3.scale.linear().domain(d3.extent(d3.merge([l,y]))).range(r?[p,0]:[0,p]);var N=this.__chart__||d3.scale.linear().domain([0,Infinity]).range(T.range());this.__chart__=T;var C=d3.min(y),k=d3.max(y),L=y[1];var A=g.selectAll("g.nv-wrap.nv-bullet").data([e]);var O=A.enter().append("g").attr("class","nvd3 nv-wrap nv-bullet");var M=O.append("g");var _=A.select("g");M.append("rect").attr("class","nv-range nv-rangeMax");M.append("rect").attr("class","nv-range nv-rangeAvg");M.append("rect").attr("class","nv-range nv-rangeMin");M.append("rect").attr("class","nv-measure");M.append("path").attr("class","nv-markerTriangle");A.attr("transform","translate("+t.left+","+t.top+")");var D=function(e){return Math.abs(N(e)-N(0))},P=function(e){return Math.abs(T(e)-T(0))};var H=function(e){return e<0?N(e):N(0)},B=function(e){return e<0?T(e):T(0)};_.select("rect.nv-rangeMax").attr("height",m).attr("width",P(k>0?k:C)).attr("x",B(k>0?k:C)).datum(k>0?k:C);_.select("rect.nv-rangeAvg").attr("height",m).attr("width",P(L)).attr("x",B(L)).datum(L);_.select("rect.nv-rangeMin").attr("height",m).attr("width",P(k)).attr("x",B(k)).attr("width",P(k>0?C:k)).attr("x",B(k>0?C:k)).datum(k>0?C:k);_.select("rect.nv-measure").style("fill",d).attr("height",m/3).attr("y",m/3).attr("width",w<0?T(0)-T(w[0]):T(w[0])-T(0)).attr("x",B(w)).on("mouseover",function(){v.elementMouseover({value:w[0],label:x[0]||"Current",pos:[T(w[0]),m/2]})}).on("mouseout",function(){v.elementMouseout({value:w[0],label:x[0]||"Current"})});var j=m/6;if(b[0]){_.selectAll("path.nv-markerTriangle").attr("transform",function(e){return"translate("+T(b[0])+","+m/2+")"}).attr("d","M0,"+j+"L"+j+","+ -j+" "+ -j+","+ -j+"Z").on("mouseover",function(){v.elementMouseover({value:b[0],label:S[0]||"Previous",pos:[T(b[0]),m/2]})}).on("mouseout",function(){v.elementMouseout({value:b[0],label:S[0]||"Previous"})})}else{_.selectAll("path.nv-markerTriangle").remove()}A.selectAll(".nv-range").on("mouseover",function(e,t){var n=E[t]||(!t?"Maximum":t==1?"Mean":"Minimum");v.elementMouseover({value:e,label:n,pos:[T(e),m/2]})}).on("mouseout",function(e,t){var n=E[t]||(!t?"Maximum":t==1?"Mean":"Minimum");v.elementMouseout({value:e,label:n})})});return m}var t={top:0,right:0,bottom:0,left:0},n="left",r=false,i=function(e){return e.ranges},s=function(e){return e.markers},o=function(e){return e.measures},u=function(e){return e.rangeLabels?e.rangeLabels:[]},a=function(e){return e.markerLabels?e.markerLabels:[]},f=function(e){return e.measureLabels?e.measureLabels:[]},l=[0],c=380,h=30,p=null,d=e.utils.getColor(["#1f77b4"]),v=d3.dispatch("elementMouseover","elementMouseout");m.dispatch=v;m.options=e.utils.optionsFunc.bind(m);m.orient=function(e){if(!arguments.length)return n;n=e;r=n=="right"||n=="bottom";return m};m.ranges=function(e){if(!arguments.length)return i;i=e;return m};m.markers=function(e){if(!arguments.length)return s;s=e;return m};m.measures=function(e){if(!arguments.length)return o;o=e;return m};m.forceX=function(e){if(!arguments.length)return l;l=e;return m};m.width=function(e){if(!arguments.length)return c;c=e;return m};m.height=function(e){if(!arguments.length)return h;h=e;return m};m.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return m};m.tickFormat=function(e){if(!arguments.length)return p;p=e;return m};m.color=function(t){if(!arguments.length)return d;d=e.utils.getColor(t);return m};return m};e.models.bulletChart=function(){"use strict";function m(e){e.each(function(n,h){var g=d3.select(this);var y=(a||parseInt(g.style("width"))||960)-i.left-i.right,b=f-i.top-i.bottom,w=this;m.update=function(){m(e)};m.container=this;if(!n||!s.call(this,n,h)){var E=g.selectAll(".nv-noData").data([p]);E.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");E.attr("x",i.left+y/2).attr("y",18+i.top+b/2).text(function(e){return e});return m}else{g.selectAll(".nv-noData").remove()}var S=s.call(this,n,h).slice().sort(d3.descending),x=o.call(this,n,h).slice().sort(d3.descending),T=u.call(this,n,h).slice().sort(d3.descending);var N=g.selectAll("g.nv-wrap.nv-bulletChart").data([n]);var C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-bulletChart");var k=C.append("g");var L=N.select("g");k.append("g").attr("class","nv-bulletWrap");k.append("g").attr("class","nv-titles");N.attr("transform","translate("+i.left+","+i.top+")");var A=d3.scale.linear().domain([0,Math.max(S[0],x[0],T[0])]).range(r?[y,0]:[0,y]);var O=this.__chart__||d3.scale.linear().domain([0,Infinity]).range(A.range());this.__chart__=A;var M=function(e){return Math.abs(O(e)-O(0))},_=function(e){return Math.abs(A(e)-A(0))};var D=k.select(".nv-titles").append("g").attr("text-anchor","end").attr("transform","translate(-6,"+(f-i.top-i.bottom)/2+")");D.append("text").attr("class","nv-title").text(function(e){return e.title});D.append("text").attr("class","nv-subtitle").attr("dy","1em").text(function(e){return e.subtitle});t.width(y).height(b);var P=L.select(".nv-bulletWrap");d3.transition(P).call(t);var H=l||A.tickFormat(y/100);var B=L.selectAll("g.nv-tick").data(A.ticks(y/50),function(e){return this.textContent||H(e)});var j=B.enter().append("g").attr("class","nv-tick").attr("transform",function(e){return"translate("+O(e)+",0)"}).style("opacity",1e-6);j.append("line").attr("y1",b).attr("y2",b*7/6);j.append("text").attr("text-anchor","middle").attr("dy","1em").attr("y",b*7/6).text(H);var F=d3.transition(B).attr("transform",function(e){return"translate("+A(e)+",0)"}).style("opacity",1);F.select("line").attr("y1",b).attr("y2",b*7/6);F.select("text").attr("y",b*7/6);d3.transition(B.exit()).attr("transform",function(e){return"translate("+A(e)+",0)"}).style("opacity",1e-6).remove();d.on("tooltipShow",function(e){e.key=n.title;if(c)v(e,w.parentNode)})});d3.timer.flush();return m}var t=e.models.bullet();var n="left",r=false,i={top:5,right:40,bottom:20,left:120},s=function(e){return e.ranges},o=function(e){return e.markers},u=function(e){return e.measures},a=null,f=55,l=null,c=true,h=function(e,t,n,r,i){return"<h3>"+t+"</h3>"+"<p>"+n+"</p>"},p="No Data Available.",d=d3.dispatch("tooltipShow","tooltipHide");var v=function(t,n){var r=t.pos[0]+(n.offsetLeft||0)+i.left,s=t.pos[1]+(n.offsetTop||0)+i.top,o=h(t.key,t.label,t.value,t,m);e.tooltip.show([r,s],o,t.value<0?"e":"w",null,n)};t.dispatch.on("elementMouseover.tooltip",function(e){d.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){d.tooltipHide(e)});d.on("tooltipHide",function(){if(c)e.tooltip.cleanup()});m.dispatch=d;m.bullet=t;d3.rebind(m,t,"color");m.options=e.utils.optionsFunc.bind(m);m.orient=function(e){if(!arguments.length)return n;n=e;r=n=="right"||n=="bottom";return m};m.ranges=function(e){if(!arguments.length)return s;s=e;return m};m.markers=function(e){if(!arguments.length)return o;o=e;return m};m.measures=function(e){if(!arguments.length)return u;u=e;return m};m.width=function(e){if(!arguments.length)return a;a=e;return m};m.height=function(e){if(!arguments.length)return f;f=e;return m};m.margin=function(e){if(!arguments.length)return i;i.top=typeof e.top!="undefined"?e.top:i.top;i.right=typeof e.right!="undefined"?e.right:i.right;i.bottom=typeof e.bottom!="undefined"?e.bottom:i.bottom;i.left=typeof e.left!="undefined"?e.left:i.left;return m};m.tickFormat=function(e){if(!arguments.length)return l;l=e;return m};m.tooltips=function(e){if(!arguments.length)return c;c=e;return m};m.tooltipContent=function(e){if(!arguments.length)return h;h=e;return m};m.noData=function(e){if(!arguments.length)return p;p=e;return m};return m};e.models.cumulativeLineChart=function(){"use strict";function _(b){b.each(function(b){function q(e,t){d3.select(_.container).style("cursor","ew-resize")}function R(e,t){O.x=d3.event.x;O.i=Math.round(A.invert(O.x));rt()}function U(e,t){d3.select(_.container).style("cursor","auto");x.index=O.i;k.stateChange(x)}function rt(){nt.data([O]);var e=_.transitionDuration();_.transitionDuration(0);_.update();_.transitionDuration(e)}var P=d3.select(this).classed("nv-chart-"+S,true),H=this;var B=(f||parseInt(P.style("width"))||960)-u.left-u.right,j=(l||parseInt(P.style("height"))||400)-u.top-u.bottom;_.update=function(){P.transition().duration(L).call(_)};_.container=this;x.disabled=b.map(function(e){return!!e.disabled});if(!T){var F;T={};for(F in x){if(x[F]instanceof Array)T[F]=x[F].slice(0);else T[F]=x[F]}}var I=d3.behavior.drag().on("dragstart",q).on("drag",R).on("dragend",U);if(!b||!b.length||!b.filter(function(e){return e.values.length}).length){var z=P.selectAll(".nv-noData").data([N]);z.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");z.attr("x",u.left+B/2).attr("y",u.top+j/2).text(function(e){return e});return _}else{P.selectAll(".nv-noData").remove()}w=t.xScale();E=t.yScale();if(!y){var W=b.filter(function(e){return!e.disabled}).map(function(e,n){var r=d3.extent(e.values,t.y());if(r[0]<-.95)r[0]=-.95;return[(r[0]-r[1])/(1+r[1]),(r[1]-r[0])/(1+r[0])]});var X=[d3.min(W,function(e){return e[0]}),d3.max(W,function(e){return e[1]})];t.yDomain(X)}else{t.yDomain(null)}A.domain([0,b[0].values.length-1]).range([0,B]).clamp(true);var b=D(O.i,b);var V=g?"none":"all";var $=P.selectAll("g.nv-wrap.nv-cumulativeLine").data([b]);var J=$.enter().append("g").attr("class","nvd3 nv-wrap nv-cumulativeLine").append("g");var K=$.select("g");J.append("g").attr("class","nv-interactive");J.append("g").attr("class","nv-x nv-axis").style("pointer-events","none");J.append("g").attr("class","nv-y nv-axis");J.append("g").attr("class","nv-background");J.append("g").attr("class","nv-linesWrap").style("pointer-events",V);J.append("g").attr("class","nv-avgLinesWrap").style("pointer-events","none");J.append("g").attr("class","nv-legendWrap");J.append("g").attr("class","nv-controlsWrap");if(c){i.width(B);K.select(".nv-legendWrap").datum(b).call(i);if(u.top!=i.height()){u.top=i.height();j=(l||parseInt(P.style("height"))||400)-u.top-u.bottom}K.select(".nv-legendWrap").attr("transform","translate(0,"+ -u.top+")")}if(m){var Q=[{key:"Re-scale y-axis",disabled:!y}];s.width(140).color(["#444","#444","#444"]);K.select(".nv-controlsWrap").datum(Q).attr("transform","translate(0,"+ -u.top+")").call(s)}$.attr("transform","translate("+u.left+","+u.top+")");if(d){K.select(".nv-y.nv-axis").attr("transform","translate("+B+",0)")}var G=b.filter(function(e){return e.tempDisabled});$.select(".tempDisabled").remove();if(G.length){$.append("text").attr("class","tempDisabled").attr("x",B/2).attr("y","-.71em").style("text-anchor","end").text(G.map(function(e){return e.key}).join(", ")+" values cannot be calculated for this time period.")}if(g){o.width(B).height(j).margin({left:u.left,top:u.top}).svgContainer(P).xScale(w);$.select(".nv-interactive").call(o)}J.select(".nv-background").append("rect");K.select(".nv-background rect").attr("width",B).attr("height",j);t.y(function(e){return e.display.y}).width(B).height(j).color(b.map(function(e,t){return e.color||a(e,t)}).filter(function(e,t){return!b[t].disabled&&!b[t].tempDisabled}));var Y=K.select(".nv-linesWrap").datum(b.filter(function(e){return!e.disabled&&!e.tempDisabled}));Y.call(t);b.forEach(function(e,t){e.seriesIndex=t});var Z=b.filter(function(e){return!e.disabled&&!!C(e)});var et=K.select(".nv-avgLinesWrap").selectAll("line").data(Z,function(e){return e.key});var tt=function(e){var t=E(C(e));if(t<0)return 0;if(t>j)return j;return t};et.enter().append("line").style("stroke-width",2).style("stroke-dasharray","10,10").style("stroke",function(e,n){return t.color()(e,e.seriesIndex)}).attr("x1",0).attr("x2",B).attr("y1",tt).attr("y2",tt);et.style("stroke-opacity",function(e){var t=E(C(e));if(t<0||t>j)return 0;return 1}).attr("x1",0).attr("x2",B).attr("y1",tt).attr("y2",tt);et.exit().remove();var nt=Y.selectAll(".nv-indexLine").data([O]);nt.enter().append("rect").attr("class","nv-indexLine").attr("width",3).attr("x",-2).attr("fill","red").attr("fill-opacity",.5).style("pointer-events","all").call(I);nt.attr("transform",function(e){return"translate("+A(e.i)+",0)"}).attr("height",j);if(h){n.scale(w).ticks(Math.min(b[0].values.length,B/70)).tickSize(-j,0);K.select(".nv-x.nv-axis").attr("transform","translate(0,"+E.range()[0]+")");d3.transition(K.select(".nv-x.nv-axis")).call(n)}if(p){r.scale(E).ticks(j/36).tickSize(-B,0);d3.transition(K.select(".nv-y.nv-axis")).call(r)}K.select(".nv-background rect").on("click",function(){O.x=d3.mouse(this)[0];O.i=Math.round(A.invert(O.x));x.index=O.i;k.stateChange(x);rt()});t.dispatch.on("elementClick",function(e){O.i=e.pointIndex;O.x=A(O.i);x.index=O.i;k.stateChange(x);rt()});s.dispatch.on("legendClick",function(e,t){e.disabled=!e.disabled;y=!e.disabled;x.rescaleY=y;k.stateChange(x);_.update()});i.dispatch.on("stateChange",function(e){x.disabled=e.disabled;k.stateChange(x);_.update()});o.dispatch.on("elementMousemove",function(i){t.clearHighlights();var s,f,l,c=[];b.filter(function(e,t){e.seriesIndex=t;return!e.disabled}).forEach(function(n,r){f=e.interactiveBisect(n.values,i.pointXValue,_.x());t.highlightPoint(r,f,true);var o=n.values[f];if(typeof o==="undefined")return;if(typeof s==="undefined")s=o;if(typeof l==="undefined")l=_.xScale()(_.x()(o,f));c.push({key:n.key,value:_.y()(o,f),color:a(n,n.seriesIndex)})});if(c.length>2){var h=_.yScale().invert(i.mouseY);var p=Math.abs(_.yScale().domain()[0]-_.yScale().domain()[1]);var d=.03*p;var m=e.nearestValueIndex(c.map(function(e){return e.value}),h,d);if(m!==null)c[m].highlight=true}var g=n.tickFormat()(_.x()(s,f),f);o.tooltip.position({left:l+u.left,top:i.mouseY+u.top}).chartContainer(H.parentNode).enabled(v).valueFormatter(function(e,t){return r.tickFormat()(e)}).data({value:g,series:c})();o.renderGuideLine(l)});o.dispatch.on("elementMouseout",function(e){k.tooltipHide();t.clearHighlights()});k.on("tooltipShow",function(e){if(v)M(e,H.parentNode)});k.on("changeState",function(e){if(typeof e.disabled!=="undefined"){b.forEach(function(t,n){t.disabled=e.disabled[n]});x.disabled=e.disabled}if(typeof e.index!=="undefined"){O.i=e.index;O.x=A(O.i);x.index=e.index;nt.data([O])}if(typeof e.rescaleY!=="undefined"){y=e.rescaleY}_.update()})});return _}function D(e,n){return n.map(function(n,r){if(!n.values){return n}var i=t.y()(n.values[e],e);if(i<-.95){n.tempDisabled=true;return n}n.tempDisabled=false;n.values=n.values.map(function(e,n){e.display={y:(t.y()(e,n)-i)/(1+i)};return e});return n})}var t=e.models.line(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend(),o=e.interactiveGuideline();var u={top:30,right:30,bottom:50,left:60},a=e.utils.defaultColor(),f=null,l=null,c=true,h=true,p=true,d=false,v=true,m=true,g=false,y=true,b=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},w,E,S=t.id(),x={index:0,rescaleY:y},T=null,N="No Data Available.",C=function(e){return e.average},k=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),L=250;n.orient("bottom").tickPadding(7);r.orient(d?"right":"left");s.updateState(false);var A=d3.scale.linear(),O={i:0,x:0};var M=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=b(i.series.key,a,f,i,_);e.tooltip.show([o,u],l,null,null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+u.left,e.pos[1]+u.top];k.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){k.tooltipHide(e)});k.on("tooltipHide",function(){if(v)e.tooltip.cleanup()});_.dispatch=k;_.lines=t;_.legend=i;_.xAxis=n;_.yAxis=r;_.interactiveLayer=o;d3.rebind(_,t,"defined","isArea","x","y","xScale","yScale","size","xDomain","yDomain","xRange","yRange","forceX","forceY","interactive","clipEdge","clipVoronoi","useVoronoi","id");_.options=e.utils.optionsFunc.bind(_);_.margin=function(e){if(!arguments.length)return u;u.top=typeof e.top!="undefined"?e.top:u.top;u.right=typeof e.right!="undefined"?e.right:u.right;u.bottom=typeof e.bottom!="undefined"?e.bottom:u.bottom;u.left=typeof e.left!="undefined"?e.left:u.left;return _};_.width=function(e){if(!arguments.length)return f;f=e;return _};_.height=function(e){if(!arguments.length)return l;l=e;return _};_.color=function(t){if(!arguments.length)return a;a=e.utils.getColor(t);i.color(a);return _};_.rescaleY=function(e){if(!arguments.length)return y;y=e;return _};_.showControls=function(e){if(!arguments.length)return m;m=e;return _};_.useInteractiveGuideline=function(e){if(!arguments.length)return g;g=e;if(e===true){_.interactive(false);_.useVoronoi(false)}return _};_.showLegend=function(e){if(!arguments.length)return c;c=e;return _};_.showXAxis=function(e){if(!arguments.length)return h;h=e;return _};_.showYAxis=function(e){if(!arguments.length)return p;p=e;return _};_.rightAlignYAxis=function(e){if(!arguments.length)return d;d=e;r.orient(e?"right":"left");return _};_.tooltips=function(e){if(!arguments.length)return v;v=e;return _};_.tooltipContent=function(e){if(!arguments.length)return b;b=e;return _};_.state=function(e){if(!arguments.length)return x;x=e;return _};_.defaultState=function(e){if(!arguments.length)return T;T=e;return _};_.noData=function(e){if(!arguments.length)return N;N=e;return _};_.average=function(e){if(!arguments.length)return C;C=e;return _};_.transitionDuration=function(e){if(!arguments.length)return L;L=e;return _};return _};e.models.discreteBar=function(){"use strict";function E(e){e.each(function(e){var i=n-t.left-t.right,E=r-t.top-t.bottom,S=d3.select(this);e=e.map(function(e,t){e.values=e.values.map(function(e){e.series=t;return e});return e});var T=p&&d?[]:e.map(function(e){return e.values.map(function(e,t){return{x:u(e,t),y:a(e,t),y0:e.y0}})});s.domain(p||d3.merge(T).map(function(e){return e.x})).rangeBands(v||[0,i],.1);o.domain(d||d3.extent(d3.merge(T).map(function(e){return e.y}).concat(f)));if(c)o.range(m||[E-(o.domain()[0]<0?12:0),o.domain()[1]>0?12:0]);else o.range(m||[E,0]);b=b||s;w=w||o.copy().range([o(0),o(0)]);var N=S.selectAll("g.nv-wrap.nv-discretebar").data([e]);var C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-discretebar");var k=C.append("g");var L=N.select("g");k.append("g").attr("class","nv-groups");N.attr("transform","translate("+t.left+","+t.top+")");var A=N.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e){return e.key});A.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);A.exit().transition().style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove();A.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover});A.transition().style("stroke-opacity",1).style("fill-opacity",.75);var O=A.selectAll("g.nv-bar").data(function(e){return e.values});O.exit().remove();var M=O.enter().append("g").attr("transform",function(e,t,n){return"translate("+(s(u(e,t))+s.rangeBand()*.05)+", "+o(0)+")"}).on("mouseover",function(t,n){d3.select(this).classed("hover",true);g.elementMouseover({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(t.series+.5)/e.length,o(a(t,n))],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("mouseout",function(t,n){d3.select(this).classed("hover",false);g.elementMouseout({value:a(t,n),point:t,series:e[t.series],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("click",function(t,n){g.elementClick({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(t.series+.5)/e.length,o(a(t,n))],pointIndex:n,seriesIndex:t.series,e:d3.event});d3.event.stopPropagation()}).on("dblclick",function(t,n){g.elementDblClick({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(t.series+.5)/e.length,o(a(t,n))],pointIndex:n,seriesIndex:t.series,e:d3.event});d3.event.stopPropagation()});M.append("rect").attr("height",0).attr("width",s.rangeBand()*.9/e.length);if(c){M.append("text").attr("text-anchor","middle");O.select("text").text(function(e,t){return h(a(e,t))}).transition().attr("x",s.rangeBand()*.9/2).attr("y",function(e,t){return a(e,t)<0?o(a(e,t))-o(0)+12:-4})}else{O.selectAll("text").remove()}O.attr("class",function(e,t){return a(e,t)<0?"nv-bar negative":"nv-bar positive"}).style("fill",function(e,t){return e.color||l(e,t)}).style("stroke",function(e,t){return e.color||l(e,t)}).select("rect").attr("class",y).transition().attr("width",s.rangeBand()*.9/e.length);O.transition().attr("transform",function(e,t){var n=s(u(e,t))+s.rangeBand()*.05,r=a(e,t)<0?o(0):o(0)-o(a(e,t))<1?o(0)-1:o(a(e,t));return"translate("+n+", "+r+")"}).select("rect").attr("height",function(e,t){return Math.max(Math.abs(o(a(e,t))-o(d&&d[0]||0))||1)});b=s.copy();w=o.copy()});return E}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=Math.floor(Math.random()*1e4),s=d3.scale.ordinal(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=[0],l=e.utils.defaultColor(),c=false,h=d3.format(",.2f"),p,d,v,m,g=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout"),y="discreteBar";var b,w;E.dispatch=g;E.options=e.utils.optionsFunc.bind(E);E.x=function(e){if(!arguments.length)return u;u=e;return E};E.y=function(e){if(!arguments.length)return a;a=e;return E};E.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return E};E.width=function(e){if(!arguments.length)return n;n=e;return E};E.height=function(e){if(!arguments.length)return r;r=e;return E};E.xScale=function(e){if(!arguments.length)return s;s=e;return E};E.yScale=function(e){if(!arguments.length)return o;o=e;return E};E.xDomain=function(e){if(!arguments.length)return p;p=e;return E};E.yDomain=function(e){if(!arguments.length)return d;d=e;return E};E.xRange=function(e){if(!arguments.length)return v;v=e;return E};E.yRange=function(e){if(!arguments.length)return m;m=e;return E};E.forceY=function(e){if(!arguments.length)return f;f=e;return E};E.color=function(t){if(!arguments.length)return l;l=e.utils.getColor(t);return E};E.id=function(e){if(!arguments.length)return i;i=e;return E};E.showValues=function(e){if(!arguments.length)return c;c=e;return E};E.valueFormat=function(e){if(!arguments.length)return h;h=e;return E};E.rectClass=function(e){if(!arguments.length)return y;y=e;return E};return E};e.models.discreteBarChart=function(){"use strict";function w(e){e.each(function(e){var u=d3.select(this),p=this;var E=(s||parseInt(u.style("width"))||960)-i.left-i.right,S=(o||parseInt(u.style("height"))||400)-i.top-i.bottom;w.update=function(){g.beforeUpdate();u.transition().duration(y).call(w)};w.container=this;if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var T=u.selectAll(".nv-noData").data([m]);T.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");T.attr("x",i.left+E/2).attr("y",i.top+S/2).text(function(e){return e});return w}else{u.selectAll(".nv-noData").remove()}d=t.xScale();v=t.yScale().clamp(true);var N=u.selectAll("g.nv-wrap.nv-discreteBarWithAxes").data([e]);var C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-discreteBarWithAxes").append("g");var k=C.append("defs");var L=N.select("g");C.append("g").attr("class","nv-x nv-axis");C.append("g").attr("class","nv-y nv-axis");C.append("g").attr("class","nv-barsWrap");L.attr("transform","translate("+i.left+","+i.top+")");if(l){L.select(".nv-y.nv-axis").attr("transform","translate("+E+",0)")}t.width(E).height(S);var A=L.select(".nv-barsWrap").datum(e.filter(function(e){return!e.disabled}));A.transition().call(t);k.append("clipPath").attr("id","nv-x-label-clip-"+t.id()).append("rect");L.select("#nv-x-label-clip-"+t.id()+" rect").attr("width",d.rangeBand()*(c?2:1)).attr("height",16).attr("x",-d.rangeBand()/(c?1:2));if(a){n.scale(d).ticks(E/100).tickSize(-S,0);L.select(".nv-x.nv-axis").attr("transform","translate(0,"+(v.range()[0]+(t.showValues()&&v.domain()[0]<0?16:0))+")");L.select(".nv-x.nv-axis").transition().call(n);var O=L.select(".nv-x.nv-axis").selectAll("g");if(c){O.selectAll("text").attr("transform",function(e,t,n){return"translate(0,"+(n%2==0?"5":"17")+")"})}}if(f){r.scale(v).ticks(S/36).tickSize(-E,0);L.select(".nv-y.nv-axis").transition().call(r)}g.on("tooltipShow",function(e){if(h)b(e,p.parentNode)})});return w}var t=e.models.discreteBar(),n=e.models.axis(),r=e.models.axis();var i={top:15,right:10,bottom:50,left:60},s=null,o=null,u=e.utils.getColor(),a=true,f=true,l=false,c=false,h=true,p=function(e,t,n,r,i){return"<h3>"+t+"</h3>"+"<p>"+n+"</p>"},d,v,m="No Data Available.",g=d3.dispatch("tooltipShow","tooltipHide","beforeUpdate"),y=250;n.orient("bottom").highlightZero(false).showMaxMin(false).tickFormat(function(e){return e});r.orient(l?"right":"left").tickFormat(d3.format(",.1f"));var b=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=p(i.series.key,a,f,i,w);e.tooltip.show([o,u],l,i.value<0?"n":"s",null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+i.left,e.pos[1]+i.top];g.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){g.tooltipHide(e)});g.on("tooltipHide",function(){if(h)e.tooltip.cleanup()});w.dispatch=g;w.discretebar=t;w.xAxis=n;w.yAxis=r;d3.rebind(w,t,"x","y","xDomain","yDomain","xRange","yRange","forceX","forceY","id","showValues","valueFormat");w.options=e.utils.optionsFunc.bind(w);w.margin=function(e){if(!arguments.length)return i;i.top=typeof e.top!="undefined"?e.top:i.top;i.right=typeof e.right!="undefined"?e.right:i.right;i.bottom=typeof e.bottom!="undefined"?e.bottom:i.bottom;i.left=typeof e.left!="undefined"?e.left:i.left;return w};w.width=function(e){if(!arguments.length)return s;s=e;return w};w.height=function(e){if(!arguments.length)return o;o=e;return w};w.color=function(n){if(!arguments.length)return u;u=e.utils.getColor(n);t.color(u);return w};w.showXAxis=function(e){if(!arguments.length)return a;a=e;return w};w.showYAxis=function(e){if(!arguments.length)return f;f=e;return w};w.rightAlignYAxis=function(e){if(!arguments.length)return l;l=e;r.orient(e?"right":"left");return w};w.staggerLabels=function(e){if(!arguments.length)return c;c=e;return w};w.tooltips=function(e){if(!arguments.length)return h;h=e;return w};w.tooltipContent=function(e){if(!arguments.length)return p;p=e;return w};w.noData=function(e){if(!arguments.length)return m;m=e;return w};w.transitionDuration=function(e){if(!arguments.length)return y;y=e;return w};return w};e.models.distribution=function(){"use strict";function l(e){e.each(function(e){var a=n-(i==="x"?t.left+t.right:t.top+t.bottom),l=i=="x"?"y":"x",c=d3.select(this);f=f||u;var h=c.selectAll("g.nv-distribution").data([e]);var p=h.enter().append("g").attr("class","nvd3 nv-distribution");var d=p.append("g");var v=h.select("g");h.attr("transform","translate("+t.left+","+t.top+")");var m=v.selectAll("g.nv-dist").data(function(e){return e},function(e){return e.key});m.enter().append("g");m.attr("class",function(e,t){return"nv-dist nv-series-"+t}).style("stroke",function(e,t){return o(e,t)});var g=m.selectAll("line.nv-dist"+i).data(function(e){return e.values});g.enter().append("line").attr(i+"1",function(e,t){return f(s(e,t))}).attr(i+"2",function(e,t){return f(s(e,t))});m.exit().selectAll("line.nv-dist"+i).transition().attr(i+"1",function(e,t){return u(s(e,t))}).attr(i+"2",function(e,t){return u(s(e,t))}).style("stroke-opacity",0).remove();g.attr("class",function(e,t){return"nv-dist"+i+" nv-dist"+i+"-"+t}).attr(l+"1",0).attr(l+"2",r);g.transition().attr(i+"1",function(e,t){return u(s(e,t))}).attr(i+"2",function(e,t){return u(s(e,t))});f=u.copy()});return l}var t={top:0,right:0,bottom:0,left:0},n=400,r=8,i="x",s=function(e){return e[i]},o=e.utils.defaultColor(),u=d3.scale.linear(),a;var f;l.options=e.utils.optionsFunc.bind(l);l.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return l};l.width=function(e){if(!arguments.length)return n;n=e;return l};l.axis=function(e){if(!arguments.length)return i;i=e;return l};l.size=function(e){if(!arguments.length)return r;r=e;return l};l.getData=function(e){if(!arguments.length)return s;s=d3.functor(e);return l};l.scale=function(e){if(!arguments.length)return u;u=e;return l};l.color=function(t){if(!arguments.length)return o;o=e.utils.getColor(t);return l};return l};e.models.historicalBar=function(){"use strict";function w(E){E.each(function(w){var E=n-t.left-t.right,S=r-t.top-t.bottom,T=d3.select(this);s.domain(d||d3.extent(w[0].values.map(u).concat(f)));if(c)s.range(m||[E*.5/w[0].values.length,E*(w[0].values.length-.5)/w[0].values.length]);else s.range(m||[0,E]);o.domain(v||d3.extent(w[0].values.map(a).concat(l))).range(g||[S,0]);if(s.domain()[0]===s.domain()[1])s.domain()[0]?s.domain([s.domain()[0]-s.domain()[0]*.01,s.domain()[1]+s.domain()[1]*.01]):s.domain([-1,1]);if(o.domain()[0]===o.domain()[1])o.domain()[0]?o.domain([o.domain()[0]+o.domain()[0]*.01,o.domain()[1]-o.domain()[1]*.01]):o.domain([-1,1]);var N=T.selectAll("g.nv-wrap.nv-historicalBar-"+i).data([w[0].values]);var C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBar-"+i);var k=C.append("defs");var L=C.append("g");var A=N.select("g");L.append("g").attr("class","nv-bars");N.attr("transform","translate("+t.left+","+t.top+")");T.on("click",function(e,t){y.chartClick({data:e,index:t,pos:d3.event,id:i})});k.append("clipPath").attr("id","nv-chart-clip-path-"+i).append("rect");N.select("#nv-chart-clip-path-"+i+" rect").attr("width",E).attr("height",S);A.attr("clip-path",h?"url(#nv-chart-clip-path-"+i+")":"");var O=N.select(".nv-bars").selectAll(".nv-bar").data(function(e){return e},function(e,t){return u(e,t)});O.exit().remove();var M=O.enter().append("rect").attr("x",0).attr("y",function(t,n){return e.utils.NaNtoZero(o(Math.max(0,a(t,n))))}).attr("height",function(t,n){return e.utils.NaNtoZero(Math.abs(o(a(t,n))-o(0)))}).attr("transform",function(e,t){return"translate("+(s(u(e,t))-E/w[0].values.length*.45)+",0)"}).on("mouseover",function(e,t){if(!b)return;d3.select(this).classed("hover",true);y.elementMouseover({point:e,series:w[0],pos:[s(u(e,t)),o(a(e,t))],pointIndex:t,seriesIndex:0,e:d3.event})}).on("mouseout",function(e,t){if(!b)return;d3.select(this).classed("hover",false);y.elementMouseout({point:e,series:w[0],pointIndex:t,seriesIndex:0,e:d3.event})}).on("click",function(e,t){if(!b)return;y.elementClick({value:a(e,t),data:e,index:t,pos:[s(u(e,t)),o(a(e,t))],e:d3.event,id:i});d3.event.stopPropagation()}).on("dblclick",function(e,t){if(!b)return;y.elementDblClick({value:a(e,t),data:e,index:t,pos:[s(u(e,t)),o(a(e,t))],e:d3.event,id:i});d3.event.stopPropagation()});O.attr("fill",function(e,t){return p(e,t)}).attr("class",function(e,t,n){return(a(e,t)<0?"nv-bar negative":"nv-bar positive")+" nv-bar-"+n+"-"+t}).transition().attr("transform",function(e,t){return"translate("+(s(u(e,t))-E/w[0].values.length*.45)+",0)"}).attr("width",E/w[0].values.length*.9);O.transition().attr("y",function(t,n){var r=a(t,n)<0?o(0):o(0)-o(a(t,n))<1?o(0)-1:o(a(t,n));return e.utils.NaNtoZero(r)}).attr("height",function(t,n){return e.utils.NaNtoZero(Math.max(Math.abs(o(a(t,n))-o(0)),1))})});return w}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=Math.floor(Math.random()*1e4),s=d3.scale.linear(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=[],l=[0],c=false,h=true,p=e.utils.defaultColor(),d,v,m,g,y=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout"),b=true;w.highlightPoint=function(e,t){d3.select(".nv-historicalBar-"+i).select(".nv-bars .nv-bar-0-"+e).classed("hover",t)};w.clearHighlights=function(){d3.select(".nv-historicalBar-"+i).select(".nv-bars .nv-bar.hover").classed("hover",false)};w.dispatch=y;w.options=e.utils.optionsFunc.bind(w);w.x=function(e){if(!arguments.length)return u;u=e;return w};w.y=function(e){if(!arguments.length)return a;a=e;return w};w.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return w};w.width=function(e){if(!arguments.length)return n;n=e;return w};w.height=function(e){if(!arguments.length)return r;r=e;return w};w.xScale=function(e){if(!arguments.length)return s;s=e;return w};w.yScale=function(e){if(!arguments.length)return o;o=e;return w};w.xDomain=function(e){if(!arguments.length)return d;d=e;return w};w.yDomain=function(e){if(!arguments.length)return v;v=e;return w};w.xRange=function(e){if(!arguments.length)return m;m=e;return w};w.yRange=function(e){if(!arguments.length)return g;g=e;return w};w.forceX=function(e){if(!arguments.length)return f;f=e;return w};w.forceY=function(e){if(!arguments.length)return l;l=e;return w};w.padData=function(e){if(!arguments.length)return c;c=e;return w};w.clipEdge=function(e){if(!arguments.length)return h;h=e;return w};w.color=function(t){if(!arguments.length)return p;p=e.utils.getColor(t);return w};w.id=function(e){if(!arguments.length)return i;i=e;return w};w.interactive=function(e){if(!arguments.length)return b;b=false;return w};return w};e.models.historicalBarChart=function(){"use strict";function x(e){e.each(function(d){var T=d3.select(this),N=this;var C=(u||parseInt(T.style("width"))||960)-s.left-s.right,k=(a||parseInt(T.style("height"))||400)-s.top-s.bottom;x.update=function(){T.transition().duration(E).call(x)};x.container=this;g.disabled=d.map(function(e){return!!e.disabled});if(!y){var L;y={};for(L in g){if(g[L]instanceof Array)y[L]=g[L].slice(0);else y[L]=g[L]}}if(!d||!d.length||!d.filter(function(e){return e.values.length}).length){var A=T.selectAll(".nv-noData").data([b]);A.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");A.attr("x",s.left+C/2).attr("y",s.top+k/2).text(function(e){return e});return x}else{T.selectAll(".nv-noData").remove()}v=t.xScale();m=t.yScale();var O=T.selectAll("g.nv-wrap.nv-historicalBarChart").data([d]);var M=O.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBarChart").append("g");var _=O.select("g");M.append("g").attr("class","nv-x nv-axis");M.append("g").attr("class","nv-y nv-axis");M.append("g").attr("class","nv-barsWrap");M.append("g").attr("class","nv-legendWrap");if(f){i.width(C);_.select(".nv-legendWrap").datum(d).call(i);if(s.top!=i.height()){s.top=i.height();k=(a||parseInt(T.style("height"))||400)-s.top-s.bottom}O.select(".nv-legendWrap").attr("transform","translate(0,"+ -s.top+")")}O.attr("transform","translate("+s.left+","+s.top+")");if(h){_.select(".nv-y.nv-axis").attr("transform","translate("+C+",0)")}t.width(C).height(k).color(d.map(function(e,t){return e.color||o(e,t)}).filter(function(e,t){return!d[t].disabled}));var D=_.select(".nv-barsWrap").datum(d.filter(function(e){return!e.disabled}));D.transition().call(t);if(l){n.scale(v).tickSize(-k,0);_.select(".nv-x.nv-axis").attr("transform","translate(0,"+m.range()[0]+")");_.select(".nv-x.nv-axis").transition().call(n)}if(c){r.scale(m).ticks(k/36).tickSize(-C,0);_.select(".nv-y.nv-axis").transition().call(r)}i.dispatch.on("legendClick",function(t,n){t.disabled=!t.disabled;if(!d.filter(function(e){return!e.disabled}).length){d.map(function(e){e.disabled=false;O.selectAll(".nv-series").classed("disabled",false);return e})}g.disabled=d.map(function(e){return!!e.disabled});w.stateChange(g);e.transition().call(x)});i.dispatch.on("legendDblclick",function(e){d.forEach(function(e){e.disabled=true});e.disabled=false;g.disabled=d.map(function(e){return!!e.disabled});w.stateChange(g);x.update()});w.on("tooltipShow",function(e){if(p)S(e,N.parentNode)});w.on("changeState",function(t){if(typeof t.disabled!=="undefined"){d.forEach(function(e,n){e.disabled=t.disabled[n]});g.disabled=t.disabled}e.call(x)})});return x}var t=e.models.historicalBar(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend();var s={top:30,right:90,bottom:50,left:90},o=e.utils.defaultColor(),u=null,a=null,f=false,l=true,c=true,h=false,p=true,d=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},v,m,g={},y=null,b="No Data Available.",w=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),E=250;n.orient("bottom").tickPadding(7);r.orient(h?"right":"left");var S=function(i,s){if(s){var o=d3.select(s).select("svg");var u=o.node()?o.attr("viewBox"):null;if(u){u=u.split(" ");var a=parseInt(o.style("width"))/u[2];i.pos[0]=i.pos[0]*a;i.pos[1]=i.pos[1]*a}}var f=i.pos[0]+(s.offsetLeft||0),l=i.pos[1]+(s.offsetTop||0),c=n.tickFormat()(t.x()(i.point,i.pointIndex)),h=r.tickFormat()(t.y()(i.point,i.pointIndex)),p=d(i.series.key,c,h,i,x);e.tooltip.show([f,l],p,null,null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+s.left,e.pos[1]+s.top];w.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){w.tooltipHide(e)});w.on("tooltipHide",function(){if(p)e.tooltip.cleanup()});x.dispatch=w;x.bars=t;x.legend=i;x.xAxis=n;x.yAxis=r;d3.rebind(x,t,"defined","isArea","x","y","size","xScale","yScale","xDomain","yDomain","xRange","yRange","forceX","forceY","interactive","clipEdge","clipVoronoi","id","interpolate","highlightPoint","clearHighlights","interactive");x.options=e.utils.optionsFunc.bind(x);x.margin=function(e){if(!arguments.length)return s;s.top=typeof e.top!="undefined"?e.top:s.top;s.right=typeof e.right!="undefined"?e.right:s.right;s.bottom=typeof e.bottom!="undefined"?e.bottom:s.bottom;s.left=typeof e.left!="undefined"?e.left:s.left;return x};x.width=function(e){if(!arguments.length)return u;u=e;return x};x.height=function(e){if(!arguments.length)return a;a=e;return x};x.color=function(t){if(!arguments.length)return o;o=e.utils.getColor(t);i.color(o);return x};x.showLegend=function(e){if(!arguments.length)return f;f=e;return x};x.showXAxis=function(e){if(!arguments.length)return l;l=e;return x};x.showYAxis=function(e){if(!arguments.length)return c;c=e;return x};x.rightAlignYAxis=function(e){if(!arguments.length)return h;h=e;r.orient(e?"right":"left");return x};x.tooltips=function(e){if(!arguments.length)return p;p=e;return x};x.tooltipContent=function(e){if(!arguments.length)return d;d=e;return x};x.state=function(e){if(!arguments.length)return g;g=e;return x};x.defaultState=function(e){if(!arguments.length)return y;y=e;return x};x.noData=function(e){if(!arguments.length)return b;b=e;return x};x.transitionDuration=function(e){if(!arguments.length)return E;E=e;return x};return x};e.models.indentedTree=function(){"use strict";function g(e){e.each(function(e){function k(e,t,n){d3.event.stopPropagation();if(d3.event.shiftKey&&!n){d3.event.shiftKey=false;e.values&&e.values.forEach(function(e){if(e.values||e._values){k(e,0,true)}});return true}if(!O(e)){return true}if(e.values){e._values=e.values;e.values=null}else{e.values=e._values;e._values=null}g.update()}function L(e){return e._values&&e._values.length?h:e.values&&e.values.length?p:""}function A(e){return e._values&&e._values.length}function O(e){var t=e.values||e._values;return t&&t.length}var t=1,n=d3.select(this);var i=d3.layout.tree().children(function(e){return e.values}).size([r,f]);g.update=function(){n.transition().duration(600).call(g)};if(!e[0])e[0]={key:a};var s=i.nodes(e[0]);var y=d3.select(this).selectAll("div").data([[s]]);var b=y.enter().append("div").attr("class","nvd3 nv-wrap nv-indentedtree");var w=b.append("table");var E=y.select("table").attr("width","100%").attr("class",c);if(o){var S=w.append("thead");var x=S.append("tr");l.forEach(function(e){x.append("th").attr("width",e.width?e.width:"10%").style("text-align",e.type=="numeric"?"right":"left").append("span").text(e.label)})}var T=E.selectAll("tbody").data(function(e){return e});T.enter().append("tbody");t=d3.max(s,function(e){return e.depth});i.size([r,t*f]);var N=T.selectAll("tr").data(function(e){return e.filter(function(e){return u&&!e.children?u(e):true})},function(e,t){return e.id||e.id||++m});N.exit().remove();N.select("img.nv-treeicon").attr("src",L).classed("folded",A);var C=N.enter().append("tr");l.forEach(function(e,t){var n=C.append("td").style("padding-left",function(e){return(t?0:e.depth*f+12+(L(e)?0:16))+"px"},"important").style("text-align",e.type=="numeric"?"right":"left");if(t==0){n.append("img").classed("nv-treeicon",true).classed("nv-folded",A).attr("src",L).style("width","14px").style("height","14px").style("padding","0 1px").style("display",function(e){return L(e)?"inline-block":"none"}).on("click",k)}n.each(function(n){if(!t&&v(n))d3.select(this).append("a").attr("href",v).attr("class",d3.functor(e.classes)).append("span");else d3.select(this).append("span");d3.select(this).select("span").attr("class",d3.functor(e.classes)).text(function(t){return e.format?e.format(t):t[e.key]||"-"})});if(e.showCount){n.append("span").attr("class","nv-childrenCount");N.selectAll("span.nv-childrenCount").text(function(e){return e.values&&e.values.length||e._values&&e._values.length?"("+(e.values&&e.values.filter(function(e){return u?u(e):true}).length||e._values&&e._values.filter(function(e){return u?u(e):true}).length||0)+")":""})}});N.order().on("click",function(e){d.elementClick({row:this,data:e,pos:[e.x,e.y]})}).on("dblclick",function(e){d.elementDblclick({row:this,data:e,pos:[e.x,e.y]})}).on("mouseover",function(e){d.elementMouseover({row:this,data:e,pos:[e.x,e.y]})}).on("mouseout",function(e){d.elementMouseout({row:this,data:e,pos:[e.x,e.y]})})});return g}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=e.utils.defaultColor(),s=Math.floor(Math.random()*1e4),o=true,u=false,a="No Data Available.",f=20,l=[{key:"key",label:"Name",type:"text"}],c=null,h="images/grey-plus.png",p="images/grey-minus.png",d=d3.dispatch("elementClick","elementDblclick","elementMouseover","elementMouseout"),v=function(e){return e.url};var m=0;g.options=e.utils.optionsFunc.bind(g);g.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return g};g.width=function(e){if(!arguments.length)return n;n=e;return g};g.height=function(e){if(!arguments.length)return r;r=e;return g};g.color=function(t){if(!arguments.length)return i;i=e.utils.getColor(t);scatter.color(i);return g};g.id=function(e){if(!arguments.length)return s;s=e;return g};g.header=function(e){if(!arguments.length)return o;o=e;return g};g.noData=function(e){if(!arguments.length)return a;a=e;return g};g.filterZero=function(e){if(!arguments.length)return u;u=e;return g};g.columns=function(e){if(!arguments.length)return l;l=e;return g};g.tableClass=function(e){if(!arguments.length)return c;c=e;return g};g.iconOpen=function(e){if(!arguments.length)return h;h=e;return g};g.iconClose=function(e){if(!arguments.length)return p;p=e;return g};g.getUrl=function(e){if(!arguments.length)return v;v=e;return g};return g};e.models.legend=function(){"use strict";function h(p){p.each(function(h){var p=n-t.left-t.right,d=d3.select(this);var v=d.selectAll("g.nv-legend").data([h]);var m=v.enter().append("g").attr("class","nvd3 nv-legend").append("g");var g=v.select("g");v.attr("transform","translate("+t.left+","+t.top+")");var y=g.selectAll(".nv-series").data(function(e){return e});var b=y.enter().append("g").attr("class","nv-series").on("mouseover",function(e,t){l.legendMouseover(e,t)}).on("mouseout",function(e,t){l.legendMouseout(e,t)}).on("click",function(e,t){if(!c){l.legendClick(e,t);if(a){if(f){h.forEach(function(e){e.disabled=true});e.disabled=false}else{e.disabled=!e.disabled;if(h.every(function(e){return e.disabled})){h.forEach(function(e){e.disabled=false})}}l.stateChange({disabled:h.map(function(e){return!!e.disabled})})}}}).on("dblclick",function(e,t){if(!c){l.legendDblclick(e,t);if(a){h.forEach(function(e){e.disabled=true});e.disabled=false;l.stateChange({disabled:h.map(function(e){return!!e.disabled})})}}});b.append("circle").style("stroke-width",2).attr("class","nv-legend-symbol").attr("r",5);b.append("text").attr("text-anchor","start").attr("class","nv-legend-text").attr("dy",".32em").attr("dx","8");y.classed("disabled",function(e){return e.disabled});y.exit().remove();y.select("circle").style("fill",function(e,t){return e.color||s(e,t)}).style("stroke",function(e,t){return e.color||s(e,t)});y.select("text").text(i);if(o){var w=[];y.each(function(t,n){var r=d3.select(this).select("text");var i=r.node().getComputedTextLength()||e.utils.calcApproxTextWidth(r);w.push(i+28)});var E=0;var S=0;var x=[];while(S<p&&E<w.length){x[E]=w[E];S+=w[E++]}if(E===0)E=1;while(S>p&&E>1){x=[];E--;for(var T=0;T<w.length;T++){if(w[T]>(x[T%E]||0))x[T%E]=w[T]}S=x.reduce(function(e,t,n,r){return e+t})}var N=[];for(var C=0,k=0;C<E;C++){N[C]=k;k+=x[C]}y.attr("transform",function(e,t){return"translate("+N[t%E]+","+(5+Math.floor(t/E)*20)+")"});if(u){g.attr("transform","translate("+(n-t.right-S)+","+t.top+")")}else{g.attr("transform","translate(0"+","+t.top+")")}r=t.top+t.bottom+Math.ceil(w.length/E)*20}else{var L=5,A=5,O=0,M;y.attr("transform",function(e,r){var i=d3.select(this).select("text").node().getComputedTextLength()+28;M=A;if(n<t.left+t.right+M+i){A=M=5;L+=20}A+=i;if(A>O)O=A;return"translate("+M+","+L+")"});g.attr("transform","translate("+(n-t.right-O)+","+t.top+")");r=t.top+t.bottom+L+15}});return h}var t={top:5,right:0,bottom:5,left:0},n=400,r=20,i=function(e){return e.key},s=e.utils.defaultColor(),o=true,u=true,a=true,f=false,l=d3.dispatch("legendClick","legendDblclick","legendMouseover","legendMouseout","stateChange"),c=false;h.dispatch=l;h.options=e.utils.optionsFunc.bind(h);h.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return h};h.width=function(e){if(!arguments.length)return n;n=e;return h};h.height=function(e){if(!arguments.length)return r;r=e;return h};h.key=function(e){if(!arguments.length)return i;i=e;return h};h.color=function(t){if(!arguments.length)return s;s=e.utils.getColor(t);return h};h.align=function(e){if(!arguments.length)return o;o=e;return h};h.rightAlign=function(e){if(!arguments.length)return u;u=e;return h};h.dualaxis=function(e){if(!arguments.length)return c;c=e;return h};h.updateState=function(e){if(!arguments.length)return a;a=e;return h};h.radioButtonMode=function(e){if(!arguments.length)return f;f=e;return h};return h};e.models.line=function(){"use strict";function m(g){g.each(function(m){var g=r-n.left-n.right,b=i-n.top-n.bottom,w=d3.select(this);c=t.xScale();h=t.yScale();d=d||c;v=v||h;var E=w.selectAll("g.nv-wrap.nv-line").data([m]);var S=E.enter().append("g").attr("class","nvd3 nv-wrap nv-line");var T=S.append("defs");var N=S.append("g");var C=E.select("g");N.append("g").attr("class","nv-groups");N.append("g").attr("class","nv-scatterWrap");E.attr("transform","translate("+n.left+","+n.top+")");t.width(g).height(b);var k=E.select(".nv-scatterWrap");k.transition().call(t);T.append("clipPath").attr("id","nv-edge-clip-"+t.id()).append("rect");E.select("#nv-edge-clip-"+t.id()+" rect").attr("width",g).attr("height",b);C.attr("clip-path",l?"url(#nv-edge-clip-"+t.id()+")":"");k.attr("clip-path",l?"url(#nv-edge-clip-"+t.id()+")":"");var L=E.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e){return e.key});L.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);L.exit().transition().style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove();L.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover}).style("fill",function(e,t){return s(e,t)}).style("stroke",function(e,t){return s(e,t)});L.transition().style("stroke-opacity",1).style("fill-opacity",.5);var A=L.selectAll("path.nv-area").data(function(e){return f(e)?[e]:[]});A.enter().append("path").attr("class","nv-area").attr("d",function(t){return d3.svg.area().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(d(o(t,n)))}).y0(function(t,n){return e.utils.NaNtoZero(v(u(t,n)))}).y1(function(e,t){return v(h.domain()[0]<=0?h.domain()[1]>=0?0:h.domain()[1]:h.domain()[0])}).apply(this,[t.values])});L.exit().selectAll("path.nv-area").remove();A.transition().attr("d",function(t){return d3.svg.area().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(c(o(t,n)))}).y0(function(t,n){return e.utils.NaNtoZero(h(u(t,n)))}).y1(function(e,t){return h(h.domain()[0]<=0?h.domain()[1]>=0?0:h.domain()[1]:h.domain()[0])}).apply(this,[t.values])});var O=L.selectAll("path.nv-line").data(function(e){return[e.values]});O.enter().append("path").attr("class","nv-line").attr("d",d3.svg.line().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(d(o(t,n)))}).y(function(t,n){return e.utils.NaNtoZero(v(u(t,n)))}));L.exit().selectAll("path.nv-line").transition().attr("d",d3.svg.line().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(c(o(t,n)))}).y(function(t,n){return e.utils.NaNtoZero(h(u(t,n)))}));O.transition().attr("d",d3.svg.line().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(c(o(t,n)))}).y(function(t,n){return e.utils.NaNtoZero(h(u(t,n)))}));d=c.copy();v=h.copy()});return m}var t=e.models.scatter();var n={top:0,right:0,bottom:0,left:0},r=960,i=500,s=e.utils.defaultColor(),o=function(e){return e.x},u=function(e){return e.y},a=function(e,t){return!isNaN(u(e,t))&&u(e,t)!==null},f=function(e){return e.area},l=false,c,h,p="linear";t.size(16).sizeDomain([16,256]);var d,v;m.dispatch=t.dispatch;m.scatter=t;d3.rebind(m,t,"id","interactive","size","xScale","yScale","zScale","xDomain","yDomain","xRange","yRange","sizeDomain","forceX","forceY","forceSize","clipVoronoi","useVoronoi","clipRadius","padData","highlightPoint","clearHighlights");m.options=e.utils.optionsFunc.bind(m);m.margin=function(e){if(!arguments.length)return n;n.top=typeof e.top!="undefined"?e.top:n.top;n.right=typeof e.right!="undefined"?e.right:n.right;n.bottom=typeof e.bottom!="undefined"?e.bottom:n.bottom;n.left=typeof e.left!="undefined"?e.left:n.left;return m};m.width=function(e){if(!arguments.length)return r;r=e;return m};m.height=function(e){if(!arguments.length)return i;i=e;return m};m.x=function(e){if(!arguments.length)return o;o=e;t.x(e);return m};m.y=function(e){if(!arguments.length)return u;u=e;t.y(e);return m};m.clipEdge=function(e){if(!arguments.length)return l;l=e;return m};m.color=function(n){if(!arguments.length)return s;s=e.utils.getColor(n);t.color(s);return m};m.interpolate=function(e){if(!arguments.length)return p;p=e;return m};m.defined=function(e){if(!arguments.length)return a;a=e;return m};m.isArea=function(e){if(!arguments.length)return f;f=d3.functor(e);return m};return m};e.models.lineChart=function(){"use strict";function N(m){m.each(function(m){var C=d3.select(this),k=this;var L=(a||parseInt(C.style("width"))||960)-o.left-o.right,A=(f||parseInt(C.style("height"))||400)-o.top-o.bottom;N.update=function(){C.transition().duration(x).call(N)};N.container=this;b.disabled=m.map(function(e){return!!e.disabled});if(!w){var O;w={};for(O in b){if(b[O]instanceof Array)w[O]=b[O].slice(0);else w[O]=b[O]}}if(!m||!m.length||!m.filter(function(e){return e.values.length}).length){var M=C.selectAll(".nv-noData").data([E]);M.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");M.attr("x",o.left+L/2).attr("y",o.top+A/2).text(function(e){return e});return N}else{C.selectAll(".nv-noData").remove()}g=t.xScale();y=t.yScale();var _=C.selectAll("g.nv-wrap.nv-lineChart").data([m]);var D=_.enter().append("g").attr("class","nvd3 nv-wrap nv-lineChart").append("g");var P=_.select("g");D.append("rect").style("opacity",0);D.append("g").attr("class","nv-x nv-axis");D.append("g").attr("class","nv-y nv-axis");D.append("g").attr("class","nv-linesWrap");D.append("g").attr("class","nv-legendWrap");D.append("g").attr("class","nv-interactive");P.select("rect").attr("width",L).attr("height",A);if(l){i.width(L);P.select(".nv-legendWrap").datum(m).call(i);if(o.top!=i.height()){o.top=i.height();A=(f||parseInt(C.style("height"))||400)-o.top-o.bottom}_.select(".nv-legendWrap").attr("transform","translate(0,"+ -o.top+")")}_.attr("transform","translate("+o.left+","+o.top+")");if(p){P.select(".nv-y.nv-axis").attr("transform","translate("+L+",0)")}if(d){s.width(L).height(A).margin({left:o.left,top:o.top}).svgContainer(C).xScale(g);_.select(".nv-interactive").call(s)}t.width(L).height(A).color(m.map(function(e,t){return e.color||u(e,t)}).filter(function(e,t){return!m[t].disabled}));var H=P.select(".nv-linesWrap").datum(m.filter(function(e){return!e.disabled}));H.transition().call(t);if(c){n.scale(g).ticks(L/100).tickSize(-A,0);P.select(".nv-x.nv-axis").attr("transform","translate(0,"+y.range()[0]+")");P.select(".nv-x.nv-axis").transition().call(n)}if(h){r.scale(y).ticks(A/36).tickSize(-L,0);P.select(".nv-y.nv-axis").transition().call(r)}i.dispatch.on("stateChange",function(e){b=e;S.stateChange(b);N.update()});s.dispatch.on("elementMousemove",function(i){t.clearHighlights();var a,f,l,c=[];m.filter(function(e,t){e.seriesIndex=t;return!e.disabled}).forEach(function(n,r){f=e.interactiveBisect(n.values,i.pointXValue,N.x());t.highlightPoint(r,f,true);var s=n.values[f];if(typeof s==="undefined")return;if(typeof a==="undefined")a=s;if(typeof l==="undefined")l=N.xScale()(N.x()(s,f));c.push({key:n.key,value:N.y()(s,f),color:u(n,n.seriesIndex)})});if(c.length>2){var h=N.yScale().invert(i.mouseY);var p=Math.abs(N.yScale().domain()[0]-N.yScale().domain()[1]);var d=.03*p;var g=e.nearestValueIndex(c.map(function(e){return e.value}),h,d);if(g!==null)c[g].highlight=true}var y=n.tickFormat()(N.x()(a,f));s.tooltip.position({left:l+o.left,top:i.mouseY+o.top}).chartContainer(k.parentNode).enabled(v).valueFormatter(function(e,t){return r.tickFormat()(e)}).data({value:y,series:c})();s.renderGuideLine(l)});s.dispatch.on("elementMouseout",function(e){S.tooltipHide();t.clearHighlights()});S.on("tooltipShow",function(e){if(v)T(e,k.parentNode)});S.on("changeState",function(e){if(typeof e.disabled!=="undefined"){m.forEach(function(t,n){t.disabled=e.disabled[n]});b.disabled=e.disabled}N.update()})});return N}var t=e.models.line(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.interactiveGuideline();var o={top:30,right:20,bottom:50,left:60},u=e.utils.defaultColor(),a=null,f=null,l=true,c=true,h=true,p=false,d=false,v=true,m=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},g,y,b={},w=null,E="No Data Available.",S=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),x=250;n.orient("bottom").tickPadding(7);r.orient(p?"right":"left");var T=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=m(i.series.key,a,f,i,N);e.tooltip.show([o,u],l,null,null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+o.left,e.pos[1]+o.top];S.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){S.tooltipHide(e)});S.on("tooltipHide",function(){if(v)e.tooltip.cleanup()});N.dispatch=S;N.lines=t;N.legend=i;N.xAxis=n;N.yAxis=r;N.interactiveLayer=s;d3.rebind(N,t,"defined","isArea","x","y","size","xScale","yScale","xDomain","yDomain","xRange","yRange","forceX","forceY","interactive","clipEdge","clipVoronoi","useVoronoi","id","interpolate");N.options=e.utils.optionsFunc.bind(N);N.margin=function(e){if(!arguments.length)return o;o.top=typeof e.top!="undefined"?e.top:o.top;o.right=typeof e.right!="undefined"?e.right:o.right;o.bottom=typeof e.bottom!="undefined"?e.bottom:o.bottom;o.left=typeof e.left!="undefined"?e.left:o.left;return N};N.width=function(e){if(!arguments.length)return a;a=e;return N};N.height=function(e){if(!arguments.length)return f;f=e;return N};N.color=function(t){if(!arguments.length)return u;u=e.utils.getColor(t);i.color(u);return N};N.showLegend=function(e){if(!arguments.length)return l;l=e;return N};N.showXAxis=function(e){if(!arguments.length)return c;c=e;return N};N.showYAxis=function(e){if(!arguments.length)return h;h=e;return N};N.rightAlignYAxis=function(e){if(!arguments.length)return p;p=e;r.orient(e?"right":"left");return N};N.useInteractiveGuideline=function(e){if(!arguments.length)return d;d=e;if(e===true){N.interactive(false);N.useVoronoi(false)}return N};N.tooltips=function(e){if(!arguments.length)return v;v=e;return N};N.tooltipContent=function(e){if(!arguments.length)return m;m=e;return N};N.state=function(e){if(!arguments.length)return b;b=e;return N};N.defaultState=function(e){if(!arguments.length)return w;w=e;return N};N.noData=function(e){if(!arguments.length)return E;E=e;return N};N.transitionDuration=function(e){if(!arguments.length)return x;x=e;return N};return N};e.models.linePlusBarChart=function(){"use strict";function T(e){e.each(function(e){var l=d3.select(this),c=this;var v=(a||parseInt(l.style("width"))||960)-u.left-u.right,N=(f||parseInt(l.style("height"))||400)-u.top-u.bottom;T.update=function(){l.transition().call(T)};b.disabled=e.map(function(e){return!!e.disabled});if(!w){var C;w={};for(C in b){if(b[C]instanceof Array)w[C]=b[C].slice(0);else w[C]=b[C]}}if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var k=l.selectAll(".nv-noData").data([E]);k.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");k.attr("x",u.left+v/2).attr("y",u.top+N/2).text(function(e){return e});return T}else{l.selectAll(".nv-noData").remove()}var L=e.filter(function(e){return!e.disabled&&e.bar});var A=e.filter(function(e){return!e.bar});m=A.filter(function(e){return!e.disabled}).length&&A.filter(function(e){return!e.disabled})[0].values.length?t.xScale():n.xScale();g=n.yScale();y=t.yScale();var O=d3.select(this).selectAll("g.nv-wrap.nv-linePlusBar").data([e]);var M=O.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g");var _=O.select("g");M.append("g").attr("class","nv-x nv-axis");M.append("g").attr("class","nv-y1 nv-axis");M.append("g").attr("class","nv-y2 nv-axis");M.append("g").attr("class","nv-barsWrap");M.append("g").attr("class","nv-linesWrap");M.append("g").attr("class","nv-legendWrap");if(p){o.width(v/2);_.select(".nv-legendWrap").datum(e.map(function(e){e.originalKey=e.originalKey===undefined?e.key:e.originalKey;e.key=e.originalKey+(e.bar?" (left axis)":" (right axis)");return e})).call(o);if(u.top!=o.height()){u.top=o.height();N=(f||parseInt(l.style("height"))||400)-u.top-u.bottom}_.select(".nv-legendWrap").attr("transform","translate("+v/2+","+ -u.top+")")}O.attr("transform","translate("+u.left+","+u.top+")");t.width(v).height(N).color(e.map(function(e,t){return e.color||h(e,t)}).filter(function(t,n){return!e[n].disabled&&!e[n].bar}));n.width(v).height(N).color(e.map(function(e,t){return e.color||h(e,t)}).filter(function(t,n){return!e[n].disabled&&e[n].bar}));var D=_.select(".nv-barsWrap").datum(L.length?L:[{values:[]}]);var P=_.select(".nv-linesWrap").datum(A[0]&&!A[0].disabled?A:[{values:[]}]);d3.transition(D).call(n);d3.transition(P).call(t);r.scale(m).ticks(v/100).tickSize(-N,0);_.select(".nv-x.nv-axis").attr("transform","translate(0,"+g.range()[0]+")");d3.transition(_.select(".nv-x.nv-axis")).call(r);i.scale(g).ticks(N/36).tickSize(-v,0);d3.transition(_.select(".nv-y1.nv-axis")).style("opacity",L.length?1:0).call(i);s.scale(y).ticks(N/36).tickSize(L.length?0:-v,0);_.select(".nv-y2.nv-axis").style("opacity",A.length?1:0).attr("transform","translate("+v+",0)");d3.transition(_.select(".nv-y2.nv-axis")).call(s);o.dispatch.on("stateChange",function(e){b=e;S.stateChange(b);T.update()});S.on("tooltipShow",function(e){if(d)x(e,c.parentNode)});S.on("changeState",function(t){if(typeof t.disabled!=="undefined"){e.forEach(function(e,n){e.disabled=t.disabled[n]});b.disabled=t.disabled}T.update()})});return T}var t=e.models.line(),n=e.models.historicalBar(),r=e.models.axis(),i=e.models.axis(),s=e.models.axis(),o=e.models.legend();var u={top:30,right:60,bottom:50,left:60},a=null,f=null,l=function(e){return e.x},c=function(e){return e.y},h=e.utils.defaultColor(),p=true,d=true,v=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},m,g,y,b={},w=null,E="No Data Available.",S=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState");n.padData(true);t.clipEdge(false).padData(true);r.orient("bottom").tickPadding(7).highlightZero(false);i.orient("left");s.orient("right");var x=function(n,o){var u=n.pos[0]+(o.offsetLeft||0),a=n.pos[1]+(o.offsetTop||0),f=r.tickFormat()(t.x()(n.point,n.pointIndex)),l=(n.series.bar?i:s).tickFormat()(t.y()(n.point,n.pointIndex)),c=v(n.series.key,f,l,n,T);e.tooltip.show([u,a],c,n.value<0?"n":"s",null,o)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+u.left,e.pos[1]+u.top];S.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){S.tooltipHide(e)});n.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+u.left,e.pos[1]+u.top];S.tooltipShow(e)});n.dispatch.on("elementMouseout.tooltip",function(e){S.tooltipHide(e)});S.on("tooltipHide",function(){if(d)e.tooltip.cleanup()});T.dispatch=S;T.legend=o;T.lines=t;T.bars=n;T.xAxis=r;T.y1Axis=i;T.y2Axis=s;d3.rebind(T,t,"defined","size","clipVoronoi","interpolate");T.options=e.utils.optionsFunc.bind(T);T.x=function(e){if(!arguments.length)return l;l=e;t.x(e);n.x(e);return T};T.y=function(e){if(!arguments.length)return c;c=e;t.y(e);n.y(e);return T};T.margin=function(e){if(!arguments.length)return u;u.top=typeof e.top!="undefined"?e.top:u.top;u.right=typeof e.right!="undefined"?e.right:u.right;u.bottom=typeof e.bottom!="undefined"?e.bottom:u.bottom;u.left=typeof e.left!="undefined"?e.left:u.left;return T};T.width=function(e){if(!arguments.length)return a;a=e;return T};T.height=function(e){if(!arguments.length)return f;f=e;return T};T.color=function(t){if(!arguments.length)return h;h=e.utils.getColor(t);o.color(h);return T};T.showLegend=function(e){if(!arguments.length)return p;p=e;return T};T.tooltips=function(e){if(!arguments.length)return d;d=e;return T};T.tooltipContent=function(e){if(!arguments.length)return v;v=e;return T};T.state=function(e){if(!arguments.length)return b;b=e;return T};T.defaultState=function(e){if(!arguments.length)return w;w=e;return T};T.noData=function(e){if(!arguments.length)return E;E=e;return T};return T};e.models.lineWithFocusChart=function(){"use strict";function k(e){e.each(function(e){function U(e){var t=+(e=="e"),n=t?1:-1,r=M/3;return"M"+.5*n+","+r+"A6,6 0 0 "+t+" "+6.5*n+","+(r+6)+"V"+(2*r-6)+"A6,6 0 0 "+t+" "+.5*n+","+2*r+"Z"+"M"+2.5*n+","+(r+8)+"V"+(2*r-8)+"M"+4.5*n+","+(r+8)+"V"+(2*r-8)}function z(){if(!a.empty())a.extent(w);I.data([a.empty()?g.domain():w]).each(function(e,t){var n=g(e[0])-v.range()[0],r=v.range()[1]-g(e[1]);d3.select(this).select(".left").attr("width",n<0?0:n);d3.select(this).select(".right").attr("x",g(e[1])).attr("width",r<0?0:r)})}function W(){w=a.empty()?null:a.extent();var n=a.empty()?g.domain():a.extent();if(Math.abs(n[0]-n[1])<=1){return}T.brush({extent:n,brush:a});z();var s=H.select(".nv-focus .nv-linesWrap").datum(e.filter(function(e){return!e.disabled}).map(function(e,r){return{key:e.key,values:e.values.filter(function(e,r){return t.x()(e,r)>=n[0]&&t.x()(e,r)<=n[1]})}}));s.transition().duration(N).call(t);H.select(".nv-focus .nv-x.nv-axis").transition().duration(N).call(r);H.select(".nv-focus .nv-y.nv-axis").transition().duration(N).call(i)}var S=d3.select(this),L=this;var A=(h||parseInt(S.style("width"))||960)-f.left-f.right,O=(p||parseInt(S.style("height"))||400)-f.top-f.bottom-d,M=d-l.top-l.bottom;k.update=function(){S.transition().duration(N).call(k)};k.container=this;if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var _=S.selectAll(".nv-noData").data([x]);_.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");_.attr("x",f.left+A/2).attr("y",f.top+O/2).text(function(e){return e});return k}else{S.selectAll(".nv-noData").remove()}v=t.xScale();m=t.yScale();g=n.xScale();y=n.yScale();var D=S.selectAll("g.nv-wrap.nv-lineWithFocusChart").data([e]);var P=D.enter().append("g").attr("class","nvd3 nv-wrap nv-lineWithFocusChart").append("g");var H=D.select("g");P.append("g").attr("class","nv-legendWrap");var B=P.append("g").attr("class","nv-focus");B.append("g").attr("class","nv-x nv-axis");B.append("g").attr("class","nv-y nv-axis");B.append("g").attr("class","nv-linesWrap");var j=P.append("g").attr("class","nv-context");j.append("g").attr("class","nv-x nv-axis");j.append("g").attr("class","nv-y nv-axis");j.append("g").attr("class","nv-linesWrap");j.append("g").attr("class","nv-brushBackground");j.append("g").attr("class","nv-x nv-brush");if(b){u.width(A);H.select(".nv-legendWrap").datum(e).call(u);if(f.top!=u.height()){f.top=u.height();O=(p||parseInt(S.style("height"))||400)-f.top-f.bottom-d}H.select(".nv-legendWrap").attr("transform","translate(0,"+ -f.top+")")}D.attr("transform","translate("+f.left+","+f.top+")");t.width(A).height(O).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));n.defined(t.defined()).width(A).height(M).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));H.select(".nv-context").attr("transform","translate(0,"+(O+f.bottom+l.top)+")");var F=H.select(".nv-context .nv-linesWrap").datum(e.filter(function(e){return!e.disabled}));d3.transition(F).call(n);r.scale(v).ticks(A/100).tickSize(-O,0);i.scale(m).ticks(O/36).tickSize(-A,0);H.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+O+")");a.x(g).on("brush",function(){var e=k.transitionDuration();k.transitionDuration(0);W();k.transitionDuration(e)});if(w)a.extent(w);var I=H.select(".nv-brushBackground").selectAll("g").data([w||a.extent()]);var q=I.enter().append("g");q.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",M);q.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",M);var R=H.select(".nv-x.nv-brush").call(a);R.selectAll("rect").attr("height",M);R.selectAll(".resize").append("path").attr("d",U);W();s.scale(g).ticks(A/100).tickSize(-M,0);H.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+y.range()[0]+")");d3.transition(H.select(".nv-context .nv-x.nv-axis")).call(s);o.scale(y).ticks(M/36).tickSize(-A,0);d3.transition(H.select(".nv-context .nv-y.nv-axis")).call(o);H.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+y.range()[0]+")");u.dispatch.on("stateChange",function(e){k.update()});T.on("tooltipShow",function(e){if(E)C(e,L.parentNode)})});return k}var t=e.models.line(),n=e.models.line(),r=e.models.axis(),i=e.models.axis(),s=e.models.axis(),o=e.models.axis(),u=e.models.legend(),a=d3.svg.brush();var f={top:30,right:30,bottom:30,left:60},l={top:0,right:30,bottom:20,left:60},c=e.utils.defaultColor(),h=null,p=null,d=100,v,m,g,y,b=true,w=null,E=true,S=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},x="No Data Available.",T=d3.dispatch("tooltipShow","tooltipHide","brush"),N=250;t.clipEdge(true);n.interactive(false);r.orient("bottom").tickPadding(5);i.orient("left");s.orient("bottom").tickPadding(5);o.orient("left");var C=function(n,s){var o=n.pos[0]+(s.offsetLeft||0),u=n.pos[1]+(s.offsetTop||0),a=r.tickFormat()(t.x()(n.point,n.pointIndex)),f=i.tickFormat()(t.y()(n.point,n.pointIndex)),l=S(n.series.key,a,f,n,k);e.tooltip.show([o,u],l,null,null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+f.left,e.pos[1]+f.top];T.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){T.tooltipHide(e)});T.on("tooltipHide",function(){if(E)e.tooltip.cleanup()});k.dispatch=T;k.legend=u;k.lines=t;k.lines2=n;k.xAxis=r;k.yAxis=i;k.x2Axis=s;k.y2Axis=o;d3.rebind(k,t,"defined","isArea","size","xDomain","yDomain","xRange","yRange","forceX","forceY","interactive","clipEdge","clipVoronoi","id");k.options=e.utils.optionsFunc.bind(k);k.x=function(e){if(!arguments.length)return t.x;t.x(e);n.x(e);return k};k.y=function(e){if(!arguments.length)return t.y;t.y(e);n.y(e);return k};k.margin=function(e){if(!arguments.length)return f;f.top=typeof e.top!="undefined"?e.top:f.top;f.right=typeof e.right!="undefined"?e.right:f.right;f.bottom=typeof e.bottom!="undefined"?e.bottom:f.bottom;f.left=typeof e.left!="undefined"?e.left:f.left;return k};k.margin2=function(e){if(!arguments.length)return l;l=e;return k};k.width=function(e){if(!arguments.length)return h;h=e;return k};k.height=function(e){if(!arguments.length)return p;p=e;return k};k.height2=function(e){if(!arguments.length)return d;d=e;return k};k.color=function(t){if(!arguments.length)return c;c=e.utils.getColor(t);u.color(c);return k};k.showLegend=function(e){if(!arguments.length)return b;b=e;return k};k.tooltips=function(e){if(!arguments.length)return E;E=e;return k};k.tooltipContent=function(e){if(!arguments.length)return S;S=e;return k};k.interpolate=function(e){if(!arguments.length)return t.interpolate();t.interpolate(e);n.interpolate(e);return k};k.noData=function(e){if(!arguments.length)return x;x=e;return k};k.xTickFormat=function(e){if(!arguments.length)return r.tickFormat();r.tickFormat(e);s.tickFormat(e);return k};k.yTickFormat=function(e){if(!arguments.length)return i.tickFormat();i.tickFormat(e);o.tickFormat(e);return k};k.brushExtent=function(e){if(!arguments.length)return w;w=e;return k};k.transitionDuration=function(e){if(!arguments.length)return N;N=e;return k};return k};e.models.linePlusBarWithFocusChart=function(){"use strict";function B(e){e.each(function(e){function nt(e){var t=+(e=="e"),n=t?1:-1,r=q/3;return"M"+.5*n+","+r+"A6,6 0 0 "+t+" "+6.5*n+","+(r+6)+"V"+(2*r-6)+"A6,6 0 0 "+t+" "+.5*n+","+2*r+"Z"+"M"+2.5*n+","+(r+8)+"V"+(2*r-8)+"M"+4.5*n+","+(r+8)+"V"+(2*r-8)}function rt(){if(!h.empty())h.extent(x);Z.data([h.empty()?k.domain():x]).each(function(e,t){var n=k(e[0])-k.range()[0],r=k.range()[1]-k(e[1]);d3.select(this).select(".left").attr("width",n<0?0:n);d3.select(this).select(".right").attr("x",k(e[1])).attr("width",r<0?0:r)})}function it(){x=h.empty()?null:h.extent();S=h.empty()?k.domain():h.extent();D.brush({extent:S,brush:h});rt();r.width(F).height(I).color(e.map(function(e,t){return e.color||w(e,t)}).filter(function(t,n){return!e[n].disabled&&e[n].bar}));t.width(F).height(I).color(e.map(function(e,t){return e.color||w(e,t)}).filter(function(t,n){return!e[n].disabled&&!e[n].bar}));var n=J.select(".nv-focus .nv-barsWrap").datum(!U.length?[{values:[]}]:U.map(function(e,t){return{key:e.key,values:e.values.filter(function(e,t){return r.x()(e,t)>=S[0]&&r.x()(e,t)<=S[1]})}}));var i=J.select(".nv-focus .nv-linesWrap").datum(z[0].disabled?[{values:[]}]:z.map(function(e,n){return{key:e.key,values:e.values.filter(function(e,n){return t.x()(e,n)>=S[0]&&t.x()(e,n)<=S[1]})}}));if(U.length){C=r.xScale()}else{C=t.xScale()}s.scale(C).ticks(F/100).tickSize(-I,0);s.domain([Math.ceil(S[0]),Math.floor(S[1])]);J.select(".nv-x.nv-axis").transition().duration(P).call(s);n.transition().duration(P).call(r);i.transition().duration(P).call(t);J.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+L.range()[0]+")");u.scale(L).ticks(I/36).tickSize(-F,0);J.select(".nv-focus .nv-y1.nv-axis").style("opacity",U.length?1:0);a.scale(A).ticks(I/36).tickSize(U.length?0:-F,0);J.select(".nv-focus .nv-y2.nv-axis").style("opacity",z.length?1:0).attr("transform","translate("+C.range()[1]+",0)");J.select(".nv-focus .nv-y1.nv-axis").transition().duration(P).call(u);J.select(".nv-focus .nv-y2.nv-axis").transition().duration(P).call(a)}var N=d3.select(this),j=this;var F=(v||parseInt(N.style("width"))||960)-p.left-p.right,I=(m||parseInt(N.style("height"))||400)-p.top-p.bottom-g,q=g-d.top-d.bottom;B.update=function(){N.transition().duration(P).call(B)};B.container=this;if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var R=N.selectAll(".nv-noData").data([_]);R.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");R.attr("x",p.left+F/2).attr("y",p.top+I/2).text(function(e){return e});return B}else{N.selectAll(".nv-noData").remove()}var U=e.filter(function(e){return!e.disabled&&e.bar});var z=e.filter(function(e){return!e.bar});C=r.xScale();k=o.scale();L=r.yScale();A=t.yScale();O=i.yScale();M=n.yScale();var W=e.filter(function(e){return!e.disabled&&e.bar}).map(function(e){return e.values.map(function(e,t){return{x:y(e,t),y:b(e,t)}})});var X=e.filter(function(e){return!e.disabled&&!e.bar}).map(function(e){return e.values.map(function(e,t){return{x:y(e,t),y:b(e,t)}})});C.range([0,F]);k.domain(d3.extent(d3.merge(W.concat(X)),function(e){return e.x})).range([0,F]);var V=N.selectAll("g.nv-wrap.nv-linePlusBar").data([e]);var $=V.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g");var J=V.select("g");$.append("g").attr("class","nv-legendWrap");var K=$.append("g").attr("class","nv-focus");K.append("g").attr("class","nv-x nv-axis");K.append("g").attr("class","nv-y1 nv-axis");K.append("g").attr("class","nv-y2 nv-axis");K.append("g").attr("class","nv-barsWrap");K.append("g").attr("class","nv-linesWrap");var Q=$.append("g").attr("class","nv-context");Q.append("g").attr("class","nv-x nv-axis");Q.append("g").attr("class","nv-y1 nv-axis");Q.append("g").attr("class","nv-y2 nv-axis");Q.append("g").attr("class","nv-barsWrap");Q.append("g").attr("class","nv-linesWrap");Q.append("g").attr("class","nv-brushBackground");Q.append("g").attr("class","nv-x nv-brush");if(E){c.width(F/2);J.select(".nv-legendWrap").datum(e.map(function(e){e.originalKey=e.originalKey===undefined?e.key:e.originalKey;e.key=e.originalKey+(e.bar?" (left axis)":" (right axis)");return e})).call(c);if(p.top!=c.height()){p.top=c.height();I=(m||parseInt(N.style("height"))||400)-p.top-p.bottom-g}J.select(".nv-legendWrap").attr("transform","translate("+F/2+","+ -p.top+")")}V.attr("transform","translate("+p.left+","+p.top+")");i.width(F).height(q).color(e.map(function(e,t){return e.color||w(e,t)}).filter(function(t,n){return!e[n].disabled&&e[n].bar}));n.width(F).height(q).color(e.map(function(e,t){return e.color||w(e,t)}).filter(function(t,n){return!e[n].disabled&&!e[n].bar}));var G=J.select(".nv-context .nv-barsWrap").datum(U.length?U:[{values:[]}]);var Y=J.select(".nv-context .nv-linesWrap").datum(!z[0].disabled?z:[{values:[]}]);J.select(".nv-context").attr("transform","translate(0,"+(I+p.bottom+d.top)+")");G.transition().call(i);Y.transition().call(n);h.x(k).on("brush",it);if(x)h.extent(x);var Z=J.select(".nv-brushBackground").selectAll("g").data([x||h.extent()]);var et=Z.enter().append("g");et.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",q);et.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",q);var tt=J.select(".nv-x.nv-brush").call(h);tt.selectAll("rect").attr("height",q);tt.selectAll(".resize").append("path").attr("d",nt);o.ticks(F/100).tickSize(-q,0);J.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+O.range()[0]+")");J.select(".nv-context .nv-x.nv-axis").transition().call(o);f.scale(O).ticks(q/36).tickSize(-F,0);J.select(".nv-context .nv-y1.nv-axis").style("opacity",U.length?1:0).attr("transform","translate(0,"+k.range()[0]+")");J.select(".nv-context .nv-y1.nv-axis").transition().call(f);l.scale(M).ticks(q/36).tickSize(U.length?0:-F,0);J.select(".nv-context .nv-y2.nv-axis").style("opacity",z.length?1:0).attr("transform","translate("+k.range()[1]+",0)");J.select(".nv-context .nv-y2.nv-axis").transition().call(l);c.dispatch.on("stateChange",function(e){B.update()});D.on("tooltipShow",function(e){if(T)H(e,j.parentNode)});it()});return B}var t=e.models.line(),n=e.models.line(),r=e.models.historicalBar(),i=e.models.historicalBar(),s=e.models.axis(),o=e.models.axis(),u=e.models.axis(),a=e.models.axis(),f=e.models.axis(),l=e.models.axis(),c=e.models.legend(),h=d3.svg.brush();var p={top:30,right:30,bottom:30,left:60},d={top:0,right:30,bottom:20,left:60},v=null,m=null,g=100,y=function(e){return e.x},b=function(e){return e.y},w=e.utils.defaultColor(),E=true,S,x=null,T=true,N=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},C,k,L,A,O,M,_="No Data Available.",D=d3.dispatch("tooltipShow","tooltipHide","brush"),P=0;t.clipEdge(true);n.interactive(false);s.orient("bottom").tickPadding(5);u.orient("left");a.orient("right");o.orient("bottom").tickPadding(5);f.orient("left");l.orient("right");var H=function(n,r){if(S){n.pointIndex+=Math.ceil(S[0])}var i=n.pos[0]+(r.offsetLeft||0),o=n.pos[1]+(r.offsetTop||0),f=s.tickFormat()(t.x()(n.point,n.pointIndex)),l=(n.series.bar?u:a).tickFormat()(t.y()(n.point,n.pointIndex)),c=N(n.series.key,f,l,n,B);e.tooltip.show([i,o],c,n.value<0?"n":"s",null,r)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+p.left,e.pos[1]+p.top];D.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){D.tooltipHide(e)});r.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+p.left,e.pos[1]+p.top];D.tooltipShow(e)});r.dispatch.on("elementMouseout.tooltip",function(e){D.tooltipHide(e)});D.on("tooltipHide",function(){if(T)e.tooltip.cleanup()});B.dispatch=D;B.legend=c;B.lines=t;B.lines2=n;B.bars=r;B.bars2=i;B.xAxis=s;B.x2Axis=o;B.y1Axis=u;B.y2Axis=a;B.y3Axis=f;B.y4Axis=l;d3.rebind(B,t,"defined","size","clipVoronoi","interpolate");B.options=e.utils.optionsFunc.bind(B);B.x=function(e){if(!arguments.length)return y;y=e;t.x(e);r.x(e);return B};B.y=function(e){if(!arguments.length)return b;b=e;t.y(e);r.y(e);return B};B.margin=function(e){if(!arguments.length)return p;p.top=typeof e.top!="undefined"?e.top:p.top;p.right=typeof e.right!="undefined"?e.right:p.right;p.bottom=typeof e.bottom!="undefined"?e.bottom:p.bottom;p.left=typeof e.left!="undefined"?e.left:p.left;return B};B.width=function(e){if(!arguments.length)return v;v=e;return B};B.height=function(e){if(!arguments.length)return m;m=e;return B};B.color=function(t){if(!arguments.length)return w;w=e.utils.getColor(t);c.color(w);return B};B.showLegend=function(e){if(!arguments.length)return E;E=e;return B};B.tooltips=function(e){if(!arguments.length)return T;T=e;return B};B.tooltipContent=function(e){if(!arguments.length)return N;N=e;return B};B.noData=function(e){if(!arguments.length)return _;_=e;return B};B.brushExtent=function(e){if(!arguments.length)return x;x=e;return B};return B};e.models.multiBar=function(){"use strict";function C(e){e.each(function(e){var C=n-t.left-t.right,k=r-t.top-t.bottom,L=d3.select(this);if(d&&e.length)d=[{values:e[0].values.map(function(e){return{x:e.x,y:0,series:e.series,size:.01}})}];if(c)e=d3.layout.stack().offset(h).values(function(e){return e.values}).y(a)(!e.length&&d?d:e);e=e.map(function(e,t){e.values=e.values.map(function(e){e.series=t;return e});return e});if(c)e[0].values.map(function(t,n){var r=0,i=0;e.map(function(e){var t=e.values[n];t.size=Math.abs(t.y);if(t.y<0){t.y1=i;i=i-t.size}else{t.y1=t.size+r;r=r+t.size}})});var A=y&&b?[]:e.map(function(e){return e.values.map(function(e,t){return{x:u(e,t),y:a(e,t),y0:e.y0,y1:e.y1}})});i.domain(y||d3.merge(A).map(function(e){return e.x})).rangeBands(w||[0,C],S);s.domain(b||d3.extent(d3.merge(A).map(function(e){return c?e.y>0?e.y1:e.y1+e.y:e.y}).concat(f))).range(E||[k,0]);if(i.domain()[0]===i.domain()[1])i.domain()[0]?i.domain([i.domain()[0]-i.domain()[0]*.01,i.domain()[1]+i.domain()[1]*.01]):i.domain([-1,1]);if(s.domain()[0]===s.domain()[1])s.domain()[0]?s.domain([s.domain()[0]+s.domain()[0]*.01,s.domain()[1]-s.domain()[1]*.01]):s.domain([-1,1]);T=T||i;N=N||s;var O=L.selectAll("g.nv-wrap.nv-multibar").data([e]);var M=O.enter().append("g").attr("class","nvd3 nv-wrap nv-multibar");var _=M.append("defs");var D=M.append("g");var P=O.select("g");D.append("g").attr("class","nv-groups");O.attr("transform","translate("+t.left+","+t.top+")");_.append("clipPath").attr("id","nv-edge-clip-"+o).append("rect");O.select("#nv-edge-clip-"+o+" rect").attr("width",C).attr("height",k);P.attr("clip-path",l?"url(#nv-edge-clip-"+o+")":"");var H=O.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e,t){return t});H.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);H.exit().transition().selectAll("rect.nv-bar").delay(function(t,n){return n*g/e[0].values.length}).attr("y",function(e){return c?N(e.y0):N(0)}).attr("height",0).remove();H.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover}).style("fill",function(e,t){return p(e,t)}).style("stroke",function(e,t){return p(e,t)});H.transition().style("stroke-opacity",1).style("fill-opacity",.75);var B=H.selectAll("rect.nv-bar").data(function(t){return d&&!e.length?d.values:t.values});B.exit().remove();var j=B.enter().append("rect").attr("class",function(e,t){return a(e,t)<0?"nv-bar negative":"nv-bar positive"}).attr("x",function(t,n,r){return c?0:r*i.rangeBand()/e.length}).attr("y",function(e){return N(c?e.y0:0)}).attr("height",0).attr("width",i.rangeBand()/(c?1:e.length)).attr("transform",function(e,t){return"translate("+i(u(e,t))+",0)"});B.style("fill",function(e,t,n){return p(e,n,t)}).style("stroke",function(e,t,n){return p(e,n,t)}).on("mouseover",function(t,n){d3.select(this).classed("hover",true);x.elementMouseover({value:a(t,n),point:t,series:e[t.series],pos:[i(u(t,n))+i.rangeBand()*(c?e.length/2:t.series+.5)/e.length,s(a(t,n)+(c?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("mouseout",function(t,n){d3.select(this).classed("hover",false);x.elementMouseout({value:a(t,n),point:t,series:e[t.series],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("click",function(t,n){x.elementClick({value:a(t,n),point:t,series:e[t.series],pos:[i(u(t,n))+i.rangeBand()*(c?e.length/2:t.series+.5)/e.length,s(a(t,n)+(c?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event});d3.event.stopPropagation()}).on("dblclick",function(t,n){x.elementDblClick({value:a(t,n),point:t,series:e[t.series],pos:[i(u(t,n))+i.rangeBand()*(c?e.length/2:t.series+.5)/e.length,s(a(t,n)+(c?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event});d3.event.stopPropagation()});B.attr("class",function(e,t){return a(e,t)<0?"nv-bar negative":"nv-bar positive"}).transition().attr("transform",function(e,t){return"translate("+i(u(e,t))+",0)"});if(v){if(!m)m=e.map(function(){return true});B.style("fill",function(e,t,n){return d3.rgb(v(e,t)).darker(m.map(function(e,t){return t}).filter(function(e,t){return!m[t]})[n]).toString()}).style("stroke",function(e,t,n){return d3.rgb(v(e,t)).darker(m.map(function(e,t){return t}).filter(function(e,t){return!m[t]})[n]).toString()})}if(c)B.transition().delay(function(t,n){return n*g/e[0].values.length}).attr("y",function(e,t){return s(c?e.y1:0)}).attr("height",function(e,t){if(e.y==null)return 0;return Math.max(Math.abs(s(e.y+(c?e.y0:0))-s(c?e.y0:0)),1)}).attr("x",function(t,n){return c?0:t.series*i.rangeBand()/e.length}).attr("width",i.rangeBand()/(c?1:e.length));else B.transition().delay(function(t,n){return n*g/e[0].values.length}).attr("x",function(t,n){return t.series*i.rangeBand()/e.length}).attr("width",i.rangeBand()/e.length).attr("y",function(e,t){return a(e,t)<0?s(0):s(0)-s(a(e,t))<1?s(0)-1:s(a(e,t))||0}).attr("height",function(e,t){if(e.y==null)return 0;return Math.max(Math.abs(s(a(e,t))-s(0)),1)||0});T=i.copy();N=s.copy()});return C}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=d3.scale.ordinal(),s=d3.scale.linear(),o=Math.floor(Math.random()*1e4),u=function(e){return e.x},a=function(e){return e.y},f=[0],l=true,c=false,h="zero",p=e.utils.defaultColor(),d=false,v=null,m,g=1200,y,b,w,E,S=.1,x=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");var T,N;C.dispatch=x;C.options=e.utils.optionsFunc.bind(C);C.x=function(e){if(!arguments.length)return u;u=e;return C};C.y=function(e){if(!arguments.length)return a;a=e;return C};C.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return C};C.width=function(e){if(!arguments.length)return n;n=e;return C};C.height=function(e){if(!arguments.length)return r;r=e;return C};C.xScale=function(e){if(!arguments.length)return i;i=e;return C};C.yScale=function(e){if(!arguments.length)return s;s=e;return C};C.xDomain=function(e){if(!arguments.length)return y;y=e;return C};C.yDomain=function(e){if(!arguments.length)return b;b=e;return C};C.xRange=function(e){if(!arguments.length)return w;w=e;return C};C.yRange=function(e){if(!arguments.length)return E;E=e;return C};C.forceY=function(e){if(!arguments.length)return f;f=e;return C};C.stacked=function(e){if(!arguments.length)return c;c=e;return C};C.stackOffset=function(e){if(!arguments.length)return h;h=e;return C};C.clipEdge=function(e){if(!arguments.length)return l;l=e;return C};C.color=function(t){if(!arguments.length)return p;p=e.utils.getColor(t);return C};C.barColor=function(t){if(!arguments.length)return v;v=e.utils.getColor(t);return C};C.disabled=function(e){if(!arguments.length)return m;m=e;return C};C.id=function(e){if(!arguments.length)return o;o=e;return C};C.hideable=function(e){if(!arguments.length)return d;d=e;return C};C.delay=function(e){if(!arguments.length)return g;g=e;return C};C.groupSpacing=function(e){if(!arguments.length)return S;S=e;return C};return C};e.models.multiBarChart=function(){"use strict";function M(e){e.each(function(e){var h=d3.select(this),E=this;var _=(u||parseInt(h.style("width"))||960)-o.left-o.right,D=(a||parseInt(h.style("height"))||400)-o.top-o.bottom;M.update=function(){h.transition().duration(A).call(M)};M.container=this;if(w=="right")_=_-250;T.disabled=e.map(function(e){return!!e.disabled});if(!N){var P;N={};for(P in T){if(T[P]instanceof Array)N[P]=T[P].slice(0);else N[P]=T[P]}}if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var H=h.selectAll(".nv-noData").data([C]);H.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");H.attr("x",o.left+_/2).attr("y",o.top+D/2).text(function(e){return e});return M}else{h.selectAll(".nv-noData").remove()}S=t.xScale();x=t.yScale();var B=h.selectAll("g.nv-wrap.nv-multiBarWithLegend").data([e]);var j=B.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarWithLegend").append("g");var F=B.select("g");j.append("g").attr("class","nv-x nv-axis");j.append("g").attr("class","nv-y nv-axis");j.append("g").attr("class","nv-barsWrap");j.append("g").attr("class","nv-legendWrap");j.append("g").attr("class","nv-controlsWrap");if(c){i.width(_-L());if(t.barColor())e.forEach(function(e,t){e.color=d3.rgb("#ccc").darker(t*1.5).toString()});F.select(".nv-legendWrap").datum(e).call(i);if(o.top!=i.height()){o.top=i.height();D=(a||parseInt(h.style("height"))||400)-o.top-o.bottom}if(w=="right"){F.select(".nv-legendWrap").attr("transform","translate("+_+","+(-o.top+20+30)+")")}else{F.select(".nv-legendWrap").attr("transform","translate("+L()+","+ -o.top+")")}}if(l){var I=[{key:"Grouped",disabled:t.stacked()},{key:"Stacked",disabled:!t.stacked()}];s.width(L()).color(["#444","#444","#444"]);F.select(".nv-controlsWrap").datum(I).call(s);if(w=="right"){F.select(".nv-controlsWrap").attr("transform","translate("+_+","+(-o.top+20)+")")}else{F.select(".nv-controlsWrap").attr("transform","translate("+0+","+ -o.top+")")}}B.attr("transform","translate("+o.left+","+o.top+")");if(v){F.select(".nv-y.nv-axis").attr("transform","translate("+_+",0)")}t.disabled(e.map(function(e){return e.disabled})).width(_).height(D).color(e.map(function(e,t){return e.color||f(e,t)}).filter(function(t,n){return!e[n].disabled}));var q=F.select(".nv-barsWrap").datum(e.filter(function(e){return!e.disabled}));q.transition().call(t);if(p){n.scale(S).ticks(_/100).tickSize(-D,0);F.select(".nv-x.nv-axis").attr("transform","translate(0,"+x.range()[0]+")");F.select(".nv-x.nv-axis").transition().call(n);var R=F.select(".nv-x.nv-axis > g").selectAll("g");R.selectAll("line, text").style("opacity",1);if(g){var U=function(e,t){return"translate("+e+","+t+")"};var z=5,W=17;R.selectAll("text").attr("transform",function(e,t,n){return U(0,n%2==0?z:W)});var X=d3.selectAll(".nv-x.nv-axis .nv-wrap g g text")[0].length;F.selectAll(".nv-x.nv-axis .nv-axisMaxMin text").attr("transform",function(e,t){return U(0,t===0||X%2!==0?W:z)})}if(m)R.filter(function(t,n){return n%Math.ceil(e[0].values.length/(_/100))!==0}).selectAll("text, line").style("opacity",0);if(y)R.selectAll(".tick text").attr("transform","rotate("+y+" 0,0)").style("text-anchor",y>0?"start":"end");F.select(".nv-x.nv-axis").selectAll("g.nv-axisMaxMin text").style("opacity",1)}if(d){r.scale(x).ticks(D/36).tickSize(-_,0);F.select(".nv-y.nv-axis").transition().call(r)}i.dispatch.on("stateChange",function(e){T=e;k.stateChange(T);M.update()});s.dispatch.on("legendClick",function(e,n){if(!e.disabled)return;I=I.map(function(e){e.disabled=true;return e});e.disabled=false;switch(e.key){case"Grouped":t.stacked(false);break;case"Stacked":t.stacked(true);break}T.stacked=t.stacked();k.stateChange(T);M.update()});k.on("tooltipShow",function(e){if(b)O(e,E.parentNode)});k.on("changeState",function(n){if(typeof n.disabled!=="undefined"){e.forEach(function(e,t){e.disabled=n.disabled[t]});T.disabled=n.disabled}if(typeof n.stacked!=="undefined"){t.stacked(n.stacked);T.stacked=n.stacked}M.update()})});return M}var t=e.models.multiBar(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend();var o={top:30,right:20,bottom:50,left:60},u=null,a=null,f=e.utils.defaultColor(),l=true,c=true,h=false,p=true,d=true,v=false,m=true,g=false,y=0,b=true,w="top",E=function(e,t,n,r,i,s){if(s){var o=d3.format(",.2f");return"<h3>"+e+"</h3>"+"<p>"+o(Math.pow(10,n))+" on "+t+"</p>"}else{return"<h3>"+e+"</h3>"+"<p>"+n+" on "+t+"</p>"}},S,x,T={stacked:false},N=null,C="No Data Available.",k=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),L=function(){return l?180:0},A=250;t.stacked(false);n.orient("bottom").tickPadding(7).highlightZero(true).showMaxMin(false).tickFormat(function(e){return e});r.orient(v?"right":"left").tickFormat(d3.format(",.1f"));s.updateState(false);var O=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=E(i.series.key,a,f,i,M,h);e.tooltip.show([o,u],l,i.value<0?"n":"s",null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+o.left,e.pos[1]+o.top];k.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){k.tooltipHide(e)});k.on("tooltipHide",function(){if(b)e.tooltip.cleanup()});M.dispatch=k;M.multibar=t;M.legend=i;M.xAxis=n;M.yAxis=r;d3.rebind(M,t,"x","y","xDomain","yDomain","xRange","yRange","forceX","forceY","clipEdge","id","stacked","stackOffset","delay","barColor","groupSpacing");M.options=e.utils.optionsFunc.bind(M);M.margin=function(e){if(!arguments.length)return o;o.top=typeof e.top!="undefined"?e.top:o.top;o.right=typeof e.right!="undefined"?e.right:o.right;o.bottom=typeof e.bottom!="undefined"?e.bottom:o.bottom;o.left=typeof e.left!="undefined"?e.left:o.left;return M};M.width=function(e){if(!arguments.length)return u;u=e;return M};M.height=function(e){if(!arguments.length)return a;a=e;return M};M.color=function(t){if(!arguments.length)return f;f=e.utils.getColor(t);i.color(f);return M};M.showControls=function(e){if(!arguments.length)return l;l=e;return M};M.showLegend=function(e){if(!arguments.length)return c;c=e;return M};M.logScale=function(e){if(!arguments.length)return h;h=e;return M};M.showXAxis=function(e){if(!arguments.length)return p;p=e;return M};M.showYAxis=function(e){if(!arguments.length)return d;d=e;return M};M.rightAlignYAxis=function(e){if(!arguments.length)return v;v=e;r.orient(e?"right":"left");return M};M.reduceXTicks=function(e){if(!arguments.length)return m;m=e;return M};M.rotateLabels=function(e){if(!arguments.length)return y;y=e;return M};M.staggerLabels=function(e){if(!arguments.length)return g;g=e;return M};M.tooltip=function(e){if(!arguments.length)return E;E=e;return M};M.tooltips=function(e){if(!arguments.length)return b;b=e;return M};M.legendPos=function(e){if(!arguments.length)return w;w=e;return M};M.tooltipContent=function(e){if(!arguments.length)return E;E=e;return M};M.state=function(e){if(!arguments.length)return T;T=e;return M};M.defaultState=function(e){if(!arguments.length)return N;N=e;return M};M.noData=function(e){if(!arguments.length)return C;C=e;return M};M.transitionDuration=function(e){if(!arguments.length)return A;A=e;return M};return M};e.models.multiBarHorizontal=function(){"use strict";function N(e){e.each(function(e){var i=n-t.left-t.right,g=r-t.top-t.bottom,N=d3.select(this);if(p)e=d3.layout.stack().offset("zero").values(function(e){return e.values}).y(a)(e);e=e.map(function(e,t){e.values=e.values.map(function(e){e.series=t;return e});return e});if(p)e[0].values.map(function(t,n){var r=0,i=0;e.map(function(e){var t=e.values[n];t.size=Math.abs(t.y);if(t.y<0){t.y1=i-t.size;i=i-t.size}else{t.y1=r;r=r+t.size}})});var C=y&&b?[]:e.map(function(e){return e.values.map(function(e,t){return{x:u(e,t),y:a(e,t),y0:e.y0,y1:e.y1}})});s.domain(y||d3.merge(C).map(function(e){return e.x})).rangeBands(w||[0,g],.1);o.domain(b||d3.extent(d3.merge(C).map(function(e){return p?e.y>0?e.y1+e.y:e.y1:e.y}).concat(f)));if(d&&!p)o.range(E||[o.domain()[0]<0?v:0,i-(o.domain()[1]>0?v:0)]);else o.range(E||[0,i]);x=x||s;T=T||d3.scale.linear().domain(o.domain()).range([o(0),o(0)]);var k=d3.select(this).selectAll("g.nv-wrap.nv-multibarHorizontal").data([e]);var L=k.enter().append("g").attr("class","nvd3 nv-wrap nv-multibarHorizontal");var A=L.append("defs");var O=L.append("g");var M=k.select("g");O.append("g").attr("class","nv-groups");k.attr("transform","translate("+t.left+","+t.top+")");var _=k.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e,t){return t});_.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);_.exit().transition().style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove();_.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover}).style("fill",function(e,t){return l(e,t)}).style("stroke",function(e,t){return l(e,t)});_.transition().style("stroke-opacity",1).style("fill-opacity",.75);var D=_.selectAll("g.nv-bar").data(function(e){return e.values});D.exit().remove();var P=D.enter().append("g").attr("transform",function(t,n,r){return"translate("+T(p?t.y0:0)+","+(p?0:r*s.rangeBand()/e.length+s(u(t,n)))+")"});P.append("rect").attr("width",0).attr("height",s.rangeBand()/(p?1:e.length));D.on("mouseover",function(t,n){d3.select(this).classed("hover",true);S.elementMouseover({value:a(t,n),point:t,series:e[t.series],pos:[o(a(t,n)+(p?t.y0:0)),s(u(t,n))+s.rangeBand()*(p?e.length/2:t.series+.5)/e.length],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("mouseout",function(t,n){d3.select(this).classed("hover",false);S.elementMouseout({value:a(t,n),point:t,series:e[t.series],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("click",function(t,n){S.elementClick({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(p?e.length/2:t.series+.5)/e.length,o(a(t,n)+(p?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event});d3.event.stopPropagation()}).on("dblclick",function(t,n){S.elementDblClick({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(p?e.length/2:t.series+.5)/e.length,o(a(t,n)+(p?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event});d3.event.stopPropagation()});P.append("text");if(d&&!p){D.select("text").attr("text-anchor",function(e,t){return a(e,t)<0?"end":"start"}).attr("y",s.rangeBand()/(e.length*2)).attr("dy",".32em").text(function(e,t){return m(a(e,t))});D.transition().select("text").attr("x",function(e,t){return a(e,t)<0?-4:o(a(e,t))-o(0)+4})}else{D.selectAll("text").text("")}D.attr("class",function(e,t){return a(e,t)<0?"nv-bar negative":"nv-bar positive"});if(c){if(!h)h=e.map(function(){return true});D.style("fill",function(e,t,n){return d3.rgb(c(e,t)).darker(h.map(function(e,t){return t}).filter(function(e,t){return!h[t]})[n]).toString()}).style("stroke",function(e,t,n){return d3.rgb(c(e,t)).darker(h.map(function(e,t){return t}).filter(function(e,t){return!h[t]})[n]).toString()})}if(p)D.transition().attr("transform",function(e,t){return"translate("+o(e.y1)+","+s(u(e,t))+")"}).select("rect").attr("width",function(e,t){return Math.abs(o(a(e,t)+e.y0)-o(e.y0))}).attr("height",s.rangeBand());else D.transition().attr("transform",function(t,n){return"translate("+(a(t,n)<0?o(a(t,n)):o(0))+","+(t.series*s.rangeBand()/e.length+s(u(t,n)))+")"}).select("rect").attr("height",s.rangeBand()/e.length).attr("width",function(e,t){return Math.max(Math.abs(o(a(e,t))-o(0)),1)});x=s.copy();T=o.copy()});return N}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=Math.floor(Math.random()*1e4),s=d3.scale.ordinal(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=[0],l=e.utils.defaultColor(),c=null,h,p=false,d=false,v=60,m=d3.format(",.2f"),g=1200,y,b,w,E,S=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");var x,T;N.dispatch=S;N.options=e.utils.optionsFunc.bind(N);N.x=function(e){if(!arguments.length)return u;u=e;return N};N.y=function(e){if(!arguments.length)return a;a=e;return N};N.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return N};N.width=function(e){if(!arguments.length)return n;n=e;return N};N.height=function(e){if(!arguments.length)return r;r=e;return N};N.xScale=function(e){if(!arguments.length)return s;s=e;return N};N.yScale=function(e){if(!arguments.length)return o;o=e;return N};N.xDomain=function(e){if(!arguments.length)return y;y=e;return N};N.yDomain=function(e){if(!arguments.length)return b;b=e;return N};N.xRange=function(e){if(!arguments.length)return w;w=e;return N};N.yRange=function(e){if(!arguments.length)return E;E=e;return N};N.forceY=function(e){if(!arguments.length)return f;f=e;return N};N.stacked=function(e){if(!arguments.length)return p;p=e;return N};N.color=function(t){if(!arguments.length)return l;l=e.utils.getColor(t);return N};N.barColor=function(t){if(!arguments.length)return c;c=e.utils.getColor(t);return N};N.disabled=function(e){if(!arguments.length)return h;h=e;return N};N.id=function(e){if(!arguments.length)return i;i=e;return N};N.delay=function(e){if(!arguments.length)return g;g=e;return N};N.showValues=function(e){if(!arguments.length)return d;d=e;return N};N.valueFormat=function(e){if(!arguments.length)return m;m=e;return N};N.valuePadding=function(e){if(!arguments.length)return v;v=e;return N};return N};e.models.multiBarHorizontalChart=function(){"use strict";function C(e){e.each(function(h){var p=d3.select(this),m=this;var k=(u||parseInt(p.style("width"))||960)-o.left-o.right,L=(a||parseInt(p.style("height"))||400)-o.top-o.bottom;C.update=function(){p.transition().duration(T).call(C)};C.container=this;if(v=="right")k=k-250;b.disabled=h.map(function(e){return!!e.disabled});if(!w){var A;w={};for(A in b){if(b[A]instanceof Array)w[A]=b[A].slice(0);else w[A]=b[A]}}if(!h||!h.length||!h.filter(function(e){return e.values.length}).length){var O=p.selectAll(".nv-noData").data([E]);O.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");O.attr("x",o.left+k/2).attr("y",o.top+L/2).text(function(e){return e});return C}else{p.selectAll(".nv-noData").remove()}g=t.xScale();y=t.yScale();var M=p.selectAll("g.nv-wrap.nv-multiBarHorizontalChart").data([h]);var _=M.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarHorizontalChart").append("g");var D=M.select("g");_.append("g").attr("class","nv-x nv-axis");_.append("g").attr("class","nv-y nv-axis");_.append("g").attr("class","nv-barsWrap");_.append("g").attr("class","nv-legendWrap");_.append("g").attr("class","nv-controlsWrap");if(c){i.width(k-x());if(t.barColor())h.forEach(function(e,t){e.color=d3.rgb("#ccc").darker(t*1.5).toString()});D.select(".nv-legendWrap").datum(h).call(i);if(o.top!=i.height()){o.top=i.height();L=(a||parseInt(p.style("height"))||400)-o.top-o.bottom}if(v=="right"){D.select(".nv-legendWrap").attr("transform","translate("+x()+","+20+")")}else{D.select(".nv-legendWrap").attr("transform","translate("+x()+","+ -o.top+")")}}if(l){var P=[{key:"Grouped",disabled:t.stacked()},{key:"Stacked",disabled:!t.stacked()}];s.width(x()).color(["#444","#444","#444"]);D.select(".nv-controlsWrap").datum(P).attr("transform","translate(0,"+ -o.top+")").call(s)}M.attr("transform","translate("+o.left+","+o.top+")");t.disabled(h.map(function(e){return e.disabled})).width(k).height(L).color(h.map(function(e,t){return e.color||f(e,t)}).filter(function(e,t){return!h[t].disabled}));var H=D.select(".nv-barsWrap").datum(h.filter(function(e){return!e.disabled}));H.transition().call(t);n.scale(g).ticks(L/24).tickSize(-k,0);D.select(".nv-x.nv-axis").transition().call(n);var B=D.select(".nv-x.nv-axis").selectAll("g");B.selectAll("line, text").style("opacity",1);r.scale(y).ticks(k/100).tickSize(-L,0);D.select(".nv-y.nv-axis").attr("transform","translate(0,"+L+")");D.select(".nv-y.nv-axis").transition().call(r);i.dispatch.on("stateChange",function(e){b=e;S.stateChange(b);C.update()});s.dispatch.on("legendClick",function(e,n){if(!e.disabled)return;P=P.map(function(e){e.disabled=true;return e});e.disabled=false;switch(e.key){case"Grouped":t.stacked(false);break;case"Stacked":t.stacked(true);break}b.stacked=t.stacked();S.stateChange(b);C.update()});S.on("tooltipShow",function(e){if(d)N(e,m.parentNode)});S.on("changeState",function(n){if(typeof n.disabled!=="undefined"){h.forEach(function(e,t){e.disabled=n.disabled[t]});b.disabled=n.disabled}if(typeof n.stacked!=="undefined"){t.stacked(n.stacked);b.stacked=n.stacked}e.call(C)})});return C}var t=e.models.multiBarHorizontal(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend().height(30),s=e.models.legend().height(30);var o={top:30,right:20,bottom:50,left:60},u=null,a=null,f=e.utils.defaultColor(),l=true,c=true,h=false,p=false,d=true,v="top",m=function(e,t,n,i,s,o){if(o){return"<h3>"+e+" - "+t+"</h3>"+"<p>"+r.tickFormat()(Math.pow(10,n))+"</p>"}else{return"<h3>"+e+" - "+t+"</h3>"+"<p>"+n+"</p>"}},g,y,b={stacked:p},w=null,E="No Data Available.",S=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),x=function(){return l?180:0},T=250;t.stacked(p);n.orient("left").tickPadding(5).highlightZero(false).showMaxMin(false).tickFormat(function(e){return e});r.orient("bottom").tickFormat(d3.format(",.1f"));s.updateState(false);var N=function(i,s){var o=0;if(i.pos[0]>=200)o=200;else o=i.pos[0];if(h)l=t.y()(i.point,i.pointIndex);else l=r.tickFormat()(t.y()(i.point,i.pointIndex));var u=o+(s.offsetLeft||0),a=i.pos[1]+(s.offsetTop||0),f=n.tickFormat()(t.x()(i.point,i.pointIndex)),l=r.tickFormat()(t.y()(i.point,i.pointIndex)),c=m(i.series.key,f,l,i,C,h);e.tooltip.show([u,a],c,i.value<0?"e":"w",null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+o.left,e.pos[1]+o.top];S.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){S.tooltipHide(e)});S.on("tooltipHide",function(){if(d)e.tooltip.cleanup()});C.dispatch=S;C.multibar=t;C.legend=i;C.xAxis=n;C.yAxis=r;d3.rebind(C,t,"x","y","xDomain","yDomain","xRange","yRange","forceX","forceY","clipEdge","id","delay","showValues","valueFormat","stacked","barColor");C.options=e.utils.optionsFunc.bind(C);C.margin=function(e){if(!arguments.length)return o;o.top=typeof e.top!="undefined"?e.top:o.top;o.right=typeof e.right!="undefined"?e.right:o.right;o.bottom=typeof e.bottom!="undefined"?e.bottom:o.bottom;o.left=typeof e.left!="undefined"?e.left:o.left;return C};C.width=function(e){if(!arguments.length)return u;u=e;return C};C.height=function(e){if(!arguments.length)return a;a=e;return C};C.color=function(t){if(!arguments.length)return f;f=e.utils.getColor(t);i.color(f);return C};C.showControls=function(e){if(!arguments.length)return l;l=e;return C};C.showLegend=function(e){if(!arguments.length)return c;c=e;return C};C.logScale=function(e){if(!arguments.length)return h;h=e;return C};C.tooltip=function(e){if(!arguments.length)return m;m=e;return C};C.tooltips=function(e){if(!arguments.length)return d;d=e;return C};C.legendPos=function(e){if(!arguments.length)return v;v=e;return C};C.tooltipContent=function(e){if(!arguments.length)return m;m=e;return C};C.state=function(e){if(!arguments.length)return b;b=e;return C};C.defaultState=function(e){if(!arguments.length)return w;w=e;return C};C.noData=function(e){if(!arguments.length)return E;E=e;return C};C.transitionDuration=function(e){if(!arguments.length)return T;T=e;return C};return C};e.models.multiChart=function(){"use strict";function L(e){e.each(function(e){var f=d3.select(this),c=this;L.update=function(){f.transition().call(L)};L.container=this;var h=(r||parseInt(f.style("width"))||960)-t.left-t.right,p=(i||parseInt(f.style("height"))||400)-t.top-t.bottom;if(a=="right")h=h-250;var A=e.filter(function(e){return!e.disabled&&e.type=="line"&&e.yAxis==1});var O=e.filter(function(e){return!e.disabled&&e.type=="line"&&e.yAxis==2});var M=e.filter(function(e){return!e.disabled&&e.type=="bar"&&e.yAxis==1});var _=e.filter(function(e){return!e.disabled&&e.type=="bar"&&e.yAxis==2});var D=e.filter(function(e){return!e.disabled&&e.type=="area"&&e.yAxis==1});var P=e.filter(function(e){return!e.disabled&&e.type=="area"&&e.yAxis==2});var H=e.filter(function(e){return!e.disabled&&e.yAxis==1}).map(function(e){return e.values.map(function(e,t){return{x:e.x,y:e.y}})});var B=e.filter(function(e){return!e.disabled&&e.yAxis==2}).map(function(e){return e.values.map(function(e,t){return{x:e.x,y:e.y}})});l.domain(d3.extent(d3.merge(H.concat(B)),function(e){return e.x})).range([0,h]);var j=f.selectAll("g.wrap.multiChart").data([e]);var F=j.enter().append("g").attr("class","wrap nvd3 multiChart").append("g");F.append("g").attr("class","x axis");F.append("g").attr("class","y1 axis");F.append("g").attr("class","y2 axis");F.append("g").attr("class","lines1Wrap");F.append("g").attr("class","lines2Wrap");F.append("g").attr("class","bars1Wrap");F.append("g").attr("class","bars2Wrap");F.append("g").attr("class","stack1Wrap");F.append("g").attr("class","stack2Wrap");F.append("g").attr("class","legendWrap");var I=j.select("g");if(s){N.width(h/2);I.select(".legendWrap").datum(e.map(function(e){e.originalKey=e.originalKey===undefined?e.key:e.originalKey;e.key=e.originalKey+(e.yAxis==1?"":" (right axis)");return e})).call(N);if(t.top!=N.height()){t.top=N.height();p=(i||parseInt(f.style("height"))||400)-t.top-t.bottom}if(a=="right"){I.select(".legendWrap").attr("transform","translate("+h+","+20+")")}else{I.select(".legendWrap").attr("transform","translate("+h/2+","+ -t.top+")")}}m.width(h).height(p).interpolate("monotone").color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==1&&e[n].type=="line"}));g.width(h).height(p).interpolate("monotone").color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==2&&e[n].type=="line"}));y.width(h).height(p).color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==1&&e[n].type=="bar"}));b.width(h).height(p).color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==2&&e[n].type=="bar"}));w.width(h).height(p).color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==1&&e[n].type=="area"}));E.width(h).height(p).color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==2&&e[n].type=="area"}));if(a=="right"){I.attr("transform","translate("+t.left+","+"20"+")")}else{I.attr("transform","translate("+t.left+","+t.top+")")}var q=I.select(".lines1Wrap").datum(A);var R=I.select(".bars1Wrap").datum(M);var U=I.select(".stack1Wrap").datum(D);var z=I.select(".lines2Wrap").datum(O);var W=I.select(".bars2Wrap").datum(_);var X=I.select(".stack2Wrap").datum(P);var V=D.length?D.map(function(e){return e.values}).reduce(function(e,t){return e.map(function(e,n){return{x:e.x,y:e.y+t[n].y}})}).concat([{x:0,y:0}]):[];var $=P.length?P.map(function(e){return e.values}).reduce(function(e,t){return e.map(function(e,n){return{x:e.x,y:e.y+t[n].y}})}).concat([{x:0,y:0}]):[];d.domain(d3.extent(d3.extent(d3.merge(H).concat(V),function(e){return e.y}).concat(m.forceY()))).range([0,p]);v.domain(d3.extent(d3.extent(d3.merge(B).concat($),function(e){return e.y}).concat(g.forceY()))).range([0,p]);m.yDomain(d.domain());y.yDomain(d.domain());w.yDomain(d.domain());g.yDomain(v.domain());b.yDomain(v.domain());E.yDomain(v.domain());if(D.length){d3.transition(U).call(w)}if(P.length){d3.transition(X).call(E)}if(M.length){d3.transition(R).call(y)}if(_.length){d3.transition(W).call(b)}if(A.length){d3.transition(q).call(m)}if(O.length){d3.transition(z).call(g)}S.ticks(h/100).tickSize(-p,0);I.select(".x.axis").attr("transform","translate(0,"+p+")");d3.transition(I.select(".x.axis")).call(S);x.ticks(p/36).tickSize(-h,0);d3.transition(I.select(".y1.axis")).call(x);T.ticks(p/36).tickSize(-h,0);d3.transition(I.select(".y2.axis")).call(T);I.select(".y2.axis").style("opacity",B.length?1:0).attr("transform","translate("+l.range()[1]+",0)");N.dispatch.on("stateChange",function(e){L.update()});if(u){N.dualaxis(true)}else{N.dualaxis(false)}C.on("tooltipShow",function(e){if(o)k(e,c.parentNode)})});return L}var t={top:30,right:20,bottom:50,left:60},n=d3.scale.category20().range(),r=null,i=null,s=true,o=true,u=false,a="top",f=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},l,c,h,p;var l=d3.scale.linear(),d=d3.scale.linear(),v=d3.scale.linear(),m=e.models.line().yScale(d),g=e.models.line().yScale(v),y=e.models.multiBar().stacked(false).yScale(d),b=e.models.multiBar().stacked(false).yScale(v),w=e.models.stackedArea().yScale(d),E=e.models.stackedArea().yScale(v),S=e.models.axis().scale(l).orient("bottom").tickPadding(5),x=e.models.axis().scale(d).orient("left"),T=e.models.axis().scale(v).orient("right"),N=e.models.legend().height(30),C=d3.dispatch("tooltipShow","tooltipHide");var k=function(t,n){var r=t.pos[0]+(n.offsetLeft||0),i=t.pos[1]+(n.offsetTop||0),s=S.tickFormat()(m.x()(t.point,t.pointIndex)),o=(t.series.yAxis==2?T:x).tickFormat()(m.y()(t.point,t.pointIndex)),u=f(t.series.key,s,o,t,L);e.tooltip.show([r,i],u,undefined,undefined,n.offsetParent)};m.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top];C.tooltipShow(e)});m.dispatch.on("elementMouseout.tooltip",function(e){C.tooltipHide(e)});g.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top];C.tooltipShow(e)});g.dispatch.on("elementMouseout.tooltip",function(e){C.tooltipHide(e)});y.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top];C.tooltipShow(e)});y.dispatch.on("elementMouseout.tooltip",function(e){C.tooltipHide(e)});b.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top];C.tooltipShow(e)});b.dispatch.on("elementMouseout.tooltip",function(e){C.tooltipHide(e)});w.dispatch.on("tooltipShow",function(e){if(!Math.round(w.y()(e.point)*100)){setTimeout(function(){d3.selectAll(".point.hover").classed("hover",false)},0);return false}e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],C.tooltipShow(e)});w.dispatch.on("tooltipHide",function(e){C.tooltipHide(e)});E.dispatch.on("tooltipShow",function(e){if(!Math.round(E.y()(e.point)*100)){setTimeout(function(){d3.selectAll(".point.hover").classed("hover",false)},0);return false}e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],C.tooltipShow(e)});E.dispatch.on("tooltipHide",function(e){C.tooltipHide(e)});m.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top];C.tooltipShow(e)});m.dispatch.on("elementMouseout.tooltip",function(e){C.tooltipHide(e)});g.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top];C.tooltipShow(e)});g.dispatch.on("elementMouseout.tooltip",function(e){C.tooltipHide(e)});C.on("tooltipHide",function(){if(o)e.tooltip.cleanup()});L.dispatch=C;L.lines1=m;L.lines2=g;L.bars1=y;L.bars2=b;L.stack1=w;L.stack2=E;L.xAxis=S;L.yAxis1=x;L.yAxis2=T;L.options=e.utils.optionsFunc.bind(L);L.x=function(e){if(!arguments.length)return getX;getX=e;m.x(e);y.x(e);return L};L.y=function(e){if(!arguments.length)return getY;getY=e;m.y(e);y.y(e);return L};L.yDomain1=function(e){if(!arguments.length)return h;h=e;return L};L.yDomain2=function(e){if(!arguments.length)return p;p=e;return L};L.margin=function(e){if(!arguments.length)return t;t=e;return L};L.width=function(e){if(!arguments.length)return r;r=e;return L};L.height=function(e){if(!arguments.length)return i;i=e;return L};L.color=function(e){if(!arguments.length)return n;n=e;N.color(e);return L};L.showLegend=function(e){if(!arguments.length)return s;s=e;return L};L.tooltips=function(e){if(!arguments.length)return o;o=e;return L};L.dualaxis=function(e){if(!arguments.length)return u;u=e;return L};L.legendPos=function(e){if(!arguments.length)return a;a=e;return L};L.tooltipContent=function(e){if(!arguments.length)return f;f=e;return L};return L};e.models.ohlcBar=function(){"use strict";function x(e){e.each(function(e){var g=n-t.left-t.right,x=r-t.top-t.bottom,T=d3.select(this);s.domain(y||d3.extent(e[0].values.map(u).concat(p)));if(v)s.range(w||[g*.5/e[0].values.length,g*(e[0].values.length-.5)/e[0].values.length]);else s.range(w||[0,g]);o.domain(b||[d3.min(e[0].values.map(h).concat(d)),d3.max(e[0].values.map(c).concat(d))]).range(E||[x,0]);if(s.domain()[0]===s.domain()[1])s.domain()[0]?s.domain([s.domain()[0]-s.domain()[0]*.01,s.domain()[1]+s.domain()[1]*.01]):s.domain([-1,1]);if(o.domain()[0]===o.domain()[1])o.domain()[0]?o.domain([o.domain()[0]+o.domain()[0]*.01,o.domain()[1]-o.domain()[1]*.01]):o.domain([-1,1]);var N=d3.select(this).selectAll("g.nv-wrap.nv-ohlcBar").data([e[0].values]);var C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-ohlcBar");var k=C.append("defs");var L=C.append("g");var A=N.select("g");L.append("g").attr("class","nv-ticks");N.attr("transform","translate("+t.left+","+t.top+")");T.on("click",function(e,t){S.chartClick({data:e,index:t,pos:d3.event,id:i})});k.append("clipPath").attr("id","nv-chart-clip-path-"+i).append("rect");N.select("#nv-chart-clip-path-"+i+" rect").attr("width",g).attr("height",x);A.attr("clip-path",m?"url(#nv-chart-clip-path-"+i+")":"");var O=N.select(".nv-ticks").selectAll(".nv-tick").data(function(e){return e});O.exit().remove();var M=O.enter().append("path").attr("class",function(e,t,n){return(f(e,t)>l(e,t)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+n+"-"+t}).attr("d",function(t,n){var r=g/e[0].values.length*.9;return"m0,0l0,"+(o(f(t,n))-o(c(t,n)))+"l"+ -r/2+",0l"+r/2+",0l0,"+(o(h(t,n))-o(f(t,n)))+"l0,"+(o(l(t,n))-o(h(t,n)))+"l"+r/2+",0l"+ -r/2+",0z"}).attr("transform",function(e,t){return"translate("+s(u(e,t))+","+o(c(e,t))+")"}).on("mouseover",function(t,n){d3.select(this).classed("hover",true);S.elementMouseover({point:t,series:e[0],pos:[s(u(t,n)),o(a(t,n))],pointIndex:n,seriesIndex:0,e:d3.event})}).on("mouseout",function(t,n){d3.select(this).classed("hover",false);S.elementMouseout({point:t,series:e[0],pointIndex:n,seriesIndex:0,e:d3.event})}).on("click",function(e,t){S.elementClick({value:a(e,t),data:e,index:t,pos:[s(u(e,t)),o(a(e,t))],e:d3.event,id:i});d3.event.stopPropagation()}).on("dblclick",function(e,t){S.elementDblClick({value:a(e,t),data:e,index:t,pos:[s(u(e,t)),o(a(e,t))],e:d3.event,id:i});d3.event.stopPropagation()});O.attr("class",function(e,t,n){return(f(e,t)>l(e,t)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+n+"-"+t});d3.transition(O).attr("transform",function(e,t){return"translate("+s(u(e,t))+","+o(c(e,t))+")"}).attr("d",function(t,n){var r=g/e[0].values.length*.9;return"m0,0l0,"+(o(f(t,n))-o(c(t,n)))+"l"+ -r/2+",0l"+r/2+",0l0,"+(o(h(t,n))-o(f(t,n)))+"l0,"+(o(l(t,n))-o(h(t,n)))+"l"+r/2+",0l"+ -r/2+",0z"})});return x}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=Math.floor(Math.random()*1e4),s=d3.scale.linear(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=function(e){return e.open},l=function(e){return e.close},c=function(e){return e.high},h=function(e){return e.low},p=[],d=[],v=false,m=true,g=e.utils.defaultColor(),y,b,w,E,S=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");x.dispatch=S;x.options=e.utils.optionsFunc.bind(x);x.x=function(e){if(!arguments.length)return u;u=e;return x};x.y=function(e){if(!arguments.length)return a;a=e;return x};x.open=function(e){if(!arguments.length)return f;f=e;return x};x.close=function(e){if(!arguments.length)return l;l=e;return x};x.high=function(e){if(!arguments.length)return c;c=e;return x};x.low=function(e){if(!arguments.length)return h;h=e;return x};x.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return x};x.width=function(e){if(!arguments.length)return n;n=e;return x};x.height=function(e){if(!arguments.length)return r;r=e;return x};x.xScale=function(e){if(!arguments.length)return s;s=e;return x};x.yScale=function(e){if(!arguments.length)return o;o=e;return x};x.xDomain=function(e){if(!arguments.length)return y;y=e;return x};x.yDomain=function(e){if(!arguments.length)return b;b=e;return x};x.xRange=function(e){if(!arguments.length)return w;w=e;return x};x.yRange=function(e){if(!arguments.length)return E;E=e;return x};x.forceX=function(e){if(!arguments.length)return p;p=e;return x};x.forceY=function(e){if(!arguments.length)return d;d=e;return x};x.padData=function(e){if(!arguments.length)return v;v=e;return x};x.clipEdge=function(e){if(!arguments.length)return m;m=e;return x};x.color=function(t){if(!arguments.length)return g;g=e.utils.getColor(t);return x};x.id=function(e){if(!arguments.length)return i;i=e;return x};return x};e.models.pie=function(){"use strict";function E(e){e.each(function(e){function P(e){var t=(e.startAngle+e.endAngle)*90/Math.PI-90;return t>90?t-180:t}function H(e){e.endAngle=isNaN(e.endAngle)?0:e.endAngle;e.startAngle=isNaN(e.startAngle)?0:e.startAngle;if(!v)e.innerRadius=0;var t=d3.interpolate(this._current,e);this._current=t(0);return function(e){return L(t(e))}}function B(e){e.innerRadius=0;var t=d3.interpolate({startAngle:0,endAngle:0},e);return function(e){return L(t(e))}}var o=n-t.left-t.right,f=r-t.top-t.bottom,E=Math.min(o,f)/2,S=E-E/5,x=d3.select(this);var T=x.selectAll(".nv-wrap.nv-pie").data(e);var N=T.enter().append("g").attr("class","nvd3 nv-wrap nv-pie nv-chart-"+u);var C=N.append("g");var k=T.select("g");C.append("g").attr("class","nv-pie");T.attr("transform","translate("+t.left+","+t.top+")");k.select(".nv-pie").attr("transform","translate("+o/2+","+f/2+")");x.on("click",function(e,t){w.chartClick({data:e,index:t,pos:d3.event,id:u})});var L=d3.svg.arc().outerRadius(S);if(g)L.startAngle(g);if(y)L.endAngle(y);if(v)L.innerRadius(E*b);var A=d3.layout.pie().sort(null).value(function(e){return e.disabled?0:s(e)});var O=T.select(".nv-pie").selectAll(".nv-slice").data(A);O.exit().remove();var M=O.enter().append("g").attr("class","nv-slice").on("mouseover",function(e,t){d3.select(this).classed("hover",true);w.elementMouseover({label:i(e.data),value:s(e.data),point:e.data,pointIndex:t,pos:[d3.event.pageX,d3.event.pageY],id:u})}).on("mouseout",function(e,t){d3.select(this).classed("hover",false);w.elementMouseout({label:i(e.data),value:s(e.data),point:e.data,index:t,id:u})}).on("click",function(e,t){w.elementClick({label:i(e.data),value:s(e.data),point:e.data,index:t,pos:d3.event,id:u});d3.event.stopPropagation()}).on("dblclick",function(e,t){w.elementDblClick({label:i(e.data),value:s(e.data),point:e.data,index:t,pos:d3.event,id:u});d3.event.stopPropagation()});O.attr("fill",function(e,t){return a(e,t)}).attr("stroke",function(e,t){return a(e,t)});var _=M.append("path").each(function(e){this._current=e});d3.transition(O.select("path")).attr("d",L).attrTween("d",H);if(l){var D=d3.svg.arc().innerRadius(0);if(c){D=L}if(h){D=d3.svg.arc().outerRadius(L.outerRadius())}M.append("g").classed("nv-label",true).each(function(e,t){var n=d3.select(this);n.attr("transform",function(e){if(m){e.outerRadius=S+10;e.innerRadius=S+15;var t=(e.startAngle+e.endAngle)/2*(180/Math.PI);if((e.startAngle+e.endAngle)/2<Math.PI){t-=90}else{t+=90}return"translate("+D.centroid(e)+") rotate("+t+")"}else{e.outerRadius=E+10;e.innerRadius=E+15;return"translate("+D.centroid(e)+")"}});n.append("rect").style("stroke","#fff").style("fill","#fff").attr("rx",3).attr("ry",3);n.append("text").style("text-anchor",m?(e.startAngle+e.endAngle)/2<Math.PI?"start":"end":"middle").style("fill","#000")});O.select(".nv-label").transition().attr("transform",function(e){if(m){e.outerRadius=S+10;e.innerRadius=S+15;var t=(e.startAngle+e.endAngle)/2*(180/Math.PI);if((e.startAngle+e.endAngle)/2<Math.PI){t-=90}else{t+=90}return"translate("+D.centroid(e)+") rotate("+t+")"}else{e.outerRadius=E+10;e.innerRadius=E+15;return"translate("+D.centroid(e)+")"}});O.each(function(e,t){var n=d3.select(this);n.select(".nv-label text").style("text-anchor",m?(e.startAngle+e.endAngle)/2<Math.PI?"start":"end":"middle").text(function(e,t){var n=(e.endAngle-e.startAngle)/(2*Math.PI);var r={key:i(e.data),value:s(e.data),percent:d3.format("%")(n)};return e.value&&n>d?r[p]:""});var r=n.select("text").node().getBBox();n.select(".nv-label rect").attr("width",r.width+10).attr("height",r.height+10).attr("transform",function(){return"translate("+[r.x-5,r.y-5]+")"})})}});return E}var t={top:0,right:0,bottom:0,left:0},n=500,r=500,i=function(e){return e.x},s=function(e){return e.y},o=function(e){return e.description},u=Math.floor(Math.random()*1e4),a=e.utils.defaultColor(),f=d3.format(",.2f"),l=true,c=true,h=false,p="key",d=.02,v=false,m=false,g=false,y=false,b=.5,w=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");E.dispatch=w;E.options=e.utils.optionsFunc.bind(E);E.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return E};E.width=function(e){if(!arguments.length)return n;n=e;return E};E.height=function(e){if(!arguments.length)return r;r=e;return E};E.values=function(t){e.log("pie.values() is no longer supported.");return E};E.x=function(e){if(!arguments.length)return i;i=e;return E};E.y=function(e){if(!arguments.length)return s;s=d3.functor(e);return E};E.description=function(e){if(!arguments.length)return o;o=e;return E};E.showLabels=function(e){if(!arguments.length)return l;l=e;return E};E.labelSunbeamLayout=function(e){if(!arguments.length)return m;m=e;return E};E.donutLabelsOutside=function(e){if(!arguments.length)return h;h=e;return E};E.pieLabelsOutside=function(e){if(!arguments.length)return c;c=e;return E};E.labelType=function(e){if(!arguments.length)return p;p=e;p=p||"key";return E};E.donut=function(e){if(!arguments.length)return v;v=e;return E};E.donutRatio=function(e){if(!arguments.length)return b;b=e;return E};E.startAngle=function(e){if(!arguments.length)return g;g=e;return E};E.endAngle=function(e){if(!arguments.length)return y;y=e;return E};E.id=function(e){if(!arguments.length)return u;u=e;return E};E.color=function(t){if(!arguments.length)return a;a=e.utils.getColor(t);return E};E.valueFormat=function(e){if(!arguments.length)return f;f=e;return E};E.labelThreshold=function(e){if(!arguments.length)return d;d=e;return E};return E};e.models.pieChart=function(){"use strict";function v(e){e.each(function(e){var u=d3.select(this),a=this;var f=(i||parseInt(u.style("width"))||960)-r.left-r.right,d=(s||parseInt(u.style("height"))||400)-r.top-r.bottom;v.update=function(){u.transition().call(v)};v.container=this;l.disabled=e.map(function(e){return!!e.disabled});if(!c){var m;c={};for(m in l){if(l[m]instanceof Array)c[m]=l[m].slice(0);else c[m]=l[m]}}if(!e||!e.length){var g=u.selectAll(".nv-noData").data([h]);g.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");g.attr("x",r.left+f/2).attr("y",r.top+d/2).text(function(e){return e});return v}else{u.selectAll(".nv-noData").remove()}var y=u.selectAll("g.nv-wrap.nv-pieChart").data([e]);var b=y.enter().append("g").attr("class","nvd3 nv-wrap nv-pieChart").append("g");var w=y.select("g");b.append("g").attr("class","nv-pieWrap");b.append("g").attr("class","nv-legendWrap");if(o){n.width(f).key(t.x());y.select(".nv-legendWrap").datum(e).call(n);if(r.top!=n.height()){r.top=n.height();d=(s||parseInt(u.style("height"))||400)-r.top-r.bottom}y.select(".nv-legendWrap").attr("transform","translate(0,"+ -r.top+")")}y.attr("transform","translate("+r.left+","+r.top+")");t.width(f).height(d);var E=w.select(".nv-pieWrap").datum([e]);d3.transition(E).call(t);n.dispatch.on("stateChange",function(e){l=e;p.stateChange(l);v.update()});t.dispatch.on("elementMouseout.tooltip",function(e){p.tooltipHide(e)});p.on("changeState",function(t){if(typeof t.disabled!=="undefined"){e.forEach(function(e,n){e.disabled=t.disabled[n]});l.disabled=t.disabled}v.update()})});return v}var t=e.models.pie(),n=e.models.legend();var r={top:30,right:20,bottom:20,left:20},i=null,s=null,o=true,u=e.utils.defaultColor(),a=true,f=function(e,t,n,r){return"<h3>"+e+"</h3>"+"<p>"+t+"</p>"},l={},c=null,h="No Data Available.",p=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState");var d=function(n,r){var i=t.description()(n.point)||t.x()(n.point);var s=n.pos[0]+(r&&r.offsetLeft||0),o=n.pos[1]+(r&&r.offsetTop||0),u=t.valueFormat()(t.y()(n.point)),a=f(i,u,n,v);e.tooltip.show([s,o],a,n.value<0?"n":"s",null,r)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+r.left,e.pos[1]+r.top];p.tooltipShow(e)});p.on("tooltipShow",function(e){if(a)d(e)});p.on("tooltipHide",function(){if(a)e.tooltip.cleanup()});v.legend=n;v.dispatch=p;v.pie=t;d3.rebind(v,t,"valueFormat","values","x","y","description","id","showLabels","donutLabelsOutside","pieLabelsOutside","labelType","donut","donutRatio","labelThreshold");v.options=e.utils.optionsFunc.bind(v);v.margin=function(e){if(!arguments.length)return r;r.top=typeof e.top!="undefined"?e.top:r.top;r.right=typeof e.right!="undefined"?e.right:r.right;r.bottom=typeof e.bottom!="undefined"?e.bottom:r.bottom;r.left=typeof e.left!="undefined"?e.left:r.left;return v};v.width=function(e){if(!arguments.length)return i;i=e;return v};v.height=function(e){if(!arguments.length)return s;s=e;return v};v.color=function(r){if(!arguments.length)return u;u=e.utils.getColor(r);n.color(u);t.color(u);return v};v.showLegend=function(e){if(!arguments.length)return o;o=e;return v};v.tooltips=function(e){if(!arguments.length)return a;a=e;return v};v.tooltipContent=function(e){if(!arguments.length)return f;f=e;return v};v.state=function(e){if(!arguments.length)return l;l=e;return v};v.defaultState=function(e){if(!arguments.length)return c;c=e;return v};v.noData=function(e){if(!arguments.length)return h;h=e;return v};return v};e.models.scatter=function(){"use strict";function I(q){q.each(function(I){function Q(){if(!g)return false;var e;var i=d3.merge(I.map(function(e,t){return e.values.map(function(e,n){var r=f(e,n);var i=l(e,n);return[o(r)+Math.random()*1e-7,u(i)+Math.random()*1e-7,t,n,e]}).filter(function(e,t){return b(e[4],t)})}));if(D===true){if(x){var a=X.select("defs").selectAll(".nv-point-clips").data([s]).enter();a.append("clipPath").attr("class","nv-point-clips").attr("id","nv-points-clip-"+s);var c=X.select("#nv-points-clip-"+s).selectAll("circle").data(i);c.enter().append("circle").attr("r",T);c.exit().remove();c.attr("cx",function(e){return e[0]}).attr("cy",function(e){return e[1]});X.select(".nv-point-paths").attr("clip-path","url(#nv-points-clip-"+s+")")}if(i.length){i.push([o.range()[0]-20,u.range()[0]-20,null,null]);i.push([o.range()[1]+20,u.range()[1]+20,null,null]);i.push([o.range()[0]-20,u.range()[0]+20,null,null]);i.push([o.range()[1]+20,u.range()[1]-20,null,null])}var h=d3.geom.polygon([[-10,-10],[-10,r+10],[n+10,r+10],[n+10,-10]]);var p=d3.geom.voronoi(i).map(function(e,t){return{data:h.clip(e),series:i[t][2],point:i[t][3]}});var d=X.select(".nv-point-paths").selectAll("path").data(p);d.enter().append("path").attr("class",function(e,t){return"nv-path-"+t});d.exit().remove();d.attr("d",function(e){if(e.data.length===0)return"M 0 0";else return"M"+e.data.join("L")+"Z"});var v=function(e,n){if(F)return 0;var r=I[e.series];if(typeof r==="undefined")return;var i=r.values[e.point];n({point:i,series:r,pos:[o(f(i,e.point))+t.left,u(l(i,e.point))+t.top],seriesIndex:e.series,pointIndex:e.point})};d.on("click",function(e){v(e,_.elementClick)}).on("mouseover",function(e){v(e,_.elementMouseover)}).on("mouseout",function(e,t){v(e,_.elementMouseout)})}else{X.select(".nv-groups").selectAll(".nv-group").selectAll(".nv-point").on("click",function(e,n){if(F||!I[e.series])return 0;var r=I[e.series],i=r.values[n];_.elementClick({point:i,series:r,pos:[o(f(i,n))+t.left,u(l(i,n))+t.top],seriesIndex:e.series,pointIndex:n})}).on("mouseover",function(e,n){if(F||!I[e.series])return 0;var r=I[e.series],i=r.values[n];_.elementMouseover({point:i,series:r,pos:[o(f(i,n))+t.left,u(l(i,n))+t.top],seriesIndex:e.series,pointIndex:n})}).on("mouseout",function(e,t){if(F||!I[e.series])return 0;var n=I[e.series],r=n.values[t];_.elementMouseout({point:r,series:n,seriesIndex:e.series,pointIndex:t})})}F=false}var q=n-t.left-t.right,R=r-t.top-t.bottom,U=d3.select(this);I.forEach(function(e,t){e.values.forEach(function(e){e.series=t})});var W=N&&C&&A?[]:d3.merge(I.map(function(e){return e.values.map(function(e,t){return{x:f(e,t),y:l(e,t),size:c(e,t)}})}));o.domain(N||d3.extent(W.map(function(e){return e.x}).concat(d)));if(w&&I[0])o.range(k||[(q*E+q)/(2*I[0].values.length),q-q*(1+E)/(2*I[0].values.length)]);else o.range(k||[0,q]);u.domain(C||d3.extent(W.map(function(e){return e.y}).concat(v))).range(L||[R,0]);a.domain(A||d3.extent(W.map(function(e){return e.size}).concat(m))).range(O||[16,256]);if(o.domain()[0]===o.domain()[1]||u.domain()[0]===u.domain()[1])M=true;if(o.domain()[0]===o.domain()[1])o.domain()[0]?o.domain([o.domain()[0]-o.domain()[0]*.01,o.domain()[1]+o.domain()[1]*.01]):o.domain([-1,1]);if(u.domain()[0]===u.domain()[1])u.domain()[0]?u.domain([u.domain()[0]-u.domain()[0]*.01,u.domain()[1]+u.domain()[1]*.01]):u.domain([-1,1]);if(isNaN(o.domain()[0])){o.domain([-1,1])}if(isNaN(u.domain()[0])){u.domain([-1,1])}P=P||o;H=H||u;B=B||a;var X=U.selectAll("g.nv-wrap.nv-scatter").data([I]);var V=X.enter().append("g").attr("class","nvd3 nv-wrap nv-scatter nv-chart-"+s+(M?" nv-single-point":""));var $=V.append("defs");var J=V.append("g");var K=X.select("g");J.append("g").attr("class","nv-groups");J.append("g").attr("class","nv-point-paths");X.attr("transform","translate("+t.left+","+t.top+")");$.append("clipPath").attr("id","nv-edge-clip-"+s).append("rect");X.select("#nv-edge-clip-"+s+" rect").attr("width",q).attr("height",R);K.attr("clip-path",S?"url(#nv-edge-clip-"+s+")":"");F=true;var G=X.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e){return e.key});G.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);G.exit().remove();G.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover});G.transition().style("fill",function(e,t){return i(e,t)}).style("stroke",function(e,t){return i(e,t)}).style("stroke-opacity",1).style("fill-opacity",.5);if(p){var Y=G.selectAll("circle.nv-point").data(function(e){return e.values},y);Y.enter().append("circle").style("fill",function(e,t){return e.color}).style("stroke",function(e,t){return e.color}).attr("cx",function(t,n){return e.utils.NaNtoZero(P(f(t,n)))}).attr("cy",function(t,n){return e.utils.NaNtoZero(H(l(t,n)))}).attr("r",function(e,t){return Math.sqrt(a(c(e,t))/Math.PI)});Y.exit().remove();G.exit().selectAll("path.nv-point").transition().attr("cx",function(t,n){return e.utils.NaNtoZero(o(f(t,n)))}).attr("cy",function(t,n){return e.utils.NaNtoZero(u(l(t,n)))}).remove();Y.each(function(e,t){d3.select(this).classed("nv-point",true).classed("nv-point-"+t,true).classed("hover",false)});Y.transition().attr("cx",function(t,n){return e.utils.NaNtoZero(o(f(t,n)))}).attr("cy",function(t,n){return e.utils.NaNtoZero(u(l(t,n)))}).attr("r",function(e,t){return Math.sqrt(a(c(e,t))/Math.PI)})}else{var Y=G.selectAll("path.nv-point").data(function(e){return e.values});Y.enter().append("path").style("fill",function(e,t){return e.color}).style("stroke",function(e,t){return e.color}).attr("transform",function(e,t){return"translate("+P(f(e,t))+","+H(l(e,t))+")"}).attr("d",d3.svg.symbol().type(h).size(function(e,t){return a(c(e,t))}));Y.exit().remove();G.exit().selectAll("path.nv-point").transition().attr("transform",function(e,t){return"translate("+o(f(e,t))+","+u(l(e,t))+")"}).remove();Y.each(function(e,t){d3.select(this).classed("nv-point",true).classed("nv-point-"+t,true).classed("hover",false)});Y.transition().attr("transform",function(e,t){return"translate("+o(f(e,t))+","+u(l(e,t))+")"}).attr("d",d3.svg.symbol().type(h).size(function(e,t){return a(c(e,t))}))}clearTimeout(j);j=setTimeout(Q,300);P=o.copy();H=u.copy();B=a.copy()});return I}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=e.utils.defaultColor(),s=Math.floor(Math.random()*1e5),o=d3.scale.linear(),u=d3.scale.linear(),a=d3.scale.linear(),f=function(e){return e.x},l=function(e){return e.y},c=function(e){return e.size||1},h=function(e){return e.shape||"circle"},p=true,d=[],v=[],m=[],g=true,y=null,b=function(e){return!e.notActive},w=false,E=.1,S=false,x=true,T=function(){return 25},N=null,C=null,k=null,L=null,A=null,O=null,M=false,_=d3.dispatch("elementClick","elementMouseover","elementMouseout"),D=true;var P,H,B,j,F=false;I.clearHighlights=function(){d3.selectAll(".nv-chart-"+s+" .nv-point.hover").classed("hover",false)};I.highlightPoint=function(e,t,n){d3.select(".nv-chart-"+s+" .nv-series-"+e+" .nv-point-"+t).classed("hover",n)};_.on("elementMouseover.point",function(e){if(g)I.highlightPoint(e.seriesIndex,e.pointIndex,true)});_.on("elementMouseout.point",function(e){if(g)I.highlightPoint(e.seriesIndex,e.pointIndex,false)});I.dispatch=_;I.options=e.utils.optionsFunc.bind(I);I.x=function(e){if(!arguments.length)return f;f=d3.functor(e);return I};I.y=function(e){if(!arguments.length)return l;l=d3.functor(e);return I};I.size=function(e){if(!arguments.length)return c;c=d3.functor(e);return I};I.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return I};I.width=function(e){if(!arguments.length)return n;n=e;return I};I.height=function(e){if(!arguments.length)return r;r=e;return I};I.xScale=function(e){if(!arguments.length)return o;o=e;return I};I.yScale=function(e){if(!arguments.length)return u;u=e;return I};I.zScale=function(e){if(!arguments.length)return a;a=e;return I};I.xDomain=function(e){if(!arguments.length)return N;N=e;return I};I.yDomain=function(e){if(!arguments.length)return C;C=e;return I};I.sizeDomain=function(e){if(!arguments.length)return A;A=e;return I};I.xRange=function(e){if(!arguments.length)return k;k=e;return I};I.yRange=function(e){if(!arguments.length)return L;L=e;return I};I.sizeRange=function(e){if(!arguments.length)return O;O=e;return I};I.forceX=function(e){if(!arguments.length)return d;d=e;return I};I.forceY=function(e){if(!arguments.length)return v;v=e;return I};I.forceSize=function(e){if(!arguments.length)return m;m=e;return I};I.interactive=function(e){if(!arguments.length)return g;g=e;return I};I.pointKey=function(e){if(!arguments.length)return y;y=e;return I};I.pointActive=function(e){if(!arguments.length)return b;b=e;return I};I.padData=function(e){if(!arguments.length)return w;w=e;return I};I.padDataOuter=function(e){if(!arguments.length)return E;E=e;return I};I.clipEdge=function(e){if(!arguments.length)return S;S=e;return I};I.clipVoronoi=function(e){if(!arguments.length)return x;x=e;return I};I.useVoronoi=function(e){if(!arguments.length)return D;D=e;if(D===false){x=false}return I};I.clipRadius=function(e){if(!arguments.length)return T;T=e;return I};I.color=function(t){if(!arguments.length)return i;i=e.utils.getColor(t);return I};I.shape=function(e){if(!arguments.length)return h;h=e;return I};I.onlyCircles=function(e){if(!arguments.length)return p;p=e;return I};I.id=function(e){if(!arguments.length)return s;s=e;return I};I.singlePoint=function(e){if(!arguments.length)return M;M=e;return I};return I};e.models.scatterChart=function(){"use strict";function F(e){e.each(function(e){function K(){if(T){X.select(".nv-point-paths").style("pointer-events","all");return false}X.select(".nv-point-paths").style("pointer-events","none");var i=d3.mouse(this);h.distortion(x).focus(i[0]);p.distortion(x).focus(i[1]);X.select(".nv-scatterWrap").call(t);if(b)X.select(".nv-x.nv-axis").call(n);if(w)X.select(".nv-y.nv-axis").call(r);X.select(".nv-distributionX").datum(e.filter(function(e){return!e.disabled})).call(o);X.select(".nv-distributionY").datum(e.filter(function(e){return!e.disabled})).call(u)}var C=d3.select(this),k=this;var L=(f||parseInt(C.style("width"))||960)-a.left-a.right,I=(l||parseInt(C.style("height"))||400)-a.top-a.bottom;F.update=function(){C.transition().duration(D).call(F)};F.container=this;A.disabled=e.map(function(e){return!!e.disabled});if(!O){var q;O={};for(q in A){if(A[q]instanceof Array)O[q]=A[q].slice(0);else O[q]=A[q]}}if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var R=C.selectAll(".nv-noData").data([_]);R.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");R.attr("x",a.left+L/2).attr("y",a.top+I/2).text(function(e){return e});return F}else{C.selectAll(".nv-noData").remove()}P=P||h;H=H||p;var U=C.selectAll("g.nv-wrap.nv-scatterChart").data([e]);var z=U.enter().append("g").attr("class","nvd3 nv-wrap nv-scatterChart nv-chart-"+t.id());var W=z.append("g");var X=U.select("g");W.append("rect").attr("class","nvd3 nv-background");W.append("g").attr("class","nv-x nv-axis");W.append("g").attr("class","nv-y nv-axis");W.append("g").attr("class","nv-scatterWrap");W.append("g").attr("class","nv-distWrap");W.append("g").attr("class","nv-legendWrap");W.append("g").attr("class","nv-controlsWrap");if(y){var V=S?L/2:L;i.width(V);U.select(".nv-legendWrap").datum(e).call(i);if(a.top!=i.height()){a.top=i.height();I=(l||parseInt(C.style("height"))||400)-a.top-a.bottom}U.select(".nv-legendWrap").attr("transform","translate("+(L-V)+","+ -a.top+")")}if(S){s.width(180).color(["#444"]);X.select(".nv-controlsWrap").datum(j).attr("transform","translate(0,"+ -a.top+")").call(s)}U.attr("transform","translate("+a.left+","+a.top+")");if(E){X.select(".nv-y.nv-axis").attr("transform","translate("+L+",0)")}t.width(L).height(I).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));if(d!==0)t.xDomain(null);if(v!==0)t.yDomain(null);U.select(".nv-scatterWrap").datum(e.filter(function(e){return!e.disabled})).call(t);if(d!==0){var $=h.domain()[1]-h.domain()[0];t.xDomain([h.domain()[0]-d*$,h.domain()[1]+d*$])}if(v!==0){var J=p.domain()[1]-p.domain()[0];t.yDomain([p.domain()[0]-v*J,p.domain()[1]+v*J])}if(v!==0||d!==0){U.select(".nv-scatterWrap").datum(e.filter(function(e){return!e.disabled})).call(t)}if(b){n.scale(h).ticks(n.ticks()&&n.ticks().length?n.ticks():L/100).tickSize(-I,0);X.select(".nv-x.nv-axis").attr("transform","translate(0,"+p.range()[0]+")").call(n)}if(w){r.scale(p).ticks(r.ticks()&&r.ticks().length?r.ticks():I/36).tickSize(-L,0);X.select(".nv-y.nv-axis").call(r)}if(m){o.getData(t.x()).scale(h).width(L).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));W.select(".nv-distWrap").append("g").attr("class","nv-distributionX");X.select(".nv-distributionX").attr("transform","translate(0,"+p.range()[0]+")").datum(e.filter(function(e){return!e.disabled})).call(o)}if(g){u.getData(t.y()).scale(p).width(I).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));W.select(".nv-distWrap").append("g").attr("class","nv-distributionY");X.select(".nv-distributionY").attr("transform","translate("+(E?L:-u.size())+",0)").datum(e.filter(function(e){return!e.disabled})).call(u)}if(d3.fisheye){X.select(".nv-background").attr("width",L).attr("height",I);X.select(".nv-background").on("mousemove",K);X.select(".nv-background").on("click",function(){T=!T});t.dispatch.on("elementClick.freezeFisheye",function(){T=!T})}s.dispatch.on("legendClick",function(e,i){e.disabled=!e.disabled;x=e.disabled?0:2.5;X.select(".nv-background").style("pointer-events",e.disabled?"none":"all");X.select(".nv-point-paths").style("pointer-events",e.disabled?"all":"none");if(e.disabled){h.distortion(x).focus(0);p.distortion(x).focus(0);X.select(".nv-scatterWrap").call(t);X.select(".nv-x.nv-axis").call(n);X.select(".nv-y.nv-axis").call(r)}else{T=false}F.update()});i.dispatch.on("stateChange",function(e){A.disabled=e.disabled;M.stateChange(A);F.update()});t.dispatch.on("elementMouseover.tooltip",function(e){d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-distx-"+e.pointIndex).attr("y1",function(t,n){return e.pos[1]-I});d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-disty-"+e.pointIndex).attr("x2",e.pos[0]+o.size());e.pos=[e.pos[0]+a.left,e.pos[1]+a.top];M.tooltipShow(e)});M.on("tooltipShow",function(e){if(N)B(e,k.parentNode)});M.on("changeState",function(t){if(typeof t.disabled!=="undefined"){e.forEach(function(e,n){e.disabled=t.disabled[n]});A.disabled=t.disabled}F.update()});P=h.copy();H=p.copy()});return F}var t=e.models.scatter(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend(),o=e.models.distribution(),u=e.models.distribution();var a={top:30,right:20,bottom:50,left:75},f=null,l=null,c=e.utils.defaultColor(),h=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):t.xScale(),p=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):t.yScale(),d=0,v=0,m=false,g=false,y=true,b=true,w=true,E=false,S=!!d3.fisheye,x=0,T=false,N=true,C=function(e,t,n){return"<strong>"+t+"</strong>"},k=function(e,t,n){return"<strong>"+n+"</strong>"},L=null,A={},O=null,M=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),_="No Data Available.",D=250;t.xScale(h).yScale(p);n.orient("bottom").tickPadding(10);r.orient(E?"right":"left").tickPadding(10);o.axis("x");u.axis("y");s.updateState(false);var P,H;var B=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),f=i.pos[0]+(s.offsetLeft||0),l=p.range()[0]+a.top+(s.offsetTop||0),c=h.range()[0]+a.left+(s.offsetLeft||0),d=i.pos[1]+(s.offsetTop||0),v=n.tickFormat()(t.x()(i.point,i.pointIndex)),m=r.tickFormat()(t.y()(i.point,i.pointIndex));if(C!=null)e.tooltip.show([f,l],C(i.series.key,v,m,i,F),"n",1,s,"x-nvtooltip");if(k!=null)e.tooltip.show([c,d],k(i.series.key,v,m,i,F),"e",1,s,"y-nvtooltip");if(L!=null)e.tooltip.show([o,u],L(i.series.key,v,m,i,F),i.value<0?"n":"s",null,s)};var j=[{key:"Magnify",disabled:true}];t.dispatch.on("elementMouseout.tooltip",function(e){M.tooltipHide(e);d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-distx-"+e.pointIndex).attr("y1",0);d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-disty-"+e.pointIndex).attr("x2",u.size())});M.on("tooltipHide",function(){if(N)e.tooltip.cleanup()});F.dispatch=M;F.scatter=t;F.legend=i;F.controls=s;F.xAxis=n;F.yAxis=r;F.distX=o;F.distY=u;d3.rebind(F,t,"id","interactive","pointActive","x","y","shape","size","xScale","yScale","zScale","xDomain","yDomain","xRange","yRange","sizeDomain","sizeRange","forceX","forceY","forceSize","clipVoronoi","clipRadius","useVoronoi");F.options=e.utils.optionsFunc.bind(F);F.margin=function(e){if(!arguments.length)return a;a.top=typeof e.top!="undefined"?e.top:a.top;a.right=typeof e.right!="undefined"?e.right:a.right;a.bottom=typeof e.bottom!="undefined"?e.bottom:a.bottom;a.left=typeof e.left!="undefined"?e.left:a.left;return F};F.width=function(e){if(!arguments.length)return f;f=e;return F};F.height=function(e){if(!arguments.length)return l;l=e;return F};F.color=function(t){if(!arguments.length)return c;c=e.utils.getColor(t);i.color(c);o.color(c);u.color(c);return F};F.showDistX=function(e){if(!arguments.length)return m;m=e;return F};F.showDistY=function(e){if(!arguments.length)return g;g=e;return F};F.showControls=function(e){if(!arguments.length)return S;S=e;return F};F.showLegend=function(e){if(!arguments.length)return y;y=e;return F};F.showXAxis=function(e){if(!arguments.length)return b;b=e;return F};F.showYAxis=function(e){if(!arguments.length)return w;w=e;return F};F.rightAlignYAxis=function(e){if(!arguments.length)return E;E=e;r.orient(e?"right":"left");return F};F.fisheye=function(e){if(!arguments.length)return x;x=e;return F};F.xPadding=function(e){if(!arguments.length)return d;d=e;return F};F.yPadding=function(e){if(!arguments.length)return v;v=e;return F};F.tooltips=function(e){if(!arguments.length)return N;N=e;return F};F.tooltipContent=function(e){if(!arguments.length)return L;L=e;return F};F.tooltipXContent=function(e){if(!arguments.length)return C;C=e;return F};F.tooltipYContent=function(e){if(!arguments.length)return k;k=e;return F};F.state=function(e){if(!arguments.length)return A;A=e;return F};F.defaultState=function(e){if(!arguments.length)return O;O=e;return F};F.noData=function(e){if(!arguments.length)return _;_=e;return F};F.transitionDuration=function(e){if(!arguments.length)return D;D=e;return F};return F};e.models.scatterPlusLineChart=function(){"use strict";function B(e){e.each(function(e){function $(){if(S){z.select(".nv-point-paths").style("pointer-events","all");return false}z.select(".nv-point-paths").style("pointer-events","none");var i=d3.mouse(this);h.distortion(E).focus(i[0]);p.distortion(E).focus(i[1]);z.select(".nv-scatterWrap").datum(e.filter(function(e){return!e.disabled})).call(t);if(g)z.select(".nv-x.nv-axis").call(n);if(y)z.select(".nv-y.nv-axis").call(r);z.select(".nv-distributionX").datum(e.filter(function(e){return!e.disabled})).call(o);z.select(".nv-distributionY").datum(e.filter(function(e){return!e.disabled})).call(u)}var T=d3.select(this),N=this;var C=(f||parseInt(T.style("width"))||960)-a.left-a.right,j=(l||parseInt(T.style("height"))||400)-a.top-a.bottom;B.update=function(){T.transition().duration(M).call(B)};B.container=this;k.disabled=e.map(function(e){return!!e.disabled});if(!L){var F;L={};for(F in k){if(k[F]instanceof Array)L[F]=k[F].slice(0);else L[F]=k[F]}}if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var I=T.selectAll(".nv-noData").data([O]);I.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");I.attr("x",a.left+C/2).attr("y",a.top+j/2).text(function(e){return e});return B}else{T.selectAll(".nv-noData").remove()}h=t.xScale();p=t.yScale();_=_||h;D=D||p;var q=T.selectAll("g.nv-wrap.nv-scatterChart").data([e]);var R=q.enter().append("g").attr("class","nvd3 nv-wrap nv-scatterChart nv-chart-"+t.id());var U=R.append("g");var z=q.select("g");U.append("rect").attr("class","nvd3 nv-background").style("pointer-events","none");U.append("g").attr("class","nv-x nv-axis");U.append("g").attr("class","nv-y nv-axis");U.append("g").attr("class","nv-scatterWrap");U.append("g").attr("class","nv-regressionLinesWrap");U.append("g").attr("class","nv-distWrap");U.append("g").attr("class","nv-legendWrap");U.append("g").attr("class","nv-controlsWrap");q.attr("transform","translate("+a.left+","+a.top+")");if(b){z.select(".nv-y.nv-axis").attr("transform","translate("+C+",0)")}if(m){i.width(C/2);q.select(".nv-legendWrap").datum(e).call(i);if(a.top!=i.height()){a.top=i.height();j=(l||parseInt(T.style("height"))||400)-a.top-a.bottom}q.select(".nv-legendWrap").attr("transform","translate("+C/2+","+ -a.top+")")}if(w){s.width(180).color(["#444"]);z.select(".nv-controlsWrap").datum(H).attr("transform","translate(0,"+ -a.top+")").call(s)}t.width(C).height(j).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));q.select(".nv-scatterWrap").datum(e.filter(function(e){return!e.disabled})).call(t);q.select(".nv-regressionLinesWrap").attr("clip-path","url(#nv-edge-clip-"+t.id()+")");var W=q.select(".nv-regressionLinesWrap").selectAll(".nv-regLines").data(function(e){return e});W.enter().append("g").attr("class","nv-regLines");var X=W.selectAll(".nv-regLine").data(function(e){return[e]});var V=X.enter().append("line").attr("class","nv-regLine").style("stroke-opacity",0);X.transition().attr("x1",h.range()[0]).attr("x2",h.range()[1]).attr("y1",function(e,t){return p(h.domain()[0]*e.slope+e.intercept)}).attr("y2",function(e,t){return p(h.domain()[1]*e.slope+e.intercept)}).style("stroke",function(e,t,n){return c(e,n)}).style("stroke-opacity",function(e,t){return e.disabled||typeof e.slope==="undefined"||typeof e.intercept==="undefined"?0:1});if(g){n.scale(h).ticks(n.ticks()?n.ticks():C/100).tickSize(-j,0);z.select(".nv-x.nv-axis").attr("transform","translate(0,"+p.range()[0]+")").call(n)}if(y){r.scale(p).ticks(r.ticks()?r.ticks():j/36).tickSize(-C,0);z.select(".nv-y.nv-axis").call(r)}if(d){o.getData(t.x()).scale(h).width(C).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));U.select(".nv-distWrap").append("g").attr("class","nv-distributionX");z.select(".nv-distributionX").attr("transform","translate(0,"+p.range()[0]+")").datum(e.filter(function(e){return!e.disabled})).call(o)}if(v){u.getData(t.y()).scale(p).width(j).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));U.select(".nv-distWrap").append("g").attr("class","nv-distributionY");z.select(".nv-distributionY").attr("transform","translate("+(b?C:-u.size())+",0)").datum(e.filter(function(e){return!e.disabled})).call(u)}if(d3.fisheye){z.select(".nv-background").attr("width",C).attr("height",j);z.select(".nv-background").on("mousemove",$);z.select(".nv-background").on("click",function(){S=!S});t.dispatch.on("elementClick.freezeFisheye",function(){S=!S})}s.dispatch.on("legendClick",function(e,i){e.disabled=!e.disabled;E=e.disabled?0:2.5;z.select(".nv-background").style("pointer-events",e.disabled?"none":"all");z.select(".nv-point-paths").style("pointer-events",e.disabled?"all":"none");if(e.disabled){h.distortion(E).focus(0);p.distortion(E).focus(0);z.select(".nv-scatterWrap").call(t);z.select(".nv-x.nv-axis").call(n);z.select(".nv-y.nv-axis").call(r)}else{S=false}B.update()});i.dispatch.on("stateChange",function(e){k=e;A.stateChange(k);B.update()});t.dispatch.on("elementMouseover.tooltip",function(e){d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-distx-"+e.pointIndex).attr("y1",e.pos[1]-j);d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-disty-"+e.pointIndex).attr("x2",e.pos[0]+o.size());e.pos=[e.pos[0]+a.left,e.pos[1]+a.top];A.tooltipShow(e)});A.on("tooltipShow",function(e){if(x)P(e,N.parentNode)});A.on("changeState",function(t){if(typeof t.disabled!=="undefined"){e.forEach(function(e,n){e.disabled=t.disabled[n]});k.disabled=t.disabled}B.update()});_=h.copy();D=p.copy()});return B}var t=e.models.scatter(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend(),o=e.models.distribution(),u=e.models.distribution();var a={top:30,right:20,bottom:50,left:75},f=null,l=null,c=e.utils.defaultColor(),h=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):t.xScale(),p=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):t.yScale(),d=false,v=false,m=true,g=true,y=true,b=false,w=!!d3.fisheye,E=0,S=false,x=true,T=function(e,t,n){return"<strong>"+t+"</strong>"},N=function(e,t,n){return"<strong>"+n+"</strong>"},C=function(e,t,n,r){return"<h3>"+e+"</h3>"+"<p>"+r+"</p>"},k={},L=null,A=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),O="No Data Available.",M=250;t.xScale(h).yScale(p);n.orient("bottom").tickPadding(10);r.orient(b?"right":"left").tickPadding(10);o.axis("x");u.axis("y");s.updateState(false);var _,D;var P=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),f=i.pos[0]+(s.offsetLeft||0),l=p.range()[0]+a.top+(s.offsetTop||0),c=h.range()[0]+a.left+(s.offsetLeft||0),d=i.pos[1]+(s.offsetTop||0),v=n.tickFormat()(t.x()(i.point,i.pointIndex)),m=r.tickFormat()(t.y()(i.point,i.pointIndex));if(T!=null)e.tooltip.show([f,l],T(i.series.key,v,m,i,B),"n",1,s,"x-nvtooltip");if(N!=null)e.tooltip.show([c,d],N(i.series.key,v,m,i,B),"e",1,s,"y-nvtooltip");if(C!=null)e.tooltip.show([o,u],C(i.series.key,v,m,i.point.tooltip,i,B),i.value<0?"n":"s",null,s)};var H=[{key:"Magnify",disabled:true}];t.dispatch.on("elementMouseout.tooltip",function(e){A.tooltipHide(e);d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-distx-"+e.pointIndex).attr("y1",0);d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-disty-"+e.pointIndex).attr("x2",u.size())});A.on("tooltipHide",function(){if(x)e.tooltip.cleanup()});B.dispatch=A;B.scatter=t;B.legend=i;B.controls=s;B.xAxis=n;B.yAxis=r;B.distX=o;B.distY=u;d3.rebind(B,t,"id","interactive","pointActive","x","y","shape","size","xScale","yScale","zScale","xDomain","yDomain","xRange","yRange","sizeDomain","sizeRange","forceX","forceY","forceSize","clipVoronoi","clipRadius","useVoronoi");B.options=e.utils.optionsFunc.bind(B);B.margin=function(e){if(!arguments.length)return a;a.top=typeof e.top!="undefined"?e.top:a.top;a.right=typeof e.right!="undefined"?e.right:a.right;a.bottom=typeof e.bottom!="undefined"?e.bottom:a.bottom;a.left=typeof e.left!="undefined"?e.left:a.left;return B};B.width=function(e){if(!arguments.length)return f;f=e;return B};B.height=function(e){if(!arguments.length)return l;l=e;return B};B.color=function(t){if(!arguments.length)return c;c=e.utils.getColor(t);i.color(c);o.color(c);u.color(c);return B};B.showDistX=function(e){if(!arguments.length)return d;d=e;return B};B.showDistY=function(e){if(!arguments.length)return v;v=e;return B};B.showControls=function(e){if(!arguments.length)return w;w=e;return B};B.showLegend=function(e){if(!arguments.length)return m;m=e;return B};B.showXAxis=function(e){if(!arguments.length)return g;g=e;return B};B.showYAxis=function(e){if(!arguments.length)return y;y=e;return B};B.rightAlignYAxis=function(e){if(!arguments.length)return b;b=e;r.orient(e?"right":"left");return B};B.fisheye=function(e){if(!arguments.length)return E;E=e;return B};B.tooltips=function(e){if(!arguments.length)return x;x=e;return B};B.tooltipContent=function(e){if(!arguments.length)return C;C=e;return B};B.tooltipXContent=function(e){if(!arguments.length)return T;T=e;return B};B.tooltipYContent=function(e){if(!arguments.length)return N;N=e;return B};B.state=function(e){if(!arguments.length)return k;k=e;return B};B.defaultState=function(e){if(!arguments.length)return L;L=e;return B};B.noData=function(e){if(!arguments.length)return O;O=e;return B};B.transitionDuration=function(e){if(!arguments.length)return M;M=e;return B};return B};e.models.sparkline=function(){"use strict";function d(e){e.each(function(e){var i=n-t.left-t.right,d=r-t.top-t.bottom,v=d3.select(this);s.domain(l||d3.extent(e,u)).range(h||[0,i]);o.domain(c||d3.extent(e,a)).range(p||[d,0]);var m=v.selectAll("g.nv-wrap.nv-sparkline").data([e]);var g=m.enter().append("g").attr("class","nvd3 nv-wrap nv-sparkline");var b=g.append("g");var w=m.select("g");m.attr("transform","translate("+t.left+","+t.top+")");var E=m.selectAll("path").data(function(e){return[e]});E.enter().append("path");E.exit().remove();E.style("stroke",function(e,t){return e.color||f(e,t)}).attr("d",d3.svg.line().x(function(e,t){return s(u(e,t))}).y(function(e,t){return o(a(e,t))}));var S=m.selectAll("circle.nv-point").data(function(e){function n(t){if(t!=-1){var n=e[t];n.pointIndex=t;return n}else{return null}}var t=e.map(function(e,t){return a(e,t)});var r=n(t.lastIndexOf(o.domain()[1])),i=n(t.indexOf(o.domain()[0])),s=n(t.length-1);return[i,r,s].filter(function(e){return e!=null})});S.enter().append("circle");S.exit().remove();S.attr("cx",function(e,t){return s(u(e,e.pointIndex))}).attr("cy",function(e,t){return o(a(e,e.pointIndex))}).attr("r",2).attr("class",function(e,t){return u(e,e.pointIndex)==s.domain()[1]?"nv-point nv-currentValue":a(e,e.pointIndex)==o.domain()[0]?"nv-point nv-minValue":"nv-point nv-maxValue"})});return d}var t={top:2,right:0,bottom:2,left:0},n=400,r=32,i=true,s=d3.scale.linear(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=e.utils.getColor(["#000"]),l,c,h,p;d.options=e.utils.optionsFunc.bind(d);d.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return d};d.width=function(e){if(!arguments.length)return n;n=e;return d};d.height=function(e){if(!arguments.length)return r;r=e;return d};d.x=function(e){if(!arguments.length)return u;u=d3.functor(e);return d};d.y=function(e){if(!arguments.length)return a;a=d3.functor(e);return d};d.xScale=function(e){if(!arguments.length)return s;s=e;return d};d.yScale=function(e){if(!arguments.length)return o;o=e;return d};d.xDomain=function(e){if(!arguments.length)return l;l=e;return d};d.yDomain=function(e){if(!arguments.length)return c;c=e;return d};d.xRange=function(e){if(!arguments.length)return h;h=e;return d};d.yRange=function(e){if(!arguments.length)return p;p=e;return d};d.animate=function(e){if(!arguments.length)return i;i=e;return d};d.color=function(t){if(!arguments.length)return f;f=e.utils.getColor(t);return d};return d};e.models.sparklinePlus=function(){"use strict";function v(e){e.each(function(c){function O(){if(a)return;var e=C.selectAll(".nv-hoverValue").data(u);var r=e.enter().append("g").attr("class","nv-hoverValue").style("stroke-opacity",0).style("fill-opacity",0);e.exit().transition().duration(250).style("stroke-opacity",0).style("fill-opacity",0).remove();e.attr("transform",function(e){return"translate("+s(t.x()(c[e],e))+",0)"}).transition().duration(250).style("stroke-opacity",1).style("fill-opacity",1);if(!u.length)return;r.append("line").attr("x1",0).attr("y1",-n.top).attr("x2",0).attr("y2",b);r.append("text").attr("class","nv-xValue").attr("x",-6).attr("y",-n.top).attr("text-anchor","end").attr("dy",".9em");C.select(".nv-hoverValue .nv-xValue").text(f(t.x()(c[u[0]],u[0])));r.append("text").attr("class","nv-yValue").attr("x",6).attr("y",-n.top).attr("text-anchor","start").attr("dy",".9em");C.select(".nv-hoverValue .nv-yValue").text(l(t.y()(c[u[0]],u[0])))}function M(){function r(e,n){var r=Math.abs(t.x()(e[0],0)-n);var i=0;for(var s=0;s<e.length;s++){if(Math.abs(t.x()(e[s],s)-n)<r){r=Math.abs(t.x()(e[s],s)-n);i=s}}return i}if(a)return;var e=d3.mouse(this)[0]-n.left;u=[r(c,Math.round(s.invert(e)))];O()}var m=d3.select(this);var g=(r||parseInt(m.style("width"))||960)-n.left-n.right,b=(i||parseInt(m.style("height"))||400)-n.top-n.bottom;v.update=function(){v(e)};v.container=this;if(!c||!c.length){var w=m.selectAll(".nv-noData").data([d]);w.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");w.attr("x",n.left+g/2).attr("y",n.top+b/2).text(function(e){return e});return v}else{m.selectAll(".nv-noData").remove()}var E=t.y()(c[c.length-1],c.length-1);s=t.xScale();o=t.yScale();var S=m.selectAll("g.nv-wrap.nv-sparklineplus").data([c]);var T=S.enter().append("g").attr("class","nvd3 nv-wrap nv-sparklineplus");var N=T.append("g");var C=S.select("g");N.append("g").attr("class","nv-sparklineWrap");N.append("g").attr("class","nv-valueWrap");N.append("g").attr("class","nv-hoverArea");S.attr("transform","translate("+n.left+","+n.top+")");var k=C.select(".nv-sparklineWrap");t.width(g).height(b);k.call(t);var L=C.select(".nv-valueWrap");var A=L.selectAll(".nv-currentValue").data([E]);A.enter().append("text").attr("class","nv-currentValue").attr("dx",p?-8:8).attr("dy",".9em").style("text-anchor",p?"end":"start");A.attr("x",g+(p?n.right:0)).attr("y",h?function(e){return o(e)}:0).style("fill",t.color()(c[c.length-1],c.length-1)).text(l(E));N.select(".nv-hoverArea").append("rect").on("mousemove",M).on("click",function(){a=!a}).on("mouseout",function(){u=[];O()});C.select(".nv-hoverArea rect").attr("transform",function(e){return"translate("+ -n.left+","+ -n.top+")"}).attr("width",g+n.left+n.right).attr("height",b+n.top)});return v}var t=e.models.sparkline();var n={top:15,right:100,bottom:10,left:50},r=null,i=null,s,o,u=[],a=false,f=d3.format(",r"),l=d3.format(",.2f"),c=true,h=true,p=false,d="No Data Available.";v.sparkline=t;d3.rebind(v,t,"x","y","xScale","yScale","color");v.options=e.utils.optionsFunc.bind(v);v.margin=function(e){if(!arguments.length)return n;n.top=typeof e.top!="undefined"?e.top:n.top;n.right=typeof e.right!="undefined"?e.right:n.right;n.bottom=typeof e.bottom!="undefined"?e.bottom:n.bottom;n.left=typeof e.left!="undefined"?e.left:n.left;return v};v.width=function(e){if(!arguments.length)return r;r=e;return v};v.height=function(e){if(!arguments.length)return i;i=e;return v};v.xTickFormat=function(e){if(!arguments.length)return f;f=e;return v};v.yTickFormat=function(e){if(!arguments.length)return l;l=e;return v};v.showValue=function(e){if(!arguments.length)return c;c=e;return v};v.alignValue=function(e){if(!arguments.length)return h;h=e;return v};v.rightAlignValue=function(e){if(!arguments.length)return p;p=e;return v};v.noData=function(e){if(!arguments.length)return d;d=e;return v};return v};e.models.stackedArea=function(){"use strict";function y(e){e.each(function(e){var a=n-t.left-t.right,v=r-t.top-t.bottom,b=d3.select(this);p=m.xScale();d=m.yScale();var w=e;e=e.map(function(e,t){e.seriesIndex=t;e.values=e.values.map(function(e,n){e.index=n;e.seriesIndex=t;return e});return e});var E=e.filter(function(e){return!e.disabled});e=d3.layout.stack().order(l).offset(f).values(function(e){return e.values}).x(o).y(u).out(function(e,t,n){var r=u(e)===0?0:n;e.display={y:r,y0:t}})(E);var S=b.selectAll("g.nv-wrap.nv-stackedarea").data([e]);var T=S.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedarea");var N=T.append("defs");var C=T.append("g");var k=S.select("g");C.append("g").attr("class","nv-areaWrap");C.append("g").attr("class","nv-scatterWrap");S.attr("transform","translate("+t.left+","+t.top+")");m.width(a).height(v).x(o).y(function(e){return e.display.y+e.display.y0}).forceY([0]).color(e.map(function(e,t){return e.color||i(e,e.seriesIndex)}));var L=k.select(".nv-scatterWrap").datum(e);L.call(m);N.append("clipPath").attr("id","nv-edge-clip-"+s).append("rect");S.select("#nv-edge-clip-"+s+" rect").attr("width",a).attr("height",v);k.attr("clip-path",h?"url(#nv-edge-clip-"+s+")":"");var A=d3.svg.area().x(function(e,t){return p(o(e,t))}).y0(function(e){return d(e.display.y0)}).y1(function(e){return d(e.display.y+e.display.y0)}).interpolate(c);var O=d3.svg.area().x(function(e,t){return p(o(e,t))}).y0(function(e){return d(e.display.y0)}).y1(function(e){return d(e.display.y0)});var M=k.select(".nv-areaWrap").selectAll("path.nv-area").data(function(e){return e});M.enter().append("path").attr("class",function(e,t){return"nv-area nv-area-"+t}).attr("d",function(e,t){return O(e.values,e.seriesIndex)}).on("mouseover",function(e,t){d3.select(this).classed("hover",true);g.areaMouseover({point:e,series:e.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:t})}).on("mouseout",function(e,t){d3.select(this).classed("hover",false);g.areaMouseout({point:e,series:e.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:t})}).on("click",function(e,t){d3.select(this).classed("hover",false);g.areaClick({point:e,series:e.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:t})});M.exit().transition().attr("d",function(e,t){return O(e.values,t)}).remove();M.style("fill",function(e,t){return e.color||i(e,e.seriesIndex)}).style("stroke",function(e,t){return e.color||i(e,e.seriesIndex)});M.transition().attr("d",function(e,t){return A(e.values,t)});m.dispatch.on("elementMouseover.area",function(e){k.select(".nv-chart-"+s+" .nv-area-"+e.seriesIndex).classed("hover",true)});m.dispatch.on("elementMouseout.area",function(e){k.select(".nv-chart-"+s+" .nv-area-"+e.seriesIndex).classed("hover",false)});y.d3_stackedOffset_stackPercent=function(e){var t=e.length,n=e[0].length,r=1/t,i,s,o,a=[];for(s=0;s<n;++s){for(i=0,o=0;i<w.length;i++)o+=u(w[i].values[s]);if(o)for(i=0;i<t;i++)e[i][s][1]/=o;else for(i=0;i<t;i++)e[i][s][1]=r}for(s=0;s<n;++s)a[s]=0;return a}});return y}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=e.utils.defaultColor(),s=Math.floor(Math.random()*1e5),o=function(e){return e.x},u=function(e){return e.y},a="stack",f="zero",l="default",c="linear",h=false,p,d,v=d3.format(",.3f"),m=e.models.scatter(),g=d3.dispatch("tooltipShow","tooltipHide","areaClick","areaMouseover","areaMouseout");m.size(2.2).sizeDomain([2.2,2.2]);m.dispatch.on("elementClick.area",function(e){g.areaClick(e)});m.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],g.tooltipShow(e)});m.dispatch.on("elementMouseout.tooltip",function(e){g.tooltipHide(e)});y.dispatch=g;y.scatter=m;d3.rebind(y,m,"interactive","size","xScale","yScale","zScale","xDomain","yDomain","xRange","yRange","sizeDomain","forceX","forceY","forceSize","clipVoronoi","useVoronoi","clipRadius","highlightPoint","clearHighlights");y.options=e.utils.optionsFunc.bind(y);y.x=function(e){if(!arguments.length)return o;o=d3.functor(e);return y};y.y=function(e){if(!arguments.length)return u;u=d3.functor(e);return y};y.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return y};y.width=function(e){if(!arguments.length)return n;n=e;return y};y.height=function(e){if(!arguments.length)return r;r=e;return y};y.clipEdge=function(e){if(!arguments.length)return h;h=e;return y};y.color=function(t){if(!arguments.length)return i;i=e.utils.getColor(t);return y};y.offset=function(e){if(!arguments.length)return f;f=e;return y};y.order=function(e){if(!arguments.length)return l;l=e;return y};y.style=function(e){if(!arguments.length)return a;a=e;switch(a){case"stack":y.offset("zero");y.order("default");break;case"stream":y.offset("wiggle");y.order("inside-out");break;case"stream-center":y.offset("silhouette");y.order("inside-out");break;case"expand":y.offset("expand");y.order("default");break;case"stack_percent":y.offset(y.d3_stackedOffset_stackPercent);y.order("default");break}return y};y.interpolate=function(e){if(!arguments.length)return c;c=e;return y};return y};e.models.stackedAreaChart=function(){"use strict";function D(b){b.each(function(b){var x=d3.select(this),P=this;var H=(a||parseInt(x.style("width"))||960)-u.left-u.right,B=(f||parseInt(x.style("height"))||400)-u.top-u.bottom;D.update=function(){x.transition().duration(M).call(D)};D.container=this;if(y=="right")H=H-250;T.disabled=b.map(function(e){return!!e.disabled});if(!N){var j;N={};for(j in T){if(T[j]instanceof Array)N[j]=T[j].slice(0);else N[j]=T[j]}}if(!b||!b.length||!b.filter(function(e){return e.values.length}).length){var F=x.selectAll(".nv-noData").data([C]);F.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");F.attr("x",u.left+H/2).attr("y",u.top+B/2).text(function(e){return e});return D}else{x.selectAll(".nv-noData").remove()}w=t.xScale();E=t.yScale();var I=x.selectAll("g.nv-wrap.nv-stackedAreaChart").data([b]);var q=I.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedAreaChart").append("g");var R=I.select("g");q.append("rect").style("opacity",0);q.append("g").attr("class","nv-x nv-axis");q.append("g").attr("class","nv-y nv-axis");q.append("g").attr("class","nv-stackedWrap");q.append("g").attr("class","nv-legendWrap");q.append("g").attr("class","nv-controlsWrap");q.append("g").attr("class","nv-interactive");R.select("rect").attr("width",H).attr("height",B);if(h){var U=c?H-L:H;i.width(U);R.select(".nv-legendWrap").datum(b).call(i);if(u.top!=i.height()){u.top=i.height();B=(f||parseInt(x.style("height"))||400)-u.top-u.bottom}if(y=="right"){R.select(".nv-legendWrap").attr("transform","translate("+H+","+20+")")}else{R.select(".nv-legendWrap").attr("transform","translate("+(H-U)+","+ -u.top+")")}}if(c){var z=[{key:O.stacked||"Stacked",metaKey:"Stacked",disabled:t.style()!="stack",style:"stack"},{key:O.stream||"Stream",metaKey:"Stream",disabled:t.style()!="stream",style:"stream"},{key:O.expanded||"Expanded",metaKey:"Expanded",disabled:t.style()!="expand",style:"expand"},{key:O.stack_percent||"Stack %",metaKey:"Stack_Percent",disabled:t.style()!="stack_percent",style:"stack_percent"}];L=A.length/3*260;z=z.filter(function(e){return A.indexOf(e.metaKey)!==-1});s.width(L).color(["#444","#444","#444"]);R.select(".nv-controlsWrap").datum(z).call(s);if(u.top!=Math.max(s.height(),i.height())){u.top=Math.max(s.height(),i.height());B=(f||parseInt(x.style("height"))||400)-u.top-u.bottom}R.select(".nv-controlsWrap").attr("transform","translate(0,"+ -u.top+")")}I.attr("transform","translate("+u.left+","+u.top+")");if(v){R.select(".nv-y.nv-axis").attr("transform","translate("+H+",0)")}if(m){o.width(H).height(B).margin({left:u.left,top:u.top}).svgContainer(x).xScale(w);I.select(".nv-interactive").call(o)}t.width(H).height(B);var W=R.select(".nv-stackedWrap").datum(b);W.transition().call(t);if(p){n.scale(w).ticks(H/100).tickSize(-B,0);R.select(".nv-x.nv-axis").attr("transform","translate(0,"+B+")");R.select(".nv-x.nv-axis").transition().duration(0).call(n)}if(d){r.scale(E).ticks(t.offset()=="wiggle"?0:B/36).tickSize(-H,0).setTickFormat(t.style()=="expand"||t.style()=="stack_percent"?d3.format("%"):S);R.select(".nv-y.nv-axis").transition().duration(0).call(r)}t.dispatch.on("areaClick.toggle",function(e){if(b.filter(function(e){return!e.disabled}).length===1)b=b.map(function(e){e.disabled=false;return e});else b=b.map(function(t,n){t.disabled=n!=e.seriesIndex;return t});T.disabled=b.map(function(e){return!!e.disabled});k.stateChange(T);D.update()});i.dispatch.on("stateChange",function(e){T.disabled=e.disabled;k.stateChange(T);D.update()});s.dispatch.on("legendClick",function(e,n){if(!e.disabled)return;z=z.map(function(e){e.disabled=true;return e});e.disabled=false;t.style(e.style);T.style=t.style();k.stateChange(T);D.update()});o.dispatch.on("elementMousemove",function(i){t.clearHighlights();var s,a,f,c=[];b.filter(function(e,t){e.seriesIndex=t;return!e.disabled}).forEach(function(n,r){a=e.interactiveBisect(n.values,i.pointXValue,D.x());t.highlightPoint(r,a,true);var o=n.values[a];if(typeof o==="undefined")return;if(typeof s==="undefined")s=o;if(typeof f==="undefined")f=D.xScale()(D.x()(o,a));var u=t.style()=="expand"?o.display.y:D.y()(o,a);c.push({key:n.key,value:u,color:l(n,n.seriesIndex),stackedValue:o.display})});c.reverse();if(c.length>2){var h=D.yScale().invert(i.mouseY);var p=Infinity,d=null;c.forEach(function(e,t){if(h>=e.stackedValue.y0&&h<=e.stackedValue.y0+e.stackedValue.y){d=t;return}});if(d!=null)c[d].highlight=true}var v=n.tickFormat()(D.x()(s,a));var m=t.style()=="expand"?function(e,t){return d3.format(".1%")(e)}:function(e,t){return r.tickFormat()(e)};o.tooltip.position({left:f+u.left,top:i.mouseY+u.top}).chartContainer(P.parentNode).enabled(g).valueFormatter(m).data({value:v,series:c})();o.renderGuideLine(f)});o.dispatch.on("elementMouseout",function(e){k.tooltipHide();t.clearHighlights()});k.on("tooltipShow",function(e){if(g)_(e,P.parentNode)});k.on("changeState",function(e){if(typeof e.disabled!=="undefined"){b.forEach(function(t,n){t.disabled=e.disabled[n]});T.disabled=e.disabled}if(typeof e.style!=="undefined"){t.style(e.style)}D.update()})});return D}var t=e.models.stackedArea(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend(),o=e.interactiveGuideline();var u={top:30,right:25,bottom:50,left:60},a=null,f=null,l=e.utils.defaultColor(),c=true,h=true,p=true,d=true,v=false,m=false,g=true,y="top",b=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" on "+t+"</p>"},w,E,S=d3.format(",.2f"),x=d3.format(",.3f"),T={style:t.style()},N=null,C="No Data Available.",k=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),L=250,A=["Stacked","Stream","Expanded"],O={},M=250;n.orient("bottom").tickPadding(7);r.orient(v?"right":"left");s.updateState(false);var _=function(r,i){var s=r.pos[0]+(i.offsetLeft||0),o=r.pos[1]+(i.offsetTop||0),u=n.tickFormat()(t.x()(r.point,r.pointIndex)),a=x(t.y()(r.point,r.pointIndex)),f=b(r.series.key,u,a,r,D);e.tooltip.show([s,o],f,r.value<0?"n":"s",null,i)};t.dispatch.on("tooltipShow",function(e){e.pos=[e.pos[0]+u.left,e.pos[1]+u.top],k.tooltipShow(e)});t.dispatch.on("tooltipHide",function(e){k.tooltipHide(e)});k.on("tooltipHide",function(){if(g)e.tooltip.cleanup()});D.dispatch=k;D.stacked=t;D.legend=i;D.controls=s;D.xAxis=n;D.yAxis=r;D.interactiveLayer=o;d3.rebind(D,t,"x","y","size","xScale","yScale","xDomain","yDomain","xRange","yRange","sizeDomain","interactive","useVoronoi","offset","order","style","clipEdge","forceX","forceY","forceSize","interpolate");D.options=e.utils.optionsFunc.bind(D);D.margin=function(e){if(!arguments.length)return u;u.top=typeof e.top!="undefined"?e.top:u.top;u.right=typeof e.right!="undefined"?e.right:u.right;u.bottom=typeof e.bottom!="undefined"?e.bottom:u.bottom;u.left=typeof e.left!="undefined"?e.left:u.left;return D};D.width=function(e){if(!arguments.length)return a;a=e;return D};D.height=function(e){if(!arguments.length)return f;f=e;return D};D.color=function(n){if(!arguments.length)return l;l=e.utils.getColor(n);i.color(l);t.color(l);return D};D.showControls=function(e){if(!arguments.length)return c;c=e;return D};D.showLegend=function(e){if(!arguments.length)return h;h=e;return D};D.showXAxis=function(e){if(!arguments.length)return p;p=e;return D};D.showYAxis=function(e){if(!arguments.length)return d;d=e;return D};D.rightAlignYAxis=function(e){if(!arguments.length)return v;v=e;r.orient(e?"right":"left");return D};D.useInteractiveGuideline=function(e){if(!arguments.length)return m;m=e;if(e===true){D.interactive(false);D.useVoronoi(false)}return D};D.tooltip=function(e){if(!arguments.length)return b;b=e;return D};D.tooltips=function(e){if(!arguments.length)return g;g=e;return D};D.legendPos=function(e){if(!arguments.length)return y;y=e;return D};D.tooltipContent=function(e){if(!arguments.length)return b;b=e;return D};D.yAxisTooltipFormat=function(e){if(!arguments.length)return x;x=e;return D};D.state=function(e){if(!arguments.length)return T;T=e;return D};D.defaultState=function(e){if(!arguments.length)return N;N=e;return D};D.noData=function(e){if(!arguments.length)return C;C=e;return D};D.transitionDuration=function(e){if(!arguments.length)return M;M=e;return D};D.controlsData=function(e){if(!arguments.length)return A;A=e;return D};D.controlLabels=function(e){if(!arguments.length)return O;if(typeof e!=="object")return O;O=e;return D};r.setTickFormat=r.tickFormat;r.tickFormat=function(e){if(!arguments.length)return S;S=e;return r};return D}})() \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/outro.js b/ecomp-portal-BE/war/static/fusion/d3/js/outro.js
deleted file mode 100644
index 158693a0..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/outro.js
+++ /dev/null
@@ -1 +0,0 @@
-})(); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/sankey.js b/ecomp-portal-BE/war/static/fusion/d3/js/sankey.js
deleted file mode 100644
index c3bc59fb..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/sankey.js
+++ /dev/null
@@ -1,292 +0,0 @@
-d3.sankey = function() {
- var sankey = {},
- nodeWidth = 24,
- nodePadding = 8,
- size = [1, 1],
- nodes = [],
- links = [];
-
- sankey.nodeWidth = function(_) {
- if (!arguments.length) return nodeWidth;
- nodeWidth = +_;
- return sankey;
- };
-
- sankey.nodePadding = function(_) {
- if (!arguments.length) return nodePadding;
- nodePadding = +_;
- return sankey;
- };
-
- sankey.nodes = function(_) {
- if (!arguments.length) return nodes;
- nodes = _;
- return sankey;
- };
-
- sankey.links = function(_) {
- if (!arguments.length) return links;
- links = _;
- return sankey;
- };
-
- sankey.size = function(_) {
- if (!arguments.length) return size;
- size = _;
- return sankey;
- };
-
- sankey.layout = function(iterations) {
- computeNodeLinks();
- computeNodeValues();
- computeNodeBreadths();
- computeNodeDepths(iterations);
- computeLinkDepths();
- return sankey;
- };
-
- sankey.relayout = function() {
- computeLinkDepths();
- return sankey;
- };
-
- sankey.link = function() {
- var curvature = .5;
-
- function link(d) {
- var x0 = d.source.x + d.source.dx,
- x1 = d.target.x,
- xi = d3.interpolateNumber(x0, x1),
- x2 = xi(curvature),
- x3 = xi(1 - curvature),
- y0 = d.source.y + d.sy + d.dy / 2,
- y1 = d.target.y + d.ty + d.dy / 2;
- return "M" + x0 + "," + y0
- + "C" + x2 + "," + y0
- + " " + x3 + "," + y1
- + " " + x1 + "," + y1;
- }
-
- link.curvature = function(_) {
- if (!arguments.length) return curvature;
- curvature = +_;
- return link;
- };
-
- return link;
- };
-
- // Populate the sourceLinks and targetLinks for each node.
- // Also, if the source and target are not objects, assume they are indices.
- function computeNodeLinks() {
- nodes.forEach(function(node) {
- node.sourceLinks = [];
- node.targetLinks = [];
- });
- links.forEach(function(link) {
- var source = link.source,
- target = link.target;
- if (typeof source === "number") source = link.source = nodes[link.source];
- if (typeof target === "number") target = link.target = nodes[link.target];
- source.sourceLinks.push(link);
- target.targetLinks.push(link);
- });
- }
-
- // Compute the value (size) of each node by summing the associated links.
- function computeNodeValues() {
- nodes.forEach(function(node) {
- node.value = Math.max(
- d3.sum(node.sourceLinks, value),
- d3.sum(node.targetLinks, value)
- );
- });
- }
-
- // Iteratively assign the breadth (x-position) for each node.
- // Nodes are assigned the maximum breadth of incoming neighbors plus one;
- // nodes with no incoming links are assigned breadth zero, while
- // nodes with no outgoing links are assigned the maximum breadth.
- function computeNodeBreadths() {
- var remainingNodes = nodes,
- nextNodes,
- x = 0;
-
- while (remainingNodes.length) {
- nextNodes = [];
- remainingNodes.forEach(function(node) {
- node.x = x;
- node.dx = nodeWidth;
- node.sourceLinks.forEach(function(link) {
- nextNodes.push(link.target);
- });
- });
- remainingNodes = nextNodes;
- ++x;
- }
-
- //
- moveSinksRight(x);
- scaleNodeBreadths((size[0] - nodeWidth) / (x - 1));
- }
-
- function moveSourcesRight() {
- nodes.forEach(function(node) {
- if (!node.targetLinks.length) {
- node.x = d3.min(node.sourceLinks, function(d) { return d.target.x; }) - 1;
- }
- });
- }
-
- function moveSinksRight(x) {
- nodes.forEach(function(node) {
- if (!node.sourceLinks.length) {
- node.x = x - 1;
- }
- });
- }
-
- function scaleNodeBreadths(kx) {
- nodes.forEach(function(node) {
- node.x *= kx;
- });
- }
-
- function computeNodeDepths(iterations) {
- var nodesByBreadth = d3.nest()
- .key(function(d) { return d.x; })
- .sortKeys(d3.ascending)
- .entries(nodes)
- .map(function(d) { return d.values; });
-
- //
- initializeNodeDepth();
- resolveCollisions();
- for (var alpha = 1; iterations > 0; --iterations) {
- relaxRightToLeft(alpha *= .99);
- resolveCollisions();
- relaxLeftToRight(alpha);
- resolveCollisions();
- }
-
- function initializeNodeDepth() {
- var ky = d3.min(nodesByBreadth, function(nodes) {
- return (size[1] - (nodes.length - 1) * nodePadding) / d3.sum(nodes, value);
- });
-
- nodesByBreadth.forEach(function(nodes) {
- nodes.forEach(function(node, i) {
- node.y = i;
- node.dy = node.value * ky;
- });
- });
-
- links.forEach(function(link) {
- link.dy = link.value * ky;
- });
- }
-
- function relaxLeftToRight(alpha) {
- nodesByBreadth.forEach(function(nodes, breadth) {
- nodes.forEach(function(node) {
- if (node.targetLinks.length) {
- var y = d3.sum(node.targetLinks, weightedSource) / d3.sum(node.targetLinks, value);
- node.y += (y - center(node)) * alpha;
- }
- });
- });
-
- function weightedSource(link) {
- return center(link.source) * link.value;
- }
- }
-
- function relaxRightToLeft(alpha) {
- nodesByBreadth.slice().reverse().forEach(function(nodes) {
- nodes.forEach(function(node) {
- if (node.sourceLinks.length) {
- var y = d3.sum(node.sourceLinks, weightedTarget) / d3.sum(node.sourceLinks, value);
- node.y += (y - center(node)) * alpha;
- }
- });
- });
-
- function weightedTarget(link) {
- return center(link.target) * link.value;
- }
- }
-
- function resolveCollisions() {
- nodesByBreadth.forEach(function(nodes) {
- var node,
- dy,
- y0 = 0,
- n = nodes.length,
- i;
-
- // Push any overlapping nodes down.
- nodes.sort(ascendingDepth);
- for (i = 0; i < n; ++i) {
- node = nodes[i];
- dy = y0 - node.y;
- if (dy > 0) node.y += dy;
- y0 = node.y + node.dy + nodePadding;
- }
-
- // If the bottommost node goes outside the bounds, push it back up.
- dy = y0 - nodePadding - size[1];
- if (dy > 0) {
- y0 = node.y -= dy;
-
- // Push any overlapping nodes back up.
- for (i = n - 2; i >= 0; --i) {
- node = nodes[i];
- dy = node.y + node.dy + nodePadding - y0;
- if (dy > 0) node.y -= dy;
- y0 = node.y;
- }
- }
- });
- }
-
- function ascendingDepth(a, b) {
- return a.y - b.y;
- }
- }
-
- function computeLinkDepths() {
- nodes.forEach(function(node) {
- node.sourceLinks.sort(ascendingTargetDepth);
- node.targetLinks.sort(ascendingSourceDepth);
- });
- nodes.forEach(function(node) {
- var sy = 0, ty = 0;
- node.sourceLinks.forEach(function(link) {
- link.sy = sy;
- sy += link.dy;
- });
- node.targetLinks.forEach(function(link) {
- link.ty = ty;
- ty += link.dy;
- });
- });
-
- function ascendingSourceDepth(a, b) {
- return a.source.y - b.source.y;
- }
-
- function ascendingTargetDepth(a, b) {
- return a.target.y - b.target.y;
- }
- }
-
- function center(node) {
- return node.y + node.dy / 2;
- }
-
- function value(link) {
- return link.value;
- }
-
- return sankey;
-};
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/tooltip.js b/ecomp-portal-BE/war/static/fusion/d3/js/tooltip.js
deleted file mode 100644
index 46e5a816..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/tooltip.js
+++ /dev/null
@@ -1,490 +0,0 @@
-/* Tooltip rendering model for nvd3 charts.
-window.nv.models.tooltip is the updated,new way to render tooltips.
-
-window.nv.tooltip.show is the old tooltip code.
-window.nv.tooltip.* also has various helper methods.
-*/
-(function() {
- "use strict";
- window.nv.tooltip = {};
-
- /* Model which can be instantiated to handle tooltip rendering.
- Example usage:
- var tip = nv.models.tooltip().gravity('w').distance(23)
- .data(myDataObject);
-
- tip(); //just invoke the returned function to render tooltip.
- */
- window.nv.models.tooltip = function() {
- var content = null //HTML contents of the tooltip. If null, the content is generated via the data variable.
- , data = null /* Tooltip data. If data is given in the proper format, a consistent tooltip is generated.
- Format of data:
- {
- key: "Date",
- value: "August 2009",
- series: [
- {
- key: "Series 1",
- value: "Value 1",
- color: "#000"
- },
- {
- key: "Series 2",
- value: "Value 2",
- color: "#00f"
- }
- ]
-
- }
-
- */
- , gravity = 'w' //Can be 'n','s','e','w'. Determines how tooltip is positioned.
- , distance = 50 //Distance to offset tooltip from the mouse location.
- , snapDistance = 25 //Tolerance allowed before tooltip is moved from its current position (creates 'snapping' effect)
- , fixedTop = null //If not null, this fixes the top position of the tooltip.
- , classes = null //Attaches additional CSS classes to the tooltip DIV that is created.
- , chartContainer = null //Parent DIV, of the SVG Container that holds the chart.
- , tooltipElem = null //actual DOM element representing the tooltip.
- , position = {left: null, top: null} //Relative position of the tooltip inside chartContainer.
- , enabled = true //True -> tooltips are rendered. False -> don't render tooltips.
- //Generates a unique id when you create a new tooltip() object
- , id = "nvtooltip-" + Math.floor(Math.random() * 100000)
- ;
-
- //CSS class to specify whether element should not have mouse events.
- var nvPointerEventsClass = "nv-pointer-events-none";
-
- //Format function for the tooltip values column
- var valueFormatter = function(d,i) {
- return d;
- };
-
- //Format function for the tooltip header value.
- var headerFormatter = function(d) {
- return d;
- };
-
- //By default, the tooltip model renders a beautiful table inside a DIV.
- //You can override this function if a custom tooltip is desired.
- var contentGenerator = function(d) {
- if (content != null) return content;
-
- if (d == null) return '';
-
- var table = d3.select(document.createElement("table"));
- var theadEnter = table.selectAll("thead")
- .data([d])
- .enter().append("thead");
- theadEnter.append("tr")
- .append("td")
- .attr("colspan",3)
- .append("strong")
- .classed("x-value",true)
- .html(headerFormatter(d.value));
-
- var tbodyEnter = table.selectAll("tbody")
- .data([d])
- .enter().append("tbody");
- var trowEnter = tbodyEnter.selectAll("tr")
- .data(function(p) { return p.series})
- .enter()
- .append("tr")
- .classed("highlight", function(p) { return p.highlight})
- ;
-
- trowEnter.append("td")
- .classed("legend-color-guide",true)
- .append("div")
- .style("background-color", function(p) { return p.color});
- trowEnter.append("td")
- .classed("key",true)
- .html(function(p) {return p.key});
- trowEnter.append("td")
- .classed("value",true)
- .html(function(p,i) { return valueFormatter(p.value,i) });
-
-
- trowEnter.selectAll("td").each(function(p) {
- if (p.highlight) {
- var opacityScale = d3.scale.linear().domain([0,1]).range(["#fff",p.color]);
- var opacity = 0.6;
- d3.select(this)
- .style("border-bottom-color", opacityScale(opacity))
- .style("border-top-color", opacityScale(opacity))
- ;
- }
- });
-
- var html = table.node().outerHTML;
- if (d.footer !== undefined)
- html += "<div class='footer'>" + d.footer + "</div>";
- return html;
-
- };
-
- var dataSeriesExists = function(d) {
- if (d && d.series && d.series.length > 0) return true;
-
- return false;
- };
-
- //In situations where the chart is in a 'viewBox', re-position the tooltip based on how far chart is zoomed.
- function convertViewBoxRatio() {
- if (chartContainer) {
- var svg = d3.select(chartContainer);
- if (svg.node().tagName !== "svg") {
- svg = svg.select("svg");
- }
- var viewBox = (svg.node()) ? svg.attr('viewBox') : null;
- if (viewBox) {
- viewBox = viewBox.split(' ');
- var ratio = parseInt(svg.style('width')) / viewBox[2];
-
- position.left = position.left * ratio;
- position.top = position.top * ratio;
- }
- }
- }
-
- //Creates new tooltip container, or uses existing one on DOM.
- function getTooltipContainer(newContent) {
- var body;
- if (chartContainer)
- body = d3.select(chartContainer);
- else
- body = d3.select("body");
-
- var container = body.select(".nvtooltip");
- if (container.node() === null) {
- //Create new tooltip div if it doesn't exist on DOM.
- container = body.append("div")
- .attr("class", "nvtooltip " + (classes? classes: "xy-tooltip"))
- .attr("id",id)
- ;
- }
-
-
- container.node().innerHTML = newContent;
- container.style("top",0).style("left",0).style("opacity",0);
- container.selectAll("div, table, td, tr").classed(nvPointerEventsClass,true)
- container.classed(nvPointerEventsClass,true);
- return container.node();
- }
-
-
-
- //Draw the tooltip onto the DOM.
- function nvtooltip() {
- if (!enabled) return;
- if (!dataSeriesExists(data)) return;
-
- convertViewBoxRatio();
-
- var left = position.left;
- var top = (fixedTop != null) ? fixedTop : position.top;
- var container = getTooltipContainer(contentGenerator(data));
- tooltipElem = container;
- if (chartContainer) {
- var svgComp = chartContainer.getElementsByTagName("svg")[0];
- var boundRect = (svgComp) ? svgComp.getBoundingClientRect() : chartContainer.getBoundingClientRect();
- var svgOffset = {left:0,top:0};
- if (svgComp) {
- var svgBound = svgComp.getBoundingClientRect();
- var chartBound = chartContainer.getBoundingClientRect();
- var svgBoundTop = svgBound.top;
-
- //Defensive code. Sometimes, svgBoundTop can be a really negative
- // number, like -134254. That's a bug.
- // If such a number is found, use zero instead. FireFox bug only
- if (svgBoundTop < 0) {
- var containerBound = chartContainer.getBoundingClientRect();
- svgBoundTop = (Math.abs(svgBoundTop) > containerBound.height) ? 0 : svgBoundTop;
- }
- svgOffset.top = Math.abs(svgBoundTop - chartBound.top);
- svgOffset.left = Math.abs(svgBound.left - chartBound.left);
- }
- //If the parent container is an overflow <div> with scrollbars, subtract the scroll offsets.
- //You need to also add any offset between the <svg> element and its containing <div>
- //Finally, add any offset of the containing <div> on the whole page.
- left += chartContainer.offsetLeft + svgOffset.left - 2*chartContainer.scrollLeft;
- top += chartContainer.offsetTop + svgOffset.top - 2*chartContainer.scrollTop;
- }
-
- if (snapDistance && snapDistance > 0) {
- top = Math.floor(top/snapDistance) * snapDistance;
- }
-
- nv.tooltip.calcTooltipPosition([left,top], gravity, distance, container);
- return nvtooltip;
- };
-
- nvtooltip.nvPointerEventsClass = nvPointerEventsClass;
-
- nvtooltip.content = function(_) {
- if (!arguments.length) return content;
- content = _;
- return nvtooltip;
- };
-
- //Returns tooltipElem...not able to set it.
- nvtooltip.tooltipElem = function() {
- return tooltipElem;
- };
-
- nvtooltip.contentGenerator = function(_) {
- if (!arguments.length) return contentGenerator;
- if (typeof _ === 'function') {
- contentGenerator = _;
- }
- return nvtooltip;
- };
-
- nvtooltip.data = function(_) {
- if (!arguments.length) return data;
- data = _;
- return nvtooltip;
- };
-
- nvtooltip.gravity = function(_) {
- if (!arguments.length) return gravity;
- gravity = _;
- return nvtooltip;
- };
-
- nvtooltip.distance = function(_) {
- if (!arguments.length) return distance;
- distance = _;
- return nvtooltip;
- };
-
- nvtooltip.snapDistance = function(_) {
- if (!arguments.length) return snapDistance;
- snapDistance = _;
- return nvtooltip;
- };
-
- nvtooltip.classes = function(_) {
- if (!arguments.length) return classes;
- classes = _;
- return nvtooltip;
- };
-
- nvtooltip.chartContainer = function(_) {
- if (!arguments.length) return chartContainer;
- chartContainer = _;
- return nvtooltip;
- };
-
- nvtooltip.position = function(_) {
- if (!arguments.length) return position;
- position.left = (typeof _.left !== 'undefined') ? _.left : position.left;
- position.top = (typeof _.top !== 'undefined') ? _.top : position.top;
- return nvtooltip;
- };
-
- nvtooltip.fixedTop = function(_) {
- if (!arguments.length) return fixedTop;
- fixedTop = _;
- return nvtooltip;
- };
-
- nvtooltip.enabled = function(_) {
- if (!arguments.length) return enabled;
- enabled = _;
- return nvtooltip;
- };
-
- nvtooltip.valueFormatter = function(_) {
- if (!arguments.length) return valueFormatter;
- if (typeof _ === 'function') {
- valueFormatter = _;
- }
- return nvtooltip;
- };
-
- nvtooltip.headerFormatter = function(_) {
- if (!arguments.length) return headerFormatter;
- if (typeof _ === 'function') {
- headerFormatter = _;
- }
- return nvtooltip;
- };
-
- //id() is a read-only function. You can't use it to set the id.
- nvtooltip.id = function() {
- return id;
- };
-
-
- return nvtooltip;
- };
-
-
- //Original tooltip.show function. Kept for backward compatibility.
- // pos = [left,top]
- nv.tooltip.show = function(pos, content, gravity, dist, parentContainer, classes) {
-
- //Create new tooltip div if it doesn't exist on DOM.
- var container = document.createElement('div');
- container.className = 'nvtooltip ' + (classes ? classes : 'xy-tooltip');
-
- var body = parentContainer;
- if ( !parentContainer || parentContainer.tagName.match(/g|svg/i)) {
- //If the parent element is an SVG element, place tooltip in the <body> element.
- body = document.getElementsByTagName('body')[0];
- }
-
- container.style.left = 0;
- container.style.top = 0;
- container.style.opacity = 0;
- container.innerHTML = content;
- body.appendChild(container);
-
- //If the parent container is an overflow <div> with scrollbars, subtract the scroll offsets.
- if (parentContainer) {
- pos[0] = pos[0] - parentContainer.scrollLeft;
- pos[1] = pos[1] - parentContainer.scrollTop;
- }
- nv.tooltip.calcTooltipPosition(pos, gravity, dist, container);
- };
-
- //Looks up the ancestry of a DOM element, and returns the first NON-svg node.
- nv.tooltip.findFirstNonSVGParent = function(Elem) {
- while(Elem.tagName.match(/^g|svg$/i) !== null) {
- Elem = Elem.parentNode;
- }
- return Elem;
- };
-
- //Finds the total offsetTop of a given DOM element.
- //Looks up the entire ancestry of an element, up to the first relatively positioned element.
- nv.tooltip.findTotalOffsetTop = function ( Elem, initialTop ) {
- var offsetTop = initialTop;
-
- do {
- if( !isNaN( Elem.offsetTop ) ) {
- offsetTop += (Elem.offsetTop);
- }
- } while( Elem = Elem.offsetParent );
- return offsetTop;
- };
-
- //Finds the total offsetLeft of a given DOM element.
- //Looks up the entire ancestry of an element, up to the first relatively positioned element.
- nv.tooltip.findTotalOffsetLeft = function ( Elem, initialLeft) {
- var offsetLeft = initialLeft;
-
- do {
- if( !isNaN( Elem.offsetLeft ) ) {
- offsetLeft += (Elem.offsetLeft);
- }
- } while( Elem = Elem.offsetParent );
- return offsetLeft;
- };
-
- //Global utility function to render a tooltip on the DOM.
- //pos = [left,top] coordinates of where to place the tooltip, relative to the SVG chart container.
- //gravity = how to orient the tooltip
- //dist = how far away from the mouse to place tooltip
- //container = tooltip DIV
- nv.tooltip.calcTooltipPosition = function(pos, gravity, dist, container) {
-
- var height = parseInt(container.offsetHeight),
- width = parseInt(container.offsetWidth),
- windowWidth = nv.utils.windowSize().width,
- windowHeight = nv.utils.windowSize().height,
- scrollTop = window.pageYOffset,
- scrollLeft = window.pageXOffset,
- left, top;
-
- windowHeight = window.innerWidth >= document.body.scrollWidth ? windowHeight : windowHeight - 16;
- windowWidth = window.innerHeight >= document.body.scrollHeight ? windowWidth : windowWidth - 16;
-
- gravity = gravity || 's';
- dist = dist || 20;
-
- var tooltipTop = function ( Elem ) {
- return nv.tooltip.findTotalOffsetTop(Elem, top);
- };
-
- var tooltipLeft = function ( Elem ) {
- return nv.tooltip.findTotalOffsetLeft(Elem,left);
- };
-
- switch (gravity) {
- case 'e':
- left = pos[0] - width - dist;
- top = pos[1] - (height / 2);
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- if (tLeft < scrollLeft) left = pos[0] + dist > scrollLeft ? pos[0] + dist : scrollLeft - tLeft + left;
- if (tTop < scrollTop) top = scrollTop - tTop + top;
- if (tTop + height > scrollTop + windowHeight) top = scrollTop + windowHeight - tTop + top - height;
- break;
- case 'w':
- left = pos[0] + dist;
- top = pos[1] - (height / 2);
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- if (tLeft + width > windowWidth) left = pos[0] - width - dist;
- if (tTop < scrollTop) top = scrollTop + 5;
- if (tTop + height > scrollTop + windowHeight) top = scrollTop + windowHeight - tTop + top - height;
- break;
- case 'n':
- left = pos[0] - (width / 2) - 5;
- top = pos[1] + dist;
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- if (tLeft < scrollLeft) left = scrollLeft + 5;
- if (tLeft + width > windowWidth) left = left - width/2 + 5;
- if (tTop + height > scrollTop + windowHeight) top = scrollTop + windowHeight - tTop + top - height;
- break;
- case 's':
- left = pos[0] - (width / 2);
- top = pos[1] - height - dist;
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- if (tLeft < scrollLeft) left = scrollLeft + 5;
- if (tLeft + width > windowWidth) left = left - width/2 + 5;
- if (scrollTop > tTop) top = scrollTop;
- break;
- case 'none':
- left = pos[0];
- top = pos[1] - dist;
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- break;
- }
-
-
- container.style.left = left+'px';
- container.style.top = top+'px';
- container.style.opacity = 1;
- container.style.position = 'absolute';
-
- return container;
- };
-
- //Global utility function to remove tooltips from the DOM.
- nv.tooltip.cleanup = function() {
-
- // Find the tooltips, mark them for removal by this class (so others cleanups won't find it)
- var tooltips = document.getElementsByClassName('nvtooltip');
- var purging = [];
- while(tooltips.length) {
- purging.push(tooltips[0]);
- tooltips[0].style.transitionDelay = '0 !important';
- tooltips[0].style.opacity = 0;
- tooltips[0].className = 'nvtooltip-pending-removal';
- }
-
- setTimeout(function() {
-
- while (purging.length) {
- var removeMe = purging.pop();
- removeMe.parentNode.removeChild(removeMe);
- }
- }, 500);
- };
-
-})();
diff --git a/ecomp-portal-BE/war/static/fusion/d3/js/utils.js b/ecomp-portal-BE/war/static/fusion/d3/js/utils.js
deleted file mode 100644
index 7b99e1da..00000000
--- a/ecomp-portal-BE/war/static/fusion/d3/js/utils.js
+++ /dev/null
@@ -1,152 +0,0 @@
-
-nv.utils.windowSize = function() {
- // Sane defaults
- var size = {width: 640, height: 480};
-
- // Earlier IE uses Doc.body
- if (document.body && document.body.offsetWidth) {
- size.width = document.body.offsetWidth;
- size.height = document.body.offsetHeight;
- }
-
- // IE can use depending on mode it is in
- if (document.compatMode=='CSS1Compat' &&
- document.documentElement &&
- document.documentElement.offsetWidth ) {
- size.width = document.documentElement.offsetWidth;
- size.height = document.documentElement.offsetHeight;
- }
-
- // Most recent browsers use
- if (window.innerWidth && window.innerHeight) {
- size.width = window.innerWidth;
- size.height = window.innerHeight;
- }
- return (size);
-};
-
-
-
-// Easy way to bind multiple functions to window.onresize
-// TODO: give a way to remove a function after its bound, other than removing all of them
-nv.utils.windowResize = function(fun){
- if (fun === undefined) return;
- var oldresize = window.onresize;
-
- window.onresize = function(e) {
- if (typeof oldresize == 'function') oldresize(e);
- fun(e);
- }
-}
-
-// Backwards compatible way to implement more d3-like coloring of graphs.
-// If passed an array, wrap it in a function which implements the old default
-// behavior
-nv.utils.getColor = function(color) {
- if (!arguments.length) return nv.utils.defaultColor(); //if you pass in nothing, get default colors back
-
- if( Object.prototype.toString.call( color ) === '[object Array]' )
- return function(d, i) { return d.color || color[i % color.length]; };
- else
- return color;
- //can't really help it if someone passes rubbish as color
-}
-
-// Default color chooser uses the index of an object as before.
-nv.utils.defaultColor = function() {
- var colors = d3.scale.category20().range();
- return function(d, i) { return d.color || colors[i % colors.length] };
-}
-
-
-// Returns a color function that takes the result of 'getKey' for each series and
-// looks for a corresponding color from the dictionary,
-nv.utils.customTheme = function(dictionary, getKey, defaultColors) {
- getKey = getKey || function(series) { return series.key }; // use default series.key if getKey is undefined
- defaultColors = defaultColors || d3.scale.category20().range(); //default color function
-
- var defIndex = defaultColors.length; //current default color (going in reverse)
-
- return function(series, index) {
- var key = getKey(series);
-
- if (!defIndex) defIndex = defaultColors.length; //used all the default colors, start over
-
- if (typeof dictionary[key] !== "undefined")
- return (typeof dictionary[key] === "function") ? dictionary[key]() : dictionary[key];
- else
- return defaultColors[--defIndex]; // no match in dictionary, use default color
- }
-}
-
-
-
-// From the PJAX example on d3js.org, while this is not really directly needed
-// it's a very cool method for doing pjax, I may expand upon it a little bit,
-// open to suggestions on anything that may be useful
-nv.utils.pjax = function(links, content) {
- d3.selectAll(links).on("click", function() {
- history.pushState(this.href, this.textContent, this.href);
- load(this.href);
- d3.event.preventDefault();
- });
-
- function load(href) {
- d3.html(href, function(fragment) {
- var target = d3.select(content).node();
- target.parentNode.replaceChild(d3.select(fragment).select(content).node(), target);
- nv.utils.pjax(links, content);
- });
- }
-
- d3.select(window).on("popstate", function() {
- if (d3.event.state) load(d3.event.state);
- });
-}
-
-/* For situations where we want to approximate the width in pixels for an SVG:text element.
-Most common instance is when the element is in a display:none; container.
-Forumla is : text.length * font-size * constant_factor
-*/
-nv.utils.calcApproxTextWidth = function (svgTextElem) {
- if (svgTextElem instanceof d3.selection) {
- var fontSize = parseInt(svgTextElem.style("font-size").replace("px",""));
- var textLength = svgTextElem.text().length;
-
- return textLength * fontSize * 0.5;
- }
- return 0;
-};
-
-/* Numbers that are undefined, null or NaN, convert them to zeros.
-*/
-nv.utils.NaNtoZero = function(n) {
- if (typeof n !== 'number'
- || isNaN(n)
- || n === null
- || n === Infinity) return 0;
-
- return n;
-};
-
-/*
-Snippet of code you can insert into each nv.models.* to give you the ability to
-do things like:
-chart.options({
- showXAxis: true,
- tooltips: true
-});
-
-To enable in the chart:
-chart.options = nv.utils.optionsFunc.bind(chart);
-*/
-nv.utils.optionsFunc = function(args) {
- if (args) {
- d3.map(args).forEach((function(key,value) {
- if (typeof this[key] === "function") {
- this[key](value);
- }
- }).bind(this));
- }
- return this;
-}; \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/images/att_angular_gridster/grips.png b/ecomp-portal-BE/war/static/fusion/images/att_angular_gridster/grips.png
deleted file mode 100644
index 29b92cc5..00000000
--- a/ecomp-portal-BE/war/static/fusion/images/att_angular_gridster/grips.png
+++ /dev/null
Binary files differ
diff --git a/ecomp-portal-BE/war/static/fusion/images/ecomp-login.jpg b/ecomp-portal-BE/war/static/fusion/images/ecomp-login.jpg
deleted file mode 100644
index e1104fa4..00000000
--- a/ecomp-portal-BE/war/static/fusion/images/ecomp-login.jpg
+++ /dev/null
Binary files differ
diff --git a/ecomp-portal-BE/war/static/fusion/images/ecomp_trans.png b/ecomp-portal-BE/war/static/fusion/images/ecomp_trans.png
deleted file mode 100644
index 4e8381c1..00000000
--- a/ecomp-portal-BE/war/static/fusion/images/ecomp_trans.png
+++ /dev/null
Binary files differ
diff --git a/ecomp-portal-BE/war/static/fusion/images/login_button.gif b/ecomp-portal-BE/war/static/fusion/images/login_button.gif
deleted file mode 100644
index 990b5227..00000000
--- a/ecomp-portal-BE/war/static/fusion/images/login_button.gif
+++ /dev/null
Binary files differ
diff --git a/ecomp-portal-BE/war/static/fusion/js/att_angular_gridster/angular-gridster.js b/ecomp-portal-BE/war/static/fusion/js/att_angular_gridster/angular-gridster.js
deleted file mode 100644
index 985fa434..00000000
--- a/ecomp-portal-BE/war/static/fusion/js/att_angular_gridster/angular-gridster.js
+++ /dev/null
@@ -1,2244 +0,0 @@
-/*global define:true*/
-(function(root, factory) {
-
- 'use strict';
-
- if (typeof define === 'function' && define.amd) {
- // AMD
- define(['angular'], factory);
- } else if (typeof exports === 'object') {
- // CommonJS
- module.exports = factory(require('angular'));
- } else {
- // Browser, nothing "exported". Only registered as a module with angular.
- factory(root.angular);
- }
-}(this, function(angular) {
-
- 'use strict';
-
- var ie8 = false;
-
- var getInternetExplorerVersion = function ()
- // Returns the version of Internet Explorer >4 or
- // undefined(indicating the use of another browser).
- {
- var isIE10 = (eval("/*@cc_on!@*/false") && document.documentMode === 10);
- if (isIE10) {
- return 10;
- }
- var v = 3,
- div = document.createElement('div'),
- all = div.getElementsByTagName('i');
- do {
- div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->';
- } while (all[0]);
- return v > 4 ? v : undefined;
- };
-
- var browserVersion = getInternetExplorerVersion();
-
- if (browserVersion && browserVersion < 9) {
- ie8 = true;
- }
-
- // This returned angular module 'gridster' is what is exported.
- return angular.module('attGridsterLib', [])
-
- .constant('gridsterConfig', {
- columns: 6, // number of columns in the grid
- pushing: true, // whether to push other items out of the way
- floating: true, // whether to automatically float items up so they stack
- swapping: true, // whether or not to have items switch places instead of push down if they are the same size
- width: 'auto', // width of the grid. "auto" will expand the grid to its parent container
- colWidth: 'auto', // width of grid columns. "auto" will divide the width of the grid evenly among the columns
- rowHeight: 'match', // height of grid rows. 'match' will make it the same as the column width, a numeric value will be interpreted as pixels, '/2' is half the column width, '*5' is five times the column width, etc.
- margins: [10, 10], // margins in between grid items
- outerMargin: false,
- isMobile: false, // toggle mobile view
- mobileBreakPoint: 100, // width threshold to toggle mobile mode
- mobileModeEnabled: true, // whether or not to toggle mobile mode when screen width is less than mobileBreakPoint
- minColumns: 1, // minimum amount of columns the grid can scale down to
- minRows: 1, // minimum amount of rows to show if the grid is empty
- maxRows: 100, // maximum amount of rows in the grid
- defaultSizeX: 1, // default width of an item in columns
- defaultSizeY: 1, // default height of an item in rows
- minSizeX: 1, // minimum column width of an item
- maxSizeX: null, // maximum column width of an item
- minSizeY: 1, // minumum row height of an item
- maxSizeY: null, // maximum row height of an item
- saveGridItemCalculatedHeightInMobile: false, // grid item height in mobile display. true- to use the calculated height by sizeY given
- resizable: { // options to pass to resizable handler
- enabled: false,
- handles: ['s', 'e', 'n', 'w', 'se', 'ne', 'sw', 'nw']
- },
- draggable: { // options to pass to draggable handler
- enabled: true,
- scrollSensitivity: 20, // Distance in pixels from the edge of the viewport after which the viewport should scroll, relative to pointer
- scrollSpeed: 15 // Speed at which the window should scroll once the mouse pointer gets within scrollSensitivity distance
- }
- })
-
- .controller('GridsterCtrl', ['gridsterConfig', '$timeout',
- function(gridsterConfig, $timeout) {
-
- var gridster = this;
-
- /**
- * Create options from gridsterConfig constant
- */
- angular.extend(this, gridsterConfig);
-
- this.resizable = angular.extend({}, gridsterConfig.resizable || {});
- this.draggable = angular.extend({}, gridsterConfig.draggable || {});
-
- var flag = false;
- this.layoutChanged = function() {
- if (flag) {
- return;
- }
- flag = true;
- $timeout(function() {
- flag = false;
- if (gridster.loaded) {
- gridster.floatItemsUp();
- }
- gridster.updateHeight(gridster.movingItem ? gridster.movingItem.sizeY : 0);
- }, 30);
- };
-
- /**
- * A positional array of the items in the grid
- */
- this.grid = [];
-
- /**
- * Clean up after yourself
- */
- this.destroy = function() {
- // empty the grid to cut back on the possibility
- // of circular references
- if (this.grid) {
- this.grid = [];
- }
- this.$element = null;
- };
-
- /**
- * Overrides default options
- *
- * @param {Object} options The options to override
- */
- this.setOptions = function(options) {
- if (!options) {
- return;
- }
-
- options = angular.extend({}, options);
-
- // all this to avoid using jQuery...
- if (options.draggable) {
- angular.extend(this.draggable, options.draggable);
- delete(options.draggable);
- }
- if (options.resizable) {
- angular.extend(this.resizable, options.resizable);
- delete(options.resizable);
- }
-
- angular.extend(this, options);
-
- if (!this.margins || this.margins.length !== 2) {
- this.margins = [0, 0];
- } else {
- for (var x = 0, l = this.margins.length; x < l; ++x) {
- this.margins[x] = parseInt(this.margins[x], 10);
- if (isNaN(this.margins[x])) {
- this.margins[x] = 0;
- }
- }
- }
- };
-
- /**
- * Check if item can occupy a specified position in the grid
- *
- * @param {Object} item The item in question
- * @param {Number} row The row index
- * @param {Number} column The column index
- * @returns {Boolean} True if if item fits
- */
- this.canItemOccupy = function(item, row, column) {
- return row > -1 && column > -1 && item.sizeX + column <= this.columns && item.sizeY + row <= this.maxRows;
- };
-
- /**
- * Set the item in the first suitable position
- *
- * @param {Object} item The item to insert
- */
- this.autoSetItemPosition = function(item) {
- // walk through each row and column looking for a place it will fit
- for (var rowIndex = 0; rowIndex < this.maxRows; ++rowIndex) {
- for (var colIndex = 0; colIndex < this.columns; ++colIndex) {
- // only insert if position is not already taken and it can fit
- var items = this.getItems(rowIndex, colIndex, item.sizeX, item.sizeY, item);
- if (items.length === 0 && this.canItemOccupy(item, rowIndex, colIndex)) {
- this.putItem(item, rowIndex, colIndex);
- return;
- }
- }
- }
- throw new Error('Unable to place item!');
- };
-
- /**
- * Gets items at a specific coordinate
- *
- * @param {Number} row
- * @param {Number} column
- * @param {Number} sizeX
- * @param {Number} sizeY
- * @param {Array} excludeItems An array of items to exclude from selection
- * @returns {Array} Items that match the criteria
- */
- this.getItems = function(row, column, sizeX, sizeY, excludeItems) {
- var items = [];
- if (!sizeX || !sizeY) {
- sizeX = sizeY = 1;
- }
- if (excludeItems && !(excludeItems instanceof Array)) {
- excludeItems = [excludeItems];
- }
- for (var h = 0; h < sizeY; ++h) {
- for (var w = 0; w < sizeX; ++w) {
- var item = this.getItem(row + h, column + w, excludeItems);
- if (item && (!excludeItems || excludeItems.indexOf(item) === -1) && items.indexOf(item) === -1) {
- items.push(item);
- }
- }
- }
- return items;
- };
-
- /**
- * @param {Array} items
- * @returns {Object} An item that represents the bounding box of the items
- */
- this.getBoundingBox = function(items) {
-
- if (items.length === 0) {
- return null;
- }
- if (items.length === 1) {
- return {
- row: items[0].row,
- col: items[0].col,
- sizeY: items[0].sizeY,
- sizeX: items[0].sizeX
- };
- }
-
- var maxRow = 0;
- var maxCol = 0;
- var minRow = 9999;
- var minCol = 9999;
-
- for (var i = 0, l = items.length; i < l; ++i) {
- var item = items[i];
- minRow = Math.min(item.row, minRow);
- minCol = Math.min(item.col, minCol);
- maxRow = Math.max(item.row + item.sizeY, maxRow);
- maxCol = Math.max(item.col + item.sizeX, maxCol);
- }
-
- return {
- row: minRow,
- col: minCol,
- sizeY: maxRow - minRow,
- sizeX: maxCol - minCol
- };
- };
-
-
- /**
- * Removes an item from the grid
- *
- * @param {Object} item
- */
- this.removeItem = function(item) {
- for (var rowIndex = 0, l = this.grid.length; rowIndex < l; ++rowIndex) {
- var columns = this.grid[rowIndex];
- if (!columns) {
- continue;
- }
- var index = columns.indexOf(item);
- if (index !== -1) {
- columns[index] = null;
- break;
- }
- }
- this.layoutChanged();
- };
-
- /**
- * Returns the item at a specified coordinate
- *
- * @param {Number} row
- * @param {Number} column
- * @param {Array} excludeItems Items to exclude from selection
- * @returns {Object} The matched item or null
- */
- this.getItem = function(row, column, excludeItems) {
- if (excludeItems && !(excludeItems instanceof Array)) {
- excludeItems = [excludeItems];
- }
- var sizeY = 1;
- while (row > -1) {
- var sizeX = 1,
- col = column;
- while (col > -1) {
- var items = this.grid[row];
- if (items) {
- var item = items[col];
- if (item && (!excludeItems || excludeItems.indexOf(item) === -1) && item.sizeX >= sizeX && item.sizeY >= sizeY) {
- return item;
- }
- }
- ++sizeX;
- --col;
- }
- --row;
- ++sizeY;
- }
- return null;
- };
-
- /**
- * Insert an array of items into the grid
- *
- * @param {Array} items An array of items to insert
- */
- this.putItems = function(items) {
- for (var i = 0, l = items.length; i < l; ++i) {
- this.putItem(items[i]);
- }
- };
-
- /**
- * Insert a single item into the grid
- *
- * @param {Object} item The item to insert
- * @param {Number} row (Optional) Specifies the items row index
- * @param {Number} column (Optional) Specifies the items column index
- * @param {Array} ignoreItems
- */
- this.putItem = function(item, row, column, ignoreItems) {
- // auto place item if no row specified
- if (typeof row === 'undefined' || row === null) {
- row = item.row;
- column = item.col;
- if (typeof row === 'undefined' || row === null) {
- this.autoSetItemPosition(item);
- return;
- }
- }
-
- // keep item within allowed bounds
- if (!this.canItemOccupy(item, row, column)) {
- column = Math.min(this.columns - item.sizeX, Math.max(0, column));
- row = Math.min(this.maxRows - item.sizeY, Math.max(0, row));
- }
-
- // check if item is already in grid
- if (item.oldRow !== null && typeof item.oldRow !== 'undefined') {
- var samePosition = item.oldRow === row && item.oldColumn === column;
- var inGrid = this.grid[row] && this.grid[row][column] === item;
- if (samePosition && inGrid) {
- item.row = row;
- item.col = column;
- return;
- } else {
- // remove from old position
- var oldRow = this.grid[item.oldRow];
- if (oldRow && oldRow[item.oldColumn] === item) {
- delete oldRow[item.oldColumn];
- }
- }
- }
-
- item.oldRow = item.row = row;
- item.oldColumn = item.col = column;
-
- this.moveOverlappingItems(item, ignoreItems);
-
- if (!this.grid[row]) {
- this.grid[row] = [];
- }
- this.grid[row][column] = item;
-
- if (this.movingItem === item) {
- this.floatItemUp(item);
- }
- this.layoutChanged();
- };
-
- /**
- * Trade row and column if item1 with item2
- *
- * @param {Object} item1
- * @param {Object} item2
- */
- this.swapItems = function(item1, item2) {
- this.grid[item1.row][item1.col] = item2;
- this.grid[item2.row][item2.col] = item1;
-
- var item1Row = item1.row;
- var item1Col = item1.col;
- item1.row = item2.row;
- item1.col = item2.col;
- item2.row = item1Row;
- item2.col = item1Col;
- };
-
- /**
- * Prevents items from being overlapped
- *
- * @param {Object} item The item that should remain
- * @param {Array} ignoreItems
- */
- this.moveOverlappingItems = function(item, ignoreItems) {
- // don't move item, so ignore it
- if (!ignoreItems) {
- ignoreItems = [item];
- } else if (ignoreItems.indexOf(item) === -1) {
- ignoreItems = ignoreItems.slice(0);
- ignoreItems.push(item);
- }
-
- // get the items in the space occupied by the item's coordinates
- var overlappingItems = this.getItems(
- item.row,
- item.col,
- item.sizeX,
- item.sizeY,
- ignoreItems
- );
- this.moveItemsDown(overlappingItems, item.row + item.sizeY, ignoreItems);
- };
-
- /**
- * Moves an array of items to a specified row
- *
- * @param {Array} items The items to move
- * @param {Number} newRow The target row
- * @param {Array} ignoreItems
- */
- this.moveItemsDown = function(items, newRow, ignoreItems) {
- if (!items || items.length === 0) {
- return;
- }
- items.sort(function(a, b) {
- return a.row - b.row;
- });
-
- ignoreItems = ignoreItems ? ignoreItems.slice(0) : [];
- var topRows = {},
- item, i, l;
-
- // calculate the top rows in each column
- for (i = 0, l = items.length; i < l; ++i) {
- item = items[i];
- var topRow = topRows[item.col];
- if (typeof topRow === 'undefined' || item.row < topRow) {
- topRows[item.col] = item.row;
- }
- }
-
- // move each item down from the top row in its column to the row
- for (i = 0, l = items.length; i < l; ++i) {
- item = items[i];
- var rowsToMove = newRow - topRows[item.col];
- this.moveItemDown(item, item.row + rowsToMove, ignoreItems);
- ignoreItems.push(item);
- }
- };
-
- /**
- * Moves an item down to a specified row
- *
- * @param {Object} item The item to move
- * @param {Number} newRow The target row
- * @param {Array} ignoreItems
- */
- this.moveItemDown = function(item, newRow, ignoreItems) {
- if (item.row >= newRow) {
- return;
- }
- while (item.row < newRow) {
- ++item.row;
- this.moveOverlappingItems(item, ignoreItems);
- }
- this.putItem(item, item.row, item.col, ignoreItems);
- };
-
- /**
- * Moves all items up as much as possible
- */
- this.floatItemsUp = function() {
- if (this.floating === false) {
- return;
- }
- for (var rowIndex = 0, l = this.grid.length; rowIndex < l; ++rowIndex) {
- var columns = this.grid[rowIndex];
- if (!columns) {
- continue;
- }
- for (var colIndex = 0, len = columns.length; colIndex < len; ++colIndex) {
- var item = columns[colIndex];
- if (item) {
- this.floatItemUp(item);
- }
- }
- }
- };
-
- /**
- * Float an item up to the most suitable row
- *
- * @param {Object} item The item to move
- */
- this.floatItemUp = function(item) {
- if (this.floating === false) {
- return;
- }
- var colIndex = item.col,
- sizeY = item.sizeY,
- sizeX = item.sizeX,
- bestRow = null,
- bestColumn = null,
- rowIndex = item.row - 1;
-
- while (rowIndex > -1) {
- var items = this.getItems(rowIndex, colIndex, sizeX, sizeY, item);
- if (items.length !== 0) {
- break;
- }
- bestRow = rowIndex;
- bestColumn = colIndex;
- --rowIndex;
- }
- if (bestRow !== null) {
- this.putItem(item, bestRow, bestColumn);
- }
- };
-
- /**
- * Update gridsters height
- *
- * @param {Number} plus (Optional) Additional height to add
- */
- this.updateHeight = function(plus) {
- var maxHeight = this.minRows;
- plus = plus || 0;
- for (var rowIndex = this.grid.length; rowIndex >= 0; --rowIndex) {
- var columns = this.grid[rowIndex];
- if (!columns) {
- continue;
- }
- for (var colIndex = 0, len = columns.length; colIndex < len; ++colIndex) {
- if (columns[colIndex]) {
- maxHeight = Math.max(maxHeight, rowIndex + plus + columns[colIndex].sizeY);
- }
- }
- }
- this.gridHeight = this.maxRows - maxHeight > 0 ? Math.min(this.maxRows, maxHeight) : Math.max(this.maxRows, maxHeight);
- };
-
- /**
- * Returns the number of rows that will fit in given amount of pixels
- *
- * @param {Number} pixels
- * @param {Boolean} ceilOrFloor (Optional) Determines rounding method
- */
- this.pixelsToRows = function(pixels, ceilOrFloor) {
- if (ceilOrFloor === true) {
- return Math.ceil(pixels / this.curRowHeight);
- } else if (ceilOrFloor === false) {
- return Math.floor(pixels / this.curRowHeight);
- }
-
- return Math.round(pixels / this.curRowHeight);
- };
-
- /**
- * Returns the number of columns that will fit in a given amount of pixels
- *
- * @param {Number} pixels
- * @param {Boolean} ceilOrFloor (Optional) Determines rounding method
- * @returns {Number} The number of columns
- */
- this.pixelsToColumns = function(pixels, ceilOrFloor) {
- if (ceilOrFloor === true) {
- return Math.ceil(pixels / this.curColWidth);
- } else if (ceilOrFloor === false) {
- return Math.floor(pixels / this.curColWidth);
- }
-
- return Math.round(pixels / this.curColWidth);
- };
- }
- ])
-
- .directive('gridsterPreview', function() {
- return {
- replace: true,
- scope: true,
- require: '^gridster',
- template: '<div ng-style="previewStyle()" class="gridster-item gridster-preview-holder"></div>',
- link: function(scope, $el, attrs, gridster) {
-
- /**
- * @returns {Object} style object for preview element
- */
- scope.previewStyle = function() {
-
- if (!gridster.movingItem) {
- return {
- display: 'none'
- };
- }
-
- return {
- display: 'block',
- height: (gridster.movingItem.sizeY * gridster.curRowHeight - gridster.margins[0]) + 'px',
- width: (gridster.movingItem.sizeX * gridster.curColWidth - gridster.margins[1]) + 'px',
- top: (gridster.movingItem.row * gridster.curRowHeight + (gridster.outerMargin ? gridster.margins[0] : 0)) + 'px',
- left: (gridster.movingItem.col * gridster.curColWidth + (gridster.outerMargin ? gridster.margins[1] : 0)) + 'px'
- };
- };
- }
- };
- })
-
- /**
- * The gridster directive
- *
- * @param {Function} $timeout
- * @param {Object} $window
- * @param {Object} $rootScope
- * @param {Function} gridsterDebounce
- */
- .directive('gridster', ['$timeout', '$window', '$rootScope', 'gridsterDebounce',
- function($timeout, $window, $rootScope, gridsterDebounce) {
- return {
- scope: true,
- restrict: 'EAC',
- controller: 'GridsterCtrl',
- controllerAs: 'gridster',
- compile: function($tplElem) {
-
- $tplElem.prepend('<div ng-if="gridster.movingItem" gridster-preview></div>');
-
- return function(scope, $elem, attrs, gridster) {
- gridster.loaded = false;
-
- gridster.$element = $elem;
-
- scope.gridster = gridster;
-
- $elem.addClass('gridster');
-
- var isVisible = function(ele) {
- return ele.style.visibility !== 'hidden' && ele.style.display !== 'none';
- };
-
- function refresh(config) {
- gridster.setOptions(config);
-
- if (!isVisible($elem[0])) {
- return;
- }
-
- // resolve "auto" & "match" values
- if (gridster.width === 'auto') {
- gridster.curWidth = $elem[0].offsetWidth || parseInt($elem.css('width'), 10);
- } else {
- gridster.curWidth = gridster.width;
- }
-
- if (gridster.colWidth === 'auto') {
- gridster.curColWidth = (gridster.curWidth + (gridster.outerMargin ? -gridster.margins[1] : gridster.margins[1])) / gridster.columns;
- } else {
- gridster.curColWidth = gridster.colWidth;
- }
-
- gridster.curRowHeight = gridster.rowHeight;
- if (typeof gridster.rowHeight === 'string') {
- if (gridster.rowHeight === 'match') {
- gridster.curRowHeight = Math.round(gridster.curColWidth);
- } else if (gridster.rowHeight.indexOf('*') !== -1) {
- gridster.curRowHeight = Math.round(gridster.curColWidth * gridster.rowHeight.replace('*', '').replace(' ', ''));
- } else if (gridster.rowHeight.indexOf('/') !== -1) {
- gridster.curRowHeight = Math.round(gridster.curColWidth / gridster.rowHeight.replace('/', '').replace(' ', ''));
- }
- }
-
- gridster.isMobile = gridster.mobileModeEnabled && gridster.curWidth <= gridster.mobileBreakPoint;
-
- // loop through all items and reset their CSS
- for (var rowIndex = 0, l = gridster.grid.length; rowIndex < l; ++rowIndex) {
- var columns = gridster.grid[rowIndex];
- if (!columns) {
- continue;
- }
-
- for (var colIndex = 0, len = columns.length; colIndex < len; ++colIndex) {
- if (columns[colIndex]) {
- var item = columns[colIndex];
- item.setElementPosition();
- item.setElementSizeY();
- item.setElementSizeX();
- }
- }
- }
-
- updateHeight();
- }
-
- var optionsKey = attrs.gridster;
- if (optionsKey) {
- scope.$parent.$watch(optionsKey, function(newConfig) {
- refresh(newConfig);
- }, true);
- } else {
- refresh({});
- }
-
- scope.$watch(function() {
- return gridster.loaded;
- }, function() {
- if (gridster.loaded) {
- $elem.addClass('gridster-loaded');
- } else {
- $elem.removeClass('gridster-loaded');
- }
- });
-
- scope.$watch(function() {
- return gridster.isMobile;
- }, function() {
- if (gridster.isMobile) {
- $elem.addClass('gridster-mobile').removeClass('gridster-desktop');
- } else {
- $elem.removeClass('gridster-mobile').addClass('gridster-desktop');
- }
- $rootScope.$broadcast('gridster-mobile-changed', gridster);
- });
-
- scope.$watch(function() {
- return gridster.draggable;
- }, function() {
- $rootScope.$broadcast('gridster-draggable-changed', gridster);
- }, true);
-
- scope.$watch(function() {
- return gridster.resizable;
- }, function() {
- $rootScope.$broadcast('gridster-resizable-changed', gridster);
- }, true);
-
- function updateHeight() {
- if(gridster.gridHeight){ //need to put this check, otherwise fail in IE8
- $elem.css('height', (gridster.gridHeight * gridster.curRowHeight) + (gridster.outerMargin ? gridster.margins[0] : -gridster.margins[0]) + 'px');
- }
- }
-
- scope.$watch(function() {
- return gridster.gridHeight;
- }, updateHeight);
-
- scope.$watch(function() {
- return gridster.movingItem;
- }, function() {
- gridster.updateHeight(gridster.movingItem ? gridster.movingItem.sizeY : 0);
- });
-
- var prevWidth = $elem[0].offsetWidth || parseInt($elem.css('width'), 10);
-
- var resize = function() {
- var width = $elem[0].offsetWidth || parseInt($elem.css('width'), 10);
-
- if (!width || width === prevWidth || gridster.movingItem) {
- return;
- }
- prevWidth = width;
-
- if (gridster.loaded) {
- $elem.removeClass('gridster-loaded');
- }
-
- refresh();
-
- if (gridster.loaded) {
- $elem.addClass('gridster-loaded');
- }
-
- $rootScope.$broadcast('gridster-resized', [width, $elem[0].offsetHeight], gridster);
- };
-
- // track element width changes any way we can
- var onResize = gridsterDebounce(function onResize() {
- resize();
- $timeout(function() {
- scope.$apply();
- });
- }, 100);
-
- scope.$watch(function() {
- return isVisible($elem[0]);
- }, onResize);
-
- // see https://github.com/sdecima/javascript-detect-element-resize
- if (typeof window.addResizeListener === 'function') {
- window.addResizeListener($elem[0], onResize);
- } else {
- scope.$watch(function() {
- return $elem[0].offsetWidth || parseInt($elem.css('width'), 10);
- }, resize);
- }
- var $win = angular.element($window);
- $win.on('resize', onResize);
-
- // be sure to cleanup
- scope.$on('$destroy', function() {
- gridster.destroy();
- $win.off('resize', onResize);
- if (typeof window.removeResizeListener === 'function') {
- window.removeResizeListener($elem[0], onResize);
- }
- });
-
- // allow a little time to place items before floating up
- $timeout(function() {
- scope.$watch('gridster.floating', function() {
- gridster.floatItemsUp();
- });
- gridster.loaded = true;
- }, 100);
- };
- }
- };
- }
- ])
-
- .controller('GridsterItemCtrl', function() {
- this.$element = null;
- this.gridster = null;
- this.row = null;
- this.col = null;
- this.sizeX = null;
- this.sizeY = null;
- this.minSizeX = 0;
- this.minSizeY = 0;
- this.maxSizeX = null;
- this.maxSizeY = null;
-
- this.init = function($element, gridster) {
- this.$element = $element;
- this.gridster = gridster;
- this.sizeX = gridster.defaultSizeX;
- this.sizeY = gridster.defaultSizeY;
- };
-
- this.destroy = function() {
- // set these to null to avoid the possibility of circular references
- this.gridster = null;
- this.$element = null;
- };
-
- /**
- * Returns the items most important attributes
- */
- this.toJSON = function() {
- return {
- row: this.row,
- col: this.col,
- sizeY: this.sizeY,
- sizeX: this.sizeX
- };
- };
-
- this.isMoving = function() {
- return this.gridster.movingItem === this;
- };
-
- /**
- * Set the items position
- *
- * @param {Number} row
- * @param {Number} column
- */
- this.setPosition = function(row, column) {
- this.gridster.putItem(this, row, column);
-
- if (!this.isMoving()) {
- this.setElementPosition();
- }
- };
-
- /**
- * Sets a specified size property
- *
- * @param {String} key Can be either "x" or "y"
- * @param {Number} value The size amount
- * @param {Boolean} preventMove
- */
- this.setSize = function(key, value, preventMove) {
- key = key.toUpperCase();
- var camelCase = 'size' + key,
- titleCase = 'Size' + key;
- if (value === '') {
- return;
- }
- value = parseInt(value, 10);
- if (isNaN(value) || value === 0) {
- value = this.gridster['default' + titleCase];
- }
- var max = key === 'X' ? this.gridster.columns : this.gridster.maxRows;
- if (this['max' + titleCase]) {
- max = Math.min(this['max' + titleCase], max);
- }
- if (this.gridster['max' + titleCase]) {
- max = Math.min(this.gridster['max' + titleCase], max);
- }
- if (key === 'X' && this.cols) {
- max -= this.cols;
- } else if (key === 'Y' && this.rows) {
- max -= this.rows;
- }
-
- var min = 0;
- if (this['min' + titleCase]) {
- min = Math.max(this['min' + titleCase], min);
- }
- if (this.gridster['min' + titleCase]) {
- min = Math.max(this.gridster['min' + titleCase], min);
- }
-
- value = Math.max(Math.min(value, max), min);
-
- var changed = (this[camelCase] !== value || (this['old' + titleCase] && this['old' + titleCase] !== value));
- this['old' + titleCase] = this[camelCase] = value;
-
- if (!this.isMoving()) {
- this['setElement' + titleCase]();
- }
- if (!preventMove && changed) {
- this.gridster.moveOverlappingItems(this);
- this.gridster.layoutChanged();
- }
-
- return changed;
- };
-
- /**
- * Sets the items sizeY property
- *
- * @param {Number} rows
- * @param {Boolean} preventMove
- */
- this.setSizeY = function(rows, preventMove) {
- return this.setSize('Y', rows, preventMove);
- };
-
- /**
- * Sets the items sizeX property
- *
- * @param {Number} columns
- * @param {Boolean} preventMove
- */
- this.setSizeX = function(columns, preventMove) {
- return this.setSize('X', columns, preventMove);
- };
-
- /**
- * Sets an elements position on the page
- */
- this.setElementPosition = function() {
- if (this.gridster.isMobile) {
- this.$element.css({
- marginLeft: this.gridster.margins[0] + 'px',
- marginRight: this.gridster.margins[0] + 'px',
- marginTop: this.gridster.margins[1] + 'px',
- marginBottom: this.gridster.margins[1] + 'px',
- top: '',
- left: ''
- });
- } else {
- this.$element.css({
- margin: 0,
- top: (this.row * this.gridster.curRowHeight + (this.gridster.outerMargin ? this.gridster.margins[0] : 0)) + 'px',
- left: (this.col * this.gridster.curColWidth + (this.gridster.outerMargin ? this.gridster.margins[1] : 0)) + 'px'
- });
- }
- };
-
- /**
- * Sets an elements height
- */
- this.setElementSizeY = function() {
- if (this.gridster.isMobile && !this.gridster.saveGridItemCalculatedHeightInMobile) {
- this.$element.css('height', '');
- } else {
- var computedHeight = (this.sizeY * this.gridster.curRowHeight - this.gridster.margins[0]) + 'px';
- //this.$element.css('height', computedHeight);
- this.$element.attr('style', this.$element.attr('style') + '; ' + 'height: '+computedHeight+' !important;');
- }
- };
-
- /**
- * Sets an elements width
- */
- this.setElementSizeX = function() {
- if (this.gridster.isMobile) {
- this.$element.css('width', '');
- } else {
- this.$element.css('width', (this.sizeX * this.gridster.curColWidth - this.gridster.margins[1]) + 'px');
- }
- };
-
- /**
- * Gets an element's width
- */
- this.getElementSizeX = function() {
- return (this.sizeX * this.gridster.curColWidth - this.gridster.margins[1]);
- };
-
- /**
- * Gets an element's height
- */
- this.getElementSizeY = function() {
- return (this.sizeY * this.gridster.curRowHeight - this.gridster.margins[0]);
- };
-
- })
-
- .factory('GridsterTouch', [function() {
- return function GridsterTouch(target, startEvent, moveEvent, endEvent) {
- var lastXYById = {};
-
- // Opera doesn't have Object.keys so we use this wrapper
- var numberOfKeys = function(theObject) {
- if (Object.keys) {
- return Object.keys(theObject).length;
- }
-
- var n = 0,
- key;
- for (key in theObject) {
- ++n;
- }
-
- return n;
- };
-
- // this calculates the delta needed to convert pageX/Y to offsetX/Y because offsetX/Y don't exist in the TouchEvent object or in Firefox's MouseEvent object
- var computeDocumentToElementDelta = function(theElement) {
- var elementLeft = 0;
- var elementTop = 0;
- var oldIEUserAgent = navigator.userAgent.match(/\bMSIE\b/);
-
- for (var offsetElement = theElement; offsetElement != null; offsetElement = offsetElement.offsetParent) {
- // the following is a major hack for versions of IE less than 8 to avoid an apparent problem on the IEBlog with double-counting the offsets
- // this may not be a general solution to IE7's problem with offsetLeft/offsetParent
- if (oldIEUserAgent &&
- (!document.documentMode || document.documentMode < 8) &&
- offsetElement.currentStyle.position === 'relative' && offsetElement.offsetParent && offsetElement.offsetParent.currentStyle.position === 'relative' && offsetElement.offsetLeft === offsetElement.offsetParent.offsetLeft) {
- // add only the top
- elementTop += offsetElement.offsetTop;
- } else {
- elementLeft += offsetElement.offsetLeft;
- elementTop += offsetElement.offsetTop;
- }
- }
-
- return {
- x: elementLeft,
- y: elementTop
- };
- };
-
- // cache the delta from the document to our event target (reinitialized each mousedown/MSPointerDown/touchstart)
- var documentToTargetDelta = computeDocumentToElementDelta(target);
-
- // common event handler for the mouse/pointer/touch models and their down/start, move, up/end, and cancel events
- var doEvent = function(theEvtObj) {
-
- if (theEvtObj.type === 'mousemove' && numberOfKeys(lastXYById) === 0) {
- return;
- }
-
- var prevent = true;
-
- var pointerList = theEvtObj.changedTouches ? theEvtObj.changedTouches : [theEvtObj];
-
- for (var i = 0; i < pointerList.length; ++i) {
- var pointerObj = pointerList[i];
- var pointerId = (typeof pointerObj.identifier !== 'undefined') ? pointerObj.identifier : (typeof pointerObj.pointerId !== 'undefined') ? pointerObj.pointerId : 1;
-
- // use the pageX/Y coordinates to compute target-relative coordinates when we have them (in ie < 9, we need to do a little work to put them there)
- if (typeof pointerObj.pageX === 'undefined') {
-
- // initialize assuming our source element is our target
- if(!ie8){
- pointerObj.pageX = pointerObj.offsetX + documentToTargetDelta.x;
- pointerObj.pageY = pointerObj.offsetY + documentToTargetDelta.y;
- }
- else{
- pointerObj.pageX = pointerObj.clientX;
- pointerObj.pageY = pointerObj.clientY;
- }
-
- if (pointerObj.srcElement.offsetParent === target && document.documentMode && document.documentMode === 8 && pointerObj.type === 'mousedown') {
- // source element is a child piece of VML, we're in IE8, and we've not called setCapture yet - add the origin of the source element
- pointerObj.pageX += pointerObj.srcElement.offsetLeft;
- pointerObj.pageY += pointerObj.srcElement.offsetTop;
- } else if (pointerObj.srcElement !== target && !document.documentMode || document.documentMode < 8) {
- // source element isn't the target (most likely it's a child piece of VML) and we're in a version of IE before IE8 -
- // the offsetX/Y values are unpredictable so use the clientX/Y values and adjust by the scroll offsets of its parents
- // to get the document-relative coordinates (the same as pageX/Y)
- var sx = -2,
- sy = -2; // adjust for old IE's 2-pixel border
- for (var scrollElement = pointerObj.srcElement; scrollElement !== null; scrollElement = scrollElement.parentNode) {
- sx += scrollElement.scrollLeft ? scrollElement.scrollLeft : 0;
- sy += scrollElement.scrollTop ? scrollElement.scrollTop : 0;
- }
-
- pointerObj.pageX = pointerObj.clientX + sx;
- pointerObj.pageY = pointerObj.clientY + sy;
- }
- }
-
-
- var pageX = pointerObj.pageX;
- var pageY = pointerObj.pageY;
-
- if (theEvtObj.type.match(/(start|down)$/i)) {
- // clause for processing MSPointerDown, touchstart, and mousedown
-
- // refresh the document-to-target delta on start in case the target has moved relative to document
- documentToTargetDelta = computeDocumentToElementDelta(target);
-
- // protect against failing to get an up or end on this pointerId
- if (lastXYById[pointerId]) {
- if (endEvent) {
- endEvent({
- target: theEvtObj.target,
- which: theEvtObj.which,
- pointerId: pointerId,
- pageX: pageX,
- pageY: pageY
- });
- }
-
- delete lastXYById[pointerId];
- }
-
- if (startEvent) {
- if (prevent) {
- prevent = startEvent({
- target: theEvtObj.target,
- which: theEvtObj.which,
- pointerId: pointerId,
- pageX: pageX,
- pageY: pageY
- });
- }
- }
-
- // init last page positions for this pointer
- lastXYById[pointerId] = {
- x: pageX,
- y: pageY
- };
-
- // IE pointer model
- if (target.msSetPointerCapture) {
- target.msSetPointerCapture(pointerId);
- } else if (theEvtObj.type === 'mousedown' && numberOfKeys(lastXYById) === 1) {
- if (useSetReleaseCapture) {
- target.setCapture(true);
- } else {
- document.addEventListener('mousemove', doEvent, false);
- document.addEventListener('mouseup', doEvent, false);
- }
- }
- } else if (theEvtObj.type.match(/move$/i)) {
- // clause handles mousemove, MSPointerMove, and touchmove
-
- if (lastXYById[pointerId] && !(lastXYById[pointerId].x === pageX && lastXYById[pointerId].y === pageY)) {
- // only extend if the pointer is down and it's not the same as the last point
-
- if (moveEvent && prevent) {
- prevent = moveEvent({
- target: theEvtObj.target,
- which: theEvtObj.which,
- pointerId: pointerId,
- pageX: pageX,
- pageY: pageY
- });
- }
-
- // update last page positions for this pointer
- lastXYById[pointerId].x = pageX;
- lastXYById[pointerId].y = pageY;
- }
- } else if (lastXYById[pointerId] && theEvtObj.type.match(/(up|end|cancel)$/i)) {
- // clause handles up/end/cancel
-
- if (endEvent && prevent) {
- prevent = endEvent({
- target: theEvtObj.target,
- which: theEvtObj.which,
- pointerId: pointerId,
- pageX: pageX,
- pageY: pageY
- });
- }
-
- // delete last page positions for this pointer
- delete lastXYById[pointerId];
-
- // in the Microsoft pointer model, release the capture for this pointer
- // in the mouse model, release the capture or remove document-level event handlers if there are no down points
- // nothing is required for the iOS touch model because capture is implied on touchstart
- if (target.msReleasePointerCapture) {
- target.msReleasePointerCapture(pointerId);
- } else if (theEvtObj.type === 'mouseup' && numberOfKeys(lastXYById) === 0) {
- if (useSetReleaseCapture) {
- target.releaseCapture();
- } else {
- document.removeEventListener('mousemove', doEvent, false);
- document.removeEventListener('mouseup', doEvent, false);
- }
- }
- }
- }
-
- if (prevent) {
- if (theEvtObj.preventDefault) {
- theEvtObj.preventDefault();
- }
-
- if (theEvtObj.preventManipulation) {
- theEvtObj.preventManipulation();
- }
-
- if (theEvtObj.preventMouseEvent) {
- theEvtObj.preventMouseEvent();
- }
- }
- };
-
- var useSetReleaseCapture = false;
- // saving the settings for contentZooming and touchaction before activation
- var contentZooming, msTouchAction;
-
- this.enable = function() {
-
- if (window.navigator.msPointerEnabled) {
- // Microsoft pointer model
- target.addEventListener('MSPointerDown', doEvent, false);
- target.addEventListener('MSPointerMove', doEvent, false);
- target.addEventListener('MSPointerUp', doEvent, false);
- target.addEventListener('MSPointerCancel', doEvent, false);
-
- // css way to prevent panning in our target area
- if (typeof target.style.msContentZooming !== 'undefined') {
- contentZooming = target.style.msContentZooming;
- target.style.msContentZooming = 'none';
- }
-
- // new in Windows Consumer Preview: css way to prevent all built-in touch actions on our target
- // without this, you cannot touch draw on the element because IE will intercept the touch events
- if (typeof target.style.msTouchAction !== 'undefined') {
- msTouchAction = target.style.msTouchAction;
- target.style.msTouchAction = 'none';
- }
- } else if (target.addEventListener) {
- // iOS touch model
- target.addEventListener('touchstart', doEvent, false);
- target.addEventListener('touchmove', doEvent, false);
- target.addEventListener('touchend', doEvent, false);
- target.addEventListener('touchcancel', doEvent, false);
-
- // mouse model
- target.addEventListener('mousedown', doEvent, false);
-
- // mouse model with capture
- // rejecting gecko because, unlike ie, firefox does not send events to target when the mouse is outside target
- if (target.setCapture && !window.navigator.userAgent.match(/\bGecko\b/)) {
- useSetReleaseCapture = true;
-
- target.addEventListener('mousemove', doEvent, false);
- target.addEventListener('mouseup', doEvent, false);
- }
- } else if (target.attachEvent && target.setCapture) {
- // legacy IE mode - mouse with capture
- useSetReleaseCapture = true;
- target.attachEvent('onmousedown', function() {
- doEvent(window.event);
- window.event.returnValue = false;
- return false;
- });
- target.attachEvent('onmousemove', function() {
- doEvent(window.event);
- window.event.returnValue = false;
- return false;
- });
- target.attachEvent('onmouseup', function() {
- doEvent(window.event);
- window.event.returnValue = false;
- return false;
- });
- }
- };
-
- this.disable = function() {
- if (window.navigator.msPointerEnabled) {
- // Microsoft pointer model
- target.removeEventListener('MSPointerDown', doEvent, false);
- target.removeEventListener('MSPointerMove', doEvent, false);
- target.removeEventListener('MSPointerUp', doEvent, false);
- target.removeEventListener('MSPointerCancel', doEvent, false);
-
- // reset zooming to saved value
- if (contentZooming) {
- target.style.msContentZooming = contentZooming;
- }
-
- // reset touch action setting
- if (msTouchAction) {
- target.style.msTouchAction = msTouchAction;
- }
- } else if (target.removeEventListener) {
- // iOS touch model
- target.removeEventListener('touchstart', doEvent, false);
- target.removeEventListener('touchmove', doEvent, false);
- target.removeEventListener('touchend', doEvent, false);
- target.removeEventListener('touchcancel', doEvent, false);
-
- // mouse model
- target.removeEventListener('mousedown', doEvent, false);
-
- // mouse model with capture
- // rejecting gecko because, unlike ie, firefox does not send events to target when the mouse is outside target
- if (target.setCapture && !window.navigator.userAgent.match(/\bGecko\b/)) {
- useSetReleaseCapture = true;
-
- target.removeEventListener('mousemove', doEvent, false);
- target.removeEventListener('mouseup', doEvent, false);
- }
- } else if (target.detachEvent && target.setCapture) {
- // legacy IE mode - mouse with capture
- useSetReleaseCapture = true;
- target.detachEvent('onmousedown');
- target.detachEvent('onmousemove');
- target.detachEvent('onmouseup');
- }
- };
-
- return this;
- };
- }])
-
- .factory('GridsterDraggable', ['$document', '$timeout', '$window', 'GridsterTouch',
- function($document, $timeout, $window, GridsterTouch) {
- function GridsterDraggable($el, scope, gridster, item, itemOptions) {
-
- var elmX, elmY, elmW, elmH,
-
- mouseX = 0,
- mouseY = 0,
- lastMouseX = 0,
- lastMouseY = 0,
- mOffX = 0,
- mOffY = 0,
-
- minTop = 0,
- maxTop = 9999,
- minLeft = 0,
- realdocument = $document[0];
-
- var originalCol, originalRow;
- var inputTags = ['select', 'input', 'textarea', 'button'];
-
- var gridsterItemDragElement = $el[0].querySelector('[gridster-item-drag]');
- //console.log(gridsterItemDragElement);
- var isDraggableAreaDefined = gridsterItemDragElement?true:false;
- //console.log(isDraggableAreaDefined);
-
- function mouseDown(e) {
-
- if(ie8){
- e.target = window.event.srcElement;
- e.which = window.event.button;
- }
-
- if(isDraggableAreaDefined && (!gridsterItemDragElement.contains(e.target))){
- return false;
- }
-
- if (inputTags.indexOf(e.target.nodeName.toLowerCase()) !== -1) {
- return false;
- }
-
- var $target = angular.element(e.target);
-
- // exit, if a resize handle was hit
- if ($target.hasClass('gridster-item-resizable-handler')) {
- return false;
- }
-
- // exit, if the target has it's own click event
- if ($target.attr('onclick') || $target.attr('ng-click')) {
- return false;
- }
-
- // only works if you have jQuery
- if ($target.closest && $target.closest('.gridster-no-drag').length) {
- return false;
- }
-
- switch (e.which) {
- case 1:
- // left mouse button
- break;
- case 2:
- case 3:
- // right or middle mouse button
- return;
- }
-
- lastMouseX = e.pageX;
- lastMouseY = e.pageY;
-
- elmX = parseInt($el.css('left'), 10);
- elmY = parseInt($el.css('top'), 10);
- elmW = $el[0].offsetWidth;
- elmH = $el[0].offsetHeight;
-
- originalCol = item.col;
- originalRow = item.row;
-
- dragStart(e);
-
- return true;
- }
-
- function mouseMove(e) {
- if (!$el.hasClass('gridster-item-moving') || $el.hasClass('gridster-item-resizing')) {
- return false;
- }
-
- var maxLeft = gridster.curWidth - 1;
-
- // Get the current mouse position.
- mouseX = e.pageX;
- mouseY = e.pageY;
-
- // Get the deltas
- var diffX = mouseX - lastMouseX + mOffX;
- var diffY = mouseY - lastMouseY + mOffY;
- mOffX = mOffY = 0;
-
- // Update last processed mouse positions.
- lastMouseX = mouseX;
- lastMouseY = mouseY;
-
- var dX = diffX,
- dY = diffY;
- if (elmX + dX < minLeft) {
- diffX = minLeft - elmX;
- mOffX = dX - diffX;
- } else if (elmX + elmW + dX > maxLeft) {
- diffX = maxLeft - elmX - elmW;
- mOffX = dX - diffX;
- }
-
- if (elmY + dY < minTop) {
- diffY = minTop - elmY;
- mOffY = dY - diffY;
- } else if (elmY + elmH + dY > maxTop) {
- diffY = maxTop - elmY - elmH;
- mOffY = dY - diffY;
- }
- elmX += diffX;
- elmY += diffY;
-
- // set new position
- $el.css({
- 'top': elmY + 'px',
- 'left': elmX + 'px'
- });
-
- drag(e);
-
- return true;
- }
-
- function mouseUp(e) {
- if (!$el.hasClass('gridster-item-moving') || $el.hasClass('gridster-item-resizing')) {
- return false;
- }
-
- mOffX = mOffY = 0;
-
- dragStop(e);
-
- return true;
- }
-
- function dragStart(event) {
- $el.addClass('gridster-item-moving');
- gridster.movingItem = item;
-
- gridster.updateHeight(item.sizeY);
- scope.$apply(function() {
- if (gridster.draggable && gridster.draggable.start) {
- gridster.draggable.start(event, $el, itemOptions);
- }
- });
- }
-
- function drag(event) {
- var oldRow = item.row,
- oldCol = item.col,
- hasCallback = gridster.draggable && gridster.draggable.drag,
- scrollSensitivity = gridster.draggable.scrollSensitivity,
- scrollSpeed = gridster.draggable.scrollSpeed;
-
- var row = gridster.pixelsToRows(elmY);
- var col = gridster.pixelsToColumns(elmX);
-
- var itemsInTheWay = gridster.getItems(row, col, item.sizeX, item.sizeY, item);
- var hasItemsInTheWay = itemsInTheWay.length !== 0;
-
- if (gridster.swapping === true && hasItemsInTheWay) {
- var boundingBoxItem = gridster.getBoundingBox(itemsInTheWay),
- sameSize = boundingBoxItem.sizeX === item.sizeX && boundingBoxItem.sizeY === item.sizeY,
- sameRow = boundingBoxItem.row === oldRow,
- sameCol = boundingBoxItem.col === oldCol,
- samePosition = boundingBoxItem.row === row && boundingBoxItem.col === col,
- inline = sameRow || sameCol;
-
- if (sameSize && itemsInTheWay.length === 1) {
- if (samePosition) {
- gridster.swapItems(item, itemsInTheWay[0]);
- } else if (inline) {
- return;
- }
- } else if (boundingBoxItem.sizeX <= item.sizeX && boundingBoxItem.sizeY <= item.sizeY && inline) {
- var emptyRow = item.row <= row ? item.row : row + item.sizeY,
- emptyCol = item.col <= col ? item.col : col + item.sizeX,
- rowOffset = emptyRow - boundingBoxItem.row,
- colOffset = emptyCol - boundingBoxItem.col;
-
- for (var i = 0, l = itemsInTheWay.length; i < l; ++i) {
- var itemInTheWay = itemsInTheWay[i];
-
- var itemsInFreeSpace = gridster.getItems(
- itemInTheWay.row + rowOffset,
- itemInTheWay.col + colOffset,
- itemInTheWay.sizeX,
- itemInTheWay.sizeY,
- item
- );
-
- if (itemsInFreeSpace.length === 0) {
- gridster.putItem(itemInTheWay, itemInTheWay.row + rowOffset, itemInTheWay.col + colOffset);
- }
- }
- }
- }
-
- if (gridster.pushing !== false || !hasItemsInTheWay) {
- item.row = row;
- item.col = col;
- }
-
- if(($window.navigator.appName === 'Microsoft Internet Explorer' && !ie8) || $window.navigator.userAgent.indexOf("Firefox")!==-1){
- if (event.pageY - realdocument.documentElement.scrollTop < scrollSensitivity) {
- realdocument.documentElement.scrollTop = realdocument.documentElement.scrollTop - scrollSpeed;
- } else if ($window.innerHeight - (event.pageY - realdocument.documentElement.scrollTop) < scrollSensitivity) {
- realdocument.documentElement.scrollTop = realdocument.documentElement.scrollTop + scrollSpeed;
- }
- }
- else{
- if (event.pageY - realdocument.body.scrollTop < scrollSensitivity) {
- realdocument.body.scrollTop = realdocument.body.scrollTop - scrollSpeed;
- } else if ($window.innerHeight - (event.pageY - realdocument.body.scrollTop) < scrollSensitivity) {
- realdocument.body.scrollTop = realdocument.body.scrollTop + scrollSpeed;
- }
- }
-
-
-
- if (event.pageX - realdocument.body.scrollLeft < scrollSensitivity) {
- realdocument.body.scrollLeft = realdocument.body.scrollLeft - scrollSpeed;
- } else if ($window.innerWidth - (event.pageX - realdocument.body.scrollLeft) < scrollSensitivity) {
- realdocument.body.scrollLeft = realdocument.body.scrollLeft + scrollSpeed;
- }
-
- if (hasCallback || oldRow !== item.row || oldCol !== item.col) {
- scope.$apply(function() {
- if (hasCallback) {
- gridster.draggable.drag(event, $el, itemOptions);
- }
- });
- }
- }
-
- function dragStop(event) {
- $el.removeClass('gridster-item-moving');
- var row = gridster.pixelsToRows(elmY);
- var col = gridster.pixelsToColumns(elmX);
- if (gridster.pushing !== false || gridster.getItems(row, col, item.sizeX, item.sizeY, item).length === 0) {
- item.row = row;
- item.col = col;
- }
- gridster.movingItem = null;
- item.setPosition(item.row, item.col);
-
- scope.$apply(function() {
- if (gridster.draggable && gridster.draggable.stop) {
- gridster.draggable.stop(event, $el, itemOptions);
- }
- });
- }
-
- var enabled = null;
- var $dragHandles = null;
- var unifiedInputs = [];
-
- this.enable = function() {
- if (enabled === true) {
- return;
- }
-
- // disable and timeout required for some template rendering
- $timeout(function() {
- // disable any existing draghandles
- for (var u = 0, ul = unifiedInputs.length; u < ul; ++u) {
- unifiedInputs[u].disable();
- }
- unifiedInputs = [];
-
- if (gridster.draggable && gridster.draggable.handle) {
- $dragHandles = angular.element($el[0].querySelectorAll(gridster.draggable.handle));
- if ($dragHandles.length === 0) {
- // fall back to element if handle not found...
- $dragHandles = $el;
- }
- } else {
- $dragHandles = $el;
- }
-
- for (var h = 0, hl = $dragHandles.length; h < hl; ++h) {
- unifiedInputs[h] = new GridsterTouch($dragHandles[h], mouseDown, mouseMove, mouseUp);
- unifiedInputs[h].enable();
- }
-
- enabled = true;
- });
- };
-
- this.disable = function() {
- if (enabled === false) {
- return;
- }
-
- // timeout to avoid race contition with the enable timeout
- $timeout(function() {
-
- for (var u = 0, ul = unifiedInputs.length; u < ul; ++u) {
- unifiedInputs[u].disable();
- }
-
- unifiedInputs = [];
- enabled = false;
- });
- };
-
- this.toggle = function(enabled) {
- if (enabled) {
- this.enable();
- } else {
- this.disable();
- }
- };
-
- this.destroy = function() {
- this.disable();
- };
- }
-
- return GridsterDraggable;
- }
- ])
-
- .factory('GridsterResizable', ['GridsterTouch', function(GridsterTouch) {
- function GridsterResizable($el, scope, gridster, item, itemOptions) {
-
- function ResizeHandle(handleClass) {
-
- var hClass = handleClass;
-
- var elmX, elmY, elmW, elmH,
-
- mouseX = 0,
- mouseY = 0,
- lastMouseX = 0,
- lastMouseY = 0,
- mOffX = 0,
- mOffY = 0,
-
- minTop = 0,
- maxTop = 9999,
- minLeft = 0;
-
- var getMinHeight = function() {
- return (item.minSizeY ? item.minSizeY : 1) * gridster.curRowHeight - gridster.margins[0];
- };
- var getMinWidth = function() {
- return (item.minSizeX ? item.minSizeX : 1) * gridster.curColWidth - gridster.margins[1];
- };
-
- var originalWidth, originalHeight;
- var savedDraggable;
-
- function mouseDown(e) {
- switch (e.which) {
- case 1:
- // left mouse button
- break;
- case 2:
- case 3:
- // right or middle mouse button
- return;
- }
-
- // save the draggable setting to restore after resize
- savedDraggable = gridster.draggable.enabled;
- if (savedDraggable) {
- gridster.draggable.enabled = false;
- scope.$broadcast('gridster-draggable-changed', gridster);
- }
-
- // Get the current mouse position.
- lastMouseX = e.pageX;
- lastMouseY = e.pageY;
-
- // Record current widget dimensions
- elmX = parseInt($el.css('left'), 10);
- elmY = parseInt($el.css('top'), 10);
- elmW = $el[0].offsetWidth;
- elmH = $el[0].offsetHeight;
-
- originalWidth = item.sizeX;
- originalHeight = item.sizeY;
-
- resizeStart(e);
-
- return true;
- }
-
- function resizeStart(e) {
- $el.addClass('gridster-item-moving');
- $el.addClass('gridster-item-resizing');
-
- gridster.movingItem = item;
-
- item.setElementSizeX();
- item.setElementSizeY();
- item.setElementPosition();
- gridster.updateHeight(1);
-
- scope.$apply(function() {
- // callback
- if (gridster.resizable && gridster.resizable.start) {
- gridster.resizable.start(e, $el, itemOptions); // options is the item model
- }
- });
- }
-
- function mouseMove(e) {
- var maxLeft = gridster.curWidth - 1;
-
- // Get the current mouse position.
- mouseX = e.pageX;
- mouseY = e.pageY;
-
- // Get the deltas
- var diffX = mouseX - lastMouseX + mOffX;
- var diffY = mouseY - lastMouseY + mOffY;
- mOffX = mOffY = 0;
-
- // Update last processed mouse positions.
- lastMouseX = mouseX;
- lastMouseY = mouseY;
-
- var dY = diffY,
- dX = diffX;
-
- if (hClass.indexOf('n') >= 0) {
- if (elmH - dY < getMinHeight()) {
- diffY = elmH - getMinHeight();
- mOffY = dY - diffY;
- } else if (elmY + dY < minTop) {
- diffY = minTop - elmY;
- mOffY = dY - diffY;
- }
- elmY += diffY;
- elmH -= diffY;
- }
- if (hClass.indexOf('s') >= 0) {
- if (elmH + dY < getMinHeight()) {
- diffY = getMinHeight() - elmH;
- mOffY = dY - diffY;
- } else if (elmY + elmH + dY > maxTop) {
- diffY = maxTop - elmY - elmH;
- mOffY = dY - diffY;
- }
- elmH += diffY;
- }
- if (hClass.indexOf('w') >= 0) {
- if (elmW - dX < getMinWidth()) {
- diffX = elmW - getMinWidth();
- mOffX = dX - diffX;
- } else if (elmX + dX < minLeft) {
- diffX = minLeft - elmX;
- mOffX = dX - diffX;
- }
- elmX += diffX;
- elmW -= diffX;
- }
- if (hClass.indexOf('e') >= 0) {
- if (elmW + dX < getMinWidth()) {
- diffX = getMinWidth() - elmW;
- mOffX = dX - diffX;
- } else if (elmX + elmW + dX > maxLeft) {
- diffX = maxLeft - elmX - elmW;
- mOffX = dX - diffX;
- }
- elmW += diffX;
- }
-
- // set new position
- $el.css({
- 'top': elmY + 'px',
- 'left': elmX + 'px',
- 'width': elmW + 'px',
- 'height': elmH + 'px'
- });
-
- resize(e);
-
- return true;
- }
-
- function mouseUp(e) {
- // restore draggable setting to its original state
- if (gridster.draggable.enabled !== savedDraggable) {
- gridster.draggable.enabled = savedDraggable;
- scope.$broadcast('gridster-draggable-changed', gridster);
- }
-
- mOffX = mOffY = 0;
-
- resizeStop(e);
-
- return true;
- }
-
- function resize(e) {
- var oldRow = item.row,
- oldCol = item.col,
- oldSizeX = item.sizeX,
- oldSizeY = item.sizeY,
- hasCallback = gridster.resizable && gridster.resizable.resize;
-
- var col = item.col;
- // only change column if grabbing left edge
- if (['w', 'nw', 'sw'].indexOf(handleClass) !== -1) {
- col = gridster.pixelsToColumns(elmX, false);
- }
-
- var row = item.row;
- // only change row if grabbing top edge
- if (['n', 'ne', 'nw'].indexOf(handleClass) !== -1) {
- row = gridster.pixelsToRows(elmY, false);
- }
-
- var sizeX = item.sizeX;
- // only change row if grabbing left or right edge
- if (['n', 's'].indexOf(handleClass) === -1) {
- sizeX = gridster.pixelsToColumns(elmW, true);
- }
-
- var sizeY = item.sizeY;
- // only change row if grabbing top or bottom edge
- if (['e', 'w'].indexOf(handleClass) === -1) {
- sizeY = gridster.pixelsToRows(elmH, true);
- }
-
- if (gridster.pushing !== false || gridster.getItems(row, col, sizeX, sizeY, item).length === 0) {
- item.row = row;
- item.col = col;
- item.sizeX = sizeX;
- item.sizeY = sizeY;
- }
- var isChanged = item.row !== oldRow || item.col !== oldCol || item.sizeX !== oldSizeX || item.sizeY !== oldSizeY;
-
- if (hasCallback || isChanged) {
- scope.$apply(function() {
- if (hasCallback) {
- gridster.resizable.resize(e, $el, itemOptions); // options is the item model
- }
- });
- }
- }
-
- function resizeStop(e) {
- $el.removeClass('gridster-item-moving');
- $el.removeClass('gridster-item-resizing');
-
- gridster.movingItem = null;
-
- item.setPosition(item.row, item.col);
- item.setSizeY(item.sizeY);
- item.setSizeX(item.sizeX);
-
- scope.$apply(function() {
- if (gridster.resizable && gridster.resizable.stop) {
- gridster.resizable.stop(e, $el, itemOptions); // options is the item model
- }
- });
- }
-
- var $dragHandle = null;
- var unifiedInput;
-
- this.enable = function() {
- if (!$dragHandle) {
- $dragHandle = angular.element('<div class="gridster-item-resizable-handler handle-' + hClass + '"></div>');
- $el.append($dragHandle);
- }
-
- unifiedInput = new GridsterTouch($dragHandle[0], mouseDown, mouseMove, mouseUp);
- unifiedInput.enable();
- };
-
- this.disable = function() {
- if ($dragHandle) {
- $dragHandle.remove();
- $dragHandle = null;
- }
-
- unifiedInput.disable();
- unifiedInput = undefined;
- };
-
- this.destroy = function() {
- this.disable();
- };
- }
-
- var handles = [];
- var handlesOpts = gridster.resizable.handles;
- if (typeof handlesOpts === 'string') {
- handlesOpts = gridster.resizable.handles.split(',');
- }
- var enabled = false;
-
- for (var c = 0, l = handlesOpts.length; c < l; c++) {
- handles.push(new ResizeHandle(handlesOpts[c]));
- }
-
- this.enable = function() {
- if (enabled) {
- return;
- }
- for (var c = 0, l = handles.length; c < l; c++) {
- handles[c].enable();
- }
- enabled = true;
- };
-
- this.disable = function() {
- if (!enabled) {
- return;
- }
- for (var c = 0, l = handles.length; c < l; c++) {
- handles[c].disable();
- }
- enabled = false;
- };
-
- this.toggle = function(enabled) {
- if (enabled) {
- this.enable();
- } else {
- this.disable();
- }
- };
-
- this.destroy = function() {
- for (var c = 0, l = handles.length; c < l; c++) {
- handles[c].destroy();
- }
- };
- }
- return GridsterResizable;
- }])
-
- .factory('gridsterDebounce', function() {
- return function gridsterDebounce(func, wait, immediate) {
- var timeout;
- return function() {
- var context = this,
- args = arguments;
- var later = function() {
- timeout = null;
- if (!immediate) {
- func.apply(context, args);
- }
- };
- var callNow = immediate && !timeout;
- clearTimeout(timeout);
- timeout = setTimeout(later, wait);
- if (callNow) {
- func.apply(context, args);
- }
- };
- };
- })
-
- /**
- * GridsterItem directive
- * @param $parse
- * @param GridsterDraggable
- * @param GridsterResizable
- * @param gridsterDebounce
- */
- .directive('gridsterItem', ['$parse', 'GridsterDraggable', 'GridsterResizable', 'gridsterDebounce',
- function($parse, GridsterDraggable, GridsterResizable, gridsterDebounce) {
- return {
- scope: true,
- restrict: 'EA',
- controller: 'GridsterItemCtrl',
- controllerAs: 'gridsterItem',
- require: ['^gridster', 'gridsterItem'],
- link: function(scope, $el, attrs, controllers) {
- var optionsKey = attrs.gridsterItem,
- options;
-
- var gridster = controllers[0],
- item = controllers[1];
-
- scope.gridster = gridster;
-
-
- // bind the item's position properties
- // options can be an object specified by gridster-item="object"
- // or the options can be the element html attributes object
- if (optionsKey) {
- var $optionsGetter = $parse(optionsKey);
- options = $optionsGetter(scope) || {};
- if (!options && $optionsGetter.assign) {
- options = {
- row: item.row,
- col: item.col,
- sizeX: item.sizeX,
- sizeY: item.sizeY,
- minSizeX: 0,
- minSizeY: 0,
- maxSizeX: null,
- maxSizeY: null
- };
- $optionsGetter.assign(scope, options);
- }
- } else {
- options = attrs;
- }
-
- item.init($el, gridster);
-
- $el.addClass('gridster-item');
-
- var aspects = ['minSizeX', 'maxSizeX', 'minSizeY', 'maxSizeY', 'sizeX', 'sizeY', 'row', 'col'],
- $getters = {};
-
- var expressions = [];
- var aspectFn = function(aspect) {
- var expression;
- if (typeof options[aspect] === 'string') {
- // watch the expression in the scope
- expression = options[aspect];
- } else if (typeof options[aspect.toLowerCase()] === 'string') {
- // watch the expression in the scope
- expression = options[aspect.toLowerCase()];
- } else if (optionsKey) {
- // watch the expression on the options object in the scope
- expression = optionsKey + '.' + aspect;
- } else {
- return;
- }
- expressions.push('"' + aspect + '":' + expression);
- $getters[aspect] = $parse(expression);
-
- // initial set
- var val = $getters[aspect](scope);
- if (typeof val === 'number') {
- item[aspect] = val;
- }
- };
-
- for (var i = 0, l = aspects.length; i < l; ++i) {
- aspectFn(aspects[i]);
- }
-
- var watchExpressions = '{' + expressions.join(',') + '}';
-
- // when the value changes externally, update the internal item object
- scope.$watchCollection(watchExpressions, function(newVals, oldVals) {
- for (var aspect in newVals) {
- var newVal = newVals[aspect];
- var oldVal = oldVals[aspect];
- if (oldVal === newVal) {
- continue;
- }
- newVal = parseInt(newVal, 10);
- if (!isNaN(newVal)) {
- item[aspect] = newVal;
- }
- }
- });
-
- function positionChanged() {
- // call setPosition so the element and gridster controller are updated
- item.setPosition(item.row, item.col);
-
- // when internal item position changes, update externally bound values
- if ($getters.row && $getters.row.assign) {
- $getters.row.assign(scope, item.row);
- }
- if ($getters.col && $getters.col.assign) {
- $getters.col.assign(scope, item.col);
- }
- }
- scope.$watch(function() {
- return item.row + ',' + item.col;
- }, positionChanged);
-
- function sizeChanged() {
- var changedX = item.setSizeX(item.sizeX, true);
- if (changedX && $getters.sizeX && $getters.sizeX.assign) {
- $getters.sizeX.assign(scope, item.sizeX);
- }
- var changedY = item.setSizeY(item.sizeY, true);
- if (changedY && $getters.sizeY && $getters.sizeY.assign) {
- $getters.sizeY.assign(scope, item.sizeY);
- }
-
- if (changedX || changedY) {
- item.gridster.moveOverlappingItems(item);
- gridster.layoutChanged();
- scope.$broadcast('gridster-item-resized', item);
- }
- }
-
- scope.$watch(function() {
- return item.sizeY + ',' + item.sizeX + ',' + item.minSizeX + ',' + item.maxSizeX + ',' + item.minSizeY + ',' + item.maxSizeY;
- }, sizeChanged);
-
- var draggable = new GridsterDraggable($el, scope, gridster, item, options);
- var resizable = new GridsterResizable($el, scope, gridster, item, options);
-
- var updateResizable = function() {
- resizable.toggle(!gridster.isMobile && gridster.resizable && gridster.resizable.enabled);
- };
- updateResizable();
-
- var updateDraggable = function() {
- draggable.toggle(!gridster.isMobile && gridster.draggable && gridster.draggable.enabled);
- };
- updateDraggable();
-
- scope.$on('gridster-draggable-changed', updateDraggable);
- scope.$on('gridster-resizable-changed', updateResizable);
- scope.$on('gridster-resized', updateResizable);
- scope.$on('gridster-mobile-changed', function() {
- updateResizable();
- updateDraggable();
- });
-
- function whichTransitionEvent() {
- var el = document.createElement('div');
- var transitions = {
- 'transition': 'transitionend',
- 'OTransition': 'oTransitionEnd',
- 'MozTransition': 'transitionend',
- 'WebkitTransition': 'webkitTransitionEnd'
- };
- for (var t in transitions) {
- if (el.style[t] !== undefined) {
- return transitions[t];
- }
- }
- }
-
- var debouncedTransitionEndPublisher = gridsterDebounce(function() {
- scope.$apply(function() {
- scope.$broadcast('gridster-item-transition-end', item);
- });
- }, 50);
-
- if(whichTransitionEvent()){ //check for IE8, as it evaluates to null
- $el.on(whichTransitionEvent(), debouncedTransitionEndPublisher);
- }
-
- scope.$broadcast('gridster-item-initialized', item);
-
- return scope.$on('$destroy', function() {
- try {
- resizable.destroy();
- draggable.destroy();
- } catch (e) {}
-
- try {
- gridster.removeItem(item);
- } catch (e) {}
-
- try {
- item.destroy();
- } catch (e) {}
- });
- }
- };
- }
- ])
-
- .directive('gridsterNoDrag', function() {
- return {
- restrict: 'A',
- link: function(scope, $element) {
- $element.addClass('gridster-no-drag');
- }
- };
- })
-
- ;
-
-}));
diff --git a/ecomp-portal-BE/war/static/fusion/js/att_angular_gridster/ui-gridster-tpls.js b/ecomp-portal-BE/war/static/fusion/js/att_angular_gridster/ui-gridster-tpls.js
deleted file mode 100644
index 3ca3db7d..00000000
--- a/ecomp-portal-BE/war/static/fusion/js/att_angular_gridster/ui-gridster-tpls.js
+++ /dev/null
@@ -1,168 +0,0 @@
-/**
-* FileName ui-gridster
-* Version 0.0.1
-* Build number ad58c6f4f8f8fd7f04ac457f95d76f09
-* Date 08/17/2015
-*/
-
-
-(function(angular, window){
-angular.module("att.gridster", ["att.gridster.tpls", "att.gridster.utilities","att.gridster.gridster"]);
-angular.module("att.gridster.tpls", ["template/gridster/gridster.html","template/gridster/gridsterItem.html","template/gridster/gridsterItemBody.html","template/gridster/gridsterItemFooter.html","template/gridster/gridsterItemHeader.html"]);
-angular.module('att.gridster.utilities', [])
- .factory('$extendObj', [function() {
- var _extendDeep = function(dst) {
- angular.forEach(arguments, function(obj) {
- if (obj !== dst) {
- angular.forEach(obj, function(value, key) {
- if (dst[key] && dst[key].constructor && dst[key].constructor === Object) {
- _extendDeep(dst[key], value);
- } else {
- dst[key] = value;
- }
- });
- }
- });
- return dst;
- };
- return {
- extendDeep: _extendDeep
- };
- }]);
-
-angular.module('att.gridster.gridster', ['attGridsterLib', 'att.gridster.utilities'])
- .config(['$compileProvider', function($compileProvider) {
- $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|javascript):/);
- }])
- .constant('attGridsterConfig',
- {
- columns: 3,
- margins: [10, 10],
- outerMargin: true,
- pushing: true,
- floating: true,
- swapping: true,
- draggable: {
- enabled: true
- }
- })
- .directive('attGridster', ['attGridsterConfig', '$extendObj', function(attGridsterConfig, $extendObj) {
- return {
- restrict: 'EA',
- scope: {
- attGridsterOptions: '=?'
- },
- templateUrl: 'template/gridster/gridster.html',
- replace: false,
- transclude: true,
- controller: [function() {}],
- link: function(scope) {
- if (angular.isDefined(scope.attGridsterOptions)) {
- attGridsterConfig = $extendObj.extendDeep(attGridsterConfig, scope.attGridsterOptions);
- }
- scope.attGridsterConfig = attGridsterConfig;
- }
- };
- }])
- .directive('attGridsterItem', ['$timeout', function($timeout) {
- return {
- restrict: 'EA',
- require: ['^attGridster'],
- scope: {
- attGridsterItem: '='
- },
- templateUrl: 'template/gridster/gridsterItem.html',
- replace: false,
- transclude: true,
- controller: [function() {}]
- };
- }])
- .directive('attGridsterItemHeader', [function() {
- return {
- restrict: 'EA',
- require: ['^attGridsterItem'],
- scope: {
- headerText: '@',
- subHeaderText: '@?'
- },
- templateUrl: 'template/gridster/gridsterItemHeader.html',
- replace: true,
- transclude: true,
- link: function(scope, element) {
- if (angular.isDefined(scope.subHeaderText) && scope.subHeaderText) {
- angular.element(element[0].querySelector('span.gridster-item-sub-header-content')).attr("tabindex", "0");
- angular.element(element[0].querySelector('span.gridster-item-sub-header-content')).attr("aria-label", scope.subHeaderText);
- }
- }
- };
- }])
- .directive('attGridsterItemBody', [function() {
- return {
- restrict: 'EA',
- require: ['^attGridsterItem'],
- scope: {},
- templateUrl: 'template/gridster/gridsterItemBody.html',
- replace: true,
- transclude: true
- };
- }])
- .directive('attGridsterItemFooter', ['$location', function($location) {
- return {
- restrict: 'EA',
- require: ['^attGridsterItem'],
- scope: {
- attGridsterItemFooterLink: '@?'
- },
- templateUrl: 'template/gridster/gridsterItemFooter.html',
- replace: true,
- transclude: true,
- controller: ['$scope', function($scope) {
- $scope.clickOnFooterLink = function(evt) {
- evt.preventDefault();
- evt.stopPropagation();
- if ($scope.attGridsterItemFooterLink) {
- $location.url($scope.attGridsterItemFooterLink);
- }
- };
- }],
- link: function(scope, element) {
- if (angular.isDefined(scope.attGridsterItemFooterLink) && scope.attGridsterItemFooterLink) {
- element.attr("role", "link");
- }
- }
- };
- }]);
-angular.module("template/gridster/gridster.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("template/gridster/gridster.html",
- "<div gridster='attGridsterConfig'><div ng-transclude></div></div>");
-}]);
-
-angular.module("template/gridster/gridsterItem.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("template/gridster/gridsterItem.html",
- "<div gridster-item='attGridsterItem' class=\"gridster-item-container\" ng-transclude></div>");
-}]);
-
-angular.module("template/gridster/gridsterItemBody.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("template/gridster/gridsterItemBody.html",
- "<div class=\"gridster-item-body\" ng-transclude></div>");
-}]);
-
-angular.module("template/gridster/gridsterItemFooter.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("template/gridster/gridsterItemFooter.html",
- "<div class=\"gridster-item-footer\" ng-click=\"clickOnFooterLink($event)\" tabindex=\"0\" ng-keydown=\"(($event.keyCode && $event.keyCode === 13) || ($event.which && $event.which === 13)) && clickOnFooterLink($event)\" >\n" +
- " <span class=\"gridster-item-footer-content\" ng-transclude></span>\n" +
- "</div>");
-}]);
-
-angular.module("template/gridster/gridsterItemHeader.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("template/gridster/gridsterItemHeader.html",
- "<div class=\"gridster-item-header\">\n" +
- " <img gridster-item-drag src=\"static/fusion/images/att_angular_gridster/grips.png\" alt=\"||\" aria-label=\"Tap/Click to move\" class=\"gridster-item-handle\" />\n" +
- " <span class=\"gridster-item-header-content\" tabindex=\"0\" role=\"presentation\" aria-label=\"{{headerText}}\">{{headerText}}</span>\n" +
- " <span class=\"gridster-item-sub-header-content\" role=\"presentation\">{{subHeaderText}}</span>\n" +
- " <div class=\"gridster-item-header-buttons-container\" ng-transclude></div>\n" +
- "</div>");
-}]);
-
-return {}
-})(angular, window); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/js/jquery.resize.js b/ecomp-portal-BE/war/static/fusion/js/jquery.resize.js
deleted file mode 100644
index 1ebd6c95..00000000
--- a/ecomp-portal-BE/war/static/fusion/js/jquery.resize.js
+++ /dev/null
@@ -1,139 +0,0 @@
-/*!
- * jquery.resize.js 0.0.1 - https://github.com/yckart/jquery.resize.js
- * Resize-event for DOM-Nodes
- *
- * @see http://workingdraft.de/113/
- * @see http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/
- *
- * Copyright (c) 2013 Yannick Albert (http://yckart.com)
- * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php).
- * 2013/04/01
- */
-
-(function(factory) {
- if(typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['jquery'], factory);
- } else if(typeof exports === 'object') {
- // Node/CommonJS style for Browserify
- module.exports = factory;
- } else {
- // Browser globals
- factory(jQuery);
- }
-}(function($) {
-
- function addFlowListener(element, type, fn) {
- var flow = type == 'over';
- element.addEventListener('OverflowEvent' in window ? 'overflowchanged' : type + 'flow', function(e) {
- if(e.type == (type + 'flow') || ((e.orient == 0 && e.horizontalOverflow == flow) || (e.orient == 1 && e.verticalOverflow == flow) || (e.orient == 2 && e.horizontalOverflow == flow && e.verticalOverflow == flow))) {
- e.flow = type;
- return fn.call(this, e);
- }
- }, false);
- };
-
- function fireEvent(element, type, data, options) {
- var options = options || {},
- event = document.createEvent('Event');
- event.initEvent(type, 'bubbles' in options ? options.bubbles : true, 'cancelable' in options ? options.cancelable : true);
- for(var z in data) event[z] = data[z];
- element.dispatchEvent(event);
- };
-
- $.event.special.resize = {
- setup: function() {
- var element = this;
- var resize = 'onresize' in element;
- if(!resize && !element._resizeSensor) {
- var sensor = element._resizeSensor = document.createElement('div');
- sensor.className = 'resize-sensor';
- sensor.innerHTML = '<div class="resize-overflow"><div></div></div><div class="resize-underflow"><div></div></div>';
-
- var x = 0,
- y = 0,
- first = sensor.firstElementChild.firstChild,
- last = sensor.lastElementChild.firstChild,
- matchFlow = function(event) {
- var change = false,
- width = element.offsetWidth;
- if(x != width) {
- first.style.width = width - 1 + 'px';
- last.style.width = width + 1 + 'px';
- change = true;
- x = width;
- }
- var height = element.offsetHeight;
- if(y != height) {
- first.style.height = height - 1 + 'px';
- last.style.height = height + 1 + 'px';
- change = true;
- y = height;
- }
- if(change && event.currentTarget != element) fireEvent(element, 'resize');
- };
-
- if(getComputedStyle(element).position == 'static') {
- element.style.position = 'relative';
- element._resizeSensor._resetPosition = true;
- }
- addFlowListener(sensor, 'over', matchFlow);
- addFlowListener(sensor, 'under', matchFlow);
- addFlowListener(sensor.firstElementChild, 'over', matchFlow);
- addFlowListener(sensor.lastElementChild, 'under', matchFlow);
- element.appendChild(sensor);
- matchFlow({});
- }
- var events = element._flowEvents || (element._flowEvents = []);
- if(events.indexOf(handler) == -1) events.push(handler);
- if(!resize) element.addEventListener('resize', handler, false);
- element.onresize = function(e) {
- events.forEach(function(fn) {
- fn.call(element, e);
- });
- };
- },
-
- teardown: function() {
- var element = this;
- var index = element._flowEvents.indexOf(handler);
- if(index > -1) element._flowEvents.splice(index, 1);
- if(!element._flowEvents.length) {
- var sensor = element._resizeSensor;
- if(sensor) {
- element.removeChild(sensor);
- if(sensor._resetPosition) element.style.position = 'static';
- delete element._resizeSensor;
- }
- if('onresize' in element) element.onresize = null;
- delete element._flowEvents;
- }
- element.removeEventListener('resize', handler);
- }
- };
-
- $.fn.extend({
- resize: function(fn) {
- return fn ? this.bind("resize", fn) : this.trigger("resize");
- },
-
- unresize: function(fn) {
- return this.unbind("resize", fn);
- }
- });
-
-
- function handler(event) {
- var orgEvent = event || window.event,
- args = [].slice.call(arguments, 1);
-
- event = $.event.fix(orgEvent);
- event.type = "resize";
-
- // Add event to the front of the arguments
- args.unshift(event);
-
- return($.event.dispatch || $.event.handle).apply(this, args);
- }
-
-})); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/js/layout/debug.js b/ecomp-portal-BE/war/static/fusion/js/layout/debug.js
deleted file mode 100644
index eff36a25..00000000
--- a/ecomp-portal-BE/war/static/fusion/js/layout/debug.js
+++ /dev/null
@@ -1,329 +0,0 @@
-/**
- * debugData
- *
- * Pass me a data structure {} and I'll output all the key/value pairs - recursively
- *
- * @example var HTML = debugData( oElem.style, "Element.style", { keys: "top,left,width,height", recurse: true, sort: true, display: true, returnHTML: true });
- *
- * @param Object o_Data A JSON-style data structure
- * @param String s_Title Title for dialog (optional)
- * @param Hash options Pass additional options in a hash
- */
-function debugData (o_Data, s_Title, options) {
- options = options || {};
- var
- str=(s_Title||s_Title==='' ? s_Title : 'DATA')
- , dType=$.type(o_Data)
- // maintain backward compatibility with OLD 'recurseData' param
- , recurse=($.type(options)==='boolean' ? options : options.recurse !==false)
- , keys=(options.keys?','+options.keys+',':false)
- , display=options.display !==false
- , html=options.returnHTML !==false
- , sort=!!options.sort
- , prefix=options.indent ? ' ' : ''
- , D=[], i=0 // Array to hold data, i=counter
- , hasSubKeys = false
- , k, t, skip, x, type // loop vars
- ;
- if (dType!=='object' && dType!=='array') {
- if (options.display) alert( (s_Title || 'debugData') +': '+ o_Data );
- return o_Data;
- }
- if (dType==='object' && $.isPlainObject(o_Data))
- dType='hash';
-
- if (o_Data.jquery) {
- str=s_Title+'jQuery Collection ('+ o_Data.length +')\n context="'+ o_Data.context +'"';
- }
- else if (o_Data.nodeName) {
- str=s_Title+o_Data.tagName;
- var id = o_Data.id, cls=o_Data.className, src=o_Data.src, hrf=o_Data.href;
- if (id) str+='\n id="'+ id+'"';
- if (cls) str+='\n class="'+ cls+'"';
- if (src) str+='\n src="'+ src+'"';
- if (hrf) str+='\n href="'+ hrf+'"';
- }
- else {
- parse(o_Data,prefix,dType); // recursive parsing
- if (sort && !hasSubKeys) D.sort(); // sort by keyName - but NOT if has subKeys!
- if (str) str += '\n***'+ '****************************'.substr(0,str.length) +'\n';
- str += D.join('\n'); // add line-breaks
- }
-
- if (display) alert(str); // display data
- if (html) str=str.replace(/\n/g, ' <br>').replace(/ /g, ' &nbsp;'); // format as HTML
- return str;
-
- function parse ( data, prefix, parentType ) {
- var first = true;
- try {
- $.each( data, function (key, val) {
- skip = (keys && keys.indexOf(','+key+',') === -1);
- type = $.type(val);
- if (type==='object' && $.isPlainObject(val))
- type = 'hash';
- k = prefix + (first ? ' ' : ', ');
- first = false;
-
- if (parentType!=='array') // no key-names for array items
- k += key+': '; // NOT an array
-
- if (type==="date" || type==="regexp") {
- val = val.toString();
- type = "string";
- }
- if (type==="string") { // STRING
- if (!skip) D[i++] = k +'"'+ val +'"';
- }
- // NULL, UNDEFINED, NUMBER or BOOLEAN
- else if (/^(null|undefined|number|boolean)/.test(type)) {
- if (!skip) D[i++] = k + val;
- }
- else if (type==="function") { // FUNCTION
- if (!skip) D[i++] = k +'function()';
- }
- else if (type==="array") { // ARRAY
- if (!skip) {
- D[i++] = k +'[';
- parse( val, prefix+' ',type); // RECURSE
- D[i++] = prefix +' ]';
- }
- }
- else if (val.jquery) { // JQUERY OBJECT
- if (!skip) D[i++] = k +'jQuery ('+ val.length +') context="'+ val.context +'"';
- }
- else if (val.nodeName) { // DOM ELEMENT
- var id = val.id, cls=val.className, src=val.src, hrf=val.href;
- if (skip) D[i++] = k +' '+
- id ? 'id="'+ id+'"' :
- src ? 'src="'+ src+'"' :
- hrf ? 'href="'+ hrf+'"' :
- cls ? 'class="'+cls+'"' :
- '';
- }
- else if (type==="hash") { // JSON
- if (!recurse || $.isEmptyObject(val)) { // show an empty hash
- if (!skip) D[i++] = k +'{ }';
- }
- else { // recurse into JSON hash - indent output
- D[i++] = k +'{';
- parse( val, prefix+' ',type); // RECURSE
- D[i++] = prefix +' }';
- }
- }
- else { // OBJECT
- if (!skip) D[i++] = k +'OBJECT'; // NOT a hash
- }
- });
- } catch (e) {}
- }
-};
-
-function debugStackTrace (s_Title, options) {
- var
- callstack = []
- , isCallstackPopulated = false
- ;
- try {
- i.dont.exist += 0; // doesn't exist- that's the point
- } catch(e) {
- if (e.stack) { // Firefox
- var lines = e.stack.split('\n');
- for (var i=0, len=lines.length; i<len; i++) {
- if (lines[i].match(/^\s*[A-Za-z0-9\-_\$]+\(/)) {
- callstack.push(lines[i]);
- }
- }
- //Remove call to printStackTrace()
- callstack.shift();
- isCallstackPopulated = true;
- }
- else if (window.opera && e.message) { // Opera
- var lines = e.message.split('\n');
- for (var i=0, len=lines.length; i<len; i++) {
- if (lines[i].match(/^\s*[A-Za-z0-9\-_\$]+\(/)) {
- var entry = lines[i];
- //Append next line also since it has the file info
- if (lines[i+1]) {
- entry += ' at ' + lines[i+1];
- i++;
- }
- callstack.push(entry);
- }
- }
- //Remove call to printStackTrace()
- callstack.shift();
- isCallstackPopulated = true;
- }
- }
-
- if (!isCallstackPopulated) { // IE and Safari
- var currentFunction = arguments.callee.caller;
- while (currentFunction) {
- var fn = currentFunction.toString();
- var fname = fn.substring(fn.indexOf('function') + 8, fn.indexOf('')) || 'anonymous';
- callstack.push(fname);
- currentFunction = currentFunction.caller;
- }
- }
-
- debugData( callstack, s_Title, options );
-};
-
-if (!window.console) window.console = { log: debugData };
-
-if (!window.console.trace)
- window.console.trace = function (s_Title) {
- window.console.log( debugStackTrace(s_Title, { display: false, returnHTML: false, sort: false }) );
- };
-
-// add method to output 'hash data' inside an string
-window.console.data = function (data, title) {
- var w = { array: ['[',']'], object: ['{','}'], string: ['"','"'], number: ['',''], function: ['','()'] }
- , x = $.type( data )
- , obj = x.match(/(object|array)/)
- , delim = !obj ? ['',''] : x === 'object' ? ['{\n','\n}'] : ['[\n','\n]']
- , opts = { display: false, returnHTML: false, sort: false }
- , debug = debugData( data, '', opts)
- ;
- console.log(
- (title ? title +' = ' : '')
- + delim[0]
- + ($.type(debug) === 'string' ? debug.replace(/ /g, '\t') : debug)
- + delim[1]
- );
-};
-
-
-/**
- * timer
- *
- * Utility for debug timing of events
- * Can track multiple timers and returns either a total time or interval from last event
- * @param String timerName Name of the timer - defaults to debugTimer
- * @param String action Keyword for action or return-value...
- * action: 'reset' = reset; 'clear' = delete; 'total' = ms since init; 'step' or '' = ms since last event
- */
-/**
- * timer
- *
- * Utility method for timing performance
- * Can track multiple timers and returns either a total time or interval from last event
- *
- * returns time-data: {
- * start: Date Object
- * , last: Date Object
- * , step: 99 // time since 'last'
- * , total: 99 // time since 'start'
- * }
- *
- * USAGE SAMPLES
- * =============
- * timer('name'); // create/init timer
- * timer('name', 'reset'); // re-init timer
- * timer('name', 'clear'); // clear/remove timer
- * var i = timer('name'); // how long since last timer request?
- * var i = timer('name', 'total'); // how long since timer started?
- *
- * @param String timerName Name of the timer - defaults to debugTimer
- * @param String action Keyword for action or return-value...
- * @param Hash options Options to customize return data
- * action: 'reset' = reset; 'clear' = delete; 'total' = ms since init; 'step' or '' = ms since last event
- */
-function timer (timerName, action, options) {
- var
- name = timerName || 'debugTimer'
- , Timer = window[ name ]
- , defaults = {
- returnString: true
- , padNumbers: true
- , timePrefix: ''
- , timeSuffix: ''
- }
- ;
-
- // init the timer first time called
- if (!Timer || action == 'reset') { // init timer
- Timer = window[ name ] = {
- start: new Date()
- , last: new Date()
- , step: 0 // time since 'last'
- , total: 0 // time since 'start'
- , options: $.extend({}, defaults, options)
- };
- }
- else if (action == 'clear') { // remove timer
- window[ name ] = null;
- return null;
- }
- else { // update existing timer
- Timer.step = (new Date()) - Timer.last; // time since 'last'
- Timer.total = (new Date()) - Timer.start; // time since 'start'
- Timer.last = new Date();
- }
-
- var
- time = (action == 'total') ? Timer.total : Timer.step
- , o = Timer.options // alias
- ;
-
- if (o.returnString) {
- time += ""; // convert integer to string
- // pad time to 4 chars with underscores
- if (o.padNumbers)
- switch (time.length) {
- case 1: time = "&ensp;&ensp;&ensp;"+ time; break;
- case 2: time = "&ensp;&ensp;"+ time; break;
- case 3: time = "&ensp;"+ time; break;
- }
- // add prefix and suffix
- if (o.timePrefix || o.timeSuffix)
- time = o.timePrefix + time + o.timeSuffix;
- }
-
- return time;
-};
-
-
-/**
- * showOptions
- *
- * Pass a layout-options object, and the pane/key you want to display
- */
-function showOptions (Layout, key, debugOpts) {
- var data = Layout.options;
- $.each(key.split("."), function() {
- data = data[this]; // recurse through multiple key-levels
- });
- debugData( data, 'options.'+key, debugOpts );
-};
-
-/**
- * showState
- *
- * Pass a layout-options object, and the pane/key you want to display
- */
-function showState (Layout, key, debugOpts) {
- var data = Layout.state;
- $.each(key.split("."), function() {
- data = data[this]; // recurse through multiple key-levels
- });
- debugData( data, 'state.'+key, debugOpts );
-};
-
-
-
-
-function debugWindow ( content, options ) {
- var defaults = {
- css: {
- position: 'fixed'
- , top: 0
- }
- };
- $.extend( true, (options || {}), defaults );
- var $W = $('<div></div>')
- .html( content.replace(/\n/g, '<br>').replace(/ /g, ' &nbsp;') ) // format as HTML
- .css( options.css )
- ;
-};
diff --git a/ecomp-portal-BE/war/static/fusion/js/layout/jquery-latest.js b/ecomp-portal-BE/war/static/fusion/js/layout/jquery-latest.js
deleted file mode 100644
index 1c998bab..00000000
--- a/ecomp-portal-BE/war/static/fusion/js/layout/jquery-latest.js
+++ /dev/null
@@ -1,9555 +0,0 @@
-/*!
- * jQuery JavaScript Library v1.9.0
- * http://jquery.com/
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- *
- * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: 2013-1-14
- */
-(function( window, undefined ) {
-"use strict";
-var
- // A central reference to the root jQuery(document)
- rootjQuery,
-
- // The deferred used on DOM ready
- readyList,
-
- // Use the correct document accordingly with window argument (sandbox)
- document = window.document,
- location = window.location,
-
- // Map over jQuery in case of overwrite
- _jQuery = window.jQuery,
-
- // Map over the $ in case of overwrite
- _$ = window.$,
-
- // [[Class]] -> type pairs
- class2type = {},
-
- // List of deleted data cache ids, so we can reuse them
- core_deletedIds = [],
-
- core_version = "1.9.0",
-
- // Save a reference to some core methods
- core_concat = core_deletedIds.concat,
- core_push = core_deletedIds.push,
- core_slice = core_deletedIds.slice,
- core_indexOf = core_deletedIds.indexOf,
- core_toString = class2type.toString,
- core_hasOwn = class2type.hasOwnProperty,
- core_trim = core_version.trim,
-
- // Define a local copy of jQuery
- jQuery = function( selector, context ) {
- // The jQuery object is actually just the init constructor 'enhanced'
- return new jQuery.fn.init( selector, context, rootjQuery );
- },
-
- // Used for matching numbers
- core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
-
- // Used for splitting on whitespace
- core_rnotwhite = /\S+/g,
-
- // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
- rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
-
- // A simple way to check for HTML strings
- // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
- // Strict HTML recognition (#11290: must start with <)
- rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,
-
- // Match a standalone tag
- rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
-
- // JSON RegExp
- rvalidchars = /^[\],:{}\s]*$/,
- rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
- rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
- rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
-
- // Matches dashed string for camelizing
- rmsPrefix = /^-ms-/,
- rdashAlpha = /-([\da-z])/gi,
-
- // Used by jQuery.camelCase as callback to replace()
- fcamelCase = function( all, letter ) {
- return letter.toUpperCase();
- },
-
- // The ready event handler and self cleanup method
- DOMContentLoaded = function() {
- if ( document.addEventListener ) {
- document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
- jQuery.ready();
- } else if ( document.readyState === "complete" ) {
- // we're here because readyState === "complete" in oldIE
- // which is good enough for us to call the dom ready!
- document.detachEvent( "onreadystatechange", DOMContentLoaded );
- jQuery.ready();
- }
- };
-
-jQuery.fn = jQuery.prototype = {
- // The current version of jQuery being used
- jquery: core_version,
-
- constructor: jQuery,
- init: function( selector, context, rootjQuery ) {
- var match, elem;
-
- // HANDLE: $(""), $(null), $(undefined), $(false)
- if ( !selector ) {
- return this;
- }
-
- // Handle HTML strings
- if ( typeof selector === "string" ) {
- if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
- // Assume that strings that start and end with <> are HTML and skip the regex check
- match = [ null, selector, null ];
-
- } else {
- match = rquickExpr.exec( selector );
- }
-
- // Match html or make sure no context is specified for #id
- if ( match && (match[1] || !context) ) {
-
- // HANDLE: $(html) -> $(array)
- if ( match[1] ) {
- context = context instanceof jQuery ? context[0] : context;
-
- // scripts is true for back-compat
- jQuery.merge( this, jQuery.parseHTML(
- match[1],
- context && context.nodeType ? context.ownerDocument || context : document,
- true
- ) );
-
- // HANDLE: $(html, props)
- if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
- for ( match in context ) {
- // Properties of context are called as methods if possible
- if ( jQuery.isFunction( this[ match ] ) ) {
- this[ match ]( context[ match ] );
-
- // ...and otherwise set as attributes
- } else {
- this.attr( match, context[ match ] );
- }
- }
- }
-
- return this;
-
- // HANDLE: $(#id)
- } else {
- elem = document.getElementById( match[2] );
-
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- if ( elem && elem.parentNode ) {
- // Handle the case where IE and Opera return items
- // by name instead of ID
- if ( elem.id !== match[2] ) {
- return rootjQuery.find( selector );
- }
-
- // Otherwise, we inject the element directly into the jQuery object
- this.length = 1;
- this[0] = elem;
- }
-
- this.context = document;
- this.selector = selector;
- return this;
- }
-
- // HANDLE: $(expr, $(...))
- } else if ( !context || context.jquery ) {
- return ( context || rootjQuery ).find( selector );
-
- // HANDLE: $(expr, context)
- // (which is just equivalent to: $(context).find(expr)
- } else {
- return this.constructor( context ).find( selector );
- }
-
- // HANDLE: $(DOMElement)
- } else if ( selector.nodeType ) {
- this.context = this[0] = selector;
- this.length = 1;
- return this;
-
- // HANDLE: $(function)
- // Shortcut for document ready
- } else if ( jQuery.isFunction( selector ) ) {
- return rootjQuery.ready( selector );
- }
-
- if ( selector.selector !== undefined ) {
- this.selector = selector.selector;
- this.context = selector.context;
- }
-
- return jQuery.makeArray( selector, this );
- },
-
- // Start with an empty selector
- selector: "",
-
- // The default length of a jQuery object is 0
- length: 0,
-
- // The number of elements contained in the matched element set
- size: function() {
- return this.length;
- },
-
- toArray: function() {
- return core_slice.call( this );
- },
-
- // Get the Nth element in the matched element set OR
- // Get the whole matched element set as a clean array
- get: function( num ) {
- return num == null ?
-
- // Return a 'clean' array
- this.toArray() :
-
- // Return just the object
- ( num < 0 ? this[ this.length + num ] : this[ num ] );
- },
-
- // Take an array of elements and push it onto the stack
- // (returning the new matched element set)
- pushStack: function( elems ) {
-
- // Build a new jQuery matched element set
- var ret = jQuery.merge( this.constructor(), elems );
-
- // Add the old object onto the stack (as a reference)
- ret.prevObject = this;
- ret.context = this.context;
-
- // Return the newly-formed element set
- return ret;
- },
-
- // Execute a callback for every element in the matched set.
- // (You can seed the arguments with an array of args, but this is
- // only used internally.)
- each: function( callback, args ) {
- return jQuery.each( this, callback, args );
- },
-
- ready: function( fn ) {
- // Add the callback
- jQuery.ready.promise().done( fn );
-
- return this;
- },
-
- slice: function() {
- return this.pushStack( core_slice.apply( this, arguments ) );
- },
-
- first: function() {
- return this.eq( 0 );
- },
-
- last: function() {
- return this.eq( -1 );
- },
-
- eq: function( i ) {
- var len = this.length,
- j = +i + ( i < 0 ? len : 0 );
- return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
- },
-
- map: function( callback ) {
- return this.pushStack( jQuery.map(this, function( elem, i ) {
- return callback.call( elem, i, elem );
- }));
- },
-
- end: function() {
- return this.prevObject || this.constructor(null);
- },
-
- // For internal use only.
- // Behaves like an Array's method, not like a jQuery method.
- push: core_push,
- sort: [].sort,
- splice: [].splice
-};
-
-// Give the init function the jQuery prototype for later instantiation
-jQuery.fn.init.prototype = jQuery.fn;
-
-jQuery.extend = jQuery.fn.extend = function() {
- var options, name, src, copy, copyIsArray, clone,
- target = arguments[0] || {},
- i = 1,
- length = arguments.length,
- deep = false;
-
- // Handle a deep copy situation
- if ( typeof target === "boolean" ) {
- deep = target;
- target = arguments[1] || {};
- // skip the boolean and the target
- i = 2;
- }
-
- // Handle case when target is a string or something (possible in deep copy)
- if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
- target = {};
- }
-
- // extend jQuery itself if only one argument is passed
- if ( length === i ) {
- target = this;
- --i;
- }
-
- for ( ; i < length; i++ ) {
- // Only deal with non-null/undefined values
- if ( (options = arguments[ i ]) != null ) {
- // Extend the base object
- for ( name in options ) {
- src = target[ name ];
- copy = options[ name ];
-
- // Prevent never-ending loop
- if ( target === copy ) {
- continue;
- }
-
- // Recurse if we're merging plain objects or arrays
- if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
- if ( copyIsArray ) {
- copyIsArray = false;
- clone = src && jQuery.isArray(src) ? src : [];
-
- } else {
- clone = src && jQuery.isPlainObject(src) ? src : {};
- }
-
- // Never move original objects, clone them
- target[ name ] = jQuery.extend( deep, clone, copy );
-
- // Don't bring in undefined values
- } else if ( copy !== undefined ) {
- target[ name ] = copy;
- }
- }
- }
- }
-
- // Return the modified object
- return target;
-};
-
-jQuery.extend({
- noConflict: function( deep ) {
- if ( window.$ === jQuery ) {
- window.$ = _$;
- }
-
- if ( deep && window.jQuery === jQuery ) {
- window.jQuery = _jQuery;
- }
-
- return jQuery;
- },
-
- // Is the DOM ready to be used? Set to true once it occurs.
- isReady: false,
-
- // A counter to track how many items to wait for before
- // the ready event fires. See #6781
- readyWait: 1,
-
- // Hold (or release) the ready event
- holdReady: function( hold ) {
- if ( hold ) {
- jQuery.readyWait++;
- } else {
- jQuery.ready( true );
- }
- },
-
- // Handle when the DOM is ready
- ready: function( wait ) {
-
- // Abort if there are pending holds or we're already ready
- if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
- return;
- }
-
- // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
- if ( !document.body ) {
- return setTimeout( jQuery.ready );
- }
-
- // Remember that the DOM is ready
- jQuery.isReady = true;
-
- // If a normal DOM Ready event fired, decrement, and wait if need be
- if ( wait !== true && --jQuery.readyWait > 0 ) {
- return;
- }
-
- // If there are functions bound, to execute
- readyList.resolveWith( document, [ jQuery ] );
-
- // Trigger any bound ready events
- if ( jQuery.fn.trigger ) {
- jQuery( document ).trigger("ready").off("ready");
- }
- },
-
- // See test/unit/core.js for details concerning isFunction.
- // Since version 1.3, DOM methods and functions like alert
- // aren't supported. They return false on IE (#2968).
- isFunction: function( obj ) {
- return jQuery.type(obj) === "function";
- },
-
- isArray: Array.isArray || function( obj ) {
- return jQuery.type(obj) === "array";
- },
-
- isWindow: function( obj ) {
- return obj != null && obj == obj.window;
- },
-
- isNumeric: function( obj ) {
- return !isNaN( parseFloat(obj) ) && isFinite( obj );
- },
-
- type: function( obj ) {
- if ( obj == null ) {
- return String( obj );
- }
- return typeof obj === "object" || typeof obj === "function" ?
- class2type[ core_toString.call(obj) ] || "object" :
- typeof obj;
- },
-
- isPlainObject: function( obj ) {
- // Must be an Object.
- // Because of IE, we also have to check the presence of the constructor property.
- // Make sure that DOM nodes and window objects don't pass through, as well
- if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
- return false;
- }
-
- try {
- // Not own constructor property must be Object
- if ( obj.constructor &&
- !core_hasOwn.call(obj, "constructor") &&
- !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
- return false;
- }
- } catch ( e ) {
- // IE8,9 Will throw exceptions on certain host objects #9897
- return false;
- }
-
- // Own properties are enumerated firstly, so to speed up,
- // if last one is own, then all properties are own.
-
- var key;
- for ( key in obj ) {}
-
- return key === undefined || core_hasOwn.call( obj, key );
- },
-
- isEmptyObject: function( obj ) {
- var name;
- for ( name in obj ) {
- return false;
- }
- return true;
- },
-
- error: function( msg ) {
- throw new Error( msg );
- },
-
- // data: string of html
- // context (optional): If specified, the fragment will be created in this context, defaults to document
- // keepScripts (optional): If true, will include scripts passed in the html string
- parseHTML: function( data, context, keepScripts ) {
- if ( !data || typeof data !== "string" ) {
- return null;
- }
- if ( typeof context === "boolean" ) {
- keepScripts = context;
- context = false;
- }
- context = context || document;
-
- var parsed = rsingleTag.exec( data ),
- scripts = !keepScripts && [];
-
- // Single tag
- if ( parsed ) {
- return [ context.createElement( parsed[1] ) ];
- }
-
- parsed = jQuery.buildFragment( [ data ], context, scripts );
- if ( scripts ) {
- jQuery( scripts ).remove();
- }
- return jQuery.merge( [], parsed.childNodes );
- },
-
- parseJSON: function( data ) {
- // Attempt to parse using the native JSON parser first
- if ( window.JSON && window.JSON.parse ) {
- return window.JSON.parse( data );
- }
-
- if ( data === null ) {
- return data;
- }
-
- if ( typeof data === "string" ) {
-
- // Make sure leading/trailing whitespace is removed (IE can't handle it)
- data = jQuery.trim( data );
-
- if ( data ) {
- // Make sure the incoming data is actual JSON
- // Logic borrowed from http://json.org/json2.js
- if ( rvalidchars.test( data.replace( rvalidescape, "@" )
- .replace( rvalidtokens, "]" )
- .replace( rvalidbraces, "")) ) {
-
- return ( new Function( "return " + data ) )();
- }
- }
- }
-
- jQuery.error( "Invalid JSON: " + data );
- },
-
- // Cross-browser xml parsing
- parseXML: function( data ) {
- var xml, tmp;
- if ( !data || typeof data !== "string" ) {
- return null;
- }
- try {
- if ( window.DOMParser ) { // Standard
- tmp = new DOMParser();
- xml = tmp.parseFromString( data , "text/xml" );
- } else { // IE
- xml = new ActiveXObject( "Microsoft.XMLDOM" );
- xml.async = "false";
- xml.loadXML( data );
- }
- } catch( e ) {
- xml = undefined;
- }
- if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
- jQuery.error( "Invalid XML: " + data );
- }
- return xml;
- },
-
- noop: function() {},
-
- // Evaluates a script in a global context
- // Workarounds based on findings by Jim Driscoll
- // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
- globalEval: function( data ) {
- if ( data && jQuery.trim( data ) ) {
- // We use execScript on Internet Explorer
- // We use an anonymous function so that context is window
- // rather than jQuery in Firefox
- ( window.execScript || function( data ) {
- window[ "eval" ].call( window, data );
- } )( data );
- }
- },
-
- // Convert dashed to camelCase; used by the css and data modules
- // Microsoft forgot to hump their vendor prefix (#9572)
- camelCase: function( string ) {
- return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
- },
-
- nodeName: function( elem, name ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
- },
-
- // args is for internal usage only
- each: function( obj, callback, args ) {
- var value,
- i = 0,
- length = obj.length,
- isArray = isArraylike( obj );
-
- if ( args ) {
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback.apply( obj[ i ], args );
-
- if ( value === false ) {
- break;
- }
- }
- } else {
- for ( i in obj ) {
- value = callback.apply( obj[ i ], args );
-
- if ( value === false ) {
- break;
- }
- }
- }
-
- // A special, fast, case for the most common use of each
- } else {
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback.call( obj[ i ], i, obj[ i ] );
-
- if ( value === false ) {
- break;
- }
- }
- } else {
- for ( i in obj ) {
- value = callback.call( obj[ i ], i, obj[ i ] );
-
- if ( value === false ) {
- break;
- }
- }
- }
- }
-
- return obj;
- },
-
- // Use native String.trim function wherever possible
- trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
- function( text ) {
- return text == null ?
- "" :
- core_trim.call( text );
- } :
-
- // Otherwise use our own trimming functionality
- function( text ) {
- return text == null ?
- "" :
- ( text + "" ).replace( rtrim, "" );
- },
-
- // results is for internal usage only
- makeArray: function( arr, results ) {
- var ret = results || [];
-
- if ( arr != null ) {
- if ( isArraylike( Object(arr) ) ) {
- jQuery.merge( ret,
- typeof arr === "string" ?
- [ arr ] : arr
- );
- } else {
- core_push.call( ret, arr );
- }
- }
-
- return ret;
- },
-
- inArray: function( elem, arr, i ) {
- var len;
-
- if ( arr ) {
- if ( core_indexOf ) {
- return core_indexOf.call( arr, elem, i );
- }
-
- len = arr.length;
- i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
-
- for ( ; i < len; i++ ) {
- // Skip accessing in sparse arrays
- if ( i in arr && arr[ i ] === elem ) {
- return i;
- }
- }
- }
-
- return -1;
- },
-
- merge: function( first, second ) {
- var l = second.length,
- i = first.length,
- j = 0;
-
- if ( typeof l === "number" ) {
- for ( ; j < l; j++ ) {
- first[ i++ ] = second[ j ];
- }
- } else {
- while ( second[j] !== undefined ) {
- first[ i++ ] = second[ j++ ];
- }
- }
-
- first.length = i;
-
- return first;
- },
-
- grep: function( elems, callback, inv ) {
- var retVal,
- ret = [],
- i = 0,
- length = elems.length;
- inv = !!inv;
-
- // Go through the array, only saving the items
- // that pass the validator function
- for ( ; i < length; i++ ) {
- retVal = !!callback( elems[ i ], i );
- if ( inv !== retVal ) {
- ret.push( elems[ i ] );
- }
- }
-
- return ret;
- },
-
- // arg is for internal usage only
- map: function( elems, callback, arg ) {
- var value,
- i = 0,
- length = elems.length,
- isArray = isArraylike( elems ),
- ret = [];
-
- // Go through the array, translating each of the items to their
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
-
- // Go through every key on the object,
- } else {
- for ( i in elems ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
- }
-
- // Flatten any nested arrays
- return core_concat.apply( [], ret );
- },
-
- // A global GUID counter for objects
- guid: 1,
-
- // Bind a function to a context, optionally partially applying any
- // arguments.
- proxy: function( fn, context ) {
- var tmp, args, proxy;
-
- if ( typeof context === "string" ) {
- tmp = fn[ context ];
- context = fn;
- fn = tmp;
- }
-
- // Quick check to determine if target is callable, in the spec
- // this throws a TypeError, but we will just return undefined.
- if ( !jQuery.isFunction( fn ) ) {
- return undefined;
- }
-
- // Simulated bind
- args = core_slice.call( arguments, 2 );
- proxy = function() {
- return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );
- };
-
- // Set the guid of unique handler to the same of original handler, so it can be removed
- proxy.guid = fn.guid = fn.guid || jQuery.guid++;
-
- return proxy;
- },
-
- // Multifunctional method to get and set values of a collection
- // The value/s can optionally be executed if it's a function
- access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
- var i = 0,
- length = elems.length,
- bulk = key == null;
-
- // Sets many values
- if ( jQuery.type( key ) === "object" ) {
- chainable = true;
- for ( i in key ) {
- jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
- }
-
- // Sets one value
- } else if ( value !== undefined ) {
- chainable = true;
-
- if ( !jQuery.isFunction( value ) ) {
- raw = true;
- }
-
- if ( bulk ) {
- // Bulk operations run against the entire set
- if ( raw ) {
- fn.call( elems, value );
- fn = null;
-
- // ...except when executing function values
- } else {
- bulk = fn;
- fn = function( elem, key, value ) {
- return bulk.call( jQuery( elem ), value );
- };
- }
- }
-
- if ( fn ) {
- for ( ; i < length; i++ ) {
- fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
- }
- }
- }
-
- return chainable ?
- elems :
-
- // Gets
- bulk ?
- fn.call( elems ) :
- length ? fn( elems[0], key ) : emptyGet;
- },
-
- now: function() {
- return ( new Date() ).getTime();
- }
-});
-
-jQuery.ready.promise = function( obj ) {
- if ( !readyList ) {
-
- readyList = jQuery.Deferred();
-
- // Catch cases where $(document).ready() is called after the browser event has already occurred.
- // we once tried to use readyState "interactive" here, but it caused issues like the one
- // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
- if ( document.readyState === "complete" ) {
- // Handle it asynchronously to allow scripts the opportunity to delay ready
- setTimeout( jQuery.ready );
-
- // Standards-based browsers support DOMContentLoaded
- } else if ( document.addEventListener ) {
- // Use the handy event callback
- document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
-
- // A fallback to window.onload, that will always work
- window.addEventListener( "load", jQuery.ready, false );
-
- // If IE event model is used
- } else {
- // Ensure firing before onload, maybe late but safe also for iframes
- document.attachEvent( "onreadystatechange", DOMContentLoaded );
-
- // A fallback to window.onload, that will always work
- window.attachEvent( "onload", jQuery.ready );
-
- // If IE and not a frame
- // continually check to see if the document is ready
- var top = false;
-
- try {
- top = window.frameElement == null && document.documentElement;
- } catch(e) {}
-
- if ( top && top.doScroll ) {
- (function doScrollCheck() {
- if ( !jQuery.isReady ) {
-
- try {
- // Use the trick by Diego Perini
- // http://javascript.nwbox.com/IEContentLoaded/
- top.doScroll("left");
- } catch(e) {
- return setTimeout( doScrollCheck, 50 );
- }
-
- // and execute any waiting functions
- jQuery.ready();
- }
- })();
- }
- }
- }
- return readyList.promise( obj );
-};
-
-// Populate the class2type map
-jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
- class2type[ "[object " + name + "]" ] = name.toLowerCase();
-});
-
-function isArraylike( obj ) {
- var length = obj.length,
- type = jQuery.type( obj );
-
- if ( jQuery.isWindow( obj ) ) {
- return false;
- }
-
- if ( obj.nodeType === 1 && length ) {
- return true;
- }
-
- return type === "array" || type !== "function" &&
- ( length === 0 ||
- typeof length === "number" && length > 0 && ( length - 1 ) in obj );
-}
-
-// All jQuery objects should point back to these
-rootjQuery = jQuery(document);
-// String to Object options format cache
-var optionsCache = {};
-
-// Convert String-formatted options into Object-formatted ones and store in cache
-function createOptions( options ) {
- var object = optionsCache[ options ] = {};
- jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {
- object[ flag ] = true;
- });
- return object;
-}
-
-/*
- * Create a callback list using the following parameters:
- *
- * options: an optional list of space-separated options that will change how
- * the callback list behaves or a more traditional option object
- *
- * By default a callback list will act like an event callback list and can be
- * "fired" multiple times.
- *
- * Possible options:
- *
- * once: will ensure the callback list can only be fired once (like a Deferred)
- *
- * memory: will keep track of previous values and will call any callback added
- * after the list has been fired right away with the latest "memorized"
- * values (like a Deferred)
- *
- * unique: will ensure a callback can only be added once (no duplicate in the list)
- *
- * stopOnFalse: interrupt callings when a callback returns false
- *
- */
-jQuery.Callbacks = function( options ) {
-
- // Convert options from String-formatted to Object-formatted if needed
- // (we check in cache first)
- options = typeof options === "string" ?
- ( optionsCache[ options ] || createOptions( options ) ) :
- jQuery.extend( {}, options );
-
- var // Last fire value (for non-forgettable lists)
- memory,
- // Flag to know if list was already fired
- fired,
- // Flag to know if list is currently firing
- firing,
- // First callback to fire (used internally by add and fireWith)
- firingStart,
- // End of the loop when firing
- firingLength,
- // Index of currently firing callback (modified by remove if needed)
- firingIndex,
- // Actual callback list
- list = [],
- // Stack of fire calls for repeatable lists
- stack = !options.once && [],
- // Fire callbacks
- fire = function( data ) {
- memory = options.memory && data;
- fired = true;
- firingIndex = firingStart || 0;
- firingStart = 0;
- firingLength = list.length;
- firing = true;
- for ( ; list && firingIndex < firingLength; firingIndex++ ) {
- if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
- memory = false; // To prevent further calls using add
- break;
- }
- }
- firing = false;
- if ( list ) {
- if ( stack ) {
- if ( stack.length ) {
- fire( stack.shift() );
- }
- } else if ( memory ) {
- list = [];
- } else {
- self.disable();
- }
- }
- },
- // Actual Callbacks object
- self = {
- // Add a callback or a collection of callbacks to the list
- add: function() {
- if ( list ) {
- // First, we save the current length
- var start = list.length;
- (function add( args ) {
- jQuery.each( args, function( _, arg ) {
- var type = jQuery.type( arg );
- if ( type === "function" ) {
- if ( !options.unique || !self.has( arg ) ) {
- list.push( arg );
- }
- } else if ( arg && arg.length && type !== "string" ) {
- // Inspect recursively
- add( arg );
- }
- });
- })( arguments );
- // Do we need to add the callbacks to the
- // current firing batch?
- if ( firing ) {
- firingLength = list.length;
- // With memory, if we're not firing then
- // we should call right away
- } else if ( memory ) {
- firingStart = start;
- fire( memory );
- }
- }
- return this;
- },
- // Remove a callback from the list
- remove: function() {
- if ( list ) {
- jQuery.each( arguments, function( _, arg ) {
- var index;
- while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
- list.splice( index, 1 );
- // Handle firing indexes
- if ( firing ) {
- if ( index <= firingLength ) {
- firingLength--;
- }
- if ( index <= firingIndex ) {
- firingIndex--;
- }
- }
- }
- });
- }
- return this;
- },
- // Control if a given callback is in the list
- has: function( fn ) {
- return jQuery.inArray( fn, list ) > -1;
- },
- // Remove all callbacks from the list
- empty: function() {
- list = [];
- return this;
- },
- // Have the list do nothing anymore
- disable: function() {
- list = stack = memory = undefined;
- return this;
- },
- // Is it disabled?
- disabled: function() {
- return !list;
- },
- // Lock the list in its current state
- lock: function() {
- stack = undefined;
- if ( !memory ) {
- self.disable();
- }
- return this;
- },
- // Is it locked?
- locked: function() {
- return !stack;
- },
- // Call all callbacks with the given context and arguments
- fireWith: function( context, args ) {
- args = args || [];
- args = [ context, args.slice ? args.slice() : args ];
- if ( list && ( !fired || stack ) ) {
- if ( firing ) {
- stack.push( args );
- } else {
- fire( args );
- }
- }
- return this;
- },
- // Call all the callbacks with the given arguments
- fire: function() {
- self.fireWith( this, arguments );
- return this;
- },
- // To know if the callbacks have already been called at least once
- fired: function() {
- return !!fired;
- }
- };
-
- return self;
-};
-jQuery.extend({
-
- Deferred: function( func ) {
- var tuples = [
- // action, add listener, listener list, final state
- [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
- [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
- [ "notify", "progress", jQuery.Callbacks("memory") ]
- ],
- state = "pending",
- promise = {
- state: function() {
- return state;
- },
- always: function() {
- deferred.done( arguments ).fail( arguments );
- return this;
- },
- then: function( /* fnDone, fnFail, fnProgress */ ) {
- var fns = arguments;
- return jQuery.Deferred(function( newDefer ) {
- jQuery.each( tuples, function( i, tuple ) {
- var action = tuple[ 0 ],
- fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
- // deferred[ done | fail | progress ] for forwarding actions to newDefer
- deferred[ tuple[1] ](function() {
- var returned = fn && fn.apply( this, arguments );
- if ( returned && jQuery.isFunction( returned.promise ) ) {
- returned.promise()
- .done( newDefer.resolve )
- .fail( newDefer.reject )
- .progress( newDefer.notify );
- } else {
- newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
- }
- });
- });
- fns = null;
- }).promise();
- },
- // Get a promise for this deferred
- // If obj is provided, the promise aspect is added to the object
- promise: function( obj ) {
- return obj != null ? jQuery.extend( obj, promise ) : promise;
- }
- },
- deferred = {};
-
- // Keep pipe for back-compat
- promise.pipe = promise.then;
-
- // Add list-specific methods
- jQuery.each( tuples, function( i, tuple ) {
- var list = tuple[ 2 ],
- stateString = tuple[ 3 ];
-
- // promise[ done | fail | progress ] = list.add
- promise[ tuple[1] ] = list.add;
-
- // Handle state
- if ( stateString ) {
- list.add(function() {
- // state = [ resolved | rejected ]
- state = stateString;
-
- // [ reject_list | resolve_list ].disable; progress_list.lock
- }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
- }
-
- // deferred[ resolve | reject | notify ]
- deferred[ tuple[0] ] = function() {
- deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
- return this;
- };
- deferred[ tuple[0] + "With" ] = list.fireWith;
- });
-
- // Make the deferred a promise
- promise.promise( deferred );
-
- // Call given func if any
- if ( func ) {
- func.call( deferred, deferred );
- }
-
- // All done!
- return deferred;
- },
-
- // Deferred helper
- when: function( subordinate /* , ..., subordinateN */ ) {
- var i = 0,
- resolveValues = core_slice.call( arguments ),
- length = resolveValues.length,
-
- // the count of uncompleted subordinates
- remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
-
- // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
- deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
-
- // Update function for both resolve and progress values
- updateFunc = function( i, contexts, values ) {
- return function( value ) {
- contexts[ i ] = this;
- values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
- if( values === progressValues ) {
- deferred.notifyWith( contexts, values );
- } else if ( !( --remaining ) ) {
- deferred.resolveWith( contexts, values );
- }
- };
- },
-
- progressValues, progressContexts, resolveContexts;
-
- // add listeners to Deferred subordinates; treat others as resolved
- if ( length > 1 ) {
- progressValues = new Array( length );
- progressContexts = new Array( length );
- resolveContexts = new Array( length );
- for ( ; i < length; i++ ) {
- if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
- resolveValues[ i ].promise()
- .done( updateFunc( i, resolveContexts, resolveValues ) )
- .fail( deferred.reject )
- .progress( updateFunc( i, progressContexts, progressValues ) );
- } else {
- --remaining;
- }
- }
- }
-
- // if we're not waiting on anything, resolve the master
- if ( !remaining ) {
- deferred.resolveWith( resolveContexts, resolveValues );
- }
-
- return deferred.promise();
- }
-});
-jQuery.support = (function() {
-
- var support, all, a, select, opt, input, fragment, eventName, isSupported, i,
- div = document.createElement("div");
-
- // Setup
- div.setAttribute( "className", "t" );
- div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
-
- // Support tests won't run in some limited or non-browser environments
- all = div.getElementsByTagName("*");
- a = div.getElementsByTagName("a")[ 0 ];
- if ( !all || !a || !all.length ) {
- return {};
- }
-
- // First batch of tests
- select = document.createElement("select");
- opt = select.appendChild( document.createElement("option") );
- input = div.getElementsByTagName("input")[ 0 ];
-
- a.style.cssText = "top:1px;float:left;opacity:.5";
- support = {
- // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
- getSetAttribute: div.className !== "t",
-
- // IE strips leading whitespace when .innerHTML is used
- leadingWhitespace: div.firstChild.nodeType === 3,
-
- // Make sure that tbody elements aren't automatically inserted
- // IE will insert them into empty tables
- tbody: !div.getElementsByTagName("tbody").length,
-
- // Make sure that link elements get serialized correctly by innerHTML
- // This requires a wrapper element in IE
- htmlSerialize: !!div.getElementsByTagName("link").length,
-
- // Get the style information from getAttribute
- // (IE uses .cssText instead)
- style: /top/.test( a.getAttribute("style") ),
-
- // Make sure that URLs aren't manipulated
- // (IE normalizes it by default)
- hrefNormalized: a.getAttribute("href") === "/a",
-
- // Make sure that element opacity exists
- // (IE uses filter instead)
- // Use a regex to work around a WebKit issue. See #5145
- opacity: /^0.5/.test( a.style.opacity ),
-
- // Verify style float existence
- // (IE uses styleFloat instead of cssFloat)
- cssFloat: !!a.style.cssFloat,
-
- // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
- checkOn: !!input.value,
-
- // Make sure that a selected-by-default option has a working selected property.
- // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
- optSelected: opt.selected,
-
- // Tests for enctype support on a form (#6743)
- enctype: !!document.createElement("form").enctype,
-
- // Makes sure cloning an html5 element does not cause problems
- // Where outerHTML is undefined, this still works
- html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",
-
- // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
- boxModel: document.compatMode === "CSS1Compat",
-
- // Will be defined later
- deleteExpando: true,
- noCloneEvent: true,
- inlineBlockNeedsLayout: false,
- shrinkWrapBlocks: false,
- reliableMarginRight: true,
- boxSizingReliable: true,
- pixelPosition: false
- };
-
- // Make sure checked status is properly cloned
- input.checked = true;
- support.noCloneChecked = input.cloneNode( true ).checked;
-
- // Make sure that the options inside disabled selects aren't marked as disabled
- // (WebKit marks them as disabled)
- select.disabled = true;
- support.optDisabled = !opt.disabled;
-
- // Support: IE<9
- try {
- delete div.test;
- } catch( e ) {
- support.deleteExpando = false;
- }
-
- // Check if we can trust getAttribute("value")
- input = document.createElement("input");
- input.setAttribute( "value", "" );
- support.input = input.getAttribute( "value" ) === "";
-
- // Check if an input maintains its value after becoming a radio
- input.value = "t";
- input.setAttribute( "type", "radio" );
- support.radioValue = input.value === "t";
-
- // #11217 - WebKit loses check when the name is after the checked attribute
- input.setAttribute( "checked", "t" );
- input.setAttribute( "name", "t" );
-
- fragment = document.createDocumentFragment();
- fragment.appendChild( input );
-
- // Check if a disconnected checkbox will retain its checked
- // value of true after appended to the DOM (IE6/7)
- support.appendChecked = input.checked;
-
- // WebKit doesn't clone checked state correctly in fragments
- support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
-
- // Support: IE<9
- // Opera does not clone events (and typeof div.attachEvent === undefined).
- // IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
- if ( div.attachEvent ) {
- div.attachEvent( "onclick", function() {
- support.noCloneEvent = false;
- });
-
- div.cloneNode( true ).click();
- }
-
- // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)
- // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php
- for ( i in { submit: true, change: true, focusin: true }) {
- div.setAttribute( eventName = "on" + i, "t" );
-
- support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false;
- }
-
- div.style.backgroundClip = "content-box";
- div.cloneNode( true ).style.backgroundClip = "";
- support.clearCloneStyle = div.style.backgroundClip === "content-box";
-
- // Run tests that need a body at doc ready
- jQuery(function() {
- var container, marginDiv, tds,
- divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
- body = document.getElementsByTagName("body")[0];
-
- if ( !body ) {
- // Return for frameset docs that don't have a body
- return;
- }
-
- container = document.createElement("div");
- container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
-
- body.appendChild( container ).appendChild( div );
-
- // Support: IE8
- // Check if table cells still have offsetWidth/Height when they are set
- // to display:none and there are still other visible table cells in a
- // table row; if so, offsetWidth/Height are not reliable for use when
- // determining if an element has been hidden directly using
- // display:none (it is still safe to use offsets if a parent element is
- // hidden; don safety goggles and see bug #4512 for more information).
- div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
- tds = div.getElementsByTagName("td");
- tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";
- isSupported = ( tds[ 0 ].offsetHeight === 0 );
-
- tds[ 0 ].style.display = "";
- tds[ 1 ].style.display = "none";
-
- // Support: IE8
- // Check if empty table cells still have offsetWidth/Height
- support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
-
- // Check box-sizing and margin behavior
- div.innerHTML = "";
- div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
- support.boxSizing = ( div.offsetWidth === 4 );
- support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );
-
- // Use window.getComputedStyle because jsdom on node.js will break without it.
- if ( window.getComputedStyle ) {
- support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
- support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
-
- // Check if div with explicit width and no margin-right incorrectly
- // gets computed margin-right based on width of container. (#3333)
- // Fails in WebKit before Feb 2011 nightlies
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- marginDiv = div.appendChild( document.createElement("div") );
- marginDiv.style.cssText = div.style.cssText = divReset;
- marginDiv.style.marginRight = marginDiv.style.width = "0";
- div.style.width = "1px";
-
- support.reliableMarginRight =
- !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
- }
-
- if ( typeof div.style.zoom !== "undefined" ) {
- // Support: IE<8
- // Check if natively block-level elements act like inline-block
- // elements when setting their display to 'inline' and giving
- // them layout
- div.innerHTML = "";
- div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
- support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
-
- // Support: IE6
- // Check if elements with layout shrink-wrap their children
- div.style.display = "block";
- div.innerHTML = "<div></div>";
- div.firstChild.style.width = "5px";
- support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
-
- // Prevent IE 6 from affecting layout for positioned elements #11048
- // Prevent IE from shrinking the body in IE 7 mode #12869
- body.style.zoom = 1;
- }
-
- body.removeChild( container );
-
- // Null elements to avoid leaks in IE
- container = div = tds = marginDiv = null;
- });
-
- // Null elements to avoid leaks in IE
- all = select = fragment = opt = a = input = null;
-
- return support;
-})();
-
-var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
- rmultiDash = /([A-Z])/g;
-
-function internalData( elem, name, data, pvt /* Internal Use Only */ ){
- if ( !jQuery.acceptData( elem ) ) {
- return;
- }
-
- var thisCache, ret,
- internalKey = jQuery.expando,
- getByName = typeof name === "string",
-
- // We have to handle DOM nodes and JS objects differently because IE6-7
- // can't GC object references properly across the DOM-JS boundary
- isNode = elem.nodeType,
-
- // Only DOM nodes need the global jQuery cache; JS object data is
- // attached directly to the object so GC can occur automatically
- cache = isNode ? jQuery.cache : elem,
-
- // Only defining an ID for JS objects if its cache already exists allows
- // the code to shortcut on the same path as a DOM node with no cache
- id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
-
- // Avoid doing any more work than we need to when trying to get data on an
- // object that has no data at all
- if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) {
- return;
- }
-
- if ( !id ) {
- // Only DOM nodes need a new unique ID for each element since their data
- // ends up in the global cache
- if ( isNode ) {
- elem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++;
- } else {
- id = internalKey;
- }
- }
-
- if ( !cache[ id ] ) {
- cache[ id ] = {};
-
- // Avoids exposing jQuery metadata on plain JS objects when the object
- // is serialized using JSON.stringify
- if ( !isNode ) {
- cache[ id ].toJSON = jQuery.noop;
- }
- }
-
- // An object can be passed to jQuery.data instead of a key/value pair; this gets
- // shallow copied over onto the existing cache
- if ( typeof name === "object" || typeof name === "function" ) {
- if ( pvt ) {
- cache[ id ] = jQuery.extend( cache[ id ], name );
- } else {
- cache[ id ].data = jQuery.extend( cache[ id ].data, name );
- }
- }
-
- thisCache = cache[ id ];
-
- // jQuery data() is stored in a separate object inside the object's internal data
- // cache in order to avoid key collisions between internal data and user-defined
- // data.
- if ( !pvt ) {
- if ( !thisCache.data ) {
- thisCache.data = {};
- }
-
- thisCache = thisCache.data;
- }
-
- if ( data !== undefined ) {
- thisCache[ jQuery.camelCase( name ) ] = data;
- }
-
- // Check for both converted-to-camel and non-converted data property names
- // If a data property was specified
- if ( getByName ) {
-
- // First Try to find as-is property data
- ret = thisCache[ name ];
-
- // Test for null|undefined property data
- if ( ret == null ) {
-
- // Try to find the camelCased property
- ret = thisCache[ jQuery.camelCase( name ) ];
- }
- } else {
- ret = thisCache;
- }
-
- return ret;
-}
-
-function internalRemoveData( elem, name, pvt /* For internal use only */ ){
- if ( !jQuery.acceptData( elem ) ) {
- return;
- }
-
- var thisCache, i, l,
-
- isNode = elem.nodeType,
-
- // See jQuery.data for more information
- cache = isNode ? jQuery.cache : elem,
- id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
-
- // If there is already no cache entry for this object, there is no
- // purpose in continuing
- if ( !cache[ id ] ) {
- return;
- }
-
- if ( name ) {
-
- thisCache = pvt ? cache[ id ] : cache[ id ].data;
-
- if ( thisCache ) {
-
- // Support array or space separated string names for data keys
- if ( !jQuery.isArray( name ) ) {
-
- // try the string as a key before any manipulation
- if ( name in thisCache ) {
- name = [ name ];
- } else {
-
- // split the camel cased version by spaces unless a key with the spaces exists
- name = jQuery.camelCase( name );
- if ( name in thisCache ) {
- name = [ name ];
- } else {
- name = name.split(" ");
- }
- }
- } else {
- // If "name" is an array of keys...
- // When data is initially created, via ("key", "val") signature,
- // keys will be converted to camelCase.
- // Since there is no way to tell _how_ a key was added, remove
- // both plain key and camelCase key. #12786
- // This will only penalize the array argument path.
- name = name.concat( jQuery.map( name, jQuery.camelCase ) );
- }
-
- for ( i = 0, l = name.length; i < l; i++ ) {
- delete thisCache[ name[i] ];
- }
-
- // If there is no data left in the cache, we want to continue
- // and let the cache object itself get destroyed
- if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
- return;
- }
- }
- }
-
- // See jQuery.data for more information
- if ( !pvt ) {
- delete cache[ id ].data;
-
- // Don't destroy the parent cache unless the internal data object
- // had been the only thing left in it
- if ( !isEmptyDataObject( cache[ id ] ) ) {
- return;
- }
- }
-
- // Destroy the cache
- if ( isNode ) {
- jQuery.cleanData( [ elem ], true );
-
- // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
- } else if ( jQuery.support.deleteExpando || cache != cache.window ) {
- delete cache[ id ];
-
- // When all else fails, null
- } else {
- cache[ id ] = null;
- }
-}
-
-jQuery.extend({
- cache: {},
-
- // Unique for each copy of jQuery on the page
- // Non-digits removed to match rinlinejQuery
- expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ),
-
- // The following elements throw uncatchable exceptions if you
- // attempt to add expando properties to them.
- noData: {
- "embed": true,
- // Ban all objects except for Flash (which handle expandos)
- "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
- "applet": true
- },
-
- hasData: function( elem ) {
- elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
- return !!elem && !isEmptyDataObject( elem );
- },
-
- data: function( elem, name, data ) {
- return internalData( elem, name, data, false );
- },
-
- removeData: function( elem, name ) {
- return internalRemoveData( elem, name, false );
- },
-
- // For internal use only.
- _data: function( elem, name, data ) {
- return internalData( elem, name, data, true );
- },
-
- _removeData: function( elem, name ) {
- return internalRemoveData( elem, name, true );
- },
-
- // A method for determining if a DOM node can handle the data expando
- acceptData: function( elem ) {
- var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
-
- // nodes accept data unless otherwise specified; rejection can be conditional
- return !noData || noData !== true && elem.getAttribute("classid") === noData;
- }
-});
-
-jQuery.fn.extend({
- data: function( key, value ) {
- var attrs, name,
- elem = this[0],
- i = 0,
- data = null;
-
- // Gets all values
- if ( key === undefined ) {
- if ( this.length ) {
- data = jQuery.data( elem );
-
- if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
- attrs = elem.attributes;
- for ( ; i < attrs.length; i++ ) {
- name = attrs[i].name;
-
- if ( !name.indexOf( "data-" ) ) {
- name = jQuery.camelCase( name.substring(5) );
-
- dataAttr( elem, name, data[ name ] );
- }
- }
- jQuery._data( elem, "parsedAttrs", true );
- }
- }
-
- return data;
- }
-
- // Sets multiple values
- if ( typeof key === "object" ) {
- return this.each(function() {
- jQuery.data( this, key );
- });
- }
-
- return jQuery.access( this, function( value ) {
-
- if ( value === undefined ) {
- // Try to fetch any internally stored data first
- return elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;
- }
-
- this.each(function() {
- jQuery.data( this, key, value );
- });
- }, null, value, arguments.length > 1, null, true );
- },
-
- removeData: function( key ) {
- return this.each(function() {
- jQuery.removeData( this, key );
- });
- }
-});
-
-function dataAttr( elem, key, data ) {
- // If nothing was found internally, try to fetch any
- // data from the HTML5 data-* attribute
- if ( data === undefined && elem.nodeType === 1 ) {
-
- var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
-
- data = elem.getAttribute( name );
-
- if ( typeof data === "string" ) {
- try {
- data = data === "true" ? true :
- data === "false" ? false :
- data === "null" ? null :
- // Only convert to a number if it doesn't change the string
- +data + "" === data ? +data :
- rbrace.test( data ) ? jQuery.parseJSON( data ) :
- data;
- } catch( e ) {}
-
- // Make sure we set the data so it isn't changed later
- jQuery.data( elem, key, data );
-
- } else {
- data = undefined;
- }
- }
-
- return data;
-}
-
-// checks a cache object for emptiness
-function isEmptyDataObject( obj ) {
- var name;
- for ( name in obj ) {
-
- // if the public data object is empty, the private is still empty
- if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
- continue;
- }
- if ( name !== "toJSON" ) {
- return false;
- }
- }
-
- return true;
-}
-jQuery.extend({
- queue: function( elem, type, data ) {
- var queue;
-
- if ( elem ) {
- type = ( type || "fx" ) + "queue";
- queue = jQuery._data( elem, type );
-
- // Speed up dequeue by getting out quickly if this is just a lookup
- if ( data ) {
- if ( !queue || jQuery.isArray(data) ) {
- queue = jQuery._data( elem, type, jQuery.makeArray(data) );
- } else {
- queue.push( data );
- }
- }
- return queue || [];
- }
- },
-
- dequeue: function( elem, type ) {
- type = type || "fx";
-
- var queue = jQuery.queue( elem, type ),
- startLength = queue.length,
- fn = queue.shift(),
- hooks = jQuery._queueHooks( elem, type ),
- next = function() {
- jQuery.dequeue( elem, type );
- };
-
- // If the fx queue is dequeued, always remove the progress sentinel
- if ( fn === "inprogress" ) {
- fn = queue.shift();
- startLength--;
- }
-
- hooks.cur = fn;
- if ( fn ) {
-
- // Add a progress sentinel to prevent the fx queue from being
- // automatically dequeued
- if ( type === "fx" ) {
- queue.unshift( "inprogress" );
- }
-
- // clear up the last queue stop function
- delete hooks.stop;
- fn.call( elem, next, hooks );
- }
-
- if ( !startLength && hooks ) {
- hooks.empty.fire();
- }
- },
-
- // not intended for public consumption - generates a queueHooks object, or returns the current one
- _queueHooks: function( elem, type ) {
- var key = type + "queueHooks";
- return jQuery._data( elem, key ) || jQuery._data( elem, key, {
- empty: jQuery.Callbacks("once memory").add(function() {
- jQuery._removeData( elem, type + "queue" );
- jQuery._removeData( elem, key );
- })
- });
- }
-});
-
-jQuery.fn.extend({
- queue: function( type, data ) {
- var setter = 2;
-
- if ( typeof type !== "string" ) {
- data = type;
- type = "fx";
- setter--;
- }
-
- if ( arguments.length < setter ) {
- return jQuery.queue( this[0], type );
- }
-
- return data === undefined ?
- this :
- this.each(function() {
- var queue = jQuery.queue( this, type, data );
-
- // ensure a hooks for this queue
- jQuery._queueHooks( this, type );
-
- if ( type === "fx" && queue[0] !== "inprogress" ) {
- jQuery.dequeue( this, type );
- }
- });
- },
- dequeue: function( type ) {
- return this.each(function() {
- jQuery.dequeue( this, type );
- });
- },
- // Based off of the plugin by Clint Helfers, with permission.
- // http://blindsignals.com/index.php/2009/07/jquery-delay/
- delay: function( time, type ) {
- time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
- type = type || "fx";
-
- return this.queue( type, function( next, hooks ) {
- var timeout = setTimeout( next, time );
- hooks.stop = function() {
- clearTimeout( timeout );
- };
- });
- },
- clearQueue: function( type ) {
- return this.queue( type || "fx", [] );
- },
- // Get a promise resolved when queues of a certain type
- // are emptied (fx is the type by default)
- promise: function( type, obj ) {
- var tmp,
- count = 1,
- defer = jQuery.Deferred(),
- elements = this,
- i = this.length,
- resolve = function() {
- if ( !( --count ) ) {
- defer.resolveWith( elements, [ elements ] );
- }
- };
-
- if ( typeof type !== "string" ) {
- obj = type;
- type = undefined;
- }
- type = type || "fx";
-
- while( i-- ) {
- tmp = jQuery._data( elements[ i ], type + "queueHooks" );
- if ( tmp && tmp.empty ) {
- count++;
- tmp.empty.add( resolve );
- }
- }
- resolve();
- return defer.promise( obj );
- }
-});
-var nodeHook, boolHook,
- rclass = /[\t\r\n]/g,
- rreturn = /\r/g,
- rfocusable = /^(?:input|select|textarea|button|object)$/i,
- rclickable = /^(?:a|area)$/i,
- rboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,
- ruseDefault = /^(?:checked|selected)$/i,
- getSetAttribute = jQuery.support.getSetAttribute,
- getSetInput = jQuery.support.input;
-
-jQuery.fn.extend({
- attr: function( name, value ) {
- return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
- },
-
- removeAttr: function( name ) {
- return this.each(function() {
- jQuery.removeAttr( this, name );
- });
- },
-
- prop: function( name, value ) {
- return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
- },
-
- removeProp: function( name ) {
- name = jQuery.propFix[ name ] || name;
- return this.each(function() {
- // try/catch handles cases where IE balks (such as removing a property on window)
- try {
- this[ name ] = undefined;
- delete this[ name ];
- } catch( e ) {}
- });
- },
-
- addClass: function( value ) {
- var classes, elem, cur, clazz, j,
- i = 0,
- len = this.length,
- proceed = typeof value === "string" && value;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).addClass( value.call( this, j, this.className ) );
- });
- }
-
- if ( proceed ) {
- // The disjunction here is for better compressibility (see removeClass)
- classes = ( value || "" ).match( core_rnotwhite ) || [];
-
- for ( ; i < len; i++ ) {
- elem = this[ i ];
- cur = elem.nodeType === 1 && ( elem.className ?
- ( " " + elem.className + " " ).replace( rclass, " " ) :
- " "
- );
-
- if ( cur ) {
- j = 0;
- while ( (clazz = classes[j++]) ) {
- if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
- cur += clazz + " ";
- }
- }
- elem.className = jQuery.trim( cur );
-
- }
- }
- }
-
- return this;
- },
-
- removeClass: function( value ) {
- var classes, elem, cur, clazz, j,
- i = 0,
- len = this.length,
- proceed = arguments.length === 0 || typeof value === "string" && value;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).removeClass( value.call( this, j, this.className ) );
- });
- }
- if ( proceed ) {
- classes = ( value || "" ).match( core_rnotwhite ) || [];
-
- for ( ; i < len; i++ ) {
- elem = this[ i ];
- // This expression is here for better compressibility (see addClass)
- cur = elem.nodeType === 1 && ( elem.className ?
- ( " " + elem.className + " " ).replace( rclass, " " ) :
- ""
- );
-
- if ( cur ) {
- j = 0;
- while ( (clazz = classes[j++]) ) {
- // Remove *all* instances
- while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
- cur = cur.replace( " " + clazz + " ", " " );
- }
- }
- elem.className = value ? jQuery.trim( cur ) : "";
- }
- }
- }
-
- return this;
- },
-
- toggleClass: function( value, stateVal ) {
- var type = typeof value,
- isBool = typeof stateVal === "boolean";
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( i ) {
- jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
- });
- }
-
- return this.each(function() {
- if ( type === "string" ) {
- // toggle individual class names
- var className,
- i = 0,
- self = jQuery( this ),
- state = stateVal,
- classNames = value.match( core_rnotwhite ) || [];
-
- while ( (className = classNames[ i++ ]) ) {
- // check each className given, space separated list
- state = isBool ? state : !self.hasClass( className );
- self[ state ? "addClass" : "removeClass" ]( className );
- }
-
- // Toggle whole class name
- } else if ( type === "undefined" || type === "boolean" ) {
- if ( this.className ) {
- // store className if set
- jQuery._data( this, "__className__", this.className );
- }
-
- // If the element has a class name or if we're passed "false",
- // then remove the whole classname (if there was one, the above saved it).
- // Otherwise bring back whatever was previously saved (if anything),
- // falling back to the empty string if nothing was stored.
- this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
- }
- });
- },
-
- hasClass: function( selector ) {
- var className = " " + selector + " ",
- i = 0,
- l = this.length;
- for ( ; i < l; i++ ) {
- if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
- return true;
- }
- }
-
- return false;
- },
-
- val: function( value ) {
- var hooks, ret, isFunction,
- elem = this[0];
-
- if ( !arguments.length ) {
- if ( elem ) {
- hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
-
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
- return ret;
- }
-
- ret = elem.value;
-
- return typeof ret === "string" ?
- // handle most common string cases
- ret.replace(rreturn, "") :
- // handle cases where value is null/undef or number
- ret == null ? "" : ret;
- }
-
- return;
- }
-
- isFunction = jQuery.isFunction( value );
-
- return this.each(function( i ) {
- var val,
- self = jQuery(this);
-
- if ( this.nodeType !== 1 ) {
- return;
- }
-
- if ( isFunction ) {
- val = value.call( this, i, self.val() );
- } else {
- val = value;
- }
-
- // Treat null/undefined as ""; convert numbers to string
- if ( val == null ) {
- val = "";
- } else if ( typeof val === "number" ) {
- val += "";
- } else if ( jQuery.isArray( val ) ) {
- val = jQuery.map(val, function ( value ) {
- return value == null ? "" : value + "";
- });
- }
-
- hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
-
- // If set returns undefined, fall back to normal setting
- if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
- this.value = val;
- }
- });
- }
-});
-
-jQuery.extend({
- valHooks: {
- option: {
- get: function( elem ) {
- // attributes.value is undefined in Blackberry 4.7 but
- // uses .value. See #6932
- var val = elem.attributes.value;
- return !val || val.specified ? elem.value : elem.text;
- }
- },
- select: {
- get: function( elem ) {
- var value, option,
- options = elem.options,
- index = elem.selectedIndex,
- one = elem.type === "select-one" || index < 0,
- values = one ? null : [],
- max = one ? index + 1 : options.length,
- i = index < 0 ?
- max :
- one ? index : 0;
-
- // Loop through all the selected options
- for ( ; i < max; i++ ) {
- option = options[ i ];
-
- // oldIE doesn't update selected after form reset (#2551)
- if ( ( option.selected || i === index ) &&
- // Don't return options that are disabled or in a disabled optgroup
- ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
- ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
-
- // Get the specific value for the option
- value = jQuery( option ).val();
-
- // We don't need an array for one selects
- if ( one ) {
- return value;
- }
-
- // Multi-Selects return an array
- values.push( value );
- }
- }
-
- return values;
- },
-
- set: function( elem, value ) {
- var values = jQuery.makeArray( value );
-
- jQuery(elem).find("option").each(function() {
- this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
- });
-
- if ( !values.length ) {
- elem.selectedIndex = -1;
- }
- return values;
- }
- }
- },
-
- attr: function( elem, name, value ) {
- var ret, hooks, notxml,
- nType = elem.nodeType;
-
- // don't get/set attributes on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- // Fallback to prop when attributes are not supported
- if ( typeof elem.getAttribute === "undefined" ) {
- return jQuery.prop( elem, name, value );
- }
-
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
-
- // All attributes are lowercase
- // Grab necessary hook if one is defined
- if ( notxml ) {
- name = name.toLowerCase();
- hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
- }
-
- if ( value !== undefined ) {
-
- if ( value === null ) {
- jQuery.removeAttr( elem, name );
-
- } else if ( hooks && notxml && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
- return ret;
-
- } else {
- elem.setAttribute( name, value + "" );
- return value;
- }
-
- } else if ( hooks && notxml && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
- return ret;
-
- } else {
-
- // In IE9+, Flash objects don't have .getAttribute (#12945)
- // Support: IE9+
- if ( typeof elem.getAttribute !== "undefined" ) {
- ret = elem.getAttribute( name );
- }
-
- // Non-existent attributes return null, we normalize to undefined
- return ret == null ?
- undefined :
- ret;
- }
- },
-
- removeAttr: function( elem, value ) {
- var name, propName,
- i = 0,
- attrNames = value && value.match( core_rnotwhite );
-
- if ( attrNames && elem.nodeType === 1 ) {
- while ( (name = attrNames[i++]) ) {
- propName = jQuery.propFix[ name ] || name;
-
- // Boolean attributes get special treatment (#10870)
- if ( rboolean.test( name ) ) {
- // Set corresponding property to false for boolean attributes
- // Also clear defaultChecked/defaultSelected (if appropriate) for IE<8
- if ( !getSetAttribute && ruseDefault.test( name ) ) {
- elem[ jQuery.camelCase( "default-" + name ) ] =
- elem[ propName ] = false;
- } else {
- elem[ propName ] = false;
- }
-
- // See #9699 for explanation of this approach (setting first, then removal)
- } else {
- jQuery.attr( elem, name, "" );
- }
-
- elem.removeAttribute( getSetAttribute ? name : propName );
- }
- }
- },
-
- attrHooks: {
- type: {
- set: function( elem, value ) {
- if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
- // Setting the type on a radio button after the value resets the value in IE6-9
- // Reset value to default in case type is set after value during creation
- var val = elem.value;
- elem.setAttribute( "type", value );
- if ( val ) {
- elem.value = val;
- }
- return value;
- }
- }
- }
- },
-
- propFix: {
- tabindex: "tabIndex",
- readonly: "readOnly",
- "for": "htmlFor",
- "class": "className",
- maxlength: "maxLength",
- cellspacing: "cellSpacing",
- cellpadding: "cellPadding",
- rowspan: "rowSpan",
- colspan: "colSpan",
- usemap: "useMap",
- frameborder: "frameBorder",
- contenteditable: "contentEditable"
- },
-
- prop: function( elem, name, value ) {
- var ret, hooks, notxml,
- nType = elem.nodeType;
-
- // don't get/set properties on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
-
- if ( notxml ) {
- // Fix name and attach hooks
- name = jQuery.propFix[ name ] || name;
- hooks = jQuery.propHooks[ name ];
- }
-
- if ( value !== undefined ) {
- if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
- return ret;
-
- } else {
- return ( elem[ name ] = value );
- }
-
- } else {
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
- return ret;
-
- } else {
- return elem[ name ];
- }
- }
- },
-
- propHooks: {
- tabIndex: {
- get: function( elem ) {
- // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
- // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
- var attributeNode = elem.getAttributeNode("tabindex");
-
- return attributeNode && attributeNode.specified ?
- parseInt( attributeNode.value, 10 ) :
- rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
- 0 :
- undefined;
- }
- }
- }
-});
-
-// Hook for boolean attributes
-boolHook = {
- get: function( elem, name ) {
- var
- // Use .prop to determine if this attribute is understood as boolean
- prop = jQuery.prop( elem, name ),
-
- // Fetch it accordingly
- attr = typeof prop === "boolean" && elem.getAttribute( name ),
- detail = typeof prop === "boolean" ?
-
- getSetInput && getSetAttribute ?
- attr != null :
- // oldIE fabricates an empty string for missing boolean attributes
- // and conflates checked/selected into attroperties
- ruseDefault.test( name ) ?
- elem[ jQuery.camelCase( "default-" + name ) ] :
- !!attr :
-
- // fetch an attribute node for properties not recognized as boolean
- elem.getAttributeNode( name );
-
- return detail && detail.value !== false ?
- name.toLowerCase() :
- undefined;
- },
- set: function( elem, value, name ) {
- if ( value === false ) {
- // Remove boolean attributes when set to false
- jQuery.removeAttr( elem, name );
- } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
- // IE<8 needs the *property* name
- elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );
-
- // Use defaultChecked and defaultSelected for oldIE
- } else {
- elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true;
- }
-
- return name;
- }
-};
-
-// fix oldIE value attroperty
-if ( !getSetInput || !getSetAttribute ) {
- jQuery.attrHooks.value = {
- get: function( elem, name ) {
- var ret = elem.getAttributeNode( name );
- return jQuery.nodeName( elem, "input" ) ?
-
- // Ignore the value *property* by using defaultValue
- elem.defaultValue :
-
- ret && ret.specified ? ret.value : undefined;
- },
- set: function( elem, value, name ) {
- if ( jQuery.nodeName( elem, "input" ) ) {
- // Does not return so that setAttribute is also used
- elem.defaultValue = value;
- } else {
- // Use nodeHook if defined (#1954); otherwise setAttribute is fine
- return nodeHook && nodeHook.set( elem, value, name );
- }
- }
- };
-}
-
-// IE6/7 do not support getting/setting some attributes with get/setAttribute
-if ( !getSetAttribute ) {
-
- // Use this for any attribute in IE6/7
- // This fixes almost every IE6/7 issue
- nodeHook = jQuery.valHooks.button = {
- get: function( elem, name ) {
- var ret = elem.getAttributeNode( name );
- return ret && ( name === "id" || name === "name" || name === "coords" ? ret.value !== "" : ret.specified ) ?
- ret.value :
- undefined;
- },
- set: function( elem, value, name ) {
- // Set the existing or create a new attribute node
- var ret = elem.getAttributeNode( name );
- if ( !ret ) {
- elem.setAttributeNode(
- (ret = elem.ownerDocument.createAttribute( name ))
- );
- }
-
- ret.value = value += "";
-
- // Break association with cloned elements by also using setAttribute (#9646)
- return name === "value" || value === elem.getAttribute( name ) ?
- value :
- undefined;
- }
- };
-
- // Set contenteditable to false on removals(#10429)
- // Setting to empty string throws an error as an invalid value
- jQuery.attrHooks.contenteditable = {
- get: nodeHook.get,
- set: function( elem, value, name ) {
- nodeHook.set( elem, value === "" ? false : value, name );
- }
- };
-
- // Set width and height to auto instead of 0 on empty string( Bug #8150 )
- // This is for removals
- jQuery.each([ "width", "height" ], function( i, name ) {
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
- set: function( elem, value ) {
- if ( value === "" ) {
- elem.setAttribute( name, "auto" );
- return value;
- }
- }
- });
- });
-}
-
-
-// Some attributes require a special call on IE
-// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
-if ( !jQuery.support.hrefNormalized ) {
- jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
- get: function( elem ) {
- var ret = elem.getAttribute( name, 2 );
- return ret == null ? undefined : ret;
- }
- });
- });
-
- // href/src property should get the full normalized URL (#10299/#12915)
- jQuery.each([ "href", "src" ], function( i, name ) {
- jQuery.propHooks[ name ] = {
- get: function( elem ) {
- return elem.getAttribute( name, 4 );
- }
- };
- });
-}
-
-if ( !jQuery.support.style ) {
- jQuery.attrHooks.style = {
- get: function( elem ) {
- // Return undefined in the case of empty string
- // Note: IE uppercases css property names, but if we were to .toLowerCase()
- // .cssText, that would destroy case senstitivity in URL's, like in "background"
- return elem.style.cssText || undefined;
- },
- set: function( elem, value ) {
- return ( elem.style.cssText = value + "" );
- }
- };
-}
-
-// Safari mis-reports the default selected property of an option
-// Accessing the parent's selectedIndex property fixes it
-if ( !jQuery.support.optSelected ) {
- jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
- get: function( elem ) {
- var parent = elem.parentNode;
-
- if ( parent ) {
- parent.selectedIndex;
-
- // Make sure that it also works with optgroups, see #5701
- if ( parent.parentNode ) {
- parent.parentNode.selectedIndex;
- }
- }
- return null;
- }
- });
-}
-
-// IE6/7 call enctype encoding
-if ( !jQuery.support.enctype ) {
- jQuery.propFix.enctype = "encoding";
-}
-
-// Radios and checkboxes getter/setter
-if ( !jQuery.support.checkOn ) {
- jQuery.each([ "radio", "checkbox" ], function() {
- jQuery.valHooks[ this ] = {
- get: function( elem ) {
- // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
- return elem.getAttribute("value") === null ? "on" : elem.value;
- }
- };
- });
-}
-jQuery.each([ "radio", "checkbox" ], function() {
- jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
- set: function( elem, value ) {
- if ( jQuery.isArray( value ) ) {
- return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
- }
- }
- });
-});
-var rformElems = /^(?:input|select|textarea)$/i,
- rkeyEvent = /^key/,
- rmouseEvent = /^(?:mouse|contextmenu)|click/,
- rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
- rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
-
-function returnTrue() {
- return true;
-}
-
-function returnFalse() {
- return false;
-}
-
-/*
- * Helper functions for managing events -- not part of the public interface.
- * Props to Dean Edwards' addEvent library for many of the ideas.
- */
-jQuery.event = {
-
- global: {},
-
- add: function( elem, types, handler, data, selector ) {
-
- var handleObjIn, eventHandle, tmp,
- events, t, handleObj,
- special, handlers, type, namespaces, origType,
- // Don't attach events to noData or text/comment nodes (but allow plain objects)
- elemData = elem.nodeType !== 3 && elem.nodeType !== 8 && jQuery._data( elem );
-
- if ( !elemData ) {
- return;
- }
-
- // Caller can pass in an object of custom data in lieu of the handler
- if ( handler.handler ) {
- handleObjIn = handler;
- handler = handleObjIn.handler;
- selector = handleObjIn.selector;
- }
-
- // Make sure that the handler has a unique ID, used to find/remove it later
- if ( !handler.guid ) {
- handler.guid = jQuery.guid++;
- }
-
- // Init the element's event structure and main handler, if this is the first
- if ( !(events = elemData.events) ) {
- events = elemData.events = {};
- }
- if ( !(eventHandle = elemData.handle) ) {
- eventHandle = elemData.handle = function( e ) {
- // Discard the second event of a jQuery.event.trigger() and
- // when an event is called after a page has unloaded
- return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
- jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
- undefined;
- };
- // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
- eventHandle.elem = elem;
- }
-
- // Handle multiple events separated by a space
- // jQuery(...).bind("mouseover mouseout", fn);
- types = ( types || "" ).match( core_rnotwhite ) || [""];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[t] ) || [];
- type = origType = tmp[1];
- namespaces = ( tmp[2] || "" ).split( "." ).sort();
-
- // If event changes its type, use the special event handlers for the changed type
- special = jQuery.event.special[ type ] || {};
-
- // If selector defined, determine special event api type, otherwise given type
- type = ( selector ? special.delegateType : special.bindType ) || type;
-
- // Update special based on newly reset type
- special = jQuery.event.special[ type ] || {};
-
- // handleObj is passed to all event handlers
- handleObj = jQuery.extend({
- type: type,
- origType: origType,
- data: data,
- handler: handler,
- guid: handler.guid,
- selector: selector,
- needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
- namespace: namespaces.join(".")
- }, handleObjIn );
-
- // Init the event handler queue if we're the first
- if ( !(handlers = events[ type ]) ) {
- handlers = events[ type ] = [];
- handlers.delegateCount = 0;
-
- // Only use addEventListener/attachEvent if the special events handler returns false
- if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
- // Bind the global event handler to the element
- if ( elem.addEventListener ) {
- elem.addEventListener( type, eventHandle, false );
-
- } else if ( elem.attachEvent ) {
- elem.attachEvent( "on" + type, eventHandle );
- }
- }
- }
-
- if ( special.add ) {
- special.add.call( elem, handleObj );
-
- if ( !handleObj.handler.guid ) {
- handleObj.handler.guid = handler.guid;
- }
- }
-
- // Add to the element's handler list, delegates in front
- if ( selector ) {
- handlers.splice( handlers.delegateCount++, 0, handleObj );
- } else {
- handlers.push( handleObj );
- }
-
- // Keep track of which events have ever been used, for event optimization
- jQuery.event.global[ type ] = true;
- }
-
- // Nullify elem to prevent memory leaks in IE
- elem = null;
- },
-
- // Detach an event or set of events from an element
- remove: function( elem, types, handler, selector, mappedTypes ) {
-
- var j, origCount, tmp,
- events, t, handleObj,
- special, handlers, type, namespaces, origType,
- elemData = jQuery.hasData( elem ) && jQuery._data( elem );
-
- if ( !elemData || !(events = elemData.events) ) {
- return;
- }
-
- // Once for each type.namespace in types; type may be omitted
- types = ( types || "" ).match( core_rnotwhite ) || [""];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[t] ) || [];
- type = origType = tmp[1];
- namespaces = ( tmp[2] || "" ).split( "." ).sort();
-
- // Unbind all events (on this namespace, if provided) for the element
- if ( !type ) {
- for ( type in events ) {
- jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
- }
- continue;
- }
-
- special = jQuery.event.special[ type ] || {};
- type = ( selector ? special.delegateType : special.bindType ) || type;
- handlers = events[ type ] || [];
- tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
-
- // Remove matching events
- origCount = j = handlers.length;
- while ( j-- ) {
- handleObj = handlers[ j ];
-
- if ( ( mappedTypes || origType === handleObj.origType ) &&
- ( !handler || handler.guid === handleObj.guid ) &&
- ( !tmp || tmp.test( handleObj.namespace ) ) &&
- ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
- handlers.splice( j, 1 );
-
- if ( handleObj.selector ) {
- handlers.delegateCount--;
- }
- if ( special.remove ) {
- special.remove.call( elem, handleObj );
- }
- }
- }
-
- // Remove generic event handler if we removed something and no more handlers exist
- // (avoids potential for endless recursion during removal of special event handlers)
- if ( origCount && !handlers.length ) {
- if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
- jQuery.removeEvent( elem, type, elemData.handle );
- }
-
- delete events[ type ];
- }
- }
-
- // Remove the expando if it's no longer used
- if ( jQuery.isEmptyObject( events ) ) {
- delete elemData.handle;
-
- // removeData also checks for emptiness and clears the expando if empty
- // so use it instead of delete
- jQuery._removeData( elem, "events" );
- }
- },
-
- trigger: function( event, data, elem, onlyHandlers ) {
-
- var i, cur, tmp, bubbleType, ontype, handle, special,
- eventPath = [ elem || document ],
- type = event.type || event,
- namespaces = event.namespace ? event.namespace.split(".") : [];
-
- cur = tmp = elem = elem || document;
-
- // Don't do events on text and comment nodes
- if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
- return;
- }
-
- // focus/blur morphs to focusin/out; ensure we're not firing them right now
- if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
- return;
- }
-
- if ( type.indexOf(".") >= 0 ) {
- // Namespaced trigger; create a regexp to match event type in handle()
- namespaces = type.split(".");
- type = namespaces.shift();
- namespaces.sort();
- }
- ontype = type.indexOf(":") < 0 && "on" + type;
-
- // Caller can pass in a jQuery.Event object, Object, or just an event type string
- event = event[ jQuery.expando ] ?
- event :
- new jQuery.Event( type, typeof event === "object" && event );
-
- event.isTrigger = true;
- event.namespace = namespaces.join(".");
- event.namespace_re = event.namespace ?
- new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
- null;
-
- // Clean up the event in case it is being reused
- event.result = undefined;
- if ( !event.target ) {
- event.target = elem;
- }
-
- // Clone any incoming data and prepend the event, creating the handler arg list
- data = data == null ?
- [ event ] :
- jQuery.makeArray( data, [ event ] );
-
- // Allow special events to draw outside the lines
- special = jQuery.event.special[ type ] || {};
- if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
- return;
- }
-
- // Determine event propagation path in advance, per W3C events spec (#9951)
- // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
- if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
-
- bubbleType = special.delegateType || type;
- if ( !rfocusMorph.test( bubbleType + type ) ) {
- cur = cur.parentNode;
- }
- for ( ; cur; cur = cur.parentNode ) {
- eventPath.push( cur );
- tmp = cur;
- }
-
- // Only add window if we got to document (e.g., not plain obj or detached DOM)
- if ( tmp === (elem.ownerDocument || document) ) {
- eventPath.push( tmp.defaultView || tmp.parentWindow || window );
- }
- }
-
- // Fire handlers on the event path
- i = 0;
- while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
-
- event.type = i > 1 ?
- bubbleType :
- special.bindType || type;
-
- // jQuery handler
- handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
- if ( handle ) {
- handle.apply( cur, data );
- }
-
- // Native handler
- handle = ontype && cur[ ontype ];
- if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
- event.preventDefault();
- }
- }
- event.type = type;
-
- // If nobody prevented the default action, do it now
- if ( !onlyHandlers && !event.isDefaultPrevented() ) {
-
- if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
- !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
-
- // Call a native DOM method on the target with the same name name as the event.
- // Can't use an .isFunction() check here because IE6/7 fails that test.
- // Don't do default actions on window, that's where global variables be (#6170)
- if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {
-
- // Don't re-trigger an onFOO event when we call its FOO() method
- tmp = elem[ ontype ];
-
- if ( tmp ) {
- elem[ ontype ] = null;
- }
-
- // Prevent re-triggering of the same event, since we already bubbled it above
- jQuery.event.triggered = type;
- try {
- elem[ type ]();
- } catch ( e ) {
- // IE<9 dies on focus/blur to hidden element (#1486,#12518)
- // only reproducible on winXP IE8 native, not IE9 in IE8 mode
- }
- jQuery.event.triggered = undefined;
-
- if ( tmp ) {
- elem[ ontype ] = tmp;
- }
- }
- }
- }
-
- return event.result;
- },
-
- dispatch: function( event ) {
-
- // Make a writable jQuery.Event from the native event object
- event = jQuery.event.fix( event );
-
- var i, j, ret, matched, handleObj,
- handlerQueue = [],
- args = core_slice.call( arguments ),
- handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],
- special = jQuery.event.special[ event.type ] || {};
-
- // Use the fix-ed jQuery.Event rather than the (read-only) native event
- args[0] = event;
- event.delegateTarget = this;
-
- // Call the preDispatch hook for the mapped type, and let it bail if desired
- if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
- return;
- }
-
- // Determine handlers
- handlerQueue = jQuery.event.handlers.call( this, event, handlers );
-
- // Run delegates first; they may want to stop propagation beneath us
- i = 0;
- while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
- event.currentTarget = matched.elem;
-
- j = 0;
- while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
-
- // Triggered event must either 1) have no namespace, or
- // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
- if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
-
- event.handleObj = handleObj;
- event.data = handleObj.data;
-
- ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
- .apply( matched.elem, args );
-
- if ( ret !== undefined ) {
- if ( (event.result = ret) === false ) {
- event.preventDefault();
- event.stopPropagation();
- }
- }
- }
- }
- }
-
- // Call the postDispatch hook for the mapped type
- if ( special.postDispatch ) {
- special.postDispatch.call( this, event );
- }
-
- return event.result;
- },
-
- handlers: function( event, handlers ) {
- var i, matches, sel, handleObj,
- handlerQueue = [],
- delegateCount = handlers.delegateCount,
- cur = event.target;
-
- // Find delegate handlers
- // Black-hole SVG <use> instance trees (#13180)
- // Avoid non-left-click bubbling in Firefox (#3861)
- if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
-
- for ( ; cur != this; cur = cur.parentNode || this ) {
-
- // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
- if ( cur.disabled !== true || event.type !== "click" ) {
- matches = [];
- for ( i = 0; i < delegateCount; i++ ) {
- handleObj = handlers[ i ];
-
- // Don't conflict with Object.prototype properties (#13203)
- sel = handleObj.selector + " ";
-
- if ( matches[ sel ] === undefined ) {
- matches[ sel ] = handleObj.needsContext ?
- jQuery( sel, this ).index( cur ) >= 0 :
- jQuery.find( sel, this, null, [ cur ] ).length;
- }
- if ( matches[ sel ] ) {
- matches.push( handleObj );
- }
- }
- if ( matches.length ) {
- handlerQueue.push({ elem: cur, handlers: matches });
- }
- }
- }
- }
-
- // Add the remaining (directly-bound) handlers
- if ( delegateCount < handlers.length ) {
- handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
- }
-
- return handlerQueue;
- },
-
- fix: function( event ) {
- if ( event[ jQuery.expando ] ) {
- return event;
- }
-
- // Create a writable copy of the event object and normalize some properties
- var i, prop,
- originalEvent = event,
- fixHook = jQuery.event.fixHooks[ event.type ] || {},
- copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
-
- event = new jQuery.Event( originalEvent );
-
- i = copy.length;
- while ( i-- ) {
- prop = copy[ i ];
- event[ prop ] = originalEvent[ prop ];
- }
-
- // Support: IE<9
- // Fix target property (#1925)
- if ( !event.target ) {
- event.target = originalEvent.srcElement || document;
- }
-
- // Support: Chrome 23+, Safari?
- // Target should not be a text node (#504, #13143)
- if ( event.target.nodeType === 3 ) {
- event.target = event.target.parentNode;
- }
-
- // Support: IE<9
- // For mouse/key events, metaKey==false if it's undefined (#3368, #11328)
- event.metaKey = !!event.metaKey;
-
- return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
- },
-
- // Includes some event props shared by KeyEvent and MouseEvent
- props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
-
- fixHooks: {},
-
- keyHooks: {
- props: "char charCode key keyCode".split(" "),
- filter: function( event, original ) {
-
- // Add which for key events
- if ( event.which == null ) {
- event.which = original.charCode != null ? original.charCode : original.keyCode;
- }
-
- return event;
- }
- },
-
- mouseHooks: {
- props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
- filter: function( event, original ) {
- var eventDoc, doc, body,
- button = original.button,
- fromElement = original.fromElement;
-
- // Calculate pageX/Y if missing and clientX/Y available
- if ( event.pageX == null && original.clientX != null ) {
- eventDoc = event.target.ownerDocument || document;
- doc = eventDoc.documentElement;
- body = eventDoc.body;
-
- event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
- event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
- }
-
- // Add relatedTarget, if necessary
- if ( !event.relatedTarget && fromElement ) {
- event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
- }
-
- // Add which for click: 1 === left; 2 === middle; 3 === right
- // Note: button is not normalized, so don't use it
- if ( !event.which && button !== undefined ) {
- event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
- }
-
- return event;
- }
- },
-
- special: {
- load: {
- // Prevent triggered image.load events from bubbling to window.load
- noBubble: true
- },
- click: {
- // For checkbox, fire native event so checked state will be right
- trigger: function() {
- if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {
- this.click();
- return false;
- }
- }
- },
- focus: {
- // Fire native event if possible so blur/focus sequence is correct
- trigger: function() {
- if ( this !== document.activeElement && this.focus ) {
- try {
- this.focus();
- return false;
- } catch ( e ) {
- // Support: IE<9
- // If we error on focus to hidden element (#1486, #12518),
- // let .trigger() run the handlers
- }
- }
- },
- delegateType: "focusin"
- },
- blur: {
- trigger: function() {
- if ( this === document.activeElement && this.blur ) {
- this.blur();
- return false;
- }
- },
- delegateType: "focusout"
- },
-
- beforeunload: {
- postDispatch: function( event ) {
-
- // Even when returnValue equals to undefined Firefox will still show alert
- if ( event.result !== undefined ) {
- event.originalEvent.returnValue = event.result;
- }
- }
- }
- },
-
- simulate: function( type, elem, event, bubble ) {
- // Piggyback on a donor event to simulate a different one.
- // Fake originalEvent to avoid donor's stopPropagation, but if the
- // simulated event prevents default then we do the same on the donor.
- var e = jQuery.extend(
- new jQuery.Event(),
- event,
- { type: type,
- isSimulated: true,
- originalEvent: {}
- }
- );
- if ( bubble ) {
- jQuery.event.trigger( e, null, elem );
- } else {
- jQuery.event.dispatch.call( elem, e );
- }
- if ( e.isDefaultPrevented() ) {
- event.preventDefault();
- }
- }
-};
-
-jQuery.removeEvent = document.removeEventListener ?
- function( elem, type, handle ) {
- if ( elem.removeEventListener ) {
- elem.removeEventListener( type, handle, false );
- }
- } :
- function( elem, type, handle ) {
- var name = "on" + type;
-
- if ( elem.detachEvent ) {
-
- // #8545, #7054, preventing memory leaks for custom events in IE6-8
- // detachEvent needed property on element, by name of that event, to properly expose it to GC
- if ( typeof elem[ name ] === "undefined" ) {
- elem[ name ] = null;
- }
-
- elem.detachEvent( name, handle );
- }
- };
-
-jQuery.Event = function( src, props ) {
- // Allow instantiation without the 'new' keyword
- if ( !(this instanceof jQuery.Event) ) {
- return new jQuery.Event( src, props );
- }
-
- // Event object
- if ( src && src.type ) {
- this.originalEvent = src;
- this.type = src.type;
-
- // Events bubbling up the document may have been marked as prevented
- // by a handler lower down the tree; reflect the correct value.
- this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
- src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
-
- // Event type
- } else {
- this.type = src;
- }
-
- // Put explicitly provided properties onto the event object
- if ( props ) {
- jQuery.extend( this, props );
- }
-
- // Create a timestamp if incoming event doesn't have one
- this.timeStamp = src && src.timeStamp || jQuery.now();
-
- // Mark it as fixed
- this[ jQuery.expando ] = true;
-};
-
-// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
-// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
-jQuery.Event.prototype = {
- isDefaultPrevented: returnFalse,
- isPropagationStopped: returnFalse,
- isImmediatePropagationStopped: returnFalse,
-
- preventDefault: function() {
- var e = this.originalEvent;
-
- this.isDefaultPrevented = returnTrue;
- if ( !e ) {
- return;
- }
-
- // If preventDefault exists, run it on the original event
- if ( e.preventDefault ) {
- e.preventDefault();
-
- // Support: IE
- // Otherwise set the returnValue property of the original event to false
- } else {
- e.returnValue = false;
- }
- },
- stopPropagation: function() {
- var e = this.originalEvent;
-
- this.isPropagationStopped = returnTrue;
- if ( !e ) {
- return;
- }
- // If stopPropagation exists, run it on the original event
- if ( e.stopPropagation ) {
- e.stopPropagation();
- }
-
- // Support: IE
- // Set the cancelBubble property of the original event to true
- e.cancelBubble = true;
- },
- stopImmediatePropagation: function() {
- this.isImmediatePropagationStopped = returnTrue;
- this.stopPropagation();
- }
-};
-
-// Create mouseenter/leave events using mouseover/out and event-time checks
-jQuery.each({
- mouseenter: "mouseover",
- mouseleave: "mouseout"
-}, function( orig, fix ) {
- jQuery.event.special[ orig ] = {
- delegateType: fix,
- bindType: fix,
-
- handle: function( event ) {
- var ret,
- target = this,
- related = event.relatedTarget,
- handleObj = event.handleObj;
-
- // For mousenter/leave call the handler if related is outside the target.
- // NB: No relatedTarget if the mouse left/entered the browser window
- if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
- event.type = handleObj.origType;
- ret = handleObj.handler.apply( this, arguments );
- event.type = fix;
- }
- return ret;
- }
- };
-});
-
-// IE submit delegation
-if ( !jQuery.support.submitBubbles ) {
-
- jQuery.event.special.submit = {
- setup: function() {
- // Only need this for delegated form submit events
- if ( jQuery.nodeName( this, "form" ) ) {
- return false;
- }
-
- // Lazy-add a submit handler when a descendant form may potentially be submitted
- jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
- // Node name check avoids a VML-related crash in IE (#9807)
- var elem = e.target,
- form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
- if ( form && !jQuery._data( form, "submitBubbles" ) ) {
- jQuery.event.add( form, "submit._submit", function( event ) {
- event._submit_bubble = true;
- });
- jQuery._data( form, "submitBubbles", true );
- }
- });
- // return undefined since we don't need an event listener
- },
-
- postDispatch: function( event ) {
- // If form was submitted by the user, bubble the event up the tree
- if ( event._submit_bubble ) {
- delete event._submit_bubble;
- if ( this.parentNode && !event.isTrigger ) {
- jQuery.event.simulate( "submit", this.parentNode, event, true );
- }
- }
- },
-
- teardown: function() {
- // Only need this for delegated form submit events
- if ( jQuery.nodeName( this, "form" ) ) {
- return false;
- }
-
- // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
- jQuery.event.remove( this, "._submit" );
- }
- };
-}
-
-// IE change delegation and checkbox/radio fix
-if ( !jQuery.support.changeBubbles ) {
-
- jQuery.event.special.change = {
-
- setup: function() {
-
- if ( rformElems.test( this.nodeName ) ) {
- // IE doesn't fire change on a check/radio until blur; trigger it on click
- // after a propertychange. Eat the blur-change in special.change.handle.
- // This still fires onchange a second time for check/radio after blur.
- if ( this.type === "checkbox" || this.type === "radio" ) {
- jQuery.event.add( this, "propertychange._change", function( event ) {
- if ( event.originalEvent.propertyName === "checked" ) {
- this._just_changed = true;
- }
- });
- jQuery.event.add( this, "click._change", function( event ) {
- if ( this._just_changed && !event.isTrigger ) {
- this._just_changed = false;
- }
- // Allow triggered, simulated change events (#11500)
- jQuery.event.simulate( "change", this, event, true );
- });
- }
- return false;
- }
- // Delegated event; lazy-add a change handler on descendant inputs
- jQuery.event.add( this, "beforeactivate._change", function( e ) {
- var elem = e.target;
-
- if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) {
- jQuery.event.add( elem, "change._change", function( event ) {
- if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
- jQuery.event.simulate( "change", this.parentNode, event, true );
- }
- });
- jQuery._data( elem, "changeBubbles", true );
- }
- });
- },
-
- handle: function( event ) {
- var elem = event.target;
-
- // Swallow native change events from checkbox/radio, we already triggered them above
- if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
- return event.handleObj.handler.apply( this, arguments );
- }
- },
-
- teardown: function() {
- jQuery.event.remove( this, "._change" );
-
- return !rformElems.test( this.nodeName );
- }
- };
-}
-
-// Create "bubbling" focus and blur events
-if ( !jQuery.support.focusinBubbles ) {
- jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
-
- // Attach a single capturing handler while someone wants focusin/focusout
- var attaches = 0,
- handler = function( event ) {
- jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
- };
-
- jQuery.event.special[ fix ] = {
- setup: function() {
- if ( attaches++ === 0 ) {
- document.addEventListener( orig, handler, true );
- }
- },
- teardown: function() {
- if ( --attaches === 0 ) {
- document.removeEventListener( orig, handler, true );
- }
- }
- };
- });
-}
-
-jQuery.fn.extend({
-
- on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
- var origFn, type;
-
- // Types can be a map of types/handlers
- if ( typeof types === "object" ) {
- // ( types-Object, selector, data )
- if ( typeof selector !== "string" ) {
- // ( types-Object, data )
- data = data || selector;
- selector = undefined;
- }
- for ( type in types ) {
- this.on( type, selector, data, types[ type ], one );
- }
- return this;
- }
-
- if ( data == null && fn == null ) {
- // ( types, fn )
- fn = selector;
- data = selector = undefined;
- } else if ( fn == null ) {
- if ( typeof selector === "string" ) {
- // ( types, selector, fn )
- fn = data;
- data = undefined;
- } else {
- // ( types, data, fn )
- fn = data;
- data = selector;
- selector = undefined;
- }
- }
- if ( fn === false ) {
- fn = returnFalse;
- } else if ( !fn ) {
- return this;
- }
-
- if ( one === 1 ) {
- origFn = fn;
- fn = function( event ) {
- // Can use an empty set, since event contains the info
- jQuery().off( event );
- return origFn.apply( this, arguments );
- };
- // Use same guid so caller can remove using origFn
- fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
- }
- return this.each( function() {
- jQuery.event.add( this, types, fn, data, selector );
- });
- },
- one: function( types, selector, data, fn ) {
- return this.on( types, selector, data, fn, 1 );
- },
- off: function( types, selector, fn ) {
- var handleObj, type;
- if ( types && types.preventDefault && types.handleObj ) {
- // ( event ) dispatched jQuery.Event
- handleObj = types.handleObj;
- jQuery( types.delegateTarget ).off(
- handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
- handleObj.selector,
- handleObj.handler
- );
- return this;
- }
- if ( typeof types === "object" ) {
- // ( types-object [, selector] )
- for ( type in types ) {
- this.off( type, selector, types[ type ] );
- }
- return this;
- }
- if ( selector === false || typeof selector === "function" ) {
- // ( types [, fn] )
- fn = selector;
- selector = undefined;
- }
- if ( fn === false ) {
- fn = returnFalse;
- }
- return this.each(function() {
- jQuery.event.remove( this, types, fn, selector );
- });
- },
-
- bind: function( types, data, fn ) {
- return this.on( types, null, data, fn );
- },
- unbind: function( types, fn ) {
- return this.off( types, null, fn );
- },
-
- delegate: function( selector, types, data, fn ) {
- return this.on( types, selector, data, fn );
- },
- undelegate: function( selector, types, fn ) {
- // ( namespace ) or ( selector, types [, fn] )
- return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
- },
-
- trigger: function( type, data ) {
- return this.each(function() {
- jQuery.event.trigger( type, data, this );
- });
- },
- triggerHandler: function( type, data ) {
- var elem = this[0];
- if ( elem ) {
- return jQuery.event.trigger( type, data, elem, true );
- }
- },
-
- hover: function( fnOver, fnOut ) {
- return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
- }
-});
-
-jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
- "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
- "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
-
- // Handle event binding
- jQuery.fn[ name ] = function( data, fn ) {
- return arguments.length > 0 ?
- this.on( name, null, data, fn ) :
- this.trigger( name );
- };
-
- if ( rkeyEvent.test( name ) ) {
- jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks;
- }
-
- if ( rmouseEvent.test( name ) ) {
- jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;
- }
-});
-/*!
- * Sizzle CSS Selector Engine
- * Copyright 2012 jQuery Foundation and other contributors
- * Released under the MIT license
- * http://sizzlejs.com/
- */
-(function( window, undefined ) {
-
-var i,
- cachedruns,
- Expr,
- getText,
- isXML,
- compile,
- hasDuplicate,
- outermostContext,
-
- // Local document vars
- setDocument,
- document,
- docElem,
- documentIsXML,
- rbuggyQSA,
- rbuggyMatches,
- matches,
- contains,
- sortOrder,
-
- // Instance-specific data
- expando = "sizzle" + -(new Date()),
- preferredDoc = window.document,
- support = {},
- dirruns = 0,
- done = 0,
- classCache = createCache(),
- tokenCache = createCache(),
- compilerCache = createCache(),
-
- // General-purpose constants
- strundefined = typeof undefined,
- MAX_NEGATIVE = 1 << 31,
-
- // Array methods
- arr = [],
- pop = arr.pop,
- push = arr.push,
- slice = arr.slice,
- // Use a stripped-down indexOf if we can't use a native one
- indexOf = arr.indexOf || function( elem ) {
- var i = 0,
- len = this.length;
- for ( ; i < len; i++ ) {
- if ( this[i] === elem ) {
- return i;
- }
- }
- return -1;
- },
-
-
- // Regular expressions
-
- // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
- whitespace = "[\\x20\\t\\r\\n\\f]",
- // http://www.w3.org/TR/css3-syntax/#characters
- characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
-
- // Loosely modeled on CSS identifier characters
- // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
- // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
- identifier = characterEncoding.replace( "w", "w#" ),
-
- // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
- operators = "([*^$|!~]?=)",
- attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
- "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
-
- // Prefer arguments quoted,
- // then not containing pseudos/brackets,
- // then attribute selectors/non-parenthetical expressions,
- // then anything else
- // These preferences are here to reduce the number of selectors
- // needing tokenize in the PSEUDO preFilter
- pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)",
-
- // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
- rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
-
- rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
- rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ),
- rpseudo = new RegExp( pseudos ),
- ridentifier = new RegExp( "^" + identifier + "$" ),
-
- matchExpr = {
- "ID": new RegExp( "^#(" + characterEncoding + ")" ),
- "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
- "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ),
- "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
- "ATTR": new RegExp( "^" + attributes ),
- "PSEUDO": new RegExp( "^" + pseudos ),
- "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
- "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
- "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
- // For use in libraries implementing .is()
- // We use this for POS matching in `select`
- "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
- whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
- },
-
- rsibling = /[\x20\t\r\n\f]*[+~]/,
-
- rnative = /\{\s*\[native code\]\s*\}/,
-
- // Easily-parseable/retrievable ID or TAG or CLASS selectors
- rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
-
- rinputs = /^(?:input|select|textarea|button)$/i,
- rheader = /^h\d$/i,
-
- rescape = /'|\\/g,
- rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,
-
- // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
- runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,
- funescape = function( _, escaped ) {
- var high = "0x" + escaped - 0x10000;
- // NaN means non-codepoint
- return high !== high ?
- escaped :
- // BMP codepoint
- high < 0 ?
- String.fromCharCode( high + 0x10000 ) :
- // Supplemental Plane codepoint (surrogate pair)
- String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
- };
-
-// Use a stripped-down slice if we can't use a native one
-try {
- slice.call( docElem.childNodes, 0 )[0].nodeType;
-} catch ( e ) {
- slice = function( i ) {
- var elem,
- results = [];
- for ( ; (elem = this[i]); i++ ) {
- results.push( elem );
- }
- return results;
- };
-}
-
-/**
- * For feature detection
- * @param {Function} fn The function to test for native support
- */
-function isNative( fn ) {
- return rnative.test( fn + "" );
-}
-
-/**
- * Create key-value caches of limited size
- * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
- * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
- * deleting the oldest entry
- */
-function createCache() {
- var cache,
- keys = [];
-
- return (cache = function( key, value ) {
- // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
- if ( keys.push( key += " " ) > Expr.cacheLength ) {
- // Only keep the most recent entries
- delete cache[ keys.shift() ];
- }
- return (cache[ key ] = value);
- });
-}
-
-/**
- * Mark a function for special use by Sizzle
- * @param {Function} fn The function to mark
- */
-function markFunction( fn ) {
- fn[ expando ] = true;
- return fn;
-}
-
-/**
- * Support testing using an element
- * @param {Function} fn Passed the created div and expects a boolean result
- */
-function assert( fn ) {
- var div = document.createElement("div");
-
- try {
- return fn( div );
- } catch (e) {
- return false;
- } finally {
- // release memory in IE
- div = null;
- }
-}
-
-function Sizzle( selector, context, results, seed ) {
- var match, elem, m, nodeType,
- // QSA vars
- i, groups, old, nid, newContext, newSelector;
-
- if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
- setDocument( context );
- }
-
- context = context || document;
- results = results || [];
-
- if ( !selector || typeof selector !== "string" ) {
- return results;
- }
-
- if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
- return [];
- }
-
- if ( !documentIsXML && !seed ) {
-
- // Shortcuts
- if ( (match = rquickExpr.exec( selector )) ) {
- // Speed-up: Sizzle("#ID")
- if ( (m = match[1]) ) {
- if ( nodeType === 9 ) {
- elem = context.getElementById( m );
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- if ( elem && elem.parentNode ) {
- // Handle the case where IE, Opera, and Webkit return items
- // by name instead of ID
- if ( elem.id === m ) {
- results.push( elem );
- return results;
- }
- } else {
- return results;
- }
- } else {
- // Context is not a document
- if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
- contains( context, elem ) && elem.id === m ) {
- results.push( elem );
- return results;
- }
- }
-
- // Speed-up: Sizzle("TAG")
- } else if ( match[2] ) {
- push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) );
- return results;
-
- // Speed-up: Sizzle(".CLASS")
- } else if ( (m = match[3]) && support.getByClassName && context.getElementsByClassName ) {
- push.apply( results, slice.call(context.getElementsByClassName( m ), 0) );
- return results;
- }
- }
-
- // QSA path
- if ( support.qsa && !rbuggyQSA.test(selector) ) {
- old = true;
- nid = expando;
- newContext = context;
- newSelector = nodeType === 9 && selector;
-
- // qSA works strangely on Element-rooted queries
- // We can work around this by specifying an extra ID on the root
- // and working up from there (Thanks to Andrew Dupont for the technique)
- // IE 8 doesn't work on object elements
- if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
- groups = tokenize( selector );
-
- if ( (old = context.getAttribute("id")) ) {
- nid = old.replace( rescape, "\\$&" );
- } else {
- context.setAttribute( "id", nid );
- }
- nid = "[id='" + nid + "'] ";
-
- i = groups.length;
- while ( i-- ) {
- groups[i] = nid + toSelector( groups[i] );
- }
- newContext = rsibling.test( selector ) && context.parentNode || context;
- newSelector = groups.join(",");
- }
-
- if ( newSelector ) {
- try {
- push.apply( results, slice.call( newContext.querySelectorAll(
- newSelector
- ), 0 ) );
- return results;
- } catch(qsaError) {
- } finally {
- if ( !old ) {
- context.removeAttribute("id");
- }
- }
- }
- }
- }
-
- // All others
- return select( selector.replace( rtrim, "$1" ), context, results, seed );
-}
-
-/**
- * Detect xml
- * @param {Element|Object} elem An element or a document
- */
-isXML = Sizzle.isXML = function( elem ) {
- // documentElement is verified for cases where it doesn't yet exist
- // (such as loading iframes in IE - #4833)
- var documentElement = elem && (elem.ownerDocument || elem).documentElement;
- return documentElement ? documentElement.nodeName !== "HTML" : false;
-};
-
-/**
- * Sets document-related variables once based on the current document
- * @param {Element|Object} [doc] An element or document object to use to set the document
- * @returns {Object} Returns the current document
- */
-setDocument = Sizzle.setDocument = function( node ) {
- var doc = node ? node.ownerDocument || node : preferredDoc;
-
- // If no document and documentElement is available, return
- if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
- return document;
- }
-
- // Set our document
- document = doc;
- docElem = doc.documentElement;
-
- // Support tests
- documentIsXML = isXML( doc );
-
- // Check if getElementsByTagName("*") returns only elements
- support.tagNameNoComments = assert(function( div ) {
- div.appendChild( doc.createComment("") );
- return !div.getElementsByTagName("*").length;
- });
-
- // Check if attributes should be retrieved by attribute nodes
- support.attributes = assert(function( div ) {
- div.innerHTML = "<select></select>";
- var type = typeof div.lastChild.getAttribute("multiple");
- // IE8 returns a string for some attributes even when not present
- return type !== "boolean" && type !== "string";
- });
-
- // Check if getElementsByClassName can be trusted
- support.getByClassName = assert(function( div ) {
- // Opera can't find a second classname (in 9.6)
- div.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>";
- if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) {
- return false;
- }
-
- // Safari 3.2 caches class attributes and doesn't catch changes
- div.lastChild.className = "e";
- return div.getElementsByClassName("e").length === 2;
- });
-
- // Check if getElementById returns elements by name
- // Check if getElementsByName privileges form controls or returns elements by ID
- support.getByName = assert(function( div ) {
- // Inject content
- div.id = expando + 0;
- div.innerHTML = "<a name='" + expando + "'></a><div name='" + expando + "'></div>";
- docElem.insertBefore( div, docElem.firstChild );
-
- // Test
- var pass = doc.getElementsByName &&
- // buggy browsers will return fewer than the correct 2
- doc.getElementsByName( expando ).length === 2 +
- // buggy browsers will return more than the correct 0
- doc.getElementsByName( expando + 0 ).length;
- support.getIdNotName = !doc.getElementById( expando );
-
- // Cleanup
- docElem.removeChild( div );
-
- return pass;
- });
-
- // IE6/7 return modified attributes
- Expr.attrHandle = assert(function( div ) {
- div.innerHTML = "<a href='#'></a>";
- return div.firstChild && typeof div.firstChild.getAttribute !== strundefined &&
- div.firstChild.getAttribute("href") === "#";
- }) ?
- {} :
- {
- "href": function( elem ) {
- return elem.getAttribute( "href", 2 );
- },
- "type": function( elem ) {
- return elem.getAttribute("type");
- }
- };
-
- // ID find and filter
- if ( support.getIdNotName ) {
- Expr.find["ID"] = function( id, context ) {
- if ( typeof context.getElementById !== strundefined && !documentIsXML ) {
- var m = context.getElementById( id );
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- return m && m.parentNode ? [m] : [];
- }
- };
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- return elem.getAttribute("id") === attrId;
- };
- };
- } else {
- Expr.find["ID"] = function( id, context ) {
- if ( typeof context.getElementById !== strundefined && !documentIsXML ) {
- var m = context.getElementById( id );
-
- return m ?
- m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ?
- [m] :
- undefined :
- [];
- }
- };
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
- return node && node.value === attrId;
- };
- };
- }
-
- // Tag
- Expr.find["TAG"] = support.tagNameNoComments ?
- function( tag, context ) {
- if ( typeof context.getElementsByTagName !== strundefined ) {
- return context.getElementsByTagName( tag );
- }
- } :
- function( tag, context ) {
- var elem,
- tmp = [],
- i = 0,
- results = context.getElementsByTagName( tag );
-
- // Filter out possible comments
- if ( tag === "*" ) {
- for ( ; (elem = results[i]); i++ ) {
- if ( elem.nodeType === 1 ) {
- tmp.push( elem );
- }
- }
-
- return tmp;
- }
- return results;
- };
-
- // Name
- Expr.find["NAME"] = support.getByName && function( tag, context ) {
- if ( typeof context.getElementsByName !== strundefined ) {
- return context.getElementsByName( name );
- }
- };
-
- // Class
- Expr.find["CLASS"] = support.getByClassName && function( className, context ) {
- if ( typeof context.getElementsByClassName !== strundefined && !documentIsXML ) {
- return context.getElementsByClassName( className );
- }
- };
-
- // QSA and matchesSelector support
-
- // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
- rbuggyMatches = [];
-
- // qSa(:focus) reports false when true (Chrome 21),
- // no need to also add to buggyMatches since matches checks buggyQSA
- // A support test would require too much code (would include document ready)
- rbuggyQSA = [ ":focus" ];
-
- if ( (support.qsa = isNative(doc.querySelectorAll)) ) {
- // Build QSA regex
- // Regex strategy adopted from Diego Perini
- assert(function( div ) {
- // Select is set to empty string on purpose
- // This is to test IE's treatment of not explictly
- // setting a boolean content attribute,
- // since its presence should be enough
- // http://bugs.jquery.com/ticket/12359
- div.innerHTML = "<select><option selected=''></option></select>";
-
- // IE8 - Some boolean attributes are not treated correctly
- if ( !div.querySelectorAll("[selected]").length ) {
- rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" );
- }
-
- // Webkit/Opera - :checked should return selected option elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":checked").length ) {
- rbuggyQSA.push(":checked");
- }
- });
-
- assert(function( div ) {
-
- // Opera 10-12/IE8 - ^= $= *= and empty values
- // Should not select anything
- div.innerHTML = "<input type='hidden' i=''/>";
- if ( div.querySelectorAll("[i^='']").length ) {
- rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" );
- }
-
- // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":enabled").length ) {
- rbuggyQSA.push( ":enabled", ":disabled" );
- }
-
- // Opera 10-11 does not throw on post-comma invalid pseudos
- div.querySelectorAll("*,:x");
- rbuggyQSA.push(",.*:");
- });
- }
-
- if ( (support.matchesSelector = isNative( (matches = docElem.matchesSelector ||
- docElem.mozMatchesSelector ||
- docElem.webkitMatchesSelector ||
- docElem.oMatchesSelector ||
- docElem.msMatchesSelector) )) ) {
-
- assert(function( div ) {
- // Check to see if it's possible to do matchesSelector
- // on a disconnected node (IE 9)
- support.disconnectedMatch = matches.call( div, "div" );
-
- // This should fail with an exception
- // Gecko does not error, returns false instead
- matches.call( div, "[s!='']:x" );
- rbuggyMatches.push( "!=", pseudos );
- });
- }
-
- rbuggyQSA = new RegExp( rbuggyQSA.join("|") );
- rbuggyMatches = new RegExp( rbuggyMatches.join("|") );
-
- // Element contains another
- // Purposefully does not implement inclusive descendent
- // As in, an element does not contain itself
- contains = isNative(docElem.contains) || docElem.compareDocumentPosition ?
- function( a, b ) {
- var adown = a.nodeType === 9 ? a.documentElement : a,
- bup = b && b.parentNode;
- return a === bup || !!( bup && bup.nodeType === 1 && (
- adown.contains ?
- adown.contains( bup ) :
- a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
- ));
- } :
- function( a, b ) {
- if ( b ) {
- while ( (b = b.parentNode) ) {
- if ( b === a ) {
- return true;
- }
- }
- }
- return false;
- };
-
- // Document order sorting
- sortOrder = docElem.compareDocumentPosition ?
- function( a, b ) {
- var compare;
-
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
-
- if ( (compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b )) ) {
- if ( compare & 1 || a.parentNode && a.parentNode.nodeType === 11 ) {
- if ( a === doc || contains( preferredDoc, a ) ) {
- return -1;
- }
- if ( b === doc || contains( preferredDoc, b ) ) {
- return 1;
- }
- return 0;
- }
- return compare & 4 ? -1 : 1;
- }
-
- return a.compareDocumentPosition ? -1 : 1;
- } :
- function( a, b ) {
- var cur,
- i = 0,
- aup = a.parentNode,
- bup = b.parentNode,
- ap = [ a ],
- bp = [ b ];
-
- // The nodes are identical, we can exit early
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
-
- // Fallback to using sourceIndex (in IE) if it's available on both nodes
- } else if ( a.sourceIndex && b.sourceIndex ) {
- return ( ~b.sourceIndex || MAX_NEGATIVE ) - ( contains( preferredDoc, a ) && ~a.sourceIndex || MAX_NEGATIVE );
-
- // Parentless nodes are either documents or disconnected
- } else if ( !aup || !bup ) {
- return a === doc ? -1 :
- b === doc ? 1 :
- aup ? -1 :
- bup ? 1 :
- 0;
-
- // If the nodes are siblings, we can do a quick check
- } else if ( aup === bup ) {
- return siblingCheck( a, b );
- }
-
- // Otherwise we need full lists of their ancestors for comparison
- cur = a;
- while ( (cur = cur.parentNode) ) {
- ap.unshift( cur );
- }
- cur = b;
- while ( (cur = cur.parentNode) ) {
- bp.unshift( cur );
- }
-
- // Walk down the tree looking for a discrepancy
- while ( ap[i] === bp[i] ) {
- i++;
- }
-
- return i ?
- // Do a sibling check if the nodes have a common ancestor
- siblingCheck( ap[i], bp[i] ) :
-
- // Otherwise nodes in our document sort first
- ap[i] === preferredDoc ? -1 :
- bp[i] === preferredDoc ? 1 :
- 0;
- };
-
- // Always assume the presence of duplicates if sort doesn't
- // pass them to our comparison function (as in Google Chrome).
- hasDuplicate = false;
- [0, 0].sort( sortOrder );
- support.detectDuplicates = hasDuplicate;
-
- return document;
-};
-
-Sizzle.matches = function( expr, elements ) {
- return Sizzle( expr, null, null, elements );
-};
-
-Sizzle.matchesSelector = function( elem, expr ) {
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- // Make sure that attribute selectors are quoted
- expr = expr.replace( rattributeQuotes, "='$1']" );
-
- // rbuggyQSA always contains :focus, so no need for an existence check
- if ( support.matchesSelector && !documentIsXML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr) ) {
- try {
- var ret = matches.call( elem, expr );
-
- // IE 9's matchesSelector returns false on disconnected nodes
- if ( ret || support.disconnectedMatch ||
- // As well, disconnected nodes are said to be in a document
- // fragment in IE 9
- elem.document && elem.document.nodeType !== 11 ) {
- return ret;
- }
- } catch(e) {}
- }
-
- return Sizzle( expr, document, null, [elem] ).length > 0;
-};
-
-Sizzle.contains = function( context, elem ) {
- // Set document vars if needed
- if ( ( context.ownerDocument || context ) !== document ) {
- setDocument( context );
- }
- return contains( context, elem );
-};
-
-Sizzle.attr = function( elem, name ) {
- var val;
-
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- if ( !documentIsXML ) {
- name = name.toLowerCase();
- }
- if ( (val = Expr.attrHandle[ name ]) ) {
- return val( elem );
- }
- if ( documentIsXML || support.attributes ) {
- return elem.getAttribute( name );
- }
- return ( (val = elem.getAttributeNode( name )) || elem.getAttribute( name ) ) && elem[ name ] === true ?
- name :
- val && val.specified ? val.value : null;
-};
-
-Sizzle.error = function( msg ) {
- throw new Error( "Syntax error, unrecognized expression: " + msg );
-};
-
-// Document sorting and removing duplicates
-Sizzle.uniqueSort = function( results ) {
- var elem,
- duplicates = [],
- i = 1,
- j = 0;
-
- // Unless we *know* we can detect duplicates, assume their presence
- hasDuplicate = !support.detectDuplicates;
- results.sort( sortOrder );
-
- if ( hasDuplicate ) {
- for ( ; (elem = results[i]); i++ ) {
- if ( elem === results[ i - 1 ] ) {
- j = duplicates.push( i );
- }
- }
- while ( j-- ) {
- results.splice( duplicates[ j ], 1 );
- }
- }
-
- return results;
-};
-
-function siblingCheck( a, b ) {
- var cur = a && b && a.nextSibling;
-
- for ( ; cur; cur = cur.nextSibling ) {
- if ( cur === b ) {
- return -1;
- }
- }
-
- return a ? 1 : -1;
-}
-
-// Returns a function to use in pseudos for input types
-function createInputPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === type;
- };
-}
-
-// Returns a function to use in pseudos for buttons
-function createButtonPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return (name === "input" || name === "button") && elem.type === type;
- };
-}
-
-// Returns a function to use in pseudos for positionals
-function createPositionalPseudo( fn ) {
- return markFunction(function( argument ) {
- argument = +argument;
- return markFunction(function( seed, matches ) {
- var j,
- matchIndexes = fn( [], seed.length, argument ),
- i = matchIndexes.length;
-
- // Match elements found at the specified indexes
- while ( i-- ) {
- if ( seed[ (j = matchIndexes[i]) ] ) {
- seed[j] = !(matches[j] = seed[j]);
- }
- }
- });
- });
-}
-
-/**
- * Utility function for retrieving the text value of an array of DOM nodes
- * @param {Array|Element} elem
- */
-getText = Sizzle.getText = function( elem ) {
- var node,
- ret = "",
- i = 0,
- nodeType = elem.nodeType;
-
- if ( !nodeType ) {
- // If no nodeType, this is expected to be an array
- for ( ; (node = elem[i]); i++ ) {
- // Do not traverse comment nodes
- ret += getText( node );
- }
- } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
- // Use textContent for elements
- // innerText usage removed for consistency of new lines (see #11153)
- if ( typeof elem.textContent === "string" ) {
- return elem.textContent;
- } else {
- // Traverse its children
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- ret += getText( elem );
- }
- }
- } else if ( nodeType === 3 || nodeType === 4 ) {
- return elem.nodeValue;
- }
- // Do not include comment or processing instruction nodes
-
- return ret;
-};
-
-Expr = Sizzle.selectors = {
-
- // Can be adjusted by the user
- cacheLength: 50,
-
- createPseudo: markFunction,
-
- match: matchExpr,
-
- find: {},
-
- relative: {
- ">": { dir: "parentNode", first: true },
- " ": { dir: "parentNode" },
- "+": { dir: "previousSibling", first: true },
- "~": { dir: "previousSibling" }
- },
-
- preFilter: {
- "ATTR": function( match ) {
- match[1] = match[1].replace( runescape, funescape );
-
- // Move the given value to match[3] whether quoted or unquoted
- match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );
-
- if ( match[2] === "~=" ) {
- match[3] = " " + match[3] + " ";
- }
-
- return match.slice( 0, 4 );
- },
-
- "CHILD": function( match ) {
- /* matches from matchExpr["CHILD"]
- 1 type (only|nth|...)
- 2 what (child|of-type)
- 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
- 4 xn-component of xn+y argument ([+-]?\d*n|)
- 5 sign of xn-component
- 6 x of xn-component
- 7 sign of y-component
- 8 y of y-component
- */
- match[1] = match[1].toLowerCase();
-
- if ( match[1].slice( 0, 3 ) === "nth" ) {
- // nth-* requires argument
- if ( !match[3] ) {
- Sizzle.error( match[0] );
- }
-
- // numeric x and y parameters for Expr.filter.CHILD
- // remember that false/true cast respectively to 0/1
- match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
- match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
-
- // other types prohibit arguments
- } else if ( match[3] ) {
- Sizzle.error( match[0] );
- }
-
- return match;
- },
-
- "PSEUDO": function( match ) {
- var excess,
- unquoted = !match[5] && match[2];
-
- if ( matchExpr["CHILD"].test( match[0] ) ) {
- return null;
- }
-
- // Accept quoted arguments as-is
- if ( match[4] ) {
- match[2] = match[4];
-
- // Strip excess characters from unquoted arguments
- } else if ( unquoted && rpseudo.test( unquoted ) &&
- // Get excess from tokenize (recursively)
- (excess = tokenize( unquoted, true )) &&
- // advance to the next closing parenthesis
- (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
-
- // excess is a negative index
- match[0] = match[0].slice( 0, excess );
- match[2] = unquoted.slice( 0, excess );
- }
-
- // Return only captures needed by the pseudo filter method (type and argument)
- return match.slice( 0, 3 );
- }
- },
-
- filter: {
-
- "TAG": function( nodeName ) {
- if ( nodeName === "*" ) {
- return function() { return true; };
- }
-
- nodeName = nodeName.replace( runescape, funescape ).toLowerCase();
- return function( elem ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
- };
- },
-
- "CLASS": function( className ) {
- var pattern = classCache[ className + " " ];
-
- return pattern ||
- (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
- classCache( className, function( elem ) {
- return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" );
- });
- },
-
- "ATTR": function( name, operator, check ) {
- return function( elem ) {
- var result = Sizzle.attr( elem, name );
-
- if ( result == null ) {
- return operator === "!=";
- }
- if ( !operator ) {
- return true;
- }
-
- result += "";
-
- return operator === "=" ? result === check :
- operator === "!=" ? result !== check :
- operator === "^=" ? check && result.indexOf( check ) === 0 :
- operator === "*=" ? check && result.indexOf( check ) > -1 :
- operator === "$=" ? check && result.substr( result.length - check.length ) === check :
- operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
- operator === "|=" ? result === check || result.substr( 0, check.length + 1 ) === check + "-" :
- false;
- };
- },
-
- "CHILD": function( type, what, argument, first, last ) {
- var simple = type.slice( 0, 3 ) !== "nth",
- forward = type.slice( -4 ) !== "last",
- ofType = what === "of-type";
-
- return first === 1 && last === 0 ?
-
- // Shortcut for :nth-*(n)
- function( elem ) {
- return !!elem.parentNode;
- } :
-
- function( elem, context, xml ) {
- var cache, outerCache, node, diff, nodeIndex, start,
- dir = simple !== forward ? "nextSibling" : "previousSibling",
- parent = elem.parentNode,
- name = ofType && elem.nodeName.toLowerCase(),
- useCache = !xml && !ofType;
-
- if ( parent ) {
-
- // :(first|last|only)-(child|of-type)
- if ( simple ) {
- while ( dir ) {
- node = elem;
- while ( (node = node[ dir ]) ) {
- if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
- return false;
- }
- }
- // Reverse direction for :only-* (if we haven't yet done so)
- start = dir = type === "only" && !start && "nextSibling";
- }
- return true;
- }
-
- start = [ forward ? parent.firstChild : parent.lastChild ];
-
- // non-xml :nth-child(...) stores cache data on `parent`
- if ( forward && useCache ) {
- // Seek `elem` from a previously-cached index
- outerCache = parent[ expando ] || (parent[ expando ] = {});
- cache = outerCache[ type ] || [];
- nodeIndex = cache[0] === dirruns && cache[1];
- diff = cache[0] === dirruns && cache[2];
- node = nodeIndex && parent.childNodes[ nodeIndex ];
-
- while ( (node = ++nodeIndex && node && node[ dir ] ||
-
- // Fallback to seeking `elem` from the start
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- // When found, cache indexes on `parent` and break
- if ( node.nodeType === 1 && ++diff && node === elem ) {
- outerCache[ type ] = [ dirruns, nodeIndex, diff ];
- break;
- }
- }
-
- // Use previously-cached element index if available
- } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
- diff = cache[1];
-
- // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
- } else {
- // Use the same loop as above to seek `elem` from the start
- while ( (node = ++nodeIndex && node && node[ dir ] ||
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
- // Cache the index of each encountered element
- if ( useCache ) {
- (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
- }
-
- if ( node === elem ) {
- break;
- }
- }
- }
- }
-
- // Incorporate the offset, then check against cycle size
- diff -= last;
- return diff === first || ( diff % first === 0 && diff / first >= 0 );
- }
- };
- },
-
- "PSEUDO": function( pseudo, argument ) {
- // pseudo-class names are case-insensitive
- // http://www.w3.org/TR/selectors/#pseudo-classes
- // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
- // Remember that setFilters inherits from pseudos
- var args,
- fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
- Sizzle.error( "unsupported pseudo: " + pseudo );
-
- // The user may use createPseudo to indicate that
- // arguments are needed to create the filter function
- // just as Sizzle does
- if ( fn[ expando ] ) {
- return fn( argument );
- }
-
- // But maintain support for old signatures
- if ( fn.length > 1 ) {
- args = [ pseudo, pseudo, "", argument ];
- return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
- markFunction(function( seed, matches ) {
- var idx,
- matched = fn( seed, argument ),
- i = matched.length;
- while ( i-- ) {
- idx = indexOf.call( seed, matched[i] );
- seed[ idx ] = !( matches[ idx ] = matched[i] );
- }
- }) :
- function( elem ) {
- return fn( elem, 0, args );
- };
- }
-
- return fn;
- }
- },
-
- pseudos: {
- // Potentially complex pseudos
- "not": markFunction(function( selector ) {
- // Trim the selector passed to compile
- // to avoid treating leading and trailing
- // spaces as combinators
- var input = [],
- results = [],
- matcher = compile( selector.replace( rtrim, "$1" ) );
-
- return matcher[ expando ] ?
- markFunction(function( seed, matches, context, xml ) {
- var elem,
- unmatched = matcher( seed, null, xml, [] ),
- i = seed.length;
-
- // Match elements unmatched by `matcher`
- while ( i-- ) {
- if ( (elem = unmatched[i]) ) {
- seed[i] = !(matches[i] = elem);
- }
- }
- }) :
- function( elem, context, xml ) {
- input[0] = elem;
- matcher( input, null, xml, results );
- return !results.pop();
- };
- }),
-
- "has": markFunction(function( selector ) {
- return function( elem ) {
- return Sizzle( selector, elem ).length > 0;
- };
- }),
-
- "contains": markFunction(function( text ) {
- return function( elem ) {
- return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
- };
- }),
-
- // "Whether an element is represented by a :lang() selector
- // is based solely on the element's language value
- // being equal to the identifier C,
- // or beginning with the identifier C immediately followed by "-".
- // The matching of C against the element's language value is performed case-insensitively.
- // The identifier C does not have to be a valid language name."
- // http://www.w3.org/TR/selectors/#lang-pseudo
- "lang": markFunction( function( lang ) {
- // lang value must be a valid identifider
- if ( !ridentifier.test(lang || "") ) {
- Sizzle.error( "unsupported lang: " + lang );
- }
- lang = lang.replace( runescape, funescape ).toLowerCase();
- return function( elem ) {
- var elemLang;
- do {
- if ( (elemLang = documentIsXML ?
- elem.getAttribute("xml:lang") || elem.getAttribute("lang") :
- elem.lang) ) {
-
- elemLang = elemLang.toLowerCase();
- return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
- }
- } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
- return false;
- };
- }),
-
- // Miscellaneous
- "target": function( elem ) {
- var hash = window.location && window.location.hash;
- return hash && hash.slice( 1 ) === elem.id;
- },
-
- "root": function( elem ) {
- return elem === docElem;
- },
-
- "focus": function( elem ) {
- return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
- },
-
- // Boolean properties
- "enabled": function( elem ) {
- return elem.disabled === false;
- },
-
- "disabled": function( elem ) {
- return elem.disabled === true;
- },
-
- "checked": function( elem ) {
- // In CSS3, :checked should return both checked and selected elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- var nodeName = elem.nodeName.toLowerCase();
- return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
- },
-
- "selected": function( elem ) {
- // Accessing this property makes selected-by-default
- // options in Safari work properly
- if ( elem.parentNode ) {
- elem.parentNode.selectedIndex;
- }
-
- return elem.selected === true;
- },
-
- // Contents
- "empty": function( elem ) {
- // http://www.w3.org/TR/selectors/#empty-pseudo
- // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
- // not comment, processing instructions, or others
- // Thanks to Diego Perini for the nodeName shortcut
- // Greater than "@" means alpha characters (specifically not starting with "#" or "?")
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) {
- return false;
- }
- }
- return true;
- },
-
- "parent": function( elem ) {
- return !Expr.pseudos["empty"]( elem );
- },
-
- // Element/input types
- "header": function( elem ) {
- return rheader.test( elem.nodeName );
- },
-
- "input": function( elem ) {
- return rinputs.test( elem.nodeName );
- },
-
- "button": function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === "button" || name === "button";
- },
-
- "text": function( elem ) {
- var attr;
- // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
- // use getAttribute instead to test this case
- return elem.nodeName.toLowerCase() === "input" &&
- elem.type === "text" &&
- ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type );
- },
-
- // Position-in-collection
- "first": createPositionalPseudo(function() {
- return [ 0 ];
- }),
-
- "last": createPositionalPseudo(function( matchIndexes, length ) {
- return [ length - 1 ];
- }),
-
- "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
- return [ argument < 0 ? argument + length : argument ];
- }),
-
- "even": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 0;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "odd": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 1;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; --i >= 0; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; ++i < length; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- })
- }
-};
-
-// Add button/input type pseudos
-for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
- Expr.pseudos[ i ] = createInputPseudo( i );
-}
-for ( i in { submit: true, reset: true } ) {
- Expr.pseudos[ i ] = createButtonPseudo( i );
-}
-
-function tokenize( selector, parseOnly ) {
- var matched, match, tokens, type,
- soFar, groups, preFilters,
- cached = tokenCache[ selector + " " ];
-
- if ( cached ) {
- return parseOnly ? 0 : cached.slice( 0 );
- }
-
- soFar = selector;
- groups = [];
- preFilters = Expr.preFilter;
-
- while ( soFar ) {
-
- // Comma and first run
- if ( !matched || (match = rcomma.exec( soFar )) ) {
- if ( match ) {
- // Don't consume trailing commas as valid
- soFar = soFar.slice( match[0].length ) || soFar;
- }
- groups.push( tokens = [] );
- }
-
- matched = false;
-
- // Combinators
- if ( (match = rcombinators.exec( soFar )) ) {
- matched = match.shift();
- tokens.push( {
- value: matched,
- // Cast descendant combinators to space
- type: match[0].replace( rtrim, " " )
- } );
- soFar = soFar.slice( matched.length );
- }
-
- // Filters
- for ( type in Expr.filter ) {
- if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
- (match = preFilters[ type ]( match ))) ) {
- matched = match.shift();
- tokens.push( {
- value: matched,
- type: type,
- matches: match
- } );
- soFar = soFar.slice( matched.length );
- }
- }
-
- if ( !matched ) {
- break;
- }
- }
-
- // Return the length of the invalid excess
- // if we're just parsing
- // Otherwise, throw an error or return tokens
- return parseOnly ?
- soFar.length :
- soFar ?
- Sizzle.error( selector ) :
- // Cache the tokens
- tokenCache( selector, groups ).slice( 0 );
-}
-
-function toSelector( tokens ) {
- var i = 0,
- len = tokens.length,
- selector = "";
- for ( ; i < len; i++ ) {
- selector += tokens[i].value;
- }
- return selector;
-}
-
-function addCombinator( matcher, combinator, base ) {
- var dir = combinator.dir,
- checkNonElements = base && combinator.dir === "parentNode",
- doneName = done++;
-
- return combinator.first ?
- // Check against closest ancestor/preceding element
- function( elem, context, xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- return matcher( elem, context, xml );
- }
- }
- } :
-
- // Check against all ancestor/preceding elements
- function( elem, context, xml ) {
- var data, cache, outerCache,
- dirkey = dirruns + " " + doneName;
-
- // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
- if ( xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- if ( matcher( elem, context, xml ) ) {
- return true;
- }
- }
- }
- } else {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- outerCache = elem[ expando ] || (elem[ expando ] = {});
- if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {
- if ( (data = cache[1]) === true || data === cachedruns ) {
- return data === true;
- }
- } else {
- cache = outerCache[ dir ] = [ dirkey ];
- cache[1] = matcher( elem, context, xml ) || cachedruns;
- if ( cache[1] === true ) {
- return true;
- }
- }
- }
- }
- }
- };
-}
-
-function elementMatcher( matchers ) {
- return matchers.length > 1 ?
- function( elem, context, xml ) {
- var i = matchers.length;
- while ( i-- ) {
- if ( !matchers[i]( elem, context, xml ) ) {
- return false;
- }
- }
- return true;
- } :
- matchers[0];
-}
-
-function condense( unmatched, map, filter, context, xml ) {
- var elem,
- newUnmatched = [],
- i = 0,
- len = unmatched.length,
- mapped = map != null;
-
- for ( ; i < len; i++ ) {
- if ( (elem = unmatched[i]) ) {
- if ( !filter || filter( elem, context, xml ) ) {
- newUnmatched.push( elem );
- if ( mapped ) {
- map.push( i );
- }
- }
- }
- }
-
- return newUnmatched;
-}
-
-function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
- if ( postFilter && !postFilter[ expando ] ) {
- postFilter = setMatcher( postFilter );
- }
- if ( postFinder && !postFinder[ expando ] ) {
- postFinder = setMatcher( postFinder, postSelector );
- }
- return markFunction(function( seed, results, context, xml ) {
- var temp, i, elem,
- preMap = [],
- postMap = [],
- preexisting = results.length,
-
- // Get initial elements from seed or context
- elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
-
- // Prefilter to get matcher input, preserving a map for seed-results synchronization
- matcherIn = preFilter && ( seed || !selector ) ?
- condense( elems, preMap, preFilter, context, xml ) :
- elems,
-
- matcherOut = matcher ?
- // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
- postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
-
- // ...intermediate processing is necessary
- [] :
-
- // ...otherwise use results directly
- results :
- matcherIn;
-
- // Find primary matches
- if ( matcher ) {
- matcher( matcherIn, matcherOut, context, xml );
- }
-
- // Apply postFilter
- if ( postFilter ) {
- temp = condense( matcherOut, postMap );
- postFilter( temp, [], context, xml );
-
- // Un-match failing elements by moving them back to matcherIn
- i = temp.length;
- while ( i-- ) {
- if ( (elem = temp[i]) ) {
- matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
- }
- }
- }
-
- if ( seed ) {
- if ( postFinder || preFilter ) {
- if ( postFinder ) {
- // Get the final matcherOut by condensing this intermediate into postFinder contexts
- temp = [];
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) ) {
- // Restore matcherIn since elem is not yet a final match
- temp.push( (matcherIn[i] = elem) );
- }
- }
- postFinder( null, (matcherOut = []), temp, xml );
- }
-
- // Move matched elements from seed to results to keep them synchronized
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) &&
- (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
-
- seed[temp] = !(results[temp] = elem);
- }
- }
- }
-
- // Add elements to results, through postFinder if defined
- } else {
- matcherOut = condense(
- matcherOut === results ?
- matcherOut.splice( preexisting, matcherOut.length ) :
- matcherOut
- );
- if ( postFinder ) {
- postFinder( null, results, matcherOut, xml );
- } else {
- push.apply( results, matcherOut );
- }
- }
- });
-}
-
-function matcherFromTokens( tokens ) {
- var checkContext, matcher, j,
- len = tokens.length,
- leadingRelative = Expr.relative[ tokens[0].type ],
- implicitRelative = leadingRelative || Expr.relative[" "],
- i = leadingRelative ? 1 : 0,
-
- // The foundational matcher ensures that elements are reachable from top-level context(s)
- matchContext = addCombinator( function( elem ) {
- return elem === checkContext;
- }, implicitRelative, true ),
- matchAnyContext = addCombinator( function( elem ) {
- return indexOf.call( checkContext, elem ) > -1;
- }, implicitRelative, true ),
- matchers = [ function( elem, context, xml ) {
- return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
- (checkContext = context).nodeType ?
- matchContext( elem, context, xml ) :
- matchAnyContext( elem, context, xml ) );
- } ];
-
- for ( ; i < len; i++ ) {
- if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
- matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
- } else {
- matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
-
- // Return special upon seeing a positional matcher
- if ( matcher[ expando ] ) {
- // Find the next relative operator (if any) for proper handling
- j = ++i;
- for ( ; j < len; j++ ) {
- if ( Expr.relative[ tokens[j].type ] ) {
- break;
- }
- }
- return setMatcher(
- i > 1 && elementMatcher( matchers ),
- i > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, "$1" ),
- matcher,
- i < j && matcherFromTokens( tokens.slice( i, j ) ),
- j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
- j < len && toSelector( tokens )
- );
- }
- matchers.push( matcher );
- }
- }
-
- return elementMatcher( matchers );
-}
-
-function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
- // A counter to specify which element is currently being matched
- var matcherCachedRuns = 0,
- bySet = setMatchers.length > 0,
- byElement = elementMatchers.length > 0,
- superMatcher = function( seed, context, xml, results, expandContext ) {
- var elem, j, matcher,
- setMatched = [],
- matchedCount = 0,
- i = "0",
- unmatched = seed && [],
- outermost = expandContext != null,
- contextBackup = outermostContext,
- // We must always have either seed elements or context
- elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
- // Nested matchers should use non-integer dirruns
- dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.E);
-
- if ( outermost ) {
- outermostContext = context !== document && context;
- cachedruns = matcherCachedRuns;
- }
-
- // Add elements passing elementMatchers directly to results
- for ( ; (elem = elems[i]) != null; i++ ) {
- if ( byElement && elem ) {
- for ( j = 0; (matcher = elementMatchers[j]); j++ ) {
- if ( matcher( elem, context, xml ) ) {
- results.push( elem );
- break;
- }
- }
- if ( outermost ) {
- dirruns = dirrunsUnique;
- cachedruns = ++matcherCachedRuns;
- }
- }
-
- // Track unmatched elements for set filters
- if ( bySet ) {
- // They will have gone through all possible matchers
- if ( (elem = !matcher && elem) ) {
- matchedCount--;
- }
-
- // Lengthen the array for every element, matched or not
- if ( seed ) {
- unmatched.push( elem );
- }
- }
- }
-
- // Apply set filters to unmatched elements
- // `i` starts as a string, so matchedCount would equal "00" if there are no elements
- matchedCount += i;
- if ( bySet && i !== matchedCount ) {
- for ( j = 0; (matcher = setMatchers[j]); j++ ) {
- matcher( unmatched, setMatched, context, xml );
- }
-
- if ( seed ) {
- // Reintegrate element matches to eliminate the need for sorting
- if ( matchedCount > 0 ) {
- while ( i-- ) {
- if ( !(unmatched[i] || setMatched[i]) ) {
- setMatched[i] = pop.call( results );
- }
- }
- }
-
- // Discard index placeholder values to get only actual matches
- setMatched = condense( setMatched );
- }
-
- // Add matches to results
- push.apply( results, setMatched );
-
- // Seedless set matches succeeding multiple successful matchers stipulate sorting
- if ( outermost && !seed && setMatched.length > 0 &&
- ( matchedCount + setMatchers.length ) > 1 ) {
-
- Sizzle.uniqueSort( results );
- }
- }
-
- // Override manipulation of globals by nested matchers
- if ( outermost ) {
- dirruns = dirrunsUnique;
- outermostContext = contextBackup;
- }
-
- return unmatched;
- };
-
- return bySet ?
- markFunction( superMatcher ) :
- superMatcher;
-}
-
-compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
- var i,
- setMatchers = [],
- elementMatchers = [],
- cached = compilerCache[ selector + " " ];
-
- if ( !cached ) {
- // Generate a function of recursive functions that can be used to check each element
- if ( !group ) {
- group = tokenize( selector );
- }
- i = group.length;
- while ( i-- ) {
- cached = matcherFromTokens( group[i] );
- if ( cached[ expando ] ) {
- setMatchers.push( cached );
- } else {
- elementMatchers.push( cached );
- }
- }
-
- // Cache the compiled function
- cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
- }
- return cached;
-};
-
-function multipleContexts( selector, contexts, results ) {
- var i = 0,
- len = contexts.length;
- for ( ; i < len; i++ ) {
- Sizzle( selector, contexts[i], results );
- }
- return results;
-}
-
-function select( selector, context, results, seed ) {
- var i, tokens, token, type, find,
- match = tokenize( selector );
-
- if ( !seed ) {
- // Try to minimize operations if there is only one group
- if ( match.length === 1 ) {
-
- // Take a shortcut and set the context if the root selector is an ID
- tokens = match[0] = match[0].slice( 0 );
- if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
- context.nodeType === 9 && !documentIsXML &&
- Expr.relative[ tokens[1].type ] ) {
-
- context = Expr.find["ID"]( token.matches[0].replace( runescape, funescape ), context )[0];
- if ( !context ) {
- return results;
- }
-
- selector = selector.slice( tokens.shift().value.length );
- }
-
- // Fetch a seed set for right-to-left matching
- for ( i = matchExpr["needsContext"].test( selector ) ? -1 : tokens.length - 1; i >= 0; i-- ) {
- token = tokens[i];
-
- // Abort if we hit a combinator
- if ( Expr.relative[ (type = token.type) ] ) {
- break;
- }
- if ( (find = Expr.find[ type ]) ) {
- // Search, expanding context for leading sibling combinators
- if ( (seed = find(
- token.matches[0].replace( runescape, funescape ),
- rsibling.test( tokens[0].type ) && context.parentNode || context
- )) ) {
-
- // If seed is empty or no tokens remain, we can return early
- tokens.splice( i, 1 );
- selector = seed.length && toSelector( tokens );
- if ( !selector ) {
- push.apply( results, slice.call( seed, 0 ) );
- return results;
- }
-
- break;
- }
- }
- }
- }
- }
-
- // Compile and execute a filtering function
- // Provide `match` to avoid retokenization if we modified the selector above
- compile( selector, match )(
- seed,
- context,
- documentIsXML,
- results,
- rsibling.test( selector )
- );
- return results;
-}
-
-// Deprecated
-Expr.pseudos["nth"] = Expr.pseudos["eq"];
-
-// Easy API for creating new setFilters
-function setFilters() {}
-Expr.filters = setFilters.prototype = Expr.pseudos;
-Expr.setFilters = new setFilters();
-
-// Initialize with the default document
-setDocument();
-
-// Override sizzle attribute retrieval
-Sizzle.attr = jQuery.attr;
-jQuery.find = Sizzle;
-jQuery.expr = Sizzle.selectors;
-jQuery.expr[":"] = jQuery.expr.pseudos;
-jQuery.unique = Sizzle.uniqueSort;
-jQuery.text = Sizzle.getText;
-jQuery.isXMLDoc = Sizzle.isXML;
-jQuery.contains = Sizzle.contains;
-
-
-})( window );
-var runtil = /Until$/,
- rparentsprev = /^(?:parents|prev(?:Until|All))/,
- isSimple = /^.[^:#\[\.,]*$/,
- rneedsContext = jQuery.expr.match.needsContext,
- // methods guaranteed to produce a unique set when starting from a unique set
- guaranteedUnique = {
- children: true,
- contents: true,
- next: true,
- prev: true
- };
-
-jQuery.fn.extend({
- find: function( selector ) {
- var i, ret, self;
-
- if ( typeof selector !== "string" ) {
- self = this;
- return this.pushStack( jQuery( selector ).filter(function() {
- for ( i = 0; i < self.length; i++ ) {
- if ( jQuery.contains( self[ i ], this ) ) {
- return true;
- }
- }
- }) );
- }
-
- ret = [];
- for ( i = 0; i < this.length; i++ ) {
- jQuery.find( selector, this[ i ], ret );
- }
-
- // Needed because $( selector, context ) becomes $( context ).find( selector )
- ret = this.pushStack( jQuery.unique( ret ) );
- ret.selector = ( this.selector ? this.selector + " " : "" ) + selector;
- return ret;
- },
-
- has: function( target ) {
- var i,
- targets = jQuery( target, this ),
- len = targets.length;
-
- return this.filter(function() {
- for ( i = 0; i < len; i++ ) {
- if ( jQuery.contains( this, targets[i] ) ) {
- return true;
- }
- }
- });
- },
-
- not: function( selector ) {
- return this.pushStack( winnow(this, selector, false) );
- },
-
- filter: function( selector ) {
- return this.pushStack( winnow(this, selector, true) );
- },
-
- is: function( selector ) {
- return !!selector && (
- typeof selector === "string" ?
- // If this is a positional/relative selector, check membership in the returned set
- // so $("p:first").is("p:last") won't return true for a doc with two "p".
- rneedsContext.test( selector ) ?
- jQuery( selector, this.context ).index( this[0] ) >= 0 :
- jQuery.filter( selector, this ).length > 0 :
- this.filter( selector ).length > 0 );
- },
-
- closest: function( selectors, context ) {
- var cur,
- i = 0,
- l = this.length,
- ret = [],
- pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
- jQuery( selectors, context || this.context ) :
- 0;
-
- for ( ; i < l; i++ ) {
- cur = this[i];
-
- while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) {
- if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
- ret.push( cur );
- break;
- }
- cur = cur.parentNode;
- }
- }
-
- return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret );
- },
-
- // Determine the position of an element within
- // the matched set of elements
- index: function( elem ) {
-
- // No argument, return index in parent
- if ( !elem ) {
- return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;
- }
-
- // index in selector
- if ( typeof elem === "string" ) {
- return jQuery.inArray( this[0], jQuery( elem ) );
- }
-
- // Locate the position of the desired element
- return jQuery.inArray(
- // If it receives a jQuery object, the first element is used
- elem.jquery ? elem[0] : elem, this );
- },
-
- add: function( selector, context ) {
- var set = typeof selector === "string" ?
- jQuery( selector, context ) :
- jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
- all = jQuery.merge( this.get(), set );
-
- return this.pushStack( jQuery.unique(all) );
- },
-
- addBack: function( selector ) {
- return this.add( selector == null ?
- this.prevObject : this.prevObject.filter(selector)
- );
- }
-});
-
-jQuery.fn.andSelf = jQuery.fn.addBack;
-
-function sibling( cur, dir ) {
- do {
- cur = cur[ dir ];
- } while ( cur && cur.nodeType !== 1 );
-
- return cur;
-}
-
-jQuery.each({
- parent: function( elem ) {
- var parent = elem.parentNode;
- return parent && parent.nodeType !== 11 ? parent : null;
- },
- parents: function( elem ) {
- return jQuery.dir( elem, "parentNode" );
- },
- parentsUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "parentNode", until );
- },
- next: function( elem ) {
- return sibling( elem, "nextSibling" );
- },
- prev: function( elem ) {
- return sibling( elem, "previousSibling" );
- },
- nextAll: function( elem ) {
- return jQuery.dir( elem, "nextSibling" );
- },
- prevAll: function( elem ) {
- return jQuery.dir( elem, "previousSibling" );
- },
- nextUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "nextSibling", until );
- },
- prevUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "previousSibling", until );
- },
- siblings: function( elem ) {
- return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
- },
- children: function( elem ) {
- return jQuery.sibling( elem.firstChild );
- },
- contents: function( elem ) {
- return jQuery.nodeName( elem, "iframe" ) ?
- elem.contentDocument || elem.contentWindow.document :
- jQuery.merge( [], elem.childNodes );
- }
-}, function( name, fn ) {
- jQuery.fn[ name ] = function( until, selector ) {
- var ret = jQuery.map( this, fn, until );
-
- if ( !runtil.test( name ) ) {
- selector = until;
- }
-
- if ( selector && typeof selector === "string" ) {
- ret = jQuery.filter( selector, ret );
- }
-
- ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
-
- if ( this.length > 1 && rparentsprev.test( name ) ) {
- ret = ret.reverse();
- }
-
- return this.pushStack( ret );
- };
-});
-
-jQuery.extend({
- filter: function( expr, elems, not ) {
- if ( not ) {
- expr = ":not(" + expr + ")";
- }
-
- return elems.length === 1 ?
- jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
- jQuery.find.matches(expr, elems);
- },
-
- dir: function( elem, dir, until ) {
- var matched = [],
- cur = elem[ dir ];
-
- while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
- if ( cur.nodeType === 1 ) {
- matched.push( cur );
- }
- cur = cur[dir];
- }
- return matched;
- },
-
- sibling: function( n, elem ) {
- var r = [];
-
- for ( ; n; n = n.nextSibling ) {
- if ( n.nodeType === 1 && n !== elem ) {
- r.push( n );
- }
- }
-
- return r;
- }
-});
-
-// Implement the identical functionality for filter and not
-function winnow( elements, qualifier, keep ) {
-
- // Can't pass null or undefined to indexOf in Firefox 4
- // Set to 0 to skip string check
- qualifier = qualifier || 0;
-
- if ( jQuery.isFunction( qualifier ) ) {
- return jQuery.grep(elements, function( elem, i ) {
- var retVal = !!qualifier.call( elem, i, elem );
- return retVal === keep;
- });
-
- } else if ( qualifier.nodeType ) {
- return jQuery.grep(elements, function( elem ) {
- return ( elem === qualifier ) === keep;
- });
-
- } else if ( typeof qualifier === "string" ) {
- var filtered = jQuery.grep(elements, function( elem ) {
- return elem.nodeType === 1;
- });
-
- if ( isSimple.test( qualifier ) ) {
- return jQuery.filter(qualifier, filtered, !keep);
- } else {
- qualifier = jQuery.filter( qualifier, filtered );
- }
- }
-
- return jQuery.grep(elements, function( elem ) {
- return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
- });
-}
-function createSafeFragment( document ) {
- var list = nodeNames.split( "|" ),
- safeFrag = document.createDocumentFragment();
-
- if ( safeFrag.createElement ) {
- while ( list.length ) {
- safeFrag.createElement(
- list.pop()
- );
- }
- }
- return safeFrag;
-}
-
-var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
- "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
- rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
- rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
- rleadingWhitespace = /^\s+/,
- rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
- rtagName = /<([\w:]+)/,
- rtbody = /<tbody/i,
- rhtml = /<|&#?\w+;/,
- rnoInnerhtml = /<(?:script|style|link)/i,
- manipulation_rcheckableType = /^(?:checkbox|radio)$/i,
- // checked="checked" or checked
- rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
- rscriptType = /^$|\/(?:java|ecma)script/i,
- rscriptTypeMasked = /^true\/(.*)/,
- rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
-
- // We have to close these tags to support XHTML (#13200)
- wrapMap = {
- option: [ 1, "<select multiple='multiple'>", "</select>" ],
- legend: [ 1, "<fieldset>", "</fieldset>" ],
- area: [ 1, "<map>", "</map>" ],
- param: [ 1, "<object>", "</object>" ],
- thead: [ 1, "<table>", "</table>" ],
- tr: [ 2, "<table><tbody>", "</tbody></table>" ],
- col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
- td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
-
- // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
- // unless wrapped in a div with non-breaking characters in front of it.
- _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]
- },
- safeFragment = createSafeFragment( document ),
- fragmentDiv = safeFragment.appendChild( document.createElement("div") );
-
-wrapMap.optgroup = wrapMap.option;
-wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
-wrapMap.th = wrapMap.td;
-
-jQuery.fn.extend({
- text: function( value ) {
- return jQuery.access( this, function( value ) {
- return value === undefined ?
- jQuery.text( this ) :
- this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
- }, null, value, arguments.length );
- },
-
- wrapAll: function( html ) {
- if ( jQuery.isFunction( html ) ) {
- return this.each(function(i) {
- jQuery(this).wrapAll( html.call(this, i) );
- });
- }
-
- if ( this[0] ) {
- // The elements to wrap the target around
- var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
-
- if ( this[0].parentNode ) {
- wrap.insertBefore( this[0] );
- }
-
- wrap.map(function() {
- var elem = this;
-
- while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
- elem = elem.firstChild;
- }
-
- return elem;
- }).append( this );
- }
-
- return this;
- },
-
- wrapInner: function( html ) {
- if ( jQuery.isFunction( html ) ) {
- return this.each(function(i) {
- jQuery(this).wrapInner( html.call(this, i) );
- });
- }
-
- return this.each(function() {
- var self = jQuery( this ),
- contents = self.contents();
-
- if ( contents.length ) {
- contents.wrapAll( html );
-
- } else {
- self.append( html );
- }
- });
- },
-
- wrap: function( html ) {
- var isFunction = jQuery.isFunction( html );
-
- return this.each(function(i) {
- jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
- });
- },
-
- unwrap: function() {
- return this.parent().each(function() {
- if ( !jQuery.nodeName( this, "body" ) ) {
- jQuery( this ).replaceWith( this.childNodes );
- }
- }).end();
- },
-
- append: function() {
- return this.domManip(arguments, true, function( elem ) {
- if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
- this.appendChild( elem );
- }
- });
- },
-
- prepend: function() {
- return this.domManip(arguments, true, function( elem ) {
- if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
- this.insertBefore( elem, this.firstChild );
- }
- });
- },
-
- before: function() {
- return this.domManip( arguments, false, function( elem ) {
- if ( this.parentNode ) {
- this.parentNode.insertBefore( elem, this );
- }
- });
- },
-
- after: function() {
- return this.domManip( arguments, false, function( elem ) {
- if ( this.parentNode ) {
- this.parentNode.insertBefore( elem, this.nextSibling );
- }
- });
- },
-
- // keepData is for internal use only--do not document
- remove: function( selector, keepData ) {
- var elem,
- i = 0;
-
- for ( ; (elem = this[i]) != null; i++ ) {
- if ( !selector || jQuery.filter( selector, [ elem ] ).length > 0 ) {
- if ( !keepData && elem.nodeType === 1 ) {
- jQuery.cleanData( getAll( elem ) );
- }
-
- if ( elem.parentNode ) {
- if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
- setGlobalEval( getAll( elem, "script" ) );
- }
- elem.parentNode.removeChild( elem );
- }
- }
- }
-
- return this;
- },
-
- empty: function() {
- var elem,
- i = 0;
-
- for ( ; (elem = this[i]) != null; i++ ) {
- // Remove element nodes and prevent memory leaks
- if ( elem.nodeType === 1 ) {
- jQuery.cleanData( getAll( elem, false ) );
- }
-
- // Remove any remaining nodes
- while ( elem.firstChild ) {
- elem.removeChild( elem.firstChild );
- }
-
- // If this is a select, ensure that it displays empty (#12336)
- // Support: IE<9
- if ( elem.options && jQuery.nodeName( elem, "select" ) ) {
- elem.options.length = 0;
- }
- }
-
- return this;
- },
-
- clone: function( dataAndEvents, deepDataAndEvents ) {
- dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
- deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
-
- return this.map( function () {
- return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
- });
- },
-
- html: function( value ) {
- return jQuery.access( this, function( value ) {
- var elem = this[0] || {},
- i = 0,
- l = this.length;
-
- if ( value === undefined ) {
- return elem.nodeType === 1 ?
- elem.innerHTML.replace( rinlinejQuery, "" ) :
- undefined;
- }
-
- // See if we can take a shortcut and just use innerHTML
- if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
- ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) &&
- ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
- !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
-
- value = value.replace( rxhtmlTag, "<$1></$2>" );
-
- try {
- for (; i < l; i++ ) {
- // Remove element nodes and prevent memory leaks
- elem = this[i] || {};
- if ( elem.nodeType === 1 ) {
- jQuery.cleanData( getAll( elem, false ) );
- elem.innerHTML = value;
- }
- }
-
- elem = 0;
-
- // If using innerHTML throws an exception, use the fallback method
- } catch(e) {}
- }
-
- if ( elem ) {
- this.empty().append( value );
- }
- }, null, value, arguments.length );
- },
-
- replaceWith: function( value ) {
- var isFunc = jQuery.isFunction( value );
-
- // Make sure that the elements are removed from the DOM before they are inserted
- // this can help fix replacing a parent with child elements
- if ( !isFunc && typeof value !== "string" ) {
- value = jQuery( value ).not( this ).detach();
- }
-
- return this.domManip( [ value ], true, function( elem ) {
- var next = this.nextSibling,
- parent = this.parentNode;
-
- if ( parent && this.nodeType === 1 || this.nodeType === 11 ) {
-
- jQuery( this ).remove();
-
- if ( next ) {
- next.parentNode.insertBefore( elem, next );
- } else {
- parent.appendChild( elem );
- }
- }
- });
- },
-
- detach: function( selector ) {
- return this.remove( selector, true );
- },
-
- domManip: function( args, table, callback ) {
-
- // Flatten any nested arrays
- args = core_concat.apply( [], args );
-
- var fragment, first, scripts, hasScripts, node, doc,
- i = 0,
- l = this.length,
- set = this,
- iNoClone = l - 1,
- value = args[0],
- isFunction = jQuery.isFunction( value );
-
- // We can't cloneNode fragments that contain checked, in WebKit
- if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) {
- return this.each(function( index ) {
- var self = set.eq( index );
- if ( isFunction ) {
- args[0] = value.call( this, index, table ? self.html() : undefined );
- }
- self.domManip( args, table, callback );
- });
- }
-
- if ( l ) {
- fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );
- first = fragment.firstChild;
-
- if ( fragment.childNodes.length === 1 ) {
- fragment = first;
- }
-
- if ( first ) {
- table = table && jQuery.nodeName( first, "tr" );
- scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
- hasScripts = scripts.length;
-
- // Use the original fragment for the last item instead of the first because it can end up
- // being emptied incorrectly in certain situations (#8070).
- for ( ; i < l; i++ ) {
- node = fragment;
-
- if ( i !== iNoClone ) {
- node = jQuery.clone( node, true, true );
-
- // Keep references to cloned scripts for later restoration
- if ( hasScripts ) {
- jQuery.merge( scripts, getAll( node, "script" ) );
- }
- }
-
- callback.call(
- table && jQuery.nodeName( this[i], "table" ) ?
- findOrAppend( this[i], "tbody" ) :
- this[i],
- node,
- i
- );
- }
-
- if ( hasScripts ) {
- doc = scripts[ scripts.length - 1 ].ownerDocument;
-
- // Reenable scripts
- jQuery.map( scripts, restoreScript );
-
- // Evaluate executable scripts on first document insertion
- for ( i = 0; i < hasScripts; i++ ) {
- node = scripts[ i ];
- if ( rscriptType.test( node.type || "" ) &&
- !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
-
- if ( node.src ) {
- // Hope ajax is available...
- jQuery.ajax({
- url: node.src,
- type: "GET",
- dataType: "script",
- async: false,
- global: false,
- "throws": true
- });
- } else {
- jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );
- }
- }
- }
- }
-
- // Fix #11809: Avoid leaking memory
- fragment = first = null;
- }
- }
-
- return this;
- }
-});
-
-function findOrAppend( elem, tag ) {
- return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) );
-}
-
-// Replace/restore the type attribute of script elements for safe DOM manipulation
-function disableScript( elem ) {
- var attr = elem.getAttributeNode("type");
- elem.type = ( attr && attr.specified ) + "/" + elem.type;
- return elem;
-}
-function restoreScript( elem ) {
- var match = rscriptTypeMasked.exec( elem.type );
- if ( match ) {
- elem.type = match[1];
- } else {
- elem.removeAttribute("type");
- }
- return elem;
-}
-
-// Mark scripts as having already been evaluated
-function setGlobalEval( elems, refElements ) {
- var elem,
- i = 0;
- for ( ; (elem = elems[i]) != null; i++ ) {
- jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) );
- }
-}
-
-function cloneCopyEvent( src, dest ) {
-
- if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
- return;
- }
-
- var type, i, l,
- oldData = jQuery._data( src ),
- curData = jQuery._data( dest, oldData ),
- events = oldData.events;
-
- if ( events ) {
- delete curData.handle;
- curData.events = {};
-
- for ( type in events ) {
- for ( i = 0, l = events[ type ].length; i < l; i++ ) {
- jQuery.event.add( dest, type, events[ type ][ i ] );
- }
- }
- }
-
- // make the cloned public data object a copy from the original
- if ( curData.data ) {
- curData.data = jQuery.extend( {}, curData.data );
- }
-}
-
-function fixCloneNodeIssues( src, dest ) {
- var nodeName, data, e;
-
- // We do not need to do anything for non-Elements
- if ( dest.nodeType !== 1 ) {
- return;
- }
-
- nodeName = dest.nodeName.toLowerCase();
-
- // IE6-8 copies events bound via attachEvent when using cloneNode.
- if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) {
- data = jQuery._data( dest );
-
- for ( e in data.events ) {
- jQuery.removeEvent( dest, e, data.handle );
- }
-
- // Event data gets referenced instead of copied if the expando gets copied too
- dest.removeAttribute( jQuery.expando );
- }
-
- // IE blanks contents when cloning scripts, and tries to evaluate newly-set text
- if ( nodeName === "script" && dest.text !== src.text ) {
- disableScript( dest ).text = src.text;
- restoreScript( dest );
-
- // IE6-10 improperly clones children of object elements using classid.
- // IE10 throws NoModificationAllowedError if parent is null, #12132.
- } else if ( nodeName === "object" ) {
- if ( dest.parentNode ) {
- dest.outerHTML = src.outerHTML;
- }
-
- // This path appears unavoidable for IE9. When cloning an object
- // element in IE9, the outerHTML strategy above is not sufficient.
- // If the src has innerHTML and the destination does not,
- // copy the src.innerHTML into the dest.innerHTML. #10324
- if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {
- dest.innerHTML = src.innerHTML;
- }
-
- } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) {
- // IE6-8 fails to persist the checked state of a cloned checkbox
- // or radio button. Worse, IE6-7 fail to give the cloned element
- // a checked appearance if the defaultChecked value isn't also set
-
- dest.defaultChecked = dest.checked = src.checked;
-
- // IE6-7 get confused and end up setting the value of a cloned
- // checkbox/radio button to an empty string instead of "on"
- if ( dest.value !== src.value ) {
- dest.value = src.value;
- }
-
- // IE6-8 fails to return the selected option to the default selected
- // state when cloning options
- } else if ( nodeName === "option" ) {
- dest.defaultSelected = dest.selected = src.defaultSelected;
-
- // IE6-8 fails to set the defaultValue to the correct value when
- // cloning other types of input fields
- } else if ( nodeName === "input" || nodeName === "textarea" ) {
- dest.defaultValue = src.defaultValue;
- }
-}
-
-jQuery.each({
- appendTo: "append",
- prependTo: "prepend",
- insertBefore: "before",
- insertAfter: "after",
- replaceAll: "replaceWith"
-}, function( name, original ) {
- jQuery.fn[ name ] = function( selector ) {
- var elems,
- i = 0,
- ret = [],
- insert = jQuery( selector ),
- last = insert.length - 1;
-
- for ( ; i <= last; i++ ) {
- elems = i === last ? this : this.clone(true);
- jQuery( insert[i] )[ original ]( elems );
-
- // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
- core_push.apply( ret, elems.get() );
- }
-
- return this.pushStack( ret );
- };
-});
-
-function getAll( context, tag ) {
- var elems, elem,
- i = 0,
- found = typeof context.getElementsByTagName !== "undefined" ? context.getElementsByTagName( tag || "*" ) :
- typeof context.querySelectorAll !== "undefined" ? context.querySelectorAll( tag || "*" ) :
- undefined;
-
- if ( !found ) {
- for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {
- if ( !tag || jQuery.nodeName( elem, tag ) ) {
- found.push( elem );
- } else {
- jQuery.merge( found, getAll( elem, tag ) );
- }
- }
- }
-
- return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
- jQuery.merge( [ context ], found ) :
- found;
-}
-
-// Used in buildFragment, fixes the defaultChecked property
-function fixDefaultChecked( elem ) {
- if ( manipulation_rcheckableType.test( elem.type ) ) {
- elem.defaultChecked = elem.checked;
- }
-}
-
-jQuery.extend({
- clone: function( elem, dataAndEvents, deepDataAndEvents ) {
- var destElements, srcElements, node, i, clone,
- inPage = jQuery.contains( elem.ownerDocument, elem );
-
- if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
- clone = elem.cloneNode( true );
-
- // IE<=8 does not properly clone detached, unknown element nodes
- } else {
- fragmentDiv.innerHTML = elem.outerHTML;
- fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
- }
-
- if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
- (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
-
- // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
- destElements = getAll( clone );
- srcElements = getAll( elem );
-
- // Fix all IE cloning issues
- for ( i = 0; (node = srcElements[i]) != null; ++i ) {
- // Ensure that the destination node is not null; Fixes #9587
- if ( destElements[i] ) {
- fixCloneNodeIssues( node, destElements[i] );
- }
- }
- }
-
- // Copy the events from the original to the clone
- if ( dataAndEvents ) {
- if ( deepDataAndEvents ) {
- srcElements = srcElements || getAll( elem );
- destElements = destElements || getAll( clone );
-
- for ( i = 0; (node = srcElements[i]) != null; i++ ) {
- cloneCopyEvent( node, destElements[i] );
- }
- } else {
- cloneCopyEvent( elem, clone );
- }
- }
-
- // Preserve script evaluation history
- destElements = getAll( clone, "script" );
- if ( destElements.length > 0 ) {
- setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
- }
-
- destElements = srcElements = node = null;
-
- // Return the cloned set
- return clone;
- },
-
- buildFragment: function( elems, context, scripts, selection ) {
- var contains, elem, tag, tmp, wrap, tbody, j,
- l = elems.length,
-
- // Ensure a safe fragment
- safe = createSafeFragment( context ),
-
- nodes = [],
- i = 0;
-
- for ( ; i < l; i++ ) {
- elem = elems[ i ];
-
- if ( elem || elem === 0 ) {
-
- // Add nodes directly
- if ( jQuery.type( elem ) === "object" ) {
- jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
-
- // Convert non-html into a text node
- } else if ( !rhtml.test( elem ) ) {
- nodes.push( context.createTextNode( elem ) );
-
- // Convert html into DOM nodes
- } else {
- tmp = tmp || safe.appendChild( context.createElement("div") );
-
- // Deserialize a standard representation
- tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase();
- wrap = wrapMap[ tag ] || wrapMap._default;
-
- tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2];
-
- // Descend through wrappers to the right content
- j = wrap[0];
- while ( j-- ) {
- tmp = tmp.lastChild;
- }
-
- // Manually add leading whitespace removed by IE
- if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
- nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );
- }
-
- // Remove IE's autoinserted <tbody> from table fragments
- if ( !jQuery.support.tbody ) {
-
- // String was a <table>, *may* have spurious <tbody>
- elem = tag === "table" && !rtbody.test( elem ) ?
- tmp.firstChild :
-
- // String was a bare <thead> or <tfoot>
- wrap[1] === "<table>" && !rtbody.test( elem ) ?
- tmp :
- 0;
-
- j = elem && elem.childNodes.length;
- while ( j-- ) {
- if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) {
- elem.removeChild( tbody );
- }
- }
- }
-
- jQuery.merge( nodes, tmp.childNodes );
-
- // Fix #12392 for WebKit and IE > 9
- tmp.textContent = "";
-
- // Fix #12392 for oldIE
- while ( tmp.firstChild ) {
- tmp.removeChild( tmp.firstChild );
- }
-
- // Remember the top-level container for proper cleanup
- tmp = safe.lastChild;
- }
- }
- }
-
- // Fix #11356: Clear elements from fragment
- if ( tmp ) {
- safe.removeChild( tmp );
- }
-
- // Reset defaultChecked for any radios and checkboxes
- // about to be appended to the DOM in IE 6/7 (#8060)
- if ( !jQuery.support.appendChecked ) {
- jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
- }
-
- i = 0;
- while ( (elem = nodes[ i++ ]) ) {
-
- // #4087 - If origin and destination elements are the same, and this is
- // that element, do not do anything
- if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
- continue;
- }
-
- contains = jQuery.contains( elem.ownerDocument, elem );
-
- // Append to fragment
- tmp = getAll( safe.appendChild( elem ), "script" );
-
- // Preserve script evaluation history
- if ( contains ) {
- setGlobalEval( tmp );
- }
-
- // Capture executables
- if ( scripts ) {
- j = 0;
- while ( (elem = tmp[ j++ ]) ) {
- if ( rscriptType.test( elem.type || "" ) ) {
- scripts.push( elem );
- }
- }
- }
- }
-
- tmp = null;
-
- return safe;
- },
-
- cleanData: function( elems, /* internal */ acceptData ) {
- var data, id, elem, type,
- i = 0,
- internalKey = jQuery.expando,
- cache = jQuery.cache,
- deleteExpando = jQuery.support.deleteExpando,
- special = jQuery.event.special;
-
- for ( ; (elem = elems[i]) != null; i++ ) {
-
- if ( acceptData || jQuery.acceptData( elem ) ) {
-
- id = elem[ internalKey ];
- data = id && cache[ id ];
-
- if ( data ) {
- if ( data.events ) {
- for ( type in data.events ) {
- if ( special[ type ] ) {
- jQuery.event.remove( elem, type );
-
- // This is a shortcut to avoid jQuery.event.remove's overhead
- } else {
- jQuery.removeEvent( elem, type, data.handle );
- }
- }
- }
-
- // Remove cache only if it was not already removed by jQuery.event.remove
- if ( cache[ id ] ) {
-
- delete cache[ id ];
-
- // IE does not allow us to delete expando properties from nodes,
- // nor does it have a removeAttribute function on Document nodes;
- // we must handle all of these cases
- if ( deleteExpando ) {
- delete elem[ internalKey ];
-
- } else if ( typeof elem.removeAttribute !== "undefined" ) {
- elem.removeAttribute( internalKey );
-
- } else {
- elem[ internalKey ] = null;
- }
-
- core_deletedIds.push( id );
- }
- }
- }
- }
- }
-});
-var curCSS, getStyles, iframe,
- ralpha = /alpha\([^)]*\)/i,
- ropacity = /opacity\s*=\s*([^)]*)/,
- rposition = /^(top|right|bottom|left)$/,
- // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
- // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
- rdisplayswap = /^(none|table(?!-c[ea]).+)/,
- rmargin = /^margin/,
- rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
- rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
- rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ),
- elemdisplay = { BODY: "block" },
-
- cssShow = { position: "absolute", visibility: "hidden", display: "block" },
- cssNormalTransform = {
- letterSpacing: 0,
- fontWeight: 400
- },
-
- cssExpand = [ "Top", "Right", "Bottom", "Left" ],
- cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
-
-// return a css property mapped to a potentially vendor prefixed property
-function vendorPropName( style, name ) {
-
- // shortcut for names that are not vendor prefixed
- if ( name in style ) {
- return name;
- }
-
- // check for vendor prefixed names
- var capName = name.charAt(0).toUpperCase() + name.slice(1),
- origName = name,
- i = cssPrefixes.length;
-
- while ( i-- ) {
- name = cssPrefixes[ i ] + capName;
- if ( name in style ) {
- return name;
- }
- }
-
- return origName;
-}
-
-function isHidden( elem, el ) {
- // isHidden might be called from jQuery#filter function;
- // in that case, element will be second argument
- elem = el || elem;
- return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
-}
-
-function showHide( elements, show ) {
- var elem,
- values = [],
- index = 0,
- length = elements.length;
-
- for ( ; index < length; index++ ) {
- elem = elements[ index ];
- if ( !elem.style ) {
- continue;
- }
- values[ index ] = jQuery._data( elem, "olddisplay" );
- if ( show ) {
- // Reset the inline display of this element to learn if it is
- // being hidden by cascaded rules or not
- if ( !values[ index ] && elem.style.display === "none" ) {
- elem.style.display = "";
- }
-
- // Set elements which have been overridden with display: none
- // in a stylesheet to whatever the default browser style is
- // for such an element
- if ( elem.style.display === "" && isHidden( elem ) ) {
- values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) );
- }
- } else if ( !values[ index ] && !isHidden( elem ) ) {
- jQuery._data( elem, "olddisplay", jQuery.css( elem, "display" ) );
- }
- }
-
- // Set the display of most of the elements in a second loop
- // to avoid the constant reflow
- for ( index = 0; index < length; index++ ) {
- elem = elements[ index ];
- if ( !elem.style ) {
- continue;
- }
- if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
- elem.style.display = show ? values[ index ] || "" : "none";
- }
- }
-
- return elements;
-}
-
-jQuery.fn.extend({
- css: function( name, value ) {
- return jQuery.access( this, function( elem, name, value ) {
- var styles, len,
- map = {},
- i = 0;
-
- if ( jQuery.isArray( name ) ) {
- styles = getStyles( elem );
- len = name.length;
-
- for ( ; i < len; i++ ) {
- map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
- }
-
- return map;
- }
-
- return value !== undefined ?
- jQuery.style( elem, name, value ) :
- jQuery.css( elem, name );
- }, name, value, arguments.length > 1 );
- },
- show: function() {
- return showHide( this, true );
- },
- hide: function() {
- return showHide( this );
- },
- toggle: function( state ) {
- var bool = typeof state === "boolean";
-
- return this.each(function() {
- if ( bool ? state : isHidden( this ) ) {
- jQuery( this ).show();
- } else {
- jQuery( this ).hide();
- }
- });
- }
-});
-
-jQuery.extend({
- // Add in style property hooks for overriding the default
- // behavior of getting and setting a style property
- cssHooks: {
- opacity: {
- get: function( elem, computed ) {
- if ( computed ) {
- // We should always get a number back from opacity
- var ret = curCSS( elem, "opacity" );
- return ret === "" ? "1" : ret;
- }
- }
- }
- },
-
- // Exclude the following css properties to add px
- cssNumber: {
- "columnCount": true,
- "fillOpacity": true,
- "fontWeight": true,
- "lineHeight": true,
- "opacity": true,
- "orphans": true,
- "widows": true,
- "zIndex": true,
- "zoom": true
- },
-
- // Add in properties whose names you wish to fix before
- // setting or getting the value
- cssProps: {
- // normalize float css property
- "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
- },
-
- // Get and set the style property on a DOM Node
- style: function( elem, name, value, extra ) {
- // Don't set styles on text and comment nodes
- if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
- return;
- }
-
- // Make sure that we're working with the right name
- var ret, type, hooks,
- origName = jQuery.camelCase( name ),
- style = elem.style;
-
- name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
-
- // gets hook for the prefixed version
- // followed by the unprefixed version
- hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
-
- // Check if we're setting a value
- if ( value !== undefined ) {
- type = typeof value;
-
- // convert relative number strings (+= or -=) to relative numbers. #7345
- if ( type === "string" && (ret = rrelNum.exec( value )) ) {
- value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
- // Fixes bug #9237
- type = "number";
- }
-
- // Make sure that NaN and null values aren't set. See: #7116
- if ( value == null || type === "number" && isNaN( value ) ) {
- return;
- }
-
- // If a number was passed in, add 'px' to the (except for certain CSS properties)
- if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
- value += "px";
- }
-
- // Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
- // but it would mean to define eight (for every problematic property) identical functions
- if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) {
- style[ name ] = "inherit";
- }
-
- // If a hook was provided, use that value, otherwise just set the specified value
- if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
-
- // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
- // Fixes bug #5509
- try {
- style[ name ] = value;
- } catch(e) {}
- }
-
- } else {
- // If a hook was provided get the non-computed value from there
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
- return ret;
- }
-
- // Otherwise just get the value from the style object
- return style[ name ];
- }
- },
-
- css: function( elem, name, extra, styles ) {
- var val, num, hooks,
- origName = jQuery.camelCase( name );
-
- // Make sure that we're working with the right name
- name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
-
- // gets hook for the prefixed version
- // followed by the unprefixed version
- hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
-
- // If a hook was provided get the computed value from there
- if ( hooks && "get" in hooks ) {
- val = hooks.get( elem, true, extra );
- }
-
- // Otherwise, if a way to get the computed value exists, use that
- if ( val === undefined ) {
- val = curCSS( elem, name, styles );
- }
-
- //convert "normal" to computed value
- if ( val === "normal" && name in cssNormalTransform ) {
- val = cssNormalTransform[ name ];
- }
-
- // Return, converting to number if forced or a qualifier was provided and val looks numeric
- if ( extra ) {
- num = parseFloat( val );
- return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
- }
- return val;
- },
-
- // A method for quickly swapping in/out CSS properties to get correct calculations
- swap: function( elem, options, callback, args ) {
- var ret, name,
- old = {};
-
- // Remember the old values, and insert the new ones
- for ( name in options ) {
- old[ name ] = elem.style[ name ];
- elem.style[ name ] = options[ name ];
- }
-
- ret = callback.apply( elem, args || [] );
-
- // Revert the old values
- for ( name in options ) {
- elem.style[ name ] = old[ name ];
- }
-
- return ret;
- }
-});
-
-// NOTE: we've included the "window" in window.getComputedStyle
-// because jsdom on node.js will break without it.
-if ( window.getComputedStyle ) {
- getStyles = function( elem ) {
- return window.getComputedStyle( elem, null );
- };
-
- curCSS = function( elem, name, _computed ) {
- var width, minWidth, maxWidth,
- computed = _computed || getStyles( elem ),
-
- // getPropertyValue is only needed for .css('filter') in IE9, see #12537
- ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined,
- style = elem.style;
-
- if ( computed ) {
-
- if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
- ret = jQuery.style( elem, name );
- }
-
- // A tribute to the "awesome hack by Dean Edwards"
- // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
- // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
- // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
- if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
-
- // Remember the original values
- width = style.width;
- minWidth = style.minWidth;
- maxWidth = style.maxWidth;
-
- // Put in the new values to get a computed value out
- style.minWidth = style.maxWidth = style.width = ret;
- ret = computed.width;
-
- // Revert the changed values
- style.width = width;
- style.minWidth = minWidth;
- style.maxWidth = maxWidth;
- }
- }
-
- return ret;
- };
-} else if ( document.documentElement.currentStyle ) {
- getStyles = function( elem ) {
- return elem.currentStyle;
- };
-
- curCSS = function( elem, name, _computed ) {
- var left, rs, rsLeft,
- computed = _computed || getStyles( elem ),
- ret = computed ? computed[ name ] : undefined,
- style = elem.style;
-
- // Avoid setting ret to empty string here
- // so we don't default to auto
- if ( ret == null && style && style[ name ] ) {
- ret = style[ name ];
- }
-
- // From the awesome hack by Dean Edwards
- // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
-
- // If we're not dealing with a regular pixel number
- // but a number that has a weird ending, we need to convert it to pixels
- // but not position css attributes, as those are proportional to the parent element instead
- // and we can't measure the parent instead because it might trigger a "stacking dolls" problem
- if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
-
- // Remember the original values
- left = style.left;
- rs = elem.runtimeStyle;
- rsLeft = rs && rs.left;
-
- // Put in the new values to get a computed value out
- if ( rsLeft ) {
- rs.left = elem.currentStyle.left;
- }
- style.left = name === "fontSize" ? "1em" : ret;
- ret = style.pixelLeft + "px";
-
- // Revert the changed values
- style.left = left;
- if ( rsLeft ) {
- rs.left = rsLeft;
- }
- }
-
- return ret === "" ? "auto" : ret;
- };
-}
-
-function setPositiveNumber( elem, value, subtract ) {
- var matches = rnumsplit.exec( value );
- return matches ?
- // Guard against undefined "subtract", e.g., when used as in cssHooks
- Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
- value;
-}
-
-function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
- var i = extra === ( isBorderBox ? "border" : "content" ) ?
- // If we already have the right measurement, avoid augmentation
- 4 :
- // Otherwise initialize for horizontal or vertical properties
- name === "width" ? 1 : 0,
-
- val = 0;
-
- for ( ; i < 4; i += 2 ) {
- // both box models exclude margin, so add it if we want it
- if ( extra === "margin" ) {
- val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
- }
-
- if ( isBorderBox ) {
- // border-box includes padding, so remove it if we want content
- if ( extra === "content" ) {
- val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
- }
-
- // at this point, extra isn't border nor margin, so remove border
- if ( extra !== "margin" ) {
- val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
- }
- } else {
- // at this point, extra isn't content, so add padding
- val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
-
- // at this point, extra isn't content nor padding, so add border
- if ( extra !== "padding" ) {
- val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
- }
- }
- }
-
- return val;
-}
-
-function getWidthOrHeight( elem, name, extra ) {
-
- // Start with offset property, which is equivalent to the border-box value
- var valueIsBorderBox = true,
- val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
- styles = getStyles( elem ),
- isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
-
- // some non-html elements return undefined for offsetWidth, so check for null/undefined
- // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
- // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
- if ( val <= 0 || val == null ) {
- // Fall back to computed then uncomputed css if necessary
- val = curCSS( elem, name, styles );
- if ( val < 0 || val == null ) {
- val = elem.style[ name ];
- }
-
- // Computed unit is not pixels. Stop here and return.
- if ( rnumnonpx.test(val) ) {
- return val;
- }
-
- // we need the check for style in case a browser which returns unreliable values
- // for getComputedStyle silently falls back to the reliable elem.style
- valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );
-
- // Normalize "", auto, and prepare for extra
- val = parseFloat( val ) || 0;
- }
-
- // use the active box-sizing model to add/subtract irrelevant styles
- return ( val +
- augmentWidthOrHeight(
- elem,
- name,
- extra || ( isBorderBox ? "border" : "content" ),
- valueIsBorderBox,
- styles
- )
- ) + "px";
-}
-
-// Try to determine the default display value of an element
-function css_defaultDisplay( nodeName ) {
- var doc = document,
- display = elemdisplay[ nodeName ];
-
- if ( !display ) {
- display = actualDisplay( nodeName, doc );
-
- // If the simple way fails, read from inside an iframe
- if ( display === "none" || !display ) {
- // Use the already-created iframe if possible
- iframe = ( iframe ||
- jQuery("<iframe frameborder='0' width='0' height='0'/>")
- .css( "cssText", "display:block !important" )
- ).appendTo( doc.documentElement );
-
- // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
- doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;
- doc.write("<!doctype html><html><body>");
- doc.close();
-
- display = actualDisplay( nodeName, doc );
- iframe.detach();
- }
-
- // Store the correct default display
- elemdisplay[ nodeName ] = display;
- }
-
- return display;
-}
-
-// Called ONLY from within css_defaultDisplay
-function actualDisplay( name, doc ) {
- var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
- display = jQuery.css( elem[0], "display" );
- elem.remove();
- return display;
-}
-
-jQuery.each([ "height", "width" ], function( i, name ) {
- jQuery.cssHooks[ name ] = {
- get: function( elem, computed, extra ) {
- if ( computed ) {
- // certain elements can have dimension info if we invisibly show them
- // however, it must have a current display style that would benefit from this
- return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ?
- jQuery.swap( elem, cssShow, function() {
- return getWidthOrHeight( elem, name, extra );
- }) :
- getWidthOrHeight( elem, name, extra );
- }
- },
-
- set: function( elem, value, extra ) {
- var styles = extra && getStyles( elem );
- return setPositiveNumber( elem, value, extra ?
- augmentWidthOrHeight(
- elem,
- name,
- extra,
- jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
- styles
- ) : 0
- );
- }
- };
-});
-
-if ( !jQuery.support.opacity ) {
- jQuery.cssHooks.opacity = {
- get: function( elem, computed ) {
- // IE uses filters for opacity
- return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
- ( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
- computed ? "1" : "";
- },
-
- set: function( elem, value ) {
- var style = elem.style,
- currentStyle = elem.currentStyle,
- opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
- filter = currentStyle && currentStyle.filter || style.filter || "";
-
- // IE has trouble with opacity if it does not have layout
- // Force it by setting the zoom level
- style.zoom = 1;
-
- // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
- // if value === "", then remove inline opacity #12685
- if ( ( value >= 1 || value === "" ) &&
- jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
- style.removeAttribute ) {
-
- // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
- // if "filter:" is present at all, clearType is disabled, we want to avoid this
- // style.removeAttribute is IE Only, but so apparently is this code path...
- style.removeAttribute( "filter" );
-
- // if there is no filter style applied in a css rule or unset inline opacity, we are done
- if ( value === "" || currentStyle && !currentStyle.filter ) {
- return;
- }
- }
-
- // otherwise, set new filter values
- style.filter = ralpha.test( filter ) ?
- filter.replace( ralpha, opacity ) :
- filter + " " + opacity;
- }
- };
-}
-
-// These hooks cannot be added until DOM ready because the support test
-// for it is not run until after DOM ready
-jQuery(function() {
- if ( !jQuery.support.reliableMarginRight ) {
- jQuery.cssHooks.marginRight = {
- get: function( elem, computed ) {
- if ( computed ) {
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- // Work around by temporarily setting element display to inline-block
- return jQuery.swap( elem, { "display": "inline-block" },
- curCSS, [ elem, "marginRight" ] );
- }
- }
- };
- }
-
- // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
- // getComputedStyle returns percent when specified for top/left/bottom/right
- // rather than make the css module depend on the offset module, we just check for it here
- if ( !jQuery.support.pixelPosition && jQuery.fn.position ) {
- jQuery.each( [ "top", "left" ], function( i, prop ) {
- jQuery.cssHooks[ prop ] = {
- get: function( elem, computed ) {
- if ( computed ) {
- computed = curCSS( elem, prop );
- // if curCSS returns percentage, fallback to offset
- return rnumnonpx.test( computed ) ?
- jQuery( elem ).position()[ prop ] + "px" :
- computed;
- }
- }
- };
- });
- }
-
-});
-
-if ( jQuery.expr && jQuery.expr.filters ) {
- jQuery.expr.filters.hidden = function( elem ) {
- return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
- };
-
- jQuery.expr.filters.visible = function( elem ) {
- return !jQuery.expr.filters.hidden( elem );
- };
-}
-
-// These hooks are used by animate to expand properties
-jQuery.each({
- margin: "",
- padding: "",
- border: "Width"
-}, function( prefix, suffix ) {
- jQuery.cssHooks[ prefix + suffix ] = {
- expand: function( value ) {
- var i = 0,
- expanded = {},
-
- // assumes a single number if not a string
- parts = typeof value === "string" ? value.split(" ") : [ value ];
-
- for ( ; i < 4; i++ ) {
- expanded[ prefix + cssExpand[ i ] + suffix ] =
- parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
- }
-
- return expanded;
- }
- };
-
- if ( !rmargin.test( prefix ) ) {
- jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
- }
-});
-var r20 = /%20/g,
- rbracket = /\[\]$/,
- rCRLF = /\r?\n/g,
- rsubmitterTypes = /^(?:submit|button|image|reset)$/i,
- rsubmittable = /^(?:input|select|textarea|keygen)/i;
-
-jQuery.fn.extend({
- serialize: function() {
- return jQuery.param( this.serializeArray() );
- },
- serializeArray: function() {
- return this.map(function(){
- // Can add propHook for "elements" to filter or add form elements
- var elements = jQuery.prop( this, "elements" );
- return elements ? jQuery.makeArray( elements ) : this;
- })
- .filter(function(){
- var type = this.type;
- // Use .is(":disabled") so that fieldset[disabled] works
- return this.name && !jQuery( this ).is( ":disabled" ) &&
- rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
- ( this.checked || !manipulation_rcheckableType.test( type ) );
- })
- .map(function( i, elem ){
- var val = jQuery( this ).val();
-
- return val == null ?
- null :
- jQuery.isArray( val ) ?
- jQuery.map( val, function( val ){
- return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
- }) :
- { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
- }).get();
- }
-});
-
-//Serialize an array of form elements or a set of
-//key/values into a query string
-jQuery.param = function( a, traditional ) {
- var prefix,
- s = [],
- add = function( key, value ) {
- // If value is a function, invoke it and return its value
- value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
- s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
- };
-
- // Set traditional to true for jQuery <= 1.3.2 behavior.
- if ( traditional === undefined ) {
- traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
- }
-
- // If an array was passed in, assume that it is an array of form elements.
- if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
- // Serialize the form elements
- jQuery.each( a, function() {
- add( this.name, this.value );
- });
-
- } else {
- // If traditional, encode the "old" way (the way 1.3.2 or older
- // did it), otherwise encode params recursively.
- for ( prefix in a ) {
- buildParams( prefix, a[ prefix ], traditional, add );
- }
- }
-
- // Return the resulting serialization
- return s.join( "&" ).replace( r20, "+" );
-};
-
-function buildParams( prefix, obj, traditional, add ) {
- var name;
-
- if ( jQuery.isArray( obj ) ) {
- // Serialize array item.
- jQuery.each( obj, function( i, v ) {
- if ( traditional || rbracket.test( prefix ) ) {
- // Treat each array item as a scalar.
- add( prefix, v );
-
- } else {
- // Item is non-scalar (array or object), encode its numeric index.
- buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
- }
- });
-
- } else if ( !traditional && jQuery.type( obj ) === "object" ) {
- // Serialize object item.
- for ( name in obj ) {
- buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
- }
-
- } else {
- // Serialize scalar item.
- add( prefix, obj );
- }
-}
-var
- // Document location
- ajaxLocParts,
- ajaxLocation,
-
- ajax_nonce = jQuery.now(),
-
- ajax_rquery = /\?/,
- rhash = /#.*$/,
- rts = /([?&])_=[^&]*/,
- rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
- // #7653, #8125, #8152: local protocol detection
- rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
- rnoContent = /^(?:GET|HEAD)$/,
- rprotocol = /^\/\//,
- rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
-
- // Keep a copy of the old load method
- _load = jQuery.fn.load,
-
- /* Prefilters
- * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
- * 2) These are called:
- * - BEFORE asking for a transport
- * - AFTER param serialization (s.data is a string if s.processData is true)
- * 3) key is the dataType
- * 4) the catchall symbol "*" can be used
- * 5) execution will start with transport dataType and THEN continue down to "*" if needed
- */
- prefilters = {},
-
- /* Transports bindings
- * 1) key is the dataType
- * 2) the catchall symbol "*" can be used
- * 3) selection will start with transport dataType and THEN go to "*" if needed
- */
- transports = {},
-
- // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
- allTypes = "*/".concat("*");
-
-// #8138, IE may throw an exception when accessing
-// a field from window.location if document.domain has been set
-try {
- ajaxLocation = location.href;
-} catch( e ) {
- // Use the href attribute of an A element
- // since IE will modify it given document.location
- ajaxLocation = document.createElement( "a" );
- ajaxLocation.href = "";
- ajaxLocation = ajaxLocation.href;
-}
-
-// Segment location into parts
-ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
-
-// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
-function addToPrefiltersOrTransports( structure ) {
-
- // dataTypeExpression is optional and defaults to "*"
- return function( dataTypeExpression, func ) {
-
- if ( typeof dataTypeExpression !== "string" ) {
- func = dataTypeExpression;
- dataTypeExpression = "*";
- }
-
- var dataType,
- i = 0,
- dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || [];
-
- if ( jQuery.isFunction( func ) ) {
- // For each dataType in the dataTypeExpression
- while ( (dataType = dataTypes[i++]) ) {
- // Prepend if requested
- if ( dataType[0] === "+" ) {
- dataType = dataType.slice( 1 ) || "*";
- (structure[ dataType ] = structure[ dataType ] || []).unshift( func );
-
- // Otherwise append
- } else {
- (structure[ dataType ] = structure[ dataType ] || []).push( func );
- }
- }
- }
- };
-}
-
-// Base inspection function for prefilters and transports
-function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
-
- var inspected = {},
- seekingTransport = ( structure === transports );
-
- function inspect( dataType ) {
- var selected;
- inspected[ dataType ] = true;
- jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
- var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
- if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
- options.dataTypes.unshift( dataTypeOrTransport );
- inspect( dataTypeOrTransport );
- return false;
- } else if ( seekingTransport ) {
- return !( selected = dataTypeOrTransport );
- }
- });
- return selected;
- }
-
- return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
-}
-
-// A special extend for ajax options
-// that takes "flat" options (not to be deep extended)
-// Fixes #9887
-function ajaxExtend( target, src ) {
- var key, deep,
- flatOptions = jQuery.ajaxSettings.flatOptions || {};
-
- for ( key in src ) {
- if ( src[ key ] !== undefined ) {
- ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
- }
- }
- if ( deep ) {
- jQuery.extend( true, target, deep );
- }
-
- return target;
-}
-
-jQuery.fn.load = function( url, params, callback ) {
- if ( typeof url !== "string" && _load ) {
- return _load.apply( this, arguments );
- }
-
- var selector, type, response,
- self = this,
- off = url.indexOf(" ");
-
- if ( off >= 0 ) {
- selector = url.slice( off, url.length );
- url = url.slice( 0, off );
- }
-
- // If it's a function
- if ( jQuery.isFunction( params ) ) {
-
- // We assume that it's the callback
- callback = params;
- params = undefined;
-
- // Otherwise, build a param string
- } else if ( params && typeof params === "object" ) {
- type = "POST";
- }
-
- // If we have elements to modify, make the request
- if ( self.length > 0 ) {
- jQuery.ajax({
- url: url,
-
- // if "type" variable is undefined, then "GET" method will be used
- type: type,
- dataType: "html",
- data: params
- }).done(function( responseText ) {
-
- // Save response for use in complete callback
- response = arguments;
-
- self.html( selector ?
-
- // If a selector was specified, locate the right elements in a dummy div
- // Exclude scripts to avoid IE 'Permission Denied' errors
- jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :
-
- // Otherwise use the full result
- responseText );
-
- }).complete( callback && function( jqXHR, status ) {
- self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
- });
- }
-
- return this;
-};
-
-// Attach a bunch of functions for handling common AJAX events
-jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){
- jQuery.fn[ type ] = function( fn ){
- return this.on( type, fn );
- };
-});
-
-jQuery.each( [ "get", "post" ], function( i, method ) {
- jQuery[ method ] = function( url, data, callback, type ) {
- // shift arguments if data argument was omitted
- if ( jQuery.isFunction( data ) ) {
- type = type || callback;
- callback = data;
- data = undefined;
- }
-
- return jQuery.ajax({
- url: url,
- type: method,
- dataType: type,
- data: data,
- success: callback
- });
- };
-});
-
-jQuery.extend({
-
- // Counter for holding the number of active queries
- active: 0,
-
- // Last-Modified header cache for next request
- lastModified: {},
- etag: {},
-
- ajaxSettings: {
- url: ajaxLocation,
- type: "GET",
- isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
- global: true,
- processData: true,
- async: true,
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- /*
- timeout: 0,
- data: null,
- dataType: null,
- username: null,
- password: null,
- cache: null,
- throws: false,
- traditional: false,
- headers: {},
- */
-
- accepts: {
- "*": allTypes,
- text: "text/plain",
- html: "text/html",
- xml: "application/xml, text/xml",
- json: "application/json, text/javascript"
- },
-
- contents: {
- xml: /xml/,
- html: /html/,
- json: /json/
- },
-
- responseFields: {
- xml: "responseXML",
- text: "responseText"
- },
-
- // Data converters
- // Keys separate source (or catchall "*") and destination types with a single space
- converters: {
-
- // Convert anything to text
- "* text": window.String,
-
- // Text to html (true = no transformation)
- "text html": true,
-
- // Evaluate text as a json expression
- "text json": jQuery.parseJSON,
-
- // Parse text as xml
- "text xml": jQuery.parseXML
- },
-
- // For options that shouldn't be deep extended:
- // you can add your own custom options here if
- // and when you create one that shouldn't be
- // deep extended (see ajaxExtend)
- flatOptions: {
- url: true,
- context: true
- }
- },
-
- // Creates a full fledged settings object into target
- // with both ajaxSettings and settings fields.
- // If target is omitted, writes into ajaxSettings.
- ajaxSetup: function( target, settings ) {
- return settings ?
-
- // Building a settings object
- ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
-
- // Extending ajaxSettings
- ajaxExtend( jQuery.ajaxSettings, target );
- },
-
- ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
- ajaxTransport: addToPrefiltersOrTransports( transports ),
-
- // Main method
- ajax: function( url, options ) {
-
- // If url is an object, simulate pre-1.5 signature
- if ( typeof url === "object" ) {
- options = url;
- url = undefined;
- }
-
- // Force options to be an object
- options = options || {};
-
- var transport,
- // URL without anti-cache param
- cacheURL,
- // Response headers
- responseHeadersString,
- responseHeaders,
- // timeout handle
- timeoutTimer,
- // Cross-domain detection vars
- parts,
- // To know if global events are to be dispatched
- fireGlobals,
- // Loop variable
- i,
- // Create the final options object
- s = jQuery.ajaxSetup( {}, options ),
- // Callbacks context
- callbackContext = s.context || s,
- // Context for global events is callbackContext if it is a DOM node or jQuery collection
- globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
- jQuery( callbackContext ) :
- jQuery.event,
- // Deferreds
- deferred = jQuery.Deferred(),
- completeDeferred = jQuery.Callbacks("once memory"),
- // Status-dependent callbacks
- statusCode = s.statusCode || {},
- // Headers (they are sent all at once)
- requestHeaders = {},
- requestHeadersNames = {},
- // The jqXHR state
- state = 0,
- // Default abort message
- strAbort = "canceled",
- // Fake xhr
- jqXHR = {
- readyState: 0,
-
- // Builds headers hashtable if needed
- getResponseHeader: function( key ) {
- var match;
- if ( state === 2 ) {
- if ( !responseHeaders ) {
- responseHeaders = {};
- while ( (match = rheaders.exec( responseHeadersString )) ) {
- responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
- }
- }
- match = responseHeaders[ key.toLowerCase() ];
- }
- return match == null ? null : match;
- },
-
- // Raw string
- getAllResponseHeaders: function() {
- return state === 2 ? responseHeadersString : null;
- },
-
- // Caches the header
- setRequestHeader: function( name, value ) {
- var lname = name.toLowerCase();
- if ( !state ) {
- name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
- requestHeaders[ name ] = value;
- }
- return this;
- },
-
- // Overrides response content-type header
- overrideMimeType: function( type ) {
- if ( !state ) {
- s.mimeType = type;
- }
- return this;
- },
-
- // Status-dependent callbacks
- statusCode: function( map ) {
- var code;
- if ( map ) {
- if ( state < 2 ) {
- for ( code in map ) {
- // Lazy-add the new callback in a way that preserves old ones
- statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
- }
- } else {
- // Execute the appropriate callbacks
- jqXHR.always( map[ jqXHR.status ] );
- }
- }
- return this;
- },
-
- // Cancel the request
- abort: function( statusText ) {
- var finalText = statusText || strAbort;
- if ( transport ) {
- transport.abort( finalText );
- }
- done( 0, finalText );
- return this;
- }
- };
-
- // Attach deferreds
- deferred.promise( jqXHR ).complete = completeDeferred.add;
- jqXHR.success = jqXHR.done;
- jqXHR.error = jqXHR.fail;
-
- // Remove hash character (#7531: and string promotion)
- // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
- // Handle falsy url in the settings object (#10093: consistency with old signature)
- // We also use the url parameter if available
- s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
-
- // Alias method option to type as per ticket #12004
- s.type = options.method || options.type || s.method || s.type;
-
- // Extract dataTypes list
- s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""];
-
- // A cross-domain request is in order when we have a protocol:host:port mismatch
- if ( s.crossDomain == null ) {
- parts = rurl.exec( s.url.toLowerCase() );
- s.crossDomain = !!( parts &&
- ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
- ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
- ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
- );
- }
-
- // Convert data if not already a string
- if ( s.data && s.processData && typeof s.data !== "string" ) {
- s.data = jQuery.param( s.data, s.traditional );
- }
-
- // Apply prefilters
- inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
-
- // If request was aborted inside a prefilter, stop there
- if ( state === 2 ) {
- return jqXHR;
- }
-
- // We can fire global events as of now if asked to
- fireGlobals = s.global;
-
- // Watch for a new set of requests
- if ( fireGlobals && jQuery.active++ === 0 ) {
- jQuery.event.trigger("ajaxStart");
- }
-
- // Uppercase the type
- s.type = s.type.toUpperCase();
-
- // Determine if request has content
- s.hasContent = !rnoContent.test( s.type );
-
- // Save the URL in case we're toying with the If-Modified-Since
- // and/or If-None-Match header later on
- cacheURL = s.url;
-
- // More options handling for requests with no content
- if ( !s.hasContent ) {
-
- // If data is available, append data to url
- if ( s.data ) {
- cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
- // #9682: remove data so that it's not used in an eventual retry
- delete s.data;
- }
-
- // Add anti-cache in url if needed
- if ( s.cache === false ) {
- s.url = rts.test( cacheURL ) ?
-
- // If there is already a '_' parameter, set its value
- cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) :
-
- // Otherwise add one to the end
- cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++;
- }
- }
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if ( s.ifModified ) {
- if ( jQuery.lastModified[ cacheURL ] ) {
- jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
- }
- if ( jQuery.etag[ cacheURL ] ) {
- jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
- }
- }
-
- // Set the correct header, if data is being sent
- if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
- jqXHR.setRequestHeader( "Content-Type", s.contentType );
- }
-
- // Set the Accepts header for the server, depending on the dataType
- jqXHR.setRequestHeader(
- "Accept",
- s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
- s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
- s.accepts[ "*" ]
- );
-
- // Check for headers option
- for ( i in s.headers ) {
- jqXHR.setRequestHeader( i, s.headers[ i ] );
- }
-
- // Allow custom headers/mimetypes and early abort
- if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
- // Abort if not done already and return
- return jqXHR.abort();
- }
-
- // aborting is no longer a cancellation
- strAbort = "abort";
-
- // Install callbacks on deferreds
- for ( i in { success: 1, error: 1, complete: 1 } ) {
- jqXHR[ i ]( s[ i ] );
- }
-
- // Get transport
- transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
-
- // If no transport, we auto-abort
- if ( !transport ) {
- done( -1, "No Transport" );
- } else {
- jqXHR.readyState = 1;
-
- // Send global event
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
- }
- // Timeout
- if ( s.async && s.timeout > 0 ) {
- timeoutTimer = setTimeout(function() {
- jqXHR.abort("timeout");
- }, s.timeout );
- }
-
- try {
- state = 1;
- transport.send( requestHeaders, done );
- } catch ( e ) {
- // Propagate exception as error if not done
- if ( state < 2 ) {
- done( -1, e );
- // Simply rethrow otherwise
- } else {
- throw e;
- }
- }
- }
-
- // Callback for when everything is done
- function done( status, nativeStatusText, responses, headers ) {
- var isSuccess, success, error, response, modified,
- statusText = nativeStatusText;
-
- // Called once
- if ( state === 2 ) {
- return;
- }
-
- // State is "done" now
- state = 2;
-
- // Clear timeout if it exists
- if ( timeoutTimer ) {
- clearTimeout( timeoutTimer );
- }
-
- // Dereference transport for early garbage collection
- // (no matter how long the jqXHR object will be used)
- transport = undefined;
-
- // Cache response headers
- responseHeadersString = headers || "";
-
- // Set readyState
- jqXHR.readyState = status > 0 ? 4 : 0;
-
- // Get response data
- if ( responses ) {
- response = ajaxHandleResponses( s, jqXHR, responses );
- }
-
- // If successful, handle type chaining
- if ( status >= 200 && status < 300 || status === 304 ) {
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if ( s.ifModified ) {
- modified = jqXHR.getResponseHeader("Last-Modified");
- if ( modified ) {
- jQuery.lastModified[ cacheURL ] = modified;
- }
- modified = jqXHR.getResponseHeader("etag");
- if ( modified ) {
- jQuery.etag[ cacheURL ] = modified;
- }
- }
-
- // If not modified
- if ( status === 304 ) {
- isSuccess = true;
- statusText = "notmodified";
-
- // If we have data
- } else {
- isSuccess = ajaxConvert( s, response );
- statusText = isSuccess.state;
- success = isSuccess.data;
- error = isSuccess.error;
- isSuccess = !error;
- }
- } else {
- // We extract error from statusText
- // then normalize statusText and status for non-aborts
- error = statusText;
- if ( status || !statusText ) {
- statusText = "error";
- if ( status < 0 ) {
- status = 0;
- }
- }
- }
-
- // Set data for the fake xhr object
- jqXHR.status = status;
- jqXHR.statusText = ( nativeStatusText || statusText ) + "";
-
- // Success/Error
- if ( isSuccess ) {
- deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
- } else {
- deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
- }
-
- // Status-dependent callbacks
- jqXHR.statusCode( statusCode );
- statusCode = undefined;
-
- if ( fireGlobals ) {
- globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
- [ jqXHR, s, isSuccess ? success : error ] );
- }
-
- // Complete
- completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
-
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
- // Handle the global AJAX counter
- if ( !( --jQuery.active ) ) {
- jQuery.event.trigger("ajaxStop");
- }
- }
- }
-
- return jqXHR;
- },
-
- getScript: function( url, callback ) {
- return jQuery.get( url, undefined, callback, "script" );
- },
-
- getJSON: function( url, data, callback ) {
- return jQuery.get( url, data, callback, "json" );
- }
-});
-
-/* Handles responses to an ajax request:
- * - sets all responseXXX fields accordingly
- * - finds the right dataType (mediates between content-type and expected dataType)
- * - returns the corresponding response
- */
-function ajaxHandleResponses( s, jqXHR, responses ) {
-
- var ct, type, finalDataType, firstDataType,
- contents = s.contents,
- dataTypes = s.dataTypes,
- responseFields = s.responseFields;
-
- // Fill responseXXX fields
- for ( type in responseFields ) {
- if ( type in responses ) {
- jqXHR[ responseFields[type] ] = responses[ type ];
- }
- }
-
- // Remove auto dataType and get content-type in the process
- while( dataTypes[ 0 ] === "*" ) {
- dataTypes.shift();
- if ( ct === undefined ) {
- ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
- }
- }
-
- // Check if we're dealing with a known content-type
- if ( ct ) {
- for ( type in contents ) {
- if ( contents[ type ] && contents[ type ].test( ct ) ) {
- dataTypes.unshift( type );
- break;
- }
- }
- }
-
- // Check to see if we have a response for the expected dataType
- if ( dataTypes[ 0 ] in responses ) {
- finalDataType = dataTypes[ 0 ];
- } else {
- // Try convertible dataTypes
- for ( type in responses ) {
- if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
- finalDataType = type;
- break;
- }
- if ( !firstDataType ) {
- firstDataType = type;
- }
- }
- // Or just use first one
- finalDataType = finalDataType || firstDataType;
- }
-
- // If we found a dataType
- // We add the dataType to the list if needed
- // and return the corresponding response
- if ( finalDataType ) {
- if ( finalDataType !== dataTypes[ 0 ] ) {
- dataTypes.unshift( finalDataType );
- }
- return responses[ finalDataType ];
- }
-}
-
-// Chain conversions given the request and the original response
-function ajaxConvert( s, response ) {
-
- var conv, conv2, current, tmp,
- converters = {},
- i = 0,
- // Work with a copy of dataTypes in case we need to modify it for conversion
- dataTypes = s.dataTypes.slice(),
- prev = dataTypes[ 0 ];
-
- // Apply the dataFilter if provided
- if ( s.dataFilter ) {
- response = s.dataFilter( response, s.dataType );
- }
-
- // Create converters map with lowercased keys
- if ( dataTypes[ 1 ] ) {
- for ( conv in s.converters ) {
- converters[ conv.toLowerCase() ] = s.converters[ conv ];
- }
- }
-
- // Convert to each sequential dataType, tolerating list modification
- for ( ; (current = dataTypes[++i]); ) {
-
- // There's only work to do if current dataType is non-auto
- if ( current !== "*" ) {
-
- // Convert response if prev dataType is non-auto and differs from current
- if ( prev !== "*" && prev !== current ) {
-
- // Seek a direct converter
- conv = converters[ prev + " " + current ] || converters[ "* " + current ];
-
- // If none found, seek a pair
- if ( !conv ) {
- for ( conv2 in converters ) {
-
- // If conv2 outputs current
- tmp = conv2.split(" ");
- if ( tmp[ 1 ] === current ) {
-
- // If prev can be converted to accepted input
- conv = converters[ prev + " " + tmp[ 0 ] ] ||
- converters[ "* " + tmp[ 0 ] ];
- if ( conv ) {
- // Condense equivalence converters
- if ( conv === true ) {
- conv = converters[ conv2 ];
-
- // Otherwise, insert the intermediate dataType
- } else if ( converters[ conv2 ] !== true ) {
- current = tmp[ 0 ];
- dataTypes.splice( i--, 0, current );
- }
-
- break;
- }
- }
- }
- }
-
- // Apply converter (if not an equivalence)
- if ( conv !== true ) {
-
- // Unless errors are allowed to bubble, catch and return them
- if ( conv && s["throws"] ) {
- response = conv( response );
- } else {
- try {
- response = conv( response );
- } catch ( e ) {
- return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
- }
- }
- }
- }
-
- // Update prev for next iteration
- prev = current;
- }
- }
-
- return { state: "success", data: response };
-}
-// Install script dataType
-jQuery.ajaxSetup({
- accepts: {
- script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
- },
- contents: {
- script: /(?:java|ecma)script/
- },
- converters: {
- "text script": function( text ) {
- jQuery.globalEval( text );
- return text;
- }
- }
-});
-
-// Handle cache's special case and global
-jQuery.ajaxPrefilter( "script", function( s ) {
- if ( s.cache === undefined ) {
- s.cache = false;
- }
- if ( s.crossDomain ) {
- s.type = "GET";
- s.global = false;
- }
-});
-
-// Bind script tag hack transport
-jQuery.ajaxTransport( "script", function(s) {
-
- // This transport only deals with cross domain requests
- if ( s.crossDomain ) {
-
- var script,
- head = document.head || jQuery("head")[0] || document.documentElement;
-
- return {
-
- send: function( _, callback ) {
-
- script = document.createElement("script");
-
- script.async = true;
-
- if ( s.scriptCharset ) {
- script.charset = s.scriptCharset;
- }
-
- script.src = s.url;
-
- // Attach handlers for all browsers
- script.onload = script.onreadystatechange = function( _, isAbort ) {
-
- if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
-
- // Handle memory leak in IE
- script.onload = script.onreadystatechange = null;
-
- // Remove the script
- if ( script.parentNode ) {
- script.parentNode.removeChild( script );
- }
-
- // Dereference the script
- script = null;
-
- // Callback if not abort
- if ( !isAbort ) {
- callback( 200, "success" );
- }
- }
- };
-
- // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
- // Use native DOM manipulation to avoid our domManip AJAX trickery
- head.insertBefore( script, head.firstChild );
- },
-
- abort: function() {
- if ( script ) {
- script.onload( undefined, true );
- }
- }
- };
- }
-});
-var oldCallbacks = [],
- rjsonp = /(=)\?(?=&|$)|\?\?/;
-
-// Default jsonp settings
-jQuery.ajaxSetup({
- jsonp: "callback",
- jsonpCallback: function() {
- var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) );
- this[ callback ] = true;
- return callback;
- }
-});
-
-// Detect, normalize options and install callbacks for jsonp requests
-jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
-
- var callbackName, overwritten, responseContainer,
- jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
- "url" :
- typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
- );
-
- // Handle iff the expected data type is "jsonp" or we have a parameter to set
- if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
-
- // Get callback name, remembering preexisting value associated with it
- callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
- s.jsonpCallback() :
- s.jsonpCallback;
-
- // Insert callback into url or form data
- if ( jsonProp ) {
- s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
- } else if ( s.jsonp !== false ) {
- s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
- }
-
- // Use data converter to retrieve json after script execution
- s.converters["script json"] = function() {
- if ( !responseContainer ) {
- jQuery.error( callbackName + " was not called" );
- }
- return responseContainer[ 0 ];
- };
-
- // force json dataType
- s.dataTypes[ 0 ] = "json";
-
- // Install callback
- overwritten = window[ callbackName ];
- window[ callbackName ] = function() {
- responseContainer = arguments;
- };
-
- // Clean-up function (fires after converters)
- jqXHR.always(function() {
- // Restore preexisting value
- window[ callbackName ] = overwritten;
-
- // Save back as free
- if ( s[ callbackName ] ) {
- // make sure that re-using the options doesn't screw things around
- s.jsonpCallback = originalSettings.jsonpCallback;
-
- // save the callback name for future use
- oldCallbacks.push( callbackName );
- }
-
- // Call if it was a function and we have a response
- if ( responseContainer && jQuery.isFunction( overwritten ) ) {
- overwritten( responseContainer[ 0 ] );
- }
-
- responseContainer = overwritten = undefined;
- });
-
- // Delegate to script
- return "script";
- }
-});
-var xhrCallbacks, xhrSupported,
- xhrId = 0,
- // #5280: Internet Explorer will keep connections alive if we don't abort on unload
- xhrOnUnloadAbort = window.ActiveXObject && function() {
- // Abort all pending requests
- var key;
- for ( key in xhrCallbacks ) {
- xhrCallbacks[ key ]( undefined, true );
- }
- };
-
-// Functions to create xhrs
-function createStandardXHR() {
- try {
- return new window.XMLHttpRequest();
- } catch( e ) {}
-}
-
-function createActiveXHR() {
- try {
- return new window.ActiveXObject("Microsoft.XMLHTTP");
- } catch( e ) {}
-}
-
-// Create the request object
-// (This is still attached to ajaxSettings for backward compatibility)
-jQuery.ajaxSettings.xhr = window.ActiveXObject ?
- /* Microsoft failed to properly
- * implement the XMLHttpRequest in IE7 (can't request local files),
- * so we use the ActiveXObject when it is available
- * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
- * we need a fallback.
- */
- function() {
- return !this.isLocal && createStandardXHR() || createActiveXHR();
- } :
- // For all other browsers, use the standard XMLHttpRequest object
- createStandardXHR;
-
-// Determine support properties
-xhrSupported = jQuery.ajaxSettings.xhr();
-jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
-xhrSupported = jQuery.support.ajax = !!xhrSupported;
-
-// Create transport if the browser can provide an xhr
-if ( xhrSupported ) {
-
- jQuery.ajaxTransport(function( s ) {
- // Cross domain only allowed if supported through XMLHttpRequest
- if ( !s.crossDomain || jQuery.support.cors ) {
-
- var callback;
-
- return {
- send: function( headers, complete ) {
-
- // Get a new xhr
- var handle, i,
- xhr = s.xhr();
-
- // Open the socket
- // Passing null username, generates a login popup on Opera (#2865)
- if ( s.username ) {
- xhr.open( s.type, s.url, s.async, s.username, s.password );
- } else {
- xhr.open( s.type, s.url, s.async );
- }
-
- // Apply custom fields if provided
- if ( s.xhrFields ) {
- for ( i in s.xhrFields ) {
- xhr[ i ] = s.xhrFields[ i ];
- }
- }
-
- // Override mime type if needed
- if ( s.mimeType && xhr.overrideMimeType ) {
- xhr.overrideMimeType( s.mimeType );
- }
-
- // X-Requested-With header
- // For cross-domain requests, seeing as conditions for a preflight are
- // akin to a jigsaw puzzle, we simply never set it to be sure.
- // (it can always be set on a per-request basis or even using ajaxSetup)
- // For same-domain requests, won't change header if already provided.
- if ( !s.crossDomain && !headers["X-Requested-With"] ) {
- headers["X-Requested-With"] = "XMLHttpRequest";
- }
-
- // Need an extra try/catch for cross domain requests in Firefox 3
- try {
- for ( i in headers ) {
- xhr.setRequestHeader( i, headers[ i ] );
- }
- } catch( err ) {}
-
- // Do send the request
- // This may raise an exception which is actually
- // handled in jQuery.ajax (so no try/catch here)
- xhr.send( ( s.hasContent && s.data ) || null );
-
- // Listener
- callback = function( _, isAbort ) {
-
- var status,
- statusText,
- responseHeaders,
- responses,
- xml;
-
- // Firefox throws exceptions when accessing properties
- // of an xhr when a network error occurred
- // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
- try {
-
- // Was never called and is aborted or complete
- if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
-
- // Only called once
- callback = undefined;
-
- // Do not keep as active anymore
- if ( handle ) {
- xhr.onreadystatechange = jQuery.noop;
- if ( xhrOnUnloadAbort ) {
- delete xhrCallbacks[ handle ];
- }
- }
-
- // If it's an abort
- if ( isAbort ) {
- // Abort it manually if needed
- if ( xhr.readyState !== 4 ) {
- xhr.abort();
- }
- } else {
- responses = {};
- status = xhr.status;
- xml = xhr.responseXML;
- responseHeaders = xhr.getAllResponseHeaders();
-
- // Construct response list
- if ( xml && xml.documentElement /* #4958 */ ) {
- responses.xml = xml;
- }
-
- // When requesting binary data, IE6-9 will throw an exception
- // on any attempt to access responseText (#11426)
- if ( typeof xhr.responseText === "string" ) {
- responses.text = xhr.responseText;
- }
-
- // Firefox throws an exception when accessing
- // statusText for faulty cross-domain requests
- try {
- statusText = xhr.statusText;
- } catch( e ) {
- // We normalize with Webkit giving an empty statusText
- statusText = "";
- }
-
- // Filter status for non standard behaviors
-
- // If the request is local and we have data: assume a success
- // (success with no data won't get notified, that's the best we
- // can do given current implementations)
- if ( !status && s.isLocal && !s.crossDomain ) {
- status = responses.text ? 200 : 404;
- // IE - #1450: sometimes returns 1223 when it should be 204
- } else if ( status === 1223 ) {
- status = 204;
- }
- }
- }
- } catch( firefoxAccessException ) {
- if ( !isAbort ) {
- complete( -1, firefoxAccessException );
- }
- }
-
- // Call complete if needed
- if ( responses ) {
- complete( status, statusText, responses, responseHeaders );
- }
- };
-
- if ( !s.async ) {
- // if we're in sync mode we fire the callback
- callback();
- } else if ( xhr.readyState === 4 ) {
- // (IE6 & IE7) if it's in cache and has been
- // retrieved directly we need to fire the callback
- setTimeout( callback );
- } else {
- handle = ++xhrId;
- if ( xhrOnUnloadAbort ) {
- // Create the active xhrs callbacks list if needed
- // and attach the unload handler
- if ( !xhrCallbacks ) {
- xhrCallbacks = {};
- jQuery( window ).unload( xhrOnUnloadAbort );
- }
- // Add to list of active xhrs callbacks
- xhrCallbacks[ handle ] = callback;
- }
- xhr.onreadystatechange = callback;
- }
- },
-
- abort: function() {
- if ( callback ) {
- callback( undefined, true );
- }
- }
- };
- }
- });
-}
-var fxNow, timerId,
- rfxtypes = /^(?:toggle|show|hide)$/,
- rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ),
- rrun = /queueHooks$/,
- animationPrefilters = [ defaultPrefilter ],
- tweeners = {
- "*": [function( prop, value ) {
- var end, unit,
- tween = this.createTween( prop, value ),
- parts = rfxnum.exec( value ),
- target = tween.cur(),
- start = +target || 0,
- scale = 1,
- maxIterations = 20;
-
- if ( parts ) {
- end = +parts[2];
- unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" );
-
- // We need to compute starting value
- if ( unit !== "px" && start ) {
- // Iteratively approximate from a nonzero starting point
- // Prefer the current property, because this process will be trivial if it uses the same units
- // Fallback to end or a simple constant
- start = jQuery.css( tween.elem, prop, true ) || end || 1;
-
- do {
- // If previous iteration zeroed out, double until we get *something*
- // Use a string for doubling factor so we don't accidentally see scale as unchanged below
- scale = scale || ".5";
-
- // Adjust and apply
- start = start / scale;
- jQuery.style( tween.elem, prop, start + unit );
-
- // Update scale, tolerating zero or NaN from tween.cur()
- // And breaking the loop if scale is unchanged or perfect, or if we've just had enough
- } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
- }
-
- tween.unit = unit;
- tween.start = start;
- // If a +=/-= token was provided, we're doing a relative animation
- tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end;
- }
- return tween;
- }]
- };
-
-// Animations created synchronously will run synchronously
-function createFxNow() {
- setTimeout(function() {
- fxNow = undefined;
- });
- return ( fxNow = jQuery.now() );
-}
-
-function createTweens( animation, props ) {
- jQuery.each( props, function( prop, value ) {
- var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
- index = 0,
- length = collection.length;
- for ( ; index < length; index++ ) {
- if ( collection[ index ].call( animation, prop, value ) ) {
-
- // we're done with this property
- return;
- }
- }
- });
-}
-
-function Animation( elem, properties, options ) {
- var result,
- stopped,
- index = 0,
- length = animationPrefilters.length,
- deferred = jQuery.Deferred().always( function() {
- // don't match elem in the :animated selector
- delete tick.elem;
- }),
- tick = function() {
- if ( stopped ) {
- return false;
- }
- var currentTime = fxNow || createFxNow(),
- remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
- // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
- temp = remaining / animation.duration || 0,
- percent = 1 - temp,
- index = 0,
- length = animation.tweens.length;
-
- for ( ; index < length ; index++ ) {
- animation.tweens[ index ].run( percent );
- }
-
- deferred.notifyWith( elem, [ animation, percent, remaining ]);
-
- if ( percent < 1 && length ) {
- return remaining;
- } else {
- deferred.resolveWith( elem, [ animation ] );
- return false;
- }
- },
- animation = deferred.promise({
- elem: elem,
- props: jQuery.extend( {}, properties ),
- opts: jQuery.extend( true, { specialEasing: {} }, options ),
- originalProperties: properties,
- originalOptions: options,
- startTime: fxNow || createFxNow(),
- duration: options.duration,
- tweens: [],
- createTween: function( prop, end ) {
- var tween = jQuery.Tween( elem, animation.opts, prop, end,
- animation.opts.specialEasing[ prop ] || animation.opts.easing );
- animation.tweens.push( tween );
- return tween;
- },
- stop: function( gotoEnd ) {
- var index = 0,
- // if we are going to the end, we want to run all the tweens
- // otherwise we skip this part
- length = gotoEnd ? animation.tweens.length : 0;
- if ( stopped ) {
- return this;
- }
- stopped = true;
- for ( ; index < length ; index++ ) {
- animation.tweens[ index ].run( 1 );
- }
-
- // resolve when we played the last frame
- // otherwise, reject
- if ( gotoEnd ) {
- deferred.resolveWith( elem, [ animation, gotoEnd ] );
- } else {
- deferred.rejectWith( elem, [ animation, gotoEnd ] );
- }
- return this;
- }
- }),
- props = animation.props;
-
- propFilter( props, animation.opts.specialEasing );
-
- for ( ; index < length ; index++ ) {
- result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
- if ( result ) {
- return result;
- }
- }
-
- createTweens( animation, props );
-
- if ( jQuery.isFunction( animation.opts.start ) ) {
- animation.opts.start.call( elem, animation );
- }
-
- jQuery.fx.timer(
- jQuery.extend( tick, {
- elem: elem,
- anim: animation,
- queue: animation.opts.queue
- })
- );
-
- // attach callbacks from options
- return animation.progress( animation.opts.progress )
- .done( animation.opts.done, animation.opts.complete )
- .fail( animation.opts.fail )
- .always( animation.opts.always );
-}
-
-function propFilter( props, specialEasing ) {
- var index, name, easing, value, hooks;
-
- // camelCase, specialEasing and expand cssHook pass
- for ( index in props ) {
- name = jQuery.camelCase( index );
- easing = specialEasing[ name ];
- value = props[ index ];
- if ( jQuery.isArray( value ) ) {
- easing = value[ 1 ];
- value = props[ index ] = value[ 0 ];
- }
-
- if ( index !== name ) {
- props[ name ] = value;
- delete props[ index ];
- }
-
- hooks = jQuery.cssHooks[ name ];
- if ( hooks && "expand" in hooks ) {
- value = hooks.expand( value );
- delete props[ name ];
-
- // not quite $.extend, this wont overwrite keys already present.
- // also - reusing 'index' from above because we have the correct "name"
- for ( index in value ) {
- if ( !( index in props ) ) {
- props[ index ] = value[ index ];
- specialEasing[ index ] = easing;
- }
- }
- } else {
- specialEasing[ name ] = easing;
- }
- }
-}
-
-jQuery.Animation = jQuery.extend( Animation, {
-
- tweener: function( props, callback ) {
- if ( jQuery.isFunction( props ) ) {
- callback = props;
- props = [ "*" ];
- } else {
- props = props.split(" ");
- }
-
- var prop,
- index = 0,
- length = props.length;
-
- for ( ; index < length ; index++ ) {
- prop = props[ index ];
- tweeners[ prop ] = tweeners[ prop ] || [];
- tweeners[ prop ].unshift( callback );
- }
- },
-
- prefilter: function( callback, prepend ) {
- if ( prepend ) {
- animationPrefilters.unshift( callback );
- } else {
- animationPrefilters.push( callback );
- }
- }
-});
-
-function defaultPrefilter( elem, props, opts ) {
- /*jshint validthis:true */
- var index, prop, value, length, dataShow, toggle, tween, hooks, oldfire,
- anim = this,
- style = elem.style,
- orig = {},
- handled = [],
- hidden = elem.nodeType && isHidden( elem );
-
- // handle queue: false promises
- if ( !opts.queue ) {
- hooks = jQuery._queueHooks( elem, "fx" );
- if ( hooks.unqueued == null ) {
- hooks.unqueued = 0;
- oldfire = hooks.empty.fire;
- hooks.empty.fire = function() {
- if ( !hooks.unqueued ) {
- oldfire();
- }
- };
- }
- hooks.unqueued++;
-
- anim.always(function() {
- // doing this makes sure that the complete handler will be called
- // before this completes
- anim.always(function() {
- hooks.unqueued--;
- if ( !jQuery.queue( elem, "fx" ).length ) {
- hooks.empty.fire();
- }
- });
- });
- }
-
- // height/width overflow pass
- if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
- // Make sure that nothing sneaks out
- // Record all 3 overflow attributes because IE does not
- // change the overflow attribute when overflowX and
- // overflowY are set to the same value
- opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
-
- // Set display property to inline-block for height/width
- // animations on inline elements that are having width/height animated
- if ( jQuery.css( elem, "display" ) === "inline" &&
- jQuery.css( elem, "float" ) === "none" ) {
-
- // inline-level elements accept inline-block;
- // block-level elements need to be inline with layout
- if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) {
- style.display = "inline-block";
-
- } else {
- style.zoom = 1;
- }
- }
- }
-
- if ( opts.overflow ) {
- style.overflow = "hidden";
- if ( !jQuery.support.shrinkWrapBlocks ) {
- anim.done(function() {
- style.overflow = opts.overflow[ 0 ];
- style.overflowX = opts.overflow[ 1 ];
- style.overflowY = opts.overflow[ 2 ];
- });
- }
- }
-
-
- // show/hide pass
- for ( index in props ) {
- value = props[ index ];
- if ( rfxtypes.exec( value ) ) {
- delete props[ index ];
- toggle = toggle || value === "toggle";
- if ( value === ( hidden ? "hide" : "show" ) ) {
- continue;
- }
- handled.push( index );
- }
- }
-
- length = handled.length;
- if ( length ) {
- dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} );
- if ( "hidden" in dataShow ) {
- hidden = dataShow.hidden;
- }
-
- // store state if its toggle - enables .stop().toggle() to "reverse"
- if ( toggle ) {
- dataShow.hidden = !hidden;
- }
- if ( hidden ) {
- jQuery( elem ).show();
- } else {
- anim.done(function() {
- jQuery( elem ).hide();
- });
- }
- anim.done(function() {
- var prop;
- jQuery._removeData( elem, "fxshow" );
- for ( prop in orig ) {
- jQuery.style( elem, prop, orig[ prop ] );
- }
- });
- for ( index = 0 ; index < length ; index++ ) {
- prop = handled[ index ];
- tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 );
- orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop );
-
- if ( !( prop in dataShow ) ) {
- dataShow[ prop ] = tween.start;
- if ( hidden ) {
- tween.end = tween.start;
- tween.start = prop === "width" || prop === "height" ? 1 : 0;
- }
- }
- }
- }
-}
-
-function Tween( elem, options, prop, end, easing ) {
- return new Tween.prototype.init( elem, options, prop, end, easing );
-}
-jQuery.Tween = Tween;
-
-Tween.prototype = {
- constructor: Tween,
- init: function( elem, options, prop, end, easing, unit ) {
- this.elem = elem;
- this.prop = prop;
- this.easing = easing || "swing";
- this.options = options;
- this.start = this.now = this.cur();
- this.end = end;
- this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
- },
- cur: function() {
- var hooks = Tween.propHooks[ this.prop ];
-
- return hooks && hooks.get ?
- hooks.get( this ) :
- Tween.propHooks._default.get( this );
- },
- run: function( percent ) {
- var eased,
- hooks = Tween.propHooks[ this.prop ];
-
- if ( this.options.duration ) {
- this.pos = eased = jQuery.easing[ this.easing ](
- percent, this.options.duration * percent, 0, 1, this.options.duration
- );
- } else {
- this.pos = eased = percent;
- }
- this.now = ( this.end - this.start ) * eased + this.start;
-
- if ( this.options.step ) {
- this.options.step.call( this.elem, this.now, this );
- }
-
- if ( hooks && hooks.set ) {
- hooks.set( this );
- } else {
- Tween.propHooks._default.set( this );
- }
- return this;
- }
-};
-
-Tween.prototype.init.prototype = Tween.prototype;
-
-Tween.propHooks = {
- _default: {
- get: function( tween ) {
- var result;
-
- if ( tween.elem[ tween.prop ] != null &&
- (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
- return tween.elem[ tween.prop ];
- }
-
- // passing a non empty string as a 3rd parameter to .css will automatically
- // attempt a parseFloat and fallback to a string if the parse fails
- // so, simple values such as "10px" are parsed to Float.
- // complex values such as "rotate(1rad)" are returned as is.
- result = jQuery.css( tween.elem, tween.prop, "auto" );
- // Empty strings, null, undefined and "auto" are converted to 0.
- return !result || result === "auto" ? 0 : result;
- },
- set: function( tween ) {
- // use step hook for back compat - use cssHook if its there - use .style if its
- // available and use plain properties where available
- if ( jQuery.fx.step[ tween.prop ] ) {
- jQuery.fx.step[ tween.prop ]( tween );
- } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
- jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
- } else {
- tween.elem[ tween.prop ] = tween.now;
- }
- }
- }
-};
-
-// Remove in 2.0 - this supports IE8's panic based approach
-// to setting things on disconnected nodes
-
-Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
- set: function( tween ) {
- if ( tween.elem.nodeType && tween.elem.parentNode ) {
- tween.elem[ tween.prop ] = tween.now;
- }
- }
-};
-
-jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
- var cssFn = jQuery.fn[ name ];
- jQuery.fn[ name ] = function( speed, easing, callback ) {
- return speed == null || typeof speed === "boolean" ?
- cssFn.apply( this, arguments ) :
- this.animate( genFx( name, true ), speed, easing, callback );
- };
-});
-
-jQuery.fn.extend({
- fadeTo: function( speed, to, easing, callback ) {
-
- // show any hidden elements after setting opacity to 0
- return this.filter( isHidden ).css( "opacity", 0 ).show()
-
- // animate to the value specified
- .end().animate({ opacity: to }, speed, easing, callback );
- },
- animate: function( prop, speed, easing, callback ) {
- var empty = jQuery.isEmptyObject( prop ),
- optall = jQuery.speed( speed, easing, callback ),
- doAnimation = function() {
- // Operate on a copy of prop so per-property easing won't be lost
- var anim = Animation( this, jQuery.extend( {}, prop ), optall );
- doAnimation.finish = function() {
- anim.stop( true );
- };
- // Empty animations, or finishing resolves immediately
- if ( empty || jQuery._data( this, "finish" ) ) {
- anim.stop( true );
- }
- };
- doAnimation.finish = doAnimation;
-
- return empty || optall.queue === false ?
- this.each( doAnimation ) :
- this.queue( optall.queue, doAnimation );
- },
- stop: function( type, clearQueue, gotoEnd ) {
- var stopQueue = function( hooks ) {
- var stop = hooks.stop;
- delete hooks.stop;
- stop( gotoEnd );
- };
-
- if ( typeof type !== "string" ) {
- gotoEnd = clearQueue;
- clearQueue = type;
- type = undefined;
- }
- if ( clearQueue && type !== false ) {
- this.queue( type || "fx", [] );
- }
-
- return this.each(function() {
- var dequeue = true,
- index = type != null && type + "queueHooks",
- timers = jQuery.timers,
- data = jQuery._data( this );
-
- if ( index ) {
- if ( data[ index ] && data[ index ].stop ) {
- stopQueue( data[ index ] );
- }
- } else {
- for ( index in data ) {
- if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
- stopQueue( data[ index ] );
- }
- }
- }
-
- for ( index = timers.length; index--; ) {
- if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
- timers[ index ].anim.stop( gotoEnd );
- dequeue = false;
- timers.splice( index, 1 );
- }
- }
-
- // start the next in the queue if the last step wasn't forced
- // timers currently will call their complete callbacks, which will dequeue
- // but only if they were gotoEnd
- if ( dequeue || !gotoEnd ) {
- jQuery.dequeue( this, type );
- }
- });
- },
- finish: function( type ) {
- if ( type !== false ) {
- type = type || "fx";
- }
- return this.each(function() {
- var index,
- data = jQuery._data( this ),
- queue = data[ type + "queue" ],
- hooks = data[ type + "queueHooks" ],
- timers = jQuery.timers,
- length = queue ? queue.length : 0;
-
- // enable finishing flag on private data
- data.finish = true;
-
- // empty the queue first
- jQuery.queue( this, type, [] );
-
- if ( hooks && hooks.cur && hooks.cur.finish ) {
- hooks.cur.finish.call( this );
- }
-
- // look for any active animations, and finish them
- for ( index = timers.length; index--; ) {
- if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
- timers[ index ].anim.stop( true );
- timers.splice( index, 1 );
- }
- }
-
- // look for any animations in the old queue and finish them
- for ( index = 0; index < length; index++ ) {
- if ( queue[ index ] && queue[ index ].finish ) {
- queue[ index ].finish.call( this );
- }
- }
-
- // turn off finishing flag
- delete data.finish;
- });
- }
-});
-
-// Generate parameters to create a standard animation
-function genFx( type, includeWidth ) {
- var which,
- attrs = { height: type },
- i = 0;
-
- // if we include width, step value is 1 to do all cssExpand values,
- // if we don't include width, step value is 2 to skip over Left and Right
- includeWidth = includeWidth? 1 : 0;
- for( ; i < 4 ; i += 2 - includeWidth ) {
- which = cssExpand[ i ];
- attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
- }
-
- if ( includeWidth ) {
- attrs.opacity = attrs.width = type;
- }
-
- return attrs;
-}
-
-// Generate shortcuts for custom animations
-jQuery.each({
- slideDown: genFx("show"),
- slideUp: genFx("hide"),
- slideToggle: genFx("toggle"),
- fadeIn: { opacity: "show" },
- fadeOut: { opacity: "hide" },
- fadeToggle: { opacity: "toggle" }
-}, function( name, props ) {
- jQuery.fn[ name ] = function( speed, easing, callback ) {
- return this.animate( props, speed, easing, callback );
- };
-});
-
-jQuery.speed = function( speed, easing, fn ) {
- var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
- complete: fn || !fn && easing ||
- jQuery.isFunction( speed ) && speed,
- duration: speed,
- easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
- };
-
- opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
- opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
-
- // normalize opt.queue - true/undefined/null -> "fx"
- if ( opt.queue == null || opt.queue === true ) {
- opt.queue = "fx";
- }
-
- // Queueing
- opt.old = opt.complete;
-
- opt.complete = function() {
- if ( jQuery.isFunction( opt.old ) ) {
- opt.old.call( this );
- }
-
- if ( opt.queue ) {
- jQuery.dequeue( this, opt.queue );
- }
- };
-
- return opt;
-};
-
-jQuery.easing = {
- linear: function( p ) {
- return p;
- },
- swing: function( p ) {
- return 0.5 - Math.cos( p*Math.PI ) / 2;
- }
-};
-
-jQuery.timers = [];
-jQuery.fx = Tween.prototype.init;
-jQuery.fx.tick = function() {
- var timer,
- timers = jQuery.timers,
- i = 0;
-
- fxNow = jQuery.now();
-
- for ( ; i < timers.length; i++ ) {
- timer = timers[ i ];
- // Checks the timer has not already been removed
- if ( !timer() && timers[ i ] === timer ) {
- timers.splice( i--, 1 );
- }
- }
-
- if ( !timers.length ) {
- jQuery.fx.stop();
- }
- fxNow = undefined;
-};
-
-jQuery.fx.timer = function( timer ) {
- if ( timer() && jQuery.timers.push( timer ) ) {
- jQuery.fx.start();
- }
-};
-
-jQuery.fx.interval = 13;
-
-jQuery.fx.start = function() {
- if ( !timerId ) {
- timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
- }
-};
-
-jQuery.fx.stop = function() {
- clearInterval( timerId );
- timerId = null;
-};
-
-jQuery.fx.speeds = {
- slow: 600,
- fast: 200,
- // Default speed
- _default: 400
-};
-
-// Back Compat <1.8 extension point
-jQuery.fx.step = {};
-
-if ( jQuery.expr && jQuery.expr.filters ) {
- jQuery.expr.filters.animated = function( elem ) {
- return jQuery.grep(jQuery.timers, function( fn ) {
- return elem === fn.elem;
- }).length;
- };
-}
-jQuery.fn.offset = function( options ) {
- if ( arguments.length ) {
- return options === undefined ?
- this :
- this.each(function( i ) {
- jQuery.offset.setOffset( this, options, i );
- });
- }
-
- var docElem, win,
- box = { top: 0, left: 0 },
- elem = this[ 0 ],
- doc = elem && elem.ownerDocument;
-
- if ( !doc ) {
- return;
- }
-
- docElem = doc.documentElement;
-
- // Make sure it's not a disconnected DOM node
- if ( !jQuery.contains( docElem, elem ) ) {
- return box;
- }
-
- // If we don't have gBCR, just use 0,0 rather than error
- // BlackBerry 5, iOS 3 (original iPhone)
- if ( typeof elem.getBoundingClientRect !== "undefined" ) {
- box = elem.getBoundingClientRect();
- }
- win = getWindow( doc );
- return {
- top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),
- left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
- };
-};
-
-jQuery.offset = {
-
- setOffset: function( elem, options, i ) {
- var position = jQuery.css( elem, "position" );
-
- // set position first, in-case top/left are set even on static elem
- if ( position === "static" ) {
- elem.style.position = "relative";
- }
-
- var curElem = jQuery( elem ),
- curOffset = curElem.offset(),
- curCSSTop = jQuery.css( elem, "top" ),
- curCSSLeft = jQuery.css( elem, "left" ),
- calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
- props = {}, curPosition = {}, curTop, curLeft;
-
- // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
- if ( calculatePosition ) {
- curPosition = curElem.position();
- curTop = curPosition.top;
- curLeft = curPosition.left;
- } else {
- curTop = parseFloat( curCSSTop ) || 0;
- curLeft = parseFloat( curCSSLeft ) || 0;
- }
-
- if ( jQuery.isFunction( options ) ) {
- options = options.call( elem, i, curOffset );
- }
-
- if ( options.top != null ) {
- props.top = ( options.top - curOffset.top ) + curTop;
- }
- if ( options.left != null ) {
- props.left = ( options.left - curOffset.left ) + curLeft;
- }
-
- if ( "using" in options ) {
- options.using.call( elem, props );
- } else {
- curElem.css( props );
- }
- }
-};
-
-
-jQuery.fn.extend({
-
- position: function() {
- if ( !this[ 0 ] ) {
- return;
- }
-
- var offsetParent, offset,
- parentOffset = { top: 0, left: 0 },
- elem = this[ 0 ];
-
- // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent
- if ( jQuery.css( elem, "position" ) === "fixed" ) {
- // we assume that getBoundingClientRect is available when computed position is fixed
- offset = elem.getBoundingClientRect();
- } else {
- // Get *real* offsetParent
- offsetParent = this.offsetParent();
-
- // Get correct offsets
- offset = this.offset();
- if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
- parentOffset = offsetParent.offset();
- }
-
- // Add offsetParent borders
- parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
- parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
- }
-
- // Subtract parent offsets and element margins
- // note: when an element has margin: auto the offsetLeft and marginLeft
- // are the same in Safari causing offset.left to incorrectly be 0
- return {
- top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
- left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true)
- };
- },
-
- offsetParent: function() {
- return this.map(function() {
- var offsetParent = this.offsetParent || document.documentElement;
- while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) {
- offsetParent = offsetParent.offsetParent;
- }
- return offsetParent || document.documentElement;
- });
- }
-});
-
-
-// Create scrollLeft and scrollTop methods
-jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) {
- var top = /Y/.test( prop );
-
- jQuery.fn[ method ] = function( val ) {
- return jQuery.access( this, function( elem, method, val ) {
- var win = getWindow( elem );
-
- if ( val === undefined ) {
- return win ? (prop in win) ? win[ prop ] :
- win.document.documentElement[ method ] :
- elem[ method ];
- }
-
- if ( win ) {
- win.scrollTo(
- !top ? val : jQuery( win ).scrollLeft(),
- top ? val : jQuery( win ).scrollTop()
- );
-
- } else {
- elem[ method ] = val;
- }
- }, method, val, arguments.length, null );
- };
-});
-
-function getWindow( elem ) {
- return jQuery.isWindow( elem ) ?
- elem :
- elem.nodeType === 9 ?
- elem.defaultView || elem.parentWindow :
- false;
-}
-// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
-jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
- jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
- // margin is only for outerHeight, outerWidth
- jQuery.fn[ funcName ] = function( margin, value ) {
- var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
- extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
-
- return jQuery.access( this, function( elem, type, value ) {
- var doc;
-
- if ( jQuery.isWindow( elem ) ) {
- // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
- // isn't a whole lot we can do. See pull request at this URL for discussion:
- // https://github.com/jquery/jquery/pull/764
- return elem.document.documentElement[ "client" + name ];
- }
-
- // Get document width or height
- if ( elem.nodeType === 9 ) {
- doc = elem.documentElement;
-
- // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
- // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
- return Math.max(
- elem.body[ "scroll" + name ], doc[ "scroll" + name ],
- elem.body[ "offset" + name ], doc[ "offset" + name ],
- doc[ "client" + name ]
- );
- }
-
- return value === undefined ?
- // Get width or height on the element, requesting but not forcing parseFloat
- jQuery.css( elem, type, extra ) :
-
- // Set width or height on the element
- jQuery.style( elem, type, value, extra );
- }, type, chainable ? margin : undefined, chainable, null );
- };
- });
-});
-// Limit scope pollution from any deprecated API
-// (function() {
-
-// })();
-// Expose jQuery to the global object
-window.jQuery = window.$ = jQuery;
-
-// Expose jQuery as an AMD module, but only for AMD loaders that
-// understand the issues with loading multiple versions of jQuery
-// in a page that all might call define(). The loader will indicate
-// they have special allowances for multiple jQuery versions by
-// specifying define.amd.jQuery = true. Register as a named module,
-// since jQuery can be concatenated with other files that may use define,
-// but not use a proper concatenation script that understands anonymous
-// AMD modules. A named AMD is safest and most robust way to register.
-// Lowercase jquery is used because AMD module names are derived from
-// file names, and jQuery is normally delivered in a lowercase file name.
-// Do this after creating the global so that if an AMD module wants to call
-// noConflict to hide this version of jQuery, it will work.
-if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
- define( "jquery", [], function () { return jQuery; } );
-}
-
-})( window ); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/js/layout/jquery-ui-latest.js b/ecomp-portal-BE/war/static/fusion/js/layout/jquery-ui-latest.js
deleted file mode 100644
index aa83af97..00000000
--- a/ecomp-portal-BE/war/static/fusion/js/layout/jquery-ui-latest.js
+++ /dev/null
@@ -1,14879 +0,0 @@
-/*! jQuery UI - v1.9.2 - 2012-11-23
-* http://jqueryui.com
-* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.slider.js, jquery.ui.sortable.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
-* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */
-
-(function( $, undefined ) {
-
-var uuid = 0,
- runiqueId = /^ui-id-\d+$/;
-
-// prevent duplicate loading
-// this is only a problem because we proxy existing functions
-// and we don't want to double proxy them
-$.ui = $.ui || {};
-if ( $.ui.version ) {
- return;
-}
-
-$.extend( $.ui, {
- version: "1.9.2",
-
- keyCode: {
- BACKSPACE: 8,
- COMMA: 188,
- DELETE: 46,
- DOWN: 40,
- END: 35,
- ENTER: 13,
- ESCAPE: 27,
- HOME: 36,
- LEFT: 37,
- NUMPAD_ADD: 107,
- NUMPAD_DECIMAL: 110,
- NUMPAD_DIVIDE: 111,
- NUMPAD_ENTER: 108,
- NUMPAD_MULTIPLY: 106,
- NUMPAD_SUBTRACT: 109,
- PAGE_DOWN: 34,
- PAGE_UP: 33,
- PERIOD: 190,
- RIGHT: 39,
- SPACE: 32,
- TAB: 9,
- UP: 38
- }
-});
-
-// plugins
-$.fn.extend({
- _focus: $.fn.focus,
- focus: function( delay, fn ) {
- return typeof delay === "number" ?
- this.each(function() {
- var elem = this;
- setTimeout(function() {
- $( elem ).focus();
- if ( fn ) {
- fn.call( elem );
- }
- }, delay );
- }) :
- this._focus.apply( this, arguments );
- },
-
- scrollParent: function() {
- var scrollParent;
- if (($.ui.ie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
- scrollParent = this.parents().filter(function() {
- return (/(relative|absolute|fixed)/).test($.css(this,'position')) && (/(auto|scroll)/).test($.css(this,'overflow')+$.css(this,'overflow-y')+$.css(this,'overflow-x'));
- }).eq(0);
- } else {
- scrollParent = this.parents().filter(function() {
- return (/(auto|scroll)/).test($.css(this,'overflow')+$.css(this,'overflow-y')+$.css(this,'overflow-x'));
- }).eq(0);
- }
-
- return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;
- },
-
- zIndex: function( zIndex ) {
- if ( zIndex !== undefined ) {
- return this.css( "zIndex", zIndex );
- }
-
- if ( this.length ) {
- var elem = $( this[ 0 ] ), position, value;
- while ( elem.length && elem[ 0 ] !== document ) {
- // Ignore z-index if position is set to a value where z-index is ignored by the browser
- // This makes behavior of this function consistent across browsers
- // WebKit always returns auto if the element is positioned
- position = elem.css( "position" );
- if ( position === "absolute" || position === "relative" || position === "fixed" ) {
- // IE returns 0 when zIndex is not specified
- // other browsers return a string
- // we ignore the case of nested elements with an explicit value of 0
- // <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
- value = parseInt( elem.css( "zIndex" ), 10 );
- if ( !isNaN( value ) && value !== 0 ) {
- return value;
- }
- }
- elem = elem.parent();
- }
- }
-
- return 0;
- },
-
- uniqueId: function() {
- return this.each(function() {
- if ( !this.id ) {
- this.id = "ui-id-" + (++uuid);
- }
- });
- },
-
- removeUniqueId: function() {
- return this.each(function() {
- if ( runiqueId.test( this.id ) ) {
- $( this ).removeAttr( "id" );
- }
- });
- }
-});
-
-// selectors
-function focusable( element, isTabIndexNotNaN ) {
- var map, mapName, img,
- nodeName = element.nodeName.toLowerCase();
- if ( "area" === nodeName ) {
- map = element.parentNode;
- mapName = map.name;
- if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
- return false;
- }
- img = $( "img[usemap=#" + mapName + "]" )[0];
- return !!img && visible( img );
- }
- return ( /input|select|textarea|button|object/.test( nodeName ) ?
- !element.disabled :
- "a" === nodeName ?
- element.href || isTabIndexNotNaN :
- isTabIndexNotNaN) &&
- // the element and all of its ancestors must be visible
- visible( element );
-}
-
-function visible( element ) {
- return $.expr.filters.visible( element ) &&
- !$( element ).parents().andSelf().filter(function() {
- return $.css( this, "visibility" ) === "hidden";
- }).length;
-}
-
-$.extend( $.expr[ ":" ], {
- data: $.expr.createPseudo ?
- $.expr.createPseudo(function( dataName ) {
- return function( elem ) {
- return !!$.data( elem, dataName );
- };
- }) :
- // support: jQuery <1.8
- function( elem, i, match ) {
- return !!$.data( elem, match[ 3 ] );
- },
-
- focusable: function( element ) {
- return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
- },
-
- tabbable: function( element ) {
- var tabIndex = $.attr( element, "tabindex" ),
- isTabIndexNaN = isNaN( tabIndex );
- return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
- }
-});
-
-// support
-$(function() {
- var body = document.body,
- div = body.appendChild( div = document.createElement( "div" ) );
-
- // access offsetHeight before setting the style to prevent a layout bug
- // in IE 9 which causes the element to continue to take up space even
- // after it is removed from the DOM (#8026)
- div.offsetHeight;
-
- $.extend( div.style, {
- minHeight: "100px",
- height: "auto",
- padding: 0,
- borderWidth: 0
- });
-
- $.support.minHeight = div.offsetHeight === 100;
- $.support.selectstart = "onselectstart" in div;
-
- // set display to none to avoid a layout bug in IE
- // http://dev.jquery.com/ticket/4014
- body.removeChild( div ).style.display = "none";
-});
-
-// support: jQuery <1.8
-if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
- $.each( [ "Width", "Height" ], function( i, name ) {
- var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
- type = name.toLowerCase(),
- orig = {
- innerWidth: $.fn.innerWidth,
- innerHeight: $.fn.innerHeight,
- outerWidth: $.fn.outerWidth,
- outerHeight: $.fn.outerHeight
- };
-
- function reduce( elem, size, border, margin ) {
- $.each( side, function() {
- size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
- if ( border ) {
- size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
- }
- if ( margin ) {
- size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
- }
- });
- return size;
- }
-
- $.fn[ "inner" + name ] = function( size ) {
- if ( size === undefined ) {
- return orig[ "inner" + name ].call( this );
- }
-
- return this.each(function() {
- $( this ).css( type, reduce( this, size ) + "px" );
- });
- };
-
- $.fn[ "outer" + name] = function( size, margin ) {
- if ( typeof size !== "number" ) {
- return orig[ "outer" + name ].call( this, size );
- }
-
- return this.each(function() {
- $( this).css( type, reduce( this, size, true, margin ) + "px" );
- });
- };
- });
-}
-
-// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
-if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
- $.fn.removeData = (function( removeData ) {
- return function( key ) {
- if ( arguments.length ) {
- return removeData.call( this, $.camelCase( key ) );
- } else {
- return removeData.call( this );
- }
- };
- })( $.fn.removeData );
-}
-
-
-
-
-
-// deprecated
-
-(function() {
- var uaMatch = /msie ([\w.]+)/.exec( navigator.userAgent.toLowerCase() ) || [];
- $.ui.ie = uaMatch.length ? true : false;
- $.ui.ie6 = parseFloat( uaMatch[ 1 ], 10 ) === 6;
-})();
-
-$.fn.extend({
- disableSelection: function() {
- return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
- ".ui-disableSelection", function( event ) {
- event.preventDefault();
- });
- },
-
- enableSelection: function() {
- return this.unbind( ".ui-disableSelection" );
- }
-});
-
-$.extend( $.ui, {
- // $.ui.plugin is deprecated. Use the proxy pattern instead.
- plugin: {
- add: function( module, option, set ) {
- var i,
- proto = $.ui[ module ].prototype;
- for ( i in set ) {
- proto.plugins[ i ] = proto.plugins[ i ] || [];
- proto.plugins[ i ].push( [ option, set[ i ] ] );
- }
- },
- call: function( instance, name, args ) {
- var i,
- set = instance.plugins[ name ];
- if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {
- return;
- }
-
- for ( i = 0; i < set.length; i++ ) {
- if ( instance.options[ set[ i ][ 0 ] ] ) {
- set[ i ][ 1 ].apply( instance.element, args );
- }
- }
- }
- },
-
- contains: $.contains,
-
- // only used by resizable
- hasScroll: function( el, a ) {
-
- //If overflow is hidden, the element might have extra content, but the user wants to hide it
- if ( $( el ).css( "overflow" ) === "hidden") {
- return false;
- }
-
- var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
- has = false;
-
- if ( el[ scroll ] > 0 ) {
- return true;
- }
-
- // TODO: determine which cases actually cause this to happen
- // if the element doesn't have the scroll set, see if it's possible to
- // set the scroll
- el[ scroll ] = 1;
- has = ( el[ scroll ] > 0 );
- el[ scroll ] = 0;
- return has;
- },
-
- // these are odd functions, fix the API or move into individual plugins
- isOverAxis: function( x, reference, size ) {
- //Determines when x coordinate is over "b" element axis
- return ( x > reference ) && ( x < ( reference + size ) );
- },
- isOver: function( y, x, top, left, height, width ) {
- //Determines when x, y coordinates is over "b" element
- return $.ui.isOverAxis( y, top, height ) && $.ui.isOverAxis( x, left, width );
- }
-});
-
-})( jQuery );
-(function( $, undefined ) {
-
-var uuid = 0,
- slice = Array.prototype.slice,
- _cleanData = $.cleanData;
-$.cleanData = function( elems ) {
- for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
- try {
- $( elem ).triggerHandler( "remove" );
- // http://bugs.jquery.com/ticket/8235
- } catch( e ) {}
- }
- _cleanData( elems );
-};
-
-$.widget = function( name, base, prototype ) {
- var fullName, existingConstructor, constructor, basePrototype,
- namespace = name.split( "." )[ 0 ];
-
- name = name.split( "." )[ 1 ];
- fullName = namespace + "-" + name;
-
- if ( !prototype ) {
- prototype = base;
- base = $.Widget;
- }
-
- // create selector for plugin
- $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
- return !!$.data( elem, fullName );
- };
-
- $[ namespace ] = $[ namespace ] || {};
- existingConstructor = $[ namespace ][ name ];
- constructor = $[ namespace ][ name ] = function( options, element ) {
- // allow instantiation without "new" keyword
- if ( !this._createWidget ) {
- return new constructor( options, element );
- }
-
- // allow instantiation without initializing for simple inheritance
- // must use "new" keyword (the code above always passes args)
- if ( arguments.length ) {
- this._createWidget( options, element );
- }
- };
- // extend with the existing constructor to carry over any static properties
- $.extend( constructor, existingConstructor, {
- version: prototype.version,
- // copy the object used to create the prototype in case we need to
- // redefine the widget later
- _proto: $.extend( {}, prototype ),
- // track widgets that inherit from this widget in case this widget is
- // redefined after a widget inherits from it
- _childConstructors: []
- });
-
- basePrototype = new base();
- // we need to make the options hash a property directly on the new instance
- // otherwise we'll modify the options hash on the prototype that we're
- // inheriting from
- basePrototype.options = $.widget.extend( {}, basePrototype.options );
- $.each( prototype, function( prop, value ) {
- if ( $.isFunction( value ) ) {
- prototype[ prop ] = (function() {
- var _super = function() {
- return base.prototype[ prop ].apply( this, arguments );
- },
- _superApply = function( args ) {
- return base.prototype[ prop ].apply( this, args );
- };
- return function() {
- var __super = this._super,
- __superApply = this._superApply,
- returnValue;
-
- this._super = _super;
- this._superApply = _superApply;
-
- returnValue = value.apply( this, arguments );
-
- this._super = __super;
- this._superApply = __superApply;
-
- return returnValue;
- };
- })();
- }
- });
- constructor.prototype = $.widget.extend( basePrototype, {
- // TODO: remove support for widgetEventPrefix
- // always use the name + a colon as the prefix, e.g., draggable:start
- // don't prefix for widgets that aren't DOM-based
- widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name
- }, prototype, {
- constructor: constructor,
- namespace: namespace,
- widgetName: name,
- // TODO remove widgetBaseClass, see #8155
- widgetBaseClass: fullName,
- widgetFullName: fullName
- });
-
- // If this widget is being redefined then we need to find all widgets that
- // are inheriting from it and redefine all of them so that they inherit from
- // the new version of this widget. We're essentially trying to replace one
- // level in the prototype chain.
- if ( existingConstructor ) {
- $.each( existingConstructor._childConstructors, function( i, child ) {
- var childPrototype = child.prototype;
-
- // redefine the child widget using the same prototype that was
- // originally used, but inherit from the new version of the base
- $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
- });
- // remove the list of existing child constructors from the old constructor
- // so the old child constructors can be garbage collected
- delete existingConstructor._childConstructors;
- } else {
- base._childConstructors.push( constructor );
- }
-
- $.widget.bridge( name, constructor );
-};
-
-$.widget.extend = function( target ) {
- var input = slice.call( arguments, 1 ),
- inputIndex = 0,
- inputLength = input.length,
- key,
- value;
- for ( ; inputIndex < inputLength; inputIndex++ ) {
- for ( key in input[ inputIndex ] ) {
- value = input[ inputIndex ][ key ];
- if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
- // Clone objects
- if ( $.isPlainObject( value ) ) {
- target[ key ] = $.isPlainObject( target[ key ] ) ?
- $.widget.extend( {}, target[ key ], value ) :
- // Don't extend strings, arrays, etc. with objects
- $.widget.extend( {}, value );
- // Copy everything else by reference
- } else {
- target[ key ] = value;
- }
- }
- }
- }
- return target;
-};
-
-$.widget.bridge = function( name, object ) {
- var fullName = object.prototype.widgetFullName || name;
- $.fn[ name ] = function( options ) {
- var isMethodCall = typeof options === "string",
- args = slice.call( arguments, 1 ),
- returnValue = this;
-
- // allow multiple hashes to be passed on init
- options = !isMethodCall && args.length ?
- $.widget.extend.apply( null, [ options ].concat(args) ) :
- options;
-
- if ( isMethodCall ) {
- this.each(function() {
- var methodValue,
- instance = $.data( this, fullName );
- if ( !instance ) {
- return $.error( "cannot call methods on " + name + " prior to initialization; " +
- "attempted to call method '" + options + "'" );
- }
- if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
- return $.error( "no such method '" + options + "' for " + name + " widget instance" );
- }
- methodValue = instance[ options ].apply( instance, args );
- if ( methodValue !== instance && methodValue !== undefined ) {
- returnValue = methodValue && methodValue.jquery ?
- returnValue.pushStack( methodValue.get() ) :
- methodValue;
- return false;
- }
- });
- } else {
- this.each(function() {
- var instance = $.data( this, fullName );
- if ( instance ) {
- instance.option( options || {} )._init();
- } else {
- $.data( this, fullName, new object( options, this ) );
- }
- });
- }
-
- return returnValue;
- };
-};
-
-$.Widget = function( /* options, element */ ) {};
-$.Widget._childConstructors = [];
-
-$.Widget.prototype = {
- widgetName: "widget",
- widgetEventPrefix: "",
- defaultElement: "<div>",
- options: {
- disabled: false,
-
- // callbacks
- create: null
- },
- _createWidget: function( options, element ) {
- element = $( element || this.defaultElement || this )[ 0 ];
- this.element = $( element );
- this.uuid = uuid++;
- this.eventNamespace = "." + this.widgetName + this.uuid;
- this.options = $.widget.extend( {},
- this.options,
- this._getCreateOptions(),
- options );
-
- this.bindings = $();
- this.hoverable = $();
- this.focusable = $();
-
- if ( element !== this ) {
- // 1.9 BC for #7810
- // TODO remove dual storage
- $.data( element, this.widgetName, this );
- $.data( element, this.widgetFullName, this );
- this._on( true, this.element, {
- remove: function( event ) {
- if ( event.target === element ) {
- this.destroy();
- }
- }
- });
- this.document = $( element.style ?
- // element within the document
- element.ownerDocument :
- // element is window or document
- element.document || element );
- this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
- }
-
- this._create();
- this._trigger( "create", null, this._getCreateEventData() );
- this._init();
- },
- _getCreateOptions: $.noop,
- _getCreateEventData: $.noop,
- _create: $.noop,
- _init: $.noop,
-
- destroy: function() {
- this._destroy();
- // we can probably remove the unbind calls in 2.0
- // all event bindings should go through this._on()
- this.element
- .unbind( this.eventNamespace )
- // 1.9 BC for #7810
- // TODO remove dual storage
- .removeData( this.widgetName )
- .removeData( this.widgetFullName )
- // support: jquery <1.6.3
- // http://bugs.jquery.com/ticket/9413
- .removeData( $.camelCase( this.widgetFullName ) );
- this.widget()
- .unbind( this.eventNamespace )
- .removeAttr( "aria-disabled" )
- .removeClass(
- this.widgetFullName + "-disabled " +
- "ui-state-disabled" );
-
- // clean up events and states
- this.bindings.unbind( this.eventNamespace );
- this.hoverable.removeClass( "ui-state-hover" );
- this.focusable.removeClass( "ui-state-focus" );
- },
- _destroy: $.noop,
-
- widget: function() {
- return this.element;
- },
-
- option: function( key, value ) {
- var options = key,
- parts,
- curOption,
- i;
-
- if ( arguments.length === 0 ) {
- // don't return a reference to the internal hash
- return $.widget.extend( {}, this.options );
- }
-
- if ( typeof key === "string" ) {
- // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
- options = {};
- parts = key.split( "." );
- key = parts.shift();
- if ( parts.length ) {
- curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
- for ( i = 0; i < parts.length - 1; i++ ) {
- curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
- curOption = curOption[ parts[ i ] ];
- }
- key = parts.pop();
- if ( value === undefined ) {
- return curOption[ key ] === undefined ? null : curOption[ key ];
- }
- curOption[ key ] = value;
- } else {
- if ( value === undefined ) {
- return this.options[ key ] === undefined ? null : this.options[ key ];
- }
- options[ key ] = value;
- }
- }
-
- this._setOptions( options );
-
- return this;
- },
- _setOptions: function( options ) {
- var key;
-
- for ( key in options ) {
- this._setOption( key, options[ key ] );
- }
-
- return this;
- },
- _setOption: function( key, value ) {
- this.options[ key ] = value;
-
- if ( key === "disabled" ) {
- this.widget()
- .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
- .attr( "aria-disabled", value );
- this.hoverable.removeClass( "ui-state-hover" );
- this.focusable.removeClass( "ui-state-focus" );
- }
-
- return this;
- },
-
- enable: function() {
- return this._setOption( "disabled", false );
- },
- disable: function() {
- return this._setOption( "disabled", true );
- },
-
- _on: function( suppressDisabledCheck, element, handlers ) {
- var delegateElement,
- instance = this;
-
- // no suppressDisabledCheck flag, shuffle arguments
- if ( typeof suppressDisabledCheck !== "boolean" ) {
- handlers = element;
- element = suppressDisabledCheck;
- suppressDisabledCheck = false;
- }
-
- // no element argument, shuffle and use this.element
- if ( !handlers ) {
- handlers = element;
- element = this.element;
- delegateElement = this.widget();
- } else {
- // accept selectors, DOM elements
- element = delegateElement = $( element );
- this.bindings = this.bindings.add( element );
- }
-
- $.each( handlers, function( event, handler ) {
- function handlerProxy() {
- // allow widgets to customize the disabled handling
- // - disabled as an array instead of boolean
- // - disabled class as method for disabling individual parts
- if ( !suppressDisabledCheck &&
- ( instance.options.disabled === true ||
- $( this ).hasClass( "ui-state-disabled" ) ) ) {
- return;
- }
- return ( typeof handler === "string" ? instance[ handler ] : handler )
- .apply( instance, arguments );
- }
-
- // copy the guid so direct unbinding works
- if ( typeof handler !== "string" ) {
- handlerProxy.guid = handler.guid =
- handler.guid || handlerProxy.guid || $.guid++;
- }
-
- var match = event.match( /^(\w+)\s*(.*)$/ ),
- eventName = match[1] + instance.eventNamespace,
- selector = match[2];
- if ( selector ) {
- delegateElement.delegate( selector, eventName, handlerProxy );
- } else {
- element.bind( eventName, handlerProxy );
- }
- });
- },
-
- _off: function( element, eventName ) {
- eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
- element.unbind( eventName ).undelegate( eventName );
- },
-
- _delay: function( handler, delay ) {
- function handlerProxy() {
- return ( typeof handler === "string" ? instance[ handler ] : handler )
- .apply( instance, arguments );
- }
- var instance = this;
- return setTimeout( handlerProxy, delay || 0 );
- },
-
- _hoverable: function( element ) {
- this.hoverable = this.hoverable.add( element );
- this._on( element, {
- mouseenter: function( event ) {
- $( event.currentTarget ).addClass( "ui-state-hover" );
- },
- mouseleave: function( event ) {
- $( event.currentTarget ).removeClass( "ui-state-hover" );
- }
- });
- },
-
- _focusable: function( element ) {
- this.focusable = this.focusable.add( element );
- this._on( element, {
- focusin: function( event ) {
- $( event.currentTarget ).addClass( "ui-state-focus" );
- },
- focusout: function( event ) {
- $( event.currentTarget ).removeClass( "ui-state-focus" );
- }
- });
- },
-
- _trigger: function( type, event, data ) {
- var prop, orig,
- callback = this.options[ type ];
-
- data = data || {};
- event = $.Event( event );
- event.type = ( type === this.widgetEventPrefix ?
- type :
- this.widgetEventPrefix + type ).toLowerCase();
- // the original event may come from any element
- // so we need to reset the target on the new event
- event.target = this.element[ 0 ];
-
- // copy original event properties over to the new event
- orig = event.originalEvent;
- if ( orig ) {
- for ( prop in orig ) {
- if ( !( prop in event ) ) {
- event[ prop ] = orig[ prop ];
- }
- }
- }
-
- this.element.trigger( event, data );
- return !( $.isFunction( callback ) &&
- callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
- event.isDefaultPrevented() );
- }
-};
-
-$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
- $.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
- if ( typeof options === "string" ) {
- options = { effect: options };
- }
- var hasOptions,
- effectName = !options ?
- method :
- options === true || typeof options === "number" ?
- defaultEffect :
- options.effect || defaultEffect;
- options = options || {};
- if ( typeof options === "number" ) {
- options = { duration: options };
- }
- hasOptions = !$.isEmptyObject( options );
- options.complete = callback;
- if ( options.delay ) {
- element.delay( options.delay );
- }
- if ( hasOptions && $.effects && ( $.effects.effect[ effectName ] || $.uiBackCompat !== false && $.effects[ effectName ] ) ) {
- element[ method ]( options );
- } else if ( effectName !== method && element[ effectName ] ) {
- element[ effectName ]( options.duration, options.easing, callback );
- } else {
- element.queue(function( next ) {
- $( this )[ method ]();
- if ( callback ) {
- callback.call( element[ 0 ] );
- }
- next();
- });
- }
- };
-});
-
-// DEPRECATED
-if ( $.uiBackCompat !== false ) {
- $.Widget.prototype._getCreateOptions = function() {
- return $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ];
- };
-}
-
-})( jQuery );
-(function( $, undefined ) {
-
-var mouseHandled = false;
-$( document ).mouseup( function( e ) {
- mouseHandled = false;
-});
-
-$.widget("ui.mouse", {
- version: "1.9.2",
- options: {
- cancel: 'input,textarea,button,select,option',
- distance: 1,
- delay: 0
- },
- _mouseInit: function() {
- var that = this;
-
- this.element
- .bind('mousedown.'+this.widgetName, function(event) {
- return that._mouseDown(event);
- })
- .bind('click.'+this.widgetName, function(event) {
- if (true === $.data(event.target, that.widgetName + '.preventClickEvent')) {
- $.removeData(event.target, that.widgetName + '.preventClickEvent');
- event.stopImmediatePropagation();
- return false;
- }
- });
-
- this.started = false;
- },
-
- // TODO: make sure destroying one instance of mouse doesn't mess with
- // other instances of mouse
- _mouseDestroy: function() {
- this.element.unbind('.'+this.widgetName);
- if ( this._mouseMoveDelegate ) {
- $(document)
- .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
- .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
- }
- },
-
- _mouseDown: function(event) {
- // don't let more than one widget handle mouseStart
- if( mouseHandled ) { return; }
-
- // we may have missed mouseup (out of window)
- (this._mouseStarted && this._mouseUp(event));
-
- this._mouseDownEvent = event;
-
- var that = this,
- btnIsLeft = (event.which === 1),
- // event.target.nodeName works around a bug in IE 8 with
- // disabled inputs (#7620)
- elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
- if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
- return true;
- }
-
- this.mouseDelayMet = !this.options.delay;
- if (!this.mouseDelayMet) {
- this._mouseDelayTimer = setTimeout(function() {
- that.mouseDelayMet = true;
- }, this.options.delay);
- }
-
- if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
- this._mouseStarted = (this._mouseStart(event) !== false);
- if (!this._mouseStarted) {
- event.preventDefault();
- return true;
- }
- }
-
- // Click event may never have fired (Gecko & Opera)
- if (true === $.data(event.target, this.widgetName + '.preventClickEvent')) {
- $.removeData(event.target, this.widgetName + '.preventClickEvent');
- }
-
- // these delegates are required to keep context
- this._mouseMoveDelegate = function(event) {
- return that._mouseMove(event);
- };
- this._mouseUpDelegate = function(event) {
- return that._mouseUp(event);
- };
- $(document)
- .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
- .bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
-
- event.preventDefault();
-
- mouseHandled = true;
- return true;
- },
-
- _mouseMove: function(event) {
- // IE mouseup check - mouseup happened when mouse was out of window
- if ($.ui.ie && !(document.documentMode >= 9) && !event.button) {
- return this._mouseUp(event);
- }
-
- if (this._mouseStarted) {
- this._mouseDrag(event);
- return event.preventDefault();
- }
-
- if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
- this._mouseStarted =
- (this._mouseStart(this._mouseDownEvent, event) !== false);
- (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
- }
-
- return !this._mouseStarted;
- },
-
- _mouseUp: function(event) {
- $(document)
- .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
- .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
-
- if (this._mouseStarted) {
- this._mouseStarted = false;
-
- if (event.target === this._mouseDownEvent.target) {
- $.data(event.target, this.widgetName + '.preventClickEvent', true);
- }
-
- this._mouseStop(event);
- }
-
- return false;
- },
-
- _mouseDistanceMet: function(event) {
- return (Math.max(
- Math.abs(this._mouseDownEvent.pageX - event.pageX),
- Math.abs(this._mouseDownEvent.pageY - event.pageY)
- ) >= this.options.distance
- );
- },
-
- _mouseDelayMet: function(event) {
- return this.mouseDelayMet;
- },
-
- // These are placeholder methods, to be overriden by extending plugin
- _mouseStart: function(event) {},
- _mouseDrag: function(event) {},
- _mouseStop: function(event) {},
- _mouseCapture: function(event) { return true; }
-});
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.ui = $.ui || {};
-
-var cachedScrollbarWidth,
- max = Math.max,
- abs = Math.abs,
- round = Math.round,
- rhorizontal = /left|center|right/,
- rvertical = /top|center|bottom/,
- roffset = /[\+\-]\d+%?/,
- rposition = /^\w+/,
- rpercent = /%$/,
- _position = $.fn.position;
-
-function getOffsets( offsets, width, height ) {
- return [
- parseInt( offsets[ 0 ], 10 ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
- parseInt( offsets[ 1 ], 10 ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
- ];
-}
-function parseCss( element, property ) {
- return parseInt( $.css( element, property ), 10 ) || 0;
-}
-
-$.position = {
- scrollbarWidth: function() {
- if ( cachedScrollbarWidth !== undefined ) {
- return cachedScrollbarWidth;
- }
- var w1, w2,
- div = $( "<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),
- innerDiv = div.children()[0];
-
- $( "body" ).append( div );
- w1 = innerDiv.offsetWidth;
- div.css( "overflow", "scroll" );
-
- w2 = innerDiv.offsetWidth;
-
- if ( w1 === w2 ) {
- w2 = div[0].clientWidth;
- }
-
- div.remove();
-
- return (cachedScrollbarWidth = w1 - w2);
- },
- getScrollInfo: function( within ) {
- var overflowX = within.isWindow ? "" : within.element.css( "overflow-x" ),
- overflowY = within.isWindow ? "" : within.element.css( "overflow-y" ),
- hasOverflowX = overflowX === "scroll" ||
- ( overflowX === "auto" && within.width < within.element[0].scrollWidth ),
- hasOverflowY = overflowY === "scroll" ||
- ( overflowY === "auto" && within.height < within.element[0].scrollHeight );
- return {
- width: hasOverflowX ? $.position.scrollbarWidth() : 0,
- height: hasOverflowY ? $.position.scrollbarWidth() : 0
- };
- },
- getWithinInfo: function( element ) {
- var withinElement = $( element || window ),
- isWindow = $.isWindow( withinElement[0] );
- return {
- element: withinElement,
- isWindow: isWindow,
- offset: withinElement.offset() || { left: 0, top: 0 },
- scrollLeft: withinElement.scrollLeft(),
- scrollTop: withinElement.scrollTop(),
- width: isWindow ? withinElement.width() : withinElement.outerWidth(),
- height: isWindow ? withinElement.height() : withinElement.outerHeight()
- };
- }
-};
-
-$.fn.position = function( options ) {
- if ( !options || !options.of ) {
- return _position.apply( this, arguments );
- }
-
- // make a copy, we don't want to modify arguments
- options = $.extend( {}, options );
-
- var atOffset, targetWidth, targetHeight, targetOffset, basePosition,
- target = $( options.of ),
- within = $.position.getWithinInfo( options.within ),
- scrollInfo = $.position.getScrollInfo( within ),
- targetElem = target[0],
- collision = ( options.collision || "flip" ).split( " " ),
- offsets = {};
-
- if ( targetElem.nodeType === 9 ) {
- targetWidth = target.width();
- targetHeight = target.height();
- targetOffset = { top: 0, left: 0 };
- } else if ( $.isWindow( targetElem ) ) {
- targetWidth = target.width();
- targetHeight = target.height();
- targetOffset = { top: target.scrollTop(), left: target.scrollLeft() };
- } else if ( targetElem.preventDefault ) {
- // force left top to allow flipping
- options.at = "left top";
- targetWidth = targetHeight = 0;
- targetOffset = { top: targetElem.pageY, left: targetElem.pageX };
- } else {
- targetWidth = target.outerWidth();
- targetHeight = target.outerHeight();
- targetOffset = target.offset();
- }
- // clone to reuse original targetOffset later
- basePosition = $.extend( {}, targetOffset );
-
- // force my and at to have valid horizontal and vertical positions
- // if a value is missing or invalid, it will be converted to center
- $.each( [ "my", "at" ], function() {
- var pos = ( options[ this ] || "" ).split( " " ),
- horizontalOffset,
- verticalOffset;
-
- if ( pos.length === 1) {
- pos = rhorizontal.test( pos[ 0 ] ) ?
- pos.concat( [ "center" ] ) :
- rvertical.test( pos[ 0 ] ) ?
- [ "center" ].concat( pos ) :
- [ "center", "center" ];
- }
- pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
- pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
-
- // calculate offsets
- horizontalOffset = roffset.exec( pos[ 0 ] );
- verticalOffset = roffset.exec( pos[ 1 ] );
- offsets[ this ] = [
- horizontalOffset ? horizontalOffset[ 0 ] : 0,
- verticalOffset ? verticalOffset[ 0 ] : 0
- ];
-
- // reduce to just the positions without the offsets
- options[ this ] = [
- rposition.exec( pos[ 0 ] )[ 0 ],
- rposition.exec( pos[ 1 ] )[ 0 ]
- ];
- });
-
- // normalize collision option
- if ( collision.length === 1 ) {
- collision[ 1 ] = collision[ 0 ];
- }
-
- if ( options.at[ 0 ] === "right" ) {
- basePosition.left += targetWidth;
- } else if ( options.at[ 0 ] === "center" ) {
- basePosition.left += targetWidth / 2;
- }
-
- if ( options.at[ 1 ] === "bottom" ) {
- basePosition.top += targetHeight;
- } else if ( options.at[ 1 ] === "center" ) {
- basePosition.top += targetHeight / 2;
- }
-
- atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
- basePosition.left += atOffset[ 0 ];
- basePosition.top += atOffset[ 1 ];
-
- return this.each(function() {
- var collisionPosition, using,
- elem = $( this ),
- elemWidth = elem.outerWidth(),
- elemHeight = elem.outerHeight(),
- marginLeft = parseCss( this, "marginLeft" ),
- marginTop = parseCss( this, "marginTop" ),
- collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width,
- collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height,
- position = $.extend( {}, basePosition ),
- myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
-
- if ( options.my[ 0 ] === "right" ) {
- position.left -= elemWidth;
- } else if ( options.my[ 0 ] === "center" ) {
- position.left -= elemWidth / 2;
- }
-
- if ( options.my[ 1 ] === "bottom" ) {
- position.top -= elemHeight;
- } else if ( options.my[ 1 ] === "center" ) {
- position.top -= elemHeight / 2;
- }
-
- position.left += myOffset[ 0 ];
- position.top += myOffset[ 1 ];
-
- // if the browser doesn't support fractions, then round for consistent results
- if ( !$.support.offsetFractions ) {
- position.left = round( position.left );
- position.top = round( position.top );
- }
-
- collisionPosition = {
- marginLeft: marginLeft,
- marginTop: marginTop
- };
-
- $.each( [ "left", "top" ], function( i, dir ) {
- if ( $.ui.position[ collision[ i ] ] ) {
- $.ui.position[ collision[ i ] ][ dir ]( position, {
- targetWidth: targetWidth,
- targetHeight: targetHeight,
- elemWidth: elemWidth,
- elemHeight: elemHeight,
- collisionPosition: collisionPosition,
- collisionWidth: collisionWidth,
- collisionHeight: collisionHeight,
- offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
- my: options.my,
- at: options.at,
- within: within,
- elem : elem
- });
- }
- });
-
- if ( $.fn.bgiframe ) {
- elem.bgiframe();
- }
-
- if ( options.using ) {
- // adds feedback as second argument to using callback, if present
- using = function( props ) {
- var left = targetOffset.left - position.left,
- right = left + targetWidth - elemWidth,
- top = targetOffset.top - position.top,
- bottom = top + targetHeight - elemHeight,
- feedback = {
- target: {
- element: target,
- left: targetOffset.left,
- top: targetOffset.top,
- width: targetWidth,
- height: targetHeight
- },
- element: {
- element: elem,
- left: position.left,
- top: position.top,
- width: elemWidth,
- height: elemHeight
- },
- horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
- vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
- };
- if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
- feedback.horizontal = "center";
- }
- if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
- feedback.vertical = "middle";
- }
- if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
- feedback.important = "horizontal";
- } else {
- feedback.important = "vertical";
- }
- options.using.call( this, props, feedback );
- };
- }
-
- elem.offset( $.extend( position, { using: using } ) );
- });
-};
-
-$.ui.position = {
- fit: {
- left: function( position, data ) {
- var within = data.within,
- withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
- outerWidth = within.width,
- collisionPosLeft = position.left - data.collisionPosition.marginLeft,
- overLeft = withinOffset - collisionPosLeft,
- overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
- newOverRight;
-
- // element is wider than within
- if ( data.collisionWidth > outerWidth ) {
- // element is initially over the left side of within
- if ( overLeft > 0 && overRight <= 0 ) {
- newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;
- position.left += overLeft - newOverRight;
- // element is initially over right side of within
- } else if ( overRight > 0 && overLeft <= 0 ) {
- position.left = withinOffset;
- // element is initially over both left and right sides of within
- } else {
- if ( overLeft > overRight ) {
- position.left = withinOffset + outerWidth - data.collisionWidth;
- } else {
- position.left = withinOffset;
- }
- }
- // too far left -> align with left edge
- } else if ( overLeft > 0 ) {
- position.left += overLeft;
- // too far right -> align with right edge
- } else if ( overRight > 0 ) {
- position.left -= overRight;
- // adjust based on position and margin
- } else {
- position.left = max( position.left - collisionPosLeft, position.left );
- }
- },
- top: function( position, data ) {
- var within = data.within,
- withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
- outerHeight = data.within.height,
- collisionPosTop = position.top - data.collisionPosition.marginTop,
- overTop = withinOffset - collisionPosTop,
- overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
- newOverBottom;
-
- // element is taller than within
- if ( data.collisionHeight > outerHeight ) {
- // element is initially over the top of within
- if ( overTop > 0 && overBottom <= 0 ) {
- newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;
- position.top += overTop - newOverBottom;
- // element is initially over bottom of within
- } else if ( overBottom > 0 && overTop <= 0 ) {
- position.top = withinOffset;
- // element is initially over both top and bottom of within
- } else {
- if ( overTop > overBottom ) {
- position.top = withinOffset + outerHeight - data.collisionHeight;
- } else {
- position.top = withinOffset;
- }
- }
- // too far up -> align with top
- } else if ( overTop > 0 ) {
- position.top += overTop;
- // too far down -> align with bottom edge
- } else if ( overBottom > 0 ) {
- position.top -= overBottom;
- // adjust based on position and margin
- } else {
- position.top = max( position.top - collisionPosTop, position.top );
- }
- }
- },
- flip: {
- left: function( position, data ) {
- var within = data.within,
- withinOffset = within.offset.left + within.scrollLeft,
- outerWidth = within.width,
- offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
- collisionPosLeft = position.left - data.collisionPosition.marginLeft,
- overLeft = collisionPosLeft - offsetLeft,
- overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
- myOffset = data.my[ 0 ] === "left" ?
- -data.elemWidth :
- data.my[ 0 ] === "right" ?
- data.elemWidth :
- 0,
- atOffset = data.at[ 0 ] === "left" ?
- data.targetWidth :
- data.at[ 0 ] === "right" ?
- -data.targetWidth :
- 0,
- offset = -2 * data.offset[ 0 ],
- newOverRight,
- newOverLeft;
-
- if ( overLeft < 0 ) {
- newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;
- if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
- position.left += myOffset + atOffset + offset;
- }
- }
- else if ( overRight > 0 ) {
- newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;
- if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
- position.left += myOffset + atOffset + offset;
- }
- }
- },
- top: function( position, data ) {
- var within = data.within,
- withinOffset = within.offset.top + within.scrollTop,
- outerHeight = within.height,
- offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
- collisionPosTop = position.top - data.collisionPosition.marginTop,
- overTop = collisionPosTop - offsetTop,
- overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
- top = data.my[ 1 ] === "top",
- myOffset = top ?
- -data.elemHeight :
- data.my[ 1 ] === "bottom" ?
- data.elemHeight :
- 0,
- atOffset = data.at[ 1 ] === "top" ?
- data.targetHeight :
- data.at[ 1 ] === "bottom" ?
- -data.targetHeight :
- 0,
- offset = -2 * data.offset[ 1 ],
- newOverTop,
- newOverBottom;
- if ( overTop < 0 ) {
- newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
- if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) {
- position.top += myOffset + atOffset + offset;
- }
- }
- else if ( overBottom > 0 ) {
- newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
- if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) {
- position.top += myOffset + atOffset + offset;
- }
- }
- }
- },
- flipfit: {
- left: function() {
- $.ui.position.flip.left.apply( this, arguments );
- $.ui.position.fit.left.apply( this, arguments );
- },
- top: function() {
- $.ui.position.flip.top.apply( this, arguments );
- $.ui.position.fit.top.apply( this, arguments );
- }
- }
-};
-
-// fraction support test
-(function () {
- var testElement, testElementParent, testElementStyle, offsetLeft, i,
- body = document.getElementsByTagName( "body" )[ 0 ],
- div = document.createElement( "div" );
-
- //Create a "fake body" for testing based on method used in jQuery.support
- testElement = document.createElement( body ? "div" : "body" );
- testElementStyle = {
- visibility: "hidden",
- width: 0,
- height: 0,
- border: 0,
- margin: 0,
- background: "none"
- };
- if ( body ) {
- $.extend( testElementStyle, {
- position: "absolute",
- left: "-1000px",
- top: "-1000px"
- });
- }
- for ( i in testElementStyle ) {
- testElement.style[ i ] = testElementStyle[ i ];
- }
- testElement.appendChild( div );
- testElementParent = body || document.documentElement;
- testElementParent.insertBefore( testElement, testElementParent.firstChild );
-
- div.style.cssText = "position: absolute; left: 10.7432222px;";
-
- offsetLeft = $( div ).offset().left;
- $.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11;
-
- testElement.innerHTML = "";
- testElementParent.removeChild( testElement );
-})();
-
-// DEPRECATED
-if ( $.uiBackCompat !== false ) {
- // offset option
- (function( $ ) {
- var _position = $.fn.position;
- $.fn.position = function( options ) {
- if ( !options || !options.offset ) {
- return _position.call( this, options );
- }
- var offset = options.offset.split( " " ),
- at = options.at.split( " " );
- if ( offset.length === 1 ) {
- offset[ 1 ] = offset[ 0 ];
- }
- if ( /^\d/.test( offset[ 0 ] ) ) {
- offset[ 0 ] = "+" + offset[ 0 ];
- }
- if ( /^\d/.test( offset[ 1 ] ) ) {
- offset[ 1 ] = "+" + offset[ 1 ];
- }
- if ( at.length === 1 ) {
- if ( /left|center|right/.test( at[ 0 ] ) ) {
- at[ 1 ] = "center";
- } else {
- at[ 1 ] = at[ 0 ];
- at[ 0 ] = "center";
- }
- }
- return _position.call( this, $.extend( options, {
- at: at[ 0 ] + offset[ 0 ] + " " + at[ 1 ] + offset[ 1 ],
- offset: undefined
- } ) );
- };
- }( jQuery ) );
-}
-
-}( jQuery ) );
-(function( $, undefined ) {
-
-var uid = 0,
- hideProps = {},
- showProps = {};
-
-hideProps.height = hideProps.paddingTop = hideProps.paddingBottom =
- hideProps.borderTopWidth = hideProps.borderBottomWidth = "hide";
-showProps.height = showProps.paddingTop = showProps.paddingBottom =
- showProps.borderTopWidth = showProps.borderBottomWidth = "show";
-
-$.widget( "ui.accordion", {
- version: "1.9.2",
- options: {
- active: 0,
- animate: {},
- collapsible: false,
- event: "click",
- header: "> li > :first-child,> :not(li):even",
- heightStyle: "auto",
- icons: {
- activeHeader: "ui-icon-triangle-1-s",
- header: "ui-icon-triangle-1-e"
- },
-
- // callbacks
- activate: null,
- beforeActivate: null
- },
-
- _create: function() {
- var accordionId = this.accordionId = "ui-accordion-" +
- (this.element.attr( "id" ) || ++uid),
- options = this.options;
-
- this.prevShow = this.prevHide = $();
- this.element.addClass( "ui-accordion ui-widget ui-helper-reset" );
-
- this.headers = this.element.find( options.header )
- .addClass( "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all" );
- this._hoverable( this.headers );
- this._focusable( this.headers );
-
- this.headers.next()
- .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" )
- .hide();
-
- // don't allow collapsible: false and active: false / null
- if ( !options.collapsible && (options.active === false || options.active == null) ) {
- options.active = 0;
- }
- // handle negative values
- if ( options.active < 0 ) {
- options.active += this.headers.length;
- }
- this.active = this._findActive( options.active )
- .addClass( "ui-accordion-header-active ui-state-active" )
- .toggleClass( "ui-corner-all ui-corner-top" );
- this.active.next()
- .addClass( "ui-accordion-content-active" )
- .show();
-
- this._createIcons();
- this.refresh();
-
- // ARIA
- this.element.attr( "role", "tablist" );
-
- this.headers
- .attr( "role", "tab" )
- .each(function( i ) {
- var header = $( this ),
- headerId = header.attr( "id" ),
- panel = header.next(),
- panelId = panel.attr( "id" );
- if ( !headerId ) {
- headerId = accordionId + "-header-" + i;
- header.attr( "id", headerId );
- }
- if ( !panelId ) {
- panelId = accordionId + "-panel-" + i;
- panel.attr( "id", panelId );
- }
- header.attr( "aria-controls", panelId );
- panel.attr( "aria-labelledby", headerId );
- })
- .next()
- .attr( "role", "tabpanel" );
-
- this.headers
- .not( this.active )
- .attr({
- "aria-selected": "false",
- tabIndex: -1
- })
- .next()
- .attr({
- "aria-expanded": "false",
- "aria-hidden": "true"
- })
- .hide();
-
- // make sure at least one header is in the tab order
- if ( !this.active.length ) {
- this.headers.eq( 0 ).attr( "tabIndex", 0 );
- } else {
- this.active.attr({
- "aria-selected": "true",
- tabIndex: 0
- })
- .next()
- .attr({
- "aria-expanded": "true",
- "aria-hidden": "false"
- });
- }
-
- this._on( this.headers, { keydown: "_keydown" });
- this._on( this.headers.next(), { keydown: "_panelKeyDown" });
- this._setupEvents( options.event );
- },
-
- _getCreateEventData: function() {
- return {
- header: this.active,
- content: !this.active.length ? $() : this.active.next()
- };
- },
-
- _createIcons: function() {
- var icons = this.options.icons;
- if ( icons ) {
- $( "<span>" )
- .addClass( "ui-accordion-header-icon ui-icon " + icons.header )
- .prependTo( this.headers );
- this.active.children( ".ui-accordion-header-icon" )
- .removeClass( icons.header )
- .addClass( icons.activeHeader );
- this.headers.addClass( "ui-accordion-icons" );
- }
- },
-
- _destroyIcons: function() {
- this.headers
- .removeClass( "ui-accordion-icons" )
- .children( ".ui-accordion-header-icon" )
- .remove();
- },
-
- _destroy: function() {
- var contents;
-
- // clean up main element
- this.element
- .removeClass( "ui-accordion ui-widget ui-helper-reset" )
- .removeAttr( "role" );
-
- // clean up headers
- this.headers
- .removeClass( "ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )
- .removeAttr( "role" )
- .removeAttr( "aria-selected" )
- .removeAttr( "aria-controls" )
- .removeAttr( "tabIndex" )
- .each(function() {
- if ( /^ui-accordion/.test( this.id ) ) {
- this.removeAttribute( "id" );
- }
- });
- this._destroyIcons();
-
- // clean up content panels
- contents = this.headers.next()
- .css( "display", "" )
- .removeAttr( "role" )
- .removeAttr( "aria-expanded" )
- .removeAttr( "aria-hidden" )
- .removeAttr( "aria-labelledby" )
- .removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled" )
- .each(function() {
- if ( /^ui-accordion/.test( this.id ) ) {
- this.removeAttribute( "id" );
- }
- });
- if ( this.options.heightStyle !== "content" ) {
- contents.css( "height", "" );
- }
- },
-
- _setOption: function( key, value ) {
- if ( key === "active" ) {
- // _activate() will handle invalid values and update this.options
- this._activate( value );
- return;
- }
-
- if ( key === "event" ) {
- if ( this.options.event ) {
- this._off( this.headers, this.options.event );
- }
- this._setupEvents( value );
- }
-
- this._super( key, value );
-
- // setting collapsible: false while collapsed; open first panel
- if ( key === "collapsible" && !value && this.options.active === false ) {
- this._activate( 0 );
- }
-
- if ( key === "icons" ) {
- this._destroyIcons();
- if ( value ) {
- this._createIcons();
- }
- }
-
- // #5332 - opacity doesn't cascade to positioned elements in IE
- // so we need to add the disabled class to the headers and panels
- if ( key === "disabled" ) {
- this.headers.add( this.headers.next() )
- .toggleClass( "ui-state-disabled", !!value );
- }
- },
-
- _keydown: function( event ) {
- if ( event.altKey || event.ctrlKey ) {
- return;
- }
-
- var keyCode = $.ui.keyCode,
- length = this.headers.length,
- currentIndex = this.headers.index( event.target ),
- toFocus = false;
-
- switch ( event.keyCode ) {
- case keyCode.RIGHT:
- case keyCode.DOWN:
- toFocus = this.headers[ ( currentIndex + 1 ) % length ];
- break;
- case keyCode.LEFT:
- case keyCode.UP:
- toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
- break;
- case keyCode.SPACE:
- case keyCode.ENTER:
- this._eventHandler( event );
- break;
- case keyCode.HOME:
- toFocus = this.headers[ 0 ];
- break;
- case keyCode.END:
- toFocus = this.headers[ length - 1 ];
- break;
- }
-
- if ( toFocus ) {
- $( event.target ).attr( "tabIndex", -1 );
- $( toFocus ).attr( "tabIndex", 0 );
- toFocus.focus();
- event.preventDefault();
- }
- },
-
- _panelKeyDown : function( event ) {
- if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {
- $( event.currentTarget ).prev().focus();
- }
- },
-
- refresh: function() {
- var maxHeight, overflow,
- heightStyle = this.options.heightStyle,
- parent = this.element.parent();
-
-
- if ( heightStyle === "fill" ) {
- // IE 6 treats height like minHeight, so we need to turn off overflow
- // in order to get a reliable height
- // we use the minHeight support test because we assume that only
- // browsers that don't support minHeight will treat height as minHeight
- if ( !$.support.minHeight ) {
- overflow = parent.css( "overflow" );
- parent.css( "overflow", "hidden");
- }
- maxHeight = parent.height();
- this.element.siblings( ":visible" ).each(function() {
- var elem = $( this ),
- position = elem.css( "position" );
-
- if ( position === "absolute" || position === "fixed" ) {
- return;
- }
- maxHeight -= elem.outerHeight( true );
- });
- if ( overflow ) {
- parent.css( "overflow", overflow );
- }
-
- this.headers.each(function() {
- maxHeight -= $( this ).outerHeight( true );
- });
-
- this.headers.next()
- .each(function() {
- $( this ).height( Math.max( 0, maxHeight -
- $( this ).innerHeight() + $( this ).height() ) );
- })
- .css( "overflow", "auto" );
- } else if ( heightStyle === "auto" ) {
- maxHeight = 0;
- this.headers.next()
- .each(function() {
- maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() );
- })
- .height( maxHeight );
- }
- },
-
- _activate: function( index ) {
- var active = this._findActive( index )[ 0 ];
-
- // trying to activate the already active panel
- if ( active === this.active[ 0 ] ) {
- return;
- }
-
- // trying to collapse, simulate a click on the currently active header
- active = active || this.active[ 0 ];
-
- this._eventHandler({
- target: active,
- currentTarget: active,
- preventDefault: $.noop
- });
- },
-
- _findActive: function( selector ) {
- return typeof selector === "number" ? this.headers.eq( selector ) : $();
- },
-
- _setupEvents: function( event ) {
- var events = {};
- if ( !event ) {
- return;
- }
- $.each( event.split(" "), function( index, eventName ) {
- events[ eventName ] = "_eventHandler";
- });
- this._on( this.headers, events );
- },
-
- _eventHandler: function( event ) {
- var options = this.options,
- active = this.active,
- clicked = $( event.currentTarget ),
- clickedIsActive = clicked[ 0 ] === active[ 0 ],
- collapsing = clickedIsActive && options.collapsible,
- toShow = collapsing ? $() : clicked.next(),
- toHide = active.next(),
- eventData = {
- oldHeader: active,
- oldPanel: toHide,
- newHeader: collapsing ? $() : clicked,
- newPanel: toShow
- };
-
- event.preventDefault();
-
- if (
- // click on active header, but not collapsible
- ( clickedIsActive && !options.collapsible ) ||
- // allow canceling activation
- ( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
- return;
- }
-
- options.active = collapsing ? false : this.headers.index( clicked );
-
- // when the call to ._toggle() comes after the class changes
- // it causes a very odd bug in IE 8 (see #6720)
- this.active = clickedIsActive ? $() : clicked;
- this._toggle( eventData );
-
- // switch classes
- // corner classes on the previously active header stay after the animation
- active.removeClass( "ui-accordion-header-active ui-state-active" );
- if ( options.icons ) {
- active.children( ".ui-accordion-header-icon" )
- .removeClass( options.icons.activeHeader )
- .addClass( options.icons.header );
- }
-
- if ( !clickedIsActive ) {
- clicked
- .removeClass( "ui-corner-all" )
- .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" );
- if ( options.icons ) {
- clicked.children( ".ui-accordion-header-icon" )
- .removeClass( options.icons.header )
- .addClass( options.icons.activeHeader );
- }
-
- clicked
- .next()
- .addClass( "ui-accordion-content-active" );
- }
- },
-
- _toggle: function( data ) {
- var toShow = data.newPanel,
- toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
-
- // handle activating a panel during the animation for another activation
- this.prevShow.add( this.prevHide ).stop( true, true );
- this.prevShow = toShow;
- this.prevHide = toHide;
-
- if ( this.options.animate ) {
- this._animate( toShow, toHide, data );
- } else {
- toHide.hide();
- toShow.show();
- this._toggleComplete( data );
- }
-
- toHide.attr({
- "aria-expanded": "false",
- "aria-hidden": "true"
- });
- toHide.prev().attr( "aria-selected", "false" );
- // if we're switching panels, remove the old header from the tab order
- // if we're opening from collapsed state, remove the previous header from the tab order
- // if we're collapsing, then keep the collapsing header in the tab order
- if ( toShow.length && toHide.length ) {
- toHide.prev().attr( "tabIndex", -1 );
- } else if ( toShow.length ) {
- this.headers.filter(function() {
- return $( this ).attr( "tabIndex" ) === 0;
- })
- .attr( "tabIndex", -1 );
- }
-
- toShow
- .attr({
- "aria-expanded": "true",
- "aria-hidden": "false"
- })
- .prev()
- .attr({
- "aria-selected": "true",
- tabIndex: 0
- });
- },
-
- _animate: function( toShow, toHide, data ) {
- var total, easing, duration,
- that = this,
- adjust = 0,
- down = toShow.length &&
- ( !toHide.length || ( toShow.index() < toHide.index() ) ),
- animate = this.options.animate || {},
- options = down && animate.down || animate,
- complete = function() {
- that._toggleComplete( data );
- };
-
- if ( typeof options === "number" ) {
- duration = options;
- }
- if ( typeof options === "string" ) {
- easing = options;
- }
- // fall back from options to animation in case of partial down settings
- easing = easing || options.easing || animate.easing;
- duration = duration || options.duration || animate.duration;
-
- if ( !toHide.length ) {
- return toShow.animate( showProps, duration, easing, complete );
- }
- if ( !toShow.length ) {
- return toHide.animate( hideProps, duration, easing, complete );
- }
-
- total = toShow.show().outerHeight();
- toHide.animate( hideProps, {
- duration: duration,
- easing: easing,
- step: function( now, fx ) {
- fx.now = Math.round( now );
- }
- });
- toShow
- .hide()
- .animate( showProps, {
- duration: duration,
- easing: easing,
- complete: complete,
- step: function( now, fx ) {
- fx.now = Math.round( now );
- if ( fx.prop !== "height" ) {
- adjust += fx.now;
- } else if ( that.options.heightStyle !== "content" ) {
- fx.now = Math.round( total - toHide.outerHeight() - adjust );
- adjust = 0;
- }
- }
- });
- },
-
- _toggleComplete: function( data ) {
- var toHide = data.oldPanel;
-
- toHide
- .removeClass( "ui-accordion-content-active" )
- .prev()
- .removeClass( "ui-corner-top" )
- .addClass( "ui-corner-all" );
-
- // Work around for rendering bug in IE (#5421)
- if ( toHide.length ) {
- toHide.parent()[0].className = toHide.parent()[0].className;
- }
-
- this._trigger( "activate", null, data );
- }
-});
-
-
-
-// DEPRECATED
-if ( $.uiBackCompat !== false ) {
- // navigation options
- (function( $, prototype ) {
- $.extend( prototype.options, {
- navigation: false,
- navigationFilter: function() {
- return this.href.toLowerCase() === location.href.toLowerCase();
- }
- });
-
- var _create = prototype._create;
- prototype._create = function() {
- if ( this.options.navigation ) {
- var that = this,
- headers = this.element.find( this.options.header ),
- content = headers.next(),
- current = headers.add( content )
- .find( "a" )
- .filter( this.options.navigationFilter )
- [ 0 ];
- if ( current ) {
- headers.add( content ).each( function( index ) {
- if ( $.contains( this, current ) ) {
- that.options.active = Math.floor( index / 2 );
- return false;
- }
- });
- }
- }
- _create.call( this );
- };
- }( jQuery, jQuery.ui.accordion.prototype ) );
-
- // height options
- (function( $, prototype ) {
- $.extend( prototype.options, {
- heightStyle: null, // remove default so we fall back to old values
- autoHeight: true, // use heightStyle: "auto"
- clearStyle: false, // use heightStyle: "content"
- fillSpace: false // use heightStyle: "fill"
- });
-
- var _create = prototype._create,
- _setOption = prototype._setOption;
-
- $.extend( prototype, {
- _create: function() {
- this.options.heightStyle = this.options.heightStyle ||
- this._mergeHeightStyle();
-
- _create.call( this );
- },
-
- _setOption: function( key ) {
- if ( key === "autoHeight" || key === "clearStyle" || key === "fillSpace" ) {
- this.options.heightStyle = this._mergeHeightStyle();
- }
- _setOption.apply( this, arguments );
- },
-
- _mergeHeightStyle: function() {
- var options = this.options;
-
- if ( options.fillSpace ) {
- return "fill";
- }
-
- if ( options.clearStyle ) {
- return "content";
- }
-
- if ( options.autoHeight ) {
- return "auto";
- }
- }
- });
- }( jQuery, jQuery.ui.accordion.prototype ) );
-
- // icon options
- (function( $, prototype ) {
- $.extend( prototype.options.icons, {
- activeHeader: null, // remove default so we fall back to old values
- headerSelected: "ui-icon-triangle-1-s"
- });
-
- var _createIcons = prototype._createIcons;
- prototype._createIcons = function() {
- if ( this.options.icons ) {
- this.options.icons.activeHeader = this.options.icons.activeHeader ||
- this.options.icons.headerSelected;
- }
- _createIcons.call( this );
- };
- }( jQuery, jQuery.ui.accordion.prototype ) );
-
- // expanded active option, activate method
- (function( $, prototype ) {
- prototype.activate = prototype._activate;
-
- var _findActive = prototype._findActive;
- prototype._findActive = function( index ) {
- if ( index === -1 ) {
- index = false;
- }
- if ( index && typeof index !== "number" ) {
- index = this.headers.index( this.headers.filter( index ) );
- if ( index === -1 ) {
- index = false;
- }
- }
- return _findActive.call( this, index );
- };
- }( jQuery, jQuery.ui.accordion.prototype ) );
-
- // resize method
- jQuery.ui.accordion.prototype.resize = jQuery.ui.accordion.prototype.refresh;
-
- // change events
- (function( $, prototype ) {
- $.extend( prototype.options, {
- change: null,
- changestart: null
- });
-
- var _trigger = prototype._trigger;
- prototype._trigger = function( type, event, data ) {
- var ret = _trigger.apply( this, arguments );
- if ( !ret ) {
- return false;
- }
-
- if ( type === "beforeActivate" ) {
- ret = _trigger.call( this, "changestart", event, {
- oldHeader: data.oldHeader,
- oldContent: data.oldPanel,
- newHeader: data.newHeader,
- newContent: data.newPanel
- });
- } else if ( type === "activate" ) {
- ret = _trigger.call( this, "change", event, {
- oldHeader: data.oldHeader,
- oldContent: data.oldPanel,
- newHeader: data.newHeader,
- newContent: data.newPanel
- });
- }
- return ret;
- };
- }( jQuery, jQuery.ui.accordion.prototype ) );
-
- // animated option
- // NOTE: this only provides support for "slide", "bounceslide", and easings
- // not the full $.ui.accordion.animations API
- (function( $, prototype ) {
- $.extend( prototype.options, {
- animate: null,
- animated: "slide"
- });
-
- var _create = prototype._create;
- prototype._create = function() {
- var options = this.options;
- if ( options.animate === null ) {
- if ( !options.animated ) {
- options.animate = false;
- } else if ( options.animated === "slide" ) {
- options.animate = 300;
- } else if ( options.animated === "bounceslide" ) {
- options.animate = {
- duration: 200,
- down: {
- easing: "easeOutBounce",
- duration: 1000
- }
- };
- } else {
- options.animate = options.animated;
- }
- }
-
- _create.call( this );
- };
- }( jQuery, jQuery.ui.accordion.prototype ) );
-}
-
-})( jQuery );
-(function( $, undefined ) {
-
-// used to prevent race conditions with remote data sources
-var requestIndex = 0;
-
-$.widget( "ui.autocomplete", {
- version: "1.9.2",
- defaultElement: "<input>",
- options: {
- appendTo: "body",
- autoFocus: false,
- delay: 300,
- minLength: 1,
- position: {
- my: "left top",
- at: "left bottom",
- collision: "none"
- },
- source: null,
-
- // callbacks
- change: null,
- close: null,
- focus: null,
- open: null,
- response: null,
- search: null,
- select: null
- },
-
- pending: 0,
-
- _create: function() {
- // Some browsers only repeat keydown events, not keypress events,
- // so we use the suppressKeyPress flag to determine if we've already
- // handled the keydown event. #7269
- // Unfortunately the code for & in keypress is the same as the up arrow,
- // so we use the suppressKeyPressRepeat flag to avoid handling keypress
- // events when we know the keydown event was used to modify the
- // search term. #7799
- var suppressKeyPress, suppressKeyPressRepeat, suppressInput;
-
- this.isMultiLine = this._isMultiLine();
- this.valueMethod = this.element[ this.element.is( "input,textarea" ) ? "val" : "text" ];
- this.isNewMenu = true;
-
- this.element
- .addClass( "ui-autocomplete-input" )
- .attr( "autocomplete", "off" );
-
- this._on( this.element, {
- keydown: function( event ) {
- if ( this.element.prop( "readOnly" ) ) {
- suppressKeyPress = true;
- suppressInput = true;
- suppressKeyPressRepeat = true;
- return;
- }
-
- suppressKeyPress = false;
- suppressInput = false;
- suppressKeyPressRepeat = false;
- var keyCode = $.ui.keyCode;
- switch( event.keyCode ) {
- case keyCode.PAGE_UP:
- suppressKeyPress = true;
- this._move( "previousPage", event );
- break;
- case keyCode.PAGE_DOWN:
- suppressKeyPress = true;
- this._move( "nextPage", event );
- break;
- case keyCode.UP:
- suppressKeyPress = true;
- this._keyEvent( "previous", event );
- break;
- case keyCode.DOWN:
- suppressKeyPress = true;
- this._keyEvent( "next", event );
- break;
- case keyCode.ENTER:
- case keyCode.NUMPAD_ENTER:
- // when menu is open and has focus
- if ( this.menu.active ) {
- // #6055 - Opera still allows the keypress to occur
- // which causes forms to submit
- suppressKeyPress = true;
- event.preventDefault();
- this.menu.select( event );
- }
- break;
- case keyCode.TAB:
- if ( this.menu.active ) {
- this.menu.select( event );
- }
- break;
- case keyCode.ESCAPE:
- if ( this.menu.element.is( ":visible" ) ) {
- this._value( this.term );
- this.close( event );
- // Different browsers have different default behavior for escape
- // Single press can mean undo or clear
- // Double press in IE means clear the whole form
- event.preventDefault();
- }
- break;
- default:
- suppressKeyPressRepeat = true;
- // search timeout should be triggered before the input value is changed
- this._searchTimeout( event );
- break;
- }
- },
- keypress: function( event ) {
- if ( suppressKeyPress ) {
- suppressKeyPress = false;
- event.preventDefault();
- return;
- }
- if ( suppressKeyPressRepeat ) {
- return;
- }
-
- // replicate some key handlers to allow them to repeat in Firefox and Opera
- var keyCode = $.ui.keyCode;
- switch( event.keyCode ) {
- case keyCode.PAGE_UP:
- this._move( "previousPage", event );
- break;
- case keyCode.PAGE_DOWN:
- this._move( "nextPage", event );
- break;
- case keyCode.UP:
- this._keyEvent( "previous", event );
- break;
- case keyCode.DOWN:
- this._keyEvent( "next", event );
- break;
- }
- },
- input: function( event ) {
- if ( suppressInput ) {
- suppressInput = false;
- event.preventDefault();
- return;
- }
- this._searchTimeout( event );
- },
- focus: function() {
- this.selectedItem = null;
- this.previous = this._value();
- },
- blur: function( event ) {
- if ( this.cancelBlur ) {
- delete this.cancelBlur;
- return;
- }
-
- clearTimeout( this.searching );
- this.close( event );
- this._change( event );
- }
- });
-
- this._initSource();
- this.menu = $( "<ul>" )
- .addClass( "ui-autocomplete" )
- .appendTo( this.document.find( this.options.appendTo || "body" )[ 0 ] )
- .menu({
- // custom key handling for now
- input: $(),
- // disable ARIA support, the live region takes care of that
- role: null
- })
- .zIndex( this.element.zIndex() + 1 )
- .hide()
- .data( "menu" );
-
- this._on( this.menu.element, {
- mousedown: function( event ) {
- // prevent moving focus out of the text field
- event.preventDefault();
-
- // IE doesn't prevent moving focus even with event.preventDefault()
- // so we set a flag to know when we should ignore the blur event
- this.cancelBlur = true;
- this._delay(function() {
- delete this.cancelBlur;
- });
-
- // clicking on the scrollbar causes focus to shift to the body
- // but we can't detect a mouseup or a click immediately afterward
- // so we have to track the next mousedown and close the menu if
- // the user clicks somewhere outside of the autocomplete
- var menuElement = this.menu.element[ 0 ];
- if ( !$( event.target ).closest( ".ui-menu-item" ).length ) {
- this._delay(function() {
- var that = this;
- this.document.one( "mousedown", function( event ) {
- if ( event.target !== that.element[ 0 ] &&
- event.target !== menuElement &&
- !$.contains( menuElement, event.target ) ) {
- that.close();
- }
- });
- });
- }
- },
- menufocus: function( event, ui ) {
- // #7024 - Prevent accidental activation of menu items in Firefox
- if ( this.isNewMenu ) {
- this.isNewMenu = false;
- if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
- this.menu.blur();
-
- this.document.one( "mousemove", function() {
- $( event.target ).trigger( event.originalEvent );
- });
-
- return;
- }
- }
-
- // back compat for _renderItem using item.autocomplete, via #7810
- // TODO remove the fallback, see #8156
- var item = ui.item.data( "ui-autocomplete-item" ) || ui.item.data( "item.autocomplete" );
- if ( false !== this._trigger( "focus", event, { item: item } ) ) {
- // use value to match what will end up in the input, if it was a key event
- if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
- this._value( item.value );
- }
- } else {
- // Normally the input is populated with the item's value as the
- // menu is navigated, causing screen readers to notice a change and
- // announce the item. Since the focus event was canceled, this doesn't
- // happen, so we update the live region so that screen readers can
- // still notice the change and announce it.
- this.liveRegion.text( item.value );
- }
- },
- menuselect: function( event, ui ) {
- // back compat for _renderItem using item.autocomplete, via #7810
- // TODO remove the fallback, see #8156
- var item = ui.item.data( "ui-autocomplete-item" ) || ui.item.data( "item.autocomplete" ),
- previous = this.previous;
-
- // only trigger when focus was lost (click on menu)
- if ( this.element[0] !== this.document[0].activeElement ) {
- this.element.focus();
- this.previous = previous;
- // #6109 - IE triggers two focus events and the second
- // is asynchronous, so we need to reset the previous
- // term synchronously and asynchronously :-(
- this._delay(function() {
- this.previous = previous;
- this.selectedItem = item;
- });
- }
-
- if ( false !== this._trigger( "select", event, { item: item } ) ) {
- this._value( item.value );
- }
- // reset the term after the select event
- // this allows custom select handling to work properly
- this.term = this._value();
-
- this.close( event );
- this.selectedItem = item;
- }
- });
-
- this.liveRegion = $( "<span>", {
- role: "status",
- "aria-live": "polite"
- })
- .addClass( "ui-helper-hidden-accessible" )
- .insertAfter( this.element );
-
- if ( $.fn.bgiframe ) {
- this.menu.element.bgiframe();
- }
-
- // turning off autocomplete prevents the browser from remembering the
- // value when navigating through history, so we re-enable autocomplete
- // if the page is unloaded before the widget is destroyed. #7790
- this._on( this.window, {
- beforeunload: function() {
- this.element.removeAttr( "autocomplete" );
- }
- });
- },
-
- _destroy: function() {
- clearTimeout( this.searching );
- this.element
- .removeClass( "ui-autocomplete-input" )
- .removeAttr( "autocomplete" );
- this.menu.element.remove();
- this.liveRegion.remove();
- },
-
- _setOption: function( key, value ) {
- this._super( key, value );
- if ( key === "source" ) {
- this._initSource();
- }
- if ( key === "appendTo" ) {
- this.menu.element.appendTo( this.document.find( value || "body" )[0] );
- }
- if ( key === "disabled" && value && this.xhr ) {
- this.xhr.abort();
- }
- },
-
- _isMultiLine: function() {
- // Textareas are always multi-line
- if ( this.element.is( "textarea" ) ) {
- return true;
- }
- // Inputs are always single-line, even if inside a contentEditable element
- // IE also treats inputs as contentEditable
- if ( this.element.is( "input" ) ) {
- return false;
- }
- // All other element types are determined by whether or not they're contentEditable
- return this.element.prop( "isContentEditable" );
- },
-
- _initSource: function() {
- var array, url,
- that = this;
- if ( $.isArray(this.options.source) ) {
- array = this.options.source;
- this.source = function( request, response ) {
- response( $.ui.autocomplete.filter( array, request.term ) );
- };
- } else if ( typeof this.options.source === "string" ) {
- url = this.options.source;
- this.source = function( request, response ) {
- if ( that.xhr ) {
- that.xhr.abort();
- }
- that.xhr = $.ajax({
- url: url,
- data: request,
- dataType: "json",
- success: function( data ) {
- response( data );
- },
- error: function() {
- response( [] );
- }
- });
- };
- } else {
- this.source = this.options.source;
- }
- },
-
- _searchTimeout: function( event ) {
- clearTimeout( this.searching );
- this.searching = this._delay(function() {
- // only search if the value has changed
- if ( this.term !== this._value() ) {
- this.selectedItem = null;
- this.search( null, event );
- }
- }, this.options.delay );
- },
-
- search: function( value, event ) {
- value = value != null ? value : this._value();
-
- // always save the actual value, not the one passed as an argument
- this.term = this._value();
-
- if ( value.length < this.options.minLength ) {
- return this.close( event );
- }
-
- if ( this._trigger( "search", event ) === false ) {
- return;
- }
-
- return this._search( value );
- },
-
- _search: function( value ) {
- this.pending++;
- this.element.addClass( "ui-autocomplete-loading" );
- this.cancelSearch = false;
-
- this.source( { term: value }, this._response() );
- },
-
- _response: function() {
- var that = this,
- index = ++requestIndex;
-
- return function( content ) {
- if ( index === requestIndex ) {
- that.__response( content );
- }
-
- that.pending--;
- if ( !that.pending ) {
- that.element.removeClass( "ui-autocomplete-loading" );
- }
- };
- },
-
- __response: function( content ) {
- if ( content ) {
- content = this._normalize( content );
- }
- this._trigger( "response", null, { content: content } );
- if ( !this.options.disabled && content && content.length && !this.cancelSearch ) {
- this._suggest( content );
- this._trigger( "open" );
- } else {
- // use ._close() instead of .close() so we don't cancel future searches
- this._close();
- }
- },
-
- close: function( event ) {
- this.cancelSearch = true;
- this._close( event );
- },
-
- _close: function( event ) {
- if ( this.menu.element.is( ":visible" ) ) {
- this.menu.element.hide();
- this.menu.blur();
- this.isNewMenu = true;
- this._trigger( "close", event );
- }
- },
-
- _change: function( event ) {
- if ( this.previous !== this._value() ) {
- this._trigger( "change", event, { item: this.selectedItem } );
- }
- },
-
- _normalize: function( items ) {
- // assume all items have the right format when the first item is complete
- if ( items.length && items[0].label && items[0].value ) {
- return items;
- }
- return $.map( items, function( item ) {
- if ( typeof item === "string" ) {
- return {
- label: item,
- value: item
- };
- }
- return $.extend({
- label: item.label || item.value,
- value: item.value || item.label
- }, item );
- });
- },
-
- _suggest: function( items ) {
- var ul = this.menu.element
- .empty()
- .zIndex( this.element.zIndex() + 1 );
- this._renderMenu( ul, items );
- this.menu.refresh();
-
- // size and position menu
- ul.show();
- this._resizeMenu();
- ul.position( $.extend({
- of: this.element
- }, this.options.position ));
-
- if ( this.options.autoFocus ) {
- this.menu.next();
- }
- },
-
- _resizeMenu: function() {
- var ul = this.menu.element;
- ul.outerWidth( Math.max(
- // Firefox wraps long text (possibly a rounding bug)
- // so we add 1px to avoid the wrapping (#7513)
- ul.width( "" ).outerWidth() + 1,
- this.element.outerWidth()
- ) );
- },
-
- _renderMenu: function( ul, items ) {
- var that = this;
- $.each( items, function( index, item ) {
- that._renderItemData( ul, item );
- });
- },
-
- _renderItemData: function( ul, item ) {
- return this._renderItem( ul, item ).data( "ui-autocomplete-item", item );
- },
-
- _renderItem: function( ul, item ) {
- return $( "<li>" )
- .append( $( "<a>" ).text( item.label ) )
- .appendTo( ul );
- },
-
- _move: function( direction, event ) {
- if ( !this.menu.element.is( ":visible" ) ) {
- this.search( null, event );
- return;
- }
- if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
- this.menu.isLastItem() && /^next/.test( direction ) ) {
- this._value( this.term );
- this.menu.blur();
- return;
- }
- this.menu[ direction ]( event );
- },
-
- widget: function() {
- return this.menu.element;
- },
-
- _value: function() {
- return this.valueMethod.apply( this.element, arguments );
- },
-
- _keyEvent: function( keyEvent, event ) {
- if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
- this._move( keyEvent, event );
-
- // prevents moving cursor to beginning/end of the text field in some browsers
- event.preventDefault();
- }
- }
-});
-
-$.extend( $.ui.autocomplete, {
- escapeRegex: function( value ) {
- return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
- },
- filter: function(array, term) {
- var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" );
- return $.grep( array, function(value) {
- return matcher.test( value.label || value.value || value );
- });
- }
-});
-
-
-// live region extension, adding a `messages` option
-// NOTE: This is an experimental API. We are still investigating
-// a full solution for string manipulation and internationalization.
-$.widget( "ui.autocomplete", $.ui.autocomplete, {
- options: {
- messages: {
- noResults: "No search results.",
- results: function( amount ) {
- return amount + ( amount > 1 ? " results are" : " result is" ) +
- " available, use up and down arrow keys to navigate.";
- }
- }
- },
-
- __response: function( content ) {
- var message;
- this._superApply( arguments );
- if ( this.options.disabled || this.cancelSearch ) {
- return;
- }
- if ( content && content.length ) {
- message = this.options.messages.results( content.length );
- } else {
- message = this.options.messages.noResults;
- }
- this.liveRegion.text( message );
- }
-});
-
-
-}( jQuery ));
-(function( $, undefined ) {
-
-var lastActive, startXPos, startYPos, clickDragged,
- baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
- stateClasses = "ui-state-hover ui-state-active ",
- typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",
- formResetHandler = function() {
- var buttons = $( this ).find( ":ui-button" );
- setTimeout(function() {
- buttons.button( "refresh" );
- }, 1 );
- },
- radioGroup = function( radio ) {
- var name = radio.name,
- form = radio.form,
- radios = $( [] );
- if ( name ) {
- if ( form ) {
- radios = $( form ).find( "[name='" + name + "']" );
- } else {
- radios = $( "[name='" + name + "']", radio.ownerDocument )
- .filter(function() {
- return !this.form;
- });
- }
- }
- return radios;
- };
-
-$.widget( "ui.button", {
- version: "1.9.2",
- defaultElement: "<button>",
- options: {
- disabled: null,
- text: true,
- label: null,
- icons: {
- primary: null,
- secondary: null
- }
- },
- _create: function() {
- this.element.closest( "form" )
- .unbind( "reset" + this.eventNamespace )
- .bind( "reset" + this.eventNamespace, formResetHandler );
-
- if ( typeof this.options.disabled !== "boolean" ) {
- this.options.disabled = !!this.element.prop( "disabled" );
- } else {
- this.element.prop( "disabled", this.options.disabled );
- }
-
- this._determineButtonType();
- this.hasTitle = !!this.buttonElement.attr( "title" );
-
- var that = this,
- options = this.options,
- toggleButton = this.type === "checkbox" || this.type === "radio",
- activeClass = !toggleButton ? "ui-state-active" : "",
- focusClass = "ui-state-focus";
-
- if ( options.label === null ) {
- options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html());
- }
-
- this._hoverable( this.buttonElement );
-
- this.buttonElement
- .addClass( baseClasses )
- .attr( "role", "button" )
- .bind( "mouseenter" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return;
- }
- if ( this === lastActive ) {
- $( this ).addClass( "ui-state-active" );
- }
- })
- .bind( "mouseleave" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return;
- }
- $( this ).removeClass( activeClass );
- })
- .bind( "click" + this.eventNamespace, function( event ) {
- if ( options.disabled ) {
- event.preventDefault();
- event.stopImmediatePropagation();
- }
- });
-
- this.element
- .bind( "focus" + this.eventNamespace, function() {
- // no need to check disabled, focus won't be triggered anyway
- that.buttonElement.addClass( focusClass );
- })
- .bind( "blur" + this.eventNamespace, function() {
- that.buttonElement.removeClass( focusClass );
- });
-
- if ( toggleButton ) {
- this.element.bind( "change" + this.eventNamespace, function() {
- if ( clickDragged ) {
- return;
- }
- that.refresh();
- });
- // if mouse moves between mousedown and mouseup (drag) set clickDragged flag
- // prevents issue where button state changes but checkbox/radio checked state
- // does not in Firefox (see ticket #6970)
- this.buttonElement
- .bind( "mousedown" + this.eventNamespace, function( event ) {
- if ( options.disabled ) {
- return;
- }
- clickDragged = false;
- startXPos = event.pageX;
- startYPos = event.pageY;
- })
- .bind( "mouseup" + this.eventNamespace, function( event ) {
- if ( options.disabled ) {
- return;
- }
- if ( startXPos !== event.pageX || startYPos !== event.pageY ) {
- clickDragged = true;
- }
- });
- }
-
- if ( this.type === "checkbox" ) {
- this.buttonElement.bind( "click" + this.eventNamespace, function() {
- if ( options.disabled || clickDragged ) {
- return false;
- }
- $( this ).toggleClass( "ui-state-active" );
- that.buttonElement.attr( "aria-pressed", that.element[0].checked );
- });
- } else if ( this.type === "radio" ) {
- this.buttonElement.bind( "click" + this.eventNamespace, function() {
- if ( options.disabled || clickDragged ) {
- return false;
- }
- $( this ).addClass( "ui-state-active" );
- that.buttonElement.attr( "aria-pressed", "true" );
-
- var radio = that.element[ 0 ];
- radioGroup( radio )
- .not( radio )
- .map(function() {
- return $( this ).button( "widget" )[ 0 ];
- })
- .removeClass( "ui-state-active" )
- .attr( "aria-pressed", "false" );
- });
- } else {
- this.buttonElement
- .bind( "mousedown" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return false;
- }
- $( this ).addClass( "ui-state-active" );
- lastActive = this;
- that.document.one( "mouseup", function() {
- lastActive = null;
- });
- })
- .bind( "mouseup" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return false;
- }
- $( this ).removeClass( "ui-state-active" );
- })
- .bind( "keydown" + this.eventNamespace, function(event) {
- if ( options.disabled ) {
- return false;
- }
- if ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) {
- $( this ).addClass( "ui-state-active" );
- }
- })
- .bind( "keyup" + this.eventNamespace, function() {
- $( this ).removeClass( "ui-state-active" );
- });
-
- if ( this.buttonElement.is("a") ) {
- this.buttonElement.keyup(function(event) {
- if ( event.keyCode === $.ui.keyCode.SPACE ) {
- // TODO pass through original event correctly (just as 2nd argument doesn't work)
- $( this ).click();
- }
- });
- }
- }
-
- // TODO: pull out $.Widget's handling for the disabled option into
- // $.Widget.prototype._setOptionDisabled so it's easy to proxy and can
- // be overridden by individual plugins
- this._setOption( "disabled", options.disabled );
- this._resetButton();
- },
-
- _determineButtonType: function() {
- var ancestor, labelSelector, checked;
-
- if ( this.element.is("[type=checkbox]") ) {
- this.type = "checkbox";
- } else if ( this.element.is("[type=radio]") ) {
- this.type = "radio";
- } else if ( this.element.is("input") ) {
- this.type = "input";
- } else {
- this.type = "button";
- }
-
- if ( this.type === "checkbox" || this.type === "radio" ) {
- // we don't search against the document in case the element
- // is disconnected from the DOM
- ancestor = this.element.parents().last();
- labelSelector = "label[for='" + this.element.attr("id") + "']";
- this.buttonElement = ancestor.find( labelSelector );
- if ( !this.buttonElement.length ) {
- ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings();
- this.buttonElement = ancestor.filter( labelSelector );
- if ( !this.buttonElement.length ) {
- this.buttonElement = ancestor.find( labelSelector );
- }
- }
- this.element.addClass( "ui-helper-hidden-accessible" );
-
- checked = this.element.is( ":checked" );
- if ( checked ) {
- this.buttonElement.addClass( "ui-state-active" );
- }
- this.buttonElement.prop( "aria-pressed", checked );
- } else {
- this.buttonElement = this.element;
- }
- },
-
- widget: function() {
- return this.buttonElement;
- },
-
- _destroy: function() {
- this.element
- .removeClass( "ui-helper-hidden-accessible" );
- this.buttonElement
- .removeClass( baseClasses + " " + stateClasses + " " + typeClasses )
- .removeAttr( "role" )
- .removeAttr( "aria-pressed" )
- .html( this.buttonElement.find(".ui-button-text").html() );
-
- if ( !this.hasTitle ) {
- this.buttonElement.removeAttr( "title" );
- }
- },
-
- _setOption: function( key, value ) {
- this._super( key, value );
- if ( key === "disabled" ) {
- if ( value ) {
- this.element.prop( "disabled", true );
- } else {
- this.element.prop( "disabled", false );
- }
- return;
- }
- this._resetButton();
- },
-
- refresh: function() {
- //See #8237 & #8828
- var isDisabled = this.element.is( "input, button" ) ? this.element.is( ":disabled" ) : this.element.hasClass( "ui-button-disabled" );
-
- if ( isDisabled !== this.options.disabled ) {
- this._setOption( "disabled", isDisabled );
- }
- if ( this.type === "radio" ) {
- radioGroup( this.element[0] ).each(function() {
- if ( $( this ).is( ":checked" ) ) {
- $( this ).button( "widget" )
- .addClass( "ui-state-active" )
- .attr( "aria-pressed", "true" );
- } else {
- $( this ).button( "widget" )
- .removeClass( "ui-state-active" )
- .attr( "aria-pressed", "false" );
- }
- });
- } else if ( this.type === "checkbox" ) {
- if ( this.element.is( ":checked" ) ) {
- this.buttonElement
- .addClass( "ui-state-active" )
- .attr( "aria-pressed", "true" );
- } else {
- this.buttonElement
- .removeClass( "ui-state-active" )
- .attr( "aria-pressed", "false" );
- }
- }
- },
-
- _resetButton: function() {
- if ( this.type === "input" ) {
- if ( this.options.label ) {
- this.element.val( this.options.label );
- }
- return;
- }
- var buttonElement = this.buttonElement.removeClass( typeClasses ),
- buttonText = $( "<span></span>", this.document[0] )
- .addClass( "ui-button-text" )
- .html( this.options.label )
- .appendTo( buttonElement.empty() )
- .text(),
- icons = this.options.icons,
- multipleIcons = icons.primary && icons.secondary,
- buttonClasses = [];
-
- if ( icons.primary || icons.secondary ) {
- if ( this.options.text ) {
- buttonClasses.push( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) );
- }
-
- if ( icons.primary ) {
- buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" );
- }
-
- if ( icons.secondary ) {
- buttonElement.append( "<span class='ui-button-icon-secondary ui-icon " + icons.secondary + "'></span>" );
- }
-
- if ( !this.options.text ) {
- buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" );
-
- if ( !this.hasTitle ) {
- buttonElement.attr( "title", $.trim( buttonText ) );
- }
- }
- } else {
- buttonClasses.push( "ui-button-text-only" );
- }
- buttonElement.addClass( buttonClasses.join( " " ) );
- }
-});
-
-$.widget( "ui.buttonset", {
- version: "1.9.2",
- options: {
- items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(button)"
- },
-
- _create: function() {
- this.element.addClass( "ui-buttonset" );
- },
-
- _init: function() {
- this.refresh();
- },
-
- _setOption: function( key, value ) {
- if ( key === "disabled" ) {
- this.buttons.button( "option", key, value );
- }
-
- this._super( key, value );
- },
-
- refresh: function() {
- var rtl = this.element.css( "direction" ) === "rtl";
-
- this.buttons = this.element.find( this.options.items )
- .filter( ":ui-button" )
- .button( "refresh" )
- .end()
- .not( ":ui-button" )
- .button()
- .end()
- .map(function() {
- return $( this ).button( "widget" )[ 0 ];
- })
- .removeClass( "ui-corner-all ui-corner-left ui-corner-right" )
- .filter( ":first" )
- .addClass( rtl ? "ui-corner-right" : "ui-corner-left" )
- .end()
- .filter( ":last" )
- .addClass( rtl ? "ui-corner-left" : "ui-corner-right" )
- .end()
- .end();
- },
-
- _destroy: function() {
- this.element.removeClass( "ui-buttonset" );
- this.buttons
- .map(function() {
- return $( this ).button( "widget" )[ 0 ];
- })
- .removeClass( "ui-corner-left ui-corner-right" )
- .end()
- .button( "destroy" );
- }
-});
-
-}( jQuery ) );
-(function( $, undefined ) {
-
-$.extend($.ui, { datepicker: { version: "1.9.2" } });
-
-var PROP_NAME = 'datepicker';
-var dpuuid = new Date().getTime();
-var instActive;
-
-/* Date picker manager.
- Use the singleton instance of this class, $.datepicker, to interact with the date picker.
- Settings for (groups of) date pickers are maintained in an instance object,
- allowing multiple different settings on the same page. */
-
-function Datepicker() {
- this.debug = false; // Change this to true to start debugging
- this._curInst = null; // The current instance in use
- this._keyEvent = false; // If the last event was a key event
- this._disabledInputs = []; // List of date picker inputs that have been disabled
- this._datepickerShowing = false; // True if the popup picker is showing , false if not
- this._inDialog = false; // True if showing within a "dialog", false if not
- this._mainDivId = 'ui-datepicker-div'; // The ID of the main datepicker division
- this._inlineClass = 'ui-datepicker-inline'; // The name of the inline marker class
- this._appendClass = 'ui-datepicker-append'; // The name of the append marker class
- this._triggerClass = 'ui-datepicker-trigger'; // The name of the trigger marker class
- this._dialogClass = 'ui-datepicker-dialog'; // The name of the dialog marker class
- this._disableClass = 'ui-datepicker-disabled'; // The name of the disabled covering marker class
- this._unselectableClass = 'ui-datepicker-unselectable'; // The name of the unselectable cell marker class
- this._currentClass = 'ui-datepicker-current-day'; // The name of the current day marker class
- this._dayOverClass = 'ui-datepicker-days-cell-over'; // The name of the day hover marker class
- this.regional = []; // Available regional settings, indexed by language code
- this.regional[''] = { // Default regional settings
- closeText: 'Done', // Display text for close link
- prevText: 'Prev', // Display text for previous month link
- nextText: 'Next', // Display text for next month link
- currentText: 'Today', // Display text for current month link
- monthNames: ['January','February','March','April','May','June',
- 'July','August','September','October','November','December'], // Names of months for drop-down and formatting
- monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], // For formatting
- dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], // For formatting
- dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], // For formatting
- dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Column headings for days starting at Sunday
- weekHeader: 'Wk', // Column header for week of the year
- dateFormat: 'mm/dd/yy', // See format options on parseDate
- firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
- isRTL: false, // True if right-to-left language, false if left-to-right
- showMonthAfterYear: false, // True if the year select precedes month, false for month then year
- yearSuffix: '' // Additional text to append to the year in the month headers
- };
- this._defaults = { // Global defaults for all the date picker instances
- showOn: 'focus', // 'focus' for popup on focus,
- // 'button' for trigger button, or 'both' for either
- showAnim: 'fadeIn', // Name of jQuery animation for popup
- showOptions: {}, // Options for enhanced animations
- defaultDate: null, // Used when field is blank: actual date,
- // +/-number for offset from today, null for today
- appendText: '', // Display text following the input box, e.g. showing the format
- buttonText: '...', // Text for trigger button
- buttonImage: '', // URL for trigger button image
- buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
- hideIfNoPrevNext: false, // True to hide next/previous month links
- // if not applicable, false to just disable them
- navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
- gotoCurrent: false, // True if today link goes back to current selection instead
- changeMonth: false, // True if month can be selected directly, false if only prev/next
- changeYear: false, // True if year can be selected directly, false if only prev/next
- yearRange: 'c-10:c+10', // Range of years to display in drop-down,
- // either relative to today's year (-nn:+nn), relative to currently displayed year
- // (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
- showOtherMonths: false, // True to show dates in other months, false to leave blank
- selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable
- showWeek: false, // True to show week of the year, false to not show it
- calculateWeek: this.iso8601Week, // How to calculate the week of the year,
- // takes a Date and returns the number of the week for it
- shortYearCutoff: '+10', // Short year values < this are in the current century,
- // > this are in the previous century,
- // string value starting with '+' for current year + value
- minDate: null, // The earliest selectable date, or null for no limit
- maxDate: null, // The latest selectable date, or null for no limit
- duration: 'fast', // Duration of display/closure
- beforeShowDay: null, // Function that takes a date and returns an array with
- // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or '',
- // [2] = cell title (optional), e.g. $.datepicker.noWeekends
- beforeShow: null, // Function that takes an input field and
- // returns a set of custom settings for the date picker
- onSelect: null, // Define a callback function when a date is selected
- onChangeMonthYear: null, // Define a callback function when the month or year is changed
- onClose: null, // Define a callback function when the datepicker is closed
- numberOfMonths: 1, // Number of months to show at a time
- showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
- stepMonths: 1, // Number of months to step back/forward
- stepBigMonths: 12, // Number of months to step back/forward for the big links
- altField: '', // Selector for an alternate field to store selected dates into
- altFormat: '', // The date format to use for the alternate field
- constrainInput: true, // The input is constrained by the current date format
- showButtonPanel: false, // True to show button panel, false to not show it
- autoSize: false, // True to size the input for the date format, false to leave as is
- disabled: false // The initial disabled state
- };
- $.extend(this._defaults, this.regional['']);
- this.dpDiv = bindHover($('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'));
-}
-
-$.extend(Datepicker.prototype, {
- /* Class name added to elements to indicate already configured with a date picker. */
- markerClassName: 'hasDatepicker',
-
- //Keep track of the maximum number of rows displayed (see #7043)
- maxRows: 4,
-
- /* Debug logging (if enabled). */
- log: function () {
- if (this.debug)
- console.log.apply('', arguments);
- },
-
- // TODO rename to "widget" when switching to widget factory
- _widgetDatepicker: function() {
- return this.dpDiv;
- },
-
- /* Override the default settings for all instances of the date picker.
- @param settings object - the new settings to use as defaults (anonymous object)
- @return the manager object */
- setDefaults: function(settings) {
- extendRemove(this._defaults, settings || {});
- return this;
- },
-
- /* Attach the date picker to a jQuery selection.
- @param target element - the target input field or division or span
- @param settings object - the new settings to use for this date picker instance (anonymous) */
- _attachDatepicker: function(target, settings) {
- // check for settings on the control itself - in namespace 'date:'
- var inlineSettings = null;
- for (var attrName in this._defaults) {
- var attrValue = target.getAttribute('date:' + attrName);
- if (attrValue) {
- inlineSettings = inlineSettings || {};
- try {
- inlineSettings[attrName] = eval(attrValue);
- } catch (err) {
- inlineSettings[attrName] = attrValue;
- }
- }
- }
- var nodeName = target.nodeName.toLowerCase();
- var inline = (nodeName == 'div' || nodeName == 'span');
- if (!target.id) {
- this.uuid += 1;
- target.id = 'dp' + this.uuid;
- }
- var inst = this._newInst($(target), inline);
- inst.settings = $.extend({}, settings || {}, inlineSettings || {});
- if (nodeName == 'input') {
- this._connectDatepicker(target, inst);
- } else if (inline) {
- this._inlineDatepicker(target, inst);
- }
- },
-
- /* Create a new instance object. */
- _newInst: function(target, inline) {
- var id = target[0].id.replace(/([^A-Za-z0-9_-])/g, '\\\\$1'); // escape jQuery meta chars
- return {id: id, input: target, // associated target
- selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
- drawMonth: 0, drawYear: 0, // month being drawn
- inline: inline, // is datepicker inline or not
- dpDiv: (!inline ? this.dpDiv : // presentation div
- bindHover($('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')))};
- },
-
- /* Attach the date picker to an input field. */
- _connectDatepicker: function(target, inst) {
- var input = $(target);
- inst.append = $([]);
- inst.trigger = $([]);
- if (input.hasClass(this.markerClassName))
- return;
- this._attachments(input, inst);
- input.addClass(this.markerClassName).keydown(this._doKeyDown).
- keypress(this._doKeyPress).keyup(this._doKeyUp).
- bind("setData.datepicker", function(event, key, value) {
- inst.settings[key] = value;
- }).bind("getData.datepicker", function(event, key) {
- return this._get(inst, key);
- });
- this._autoSize(inst);
- $.data(target, PROP_NAME, inst);
- //If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)
- if( inst.settings.disabled ) {
- this._disableDatepicker( target );
- }
- },
-
- /* Make attachments based on settings. */
- _attachments: function(input, inst) {
- var appendText = this._get(inst, 'appendText');
- var isRTL = this._get(inst, 'isRTL');
- if (inst.append)
- inst.append.remove();
- if (appendText) {
- inst.append = $('<span class="' + this._appendClass + '">' + appendText + '</span>');
- input[isRTL ? 'before' : 'after'](inst.append);
- }
- input.unbind('focus', this._showDatepicker);
- if (inst.trigger)
- inst.trigger.remove();
- var showOn = this._get(inst, 'showOn');
- if (showOn == 'focus' || showOn == 'both') // pop-up date picker when in the marked field
- input.focus(this._showDatepicker);
- if (showOn == 'button' || showOn == 'both') { // pop-up date picker when button clicked
- var buttonText = this._get(inst, 'buttonText');
- var buttonImage = this._get(inst, 'buttonImage');
- inst.trigger = $(this._get(inst, 'buttonImageOnly') ?
- $('<img/>').addClass(this._triggerClass).
- attr({ src: buttonImage, alt: buttonText, title: buttonText }) :
- $('<button type="button"></button>').addClass(this._triggerClass).
- html(buttonImage == '' ? buttonText : $('<img/>').attr(
- { src:buttonImage, alt:buttonText, title:buttonText })));
- input[isRTL ? 'before' : 'after'](inst.trigger);
- inst.trigger.click(function() {
- if ($.datepicker._datepickerShowing && $.datepicker._lastInput == input[0])
- $.datepicker._hideDatepicker();
- else if ($.datepicker._datepickerShowing && $.datepicker._lastInput != input[0]) {
- $.datepicker._hideDatepicker();
- $.datepicker._showDatepicker(input[0]);
- } else
- $.datepicker._showDatepicker(input[0]);
- return false;
- });
- }
- },
-
- /* Apply the maximum length for the date format. */
- _autoSize: function(inst) {
- if (this._get(inst, 'autoSize') && !inst.inline) {
- var date = new Date(2009, 12 - 1, 20); // Ensure double digits
- var dateFormat = this._get(inst, 'dateFormat');
- if (dateFormat.match(/[DM]/)) {
- var findMax = function(names) {
- var max = 0;
- var maxI = 0;
- for (var i = 0; i < names.length; i++) {
- if (names[i].length > max) {
- max = names[i].length;
- maxI = i;
- }
- }
- return maxI;
- };
- date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ?
- 'monthNames' : 'monthNamesShort'))));
- date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ?
- 'dayNames' : 'dayNamesShort'))) + 20 - date.getDay());
- }
- inst.input.attr('size', this._formatDate(inst, date).length);
- }
- },
-
- /* Attach an inline date picker to a div. */
- _inlineDatepicker: function(target, inst) {
- var divSpan = $(target);
- if (divSpan.hasClass(this.markerClassName))
- return;
- divSpan.addClass(this.markerClassName).append(inst.dpDiv).
- bind("setData.datepicker", function(event, key, value){
- inst.settings[key] = value;
- }).bind("getData.datepicker", function(event, key){
- return this._get(inst, key);
- });
- $.data(target, PROP_NAME, inst);
- this._setDate(inst, this._getDefaultDate(inst), true);
- this._updateDatepicker(inst);
- this._updateAlternate(inst);
- //If disabled option is true, disable the datepicker before showing it (see ticket #5665)
- if( inst.settings.disabled ) {
- this._disableDatepicker( target );
- }
- // Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements
- // http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height
- inst.dpDiv.css( "display", "block" );
- },
-
- /* Pop-up the date picker in a "dialog" box.
- @param input element - ignored
- @param date string or Date - the initial date to display
- @param onSelect function - the function to call when a date is selected
- @param settings object - update the dialog date picker instance's settings (anonymous object)
- @param pos int[2] - coordinates for the dialog's position within the screen or
- event - with x/y coordinates or
- leave empty for default (screen centre)
- @return the manager object */
- _dialogDatepicker: function(input, date, onSelect, settings, pos) {
- var inst = this._dialogInst; // internal instance
- if (!inst) {
- this.uuid += 1;
- var id = 'dp' + this.uuid;
- this._dialogInput = $('<input type="text" id="' + id +
- '" style="position: absolute; top: -100px; width: 0px;"/>');
- this._dialogInput.keydown(this._doKeyDown);
- $('body').append(this._dialogInput);
- inst = this._dialogInst = this._newInst(this._dialogInput, false);
- inst.settings = {};
- $.data(this._dialogInput[0], PROP_NAME, inst);
- }
- extendRemove(inst.settings, settings || {});
- date = (date && date.constructor == Date ? this._formatDate(inst, date) : date);
- this._dialogInput.val(date);
-
- this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);
- if (!this._pos) {
- var browserWidth = document.documentElement.clientWidth;
- var browserHeight = document.documentElement.clientHeight;
- var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
- var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
- this._pos = // should use actual width/height below
- [(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];
- }
-
- // move input on screen for focus, but hidden behind dialog
- this._dialogInput.css('left', (this._pos[0] + 20) + 'px').css('top', this._pos[1] + 'px');
- inst.settings.onSelect = onSelect;
- this._inDialog = true;
- this.dpDiv.addClass(this._dialogClass);
- this._showDatepicker(this._dialogInput[0]);
- if ($.blockUI)
- $.blockUI(this.dpDiv);
- $.data(this._dialogInput[0], PROP_NAME, inst);
- return this;
- },
-
- /* Detach a datepicker from its control.
- @param target element - the target input field or division or span */
- _destroyDatepicker: function(target) {
- var $target = $(target);
- var inst = $.data(target, PROP_NAME);
- if (!$target.hasClass(this.markerClassName)) {
- return;
- }
- var nodeName = target.nodeName.toLowerCase();
- $.removeData(target, PROP_NAME);
- if (nodeName == 'input') {
- inst.append.remove();
- inst.trigger.remove();
- $target.removeClass(this.markerClassName).
- unbind('focus', this._showDatepicker).
- unbind('keydown', this._doKeyDown).
- unbind('keypress', this._doKeyPress).
- unbind('keyup', this._doKeyUp);
- } else if (nodeName == 'div' || nodeName == 'span')
- $target.removeClass(this.markerClassName).empty();
- },
-
- /* Enable the date picker to a jQuery selection.
- @param target element - the target input field or division or span */
- _enableDatepicker: function(target) {
- var $target = $(target);
- var inst = $.data(target, PROP_NAME);
- if (!$target.hasClass(this.markerClassName)) {
- return;
- }
- var nodeName = target.nodeName.toLowerCase();
- if (nodeName == 'input') {
- target.disabled = false;
- inst.trigger.filter('button').
- each(function() { this.disabled = false; }).end().
- filter('img').css({opacity: '1.0', cursor: ''});
- }
- else if (nodeName == 'div' || nodeName == 'span') {
- var inline = $target.children('.' + this._inlineClass);
- inline.children().removeClass('ui-state-disabled');
- inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
- prop("disabled", false);
- }
- this._disabledInputs = $.map(this._disabledInputs,
- function(value) { return (value == target ? null : value); }); // delete entry
- },
-
- /* Disable the date picker to a jQuery selection.
- @param target element - the target input field or division or span */
- _disableDatepicker: function(target) {
- var $target = $(target);
- var inst = $.data(target, PROP_NAME);
- if (!$target.hasClass(this.markerClassName)) {
- return;
- }
- var nodeName = target.nodeName.toLowerCase();
- if (nodeName == 'input') {
- target.disabled = true;
- inst.trigger.filter('button').
- each(function() { this.disabled = true; }).end().
- filter('img').css({opacity: '0.5', cursor: 'default'});
- }
- else if (nodeName == 'div' || nodeName == 'span') {
- var inline = $target.children('.' + this._inlineClass);
- inline.children().addClass('ui-state-disabled');
- inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
- prop("disabled", true);
- }
- this._disabledInputs = $.map(this._disabledInputs,
- function(value) { return (value == target ? null : value); }); // delete entry
- this._disabledInputs[this._disabledInputs.length] = target;
- },
-
- /* Is the first field in a jQuery collection disabled as a datepicker?
- @param target element - the target input field or division or span
- @return boolean - true if disabled, false if enabled */
- _isDisabledDatepicker: function(target) {
- if (!target) {
- return false;
- }
- for (var i = 0; i < this._disabledInputs.length; i++) {
- if (this._disabledInputs[i] == target)
- return true;
- }
- return false;
- },
-
- /* Retrieve the instance data for the target control.
- @param target element - the target input field or division or span
- @return object - the associated instance data
- @throws error if a jQuery problem getting data */
- _getInst: function(target) {
- try {
- return $.data(target, PROP_NAME);
- }
- catch (err) {
- throw 'Missing instance data for this datepicker';
- }
- },
-
- /* Update or retrieve the settings for a date picker attached to an input field or division.
- @param target element - the target input field or division or span
- @param name object - the new settings to update or
- string - the name of the setting to change or retrieve,
- when retrieving also 'all' for all instance settings or
- 'defaults' for all global defaults
- @param value any - the new value for the setting
- (omit if above is an object or to retrieve a value) */
- _optionDatepicker: function(target, name, value) {
- var inst = this._getInst(target);
- if (arguments.length == 2 && typeof name == 'string') {
- return (name == 'defaults' ? $.extend({}, $.datepicker._defaults) :
- (inst ? (name == 'all' ? $.extend({}, inst.settings) :
- this._get(inst, name)) : null));
- }
- var settings = name || {};
- if (typeof name == 'string') {
- settings = {};
- settings[name] = value;
- }
- if (inst) {
- if (this._curInst == inst) {
- this._hideDatepicker();
- }
- var date = this._getDateDatepicker(target, true);
- var minDate = this._getMinMaxDate(inst, 'min');
- var maxDate = this._getMinMaxDate(inst, 'max');
- extendRemove(inst.settings, settings);
- // reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided
- if (minDate !== null && settings['dateFormat'] !== undefined && settings['minDate'] === undefined)
- inst.settings.minDate = this._formatDate(inst, minDate);
- if (maxDate !== null && settings['dateFormat'] !== undefined && settings['maxDate'] === undefined)
- inst.settings.maxDate = this._formatDate(inst, maxDate);
- this._attachments($(target), inst);
- this._autoSize(inst);
- this._setDate(inst, date);
- this._updateAlternate(inst);
- this._updateDatepicker(inst);
- }
- },
-
- // change method deprecated
- _changeDatepicker: function(target, name, value) {
- this._optionDatepicker(target, name, value);
- },
-
- /* Redraw the date picker attached to an input field or division.
- @param target element - the target input field or division or span */
- _refreshDatepicker: function(target) {
- var inst = this._getInst(target);
- if (inst) {
- this._updateDatepicker(inst);
- }
- },
-
- /* Set the dates for a jQuery selection.
- @param target element - the target input field or division or span
- @param date Date - the new date */
- _setDateDatepicker: function(target, date) {
- var inst = this._getInst(target);
- if (inst) {
- this._setDate(inst, date);
- this._updateDatepicker(inst);
- this._updateAlternate(inst);
- }
- },
-
- /* Get the date(s) for the first entry in a jQuery selection.
- @param target element - the target input field or division or span
- @param noDefault boolean - true if no default date is to be used
- @return Date - the current date */
- _getDateDatepicker: function(target, noDefault) {
- var inst = this._getInst(target);
- if (inst && !inst.inline)
- this._setDateFromField(inst, noDefault);
- return (inst ? this._getDate(inst) : null);
- },
-
- /* Handle keystrokes. */
- _doKeyDown: function(event) {
- var inst = $.datepicker._getInst(event.target);
- var handled = true;
- var isRTL = inst.dpDiv.is('.ui-datepicker-rtl');
- inst._keyEvent = true;
- if ($.datepicker._datepickerShowing)
- switch (event.keyCode) {
- case 9: $.datepicker._hideDatepicker();
- handled = false;
- break; // hide on tab out
- case 13: var sel = $('td.' + $.datepicker._dayOverClass + ':not(.' +
- $.datepicker._currentClass + ')', inst.dpDiv);
- if (sel[0])
- $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
- var onSelect = $.datepicker._get(inst, 'onSelect');
- if (onSelect) {
- var dateStr = $.datepicker._formatDate(inst);
-
- // trigger custom callback
- onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);
- }
- else
- $.datepicker._hideDatepicker();
- return false; // don't submit the form
- break; // select the value on enter
- case 27: $.datepicker._hideDatepicker();
- break; // hide on escape
- case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
- -$.datepicker._get(inst, 'stepBigMonths') :
- -$.datepicker._get(inst, 'stepMonths')), 'M');
- break; // previous month/year on page up/+ ctrl
- case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
- +$.datepicker._get(inst, 'stepBigMonths') :
- +$.datepicker._get(inst, 'stepMonths')), 'M');
- break; // next month/year on page down/+ ctrl
- case 35: if (event.ctrlKey || event.metaKey) $.datepicker._clearDate(event.target);
- handled = event.ctrlKey || event.metaKey;
- break; // clear on ctrl or command +end
- case 36: if (event.ctrlKey || event.metaKey) $.datepicker._gotoToday(event.target);
- handled = event.ctrlKey || event.metaKey;
- break; // current on ctrl or command +home
- case 37: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), 'D');
- handled = event.ctrlKey || event.metaKey;
- // -1 day on ctrl or command +left
- if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
- -$.datepicker._get(inst, 'stepBigMonths') :
- -$.datepicker._get(inst, 'stepMonths')), 'M');
- // next month/year on alt +left on Mac
- break;
- case 38: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, -7, 'D');
- handled = event.ctrlKey || event.metaKey;
- break; // -1 week on ctrl or command +up
- case 39: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), 'D');
- handled = event.ctrlKey || event.metaKey;
- // +1 day on ctrl or command +right
- if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
- +$.datepicker._get(inst, 'stepBigMonths') :
- +$.datepicker._get(inst, 'stepMonths')), 'M');
- // next month/year on alt +right
- break;
- case 40: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, +7, 'D');
- handled = event.ctrlKey || event.metaKey;
- break; // +1 week on ctrl or command +down
- default: handled = false;
- }
- else if (event.keyCode == 36 && event.ctrlKey) // display the date picker on ctrl+home
- $.datepicker._showDatepicker(this);
- else {
- handled = false;
- }
- if (handled) {
- event.preventDefault();
- event.stopPropagation();
- }
- },
-
- /* Filter entered characters - based on date format. */
- _doKeyPress: function(event) {
- var inst = $.datepicker._getInst(event.target);
- if ($.datepicker._get(inst, 'constrainInput')) {
- var chars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat'));
- var chr = String.fromCharCode(event.charCode == undefined ? event.keyCode : event.charCode);
- return event.ctrlKey || event.metaKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1);
- }
- },
-
- /* Synchronise manual entry and field/alternate field. */
- _doKeyUp: function(event) {
- var inst = $.datepicker._getInst(event.target);
- if (inst.input.val() != inst.lastVal) {
- try {
- var date = $.datepicker.parseDate($.datepicker._get(inst, 'dateFormat'),
- (inst.input ? inst.input.val() : null),
- $.datepicker._getFormatConfig(inst));
- if (date) { // only if valid
- $.datepicker._setDateFromField(inst);
- $.datepicker._updateAlternate(inst);
- $.datepicker._updateDatepicker(inst);
- }
- }
- catch (err) {
- $.datepicker.log(err);
- }
- }
- return true;
- },
-
- /* Pop-up the date picker for a given input field.
- If false returned from beforeShow event handler do not show.
- @param input element - the input field attached to the date picker or
- event - if triggered by focus */
- _showDatepicker: function(input) {
- input = input.target || input;
- if (input.nodeName.toLowerCase() != 'input') // find from button/image trigger
- input = $('input', input.parentNode)[0];
- if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here
- return;
- var inst = $.datepicker._getInst(input);
- if ($.datepicker._curInst && $.datepicker._curInst != inst) {
- $.datepicker._curInst.dpDiv.stop(true, true);
- if ( inst && $.datepicker._datepickerShowing ) {
- $.datepicker._hideDatepicker( $.datepicker._curInst.input[0] );
- }
- }
- var beforeShow = $.datepicker._get(inst, 'beforeShow');
- var beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {};
- if(beforeShowSettings === false){
- //false
- return;
- }
- extendRemove(inst.settings, beforeShowSettings);
- inst.lastVal = null;
- $.datepicker._lastInput = input;
- $.datepicker._setDateFromField(inst);
- if ($.datepicker._inDialog) // hide cursor
- input.value = '';
- if (!$.datepicker._pos) { // position below input
- $.datepicker._pos = $.datepicker._findPos(input);
- $.datepicker._pos[1] += input.offsetHeight; // add the height
- }
- var isFixed = false;
- $(input).parents().each(function() {
- isFixed |= $(this).css('position') == 'fixed';
- return !isFixed;
- });
- var offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
- $.datepicker._pos = null;
- //to avoid flashes on Firefox
- inst.dpDiv.empty();
- // determine sizing offscreen
- inst.dpDiv.css({position: 'absolute', display: 'block', top: '-1000px'});
- $.datepicker._updateDatepicker(inst);
- // fix width for dynamic number of date pickers
- // and adjust position before showing
- offset = $.datepicker._checkOffset(inst, offset, isFixed);
- inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?
- 'static' : (isFixed ? 'fixed' : 'absolute')), display: 'none',
- left: offset.left + 'px', top: offset.top + 'px'});
- if (!inst.inline) {
- var showAnim = $.datepicker._get(inst, 'showAnim');
- var duration = $.datepicker._get(inst, 'duration');
- var postProcess = function() {
- var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only
- if( !! cover.length ){
- var borders = $.datepicker._getBorders(inst.dpDiv);
- cover.css({left: -borders[0], top: -borders[1],
- width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()});
- }
- };
- inst.dpDiv.zIndex($(input).zIndex()+1);
- $.datepicker._datepickerShowing = true;
-
- // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
- if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) )
- inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
- else
- inst.dpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess);
- if (!showAnim || !duration)
- postProcess();
- if (inst.input.is(':visible') && !inst.input.is(':disabled'))
- inst.input.focus();
- $.datepicker._curInst = inst;
- }
- },
-
- /* Generate the date picker content. */
- _updateDatepicker: function(inst) {
- this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
- var borders = $.datepicker._getBorders(inst.dpDiv);
- instActive = inst; // for delegate hover events
- inst.dpDiv.empty().append(this._generateHTML(inst));
- this._attachHandlers(inst);
- var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only
- if( !!cover.length ){ //avoid call to outerXXXX() when not in IE6
- cover.css({left: -borders[0], top: -borders[1], width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()})
- }
- inst.dpDiv.find('.' + this._dayOverClass + ' a').mouseover();
- var numMonths = this._getNumberOfMonths(inst);
- var cols = numMonths[1];
- var width = 17;
- inst.dpDiv.removeClass('ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4').width('');
- if (cols > 1)
- inst.dpDiv.addClass('ui-datepicker-multi-' + cols).css('width', (width * cols) + 'em');
- inst.dpDiv[(numMonths[0] != 1 || numMonths[1] != 1 ? 'add' : 'remove') +
- 'Class']('ui-datepicker-multi');
- inst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') +
- 'Class']('ui-datepicker-rtl');
- if (inst == $.datepicker._curInst && $.datepicker._datepickerShowing && inst.input &&
- // #6694 - don't focus the input if it's already focused
- // this breaks the change event in IE
- inst.input.is(':visible') && !inst.input.is(':disabled') && inst.input[0] != document.activeElement)
- inst.input.focus();
- // deffered render of the years select (to avoid flashes on Firefox)
- if( inst.yearshtml ){
- var origyearshtml = inst.yearshtml;
- setTimeout(function(){
- //assure that inst.yearshtml didn't change.
- if( origyearshtml === inst.yearshtml && inst.yearshtml ){
- inst.dpDiv.find('select.ui-datepicker-year:first').replaceWith(inst.yearshtml);
- }
- origyearshtml = inst.yearshtml = null;
- }, 0);
- }
- },
-
- /* Retrieve the size of left and top borders for an element.
- @param elem (jQuery object) the element of interest
- @return (number[2]) the left and top borders */
- _getBorders: function(elem) {
- var convert = function(value) {
- return {thin: 1, medium: 2, thick: 3}[value] || value;
- };
- return [parseFloat(convert(elem.css('border-left-width'))),
- parseFloat(convert(elem.css('border-top-width')))];
- },
-
- /* Check positioning to remain on screen. */
- _checkOffset: function(inst, offset, isFixed) {
- var dpWidth = inst.dpDiv.outerWidth();
- var dpHeight = inst.dpDiv.outerHeight();
- var inputWidth = inst.input ? inst.input.outerWidth() : 0;
- var inputHeight = inst.input ? inst.input.outerHeight() : 0;
- var viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft());
- var viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop());
-
- offset.left -= (this._get(inst, 'isRTL') ? (dpWidth - inputWidth) : 0);
- offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0;
- offset.top -= (isFixed && offset.top == (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;
-
- // now check if datepicker is showing outside window viewport - move to a better place if so.
- offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?
- Math.abs(offset.left + dpWidth - viewWidth) : 0);
- offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?
- Math.abs(dpHeight + inputHeight) : 0);
-
- return offset;
- },
-
- /* Find an object's position on the screen. */
- _findPos: function(obj) {
- var inst = this._getInst(obj);
- var isRTL = this._get(inst, 'isRTL');
- while (obj && (obj.type == 'hidden' || obj.nodeType != 1 || $.expr.filters.hidden(obj))) {
- obj = obj[isRTL ? 'previousSibling' : 'nextSibling'];
- }
- var position = $(obj).offset();
- return [position.left, position.top];
- },
-
- /* Hide the date picker from view.
- @param input element - the input field attached to the date picker */
- _hideDatepicker: function(input) {
- var inst = this._curInst;
- if (!inst || (input && inst != $.data(input, PROP_NAME)))
- return;
- if (this._datepickerShowing) {
- var showAnim = this._get(inst, 'showAnim');
- var duration = this._get(inst, 'duration');
- var postProcess = function() {
- $.datepicker._tidyDialog(inst);
- };
-
- // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
- if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) )
- inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
- else
- inst.dpDiv[(showAnim == 'slideDown' ? 'slideUp' :
- (showAnim == 'fadeIn' ? 'fadeOut' : 'hide'))]((showAnim ? duration : null), postProcess);
- if (!showAnim)
- postProcess();
- this._datepickerShowing = false;
- var onClose = this._get(inst, 'onClose');
- if (onClose)
- onClose.apply((inst.input ? inst.input[0] : null),
- [(inst.input ? inst.input.val() : ''), inst]);
- this._lastInput = null;
- if (this._inDialog) {
- this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' });
- if ($.blockUI) {
- $.unblockUI();
- $('body').append(this.dpDiv);
- }
- }
- this._inDialog = false;
- }
- },
-
- /* Tidy up after a dialog display. */
- _tidyDialog: function(inst) {
- inst.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker-calendar');
- },
-
- /* Close date picker if clicked elsewhere. */
- _checkExternalClick: function(event) {
- if (!$.datepicker._curInst)
- return;
-
- var $target = $(event.target),
- inst = $.datepicker._getInst($target[0]);
-
- if ( ( ( $target[0].id != $.datepicker._mainDivId &&
- $target.parents('#' + $.datepicker._mainDivId).length == 0 &&
- !$target.hasClass($.datepicker.markerClassName) &&
- !$target.closest("." + $.datepicker._triggerClass).length &&
- $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||
- ( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst != inst ) )
- $.datepicker._hideDatepicker();
- },
-
- /* Adjust one of the date sub-fields. */
- _adjustDate: function(id, offset, period) {
- var target = $(id);
- var inst = this._getInst(target[0]);
- if (this._isDisabledDatepicker(target[0])) {
- return;
- }
- this._adjustInstDate(inst, offset +
- (period == 'M' ? this._get(inst, 'showCurrentAtPos') : 0), // undo positioning
- period);
- this._updateDatepicker(inst);
- },
-
- /* Action for current link. */
- _gotoToday: function(id) {
- var target = $(id);
- var inst = this._getInst(target[0]);
- if (this._get(inst, 'gotoCurrent') && inst.currentDay) {
- inst.selectedDay = inst.currentDay;
- inst.drawMonth = inst.selectedMonth = inst.currentMonth;
- inst.drawYear = inst.selectedYear = inst.currentYear;
- }
- else {
- var date = new Date();
- inst.selectedDay = date.getDate();
- inst.drawMonth = inst.selectedMonth = date.getMonth();
- inst.drawYear = inst.selectedYear = date.getFullYear();
- }
- this._notifyChange(inst);
- this._adjustDate(target);
- },
-
- /* Action for selecting a new month/year. */
- _selectMonthYear: function(id, select, period) {
- var target = $(id);
- var inst = this._getInst(target[0]);
- inst['selected' + (period == 'M' ? 'Month' : 'Year')] =
- inst['draw' + (period == 'M' ? 'Month' : 'Year')] =
- parseInt(select.options[select.selectedIndex].value,10);
- this._notifyChange(inst);
- this._adjustDate(target);
- },
-
- /* Action for selecting a day. */
- _selectDay: function(id, month, year, td) {
- var target = $(id);
- if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {
- return;
- }
- var inst = this._getInst(target[0]);
- inst.selectedDay = inst.currentDay = $('a', td).html();
- inst.selectedMonth = inst.currentMonth = month;
- inst.selectedYear = inst.currentYear = year;
- this._selectDate(id, this._formatDate(inst,
- inst.currentDay, inst.currentMonth, inst.currentYear));
- },
-
- /* Erase the input field and hide the date picker. */
- _clearDate: function(id) {
- var target = $(id);
- var inst = this._getInst(target[0]);
- this._selectDate(target, '');
- },
-
- /* Update the input field with the selected date. */
- _selectDate: function(id, dateStr) {
- var target = $(id);
- var inst = this._getInst(target[0]);
- dateStr = (dateStr != null ? dateStr : this._formatDate(inst));
- if (inst.input)
- inst.input.val(dateStr);
- this._updateAlternate(inst);
- var onSelect = this._get(inst, 'onSelect');
- if (onSelect)
- onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback
- else if (inst.input)
- inst.input.trigger('change'); // fire the change event
- if (inst.inline)
- this._updateDatepicker(inst);
- else {
- this._hideDatepicker();
- this._lastInput = inst.input[0];
- if (typeof(inst.input[0]) != 'object')
- inst.input.focus(); // restore focus
- this._lastInput = null;
- }
- },
-
- /* Update any alternate field to synchronise with the main field. */
- _updateAlternate: function(inst) {
- var altField = this._get(inst, 'altField');
- if (altField) { // update alternate field too
- var altFormat = this._get(inst, 'altFormat') || this._get(inst, 'dateFormat');
- var date = this._getDate(inst);
- var dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
- $(altField).each(function() { $(this).val(dateStr); });
- }
- },
-
- /* Set as beforeShowDay function to prevent selection of weekends.
- @param date Date - the date to customise
- @return [boolean, string] - is this date selectable?, what is its CSS class? */
- noWeekends: function(date) {
- var day = date.getDay();
- return [(day > 0 && day < 6), ''];
- },
-
- /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
- @param date Date - the date to get the week for
- @return number - the number of the week within the year that contains this date */
- iso8601Week: function(date) {
- var checkDate = new Date(date.getTime());
- // Find Thursday of this week starting on Monday
- checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
- var time = checkDate.getTime();
- checkDate.setMonth(0); // Compare with Jan 1
- checkDate.setDate(1);
- return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
- },
-
- /* Parse a string value into a date object.
- See formatDate below for the possible formats.
-
- @param format string - the expected format of the date
- @param value string - the date in the above format
- @param settings Object - attributes include:
- shortYearCutoff number - the cutoff year for determining the century (optional)
- dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
- dayNames string[7] - names of the days from Sunday (optional)
- monthNamesShort string[12] - abbreviated names of the months (optional)
- monthNames string[12] - names of the months (optional)
- @return Date - the extracted date value or null if value is blank */
- parseDate: function (format, value, settings) {
- if (format == null || value == null)
- throw 'Invalid arguments';
- value = (typeof value == 'object' ? value.toString() : value + '');
- if (value == '')
- return null;
- var shortYearCutoff = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff;
- shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
- new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
- var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
- var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
- var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
- var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
- var year = -1;
- var month = -1;
- var day = -1;
- var doy = -1;
- var literal = false;
- // Check whether a format character is doubled
- var lookAhead = function(match) {
- var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
- if (matches)
- iFormat++;
- return matches;
- };
- // Extract a number from the string value
- var getNumber = function(match) {
- var isDoubled = lookAhead(match);
- var size = (match == '@' ? 14 : (match == '!' ? 20 :
- (match == 'y' && isDoubled ? 4 : (match == 'o' ? 3 : 2))));
- var digits = new RegExp('^\\d{1,' + size + '}');
- var num = value.substring(iValue).match(digits);
- if (!num)
- throw 'Missing number at position ' + iValue;
- iValue += num[0].length;
- return parseInt(num[0], 10);
- };
- // Extract a name from the string value and convert to an index
- var getName = function(match, shortNames, longNames) {
- var names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) {
- return [ [k, v] ];
- }).sort(function (a, b) {
- return -(a[1].length - b[1].length);
- });
- var index = -1;
- $.each(names, function (i, pair) {
- var name = pair[1];
- if (value.substr(iValue, name.length).toLowerCase() == name.toLowerCase()) {
- index = pair[0];
- iValue += name.length;
- return false;
- }
- });
- if (index != -1)
- return index + 1;
- else
- throw 'Unknown name at position ' + iValue;
- };
- // Confirm that a literal character matches the string value
- var checkLiteral = function() {
- if (value.charAt(iValue) != format.charAt(iFormat))
- throw 'Unexpected literal at position ' + iValue;
- iValue++;
- };
- var iValue = 0;
- for (var iFormat = 0; iFormat < format.length; iFormat++) {
- if (literal)
- if (format.charAt(iFormat) == "'" && !lookAhead("'"))
- literal = false;
- else
- checkLiteral();
- else
- switch (format.charAt(iFormat)) {
- case 'd':
- day = getNumber('d');
- break;
- case 'D':
- getName('D', dayNamesShort, dayNames);
- break;
- case 'o':
- doy = getNumber('o');
- break;
- case 'm':
- month = getNumber('m');
- break;
- case 'M':
- month = getName('M', monthNamesShort, monthNames);
- break;
- case 'y':
- year = getNumber('y');
- break;
- case '@':
- var date = new Date(getNumber('@'));
- year = date.getFullYear();
- month = date.getMonth() + 1;
- day = date.getDate();
- break;
- case '!':
- var date = new Date((getNumber('!') - this._ticksTo1970) / 10000);
- year = date.getFullYear();
- month = date.getMonth() + 1;
- day = date.getDate();
- break;
- case "'":
- if (lookAhead("'"))
- checkLiteral();
- else
- literal = true;
- break;
- default:
- checkLiteral();
- }
- }
- if (iValue < value.length){
- var extra = value.substr(iValue);
- if (!/^\s+/.test(extra)) {
- throw "Extra/unparsed characters found in date: " + extra;
- }
- }
- if (year == -1)
- year = new Date().getFullYear();
- else if (year < 100)
- year += new Date().getFullYear() - new Date().getFullYear() % 100 +
- (year <= shortYearCutoff ? 0 : -100);
- if (doy > -1) {
- month = 1;
- day = doy;
- do {
- var dim = this._getDaysInMonth(year, month - 1);
- if (day <= dim)
- break;
- month++;
- day -= dim;
- } while (true);
- }
- var date = this._daylightSavingAdjust(new Date(year, month - 1, day));
- if (date.getFullYear() != year || date.getMonth() + 1 != month || date.getDate() != day)
- throw 'Invalid date'; // E.g. 31/02/00
- return date;
- },
-
- /* Standard date formats. */
- ATOM: 'yy-mm-dd', // RFC 3339 (ISO 8601)
- COOKIE: 'D, dd M yy',
- ISO_8601: 'yy-mm-dd',
- RFC_822: 'D, d M y',
- RFC_850: 'DD, dd-M-y',
- RFC_1036: 'D, d M y',
- RFC_1123: 'D, d M yy',
- RFC_2822: 'D, d M yy',
- RSS: 'D, d M y', // RFC 822
- TICKS: '!',
- TIMESTAMP: '@',
- W3C: 'yy-mm-dd', // ISO 8601
-
- _ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) +
- Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000),
-
- /* Format a date object into a string value.
- The format can be combinations of the following:
- d - day of month (no leading zero)
- dd - day of month (two digit)
- o - day of year (no leading zeros)
- oo - day of year (three digit)
- D - day name short
- DD - day name long
- m - month of year (no leading zero)
- mm - month of year (two digit)
- M - month name short
- MM - month name long
- y - year (two digit)
- yy - year (four digit)
- @ - Unix timestamp (ms since 01/01/1970)
- ! - Windows ticks (100ns since 01/01/0001)
- '...' - literal text
- '' - single quote
-
- @param format string - the desired format of the date
- @param date Date - the date value to format
- @param settings Object - attributes include:
- dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
- dayNames string[7] - names of the days from Sunday (optional)
- monthNamesShort string[12] - abbreviated names of the months (optional)
- monthNames string[12] - names of the months (optional)
- @return string - the date in the above format */
- formatDate: function (format, date, settings) {
- if (!date)
- return '';
- var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
- var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
- var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
- var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
- // Check whether a format character is doubled
- var lookAhead = function(match) {
- var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
- if (matches)
- iFormat++;
- return matches;
- };
- // Format a number, with leading zero if necessary
- var formatNumber = function(match, value, len) {
- var num = '' + value;
- if (lookAhead(match))
- while (num.length < len)
- num = '0' + num;
- return num;
- };
- // Format a name, short or long as requested
- var formatName = function(match, value, shortNames, longNames) {
- return (lookAhead(match) ? longNames[value] : shortNames[value]);
- };
- var output = '';
- var literal = false;
- if (date)
- for (var iFormat = 0; iFormat < format.length; iFormat++) {
- if (literal)
- if (format.charAt(iFormat) == "'" && !lookAhead("'"))
- literal = false;
- else
- output += format.charAt(iFormat);
- else
- switch (format.charAt(iFormat)) {
- case 'd':
- output += formatNumber('d', date.getDate(), 2);
- break;
- case 'D':
- output += formatName('D', date.getDay(), dayNamesShort, dayNames);
- break;
- case 'o':
- output += formatNumber('o',
- Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
- break;
- case 'm':
- output += formatNumber('m', date.getMonth() + 1, 2);
- break;
- case 'M':
- output += formatName('M', date.getMonth(), monthNamesShort, monthNames);
- break;
- case 'y':
- output += (lookAhead('y') ? date.getFullYear() :
- (date.getYear() % 100 < 10 ? '0' : '') + date.getYear() % 100);
- break;
- case '@':
- output += date.getTime();
- break;
- case '!':
- output += date.getTime() * 10000 + this._ticksTo1970;
- break;
- case "'":
- if (lookAhead("'"))
- output += "'";
- else
- literal = true;
- break;
- default:
- output += format.charAt(iFormat);
- }
- }
- return output;
- },
-
- /* Extract all possible characters from the date format. */
- _possibleChars: function (format) {
- var chars = '';
- var literal = false;
- // Check whether a format character is doubled
- var lookAhead = function(match) {
- var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
- if (matches)
- iFormat++;
- return matches;
- };
- for (var iFormat = 0; iFormat < format.length; iFormat++)
- if (literal)
- if (format.charAt(iFormat) == "'" && !lookAhead("'"))
- literal = false;
- else
- chars += format.charAt(iFormat);
- else
- switch (format.charAt(iFormat)) {
- case 'd': case 'm': case 'y': case '@':
- chars += '0123456789';
- break;
- case 'D': case 'M':
- return null; // Accept anything
- case "'":
- if (lookAhead("'"))
- chars += "'";
- else
- literal = true;
- break;
- default:
- chars += format.charAt(iFormat);
- }
- return chars;
- },
-
- /* Get a setting value, defaulting if necessary. */
- _get: function(inst, name) {
- return inst.settings[name] !== undefined ?
- inst.settings[name] : this._defaults[name];
- },
-
- /* Parse existing date and initialise date picker. */
- _setDateFromField: function(inst, noDefault) {
- if (inst.input.val() == inst.lastVal) {
- return;
- }
- var dateFormat = this._get(inst, 'dateFormat');
- var dates = inst.lastVal = inst.input ? inst.input.val() : null;
- var date, defaultDate;
- date = defaultDate = this._getDefaultDate(inst);
- var settings = this._getFormatConfig(inst);
- try {
- date = this.parseDate(dateFormat, dates, settings) || defaultDate;
- } catch (event) {
- this.log(event);
- dates = (noDefault ? '' : dates);
- }
- inst.selectedDay = date.getDate();
- inst.drawMonth = inst.selectedMonth = date.getMonth();
- inst.drawYear = inst.selectedYear = date.getFullYear();
- inst.currentDay = (dates ? date.getDate() : 0);
- inst.currentMonth = (dates ? date.getMonth() : 0);
- inst.currentYear = (dates ? date.getFullYear() : 0);
- this._adjustInstDate(inst);
- },
-
- /* Retrieve the default date shown on opening. */
- _getDefaultDate: function(inst) {
- return this._restrictMinMax(inst,
- this._determineDate(inst, this._get(inst, 'defaultDate'), new Date()));
- },
-
- /* A date may be specified as an exact value or a relative one. */
- _determineDate: function(inst, date, defaultDate) {
- var offsetNumeric = function(offset) {
- var date = new Date();
- date.setDate(date.getDate() + offset);
- return date;
- };
- var offsetString = function(offset) {
- try {
- return $.datepicker.parseDate($.datepicker._get(inst, 'dateFormat'),
- offset, $.datepicker._getFormatConfig(inst));
- }
- catch (e) {
- // Ignore
- }
- var date = (offset.toLowerCase().match(/^c/) ?
- $.datepicker._getDate(inst) : null) || new Date();
- var year = date.getFullYear();
- var month = date.getMonth();
- var day = date.getDate();
- var pattern = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;
- var matches = pattern.exec(offset);
- while (matches) {
- switch (matches[2] || 'd') {
- case 'd' : case 'D' :
- day += parseInt(matches[1],10); break;
- case 'w' : case 'W' :
- day += parseInt(matches[1],10) * 7; break;
- case 'm' : case 'M' :
- month += parseInt(matches[1],10);
- day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
- break;
- case 'y': case 'Y' :
- year += parseInt(matches[1],10);
- day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
- break;
- }
- matches = pattern.exec(offset);
- }
- return new Date(year, month, day);
- };
- var newDate = (date == null || date === '' ? defaultDate : (typeof date == 'string' ? offsetString(date) :
- (typeof date == 'number' ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime()))));
- newDate = (newDate && newDate.toString() == 'Invalid Date' ? defaultDate : newDate);
- if (newDate) {
- newDate.setHours(0);
- newDate.setMinutes(0);
- newDate.setSeconds(0);
- newDate.setMilliseconds(0);
- }
- return this._daylightSavingAdjust(newDate);
- },
-
- /* Handle switch to/from daylight saving.
- Hours may be non-zero on daylight saving cut-over:
- > 12 when midnight changeover, but then cannot generate
- midnight datetime, so jump to 1AM, otherwise reset.
- @param date (Date) the date to check
- @return (Date) the corrected date */
- _daylightSavingAdjust: function(date) {
- if (!date) return null;
- date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
- return date;
- },
-
- /* Set the date(s) directly. */
- _setDate: function(inst, date, noChange) {
- var clear = !date;
- var origMonth = inst.selectedMonth;
- var origYear = inst.selectedYear;
- var newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date()));
- inst.selectedDay = inst.currentDay = newDate.getDate();
- inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();
- inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();
- if ((origMonth != inst.selectedMonth || origYear != inst.selectedYear) && !noChange)
- this._notifyChange(inst);
- this._adjustInstDate(inst);
- if (inst.input) {
- inst.input.val(clear ? '' : this._formatDate(inst));
- }
- },
-
- /* Retrieve the date(s) directly. */
- _getDate: function(inst) {
- var startDate = (!inst.currentYear || (inst.input && inst.input.val() == '') ? null :
- this._daylightSavingAdjust(new Date(
- inst.currentYear, inst.currentMonth, inst.currentDay)));
- return startDate;
- },
-
- /* Attach the onxxx handlers. These are declared statically so
- * they work with static code transformers like Caja.
- */
- _attachHandlers: function(inst) {
- var stepMonths = this._get(inst, 'stepMonths');
- var id = '#' + inst.id.replace( /\\\\/g, "\\" );
- inst.dpDiv.find('[data-handler]').map(function () {
- var handler = {
- prev: function () {
- window['DP_jQuery_' + dpuuid].datepicker._adjustDate(id, -stepMonths, 'M');
- },
- next: function () {
- window['DP_jQuery_' + dpuuid].datepicker._adjustDate(id, +stepMonths, 'M');
- },
- hide: function () {
- window['DP_jQuery_' + dpuuid].datepicker._hideDatepicker();
- },
- today: function () {
- window['DP_jQuery_' + dpuuid].datepicker._gotoToday(id);
- },
- selectDay: function () {
- window['DP_jQuery_' + dpuuid].datepicker._selectDay(id, +this.getAttribute('data-month'), +this.getAttribute('data-year'), this);
- return false;
- },
- selectMonth: function () {
- window['DP_jQuery_' + dpuuid].datepicker._selectMonthYear(id, this, 'M');
- return false;
- },
- selectYear: function () {
- window['DP_jQuery_' + dpuuid].datepicker._selectMonthYear(id, this, 'Y');
- return false;
- }
- };
- $(this).bind(this.getAttribute('data-event'), handler[this.getAttribute('data-handler')]);
- });
- },
-
- /* Generate the HTML for the current state of the date picker. */
- _generateHTML: function(inst) {
- var today = new Date();
- today = this._daylightSavingAdjust(
- new Date(today.getFullYear(), today.getMonth(), today.getDate())); // clear time
- var isRTL = this._get(inst, 'isRTL');
- var showButtonPanel = this._get(inst, 'showButtonPanel');
- var hideIfNoPrevNext = this._get(inst, 'hideIfNoPrevNext');
- var navigationAsDateFormat = this._get(inst, 'navigationAsDateFormat');
- var numMonths = this._getNumberOfMonths(inst);
- var showCurrentAtPos = this._get(inst, 'showCurrentAtPos');
- var stepMonths = this._get(inst, 'stepMonths');
- var isMultiMonth = (numMonths[0] != 1 || numMonths[1] != 1);
- var currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :
- new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
- var minDate = this._getMinMaxDate(inst, 'min');
- var maxDate = this._getMinMaxDate(inst, 'max');
- var drawMonth = inst.drawMonth - showCurrentAtPos;
- var drawYear = inst.drawYear;
- if (drawMonth < 0) {
- drawMonth += 12;
- drawYear--;
- }
- if (maxDate) {
- var maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),
- maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate()));
- maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);
- while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {
- drawMonth--;
- if (drawMonth < 0) {
- drawMonth = 11;
- drawYear--;
- }
- }
- }
- inst.drawMonth = drawMonth;
- inst.drawYear = drawYear;
- var prevText = this._get(inst, 'prevText');
- prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
- this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
- this._getFormatConfig(inst)));
- var prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
- '<a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click"' +
- ' title="' + prevText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>' :
- (hideIfNoPrevNext ? '' : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+ prevText +'"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>'));
- var nextText = this._get(inst, 'nextText');
- nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,
- this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
- this._getFormatConfig(inst)));
- var next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
- '<a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click"' +
- ' title="' + nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>' :
- (hideIfNoPrevNext ? '' : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+ nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>'));
- var currentText = this._get(inst, 'currentText');
- var gotoDate = (this._get(inst, 'gotoCurrent') && inst.currentDay ? currentDate : today);
- currentText = (!navigationAsDateFormat ? currentText :
- this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
- var controls = (!inst.inline ? '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" data-handler="hide" data-event="click">' +
- this._get(inst, 'closeText') + '</button>' : '');
- var buttonPanel = (showButtonPanel) ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (isRTL ? controls : '') +
- (this._isInRange(inst, gotoDate) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" data-handler="today" data-event="click"' +
- '>' + currentText + '</button>' : '') + (isRTL ? '' : controls) + '</div>' : '';
- var firstDay = parseInt(this._get(inst, 'firstDay'),10);
- firstDay = (isNaN(firstDay) ? 0 : firstDay);
- var showWeek = this._get(inst, 'showWeek');
- var dayNames = this._get(inst, 'dayNames');
- var dayNamesShort = this._get(inst, 'dayNamesShort');
- var dayNamesMin = this._get(inst, 'dayNamesMin');
- var monthNames = this._get(inst, 'monthNames');
- var monthNamesShort = this._get(inst, 'monthNamesShort');
- var beforeShowDay = this._get(inst, 'beforeShowDay');
- var showOtherMonths = this._get(inst, 'showOtherMonths');
- var selectOtherMonths = this._get(inst, 'selectOtherMonths');
- var calculateWeek = this._get(inst, 'calculateWeek') || this.iso8601Week;
- var defaultDate = this._getDefaultDate(inst);
- var html = '';
- for (var row = 0; row < numMonths[0]; row++) {
- var group = '';
- this.maxRows = 4;
- for (var col = 0; col < numMonths[1]; col++) {
- var selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));
- var cornerClass = ' ui-corner-all';
- var calender = '';
- if (isMultiMonth) {
- calender += '<div class="ui-datepicker-group';
- if (numMonths[1] > 1)
- switch (col) {
- case 0: calender += ' ui-datepicker-group-first';
- cornerClass = ' ui-corner-' + (isRTL ? 'right' : 'left'); break;
- case numMonths[1]-1: calender += ' ui-datepicker-group-last';
- cornerClass = ' ui-corner-' + (isRTL ? 'left' : 'right'); break;
- default: calender += ' ui-datepicker-group-middle'; cornerClass = ''; break;
- }
- calender += '">';
- }
- calender += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix' + cornerClass + '">' +
- (/all|left/.test(cornerClass) && row == 0 ? (isRTL ? next : prev) : '') +
- (/all|right/.test(cornerClass) && row == 0 ? (isRTL ? prev : next) : '') +
- this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,
- row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers
- '</div><table class="ui-datepicker-calendar"><thead>' +
- '<tr>';
- var thead = (showWeek ? '<th class="ui-datepicker-week-col">' + this._get(inst, 'weekHeader') + '</th>' : '');
- for (var dow = 0; dow < 7; dow++) { // days of the week
- var day = (dow + firstDay) % 7;
- thead += '<th' + ((dow + firstDay + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : '') + '>' +
- '<span title="' + dayNames[day] + '">' + dayNamesMin[day] + '</span></th>';
- }
- calender += thead + '</tr></thead><tbody>';
- var daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
- if (drawYear == inst.selectedYear && drawMonth == inst.selectedMonth)
- inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
- var leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;
- var curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate
- var numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043)
- this.maxRows = numRows;
- var printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
- for (var dRow = 0; dRow < numRows; dRow++) { // create date picker rows
- calender += '<tr>';
- var tbody = (!showWeek ? '' : '<td class="ui-datepicker-week-col">' +
- this._get(inst, 'calculateWeek')(printDate) + '</td>');
- for (var dow = 0; dow < 7; dow++) { // create date picker days
- var daySettings = (beforeShowDay ?
- beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, '']);
- var otherMonth = (printDate.getMonth() != drawMonth);
- var unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] ||
- (minDate && printDate < minDate) || (maxDate && printDate > maxDate);
- tbody += '<td class="' +
- ((dow + firstDay + 6) % 7 >= 5 ? ' ui-datepicker-week-end' : '') + // highlight weekends
- (otherMonth ? ' ui-datepicker-other-month' : '') + // highlight days from other months
- ((printDate.getTime() == selectedDate.getTime() && drawMonth == inst.selectedMonth && inst._keyEvent) || // user pressed key
- (defaultDate.getTime() == printDate.getTime() && defaultDate.getTime() == selectedDate.getTime()) ?
- // or defaultDate is current printedDate and defaultDate is selectedDate
- ' ' + this._dayOverClass : '') + // highlight selected day
- (unselectable ? ' ' + this._unselectableClass + ' ui-state-disabled': '') + // highlight unselectable days
- (otherMonth && !showOtherMonths ? '' : ' ' + daySettings[1] + // highlight custom dates
- (printDate.getTime() == currentDate.getTime() ? ' ' + this._currentClass : '') + // highlight selected day
- (printDate.getTime() == today.getTime() ? ' ui-datepicker-today' : '')) + '"' + // highlight today (if different)
- ((!otherMonth || showOtherMonths) && daySettings[2] ? ' title="' + daySettings[2] + '"' : '') + // cell title
- (unselectable ? '' : ' data-handler="selectDay" data-event="click" data-month="' + printDate.getMonth() + '" data-year="' + printDate.getFullYear() + '"') + '>' + // actions
- (otherMonth && !showOtherMonths ? '&#xa0;' : // display for other months
- (unselectable ? '<span class="ui-state-default">' + printDate.getDate() + '</span>' : '<a class="ui-state-default' +
- (printDate.getTime() == today.getTime() ? ' ui-state-highlight' : '') +
- (printDate.getTime() == currentDate.getTime() ? ' ui-state-active' : '') + // highlight selected day
- (otherMonth ? ' ui-priority-secondary' : '') + // distinguish dates from other months
- '" href="#">' + printDate.getDate() + '</a>')) + '</td>'; // display selectable date
- printDate.setDate(printDate.getDate() + 1);
- printDate = this._daylightSavingAdjust(printDate);
- }
- calender += tbody + '</tr>';
- }
- drawMonth++;
- if (drawMonth > 11) {
- drawMonth = 0;
- drawYear++;
- }
- calender += '</tbody></table>' + (isMultiMonth ? '</div>' +
- ((numMonths[0] > 0 && col == numMonths[1]-1) ? '<div class="ui-datepicker-row-break"></div>' : '') : '');
- group += calender;
- }
- html += group;
- }
- html += buttonPanel + ($.ui.ie6 && !inst.inline ?
- '<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : '');
- inst._keyEvent = false;
- return html;
- },
-
- /* Generate the month and year header. */
- _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
- secondary, monthNames, monthNamesShort) {
- var changeMonth = this._get(inst, 'changeMonth');
- var changeYear = this._get(inst, 'changeYear');
- var showMonthAfterYear = this._get(inst, 'showMonthAfterYear');
- var html = '<div class="ui-datepicker-title">';
- var monthHtml = '';
- // month selection
- if (secondary || !changeMonth)
- monthHtml += '<span class="ui-datepicker-month">' + monthNames[drawMonth] + '</span>';
- else {
- var inMinYear = (minDate && minDate.getFullYear() == drawYear);
- var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear);
- monthHtml += '<select class="ui-datepicker-month" data-handler="selectMonth" data-event="change">';
- for (var month = 0; month < 12; month++) {
- if ((!inMinYear || month >= minDate.getMonth()) &&
- (!inMaxYear || month <= maxDate.getMonth()))
- monthHtml += '<option value="' + month + '"' +
- (month == drawMonth ? ' selected="selected"' : '') +
- '>' + monthNamesShort[month] + '</option>';
- }
- monthHtml += '</select>';
- }
- if (!showMonthAfterYear)
- html += monthHtml + (secondary || !(changeMonth && changeYear) ? '&#xa0;' : '');
- // year selection
- if ( !inst.yearshtml ) {
- inst.yearshtml = '';
- if (secondary || !changeYear)
- html += '<span class="ui-datepicker-year">' + drawYear + '</span>';
- else {
- // determine range of years to display
- var years = this._get(inst, 'yearRange').split(':');
- var thisYear = new Date().getFullYear();
- var determineYear = function(value) {
- var year = (value.match(/c[+-].*/) ? drawYear + parseInt(value.substring(1), 10) :
- (value.match(/[+-].*/) ? thisYear + parseInt(value, 10) :
- parseInt(value, 10)));
- return (isNaN(year) ? thisYear : year);
- };
- var year = determineYear(years[0]);
- var endYear = Math.max(year, determineYear(years[1] || ''));
- year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
- endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
- inst.yearshtml += '<select class="ui-datepicker-year" data-handler="selectYear" data-event="change">';
- for (; year <= endYear; year++) {
- inst.yearshtml += '<option value="' + year + '"' +
- (year == drawYear ? ' selected="selected"' : '') +
- '>' + year + '</option>';
- }
- inst.yearshtml += '</select>';
-
- html += inst.yearshtml;
- inst.yearshtml = null;
- }
- }
- html += this._get(inst, 'yearSuffix');
- if (showMonthAfterYear)
- html += (secondary || !(changeMonth && changeYear) ? '&#xa0;' : '') + monthHtml;
- html += '</div>'; // Close datepicker_header
- return html;
- },
-
- /* Adjust one of the date sub-fields. */
- _adjustInstDate: function(inst, offset, period) {
- var year = inst.drawYear + (period == 'Y' ? offset : 0);
- var month = inst.drawMonth + (period == 'M' ? offset : 0);
- var day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) +
- (period == 'D' ? offset : 0);
- var date = this._restrictMinMax(inst,
- this._daylightSavingAdjust(new Date(year, month, day)));
- inst.selectedDay = date.getDate();
- inst.drawMonth = inst.selectedMonth = date.getMonth();
- inst.drawYear = inst.selectedYear = date.getFullYear();
- if (period == 'M' || period == 'Y')
- this._notifyChange(inst);
- },
-
- /* Ensure a date is within any min/max bounds. */
- _restrictMinMax: function(inst, date) {
- var minDate = this._getMinMaxDate(inst, 'min');
- var maxDate = this._getMinMaxDate(inst, 'max');
- var newDate = (minDate && date < minDate ? minDate : date);
- newDate = (maxDate && newDate > maxDate ? maxDate : newDate);
- return newDate;
- },
-
- /* Notify change of month/year. */
- _notifyChange: function(inst) {
- var onChange = this._get(inst, 'onChangeMonthYear');
- if (onChange)
- onChange.apply((inst.input ? inst.input[0] : null),
- [inst.selectedYear, inst.selectedMonth + 1, inst]);
- },
-
- /* Determine the number of months to show. */
- _getNumberOfMonths: function(inst) {
- var numMonths = this._get(inst, 'numberOfMonths');
- return (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths));
- },
-
- /* Determine the current maximum date - ensure no time components are set. */
- _getMinMaxDate: function(inst, minMax) {
- return this._determineDate(inst, this._get(inst, minMax + 'Date'), null);
- },
-
- /* Find the number of days in a given month. */
- _getDaysInMonth: function(year, month) {
- return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate();
- },
-
- /* Find the day of the week of the first of a month. */
- _getFirstDayOfMonth: function(year, month) {
- return new Date(year, month, 1).getDay();
- },
-
- /* Determines if we should allow a "next/prev" month display change. */
- _canAdjustMonth: function(inst, offset, curYear, curMonth) {
- var numMonths = this._getNumberOfMonths(inst);
- var date = this._daylightSavingAdjust(new Date(curYear,
- curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1));
- if (offset < 0)
- date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
- return this._isInRange(inst, date);
- },
-
- /* Is the given date in the accepted range? */
- _isInRange: function(inst, date) {
- var minDate = this._getMinMaxDate(inst, 'min');
- var maxDate = this._getMinMaxDate(inst, 'max');
- return ((!minDate || date.getTime() >= minDate.getTime()) &&
- (!maxDate || date.getTime() <= maxDate.getTime()));
- },
-
- /* Provide the configuration settings for formatting/parsing. */
- _getFormatConfig: function(inst) {
- var shortYearCutoff = this._get(inst, 'shortYearCutoff');
- shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
- new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
- return {shortYearCutoff: shortYearCutoff,
- dayNamesShort: this._get(inst, 'dayNamesShort'), dayNames: this._get(inst, 'dayNames'),
- monthNamesShort: this._get(inst, 'monthNamesShort'), monthNames: this._get(inst, 'monthNames')};
- },
-
- /* Format the given date for display. */
- _formatDate: function(inst, day, month, year) {
- if (!day) {
- inst.currentDay = inst.selectedDay;
- inst.currentMonth = inst.selectedMonth;
- inst.currentYear = inst.selectedYear;
- }
- var date = (day ? (typeof day == 'object' ? day :
- this._daylightSavingAdjust(new Date(year, month, day))) :
- this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
- return this.formatDate(this._get(inst, 'dateFormat'), date, this._getFormatConfig(inst));
- }
-});
-
-/*
- * Bind hover events for datepicker elements.
- * Done via delegate so the binding only occurs once in the lifetime of the parent div.
- * Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
- */
-function bindHover(dpDiv) {
- var selector = 'button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a';
- return dpDiv.delegate(selector, 'mouseout', function() {
- $(this).removeClass('ui-state-hover');
- if (this.className.indexOf('ui-datepicker-prev') != -1) $(this).removeClass('ui-datepicker-prev-hover');
- if (this.className.indexOf('ui-datepicker-next') != -1) $(this).removeClass('ui-datepicker-next-hover');
- })
- .delegate(selector, 'mouseover', function(){
- if (!$.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0])) {
- $(this).parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover');
- $(this).addClass('ui-state-hover');
- if (this.className.indexOf('ui-datepicker-prev') != -1) $(this).addClass('ui-datepicker-prev-hover');
- if (this.className.indexOf('ui-datepicker-next') != -1) $(this).addClass('ui-datepicker-next-hover');
- }
- });
-}
-
-/* jQuery extend now ignores nulls! */
-function extendRemove(target, props) {
- $.extend(target, props);
- for (var name in props)
- if (props[name] == null || props[name] == undefined)
- target[name] = props[name];
- return target;
-};
-
-/* Invoke the datepicker functionality.
- @param options string - a command, optionally followed by additional parameters or
- Object - settings for attaching new datepicker functionality
- @return jQuery object */
-$.fn.datepicker = function(options){
-
- /* Verify an empty collection wasn't passed - Fixes #6976 */
- if ( !this.length ) {
- return this;
- }
-
- /* Initialise the date picker. */
- if (!$.datepicker.initialized) {
- $(document).mousedown($.datepicker._checkExternalClick).
- find(document.body).append($.datepicker.dpDiv);
- $.datepicker.initialized = true;
- }
-
- var otherArgs = Array.prototype.slice.call(arguments, 1);
- if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate' || options == 'widget'))
- return $.datepicker['_' + options + 'Datepicker'].
- apply($.datepicker, [this[0]].concat(otherArgs));
- if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string')
- return $.datepicker['_' + options + 'Datepicker'].
- apply($.datepicker, [this[0]].concat(otherArgs));
- return this.each(function() {
- typeof options == 'string' ?
- $.datepicker['_' + options + 'Datepicker'].
- apply($.datepicker, [this].concat(otherArgs)) :
- $.datepicker._attachDatepicker(this, options);
- });
-};
-
-$.datepicker = new Datepicker(); // singleton instance
-$.datepicker.initialized = false;
-$.datepicker.uuid = new Date().getTime();
-$.datepicker.version = "1.9.2";
-
-// Workaround for #4055
-// Add another global to avoid noConflict issues with inline event handlers
-window['DP_jQuery_' + dpuuid] = $;
-
-})(jQuery);
-(function( $, undefined ) {
-
-var uiDialogClasses = "ui-dialog ui-widget ui-widget-content ui-corner-all ",
- sizeRelatedOptions = {
- buttons: true,
- height: true,
- maxHeight: true,
- maxWidth: true,
- minHeight: true,
- minWidth: true,
- width: true
- },
- resizableRelatedOptions = {
- maxHeight: true,
- maxWidth: true,
- minHeight: true,
- minWidth: true
- };
-
-$.widget("ui.dialog", {
- version: "1.9.2",
- options: {
- autoOpen: true,
- buttons: {},
- closeOnEscape: true,
- closeText: "close",
- dialogClass: "",
- draggable: true,
- hide: null,
- height: "auto",
- maxHeight: false,
- maxWidth: false,
- minHeight: 150,
- minWidth: 150,
- modal: false,
- position: {
- my: "center",
- at: "center",
- of: window,
- collision: "fit",
- // ensure that the titlebar is never outside the document
- using: function( pos ) {
- var topOffset = $( this ).css( pos ).offset().top;
- if ( topOffset < 0 ) {
- $( this ).css( "top", pos.top - topOffset );
- }
- }
- },
- resizable: true,
- show: null,
- stack: true,
- title: "",
- width: 300,
- zIndex: 1000
- },
-
- _create: function() {
- this.originalTitle = this.element.attr( "title" );
- // #5742 - .attr() might return a DOMElement
- if ( typeof this.originalTitle !== "string" ) {
- this.originalTitle = "";
- }
- this.oldPosition = {
- parent: this.element.parent(),
- index: this.element.parent().children().index( this.element )
- };
- this.options.title = this.options.title || this.originalTitle;
- var that = this,
- options = this.options,
-
- title = options.title || "&#160;",
- uiDialog,
- uiDialogTitlebar,
- uiDialogTitlebarClose,
- uiDialogTitle,
- uiDialogButtonPane;
-
- uiDialog = ( this.uiDialog = $( "<div>" ) )
- .addClass( uiDialogClasses + options.dialogClass )
- .css({
- display: "none",
- outline: 0, // TODO: move to stylesheet
- zIndex: options.zIndex
- })
- // setting tabIndex makes the div focusable
- .attr( "tabIndex", -1)
- .keydown(function( event ) {
- if ( options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
- event.keyCode === $.ui.keyCode.ESCAPE ) {
- that.close( event );
- event.preventDefault();
- }
- })
- .mousedown(function( event ) {
- that.moveToTop( false, event );
- })
- .appendTo( "body" );
-
- this.element
- .show()
- .removeAttr( "title" )
- .addClass( "ui-dialog-content ui-widget-content" )
- .appendTo( uiDialog );
-
- uiDialogTitlebar = ( this.uiDialogTitlebar = $( "<div>" ) )
- .addClass( "ui-dialog-titlebar ui-widget-header " +
- "ui-corner-all ui-helper-clearfix" )
- .bind( "mousedown", function() {
- // Dialog isn't getting focus when dragging (#8063)
- uiDialog.focus();
- })
- .prependTo( uiDialog );
-
- uiDialogTitlebarClose = $( "<a href='#'></a>" )
- .addClass( "ui-dialog-titlebar-close ui-corner-all" )
- .attr( "role", "button" )
- .click(function( event ) {
- event.preventDefault();
- that.close( event );
- })
- .appendTo( uiDialogTitlebar );
-
- ( this.uiDialogTitlebarCloseText = $( "<span>" ) )
- .addClass( "ui-icon ui-icon-closethick" )
- .text( options.closeText )
- .appendTo( uiDialogTitlebarClose );
-
- uiDialogTitle = $( "<span>" )
- .uniqueId()
- .addClass( "ui-dialog-title" )
- .html( title )
- .prependTo( uiDialogTitlebar );
-
- uiDialogButtonPane = ( this.uiDialogButtonPane = $( "<div>" ) )
- .addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" );
-
- ( this.uiButtonSet = $( "<div>" ) )
- .addClass( "ui-dialog-buttonset" )
- .appendTo( uiDialogButtonPane );
-
- uiDialog.attr({
- role: "dialog",
- "aria-labelledby": uiDialogTitle.attr( "id" )
- });
-
- uiDialogTitlebar.find( "*" ).add( uiDialogTitlebar ).disableSelection();
- this._hoverable( uiDialogTitlebarClose );
- this._focusable( uiDialogTitlebarClose );
-
- if ( options.draggable && $.fn.draggable ) {
- this._makeDraggable();
- }
- if ( options.resizable && $.fn.resizable ) {
- this._makeResizable();
- }
-
- this._createButtons( options.buttons );
- this._isOpen = false;
-
- if ( $.fn.bgiframe ) {
- uiDialog.bgiframe();
- }
-
- // prevent tabbing out of modal dialogs
- this._on( uiDialog, { keydown: function( event ) {
- if ( !options.modal || event.keyCode !== $.ui.keyCode.TAB ) {
- return;
- }
-
- var tabbables = $( ":tabbable", uiDialog ),
- first = tabbables.filter( ":first" ),
- last = tabbables.filter( ":last" );
-
- if ( event.target === last[0] && !event.shiftKey ) {
- first.focus( 1 );
- return false;
- } else if ( event.target === first[0] && event.shiftKey ) {
- last.focus( 1 );
- return false;
- }
- }});
- },
-
- _init: function() {
- if ( this.options.autoOpen ) {
- this.open();
- }
- },
-
- _destroy: function() {
- var next,
- oldPosition = this.oldPosition;
-
- if ( this.overlay ) {
- this.overlay.destroy();
- }
- this.uiDialog.hide();
- this.element
- .removeClass( "ui-dialog-content ui-widget-content" )
- .hide()
- .appendTo( "body" );
- this.uiDialog.remove();
-
- if ( this.originalTitle ) {
- this.element.attr( "title", this.originalTitle );
- }
-
- next = oldPosition.parent.children().eq( oldPosition.index );
- // Don't try to place the dialog next to itself (#8613)
- if ( next.length && next[ 0 ] !== this.element[ 0 ] ) {
- next.before( this.element );
- } else {
- oldPosition.parent.append( this.element );
- }
- },
-
- widget: function() {
- return this.uiDialog;
- },
-
- close: function( event ) {
- var that = this,
- maxZ, thisZ;
-
- if ( !this._isOpen ) {
- return;
- }
-
- if ( false === this._trigger( "beforeClose", event ) ) {
- return;
- }
-
- this._isOpen = false;
-
- if ( this.overlay ) {
- this.overlay.destroy();
- }
-
- if ( this.options.hide ) {
- this._hide( this.uiDialog, this.options.hide, function() {
- that._trigger( "close", event );
- });
- } else {
- this.uiDialog.hide();
- this._trigger( "close", event );
- }
-
- $.ui.dialog.overlay.resize();
-
- // adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
- if ( this.options.modal ) {
- maxZ = 0;
- $( ".ui-dialog" ).each(function() {
- if ( this !== that.uiDialog[0] ) {
- thisZ = $( this ).css( "z-index" );
- if ( !isNaN( thisZ ) ) {
- maxZ = Math.max( maxZ, thisZ );
- }
- }
- });
- $.ui.dialog.maxZ = maxZ;
- }
-
- return this;
- },
-
- isOpen: function() {
- return this._isOpen;
- },
-
- // the force parameter allows us to move modal dialogs to their correct
- // position on open
- moveToTop: function( force, event ) {
- var options = this.options,
- saveScroll;
-
- if ( ( options.modal && !force ) ||
- ( !options.stack && !options.modal ) ) {
- return this._trigger( "focus", event );
- }
-
- if ( options.zIndex > $.ui.dialog.maxZ ) {
- $.ui.dialog.maxZ = options.zIndex;
- }
- if ( this.overlay ) {
- $.ui.dialog.maxZ += 1;
- $.ui.dialog.overlay.maxZ = $.ui.dialog.maxZ;
- this.overlay.$el.css( "z-index", $.ui.dialog.overlay.maxZ );
- }
-
- // Save and then restore scroll
- // Opera 9.5+ resets when parent z-index is changed.
- // http://bugs.jqueryui.com/ticket/3193
- saveScroll = {
- scrollTop: this.element.scrollTop(),
- scrollLeft: this.element.scrollLeft()
- };
- $.ui.dialog.maxZ += 1;
- this.uiDialog.css( "z-index", $.ui.dialog.maxZ );
- this.element.attr( saveScroll );
- this._trigger( "focus", event );
-
- return this;
- },
-
- open: function() {
- if ( this._isOpen ) {
- return;
- }
-
- var hasFocus,
- options = this.options,
- uiDialog = this.uiDialog;
-
- this._size();
- this._position( options.position );
- uiDialog.show( options.show );
- this.overlay = options.modal ? new $.ui.dialog.overlay( this ) : null;
- this.moveToTop( true );
-
- // set focus to the first tabbable element in the content area or the first button
- // if there are no tabbable elements, set focus on the dialog itself
- hasFocus = this.element.find( ":tabbable" );
- if ( !hasFocus.length ) {
- hasFocus = this.uiDialogButtonPane.find( ":tabbable" );
- if ( !hasFocus.length ) {
- hasFocus = uiDialog;
- }
- }
- hasFocus.eq( 0 ).focus();
-
- this._isOpen = true;
- this._trigger( "open" );
-
- return this;
- },
-
- _createButtons: function( buttons ) {
- var that = this,
- hasButtons = false;
-
- // if we already have a button pane, remove it
- this.uiDialogButtonPane.remove();
- this.uiButtonSet.empty();
-
- if ( typeof buttons === "object" && buttons !== null ) {
- $.each( buttons, function() {
- return !(hasButtons = true);
- });
- }
- if ( hasButtons ) {
- $.each( buttons, function( name, props ) {
- var button, click;
- props = $.isFunction( props ) ?
- { click: props, text: name } :
- props;
- // Default to a non-submitting button
- props = $.extend( { type: "button" }, props );
- // Change the context for the click callback to be the main element
- click = props.click;
- props.click = function() {
- click.apply( that.element[0], arguments );
- };
- button = $( "<button></button>", props )
- .appendTo( that.uiButtonSet );
- if ( $.fn.button ) {
- button.button();
- }
- });
- this.uiDialog.addClass( "ui-dialog-buttons" );
- this.uiDialogButtonPane.appendTo( this.uiDialog );
- } else {
- this.uiDialog.removeClass( "ui-dialog-buttons" );
- }
- },
-
- _makeDraggable: function() {
- var that = this,
- options = this.options;
-
- function filteredUi( ui ) {
- return {
- position: ui.position,
- offset: ui.offset
- };
- }
-
- this.uiDialog.draggable({
- cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
- handle: ".ui-dialog-titlebar",
- containment: "document",
- start: function( event, ui ) {
- $( this )
- .addClass( "ui-dialog-dragging" );
- that._trigger( "dragStart", event, filteredUi( ui ) );
- },
- drag: function( event, ui ) {
- that._trigger( "drag", event, filteredUi( ui ) );
- },
- stop: function( event, ui ) {
- options.position = [
- ui.position.left - that.document.scrollLeft(),
- ui.position.top - that.document.scrollTop()
- ];
- $( this )
- .removeClass( "ui-dialog-dragging" );
- that._trigger( "dragStop", event, filteredUi( ui ) );
- $.ui.dialog.overlay.resize();
- }
- });
- },
-
- _makeResizable: function( handles ) {
- handles = (handles === undefined ? this.options.resizable : handles);
- var that = this,
- options = this.options,
- // .ui-resizable has position: relative defined in the stylesheet
- // but dialogs have to use absolute or fixed positioning
- position = this.uiDialog.css( "position" ),
- resizeHandles = typeof handles === 'string' ?
- handles :
- "n,e,s,w,se,sw,ne,nw";
-
- function filteredUi( ui ) {
- return {
- originalPosition: ui.originalPosition,
- originalSize: ui.originalSize,
- position: ui.position,
- size: ui.size
- };
- }
-
- this.uiDialog.resizable({
- cancel: ".ui-dialog-content",
- containment: "document",
- alsoResize: this.element,
- maxWidth: options.maxWidth,
- maxHeight: options.maxHeight,
- minWidth: options.minWidth,
- minHeight: this._minHeight(),
- handles: resizeHandles,
- start: function( event, ui ) {
- $( this ).addClass( "ui-dialog-resizing" );
- that._trigger( "resizeStart", event, filteredUi( ui ) );
- },
- resize: function( event, ui ) {
- that._trigger( "resize", event, filteredUi( ui ) );
- },
- stop: function( event, ui ) {
- $( this ).removeClass( "ui-dialog-resizing" );
- options.height = $( this ).height();
- options.width = $( this ).width();
- that._trigger( "resizeStop", event, filteredUi( ui ) );
- $.ui.dialog.overlay.resize();
- }
- })
- .css( "position", position )
- .find( ".ui-resizable-se" )
- .addClass( "ui-icon ui-icon-grip-diagonal-se" );
- },
-
- _minHeight: function() {
- var options = this.options;
-
- if ( options.height === "auto" ) {
- return options.minHeight;
- } else {
- return Math.min( options.minHeight, options.height );
- }
- },
-
- _position: function( position ) {
- var myAt = [],
- offset = [ 0, 0 ],
- isVisible;
-
- if ( position ) {
- // deep extending converts arrays to objects in jQuery <= 1.3.2 :-(
- // if (typeof position == 'string' || $.isArray(position)) {
- // myAt = $.isArray(position) ? position : position.split(' ');
-
- if ( typeof position === "string" || (typeof position === "object" && "0" in position ) ) {
- myAt = position.split ? position.split( " " ) : [ position[ 0 ], position[ 1 ] ];
- if ( myAt.length === 1 ) {
- myAt[ 1 ] = myAt[ 0 ];
- }
-
- $.each( [ "left", "top" ], function( i, offsetPosition ) {
- if ( +myAt[ i ] === myAt[ i ] ) {
- offset[ i ] = myAt[ i ];
- myAt[ i ] = offsetPosition;
- }
- });
-
- position = {
- my: myAt[0] + (offset[0] < 0 ? offset[0] : "+" + offset[0]) + " " +
- myAt[1] + (offset[1] < 0 ? offset[1] : "+" + offset[1]),
- at: myAt.join( " " )
- };
- }
-
- position = $.extend( {}, $.ui.dialog.prototype.options.position, position );
- } else {
- position = $.ui.dialog.prototype.options.position;
- }
-
- // need to show the dialog to get the actual offset in the position plugin
- isVisible = this.uiDialog.is( ":visible" );
- if ( !isVisible ) {
- this.uiDialog.show();
- }
- this.uiDialog.position( position );
- if ( !isVisible ) {
- this.uiDialog.hide();
- }
- },
-
- _setOptions: function( options ) {
- var that = this,
- resizableOptions = {},
- resize = false;
-
- $.each( options, function( key, value ) {
- that._setOption( key, value );
-
- if ( key in sizeRelatedOptions ) {
- resize = true;
- }
- if ( key in resizableRelatedOptions ) {
- resizableOptions[ key ] = value;
- }
- });
-
- if ( resize ) {
- this._size();
- }
- if ( this.uiDialog.is( ":data(resizable)" ) ) {
- this.uiDialog.resizable( "option", resizableOptions );
- }
- },
-
- _setOption: function( key, value ) {
- var isDraggable, isResizable,
- uiDialog = this.uiDialog;
-
- switch ( key ) {
- case "buttons":
- this._createButtons( value );
- break;
- case "closeText":
- // ensure that we always pass a string
- this.uiDialogTitlebarCloseText.text( "" + value );
- break;
- case "dialogClass":
- uiDialog
- .removeClass( this.options.dialogClass )
- .addClass( uiDialogClasses + value );
- break;
- case "disabled":
- if ( value ) {
- uiDialog.addClass( "ui-dialog-disabled" );
- } else {
- uiDialog.removeClass( "ui-dialog-disabled" );
- }
- break;
- case "draggable":
- isDraggable = uiDialog.is( ":data(draggable)" );
- if ( isDraggable && !value ) {
- uiDialog.draggable( "destroy" );
- }
-
- if ( !isDraggable && value ) {
- this._makeDraggable();
- }
- break;
- case "position":
- this._position( value );
- break;
- case "resizable":
- // currently resizable, becoming non-resizable
- isResizable = uiDialog.is( ":data(resizable)" );
- if ( isResizable && !value ) {
- uiDialog.resizable( "destroy" );
- }
-
- // currently resizable, changing handles
- if ( isResizable && typeof value === "string" ) {
- uiDialog.resizable( "option", "handles", value );
- }
-
- // currently non-resizable, becoming resizable
- if ( !isResizable && value !== false ) {
- this._makeResizable( value );
- }
- break;
- case "title":
- // convert whatever was passed in o a string, for html() to not throw up
- $( ".ui-dialog-title", this.uiDialogTitlebar )
- .html( "" + ( value || "&#160;" ) );
- break;
- }
-
- this._super( key, value );
- },
-
- _size: function() {
- /* If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
- * divs will both have width and height set, so we need to reset them
- */
- var nonContentHeight, minContentHeight, autoHeight,
- options = this.options,
- isVisible = this.uiDialog.is( ":visible" );
-
- // reset content sizing
- this.element.show().css({
- width: "auto",
- minHeight: 0,
- height: 0
- });
-
- if ( options.minWidth > options.width ) {
- options.width = options.minWidth;
- }
-
- // reset wrapper sizing
- // determine the height of all the non-content elements
- nonContentHeight = this.uiDialog.css({
- height: "auto",
- width: options.width
- })
- .outerHeight();
- minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
-
- if ( options.height === "auto" ) {
- // only needed for IE6 support
- if ( $.support.minHeight ) {
- this.element.css({
- minHeight: minContentHeight,
- height: "auto"
- });
- } else {
- this.uiDialog.show();
- autoHeight = this.element.css( "height", "auto" ).height();
- if ( !isVisible ) {
- this.uiDialog.hide();
- }
- this.element.height( Math.max( autoHeight, minContentHeight ) );
- }
- } else {
- this.element.height( Math.max( options.height - nonContentHeight, 0 ) );
- }
-
- if (this.uiDialog.is( ":data(resizable)" ) ) {
- this.uiDialog.resizable( "option", "minHeight", this._minHeight() );
- }
- }
-});
-
-$.extend($.ui.dialog, {
- uuid: 0,
- maxZ: 0,
-
- getTitleId: function($el) {
- var id = $el.attr( "id" );
- if ( !id ) {
- this.uuid += 1;
- id = this.uuid;
- }
- return "ui-dialog-title-" + id;
- },
-
- overlay: function( dialog ) {
- this.$el = $.ui.dialog.overlay.create( dialog );
- }
-});
-
-$.extend( $.ui.dialog.overlay, {
- instances: [],
- // reuse old instances due to IE memory leak with alpha transparency (see #5185)
- oldInstances: [],
- maxZ: 0,
- events: $.map(
- "focus,mousedown,mouseup,keydown,keypress,click".split( "," ),
- function( event ) {
- return event + ".dialog-overlay";
- }
- ).join( " " ),
- create: function( dialog ) {
- if ( this.instances.length === 0 ) {
- // prevent use of anchors and inputs
- // we use a setTimeout in case the overlay is created from an
- // event that we're going to be cancelling (see #2804)
- setTimeout(function() {
- // handle $(el).dialog().dialog('close') (see #4065)
- if ( $.ui.dialog.overlay.instances.length ) {
- $( document ).bind( $.ui.dialog.overlay.events, function( event ) {
- // stop events if the z-index of the target is < the z-index of the overlay
- // we cannot return true when we don't want to cancel the event (#3523)
- if ( $( event.target ).zIndex() < $.ui.dialog.overlay.maxZ ) {
- return false;
- }
- });
- }
- }, 1 );
-
- // handle window resize
- $( window ).bind( "resize.dialog-overlay", $.ui.dialog.overlay.resize );
- }
-
- var $el = ( this.oldInstances.pop() || $( "<div>" ).addClass( "ui-widget-overlay" ) );
-
- // allow closing by pressing the escape key
- $( document ).bind( "keydown.dialog-overlay", function( event ) {
- var instances = $.ui.dialog.overlay.instances;
- // only react to the event if we're the top overlay
- if ( instances.length !== 0 && instances[ instances.length - 1 ] === $el &&
- dialog.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
- event.keyCode === $.ui.keyCode.ESCAPE ) {
-
- dialog.close( event );
- event.preventDefault();
- }
- });
-
- $el.appendTo( document.body ).css({
- width: this.width(),
- height: this.height()
- });
-
- if ( $.fn.bgiframe ) {
- $el.bgiframe();
- }
-
- this.instances.push( $el );
- return $el;
- },
-
- destroy: function( $el ) {
- var indexOf = $.inArray( $el, this.instances ),
- maxZ = 0;
-
- if ( indexOf !== -1 ) {
- this.oldInstances.push( this.instances.splice( indexOf, 1 )[ 0 ] );
- }
-
- if ( this.instances.length === 0 ) {
- $( [ document, window ] ).unbind( ".dialog-overlay" );
- }
-
- $el.height( 0 ).width( 0 ).remove();
-
- // adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
- $.each( this.instances, function() {
- maxZ = Math.max( maxZ, this.css( "z-index" ) );
- });
- this.maxZ = maxZ;
- },
-
- height: function() {
- var scrollHeight,
- offsetHeight;
- // handle IE
- if ( $.ui.ie ) {
- scrollHeight = Math.max(
- document.documentElement.scrollHeight,
- document.body.scrollHeight
- );
- offsetHeight = Math.max(
- document.documentElement.offsetHeight,
- document.body.offsetHeight
- );
-
- if ( scrollHeight < offsetHeight ) {
- return $( window ).height() + "px";
- } else {
- return scrollHeight + "px";
- }
- // handle "good" browsers
- } else {
- return $( document ).height() + "px";
- }
- },
-
- width: function() {
- var scrollWidth,
- offsetWidth;
- // handle IE
- if ( $.ui.ie ) {
- scrollWidth = Math.max(
- document.documentElement.scrollWidth,
- document.body.scrollWidth
- );
- offsetWidth = Math.max(
- document.documentElement.offsetWidth,
- document.body.offsetWidth
- );
-
- if ( scrollWidth < offsetWidth ) {
- return $( window ).width() + "px";
- } else {
- return scrollWidth + "px";
- }
- // handle "good" browsers
- } else {
- return $( document ).width() + "px";
- }
- },
-
- resize: function() {
- /* If the dialog is draggable and the user drags it past the
- * right edge of the window, the document becomes wider so we
- * need to stretch the overlay. If the user then drags the
- * dialog back to the left, the document will become narrower,
- * so we need to shrink the overlay to the appropriate size.
- * This is handled by shrinking the overlay before setting it
- * to the full document size.
- */
- var $overlays = $( [] );
- $.each( $.ui.dialog.overlay.instances, function() {
- $overlays = $overlays.add( this );
- });
-
- $overlays.css({
- width: 0,
- height: 0
- }).css({
- width: $.ui.dialog.overlay.width(),
- height: $.ui.dialog.overlay.height()
- });
- }
-});
-
-$.extend( $.ui.dialog.overlay.prototype, {
- destroy: function() {
- $.ui.dialog.overlay.destroy( this.$el );
- }
-});
-
-}( jQuery ) );
-(function( $, undefined ) {
-
-$.widget("ui.draggable", $.ui.mouse, {
- version: "1.9.2",
- widgetEventPrefix: "drag",
- options: {
- addClasses: true,
- appendTo: "parent",
- axis: false,
- connectToSortable: false,
- containment: false,
- cursor: "auto",
- cursorAt: false,
- grid: false,
- handle: false,
- helper: "original",
- iframeFix: false,
- opacity: false,
- refreshPositions: false,
- revert: false,
- revertDuration: 500,
- scope: "default",
- scroll: true,
- scrollSensitivity: 20,
- scrollSpeed: 20,
- snap: false,
- snapMode: "both",
- snapTolerance: 20,
- stack: false,
- zIndex: false
- },
- _create: function() {
-
- if (this.options.helper == 'original' && !(/^(?:r|a|f)/).test(this.element.css("position")))
- this.element[0].style.position = 'relative';
-
- (this.options.addClasses && this.element.addClass("ui-draggable"));
- (this.options.disabled && this.element.addClass("ui-draggable-disabled"));
-
- this._mouseInit();
-
- },
-
- _destroy: function() {
- this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" );
- this._mouseDestroy();
- },
-
- _mouseCapture: function(event) {
-
- var o = this.options;
-
- // among others, prevent a drag on a resizable-handle
- if (this.helper || o.disabled || $(event.target).is('.ui-resizable-handle'))
- return false;
-
- //Quit if we're not on a valid handle
- this.handle = this._getHandle(event);
- if (!this.handle)
- return false;
-
- $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() {
- $('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>')
- .css({
- width: this.offsetWidth+"px", height: this.offsetHeight+"px",
- position: "absolute", opacity: "0.001", zIndex: 1000
- })
- .css($(this).offset())
- .appendTo("body");
- });
-
- return true;
-
- },
-
- _mouseStart: function(event) {
-
- var o = this.options;
-
- //Create and append the visible helper
- this.helper = this._createHelper(event);
-
- this.helper.addClass("ui-draggable-dragging");
-
- //Cache the helper size
- this._cacheHelperProportions();
-
- //If ddmanager is used for droppables, set the global draggable
- if($.ui.ddmanager)
- $.ui.ddmanager.current = this;
-
- /*
- * - Position generation -
- * This block generates everything position related - it's the core of draggables.
- */
-
- //Cache the margins of the original element
- this._cacheMargins();
-
- //Store the helper's css position
- this.cssPosition = this.helper.css("position");
- this.scrollParent = this.helper.scrollParent();
-
- //The element's absolute position on the page minus margins
- this.offset = this.positionAbs = this.element.offset();
- this.offset = {
- top: this.offset.top - this.margins.top,
- left: this.offset.left - this.margins.left
- };
-
- $.extend(this.offset, {
- click: { //Where the click happened, relative to the element
- left: event.pageX - this.offset.left,
- top: event.pageY - this.offset.top
- },
- parent: this._getParentOffset(),
- relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
- });
-
- //Generate the original position
- this.originalPosition = this.position = this._generatePosition(event);
- this.originalPageX = event.pageX;
- this.originalPageY = event.pageY;
-
- //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
- (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
-
- //Set a containment if given in the options
- if(o.containment)
- this._setContainment();
-
- //Trigger event + callbacks
- if(this._trigger("start", event) === false) {
- this._clear();
- return false;
- }
-
- //Recache the helper size
- this._cacheHelperProportions();
-
- //Prepare the droppable offsets
- if ($.ui.ddmanager && !o.dropBehaviour)
- $.ui.ddmanager.prepareOffsets(this, event);
-
-
- this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
-
- //If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)
- if ( $.ui.ddmanager ) $.ui.ddmanager.dragStart(this, event);
-
- return true;
- },
-
- _mouseDrag: function(event, noPropagation) {
-
- //Compute the helpers position
- this.position = this._generatePosition(event);
- this.positionAbs = this._convertPositionTo("absolute");
-
- //Call plugins and callbacks and use the resulting position if something is returned
- if (!noPropagation) {
- var ui = this._uiHash();
- if(this._trigger('drag', event, ui) === false) {
- this._mouseUp({});
- return false;
- }
- this.position = ui.position;
- }
-
- if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
- if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
- if($.ui.ddmanager) $.ui.ddmanager.drag(this, event);
-
- return false;
- },
-
- _mouseStop: function(event) {
-
- //If we are using droppables, inform the manager about the drop
- var dropped = false;
- if ($.ui.ddmanager && !this.options.dropBehaviour)
- dropped = $.ui.ddmanager.drop(this, event);
-
- //if a drop comes from outside (a sortable)
- if(this.dropped) {
- dropped = this.dropped;
- this.dropped = false;
- }
-
- //if the original element is no longer in the DOM don't bother to continue (see #8269)
- var element = this.element[0], elementInDom = false;
- while ( element && (element = element.parentNode) ) {
- if (element == document ) {
- elementInDom = true;
- }
- }
- if ( !elementInDom && this.options.helper === "original" )
- return false;
-
- if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
- var that = this;
- $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
- if(that._trigger("stop", event) !== false) {
- that._clear();
- }
- });
- } else {
- if(this._trigger("stop", event) !== false) {
- this._clear();
- }
- }
-
- return false;
- },
-
- _mouseUp: function(event) {
- //Remove frame helpers
- $("div.ui-draggable-iframeFix").each(function() {
- this.parentNode.removeChild(this);
- });
-
- //If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)
- if( $.ui.ddmanager ) $.ui.ddmanager.dragStop(this, event);
-
- return $.ui.mouse.prototype._mouseUp.call(this, event);
- },
-
- cancel: function() {
-
- if(this.helper.is(".ui-draggable-dragging")) {
- this._mouseUp({});
- } else {
- this._clear();
- }
-
- return this;
-
- },
-
- _getHandle: function(event) {
-
- var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false;
- $(this.options.handle, this.element)
- .find("*")
- .andSelf()
- .each(function() {
- if(this == event.target) handle = true;
- });
-
- return handle;
-
- },
-
- _createHelper: function(event) {
-
- var o = this.options;
- var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper == 'clone' ? this.element.clone().removeAttr('id') : this.element);
-
- if(!helper.parents('body').length)
- helper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo));
-
- if(helper[0] != this.element[0] && !(/(fixed|absolute)/).test(helper.css("position")))
- helper.css("position", "absolute");
-
- return helper;
-
- },
-
- _adjustOffsetFromHelper: function(obj) {
- if (typeof obj == 'string') {
- obj = obj.split(' ');
- }
- if ($.isArray(obj)) {
- obj = {left: +obj[0], top: +obj[1] || 0};
- }
- if ('left' in obj) {
- this.offset.click.left = obj.left + this.margins.left;
- }
- if ('right' in obj) {
- this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
- }
- if ('top' in obj) {
- this.offset.click.top = obj.top + this.margins.top;
- }
- if ('bottom' in obj) {
- this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
- }
- },
-
- _getParentOffset: function() {
-
- //Get the offsetParent and cache its position
- this.offsetParent = this.helper.offsetParent();
- var po = this.offsetParent.offset();
-
- // This is a special case where we need to modify a offset calculated on start, since the following happened:
- // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
- // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
- // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
- if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
- po.left += this.scrollParent.scrollLeft();
- po.top += this.scrollParent.scrollTop();
- }
-
- if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
- || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.ui.ie)) //Ugly IE fix
- po = { top: 0, left: 0 };
-
- return {
- top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
- left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
- };
-
- },
-
- _getRelativeOffset: function() {
-
- if(this.cssPosition == "relative") {
- var p = this.element.position();
- return {
- top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
- left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
- };
- } else {
- return { top: 0, left: 0 };
- }
-
- },
-
- _cacheMargins: function() {
- this.margins = {
- left: (parseInt(this.element.css("marginLeft"),10) || 0),
- top: (parseInt(this.element.css("marginTop"),10) || 0),
- right: (parseInt(this.element.css("marginRight"),10) || 0),
- bottom: (parseInt(this.element.css("marginBottom"),10) || 0)
- };
- },
-
- _cacheHelperProportions: function() {
- this.helperProportions = {
- width: this.helper.outerWidth(),
- height: this.helper.outerHeight()
- };
- },
-
- _setContainment: function() {
-
- var o = this.options;
- if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
- if(o.containment == 'document' || o.containment == 'window') this.containment = [
- o.containment == 'document' ? 0 : $(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
- o.containment == 'document' ? 0 : $(window).scrollTop() - this.offset.relative.top - this.offset.parent.top,
- (o.containment == 'document' ? 0 : $(window).scrollLeft()) + $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,
- (o.containment == 'document' ? 0 : $(window).scrollTop()) + ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
- ];
-
- if(!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor != Array) {
- var c = $(o.containment);
- var ce = c[0]; if(!ce) return;
- var co = c.offset();
- var over = ($(ce).css("overflow") != 'hidden');
-
- this.containment = [
- (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0),
- (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0),
- (over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right,
- (over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom
- ];
- this.relative_container = c;
-
- } else if(o.containment.constructor == Array) {
- this.containment = o.containment;
- }
-
- },
-
- _convertPositionTo: function(d, pos) {
-
- if(!pos) pos = this.position;
- var mod = d == "absolute" ? 1 : -1;
- var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
-
- return {
- top: (
- pos.top // The absolute mouse position
- + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent
- + this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border)
- - ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
- ),
- left: (
- pos.left // The absolute mouse position
- + this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent
- + this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border)
- - ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
- )
- };
-
- },
-
- _generatePosition: function(event) {
-
- var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
- var pageX = event.pageX;
- var pageY = event.pageY;
-
- /*
- * - Position constraining -
- * Constrain the position to a mix of grid, containment.
- */
-
- if(this.originalPosition) { //If we are not dragging yet, we won't check for options
- var containment;
- if(this.containment) {
- if (this.relative_container){
- var co = this.relative_container.offset();
- containment = [ this.containment[0] + co.left,
- this.containment[1] + co.top,
- this.containment[2] + co.left,
- this.containment[3] + co.top ];
- }
- else {
- containment = this.containment;
- }
-
- if(event.pageX - this.offset.click.left < containment[0]) pageX = containment[0] + this.offset.click.left;
- if(event.pageY - this.offset.click.top < containment[1]) pageY = containment[1] + this.offset.click.top;
- if(event.pageX - this.offset.click.left > containment[2]) pageX = containment[2] + this.offset.click.left;
- if(event.pageY - this.offset.click.top > containment[3]) pageY = containment[3] + this.offset.click.top;
- }
-
- if(o.grid) {
- //Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950)
- var top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;
- pageY = containment ? (!(top - this.offset.click.top < containment[1] || top - this.offset.click.top > containment[3]) ? top : (!(top - this.offset.click.top < containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
-
- var left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;
- pageX = containment ? (!(left - this.offset.click.left < containment[0] || left - this.offset.click.left > containment[2]) ? left : (!(left - this.offset.click.left < containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
- }
-
- }
-
- return {
- top: (
- pageY // The absolute mouse position
- - this.offset.click.top // Click offset (relative to the element)
- - this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent
- - this.offset.parent.top // The offsetParent's offset without borders (offset + border)
- + ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
- ),
- left: (
- pageX // The absolute mouse position
- - this.offset.click.left // Click offset (relative to the element)
- - this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent
- - this.offset.parent.left // The offsetParent's offset without borders (offset + border)
- + ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
- )
- };
-
- },
-
- _clear: function() {
- this.helper.removeClass("ui-draggable-dragging");
- if(this.helper[0] != this.element[0] && !this.cancelHelperRemoval) this.helper.remove();
- //if($.ui.ddmanager) $.ui.ddmanager.current = null;
- this.helper = null;
- this.cancelHelperRemoval = false;
- },
-
- // From now on bulk stuff - mainly helpers
-
- _trigger: function(type, event, ui) {
- ui = ui || this._uiHash();
- $.ui.plugin.call(this, type, [event, ui]);
- if(type == "drag") this.positionAbs = this._convertPositionTo("absolute"); //The absolute position has to be recalculated after plugins
- return $.Widget.prototype._trigger.call(this, type, event, ui);
- },
-
- plugins: {},
-
- _uiHash: function(event) {
- return {
- helper: this.helper,
- position: this.position,
- originalPosition: this.originalPosition,
- offset: this.positionAbs
- };
- }
-
-});
-
-$.ui.plugin.add("draggable", "connectToSortable", {
- start: function(event, ui) {
-
- var inst = $(this).data("draggable"), o = inst.options,
- uiSortable = $.extend({}, ui, { item: inst.element });
- inst.sortables = [];
- $(o.connectToSortable).each(function() {
- var sortable = $.data(this, 'sortable');
- if (sortable && !sortable.options.disabled) {
- inst.sortables.push({
- instance: sortable,
- shouldRevert: sortable.options.revert
- });
- sortable.refreshPositions(); // Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page).
- sortable._trigger("activate", event, uiSortable);
- }
- });
-
- },
- stop: function(event, ui) {
-
- //If we are still over the sortable, we fake the stop event of the sortable, but also remove helper
- var inst = $(this).data("draggable"),
- uiSortable = $.extend({}, ui, { item: inst.element });
-
- $.each(inst.sortables, function() {
- if(this.instance.isOver) {
-
- this.instance.isOver = 0;
-
- inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance
- this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)
-
- //The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: 'valid/invalid'
- if(this.shouldRevert) this.instance.options.revert = true;
-
- //Trigger the stop of the sortable
- this.instance._mouseStop(event);
-
- this.instance.options.helper = this.instance.options._helper;
-
- //If the helper has been the original item, restore properties in the sortable
- if(inst.options.helper == 'original')
- this.instance.currentItem.css({ top: 'auto', left: 'auto' });
-
- } else {
- this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance
- this.instance._trigger("deactivate", event, uiSortable);
- }
-
- });
-
- },
- drag: function(event, ui) {
-
- var inst = $(this).data("draggable"), that = this;
-
- var checkPos = function(o) {
- var dyClick = this.offset.click.top, dxClick = this.offset.click.left;
- var helperTop = this.positionAbs.top, helperLeft = this.positionAbs.left;
- var itemHeight = o.height, itemWidth = o.width;
- var itemTop = o.top, itemLeft = o.left;
-
- return $.ui.isOver(helperTop + dyClick, helperLeft + dxClick, itemTop, itemLeft, itemHeight, itemWidth);
- };
-
- $.each(inst.sortables, function(i) {
-
- var innermostIntersecting = false;
- var thisSortable = this;
- //Copy over some variables to allow calling the sortable's native _intersectsWith
- this.instance.positionAbs = inst.positionAbs;
- this.instance.helperProportions = inst.helperProportions;
- this.instance.offset.click = inst.offset.click;
-
- if(this.instance._intersectsWith(this.instance.containerCache)) {
- innermostIntersecting = true;
- $.each(inst.sortables, function () {
- this.instance.positionAbs = inst.positionAbs;
- this.instance.helperProportions = inst.helperProportions;
- this.instance.offset.click = inst.offset.click;
- if (this != thisSortable
- && this.instance._intersectsWith(this.instance.containerCache)
- && $.ui.contains(thisSortable.instance.element[0], this.instance.element[0]))
- innermostIntersecting = false;
- return innermostIntersecting;
- });
- }
-
-
- if(innermostIntersecting) {
- //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once
- if(!this.instance.isOver) {
-
- this.instance.isOver = 1;
- //Now we fake the start of dragging for the sortable instance,
- //by cloning the list group item, appending it to the sortable and using it as inst.currentItem
- //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
- this.instance.currentItem = $(that).clone().removeAttr('id').appendTo(this.instance.element).data("sortable-item", true);
- this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it
- this.instance.options.helper = function() { return ui.helper[0]; };
-
- event.target = this.instance.currentItem[0];
- this.instance._mouseCapture(event, true);
- this.instance._mouseStart(event, true, true);
-
- //Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes
- this.instance.offset.click.top = inst.offset.click.top;
- this.instance.offset.click.left = inst.offset.click.left;
- this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left;
- this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top;
-
- inst._trigger("toSortable", event);
- inst.dropped = this.instance.element; //draggable revert needs that
- //hack so receive/update callbacks work (mostly)
- inst.currentItem = inst.element;
- this.instance.fromOutside = inst;
-
- }
-
- //Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable
- if(this.instance.currentItem) this.instance._mouseDrag(event);
-
- } else {
-
- //If it doesn't intersect with the sortable, and it intersected before,
- //we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval
- if(this.instance.isOver) {
-
- this.instance.isOver = 0;
- this.instance.cancelHelperRemoval = true;
-
- //Prevent reverting on this forced stop
- this.instance.options.revert = false;
-
- // The out event needs to be triggered independently
- this.instance._trigger('out', event, this.instance._uiHash(this.instance));
-
- this.instance._mouseStop(event, true);
- this.instance.options.helper = this.instance.options._helper;
-
- //Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size
- this.instance.currentItem.remove();
- if(this.instance.placeholder) this.instance.placeholder.remove();
-
- inst._trigger("fromSortable", event);
- inst.dropped = false; //draggable revert needs that
- }
-
- };
-
- });
-
- }
-});
-
-$.ui.plugin.add("draggable", "cursor", {
- start: function(event, ui) {
- var t = $('body'), o = $(this).data('draggable').options;
- if (t.css("cursor")) o._cursor = t.css("cursor");
- t.css("cursor", o.cursor);
- },
- stop: function(event, ui) {
- var o = $(this).data('draggable').options;
- if (o._cursor) $('body').css("cursor", o._cursor);
- }
-});
-
-$.ui.plugin.add("draggable", "opacity", {
- start: function(event, ui) {
- var t = $(ui.helper), o = $(this).data('draggable').options;
- if(t.css("opacity")) o._opacity = t.css("opacity");
- t.css('opacity', o.opacity);
- },
- stop: function(event, ui) {
- var o = $(this).data('draggable').options;
- if(o._opacity) $(ui.helper).css('opacity', o._opacity);
- }
-});
-
-$.ui.plugin.add("draggable", "scroll", {
- start: function(event, ui) {
- var i = $(this).data("draggable");
- if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') i.overflowOffset = i.scrollParent.offset();
- },
- drag: function(event, ui) {
-
- var i = $(this).data("draggable"), o = i.options, scrolled = false;
-
- if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') {
-
- if(!o.axis || o.axis != 'x') {
- if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
- i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;
- else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity)
- i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;
- }
-
- if(!o.axis || o.axis != 'y') {
- if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
- i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;
- else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity)
- i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;
- }
-
- } else {
-
- if(!o.axis || o.axis != 'x') {
- if(event.pageY - $(document).scrollTop() < o.scrollSensitivity)
- scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
- else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity)
- scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
- }
-
- if(!o.axis || o.axis != 'y') {
- if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity)
- scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
- else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
- scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
- }
-
- }
-
- if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)
- $.ui.ddmanager.prepareOffsets(i, event);
-
- }
-});
-
-$.ui.plugin.add("draggable", "snap", {
- start: function(event, ui) {
-
- var i = $(this).data("draggable"), o = i.options;
- i.snapElements = [];
-
- $(o.snap.constructor != String ? ( o.snap.items || ':data(draggable)' ) : o.snap).each(function() {
- var $t = $(this); var $o = $t.offset();
- if(this != i.element[0]) i.snapElements.push({
- item: this,
- width: $t.outerWidth(), height: $t.outerHeight(),
- top: $o.top, left: $o.left
- });
- });
-
- },
- drag: function(event, ui) {
-
- var inst = $(this).data("draggable"), o = inst.options;
- var d = o.snapTolerance;
-
- var x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
- y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
-
- for (var i = inst.snapElements.length - 1; i >= 0; i--){
-
- var l = inst.snapElements[i].left, r = l + inst.snapElements[i].width,
- t = inst.snapElements[i].top, b = t + inst.snapElements[i].height;
-
- //Yes, I know, this is insane ;)
- if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {
- if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
- inst.snapElements[i].snapping = false;
- continue;
- }
-
- if(o.snapMode != 'inner') {
- var ts = Math.abs(t - y2) <= d;
- var bs = Math.abs(b - y1) <= d;
- var ls = Math.abs(l - x2) <= d;
- var rs = Math.abs(r - x1) <= d;
- if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
- if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top;
- if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left;
- if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left;
- }
-
- var first = (ts || bs || ls || rs);
-
- if(o.snapMode != 'outer') {
- var ts = Math.abs(t - y1) <= d;
- var bs = Math.abs(b - y2) <= d;
- var ls = Math.abs(l - x1) <= d;
- var rs = Math.abs(r - x2) <= d;
- if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top;
- if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
- if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left;
- if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left;
- }
-
- if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first))
- (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
- inst.snapElements[i].snapping = (ts || bs || ls || rs || first);
-
- };
-
- }
-});
-
-$.ui.plugin.add("draggable", "stack", {
- start: function(event, ui) {
-
- var o = $(this).data("draggable").options;
-
- var group = $.makeArray($(o.stack)).sort(function(a,b) {
- return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0);
- });
- if (!group.length) { return; }
-
- var min = parseInt(group[0].style.zIndex) || 0;
- $(group).each(function(i) {
- this.style.zIndex = min + i;
- });
-
- this[0].style.zIndex = min + group.length;
-
- }
-});
-
-$.ui.plugin.add("draggable", "zIndex", {
- start: function(event, ui) {
- var t = $(ui.helper), o = $(this).data("draggable").options;
- if(t.css("zIndex")) o._zIndex = t.css("zIndex");
- t.css('zIndex', o.zIndex);
- },
- stop: function(event, ui) {
- var o = $(this).data("draggable").options;
- if(o._zIndex) $(ui.helper).css('zIndex', o._zIndex);
- }
-});
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.widget("ui.droppable", {
- version: "1.9.2",
- widgetEventPrefix: "drop",
- options: {
- accept: '*',
- activeClass: false,
- addClasses: true,
- greedy: false,
- hoverClass: false,
- scope: 'default',
- tolerance: 'intersect'
- },
- _create: function() {
-
- var o = this.options, accept = o.accept;
- this.isover = 0; this.isout = 1;
-
- this.accept = $.isFunction(accept) ? accept : function(d) {
- return d.is(accept);
- };
-
- //Store the droppable's proportions
- this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };
-
- // Add the reference and positions to the manager
- $.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];
- $.ui.ddmanager.droppables[o.scope].push(this);
-
- (o.addClasses && this.element.addClass("ui-droppable"));
-
- },
-
- _destroy: function() {
- var drop = $.ui.ddmanager.droppables[this.options.scope];
- for ( var i = 0; i < drop.length; i++ )
- if ( drop[i] == this )
- drop.splice(i, 1);
-
- this.element.removeClass("ui-droppable ui-droppable-disabled");
- },
-
- _setOption: function(key, value) {
-
- if(key == 'accept') {
- this.accept = $.isFunction(value) ? value : function(d) {
- return d.is(value);
- };
- }
- $.Widget.prototype._setOption.apply(this, arguments);
- },
-
- _activate: function(event) {
- var draggable = $.ui.ddmanager.current;
- if(this.options.activeClass) this.element.addClass(this.options.activeClass);
- (draggable && this._trigger('activate', event, this.ui(draggable)));
- },
-
- _deactivate: function(event) {
- var draggable = $.ui.ddmanager.current;
- if(this.options.activeClass) this.element.removeClass(this.options.activeClass);
- (draggable && this._trigger('deactivate', event, this.ui(draggable)));
- },
-
- _over: function(event) {
-
- var draggable = $.ui.ddmanager.current;
- if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
-
- if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
- if(this.options.hoverClass) this.element.addClass(this.options.hoverClass);
- this._trigger('over', event, this.ui(draggable));
- }
-
- },
-
- _out: function(event) {
-
- var draggable = $.ui.ddmanager.current;
- if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
-
- if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
- if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass);
- this._trigger('out', event, this.ui(draggable));
- }
-
- },
-
- _drop: function(event,custom) {
-
- var draggable = custom || $.ui.ddmanager.current;
- if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return false; // Bail if draggable and droppable are same element
-
- var childrenIntersection = false;
- this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function() {
- var inst = $.data(this, 'droppable');
- if(
- inst.options.greedy
- && !inst.options.disabled
- && inst.options.scope == draggable.options.scope
- && inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element))
- && $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)
- ) { childrenIntersection = true; return false; }
- });
- if(childrenIntersection) return false;
-
- if(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
- if(this.options.activeClass) this.element.removeClass(this.options.activeClass);
- if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass);
- this._trigger('drop', event, this.ui(draggable));
- return this.element;
- }
-
- return false;
-
- },
-
- ui: function(c) {
- return {
- draggable: (c.currentItem || c.element),
- helper: c.helper,
- position: c.position,
- offset: c.positionAbs
- };
- }
-
-});
-
-$.ui.intersect = function(draggable, droppable, toleranceMode) {
-
- if (!droppable.offset) return false;
-
- var x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
- y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height;
- var l = droppable.offset.left, r = l + droppable.proportions.width,
- t = droppable.offset.top, b = t + droppable.proportions.height;
-
- switch (toleranceMode) {
- case 'fit':
- return (l <= x1 && x2 <= r
- && t <= y1 && y2 <= b);
- break;
- case 'intersect':
- return (l < x1 + (draggable.helperProportions.width / 2) // Right Half
- && x2 - (draggable.helperProportions.width / 2) < r // Left Half
- && t < y1 + (draggable.helperProportions.height / 2) // Bottom Half
- && y2 - (draggable.helperProportions.height / 2) < b ); // Top Half
- break;
- case 'pointer':
- var draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left),
- draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top),
- isOver = $.ui.isOver(draggableTop, draggableLeft, t, l, droppable.proportions.height, droppable.proportions.width);
- return isOver;
- break;
- case 'touch':
- return (
- (y1 >= t && y1 <= b) || // Top edge touching
- (y2 >= t && y2 <= b) || // Bottom edge touching
- (y1 < t && y2 > b) // Surrounded vertically
- ) && (
- (x1 >= l && x1 <= r) || // Left edge touching
- (x2 >= l && x2 <= r) || // Right edge touching
- (x1 < l && x2 > r) // Surrounded horizontally
- );
- break;
- default:
- return false;
- break;
- }
-
-};
-
-/*
- This manager tracks offsets of draggables and droppables
-*/
-$.ui.ddmanager = {
- current: null,
- droppables: { 'default': [] },
- prepareOffsets: function(t, event) {
-
- var m = $.ui.ddmanager.droppables[t.options.scope] || [];
- var type = event ? event.type : null; // workaround for #2317
- var list = (t.currentItem || t.element).find(":data(droppable)").andSelf();
-
- droppablesLoop: for (var i = 0; i < m.length; i++) {
-
- if(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) continue; //No disabled and non-accepted
- for (var j=0; j < list.length; j++) { if(list[j] == m[i].element[0]) { m[i].proportions.height = 0; continue droppablesLoop; } }; //Filter out elements in the current dragged item
- m[i].visible = m[i].element.css("display") != "none"; if(!m[i].visible) continue; //If the element is not visible, continue
-
- if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables
-
- m[i].offset = m[i].element.offset();
- m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
-
- }
-
- },
- drop: function(draggable, event) {
-
- var dropped = false;
- $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
-
- if(!this.options) return;
- if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance))
- dropped = this._drop.call(this, event) || dropped;
-
- if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
- this.isout = 1; this.isover = 0;
- this._deactivate.call(this, event);
- }
-
- });
- return dropped;
-
- },
- dragStart: function( draggable, event ) {
- //Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
- draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() {
- if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event );
- });
- },
- drag: function(draggable, event) {
-
- //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
- if(draggable.options.refreshPositions) $.ui.ddmanager.prepareOffsets(draggable, event);
-
- //Run through all droppables and check their positions based on specific tolerance options
- $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
-
- if(this.options.disabled || this.greedyChild || !this.visible) return;
- var intersects = $.ui.intersect(draggable, this, this.options.tolerance);
-
- var c = !intersects && this.isover == 1 ? 'isout' : (intersects && this.isover == 0 ? 'isover' : null);
- if(!c) return;
-
- var parentInstance;
- if (this.options.greedy) {
- // find droppable parents with same scope
- var scope = this.options.scope;
- var parent = this.element.parents(':data(droppable)').filter(function () {
- return $.data(this, 'droppable').options.scope === scope;
- });
-
- if (parent.length) {
- parentInstance = $.data(parent[0], 'droppable');
- parentInstance.greedyChild = (c == 'isover' ? 1 : 0);
- }
- }
-
- // we just moved into a greedy child
- if (parentInstance && c == 'isover') {
- parentInstance['isover'] = 0;
- parentInstance['isout'] = 1;
- parentInstance._out.call(parentInstance, event);
- }
-
- this[c] = 1; this[c == 'isout' ? 'isover' : 'isout'] = 0;
- this[c == "isover" ? "_over" : "_out"].call(this, event);
-
- // we just moved out of a greedy child
- if (parentInstance && c == 'isout') {
- parentInstance['isout'] = 0;
- parentInstance['isover'] = 1;
- parentInstance._over.call(parentInstance, event);
- }
- });
-
- },
- dragStop: function( draggable, event ) {
- draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );
- //Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
- if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event );
- }
-};
-
-})(jQuery);
-;(jQuery.effects || (function($, undefined) {
-
-var backCompat = $.uiBackCompat !== false,
- // prefix used for storing data on .data()
- dataSpace = "ui-effects-";
-
-$.effects = {
- effect: {}
-};
-
-/*!
- * jQuery Color Animations v2.0.0
- * http://jquery.com/
- *
- * Copyright 2012 jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * Date: Mon Aug 13 13:41:02 2012 -0500
- */
-(function( jQuery, undefined ) {
-
- var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor".split(" "),
-
- // plusequals test for += 100 -= 100
- rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
- // a set of RE's that can match strings and generate color tuples.
- stringParsers = [{
- re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
- parse: function( execResult ) {
- return [
- execResult[ 1 ],
- execResult[ 2 ],
- execResult[ 3 ],
- execResult[ 4 ]
- ];
- }
- }, {
- re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
- parse: function( execResult ) {
- return [
- execResult[ 1 ] * 2.55,
- execResult[ 2 ] * 2.55,
- execResult[ 3 ] * 2.55,
- execResult[ 4 ]
- ];
- }
- }, {
- // this regex ignores A-F because it's compared against an already lowercased string
- re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
- parse: function( execResult ) {
- return [
- parseInt( execResult[ 1 ], 16 ),
- parseInt( execResult[ 2 ], 16 ),
- parseInt( execResult[ 3 ], 16 )
- ];
- }
- }, {
- // this regex ignores A-F because it's compared against an already lowercased string
- re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
- parse: function( execResult ) {
- return [
- parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
- parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
- parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
- ];
- }
- }, {
- re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
- space: "hsla",
- parse: function( execResult ) {
- return [
- execResult[ 1 ],
- execResult[ 2 ] / 100,
- execResult[ 3 ] / 100,
- execResult[ 4 ]
- ];
- }
- }],
-
- // jQuery.Color( )
- color = jQuery.Color = function( color, green, blue, alpha ) {
- return new jQuery.Color.fn.parse( color, green, blue, alpha );
- },
- spaces = {
- rgba: {
- props: {
- red: {
- idx: 0,
- type: "byte"
- },
- green: {
- idx: 1,
- type: "byte"
- },
- blue: {
- idx: 2,
- type: "byte"
- }
- }
- },
-
- hsla: {
- props: {
- hue: {
- idx: 0,
- type: "degrees"
- },
- saturation: {
- idx: 1,
- type: "percent"
- },
- lightness: {
- idx: 2,
- type: "percent"
- }
- }
- }
- },
- propTypes = {
- "byte": {
- floor: true,
- max: 255
- },
- "percent": {
- max: 1
- },
- "degrees": {
- mod: 360,
- floor: true
- }
- },
- support = color.support = {},
-
- // element for support tests
- supportElem = jQuery( "<p>" )[ 0 ],
-
- // colors = jQuery.Color.names
- colors,
-
- // local aliases of functions called often
- each = jQuery.each;
-
-// determine rgba support immediately
-supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
-support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
-
-// define cache name and alpha properties
-// for rgba and hsla spaces
-each( spaces, function( spaceName, space ) {
- space.cache = "_" + spaceName;
- space.props.alpha = {
- idx: 3,
- type: "percent",
- def: 1
- };
-});
-
-function clamp( value, prop, allowEmpty ) {
- var type = propTypes[ prop.type ] || {};
-
- if ( value == null ) {
- return (allowEmpty || !prop.def) ? null : prop.def;
- }
-
- // ~~ is an short way of doing floor for positive numbers
- value = type.floor ? ~~value : parseFloat( value );
-
- // IE will pass in empty strings as value for alpha,
- // which will hit this case
- if ( isNaN( value ) ) {
- return prop.def;
- }
-
- if ( type.mod ) {
- // we add mod before modding to make sure that negatives values
- // get converted properly: -10 -> 350
- return (value + type.mod) % type.mod;
- }
-
- // for now all property types without mod have min and max
- return 0 > value ? 0 : type.max < value ? type.max : value;
-}
-
-function stringParse( string ) {
- var inst = color(),
- rgba = inst._rgba = [];
-
- string = string.toLowerCase();
-
- each( stringParsers, function( i, parser ) {
- var parsed,
- match = parser.re.exec( string ),
- values = match && parser.parse( match ),
- spaceName = parser.space || "rgba";
-
- if ( values ) {
- parsed = inst[ spaceName ]( values );
-
- // if this was an rgba parse the assignment might happen twice
- // oh well....
- inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
- rgba = inst._rgba = parsed._rgba;
-
- // exit each( stringParsers ) here because we matched
- return false;
- }
- });
-
- // Found a stringParser that handled it
- if ( rgba.length ) {
-
- // if this came from a parsed string, force "transparent" when alpha is 0
- // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
- if ( rgba.join() === "0,0,0,0" ) {
- jQuery.extend( rgba, colors.transparent );
- }
- return inst;
- }
-
- // named colors
- return colors[ string ];
-}
-
-color.fn = jQuery.extend( color.prototype, {
- parse: function( red, green, blue, alpha ) {
- if ( red === undefined ) {
- this._rgba = [ null, null, null, null ];
- return this;
- }
- if ( red.jquery || red.nodeType ) {
- red = jQuery( red ).css( green );
- green = undefined;
- }
-
- var inst = this,
- type = jQuery.type( red ),
- rgba = this._rgba = [];
-
- // more than 1 argument specified - assume ( red, green, blue, alpha )
- if ( green !== undefined ) {
- red = [ red, green, blue, alpha ];
- type = "array";
- }
-
- if ( type === "string" ) {
- return this.parse( stringParse( red ) || colors._default );
- }
-
- if ( type === "array" ) {
- each( spaces.rgba.props, function( key, prop ) {
- rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
- });
- return this;
- }
-
- if ( type === "object" ) {
- if ( red instanceof color ) {
- each( spaces, function( spaceName, space ) {
- if ( red[ space.cache ] ) {
- inst[ space.cache ] = red[ space.cache ].slice();
- }
- });
- } else {
- each( spaces, function( spaceName, space ) {
- var cache = space.cache;
- each( space.props, function( key, prop ) {
-
- // if the cache doesn't exist, and we know how to convert
- if ( !inst[ cache ] && space.to ) {
-
- // if the value was null, we don't need to copy it
- // if the key was alpha, we don't need to copy it either
- if ( key === "alpha" || red[ key ] == null ) {
- return;
- }
- inst[ cache ] = space.to( inst._rgba );
- }
-
- // this is the only case where we allow nulls for ALL properties.
- // call clamp with alwaysAllowEmpty
- inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
- });
-
- // everything defined but alpha?
- if ( inst[ cache ] && $.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
- // use the default of 1
- inst[ cache ][ 3 ] = 1;
- if ( space.from ) {
- inst._rgba = space.from( inst[ cache ] );
- }
- }
- });
- }
- return this;
- }
- },
- is: function( compare ) {
- var is = color( compare ),
- same = true,
- inst = this;
-
- each( spaces, function( _, space ) {
- var localCache,
- isCache = is[ space.cache ];
- if (isCache) {
- localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
- each( space.props, function( _, prop ) {
- if ( isCache[ prop.idx ] != null ) {
- same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
- return same;
- }
- });
- }
- return same;
- });
- return same;
- },
- _space: function() {
- var used = [],
- inst = this;
- each( spaces, function( spaceName, space ) {
- if ( inst[ space.cache ] ) {
- used.push( spaceName );
- }
- });
- return used.pop();
- },
- transition: function( other, distance ) {
- var end = color( other ),
- spaceName = end._space(),
- space = spaces[ spaceName ],
- startColor = this.alpha() === 0 ? color( "transparent" ) : this,
- start = startColor[ space.cache ] || space.to( startColor._rgba ),
- result = start.slice();
-
- end = end[ space.cache ];
- each( space.props, function( key, prop ) {
- var index = prop.idx,
- startValue = start[ index ],
- endValue = end[ index ],
- type = propTypes[ prop.type ] || {};
-
- // if null, don't override start value
- if ( endValue === null ) {
- return;
- }
- // if null - use end
- if ( startValue === null ) {
- result[ index ] = endValue;
- } else {
- if ( type.mod ) {
- if ( endValue - startValue > type.mod / 2 ) {
- startValue += type.mod;
- } else if ( startValue - endValue > type.mod / 2 ) {
- startValue -= type.mod;
- }
- }
- result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
- }
- });
- return this[ spaceName ]( result );
- },
- blend: function( opaque ) {
- // if we are already opaque - return ourself
- if ( this._rgba[ 3 ] === 1 ) {
- return this;
- }
-
- var rgb = this._rgba.slice(),
- a = rgb.pop(),
- blend = color( opaque )._rgba;
-
- return color( jQuery.map( rgb, function( v, i ) {
- return ( 1 - a ) * blend[ i ] + a * v;
- }));
- },
- toRgbaString: function() {
- var prefix = "rgba(",
- rgba = jQuery.map( this._rgba, function( v, i ) {
- return v == null ? ( i > 2 ? 1 : 0 ) : v;
- });
-
- if ( rgba[ 3 ] === 1 ) {
- rgba.pop();
- prefix = "rgb(";
- }
-
- return prefix + rgba.join() + ")";
- },
- toHslaString: function() {
- var prefix = "hsla(",
- hsla = jQuery.map( this.hsla(), function( v, i ) {
- if ( v == null ) {
- v = i > 2 ? 1 : 0;
- }
-
- // catch 1 and 2
- if ( i && i < 3 ) {
- v = Math.round( v * 100 ) + "%";
- }
- return v;
- });
-
- if ( hsla[ 3 ] === 1 ) {
- hsla.pop();
- prefix = "hsl(";
- }
- return prefix + hsla.join() + ")";
- },
- toHexString: function( includeAlpha ) {
- var rgba = this._rgba.slice(),
- alpha = rgba.pop();
-
- if ( includeAlpha ) {
- rgba.push( ~~( alpha * 255 ) );
- }
-
- return "#" + jQuery.map( rgba, function( v ) {
-
- // default to 0 when nulls exist
- v = ( v || 0 ).toString( 16 );
- return v.length === 1 ? "0" + v : v;
- }).join("");
- },
- toString: function() {
- return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
- }
-});
-color.fn.parse.prototype = color.fn;
-
-// hsla conversions adapted from:
-// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
-
-function hue2rgb( p, q, h ) {
- h = ( h + 1 ) % 1;
- if ( h * 6 < 1 ) {
- return p + (q - p) * h * 6;
- }
- if ( h * 2 < 1) {
- return q;
- }
- if ( h * 3 < 2 ) {
- return p + (q - p) * ((2/3) - h) * 6;
- }
- return p;
-}
-
-spaces.hsla.to = function ( rgba ) {
- if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
- return [ null, null, null, rgba[ 3 ] ];
- }
- var r = rgba[ 0 ] / 255,
- g = rgba[ 1 ] / 255,
- b = rgba[ 2 ] / 255,
- a = rgba[ 3 ],
- max = Math.max( r, g, b ),
- min = Math.min( r, g, b ),
- diff = max - min,
- add = max + min,
- l = add * 0.5,
- h, s;
-
- if ( min === max ) {
- h = 0;
- } else if ( r === max ) {
- h = ( 60 * ( g - b ) / diff ) + 360;
- } else if ( g === max ) {
- h = ( 60 * ( b - r ) / diff ) + 120;
- } else {
- h = ( 60 * ( r - g ) / diff ) + 240;
- }
-
- if ( l === 0 || l === 1 ) {
- s = l;
- } else if ( l <= 0.5 ) {
- s = diff / add;
- } else {
- s = diff / ( 2 - add );
- }
- return [ Math.round(h) % 360, s, l, a == null ? 1 : a ];
-};
-
-spaces.hsla.from = function ( hsla ) {
- if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
- return [ null, null, null, hsla[ 3 ] ];
- }
- var h = hsla[ 0 ] / 360,
- s = hsla[ 1 ],
- l = hsla[ 2 ],
- a = hsla[ 3 ],
- q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
- p = 2 * l - q;
-
- return [
- Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
- Math.round( hue2rgb( p, q, h ) * 255 ),
- Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
- a
- ];
-};
-
-
-each( spaces, function( spaceName, space ) {
- var props = space.props,
- cache = space.cache,
- to = space.to,
- from = space.from;
-
- // makes rgba() and hsla()
- color.fn[ spaceName ] = function( value ) {
-
- // generate a cache for this space if it doesn't exist
- if ( to && !this[ cache ] ) {
- this[ cache ] = to( this._rgba );
- }
- if ( value === undefined ) {
- return this[ cache ].slice();
- }
-
- var ret,
- type = jQuery.type( value ),
- arr = ( type === "array" || type === "object" ) ? value : arguments,
- local = this[ cache ].slice();
-
- each( props, function( key, prop ) {
- var val = arr[ type === "object" ? key : prop.idx ];
- if ( val == null ) {
- val = local[ prop.idx ];
- }
- local[ prop.idx ] = clamp( val, prop );
- });
-
- if ( from ) {
- ret = color( from( local ) );
- ret[ cache ] = local;
- return ret;
- } else {
- return color( local );
- }
- };
-
- // makes red() green() blue() alpha() hue() saturation() lightness()
- each( props, function( key, prop ) {
- // alpha is included in more than one space
- if ( color.fn[ key ] ) {
- return;
- }
- color.fn[ key ] = function( value ) {
- var vtype = jQuery.type( value ),
- fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ),
- local = this[ fn ](),
- cur = local[ prop.idx ],
- match;
-
- if ( vtype === "undefined" ) {
- return cur;
- }
-
- if ( vtype === "function" ) {
- value = value.call( this, cur );
- vtype = jQuery.type( value );
- }
- if ( value == null && prop.empty ) {
- return this;
- }
- if ( vtype === "string" ) {
- match = rplusequals.exec( value );
- if ( match ) {
- value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
- }
- }
- local[ prop.idx ] = value;
- return this[ fn ]( local );
- };
- });
-});
-
-// add .fx.step functions
-each( stepHooks, function( i, hook ) {
- jQuery.cssHooks[ hook ] = {
- set: function( elem, value ) {
- var parsed, curElem,
- backgroundColor = "";
-
- if ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) {
- value = color( parsed || value );
- if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
- curElem = hook === "backgroundColor" ? elem.parentNode : elem;
- while (
- (backgroundColor === "" || backgroundColor === "transparent") &&
- curElem && curElem.style
- ) {
- try {
- backgroundColor = jQuery.css( curElem, "backgroundColor" );
- curElem = curElem.parentNode;
- } catch ( e ) {
- }
- }
-
- value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
- backgroundColor :
- "_default" );
- }
-
- value = value.toRgbaString();
- }
- try {
- elem.style[ hook ] = value;
- } catch( error ) {
- // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit'
- }
- }
- };
- jQuery.fx.step[ hook ] = function( fx ) {
- if ( !fx.colorInit ) {
- fx.start = color( fx.elem, hook );
- fx.end = color( fx.end );
- fx.colorInit = true;
- }
- jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
- };
-});
-
-jQuery.cssHooks.borderColor = {
- expand: function( value ) {
- var expanded = {};
-
- each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
- expanded[ "border" + part + "Color" ] = value;
- });
- return expanded;
- }
-};
-
-// Basic color names only.
-// Usage of any of the other color names requires adding yourself or including
-// jquery.color.svg-names.js.
-colors = jQuery.Color.names = {
- // 4.1. Basic color keywords
- aqua: "#00ffff",
- black: "#000000",
- blue: "#0000ff",
- fuchsia: "#ff00ff",
- gray: "#808080",
- green: "#008000",
- lime: "#00ff00",
- maroon: "#800000",
- navy: "#000080",
- olive: "#808000",
- purple: "#800080",
- red: "#ff0000",
- silver: "#c0c0c0",
- teal: "#008080",
- white: "#ffffff",
- yellow: "#ffff00",
-
- // 4.2.3. "transparent" color keyword
- transparent: [ null, null, null, 0 ],
-
- _default: "#ffffff"
-};
-
-})( jQuery );
-
-
-
-/******************************************************************************/
-/****************************** CLASS ANIMATIONS ******************************/
-/******************************************************************************/
-(function() {
-
-var classAnimationActions = [ "add", "remove", "toggle" ],
- shorthandStyles = {
- border: 1,
- borderBottom: 1,
- borderColor: 1,
- borderLeft: 1,
- borderRight: 1,
- borderTop: 1,
- borderWidth: 1,
- margin: 1,
- padding: 1
- };
-
-$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) {
- $.fx.step[ prop ] = function( fx ) {
- if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
- jQuery.style( fx.elem, prop, fx.end );
- fx.setAttr = true;
- }
- };
-});
-
-function getElementStyles() {
- var style = this.ownerDocument.defaultView ?
- this.ownerDocument.defaultView.getComputedStyle( this, null ) :
- this.currentStyle,
- newStyle = {},
- key,
- len;
-
- // webkit enumerates style porperties
- if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
- len = style.length;
- while ( len-- ) {
- key = style[ len ];
- if ( typeof style[ key ] === "string" ) {
- newStyle[ $.camelCase( key ) ] = style[ key ];
- }
- }
- } else {
- for ( key in style ) {
- if ( typeof style[ key ] === "string" ) {
- newStyle[ key ] = style[ key ];
- }
- }
- }
-
- return newStyle;
-}
-
-
-function styleDifference( oldStyle, newStyle ) {
- var diff = {},
- name, value;
-
- for ( name in newStyle ) {
- value = newStyle[ name ];
- if ( oldStyle[ name ] !== value ) {
- if ( !shorthandStyles[ name ] ) {
- if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {
- diff[ name ] = value;
- }
- }
- }
- }
-
- return diff;
-}
-
-$.effects.animateClass = function( value, duration, easing, callback ) {
- var o = $.speed( duration, easing, callback );
-
- return this.queue( function() {
- var animated = $( this ),
- baseClass = animated.attr( "class" ) || "",
- applyClassChange,
- allAnimations = o.children ? animated.find( "*" ).andSelf() : animated;
-
- // map the animated objects to store the original styles.
- allAnimations = allAnimations.map(function() {
- var el = $( this );
- return {
- el: el,
- start: getElementStyles.call( this )
- };
- });
-
- // apply class change
- applyClassChange = function() {
- $.each( classAnimationActions, function(i, action) {
- if ( value[ action ] ) {
- animated[ action + "Class" ]( value[ action ] );
- }
- });
- };
- applyClassChange();
-
- // map all animated objects again - calculate new styles and diff
- allAnimations = allAnimations.map(function() {
- this.end = getElementStyles.call( this.el[ 0 ] );
- this.diff = styleDifference( this.start, this.end );
- return this;
- });
-
- // apply original class
- animated.attr( "class", baseClass );
-
- // map all animated objects again - this time collecting a promise
- allAnimations = allAnimations.map(function() {
- var styleInfo = this,
- dfd = $.Deferred(),
- opts = jQuery.extend({}, o, {
- queue: false,
- complete: function() {
- dfd.resolve( styleInfo );
- }
- });
-
- this.el.animate( this.diff, opts );
- return dfd.promise();
- });
-
- // once all animations have completed:
- $.when.apply( $, allAnimations.get() ).done(function() {
-
- // set the final class
- applyClassChange();
-
- // for each animated element,
- // clear all css properties that were animated
- $.each( arguments, function() {
- var el = this.el;
- $.each( this.diff, function(key) {
- el.css( key, '' );
- });
- });
-
- // this is guarnteed to be there if you use jQuery.speed()
- // it also handles dequeuing the next anim...
- o.complete.call( animated[ 0 ] );
- });
- });
-};
-
-$.fn.extend({
- _addClass: $.fn.addClass,
- addClass: function( classNames, speed, easing, callback ) {
- return speed ?
- $.effects.animateClass.call( this,
- { add: classNames }, speed, easing, callback ) :
- this._addClass( classNames );
- },
-
- _removeClass: $.fn.removeClass,
- removeClass: function( classNames, speed, easing, callback ) {
- return speed ?
- $.effects.animateClass.call( this,
- { remove: classNames }, speed, easing, callback ) :
- this._removeClass( classNames );
- },
-
- _toggleClass: $.fn.toggleClass,
- toggleClass: function( classNames, force, speed, easing, callback ) {
- if ( typeof force === "boolean" || force === undefined ) {
- if ( !speed ) {
- // without speed parameter
- return this._toggleClass( classNames, force );
- } else {
- return $.effects.animateClass.call( this,
- (force ? { add: classNames } : { remove: classNames }),
- speed, easing, callback );
- }
- } else {
- // without force parameter
- return $.effects.animateClass.call( this,
- { toggle: classNames }, force, speed, easing );
- }
- },
-
- switchClass: function( remove, add, speed, easing, callback) {
- return $.effects.animateClass.call( this, {
- add: add,
- remove: remove
- }, speed, easing, callback );
- }
-});
-
-})();
-
-/******************************************************************************/
-/*********************************** EFFECTS **********************************/
-/******************************************************************************/
-
-(function() {
-
-$.extend( $.effects, {
- version: "1.9.2",
-
- // Saves a set of properties in a data storage
- save: function( element, set ) {
- for( var i=0; i < set.length; i++ ) {
- if ( set[ i ] !== null ) {
- element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
- }
- }
- },
-
- // Restores a set of previously saved properties from a data storage
- restore: function( element, set ) {
- var val, i;
- for( i=0; i < set.length; i++ ) {
- if ( set[ i ] !== null ) {
- val = element.data( dataSpace + set[ i ] );
- // support: jQuery 1.6.2
- // http://bugs.jquery.com/ticket/9917
- // jQuery 1.6.2 incorrectly returns undefined for any falsy value.
- // We can't differentiate between "" and 0 here, so we just assume
- // empty string since it's likely to be a more common value...
- if ( val === undefined ) {
- val = "";
- }
- element.css( set[ i ], val );
- }
- }
- },
-
- setMode: function( el, mode ) {
- if (mode === "toggle") {
- mode = el.is( ":hidden" ) ? "show" : "hide";
- }
- return mode;
- },
-
- // Translates a [top,left] array into a baseline value
- // this should be a little more flexible in the future to handle a string & hash
- getBaseline: function( origin, original ) {
- var y, x;
- switch ( origin[ 0 ] ) {
- case "top": y = 0; break;
- case "middle": y = 0.5; break;
- case "bottom": y = 1; break;
- default: y = origin[ 0 ] / original.height;
- }
- switch ( origin[ 1 ] ) {
- case "left": x = 0; break;
- case "center": x = 0.5; break;
- case "right": x = 1; break;
- default: x = origin[ 1 ] / original.width;
- }
- return {
- x: x,
- y: y
- };
- },
-
- // Wraps the element around a wrapper that copies position properties
- createWrapper: function( element ) {
-
- // if the element is already wrapped, return it
- if ( element.parent().is( ".ui-effects-wrapper" )) {
- return element.parent();
- }
-
- // wrap the element
- var props = {
- width: element.outerWidth(true),
- height: element.outerHeight(true),
- "float": element.css( "float" )
- },
- wrapper = $( "<div></div>" )
- .addClass( "ui-effects-wrapper" )
- .css({
- fontSize: "100%",
- background: "transparent",
- border: "none",
- margin: 0,
- padding: 0
- }),
- // Store the size in case width/height are defined in % - Fixes #5245
- size = {
- width: element.width(),
- height: element.height()
- },
- active = document.activeElement;
-
- // support: Firefox
- // Firefox incorrectly exposes anonymous content
- // https://bugzilla.mozilla.org/show_bug.cgi?id=561664
- try {
- active.id;
- } catch( e ) {
- active = document.body;
- }
-
- element.wrap( wrapper );
-
- // Fixes #7595 - Elements lose focus when wrapped.
- if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
- $( active ).focus();
- }
-
- wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element
-
- // transfer positioning properties to the wrapper
- if ( element.css( "position" ) === "static" ) {
- wrapper.css({ position: "relative" });
- element.css({ position: "relative" });
- } else {
- $.extend( props, {
- position: element.css( "position" ),
- zIndex: element.css( "z-index" )
- });
- $.each([ "top", "left", "bottom", "right" ], function(i, pos) {
- props[ pos ] = element.css( pos );
- if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
- props[ pos ] = "auto";
- }
- });
- element.css({
- position: "relative",
- top: 0,
- left: 0,
- right: "auto",
- bottom: "auto"
- });
- }
- element.css(size);
-
- return wrapper.css( props ).show();
- },
-
- removeWrapper: function( element ) {
- var active = document.activeElement;
-
- if ( element.parent().is( ".ui-effects-wrapper" ) ) {
- element.parent().replaceWith( element );
-
- // Fixes #7595 - Elements lose focus when wrapped.
- if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
- $( active ).focus();
- }
- }
-
-
- return element;
- },
-
- setTransition: function( element, list, factor, value ) {
- value = value || {};
- $.each( list, function( i, x ) {
- var unit = element.cssUnit( x );
- if ( unit[ 0 ] > 0 ) {
- value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
- }
- });
- return value;
- }
-});
-
-// return an effect options object for the given parameters:
-function _normalizeArguments( effect, options, speed, callback ) {
-
- // allow passing all options as the first parameter
- if ( $.isPlainObject( effect ) ) {
- options = effect;
- effect = effect.effect;
- }
-
- // convert to an object
- effect = { effect: effect };
-
- // catch (effect, null, ...)
- if ( options == null ) {
- options = {};
- }
-
- // catch (effect, callback)
- if ( $.isFunction( options ) ) {
- callback = options;
- speed = null;
- options = {};
- }
-
- // catch (effect, speed, ?)
- if ( typeof options === "number" || $.fx.speeds[ options ] ) {
- callback = speed;
- speed = options;
- options = {};
- }
-
- // catch (effect, options, callback)
- if ( $.isFunction( speed ) ) {
- callback = speed;
- speed = null;
- }
-
- // add options to effect
- if ( options ) {
- $.extend( effect, options );
- }
-
- speed = speed || options.duration;
- effect.duration = $.fx.off ? 0 :
- typeof speed === "number" ? speed :
- speed in $.fx.speeds ? $.fx.speeds[ speed ] :
- $.fx.speeds._default;
-
- effect.complete = callback || options.complete;
-
- return effect;
-}
-
-function standardSpeed( speed ) {
- // valid standard speeds
- if ( !speed || typeof speed === "number" || $.fx.speeds[ speed ] ) {
- return true;
- }
-
- // invalid strings - treat as "normal" speed
- if ( typeof speed === "string" && !$.effects.effect[ speed ] ) {
- // TODO: remove in 2.0 (#7115)
- if ( backCompat && $.effects[ speed ] ) {
- return false;
- }
- return true;
- }
-
- return false;
-}
-
-$.fn.extend({
- effect: function( /* effect, options, speed, callback */ ) {
- var args = _normalizeArguments.apply( this, arguments ),
- mode = args.mode,
- queue = args.queue,
- effectMethod = $.effects.effect[ args.effect ],
-
- // DEPRECATED: remove in 2.0 (#7115)
- oldEffectMethod = !effectMethod && backCompat && $.effects[ args.effect ];
-
- if ( $.fx.off || !( effectMethod || oldEffectMethod ) ) {
- // delegate to the original method (e.g., .show()) if possible
- if ( mode ) {
- return this[ mode ]( args.duration, args.complete );
- } else {
- return this.each( function() {
- if ( args.complete ) {
- args.complete.call( this );
- }
- });
- }
- }
-
- function run( next ) {
- var elem = $( this ),
- complete = args.complete,
- mode = args.mode;
-
- function done() {
- if ( $.isFunction( complete ) ) {
- complete.call( elem[0] );
- }
- if ( $.isFunction( next ) ) {
- next();
- }
- }
-
- // if the element is hiddden and mode is hide,
- // or element is visible and mode is show
- if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
- done();
- } else {
- effectMethod.call( elem[0], args, done );
- }
- }
-
- // TODO: remove this check in 2.0, effectMethod will always be true
- if ( effectMethod ) {
- return queue === false ? this.each( run ) : this.queue( queue || "fx", run );
- } else {
- // DEPRECATED: remove in 2.0 (#7115)
- return oldEffectMethod.call(this, {
- options: args,
- duration: args.duration,
- callback: args.complete,
- mode: args.mode
- });
- }
- },
-
- _show: $.fn.show,
- show: function( speed ) {
- if ( standardSpeed( speed ) ) {
- return this._show.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "show";
- return this.effect.call( this, args );
- }
- },
-
- _hide: $.fn.hide,
- hide: function( speed ) {
- if ( standardSpeed( speed ) ) {
- return this._hide.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "hide";
- return this.effect.call( this, args );
- }
- },
-
- // jQuery core overloads toggle and creates _toggle
- __toggle: $.fn.toggle,
- toggle: function( speed ) {
- if ( standardSpeed( speed ) || typeof speed === "boolean" || $.isFunction( speed ) ) {
- return this.__toggle.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "toggle";
- return this.effect.call( this, args );
- }
- },
-
- // helper functions
- cssUnit: function(key) {
- var style = this.css( key ),
- val = [];
-
- $.each( [ "em", "px", "%", "pt" ], function( i, unit ) {
- if ( style.indexOf( unit ) > 0 ) {
- val = [ parseFloat( style ), unit ];
- }
- });
- return val;
- }
-});
-
-})();
-
-/******************************************************************************/
-/*********************************** EASING ***********************************/
-/******************************************************************************/
-
-(function() {
-
-// based on easing equations from Robert Penner (http://www.robertpenner.com/easing)
-
-var baseEasings = {};
-
-$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
- baseEasings[ name ] = function( p ) {
- return Math.pow( p, i + 2 );
- };
-});
-
-$.extend( baseEasings, {
- Sine: function ( p ) {
- return 1 - Math.cos( p * Math.PI / 2 );
- },
- Circ: function ( p ) {
- return 1 - Math.sqrt( 1 - p * p );
- },
- Elastic: function( p ) {
- return p === 0 || p === 1 ? p :
- -Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 );
- },
- Back: function( p ) {
- return p * p * ( 3 * p - 2 );
- },
- Bounce: function ( p ) {
- var pow2,
- bounce = 4;
-
- while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
- return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
- }
-});
-
-$.each( baseEasings, function( name, easeIn ) {
- $.easing[ "easeIn" + name ] = easeIn;
- $.easing[ "easeOut" + name ] = function( p ) {
- return 1 - easeIn( 1 - p );
- };
- $.easing[ "easeInOut" + name ] = function( p ) {
- return p < 0.5 ?
- easeIn( p * 2 ) / 2 :
- 1 - easeIn( p * -2 + 2 ) / 2;
- };
-});
-
-})();
-
-})(jQuery));
-(function( $, undefined ) {
-
-var rvertical = /up|down|vertical/,
- rpositivemotion = /up|left|vertical|horizontal/;
-
-$.effects.effect.blind = function( o, done ) {
- // Create element
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- direction = o.direction || "up",
- vertical = rvertical.test( direction ),
- ref = vertical ? "height" : "width",
- ref2 = vertical ? "top" : "left",
- motion = rpositivemotion.test( direction ),
- animation = {},
- show = mode === "show",
- wrapper, distance, margin;
-
- // if already wrapped, the wrapper's properties are my property. #6245
- if ( el.parent().is( ".ui-effects-wrapper" ) ) {
- $.effects.save( el.parent(), props );
- } else {
- $.effects.save( el, props );
- }
- el.show();
- wrapper = $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
-
- distance = wrapper[ ref ]();
- margin = parseFloat( wrapper.css( ref2 ) ) || 0;
-
- animation[ ref ] = show ? distance : 0;
- if ( !motion ) {
- el
- .css( vertical ? "bottom" : "right", 0 )
- .css( vertical ? "top" : "left", "auto" )
- .css({ position: "absolute" });
-
- animation[ ref2 ] = show ? margin : distance + margin;
- }
-
- // start at 0 if we are showing
- if ( show ) {
- wrapper.css( ref, 0 );
- if ( ! motion ) {
- wrapper.css( ref2, margin + distance );
- }
- }
-
- // Animate
- wrapper.animate( animation, {
- duration: o.duration,
- easing: o.easing,
- queue: false,
- complete: function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.bounce = function( o, done ) {
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
-
- // defaults:
- mode = $.effects.setMode( el, o.mode || "effect" ),
- hide = mode === "hide",
- show = mode === "show",
- direction = o.direction || "up",
- distance = o.distance,
- times = o.times || 5,
-
- // number of internal animations
- anims = times * 2 + ( show || hide ? 1 : 0 ),
- speed = o.duration / anims,
- easing = o.easing,
-
- // utility:
- ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
- motion = ( direction === "up" || direction === "left" ),
- i,
- upAnim,
- downAnim,
-
- // we will need to re-assemble the queue to stack our animations in place
- queue = el.queue(),
- queuelen = queue.length;
-
- // Avoid touching opacity to prevent clearType and PNG issues in IE
- if ( show || hide ) {
- props.push( "opacity" );
- }
-
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el ); // Create Wrapper
-
- // default distance for the BIGGEST bounce is the outer Distance / 3
- if ( !distance ) {
- distance = el[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3;
- }
-
- if ( show ) {
- downAnim = { opacity: 1 };
- downAnim[ ref ] = 0;
-
- // if we are showing, force opacity 0 and set the initial position
- // then do the "first" animation
- el.css( "opacity", 0 )
- .css( ref, motion ? -distance * 2 : distance * 2 )
- .animate( downAnim, speed, easing );
- }
-
- // start at the smallest distance if we are hiding
- if ( hide ) {
- distance = distance / Math.pow( 2, times - 1 );
- }
-
- downAnim = {};
- downAnim[ ref ] = 0;
- // Bounces up/down/left/right then back to 0 -- times * 2 animations happen here
- for ( i = 0; i < times; i++ ) {
- upAnim = {};
- upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
-
- el.animate( upAnim, speed, easing )
- .animate( downAnim, speed, easing );
-
- distance = hide ? distance * 2 : distance / 2;
- }
-
- // Last Bounce when Hiding
- if ( hide ) {
- upAnim = { opacity: 0 };
- upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
-
- el.animate( upAnim, speed, easing );
- }
-
- el.queue(function() {
- if ( hide ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- });
-
- // inject all the animations we just queued to be first in line (after "inprogress")
- if ( queuelen > 1) {
- queue.splice.apply( queue,
- [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
- }
- el.dequeue();
-
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.clip = function( o, done ) {
- // Create element
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
- direction = o.direction || "vertical",
- vert = direction === "vertical",
- size = vert ? "height" : "width",
- position = vert ? "top" : "left",
- animation = {},
- wrapper, animate, distance;
-
- // Save & Show
- $.effects.save( el, props );
- el.show();
-
- // Create Wrapper
- wrapper = $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
- animate = ( el[0].tagName === "IMG" ) ? wrapper : el;
- distance = animate[ size ]();
-
- // Shift
- if ( show ) {
- animate.css( size, 0 );
- animate.css( position, distance / 2 );
- }
-
- // Create Animation Object:
- animation[ size ] = show ? distance : 0;
- animation[ position ] = show ? 0 : distance / 2;
-
- // Animate
- animate.animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( !show ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.drop = function( o, done ) {
-
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "opacity", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
- direction = o.direction || "left",
- ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
- motion = ( direction === "up" || direction === "left" ) ? "pos" : "neg",
- animation = {
- opacity: show ? 1 : 0
- },
- distance;
-
- // Adjust
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el );
-
- distance = o.distance || el[ ref === "top" ? "outerHeight": "outerWidth" ]( true ) / 2;
-
- if ( show ) {
- el
- .css( "opacity", 0 )
- .css( ref, motion === "pos" ? -distance : distance );
- }
-
- // Animation
- animation[ ref ] = ( show ?
- ( motion === "pos" ? "+=" : "-=" ) :
- ( motion === "pos" ? "-=" : "+=" ) ) +
- distance;
-
- // Animate
- el.animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.explode = function( o, done ) {
-
- var rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3,
- cells = rows,
- el = $( this ),
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
-
- // show and then visibility:hidden the element before calculating offset
- offset = el.show().css( "visibility", "hidden" ).offset(),
-
- // width and height of a piece
- width = Math.ceil( el.outerWidth() / cells ),
- height = Math.ceil( el.outerHeight() / rows ),
- pieces = [],
-
- // loop
- i, j, left, top, mx, my;
-
- // children animate complete:
- function childComplete() {
- pieces.push( this );
- if ( pieces.length === rows * cells ) {
- animComplete();
- }
- }
-
- // clone the element for each row and cell.
- for( i = 0; i < rows ; i++ ) { // ===>
- top = offset.top + i * height;
- my = i - ( rows - 1 ) / 2 ;
-
- for( j = 0; j < cells ; j++ ) { // |||
- left = offset.left + j * width;
- mx = j - ( cells - 1 ) / 2 ;
-
- // Create a clone of the now hidden main element that will be absolute positioned
- // within a wrapper div off the -left and -top equal to size of our pieces
- el
- .clone()
- .appendTo( "body" )
- .wrap( "<div></div>" )
- .css({
- position: "absolute",
- visibility: "visible",
- left: -j * width,
- top: -i * height
- })
-
- // select the wrapper - make it overflow: hidden and absolute positioned based on
- // where the original was located +left and +top equal to the size of pieces
- .parent()
- .addClass( "ui-effects-explode" )
- .css({
- position: "absolute",
- overflow: "hidden",
- width: width,
- height: height,
- left: left + ( show ? mx * width : 0 ),
- top: top + ( show ? my * height : 0 ),
- opacity: show ? 0 : 1
- }).animate({
- left: left + ( show ? 0 : mx * width ),
- top: top + ( show ? 0 : my * height ),
- opacity: show ? 1 : 0
- }, o.duration || 500, o.easing, childComplete );
- }
- }
-
- function animComplete() {
- el.css({
- visibility: "visible"
- });
- $( pieces ).remove();
- if ( !show ) {
- el.hide();
- }
- done();
- }
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.fade = function( o, done ) {
- var el = $( this ),
- mode = $.effects.setMode( el, o.mode || "toggle" );
-
- el.animate({
- opacity: mode
- }, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: done
- });
-};
-
-})( jQuery );
-(function( $, undefined ) {
-
-$.effects.effect.fold = function( o, done ) {
-
- // Create element
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
- hide = mode === "hide",
- size = o.size || 15,
- percent = /([0-9]+)%/.exec( size ),
- horizFirst = !!o.horizFirst,
- widthFirst = show !== horizFirst,
- ref = widthFirst ? [ "width", "height" ] : [ "height", "width" ],
- duration = o.duration / 2,
- wrapper, distance,
- animation1 = {},
- animation2 = {};
-
- $.effects.save( el, props );
- el.show();
-
- // Create Wrapper
- wrapper = $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
- distance = widthFirst ?
- [ wrapper.width(), wrapper.height() ] :
- [ wrapper.height(), wrapper.width() ];
-
- if ( percent ) {
- size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];
- }
- if ( show ) {
- wrapper.css( horizFirst ? {
- height: 0,
- width: size
- } : {
- height: size,
- width: 0
- });
- }
-
- // Animation
- animation1[ ref[ 0 ] ] = show ? distance[ 0 ] : size;
- animation2[ ref[ 1 ] ] = show ? distance[ 1 ] : 0;
-
- // Animate
- wrapper
- .animate( animation1, duration, o.easing )
- .animate( animation2, duration, o.easing, function() {
- if ( hide ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- });
-
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.highlight = function( o, done ) {
- var elem = $( this ),
- props = [ "backgroundImage", "backgroundColor", "opacity" ],
- mode = $.effects.setMode( elem, o.mode || "show" ),
- animation = {
- backgroundColor: elem.css( "backgroundColor" )
- };
-
- if (mode === "hide") {
- animation.opacity = 0;
- }
-
- $.effects.save( elem, props );
-
- elem
- .show()
- .css({
- backgroundImage: "none",
- backgroundColor: o.color || "#ffff99"
- })
- .animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( mode === "hide" ) {
- elem.hide();
- }
- $.effects.restore( elem, props );
- done();
- }
- });
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.pulsate = function( o, done ) {
- var elem = $( this ),
- mode = $.effects.setMode( elem, o.mode || "show" ),
- show = mode === "show",
- hide = mode === "hide",
- showhide = ( show || mode === "hide" ),
-
- // showing or hiding leaves of the "last" animation
- anims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),
- duration = o.duration / anims,
- animateTo = 0,
- queue = elem.queue(),
- queuelen = queue.length,
- i;
-
- if ( show || !elem.is(":visible")) {
- elem.css( "opacity", 0 ).show();
- animateTo = 1;
- }
-
- // anims - 1 opacity "toggles"
- for ( i = 1; i < anims; i++ ) {
- elem.animate({
- opacity: animateTo
- }, duration, o.easing );
- animateTo = 1 - animateTo;
- }
-
- elem.animate({
- opacity: animateTo
- }, duration, o.easing);
-
- elem.queue(function() {
- if ( hide ) {
- elem.hide();
- }
- done();
- });
-
- // We just queued up "anims" animations, we need to put them next in the queue
- if ( queuelen > 1 ) {
- queue.splice.apply( queue,
- [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
- }
- elem.dequeue();
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.puff = function( o, done ) {
- var elem = $( this ),
- mode = $.effects.setMode( elem, o.mode || "hide" ),
- hide = mode === "hide",
- percent = parseInt( o.percent, 10 ) || 150,
- factor = percent / 100,
- original = {
- height: elem.height(),
- width: elem.width(),
- outerHeight: elem.outerHeight(),
- outerWidth: elem.outerWidth()
- };
-
- $.extend( o, {
- effect: "scale",
- queue: false,
- fade: true,
- mode: mode,
- complete: done,
- percent: hide ? percent : 100,
- from: hide ?
- original :
- {
- height: original.height * factor,
- width: original.width * factor,
- outerHeight: original.outerHeight * factor,
- outerWidth: original.outerWidth * factor
- }
- });
-
- elem.effect( o );
-};
-
-$.effects.effect.scale = function( o, done ) {
-
- // Create element
- var el = $( this ),
- options = $.extend( true, {}, o ),
- mode = $.effects.setMode( el, o.mode || "effect" ),
- percent = parseInt( o.percent, 10 ) ||
- ( parseInt( o.percent, 10 ) === 0 ? 0 : ( mode === "hide" ? 0 : 100 ) ),
- direction = o.direction || "both",
- origin = o.origin,
- original = {
- height: el.height(),
- width: el.width(),
- outerHeight: el.outerHeight(),
- outerWidth: el.outerWidth()
- },
- factor = {
- y: direction !== "horizontal" ? (percent / 100) : 1,
- x: direction !== "vertical" ? (percent / 100) : 1
- };
-
- // We are going to pass this effect to the size effect:
- options.effect = "size";
- options.queue = false;
- options.complete = done;
-
- // Set default origin and restore for show/hide
- if ( mode !== "effect" ) {
- options.origin = origin || ["middle","center"];
- options.restore = true;
- }
-
- options.from = o.from || ( mode === "show" ? {
- height: 0,
- width: 0,
- outerHeight: 0,
- outerWidth: 0
- } : original );
- options.to = {
- height: original.height * factor.y,
- width: original.width * factor.x,
- outerHeight: original.outerHeight * factor.y,
- outerWidth: original.outerWidth * factor.x
- };
-
- // Fade option to support puff
- if ( options.fade ) {
- if ( mode === "show" ) {
- options.from.opacity = 0;
- options.to.opacity = 1;
- }
- if ( mode === "hide" ) {
- options.from.opacity = 1;
- options.to.opacity = 0;
- }
- }
-
- // Animate
- el.effect( options );
-
-};
-
-$.effects.effect.size = function( o, done ) {
-
- // Create element
- var original, baseline, factor,
- el = $( this ),
- props0 = [ "position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity" ],
-
- // Always restore
- props1 = [ "position", "top", "bottom", "left", "right", "overflow", "opacity" ],
-
- // Copy for children
- props2 = [ "width", "height", "overflow" ],
- cProps = [ "fontSize" ],
- vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ],
- hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ],
-
- // Set options
- mode = $.effects.setMode( el, o.mode || "effect" ),
- restore = o.restore || mode !== "effect",
- scale = o.scale || "both",
- origin = o.origin || [ "middle", "center" ],
- position = el.css( "position" ),
- props = restore ? props0 : props1,
- zero = {
- height: 0,
- width: 0,
- outerHeight: 0,
- outerWidth: 0
- };
-
- if ( mode === "show" ) {
- el.show();
- }
- original = {
- height: el.height(),
- width: el.width(),
- outerHeight: el.outerHeight(),
- outerWidth: el.outerWidth()
- };
-
- if ( o.mode === "toggle" && mode === "show" ) {
- el.from = o.to || zero;
- el.to = o.from || original;
- } else {
- el.from = o.from || ( mode === "show" ? zero : original );
- el.to = o.to || ( mode === "hide" ? zero : original );
- }
-
- // Set scaling factor
- factor = {
- from: {
- y: el.from.height / original.height,
- x: el.from.width / original.width
- },
- to: {
- y: el.to.height / original.height,
- x: el.to.width / original.width
- }
- };
-
- // Scale the css box
- if ( scale === "box" || scale === "both" ) {
-
- // Vertical props scaling
- if ( factor.from.y !== factor.to.y ) {
- props = props.concat( vProps );
- el.from = $.effects.setTransition( el, vProps, factor.from.y, el.from );
- el.to = $.effects.setTransition( el, vProps, factor.to.y, el.to );
- }
-
- // Horizontal props scaling
- if ( factor.from.x !== factor.to.x ) {
- props = props.concat( hProps );
- el.from = $.effects.setTransition( el, hProps, factor.from.x, el.from );
- el.to = $.effects.setTransition( el, hProps, factor.to.x, el.to );
- }
- }
-
- // Scale the content
- if ( scale === "content" || scale === "both" ) {
-
- // Vertical props scaling
- if ( factor.from.y !== factor.to.y ) {
- props = props.concat( cProps ).concat( props2 );
- el.from = $.effects.setTransition( el, cProps, factor.from.y, el.from );
- el.to = $.effects.setTransition( el, cProps, factor.to.y, el.to );
- }
- }
-
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el );
- el.css( "overflow", "hidden" ).css( el.from );
-
- // Adjust
- if (origin) { // Calculate baseline shifts
- baseline = $.effects.getBaseline( origin, original );
- el.from.top = ( original.outerHeight - el.outerHeight() ) * baseline.y;
- el.from.left = ( original.outerWidth - el.outerWidth() ) * baseline.x;
- el.to.top = ( original.outerHeight - el.to.outerHeight ) * baseline.y;
- el.to.left = ( original.outerWidth - el.to.outerWidth ) * baseline.x;
- }
- el.css( el.from ); // set top & left
-
- // Animate
- if ( scale === "content" || scale === "both" ) { // Scale the children
-
- // Add margins/font-size
- vProps = vProps.concat([ "marginTop", "marginBottom" ]).concat(cProps);
- hProps = hProps.concat([ "marginLeft", "marginRight" ]);
- props2 = props0.concat(vProps).concat(hProps);
-
- el.find( "*[width]" ).each( function(){
- var child = $( this ),
- c_original = {
- height: child.height(),
- width: child.width(),
- outerHeight: child.outerHeight(),
- outerWidth: child.outerWidth()
- };
- if (restore) {
- $.effects.save(child, props2);
- }
-
- child.from = {
- height: c_original.height * factor.from.y,
- width: c_original.width * factor.from.x,
- outerHeight: c_original.outerHeight * factor.from.y,
- outerWidth: c_original.outerWidth * factor.from.x
- };
- child.to = {
- height: c_original.height * factor.to.y,
- width: c_original.width * factor.to.x,
- outerHeight: c_original.height * factor.to.y,
- outerWidth: c_original.width * factor.to.x
- };
-
- // Vertical props scaling
- if ( factor.from.y !== factor.to.y ) {
- child.from = $.effects.setTransition( child, vProps, factor.from.y, child.from );
- child.to = $.effects.setTransition( child, vProps, factor.to.y, child.to );
- }
-
- // Horizontal props scaling
- if ( factor.from.x !== factor.to.x ) {
- child.from = $.effects.setTransition( child, hProps, factor.from.x, child.from );
- child.to = $.effects.setTransition( child, hProps, factor.to.x, child.to );
- }
-
- // Animate children
- child.css( child.from );
- child.animate( child.to, o.duration, o.easing, function() {
-
- // Restore children
- if ( restore ) {
- $.effects.restore( child, props2 );
- }
- });
- });
- }
-
- // Animate
- el.animate( el.to, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( el.to.opacity === 0 ) {
- el.css( "opacity", el.from.opacity );
- }
- if( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- if ( !restore ) {
-
- // we need to calculate our new positioning based on the scaling
- if ( position === "static" ) {
- el.css({
- position: "relative",
- top: el.to.top,
- left: el.to.left
- });
- } else {
- $.each([ "top", "left" ], function( idx, pos ) {
- el.css( pos, function( _, str ) {
- var val = parseInt( str, 10 ),
- toRef = idx ? el.to.left : el.to.top;
-
- // if original was "auto", recalculate the new value from wrapper
- if ( str === "auto" ) {
- return toRef + "px";
- }
-
- return val + toRef + "px";
- });
- });
- }
- }
-
- $.effects.removeWrapper( el );
- done();
- }
- });
-
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.shake = function( o, done ) {
-
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "effect" ),
- direction = o.direction || "left",
- distance = o.distance || 20,
- times = o.times || 3,
- anims = times * 2 + 1,
- speed = Math.round(o.duration/anims),
- ref = (direction === "up" || direction === "down") ? "top" : "left",
- positiveMotion = (direction === "up" || direction === "left"),
- animation = {},
- animation1 = {},
- animation2 = {},
- i,
-
- // we will need to re-assemble the queue to stack our animations in place
- queue = el.queue(),
- queuelen = queue.length;
-
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el );
-
- // Animation
- animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance;
- animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2;
- animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2;
-
- // Animate
- el.animate( animation, speed, o.easing );
-
- // Shakes
- for ( i = 1; i < times; i++ ) {
- el.animate( animation1, speed, o.easing ).animate( animation2, speed, o.easing );
- }
- el
- .animate( animation1, speed, o.easing )
- .animate( animation, speed / 2, o.easing )
- .queue(function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- });
-
- // inject all the animations we just queued to be first in line (after "inprogress")
- if ( queuelen > 1) {
- queue.splice.apply( queue,
- [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
- }
- el.dequeue();
-
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.slide = function( o, done ) {
-
- // Create element
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "width", "height" ],
- mode = $.effects.setMode( el, o.mode || "show" ),
- show = mode === "show",
- direction = o.direction || "left",
- ref = (direction === "up" || direction === "down") ? "top" : "left",
- positiveMotion = (direction === "up" || direction === "left"),
- distance,
- animation = {};
-
- // Adjust
- $.effects.save( el, props );
- el.show();
- distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true );
-
- $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
-
- if ( show ) {
- el.css( ref, positiveMotion ? (isNaN(distance) ? "-" + distance : -distance) : distance );
- }
-
- // Animation
- animation[ ref ] = ( show ?
- ( positiveMotion ? "+=" : "-=") :
- ( positiveMotion ? "-=" : "+=")) +
- distance;
-
- // Animate
- el.animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.transfer = function( o, done ) {
- var elem = $( this ),
- target = $( o.to ),
- targetFixed = target.css( "position" ) === "fixed",
- body = $("body"),
- fixTop = targetFixed ? body.scrollTop() : 0,
- fixLeft = targetFixed ? body.scrollLeft() : 0,
- endPosition = target.offset(),
- animation = {
- top: endPosition.top - fixTop ,
- left: endPosition.left - fixLeft ,
- height: target.innerHeight(),
- width: target.innerWidth()
- },
- startPosition = elem.offset(),
- transfer = $( '<div class="ui-effects-transfer"></div>' )
- .appendTo( document.body )
- .addClass( o.className )
- .css({
- top: startPosition.top - fixTop ,
- left: startPosition.left - fixLeft ,
- height: elem.innerHeight(),
- width: elem.innerWidth(),
- position: targetFixed ? "fixed" : "absolute"
- })
- .animate( animation, o.duration, o.easing, function() {
- transfer.remove();
- done();
- });
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-var mouseHandled = false;
-
-$.widget( "ui.menu", {
- version: "1.9.2",
- defaultElement: "<ul>",
- delay: 300,
- options: {
- icons: {
- submenu: "ui-icon-carat-1-e"
- },
- menus: "ul",
- position: {
- my: "left top",
- at: "right top"
- },
- role: "menu",
-
- // callbacks
- blur: null,
- focus: null,
- select: null
- },
-
- _create: function() {
- this.activeMenu = this.element;
- this.element
- .uniqueId()
- .addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" )
- .toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length )
- .attr({
- role: this.options.role,
- tabIndex: 0
- })
- // need to catch all clicks on disabled menu
- // not possible through _on
- .bind( "click" + this.eventNamespace, $.proxy(function( event ) {
- if ( this.options.disabled ) {
- event.preventDefault();
- }
- }, this ));
-
- if ( this.options.disabled ) {
- this.element
- .addClass( "ui-state-disabled" )
- .attr( "aria-disabled", "true" );
- }
-
- this._on({
- // Prevent focus from sticking to links inside menu after clicking
- // them (focus should always stay on UL during navigation).
- "mousedown .ui-menu-item > a": function( event ) {
- event.preventDefault();
- },
- "click .ui-state-disabled > a": function( event ) {
- event.preventDefault();
- },
- "click .ui-menu-item:has(a)": function( event ) {
- var target = $( event.target ).closest( ".ui-menu-item" );
- if ( !mouseHandled && target.not( ".ui-state-disabled" ).length ) {
- mouseHandled = true;
-
- this.select( event );
- // Open submenu on click
- if ( target.has( ".ui-menu" ).length ) {
- this.expand( event );
- } else if ( !this.element.is( ":focus" ) ) {
- // Redirect focus to the menu
- this.element.trigger( "focus", [ true ] );
-
- // If the active item is on the top level, let it stay active.
- // Otherwise, blur the active item since it is no longer visible.
- if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) {
- clearTimeout( this.timer );
- }
- }
- }
- },
- "mouseenter .ui-menu-item": function( event ) {
- var target = $( event.currentTarget );
- // Remove ui-state-active class from siblings of the newly focused menu item
- // to avoid a jump caused by adjacent elements both having a class with a border
- target.siblings().children( ".ui-state-active" ).removeClass( "ui-state-active" );
- this.focus( event, target );
- },
- mouseleave: "collapseAll",
- "mouseleave .ui-menu": "collapseAll",
- focus: function( event, keepActiveItem ) {
- // If there's already an active item, keep it active
- // If not, activate the first item
- var item = this.active || this.element.children( ".ui-menu-item" ).eq( 0 );
-
- if ( !keepActiveItem ) {
- this.focus( event, item );
- }
- },
- blur: function( event ) {
- this._delay(function() {
- if ( !$.contains( this.element[0], this.document[0].activeElement ) ) {
- this.collapseAll( event );
- }
- });
- },
- keydown: "_keydown"
- });
-
- this.refresh();
-
- // Clicks outside of a menu collapse any open menus
- this._on( this.document, {
- click: function( event ) {
- if ( !$( event.target ).closest( ".ui-menu" ).length ) {
- this.collapseAll( event );
- }
-
- // Reset the mouseHandled flag
- mouseHandled = false;
- }
- });
- },
-
- _destroy: function() {
- // Destroy (sub)menus
- this.element
- .removeAttr( "aria-activedescendant" )
- .find( ".ui-menu" ).andSelf()
- .removeClass( "ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons" )
- .removeAttr( "role" )
- .removeAttr( "tabIndex" )
- .removeAttr( "aria-labelledby" )
- .removeAttr( "aria-expanded" )
- .removeAttr( "aria-hidden" )
- .removeAttr( "aria-disabled" )
- .removeUniqueId()
- .show();
-
- // Destroy menu items
- this.element.find( ".ui-menu-item" )
- .removeClass( "ui-menu-item" )
- .removeAttr( "role" )
- .removeAttr( "aria-disabled" )
- .children( "a" )
- .removeUniqueId()
- .removeClass( "ui-corner-all ui-state-hover" )
- .removeAttr( "tabIndex" )
- .removeAttr( "role" )
- .removeAttr( "aria-haspopup" )
- .children().each( function() {
- var elem = $( this );
- if ( elem.data( "ui-menu-submenu-carat" ) ) {
- elem.remove();
- }
- });
-
- // Destroy menu dividers
- this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" );
- },
-
- _keydown: function( event ) {
- var match, prev, character, skip, regex,
- preventDefault = true;
-
- function escape( value ) {
- return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
- }
-
- switch ( event.keyCode ) {
- case $.ui.keyCode.PAGE_UP:
- this.previousPage( event );
- break;
- case $.ui.keyCode.PAGE_DOWN:
- this.nextPage( event );
- break;
- case $.ui.keyCode.HOME:
- this._move( "first", "first", event );
- break;
- case $.ui.keyCode.END:
- this._move( "last", "last", event );
- break;
- case $.ui.keyCode.UP:
- this.previous( event );
- break;
- case $.ui.keyCode.DOWN:
- this.next( event );
- break;
- case $.ui.keyCode.LEFT:
- this.collapse( event );
- break;
- case $.ui.keyCode.RIGHT:
- if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
- this.expand( event );
- }
- break;
- case $.ui.keyCode.ENTER:
- case $.ui.keyCode.SPACE:
- this._activate( event );
- break;
- case $.ui.keyCode.ESCAPE:
- this.collapse( event );
- break;
- default:
- preventDefault = false;
- prev = this.previousFilter || "";
- character = String.fromCharCode( event.keyCode );
- skip = false;
-
- clearTimeout( this.filterTimer );
-
- if ( character === prev ) {
- skip = true;
- } else {
- character = prev + character;
- }
-
- regex = new RegExp( "^" + escape( character ), "i" );
- match = this.activeMenu.children( ".ui-menu-item" ).filter(function() {
- return regex.test( $( this ).children( "a" ).text() );
- });
- match = skip && match.index( this.active.next() ) !== -1 ?
- this.active.nextAll( ".ui-menu-item" ) :
- match;
-
- // If no matches on the current filter, reset to the last character pressed
- // to move down the menu to the first item that starts with that character
- if ( !match.length ) {
- character = String.fromCharCode( event.keyCode );
- regex = new RegExp( "^" + escape( character ), "i" );
- match = this.activeMenu.children( ".ui-menu-item" ).filter(function() {
- return regex.test( $( this ).children( "a" ).text() );
- });
- }
-
- if ( match.length ) {
- this.focus( event, match );
- if ( match.length > 1 ) {
- this.previousFilter = character;
- this.filterTimer = this._delay(function() {
- delete this.previousFilter;
- }, 1000 );
- } else {
- delete this.previousFilter;
- }
- } else {
- delete this.previousFilter;
- }
- }
-
- if ( preventDefault ) {
- event.preventDefault();
- }
- },
-
- _activate: function( event ) {
- if ( !this.active.is( ".ui-state-disabled" ) ) {
- if ( this.active.children( "a[aria-haspopup='true']" ).length ) {
- this.expand( event );
- } else {
- this.select( event );
- }
- }
- },
-
- refresh: function() {
- var menus,
- icon = this.options.icons.submenu,
- submenus = this.element.find( this.options.menus );
-
- // Initialize nested menus
- submenus.filter( ":not(.ui-menu)" )
- .addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" )
- .hide()
- .attr({
- role: this.options.role,
- "aria-hidden": "true",
- "aria-expanded": "false"
- })
- .each(function() {
- var menu = $( this ),
- item = menu.prev( "a" ),
- submenuCarat = $( "<span>" )
- .addClass( "ui-menu-icon ui-icon " + icon )
- .data( "ui-menu-submenu-carat", true );
-
- item
- .attr( "aria-haspopup", "true" )
- .prepend( submenuCarat );
- menu.attr( "aria-labelledby", item.attr( "id" ) );
- });
-
- menus = submenus.add( this.element );
-
- // Don't refresh list items that are already adapted
- menus.children( ":not(.ui-menu-item):has(a)" )
- .addClass( "ui-menu-item" )
- .attr( "role", "presentation" )
- .children( "a" )
- .uniqueId()
- .addClass( "ui-corner-all" )
- .attr({
- tabIndex: -1,
- role: this._itemRole()
- });
-
- // Initialize unlinked menu-items containing spaces and/or dashes only as dividers
- menus.children( ":not(.ui-menu-item)" ).each(function() {
- var item = $( this );
- // hyphen, em dash, en dash
- if ( !/[^\-—–\s]/.test( item.text() ) ) {
- item.addClass( "ui-widget-content ui-menu-divider" );
- }
- });
-
- // Add aria-disabled attribute to any disabled menu item
- menus.children( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
-
- // If the active item has been removed, blur the menu
- if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
- this.blur();
- }
- },
-
- _itemRole: function() {
- return {
- menu: "menuitem",
- listbox: "option"
- }[ this.options.role ];
- },
-
- focus: function( event, item ) {
- var nested, focused;
- this.blur( event, event && event.type === "focus" );
-
- this._scrollIntoView( item );
-
- this.active = item.first();
- focused = this.active.children( "a" ).addClass( "ui-state-focus" );
- // Only update aria-activedescendant if there's a role
- // otherwise we assume focus is managed elsewhere
- if ( this.options.role ) {
- this.element.attr( "aria-activedescendant", focused.attr( "id" ) );
- }
-
- // Highlight active parent menu item, if any
- this.active
- .parent()
- .closest( ".ui-menu-item" )
- .children( "a:first" )
- .addClass( "ui-state-active" );
-
- if ( event && event.type === "keydown" ) {
- this._close();
- } else {
- this.timer = this._delay(function() {
- this._close();
- }, this.delay );
- }
-
- nested = item.children( ".ui-menu" );
- if ( nested.length && ( /^mouse/.test( event.type ) ) ) {
- this._startOpening(nested);
- }
- this.activeMenu = item.parent();
-
- this._trigger( "focus", event, { item: item } );
- },
-
- _scrollIntoView: function( item ) {
- var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
- if ( this._hasScroll() ) {
- borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0;
- paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0;
- offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
- scroll = this.activeMenu.scrollTop();
- elementHeight = this.activeMenu.height();
- itemHeight = item.height();
-
- if ( offset < 0 ) {
- this.activeMenu.scrollTop( scroll + offset );
- } else if ( offset + itemHeight > elementHeight ) {
- this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );
- }
- }
- },
-
- blur: function( event, fromFocus ) {
- if ( !fromFocus ) {
- clearTimeout( this.timer );
- }
-
- if ( !this.active ) {
- return;
- }
-
- this.active.children( "a" ).removeClass( "ui-state-focus" );
- this.active = null;
-
- this._trigger( "blur", event, { item: this.active } );
- },
-
- _startOpening: function( submenu ) {
- clearTimeout( this.timer );
-
- // Don't open if already open fixes a Firefox bug that caused a .5 pixel
- // shift in the submenu position when mousing over the carat icon
- if ( submenu.attr( "aria-hidden" ) !== "true" ) {
- return;
- }
-
- this.timer = this._delay(function() {
- this._close();
- this._open( submenu );
- }, this.delay );
- },
-
- _open: function( submenu ) {
- var position = $.extend({
- of: this.active
- }, this.options.position );
-
- clearTimeout( this.timer );
- this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
- .hide()
- .attr( "aria-hidden", "true" );
-
- submenu
- .show()
- .removeAttr( "aria-hidden" )
- .attr( "aria-expanded", "true" )
- .position( position );
- },
-
- collapseAll: function( event, all ) {
- clearTimeout( this.timer );
- this.timer = this._delay(function() {
- // If we were passed an event, look for the submenu that contains the event
- var currentMenu = all ? this.element :
- $( event && event.target ).closest( this.element.find( ".ui-menu" ) );
-
- // If we found no valid submenu ancestor, use the main menu to close all sub menus anyway
- if ( !currentMenu.length ) {
- currentMenu = this.element;
- }
-
- this._close( currentMenu );
-
- this.blur( event );
- this.activeMenu = currentMenu;
- }, this.delay );
- },
-
- // With no arguments, closes the currently active menu - if nothing is active
- // it closes all menus. If passed an argument, it will search for menus BELOW
- _close: function( startMenu ) {
- if ( !startMenu ) {
- startMenu = this.active ? this.active.parent() : this.element;
- }
-
- startMenu
- .find( ".ui-menu" )
- .hide()
- .attr( "aria-hidden", "true" )
- .attr( "aria-expanded", "false" )
- .end()
- .find( "a.ui-state-active" )
- .removeClass( "ui-state-active" );
- },
-
- collapse: function( event ) {
- var newItem = this.active &&
- this.active.parent().closest( ".ui-menu-item", this.element );
- if ( newItem && newItem.length ) {
- this._close();
- this.focus( event, newItem );
- }
- },
-
- expand: function( event ) {
- var newItem = this.active &&
- this.active
- .children( ".ui-menu " )
- .children( ".ui-menu-item" )
- .first();
-
- if ( newItem && newItem.length ) {
- this._open( newItem.parent() );
-
- // Delay so Firefox will not hide activedescendant change in expanding submenu from AT
- this._delay(function() {
- this.focus( event, newItem );
- });
- }
- },
-
- next: function( event ) {
- this._move( "next", "first", event );
- },
-
- previous: function( event ) {
- this._move( "prev", "last", event );
- },
-
- isFirstItem: function() {
- return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
- },
-
- isLastItem: function() {
- return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
- },
-
- _move: function( direction, filter, event ) {
- var next;
- if ( this.active ) {
- if ( direction === "first" || direction === "last" ) {
- next = this.active
- [ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
- .eq( -1 );
- } else {
- next = this.active
- [ direction + "All" ]( ".ui-menu-item" )
- .eq( 0 );
- }
- }
- if ( !next || !next.length || !this.active ) {
- next = this.activeMenu.children( ".ui-menu-item" )[ filter ]();
- }
-
- this.focus( event, next );
- },
-
- nextPage: function( event ) {
- var item, base, height;
-
- if ( !this.active ) {
- this.next( event );
- return;
- }
- if ( this.isLastItem() ) {
- return;
- }
- if ( this._hasScroll() ) {
- base = this.active.offset().top;
- height = this.element.height();
- this.active.nextAll( ".ui-menu-item" ).each(function() {
- item = $( this );
- return item.offset().top - base - height < 0;
- });
-
- this.focus( event, item );
- } else {
- this.focus( event, this.activeMenu.children( ".ui-menu-item" )
- [ !this.active ? "first" : "last" ]() );
- }
- },
-
- previousPage: function( event ) {
- var item, base, height;
- if ( !this.active ) {
- this.next( event );
- return;
- }
- if ( this.isFirstItem() ) {
- return;
- }
- if ( this._hasScroll() ) {
- base = this.active.offset().top;
- height = this.element.height();
- this.active.prevAll( ".ui-menu-item" ).each(function() {
- item = $( this );
- return item.offset().top - base + height > 0;
- });
-
- this.focus( event, item );
- } else {
- this.focus( event, this.activeMenu.children( ".ui-menu-item" ).first() );
- }
- },
-
- _hasScroll: function() {
- return this.element.outerHeight() < this.element.prop( "scrollHeight" );
- },
-
- select: function( event ) {
- // TODO: It should never be possible to not have an active item at this
- // point, but the tests don't trigger mouseenter before click.
- this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
- var ui = { item: this.active };
- if ( !this.active.has( ".ui-menu" ).length ) {
- this.collapseAll( event, true );
- }
- this._trigger( "select", event, ui );
- }
-});
-
-}( jQuery ));
-(function( $, undefined ) {
-
-$.widget( "ui.progressbar", {
- version: "1.9.2",
- options: {
- value: 0,
- max: 100
- },
-
- min: 0,
-
- _create: function() {
- this.element
- .addClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
- .attr({
- role: "progressbar",
- "aria-valuemin": this.min,
- "aria-valuemax": this.options.max,
- "aria-valuenow": this._value()
- });
-
- this.valueDiv = $( "<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>" )
- .appendTo( this.element );
-
- this.oldValue = this._value();
- this._refreshValue();
- },
-
- _destroy: function() {
- this.element
- .removeClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
- .removeAttr( "role" )
- .removeAttr( "aria-valuemin" )
- .removeAttr( "aria-valuemax" )
- .removeAttr( "aria-valuenow" );
-
- this.valueDiv.remove();
- },
-
- value: function( newValue ) {
- if ( newValue === undefined ) {
- return this._value();
- }
-
- this._setOption( "value", newValue );
- return this;
- },
-
- _setOption: function( key, value ) {
- if ( key === "value" ) {
- this.options.value = value;
- this._refreshValue();
- if ( this._value() === this.options.max ) {
- this._trigger( "complete" );
- }
- }
-
- this._super( key, value );
- },
-
- _value: function() {
- var val = this.options.value;
- // normalize invalid value
- if ( typeof val !== "number" ) {
- val = 0;
- }
- return Math.min( this.options.max, Math.max( this.min, val ) );
- },
-
- _percentage: function() {
- return 100 * this._value() / this.options.max;
- },
-
- _refreshValue: function() {
- var value = this.value(),
- percentage = this._percentage();
-
- if ( this.oldValue !== value ) {
- this.oldValue = value;
- this._trigger( "change" );
- }
-
- this.valueDiv
- .toggle( value > this.min )
- .toggleClass( "ui-corner-right", value === this.options.max )
- .width( percentage.toFixed(0) + "%" );
- this.element.attr( "aria-valuenow", value );
- }
-});
-
-})( jQuery );
-(function( $, undefined ) {
-
-$.widget("ui.resizable", $.ui.mouse, {
- version: "1.9.2",
- widgetEventPrefix: "resize",
- options: {
- alsoResize: false,
- animate: false,
- animateDuration: "slow",
- animateEasing: "swing",
- aspectRatio: false,
- autoHide: false,
- containment: false,
- ghost: false,
- grid: false,
- handles: "e,s,se",
- helper: false,
- maxHeight: null,
- maxWidth: null,
- minHeight: 10,
- minWidth: 10,
- zIndex: 1000
- },
- _create: function() {
-
- var that = this, o = this.options;
- this.element.addClass("ui-resizable");
-
- $.extend(this, {
- _aspectRatio: !!(o.aspectRatio),
- aspectRatio: o.aspectRatio,
- originalElement: this.element,
- _proportionallyResizeElements: [],
- _helper: o.helper || o.ghost || o.animate ? o.helper || 'ui-resizable-helper' : null
- });
-
- //Wrap the element if it cannot hold child nodes
- if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
-
- //Create a wrapper element and set the wrapper to the new current internal element
- this.element.wrap(
- $('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({
- position: this.element.css('position'),
- width: this.element.outerWidth(),
- height: this.element.outerHeight(),
- top: this.element.css('top'),
- left: this.element.css('left')
- })
- );
-
- //Overwrite the original this.element
- this.element = this.element.parent().data(
- "resizable", this.element.data('resizable')
- );
-
- this.elementIsWrapper = true;
-
- //Move margins to the wrapper
- this.element.css({ marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom") });
- this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0});
-
- //Prevent Safari textarea resize
- this.originalResizeStyle = this.originalElement.css('resize');
- this.originalElement.css('resize', 'none');
-
- //Push the actual element to our proportionallyResize internal array
- this._proportionallyResizeElements.push(this.originalElement.css({ position: 'static', zoom: 1, display: 'block' }));
-
- // avoid IE jump (hard set the margin)
- this.originalElement.css({ margin: this.originalElement.css('margin') });
-
- // fix handlers offset
- this._proportionallyResize();
-
- }
-
- this.handles = o.handles || (!$('.ui-resizable-handle', this.element).length ? "e,s,se" : { n: '.ui-resizable-n', e: '.ui-resizable-e', s: '.ui-resizable-s', w: '.ui-resizable-w', se: '.ui-resizable-se', sw: '.ui-resizable-sw', ne: '.ui-resizable-ne', nw: '.ui-resizable-nw' });
- if(this.handles.constructor == String) {
-
- if(this.handles == 'all') this.handles = 'n,e,s,w,se,sw,ne,nw';
- var n = this.handles.split(","); this.handles = {};
-
- for(var i = 0; i < n.length; i++) {
-
- var handle = $.trim(n[i]), hname = 'ui-resizable-'+handle;
- var axis = $('<div class="ui-resizable-handle ' + hname + '"></div>');
-
- // Apply zIndex to all handles - see #7960
- axis.css({ zIndex: o.zIndex });
-
- //TODO : What's going on here?
- if ('se' == handle) {
- axis.addClass('ui-icon ui-icon-gripsmall-diagonal-se');
- };
-
- //Insert into internal handles object and append to element
- this.handles[handle] = '.ui-resizable-'+handle;
- this.element.append(axis);
- }
-
- }
-
- this._renderAxis = function(target) {
-
- target = target || this.element;
-
- for(var i in this.handles) {
-
- if(this.handles[i].constructor == String)
- this.handles[i] = $(this.handles[i], this.element).show();
-
- //Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls)
- if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
-
- var axis = $(this.handles[i], this.element), padWrapper = 0;
-
- //Checking the correct pad and border
- padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();
-
- //The padding type i have to apply...
- var padPos = [ 'padding',
- /ne|nw|n/.test(i) ? 'Top' :
- /se|sw|s/.test(i) ? 'Bottom' :
- /^e$/.test(i) ? 'Right' : 'Left' ].join("");
-
- target.css(padPos, padWrapper);
-
- this._proportionallyResize();
-
- }
-
- //TODO: What's that good for? There's not anything to be executed left
- if(!$(this.handles[i]).length)
- continue;
-
- }
- };
-
- //TODO: make renderAxis a prototype function
- this._renderAxis(this.element);
-
- this._handles = $('.ui-resizable-handle', this.element)
- .disableSelection();
-
- //Matching axis name
- this._handles.mouseover(function() {
- if (!that.resizing) {
- if (this.className)
- var axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
- //Axis, default = se
- that.axis = axis && axis[1] ? axis[1] : 'se';
- }
- });
-
- //If we want to auto hide the elements
- if (o.autoHide) {
- this._handles.hide();
- $(this.element)
- .addClass("ui-resizable-autohide")
- .mouseenter(function() {
- if (o.disabled) return;
- $(this).removeClass("ui-resizable-autohide");
- that._handles.show();
- })
- .mouseleave(function(){
- if (o.disabled) return;
- if (!that.resizing) {
- $(this).addClass("ui-resizable-autohide");
- that._handles.hide();
- }
- });
- }
-
- //Initialize the mouse interaction
- this._mouseInit();
-
- },
-
- _destroy: function() {
-
- this._mouseDestroy();
-
- var _destroy = function(exp) {
- $(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing")
- .removeData("resizable").removeData("ui-resizable").unbind(".resizable").find('.ui-resizable-handle').remove();
- };
-
- //TODO: Unwrap at same DOM position
- if (this.elementIsWrapper) {
- _destroy(this.element);
- var wrapper = this.element;
- this.originalElement.css({
- position: wrapper.css('position'),
- width: wrapper.outerWidth(),
- height: wrapper.outerHeight(),
- top: wrapper.css('top'),
- left: wrapper.css('left')
- }).insertAfter( wrapper );
- wrapper.remove();
- }
-
- this.originalElement.css('resize', this.originalResizeStyle);
- _destroy(this.originalElement);
-
- return this;
- },
-
- _mouseCapture: function(event) {
- var handle = false;
- for (var i in this.handles) {
- if ($(this.handles[i])[0] == event.target) {
- handle = true;
- }
- }
-
- return !this.options.disabled && handle;
- },
-
- _mouseStart: function(event) {
-
- var o = this.options, iniPos = this.element.position(), el = this.element;
-
- this.resizing = true;
- this.documentScroll = { top: $(document).scrollTop(), left: $(document).scrollLeft() };
-
- // bugfix for http://dev.jquery.com/ticket/1749
- if (el.is('.ui-draggable') || (/absolute/).test(el.css('position'))) {
- el.css({ position: 'absolute', top: iniPos.top, left: iniPos.left });
- }
-
- this._renderProxy();
-
- var curleft = num(this.helper.css('left')), curtop = num(this.helper.css('top'));
-
- if (o.containment) {
- curleft += $(o.containment).scrollLeft() || 0;
- curtop += $(o.containment).scrollTop() || 0;
- }
-
- //Store needed variables
- this.offset = this.helper.offset();
- this.position = { left: curleft, top: curtop };
- this.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
- this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
- this.originalPosition = { left: curleft, top: curtop };
- this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() };
- this.originalMousePosition = { left: event.pageX, top: event.pageY };
-
- //Aspect Ratio
- this.aspectRatio = (typeof o.aspectRatio == 'number') ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1);
-
- var cursor = $('.ui-resizable-' + this.axis).css('cursor');
- $('body').css('cursor', cursor == 'auto' ? this.axis + '-resize' : cursor);
-
- el.addClass("ui-resizable-resizing");
- this._propagate("start", event);
- return true;
- },
-
- _mouseDrag: function(event) {
-
- //Increase performance, avoid regex
- var el = this.helper, o = this.options, props = {},
- that = this, smp = this.originalMousePosition, a = this.axis;
-
- var dx = (event.pageX-smp.left)||0, dy = (event.pageY-smp.top)||0;
- var trigger = this._change[a];
- if (!trigger) return false;
-
- // Calculate the attrs that will be change
- var data = trigger.apply(this, [event, dx, dy]);
-
- // Put this in the mouseDrag handler since the user can start pressing shift while resizing
- this._updateVirtualBoundaries(event.shiftKey);
- if (this._aspectRatio || event.shiftKey)
- data = this._updateRatio(data, event);
-
- data = this._respectSize(data, event);
-
- // plugins callbacks need to be called first
- this._propagate("resize", event);
-
- el.css({
- top: this.position.top + "px", left: this.position.left + "px",
- width: this.size.width + "px", height: this.size.height + "px"
- });
-
- if (!this._helper && this._proportionallyResizeElements.length)
- this._proportionallyResize();
-
- this._updateCache(data);
-
- // calling the user callback at the end
- this._trigger('resize', event, this.ui());
-
- return false;
- },
-
- _mouseStop: function(event) {
-
- this.resizing = false;
- var o = this.options, that = this;
-
- if(this._helper) {
- var pr = this._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
- soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : that.sizeDiff.height,
- soffsetw = ista ? 0 : that.sizeDiff.width;
-
- var s = { width: (that.helper.width() - soffsetw), height: (that.helper.height() - soffseth) },
- left = (parseInt(that.element.css('left'), 10) + (that.position.left - that.originalPosition.left)) || null,
- top = (parseInt(that.element.css('top'), 10) + (that.position.top - that.originalPosition.top)) || null;
-
- if (!o.animate)
- this.element.css($.extend(s, { top: top, left: left }));
-
- that.helper.height(that.size.height);
- that.helper.width(that.size.width);
-
- if (this._helper && !o.animate) this._proportionallyResize();
- }
-
- $('body').css('cursor', 'auto');
-
- this.element.removeClass("ui-resizable-resizing");
-
- this._propagate("stop", event);
-
- if (this._helper) this.helper.remove();
- return false;
-
- },
-
- _updateVirtualBoundaries: function(forceAspectRatio) {
- var o = this.options, pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b;
-
- b = {
- minWidth: isNumber(o.minWidth) ? o.minWidth : 0,
- maxWidth: isNumber(o.maxWidth) ? o.maxWidth : Infinity,
- minHeight: isNumber(o.minHeight) ? o.minHeight : 0,
- maxHeight: isNumber(o.maxHeight) ? o.maxHeight : Infinity
- };
-
- if(this._aspectRatio || forceAspectRatio) {
- // We want to create an enclosing box whose aspect ration is the requested one
- // First, compute the "projected" size for each dimension based on the aspect ratio and other dimension
- pMinWidth = b.minHeight * this.aspectRatio;
- pMinHeight = b.minWidth / this.aspectRatio;
- pMaxWidth = b.maxHeight * this.aspectRatio;
- pMaxHeight = b.maxWidth / this.aspectRatio;
-
- if(pMinWidth > b.minWidth) b.minWidth = pMinWidth;
- if(pMinHeight > b.minHeight) b.minHeight = pMinHeight;
- if(pMaxWidth < b.maxWidth) b.maxWidth = pMaxWidth;
- if(pMaxHeight < b.maxHeight) b.maxHeight = pMaxHeight;
- }
- this._vBoundaries = b;
- },
-
- _updateCache: function(data) {
- var o = this.options;
- this.offset = this.helper.offset();
- if (isNumber(data.left)) this.position.left = data.left;
- if (isNumber(data.top)) this.position.top = data.top;
- if (isNumber(data.height)) this.size.height = data.height;
- if (isNumber(data.width)) this.size.width = data.width;
- },
-
- _updateRatio: function(data, event) {
-
- var o = this.options, cpos = this.position, csize = this.size, a = this.axis;
-
- if (isNumber(data.height)) data.width = (data.height * this.aspectRatio);
- else if (isNumber(data.width)) data.height = (data.width / this.aspectRatio);
-
- if (a == 'sw') {
- data.left = cpos.left + (csize.width - data.width);
- data.top = null;
- }
- if (a == 'nw') {
- data.top = cpos.top + (csize.height - data.height);
- data.left = cpos.left + (csize.width - data.width);
- }
-
- return data;
- },
-
- _respectSize: function(data, event) {
-
- var el = this.helper, o = this._vBoundaries, pRatio = this._aspectRatio || event.shiftKey, a = this.axis,
- ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),
- isminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height);
-
- if (isminw) data.width = o.minWidth;
- if (isminh) data.height = o.minHeight;
- if (ismaxw) data.width = o.maxWidth;
- if (ismaxh) data.height = o.maxHeight;
-
- var dw = this.originalPosition.left + this.originalSize.width, dh = this.position.top + this.size.height;
- var cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);
-
- if (isminw && cw) data.left = dw - o.minWidth;
- if (ismaxw && cw) data.left = dw - o.maxWidth;
- if (isminh && ch) data.top = dh - o.minHeight;
- if (ismaxh && ch) data.top = dh - o.maxHeight;
-
- // fixing jump error on top/left - bug #2330
- var isNotwh = !data.width && !data.height;
- if (isNotwh && !data.left && data.top) data.top = null;
- else if (isNotwh && !data.top && data.left) data.left = null;
-
- return data;
- },
-
- _proportionallyResize: function() {
-
- var o = this.options;
- if (!this._proportionallyResizeElements.length) return;
- var element = this.helper || this.element;
-
- for (var i=0; i < this._proportionallyResizeElements.length; i++) {
-
- var prel = this._proportionallyResizeElements[i];
-
- if (!this.borderDif) {
- var b = [prel.css('borderTopWidth'), prel.css('borderRightWidth'), prel.css('borderBottomWidth'), prel.css('borderLeftWidth')],
- p = [prel.css('paddingTop'), prel.css('paddingRight'), prel.css('paddingBottom'), prel.css('paddingLeft')];
-
- this.borderDif = $.map(b, function(v, i) {
- var border = parseInt(v,10)||0, padding = parseInt(p[i],10)||0;
- return border + padding;
- });
- }
-
- prel.css({
- height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0,
- width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0
- });
-
- };
-
- },
-
- _renderProxy: function() {
-
- var el = this.element, o = this.options;
- this.elementOffset = el.offset();
-
- if(this._helper) {
-
- this.helper = this.helper || $('<div style="overflow:hidden;"></div>');
-
- // fix ie6 offset TODO: This seems broken
- var ie6offset = ($.ui.ie6 ? 1 : 0),
- pxyoffset = ( $.ui.ie6 ? 2 : -1 );
-
- this.helper.addClass(this._helper).css({
- width: this.element.outerWidth() + pxyoffset,
- height: this.element.outerHeight() + pxyoffset,
- position: 'absolute',
- left: this.elementOffset.left - ie6offset +'px',
- top: this.elementOffset.top - ie6offset +'px',
- zIndex: ++o.zIndex //TODO: Don't modify option
- });
-
- this.helper
- .appendTo("body")
- .disableSelection();
-
- } else {
- this.helper = this.element;
- }
-
- },
-
- _change: {
- e: function(event, dx, dy) {
- return { width: this.originalSize.width + dx };
- },
- w: function(event, dx, dy) {
- var o = this.options, cs = this.originalSize, sp = this.originalPosition;
- return { left: sp.left + dx, width: cs.width - dx };
- },
- n: function(event, dx, dy) {
- var o = this.options, cs = this.originalSize, sp = this.originalPosition;
- return { top: sp.top + dy, height: cs.height - dy };
- },
- s: function(event, dx, dy) {
- return { height: this.originalSize.height + dy };
- },
- se: function(event, dx, dy) {
- return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
- },
- sw: function(event, dx, dy) {
- return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
- },
- ne: function(event, dx, dy) {
- return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
- },
- nw: function(event, dx, dy) {
- return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
- }
- },
-
- _propagate: function(n, event) {
- $.ui.plugin.call(this, n, [event, this.ui()]);
- (n != "resize" && this._trigger(n, event, this.ui()));
- },
-
- plugins: {},
-
- ui: function() {
- return {
- originalElement: this.originalElement,
- element: this.element,
- helper: this.helper,
- position: this.position,
- size: this.size,
- originalSize: this.originalSize,
- originalPosition: this.originalPosition
- };
- }
-
-});
-
-/*
- * Resizable Extensions
- */
-
-$.ui.plugin.add("resizable", "alsoResize", {
-
- start: function (event, ui) {
- var that = $(this).data("resizable"), o = that.options;
-
- var _store = function (exp) {
- $(exp).each(function() {
- var el = $(this);
- el.data("resizable-alsoresize", {
- width: parseInt(el.width(), 10), height: parseInt(el.height(), 10),
- left: parseInt(el.css('left'), 10), top: parseInt(el.css('top'), 10)
- });
- });
- };
-
- if (typeof(o.alsoResize) == 'object' && !o.alsoResize.parentNode) {
- if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); }
- else { $.each(o.alsoResize, function (exp) { _store(exp); }); }
- }else{
- _store(o.alsoResize);
- }
- },
-
- resize: function (event, ui) {
- var that = $(this).data("resizable"), o = that.options, os = that.originalSize, op = that.originalPosition;
-
- var delta = {
- height: (that.size.height - os.height) || 0, width: (that.size.width - os.width) || 0,
- top: (that.position.top - op.top) || 0, left: (that.position.left - op.left) || 0
- },
-
- _alsoResize = function (exp, c) {
- $(exp).each(function() {
- var el = $(this), start = $(this).data("resizable-alsoresize"), style = {},
- css = c && c.length ? c : el.parents(ui.originalElement[0]).length ? ['width', 'height'] : ['width', 'height', 'top', 'left'];
-
- $.each(css, function (i, prop) {
- var sum = (start[prop]||0) + (delta[prop]||0);
- if (sum && sum >= 0)
- style[prop] = sum || null;
- });
-
- el.css(style);
- });
- };
-
- if (typeof(o.alsoResize) == 'object' && !o.alsoResize.nodeType) {
- $.each(o.alsoResize, function (exp, c) { _alsoResize(exp, c); });
- }else{
- _alsoResize(o.alsoResize);
- }
- },
-
- stop: function (event, ui) {
- $(this).removeData("resizable-alsoresize");
- }
-});
-
-$.ui.plugin.add("resizable", "animate", {
-
- stop: function(event, ui) {
- var that = $(this).data("resizable"), o = that.options;
-
- var pr = that._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
- soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : that.sizeDiff.height,
- soffsetw = ista ? 0 : that.sizeDiff.width;
-
- var style = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) },
- left = (parseInt(that.element.css('left'), 10) + (that.position.left - that.originalPosition.left)) || null,
- top = (parseInt(that.element.css('top'), 10) + (that.position.top - that.originalPosition.top)) || null;
-
- that.element.animate(
- $.extend(style, top && left ? { top: top, left: left } : {}), {
- duration: o.animateDuration,
- easing: o.animateEasing,
- step: function() {
-
- var data = {
- width: parseInt(that.element.css('width'), 10),
- height: parseInt(that.element.css('height'), 10),
- top: parseInt(that.element.css('top'), 10),
- left: parseInt(that.element.css('left'), 10)
- };
-
- if (pr && pr.length) $(pr[0]).css({ width: data.width, height: data.height });
-
- // propagating resize, and updating values for each animation step
- that._updateCache(data);
- that._propagate("resize", event);
-
- }
- }
- );
- }
-
-});
-
-$.ui.plugin.add("resizable", "containment", {
-
- start: function(event, ui) {
- var that = $(this).data("resizable"), o = that.options, el = that.element;
- var oc = o.containment, ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;
- if (!ce) return;
-
- that.containerElement = $(ce);
-
- if (/document/.test(oc) || oc == document) {
- that.containerOffset = { left: 0, top: 0 };
- that.containerPosition = { left: 0, top: 0 };
-
- that.parentData = {
- element: $(document), left: 0, top: 0,
- width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight
- };
- }
-
- // i'm a node, so compute top, left, right, bottom
- else {
- var element = $(ce), p = [];
- $([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); });
-
- that.containerOffset = element.offset();
- that.containerPosition = element.position();
- that.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) };
-
- var co = that.containerOffset, ch = that.containerSize.height, cw = that.containerSize.width,
- width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw ), height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);
-
- that.parentData = {
- element: ce, left: co.left, top: co.top, width: width, height: height
- };
- }
- },
-
- resize: function(event, ui) {
- var that = $(this).data("resizable"), o = that.options,
- ps = that.containerSize, co = that.containerOffset, cs = that.size, cp = that.position,
- pRatio = that._aspectRatio || event.shiftKey, cop = { top:0, left:0 }, ce = that.containerElement;
-
- if (ce[0] != document && (/static/).test(ce.css('position'))) cop = co;
-
- if (cp.left < (that._helper ? co.left : 0)) {
- that.size.width = that.size.width + (that._helper ? (that.position.left - co.left) : (that.position.left - cop.left));
- if (pRatio) that.size.height = that.size.width / that.aspectRatio;
- that.position.left = o.helper ? co.left : 0;
- }
-
- if (cp.top < (that._helper ? co.top : 0)) {
- that.size.height = that.size.height + (that._helper ? (that.position.top - co.top) : that.position.top);
- if (pRatio) that.size.width = that.size.height * that.aspectRatio;
- that.position.top = that._helper ? co.top : 0;
- }
-
- that.offset.left = that.parentData.left+that.position.left;
- that.offset.top = that.parentData.top+that.position.top;
-
- var woset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left - cop.left)) + that.sizeDiff.width ),
- hoset = Math.abs( (that._helper ? that.offset.top - cop.top : (that.offset.top - co.top)) + that.sizeDiff.height );
-
- var isParent = that.containerElement.get(0) == that.element.parent().get(0),
- isOffsetRelative = /relative|absolute/.test(that.containerElement.css('position'));
-
- if(isParent && isOffsetRelative) woset -= that.parentData.left;
-
- if (woset + that.size.width >= that.parentData.width) {
- that.size.width = that.parentData.width - woset;
- if (pRatio) that.size.height = that.size.width / that.aspectRatio;
- }
-
- if (hoset + that.size.height >= that.parentData.height) {
- that.size.height = that.parentData.height - hoset;
- if (pRatio) that.size.width = that.size.height * that.aspectRatio;
- }
- },
-
- stop: function(event, ui){
- var that = $(this).data("resizable"), o = that.options, cp = that.position,
- co = that.containerOffset, cop = that.containerPosition, ce = that.containerElement;
-
- var helper = $(that.helper), ho = helper.offset(), w = helper.outerWidth() - that.sizeDiff.width, h = helper.outerHeight() - that.sizeDiff.height;
-
- if (that._helper && !o.animate && (/relative/).test(ce.css('position')))
- $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
-
- if (that._helper && !o.animate && (/static/).test(ce.css('position')))
- $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
-
- }
-});
-
-$.ui.plugin.add("resizable", "ghost", {
-
- start: function(event, ui) {
-
- var that = $(this).data("resizable"), o = that.options, cs = that.size;
-
- that.ghost = that.originalElement.clone();
- that.ghost
- .css({ opacity: .25, display: 'block', position: 'relative', height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 })
- .addClass('ui-resizable-ghost')
- .addClass(typeof o.ghost == 'string' ? o.ghost : '');
-
- that.ghost.appendTo(that.helper);
-
- },
-
- resize: function(event, ui){
- var that = $(this).data("resizable"), o = that.options;
- if (that.ghost) that.ghost.css({ position: 'relative', height: that.size.height, width: that.size.width });
- },
-
- stop: function(event, ui){
- var that = $(this).data("resizable"), o = that.options;
- if (that.ghost && that.helper) that.helper.get(0).removeChild(that.ghost.get(0));
- }
-
-});
-
-$.ui.plugin.add("resizable", "grid", {
-
- resize: function(event, ui) {
- var that = $(this).data("resizable"), o = that.options, cs = that.size, os = that.originalSize, op = that.originalPosition, a = that.axis, ratio = o._aspectRatio || event.shiftKey;
- o.grid = typeof o.grid == "number" ? [o.grid, o.grid] : o.grid;
- var ox = Math.round((cs.width - os.width) / (o.grid[0]||1)) * (o.grid[0]||1), oy = Math.round((cs.height - os.height) / (o.grid[1]||1)) * (o.grid[1]||1);
-
- if (/^(se|s|e)$/.test(a)) {
- that.size.width = os.width + ox;
- that.size.height = os.height + oy;
- }
- else if (/^(ne)$/.test(a)) {
- that.size.width = os.width + ox;
- that.size.height = os.height + oy;
- that.position.top = op.top - oy;
- }
- else if (/^(sw)$/.test(a)) {
- that.size.width = os.width + ox;
- that.size.height = os.height + oy;
- that.position.left = op.left - ox;
- }
- else {
- that.size.width = os.width + ox;
- that.size.height = os.height + oy;
- that.position.top = op.top - oy;
- that.position.left = op.left - ox;
- }
- }
-
-});
-
-var num = function(v) {
- return parseInt(v, 10) || 0;
-};
-
-var isNumber = function(value) {
- return !isNaN(parseInt(value, 10));
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.widget("ui.selectable", $.ui.mouse, {
- version: "1.9.2",
- options: {
- appendTo: 'body',
- autoRefresh: true,
- distance: 0,
- filter: '*',
- tolerance: 'touch'
- },
- _create: function() {
- var that = this;
-
- this.element.addClass("ui-selectable");
-
- this.dragged = false;
-
- // cache selectee children based on filter
- var selectees;
- this.refresh = function() {
- selectees = $(that.options.filter, that.element[0]);
- selectees.addClass("ui-selectee");
- selectees.each(function() {
- var $this = $(this);
- var pos = $this.offset();
- $.data(this, "selectable-item", {
- element: this,
- $element: $this,
- left: pos.left,
- top: pos.top,
- right: pos.left + $this.outerWidth(),
- bottom: pos.top + $this.outerHeight(),
- startselected: false,
- selected: $this.hasClass('ui-selected'),
- selecting: $this.hasClass('ui-selecting'),
- unselecting: $this.hasClass('ui-unselecting')
- });
- });
- };
- this.refresh();
-
- this.selectees = selectees.addClass("ui-selectee");
-
- this._mouseInit();
-
- this.helper = $("<div class='ui-selectable-helper'></div>");
- },
-
- _destroy: function() {
- this.selectees
- .removeClass("ui-selectee")
- .removeData("selectable-item");
- this.element
- .removeClass("ui-selectable ui-selectable-disabled");
- this._mouseDestroy();
- },
-
- _mouseStart: function(event) {
- var that = this;
-
- this.opos = [event.pageX, event.pageY];
-
- if (this.options.disabled)
- return;
-
- var options = this.options;
-
- this.selectees = $(options.filter, this.element[0]);
-
- this._trigger("start", event);
-
- $(options.appendTo).append(this.helper);
- // position helper (lasso)
- this.helper.css({
- "left": event.clientX,
- "top": event.clientY,
- "width": 0,
- "height": 0
- });
-
- if (options.autoRefresh) {
- this.refresh();
- }
-
- this.selectees.filter('.ui-selected').each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.startselected = true;
- if (!event.metaKey && !event.ctrlKey) {
- selectee.$element.removeClass('ui-selected');
- selectee.selected = false;
- selectee.$element.addClass('ui-unselecting');
- selectee.unselecting = true;
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- });
-
- $(event.target).parents().andSelf().each(function() {
- var selectee = $.data(this, "selectable-item");
- if (selectee) {
- var doSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass('ui-selected');
- selectee.$element
- .removeClass(doSelect ? "ui-unselecting" : "ui-selected")
- .addClass(doSelect ? "ui-selecting" : "ui-unselecting");
- selectee.unselecting = !doSelect;
- selectee.selecting = doSelect;
- selectee.selected = doSelect;
- // selectable (UN)SELECTING callback
- if (doSelect) {
- that._trigger("selecting", event, {
- selecting: selectee.element
- });
- } else {
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- return false;
- }
- });
-
- },
-
- _mouseDrag: function(event) {
- var that = this;
- this.dragged = true;
-
- if (this.options.disabled)
- return;
-
- var options = this.options;
-
- var x1 = this.opos[0], y1 = this.opos[1], x2 = event.pageX, y2 = event.pageY;
- if (x1 > x2) { var tmp = x2; x2 = x1; x1 = tmp; }
- if (y1 > y2) { var tmp = y2; y2 = y1; y1 = tmp; }
- this.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1});
-
- this.selectees.each(function() {
- var selectee = $.data(this, "selectable-item");
- //prevent helper from being selected if appendTo: selectable
- if (!selectee || selectee.element == that.element[0])
- return;
- var hit = false;
- if (options.tolerance == 'touch') {
- hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) );
- } else if (options.tolerance == 'fit') {
- hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2);
- }
-
- if (hit) {
- // SELECT
- if (selectee.selected) {
- selectee.$element.removeClass('ui-selected');
- selectee.selected = false;
- }
- if (selectee.unselecting) {
- selectee.$element.removeClass('ui-unselecting');
- selectee.unselecting = false;
- }
- if (!selectee.selecting) {
- selectee.$element.addClass('ui-selecting');
- selectee.selecting = true;
- // selectable SELECTING callback
- that._trigger("selecting", event, {
- selecting: selectee.element
- });
- }
- } else {
- // UNSELECT
- if (selectee.selecting) {
- if ((event.metaKey || event.ctrlKey) && selectee.startselected) {
- selectee.$element.removeClass('ui-selecting');
- selectee.selecting = false;
- selectee.$element.addClass('ui-selected');
- selectee.selected = true;
- } else {
- selectee.$element.removeClass('ui-selecting');
- selectee.selecting = false;
- if (selectee.startselected) {
- selectee.$element.addClass('ui-unselecting');
- selectee.unselecting = true;
- }
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- }
- if (selectee.selected) {
- if (!event.metaKey && !event.ctrlKey && !selectee.startselected) {
- selectee.$element.removeClass('ui-selected');
- selectee.selected = false;
-
- selectee.$element.addClass('ui-unselecting');
- selectee.unselecting = true;
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- }
- }
- });
-
- return false;
- },
-
- _mouseStop: function(event) {
- var that = this;
-
- this.dragged = false;
-
- var options = this.options;
-
- $('.ui-unselecting', this.element[0]).each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.$element.removeClass('ui-unselecting');
- selectee.unselecting = false;
- selectee.startselected = false;
- that._trigger("unselected", event, {
- unselected: selectee.element
- });
- });
- $('.ui-selecting', this.element[0]).each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.$element.removeClass('ui-selecting').addClass('ui-selected');
- selectee.selecting = false;
- selectee.selected = true;
- selectee.startselected = true;
- that._trigger("selected", event, {
- selected: selectee.element
- });
- });
- this._trigger("stop", event);
-
- this.helper.remove();
-
- return false;
- }
-
-});
-
-})(jQuery);
-(function( $, undefined ) {
-
-// number of pages in a slider
-// (how many times can you page up/down to go through the whole range)
-var numPages = 5;
-
-$.widget( "ui.slider", $.ui.mouse, {
- version: "1.9.2",
- widgetEventPrefix: "slide",
-
- options: {
- animate: false,
- distance: 0,
- max: 100,
- min: 0,
- orientation: "horizontal",
- range: false,
- step: 1,
- value: 0,
- values: null
- },
-
- _create: function() {
- var i, handleCount,
- o = this.options,
- existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
- handle = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",
- handles = [];
-
- this._keySliding = false;
- this._mouseSliding = false;
- this._animateOff = true;
- this._handleIndex = null;
- this._detectOrientation();
- this._mouseInit();
-
- this.element
- .addClass( "ui-slider" +
- " ui-slider-" + this.orientation +
- " ui-widget" +
- " ui-widget-content" +
- " ui-corner-all" +
- ( o.disabled ? " ui-slider-disabled ui-disabled" : "" ) );
-
- this.range = $([]);
-
- if ( o.range ) {
- if ( o.range === true ) {
- if ( !o.values ) {
- o.values = [ this._valueMin(), this._valueMin() ];
- }
- if ( o.values.length && o.values.length !== 2 ) {
- o.values = [ o.values[0], o.values[0] ];
- }
- }
-
- this.range = $( "<div></div>" )
- .appendTo( this.element )
- .addClass( "ui-slider-range" +
- // note: this isn't the most fittingly semantic framework class for this element,
- // but worked best visually with a variety of themes
- " ui-widget-header" +
- ( ( o.range === "min" || o.range === "max" ) ? " ui-slider-range-" + o.range : "" ) );
- }
-
- handleCount = ( o.values && o.values.length ) || 1;
-
- for ( i = existingHandles.length; i < handleCount; i++ ) {
- handles.push( handle );
- }
-
- this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) );
-
- this.handle = this.handles.eq( 0 );
-
- this.handles.add( this.range ).filter( "a" )
- .click(function( event ) {
- event.preventDefault();
- })
- .mouseenter(function() {
- if ( !o.disabled ) {
- $( this ).addClass( "ui-state-hover" );
- }
- })
- .mouseleave(function() {
- $( this ).removeClass( "ui-state-hover" );
- })
- .focus(function() {
- if ( !o.disabled ) {
- $( ".ui-slider .ui-state-focus" ).removeClass( "ui-state-focus" );
- $( this ).addClass( "ui-state-focus" );
- } else {
- $( this ).blur();
- }
- })
- .blur(function() {
- $( this ).removeClass( "ui-state-focus" );
- });
-
- this.handles.each(function( i ) {
- $( this ).data( "ui-slider-handle-index", i );
- });
-
- this._on( this.handles, {
- keydown: function( event ) {
- var allowed, curVal, newVal, step,
- index = $( event.target ).data( "ui-slider-handle-index" );
-
- switch ( event.keyCode ) {
- case $.ui.keyCode.HOME:
- case $.ui.keyCode.END:
- case $.ui.keyCode.PAGE_UP:
- case $.ui.keyCode.PAGE_DOWN:
- case $.ui.keyCode.UP:
- case $.ui.keyCode.RIGHT:
- case $.ui.keyCode.DOWN:
- case $.ui.keyCode.LEFT:
- event.preventDefault();
- if ( !this._keySliding ) {
- this._keySliding = true;
- $( event.target ).addClass( "ui-state-active" );
- allowed = this._start( event, index );
- if ( allowed === false ) {
- return;
- }
- }
- break;
- }
-
- step = this.options.step;
- if ( this.options.values && this.options.values.length ) {
- curVal = newVal = this.values( index );
- } else {
- curVal = newVal = this.value();
- }
-
- switch ( event.keyCode ) {
- case $.ui.keyCode.HOME:
- newVal = this._valueMin();
- break;
- case $.ui.keyCode.END:
- newVal = this._valueMax();
- break;
- case $.ui.keyCode.PAGE_UP:
- newVal = this._trimAlignValue( curVal + ( (this._valueMax() - this._valueMin()) / numPages ) );
- break;
- case $.ui.keyCode.PAGE_DOWN:
- newVal = this._trimAlignValue( curVal - ( (this._valueMax() - this._valueMin()) / numPages ) );
- break;
- case $.ui.keyCode.UP:
- case $.ui.keyCode.RIGHT:
- if ( curVal === this._valueMax() ) {
- return;
- }
- newVal = this._trimAlignValue( curVal + step );
- break;
- case $.ui.keyCode.DOWN:
- case $.ui.keyCode.LEFT:
- if ( curVal === this._valueMin() ) {
- return;
- }
- newVal = this._trimAlignValue( curVal - step );
- break;
- }
-
- this._slide( event, index, newVal );
- },
- keyup: function( event ) {
- var index = $( event.target ).data( "ui-slider-handle-index" );
-
- if ( this._keySliding ) {
- this._keySliding = false;
- this._stop( event, index );
- this._change( event, index );
- $( event.target ).removeClass( "ui-state-active" );
- }
- }
- });
-
- this._refreshValue();
-
- this._animateOff = false;
- },
-
- _destroy: function() {
- this.handles.remove();
- this.range.remove();
-
- this.element
- .removeClass( "ui-slider" +
- " ui-slider-horizontal" +
- " ui-slider-vertical" +
- " ui-slider-disabled" +
- " ui-widget" +
- " ui-widget-content" +
- " ui-corner-all" );
-
- this._mouseDestroy();
- },
-
- _mouseCapture: function( event ) {
- var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,
- that = this,
- o = this.options;
-
- if ( o.disabled ) {
- return false;
- }
-
- this.elementSize = {
- width: this.element.outerWidth(),
- height: this.element.outerHeight()
- };
- this.elementOffset = this.element.offset();
-
- position = { x: event.pageX, y: event.pageY };
- normValue = this._normValueFromMouse( position );
- distance = this._valueMax() - this._valueMin() + 1;
- this.handles.each(function( i ) {
- var thisDistance = Math.abs( normValue - that.values(i) );
- if ( distance > thisDistance ) {
- distance = thisDistance;
- closestHandle = $( this );
- index = i;
- }
- });
-
- // workaround for bug #3736 (if both handles of a range are at 0,
- // the first is always used as the one with least distance,
- // and moving it is obviously prevented by preventing negative ranges)
- if( o.range === true && this.values(1) === o.min ) {
- index += 1;
- closestHandle = $( this.handles[index] );
- }
-
- allowed = this._start( event, index );
- if ( allowed === false ) {
- return false;
- }
- this._mouseSliding = true;
-
- this._handleIndex = index;
-
- closestHandle
- .addClass( "ui-state-active" )
- .focus();
-
- offset = closestHandle.offset();
- mouseOverHandle = !$( event.target ).parents().andSelf().is( ".ui-slider-handle" );
- this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
- left: event.pageX - offset.left - ( closestHandle.width() / 2 ),
- top: event.pageY - offset.top -
- ( closestHandle.height() / 2 ) -
- ( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 ) -
- ( parseInt( closestHandle.css("borderBottomWidth"), 10 ) || 0) +
- ( parseInt( closestHandle.css("marginTop"), 10 ) || 0)
- };
-
- if ( !this.handles.hasClass( "ui-state-hover" ) ) {
- this._slide( event, index, normValue );
- }
- this._animateOff = true;
- return true;
- },
-
- _mouseStart: function() {
- return true;
- },
-
- _mouseDrag: function( event ) {
- var position = { x: event.pageX, y: event.pageY },
- normValue = this._normValueFromMouse( position );
-
- this._slide( event, this._handleIndex, normValue );
-
- return false;
- },
-
- _mouseStop: function( event ) {
- this.handles.removeClass( "ui-state-active" );
- this._mouseSliding = false;
-
- this._stop( event, this._handleIndex );
- this._change( event, this._handleIndex );
-
- this._handleIndex = null;
- this._clickOffset = null;
- this._animateOff = false;
-
- return false;
- },
-
- _detectOrientation: function() {
- this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal";
- },
-
- _normValueFromMouse: function( position ) {
- var pixelTotal,
- pixelMouse,
- percentMouse,
- valueTotal,
- valueMouse;
-
- if ( this.orientation === "horizontal" ) {
- pixelTotal = this.elementSize.width;
- pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 );
- } else {
- pixelTotal = this.elementSize.height;
- pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 );
- }
-
- percentMouse = ( pixelMouse / pixelTotal );
- if ( percentMouse > 1 ) {
- percentMouse = 1;
- }
- if ( percentMouse < 0 ) {
- percentMouse = 0;
- }
- if ( this.orientation === "vertical" ) {
- percentMouse = 1 - percentMouse;
- }
-
- valueTotal = this._valueMax() - this._valueMin();
- valueMouse = this._valueMin() + percentMouse * valueTotal;
-
- return this._trimAlignValue( valueMouse );
- },
-
- _start: function( event, index ) {
- var uiHash = {
- handle: this.handles[ index ],
- value: this.value()
- };
- if ( this.options.values && this.options.values.length ) {
- uiHash.value = this.values( index );
- uiHash.values = this.values();
- }
- return this._trigger( "start", event, uiHash );
- },
-
- _slide: function( event, index, newVal ) {
- var otherVal,
- newValues,
- allowed;
-
- if ( this.options.values && this.options.values.length ) {
- otherVal = this.values( index ? 0 : 1 );
-
- if ( ( this.options.values.length === 2 && this.options.range === true ) &&
- ( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) )
- ) {
- newVal = otherVal;
- }
-
- if ( newVal !== this.values( index ) ) {
- newValues = this.values();
- newValues[ index ] = newVal;
- // A slide can be canceled by returning false from the slide callback
- allowed = this._trigger( "slide", event, {
- handle: this.handles[ index ],
- value: newVal,
- values: newValues
- } );
- otherVal = this.values( index ? 0 : 1 );
- if ( allowed !== false ) {
- this.values( index, newVal, true );
- }
- }
- } else {
- if ( newVal !== this.value() ) {
- // A slide can be canceled by returning false from the slide callback
- allowed = this._trigger( "slide", event, {
- handle: this.handles[ index ],
- value: newVal
- } );
- if ( allowed !== false ) {
- this.value( newVal );
- }
- }
- }
- },
-
- _stop: function( event, index ) {
- var uiHash = {
- handle: this.handles[ index ],
- value: this.value()
- };
- if ( this.options.values && this.options.values.length ) {
- uiHash.value = this.values( index );
- uiHash.values = this.values();
- }
-
- this._trigger( "stop", event, uiHash );
- },
-
- _change: function( event, index ) {
- if ( !this._keySliding && !this._mouseSliding ) {
- var uiHash = {
- handle: this.handles[ index ],
- value: this.value()
- };
- if ( this.options.values && this.options.values.length ) {
- uiHash.value = this.values( index );
- uiHash.values = this.values();
- }
-
- this._trigger( "change", event, uiHash );
- }
- },
-
- value: function( newValue ) {
- if ( arguments.length ) {
- this.options.value = this._trimAlignValue( newValue );
- this._refreshValue();
- this._change( null, 0 );
- return;
- }
-
- return this._value();
- },
-
- values: function( index, newValue ) {
- var vals,
- newValues,
- i;
-
- if ( arguments.length > 1 ) {
- this.options.values[ index ] = this._trimAlignValue( newValue );
- this._refreshValue();
- this._change( null, index );
- return;
- }
-
- if ( arguments.length ) {
- if ( $.isArray( arguments[ 0 ] ) ) {
- vals = this.options.values;
- newValues = arguments[ 0 ];
- for ( i = 0; i < vals.length; i += 1 ) {
- vals[ i ] = this._trimAlignValue( newValues[ i ] );
- this._change( null, i );
- }
- this._refreshValue();
- } else {
- if ( this.options.values && this.options.values.length ) {
- return this._values( index );
- } else {
- return this.value();
- }
- }
- } else {
- return this._values();
- }
- },
-
- _setOption: function( key, value ) {
- var i,
- valsLength = 0;
-
- if ( $.isArray( this.options.values ) ) {
- valsLength = this.options.values.length;
- }
-
- $.Widget.prototype._setOption.apply( this, arguments );
-
- switch ( key ) {
- case "disabled":
- if ( value ) {
- this.handles.filter( ".ui-state-focus" ).blur();
- this.handles.removeClass( "ui-state-hover" );
- this.handles.prop( "disabled", true );
- this.element.addClass( "ui-disabled" );
- } else {
- this.handles.prop( "disabled", false );
- this.element.removeClass( "ui-disabled" );
- }
- break;
- case "orientation":
- this._detectOrientation();
- this.element
- .removeClass( "ui-slider-horizontal ui-slider-vertical" )
- .addClass( "ui-slider-" + this.orientation );
- this._refreshValue();
- break;
- case "value":
- this._animateOff = true;
- this._refreshValue();
- this._change( null, 0 );
- this._animateOff = false;
- break;
- case "values":
- this._animateOff = true;
- this._refreshValue();
- for ( i = 0; i < valsLength; i += 1 ) {
- this._change( null, i );
- }
- this._animateOff = false;
- break;
- case "min":
- case "max":
- this._animateOff = true;
- this._refreshValue();
- this._animateOff = false;
- break;
- }
- },
-
- //internal value getter
- // _value() returns value trimmed by min and max, aligned by step
- _value: function() {
- var val = this.options.value;
- val = this._trimAlignValue( val );
-
- return val;
- },
-
- //internal values getter
- // _values() returns array of values trimmed by min and max, aligned by step
- // _values( index ) returns single value trimmed by min and max, aligned by step
- _values: function( index ) {
- var val,
- vals,
- i;
-
- if ( arguments.length ) {
- val = this.options.values[ index ];
- val = this._trimAlignValue( val );
-
- return val;
- } else {
- // .slice() creates a copy of the array
- // this copy gets trimmed by min and max and then returned
- vals = this.options.values.slice();
- for ( i = 0; i < vals.length; i+= 1) {
- vals[ i ] = this._trimAlignValue( vals[ i ] );
- }
-
- return vals;
- }
- },
-
- // returns the step-aligned value that val is closest to, between (inclusive) min and max
- _trimAlignValue: function( val ) {
- if ( val <= this._valueMin() ) {
- return this._valueMin();
- }
- if ( val >= this._valueMax() ) {
- return this._valueMax();
- }
- var step = ( this.options.step > 0 ) ? this.options.step : 1,
- valModStep = (val - this._valueMin()) % step,
- alignValue = val - valModStep;
-
- if ( Math.abs(valModStep) * 2 >= step ) {
- alignValue += ( valModStep > 0 ) ? step : ( -step );
- }
-
- // Since JavaScript has problems with large floats, round
- // the final value to 5 digits after the decimal point (see #4124)
- return parseFloat( alignValue.toFixed(5) );
- },
-
- _valueMin: function() {
- return this.options.min;
- },
-
- _valueMax: function() {
- return this.options.max;
- },
-
- _refreshValue: function() {
- var lastValPercent, valPercent, value, valueMin, valueMax,
- oRange = this.options.range,
- o = this.options,
- that = this,
- animate = ( !this._animateOff ) ? o.animate : false,
- _set = {};
-
- if ( this.options.values && this.options.values.length ) {
- this.handles.each(function( i ) {
- valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100;
- _set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
- $( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
- if ( that.options.range === true ) {
- if ( that.orientation === "horizontal" ) {
- if ( i === 0 ) {
- that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate );
- }
- if ( i === 1 ) {
- that.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
- }
- } else {
- if ( i === 0 ) {
- that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate );
- }
- if ( i === 1 ) {
- that.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
- }
- }
- }
- lastValPercent = valPercent;
- });
- } else {
- value = this.value();
- valueMin = this._valueMin();
- valueMax = this._valueMax();
- valPercent = ( valueMax !== valueMin ) ?
- ( value - valueMin ) / ( valueMax - valueMin ) * 100 :
- 0;
- _set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
- this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
-
- if ( oRange === "min" && this.orientation === "horizontal" ) {
- this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate );
- }
- if ( oRange === "max" && this.orientation === "horizontal" ) {
- this.range[ animate ? "animate" : "css" ]( { width: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
- }
- if ( oRange === "min" && this.orientation === "vertical" ) {
- this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: valPercent + "%" }, o.animate );
- }
- if ( oRange === "max" && this.orientation === "vertical" ) {
- this.range[ animate ? "animate" : "css" ]( { height: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
- }
- }
- }
-
-});
-
-}(jQuery));
-(function( $, undefined ) {
-
-$.widget("ui.sortable", $.ui.mouse, {
- version: "1.9.2",
- widgetEventPrefix: "sort",
- ready: false,
- options: {
- appendTo: "parent",
- axis: false,
- connectWith: false,
- containment: false,
- cursor: 'auto',
- cursorAt: false,
- dropOnEmpty: true,
- forcePlaceholderSize: false,
- forceHelperSize: false,
- grid: false,
- handle: false,
- helper: "original",
- items: '> *',
- opacity: false,
- placeholder: false,
- revert: false,
- scroll: true,
- scrollSensitivity: 20,
- scrollSpeed: 20,
- scope: "default",
- tolerance: "intersect",
- zIndex: 1000
- },
- _create: function() {
-
- var o = this.options;
- this.containerCache = {};
- this.element.addClass("ui-sortable");
-
- //Get the items
- this.refresh();
-
- //Let's determine if the items are being displayed horizontally
- this.floating = this.items.length ? o.axis === 'x' || (/left|right/).test(this.items[0].item.css('float')) || (/inline|table-cell/).test(this.items[0].item.css('display')) : false;
-
- //Let's determine the parent's offset
- this.offset = this.element.offset();
-
- //Initialize mouse events for interaction
- this._mouseInit();
-
- //We're ready to go
- this.ready = true
-
- },
-
- _destroy: function() {
- this.element
- .removeClass("ui-sortable ui-sortable-disabled");
- this._mouseDestroy();
-
- for ( var i = this.items.length - 1; i >= 0; i-- )
- this.items[i].item.removeData(this.widgetName + "-item");
-
- return this;
- },
-
- _setOption: function(key, value){
- if ( key === "disabled" ) {
- this.options[ key ] = value;
-
- this.widget().toggleClass( "ui-sortable-disabled", !!value );
- } else {
- // Don't call widget base _setOption for disable as it adds ui-state-disabled class
- $.Widget.prototype._setOption.apply(this, arguments);
- }
- },
-
- _mouseCapture: function(event, overrideHandle) {
- var that = this;
-
- if (this.reverting) {
- return false;
- }
-
- if(this.options.disabled || this.options.type == 'static') return false;
-
- //We have to refresh the items data once first
- this._refreshItems(event);
-
- //Find out if the clicked node (or one of its parents) is a actual item in this.items
- var currentItem = null, nodes = $(event.target).parents().each(function() {
- if($.data(this, that.widgetName + '-item') == that) {
- currentItem = $(this);
- return false;
- }
- });
- if($.data(event.target, that.widgetName + '-item') == that) currentItem = $(event.target);
-
- if(!currentItem) return false;
- if(this.options.handle && !overrideHandle) {
- var validHandle = false;
-
- $(this.options.handle, currentItem).find("*").andSelf().each(function() { if(this == event.target) validHandle = true; });
- if(!validHandle) return false;
- }
-
- this.currentItem = currentItem;
- this._removeCurrentsFromItems();
- return true;
-
- },
-
- _mouseStart: function(event, overrideHandle, noActivation) {
-
- var o = this.options;
- this.currentContainer = this;
-
- //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
- this.refreshPositions();
-
- //Create and append the visible helper
- this.helper = this._createHelper(event);
-
- //Cache the helper size
- this._cacheHelperProportions();
-
- /*
- * - Position generation -
- * This block generates everything position related - it's the core of draggables.
- */
-
- //Cache the margins of the original element
- this._cacheMargins();
-
- //Get the next scrolling parent
- this.scrollParent = this.helper.scrollParent();
-
- //The element's absolute position on the page minus margins
- this.offset = this.currentItem.offset();
- this.offset = {
- top: this.offset.top - this.margins.top,
- left: this.offset.left - this.margins.left
- };
-
- $.extend(this.offset, {
- click: { //Where the click happened, relative to the element
- left: event.pageX - this.offset.left,
- top: event.pageY - this.offset.top
- },
- parent: this._getParentOffset(),
- relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
- });
-
- // Only after we got the offset, we can change the helper's position to absolute
- // TODO: Still need to figure out a way to make relative sorting possible
- this.helper.css("position", "absolute");
- this.cssPosition = this.helper.css("position");
-
- //Generate the original position
- this.originalPosition = this._generatePosition(event);
- this.originalPageX = event.pageX;
- this.originalPageY = event.pageY;
-
- //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
- (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
-
- //Cache the former DOM position
- this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };
-
- //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way
- if(this.helper[0] != this.currentItem[0]) {
- this.currentItem.hide();
- }
-
- //Create the placeholder
- this._createPlaceholder();
-
- //Set a containment if given in the options
- if(o.containment)
- this._setContainment();
-
- if(o.cursor) { // cursor option
- if ($('body').css("cursor")) this._storedCursor = $('body').css("cursor");
- $('body').css("cursor", o.cursor);
- }
-
- if(o.opacity) { // opacity option
- if (this.helper.css("opacity")) this._storedOpacity = this.helper.css("opacity");
- this.helper.css("opacity", o.opacity);
- }
-
- if(o.zIndex) { // zIndex option
- if (this.helper.css("zIndex")) this._storedZIndex = this.helper.css("zIndex");
- this.helper.css("zIndex", o.zIndex);
- }
-
- //Prepare scrolling
- if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML')
- this.overflowOffset = this.scrollParent.offset();
-
- //Call callbacks
- this._trigger("start", event, this._uiHash());
-
- //Recache the helper size
- if(!this._preserveHelperProportions)
- this._cacheHelperProportions();
-
-
- //Post 'activate' events to possible containers
- if(!noActivation) {
- for (var i = this.containers.length - 1; i >= 0; i--) { this.containers[i]._trigger("activate", event, this._uiHash(this)); }
- }
-
- //Prepare possible droppables
- if($.ui.ddmanager)
- $.ui.ddmanager.current = this;
-
- if ($.ui.ddmanager && !o.dropBehaviour)
- $.ui.ddmanager.prepareOffsets(this, event);
-
- this.dragging = true;
-
- this.helper.addClass("ui-sortable-helper");
- this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position
- return true;
-
- },
-
- _mouseDrag: function(event) {
-
- //Compute the helpers position
- this.position = this._generatePosition(event);
- this.positionAbs = this._convertPositionTo("absolute");
-
- if (!this.lastPositionAbs) {
- this.lastPositionAbs = this.positionAbs;
- }
-
- //Do scrolling
- if(this.options.scroll) {
- var o = this.options, scrolled = false;
- if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML') {
-
- if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
- this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
- else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity)
- this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;
-
- if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
- this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;
- else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity)
- this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;
-
- } else {
-
- if(event.pageY - $(document).scrollTop() < o.scrollSensitivity)
- scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
- else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity)
- scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
-
- if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity)
- scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
- else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
- scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
-
- }
-
- if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)
- $.ui.ddmanager.prepareOffsets(this, event);
- }
-
- //Regenerate the absolute position used for position checks
- this.positionAbs = this._convertPositionTo("absolute");
-
- //Set the helper position
- if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
- if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
-
- //Rearrange
- for (var i = this.items.length - 1; i >= 0; i--) {
-
- //Cache variables and intersection, continue if no intersection
- var item = this.items[i], itemElement = item.item[0], intersection = this._intersectsWithPointer(item);
- if (!intersection) continue;
-
- // Only put the placeholder inside the current Container, skip all
- // items form other containers. This works because when moving
- // an item from one container to another the
- // currentContainer is switched before the placeholder is moved.
- //
- // Without this moving items in "sub-sortables" can cause the placeholder to jitter
- // beetween the outer and inner container.
- if (item.instance !== this.currentContainer) continue;
-
- if (itemElement != this.currentItem[0] //cannot intersect with itself
- && this.placeholder[intersection == 1 ? "next" : "prev"]()[0] != itemElement //no useless actions that have been done before
- && !$.contains(this.placeholder[0], itemElement) //no action if the item moved is the parent of the item checked
- && (this.options.type == 'semi-dynamic' ? !$.contains(this.element[0], itemElement) : true)
- //&& itemElement.parentNode == this.placeholder[0].parentNode // only rearrange items within the same container
- ) {
-
- this.direction = intersection == 1 ? "down" : "up";
-
- if (this.options.tolerance == "pointer" || this._intersectsWithSides(item)) {
- this._rearrange(event, item);
- } else {
- break;
- }
-
- this._trigger("change", event, this._uiHash());
- break;
- }
- }
-
- //Post events to containers
- this._contactContainers(event);
-
- //Interconnect with droppables
- if($.ui.ddmanager) $.ui.ddmanager.drag(this, event);
-
- //Call callbacks
- this._trigger('sort', event, this._uiHash());
-
- this.lastPositionAbs = this.positionAbs;
- return false;
-
- },
-
- _mouseStop: function(event, noPropagation) {
-
- if(!event) return;
-
- //If we are using droppables, inform the manager about the drop
- if ($.ui.ddmanager && !this.options.dropBehaviour)
- $.ui.ddmanager.drop(this, event);
-
- if(this.options.revert) {
- var that = this;
- var cur = this.placeholder.offset();
-
- this.reverting = true;
-
- $(this.helper).animate({
- left: cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft),
- top: cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)
- }, parseInt(this.options.revert, 10) || 500, function() {
- that._clear(event);
- });
- } else {
- this._clear(event, noPropagation);
- }
-
- return false;
-
- },
-
- cancel: function() {
-
- if(this.dragging) {
-
- this._mouseUp({ target: null });
-
- if(this.options.helper == "original")
- this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
- else
- this.currentItem.show();
-
- //Post deactivating events to containers
- for (var i = this.containers.length - 1; i >= 0; i--){
- this.containers[i]._trigger("deactivate", null, this._uiHash(this));
- if(this.containers[i].containerCache.over) {
- this.containers[i]._trigger("out", null, this._uiHash(this));
- this.containers[i].containerCache.over = 0;
- }
- }
-
- }
-
- if (this.placeholder) {
- //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
- if(this.placeholder[0].parentNode) this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
- if(this.options.helper != "original" && this.helper && this.helper[0].parentNode) this.helper.remove();
-
- $.extend(this, {
- helper: null,
- dragging: false,
- reverting: false,
- _noFinalSort: null
- });
-
- if(this.domPosition.prev) {
- $(this.domPosition.prev).after(this.currentItem);
- } else {
- $(this.domPosition.parent).prepend(this.currentItem);
- }
- }
-
- return this;
-
- },
-
- serialize: function(o) {
-
- var items = this._getItemsAsjQuery(o && o.connected);
- var str = []; o = o || {};
-
- $(items).each(function() {
- var res = ($(o.item || this).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/));
- if(res) str.push((o.key || res[1]+'[]')+'='+(o.key && o.expression ? res[1] : res[2]));
- });
-
- if(!str.length && o.key) {
- str.push(o.key + '=');
- }
-
- return str.join('&');
-
- },
-
- toArray: function(o) {
-
- var items = this._getItemsAsjQuery(o && o.connected);
- var ret = []; o = o || {};
-
- items.each(function() { ret.push($(o.item || this).attr(o.attribute || 'id') || ''); });
- return ret;
-
- },
-
- /* Be careful with the following core functions */
- _intersectsWith: function(item) {
-
- var x1 = this.positionAbs.left,
- x2 = x1 + this.helperProportions.width,
- y1 = this.positionAbs.top,
- y2 = y1 + this.helperProportions.height;
-
- var l = item.left,
- r = l + item.width,
- t = item.top,
- b = t + item.height;
-
- var dyClick = this.offset.click.top,
- dxClick = this.offset.click.left;
-
- var isOverElement = (y1 + dyClick) > t && (y1 + dyClick) < b && (x1 + dxClick) > l && (x1 + dxClick) < r;
-
- if( this.options.tolerance == "pointer"
- || this.options.forcePointerForContainers
- || (this.options.tolerance != "pointer" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])
- ) {
- return isOverElement;
- } else {
-
- return (l < x1 + (this.helperProportions.width / 2) // Right Half
- && x2 - (this.helperProportions.width / 2) < r // Left Half
- && t < y1 + (this.helperProportions.height / 2) // Bottom Half
- && y2 - (this.helperProportions.height / 2) < b ); // Top Half
-
- }
- },
-
- _intersectsWithPointer: function(item) {
-
- var isOverElementHeight = (this.options.axis === 'x') || $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
- isOverElementWidth = (this.options.axis === 'y') || $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
- isOverElement = isOverElementHeight && isOverElementWidth,
- verticalDirection = this._getDragVerticalDirection(),
- horizontalDirection = this._getDragHorizontalDirection();
-
- if (!isOverElement)
- return false;
-
- return this.floating ?
- ( ((horizontalDirection && horizontalDirection == "right") || verticalDirection == "down") ? 2 : 1 )
- : ( verticalDirection && (verticalDirection == "down" ? 2 : 1) );
-
- },
-
- _intersectsWithSides: function(item) {
-
- var isOverBottomHalf = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
- isOverRightHalf = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
- verticalDirection = this._getDragVerticalDirection(),
- horizontalDirection = this._getDragHorizontalDirection();
-
- if (this.floating && horizontalDirection) {
- return ((horizontalDirection == "right" && isOverRightHalf) || (horizontalDirection == "left" && !isOverRightHalf));
- } else {
- return verticalDirection && ((verticalDirection == "down" && isOverBottomHalf) || (verticalDirection == "up" && !isOverBottomHalf));
- }
-
- },
-
- _getDragVerticalDirection: function() {
- var delta = this.positionAbs.top - this.lastPositionAbs.top;
- return delta != 0 && (delta > 0 ? "down" : "up");
- },
-
- _getDragHorizontalDirection: function() {
- var delta = this.positionAbs.left - this.lastPositionAbs.left;
- return delta != 0 && (delta > 0 ? "right" : "left");
- },
-
- refresh: function(event) {
- this._refreshItems(event);
- this.refreshPositions();
- return this;
- },
-
- _connectWith: function() {
- var options = this.options;
- return options.connectWith.constructor == String
- ? [options.connectWith]
- : options.connectWith;
- },
-
- _getItemsAsjQuery: function(connected) {
-
- var items = [];
- var queries = [];
- var connectWith = this._connectWith();
-
- if(connectWith && connected) {
- for (var i = connectWith.length - 1; i >= 0; i--){
- var cur = $(connectWith[i]);
- for (var j = cur.length - 1; j >= 0; j--){
- var inst = $.data(cur[j], this.widgetName);
- if(inst && inst != this && !inst.options.disabled) {
- queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not('.ui-sortable-placeholder'), inst]);
- }
- };
- };
- }
-
- queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not('.ui-sortable-placeholder'), this]);
-
- for (var i = queries.length - 1; i >= 0; i--){
- queries[i][0].each(function() {
- items.push(this);
- });
- };
-
- return $(items);
-
- },
-
- _removeCurrentsFromItems: function() {
-
- var list = this.currentItem.find(":data(" + this.widgetName + "-item)");
-
- this.items = $.grep(this.items, function (item) {
- for (var j=0; j < list.length; j++) {
- if(list[j] == item.item[0])
- return false;
- };
- return true;
- });
-
- },
-
- _refreshItems: function(event) {
-
- this.items = [];
- this.containers = [this];
- var items = this.items;
- var queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]];
- var connectWith = this._connectWith();
-
- if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down
- for (var i = connectWith.length - 1; i >= 0; i--){
- var cur = $(connectWith[i]);
- for (var j = cur.length - 1; j >= 0; j--){
- var inst = $.data(cur[j], this.widgetName);
- if(inst && inst != this && !inst.options.disabled) {
- queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);
- this.containers.push(inst);
- }
- };
- };
- }
-
- for (var i = queries.length - 1; i >= 0; i--) {
- var targetData = queries[i][1];
- var _queries = queries[i][0];
-
- for (var j=0, queriesLength = _queries.length; j < queriesLength; j++) {
- var item = $(_queries[j]);
-
- item.data(this.widgetName + '-item', targetData); // Data for target checking (mouse manager)
-
- items.push({
- item: item,
- instance: targetData,
- width: 0, height: 0,
- left: 0, top: 0
- });
- };
- };
-
- },
-
- refreshPositions: function(fast) {
-
- //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
- if(this.offsetParent && this.helper) {
- this.offset.parent = this._getParentOffset();
- }
-
- for (var i = this.items.length - 1; i >= 0; i--){
- var item = this.items[i];
-
- //We ignore calculating positions of all connected containers when we're not over them
- if(item.instance != this.currentContainer && this.currentContainer && item.item[0] != this.currentItem[0])
- continue;
-
- var t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
-
- if (!fast) {
- item.width = t.outerWidth();
- item.height = t.outerHeight();
- }
-
- var p = t.offset();
- item.left = p.left;
- item.top = p.top;
- };
-
- if(this.options.custom && this.options.custom.refreshContainers) {
- this.options.custom.refreshContainers.call(this);
- } else {
- for (var i = this.containers.length - 1; i >= 0; i--){
- var p = this.containers[i].element.offset();
- this.containers[i].containerCache.left = p.left;
- this.containers[i].containerCache.top = p.top;
- this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
- this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
- };
- }
-
- return this;
- },
-
- _createPlaceholder: function(that) {
- that = that || this;
- var o = that.options;
-
- if(!o.placeholder || o.placeholder.constructor == String) {
- var className = o.placeholder;
- o.placeholder = {
- element: function() {
-
- var el = $(document.createElement(that.currentItem[0].nodeName))
- .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder")
- .removeClass("ui-sortable-helper")[0];
-
- if(!className)
- el.style.visibility = "hidden";
-
- return el;
- },
- update: function(container, p) {
-
- // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that
- // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified
- if(className && !o.forcePlaceholderSize) return;
-
- //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
- if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css('paddingTop')||0, 10) - parseInt(that.currentItem.css('paddingBottom')||0, 10)); };
- if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css('paddingLeft')||0, 10) - parseInt(that.currentItem.css('paddingRight')||0, 10)); };
- }
- };
- }
-
- //Create the placeholder
- that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem));
-
- //Append it after the actual current item
- that.currentItem.after(that.placeholder);
-
- //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
- o.placeholder.update(that, that.placeholder);
-
- },
-
- _contactContainers: function(event) {
-
- // get innermost container that intersects with item
- var innermostContainer = null, innermostIndex = null;
-
-
- for (var i = this.containers.length - 1; i >= 0; i--){
-
- // never consider a container that's located within the item itself
- if($.contains(this.currentItem[0], this.containers[i].element[0]))
- continue;
-
- if(this._intersectsWith(this.containers[i].containerCache)) {
-
- // if we've already found a container and it's more "inner" than this, then continue
- if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0]))
- continue;
-
- innermostContainer = this.containers[i];
- innermostIndex = i;
-
- } else {
- // container doesn't intersect. trigger "out" event if necessary
- if(this.containers[i].containerCache.over) {
- this.containers[i]._trigger("out", event, this._uiHash(this));
- this.containers[i].containerCache.over = 0;
- }
- }
-
- }
-
- // if no intersecting containers found, return
- if(!innermostContainer) return;
-
- // move the item into the container if it's not there already
- if(this.containers.length === 1) {
- this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
- this.containers[innermostIndex].containerCache.over = 1;
- } else {
-
- //When entering a new container, we will find the item with the least distance and append our item near it
- var dist = 10000; var itemWithLeastDistance = null;
- var posProperty = this.containers[innermostIndex].floating ? 'left' : 'top';
- var sizeProperty = this.containers[innermostIndex].floating ? 'width' : 'height';
- var base = this.positionAbs[posProperty] + this.offset.click[posProperty];
- for (var j = this.items.length - 1; j >= 0; j--) {
- if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) continue;
- if(this.items[j].item[0] == this.currentItem[0]) continue;
- var cur = this.items[j].item.offset()[posProperty];
- var nearBottom = false;
- if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){
- nearBottom = true;
- cur += this.items[j][sizeProperty];
- }
-
- if(Math.abs(cur - base) < dist) {
- dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
- this.direction = nearBottom ? "up": "down";
- }
- }
-
- if(!itemWithLeastDistance && !this.options.dropOnEmpty) //Check if dropOnEmpty is enabled
- return;
-
- this.currentContainer = this.containers[innermostIndex];
- itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);
- this._trigger("change", event, this._uiHash());
- this.containers[innermostIndex]._trigger("change", event, this._uiHash(this));
-
- //Update the placeholder
- this.options.placeholder.update(this.currentContainer, this.placeholder);
-
- this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
- this.containers[innermostIndex].containerCache.over = 1;
- }
-
-
- },
-
- _createHelper: function(event) {
-
- var o = this.options;
- var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper == 'clone' ? this.currentItem.clone() : this.currentItem);
-
- if(!helper.parents('body').length) //Add the helper to the DOM if that didn't happen already
- $(o.appendTo != 'parent' ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);
-
- if(helper[0] == this.currentItem[0])
- this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") };
-
- if(helper[0].style.width == '' || o.forceHelperSize) helper.width(this.currentItem.width());
- if(helper[0].style.height == '' || o.forceHelperSize) helper.height(this.currentItem.height());
-
- return helper;
-
- },
-
- _adjustOffsetFromHelper: function(obj) {
- if (typeof obj == 'string') {
- obj = obj.split(' ');
- }
- if ($.isArray(obj)) {
- obj = {left: +obj[0], top: +obj[1] || 0};
- }
- if ('left' in obj) {
- this.offset.click.left = obj.left + this.margins.left;
- }
- if ('right' in obj) {
- this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
- }
- if ('top' in obj) {
- this.offset.click.top = obj.top + this.margins.top;
- }
- if ('bottom' in obj) {
- this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
- }
- },
-
- _getParentOffset: function() {
-
-
- //Get the offsetParent and cache its position
- this.offsetParent = this.helper.offsetParent();
- var po = this.offsetParent.offset();
-
- // This is a special case where we need to modify a offset calculated on start, since the following happened:
- // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
- // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
- // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
- if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
- po.left += this.scrollParent.scrollLeft();
- po.top += this.scrollParent.scrollTop();
- }
-
- if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
- || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.ui.ie)) //Ugly IE fix
- po = { top: 0, left: 0 };
-
- return {
- top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
- left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
- };
-
- },
-
- _getRelativeOffset: function() {
-
- if(this.cssPosition == "relative") {
- var p = this.currentItem.position();
- return {
- top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
- left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
- };
- } else {
- return { top: 0, left: 0 };
- }
-
- },
-
- _cacheMargins: function() {
- this.margins = {
- left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),
- top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
- };
- },
-
- _cacheHelperProportions: function() {
- this.helperProportions = {
- width: this.helper.outerWidth(),
- height: this.helper.outerHeight()
- };
- },
-
- _setContainment: function() {
-
- var o = this.options;
- if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
- if(o.containment == 'document' || o.containment == 'window') this.containment = [
- 0 - this.offset.relative.left - this.offset.parent.left,
- 0 - this.offset.relative.top - this.offset.parent.top,
- $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,
- ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
- ];
-
- if(!(/^(document|window|parent)$/).test(o.containment)) {
- var ce = $(o.containment)[0];
- var co = $(o.containment).offset();
- var over = ($(ce).css("overflow") != 'hidden');
-
- this.containment = [
- co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
- co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
- co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,
- co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top
- ];
- }
-
- },
-
- _convertPositionTo: function(d, pos) {
-
- if(!pos) pos = this.position;
- var mod = d == "absolute" ? 1 : -1;
- var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
-
- return {
- top: (
- pos.top // The absolute mouse position
- + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent
- + this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border)
- - ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
- ),
- left: (
- pos.left // The absolute mouse position
- + this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent
- + this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border)
- - ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
- )
- };
-
- },
-
- _generatePosition: function(event) {
-
- var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
-
- // This is another very weird special case that only happens for relative elements:
- // 1. If the css position is relative
- // 2. and the scroll parent is the document or similar to the offset parent
- // we have to refresh the relative offset during the scroll so there are no jumps
- if(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) {
- this.offset.relative = this._getRelativeOffset();
- }
-
- var pageX = event.pageX;
- var pageY = event.pageY;
-
- /*
- * - Position constraining -
- * Constrain the position to a mix of grid, containment.
- */
-
- if(this.originalPosition) { //If we are not dragging yet, we won't check for options
-
- if(this.containment) {
- if(event.pageX - this.offset.click.left < this.containment[0]) pageX = this.containment[0] + this.offset.click.left;
- if(event.pageY - this.offset.click.top < this.containment[1]) pageY = this.containment[1] + this.offset.click.top;
- if(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left;
- if(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top;
- }
-
- if(o.grid) {
- var top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
- pageY = this.containment ? (!(top - this.offset.click.top < this.containment[1] || top - this.offset.click.top > this.containment[3]) ? top : (!(top - this.offset.click.top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
-
- var left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
- pageX = this.containment ? (!(left - this.offset.click.left < this.containment[0] || left - this.offset.click.left > this.containment[2]) ? left : (!(left - this.offset.click.left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
- }
-
- }
-
- return {
- top: (
- pageY // The absolute mouse position
- - this.offset.click.top // Click offset (relative to the element)
- - this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent
- - this.offset.parent.top // The offsetParent's offset without borders (offset + border)
- + ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
- ),
- left: (
- pageX // The absolute mouse position
- - this.offset.click.left // Click offset (relative to the element)
- - this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent
- - this.offset.parent.left // The offsetParent's offset without borders (offset + border)
- + ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
- )
- };
-
- },
-
- _rearrange: function(event, i, a, hardRefresh) {
-
- a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction == 'down' ? i.item[0] : i.item[0].nextSibling));
-
- //Various things done here to improve the performance:
- // 1. we create a setTimeout, that calls refreshPositions
- // 2. on the instance, we have a counter variable, that get's higher after every append
- // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same
- // 4. this lets only the last addition to the timeout stack through
- this.counter = this.counter ? ++this.counter : 1;
- var counter = this.counter;
-
- this._delay(function() {
- if(counter == this.counter) this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
- });
-
- },
-
- _clear: function(event, noPropagation) {
-
- this.reverting = false;
- // We delay all events that have to be triggered to after the point where the placeholder has been removed and
- // everything else normalized again
- var delayedTriggers = [];
-
- // We first have to update the dom position of the actual currentItem
- // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
- if(!this._noFinalSort && this.currentItem.parent().length) this.placeholder.before(this.currentItem);
- this._noFinalSort = null;
-
- if(this.helper[0] == this.currentItem[0]) {
- for(var i in this._storedCSS) {
- if(this._storedCSS[i] == 'auto' || this._storedCSS[i] == 'static') this._storedCSS[i] = '';
- }
- this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
- } else {
- this.currentItem.show();
- }
-
- if(this.fromOutside && !noPropagation) delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
- if((this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !noPropagation) delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
-
- // Check if the items Container has Changed and trigger appropriate
- // events.
- if (this !== this.currentContainer) {
- if(!noPropagation) {
- delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
- delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
- delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
- }
- }
-
-
- //Post events to containers
- for (var i = this.containers.length - 1; i >= 0; i--){
- if(!noPropagation) delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
- if(this.containers[i].containerCache.over) {
- delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
- this.containers[i].containerCache.over = 0;
- }
- }
-
- //Do what was originally in plugins
- if(this._storedCursor) $('body').css("cursor", this._storedCursor); //Reset cursor
- if(this._storedOpacity) this.helper.css("opacity", this._storedOpacity); //Reset opacity
- if(this._storedZIndex) this.helper.css("zIndex", this._storedZIndex == 'auto' ? '' : this._storedZIndex); //Reset z-index
-
- this.dragging = false;
- if(this.cancelHelperRemoval) {
- if(!noPropagation) {
- this._trigger("beforeStop", event, this._uiHash());
- for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events
- this._trigger("stop", event, this._uiHash());
- }
-
- this.fromOutside = false;
- return false;
- }
-
- if(!noPropagation) this._trigger("beforeStop", event, this._uiHash());
-
- //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
- this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
-
- if(this.helper[0] != this.currentItem[0]) this.helper.remove(); this.helper = null;
-
- if(!noPropagation) {
- for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events
- this._trigger("stop", event, this._uiHash());
- }
-
- this.fromOutside = false;
- return true;
-
- },
-
- _trigger: function() {
- if ($.Widget.prototype._trigger.apply(this, arguments) === false) {
- this.cancel();
- }
- },
-
- _uiHash: function(_inst) {
- var inst = _inst || this;
- return {
- helper: inst.helper,
- placeholder: inst.placeholder || $([]),
- position: inst.position,
- originalPosition: inst.originalPosition,
- offset: inst.positionAbs,
- item: inst.currentItem,
- sender: _inst ? _inst.element : null
- };
- }
-
-});
-
-})(jQuery);
-(function( $ ) {
-
-function modifier( fn ) {
- return function() {
- var previous = this.element.val();
- fn.apply( this, arguments );
- this._refresh();
- if ( previous !== this.element.val() ) {
- this._trigger( "change" );
- }
- };
-}
-
-$.widget( "ui.spinner", {
- version: "1.9.2",
- defaultElement: "<input>",
- widgetEventPrefix: "spin",
- options: {
- culture: null,
- icons: {
- down: "ui-icon-triangle-1-s",
- up: "ui-icon-triangle-1-n"
- },
- incremental: true,
- max: null,
- min: null,
- numberFormat: null,
- page: 10,
- step: 1,
-
- change: null,
- spin: null,
- start: null,
- stop: null
- },
-
- _create: function() {
- // handle string values that need to be parsed
- this._setOption( "max", this.options.max );
- this._setOption( "min", this.options.min );
- this._setOption( "step", this.options.step );
-
- // format the value, but don't constrain
- this._value( this.element.val(), true );
-
- this._draw();
- this._on( this._events );
- this._refresh();
-
- // turning off autocomplete prevents the browser from remembering the
- // value when navigating through history, so we re-enable autocomplete
- // if the page is unloaded before the widget is destroyed. #7790
- this._on( this.window, {
- beforeunload: function() {
- this.element.removeAttr( "autocomplete" );
- }
- });
- },
-
- _getCreateOptions: function() {
- var options = {},
- element = this.element;
-
- $.each( [ "min", "max", "step" ], function( i, option ) {
- var value = element.attr( option );
- if ( value !== undefined && value.length ) {
- options[ option ] = value;
- }
- });
-
- return options;
- },
-
- _events: {
- keydown: function( event ) {
- if ( this._start( event ) && this._keydown( event ) ) {
- event.preventDefault();
- }
- },
- keyup: "_stop",
- focus: function() {
- this.previous = this.element.val();
- },
- blur: function( event ) {
- if ( this.cancelBlur ) {
- delete this.cancelBlur;
- return;
- }
-
- this._refresh();
- if ( this.previous !== this.element.val() ) {
- this._trigger( "change", event );
- }
- },
- mousewheel: function( event, delta ) {
- if ( !delta ) {
- return;
- }
- if ( !this.spinning && !this._start( event ) ) {
- return false;
- }
-
- this._spin( (delta > 0 ? 1 : -1) * this.options.step, event );
- clearTimeout( this.mousewheelTimer );
- this.mousewheelTimer = this._delay(function() {
- if ( this.spinning ) {
- this._stop( event );
- }
- }, 100 );
- event.preventDefault();
- },
- "mousedown .ui-spinner-button": function( event ) {
- var previous;
-
- // We never want the buttons to have focus; whenever the user is
- // interacting with the spinner, the focus should be on the input.
- // If the input is focused then this.previous is properly set from
- // when the input first received focus. If the input is not focused
- // then we need to set this.previous based on the value before spinning.
- previous = this.element[0] === this.document[0].activeElement ?
- this.previous : this.element.val();
- function checkFocus() {
- var isActive = this.element[0] === this.document[0].activeElement;
- if ( !isActive ) {
- this.element.focus();
- this.previous = previous;
- // support: IE
- // IE sets focus asynchronously, so we need to check if focus
- // moved off of the input because the user clicked on the button.
- this._delay(function() {
- this.previous = previous;
- });
- }
- }
-
- // ensure focus is on (or stays on) the text field
- event.preventDefault();
- checkFocus.call( this );
-
- // support: IE
- // IE doesn't prevent moving focus even with event.preventDefault()
- // so we set a flag to know when we should ignore the blur event
- // and check (again) if focus moved off of the input.
- this.cancelBlur = true;
- this._delay(function() {
- delete this.cancelBlur;
- checkFocus.call( this );
- });
-
- if ( this._start( event ) === false ) {
- return;
- }
-
- this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event );
- },
- "mouseup .ui-spinner-button": "_stop",
- "mouseenter .ui-spinner-button": function( event ) {
- // button will add ui-state-active if mouse was down while mouseleave and kept down
- if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) {
- return;
- }
-
- if ( this._start( event ) === false ) {
- return false;
- }
- this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event );
- },
- // TODO: do we really want to consider this a stop?
- // shouldn't we just stop the repeater and wait until mouseup before
- // we trigger the stop event?
- "mouseleave .ui-spinner-button": "_stop"
- },
-
- _draw: function() {
- var uiSpinner = this.uiSpinner = this.element
- .addClass( "ui-spinner-input" )
- .attr( "autocomplete", "off" )
- .wrap( this._uiSpinnerHtml() )
- .parent()
- // add buttons
- .append( this._buttonHtml() );
-
- this.element.attr( "role", "spinbutton" );
-
- // button bindings
- this.buttons = uiSpinner.find( ".ui-spinner-button" )
- .attr( "tabIndex", -1 )
- .button()
- .removeClass( "ui-corner-all" );
-
- // IE 6 doesn't understand height: 50% for the buttons
- // unless the wrapper has an explicit height
- if ( this.buttons.height() > Math.ceil( uiSpinner.height() * 0.5 ) &&
- uiSpinner.height() > 0 ) {
- uiSpinner.height( uiSpinner.height() );
- }
-
- // disable spinner if element was already disabled
- if ( this.options.disabled ) {
- this.disable();
- }
- },
-
- _keydown: function( event ) {
- var options = this.options,
- keyCode = $.ui.keyCode;
-
- switch ( event.keyCode ) {
- case keyCode.UP:
- this._repeat( null, 1, event );
- return true;
- case keyCode.DOWN:
- this._repeat( null, -1, event );
- return true;
- case keyCode.PAGE_UP:
- this._repeat( null, options.page, event );
- return true;
- case keyCode.PAGE_DOWN:
- this._repeat( null, -options.page, event );
- return true;
- }
-
- return false;
- },
-
- _uiSpinnerHtml: function() {
- return "<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>";
- },
-
- _buttonHtml: function() {
- return "" +
- "<a class='ui-spinner-button ui-spinner-up ui-corner-tr'>" +
- "<span class='ui-icon " + this.options.icons.up + "'>&#9650;</span>" +
- "</a>" +
- "<a class='ui-spinner-button ui-spinner-down ui-corner-br'>" +
- "<span class='ui-icon " + this.options.icons.down + "'>&#9660;</span>" +
- "</a>";
- },
-
- _start: function( event ) {
- if ( !this.spinning && this._trigger( "start", event ) === false ) {
- return false;
- }
-
- if ( !this.counter ) {
- this.counter = 1;
- }
- this.spinning = true;
- return true;
- },
-
- _repeat: function( i, steps, event ) {
- i = i || 500;
-
- clearTimeout( this.timer );
- this.timer = this._delay(function() {
- this._repeat( 40, steps, event );
- }, i );
-
- this._spin( steps * this.options.step, event );
- },
-
- _spin: function( step, event ) {
- var value = this.value() || 0;
-
- if ( !this.counter ) {
- this.counter = 1;
- }
-
- value = this._adjustValue( value + step * this._increment( this.counter ) );
-
- if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false) {
- this._value( value );
- this.counter++;
- }
- },
-
- _increment: function( i ) {
- var incremental = this.options.incremental;
-
- if ( incremental ) {
- return $.isFunction( incremental ) ?
- incremental( i ) :
- Math.floor( i*i*i/50000 - i*i/500 + 17*i/200 + 1 );
- }
-
- return 1;
- },
-
- _precision: function() {
- var precision = this._precisionOf( this.options.step );
- if ( this.options.min !== null ) {
- precision = Math.max( precision, this._precisionOf( this.options.min ) );
- }
- return precision;
- },
-
- _precisionOf: function( num ) {
- var str = num.toString(),
- decimal = str.indexOf( "." );
- return decimal === -1 ? 0 : str.length - decimal - 1;
- },
-
- _adjustValue: function( value ) {
- var base, aboveMin,
- options = this.options;
-
- // make sure we're at a valid step
- // - find out where we are relative to the base (min or 0)
- base = options.min !== null ? options.min : 0;
- aboveMin = value - base;
- // - round to the nearest step
- aboveMin = Math.round(aboveMin / options.step) * options.step;
- // - rounding is based on 0, so adjust back to our base
- value = base + aboveMin;
-
- // fix precision from bad JS floating point math
- value = parseFloat( value.toFixed( this._precision() ) );
-
- // clamp the value
- if ( options.max !== null && value > options.max) {
- return options.max;
- }
- if ( options.min !== null && value < options.min ) {
- return options.min;
- }
-
- return value;
- },
-
- _stop: function( event ) {
- if ( !this.spinning ) {
- return;
- }
-
- clearTimeout( this.timer );
- clearTimeout( this.mousewheelTimer );
- this.counter = 0;
- this.spinning = false;
- this._trigger( "stop", event );
- },
-
- _setOption: function( key, value ) {
- if ( key === "culture" || key === "numberFormat" ) {
- var prevValue = this._parse( this.element.val() );
- this.options[ key ] = value;
- this.element.val( this._format( prevValue ) );
- return;
- }
-
- if ( key === "max" || key === "min" || key === "step" ) {
- if ( typeof value === "string" ) {
- value = this._parse( value );
- }
- }
-
- this._super( key, value );
-
- if ( key === "disabled" ) {
- if ( value ) {
- this.element.prop( "disabled", true );
- this.buttons.button( "disable" );
- } else {
- this.element.prop( "disabled", false );
- this.buttons.button( "enable" );
- }
- }
- },
-
- _setOptions: modifier(function( options ) {
- this._super( options );
- this._value( this.element.val() );
- }),
-
- _parse: function( val ) {
- if ( typeof val === "string" && val !== "" ) {
- val = window.Globalize && this.options.numberFormat ?
- Globalize.parseFloat( val, 10, this.options.culture ) : +val;
- }
- return val === "" || isNaN( val ) ? null : val;
- },
-
- _format: function( value ) {
- if ( value === "" ) {
- return "";
- }
- return window.Globalize && this.options.numberFormat ?
- Globalize.format( value, this.options.numberFormat, this.options.culture ) :
- value;
- },
-
- _refresh: function() {
- this.element.attr({
- "aria-valuemin": this.options.min,
- "aria-valuemax": this.options.max,
- // TODO: what should we do with values that can't be parsed?
- "aria-valuenow": this._parse( this.element.val() )
- });
- },
-
- // update the value without triggering change
- _value: function( value, allowAny ) {
- var parsed;
- if ( value !== "" ) {
- parsed = this._parse( value );
- if ( parsed !== null ) {
- if ( !allowAny ) {
- parsed = this._adjustValue( parsed );
- }
- value = this._format( parsed );
- }
- }
- this.element.val( value );
- this._refresh();
- },
-
- _destroy: function() {
- this.element
- .removeClass( "ui-spinner-input" )
- .prop( "disabled", false )
- .removeAttr( "autocomplete" )
- .removeAttr( "role" )
- .removeAttr( "aria-valuemin" )
- .removeAttr( "aria-valuemax" )
- .removeAttr( "aria-valuenow" );
- this.uiSpinner.replaceWith( this.element );
- },
-
- stepUp: modifier(function( steps ) {
- this._stepUp( steps );
- }),
- _stepUp: function( steps ) {
- this._spin( (steps || 1) * this.options.step );
- },
-
- stepDown: modifier(function( steps ) {
- this._stepDown( steps );
- }),
- _stepDown: function( steps ) {
- this._spin( (steps || 1) * -this.options.step );
- },
-
- pageUp: modifier(function( pages ) {
- this._stepUp( (pages || 1) * this.options.page );
- }),
-
- pageDown: modifier(function( pages ) {
- this._stepDown( (pages || 1) * this.options.page );
- }),
-
- value: function( newVal ) {
- if ( !arguments.length ) {
- return this._parse( this.element.val() );
- }
- modifier( this._value ).call( this, newVal );
- },
-
- widget: function() {
- return this.uiSpinner;
- }
-});
-
-}( jQuery ) );
-(function( $, undefined ) {
-
-var tabId = 0,
- rhash = /#.*$/;
-
-function getNextTabId() {
- return ++tabId;
-}
-
-function isLocal( anchor ) {
- return anchor.hash.length > 1 &&
- anchor.href.replace( rhash, "" ) ===
- location.href.replace( rhash, "" )
- // support: Safari 5.1
- // Safari 5.1 doesn't encode spaces in window.location
- // but it does encode spaces from anchors (#8777)
- .replace( /\s/g, "%20" );
-}
-
-$.widget( "ui.tabs", {
- version: "1.9.2",
- delay: 300,
- options: {
- active: null,
- collapsible: false,
- event: "click",
- heightStyle: "content",
- hide: null,
- show: null,
-
- // callbacks
- activate: null,
- beforeActivate: null,
- beforeLoad: null,
- load: null
- },
-
- _create: function() {
- var that = this,
- options = this.options,
- active = options.active,
- locationHash = location.hash.substring( 1 );
-
- this.running = false;
-
- this.element
- .addClass( "ui-tabs ui-widget ui-widget-content ui-corner-all" )
- .toggleClass( "ui-tabs-collapsible", options.collapsible )
- // Prevent users from focusing disabled tabs via click
- .delegate( ".ui-tabs-nav > li", "mousedown" + this.eventNamespace, function( event ) {
- if ( $( this ).is( ".ui-state-disabled" ) ) {
- event.preventDefault();
- }
- })
- // support: IE <9
- // Preventing the default action in mousedown doesn't prevent IE
- // from focusing the element, so if the anchor gets focused, blur.
- // We don't have to worry about focusing the previously focused
- // element since clicking on a non-focusable element should focus
- // the body anyway.
- .delegate( ".ui-tabs-anchor", "focus" + this.eventNamespace, function() {
- if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) {
- this.blur();
- }
- });
-
- this._processTabs();
-
- if ( active === null ) {
- // check the fragment identifier in the URL
- if ( locationHash ) {
- this.tabs.each(function( i, tab ) {
- if ( $( tab ).attr( "aria-controls" ) === locationHash ) {
- active = i;
- return false;
- }
- });
- }
-
- // check for a tab marked active via a class
- if ( active === null ) {
- active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) );
- }
-
- // no active tab, set to false
- if ( active === null || active === -1 ) {
- active = this.tabs.length ? 0 : false;
- }
- }
-
- // handle numbers: negative, out of range
- if ( active !== false ) {
- active = this.tabs.index( this.tabs.eq( active ) );
- if ( active === -1 ) {
- active = options.collapsible ? false : 0;
- }
- }
- options.active = active;
-
- // don't allow collapsible: false and active: false
- if ( !options.collapsible && options.active === false && this.anchors.length ) {
- options.active = 0;
- }
-
- // Take disabling tabs via class attribute from HTML
- // into account and update option properly.
- if ( $.isArray( options.disabled ) ) {
- options.disabled = $.unique( options.disabled.concat(
- $.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) {
- return that.tabs.index( li );
- })
- ) ).sort();
- }
-
- // check for length avoids error when initializing empty list
- if ( this.options.active !== false && this.anchors.length ) {
- this.active = this._findActive( this.options.active );
- } else {
- this.active = $();
- }
-
- this._refresh();
-
- if ( this.active.length ) {
- this.load( options.active );
- }
- },
-
- _getCreateEventData: function() {
- return {
- tab: this.active,
- panel: !this.active.length ? $() : this._getPanelForTab( this.active )
- };
- },
-
- _tabKeydown: function( event ) {
- var focusedTab = $( this.document[0].activeElement ).closest( "li" ),
- selectedIndex = this.tabs.index( focusedTab ),
- goingForward = true;
-
- if ( this._handlePageNav( event ) ) {
- return;
- }
-
- switch ( event.keyCode ) {
- case $.ui.keyCode.RIGHT:
- case $.ui.keyCode.DOWN:
- selectedIndex++;
- break;
- case $.ui.keyCode.UP:
- case $.ui.keyCode.LEFT:
- goingForward = false;
- selectedIndex--;
- break;
- case $.ui.keyCode.END:
- selectedIndex = this.anchors.length - 1;
- break;
- case $.ui.keyCode.HOME:
- selectedIndex = 0;
- break;
- case $.ui.keyCode.SPACE:
- // Activate only, no collapsing
- event.preventDefault();
- clearTimeout( this.activating );
- this._activate( selectedIndex );
- return;
- case $.ui.keyCode.ENTER:
- // Toggle (cancel delayed activation, allow collapsing)
- event.preventDefault();
- clearTimeout( this.activating );
- // Determine if we should collapse or activate
- this._activate( selectedIndex === this.options.active ? false : selectedIndex );
- return;
- default:
- return;
- }
-
- // Focus the appropriate tab, based on which key was pressed
- event.preventDefault();
- clearTimeout( this.activating );
- selectedIndex = this._focusNextTab( selectedIndex, goingForward );
-
- // Navigating with control key will prevent automatic activation
- if ( !event.ctrlKey ) {
- // Update aria-selected immediately so that AT think the tab is already selected.
- // Otherwise AT may confuse the user by stating that they need to activate the tab,
- // but the tab will already be activated by the time the announcement finishes.
- focusedTab.attr( "aria-selected", "false" );
- this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" );
-
- this.activating = this._delay(function() {
- this.option( "active", selectedIndex );
- }, this.delay );
- }
- },
-
- _panelKeydown: function( event ) {
- if ( this._handlePageNav( event ) ) {
- return;
- }
-
- // Ctrl+up moves focus to the current tab
- if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {
- event.preventDefault();
- this.active.focus();
- }
- },
-
- // Alt+page up/down moves focus to the previous/next tab (and activates)
- _handlePageNav: function( event ) {
- if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {
- this._activate( this._focusNextTab( this.options.active - 1, false ) );
- return true;
- }
- if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {
- this._activate( this._focusNextTab( this.options.active + 1, true ) );
- return true;
- }
- },
-
- _findNextTab: function( index, goingForward ) {
- var lastTabIndex = this.tabs.length - 1;
-
- function constrain() {
- if ( index > lastTabIndex ) {
- index = 0;
- }
- if ( index < 0 ) {
- index = lastTabIndex;
- }
- return index;
- }
-
- while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {
- index = goingForward ? index + 1 : index - 1;
- }
-
- return index;
- },
-
- _focusNextTab: function( index, goingForward ) {
- index = this._findNextTab( index, goingForward );
- this.tabs.eq( index ).focus();
- return index;
- },
-
- _setOption: function( key, value ) {
- if ( key === "active" ) {
- // _activate() will handle invalid values and update this.options
- this._activate( value );
- return;
- }
-
- if ( key === "disabled" ) {
- // don't use the widget factory's disabled handling
- this._setupDisabled( value );
- return;
- }
-
- this._super( key, value);
-
- if ( key === "collapsible" ) {
- this.element.toggleClass( "ui-tabs-collapsible", value );
- // Setting collapsible: false while collapsed; open first panel
- if ( !value && this.options.active === false ) {
- this._activate( 0 );
- }
- }
-
- if ( key === "event" ) {
- this._setupEvents( value );
- }
-
- if ( key === "heightStyle" ) {
- this._setupHeightStyle( value );
- }
- },
-
- _tabId: function( tab ) {
- return tab.attr( "aria-controls" ) || "ui-tabs-" + getNextTabId();
- },
-
- _sanitizeSelector: function( hash ) {
- return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : "";
- },
-
- refresh: function() {
- var options = this.options,
- lis = this.tablist.children( ":has(a[href])" );
-
- // get disabled tabs from class attribute from HTML
- // this will get converted to a boolean if needed in _refresh()
- options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) {
- return lis.index( tab );
- });
-
- this._processTabs();
-
- // was collapsed or no tabs
- if ( options.active === false || !this.anchors.length ) {
- options.active = false;
- this.active = $();
- // was active, but active tab is gone
- } else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {
- // all remaining tabs are disabled
- if ( this.tabs.length === options.disabled.length ) {
- options.active = false;
- this.active = $();
- // activate previous tab
- } else {
- this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );
- }
- // was active, active tab still exists
- } else {
- // make sure active index is correct
- options.active = this.tabs.index( this.active );
- }
-
- this._refresh();
- },
-
- _refresh: function() {
- this._setupDisabled( this.options.disabled );
- this._setupEvents( this.options.event );
- this._setupHeightStyle( this.options.heightStyle );
-
- this.tabs.not( this.active ).attr({
- "aria-selected": "false",
- tabIndex: -1
- });
- this.panels.not( this._getPanelForTab( this.active ) )
- .hide()
- .attr({
- "aria-expanded": "false",
- "aria-hidden": "true"
- });
-
- // Make sure one tab is in the tab order
- if ( !this.active.length ) {
- this.tabs.eq( 0 ).attr( "tabIndex", 0 );
- } else {
- this.active
- .addClass( "ui-tabs-active ui-state-active" )
- .attr({
- "aria-selected": "true",
- tabIndex: 0
- });
- this._getPanelForTab( this.active )
- .show()
- .attr({
- "aria-expanded": "true",
- "aria-hidden": "false"
- });
- }
- },
-
- _processTabs: function() {
- var that = this;
-
- this.tablist = this._getList()
- .addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
- .attr( "role", "tablist" );
-
- this.tabs = this.tablist.find( "> li:has(a[href])" )
- .addClass( "ui-state-default ui-corner-top" )
- .attr({
- role: "tab",
- tabIndex: -1
- });
-
- this.anchors = this.tabs.map(function() {
- return $( "a", this )[ 0 ];
- })
- .addClass( "ui-tabs-anchor" )
- .attr({
- role: "presentation",
- tabIndex: -1
- });
-
- this.panels = $();
-
- this.anchors.each(function( i, anchor ) {
- var selector, panel, panelId,
- anchorId = $( anchor ).uniqueId().attr( "id" ),
- tab = $( anchor ).closest( "li" ),
- originalAriaControls = tab.attr( "aria-controls" );
-
- // inline tab
- if ( isLocal( anchor ) ) {
- selector = anchor.hash;
- panel = that.element.find( that._sanitizeSelector( selector ) );
- // remote tab
- } else {
- panelId = that._tabId( tab );
- selector = "#" + panelId;
- panel = that.element.find( selector );
- if ( !panel.length ) {
- panel = that._createPanel( panelId );
- panel.insertAfter( that.panels[ i - 1 ] || that.tablist );
- }
- panel.attr( "aria-live", "polite" );
- }
-
- if ( panel.length) {
- that.panels = that.panels.add( panel );
- }
- if ( originalAriaControls ) {
- tab.data( "ui-tabs-aria-controls", originalAriaControls );
- }
- tab.attr({
- "aria-controls": selector.substring( 1 ),
- "aria-labelledby": anchorId
- });
- panel.attr( "aria-labelledby", anchorId );
- });
-
- this.panels
- .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
- .attr( "role", "tabpanel" );
- },
-
- // allow overriding how to find the list for rare usage scenarios (#7715)
- _getList: function() {
- return this.element.find( "ol,ul" ).eq( 0 );
- },
-
- _createPanel: function( id ) {
- return $( "<div>" )
- .attr( "id", id )
- .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
- .data( "ui-tabs-destroy", true );
- },
-
- _setupDisabled: function( disabled ) {
- if ( $.isArray( disabled ) ) {
- if ( !disabled.length ) {
- disabled = false;
- } else if ( disabled.length === this.anchors.length ) {
- disabled = true;
- }
- }
-
- // disable tabs
- for ( var i = 0, li; ( li = this.tabs[ i ] ); i++ ) {
- if ( disabled === true || $.inArray( i, disabled ) !== -1 ) {
- $( li )
- .addClass( "ui-state-disabled" )
- .attr( "aria-disabled", "true" );
- } else {
- $( li )
- .removeClass( "ui-state-disabled" )
- .removeAttr( "aria-disabled" );
- }
- }
-
- this.options.disabled = disabled;
- },
-
- _setupEvents: function( event ) {
- var events = {
- click: function( event ) {
- event.preventDefault();
- }
- };
- if ( event ) {
- $.each( event.split(" "), function( index, eventName ) {
- events[ eventName ] = "_eventHandler";
- });
- }
-
- this._off( this.anchors.add( this.tabs ).add( this.panels ) );
- this._on( this.anchors, events );
- this._on( this.tabs, { keydown: "_tabKeydown" } );
- this._on( this.panels, { keydown: "_panelKeydown" } );
-
- this._focusable( this.tabs );
- this._hoverable( this.tabs );
- },
-
- _setupHeightStyle: function( heightStyle ) {
- var maxHeight, overflow,
- parent = this.element.parent();
-
- if ( heightStyle === "fill" ) {
- // IE 6 treats height like minHeight, so we need to turn off overflow
- // in order to get a reliable height
- // we use the minHeight support test because we assume that only
- // browsers that don't support minHeight will treat height as minHeight
- if ( !$.support.minHeight ) {
- overflow = parent.css( "overflow" );
- parent.css( "overflow", "hidden");
- }
- maxHeight = parent.height();
- this.element.siblings( ":visible" ).each(function() {
- var elem = $( this ),
- position = elem.css( "position" );
-
- if ( position === "absolute" || position === "fixed" ) {
- return;
- }
- maxHeight -= elem.outerHeight( true );
- });
- if ( overflow ) {
- parent.css( "overflow", overflow );
- }
-
- this.element.children().not( this.panels ).each(function() {
- maxHeight -= $( this ).outerHeight( true );
- });
-
- this.panels.each(function() {
- $( this ).height( Math.max( 0, maxHeight -
- $( this ).innerHeight() + $( this ).height() ) );
- })
- .css( "overflow", "auto" );
- } else if ( heightStyle === "auto" ) {
- maxHeight = 0;
- this.panels.each(function() {
- maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() );
- }).height( maxHeight );
- }
- },
-
- _eventHandler: function( event ) {
- var options = this.options,
- active = this.active,
- anchor = $( event.currentTarget ),
- tab = anchor.closest( "li" ),
- clickedIsActive = tab[ 0 ] === active[ 0 ],
- collapsing = clickedIsActive && options.collapsible,
- toShow = collapsing ? $() : this._getPanelForTab( tab ),
- toHide = !active.length ? $() : this._getPanelForTab( active ),
- eventData = {
- oldTab: active,
- oldPanel: toHide,
- newTab: collapsing ? $() : tab,
- newPanel: toShow
- };
-
- event.preventDefault();
-
- if ( tab.hasClass( "ui-state-disabled" ) ||
- // tab is already loading
- tab.hasClass( "ui-tabs-loading" ) ||
- // can't switch durning an animation
- this.running ||
- // click on active header, but not collapsible
- ( clickedIsActive && !options.collapsible ) ||
- // allow canceling activation
- ( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
- return;
- }
-
- options.active = collapsing ? false : this.tabs.index( tab );
-
- this.active = clickedIsActive ? $() : tab;
- if ( this.xhr ) {
- this.xhr.abort();
- }
-
- if ( !toHide.length && !toShow.length ) {
- $.error( "jQuery UI Tabs: Mismatching fragment identifier." );
- }
-
- if ( toShow.length ) {
- this.load( this.tabs.index( tab ), event );
- }
- this._toggle( event, eventData );
- },
-
- // handles show/hide for selecting tabs
- _toggle: function( event, eventData ) {
- var that = this,
- toShow = eventData.newPanel,
- toHide = eventData.oldPanel;
-
- this.running = true;
-
- function complete() {
- that.running = false;
- that._trigger( "activate", event, eventData );
- }
-
- function show() {
- eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" );
-
- if ( toShow.length && that.options.show ) {
- that._show( toShow, that.options.show, complete );
- } else {
- toShow.show();
- complete();
- }
- }
-
- // start out by hiding, then showing, then completing
- if ( toHide.length && this.options.hide ) {
- this._hide( toHide, this.options.hide, function() {
- eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
- show();
- });
- } else {
- eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
- toHide.hide();
- show();
- }
-
- toHide.attr({
- "aria-expanded": "false",
- "aria-hidden": "true"
- });
- eventData.oldTab.attr( "aria-selected", "false" );
- // If we're switching tabs, remove the old tab from the tab order.
- // If we're opening from collapsed state, remove the previous tab from the tab order.
- // If we're collapsing, then keep the collapsing tab in the tab order.
- if ( toShow.length && toHide.length ) {
- eventData.oldTab.attr( "tabIndex", -1 );
- } else if ( toShow.length ) {
- this.tabs.filter(function() {
- return $( this ).attr( "tabIndex" ) === 0;
- })
- .attr( "tabIndex", -1 );
- }
-
- toShow.attr({
- "aria-expanded": "true",
- "aria-hidden": "false"
- });
- eventData.newTab.attr({
- "aria-selected": "true",
- tabIndex: 0
- });
- },
-
- _activate: function( index ) {
- var anchor,
- active = this._findActive( index );
-
- // trying to activate the already active panel
- if ( active[ 0 ] === this.active[ 0 ] ) {
- return;
- }
-
- // trying to collapse, simulate a click on the current active header
- if ( !active.length ) {
- active = this.active;
- }
-
- anchor = active.find( ".ui-tabs-anchor" )[ 0 ];
- this._eventHandler({
- target: anchor,
- currentTarget: anchor,
- preventDefault: $.noop
- });
- },
-
- _findActive: function( index ) {
- return index === false ? $() : this.tabs.eq( index );
- },
-
- _getIndex: function( index ) {
- // meta-function to give users option to provide a href string instead of a numerical index.
- if ( typeof index === "string" ) {
- index = this.anchors.index( this.anchors.filter( "[href$='" + index + "']" ) );
- }
-
- return index;
- },
-
- _destroy: function() {
- if ( this.xhr ) {
- this.xhr.abort();
- }
-
- this.element.removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" );
-
- this.tablist
- .removeClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
- .removeAttr( "role" );
-
- this.anchors
- .removeClass( "ui-tabs-anchor" )
- .removeAttr( "role" )
- .removeAttr( "tabIndex" )
- .removeData( "href.tabs" )
- .removeData( "load.tabs" )
- .removeUniqueId();
-
- this.tabs.add( this.panels ).each(function() {
- if ( $.data( this, "ui-tabs-destroy" ) ) {
- $( this ).remove();
- } else {
- $( this )
- .removeClass( "ui-state-default ui-state-active ui-state-disabled " +
- "ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel" )
- .removeAttr( "tabIndex" )
- .removeAttr( "aria-live" )
- .removeAttr( "aria-busy" )
- .removeAttr( "aria-selected" )
- .removeAttr( "aria-labelledby" )
- .removeAttr( "aria-hidden" )
- .removeAttr( "aria-expanded" )
- .removeAttr( "role" );
- }
- });
-
- this.tabs.each(function() {
- var li = $( this ),
- prev = li.data( "ui-tabs-aria-controls" );
- if ( prev ) {
- li.attr( "aria-controls", prev );
- } else {
- li.removeAttr( "aria-controls" );
- }
- });
-
- this.panels.show();
-
- if ( this.options.heightStyle !== "content" ) {
- this.panels.css( "height", "" );
- }
- },
-
- enable: function( index ) {
- var disabled = this.options.disabled;
- if ( disabled === false ) {
- return;
- }
-
- if ( index === undefined ) {
- disabled = false;
- } else {
- index = this._getIndex( index );
- if ( $.isArray( disabled ) ) {
- disabled = $.map( disabled, function( num ) {
- return num !== index ? num : null;
- });
- } else {
- disabled = $.map( this.tabs, function( li, num ) {
- return num !== index ? num : null;
- });
- }
- }
- this._setupDisabled( disabled );
- },
-
- disable: function( index ) {
- var disabled = this.options.disabled;
- if ( disabled === true ) {
- return;
- }
-
- if ( index === undefined ) {
- disabled = true;
- } else {
- index = this._getIndex( index );
- if ( $.inArray( index, disabled ) !== -1 ) {
- return;
- }
- if ( $.isArray( disabled ) ) {
- disabled = $.merge( [ index ], disabled ).sort();
- } else {
- disabled = [ index ];
- }
- }
- this._setupDisabled( disabled );
- },
-
- load: function( index, event ) {
- index = this._getIndex( index );
- var that = this,
- tab = this.tabs.eq( index ),
- anchor = tab.find( ".ui-tabs-anchor" ),
- panel = this._getPanelForTab( tab ),
- eventData = {
- tab: tab,
- panel: panel
- };
-
- // not remote
- if ( isLocal( anchor[ 0 ] ) ) {
- return;
- }
-
- this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );
-
- // support: jQuery <1.8
- // jQuery <1.8 returns false if the request is canceled in beforeSend,
- // but as of 1.8, $.ajax() always returns a jqXHR object.
- if ( this.xhr && this.xhr.statusText !== "canceled" ) {
- tab.addClass( "ui-tabs-loading" );
- panel.attr( "aria-busy", "true" );
-
- this.xhr
- .success(function( response ) {
- // support: jQuery <1.8
- // http://bugs.jquery.com/ticket/11778
- setTimeout(function() {
- panel.html( response );
- that._trigger( "load", event, eventData );
- }, 1 );
- })
- .complete(function( jqXHR, status ) {
- // support: jQuery <1.8
- // http://bugs.jquery.com/ticket/11778
- setTimeout(function() {
- if ( status === "abort" ) {
- that.panels.stop( false, true );
- }
-
- tab.removeClass( "ui-tabs-loading" );
- panel.removeAttr( "aria-busy" );
-
- if ( jqXHR === that.xhr ) {
- delete that.xhr;
- }
- }, 1 );
- });
- }
- },
-
- // TODO: Remove this function in 1.10 when ajaxOptions is removed
- _ajaxSettings: function( anchor, event, eventData ) {
- var that = this;
- return {
- url: anchor.attr( "href" ),
- beforeSend: function( jqXHR, settings ) {
- return that._trigger( "beforeLoad", event,
- $.extend( { jqXHR : jqXHR, ajaxSettings: settings }, eventData ) );
- }
- };
- },
-
- _getPanelForTab: function( tab ) {
- var id = $( tab ).attr( "aria-controls" );
- return this.element.find( this._sanitizeSelector( "#" + id ) );
- }
-});
-
-// DEPRECATED
-if ( $.uiBackCompat !== false ) {
-
- // helper method for a lot of the back compat extensions
- $.ui.tabs.prototype._ui = function( tab, panel ) {
- return {
- tab: tab,
- panel: panel,
- index: this.anchors.index( tab )
- };
- };
-
- // url method
- $.widget( "ui.tabs", $.ui.tabs, {
- url: function( index, url ) {
- this.anchors.eq( index ).attr( "href", url );
- }
- });
-
- // TODO: Remove _ajaxSettings() method when removing this extension
- // ajaxOptions and cache options
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- ajaxOptions: null,
- cache: false
- },
-
- _create: function() {
- this._super();
-
- var that = this;
-
- this._on({ tabsbeforeload: function( event, ui ) {
- // tab is already cached
- if ( $.data( ui.tab[ 0 ], "cache.tabs" ) ) {
- event.preventDefault();
- return;
- }
-
- ui.jqXHR.success(function() {
- if ( that.options.cache ) {
- $.data( ui.tab[ 0 ], "cache.tabs", true );
- }
- });
- }});
- },
-
- _ajaxSettings: function( anchor, event, ui ) {
- var ajaxOptions = this.options.ajaxOptions;
- return $.extend( {}, ajaxOptions, {
- error: function( xhr, status ) {
- try {
- // Passing index avoid a race condition when this method is
- // called after the user has selected another tab.
- // Pass the anchor that initiated this request allows
- // loadError to manipulate the tab content panel via $(a.hash)
- ajaxOptions.error(
- xhr, status, ui.tab.closest( "li" ).index(), ui.tab[ 0 ] );
- }
- catch ( error ) {}
- }
- }, this._superApply( arguments ) );
- },
-
- _setOption: function( key, value ) {
- // reset cache if switching from cached to not cached
- if ( key === "cache" && value === false ) {
- this.anchors.removeData( "cache.tabs" );
- }
- this._super( key, value );
- },
-
- _destroy: function() {
- this.anchors.removeData( "cache.tabs" );
- this._super();
- },
-
- url: function( index ){
- this.anchors.eq( index ).removeData( "cache.tabs" );
- this._superApply( arguments );
- }
- });
-
- // abort method
- $.widget( "ui.tabs", $.ui.tabs, {
- abort: function() {
- if ( this.xhr ) {
- this.xhr.abort();
- }
- }
- });
-
- // spinner
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- spinner: "<em>Loading&#8230;</em>"
- },
- _create: function() {
- this._super();
- this._on({
- tabsbeforeload: function( event, ui ) {
- // Don't react to nested tabs or tabs that don't use a spinner
- if ( event.target !== this.element[ 0 ] ||
- !this.options.spinner ) {
- return;
- }
-
- var span = ui.tab.find( "span" ),
- html = span.html();
- span.html( this.options.spinner );
- ui.jqXHR.complete(function() {
- span.html( html );
- });
- }
- });
- }
- });
-
- // enable/disable events
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- enable: null,
- disable: null
- },
-
- enable: function( index ) {
- var options = this.options,
- trigger;
-
- if ( index && options.disabled === true ||
- ( $.isArray( options.disabled ) && $.inArray( index, options.disabled ) !== -1 ) ) {
- trigger = true;
- }
-
- this._superApply( arguments );
-
- if ( trigger ) {
- this._trigger( "enable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) );
- }
- },
-
- disable: function( index ) {
- var options = this.options,
- trigger;
-
- if ( index && options.disabled === false ||
- ( $.isArray( options.disabled ) && $.inArray( index, options.disabled ) === -1 ) ) {
- trigger = true;
- }
-
- this._superApply( arguments );
-
- if ( trigger ) {
- this._trigger( "disable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) );
- }
- }
- });
-
- // add/remove methods and events
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- add: null,
- remove: null,
- tabTemplate: "<li><a href='#{href}'><span>#{label}</span></a></li>"
- },
-
- add: function( url, label, index ) {
- if ( index === undefined ) {
- index = this.anchors.length;
- }
-
- var doInsertAfter, panel,
- options = this.options,
- li = $( options.tabTemplate
- .replace( /#\{href\}/g, url )
- .replace( /#\{label\}/g, label ) ),
- id = !url.indexOf( "#" ) ?
- url.replace( "#", "" ) :
- this._tabId( li );
-
- li.addClass( "ui-state-default ui-corner-top" ).data( "ui-tabs-destroy", true );
- li.attr( "aria-controls", id );
-
- doInsertAfter = index >= this.tabs.length;
-
- // try to find an existing element before creating a new one
- panel = this.element.find( "#" + id );
- if ( !panel.length ) {
- panel = this._createPanel( id );
- if ( doInsertAfter ) {
- if ( index > 0 ) {
- panel.insertAfter( this.panels.eq( -1 ) );
- } else {
- panel.appendTo( this.element );
- }
- } else {
- panel.insertBefore( this.panels[ index ] );
- }
- }
- panel.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ).hide();
-
- if ( doInsertAfter ) {
- li.appendTo( this.tablist );
- } else {
- li.insertBefore( this.tabs[ index ] );
- }
-
- options.disabled = $.map( options.disabled, function( n ) {
- return n >= index ? ++n : n;
- });
-
- this.refresh();
- if ( this.tabs.length === 1 && options.active === false ) {
- this.option( "active", 0 );
- }
-
- this._trigger( "add", null, this._ui( this.anchors[ index ], this.panels[ index ] ) );
- return this;
- },
-
- remove: function( index ) {
- index = this._getIndex( index );
- var options = this.options,
- tab = this.tabs.eq( index ).remove(),
- panel = this._getPanelForTab( tab ).remove();
-
- // If selected tab was removed focus tab to the right or
- // in case the last tab was removed the tab to the left.
- // We check for more than 2 tabs, because if there are only 2,
- // then when we remove this tab, there will only be one tab left
- // so we don't need to detect which tab to activate.
- if ( tab.hasClass( "ui-tabs-active" ) && this.anchors.length > 2 ) {
- this._activate( index + ( index + 1 < this.anchors.length ? 1 : -1 ) );
- }
-
- options.disabled = $.map(
- $.grep( options.disabled, function( n ) {
- return n !== index;
- }),
- function( n ) {
- return n >= index ? --n : n;
- });
-
- this.refresh();
-
- this._trigger( "remove", null, this._ui( tab.find( "a" )[ 0 ], panel[ 0 ] ) );
- return this;
- }
- });
-
- // length method
- $.widget( "ui.tabs", $.ui.tabs, {
- length: function() {
- return this.anchors.length;
- }
- });
-
- // panel ids (idPrefix option + title attribute)
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- idPrefix: "ui-tabs-"
- },
-
- _tabId: function( tab ) {
- var a = tab.is( "li" ) ? tab.find( "a[href]" ) : tab;
- a = a[0];
- return $( a ).closest( "li" ).attr( "aria-controls" ) ||
- a.title && a.title.replace( /\s/g, "_" ).replace( /[^\w\u00c0-\uFFFF\-]/g, "" ) ||
- this.options.idPrefix + getNextTabId();
- }
- });
-
- // _createPanel method
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- panelTemplate: "<div></div>"
- },
-
- _createPanel: function( id ) {
- return $( this.options.panelTemplate )
- .attr( "id", id )
- .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
- .data( "ui-tabs-destroy", true );
- }
- });
-
- // selected option
- $.widget( "ui.tabs", $.ui.tabs, {
- _create: function() {
- var options = this.options;
- if ( options.active === null && options.selected !== undefined ) {
- options.active = options.selected === -1 ? false : options.selected;
- }
- this._super();
- options.selected = options.active;
- if ( options.selected === false ) {
- options.selected = -1;
- }
- },
-
- _setOption: function( key, value ) {
- if ( key !== "selected" ) {
- return this._super( key, value );
- }
-
- var options = this.options;
- this._super( "active", value === -1 ? false : value );
- options.selected = options.active;
- if ( options.selected === false ) {
- options.selected = -1;
- }
- },
-
- _eventHandler: function() {
- this._superApply( arguments );
- this.options.selected = this.options.active;
- if ( this.options.selected === false ) {
- this.options.selected = -1;
- }
- }
- });
-
- // show and select event
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- show: null,
- select: null
- },
- _create: function() {
- this._super();
- if ( this.options.active !== false ) {
- this._trigger( "show", null, this._ui(
- this.active.find( ".ui-tabs-anchor" )[ 0 ],
- this._getPanelForTab( this.active )[ 0 ] ) );
- }
- },
- _trigger: function( type, event, data ) {
- var tab, panel,
- ret = this._superApply( arguments );
-
- if ( !ret ) {
- return false;
- }
-
- if ( type === "beforeActivate" ) {
- tab = data.newTab.length ? data.newTab : data.oldTab;
- panel = data.newPanel.length ? data.newPanel : data.oldPanel;
- ret = this._super( "select", event, {
- tab: tab.find( ".ui-tabs-anchor" )[ 0],
- panel: panel[ 0 ],
- index: tab.closest( "li" ).index()
- });
- } else if ( type === "activate" && data.newTab.length ) {
- ret = this._super( "show", event, {
- tab: data.newTab.find( ".ui-tabs-anchor" )[ 0 ],
- panel: data.newPanel[ 0 ],
- index: data.newTab.closest( "li" ).index()
- });
- }
- return ret;
- }
- });
-
- // select method
- $.widget( "ui.tabs", $.ui.tabs, {
- select: function( index ) {
- index = this._getIndex( index );
- if ( index === -1 ) {
- if ( this.options.collapsible && this.options.selected !== -1 ) {
- index = this.options.selected;
- } else {
- return;
- }
- }
- this.anchors.eq( index ).trigger( this.options.event + this.eventNamespace );
- }
- });
-
- // cookie option
- (function() {
-
- var listId = 0;
-
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- cookie: null // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true }
- },
- _create: function() {
- var options = this.options,
- active;
- if ( options.active == null && options.cookie ) {
- active = parseInt( this._cookie(), 10 );
- if ( active === -1 ) {
- active = false;
- }
- options.active = active;
- }
- this._super();
- },
- _cookie: function( active ) {
- var cookie = [ this.cookie ||
- ( this.cookie = this.options.cookie.name || "ui-tabs-" + (++listId) ) ];
- if ( arguments.length ) {
- cookie.push( active === false ? -1 : active );
- cookie.push( this.options.cookie );
- }
- return $.cookie.apply( null, cookie );
- },
- _refresh: function() {
- this._super();
- if ( this.options.cookie ) {
- this._cookie( this.options.active, this.options.cookie );
- }
- },
- _eventHandler: function() {
- this._superApply( arguments );
- if ( this.options.cookie ) {
- this._cookie( this.options.active, this.options.cookie );
- }
- },
- _destroy: function() {
- this._super();
- if ( this.options.cookie ) {
- this._cookie( null, this.options.cookie );
- }
- }
- });
-
- })();
-
- // load event
- $.widget( "ui.tabs", $.ui.tabs, {
- _trigger: function( type, event, data ) {
- var _data = $.extend( {}, data );
- if ( type === "load" ) {
- _data.panel = _data.panel[ 0 ];
- _data.tab = _data.tab.find( ".ui-tabs-anchor" )[ 0 ];
- }
- return this._super( type, event, _data );
- }
- });
-
- // fx option
- // The new animation options (show, hide) conflict with the old show callback.
- // The old fx option wins over show/hide anyway (always favor back-compat).
- // If a user wants to use the new animation API, they must give up the old API.
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- fx: null // e.g. { height: "toggle", opacity: "toggle", duration: 200 }
- },
-
- _getFx: function() {
- var hide, show,
- fx = this.options.fx;
-
- if ( fx ) {
- if ( $.isArray( fx ) ) {
- hide = fx[ 0 ];
- show = fx[ 1 ];
- } else {
- hide = show = fx;
- }
- }
-
- return fx ? { show: show, hide: hide } : null;
- },
-
- _toggle: function( event, eventData ) {
- var that = this,
- toShow = eventData.newPanel,
- toHide = eventData.oldPanel,
- fx = this._getFx();
-
- if ( !fx ) {
- return this._super( event, eventData );
- }
-
- that.running = true;
-
- function complete() {
- that.running = false;
- that._trigger( "activate", event, eventData );
- }
-
- function show() {
- eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" );
-
- if ( toShow.length && fx.show ) {
- toShow
- .animate( fx.show, fx.show.duration, function() {
- complete();
- });
- } else {
- toShow.show();
- complete();
- }
- }
-
- // start out by hiding, then showing, then completing
- if ( toHide.length && fx.hide ) {
- toHide.animate( fx.hide, fx.hide.duration, function() {
- eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
- show();
- });
- } else {
- eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
- toHide.hide();
- show();
- }
- }
- });
-}
-
-})( jQuery );
-(function( $ ) {
-
-var increments = 0;
-
-function addDescribedBy( elem, id ) {
- var describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ );
- describedby.push( id );
- elem
- .data( "ui-tooltip-id", id )
- .attr( "aria-describedby", $.trim( describedby.join( " " ) ) );
-}
-
-function removeDescribedBy( elem ) {
- var id = elem.data( "ui-tooltip-id" ),
- describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ),
- index = $.inArray( id, describedby );
- if ( index !== -1 ) {
- describedby.splice( index, 1 );
- }
-
- elem.removeData( "ui-tooltip-id" );
- describedby = $.trim( describedby.join( " " ) );
- if ( describedby ) {
- elem.attr( "aria-describedby", describedby );
- } else {
- elem.removeAttr( "aria-describedby" );
- }
-}
-
-$.widget( "ui.tooltip", {
- version: "1.9.2",
- options: {
- content: function() {
- return $( this ).attr( "title" );
- },
- hide: true,
- // Disabled elements have inconsistent behavior across browsers (#8661)
- items: "[title]:not([disabled])",
- position: {
- my: "left top+15",
- at: "left bottom",
- collision: "flipfit flip"
- },
- show: true,
- tooltipClass: null,
- track: false,
-
- // callbacks
- close: null,
- open: null
- },
-
- _create: function() {
- this._on({
- mouseover: "open",
- focusin: "open"
- });
-
- // IDs of generated tooltips, needed for destroy
- this.tooltips = {};
- // IDs of parent tooltips where we removed the title attribute
- this.parents = {};
-
- if ( this.options.disabled ) {
- this._disable();
- }
- },
-
- _setOption: function( key, value ) {
- var that = this;
-
- if ( key === "disabled" ) {
- this[ value ? "_disable" : "_enable" ]();
- this.options[ key ] = value;
- // disable element style changes
- return;
- }
-
- this._super( key, value );
-
- if ( key === "content" ) {
- $.each( this.tooltips, function( id, element ) {
- that._updateContent( element );
- });
- }
- },
-
- _disable: function() {
- var that = this;
-
- // close open tooltips
- $.each( this.tooltips, function( id, element ) {
- var event = $.Event( "blur" );
- event.target = event.currentTarget = element[0];
- that.close( event, true );
- });
-
- // remove title attributes to prevent native tooltips
- this.element.find( this.options.items ).andSelf().each(function() {
- var element = $( this );
- if ( element.is( "[title]" ) ) {
- element
- .data( "ui-tooltip-title", element.attr( "title" ) )
- .attr( "title", "" );
- }
- });
- },
-
- _enable: function() {
- // restore title attributes
- this.element.find( this.options.items ).andSelf().each(function() {
- var element = $( this );
- if ( element.data( "ui-tooltip-title" ) ) {
- element.attr( "title", element.data( "ui-tooltip-title" ) );
- }
- });
- },
-
- open: function( event ) {
- var that = this,
- target = $( event ? event.target : this.element )
- // we need closest here due to mouseover bubbling,
- // but always pointing at the same event target
- .closest( this.options.items );
-
- // No element to show a tooltip for or the tooltip is already open
- if ( !target.length || target.data( "ui-tooltip-id" ) ) {
- return;
- }
-
- if ( target.attr( "title" ) ) {
- target.data( "ui-tooltip-title", target.attr( "title" ) );
- }
-
- target.data( "ui-tooltip-open", true );
-
- // kill parent tooltips, custom or native, for hover
- if ( event && event.type === "mouseover" ) {
- target.parents().each(function() {
- var parent = $( this ),
- blurEvent;
- if ( parent.data( "ui-tooltip-open" ) ) {
- blurEvent = $.Event( "blur" );
- blurEvent.target = blurEvent.currentTarget = this;
- that.close( blurEvent, true );
- }
- if ( parent.attr( "title" ) ) {
- parent.uniqueId();
- that.parents[ this.id ] = {
- element: this,
- title: parent.attr( "title" )
- };
- parent.attr( "title", "" );
- }
- });
- }
-
- this._updateContent( target, event );
- },
-
- _updateContent: function( target, event ) {
- var content,
- contentOption = this.options.content,
- that = this,
- eventType = event ? event.type : null;
-
- if ( typeof contentOption === "string" ) {
- return this._open( event, target, contentOption );
- }
-
- content = contentOption.call( target[0], function( response ) {
- // ignore async response if tooltip was closed already
- if ( !target.data( "ui-tooltip-open" ) ) {
- return;
- }
- // IE may instantly serve a cached response for ajax requests
- // delay this call to _open so the other call to _open runs first
- that._delay(function() {
- // jQuery creates a special event for focusin when it doesn't
- // exist natively. To improve performance, the native event
- // object is reused and the type is changed. Therefore, we can't
- // rely on the type being correct after the event finished
- // bubbling, so we set it back to the previous value. (#8740)
- if ( event ) {
- event.type = eventType;
- }
- this._open( event, target, response );
- });
- });
- if ( content ) {
- this._open( event, target, content );
- }
- },
-
- _open: function( event, target, content ) {
- var tooltip, events, delayedShow,
- positionOption = $.extend( {}, this.options.position );
-
- if ( !content ) {
- return;
- }
-
- // Content can be updated multiple times. If the tooltip already
- // exists, then just update the content and bail.
- tooltip = this._find( target );
- if ( tooltip.length ) {
- tooltip.find( ".ui-tooltip-content" ).html( content );
- return;
- }
-
- // if we have a title, clear it to prevent the native tooltip
- // we have to check first to avoid defining a title if none exists
- // (we don't want to cause an element to start matching [title])
- //
- // We use removeAttr only for key events, to allow IE to export the correct
- // accessible attributes. For mouse events, set to empty string to avoid
- // native tooltip showing up (happens only when removing inside mouseover).
- if ( target.is( "[title]" ) ) {
- if ( event && event.type === "mouseover" ) {
- target.attr( "title", "" );
- } else {
- target.removeAttr( "title" );
- }
- }
-
- tooltip = this._tooltip( target );
- addDescribedBy( target, tooltip.attr( "id" ) );
- tooltip.find( ".ui-tooltip-content" ).html( content );
-
- function position( event ) {
- positionOption.of = event;
- if ( tooltip.is( ":hidden" ) ) {
- return;
- }
- tooltip.position( positionOption );
- }
- if ( this.options.track && event && /^mouse/.test( event.type ) ) {
- this._on( this.document, {
- mousemove: position
- });
- // trigger once to override element-relative positioning
- position( event );
- } else {
- tooltip.position( $.extend({
- of: target
- }, this.options.position ) );
- }
-
- tooltip.hide();
-
- this._show( tooltip, this.options.show );
- // Handle tracking tooltips that are shown with a delay (#8644). As soon
- // as the tooltip is visible, position the tooltip using the most recent
- // event.
- if ( this.options.show && this.options.show.delay ) {
- delayedShow = setInterval(function() {
- if ( tooltip.is( ":visible" ) ) {
- position( positionOption.of );
- clearInterval( delayedShow );
- }
- }, $.fx.interval );
- }
-
- this._trigger( "open", event, { tooltip: tooltip } );
-
- events = {
- keyup: function( event ) {
- if ( event.keyCode === $.ui.keyCode.ESCAPE ) {
- var fakeEvent = $.Event(event);
- fakeEvent.currentTarget = target[0];
- this.close( fakeEvent, true );
- }
- },
- remove: function() {
- this._removeTooltip( tooltip );
- }
- };
- if ( !event || event.type === "mouseover" ) {
- events.mouseleave = "close";
- }
- if ( !event || event.type === "focusin" ) {
- events.focusout = "close";
- }
- this._on( true, target, events );
- },
-
- close: function( event ) {
- var that = this,
- target = $( event ? event.currentTarget : this.element ),
- tooltip = this._find( target );
-
- // disabling closes the tooltip, so we need to track when we're closing
- // to avoid an infinite loop in case the tooltip becomes disabled on close
- if ( this.closing ) {
- return;
- }
-
- // only set title if we had one before (see comment in _open())
- if ( target.data( "ui-tooltip-title" ) ) {
- target.attr( "title", target.data( "ui-tooltip-title" ) );
- }
-
- removeDescribedBy( target );
-
- tooltip.stop( true );
- this._hide( tooltip, this.options.hide, function() {
- that._removeTooltip( $( this ) );
- });
-
- target.removeData( "ui-tooltip-open" );
- this._off( target, "mouseleave focusout keyup" );
- // Remove 'remove' binding only on delegated targets
- if ( target[0] !== this.element[0] ) {
- this._off( target, "remove" );
- }
- this._off( this.document, "mousemove" );
-
- if ( event && event.type === "mouseleave" ) {
- $.each( this.parents, function( id, parent ) {
- $( parent.element ).attr( "title", parent.title );
- delete that.parents[ id ];
- });
- }
-
- this.closing = true;
- this._trigger( "close", event, { tooltip: tooltip } );
- this.closing = false;
- },
-
- _tooltip: function( element ) {
- var id = "ui-tooltip-" + increments++,
- tooltip = $( "<div>" )
- .attr({
- id: id,
- role: "tooltip"
- })
- .addClass( "ui-tooltip ui-widget ui-corner-all ui-widget-content " +
- ( this.options.tooltipClass || "" ) );
- $( "<div>" )
- .addClass( "ui-tooltip-content" )
- .appendTo( tooltip );
- tooltip.appendTo( this.document[0].body );
- if ( $.fn.bgiframe ) {
- tooltip.bgiframe();
- }
- this.tooltips[ id ] = element;
- return tooltip;
- },
-
- _find: function( target ) {
- var id = target.data( "ui-tooltip-id" );
- return id ? $( "#" + id ) : $();
- },
-
- _removeTooltip: function( tooltip ) {
- tooltip.remove();
- delete this.tooltips[ tooltip.attr( "id" ) ];
- },
-
- _destroy: function() {
- var that = this;
-
- // close open tooltips
- $.each( this.tooltips, function( id, element ) {
- // Delegate to close method to handle common cleanup
- var event = $.Event( "blur" );
- event.target = event.currentTarget = element[0];
- that.close( event, true );
-
- // Remove immediately; destroying an open tooltip doesn't use the
- // hide animation
- $( "#" + id ).remove();
-
- // Restore the title
- if ( element.data( "ui-tooltip-title" ) ) {
- element.attr( "title", element.data( "ui-tooltip-title" ) );
- element.removeData( "ui-tooltip-title" );
- }
- });
- }
-});
-
-}( jQuery ) ); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/js/layout/jquery.layout-latest.js b/ecomp-portal-BE/war/static/fusion/js/layout/jquery.layout-latest.js
deleted file mode 100644
index 434724d9..00000000
--- a/ecomp-portal-BE/war/static/fusion/js/layout/jquery.layout-latest.js
+++ /dev/null
@@ -1,6086 +0,0 @@
-/**
- * @preserve
- * jquery.layout 1.4.3
- * $Date: 2015/03/13 22:37:04 $
- * $Rev: 1.0403 $
- *
- * Copyright (c) 2014 Kevin Dalman (http://jquery-dev.com)
- * Based on work by Fabrizio Balliano (http://www.fabrizioballiano.net)
- *
- * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
- * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
- *
- * SEE: http://layout.jquery-dev.com/LICENSE.txt
- *
- * Changelog: http://layout.jquery-dev.com/changelog.cfm
- *
- * Docs: http://layout.jquery-dev.com/documentation.html
- * Tips: http://layout.jquery-dev.com/tips.html
- * Help: http://groups.google.com/group/jquery-ui-layout
- */
-
-/* JavaDoc Info: http://code.google.com/closure/compiler/docs/js-for-compiler.html
- * {!Object} non-nullable type (never NULL)
- * {?string} nullable type (sometimes NULL) - default for {Object}
- * {number=} optional parameter
- * {*} ALL types
- */
-/* TODO for jQ 2.0
- * change .andSelf() to .addBack()
- * check $.fn.disableSelection - this is in jQuery UI 1.9.x
- */
-
-// NOTE: For best readability, view with a fixed-width font and tabs equal to 4-chars
-
-;(function ($) {
-
-// alias Math methods - used a lot!
-var min = Math.min
-, max = Math.max
-, round = Math.floor
-
-, isStr = function (v) { return $.type(v) === "string"; }
-
- /**
- * @param {!Object} Instance
- * @param {Array.<string>} a_fn
- */
-, runPluginCallbacks = function (Instance, a_fn) {
- if ($.isArray(a_fn))
- for (var i=0, c=a_fn.length; i<c; i++) {
- var fn = a_fn[i];
- try {
- if (isStr(fn)) // 'name' of a function
- fn = eval(fn);
- if ($.isFunction(fn))
- g(fn)( Instance );
- } catch (ex) {}
- }
- function g (f) { return f; }; // compiler hack
- }
-;
-
-/*
- * GENERIC $.layout METHODS - used by all layouts
- */
-$.layout = {
-
- version: "1.4.3"
-, revision: 1.0403 // eg: 1.4.1 final = 1.0401 - major(n+).minor(nn)+patch(nn+)
-
- // $.layout.browser REPLACES $.browser
-, browser: {} // set below
-
- // *PREDEFINED* EFFECTS & DEFAULTS
- // MUST list effect here - OR MUST set an fxSettings option (can be an empty hash: {})
-, effects: {
-
- // Pane Open/Close Animations
- slide: {
- all: { duration: "fast" } // eg: duration: 1000, easing: "easeOutBounce"
- , north: { direction: "up" }
- , south: { direction: "down" }
- , east: { direction: "right"}
- , west: { direction: "left" }
- }
- , drop: {
- all: { duration: "slow" }
- , north: { direction: "up" }
- , south: { direction: "down" }
- , east: { direction: "right"}
- , west: { direction: "left" }
- }
- , scale: {
- all: { duration: "fast" }
- }
- // these are not recommended, but can be used
- , blind: {}
- , clip: {}
- , explode: {}
- , fade: {}
- , fold: {}
- , puff: {}
-
- // Pane Resize Animations
- , size: {
- all: { easing: "swing" }
- }
- }
-
- // INTERNAL CONFIG DATA - DO NOT CHANGE THIS!
-, config: {
- optionRootKeys: "effects,panes,north,south,west,east,center".split(",")
- , allPanes: "north,south,west,east,center".split(",")
- , borderPanes: "north,south,west,east".split(",")
- , oppositeEdge: {
- north: "south"
- , south: "north"
- , east: "west"
- , west: "east"
- }
- // offscreen data
- , offscreenCSS: { left: "-99999px", right: "auto" } // used by hide/close if useOffscreenClose=true
- , offscreenReset: "offscreenReset" // key used for data
- // CSS used in multiple places
- , hidden: { visibility: "hidden" }
- , visible: { visibility: "visible" }
- // layout element settings
- , resizers: {
- cssReq: {
- position: "absolute"
- , padding: 0
- , margin: 0
- , fontSize: "1px"
- , textAlign: "left" // to counter-act "center" alignment!
- , overflow: "hidden" // prevent toggler-button from overflowing
- // SEE $.layout.defaults.zIndexes.resizer_normal
- }
- , cssDemo: { // DEMO CSS - applied if: options.PANE.applyDemoStyles=true
- background: "#DDD"
- , border: "none"
- }
- }
- , togglers: {
- cssReq: {
- position: "absolute"
- , display: "block"
- , padding: 0
- , margin: 0
- , overflow: "hidden"
- , textAlign: "center"
- , fontSize: "1px"
- , cursor: "pointer"
- , zIndex: 1
- }
- , cssDemo: { // DEMO CSS - applied if: options.PANE.applyDemoStyles=true
- background: "#AAA"
- }
- }
- , content: {
- cssReq: {
- position: "relative" /* contain floated or positioned elements */
- }
- , cssDemo: { // DEMO CSS - applied if: options.PANE.applyDemoStyles=true
- overflow: "auto"
- , padding: "10px"
- }
- , cssDemoPane: { // DEMO CSS - REMOVE scrolling from 'pane' when it has a content-div
- overflow: "hidden"
- , padding: 0
- }
- }
- , panes: { // defaults for ALL panes - overridden by 'per-pane settings' below
- cssReq: {
- position: "absolute"
- , margin: 0
- // $.layout.defaults.zIndexes.pane_normal
- }
- , cssDemo: { // DEMO CSS - applied if: options.PANE.applyDemoStyles=true
- padding: "10px"
- , background: "#FFF"
- , border: "1px solid #BBB"
- , overflow: "auto"
- }
- }
- , north: {
- side: "top"
- , sizeType: "Height"
- , dir: "horz"
- , cssReq: {
- top: 0
- , bottom: "auto"
- , left: 0
- , right: 0
- , width: "auto"
- // height: DYNAMIC
- }
- }
- , south: {
- side: "bottom"
- , sizeType: "Height"
- , dir: "horz"
- , cssReq: {
- top: "auto"
- , bottom: 0
- , left: 0
- , right: 0
- , width: "auto"
- // height: DYNAMIC
- }
- }
- , east: {
- side: "right"
- , sizeType: "Width"
- , dir: "vert"
- , cssReq: {
- left: "auto"
- , right: 0
- , top: "auto" // DYNAMIC
- , bottom: "auto" // DYNAMIC
- , height: "auto"
- // width: DYNAMIC
- }
- }
- , west: {
- side: "left"
- , sizeType: "Width"
- , dir: "vert"
- , cssReq: {
- left: 0
- , right: "auto"
- , top: "auto" // DYNAMIC
- , bottom: "auto" // DYNAMIC
- , height: "auto"
- // width: DYNAMIC
- }
- }
- , center: {
- dir: "center"
- , cssReq: {
- left: "auto" // DYNAMIC
- , right: "auto" // DYNAMIC
- , top: "auto" // DYNAMIC
- , bottom: "auto" // DYNAMIC
- , height: "auto"
- , width: "auto"
- }
- }
- }
-
- // CALLBACK FUNCTION NAMESPACE - used to store reusable callback functions
-, callbacks: {}
-
-, getParentPaneElem: function (el) {
- // must pass either a container or pane element
- var $el = $(el)
- , layout = $el.data("layout") || $el.data("parentLayout");
- if (layout) {
- var $cont = layout.container;
- // see if this container is directly-nested inside an outer-pane
- if ($cont.data("layoutPane")) return $cont;
- var $pane = $cont.closest("."+ $.layout.defaults.panes.paneClass);
- // if a pane was found, return it
- if ($pane.data("layoutPane")) return $pane;
- }
- return null;
- }
-
-, getParentPaneInstance: function (el) {
- // must pass either a container or pane element
- var $pane = $.layout.getParentPaneElem(el);
- return $pane ? $pane.data("layoutPane") : null;
- }
-
-, getParentLayoutInstance: function (el) {
- // must pass either a container or pane element
- var $pane = $.layout.getParentPaneElem(el);
- return $pane ? $pane.data("parentLayout") : null;
- }
-
-, getEventObject: function (evt) {
- return typeof evt === "object" && evt.stopPropagation ? evt : null;
- }
-, parsePaneName: function (evt_or_pane) {
- var evt = $.layout.getEventObject( evt_or_pane )
- , pane = evt_or_pane;
- if (evt) {
- // ALWAYS stop propagation of events triggered in Layout!
- evt.stopPropagation();
- pane = $(this).data("layoutEdge");
- }
- if (pane && !/^(west|east|north|south|center)$/.test(pane)) {
- $.layout.msg('LAYOUT ERROR - Invalid pane-name: "'+ pane +'"');
- pane = "error";
- }
- return pane;
- }
-
-
- // LAYOUT-PLUGIN REGISTRATION
- // more plugins can added beyond this default list
-, plugins: {
- draggable: !!$.fn.draggable // resizing
- , effects: {
- core: !!$.effects // animimations (specific effects tested by initOptions)
- , slide: $.effects && ($.effects.slide || ($.effects.effect && $.effects.effect.slide)) // default effect
- }
- }
-
-// arrays of plugin or other methods to be triggered for events in *each layout* - will be passed 'Instance'
-, onCreate: [] // runs when layout is just starting to be created - right after options are set
-, onLoad: [] // runs after layout container and global events init, but before initPanes is called
-, onReady: [] // runs after initialization *completes* - ie, after initPanes completes successfully
-, onDestroy: [] // runs after layout is destroyed
-, onUnload: [] // runs after layout is destroyed OR when page unloads
-, afterOpen: [] // runs after setAsOpen() completes
-, afterClose: [] // runs after setAsClosed() completes
-
- /*
- * GENERIC UTILITY METHODS
- */
-
- // calculate and return the scrollbar width, as an integer
-, scrollbarWidth: function () { return window.scrollbarWidth || $.layout.getScrollbarSize('width'); }
-, scrollbarHeight: function () { return window.scrollbarHeight || $.layout.getScrollbarSize('height'); }
-, getScrollbarSize: function (dim) {
- var $c = $('<div style="position: absolute; top: -10000px; left: -10000px; width: 100px; height: 100px; border: 0; overflow: scroll;"></div>').appendTo("body")
- , d = { width: $c.outerWidth - $c[0].clientWidth, height: 100 - $c[0].clientHeight };
- $c.remove();
- window.scrollbarWidth = d.width;
- window.scrollbarHeight = d.height;
- return dim.match(/^(width|height)$/) ? d[dim] : d;
- }
-
-
-, disableTextSelection: function () {
- var $d = $(document)
- , s = 'textSelectionDisabled'
- , x = 'textSelectionInitialized'
- ;
- if ($.fn.disableSelection) {
- if (!$d.data(x)) // document hasn't been initialized yet
- $d.on('mouseup', $.layout.enableTextSelection ).data(x, true);
- if (!$d.data(s))
- $d.disableSelection().data(s, true);
- }
- }
-, enableTextSelection: function () {
- var $d = $(document)
- , s = 'textSelectionDisabled';
- if ($.fn.enableSelection && $d.data(s))
- $d.enableSelection().data(s, false);
- }
-
-
- /**
- * Returns hash container 'display' and 'visibility'
- *
- * @see $.swap() - swaps CSS, runs callback, resets CSS
- * @param {!Object} $E jQuery element
- * @param {boolean=} [force=false] Run even if display != none
- * @return {!Object} Returns current style props, if applicable
- */
-, showInvisibly: function ($E, force) {
- if ($E && $E.length && (force || $E.css("display") === "none")) { // only if not *already hidden*
- var s = $E[0].style
- // save ONLY the 'style' props because that is what we must restore
- , CSS = { display: s.display || '', visibility: s.visibility || '' };
- // show element 'invisibly' so can be measured
- $E.css({ display: "block", visibility: "hidden" });
- return CSS;
- }
- return {};
- }
-
- /**
- * Returns data for setting size of an element (container or a pane).
- *
- * @see _create(), onWindowResize() for container, plus others for pane
- * @return JSON Returns a hash of all dimensions: top, bottom, left, right, outerWidth, innerHeight, etc
- */
-, getElementDimensions: function ($E, inset) {
- var
- // dimensions hash - start with current data IF passed
- d = { css: {}, inset: {} }
- , x = d.css // CSS hash
- , i = { bottom: 0 } // TEMP insets (bottom = complier hack)
- , N = $.layout.cssNum
- , R = Math.round
- , off = $E.offset()
- , b, p, ei // TEMP border, padding
- ;
- d.offsetLeft = off.left;
- d.offsetTop = off.top;
-
- if (!inset) inset = {}; // simplify logic below
-
- $.each("Left,Right,Top,Bottom".split(","), function (idx, e) { // e = edge
- b = x["border" + e] = $.layout.borderWidth($E, e);
- p = x["padding"+ e] = $.layout.cssNum($E, "padding"+e);
- ei = e.toLowerCase();
- d.inset[ei] = inset[ei] >= 0 ? inset[ei] : p; // any missing insetX value = paddingX
- i[ei] = d.inset[ei] + b; // total offset of content from outer side
- });
-
- x.width = R($E.width());
- x.height = R($E.height());
- x.top = N($E,"top",true);
- x.bottom = N($E,"bottom",true);
- x.left = N($E,"left",true);
- x.right = N($E,"right",true);
-
- d.outerWidth = R($E.outerWidth());
- d.outerHeight = R($E.outerHeight());
- // calc the TRUE inner-dimensions, even in quirks-mode!
- d.innerWidth = max(0, d.outerWidth - i.left - i.right);
- d.innerHeight = max(0, d.outerHeight - i.top - i.bottom);
- // layoutWidth/Height is used in calcs for manual resizing
- // layoutW/H only differs from innerW/H when in quirks-mode - then is like outerW/H
- d.layoutWidth = R($E.innerWidth());
- d.layoutHeight = R($E.innerHeight());
-
- //if ($E.prop('tagName') === 'BODY') { debugData( d, $E.prop('tagName') ); } // DEBUG
-
- //d.visible = $E.is(":visible");// && x.width > 0 && x.height > 0;
-
- return d;
- }
-
-, getElementStyles: function ($E, list) {
- var
- CSS = {}
- , style = $E[0].style
- , props = list.split(",")
- , sides = "Top,Bottom,Left,Right".split(",")
- , attrs = "Color,Style,Width".split(",")
- , p, s, a, i, j, k
- ;
- for (i=0; i < props.length; i++) {
- p = props[i];
- if (p.match(/(border|padding|margin)$/))
- for (j=0; j < 4; j++) {
- s = sides[j];
- if (p === "border")
- for (k=0; k < 3; k++) {
- a = attrs[k];
- CSS[p+s+a] = style[p+s+a];
- }
- else
- CSS[p+s] = style[p+s];
- }
- else
- CSS[p] = style[p];
- };
- return CSS
- }
-
- /**
- * Return the innerWidth for the current browser/doctype
- *
- * @see initPanes(), sizeMidPanes(), initHandles(), sizeHandles()
- * @param {Array.<Object>} $E Must pass a jQuery object - first element is processed
- * @param {number=} outerWidth (optional) Can pass a width, allowing calculations BEFORE element is resized
- * @return {number} Returns the innerWidth of the elem by subtracting padding and borders
- */
-, cssWidth: function ($E, outerWidth) {
- // a 'calculated' outerHeight can be passed so borders and/or padding are removed if needed
- if (outerWidth <= 0) return 0;
-
- var lb = $.layout.browser
- , bs = !lb.boxModel ? "border-box" : lb.boxSizing ? $E.css("boxSizing") : "content-box"
- , b = $.layout.borderWidth
- , n = $.layout.cssNum
- , W = outerWidth
- ;
- // strip border and/or padding from outerWidth to get CSS Width
- if (bs !== "border-box")
- W -= (b($E, "Left") + b($E, "Right"));
- if (bs === "content-box")
- W -= (n($E, "paddingLeft") + n($E, "paddingRight"));
- return max(0,W);
- }
-
- /**
- * Return the innerHeight for the current browser/doctype
- *
- * @see initPanes(), sizeMidPanes(), initHandles(), sizeHandles()
- * @param {Array.<Object>} $E Must pass a jQuery object - first element is processed
- * @param {number=} outerHeight (optional) Can pass a width, allowing calculations BEFORE element is resized
- * @return {number} Returns the innerHeight of the elem by subtracting padding and borders
- */
-, cssHeight: function ($E, outerHeight) {
- // a 'calculated' outerHeight can be passed so borders and/or padding are removed if needed
- if (outerHeight <= 0) return 0;
-
- var lb = $.layout.browser
- , bs = !lb.boxModel ? "border-box" : lb.boxSizing ? $E.css("boxSizing") : "content-box"
- , b = $.layout.borderWidth
- , n = $.layout.cssNum
- , H = outerHeight
- ;
- // strip border and/or padding from outerHeight to get CSS Height
- if (bs !== "border-box")
- H -= (b($E, "Top") + b($E, "Bottom"));
- if (bs === "content-box")
- H -= (n($E, "paddingTop") + n($E, "paddingBottom"));
- return max(0,H);
- }
-
- /**
- * Returns the 'current CSS numeric value' for a CSS property - 0 if property does not exist
- *
- * @see Called by many methods
- * @param {Array.<Object>} $E Must pass a jQuery object - first element is processed
- * @param {string} prop The name of the CSS property, eg: top, width, etc.
- * @param {boolean=} [allowAuto=false] true = return 'auto' if that is value; false = return 0
- * @return {(string|number)} Usually used to get an integer value for position (top, left) or size (height, width)
- */
-, cssNum: function ($E, prop, allowAuto) {
- if (!$E.jquery) $E = $($E);
- var CSS = $.layout.showInvisibly($E)
- , p = $.css($E[0], prop, true)
- , v = allowAuto && p=="auto" ? p : Math.round(parseFloat(p) || 0);
- $E.css( CSS ); // RESET
- return v;
- }
-
-, borderWidth: function (el, side) {
- if (el.jquery) el = el[0];
- var b = "border"+ side.substr(0,1).toUpperCase() + side.substr(1); // left => Left
- return $.css(el, b+"Style", true) === "none" ? 0 : Math.round(parseFloat($.css(el, b+"Width", true)) || 0);
- }
-
- /**
- * Mouse-tracking utility - FUTURE REFERENCE
- *
- * init: if (!window.mouse) {
- * window.mouse = { x: 0, y: 0 };
- * $(document).mousemove( $.layout.trackMouse );
- * }
- *
- * @param {Object} evt
- *
-, trackMouse: function (evt) {
- window.mouse = { x: evt.clientX, y: evt.clientY };
- }
- */
-
- /**
- * SUBROUTINE for preventPrematureSlideClose option
- *
- * @param {Object} evt
- * @param {Object=} el
- */
-, isMouseOverElem: function (evt, el) {
- var
- $E = $(el || this)
- , d = $E.offset()
- , T = d.top
- , L = d.left
- , R = L + $E.outerWidth()
- , B = T + $E.outerHeight()
- , x = evt.pageX // evt.clientX ?
- , y = evt.pageY // evt.clientY ?
- ;
- // if X & Y are < 0, probably means is over an open SELECT
- return ($.layout.browser.msie && x < 0 && y < 0) || ((x >= L && x <= R) && (y >= T && y <= B));
- }
-
- /**
- * Message/Logging Utility
- *
- * @example $.layout.msg("My message"); // log text
- * @example $.layout.msg("My message", true); // alert text
- * @example $.layout.msg({ foo: "bar" }, "Title"); // log hash-data, with custom title
- * @example $.layout.msg({ foo: "bar" }, true, "Title", { sort: false }); -OR-
- * @example $.layout.msg({ foo: "bar" }, "Title", { sort: false, display: true }); // alert hash-data
- *
- * @param {(Object|string)} info String message OR Hash/Array
- * @param {(Boolean|string|Object)=} [popup=false] True means alert-box - can be skipped
- * @param {(Object|string)=} [debugTitle=""] Title for Hash data - can be skipped
- * @param {Object=} [debugOpts] Extra options for debug output
- */
-, msg: function (info, popup, debugTitle, debugOpts) {
- if ($.isPlainObject(info) && window.debugData) {
- if (typeof popup === "string") {
- debugOpts = debugTitle;
- debugTitle = popup;
- }
- else if (typeof debugTitle === "object") {
- debugOpts = debugTitle;
- debugTitle = null;
- }
- var t = debugTitle || "log( <object> )"
- , o = $.extend({ sort: false, returnHTML: false, display: false }, debugOpts);
- if (popup === true || o.display)
- debugData( info, t, o );
- else if (window.console)
- console.log(debugData( info, t, o ));
- }
- else if (popup)
- alert(info);
- else if (window.console)
- console.log(info);
- else {
- var id = "#layoutLogger"
- , $l = $(id);
- if (!$l.length)
- $l = createLog();
- $l.children("ul").append('<li style="padding: 4px 10px; margin: 0; border-top: 1px solid #CCC;">'+ info.replace(/\</g,"&lt;").replace(/\>/g,"&gt;") +'</li>');
- }
-
- function createLog () {
- var pos = $.support.fixedPosition ? 'fixed' : 'absolute'
- , $e = $('<div id="layoutLogger" style="position: '+ pos +'; top: 5px; z-index: 999999; max-width: 25%; overflow: hidden; border: 1px solid #000; border-radius: 5px; background: #FBFBFB; box-shadow: 0 2px 10px rgba(0,0,0,0.3);">'
- + '<div style="font-size: 13px; font-weight: bold; padding: 5px 10px; background: #F6F6F6; border-radius: 5px 5px 0 0; cursor: move;">'
- + '<span style="float: right; padding-left: 7px; cursor: pointer;" title="Remove Console" onclick="$(this).closest(\'#layoutLogger\').remove()">X</span>Layout console.log</div>'
- + '<ul style="font-size: 13px; font-weight: none; list-style: none; margin: 0; padding: 0 0 2px;"></ul>'
- + '</div>'
- ).appendTo("body");
- $e.css('left', $(window).width() - $e.outerWidth() - 5)
- if ($.ui.draggable) $e.draggable({ handle: ':first-child' });
- return $e;
- };
- }
-
-};
-
-
-/*
- * $.layout.browser REPLACES removed $.browser, with extra data
- * Parsing code here adapted from jQuery 1.8 $.browse
- */
-(function(){
- var u = navigator.userAgent.toLowerCase()
- , m = /(chrome)[ \/]([\w.]+)/.exec( u )
- || /(webkit)[ \/]([\w.]+)/.exec( u )
- || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( u )
- || /(msie) ([\w.]+)/.exec( u )
- || u.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( u )
- || []
- , b = m[1] || ""
- , v = m[2] || 0
- , ie = b === "msie"
- , cm = document.compatMode
- , $s = $.support
- , bs = $s.boxSizing !== undefined ? $s.boxSizing : $s.boxSizingReliable
- , bm = !ie || !cm || cm === "CSS1Compat" || $s.boxModel || false
- , lb = $.layout.browser = {
- version: v
- , safari: b === "webkit" // webkit (NOT chrome) = safari
- , webkit: b === "chrome" // chrome = webkit
- , msie: ie
- , isIE6: ie && v == 6
- // ONLY IE reverts to old box-model - Note that compatMode was deprecated as of IE8
- , boxModel: bm
- , boxSizing: !!(typeof bs === "function" ? bs() : bs)
- };
- ;
- if (b) lb[b] = true; // set CURRENT browser
- /* OLD versions of jQuery only set $.support.boxModel after page is loaded
- * so if this is IE, use support.boxModel to test for quirks-mode (ONLY IE changes boxModel) */
- if (!bm && !cm) $(function(){ lb.boxModel = $s.boxModel; });
-})();
-
-
-// DEFAULT OPTIONS
-$.layout.defaults = {
-/*
- * LAYOUT & LAYOUT-CONTAINER OPTIONS
- * - none of these options are applicable to individual panes
- */
- name: "" // Not required, but useful for buttons and used for the state-cookie
-, containerClass: "ui-layout-container" // layout-container element
-, inset: null // custom container-inset values (override padding)
-, scrollToBookmarkOnLoad: true // after creating a layout, scroll to bookmark in URL (.../page.htm#myBookmark)
-, resizeWithWindow: true // bind thisLayout.resizeAll() to the window.resize event
-, resizeWithWindowDelay: 200 // delay calling resizeAll because makes window resizing very jerky
-, resizeWithWindowMaxDelay: 0 // 0 = none - force resize every XX ms while window is being resized
-, maskPanesEarly: false // true = create pane-masks on resizer.mouseDown instead of waiting for resizer.dragstart
-, onresizeall_start: null // CALLBACK when resizeAll() STARTS - NOT pane-specific
-, onresizeall_end: null // CALLBACK when resizeAll() ENDS - NOT pane-specific
-, onload_start: null // CALLBACK when Layout inits - after options initialized, but before elements
-, onload_end: null // CALLBACK when Layout inits - after EVERYTHING has been initialized
-, onunload_start: null // CALLBACK when Layout is destroyed OR onWindowUnload
-, onunload_end: null // CALLBACK when Layout is destroyed OR onWindowUnload
-, initPanes: true // false = DO NOT initialize the panes onLoad - will init later
-, showErrorMessages: true // enables fatal error messages to warn developers of common errors
-, showDebugMessages: false // display console-and-alert debug msgs - IF this Layout version _has_ debugging code!
-// Changing this zIndex value will cause other zIndex values to automatically change
-, zIndex: null // the PANE zIndex - resizers and masks will be +1
-// DO NOT CHANGE the zIndex values below unless you clearly understand their relationships
-, zIndexes: { // set _default_ z-index values here...
- pane_normal: 0 // normal z-index for panes
- , content_mask: 1 // applied to overlays used to mask content INSIDE panes during resizing
- , resizer_normal: 2 // normal z-index for resizer-bars
- , pane_sliding: 100 // applied to *BOTH* the pane and its resizer when a pane is 'slid open'
- , pane_animate: 1000 // applied to the pane when being animated - not applied to the resizer
- , resizer_drag: 10000 // applied to the CLONED resizer-bar when being 'dragged'
- }
-, errors: {
- pane: "pane" // description of "layout pane element" - used only in error messages
- , selector: "selector" // description of "jQuery-selector" - used only in error messages
- , addButtonError: "Error Adding Button\nInvalid "
- , containerMissing: "UI Layout Initialization Error\nThe specified layout-container does not exist."
- , centerPaneMissing: "UI Layout Initialization Error\nThe center-pane element does not exist.\nThe center-pane is a required element."
- , noContainerHeight: "UI Layout Initialization Warning\nThe layout-container \"CONTAINER\" has no height.\nTherefore the layout is 0-height and hence 'invisible'!"
- , callbackError: "UI Layout Callback Error\nThe EVENT callback is not a valid function."
- }
-/*
- * PANE DEFAULT SETTINGS
- * - settings under the 'panes' key become the default settings for *all panes*
- * - ALL pane-options can also be set specifically for each panes, which will override these 'default values'
- */
-, panes: { // default options for 'all panes' - will be overridden by 'per-pane settings'
- applyDemoStyles: false // NOTE: renamed from applyDefaultStyles for clarity
- , closable: true // pane can open & close
- , resizable: true // when open, pane can be resized
- , slidable: true // when closed, pane can 'slide open' over other panes - closes on mouse-out
- , initClosed: false // true = init pane as 'closed'
- , initHidden: false // true = init pane as 'hidden' - no resizer-bar/spacing
- // SELECTORS
- //, paneSelector: "" // MUST be pane-specific - jQuery selector for pane
- , contentSelector: ".ui-layout-content" // INNER div/element to auto-size so only it scrolls, not the entire pane!
- , contentIgnoreSelector: ".ui-layout-ignore" // element(s) to 'ignore' when measuring 'content'
- , findNestedContent: false // true = $P.find(contentSelector), false = $P.children(contentSelector)
- // GENERIC ROOT-CLASSES - for auto-generated classNames
- , paneClass: "ui-layout-pane" // Layout Pane
- , resizerClass: "ui-layout-resizer" // Resizer Bar
- , togglerClass: "ui-layout-toggler" // Toggler Button
- , buttonClass: "ui-layout-button" // CUSTOM Buttons - eg: '[ui-layout-button]-toggle/-open/-close/-pin'
- // ELEMENT SIZE & SPACING
- //, size: 100 // MUST be pane-specific -initial size of pane
- , minSize: 0 // when manually resizing a pane
- , maxSize: 0 // ditto, 0 = no limit
- , spacing_open: 6 // space between pane and adjacent panes - when pane is 'open'
- , spacing_closed: 6 // ditto - when pane is 'closed'
- , togglerLength_open: 50 // Length = WIDTH of toggler button on north/south sides - HEIGHT on east/west sides
- , togglerLength_closed: 50 // 100% OR -1 means 'full height/width of resizer bar' - 0 means 'hidden'
- , togglerAlign_open: "center" // top/left, bottom/right, center, OR...
- , togglerAlign_closed: "center" // 1 => nn = offset from top/left, -1 => -nn == offset from bottom/right
- , togglerContent_open: "" // text or HTML to put INSIDE the toggler
- , togglerContent_closed: "" // ditto
- // RESIZING OPTIONS
- , resizerDblClickToggle: true //
- , autoResize: true // IF size is 'auto' or a percentage, then recalc 'pixel size' whenever the layout resizes
- , autoReopen: true // IF a pane was auto-closed due to noRoom, reopen it when there is room? False = leave it closed
- , resizerDragOpacity: 1 // option for ui.draggable
- //, resizerCursor: "" // MUST be pane-specific - cursor when over resizer-bar
- , maskContents: false // true = add DIV-mask over-or-inside this pane so can 'drag' over IFRAMES
- , maskObjects: false // true = add IFRAME-mask over-or-inside this pane to cover objects/applets - content-mask will overlay this mask
- , maskZindex: null // will override zIndexes.content_mask if specified - not applicable to iframe-panes
- , resizingGrid: false // grid size that the resizers will snap-to during resizing, eg: [20,20]
- , livePaneResizing: false // true = LIVE Resizing as resizer is dragged
- , liveContentResizing: false // true = re-measure header/footer heights as resizer is dragged
- , liveResizingTolerance: 1 // how many px change before pane resizes, to control performance
- // SLIDING OPTIONS
- , sliderCursor: "pointer" // cursor when resizer-bar will trigger 'sliding'
- , slideTrigger_open: "click" // click, dblclick, mouseenter
- , slideTrigger_close: "mouseleave"// click, mouseleave
- , slideDelay_open: 300 // applies only for mouseenter event - 0 = instant open
- , slideDelay_close: 300 // applies only for mouseleave event (300ms is the minimum!)
- , hideTogglerOnSlide: false // when pane is slid-open, should the toggler show?
- , preventQuickSlideClose: $.layout.browser.webkit // Chrome triggers slideClosed as it is opening
- , preventPrematureSlideClose: false // handle incorrect mouseleave trigger, like when over a SELECT-list in IE
- // PANE-SPECIFIC TIPS & MESSAGES
- , tips: {
- Open: "Open" // eg: "Open Pane"
- , Close: "Close"
- , Resize: "Resize"
- , Slide: "Slide Open"
- , Pin: "Pin"
- , Unpin: "Un-Pin"
- , noRoomToOpen: "Not enough room to show this panel." // alert if user tries to open a pane that cannot
- , minSizeWarning: "Panel has reached its minimum size" // displays in browser statusbar
- , maxSizeWarning: "Panel has reached its maximum size" // ditto
- }
- // HOT-KEYS & MISC
- , showOverflowOnHover: false // will bind allowOverflow() utility to pane.onMouseOver
- , enableCursorHotkey: true // enabled 'cursor' hotkeys
- //, customHotkey: "" // MUST be pane-specific - EITHER a charCode OR a character
- , customHotkeyModifier: "SHIFT" // either 'SHIFT', 'CTRL' or 'CTRL+SHIFT' - NOT 'ALT'
- // PANE ANIMATION
- // NOTE: fxSss_open, fxSss_close & fxSss_size options (eg: fxName_open) are auto-generated if not passed
- , fxName: "slide" // ('none' or blank), slide, drop, scale -- only relevant to 'open' & 'close', NOT 'size'
- , fxSpeed: null // slow, normal, fast, 200, nnn - if passed, will OVERRIDE fxSettings.duration
- , fxSettings: {} // can be passed, eg: { easing: "easeOutBounce", duration: 1500 }
- , fxOpacityFix: true // tries to fix opacity in IE to restore anti-aliasing after animation
- , animatePaneSizing: false // true = animate resizing after dragging resizer-bar OR sizePane() is called
- /* NOTE: Action-specific FX options are auto-generated from the options above if not specifically set:
- fxName_open: "slide" // 'Open' pane animation
- fnName_close: "slide" // 'Close' pane animation
- fxName_size: "slide" // 'Size' pane animation - when animatePaneSizing = true
- fxSpeed_open: null
- fxSpeed_close: null
- fxSpeed_size: null
- fxSettings_open: {}
- fxSettings_close: {}
- fxSettings_size: {}
- */
- // CHILD/NESTED LAYOUTS
- , children: null // Layout-options for nested/child layout - even {} is valid as options
- , containerSelector: '' // if child is NOT 'directly nested', a selector to find it/them (can have more than one child layout!)
- , initChildren: true // true = child layout will be created as soon as _this_ layout completes initialization
- , destroyChildren: true // true = destroy child-layout if this pane is destroyed
- , resizeChildren: true // true = trigger child-layout.resizeAll() when this pane is resized
- // EVENT TRIGGERING
- , triggerEventsOnLoad: false // true = trigger onopen OR onclose callbacks when layout initializes
- , triggerEventsDuringLiveResize: true // true = trigger onresize callback REPEATEDLY if livePaneResizing==true
- // PANE CALLBACKS
- , onshow_start: null // CALLBACK when pane STARTS to Show - BEFORE onopen/onhide_start
- , onshow_end: null // CALLBACK when pane ENDS being Shown - AFTER onopen/onhide_end
- , onhide_start: null // CALLBACK when pane STARTS to Close - BEFORE onclose_start
- , onhide_end: null // CALLBACK when pane ENDS being Closed - AFTER onclose_end
- , onopen_start: null // CALLBACK when pane STARTS to Open
- , onopen_end: null // CALLBACK when pane ENDS being Opened
- , onclose_start: null // CALLBACK when pane STARTS to Close
- , onclose_end: null // CALLBACK when pane ENDS being Closed
- , onresize_start: null // CALLBACK when pane STARTS being Resized ***FOR ANY REASON***
- , onresize_end: null // CALLBACK when pane ENDS being Resized ***FOR ANY REASON***
- , onsizecontent_start: null // CALLBACK when sizing of content-element STARTS
- , onsizecontent_end: null // CALLBACK when sizing of content-element ENDS
- , onswap_start: null // CALLBACK when pane STARTS to Swap
- , onswap_end: null // CALLBACK when pane ENDS being Swapped
- , ondrag_start: null // CALLBACK when pane STARTS being ***MANUALLY*** Resized
- , ondrag_end: null // CALLBACK when pane ENDS being ***MANUALLY*** Resized
- }
-/*
- * PANE-SPECIFIC SETTINGS
- * - options listed below MUST be specified per-pane - they CANNOT be set under 'panes'
- * - all options under the 'panes' key can also be set specifically for any pane
- * - most options under the 'panes' key apply only to 'border-panes' - NOT the the center-pane
- */
-, north: {
- paneSelector: ".ui-layout-north"
- , size: "auto" // eg: "auto", "30%", .30, 200
- , resizerCursor: "n-resize" // custom = url(myCursor.cur)
- , customHotkey: "" // EITHER a charCode (43) OR a character ("o")
- }
-, south: {
- paneSelector: ".ui-layout-south"
- , size: "50%"//"auto"
- , resizerCursor: "s-resize"
- , customHotkey: ""
- , initClosed: true
- }
-, east: {
- paneSelector: ".ui-layout-east"
- , size: "5%"//200
- , resizerCursor: "e-resize"
- , customHotkey: ""
- }
-, west: {
- paneSelector: ".ui-layout-west"
- , size: "70%" //200
- , resizerCursor: "w-resize"
- , customHotkey: ""
- , initClosed: true
- }
-, center: {
- paneSelector: ".ui-layout-center"
- , size: "30%"//"auto"
- , minWidth: 0
- , minHeight: 0
- }
-};
-
-$.layout.optionsMap = {
- // layout/global options - NOT pane-options
- layout: ("name,instanceKey,stateManagement,effects,inset,zIndexes,errors,"
- + "zIndex,scrollToBookmarkOnLoad,showErrorMessages,maskPanesEarly,"
- + "outset,resizeWithWindow,resizeWithWindowDelay,resizeWithWindowMaxDelay,"
- + "onresizeall,onresizeall_start,onresizeall_end,onload,onload_start,onload_end,onunload,onunload_start,onunload_end").split(",")
-// borderPanes: [ ALL options that are NOT specified as 'layout' ]
- // default.panes options that apply to the center-pane (most options apply _only_ to border-panes)
-, center: ("paneClass,contentSelector,contentIgnoreSelector,findNestedContent,applyDemoStyles,triggerEventsOnLoad,"
- + "showOverflowOnHover,maskContents,maskObjects,liveContentResizing,"
- + "containerSelector,children,initChildren,resizeChildren,destroyChildren,"
- + "onresize,onresize_start,onresize_end,onsizecontent,onsizecontent_start,onsizecontent_end").split(",")
- // options that MUST be specifically set 'per-pane' - CANNOT set in the panes (defaults) key
-, noDefault: ("paneSelector,resizerCursor,customHotkey").split(",")
-};
-
-/**
- * Processes options passed in converts flat-format data into subkey (JSON) format
- * In flat-format, subkeys are _currently_ separated with 2 underscores, like north__optName
- * Plugins may also call this method so they can transform their own data
- *
- * @param {!Object} hash Data/options passed by user - may be a single level or nested levels
- * @param {boolean=} [addKeys=false] Should the primary layout.options keys be added if they do not exist?
- * @return {Object} Returns hash of minWidth & minHeight
- */
-$.layout.transformData = function (hash, addKeys) {
- var json = addKeys ? { panes: {}, center: {} } : {} // init return object
- , branch, optKey, keys, key, val, i, c;
-
- if (typeof hash !== "object") return json; // no options passed
-
- // convert all 'flat-keys' to 'sub-key' format
- for (optKey in hash) {
- branch = json;
- val = hash[ optKey ];
- keys = optKey.split("__"); // eg: west__size or north__fxSettings__duration
- c = keys.length - 1;
- // convert underscore-delimited to subkeys
- for (i=0; i <= c; i++) {
- key = keys[i];
- if (i === c) { // last key = value
- if ($.isPlainObject( val ))
- branch[key] = $.layout.transformData( val ); // RECURSE
- else
- branch[key] = val;
- }
- else {
- if (!branch[key])
- branch[key] = {}; // create the subkey
- // recurse to sub-key for next loop - if not done
- branch = branch[key];
- }
- }
- }
- return json;
-};
-
-// INTERNAL CONFIG DATA - DO NOT CHANGE THIS!
-$.layout.backwardCompatibility = {
- // data used by renameOldOptions()
- map: {
- // OLD Option Name: NEW Option Name
- applyDefaultStyles: "applyDemoStyles"
- // CHILD/NESTED LAYOUTS
- , childOptions: "children"
- , initChildLayout: "initChildren"
- , destroyChildLayout: "destroyChildren"
- , resizeChildLayout: "resizeChildren"
- , resizeNestedLayout: "resizeChildren"
- // MISC Options
- , resizeWhileDragging: "livePaneResizing"
- , resizeContentWhileDragging: "liveContentResizing"
- , triggerEventsWhileDragging: "triggerEventsDuringLiveResize"
- , maskIframesOnResize: "maskContents"
- // STATE MANAGEMENT
- , useStateCookie: "stateManagement.enabled"
- , "cookie.autoLoad": "stateManagement.autoLoad"
- , "cookie.autoSave": "stateManagement.autoSave"
- , "cookie.keys": "stateManagement.stateKeys"
- , "cookie.name": "stateManagement.cookie.name"
- , "cookie.domain": "stateManagement.cookie.domain"
- , "cookie.path": "stateManagement.cookie.path"
- , "cookie.expires": "stateManagement.cookie.expires"
- , "cookie.secure": "stateManagement.cookie.secure"
- // OLD Language options
- , noRoomToOpenTip: "tips.noRoomToOpen"
- , togglerTip_open: "tips.Close" // open = Close
- , togglerTip_closed: "tips.Open" // closed = Open
- , resizerTip: "tips.Resize"
- , sliderTip: "tips.Slide"
- }
-
-/**
-* @param {Object} opts
-*/
-, renameOptions: function (opts) {
- var map = $.layout.backwardCompatibility.map
- , oldData, newData, value
- ;
- for (var itemPath in map) {
- oldData = getBranch( itemPath );
- value = oldData.branch[ oldData.key ];
- if (value !== undefined) {
- newData = getBranch( map[itemPath], true );
- newData.branch[ newData.key ] = value;
- delete oldData.branch[ oldData.key ];
- }
- }
-
- /**
- * @param {string} path
- * @param {boolean=} [create=false] Create path if does not exist
- */
- function getBranch (path, create) {
- var a = path.split(".") // split keys into array
- , c = a.length - 1
- , D = { branch: opts, key: a[c] } // init branch at top & set key (last item)
- , i = 0, k, undef;
- for (; i<c; i++) { // skip the last key (data)
- k = a[i];
- if (D.branch[ k ] == undefined) { // child-key does not exist
- if (create) {
- D.branch = D.branch[ k ] = {}; // create child-branch
- }
- else // can't go any farther
- D.branch = {}; // branch is undefined
- }
- else
- D.branch = D.branch[ k ]; // get child-branch
- }
- return D;
- };
- }
-
-/**
-* @param {Object} opts
-*/
-, renameAllOptions: function (opts) {
- var ren = $.layout.backwardCompatibility.renameOptions;
- // rename root (layout) options
- ren( opts );
- // rename 'defaults' to 'panes'
- if (opts.defaults) {
- if (typeof opts.panes !== "object")
- opts.panes = {};
- $.extend(true, opts.panes, opts.defaults);
- delete opts.defaults;
- }
- // rename options in the the options.panes key
- if (opts.panes) ren( opts.panes );
- // rename options inside *each pane key*, eg: options.west
- $.each($.layout.config.allPanes, function (i, pane) {
- if (opts[pane]) ren( opts[pane] );
- });
- return opts;
- }
-};
-
-
-
-
-/* ============================================================
- * BEGIN WIDGET: $( selector ).layout( {options} );
- * ============================================================
- */
-$.fn.layout = function (opts) {
- var
-
- // local aliases to global data
- browser = $.layout.browser
-, _c = $.layout.config
-
- // local aliases to utlity methods
-, cssW = $.layout.cssWidth
-, cssH = $.layout.cssHeight
-, elDims = $.layout.getElementDimensions
-, styles = $.layout.getElementStyles
-, evtObj = $.layout.getEventObject
-, evtPane = $.layout.parsePaneName
-
-/**
- * options - populated by initOptions()
- */
-, options = $.extend(true, {}, $.layout.defaults)
-, effects = options.effects = $.extend(true, {}, $.layout.effects)
-
-/**
- * layout-state object
- */
-, state = {
- // generate unique ID to use for event.namespace so can unbind only events added by 'this layout'
- id: "layout"+ $.now() // code uses alias: sID
- , initialized: false
- , paneResizing: false
- , panesSliding: {}
- , container: { // list all keys referenced in code to avoid compiler error msgs
- innerWidth: 0
- , innerHeight: 0
- , outerWidth: 0
- , outerHeight: 0
- , layoutWidth: 0
- , layoutHeight: 0
- }
- , north: { childIdx: 0 }
- , south: { childIdx: 0 }
- , east: { childIdx: 0 }
- , west: { childIdx: 0 }
- , center: { childIdx: 0 }
- }
-
-/**
- * parent/child-layout pointers
- */
-//, hasParentLayout = false - exists ONLY inside Instance so can be set externally
-, children = {
- north: null
- , south: null
- , east: null
- , west: null
- , center: null
- }
-
-/*
- * ###########################
- * INTERNAL HELPER FUNCTIONS
- * ###########################
- */
-
- /**
- * Manages all internal timers
- */
-, timer = {
- data: {}
- , set: function (s, fn, ms) { timer.clear(s); timer.data[s] = setTimeout(fn, ms); }
- , clear: function (s) { var t=timer.data; if (t[s]) {clearTimeout(t[s]); delete t[s];} }
- }
-
- /**
- * Alert or console.log a message - IF option is enabled.
- *
- * @param {(string|!Object)} msg Message (or debug-data) to display
- * @param {boolean=} [popup=false] True by default, means 'alert', false means use console.log
- * @param {boolean=} [debug=false] True means is a widget debugging message
- */
-, _log = function (msg, popup, debug) {
- var o = options;
- if ((o.showErrorMessages && !debug) || (debug && o.showDebugMessages))
- $.layout.msg( o.name +' / '+ msg, (popup !== false) );
- return false;
- }
-
- /**
- * Executes a Callback function after a trigger event, like resize, open or close
- *
- * @param {string} evtName Name of the layout callback, eg "onresize_start"
- * @param {(string|boolean)=} [pane=""] This is passed only so we can pass the 'pane object' to the callback
- * @param {(string|boolean)=} [skipBoundEvents=false] True = do not run events bound to the elements - only the callbacks set in options
- */
-, _runCallbacks = function (evtName, pane, skipBoundEvents) {
- var hasPane = pane && isStr(pane)
- , s = hasPane ? state[pane] : state
- , o = hasPane ? options[pane] : options
- , lName = options.name
- // names like onopen and onopen_end separate are interchangeable in options...
- , lng = evtName + (evtName.match(/_/) ? "" : "_end")
- , shrt = lng.match(/_end$/) ? lng.substr(0, lng.length - 4) : ""
- , fn = o[lng] || o[shrt]
- , retVal = "NC" // NC = No Callback
- , args = []
- , $P = hasPane ? $Ps[pane] : 0
- ;
- if (hasPane && !$P) // a pane is specified, but does not exist!
- return retVal;
- if ( !hasPane && $.type(pane) === "boolean" ) {
- skipBoundEvents = pane; // allow pane param to be skipped for Layout callback
- pane = "";
- }
-
- // first trigger the callback set in the options
- if (fn) {
- try {
- // convert function name (string) to function object
- if (isStr( fn )) {
- if (fn.match(/,/)) {
- // function name cannot contain a comma,
- // so must be a function name AND a parameter to pass
- args = fn.split(",")
- , fn = eval(args[0]);
- }
- else // just the name of an external function?
- fn = eval(fn);
- }
- // execute the callback, if exists
- if ($.isFunction( fn )) {
- if (args.length)
- retVal = g(fn)(args[1]); // pass the argument parsed from 'list'
- else if ( hasPane )
- // pass data: pane-name, pane-element, pane-state, pane-options, and layout-name
- retVal = g(fn)( pane, $Ps[pane], s, o, lName );
- else // must be a layout/container callback - pass suitable info
- retVal = g(fn)( Instance, s, o, lName );
- }
- }
- catch (ex) {
- _log( options.errors.callbackError.replace(/EVENT/, $.trim((pane || "") +" "+ lng)), false );
- if ($.type(ex) === "string" && string.length)
- _log("Exception: "+ ex, false );
- }
- }
-
- // trigger additional events bound directly to the pane
- if (!skipBoundEvents && retVal !== false) {
- if ( hasPane ) { // PANE events can be bound to each pane-elements
- o = options[pane];
- s = state[pane];
- $P.triggerHandler("layoutpane"+ lng, [ pane, $P, s, o, lName ]);
- if (shrt)
- $P.triggerHandler("layoutpane"+ shrt, [ pane, $P, s, o, lName ]);
- }
- else { // LAYOUT events can be bound to the container-element
- $N.triggerHandler("layout"+ lng, [ Instance, s, o, lName ]);
- if (shrt)
- $N.triggerHandler("layout"+ shrt, [ Instance, s, o, lName ]);
- }
- }
-
- // ALWAYS resizeChildren after an onresize_end event - even during initialization
- // IGNORE onsizecontent_end event because causes child-layouts to resize TWICE
- if (hasPane && evtName === "onresize_end") // BAD: || evtName === "onsizecontent_end"
- resizeChildren(pane+"", true); // compiler hack -force string
-
- return retVal;
-
- function g (f) { return f; }; // compiler hack
- }
-
-
- /**
- * cure iframe display issues in IE & other browsers
- */
-, _fixIframe = function (pane) {
- if (browser.mozilla) return; // skip FireFox - it auto-refreshes iframes onShow
- var $P = $Ps[pane];
- // if the 'pane' is an iframe, do it
- if (state[pane].tagName === "IFRAME")
- $P.css(_c.hidden).css(_c.visible);
- else // ditto for any iframes INSIDE the pane
- $P.find('IFRAME').css(_c.hidden).css(_c.visible);
- }
-
- /**
- * @param {string} pane Can accept ONLY a 'pane' (east, west, etc)
- * @param {number=} outerSize (optional) Can pass a width, allowing calculations BEFORE element is resized
- * @return {number} Returns the innerHeight/Width of el by subtracting padding and borders
- */
-, cssSize = function (pane, outerSize) {
- var fn = _c[pane].dir=="horz" ? cssH : cssW;
- return fn($Ps[pane], outerSize);
- }
-
- /**
- * @param {string} pane Can accept ONLY a 'pane' (east, west, etc)
- * @return {Object} Returns hash of minWidth & minHeight
- */
-, cssMinDims = function (pane) {
- // minWidth/Height means CSS width/height = 1px
- var $P = $Ps[pane]
- , dir = _c[pane].dir
- , d = {
- minWidth: 1001 - cssW($P, 1000)
- , minHeight: 1001 - cssH($P, 1000)
- }
- ;
- if (dir === "horz") d.minSize = d.minHeight;
- if (dir === "vert") d.minSize = d.minWidth;
- return d;
- }
-
- // TODO: see if these methods can be made more useful...
- // TODO: *maybe* return cssW/H from these so caller can use this info
-
- /**
- * @param {(string|!Object)} el
- * @param {number=} outerWidth
- * @param {boolean=} [autoHide=false]
- */
-, setOuterWidth = function (el, outerWidth, autoHide) {
- var $E = el, w;
- if (isStr(el)) $E = $Ps[el]; // west
- else if (!el.jquery) $E = $(el);
- w = cssW($E, outerWidth);
- $E.css({ width: w });
- if (w > 0) {
- if (autoHide && $E.data('autoHidden') && $E.innerHeight() > 0) {
- $E.show().data('autoHidden', false);
- if (!browser.mozilla) // FireFox refreshes iframes - IE does not
- // make hidden, then visible to 'refresh' display after animation
- $E.css(_c.hidden).css(_c.visible);
- }
- }
- else if (autoHide && !$E.data('autoHidden'))
- $E.hide().data('autoHidden', true);
- }
-
- /**
- * @param {(string|!Object)} el
- * @param {number=} outerHeight
- * @param {boolean=} [autoHide=false]
- */
-, setOuterHeight = function (el, outerHeight, autoHide) {
- var $E = el, h;
- if (isStr(el)) $E = $Ps[el]; // west
- else if (!el.jquery) $E = $(el);
- h = cssH($E, outerHeight);
- $E.css({ height: h, visibility: "visible" }); // may have been 'hidden' by sizeContent
- if (h > 0 && $E.innerWidth() > 0) {
- if (autoHide && $E.data('autoHidden')) {
- $E.show().data('autoHidden', false);
- if (!browser.mozilla) // FireFox refreshes iframes - IE does not
- $E.css(_c.hidden).css(_c.visible);
- }
- }
- else if (autoHide && !$E.data('autoHidden'))
- $E.hide().data('autoHidden', true);
- }
-
-
- /**
- * Converts any 'size' params to a pixel/integer size, if not already
- * If 'auto' or a decimal/percentage is passed as 'size', a pixel-size is calculated
- *
- /**
- * @param {string} pane
- * @param {(string|number)=} size
- * @param {string=} [dir]
- * @return {number}
- */
-, _parseSize = function (pane, size, dir) {
- if (!dir) dir = _c[pane].dir;
-
- if (isStr(size) && size.match(/%/))
- size = (size === '100%') ? -1 : parseInt(size, 10) / 100; // convert % to decimal
-
- if (size === 0)
- return 0;
- else if (size >= 1)
- return parseInt(size, 10);
-
- var o = options, avail = 0;
- if (dir=="horz") // north or south or center.minHeight
- avail = sC.innerHeight - ($Ps.north ? o.north.spacing_open : 0) - ($Ps.south ? o.south.spacing_open : 0);
- else if (dir=="vert") // east or west or center.minWidth
- avail = sC.innerWidth - ($Ps.west ? o.west.spacing_open : 0) - ($Ps.east ? o.east.spacing_open : 0);
-
- if (size === -1) // -1 == 100%
- return avail;
- else if (size > 0) // percentage, eg: .25
- return round(avail * size);
- else if (pane=="center")
- return 0;
- else { // size < 0 || size=='auto' || size==Missing || size==Invalid
- // auto-size the pane
- var dim = (dir === "horz" ? "height" : "width")
- , $P = $Ps[pane]
- , $C = dim === 'height' ? $Cs[pane] : false
- , vis = $.layout.showInvisibly($P) // show pane invisibly if hidden
- , szP = $P.css(dim) // SAVE current pane size
- , szC = $C ? $C.css(dim) : 0 // SAVE current content size
- ;
- $P.css(dim, "auto");
- if ($C) $C.css(dim, "auto");
- size = (dim === "height") ? $P.outerHeight() : $P.outerWidth(); // MEASURE
- $P.css(dim, szP).css(vis); // RESET size & visibility
- if ($C) $C.css(dim, szC);
- return size;
- }
- }
-
- /**
- * Calculates current 'size' (outer-width or outer-height) of a border-pane - optionally with 'pane-spacing' added
- *
- * @param {(string|!Object)} pane
- * @param {boolean=} [inclSpace=false]
- * @return {number} Returns EITHER Width for east/west panes OR Height for north/south panes
- */
-, getPaneSize = function (pane, inclSpace) {
- var
- $P = $Ps[pane]
- , o = options[pane]
- , s = state[pane]
- , oSp = (inclSpace ? o.spacing_open : 0)
- , cSp = (inclSpace ? o.spacing_closed : 0)
- ;
- if (!$P || s.isHidden)
- return 0;
- else if (s.isClosed || (s.isSliding && inclSpace))
- return cSp;
- else if (_c[pane].dir === "horz")
- return $P.outerHeight() + oSp;
- else // dir === "vert"
- return $P.outerWidth() + oSp;
- }
-
- /**
- * Calculate min/max pane dimensions and limits for resizing
- *
- * @param {string} pane
- * @param {boolean=} [slide=false]
- */
-, setSizeLimits = function (pane, slide) {
- if (!isInitialized()) return;
- var
- o = options[pane]
- , s = state[pane]
- , c = _c[pane]
- , dir = c.dir
- , type = c.sizeType.toLowerCase()
- , isSliding = (slide != undefined ? slide : s.isSliding) // only open() passes 'slide' param
- , $P = $Ps[pane]
- , paneSpacing = o.spacing_open
- // measure the pane on the *opposite side* from this pane
- , altPane = _c.oppositeEdge[pane]
- , altS = state[altPane]
- , $altP = $Ps[altPane]
- , altPaneSize = (!$altP || altS.isVisible===false || altS.isSliding ? 0 : (dir=="horz" ? $altP.outerHeight() : $altP.outerWidth()))
- , altPaneSpacing = ((!$altP || altS.isHidden ? 0 : options[altPane][ altS.isClosed !== false ? "spacing_closed" : "spacing_open" ]) || 0)
- // limitSize prevents this pane from 'overlapping' opposite pane
- , containerSize = (dir=="horz" ? sC.innerHeight : sC.innerWidth)
- , minCenterDims = cssMinDims("center")
- , minCenterSize = dir=="horz" ? max(options.center.minHeight, minCenterDims.minHeight) : max(options.center.minWidth, minCenterDims.minWidth)
- // if pane is 'sliding', then ignore center and alt-pane sizes - because 'overlays' them
- , limitSize = (containerSize - paneSpacing - (isSliding ? 0 : (_parseSize("center", minCenterSize, dir) + altPaneSize + altPaneSpacing)))
- , minSize = s.minSize = max( _parseSize(pane, o.minSize), cssMinDims(pane).minSize )
- , maxSize = s.maxSize = min( (o.maxSize ? _parseSize(pane, o.maxSize) : 100000), limitSize )
- , r = s.resizerPosition = {} // used to set resizing limits
- , top = sC.inset.top
- , left = sC.inset.left
- , W = sC.innerWidth
- , H = sC.innerHeight
- , rW = o.spacing_open // subtract resizer-width to get top/left position for south/east
- ;
- switch (pane) {
- case "north": r.min = top + minSize;
- r.max = top + maxSize;
- break;
- case "west": r.min = left + minSize;
- r.max = left + maxSize;
- break;
- case "south": r.min = top + H - maxSize - rW;
- r.max = top + H - minSize - rW;
- break;
- case "east": r.min = left + W - maxSize - rW;
- r.max = left + W - minSize - rW;
- break;
- };
- }
-
- /**
- * Returns data for setting the size/position of center pane. Also used to set Height for east/west panes
- *
- * @return JSON Returns a hash of all dimensions: top, bottom, left, right, (outer) width and (outer) height
- */
-, calcNewCenterPaneDims = function () {
- var d = {
- top: getPaneSize("north", true) // true = include 'spacing' value for pane
- , bottom: getPaneSize("south", true)
- , left: getPaneSize("west", true)
- , right: getPaneSize("east", true)
- , width: 0
- , height: 0
- };
-
- // NOTE: sC = state.container
- // calc center-pane outer dimensions
- d.width = sC.innerWidth - d.left - d.right; // outerWidth
- d.height = sC.innerHeight - d.bottom - d.top; // outerHeight
- // add the 'container border/padding' to get final positions relative to the container
- d.top += sC.inset.top;
- d.bottom += sC.inset.bottom;
- d.left += sC.inset.left;
- d.right += sC.inset.right;
-
- return d;
- }
-
-
- /**
- * @param {!Object} el
- * @param {boolean=} [allStates=false]
- */
-, getHoverClasses = function (el, allStates) {
- var
- $El = $(el)
- , type = $El.data("layoutRole")
- , pane = $El.data("layoutEdge")
- , o = options[pane]
- , root = o[type +"Class"]
- , _pane = "-"+ pane // eg: "-west"
- , _open = "-open"
- , _closed = "-closed"
- , _slide = "-sliding"
- , _hover = "-hover " // NOTE the trailing space
- , _state = $El.hasClass(root+_closed) ? _closed : _open
- , _alt = _state === _closed ? _open : _closed
- , classes = (root+_hover) + (root+_pane+_hover) + (root+_state+_hover) + (root+_pane+_state+_hover)
- ;
- if (allStates) // when 'removing' classes, also remove alternate-state classes
- classes += (root+_alt+_hover) + (root+_pane+_alt+_hover);
-
- if (type=="resizer" && $El.hasClass(root+_slide))
- classes += (root+_slide+_hover) + (root+_pane+_slide+_hover);
-
- return $.trim(classes);
- }
-, addHover = function (evt, el) {
- var $E = $(el || this);
- if (evt && $E.data("layoutRole") === "toggler")
- evt.stopPropagation(); // prevent triggering 'slide' on Resizer-bar
- $E.addClass( getHoverClasses($E) );
- }
-, removeHover = function (evt, el) {
- var $E = $(el || this);
- $E.removeClass( getHoverClasses($E, true) );
- }
-
-, onResizerEnter = function (evt) { // ALSO called by toggler.mouseenter
- var pane = $(this).data("layoutEdge")
- , s = state[pane]
- , $d = $(document)
- ;
- // ignore closed-panes and mouse moving back & forth over resizer!
- // also ignore if ANY pane is currently resizing
- if ( s.isResizing || state.paneResizing ) return;
-
- if (options.maskPanesEarly)
- showMasks( pane, { resizing: true });
- }
-, onResizerLeave = function (evt, el) {
- var e = el || this // el is only passed when called by the timer
- , pane = $(e).data("layoutEdge")
- , name = pane +"ResizerLeave"
- , $d = $(document)
- ;
- timer.clear(pane+"_openSlider"); // cancel slideOpen timer, if set
- timer.clear(name); // cancel enableSelection timer - may re/set below
- // this method calls itself on a timer because it needs to allow
- // enough time for dragging to kick-in and set the isResizing flag
- // dragging has a 100ms delay set, so this delay must be >100
- if (!el) // 1st call - mouseleave event
- timer.set(name, function(){ onResizerLeave(evt, e); }, 200);
- // if user is resizing, dragStop will reset everything, so skip it here
- else if (options.maskPanesEarly && !state.paneResizing) // 2nd call - by timer
- hideMasks();
- }
-
-/*
- * ###########################
- * INITIALIZATION METHODS
- * ###########################
- */
-
- /**
- * Initialize the layout - called automatically whenever an instance of layout is created
- *
- * @see none - triggered onInit
- * @return mixed true = fully initialized | false = panes not initialized (yet) | 'cancel' = abort
- */
-, _create = function () {
- // initialize config/options
- initOptions();
- var o = options
- , s = state;
-
- // TEMP state so isInitialized returns true during init process
- s.creatingLayout = true;
-
- // init plugins for this layout, if there are any (eg: stateManagement)
- runPluginCallbacks( Instance, $.layout.onCreate );
-
- // options & state have been initialized, so now run beforeLoad callback
- // onload will CANCEL layout creation if it returns false
- if (false === _runCallbacks("onload_start"))
- return 'cancel';
-
- // initialize the container element
- _initContainer();
-
- // bind hotkey function - keyDown - if required
- initHotkeys();
-
- // bind window.onunload
- $(window).bind("unload."+ sID, unload);
-
- // init plugins for this layout, if there are any (eg: customButtons)
- runPluginCallbacks( Instance, $.layout.onLoad );
-
- // if layout elements are hidden, then layout WILL NOT complete initialization!
- // initLayoutElements will set initialized=true and run the onload callback IF successful
- if (o.initPanes) _initLayoutElements();
-
- delete s.creatingLayout;
-
- return state.initialized;
- }
-
- /**
- * Initialize the layout IF not already
- *
- * @see All methods in Instance run this test
- * @return boolean true = layoutElements have been initialized | false = panes are not initialized (yet)
- */
-, isInitialized = function () {
- if (state.initialized || state.creatingLayout) return true; // already initialized
- else return _initLayoutElements(); // try to init panes NOW
- }
-
- /**
- * Initialize the layout - called automatically whenever an instance of layout is created
- *
- * @see _create() & isInitialized
- * @param {boolean=} [retry=false] // indicates this is a 2nd try
- * @return An object pointer to the instance created
- */
-, _initLayoutElements = function (retry) {
- // initialize config/options
- var o = options;
- // CANNOT init panes inside a hidden container!
- if (!$N.is(":visible")) {
- // handle Chrome bug where popup window 'has no height'
- // if layout is BODY element, try again in 50ms
- // SEE: http://layout.jquery-dev.com/samples/test_popup_window.html
- if ( !retry && browser.webkit && $N[0].tagName === "BODY" )
- setTimeout(function(){ _initLayoutElements(true); }, 50);
- return false;
- }
-
- // a center pane is required, so make sure it exists
- if (!getPane("center").length) {
- return _log( o.errors.centerPaneMissing );
- }
-
- // TEMP state so isInitialized returns true during init process
- state.creatingLayout = true;
-
- // update Container dims
- $.extend(sC, elDims( $N, o.inset )); // passing inset means DO NOT include insetX values
-
- // initialize all layout elements
- initPanes(); // size & position panes - calls initHandles() - which calls initResizable()
-
- if (o.scrollToBookmarkOnLoad) {
- var l = self.location;
- if (l.hash) l.replace( l.hash ); // scrollTo Bookmark
- }
-
- // check to see if this layout 'nested' inside a pane
- if (Instance.hasParentLayout)
- o.resizeWithWindow = false;
- // bind resizeAll() for 'this layout instance' to window.resize event
- else if (o.resizeWithWindow)
- $(window).bind("resize."+ sID, windowResize);
-
- delete state.creatingLayout;
- state.initialized = true;
-
- // init plugins for this layout, if there are any
- runPluginCallbacks( Instance, $.layout.onReady );
-
- // now run the onload callback, if exists
- _runCallbacks("onload_end");
-
- return true; // elements initialized successfully
- }
-
- /**
- * Initialize nested layouts for a specific pane - can optionally pass layout-options
- *
- * @param {(string|Object)} evt_or_pane The pane being opened, ie: north, south, east, or west
- * @param {Object=} [opts] Layout-options - if passed, will OVERRRIDE options[pane].children
- * @return An object pointer to the layout instance created - or null
- */
-, createChildren = function (evt_or_pane, opts) {
- var pane = evtPane.call(this, evt_or_pane)
- , $P = $Ps[pane]
- ;
- if (!$P) return;
- var $C = $Cs[pane]
- , s = state[pane]
- , o = options[pane]
- , sm = options.stateManagement || {}
- , cos = opts ? (o.children = opts) : o.children
- ;
- if ( $.isPlainObject( cos ) )
- cos = [ cos ]; // convert a hash to a 1-elem array
- else if (!cos || !$.isArray( cos ))
- return;
-
- $.each( cos, function (idx, co) {
- if ( !$.isPlainObject( co ) ) return;
-
- // determine which element is supposed to be the 'child container'
- // if pane has a 'containerSelector' OR a 'content-div', use those instead of the pane
- var $containers = co.containerSelector ? $P.find( co.containerSelector ) : ($C || $P);
-
- $containers.each(function(){
- var $cont = $(this)
- , child = $cont.data("layout") // see if a child-layout ALREADY exists on this element
- ;
- // if no layout exists, but children are set, try to create the layout now
- if (!child) {
- // TODO: see about moving this to the stateManagement plugin, as a method
- // set a unique child-instance key for this layout, if not already set
- setInstanceKey({ container: $cont, options: co }, s );
- // If THIS layout has a hash in stateManagement.autoLoad,
- // then see if it also contains state-data for this child-layout
- // If so, copy the stateData to child.options.stateManagement.autoLoad
- if ( sm.includeChildren && state.stateData[pane] ) {
- // THIS layout's state was cached when its state was loaded
- var paneChildren = state.stateData[pane].children || {}
- , childState = paneChildren[ co.instanceKey ]
- , co_sm = co.stateManagement || (co.stateManagement = { autoLoad: true })
- ;
- // COPY the stateData into the autoLoad key
- if ( co_sm.autoLoad === true && childState ) {
- co_sm.autoSave = false; // disable autoSave because saving handled by parent-layout
- co_sm.includeChildren = true; // cascade option - FOR NOW
- co_sm.autoLoad = $.extend(true, {}, childState); // COPY the state-hash
- }
- }
-
- // create the layout
- child = $cont.layout( co );
-
- // if successful, update data
- if (child) {
- // add the child and update all layout-pointers
- // MAY have already been done by child-layout calling parent.refreshChildren()
- refreshChildren( pane, child );
- }
- }
- });
- });
- }
-
-, setInstanceKey = function (child, parentPaneState) {
- // create a named key for use in state and instance branches
- var $c = child.container
- , o = child.options
- , sm = o.stateManagement
- , key = o.instanceKey || $c.data("layoutInstanceKey")
- ;
- if (!key) key = (sm && sm.cookie ? sm.cookie.name : '') || o.name; // look for a name/key
- if (!key) key = "layout"+ (++parentPaneState.childIdx); // if no name/key found, generate one
- else key = key.replace(/[^\w-]/gi, '_').replace(/_{2,}/g, '_'); // ensure is valid as a hash key
- o.instanceKey = key;
- $c.data("layoutInstanceKey", key); // useful if layout is destroyed and then recreated
- return key;
- }
-
- /**
- * @param {string} pane The pane being opened, ie: north, south, east, or west
- * @param {Object=} newChild New child-layout Instance to add to this pane
- */
-, refreshChildren = function (pane, newChild) {
- var $P = $Ps[pane]
- , pC = children[pane]
- , s = state[pane]
- , o
- ;
- // check for destroy()ed layouts and update the child pointers & arrays
- if ($.isPlainObject( pC )) {
- $.each( pC, function (key, child) {
- if (child.destroyed) delete pC[key]
- });
- // if no more children, remove the children hash
- if ($.isEmptyObject( pC ))
- pC = children[pane] = null; // clear children hash
- }
-
- // see if there is a directly-nested layout inside this pane
- // if there is, then there can be only ONE child-layout, so check that...
- if (!newChild && !pC) {
- newChild = $P.data("layout");
- }
-
- // if a newChild instance was passed, add it to children[pane]
- if (newChild) {
- // update child.state
- newChild.hasParentLayout = true; // set parent-flag in child
- // instanceKey is a key-name used in both state and children
- o = newChild.options;
- // set a unique child-instance key for this layout, if not already set
- setInstanceKey( newChild, s );
- // add pointer to pane.children hash
- if (!pC) pC = children[pane] = {}; // create an empty children hash
- pC[ o.instanceKey ] = newChild.container.data("layout"); // add childLayout instance
- }
-
- // ALWAYS refresh the pane.children alias, even if null
- Instance[pane].children = children[pane];
-
- // if newChild was NOT passed - see if there is a child layout NOW
- if (!newChild) {
- createChildren(pane); // MAY create a child and re-call this method
- }
- }
-
-, windowResize = function () {
- var o = options
- , delay = Number(o.resizeWithWindowDelay);
- if (delay < 10) delay = 100; // MUST have a delay!
- // resizing uses a delay-loop because the resize event fires repeatly - except in FF, but delay anyway
- timer.clear("winResize"); // if already running
- timer.set("winResize", function(){
- timer.clear("winResize");
- timer.clear("winResizeRepeater");
- var dims = elDims( $N, o.inset );
- // only trigger resizeAll() if container has changed size
- if (dims.innerWidth !== sC.innerWidth || dims.innerHeight !== sC.innerHeight)
- resizeAll();
- }, delay);
- // ALSO set fixed-delay timer, if not already running
- if (!timer.data["winResizeRepeater"]) setWindowResizeRepeater();
- }
-
-, setWindowResizeRepeater = function () {
- var delay = Number(options.resizeWithWindowMaxDelay);
- if (delay > 0)
- timer.set("winResizeRepeater", function(){ setWindowResizeRepeater(); resizeAll(); }, delay);
- }
-
-, unload = function () {
- var o = options;
-
- _runCallbacks("onunload_start");
-
- // trigger plugin callabacks for this layout (eg: stateManagement)
- runPluginCallbacks( Instance, $.layout.onUnload );
-
- _runCallbacks("onunload_end");
- }
-
- /**
- * Validate and initialize container CSS and events
- *
- * @see _create()
- */
-, _initContainer = function () {
- var
- N = $N[0]
- , $H = $("html")
- , tag = sC.tagName = N.tagName
- , id = sC.id = N.id
- , cls = sC.className = N.className
- , o = options
- , name = o.name
- , props = "position,margin,padding,border"
- , css = "layoutCSS"
- , CSS = {}
- , hid = "hidden" // used A LOT!
- // see if this container is a 'pane' inside an outer-layout
- , parent = $N.data("parentLayout") // parent-layout Instance
- , pane = $N.data("layoutEdge") // pane-name in parent-layout
- , isChild = parent && pane
- , num = $.layout.cssNum
- , $parent, n
- ;
- // sC = state.container
- sC.selector = $N.selector.split(".slice")[0];
- sC.ref = (o.name ? o.name +' layout / ' : '') + tag + (id ? "#"+id : cls ? '.['+cls+']' : ''); // used in messages
- sC.isBody = (tag === "BODY");
-
- // try to find a parent-layout
- if (!isChild && !sC.isBody) {
- $parent = $N.closest("."+ $.layout.defaults.panes.paneClass);
- parent = $parent.data("parentLayout");
- pane = $parent.data("layoutEdge");
- isChild = parent && pane;
- }
-
- $N .data({
- layout: Instance
- , layoutContainer: sID // FLAG to indicate this is a layout-container - contains unique internal ID
- })
- .addClass(o.containerClass)
- ;
- var layoutMethods = {
- destroy: ''
- , initPanes: ''
- , resizeAll: 'resizeAll'
- , resize: 'resizeAll'
- };
- // loop hash and bind all methods - include layoutID namespacing
- for (name in layoutMethods) {
- $N.bind("layout"+ name.toLowerCase() +"."+ sID, Instance[ layoutMethods[name] || name ]);
- }
-
- // if this container is another layout's 'pane', then set child/parent pointers
- if (isChild) {
- // update parent flag
- Instance.hasParentLayout = true;
- // set pointers to THIS child-layout (Instance) in parent-layout
- parent.refreshChildren( pane, Instance );
- }
-
- // SAVE original container CSS for use in destroy()
- if (!$N.data(css)) {
- // handle props like overflow different for BODY & HTML - has 'system default' values
- if (sC.isBody) {
- // SAVE <BODY> CSS
- $N.data(css, $.extend( styles($N, props), {
- height: $N.css("height")
- , overflow: $N.css("overflow")
- , overflowX: $N.css("overflowX")
- , overflowY: $N.css("overflowY")
- }));
- // ALSO SAVE <HTML> CSS
- $H.data(css, $.extend( styles($H, 'padding'), {
- height: "auto" // FF would return a fixed px-size!
- , overflow: $H.css("overflow")
- , overflowX: $H.css("overflowX")
- , overflowY: $H.css("overflowY")
- }));
- }
- else // handle props normally for non-body elements
- $N.data(css, styles($N, props+",top,bottom,left,right,width,height,overflow,overflowX,overflowY") );
- }
-
- try {
- // common container CSS
- CSS = {
- overflow: hid
- , overflowX: hid
- , overflowY: hid
- };
- $N.css( CSS );
-
- if (o.inset && !$.isPlainObject(o.inset)) {
- // can specify a single number for equal outset all-around
- n = parseInt(o.inset, 10) || 0
- o.inset = {
- top: n
- , bottom: n
- , left: n
- , right: n
- };
- }
-
- // format html & body if this is a full page layout
- if (sC.isBody) {
- // if HTML has padding, use this as an outer-spacing around BODY
- if (!o.outset) {
- // use padding from parent-elem (HTML) as outset
- o.outset = {
- top: num($H, "paddingTop")
- , bottom: num($H, "paddingBottom")
- , left: num($H, "paddingLeft")
- , right: num($H, "paddingRight")
- };
- }
- else if (!$.isPlainObject(o.outset)) {
- // can specify a single number for equal outset all-around
- n = parseInt(o.outset, 10) || 0
- o.outset = {
- top: n
- , bottom: n
- , left: n
- , right: n
- };
- }
- // HTML
- $H.css( CSS ).css({
- height: "100%"
- , border: "none" // no border or padding allowed when using height = 100%
- , padding: 0 // ditto
- , margin: 0
- });
- // BODY
- if (browser.isIE6) {
- // IE6 CANNOT use the trick of setting absolute positioning on all 4 sides - must have 'height'
- $N.css({
- width: "100%"
- , height: "100%"
- , border: "none" // no border or padding allowed when using height = 100%
- , padding: 0 // ditto
- , margin: 0
- , position: "relative"
- });
- // convert body padding to an inset option - the border cannot be measured in IE6!
- if (!o.inset) o.inset = elDims( $N ).inset;
- }
- else { // use absolute positioning for BODY to allow borders & padding without overflow
- $N.css({
- width: "auto"
- , height: "auto"
- , margin: 0
- , position: "absolute" // allows for border and padding on BODY
- });
- // apply edge-positioning created above
- $N.css( o.outset );
- }
- // set current layout-container dimensions
- $.extend(sC, elDims( $N, o.inset )); // passing inset means DO NOT include insetX values
- }
- else {
- // container MUST have 'position'
- var p = $N.css("position");
- if (!p || !p.match(/(fixed|absolute|relative)/))
- $N.css("position","relative");
-
- // set current layout-container dimensions
- if ( $N.is(":visible") ) {
- $.extend(sC, elDims( $N, o.inset )); // passing inset means DO NOT change insetX (padding) values
- if (sC.innerHeight < 1) // container has no 'height' - warn developer
- _log( o.errors.noContainerHeight.replace(/CONTAINER/, sC.ref) );
- }
- }
-
- // if container has min-width/height, then enable scrollbar(s)
- if ( num($N, "minWidth") ) $N.parent().css("overflowX","auto");
- if ( num($N, "minHeight") ) $N.parent().css("overflowY","auto");
-
- } catch (ex) {}
- }
-
- /**
- * Bind layout hotkeys - if options enabled
- *
- * @see _create() and addPane()
- * @param {string=} [panes=""] The edge(s) to process
- */
-, initHotkeys = function (panes) {
- panes = panes ? panes.split(",") : _c.borderPanes;
- // bind keyDown to capture hotkeys, if option enabled for ANY pane
- $.each(panes, function (i, pane) {
- var o = options[pane];
- if (o.enableCursorHotkey || o.customHotkey) {
- $(document).bind("keydown."+ sID, keyDown); // only need to bind this ONCE
- return false; // BREAK - binding was done
- }
- });
- }
-
- /**
- * Build final OPTIONS data
- *
- * @see _create()
- */
-, initOptions = function () {
- var data, d, pane, key, val, i, c, o;
-
- // reprocess user's layout-options to have correct options sub-key structure
- opts = $.layout.transformData( opts, true ); // panes = default subkey
-
- // auto-rename old options for backward compatibility
- opts = $.layout.backwardCompatibility.renameAllOptions( opts );
-
- // if user-options has 'panes' key (pane-defaults), clean it...
- if (!$.isEmptyObject(opts.panes)) {
- // REMOVE any pane-defaults that MUST be set per-pane
- data = $.layout.optionsMap.noDefault;
- for (i=0, c=data.length; i<c; i++) {
- key = data[i];
- delete opts.panes[key]; // OK if does not exist
- }
- // REMOVE any layout-options specified under opts.panes
- data = $.layout.optionsMap.layout;
- for (i=0, c=data.length; i<c; i++) {
- key = data[i];
- delete opts.panes[key]; // OK if does not exist
- }
- }
-
- // MOVE any NON-layout-options from opts-root to opts.panes
- data = $.layout.optionsMap.layout;
- var rootKeys = $.layout.config.optionRootKeys;
- for (key in opts) {
- val = opts[key];
- if ($.inArray(key, rootKeys) < 0 && $.inArray(key, data) < 0) {
- if (!opts.panes[key])
- opts.panes[key] = $.isPlainObject(val) ? $.extend(true, {}, val) : val;
- delete opts[key]
- }
- }
-
- // START by updating ALL options from opts
- $.extend(true, options, opts);
-
- // CREATE final options (and config) for EACH pane
- $.each(_c.allPanes, function (i, pane) {
-
- // apply 'pane-defaults' to CONFIG.[PANE]
- _c[pane] = $.extend(true, {}, _c.panes, _c[pane]);
-
- d = options.panes;
- o = options[pane];
-
- // center-pane uses SOME keys in defaults.panes branch
- if (pane === 'center') {
- // ONLY copy keys from opts.panes listed in: $.layout.optionsMap.center
- data = $.layout.optionsMap.center; // list of 'center-pane keys'
- for (i=0, c=data.length; i<c; i++) { // loop the list...
- key = data[i];
- // only need to use pane-default if pane-specific value not set
- if (!opts.center[key] && (opts.panes[key] || !o[key]))
- o[key] = d[key]; // pane-default
- }
- }
- else {
- // border-panes use ALL keys in defaults.panes branch
- o = options[pane] = $.extend(true, {}, d, o); // re-apply pane-specific opts AFTER pane-defaults
- createFxOptions( pane );
- // ensure all border-pane-specific base-classes exist
- if (!o.resizerClass) o.resizerClass = "ui-layout-resizer";
- if (!o.togglerClass) o.togglerClass = "ui-layout-toggler";
- }
- // ensure we have base pane-class (ALL panes)
- if (!o.paneClass) o.paneClass = "ui-layout-pane";
- });
-
- // update options.zIndexes if a zIndex-option specified
- var zo = opts.zIndex
- , z = options.zIndexes;
- if (zo > 0) {
- z.pane_normal = zo;
- z.content_mask = max(zo+1, z.content_mask); // MIN = +1
- z.resizer_normal = max(zo+2, z.resizer_normal); // MIN = +2
- }
-
- // DELETE 'panes' key now that we are done - values were copied to EACH pane
- delete options.panes;
-
-
- function createFxOptions ( pane ) {
- var o = options[pane]
- , d = options.panes;
- // ensure fxSettings key to avoid errors
- if (!o.fxSettings) o.fxSettings = {};
- if (!d.fxSettings) d.fxSettings = {};
-
- $.each(["_open","_close","_size"], function (i,n) {
- var
- sName = "fxName"+ n
- , sSpeed = "fxSpeed"+ n
- , sSettings = "fxSettings"+ n
- // recalculate fxName according to specificity rules
- , fxName = o[sName] =
- o[sName] // options.west.fxName_open
- || d[sName] // options.panes.fxName_open
- || o.fxName // options.west.fxName
- || d.fxName // options.panes.fxName
- || "none" // MEANS $.layout.defaults.panes.fxName == "" || false || null || 0
- , fxExists = $.effects && ($.effects[fxName] || ($.effects.effect && $.effects.effect[fxName]))
- ;
- // validate fxName to ensure is valid effect - MUST have effect-config data in options.effects
- if (fxName === "none" || !options.effects[fxName] || !fxExists)
- fxName = o[sName] = "none"; // effect not loaded OR unrecognized fxName
-
- // set vars for effects subkeys to simplify logic
- var fx = options.effects[fxName] || {} // effects.slide
- , fx_all = fx.all || null // effects.slide.all
- , fx_pane = fx[pane] || null // effects.slide.west
- ;
- // create fxSpeed[_open|_close|_size]
- o[sSpeed] =
- o[sSpeed] // options.west.fxSpeed_open
- || d[sSpeed] // options.west.fxSpeed_open
- || o.fxSpeed // options.west.fxSpeed
- || d.fxSpeed // options.panes.fxSpeed
- || null // DEFAULT - let fxSetting.duration control speed
- ;
- // create fxSettings[_open|_close|_size]
- o[sSettings] = $.extend(
- true
- , {}
- , fx_all // effects.slide.all
- , fx_pane // effects.slide.west
- , d.fxSettings // options.panes.fxSettings
- , o.fxSettings // options.west.fxSettings
- , d[sSettings] // options.panes.fxSettings_open
- , o[sSettings] // options.west.fxSettings_open
- );
- });
-
- // DONE creating action-specific-settings for this pane,
- // so DELETE generic options - are no longer meaningful
- delete o.fxName;
- delete o.fxSpeed;
- delete o.fxSettings;
- }
- }
-
- /**
- * Initialize module objects, styling, size and position for all panes
- *
- * @see _initElements()
- * @param {string} pane The pane to process
- */
-, getPane = function (pane) {
- var sel = options[pane].paneSelector
- if (sel.substr(0,1)==="#") // ID selector
- // NOTE: elements selected 'by ID' DO NOT have to be 'children'
- return $N.find(sel).eq(0);
- else { // class or other selector
- var $P = $N.children(sel).eq(0);
- // look for the pane nested inside a 'form' element
- return $P.length ? $P : $N.children("form:first").children(sel).eq(0);
- }
- }
-
- /**
- * @param {Object=} evt
- */
-, initPanes = function (evt) {
- // stopPropagation if called by trigger("layoutinitpanes") - use evtPane utility
- evtPane(evt);
-
- // NOTE: do north & south FIRST so we can measure their height - do center LAST
- $.each(_c.allPanes, function (idx, pane) {
- addPane( pane, true );
- });
-
- // init the pane-handles NOW in case we have to hide or close the pane below
- initHandles();
-
- // now that all panes have been initialized and initially-sized,
- // make sure there is really enough space available for each pane
- $.each(_c.borderPanes, function (i, pane) {
- if ($Ps[pane] && state[pane].isVisible) { // pane is OPEN
- setSizeLimits(pane);
- makePaneFit(pane); // pane may be Closed, Hidden or Resized by makePaneFit()
- }
- });
- // size center-pane AGAIN in case we 'closed' a border-pane in loop above
- sizeMidPanes("center");
-
- // Chrome/Webkit sometimes fires callbacks BEFORE it completes resizing!
- // Before RC30.3, there was a 10ms delay here, but that caused layout
- // to load asynchrously, which is BAD, so try skipping delay for now
-
- // process pane contents and callbacks, and init/resize child-layout if exists
- $.each(_c.allPanes, function (idx, pane) {
- afterInitPane(pane);
- });
- }
-
- /**
- * Add a pane to the layout - subroutine of initPanes()
- *
- * @see initPanes()
- * @param {string} pane The pane to process
- * @param {boolean=} [force=false] Size content after init
- */
-, addPane = function (pane, force) {
- if ( !force && !isInitialized() ) return;
- var
- o = options[pane]
- , s = state[pane]
- , c = _c[pane]
- , dir = c.dir
- , fx = s.fx
- , spacing = o.spacing_open || 0
- , isCenter = (pane === "center")
- , CSS = {}
- , $P = $Ps[pane]
- , size, minSize, maxSize, child
- ;
- // if pane-pointer already exists, remove the old one first
- if ($P)
- removePane( pane, false, true, false );
- else
- $Cs[pane] = false; // init
-
- $P = $Ps[pane] = getPane(pane);
- if (!$P.length) {
- $Ps[pane] = false; // logic
- return;
- }
-
- // SAVE original Pane CSS
- if (!$P.data("layoutCSS")) {
- var props = "position,top,left,bottom,right,width,height,overflow,zIndex,display,backgroundColor,padding,margin,border";
- $P.data("layoutCSS", styles($P, props));
- }
-
- // create alias for pane data in Instance - initHandles will add more
- Instance[pane] = {
- name: pane
- , pane: $Ps[pane]
- , content: $Cs[pane]
- , options: options[pane]
- , state: state[pane]
- , children: children[pane]
- };
-
- // add classes, attributes & events
- $P .data({
- parentLayout: Instance // pointer to Layout Instance
- , layoutPane: Instance[pane] // NEW pointer to pane-alias-object
- , layoutEdge: pane
- , layoutRole: "pane"
- })
- .css(c.cssReq).css("zIndex", options.zIndexes.pane_normal)
- .css(o.applyDemoStyles ? c.cssDemo : {}) // demo styles
- .addClass( o.paneClass +" "+ o.paneClass+"-"+pane ) // default = "ui-layout-pane ui-layout-pane-west" - may be a dupe of 'paneSelector'
- .bind("mouseenter."+ sID, addHover )
- .bind("mouseleave."+ sID, removeHover )
- ;
- var paneMethods = {
- hide: ''
- , show: ''
- , toggle: ''
- , close: ''
- , open: ''
- , slideOpen: ''
- , slideClose: ''
- , slideToggle: ''
- , size: 'sizePane'
- , sizePane: 'sizePane'
- , sizeContent: ''
- , sizeHandles: ''
- , enableClosable: ''
- , disableClosable: ''
- , enableSlideable: ''
- , disableSlideable: ''
- , enableResizable: ''
- , disableResizable: ''
- , swapPanes: 'swapPanes'
- , swap: 'swapPanes'
- , move: 'swapPanes'
- , removePane: 'removePane'
- , remove: 'removePane'
- , createChildren: ''
- , resizeChildren: ''
- , resizeAll: 'resizeAll'
- , resizeLayout: 'resizeAll'
- }
- , name;
- // loop hash and bind all methods - include layoutID namespacing
- for (name in paneMethods) {
- $P.bind("layoutpane"+ name.toLowerCase() +"."+ sID, Instance[ paneMethods[name] || name ]);
- }
-
- // see if this pane has a 'scrolling-content element'
- initContent(pane, false); // false = do NOT sizeContent() - called later
-
- if (!isCenter) {
- // call _parseSize AFTER applying pane classes & styles - but before making visible (if hidden)
- // if o.size is auto or not valid, then MEASURE the pane and use that as its 'size'
- size = s.size = _parseSize(pane, o.size);
- minSize = _parseSize(pane,o.minSize) || 1;
- maxSize = _parseSize(pane,o.maxSize) || 100000;
- if (size > 0) size = max(min(size, maxSize), minSize);
- s.autoResize = o.autoResize; // used with percentage sizes
-
- // state for border-panes
- s.isClosed = false; // true = pane is closed
- s.isSliding = false; // true = pane is currently open by 'sliding' over adjacent panes
- s.isResizing= false; // true = pane is in process of being resized
- s.isHidden = false; // true = pane is hidden - no spacing, resizer or toggler is visible!
-
- // array for 'pin buttons' whose classNames are auto-updated on pane-open/-close
- if (!s.pins) s.pins = [];
- }
- // states common to ALL panes
- s.tagName = $P[0].tagName;
- s.edge = pane; // useful if pane is (or about to be) 'swapped' - easy find out where it is (or is going)
- s.noRoom = false; // true = pane 'automatically' hidden due to insufficient room - will unhide automatically
- s.isVisible = true; // false = pane is invisible - closed OR hidden - simplify logic
-
- // init pane positioning
- setPanePosition( pane );
-
- // if pane is not visible,
- if (dir === "horz") // north or south pane
- CSS.height = cssH($P, size);
- else if (dir === "vert") // east or west pane
- CSS.width = cssW($P, size);
- //else if (isCenter) {}
-
- $P.css(CSS); // apply size -- top, bottom & height will be set by sizeMidPanes
- if (dir != "horz") sizeMidPanes(pane, true); // true = skipCallback
-
- // if manually adding a pane AFTER layout initialization, then...
- if (state.initialized) {
- initHandles( pane );
- initHotkeys( pane );
- }
-
- // close or hide the pane if specified in settings
- if (o.initClosed && o.closable && !o.initHidden)
- close(pane, true, true); // true, true = force, noAnimation
- else if (o.initHidden || o.initClosed)
- hide(pane); // will be completely invisible - no resizer or spacing
- else if (!s.noRoom)
- // make the pane visible - in case was initially hidden
- $P.css("display","block");
- // ELSE setAsOpen() - called later by initHandles()
-
- // RESET visibility now - pane will appear IF display:block
- $P.css("visibility","visible");
-
- // check option for auto-handling of pop-ups & drop-downs
- if (o.showOverflowOnHover)
- $P.hover( allowOverflow, resetOverflow );
-
- // if manually adding a pane AFTER layout initialization, then...
- if (state.initialized) {
- afterInitPane( pane );
- }
- }
-
-, afterInitPane = function (pane) {
- var $P = $Ps[pane]
- , s = state[pane]
- , o = options[pane]
- ;
- if (!$P) return;
-
- // see if there is a directly-nested layout inside this pane
- if ($P.data("layout"))
- refreshChildren( pane, $P.data("layout") );
-
- // process pane contents and callbacks, and init/resize child-layout if exists
- if (s.isVisible) { // pane is OPEN
- if (state.initialized) // this pane was added AFTER layout was created
- resizeAll(); // will also sizeContent
- else
- sizeContent(pane);
-
- if (o.triggerEventsOnLoad)
- _runCallbacks("onresize_end", pane);
- else // automatic if onresize called, otherwise call it specifically
- // resize child - IF inner-layout already exists (created before this layout)
- resizeChildren(pane, true); // a previously existing childLayout
- }
-
- // init childLayouts - even if pane is not visible
- if (o.initChildren && o.children)
- createChildren(pane);
- }
-
- /**
- * @param {string=} panes The pane(s) to process
- */
-, setPanePosition = function (panes) {
- panes = panes ? panes.split(",") : _c.borderPanes;
-
- // create toggler DIVs for each pane, and set object pointers for them, eg: $R.north = north toggler DIV
- $.each(panes, function (i, pane) {
- var $P = $Ps[pane]
- , $R = $Rs[pane]
- , o = options[pane]
- , s = state[pane]
- , side = _c[pane].side
- , CSS = {}
- ;
- if (!$P) return; // pane does not exist - skip
-
- // set css-position to account for container borders & padding
- switch (pane) {
- case "north": CSS.top = sC.inset.top;
- CSS.left = sC.inset.left;
- CSS.right = sC.inset.right;
- break;
- case "south": CSS.bottom = sC.inset.bottom;
- CSS.left = sC.inset.left;
- CSS.right = sC.inset.right;
- break;
- case "west": CSS.left = sC.inset.left; // top, bottom & height set by sizeMidPanes()
- break;
- case "east": CSS.right = sC.inset.right; // ditto
- break;
- case "center": // top, left, width & height set by sizeMidPanes()
- }
- // apply position
- $P.css(CSS);
-
- // update resizer position
- if ($R && s.isClosed)
- $R.css(side, sC.inset[side]);
- else if ($R && !s.isHidden)
- $R.css(side, sC.inset[side] + getPaneSize(pane));
- });
- }
-
- /**
- * Initialize module objects, styling, size and position for all resize bars and toggler buttons
- *
- * @see _create()
- * @param {string=} [panes=""] The edge(s) to process
- */
-, initHandles = function (panes) {
- panes = panes ? panes.split(",") : _c.borderPanes;
-
- // create toggler DIVs for each pane, and set object pointers for them, eg: $R.north = north toggler DIV
- $.each(panes, function (i, pane) {
- var $P = $Ps[pane];
- $Rs[pane] = false; // INIT
- $Ts[pane] = false;
- if (!$P) return; // pane does not exist - skip
-
- var o = options[pane]
- , s = state[pane]
- , c = _c[pane]
- , paneId = o.paneSelector.substr(0,1) === "#" ? o.paneSelector.substr(1) : ""
- , rClass = o.resizerClass
- , tClass = o.togglerClass
- , spacing = (s.isVisible ? o.spacing_open : o.spacing_closed)
- , _pane = "-"+ pane // used for classNames
- , _state = (s.isVisible ? "-open" : "-closed") // used for classNames
- , I = Instance[pane]
- // INIT RESIZER BAR
- , $R = I.resizer = $Rs[pane] = $("<div></div>")
- // INIT TOGGLER BUTTON
- , $T = I.toggler = (o.closable ? $Ts[pane] = $("<div></div>") : false)
- ;
-
- //if (s.isVisible && o.resizable) ... handled by initResizable
- if (!s.isVisible && o.slidable)
- $R.attr("title", o.tips.Slide).css("cursor", o.sliderCursor);
-
- $R // if paneSelector is an ID, then create a matching ID for the resizer, eg: "#paneLeft" => "paneLeft-resizer"
- .attr("id", paneId ? paneId +"-resizer" : "" )
- .data({
- parentLayout: Instance
- , layoutPane: Instance[pane] // NEW pointer to pane-alias-object
- , layoutEdge: pane
- , layoutRole: "resizer"
- })
- .css(_c.resizers.cssReq).css("zIndex", options.zIndexes.resizer_normal)
- .css(o.applyDemoStyles ? _c.resizers.cssDemo : {}) // add demo styles
- .addClass(rClass +" "+ rClass+_pane)
- .hover(addHover, removeHover) // ALWAYS add hover-classes, even if resizing is not enabled - handle with CSS instead
- .hover(onResizerEnter, onResizerLeave) // ALWAYS NEED resizer.mouseleave to balance toggler.mouseenter
- .mousedown($.layout.disableTextSelection) // prevent text-selection OUTSIDE resizer
- .mouseup($.layout.enableTextSelection) // not really necessary, but just in case
- .appendTo($N) // append DIV to container
- ;
- if ($.fn.disableSelection)
- $R.disableSelection(); // prevent text-selection INSIDE resizer
- if (o.resizerDblClickToggle)
- $R.bind("dblclick."+ sID, toggle );
-
- if ($T) {
- $T // if paneSelector is an ID, then create a matching ID for the resizer, eg: "#paneLeft" => "#paneLeft-toggler"
- .attr("id", paneId ? paneId +"-toggler" : "" )
- .data({
- parentLayout: Instance
- , layoutPane: Instance[pane] // NEW pointer to pane-alias-object
- , layoutEdge: pane
- , layoutRole: "toggler"
- })
- .css(_c.togglers.cssReq) // add base/required styles
- .css(o.applyDemoStyles ? _c.togglers.cssDemo : {}) // add demo styles
- .addClass(tClass +" "+ tClass+_pane)
- .hover(addHover, removeHover) // ALWAYS add hover-classes, even if toggling is not enabled - handle with CSS instead
- .bind("mouseenter", onResizerEnter) // NEED toggler.mouseenter because mouseenter MAY NOT fire on resizer
- .appendTo($R) // append SPAN to resizer DIV
- ;
- // ADD INNER-SPANS TO TOGGLER
- if (o.togglerContent_open) // ui-layout-open
- $("<span>"+ o.togglerContent_open +"</span>")
- .data({
- layoutEdge: pane
- , layoutRole: "togglerContent"
- })
- .data("layoutRole", "togglerContent")
- .data("layoutEdge", pane)
- .addClass("content content-open")
- .css("display","none")
- .appendTo( $T )
- //.hover( addHover, removeHover ) // use ui-layout-toggler-west-hover .content-open instead!
- ;
- if (o.togglerContent_closed) // ui-layout-closed
- $("<span>"+ o.togglerContent_closed +"</span>")
- .data({
- layoutEdge: pane
- , layoutRole: "togglerContent"
- })
- .addClass("content content-closed")
- .css("display","none")
- .appendTo( $T )
- //.hover( addHover, removeHover ) // use ui-layout-toggler-west-hover .content-closed instead!
- ;
- // ADD TOGGLER.click/.hover
- enableClosable(pane);
- }
-
- // add Draggable events
- initResizable(pane);
-
- // ADD CLASSNAMES & SLIDE-BINDINGS - eg: class="resizer resizer-west resizer-open"
- if (s.isVisible)
- setAsOpen(pane); // onOpen will be called, but NOT onResize
- else {
- setAsClosed(pane); // onClose will be called
- bindStartSlidingEvents(pane, true); // will enable events IF option is set
- }
-
- });
-
- // SET ALL HANDLE DIMENSIONS
- sizeHandles();
- }
-
-
- /**
- * Initialize scrolling ui-layout-content div - if exists
- *
- * @see initPane() - or externally after an Ajax injection
- * @param {string} pane The pane to process
- * @param {boolean=} [resize=true] Size content after init
- */
-, initContent = function (pane, resize) {
- if (!isInitialized()) return;
- var
- o = options[pane]
- , sel = o.contentSelector
- , I = Instance[pane]
- , $P = $Ps[pane]
- , $C
- ;
- if (sel) $C = I.content = $Cs[pane] = (o.findNestedContent)
- ? $P.find(sel).eq(0) // match 1-element only
- : $P.children(sel).eq(0)
- ;
- if ($C && $C.length) {
- $C.data("layoutRole", "content");
- // SAVE original Content CSS
- if (!$C.data("layoutCSS"))
- $C.data("layoutCSS", styles($C, "height"));
- $C.css( _c.content.cssReq );
- if (o.applyDemoStyles) {
- $C.css( _c.content.cssDemo ); // add padding & overflow: auto to content-div
- $P.css( _c.content.cssDemoPane ); // REMOVE padding/scrolling from pane
- }
- // ensure no vertical scrollbar on pane - will mess up measurements
- if ($P.css("overflowX").match(/(scroll|auto)/)) {
- $P.css("overflow", "hidden");
- }
- state[pane].content = {}; // init content state
- if (resize !== false) sizeContent(pane);
- // sizeContent() is called AFTER init of all elements
- }
- else
- I.content = $Cs[pane] = false;
- }
-
-
- /**
- * Add resize-bars to all panes that specify it in options
- * -dependancy: $.fn.resizable - will skip if not found
- *
- * @see _create()
- * @param {string=} [panes=""] The edge(s) to process
- */
-, initResizable = function (panes) {
- var draggingAvailable = $.layout.plugins.draggable
- , side // set in start()
- ;
- panes = panes ? panes.split(",") : _c.borderPanes;
-
- $.each(panes, function (idx, pane) {
- var o = options[pane];
- if (!draggingAvailable || !$Ps[pane] || !o.resizable) {
- o.resizable = false;
- return true; // skip to next
- }
-
- var s = state[pane]
- , z = options.zIndexes
- , c = _c[pane]
- , side = c.dir=="horz" ? "top" : "left"
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- , base = o.resizerClass
- , lastPos = 0 // used when live-resizing
- , r, live // set in start because may change
- // 'drag' classes are applied to the ORIGINAL resizer-bar while dragging is in process
- , resizerClass = base+"-drag" // resizer-drag
- , resizerPaneClass = base+"-"+pane+"-drag" // resizer-north-drag
- // 'helper' class is applied to the CLONED resizer-bar while it is being dragged
- , helperClass = base+"-dragging" // resizer-dragging
- , helperPaneClass = base+"-"+pane+"-dragging" // resizer-north-dragging
- , helperLimitClass = base+"-dragging-limit" // resizer-drag
- , helperPaneLimitClass = base+"-"+pane+"-dragging-limit" // resizer-north-drag
- , helperClassesSet = false // logic var
- ;
-
- if (!s.isClosed)
- $R.attr("title", o.tips.Resize)
- .css("cursor", o.resizerCursor); // n-resize, s-resize, etc
-
- $R.draggable({
- containment: $N[0] // limit resizing to layout container
- , axis: (c.dir=="horz" ? "y" : "x") // limit resizing to horz or vert axis
- , delay: 0
- , distance: 1
- , grid: o.resizingGrid
- // basic format for helper - style it using class: .ui-draggable-dragging
- , helper: "clone"
- , opacity: o.resizerDragOpacity
- , addClasses: false // avoid ui-state-disabled class when disabled
- //, iframeFix: o.draggableIframeFix // TODO: consider using when bug is fixed
- , zIndex: z.resizer_drag
-
- , start: function (e, ui) {
- // REFRESH options & state pointers in case we used swapPanes
- o = options[pane];
- s = state[pane];
- // re-read options
- live = o.livePaneResizing;
-
- // ondrag_start callback - will CANCEL hide if returns false
- // TODO: dragging CANNOT be cancelled like this, so see if there is a way?
- if (false === _runCallbacks("ondrag_start", pane)) return false;
-
- s.isResizing = true; // prevent pane from closing while resizing
- state.paneResizing = pane; // easy to see if ANY pane is resizing
- timer.clear(pane+"_closeSlider"); // just in case already triggered
-
- // SET RESIZER LIMITS - used in drag()
- setSizeLimits(pane); // update pane/resizer state
- r = s.resizerPosition;
- lastPos = ui.position[ side ]
-
- $R.addClass( resizerClass +" "+ resizerPaneClass ); // add drag classes
- helperClassesSet = false; // reset logic var - see drag()
-
- // MASK PANES CONTAINING IFRAMES, APPLETS OR OTHER TROUBLESOME ELEMENTS
- showMasks( pane, { resizing: true });
- }
-
- , drag: function (e, ui) {
- if (!helperClassesSet) { // can only add classes after clone has been added to the DOM
- //$(".ui-draggable-dragging")
- ui.helper
- .addClass( helperClass +" "+ helperPaneClass ) // add helper classes
- .css({ right: "auto", bottom: "auto" }) // fix dir="rtl" issue
- .children().css("visibility","hidden") // hide toggler inside dragged resizer-bar
- ;
- helperClassesSet = true;
- // draggable bug!? RE-SET zIndex to prevent E/W resize-bar showing through N/S pane!
- if (s.isSliding) $Ps[pane].css("zIndex", z.pane_sliding);
- }
- // CONTAIN RESIZER-BAR TO RESIZING LIMITS
- var limit = 0;
- if (ui.position[side] < r.min) {
- ui.position[side] = r.min;
- limit = -1;
- }
- else if (ui.position[side] > r.max) {
- ui.position[side] = r.max;
- limit = 1;
- }
- // ADD/REMOVE dragging-limit CLASS
- if (limit) {
- ui.helper.addClass( helperLimitClass +" "+ helperPaneLimitClass ); // at dragging-limit
- window.defaultStatus = (limit>0 && pane.match(/(north|west)/)) || (limit<0 && pane.match(/(south|east)/)) ? o.tips.maxSizeWarning : o.tips.minSizeWarning;
- }
- else {
- ui.helper.removeClass( helperLimitClass +" "+ helperPaneLimitClass ); // not at dragging-limit
- window.defaultStatus = "";
- }
- // DYNAMICALLY RESIZE PANES IF OPTION ENABLED
- // won't trigger unless resizer has actually moved!
- if (live && Math.abs(ui.position[side] - lastPos) >= o.liveResizingTolerance) {
- lastPos = ui.position[side];
- resizePanes(e, ui, pane)
- }
- }
-
- , stop: function (e, ui) {
- $('body').enableSelection(); // RE-ENABLE TEXT SELECTION
- window.defaultStatus = ""; // clear 'resizing limit' message from statusbar
- $R.removeClass( resizerClass +" "+ resizerPaneClass ); // remove drag classes from Resizer
- s.isResizing = false;
- state.paneResizing = false; // easy to see if ANY pane is resizing
- resizePanes(e, ui, pane, true); // true = resizingDone
- }
-
- });
- });
-
- /**
- * resizePanes
- *
- * Sub-routine called from stop() - and drag() if livePaneResizing
- *
- * @param {!Object} evt
- * @param {!Object} ui
- * @param {string} pane
- * @param {boolean=} [resizingDone=false]
- */
- var resizePanes = function (evt, ui, pane, resizingDone) {
- var dragPos = ui.position
- , c = _c[pane]
- , o = options[pane]
- , s = state[pane]
- , resizerPos
- ;
- switch (pane) {
- case "north": resizerPos = dragPos.top; break;
- case "west": resizerPos = dragPos.left; break;
- case "south": resizerPos = sC.layoutHeight - dragPos.top - o.spacing_open; break;
- case "east": resizerPos = sC.layoutWidth - dragPos.left - o.spacing_open; break;
- };
- // remove container margin from resizer position to get the pane size
- var newSize = resizerPos - sC.inset[c.side];
-
- // Disable OR Resize Mask(s) created in drag.start
- if (!resizingDone) {
- // ensure we meet liveResizingTolerance criteria
- if (Math.abs(newSize - s.size) < o.liveResizingTolerance)
- return; // SKIP resize this time
- // resize the pane
- manualSizePane(pane, newSize, false, true); // true = noAnimation
- sizeMasks(); // resize all visible masks
- }
- else { // resizingDone
- // ondrag_end callback
- if (false !== _runCallbacks("ondrag_end", pane))
- manualSizePane(pane, newSize, false, true); // true = noAnimation
- hideMasks(true); // true = force hiding all masks even if one is 'sliding'
- if (s.isSliding) // RE-SHOW 'object-masks' so objects won't show through sliding pane
- showMasks( pane, { resizing: true });
- }
- };
- }
-
- /**
- * sizeMask
- *
- * Needed to overlay a DIV over an IFRAME-pane because mask CANNOT be *inside* the pane
- * Called when mask created, and during livePaneResizing
- */
-, sizeMask = function () {
- var $M = $(this)
- , pane = $M.data("layoutMask") // eg: "west"
- , s = state[pane]
- ;
- // only masks over an IFRAME-pane need manual resizing
- if (s.tagName == "IFRAME" && s.isVisible) // no need to mask closed/hidden panes
- $M.css({
- top: s.offsetTop
- , left: s.offsetLeft
- , width: s.outerWidth
- , height: s.outerHeight
- });
- /* ALT Method...
- var $P = $Ps[pane];
- $M.css( $P.position() ).css({ width: $P[0].offsetWidth, height: $P[0].offsetHeight });
- */
- }
-, sizeMasks = function () {
- $Ms.each( sizeMask ); // resize all 'visible' masks
- }
-
- /**
- * @param {string} pane The pane being resized, animated or isSliding
- * @param {Object=} [args] (optional) Options: which masks to apply, and to which panes
- */
-, showMasks = function (pane, args) {
- var c = _c[pane]
- , panes = ["center"]
- , z = options.zIndexes
- , a = $.extend({
- objectsOnly: false
- , animation: false
- , resizing: true
- , sliding: state[pane].isSliding
- }, args )
- , o, s
- ;
- if (a.resizing)
- panes.push( pane );
- if (a.sliding)
- panes.push( _c.oppositeEdge[pane] ); // ADD the oppositeEdge-pane
-
- if (c.dir === "horz") {
- panes.push("west");
- panes.push("east");
- }
-
- $.each(panes, function(i,p){
- s = state[p];
- o = options[p];
- if (s.isVisible && ( o.maskObjects || (!a.objectsOnly && o.maskContents) )) {
- getMasks(p).each(function(){
- sizeMask.call(this);
- this.style.zIndex = s.isSliding ? z.pane_sliding+1 : z.pane_normal+1
- this.style.display = "block";
- });
- }
- });
- }
-
- /**
- * @param {boolean=} force Hide masks even if a pane is sliding
- */
-, hideMasks = function (force) {
- // ensure no pane is resizing - could be a timing issue
- if (force || !state.paneResizing) {
- $Ms.hide(); // hide ALL masks
- }
- // if ANY pane is sliding, then DO NOT remove masks from panes with maskObjects enabled
- else if (!force && !$.isEmptyObject( state.panesSliding )) {
- var i = $Ms.length - 1
- , p, $M;
- for (; i >= 0; i--) {
- $M = $Ms.eq(i);
- p = $M.data("layoutMask");
- if (!options[p].maskObjects) {
- $M.hide();
- }
- }
- }
- }
-
- /**
- * @param {string} pane
- */
-, getMasks = function (pane) {
- var $Masks = $([])
- , $M, i = 0, c = $Ms.length
- ;
- for (; i<c; i++) {
- $M = $Ms.eq(i);
- if ($M.data("layoutMask") === pane)
- $Masks = $Masks.add( $M );
- }
- if ($Masks.length)
- return $Masks;
- else
- return createMasks(pane);
- }
-
- /**
- * createMasks
- *
- * Generates both DIV (ALWAYS used) and IFRAME (optional) elements as masks
- * An IFRAME mask is created *under* the DIV when maskObjects=true, because a DIV cannot mask an applet
- *
- * @param {string} pane
- */
-, createMasks = function (pane) {
- var
- $P = $Ps[pane]
- , s = state[pane]
- , o = options[pane]
- , z = options.zIndexes
- , isIframe, el, $M, css, i
- ;
- if (!o.maskContents && !o.maskObjects) return $([]);
- // if o.maskObjects=true, then loop TWICE to create BOTH kinds of mask, else only create a DIV
- for (i=0; i < (o.maskObjects ? 2 : 1); i++) {
- isIframe = o.maskObjects && i==0;
- el = document.createElement( isIframe ? "iframe" : "div" );
- $M = $(el).data("layoutMask", pane); // add data to relate mask to pane
- el.className = "ui-layout-mask ui-layout-mask-"+ pane; // for user styling
- css = el.style;
- // Both DIVs and IFRAMES
- css.background = "#FFF";
- css.position = "absolute";
- css.display = "block";
- if (isIframe) { // IFRAME-only props
- el.src = "about:blank";
- el.frameborder = 0;
- css.border = 0;
- css.opacity = 0;
- css.filter = "Alpha(Opacity='0')";
- //el.allowTransparency = true; - for IE, but breaks masking ability!
- }
- else { // DIV-only props
- css.opacity = 0.001;
- css.filter = "Alpha(Opacity='1')";
- }
- // if pane IS an IFRAME, then must mask the pane itself
- if (s.tagName == "IFRAME") {
- // NOTE sizing done by a subroutine so can be called during live-resizing
- css.zIndex = z.pane_normal+1; // 1-higher than pane
- $N.append( el ); // append to LAYOUT CONTAINER
- }
- // otherwise put masks *inside the pane* to mask its contents
- else {
- $M.addClass("ui-layout-mask-inside-pane");
- css.zIndex = o.maskZindex || z.content_mask; // usually 1, but customizable
- css.top = 0;
- css.left = 0;
- css.width = "100%";
- css.height = "100%";
- $P.append( el ); // append INSIDE pane element
- }
- // add Mask to cached array so can be resized & reused
- $Ms = $Ms.add( el );
- }
- return $Ms;
- }
-
-
- /**
- * Destroy this layout and reset all elements
- *
- * @param {boolean=} [destroyChildren=false] Destory Child-Layouts first?
- */
-, destroy = function (evt_or_destroyChildren, destroyChildren) {
- // UNBIND layout events and remove global object
- $(window).unbind("."+ sID); // resize & unload
- $(document).unbind("."+ sID); // keyDown (hotkeys)
-
- if (typeof evt_or_destroyChildren === "object")
- // stopPropagation if called by trigger("layoutdestroy") - use evtPane utility
- evtPane(evt_or_destroyChildren);
- else // no event, so transfer 1st param to destroyChildren param
- destroyChildren = evt_or_destroyChildren;
-
- // need to look for parent layout BEFORE we remove the container data, else skips a level
- //var parentPane = Instance.hasParentLayout ? $.layout.getParentPaneInstance( $N ) : null;
-
- // reset layout-container
- $N .clearQueue()
- .removeData("layout")
- .removeData("layoutContainer")
- .removeClass(options.containerClass)
- .unbind("."+ sID) // remove ALL Layout events
- ;
-
- // remove all mask elements that have been created
- $Ms.remove();
-
- // loop all panes to remove layout classes, attributes and bindings
- $.each(_c.allPanes, function (i, pane) {
- removePane( pane, false, true, destroyChildren ); // true = skipResize
- });
-
- // do NOT reset container CSS if is a 'pane' (or 'content') in an outer-layout - ie, THIS layout is 'nested'
- var css = "layoutCSS";
- if ($N.data(css) && !$N.data("layoutRole")) // RESET CSS
- $N.css( $N.data(css) ).removeData(css);
-
- // for full-page layouts, also reset the <HTML> CSS
- if (sC.tagName === "BODY" && ($N = $("html")).data(css)) // RESET <HTML> CSS
- $N.css( $N.data(css) ).removeData(css);
-
- // trigger plugins for this layout, if there are any
- runPluginCallbacks( Instance, $.layout.onDestroy );
-
- // trigger state-management and onunload callback
- unload();
-
- // clear the Instance of everything except for container & options (so could recreate)
- // RE-CREATE: myLayout = myLayout.container.layout( myLayout.options );
- for (var n in Instance)
- if (!n.match(/^(container|options)$/)) delete Instance[ n ];
- // add a 'destroyed' flag to make it easy to check
- Instance.destroyed = true;
-
- // if this is a child layout, CLEAR the child-pointer in the parent
- /* for now the pointer REMAINS, but with only container, options and destroyed keys
- if (parentPane) {
- var layout = parentPane.pane.data("parentLayout")
- , key = layout.options.instanceKey || 'error';
- // THIS SYNTAX MAY BE WRONG!
- parentPane.children[key] = layout.children[ parentPane.name ].children[key] = null;
- }
- */
-
- return Instance; // for coding convenience
- }
-
- /**
- * Remove a pane from the layout - subroutine of destroy()
- *
- * @see destroy()
- * @param {(string|Object)} evt_or_pane The pane to process
- * @param {boolean=} [remove=false] Remove the DOM element?
- * @param {boolean=} [skipResize=false] Skip calling resizeAll()?
- * @param {boolean=} [destroyChild=true] Destroy Child-layouts? If not passed, obeys options setting
- */
-, removePane = function (evt_or_pane, remove, skipResize, destroyChild) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , $P = $Ps[pane]
- , $C = $Cs[pane]
- , $R = $Rs[pane]
- , $T = $Ts[pane]
- ;
- // NOTE: elements can still exist even after remove()
- // so check for missing data(), which is cleared by removed()
- if ($P && $.isEmptyObject( $P.data() )) $P = false;
- if ($C && $.isEmptyObject( $C.data() )) $C = false;
- if ($R && $.isEmptyObject( $R.data() )) $R = false;
- if ($T && $.isEmptyObject( $T.data() )) $T = false;
-
- if ($P) $P.stop(true, true);
-
- var o = options[pane]
- , s = state[pane]
- , d = "layout"
- , css = "layoutCSS"
- , pC = children[pane]
- , hasChildren = $.isPlainObject( pC ) && !$.isEmptyObject( pC )
- , destroy = destroyChild !== undefined ? destroyChild : o.destroyChildren
- ;
- // FIRST destroy the child-layout(s)
- if (hasChildren && destroy) {
- $.each( pC, function (key, child) {
- if (!child.destroyed)
- child.destroy(true);// tell child-layout to destroy ALL its child-layouts too
- if (child.destroyed) // destroy was successful
- delete pC[key];
- });
- // if no more children, remove the children hash
- if ($.isEmptyObject( pC )) {
- pC = children[pane] = null; // clear children hash
- hasChildren = false;
- }
- }
-
- // Note: can't 'remove' a pane element with non-destroyed children
- if ($P && remove && !hasChildren)
- $P.remove(); // remove the pane-element and everything inside it
- else if ($P && $P[0]) {
- // create list of ALL pane-classes that need to be removed
- var root = o.paneClass // default="ui-layout-pane"
- , pRoot = root +"-"+ pane // eg: "ui-layout-pane-west"
- , _open = "-open"
- , _sliding= "-sliding"
- , _closed = "-closed"
- , classes = [ root, root+_open, root+_closed, root+_sliding, // generic classes
- pRoot, pRoot+_open, pRoot+_closed, pRoot+_sliding ] // pane-specific classes
- ;
- $.merge(classes, getHoverClasses($P, true)); // ADD hover-classes
- // remove all Layout classes from pane-element
- $P .removeClass( classes.join(" ") ) // remove ALL pane-classes
- .removeData("parentLayout")
- .removeData("layoutPane")
- .removeData("layoutRole")
- .removeData("layoutEdge")
- .removeData("autoHidden") // in case set
- .unbind("."+ sID) // remove ALL Layout events
- // TODO: remove these extra unbind commands when jQuery is fixed
- //.unbind("mouseenter"+ sID)
- //.unbind("mouseleave"+ sID)
- ;
- // do NOT reset CSS if this pane/content is STILL the container of a nested layout!
- // the nested layout will reset its 'container' CSS when/if it is destroyed
- if (hasChildren && $C) {
- // a content-div may not have a specific width, so give it one to contain the Layout
- $C.width( $C.width() );
- $.each( pC, function (key, child) {
- child.resizeAll(); // resize the Layout
- });
- }
- else if ($C)
- $C.css( $C.data(css) ).removeData(css).removeData("layoutRole");
- // remove pane AFTER content in case there was a nested layout
- if (!$P.data(d))
- $P.css( $P.data(css) ).removeData(css);
- }
-
- // REMOVE pane resizer and toggler elements
- if ($T) $T.remove();
- if ($R) $R.remove();
-
- // CLEAR all pointers and state data
- Instance[pane] = $Ps[pane] = $Cs[pane] = $Rs[pane] = $Ts[pane] = false;
- s = { removed: true };
-
- if (!skipResize)
- resizeAll();
- }
-
-
-/*
- * ###########################
- * ACTION METHODS
- * ###########################
- */
-
- /**
- * @param {string} pane
- */
-, _hidePane = function (pane) {
- var $P = $Ps[pane]
- , o = options[pane]
- , s = $P[0].style
- ;
- if (o.useOffscreenClose) {
- if (!$P.data(_c.offscreenReset))
- $P.data(_c.offscreenReset, { left: s.left, right: s.right });
- $P.css( _c.offscreenCSS );
- }
- else
- $P.hide().removeData(_c.offscreenReset);
- }
-
- /**
- * @param {string} pane
- */
-, _showPane = function (pane) {
- var $P = $Ps[pane]
- , o = options[pane]
- , off = _c.offscreenCSS
- , old = $P.data(_c.offscreenReset)
- , s = $P[0].style
- ;
- $P .show() // ALWAYS show, just in case
- .removeData(_c.offscreenReset);
- if (o.useOffscreenClose && old) {
- if (s.left == off.left)
- s.left = old.left;
- if (s.right == off.right)
- s.right = old.right;
- }
- }
-
-
- /**
- * Completely 'hides' a pane, including its spacing - as if it does not exist
- * The pane is not actually 'removed' from the source, so can use 'show' to un-hide it
- *
- * @param {(string|Object)} evt_or_pane The pane being hidden, ie: north, south, east, or west
- * @param {boolean=} [noAnimation=false]
- */
-, hide = function (evt_or_pane, noAnimation) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , o = options[pane]
- , s = state[pane]
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- ;
- if (pane === "center" || !$P || s.isHidden) return; // pane does not exist OR is already hidden
-
- // onhide_start callback - will CANCEL hide if returns false
- if (state.initialized && false === _runCallbacks("onhide_start", pane)) return;
-
- s.isSliding = false; // just in case
- delete state.panesSliding[pane];
-
- // now hide the elements
- if ($R) $R.hide(); // hide resizer-bar
- if (!state.initialized || s.isClosed) {
- s.isClosed = true; // to trigger open-animation on show()
- s.isHidden = true;
- s.isVisible = false;
- if (!state.initialized)
- _hidePane(pane); // no animation when loading page
- sizeMidPanes(_c[pane].dir === "horz" ? "" : "center");
- if (state.initialized || o.triggerEventsOnLoad)
- _runCallbacks("onhide_end", pane);
- }
- else {
- s.isHiding = true; // used by onclose
- close(pane, false, noAnimation); // adjust all panes to fit
- }
- }
-
- /**
- * Show a hidden pane - show as 'closed' by default unless openPane = true
- *
- * @param {(string|Object)} evt_or_pane The pane being opened, ie: north, south, east, or west
- * @param {boolean=} [openPane=false]
- * @param {boolean=} [noAnimation=false]
- * @param {boolean=} [noAlert=false]
- */
-, show = function (evt_or_pane, openPane, noAnimation, noAlert) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , o = options[pane]
- , s = state[pane]
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- ;
- if (pane === "center" || !$P || !s.isHidden) return; // pane does not exist OR is not hidden
-
- // onshow_start callback - will CANCEL show if returns false
- if (false === _runCallbacks("onshow_start", pane)) return;
-
- s.isShowing = true; // used by onopen/onclose
- //s.isHidden = false; - will be set by open/close - if not cancelled
- s.isSliding = false; // just in case
- delete state.panesSliding[pane];
-
- // now show the elements
- //if ($R) $R.show(); - will be shown by open/close
- if (openPane === false)
- close(pane, true); // true = force
- else
- open(pane, false, noAnimation, noAlert); // adjust all panes to fit
- }
-
-
- /**
- * Toggles a pane open/closed by calling either open or close
- *
- * @param {(string|Object)} evt_or_pane The pane being toggled, ie: north, south, east, or west
- * @param {boolean=} [slide=false]
- */
-, toggle = function (evt_or_pane, slide) {
- if (!isInitialized()) return;
- var evt = evtObj(evt_or_pane)
- , pane = evtPane.call(this, evt_or_pane)
- , s = state[pane]
- ;
- if (evt) // called from to $R.dblclick OR triggerPaneEvent
- evt.stopImmediatePropagation();
- if (s.isHidden)
- show(pane); // will call 'open' after unhiding it
- else if (s.isClosed)
- open(pane, !!slide);
- else
- close(pane);
- }
-
-
- /**
- * Utility method used during init or other auto-processes
- *
- * @param {string} pane The pane being closed
- * @param {boolean=} [setHandles=false]
- */
-, _closePane = function (pane, setHandles) {
- var
- $P = $Ps[pane]
- , s = state[pane]
- ;
- _hidePane(pane);
- s.isClosed = true;
- s.isVisible = false;
- if (setHandles) setAsClosed(pane);
- }
-
- /**
- * Close the specified pane (animation optional), and resize all other panes as needed
- *
- * @param {(string|Object)} evt_or_pane The pane being closed, ie: north, south, east, or west
- * @param {boolean=} [force=false]
- * @param {boolean=} [noAnimation=false]
- * @param {boolean=} [skipCallback=false]
- */
-, close = function (evt_or_pane, force, noAnimation, skipCallback) {
- var pane = evtPane.call(this, evt_or_pane);
- if (pane === "center") return; // validate
- // if pane has been initialized, but NOT the complete layout, close pane instantly
- if (!state.initialized && $Ps[pane]) {
- _closePane(pane, true); // INIT pane as closed
- return;
- }
- if (!isInitialized()) return;
-
- var
- $P = $Ps[pane]
- , $R = $Rs[pane]
- , $T = $Ts[pane]
- , o = options[pane]
- , s = state[pane]
- , c = _c[pane]
- , doFX, isShowing, isHiding, wasSliding;
-
- // QUEUE in case another action/animation is in progress
- $N.queue(function( queueNext ){
-
- if ( !$P
- || (!o.closable && !s.isShowing && !s.isHiding) // invalid request // (!o.resizable && !o.closable) ???
- || (!force && s.isClosed && !s.isShowing) // already closed
- ) return queueNext();
-
- // onclose_start callback - will CANCEL hide if returns false
- // SKIP if just 'showing' a hidden pane as 'closed'
- var abort = !s.isShowing && false === _runCallbacks("onclose_start", pane);
-
- // transfer logic vars to temp vars
- isShowing = s.isShowing;
- isHiding = s.isHiding;
- wasSliding = s.isSliding;
- // now clear the logic vars (REQUIRED before aborting)
- delete s.isShowing;
- delete s.isHiding;
-
- if (abort) return queueNext();
-
- doFX = !noAnimation && !s.isClosed && (o.fxName_close != "none");
- s.isMoving = true;
- s.isClosed = true;
- s.isVisible = false;
- // update isHidden BEFORE sizing panes
- if (isHiding) s.isHidden = true;
- else if (isShowing) s.isHidden = false;
-
- if (s.isSliding) // pane is being closed, so UNBIND trigger events
- bindStopSlidingEvents(pane, false); // will set isSliding=false
- else // resize panes adjacent to this one
- sizeMidPanes(_c[pane].dir === "horz" ? "" : "center", false); // false = NOT skipCallback
-
- // if this pane has a resizer bar, move it NOW - before animation
- setAsClosed(pane);
-
- // CLOSE THE PANE
- if (doFX) { // animate the close
- lockPaneForFX(pane, true); // need to set left/top so animation will work
- $P.hide( o.fxName_close, o.fxSettings_close, o.fxSpeed_close, function () {
- lockPaneForFX(pane, false); // undo
- if (s.isClosed) close_2();
- queueNext();
- });
- }
- else { // hide the pane without animation
- _hidePane(pane);
- close_2();
- queueNext();
- };
- });
-
- // SUBROUTINE
- function close_2 () {
- s.isMoving = false;
- bindStartSlidingEvents(pane, true); // will enable if o.slidable = true
-
- // if opposite-pane was autoClosed, see if it can be autoOpened now
- var altPane = _c.oppositeEdge[pane];
- if (state[ altPane ].noRoom) {
- setSizeLimits( altPane );
- makePaneFit( altPane );
- }
-
- if (!skipCallback && (state.initialized || o.triggerEventsOnLoad)) {
- // onclose callback - UNLESS just 'showing' a hidden pane as 'closed'
- if (!isShowing) _runCallbacks("onclose_end", pane);
- // onhide OR onshow callback
- if (isShowing) _runCallbacks("onshow_end", pane);
- if (isHiding) _runCallbacks("onhide_end", pane);
- }
- }
- }
-
- /**
- * @param {string} pane The pane just closed, ie: north, south, east, or west
- */
-, setAsClosed = function (pane) {
- if (!$Rs[pane]) return; // handles not initialized yet!
- var
- $P = $Ps[pane]
- , $R = $Rs[pane]
- , $T = $Ts[pane]
- , o = options[pane]
- , s = state[pane]
- , side = _c[pane].side
- , rClass = o.resizerClass
- , tClass = o.togglerClass
- , _pane = "-"+ pane // used for classNames
- , _open = "-open"
- , _sliding= "-sliding"
- , _closed = "-closed"
- ;
- $R
- .css(side, sC.inset[side]) // move the resizer
- .removeClass( rClass+_open +" "+ rClass+_pane+_open )
- .removeClass( rClass+_sliding +" "+ rClass+_pane+_sliding )
- .addClass( rClass+_closed +" "+ rClass+_pane+_closed )
- ;
- // handle already-hidden panes in case called by swap() or a similar method
- if (s.isHidden) $R.hide(); // hide resizer-bar
-
- // DISABLE 'resizing' when closed - do this BEFORE bindStartSlidingEvents?
- if (o.resizable && $.layout.plugins.draggable)
- $R
- .draggable("disable")
- .removeClass("ui-state-disabled") // do NOT apply disabled styling - not suitable here
- .css("cursor", "default")
- .attr("title","")
- ;
-
- // if pane has a toggler button, adjust that too
- if ($T) {
- $T
- .removeClass( tClass+_open +" "+ tClass+_pane+_open )
- .addClass( tClass+_closed +" "+ tClass+_pane+_closed )
- .attr("title", o.tips.Open) // may be blank
- ;
- // toggler-content - if exists
- $T.children(".content-open").hide();
- $T.children(".content-closed").css("display","block");
- }
-
- // sync any 'pin buttons'
- syncPinBtns(pane, false);
-
- if (state.initialized) {
- // resize 'length' and position togglers for adjacent panes
- sizeHandles();
- }
- }
-
- /**
- * Open the specified pane (animation optional), and resize all other panes as needed
- *
- * @param {(string|Object)} evt_or_pane The pane being opened, ie: north, south, east, or west
- * @param {boolean=} [slide=false]
- * @param {boolean=} [noAnimation=false]
- * @param {boolean=} [noAlert=false]
- */
-, open = function (evt_or_pane, slide, noAnimation, noAlert) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- , $T = $Ts[pane]
- , o = options[pane]
- , s = state[pane]
- , c = _c[pane]
- , doFX, isShowing
- ;
- if (pane === "center") return; // validate
- // QUEUE in case another action/animation is in progress
- $N.queue(function( queueNext ){
-
- if ( !$P
- || (!o.resizable && !o.closable && !s.isShowing) // invalid request
- || (s.isVisible && !s.isSliding) // already open
- ) return queueNext();
-
- // pane can ALSO be unhidden by just calling show(), so handle this scenario
- if (s.isHidden && !s.isShowing) {
- queueNext(); // call before show() because it needs the queue free
- show(pane, true);
- return;
- }
-
- if (s.autoResize && s.size != o.size) // resize pane to original size set in options
- sizePane(pane, o.size, true, true, true); // true=skipCallback/noAnimation/forceResize
- else
- // make sure there is enough space available to open the pane
- setSizeLimits(pane, slide);
-
- // onopen_start callback - will CANCEL open if returns false
- var cbReturn = _runCallbacks("onopen_start", pane);
-
- if (cbReturn === "abort")
- return queueNext();
-
- // update pane-state again in case options were changed in onopen_start
- if (cbReturn !== "NC") // NC = "No Callback"
- setSizeLimits(pane, slide);
-
- if (s.minSize > s.maxSize) { // INSUFFICIENT ROOM FOR PANE TO OPEN!
- syncPinBtns(pane, false); // make sure pin-buttons are reset
- if (!noAlert && o.tips.noRoomToOpen)
- alert(o.tips.noRoomToOpen);
- return queueNext(); // ABORT
- }
-
- if (slide) // START Sliding - will set isSliding=true
- bindStopSlidingEvents(pane, true); // BIND trigger events to close sliding-pane
- else if (s.isSliding) // PIN PANE (stop sliding) - open pane 'normally' instead
- bindStopSlidingEvents(pane, false); // UNBIND trigger events - will set isSliding=false
- else if (o.slidable)
- bindStartSlidingEvents(pane, false); // UNBIND trigger events
-
- s.noRoom = false; // will be reset by makePaneFit if 'noRoom'
- makePaneFit(pane);
-
- // transfer logic var to temp var
- isShowing = s.isShowing;
- // now clear the logic var
- delete s.isShowing;
-
- doFX = !noAnimation && s.isClosed && (o.fxName_open != "none");
- s.isMoving = true;
- s.isVisible = true;
- s.isClosed = false;
- // update isHidden BEFORE sizing panes - WHY??? Old?
- if (isShowing) s.isHidden = false;
-
- if (doFX) { // ANIMATE
- // mask adjacent panes with objects
- lockPaneForFX(pane, true); // need to set left/top so animation will work
- $P.show( o.fxName_open, o.fxSettings_open, o.fxSpeed_open, function() {
- lockPaneForFX(pane, false); // undo
- if (s.isVisible) open_2(); // continue
- queueNext();
- });
- }
- else { // no animation
- _showPane(pane);// just show pane and...
- open_2(); // continue
- queueNext();
- };
- });
-
- // SUBROUTINE
- function open_2 () {
- s.isMoving = false;
-
- // cure iframe display issues
- _fixIframe(pane);
-
- // NOTE: if isSliding, then other panes are NOT 'resized'
- if (!s.isSliding) { // resize all panes adjacent to this one
- sizeMidPanes(_c[pane].dir=="vert" ? "center" : "", false); // false = NOT skipCallback
- }
-
- // set classes, position handles and execute callbacks...
- setAsOpen(pane);
- };
-
- }
-
- /**
- * @param {string} pane The pane just opened, ie: north, south, east, or west
- * @param {boolean=} [skipCallback=false]
- */
-, setAsOpen = function (pane, skipCallback) {
- var
- $P = $Ps[pane]
- , $R = $Rs[pane]
- , $T = $Ts[pane]
- , o = options[pane]
- , s = state[pane]
- , side = _c[pane].side
- , rClass = o.resizerClass
- , tClass = o.togglerClass
- , _pane = "-"+ pane // used for classNames
- , _open = "-open"
- , _closed = "-closed"
- , _sliding= "-sliding"
- ;
- $R
- .css(side, sC.inset[side] + getPaneSize(pane)) // move the resizer
- .removeClass( rClass+_closed +" "+ rClass+_pane+_closed )
- .addClass( rClass+_open +" "+ rClass+_pane+_open )
- ;
- if (s.isSliding)
- $R.addClass( rClass+_sliding +" "+ rClass+_pane+_sliding )
- else // in case 'was sliding'
- $R.removeClass( rClass+_sliding +" "+ rClass+_pane+_sliding )
-
- removeHover( 0, $R ); // remove hover classes
- if (o.resizable && $.layout.plugins.draggable)
- $R .draggable("enable")
- .css("cursor", o.resizerCursor)
- .attr("title", o.tips.Resize);
- else if (!s.isSliding)
- $R.css("cursor", "default"); // n-resize, s-resize, etc
-
- // if pane also has a toggler button, adjust that too
- if ($T) {
- $T .removeClass( tClass+_closed +" "+ tClass+_pane+_closed )
- .addClass( tClass+_open +" "+ tClass+_pane+_open )
- .attr("title", o.tips.Close); // may be blank
- removeHover( 0, $T ); // remove hover classes
- // toggler-content - if exists
- $T.children(".content-closed").hide();
- $T.children(".content-open").css("display","block");
- }
-
- // sync any 'pin buttons'
- syncPinBtns(pane, !s.isSliding);
-
- // update pane-state dimensions - BEFORE resizing content
- $.extend(s, elDims($P));
-
- if (state.initialized) {
- // resize resizer & toggler sizes for all panes
- sizeHandles();
- // resize content every time pane opens - to be sure
- sizeContent(pane, true); // true = remeasure headers/footers, even if 'pane.isMoving'
- }
-
- if (!skipCallback && (state.initialized || o.triggerEventsOnLoad) && $P.is(":visible")) {
- // onopen callback
- _runCallbacks("onopen_end", pane);
- // onshow callback - TODO: should this be here?
- if (s.isShowing) _runCallbacks("onshow_end", pane);
-
- // ALSO call onresize because layout-size *may* have changed while pane was closed
- if (state.initialized)
- _runCallbacks("onresize_end", pane);
- }
-
- // TODO: Somehow sizePane("north") is being called after this point???
- }
-
-
- /**
- * slideOpen / slideClose / slideToggle
- *
- * Pass-though methods for sliding
- */
-, slideOpen = function (evt_or_pane) {
- if (!isInitialized()) return;
- var evt = evtObj(evt_or_pane)
- , pane = evtPane.call(this, evt_or_pane)
- , s = state[pane]
- , delay = options[pane].slideDelay_open
- ;
- if (pane === "center") return; // validate
- // prevent event from triggering on NEW resizer binding created below
- if (evt) evt.stopImmediatePropagation();
-
- if (s.isClosed && evt && evt.type === "mouseenter" && delay > 0)
- // trigger = mouseenter - use a delay
- timer.set(pane+"_openSlider", open_NOW, delay);
- else
- open_NOW(); // will unbind events if is already open
-
- /**
- * SUBROUTINE for timed open
- */
- function open_NOW () {
- if (!s.isClosed) // skip if no longer closed!
- bindStopSlidingEvents(pane, true); // BIND trigger events to close sliding-pane
- else if (!s.isMoving)
- open(pane, true); // true = slide - open() will handle binding
- };
- }
-
-, slideClose = function (evt_or_pane) {
- if (!isInitialized()) return;
- var evt = evtObj(evt_or_pane)
- , pane = evtPane.call(this, evt_or_pane)
- , o = options[pane]
- , s = state[pane]
- , delay = s.isMoving ? 1000 : 300 // MINIMUM delay - option may override
- ;
- if (pane === "center") return; // validate
- if (s.isClosed || s.isResizing)
- return; // skip if already closed OR in process of resizing
- else if (o.slideTrigger_close === "click")
- close_NOW(); // close immediately onClick
- else if (o.preventQuickSlideClose && s.isMoving)
- return; // handle Chrome quick-close on slide-open
- else if (o.preventPrematureSlideClose && evt && $.layout.isMouseOverElem(evt, $Ps[pane]))
- return; // handle incorrect mouseleave trigger, like when over a SELECT-list in IE
- else if (evt) // trigger = mouseleave - use a delay
- // 1 sec delay if 'opening', else .3 sec
- timer.set(pane+"_closeSlider", close_NOW, max(o.slideDelay_close, delay));
- else // called programically
- close_NOW();
-
- /**
- * SUBROUTINE for timed close
- */
- function close_NOW () {
- if (s.isClosed) // skip 'close' if already closed!
- bindStopSlidingEvents(pane, false); // UNBIND trigger events - TODO: is this needed here?
- else if (!s.isMoving)
- close(pane); // close will handle unbinding
- };
- }
-
- /**
- * @param {(string|Object)} evt_or_pane The pane being opened, ie: north, south, east, or west
- */
-, slideToggle = function (evt_or_pane) {
- var pane = evtPane.call(this, evt_or_pane);
- toggle(pane, true);
- }
-
-
- /**
- * Must set left/top on East/South panes so animation will work properly
- *
- * @param {string} pane The pane to lock, 'east' or 'south' - any other is ignored!
- * @param {boolean} doLock true = set left/top, false = remove
- */
-, lockPaneForFX = function (pane, doLock) {
- var $P = $Ps[pane]
- , s = state[pane]
- , o = options[pane]
- , z = options.zIndexes
- ;
- if (doLock) {
- showMasks( pane, { animation: true, objectsOnly: true });
- $P.css({ zIndex: z.pane_animate }); // overlay all elements during animation
- if (pane=="south")
- $P.css({ top: sC.inset.top + sC.innerHeight - $P.outerHeight() });
- else if (pane=="east")
- $P.css({ left: sC.inset.left + sC.innerWidth - $P.outerWidth() });
- }
- else { // animation DONE - RESET CSS
- hideMasks();
- $P.css({ zIndex: (s.isSliding ? z.pane_sliding : z.pane_normal) });
- if (pane=="south")
- $P.css({ top: "auto" });
- // if pane is positioned 'off-screen', then DO NOT screw with it!
- else if (pane=="east" && !$P.css("left").match(/\-99999/))
- $P.css({ left: "auto" });
- // fix anti-aliasing in IE - only needed for animations that change opacity
- if (browser.msie && o.fxOpacityFix && o.fxName_open != "slide" && $P.css("filter") && $P.css("opacity") == 1)
- $P[0].style.removeAttribute('filter');
- }
- }
-
-
- /**
- * Toggle sliding functionality of a specific pane on/off by adding removing 'slide open' trigger
- *
- * @see open(), close()
- * @param {string} pane The pane to enable/disable, 'north', 'south', etc.
- * @param {boolean} enable Enable or Disable sliding?
- */
-, bindStartSlidingEvents = function (pane, enable) {
- var o = options[pane]
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- , evtName = o.slideTrigger_open.toLowerCase()
- ;
- if (!$R || (enable && !o.slidable)) return;
-
- // make sure we have a valid event
- if (evtName.match(/mouseover/))
- evtName = o.slideTrigger_open = "mouseenter";
- else if (!evtName.match(/(click|dblclick|mouseenter)/))
- evtName = o.slideTrigger_open = "click";
-
- // must remove double-click-toggle when using dblclick-slide
- if (o.resizerDblClickToggle && evtName.match(/click/)) {
- $R[enable ? "unbind" : "bind"]('dblclick.'+ sID, toggle)
- }
-
- $R
- // add or remove event
- [enable ? "bind" : "unbind"](evtName +'.'+ sID, slideOpen)
- // set the appropriate cursor & title/tip
- .css("cursor", enable ? o.sliderCursor : "default")
- .attr("title", enable ? o.tips.Slide : "")
- ;
- }
-
- /**
- * Add or remove 'mouseleave' events to 'slide close' when pane is 'sliding' open or closed
- * Also increases zIndex when pane is sliding open
- * See bindStartSlidingEvents for code to control 'slide open'
- *
- * @see slideOpen(), slideClose()
- * @param {string} pane The pane to process, 'north', 'south', etc.
- * @param {boolean} enable Enable or Disable events?
- */
-, bindStopSlidingEvents = function (pane, enable) {
- var o = options[pane]
- , s = state[pane]
- , c = _c[pane]
- , z = options.zIndexes
- , evtName = o.slideTrigger_close.toLowerCase()
- , action = (enable ? "bind" : "unbind")
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- ;
- timer.clear(pane+"_closeSlider"); // just in case
-
- if (enable) {
- s.isSliding = true;
- state.panesSliding[pane] = true;
- // remove 'slideOpen' event from resizer
- // ALSO will raise the zIndex of the pane & resizer
- bindStartSlidingEvents(pane, false);
- }
- else {
- s.isSliding = false;
- delete state.panesSliding[pane];
- }
-
- // RE/SET zIndex - increases when pane is sliding-open, resets to normal when not
- $P.css("zIndex", enable ? z.pane_sliding : z.pane_normal);
- $R.css("zIndex", enable ? z.pane_sliding+2 : z.resizer_normal); // NOTE: mask = pane_sliding+1
-
- // make sure we have a valid event
- if (!evtName.match(/(click|mouseleave)/))
- evtName = o.slideTrigger_close = "mouseleave"; // also catches 'mouseout'
-
- // add/remove slide triggers
- $R[action](evtName, slideClose); // base event on resize
- // need extra events for mouseleave
- if (evtName === "mouseleave") {
- // also close on pane.mouseleave
- $P[action]("mouseleave."+ sID, slideClose);
- // cancel timer when mouse moves between 'pane' and 'resizer'
- $R[action]("mouseenter."+ sID, cancelMouseOut);
- $P[action]("mouseenter."+ sID, cancelMouseOut);
- }
-
- if (!enable)
- timer.clear(pane+"_closeSlider");
- else if (evtName === "click" && !o.resizable) {
- // IF pane is not resizable (which already has a cursor and tip)
- // then set the a cursor & title/tip on resizer when sliding
- $R.css("cursor", enable ? o.sliderCursor : "default");
- $R.attr("title", enable ? o.tips.Close : ""); // use Toggler-tip, eg: "Close Pane"
- }
-
- // SUBROUTINE for mouseleave timer clearing
- function cancelMouseOut (evt) {
- timer.clear(pane+"_closeSlider");
- evt.stopPropagation();
- }
- }
-
-
- /**
- * Hides/closes a pane if there is insufficient room - reverses this when there is room again
- * MUST have already called setSizeLimits() before calling this method
- *
- * @param {string} pane The pane being resized
- * @param {boolean=} [isOpening=false] Called from onOpen?
- * @param {boolean=} [skipCallback=false] Should the onresize callback be run?
- * @param {boolean=} [force=false]
- */
-, makePaneFit = function (pane, isOpening, skipCallback, force) {
- var o = options[pane]
- , s = state[pane]
- , c = _c[pane]
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- , isSidePane = c.dir==="vert"
- , hasRoom = false
- ;
- // special handling for center & east/west panes
- if (pane === "center" || (isSidePane && s.noVerticalRoom)) {
- // see if there is enough room to display the pane
- // ERROR: hasRoom = s.minHeight <= s.maxHeight && (isSidePane || s.minWidth <= s.maxWidth);
- hasRoom = (s.maxHeight >= 0);
- if (hasRoom && s.noRoom) { // previously hidden due to noRoom, so show now
- _showPane(pane);
- if ($R) $R.show();
- s.isVisible = true;
- s.noRoom = false;
- if (isSidePane) s.noVerticalRoom = false;
- _fixIframe(pane);
- }
- else if (!hasRoom && !s.noRoom) { // not currently hidden, so hide now
- _hidePane(pane);
- if ($R) $R.hide();
- s.isVisible = false;
- s.noRoom = true;
- }
- }
-
- // see if there is enough room to fit the border-pane
- if (pane === "center") {
- // ignore center in this block
- }
- else if (s.minSize <= s.maxSize) { // pane CAN fit
- hasRoom = true;
- if (s.size > s.maxSize) // pane is too big - shrink it
- sizePane(pane, s.maxSize, skipCallback, true, force); // true = noAnimation
- else if (s.size < s.minSize) // pane is too small - enlarge it
- sizePane(pane, s.minSize, skipCallback, true, force); // true = noAnimation
- // need s.isVisible because new pseudoClose method keeps pane visible, but off-screen
- else if ($R && s.isVisible && $P.is(":visible")) {
- // make sure resizer-bar is positioned correctly
- // handles situation where nested layout was 'hidden' when initialized
- var pos = s.size + sC.inset[c.side];
- if ($.layout.cssNum( $R, c.side ) != pos) $R.css( c.side, pos );
- }
-
- // if was previously hidden due to noRoom, then RESET because NOW there is room
- if (s.noRoom) {
- // s.noRoom state will be set by open or show
- if (s.wasOpen && o.closable) {
- if (o.autoReopen)
- open(pane, false, true, true); // true = noAnimation, true = noAlert
- else // leave the pane closed, so just update state
- s.noRoom = false;
- }
- else
- show(pane, s.wasOpen, true, true); // true = noAnimation, true = noAlert
- }
- }
- else { // !hasRoom - pane CANNOT fit
- if (!s.noRoom) { // pane not set as noRoom yet, so hide or close it now...
- s.noRoom = true; // update state
- s.wasOpen = !s.isClosed && !s.isSliding;
- if (s.isClosed){} // SKIP
- else if (o.closable) // 'close' if possible
- close(pane, true, true); // true = force, true = noAnimation
- else // 'hide' pane if cannot just be closed
- hide(pane, true); // true = noAnimation
- }
- }
- }
-
-
- /**
- * manualSizePane is an exposed flow-through method allowing extra code when pane is 'manually resized'
- *
- * @param {(string|Object)} evt_or_pane The pane being resized
- * @param {number} size The *desired* new size for this pane - will be validated
- * @param {boolean=} [skipCallback=false] Should the onresize callback be run?
- * @param {boolean=} [noAnimation=false]
- * @param {boolean=} [force=false] Force resizing even if does not seem necessary
- */
-, manualSizePane = function (evt_or_pane, size, skipCallback, noAnimation, force) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , o = options[pane]
- , s = state[pane]
- // if resizing callbacks have been delayed and resizing is now DONE, force resizing to complete...
- , forceResize = force || (o.livePaneResizing && !s.isResizing)
- ;
- if (pane === "center") return; // validate
- // ANY call to manualSizePane disables autoResize - ie, percentage sizing
- s.autoResize = false;
- // flow-through...
- sizePane(pane, size, skipCallback, noAnimation, forceResize); // will animate resize if option enabled
- }
-
- /**
- * sizePane is called only by internal methods whenever a pane needs to be resized
- *
- * @param {(string|Object)} evt_or_pane The pane being resized
- * @param {number} size The *desired* new size for this pane - will be validated
- * @param {boolean=} [skipCallback=false] Should the onresize callback be run?
- * @param {boolean=} [noAnimation=false]
- * @param {boolean=} [force=false] Force resizing even if does not seem necessary
- */
-, sizePane = function (evt_or_pane, size, skipCallback, noAnimation, force) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane) // probably NEVER called from event?
- , o = options[pane]
- , s = state[pane]
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- , side = _c[pane].side
- , dimName = _c[pane].sizeType.toLowerCase()
- , skipResizeWhileDragging = s.isResizing && !o.triggerEventsDuringLiveResize
- , doFX = noAnimation !== true && o.animatePaneSizing
- , oldSize, newSize
- ;
- if (pane === "center") return; // validate
- // QUEUE in case another action/animation is in progress
- $N.queue(function( queueNext ){
- // calculate 'current' min/max sizes
- setSizeLimits(pane); // update pane-state
- oldSize = s.size;
- size = _parseSize(pane, size); // handle percentages & auto
- size = max(size, _parseSize(pane, o.minSize));
- size = min(size, s.maxSize);
- if (size < s.minSize) { // not enough room for pane!
- queueNext(); // call before makePaneFit() because it needs the queue free
- makePaneFit(pane, false, skipCallback); // will hide or close pane
- return;
- }
-
- // IF newSize is same as oldSize, then nothing to do - abort
- if (!force && size === oldSize)
- return queueNext();
-
- s.newSize = size;
-
- // onresize_start callback CANNOT cancel resizing because this would break the layout!
- if (!skipCallback && state.initialized && s.isVisible)
- _runCallbacks("onresize_start", pane);
-
- // resize the pane, and make sure its visible
- newSize = cssSize(pane, size);
-
- if (doFX && $P.is(":visible")) { // ANIMATE
- var fx = $.layout.effects.size[pane] || $.layout.effects.size.all
- , easing = o.fxSettings_size.easing || fx.easing
- , z = options.zIndexes
- , props = {};
- props[ dimName ] = newSize +'px';
- s.isMoving = true;
- // overlay all elements during animation
- $P.css({ zIndex: z.pane_animate })
- .show().animate( props, o.fxSpeed_size, easing, function(){
- // reset zIndex after animation
- $P.css({ zIndex: (s.isSliding ? z.pane_sliding : z.pane_normal) });
- s.isMoving = false;
- delete s.newSize;
- sizePane_2(); // continue
- queueNext();
- });
- }
- else { // no animation
- $P.css( dimName, newSize ); // resize pane
- delete s.newSize;
- // if pane is visible, then
- if ($P.is(":visible"))
- sizePane_2(); // continue
- else {
- // pane is NOT VISIBLE, so just update state data...
- // when pane is *next opened*, it will have the new size
- s.size = size; // update state.size
- //$.extend(s, elDims($P)); // update state dimensions - CANNOT do this when not visible! }
- }
- queueNext();
- };
-
- });
-
- // SUBROUTINE
- function sizePane_2 () {
- /* Panes are sometimes not sized precisely in some browsers!?
- * This code will resize the pane up to 3 times to nudge the pane to the correct size
- */
- var actual = dimName==='width' ? $P.outerWidth() : $P.outerHeight()
- , tries = [{
- pane: pane
- , count: 1
- , target: size
- , actual: actual
- , correct: (size === actual)
- , attempt: size
- , cssSize: newSize
- }]
- , lastTry = tries[0]
- , thisTry = {}
- , msg = 'Inaccurate size after resizing the '+ pane +'-pane.'
- ;
- while ( !lastTry.correct ) {
- thisTry = { pane: pane, count: lastTry.count+1, target: size };
-
- if (lastTry.actual > size)
- thisTry.attempt = max(0, lastTry.attempt - (lastTry.actual - size));
- else // lastTry.actual < size
- thisTry.attempt = max(0, lastTry.attempt + (size - lastTry.actual));
-
- thisTry.cssSize = cssSize(pane, thisTry.attempt);
- $P.css( dimName, thisTry.cssSize );
-
- thisTry.actual = dimName=='width' ? $P.outerWidth() : $P.outerHeight();
- thisTry.correct = (size === thisTry.actual);
-
- // log attempts and alert the user of this *non-fatal error* (if showDebugMessages)
- if ( tries.length === 1) {
- _log(msg, false, true);
- _log(lastTry, false, true);
- }
- _log(thisTry, false, true);
- // after 4 tries, is as close as its gonna get!
- if (tries.length > 3) break;
-
- tries.push( thisTry );
- lastTry = tries[ tries.length - 1 ];
- }
- // END TESTING CODE
-
- // update pane-state dimensions
- s.size = size;
- $.extend(s, elDims($P));
-
- if (s.isVisible && $P.is(":visible")) {
- // reposition the resizer-bar
- if ($R) $R.css( side, size + sC.inset[side] );
- // resize the content-div
- sizeContent(pane);
- }
-
- if (!skipCallback && !skipResizeWhileDragging && state.initialized && s.isVisible)
- _runCallbacks("onresize_end", pane);
-
- // resize all the adjacent panes, and adjust their toggler buttons
- // when skipCallback passed, it means the controlling method will handle 'other panes'
- if (!skipCallback) {
- // also no callback if live-resize is in progress and NOT triggerEventsDuringLiveResize
- if (!s.isSliding) sizeMidPanes(_c[pane].dir=="horz" ? "" : "center", skipResizeWhileDragging, force);
- sizeHandles();
- }
-
- // if opposite-pane was autoClosed, see if it can be autoOpened now
- var altPane = _c.oppositeEdge[pane];
- if (size < oldSize && state[ altPane ].noRoom) {
- setSizeLimits( altPane );
- makePaneFit( altPane, false, skipCallback );
- }
-
- // DEBUG - ALERT user/developer so they know there was a sizing problem
- if (tries.length > 1)
- _log(msg +'\nSee the Error Console for details.', true, true);
- }
- }
-
- /**
- * @see initPanes(), sizePane(), resizeAll(), open(), close(), hide()
- * @param {(Array.<string>|string)} panes The pane(s) being resized, comma-delmited string
- * @param {boolean=} [skipCallback=false] Should the onresize callback be run?
- * @param {boolean=} [force=false]
- */
-, sizeMidPanes = function (panes, skipCallback, force) {
- panes = (panes ? panes : "east,west,center").split(",");
-
- $.each(panes, function (i, pane) {
- if (!$Ps[pane]) return; // NO PANE - skip
- var
- o = options[pane]
- , s = state[pane]
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- , isCenter= (pane=="center")
- , hasRoom = true
- , CSS = {}
- // if pane is not visible, show it invisibly NOW rather than for *each call* in this script
- , visCSS = $.layout.showInvisibly($P)
-
- , newCenter = calcNewCenterPaneDims()
- ;
-
- // update pane-state dimensions
- $.extend(s, elDims($P));
-
- if (pane === "center") {
- if (!force && s.isVisible && newCenter.width === s.outerWidth && newCenter.height === s.outerHeight) {
- $P.css(visCSS);
- return true; // SKIP - pane already the correct size
- }
- // set state for makePaneFit() logic
- $.extend(s, cssMinDims(pane), {
- maxWidth: newCenter.width
- , maxHeight: newCenter.height
- });
- CSS = newCenter;
- s.newWidth = CSS.width;
- s.newHeight = CSS.height;
- // convert OUTER width/height to CSS width/height
- CSS.width = cssW($P, CSS.width);
- // NEW - allow pane to extend 'below' visible area rather than hide it
- CSS.height = cssH($P, CSS.height);
- hasRoom = CSS.width >= 0 && CSS.height >= 0; // height >= 0 = ALWAYS TRUE NOW
-
- // during layout init, try to shrink east/west panes to make room for center
- if (!state.initialized && o.minWidth > newCenter.width) {
- var
- reqPx = o.minWidth - s.outerWidth
- , minE = options.east.minSize || 0
- , minW = options.west.minSize || 0
- , sizeE = state.east.size
- , sizeW = state.west.size
- , newE = sizeE
- , newW = sizeW
- ;
- if (reqPx > 0 && state.east.isVisible && sizeE > minE) {
- newE = max( sizeE-minE, sizeE-reqPx );
- reqPx -= sizeE-newE;
- }
- if (reqPx > 0 && state.west.isVisible && sizeW > minW) {
- newW = max( sizeW-minW, sizeW-reqPx );
- reqPx -= sizeW-newW;
- }
- // IF we found enough extra space, then resize the border panes as calculated
- if (reqPx === 0) {
- if (sizeE && sizeE != minE)
- sizePane('east', newE, true, true, force); // true = skipCallback/noAnimation - initPanes will handle when done
- if (sizeW && sizeW != minW)
- sizePane('west', newW, true, true, force); // true = skipCallback/noAnimation
- // now start over!
- sizeMidPanes('center', skipCallback, force);
- $P.css(visCSS);
- return; // abort this loop
- }
- }
- }
- else { // for east and west, set only the height, which is same as center height
- // set state.min/maxWidth/Height for makePaneFit() logic
- if (s.isVisible && !s.noVerticalRoom)
- $.extend(s, elDims($P), cssMinDims(pane))
- if (!force && !s.noVerticalRoom && newCenter.height === s.outerHeight) {
- $P.css(visCSS);
- return true; // SKIP - pane already the correct size
- }
- // east/west have same top, bottom & height as center
- CSS.top = newCenter.top;
- CSS.bottom = newCenter.bottom;
- s.newSize = newCenter.height
- // NEW - allow pane to extend 'below' visible area rather than hide it
- CSS.height = cssH($P, newCenter.height);
- s.maxHeight = CSS.height;
- hasRoom = (s.maxHeight >= 0); // ALWAYS TRUE NOW
- if (!hasRoom) s.noVerticalRoom = true; // makePaneFit() logic
- }
-
- if (hasRoom) {
- // resizeAll passes skipCallback because it triggers callbacks after ALL panes are resized
- if (!skipCallback && state.initialized)
- _runCallbacks("onresize_start", pane);
-
- $P.css(CSS); // apply the CSS to pane
- if (pane !== "center")
- sizeHandles(pane); // also update resizer length
- if (s.noRoom && !s.isClosed && !s.isHidden)
- makePaneFit(pane); // will re-open/show auto-closed/hidden pane
- if (s.isVisible) {
- $.extend(s, elDims($P)); // update pane dimensions
- if (state.initialized) sizeContent(pane); // also resize the contents, if exists
- }
- }
- else if (!s.noRoom && s.isVisible) // no room for pane
- makePaneFit(pane); // will hide or close pane
-
- // reset visibility, if necessary
- $P.css(visCSS);
-
- delete s.newSize;
- delete s.newWidth;
- delete s.newHeight;
-
- if (!s.isVisible)
- return true; // DONE - next pane
-
- /*
- * Extra CSS for IE6 or IE7 in Quirks-mode - add 'width' to NORTH/SOUTH panes
- * Normally these panes have only 'left' & 'right' positions so pane auto-sizes
- * ALSO required when pane is an IFRAME because will NOT default to 'full width'
- * TODO: Can I use width:100% for a north/south iframe?
- * TODO: Sounds like a job for $P.outerWidth( sC.innerWidth ) SETTER METHOD
- */
- if (pane === "center") { // finished processing midPanes
- var fix = browser.isIE6 || !browser.boxModel;
- if ($Ps.north && (fix || state.north.tagName=="IFRAME"))
- $Ps.north.css("width", cssW($Ps.north, sC.innerWidth));
- if ($Ps.south && (fix || state.south.tagName=="IFRAME"))
- $Ps.south.css("width", cssW($Ps.south, sC.innerWidth));
- }
-
- // resizeAll passes skipCallback because it triggers callbacks after ALL panes are resized
- if (!skipCallback && state.initialized)
- _runCallbacks("onresize_end", pane);
- });
- }
-
-
- /**
- * @see window.onresize(), callbacks or custom code
- * @param {(Object|boolean)=} evt_or_refresh If 'true', then also reset pane-positioning
- */
-, resizeAll = function (evt_or_refresh) {
- var oldW = sC.innerWidth
- , oldH = sC.innerHeight
- ;
- // stopPropagation if called by trigger("layoutdestroy") - use evtPane utility
- evtPane(evt_or_refresh);
-
- // cannot size layout when 'container' is hidden or collapsed
- if (!$N.is(":visible")) return;
-
- if (!state.initialized) {
- _initLayoutElements();
- return; // no need to resize since we just initialized!
- }
-
- if (evt_or_refresh === true && $.isPlainObject(options.outset)) {
- // update container CSS in case outset option has changed
- $N.css( options.outset );
- }
- // UPDATE container dimensions
- $.extend(sC, elDims( $N, options.inset ));
- if (!sC.outerHeight) return;
-
- // if 'true' passed, refresh pane & handle positioning too
- if (evt_or_refresh === true) {
- setPanePosition();
- }
-
- // onresizeall_start will CANCEL resizing if returns false
- // state.container has already been set, so user can access this info for calcuations
- if (false === _runCallbacks("onresizeall_start")) return false;
-
- var // see if container is now 'smaller' than before
- shrunkH = (sC.innerHeight < oldH)
- , shrunkW = (sC.innerWidth < oldW)
- , $P, o, s
- ;
- // NOTE special order for sizing: S-N-E-W
- $.each(["south","north","east","west"], function (i, pane) {
- if (!$Ps[pane]) return; // no pane - SKIP
- o = options[pane];
- s = state[pane];
- if (s.autoResize && s.size != o.size) // resize pane to original size set in options
- sizePane(pane, o.size, true, true, true); // true=skipCallback/noAnimation/forceResize
- else {
- setSizeLimits(pane);
- makePaneFit(pane, false, true, true); // true=skipCallback/forceResize
- }
- });
-
- sizeMidPanes("", true, true); // true=skipCallback/forceResize
- sizeHandles(); // reposition the toggler elements
-
- // trigger all individual pane callbacks AFTER layout has finished resizing
- $.each(_c.allPanes, function (i, pane) {
- $P = $Ps[pane];
- if (!$P) return; // SKIP
- if (state[pane].isVisible) // undefined for non-existent panes
- _runCallbacks("onresize_end", pane); // callback - if exists
- });
-
- _runCallbacks("onresizeall_end");
- //_triggerLayoutEvent(pane, 'resizeall');
- }
-
- /**
- * Whenever a pane resizes or opens that has a nested layout, trigger resizeAll
- *
- * @param {(string|Object)} evt_or_pane The pane just resized or opened
- */
-, resizeChildren = function (evt_or_pane, skipRefresh) {
- var pane = evtPane.call(this, evt_or_pane);
-
- if (!options[pane].resizeChildren) return;
-
- // ensure the pane-children are up-to-date
- if (!skipRefresh) refreshChildren( pane );
- var pC = children[pane];
- if ($.isPlainObject( pC )) {
- // resize one or more children
- $.each( pC, function (key, child) {
- if (!child.destroyed) child.resizeAll();
- });
- }
- }
-
- /**
- * IF pane has a content-div, then resize all elements inside pane to fit pane-height
- *
- * @param {(string|Object)} evt_or_panes The pane(s) being resized
- * @param {boolean=} [remeasure=false] Should the content (header/footer) be remeasured?
- */
-, sizeContent = function (evt_or_panes, remeasure) {
- if (!isInitialized()) return;
-
- var panes = evtPane.call(this, evt_or_panes);
- panes = panes ? panes.split(",") : _c.allPanes;
-
- $.each(panes, function (idx, pane) {
- var
- $P = $Ps[pane]
- , $C = $Cs[pane]
- , o = options[pane]
- , s = state[pane]
- , m = s.content // m = measurements
- ;
- if (!$P || !$C || !$P.is(":visible")) return true; // NOT VISIBLE - skip
-
- // if content-element was REMOVED, update OR remove the pointer
- if (!$C.length) {
- initContent(pane, false); // false = do NOT sizeContent() - already there!
- if (!$C) return; // no replacement element found - pointer have been removed
- }
-
- // onsizecontent_start will CANCEL resizing if returns false
- if (false === _runCallbacks("onsizecontent_start", pane)) return;
-
- // skip re-measuring offsets if live-resizing
- if ((!s.isMoving && !s.isResizing) || o.liveContentResizing || remeasure || m.top == undefined) {
- _measure();
- // if any footers are below pane-bottom, they may not measure correctly,
- // so allow pane overflow and re-measure
- if (m.hiddenFooters > 0 && $P.css("overflow") === "hidden") {
- $P.css("overflow", "visible");
- _measure(); // remeasure while overflowing
- $P.css("overflow", "hidden");
- }
- }
- // NOTE: spaceAbove/Below *includes* the pane paddingTop/Bottom, but not pane.borders
- var newH = s.innerHeight - (m.spaceAbove - s.css.paddingTop) - (m.spaceBelow - s.css.paddingBottom);
-
- if (!$C.is(":visible") || m.height != newH) {
- // size the Content element to fit new pane-size - will autoHide if not enough room
- setOuterHeight($C, newH, true); // true=autoHide
- m.height = newH; // save new height
- };
-
- if (state.initialized)
- _runCallbacks("onsizecontent_end", pane);
-
- function _below ($E) {
- return max(s.css.paddingBottom, (parseInt($E.css("marginBottom"), 10) || 0));
- };
-
- function _measure () {
- var
- ignore = options[pane].contentIgnoreSelector
- , $Fs = $C.nextAll().not(".ui-layout-mask").not(ignore || ":lt(0)") // not :lt(0) = ALL
- , $Fs_vis = $Fs.filter(':visible')
- , $F = $Fs_vis.filter(':last')
- ;
- m = {
- top: $C[0].offsetTop
- , height: $C.outerHeight()
- , numFooters: $Fs.length
- , hiddenFooters: $Fs.length - $Fs_vis.length
- , spaceBelow: 0 // correct if no content footer ($E)
- }
- m.spaceAbove = m.top; // just for state - not used in calc
- m.bottom = m.top + m.height;
- if ($F.length)
- //spaceBelow = (LastFooter.top + LastFooter.height) [footerBottom] - Content.bottom + max(LastFooter.marginBottom, pane.paddingBotom)
- m.spaceBelow = ($F[0].offsetTop + $F.outerHeight()) - m.bottom + _below($F);
- else // no footer - check marginBottom on Content element itself
- m.spaceBelow = _below($C);
- };
- });
- }
-
-
- /**
- * Called every time a pane is opened, closed, or resized to slide the togglers to 'center' and adjust their length if necessary
- *
- * @see initHandles(), open(), close(), resizeAll()
- * @param {(string|Object)=} evt_or_panes The pane(s) being resized
- */
-, sizeHandles = function (evt_or_panes) {
- var panes = evtPane.call(this, evt_or_panes)
- panes = panes ? panes.split(",") : _c.borderPanes;
-
- $.each(panes, function (i, pane) {
- var
- o = options[pane]
- , s = state[pane]
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- , $T = $Ts[pane]
- , $TC
- ;
- if (!$P || !$R) return;
-
- var
- dir = _c[pane].dir
- , _state = (s.isClosed ? "_closed" : "_open")
- , spacing = o["spacing"+ _state]
- , togAlign = o["togglerAlign"+ _state]
- , togLen = o["togglerLength"+ _state]
- , paneLen
- , left
- , offset
- , CSS = {}
- ;
-
- if (spacing === 0) {
- $R.hide();
- return;
- }
- else if (!s.noRoom && !s.isHidden) // skip if resizer was hidden for any reason
- $R.show(); // in case was previously hidden
-
- // Resizer Bar is ALWAYS same width/height of pane it is attached to
- if (dir === "horz") { // north/south
- //paneLen = $P.outerWidth(); // s.outerWidth ||
- paneLen = sC.innerWidth; // handle offscreen-panes
- s.resizerLength = paneLen;
- left = $.layout.cssNum($P, "left")
- $R.css({
- width: cssW($R, paneLen) // account for borders & padding
- , height: cssH($R, spacing) // ditto
- , left: left > -9999 ? left : sC.inset.left // handle offscreen-panes
- });
- }
- else { // east/west
- paneLen = $P.outerHeight(); // s.outerHeight ||
- s.resizerLength = paneLen;
- $R.css({
- height: cssH($R, paneLen) // account for borders & padding
- , width: cssW($R, spacing) // ditto
- , top: sC.inset.top + getPaneSize("north", true) // TODO: what if no North pane?
- //, top: $.layout.cssNum($Ps["center"], "top")
- });
- }
-
- // remove hover classes
- removeHover( o, $R );
-
- if ($T) {
- if (togLen === 0 || (s.isSliding && o.hideTogglerOnSlide)) {
- $T.hide(); // always HIDE the toggler when 'sliding'
- return;
- }
- else
- $T.show(); // in case was previously hidden
-
- if (!(togLen > 0) || togLen === "100%" || togLen > paneLen) {
- togLen = paneLen;
- offset = 0;
- }
- else { // calculate 'offset' based on options.PANE.togglerAlign_open/closed
- if (isStr(togAlign)) {
- switch (togAlign) {
- case "top":
- case "left": offset = 0;
- break;
- case "bottom":
- case "right": offset = paneLen - togLen;
- break;
- case "middle":
- case "center":
- default: offset = round((paneLen - togLen) / 2); // 'default' catches typos
- }
- }
- else { // togAlign = number
- var x = parseInt(togAlign, 10); //
- if (togAlign >= 0) offset = x;
- else offset = paneLen - togLen + x; // NOTE: x is negative!
- }
- }
-
- if (dir === "horz") { // north/south
- var width = cssW($T, togLen);
- $T.css({
- width: width // account for borders & padding
- , height: cssH($T, spacing) // ditto
- , left: offset // TODO: VERIFY that toggler positions correctly for ALL values
- , top: 0
- });
- // CENTER the toggler content SPAN
- $T.children(".content").each(function(){
- $TC = $(this);
- $TC.css("marginLeft", round((width-$TC.outerWidth())/2)); // could be negative
- });
- }
- else { // east/west
- var height = cssH($T, togLen);
- $T.css({
- height: height // account for borders & padding
- , width: cssW($T, spacing) // ditto
- , top: offset // POSITION the toggler
- , left: 0
- });
- // CENTER the toggler content SPAN
- $T.children(".content").each(function(){
- $TC = $(this);
- $TC.css("marginTop", round((height-$TC.outerHeight())/2)); // could be negative
- });
- }
-
- // remove ALL hover classes
- removeHover( 0, $T );
- }
-
- // DONE measuring and sizing this resizer/toggler, so can be 'hidden' now
- if (!state.initialized && (o.initHidden || s.isHidden)) {
- $R.hide();
- if ($T) $T.hide();
- }
- });
- }
-
-
- /**
- * @param {(string|Object)} evt_or_pane
- */
-, enableClosable = function (evt_or_pane) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , $T = $Ts[pane]
- , o = options[pane]
- ;
- if (!$T) return;
- o.closable = true;
- $T .bind("click."+ sID, function(evt){ evt.stopPropagation(); toggle(pane); })
- .css("visibility", "visible")
- .css("cursor", "pointer")
- .attr("title", state[pane].isClosed ? o.tips.Open : o.tips.Close) // may be blank
- .show();
- }
- /**
- * @param {(string|Object)} evt_or_pane
- * @param {boolean=} [hide=false]
- */
-, disableClosable = function (evt_or_pane, hide) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , $T = $Ts[pane]
- ;
- if (!$T) return;
- options[pane].closable = false;
- // is closable is disable, then pane MUST be open!
- if (state[pane].isClosed) open(pane, false, true);
- $T .unbind("."+ sID)
- .css("visibility", hide ? "hidden" : "visible") // instead of hide(), which creates logic issues
- .css("cursor", "default")
- .attr("title", "");
- }
-
-
- /**
- * @param {(string|Object)} evt_or_pane
- */
-, enableSlidable = function (evt_or_pane) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , $R = $Rs[pane]
- ;
- if (!$R || !$R.data('draggable')) return;
- options[pane].slidable = true;
- if (state[pane].isClosed)
- bindStartSlidingEvents(pane, true);
- }
- /**
- * @param {(string|Object)} evt_or_pane
- */
-, disableSlidable = function (evt_or_pane) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , $R = $Rs[pane]
- ;
- if (!$R) return;
- options[pane].slidable = false;
- if (state[pane].isSliding)
- close(pane, false, true);
- else {
- bindStartSlidingEvents(pane, false);
- $R .css("cursor", "default")
- .attr("title", "");
- removeHover(null, $R[0]); // in case currently hovered
- }
- }
-
-
- /**
- * @param {(string|Object)} evt_or_pane
- */
-, enableResizable = function (evt_or_pane) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , $R = $Rs[pane]
- , o = options[pane]
- ;
- if (!$R || !$R.data('draggable')) return;
- o.resizable = true;
- $R.draggable("enable");
- if (!state[pane].isClosed)
- $R .css("cursor", o.resizerCursor)
- .attr("title", o.tips.Resize);
- }
- /**
- * @param {(string|Object)} evt_or_pane
- */
-, disableResizable = function (evt_or_pane) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , $R = $Rs[pane]
- ;
- if (!$R || !$R.data('draggable')) return;
- options[pane].resizable = false;
- $R .draggable("disable")
- .css("cursor", "default")
- .attr("title", "");
- removeHover(null, $R[0]); // in case currently hovered
- }
-
-
- /**
- * Move a pane from source-side (eg, west) to target-side (eg, east)
- * If pane exists on target-side, move that to source-side, ie, 'swap' the panes
- *
- * @param {(string|Object)} evt_or_pane1 The pane/edge being swapped
- * @param {string} pane2 ditto
- */
-, swapPanes = function (evt_or_pane1, pane2) {
- if (!isInitialized()) return;
- var pane1 = evtPane.call(this, evt_or_pane1);
- // change state.edge NOW so callbacks can know where pane is headed...
- state[pane1].edge = pane2;
- state[pane2].edge = pane1;
- // run these even if NOT state.initialized
- if (false === _runCallbacks("onswap_start", pane1)
- || false === _runCallbacks("onswap_start", pane2)
- ) {
- state[pane1].edge = pane1; // reset
- state[pane2].edge = pane2;
- return;
- }
-
- var
- oPane1 = copy( pane1 )
- , oPane2 = copy( pane2 )
- , sizes = {}
- ;
- sizes[pane1] = oPane1 ? oPane1.state.size : 0;
- sizes[pane2] = oPane2 ? oPane2.state.size : 0;
-
- // clear pointers & state
- $Ps[pane1] = false;
- $Ps[pane2] = false;
- state[pane1] = {};
- state[pane2] = {};
-
- // ALWAYS remove the resizer & toggler elements
- if ($Ts[pane1]) $Ts[pane1].remove();
- if ($Ts[pane2]) $Ts[pane2].remove();
- if ($Rs[pane1]) $Rs[pane1].remove();
- if ($Rs[pane2]) $Rs[pane2].remove();
- $Rs[pane1] = $Rs[pane2] = $Ts[pane1] = $Ts[pane2] = false;
-
- // transfer element pointers and data to NEW Layout keys
- move( oPane1, pane2 );
- move( oPane2, pane1 );
-
- // cleanup objects
- oPane1 = oPane2 = sizes = null;
-
- // make panes 'visible' again
- if ($Ps[pane1]) $Ps[pane1].css(_c.visible);
- if ($Ps[pane2]) $Ps[pane2].css(_c.visible);
-
- // fix any size discrepancies caused by swap
- resizeAll();
-
- // run these even if NOT state.initialized
- _runCallbacks("onswap_end", pane1);
- _runCallbacks("onswap_end", pane2);
-
- return;
-
- function copy (n) { // n = pane
- var
- $P = $Ps[n]
- , $C = $Cs[n]
- ;
- return !$P ? false : {
- pane: n
- , P: $P ? $P[0] : false
- , C: $C ? $C[0] : false
- , state: $.extend(true, {}, state[n])
- , options: $.extend(true, {}, options[n])
- }
- };
-
- function move (oPane, pane) {
- if (!oPane) return;
- var
- P = oPane.P
- , C = oPane.C
- , oldPane = oPane.pane
- , c = _c[pane]
- // save pane-options that should be retained
- , s = $.extend(true, {}, state[pane])
- , o = options[pane]
- // RETAIN side-specific FX Settings - more below
- , fx = { resizerCursor: o.resizerCursor }
- , re, size, pos
- ;
- $.each("fxName,fxSpeed,fxSettings".split(","), function (i, k) {
- fx[k +"_open"] = o[k +"_open"];
- fx[k +"_close"] = o[k +"_close"];
- fx[k +"_size"] = o[k +"_size"];
- });
-
- // update object pointers and attributes
- $Ps[pane] = $(P)
- .data({
- layoutPane: Instance[pane] // NEW pointer to pane-alias-object
- , layoutEdge: pane
- })
- .css(_c.hidden)
- .css(c.cssReq)
- ;
- $Cs[pane] = C ? $(C) : false;
-
- // set options and state
- options[pane] = $.extend(true, {}, oPane.options, fx);
- state[pane] = $.extend(true, {}, oPane.state);
-
- // change classNames on the pane, eg: ui-layout-pane-east ==> ui-layout-pane-west
- re = new RegExp(o.paneClass +"-"+ oldPane, "g");
- P.className = P.className.replace(re, o.paneClass +"-"+ pane);
-
- // ALWAYS regenerate the resizer & toggler elements
- initHandles(pane); // create the required resizer & toggler
-
- // if moving to different orientation, then keep 'target' pane size
- if (c.dir != _c[oldPane].dir) {
- size = sizes[pane] || 0;
- setSizeLimits(pane); // update pane-state
- size = max(size, state[pane].minSize);
- // use manualSizePane to disable autoResize - not useful after panes are swapped
- manualSizePane(pane, size, true, true); // true/true = skipCallback/noAnimation
- }
- else // move the resizer here
- $Rs[pane].css(c.side, sC.inset[c.side] + (state[pane].isVisible ? getPaneSize(pane) : 0));
-
-
- // ADD CLASSNAMES & SLIDE-BINDINGS
- if (oPane.state.isVisible && !s.isVisible)
- setAsOpen(pane, true); // true = skipCallback
- else {
- setAsClosed(pane);
- bindStartSlidingEvents(pane, true); // will enable events IF option is set
- }
-
- // DESTROY the object
- oPane = null;
- };
- }
-
-
- /**
- * INTERNAL method to sync pin-buttons when pane is opened or closed
- * Unpinned means the pane is 'sliding' - ie, over-top of the adjacent panes
- *
- * @see open(), setAsOpen(), setAsClosed()
- * @param {string} pane These are the params returned to callbacks by layout()
- * @param {boolean} doPin True means set the pin 'down', False means 'up'
- */
-, syncPinBtns = function (pane, doPin) {
- if ($.layout.plugins.buttons)
- $.each(state[pane].pins, function (i, selector) {
- $.layout.buttons.setPinState(Instance, $(selector), pane, doPin);
- });
- }
-
-; // END var DECLARATIONS
-
- /**
- * Capture keys when enableCursorHotkey - toggle pane if hotkey pressed
- *
- * @see document.keydown()
- */
- function keyDown (evt) {
- if (!evt) return true;
- var code = evt.keyCode;
- if (code < 33) return true; // ignore special keys: ENTER, TAB, etc
-
- var
- PANE = {
- 38: "north" // Up Cursor - $.ui.keyCode.UP
- , 40: "south" // Down Cursor - $.ui.keyCode.DOWN
- , 37: "west" // Left Cursor - $.ui.keyCode.LEFT
- , 39: "east" // Right Cursor - $.ui.keyCode.RIGHT
- }
- , ALT = evt.altKey // no worky!
- , SHIFT = evt.shiftKey
- , CTRL = evt.ctrlKey
- , CURSOR = (CTRL && code >= 37 && code <= 40)
- , o, k, m, pane
- ;
-
- if (CURSOR && options[PANE[code]].enableCursorHotkey) // valid cursor-hotkey
- pane = PANE[code];
- else if (CTRL || SHIFT) // check to see if this matches a custom-hotkey
- $.each(_c.borderPanes, function (i, p) { // loop each pane to check its hotkey
- o = options[p];
- k = o.customHotkey;
- m = o.customHotkeyModifier; // if missing or invalid, treated as "CTRL+SHIFT"
- if ((SHIFT && m=="SHIFT") || (CTRL && m=="CTRL") || (CTRL && SHIFT)) { // Modifier matches
- if (k && code === (isNaN(k) || k <= 9 ? k.toUpperCase().charCodeAt(0) : k)) { // Key matches
- pane = p;
- return false; // BREAK
- }
- }
- });
-
- // validate pane
- if (!pane || !$Ps[pane] || !options[pane].closable || state[pane].isHidden)
- return true;
-
- toggle(pane);
-
- evt.stopPropagation();
- evt.returnValue = false; // CANCEL key
- return false;
- };
-
-
-/*
- * ######################################
- * UTILITY METHODS
- * called externally or by initButtons
- * ######################################
- */
-
- /**
- * Change/reset a pane overflow setting & zIndex to allow popups/drop-downs to work
- *
- * @param {Object=} [el] (optional) Can also be 'bound' to a click, mouseOver, or other event
- */
- function allowOverflow (el) {
- if (!isInitialized()) return;
- if (this && this.tagName) el = this; // BOUND to element
- var $P;
- if (isStr(el))
- $P = $Ps[el];
- else if ($(el).data("layoutRole"))
- $P = $(el);
- else
- $(el).parents().each(function(){
- if ($(this).data("layoutRole")) {
- $P = $(this);
- return false; // BREAK
- }
- });
- if (!$P || !$P.length) return; // INVALID
-
- var
- pane = $P.data("layoutEdge")
- , s = state[pane]
- ;
-
- // if pane is already raised, then reset it before doing it again!
- // this would happen if allowOverflow is attached to BOTH the pane and an element
- if (s.cssSaved)
- resetOverflow(pane); // reset previous CSS before continuing
-
- // if pane is raised by sliding or resizing, or its closed, then abort
- if (s.isSliding || s.isResizing || s.isClosed) {
- s.cssSaved = false;
- return;
- }
-
- var
- newCSS = { zIndex: (options.zIndexes.resizer_normal + 1) }
- , curCSS = {}
- , of = $P.css("overflow")
- , ofX = $P.css("overflowX")
- , ofY = $P.css("overflowY")
- ;
- // determine which, if any, overflow settings need to be changed
- if (of != "visible") {
- curCSS.overflow = of;
- newCSS.overflow = "visible";
- }
- if (ofX && !ofX.match(/(visible|auto)/)) {
- curCSS.overflowX = ofX;
- newCSS.overflowX = "visible";
- }
- if (ofY && !ofY.match(/(visible|auto)/)) {
- curCSS.overflowY = ofX;
- newCSS.overflowY = "visible";
- }
-
- // save the current overflow settings - even if blank!
- s.cssSaved = curCSS;
-
- // apply new CSS to raise zIndex and, if necessary, make overflow 'visible'
- $P.css( newCSS );
-
- // make sure the zIndex of all other panes is normal
- $.each(_c.allPanes, function(i, p) {
- if (p != pane) resetOverflow(p);
- });
-
- };
- /**
- * @param {Object=} [el] (optional) Can also be 'bound' to a click, mouseOver, or other event
- */
- function resetOverflow (el) {
- if (!isInitialized()) return;
- if (this && this.tagName) el = this; // BOUND to element
- var $P;
- if (isStr(el))
- $P = $Ps[el];
- else if ($(el).data("layoutRole"))
- $P = $(el);
- else
- $(el).parents().each(function(){
- if ($(this).data("layoutRole")) {
- $P = $(this);
- return false; // BREAK
- }
- });
- if (!$P || !$P.length) return; // INVALID
-
- var
- pane = $P.data("layoutEdge")
- , s = state[pane]
- , CSS = s.cssSaved || {}
- ;
- // reset the zIndex
- if (!s.isSliding && !s.isResizing)
- $P.css("zIndex", options.zIndexes.pane_normal);
-
- // reset Overflow - if necessary
- $P.css( CSS );
-
- // clear var
- s.cssSaved = false;
- };
-
-/*
- * #####################
- * CREATE/RETURN LAYOUT
- * #####################
- */
-
- // validate that container exists
- var $N = $(this).eq(0); // FIRST matching Container element
- if (!$N.length) {
- return _log( options.errors.containerMissing );
- };
-
- // Users retrieve Instance of a layout with: $N.layout() OR $N.data("layout")
- // return the Instance-pointer if layout has already been initialized
- if ($N.data("layoutContainer") && $N.data("layout"))
- return $N.data("layout"); // cached pointer
-
- // init global vars
- var
- $Ps = {} // Panes x5 - set in initPanes()
- , $Cs = {} // Content x5 - set in initPanes()
- , $Rs = {} // Resizers x4 - set in initHandles()
- , $Ts = {} // Togglers x4 - set in initHandles()
- , $Ms = $([]) // Masks - up to 2 masks per pane (IFRAME + DIV)
- // aliases for code brevity
- , sC = state.container // alias for easy access to 'container dimensions'
- , sID = state.id // alias for unique layout ID/namespace - eg: "layout435"
- ;
-
- // create Instance object to expose data & option Properties, and primary action Methods
- var Instance = {
- // layout data
- options: options // property - options hash
- , state: state // property - dimensions hash
- // object pointers
- , container: $N // property - object pointers for layout container
- , panes: $Ps // property - object pointers for ALL Panes: panes.north, panes.center
- , contents: $Cs // property - object pointers for ALL Content: contents.north, contents.center
- , resizers: $Rs // property - object pointers for ALL Resizers, eg: resizers.north
- , togglers: $Ts // property - object pointers for ALL Togglers, eg: togglers.north
- // border-pane open/close
- , hide: hide // method - ditto
- , show: show // method - ditto
- , toggle: toggle // method - pass a 'pane' ("north", "west", etc)
- , open: open // method - ditto
- , close: close // method - ditto
- , slideOpen: slideOpen // method - ditto
- , slideClose: slideClose // method - ditto
- , slideToggle: slideToggle // method - ditto
- // pane actions
- , setSizeLimits: setSizeLimits // method - pass a 'pane' - update state min/max data
- , _sizePane: sizePane // method -intended for user by plugins only!
- , sizePane: manualSizePane // method - pass a 'pane' AND an 'outer-size' in pixels or percent, or 'auto'
- , sizeContent: sizeContent // method - pass a 'pane'
- , swapPanes: swapPanes // method - pass TWO 'panes' - will swap them
- , showMasks: showMasks // method - pass a 'pane' OR list of panes - default = all panes with mask option set
- , hideMasks: hideMasks // method - ditto'
- // pane element methods
- , initContent: initContent // method - ditto
- , addPane: addPane // method - pass a 'pane'
- , removePane: removePane // method - pass a 'pane' to remove from layout, add 'true' to delete the pane-elem
- , createChildren: createChildren // method - pass a 'pane' and (optional) layout-options (OVERRIDES options[pane].children
- , refreshChildren: refreshChildren // method - pass a 'pane' and a layout-instance
- // special pane option setting
- , enableClosable: enableClosable // method - pass a 'pane'
- , disableClosable: disableClosable // method - ditto
- , enableSlidable: enableSlidable // method - ditto
- , disableSlidable: disableSlidable // method - ditto
- , enableResizable: enableResizable // method - ditto
- , disableResizable: disableResizable// method - ditto
- // utility methods for panes
- , allowOverflow: allowOverflow // utility - pass calling element (this)
- , resetOverflow: resetOverflow // utility - ditto
- // layout control
- , destroy: destroy // method - no parameters
- , initPanes: isInitialized // method - no parameters
- , resizeAll: resizeAll // method - no parameters
- // callback triggering
- , runCallbacks: _runCallbacks // method - pass evtName & pane (if a pane-event), eg: trigger("onopen", "west")
- // alias collections of options, state and children - created in addPane and extended elsewhere
- , hasParentLayout: false // set by initContainer()
- , children: children // pointers to child-layouts, eg: Instance.children.west.layoutName
- , north: false // alias group: { name: pane, pane: $Ps[pane], options: options[pane], state: state[pane], children: children[pane] }
- , south: false // ditto
- , west: false // ditto
- , east: false // ditto
- , center: false // ditto
- };
-
- // create the border layout NOW
- if (_create() === 'cancel') // onload_start callback returned false to CANCEL layout creation
- return null;
- else // true OR false -- if layout-elements did NOT init (hidden or do not exist), can auto-init later
- return Instance; // return the Instance object
-
-}
-
-
-})( jQuery );
-
-
-
-
-/**
- * jquery.layout.state 1.2
- * $Date: 2015/03/13 22:37:04 $
- *
- * Copyright (c) 2014
- * Kevin Dalman (http://allpro.net)
- *
- * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
- * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
- *
- * @requires: UI Layout 1.4.0 or higher
- * @requires: $.ui.cookie (above)
- *
- * @see: http://groups.google.com/group/jquery-ui-layout
- */
-;(function ($) {
-
-if (!$.layout) return;
-
-
-/**
- * UI COOKIE UTILITY
- *
- * A $.cookie OR $.ui.cookie namespace *should be standard*, but until then...
- * This creates $.ui.cookie so Layout does not need the cookie.jquery.js plugin
- * NOTE: This utility is REQUIRED by the layout.state plugin
- *
- * Cookie methods in Layout are created as part of State Management
- */
-if (!$.ui) $.ui = {};
-$.ui.cookie = {
-
- // cookieEnabled is not in DOM specs, but DOES works in all browsers,including IE6
- acceptsCookies: !!navigator.cookieEnabled
-
-, read: function (name) {
- var
- c = document.cookie
- , cs = c ? c.split(';') : []
- , pair, data, i
- ;
- for (i=0; pair=cs[i]; i++) {
- data = $.trim(pair).split('='); // name=value => [ name, value ]
- if (data[0] == name) // found the layout cookie
- return decodeURIComponent(data[1]);
- }
- return null;
- }
-
-, write: function (name, val, cookieOpts) {
- var params = ""
- , date = ""
- , clear = false
- , o = cookieOpts || {}
- , x = o.expires || null
- , t = $.type(x)
- ;
- if (t === "date")
- date = x;
- else if (t === "string" && x > 0) {
- x = parseInt(x,10);
- t = "number";
- }
- if (t === "number") {
- date = new Date();
- if (x > 0)
- date.setDate(date.getDate() + x);
- else {
- date.setFullYear(1970);
- clear = true;
- }
- }
- if (date) params += ";expires="+ date.toUTCString();
- if (o.path) params += ";path="+ o.path;
- if (o.domain) params += ";domain="+ o.domain;
- if (o.secure) params += ";secure";
- document.cookie = name +"="+ (clear ? "" : encodeURIComponent( val )) + params; // write or clear cookie
- }
-
-, clear: function (name) {
- $.ui.cookie.write(name, "", {expires: -1});
- }
-
-};
-// if cookie.jquery.js is not loaded, create an alias to replicate it
-// this may be useful to other plugins or code dependent on that plugin
-if (!$.cookie) $.cookie = function (k, v, o) {
- var C = $.ui.cookie;
- if (v === null)
- C.clear(k);
- else if (v === undefined)
- return C.read(k);
- else
- C.write(k, v, o);
-};
-
-
-
-/**
- * State-management options stored in options.stateManagement, which includes a .cookie hash
- * Default options saves ALL KEYS for ALL PANES, ie: pane.size, pane.isClosed, pane.isHidden
- *
- * // STATE/COOKIE OPTIONS
- * @example $(el).layout({
- stateManagement: {
- enabled: true
- , stateKeys: "east.size,west.size,east.isClosed,west.isClosed"
- , cookie: { name: "appLayout", path: "/" }
- }
- })
- * @example $(el).layout({ stateManagement__enabled: true }) // enable auto-state-management using cookies
- * @example $(el).layout({ stateManagement__cookie: { name: "appLayout", path: "/" } })
- * @example $(el).layout({ stateManagement__cookie__name: "appLayout", stateManagement__cookie__path: "/" })
- *
- * // STATE/COOKIE METHODS
- * @example myLayout.saveCookie( "west.isClosed,north.size,south.isHidden", {expires: 7} );
- * @example myLayout.loadCookie();
- * @example myLayout.deleteCookie();
- * @example var JSON = myLayout.readState(); // CURRENT Layout State
- * @example var JSON = myLayout.readCookie(); // SAVED Layout State (from cookie)
- * @example var JSON = myLayout.state.stateData; // LAST LOADED Layout State (cookie saved in layout.state hash)
- *
- * CUSTOM STATE-MANAGEMENT (eg, saved in a database)
- * @example var JSON = myLayout.readState( "west.isClosed,north.size,south.isHidden" );
- * @example myLayout.loadState( JSON );
- */
-
-// tell Layout that the state plugin is available
-$.layout.plugins.stateManagement = true;
-
-// Add State-Management options to layout.defaults
-$.layout.defaults.stateManagement = {
- enabled: false // true = enable state-management, even if not using cookies
-, autoSave: true // Save a state-cookie when page exits?
-, autoLoad: true // Load the state-cookie when Layout inits?
-, animateLoad: true // animate panes when loading state into an active layout
-, includeChildren: true // recurse into child layouts to include their state as well
- // List state-data to save - must be pane-specific
-, stateKeys: "north.size,south.size,east.size,west.size,"+
- "north.isClosed,south.isClosed,east.isClosed,west.isClosed,"+
- "north.isHidden,south.isHidden,east.isHidden,west.isHidden"
-, cookie: {
- name: "" // If not specified, will use Layout.name, else just "Layout"
- , domain: "" // blank = current domain
- , path: "" // blank = current page, "/" = entire website
- , expires: "" // 'days' to keep cookie - leave blank for 'session cookie'
- , secure: false
- }
-};
-
-// Set stateManagement as a 'layout-option', NOT a 'pane-option'
-$.layout.optionsMap.layout.push("stateManagement");
-// Update config so layout does not move options into the pane-default branch (panes)
-$.layout.config.optionRootKeys.push("stateManagement");
-
-/*
- * State Management methods
- */
-$.layout.state = {
-
- /**
- * Get the current layout state and save it to a cookie
- *
- * myLayout.saveCookie( keys, cookieOpts )
- *
- * @param {Object} inst
- * @param {(string|Array)=} keys
- * @param {Object=} cookieOpts
- */
- saveCookie: function (inst, keys, cookieOpts) {
- var o = inst.options
- , sm = o.stateManagement
- , oC = $.extend(true, {}, sm.cookie, cookieOpts || null)
- , data = inst.state.stateData = inst.readState( keys || sm.stateKeys ) // read current panes-state
- ;
- $.ui.cookie.write( oC.name || o.name || "Layout", $.layout.state.encodeJSON(data), oC );
- return $.extend(true, {}, data); // return COPY of state.stateData data
- }
-
- /**
- * Remove the state cookie
- *
- * @param {Object} inst
- */
-, deleteCookie: function (inst) {
- var o = inst.options;
- $.ui.cookie.clear( o.stateManagement.cookie.name || o.name || "Layout" );
- }
-
- /**
- * Read & return data from the cookie - as JSON
- *
- * @param {Object} inst
- */
-, readCookie: function (inst) {
- var o = inst.options;
- var c = $.ui.cookie.read( o.stateManagement.cookie.name || o.name || "Layout" );
- // convert cookie string back to a hash and return it
- return c ? $.layout.state.decodeJSON(c) : {};
- }
-
- /**
- * Get data from the cookie and USE IT to loadState
- *
- * @param {Object} inst
- */
-, loadCookie: function (inst) {
- var c = $.layout.state.readCookie(inst); // READ the cookie
- if (c && !$.isEmptyObject( c )) {
- inst.state.stateData = $.extend(true, {}, c); // SET state.stateData
- inst.loadState(c); // LOAD the retrieved state
- }
- return c;
- }
-
- /**
- * Update layout options from the cookie, if one exists
- *
- * @param {Object} inst
- * @param {Object=} stateData
- * @param {boolean=} animate
- */
-, loadState: function (inst, data, opts) {
- if (!$.isPlainObject( data ) || $.isEmptyObject( data )) return;
-
- // normalize data & cache in the state object
- data = inst.state.stateData = $.layout.transformData( data ); // panes = default subkey
-
- // add missing/default state-restore options
- var smo = inst.options.stateManagement;
- opts = $.extend({
- animateLoad: false //smo.animateLoad
- , includeChildren: smo.includeChildren
- }, opts );
-
- if (!inst.state.initialized) {
- /*
- * layout NOT initialized, so just update its options
- */
- // MUST remove pane.children keys before applying to options
- // use a copy so we don't remove keys from original data
- var o = $.extend(true, {}, data);
- //delete o.center; // center has no state-data - only children
- $.each($.layout.config.allPanes, function (idx, pane) {
- if (o[pane]) delete o[pane].children;
- });
- // update CURRENT layout-options with saved state data
- $.extend(true, inst.options, o);
- }
- else {
- /*
- * layout already initialized, so modify layout's configuration
- */
- var noAnimate = !opts.animateLoad
- , o, c, h, state, open
- ;
- $.each($.layout.config.borderPanes, function (idx, pane) {
- o = data[ pane ];
- if (!$.isPlainObject( o )) return; // no key, skip pane
-
- s = o.size;
- c = o.initClosed;
- h = o.initHidden;
- ar = o.autoResize
- state = inst.state[pane];
- open = state.isVisible;
-
- // reset autoResize
- if (ar)
- state.autoResize = ar;
- // resize BEFORE opening
- if (!open)
- inst._sizePane(pane, s, false, false, false); // false=skipCallback/noAnimation/forceResize
- // open/close as necessary - DO NOT CHANGE THIS ORDER!
- if (h === true) inst.hide(pane, noAnimate);
- else if (c === true) inst.close(pane, false, noAnimate);
- else if (c === false) inst.open (pane, false, noAnimate);
- else if (h === false) inst.show (pane, false, noAnimate);
- // resize AFTER any other actions
- if (open)
- inst._sizePane(pane, s, false, false, noAnimate); // animate resize if option passed
- });
-
- /*
- * RECURSE INTO CHILD-LAYOUTS
- */
- if (opts.includeChildren) {
- var paneStateChildren, childState;
- $.each(inst.children, function (pane, paneChildren) {
- paneStateChildren = data[pane] ? data[pane].children : 0;
- if (paneStateChildren && paneChildren) {
- $.each(paneChildren, function (stateKey, child) {
- childState = paneStateChildren[stateKey];
- if (child && childState)
- child.loadState( childState );
- });
- }
- });
- }
- }
- }
-
- /**
- * Get the *current layout state* and return it as a hash
- *
- * @param {Object=} inst // Layout instance to get state for
- * @param {object=} [opts] // State-Managements override options
- */
-, readState: function (inst, opts) {
- // backward compatility
- if ($.type(opts) === 'string') opts = { keys: opts };
- if (!opts) opts = {};
- var sm = inst.options.stateManagement
- , ic = opts.includeChildren
- , recurse = ic !== undefined ? ic : sm.includeChildren
- , keys = opts.stateKeys || sm.stateKeys
- , alt = { isClosed: 'initClosed', isHidden: 'initHidden' }
- , state = inst.state
- , panes = $.layout.config.allPanes
- , data = {}
- , pair, pane, key, val
- , ps, pC, child, array, count, branch
- ;
- if ($.isArray(keys)) keys = keys.join(",");
- // convert keys to an array and change delimiters from '__' to '.'
- keys = keys.replace(/__/g, ".").split(',');
- // loop keys and create a data hash
- for (var i=0, n=keys.length; i < n; i++) {
- pair = keys[i].split(".");
- pane = pair[0];
- key = pair[1];
- if ($.inArray(pane, panes) < 0) continue; // bad pane!
- val = state[ pane ][ key ];
- if (val == undefined) continue;
- if (key=="isClosed" && state[pane]["isSliding"])
- val = true; // if sliding, then *really* isClosed
- ( data[pane] || (data[pane]={}) )[ alt[key] ? alt[key] : key ] = val;
- }
-
- // recurse into the child-layouts for each pane
- if (recurse) {
- $.each(panes, function (idx, pane) {
- pC = inst.children[pane];
- ps = state.stateData[pane];
- if ($.isPlainObject( pC ) && !$.isEmptyObject( pC )) {
- // ensure a key exists for this 'pane', eg: branch = data.center
- branch = data[pane] || (data[pane] = {});
- if (!branch.children) branch.children = {};
- $.each( pC, function (key, child) {
- // ONLY read state from an initialize layout
- if ( child.state.initialized )
- branch.children[ key ] = $.layout.state.readState( child );
- // if we have PREVIOUS (onLoad) state for this child-layout, KEEP IT!
- else if ( ps && ps.children && ps.children[ key ] ) {
- branch.children[ key ] = $.extend(true, {}, ps.children[ key ] );
- }
- });
- }
- });
- }
-
- return data;
- }
-
- /**
- * Stringify a JSON hash so can save in a cookie or db-field
- */
-, encodeJSON: function (json) {
- var local = window.JSON || {};
- return (local.stringify || stringify)(json);
-
- function stringify (h) {
- var D=[], i=0, k, v, t // k = key, v = value
- , a = $.isArray(h)
- ;
- for (k in h) {
- v = h[k];
- t = typeof v;
- if (t == 'string') // STRING - add quotes
- v = '"'+ v +'"';
- else if (t == 'object') // SUB-KEY - recurse into it
- v = parse(v);
- D[i++] = (!a ? '"'+ k +'":' : '') + v;
- }
- return (a ? '[' : '{') + D.join(',') + (a ? ']' : '}');
- };
- }
-
- /**
- * Convert stringified JSON back to a hash object
- * @see $.parseJSON(), adding in jQuery 1.4.1
- */
-, decodeJSON: function (str) {
- try { return $.parseJSON ? $.parseJSON(str) : window["eval"]("("+ str +")") || {}; }
- catch (e) { return {}; }
- }
-
-
-, _create: function (inst) {
- var s = $.layout.state
- , o = inst.options
- , sm = o.stateManagement
- ;
- // ADD State-Management plugin methods to inst
- $.extend( inst, {
- // readCookie - update options from cookie - returns hash of cookie data
- readCookie: function () { return s.readCookie(inst); }
- // deleteCookie
- , deleteCookie: function () { s.deleteCookie(inst); }
- // saveCookie - optionally pass keys-list and cookie-options (hash)
- , saveCookie: function (keys, cookieOpts) { return s.saveCookie(inst, keys, cookieOpts); }
- // loadCookie - readCookie and use to loadState() - returns hash of cookie data
- , loadCookie: function () { return s.loadCookie(inst); }
- // loadState - pass a hash of state to use to update options
- , loadState: function (stateData, opts) { s.loadState(inst, stateData, opts); }
- // readState - returns hash of current layout-state
- , readState: function (keys) { return s.readState(inst, keys); }
- // add JSON utility methods too...
- , encodeJSON: s.encodeJSON
- , decodeJSON: s.decodeJSON
- });
-
- // init state.stateData key, even if plugin is initially disabled
- inst.state.stateData = {};
-
- // autoLoad MUST BE one of: data-array, data-hash, callback-function, or TRUE
- if ( !sm.autoLoad ) return;
-
- // When state-data exists in the autoLoad key USE IT,
- // even if stateManagement.enabled == false
- if ($.isPlainObject( sm.autoLoad )) {
- if (!$.isEmptyObject( sm.autoLoad )) {
- inst.loadState( sm.autoLoad );
- }
- }
- else if ( sm.enabled ) {
- // update the options from cookie or callback
- // if options is a function, call it to get stateData
- if ($.isFunction( sm.autoLoad )) {
- var d = {};
- try {
- d = sm.autoLoad( inst, inst.state, inst.options, inst.options.name || '' ); // try to get data from fn
- } catch (e) {}
- if (d && $.isPlainObject( d ) && !$.isEmptyObject( d ))
- inst.loadState(d);
- }
- else // any other truthy value will trigger loadCookie
- inst.loadCookie();
- }
- }
-
-, _unload: function (inst) {
- var sm = inst.options.stateManagement;
- if (sm.enabled && sm.autoSave) {
- // if options is a function, call it to save the stateData
- if ($.isFunction( sm.autoSave )) {
- try {
- sm.autoSave( inst, inst.state, inst.options, inst.options.name || '' ); // try to get data from fn
- } catch (e) {}
- }
- else // any truthy value will trigger saveCookie
- inst.saveCookie();
- }
- }
-
-};
-
-// add state initialization method to Layout's onCreate array of functions
-$.layout.onCreate.push( $.layout.state._create );
-$.layout.onUnload.push( $.layout.state._unload );
-
-})( jQuery );
-
-
-
-/**
- * @preserve jquery.layout.buttons 1.0
- * $Date: 2015/03/13 22:37:04 $
- *
- * Copyright (c) 2011
- * Kevin Dalman (http://allpro.net)
- *
- * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
- * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
- *
- * @dependancies: UI Layout 1.3.0.rc30.1 or higher
- *
- * @support: http://groups.google.com/group/jquery-ui-layout
- *
- * Docs: [ to come ]
- * Tips: [ to come ]
- */
-;(function ($) {
-
-if (!$.layout) return;
-
-
-// tell Layout that the state plugin is available
-$.layout.plugins.buttons = true;
-
-// Add State-Management options to layout.defaults
-$.layout.defaults.autoBindCustomButtons = false;
-// Set stateManagement as a layout-option, NOT a pane-option
-$.layout.optionsMap.layout.push("autoBindCustomButtons");
-
-var lang = $.layout.language;
-
-/*
- * Button methods
- */
-$.layout.buttons = {
- // set data used by multiple methods below
- config: {
- borderPanes: "north,south,west,east"
- }
-
- /**
- * Searches for .ui-layout-button-xxx elements and auto-binds them as layout-buttons
- *
- * @see _create()
- */
-, init: function (inst) {
- var pre = "ui-layout-button-"
- , layout = inst.options.name || ""
- , name;
- $.each("toggle,open,close,pin,toggle-slide,open-slide".split(","), function (i, action) {
- $.each($.layout.buttons.config.borderPanes.split(","), function (ii, pane) {
- $("."+pre+action+"-"+pane).each(function(){
- // if button was previously 'bound', data.layoutName was set, but is blank if layout has no 'name'
- name = $(this).data("layoutName") || $(this).attr("layoutName");
- if (name == undefined || name === layout)
- inst.bindButton(this, action, pane);
- });
- });
- });
- }
-
- /**
- * Helper function to validate params received by addButton utilities
- *
- * Two classes are added to the element, based on the buttonClass...
- * The type of button is appended to create the 2nd className:
- * - ui-layout-button-pin
- * - ui-layout-pane-button-toggle
- * - ui-layout-pane-button-open
- * - ui-layout-pane-button-close
- *
- * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
- * @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
- * @return {Array.<Object>} If both params valid, the element matching 'selector' in a jQuery wrapper - otherwise returns null
- */
-, get: function (inst, selector, pane, action) {
- var $E = $(selector)
- , o = inst.options
- , err = o.showErrorMessages
- ;
- if (!$E.length) { // element not found
- if (err) alert(lang.errButton + lang.selector +": "+ selector);
- }
- else if ($.layout.buttons.config.borderPanes.indexOf(pane) === -1) { // invalid 'pane' sepecified
- if (err) alert(lang.errButton + lang.pane +": "+ pane);
- $E = $(""); // NO BUTTON
- }
- else { // VALID
- var btn = o[pane].buttonClass +"-"+ action;
- $E .addClass( btn +" "+ btn +"-"+ pane )
- .data("layoutName", o.name); // add layout identifier - even if blank!
- }
- return $E;
- }
-
-
- /**
- * NEW syntax for binding layout-buttons - will eventually replace addToggle, addOpen, etc.
- *
- * @param {(string|!Object)} sel jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
- * @param {string} action
- * @param {string} pane
- */
-, bind: function (inst, sel, action, pane) {
- var _ = $.layout.buttons;
- switch (action.toLowerCase()) {
- case "toggle": _.addToggle (inst, sel, pane); break;
- case "open": _.addOpen (inst, sel, pane); break;
- case "close": _.addClose (inst, sel, pane); break;
- case "pin": _.addPin (inst, sel, pane); break;
- case "toggle-slide": _.addToggle (inst, sel, pane, true); break;
- case "open-slide": _.addOpen (inst, sel, pane, true); break;
- }
- return inst;
- }
-
- /**
- * Add a custom Toggler button for a pane
- *
- * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
- * @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
- * @param {boolean=} slide true = slide-open, false = pin-open
- */
-, addToggle: function (inst, selector, pane, slide) {
- $.layout.buttons.get(inst, selector, pane, "toggle")
- .click(function(evt){
- inst.toggle(pane, !!slide);
- evt.stopPropagation();
- });
- return inst;
- }
-
- /**
- * Add a custom Open button for a pane
- *
- * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
- * @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
- * @param {boolean=} slide true = slide-open, false = pin-open
- */
-, addOpen: function (inst, selector, pane, slide) {
- $.layout.buttons.get(inst, selector, pane, "open")
- .attr("title", lang.Open)
- .click(function (evt) {
- inst.open(pane, !!slide);
- evt.stopPropagation();
- });
- return inst;
- }
-
- /**
- * Add a custom Close button for a pane
- *
- * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
- * @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
- */
-, addClose: function (inst, selector, pane) {
- $.layout.buttons.get(inst, selector, pane, "close")
- .attr("title", lang.Close)
- .click(function (evt) {
- inst.close(pane);
- evt.stopPropagation();
- });
- return inst;
- }
-
- /**
- * Add a custom Pin button for a pane
- *
- * Four classes are added to the element, based on the paneClass for the associated pane...
- * Assuming the default paneClass and the pin is 'up', these classes are added for a west-pane pin:
- * - ui-layout-pane-pin
- * - ui-layout-pane-west-pin
- * - ui-layout-pane-pin-up
- * - ui-layout-pane-west-pin-up
- *
- * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
- * @param {string} pane Name of the pane the pin is for: 'north', 'south', etc.
- */
-, addPin: function (inst, selector, pane) {
- var $E = $.layout.buttons.get(inst, selector, pane, "pin");
- if ($E.length) {
- var s = inst.state[pane];
- $E.click(function (evt) {
- $.layout.buttons.setPinState(inst, $(this), pane, (s.isSliding || s.isClosed));
- if (s.isSliding || s.isClosed) inst.open( pane ); // change from sliding to open
- else inst.close( pane ); // slide-closed
- evt.stopPropagation();
- });
- // add up/down pin attributes and classes
- $.layout.buttons.setPinState(inst, $E, pane, (!s.isClosed && !s.isSliding));
- // add this pin to the pane data so we can 'sync it' automatically
- // PANE.pins key is an array so we can store multiple pins for each pane
- s.pins.push( selector ); // just save the selector string
- }
- return inst;
- }
-
- /**
- * Change the class of the pin button to make it look 'up' or 'down'
- *
- * @see addPin(), syncPins()
- * @param {Array.<Object>} $Pin The pin-span element in a jQuery wrapper
- * @param {string} pane These are the params returned to callbacks by layout()
- * @param {boolean} doPin true = set the pin 'down', false = set it 'up'
- */
-, setPinState: function (inst, $Pin, pane, doPin) {
- var updown = $Pin.attr("pin");
- if (updown && doPin === (updown=="down")) return; // already in correct state
- var
- pin = inst.options[pane].buttonClass +"-pin"
- , side = pin +"-"+ pane
- , UP = pin +"-up "+ side +"-up"
- , DN = pin +"-down "+side +"-down"
- ;
- $Pin
- .attr("pin", doPin ? "down" : "up") // logic
- .attr("title", doPin ? lang.Unpin : lang.Pin)
- .removeClass( doPin ? UP : DN )
- .addClass( doPin ? DN : UP )
- ;
- }
-
- /**
- * INTERNAL function to sync 'pin buttons' when pane is opened or closed
- * Unpinned means the pane is 'sliding' - ie, over-top of the adjacent panes
- *
- * @see open(), close()
- * @param {string} pane These are the params returned to callbacks by layout()
- * @param {boolean} doPin True means set the pin 'down', False means 'up'
- */
-, syncPinBtns: function (inst, pane, doPin) {
- // REAL METHOD IS _INSIDE_ LAYOUT - THIS IS HERE JUST FOR REFERENCE
- $.each(state[pane].pins, function (i, selector) {
- $.layout.buttons.setPinState(inst, $(selector), pane, doPin);
- });
- }
-
-
-, _load: function (inst) {
- // ADD Button methods to Layout Instance
- $.extend( inst, {
- bindButton: function (selector, action, pane) { return $.layout.buttons.bind(inst, selector, action, pane); }
- // DEPRECATED METHODS...
- , addToggleBtn: function (selector, pane, slide) { return $.layout.buttons.addToggle(inst, selector, pane, slide); }
- , addOpenBtn: function (selector, pane, slide) { return $.layout.buttons.addOpen(inst, selector, pane, slide); }
- , addCloseBtn: function (selector, pane) { return $.layout.buttons.addClose(inst, selector, pane); }
- , addPinBtn: function (selector, pane) { return $.layout.buttons.addPin(inst, selector, pane); }
- });
-
- // init state array to hold pin-buttons
- for (var i=0; i<4; i++) {
- var pane = $.layout.buttons.config.borderPanes[i];
- inst.state[pane].pins = [];
- }
-
- // auto-init buttons onLoad if option is enabled
- if ( inst.options.autoBindCustomButtons )
- $.layout.buttons.init(inst);
- }
-
-, _unload: function (inst) {
- // TODO: unbind all buttons???
- }
-
-};
-
-// add initialization method to Layout's onLoad array of functions
-$.layout.onLoad.push( $.layout.buttons._load );
-//$.layout.onUnload.push( $.layout.buttons._unload );
-
-})( jQuery );
-
-
-
-
-/**
- * jquery.layout.browserZoom 1.0
- * $Date: 2015/03/13 22:37:04 $
- *
- * Copyright (c) 2012
- * Kevin Dalman (http://allpro.net)
- *
- * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
- * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
- *
- * @requires: UI Layout 1.3.0.rc30.1 or higher
- *
- * @see: http://groups.google.com/group/jquery-ui-layout
- *
- * TODO: Extend logic to handle other problematic zooming in browsers
- * TODO: Add hotkey/mousewheel bindings to _instantly_ respond to these zoom event
- */
-(function ($) {
-
-// tell Layout that the plugin is available
-$.layout.plugins.browserZoom = true;
-
-$.layout.defaults.browserZoomCheckInterval = 1000;
-$.layout.optionsMap.layout.push("browserZoomCheckInterval");
-
-/*
- * browserZoom methods
- */
-$.layout.browserZoom = {
-
- _init: function (inst) {
- // abort if browser does not need this check
- if ($.layout.browserZoom.ratio() !== false)
- $.layout.browserZoom._setTimer(inst);
- }
-
-, _setTimer: function (inst) {
- // abort if layout destroyed or browser does not need this check
- if (inst.destroyed) return;
- var o = inst.options
- , s = inst.state
- // don't need check if inst has parentLayout, but check occassionally in case parent destroyed!
- // MINIMUM 100ms interval, for performance
- , ms = inst.hasParentLayout ? 5000 : Math.max( o.browserZoomCheckInterval, 100 )
- ;
- // set the timer
- setTimeout(function(){
- if (inst.destroyed || !o.resizeWithWindow) return;
- var d = $.layout.browserZoom.ratio();
- if (d !== s.browserZoom) {
- s.browserZoom = d;
- inst.resizeAll();
- }
- // set a NEW timeout
- $.layout.browserZoom._setTimer(inst);
- }
- , ms );
- }
-
-, ratio: function () {
- var w = window
- , s = screen
- , d = document
- , dE = d.documentElement || d.body
- , b = $.layout.browser
- , v = b.version
- , r, sW, cW
- ;
- // we can ignore all browsers that fire window.resize event onZoom
- if (!b.msie || v > 8)
- return false; // don't need to track zoom
- if (s.deviceXDPI && s.systemXDPI) // syntax compiler hack
- return calc(s.deviceXDPI, s.systemXDPI);
- // everything below is just for future reference!
- if (b.webkit && (r = d.body.getBoundingClientRect))
- return calc((r.left - r.right), d.body.offsetWidth);
- if (b.webkit && (sW = w.outerWidth))
- return calc(sW, w.innerWidth);
- if ((sW = s.width) && (cW = dE.clientWidth))
- return calc(sW, cW);
- return false; // no match, so cannot - or don't need to - track zoom
-
- function calc (x,y) { return (parseInt(x,10) / parseInt(y,10) * 100).toFixed(); }
- }
-
-};
-// add initialization method to Layout's onLoad array of functions
-$.layout.onReady.push( $.layout.browserZoom._init );
-
-
-})( jQuery );
-
-
-
-
-/**
- * UI Layout Plugin: Slide-Offscreen Animation
- *
- * Prevent panes from being 'hidden' so that an iframes/objects
- * does not reload/refresh when pane 'opens' again.
- * This plug-in adds a new animation called "slideOffscreen".
- * It is identical to the normal "slide" effect, but avoids hiding the element
- *
- * Requires Layout 1.3.0.RC30.1 or later for Close offscreen
- * Requires Layout 1.3.0.RC30.5 or later for Hide, initClosed & initHidden offscreen
- *
- * Version: 1.1 - 2012-11-18
- * Author: Kevin Dalman (kevin@jquery-dev.com)
- * @preserve jquery.layout.slideOffscreen-1.1.js
- */
-;(function ($) {
-
-// Add a new "slideOffscreen" effect
-if ($.effects) {
-
- // add an option so initClosed and initHidden will work
- $.layout.defaults.panes.useOffscreenClose = false; // user must enable when needed
- /* set the new animation as the default for all panes
- $.layout.defaults.panes.fxName = "slideOffscreen";
- */
-
- if ($.layout.plugins)
- $.layout.plugins.effects.slideOffscreen = true;
-
- // dupe 'slide' effect defaults as new effect defaults
- $.layout.effects.slideOffscreen = $.extend(true, {}, $.layout.effects.slide);
-
- // add new effect to jQuery UI
- $.effects.slideOffscreen = function(o) {
- return this.queue(function(){
-
- var fx = $.effects
- , opt = o.options
- , $el = $(this)
- , pane = $el.data('layoutEdge')
- , state = $el.data('parentLayout').state
- , dist = state[pane].size
- , s = this.style
- , props = ['top','bottom','left','right']
- // Set options
- , mode = fx.setMode($el, opt.mode || 'show') // Set Mode
- , show = (mode == 'show')
- , dir = opt.direction || 'left' // Default Direction
- , ref = (dir == 'up' || dir == 'down') ? 'top' : 'left'
- , pos = (dir == 'up' || dir == 'left')
- , offscrn = $.layout.config.offscreenCSS || {}
- , keyLR = $.layout.config.offscreenReset
- , keyTB = 'offscreenResetTop' // only used internally
- , animation = {}
- ;
- // Animation settings
- animation[ref] = (show ? (pos ? '+=' : '-=') : (pos ? '-=' : '+=')) + dist;
-
- if (show) { // show() animation, so save top/bottom but retain left/right set when 'hidden'
- $el.data(keyTB, { top: s.top, bottom: s.bottom });
-
- // set the top or left offset in preparation for animation
- // Note: ALL animations work by shifting the top or left edges
- if (pos) { // top (north) or left (west)
- $el.css(ref, isNaN(dist) ? "-" + dist : -dist); // Shift outside the left/top edge
- }
- else { // bottom (south) or right (east) - shift all the way across container
- if (dir === 'right')
- $el.css({ left: state.container.layoutWidth, right: 'auto' });
- else // dir === bottom
- $el.css({ top: state.container.layoutHeight, bottom: 'auto' });
- }
- // restore the left/right setting if is a top/bottom animation
- if (ref === 'top')
- $el.css( $el.data( keyLR ) || {} );
- }
- else { // hide() animation, so save ALL CSS
- $el.data(keyTB, { top: s.top, bottom: s.bottom });
- $el.data(keyLR, { left: s.left, right: s.right });
- }
-
- // Animate
- $el.show().animate(animation, { queue: false, duration: o.duration, easing: opt.easing, complete: function(){
- // Restore top/bottom
- if ($el.data( keyTB ))
- $el.css($el.data( keyTB )).removeData( keyTB );
- if (show) // Restore left/right too
- $el.css($el.data( keyLR ) || {}).removeData( keyLR );
- else // Move the pane off-screen (left: -99999, right: 'auto')
- $el.css( offscrn );
-
- if (o.callback) o.callback.apply(this, arguments); // Callback
- $el.dequeue();
- }});
-
- });
- };
-
-}
-
-})( jQuery ); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/sample/css/images/blank.gif b/ecomp-portal-BE/war/static/fusion/sample/css/images/blank.gif
deleted file mode 100644
index 75b945d2..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/css/images/blank.gif
+++ /dev/null
Binary files differ
diff --git a/ecomp-portal-BE/war/static/fusion/sample/css/scribble.css b/ecomp-portal-BE/war/static/fusion/sample/css/scribble.css
deleted file mode 100644
index 8aead535..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/css/scribble.css
+++ /dev/null
@@ -1,32 +0,0 @@
-#scribble-pad {
- margin-left:auto;
- margin-right:auto;
- height: 475px;
- width: 475px;
- background-image:url(https://www.ibm.com/developerworks/mydeveloperworks/blogs/bobleah/resource/stickynote.jpg);
- background-repeat: no-repeat;
-}
-
-#scribble {
- white-space: pre-wrap; /* css-3 */
- white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
- white-space: -pre-wrap; /* Opera 4-6 */
- white-space: -o-pre-wrap; /* Opera 7 */
- word-wrap: break-word; /* Internet Explorer 5.5+ */
- max-width: 300px;
- padding: 120px 100px 100px 75px;
- color: #486891;
- font-family: Arial,sans-serif;
- font-size: 140%;
- font-style: italic;
- font-weight:bold;
- line-height: 1.5em;
-}
-
-.c-link {
- color: #486891;
- font-family: Arial,sans-serif;
- font-size: 95%;
- font-weight:bold;
- text-decoration: none;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/sample/css/slider.css b/ecomp-portal-BE/war/static/fusion/sample/css/slider.css
deleted file mode 100644
index f609403c..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/css/slider.css
+++ /dev/null
@@ -1,142 +0,0 @@
-div,span,p { margin:0; padding:0; border:0; outline:0; font-weight:inherit; font-style:inherit; font-size:100%; font-family:inherit; vertical-align:baseline; }
-
-
-#container {
- width:580px;
- padding:10px;
- margin:0 auto;
- position:relative;
- z-index:0;
-}
-
-#example {
- width:600px;
- height:350px;
- position:relative;
-}
-
-#ribbon {
- position:absolute;
- top:-3px;
- left:-15px;
- z-index:500;
-}
-
-#frame {
- position:absolute;
- z-index:0;
- width:739px;
- height:341px;
- top:-3px;
- left:-80px;
-}
-
-/*
- Slideshow
-*/
-
-#slides {
- position:absolute;
- top:15px;
- left:4px;
- z-index:100;
-}
-
-/*
- Slides container
- Important:
- Set the width of your slides container
- Set to display none, prevents content flash
-*/
-
-.slides_container {
- width:570px;
- overflow:hidden;
- position:relative;
- display:none;
-}
-
-/*
- Each slide
- Important:
- Set the width of your slides
- If height not specified height will be set by the slide content
- Set to display block
-*/
-
-.slides_container div.slide {
- width:570px;
- height:270px;
- display:block;
-}
-
-
-/*
- Next/prev buttons
-*/
-
-#slides .next,#slides .prev {
- position:absolute;
- top:107px;
- left:-39px;
- width:24px;
- height:43px;
- display:block;
- z-index:101;
-}
-
-#slides .next {
- left:585px;
-}
-
-/*
- Pagination
-*/
-
-.pagination {
- margin:26px auto 0;
- width:100px;
-}
-
-.pagination li {
- float:left;
- margin:0 1px;
- list-style:none;
-}
-
-.pagination li a {
- display:block;
- width:12px;
- height:0;
- padding-top:12px;
- background-image:url(../images/pagination.png);
- background-position:0 0;
- float:left;
- overflow:hidden;
-}
-
-.pagination li.current a {
- background-position:0 -12px;
-}
-
-/*
- Caption
-*/
-
-.caption {
- z-index:500;
- position:absolute;
- bottom:-35px;
- left:0;
- height:30px;
- padding:5px 20px 0 20px;
- background:#000;
- background:rgba(0,0,0,.5);
- width:540px;
- font-size:1.3em;
- line-height:1.33;
- color:#fff;
- border-top:1px solid #000;
- text-shadow:none;
-}
-
diff --git a/ecomp-portal-BE/war/static/fusion/sample/css/spacegallery.css b/ecomp-portal-BE/war/static/fusion/sample/css/spacegallery.css
deleted file mode 100644
index ce4fd57c..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/css/spacegallery.css
+++ /dev/null
@@ -1,18 +0,0 @@
-.spacegallery {
- position: relative;
- overflow: hidden;
-}
-.spacegallery img {
- position: absolute;
- left: 50%;
-}
-.spacegallery a {
- position: absolute;
- z-index: 1000;
- display: block;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background: url(images/blank.gif);
-}
diff --git a/ecomp-portal-BE/war/static/fusion/sample/html/area_chart.html b/ecomp-portal-BE/war/static/fusion/sample/html/area_chart.html
deleted file mode 100644
index 30ef2011..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/html/area_chart.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta http-equiv="content-type" content="text/html; charset=UTF8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge" />
-<link href="../../d3/css/nv.d3.css" rel="stylesheet" type="text/css">
-<style>
- body {
- overflow-y:scroll;
- }
- text {
- font: 12px sans-serif;
- }
- svg {
- display: block;
- }
- #chart461 svg {
- height: 175px;
- width: 300px;
- min-width: 100px;
- min-height: 100px;
- }
- tr.z-row-over > td.z-row-inner, tr.z-row-over > .z-cell { background-color: rgb(255, 255, 255); }
-.nodatadiv {
- display: table-cell;
- width: 700px;
- height:370px;
- text-align:center;
- vertical-align: middle;
-}
-.nodatainner {
- padding: 10px;
-}
- </style>
-<body>
-<div align="center"><H3></H3></div><div id="chart461"> <svg></svg> </div>
-<script src="../../d3/js/d3.v3.min.js"></script>
-<script src="../../d3/js/nv.d3.min.js"></script>
-<script src="../../d3/js/models/axis.min.js"></script>
-<script>
-historicalBarChart = [
- { "type":"line", "key": "AP_CPU", "yAxis": "1","values": [{ "x":1388552400000 , "y":2.13}, { "x":1388552400000 , "y":5.0}, { "x":1388552400000 , "y":2.36}, { "x":1388552400000 , "y":10.0}, { "x":1391230800000 , "y":3.15}, { "x":1391230800000 , "y":2.88}, { "x":1391230800000 , "y":3.0}, { "x":1391230800000 , "y":4.0}, { "x":1393650000000 , "y":8.0}, { "x":1393650000000 , "y":3.93}, { "x":1393650000000 , "y":4.27}, { "x":1393650000000 , "y":4.0}, { "x":1396324800000 , "y":4.25}, { "x":1396324800000 , "y":5.35}, { "x":1396324800000 , "y":5.92}, { "x":1396324800000 , "y":12.0}, { "x":1398916800000 , "y":5.55}, { "x":1398916800000 , "y":4.89}, { "x":1398916800000 , "y":5.01}, { "x":1398916800000 , "y":3.27}, { "x":1401595200000 , "y":6.27}, { "x":1401595200000 , "y":9.17}, { "x":1401595200000 , "y":9.31}, { "x":1401595200000 , "y":6.07}, { "x":1404187200000 , "y":8.37}, { "x":1404187200000 , "y":8.11}, { "x":1404187200000 , "y":8.84}, { "x":1404187200000 , "y":8.93}, { "x":1406865600000 , "y":11.79}, { "x":1406865600000 , "y":12.22}, { "x":1406865600000 , "y":12.6}, { "x":1406865600000 , "y":11.61}, { "x":1409544000000 , "y":15.27}, { "x":1409544000000 , "y":19.09}, { "x":1409544000000 , "y":16.09}, { "x":1409544000000 , "y":18.66}, { "x":1412136000000 , "y":18.4}, { "x":1412136000000 , "y":22.05}, { "x":1412136000000 , "y":21.66}, { "x":1412136000000 , "y":19.04}, { "x":1414814400000 , "y":19.13}, { "x":1414814400000 , "y":19.61}, { "x":1414814400000 , "y":17.61}, { "x":1414814400000 , "y":17.5}, { "x":1417410000000 , "y":19.0}, { "x":1417410000000 , "y":15.73}, { "x":1420088400000 , "y":9.67}, { "x":1420088400000 , "y":15.19}, { "x":1420088400000 , "y":15.02}, { "x":1420088400000 , "y":9.62333333333333}, { "x":1422766800000 , "y":16.95}, { "x":1422766800000 , "y":14.29}, { "x":1425186000000 , "y":12.9}, { "x":1425186000000 , "y":16.1166666666667} ] } ,
- { "type":"line", "key": "ROUTER_CPU", "yAxis": "1","values": [{ "x":1388552400000 , "y":3.0}, { "x":1388552400000 , "y":4.0}, { "x":1388552400000 , "y":4.89}, { "x":1388552400000 , "y":7.0}, { "x":1391230800000 , "y":4.57}, { "x":1391230800000 , "y":4.0}, { "x":1391230800000 , "y":4.0}, { "x":1391230800000 , "y":7.0}, { "x":1393650000000 , "y":7.0}, { "x":1393650000000 , "y":4.18}, { "x":1393650000000 , "y":5.0}, { "x":1393650000000 , "y":5.0}, { "x":1396324800000 , "y":5.0}, { "x":1396324800000 , "y":5.0}, { "x":1396324800000 , "y":5.06}, { "x":1396324800000 , "y":6.0}, { "x":1398916800000 , "y":5.0}, { "x":1398916800000 , "y":5.0}, { "x":1398916800000 , "y":5.0}, { "x":1398916800000 , "y":5.0}, { "x":1401595200000 , "y":6.0}, { "x":1401595200000 , "y":6.09}, { "x":1401595200000 , "y":6.0}, { "x":1401595200000 , "y":6.0}, { "x":1404187200000 , "y":6.36}, { "x":1404187200000 , "y":7.0}, { "x":1404187200000 , "y":7.0}, { "x":1404187200000 , "y":7.0}, { "x":1406865600000 , "y":7.0}, { "x":1406865600000 , "y":7.02}, { "x":1406865600000 , "y":7.24}, { "x":1406865600000 , "y":7.0}, { "x":1409544000000 , "y":8.23}, { "x":1409544000000 , "y":8.11}, { "x":1409544000000 , "y":8.12}, { "x":1409544000000 , "y":8.03}, { "x":1412136000000 , "y":9.0}, { "x":1412136000000 , "y":8.93}, { "x":1412136000000 , "y":8.57}, { "x":1412136000000 , "y":9.0}, { "x":1414814400000 , "y":5.97}, { "x":1414814400000 , "y":6.0}, { "x":1414814400000 , "y":9.0}, { "x":1414814400000 , "y":9.0}, { "x":1417410000000 , "y":9.0}, { "x":1417410000000 , "y":8.78}, { "x":1420088400000 , "y":3.0}, { "x":1420088400000 , "y":2.01}, { "x":1420088400000 , "y":3.0}, { "x":1420088400000 , "y":3.01}, { "x":1422766800000 , "y":2.67}, { "x":1422766800000 , "y":2.0}, { "x":1425186000000 , "y":2.8}, { "x":1425186000000 , "y":3.63333333333333} ] } ,
- { "type":"line", "key": "SCTP_CPU", "yAxis": "1","values": [{ "x":1388552400000 , "y":7.0}, { "x":1388552400000 , "y":10.0}, { "x":1388552400000 , "y":8.27}, { "x":1388552400000 , "y":8.0}, { "x":1391230800000 , "y":10.02}, { "x":1391230800000 , "y":8.04}, { "x":1391230800000 , "y":9.0}, { "x":1391230800000 , "y":10.0}, { "x":1393650000000 , "y":12.0}, { "x":1393650000000 , "y":10.04}, { "x":1393650000000 , "y":11.16}, { "x":1393650000000 , "y":10.0}, { "x":1396324800000 , "y":10.7}, { "x":1396324800000 , "y":13.31}, { "x":1396324800000 , "y":12.73}, { "x":1396324800000 , "y":9.0}, { "x":1398916800000 , "y":12.41}, { "x":1398916800000 , "y":11.95}, { "x":1398916800000 , "y":12.82}, { "x":1398916800000 , "y":9.58}, { "x":1401595200000 , "y":11.28}, { "x":1401595200000 , "y":14.01}, { "x":1401595200000 , "y":14.63}, { "x":1401595200000 , "y":11.83}, { "x":1404187200000 , "y":14.06}, { "x":1404187200000 , "y":13.96}, { "x":1404187200000 , "y":14.66}, { "x":1404187200000 , "y":14.36}, { "x":1406865600000 , "y":16.6}, { "x":1406865600000 , "y":16.95}, { "x":1406865600000 , "y":17.11}, { "x":1406865600000 , "y":15.94}, { "x":1409544000000 , "y":19.86}, { "x":1409544000000 , "y":22.97}, { "x":1409544000000 , "y":21.56}, { "x":1409544000000 , "y":24.55}, { "x":1412136000000 , "y":22.66}, { "x":1412136000000 , "y":26.79}, { "x":1412136000000 , "y":26.54}, { "x":1412136000000 , "y":25.35}, { "x":1414814400000 , "y":21.0}, { "x":1414814400000 , "y":20.35}, { "x":1414814400000 , "y":21.93}, { "x":1414814400000 , "y":23.63}, { "x":1417410000000 , "y":24.0}, { "x":1417410000000 , "y":21.43}, { "x":1420088400000 , "y":12.63}, { "x":1420088400000 , "y":25.14}, { "x":1420088400000 , "y":21.85}, { "x":1420088400000 , "y":12.5766666666667}, { "x":1422766800000 , "y":26.3}, { "x":1422766800000 , "y":24.4}, { "x":1425186000000 , "y":23.3833333333333}, { "x":1425186000000 , "y":24.5833333333333} ] } ,
- { "type":"line", "key": "DP_CPU", "yAxis": "1","values": [{ "x":1388552400000 , "y":2.0}, { "x":1388552400000 , "y":5.0}, { "x":1388552400000 , "y":2.17}, { "x":1388552400000 , "y":2.0}, { "x":1391230800000 , "y":3.01}, { "x":1391230800000 , "y":2.56}, { "x":1391230800000 , "y":3.0}, { "x":1391230800000 , "y":9.0}, { "x":1393650000000 , "y":10.0}, { "x":1393650000000 , "y":3.64}, { "x":1393650000000 , "y":4.06}, { "x":1393650000000 , "y":4.0}, { "x":1396324800000 , "y":4.04}, { "x":1396324800000 , "y":5.11}, { "x":1396324800000 , "y":5.9}, { "x":1396324800000 , "y":8.0}, { "x":1398916800000 , "y":5.08}, { "x":1398916800000 , "y":4.65}, { "x":1398916800000 , "y":4.74}, { "x":1398916800000 , "y":2.98}, { "x":1401595200000 , "y":6.13}, { "x":1401595200000 , "y":8.98}, { "x":1401595200000 , "y":9.22}, { "x":1401595200000 , "y":5.84}, { "x":1404187200000 , "y":8.12}, { "x":1404187200000 , "y":7.89}, { "x":1404187200000 , "y":8.41}, { "x":1404187200000 , "y":8.47}, { "x":1406865600000 , "y":11.06}, { "x":1406865600000 , "y":11.84}, { "x":1406865600000 , "y":11.92}, { "x":1406865600000 , "y":10.8}, { "x":1409544000000 , "y":14.58}, { "x":1409544000000 , "y":18.39}, { "x":1409544000000 , "y":15.5}, { "x":1409544000000 , "y":18.33}, { "x":1412136000000 , "y":18.01}, { "x":1412136000000 , "y":21.3}, { "x":1412136000000 , "y":21.11}, { "x":1412136000000 , "y":18.37}, { "x":1414814400000 , "y":18.59}, { "x":1414814400000 , "y":18.81}, { "x":1414814400000 , "y":17.13}, { "x":1414814400000 , "y":16.92}, { "x":1417410000000 , "y":18.0}, { "x":1417410000000 , "y":15.18}, { "x":1420088400000 , "y":9.16}, { "x":1420088400000 , "y":12.13}, { "x":1420088400000 , "y":11.76}, { "x":1420088400000 , "y":9.31}, { "x":1422766800000 , "y":13.47}, { "x":1422766800000 , "y":13.41}, { "x":1425186000000 , "y":12.2333333333333}, { "x":1425186000000 , "y":12.4} ] }
-];
-
-</script>
-<script src="js/area_chart.min.js"></script>
-</body> </html> \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/sample/html/bar_chart.html b/ecomp-portal-BE/war/static/fusion/sample/html/bar_chart.html
deleted file mode 100644
index 0be16ec1..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/html/bar_chart.html
+++ /dev/null
@@ -1,95 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta http-equiv="content-type" content="text/html; charset=UTF8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge" />
-<link href="../../d3/css/nv.d3.css" rel="stylesheet" type="text/css">
-<style>
- body {
- overflow-y:scroll;
- }
- text {
- font: 12px sans-serif;
- }
- svg {
- display: block;
- }
- #chart461 svg {
- height: 420px;
- width: 700px;
- min-width: 100px;
- min-height: 100px;
- }
- tr.z-row-over > td.z-row-inner, tr.z-row-over > .z-cell { background-color: rgb(255, 255, 255); }
-.nodatadiv {
- display: table-cell;
- width: 700px;
- height:370px;
- text-align:center;
- vertical-align: middle;
-}
-.nodatainner {
- padding: 10px;
-}
- </style>
-<body>
-<div align="center"><H3></H3></div><div id="chart461"> <svg></svg> </div>
-<script src="../../d3/js/d3.v3.min.js"></script>
-<script src="../../d3/js/nv.d3.min.js"></script>
-<script src="../../d3/js/tooltip.js"></script>
-<script src="../../d3/js/utils.js"></script>
-<script src="../../d3/js/models/axis.min.js"></script>
-<script src="../../d3/js/models/multiChart.js"></script>
-<script>
-historicalBarChart = [
- { "type":"bar", "key": "AP_CPU", "yAxis": "1", "values": [{ "x":1388552400000 , "y":10}, { "x":1391230800000 , "y":4}, { "x":1393650000000 , "y":4}, { "x":1396324800000 , "y":12}, { "x":1398916800000 , "y":3.27}, { "x":1401595200000 , "y":6.07}, { "x":1404187200000 , "y":8.93}, { "x":1406865600000 , "y":11.61}, { "x":1409544000000 , "y":18.66}, { "x":1412136000000 , "y":19.04}, { "x":1414814400000 , "y":17.5}, { "x":1417410000000 , "y":15.73}, { "x":1420088400000 , "y":9.62333333333333}, { "x":1422766800000 , "y":14.29}, { "x":1425186000000 , "y":16.1166666666667} ] } ,
- { "type":"bar", "key": "ROUTER_CPU", "yAxis": "1", "values": [{ "x":1388552400000 , "y":7}, { "x":1391230800000 , "y":7}, { "x":1393650000000 , "y":5}, { "x":1396324800000 , "y":6}, { "x":1398916800000 , "y":5}, { "x":1401595200000 , "y":6}, { "x":1404187200000 , "y":7}, { "x":1406865600000 , "y":7}, { "x":1409544000000 , "y":8.03}, { "x":1412136000000 , "y":9}, { "x":1414814400000 , "y":9}, { "x":1417410000000 , "y":8.78}, { "x":1420088400000 , "y":3.01}, { "x":1422766800000 , "y":2}, { "x":1425186000000 , "y":3.63333333333333} ] } ,
- { "type":"bar", "key": "SCTP_CPU", "yAxis": "1", "values": [{ "x":1388552400000 , "y":8}, { "x":1391230800000 , "y":10}, { "x":1393650000000 , "y":10}, { "x":1396324800000 , "y":9}, { "x":1398916800000 , "y":9.58}, { "x":1401595200000 , "y":11.83}, { "x":1404187200000 , "y":14.36}, { "x":1406865600000 , "y":15.94}, { "x":1409544000000 , "y":24.55}, { "x":1412136000000 , "y":25.35}, { "x":1414814400000 , "y":23.63}, { "x":1417410000000 , "y":21.43}, { "x":1420088400000 , "y":12.5766666666667}, { "x":1422766800000 , "y":24.4}, { "x":1425186000000 , "y":24.5833333333333} ] } ,
- { "type":"bar", "key": "DP_CPU", "yAxis": "1", "values": [{ "x":1388552400000 , "y":2}, { "x":1391230800000 , "y":9}, { "x":1393650000000 , "y":4}, { "x":1396324800000 , "y":8}, { "x":1398916800000 , "y":2.98}, { "x":1401595200000 , "y":5.84}, { "x":1404187200000 , "y":8.47}, { "x":1406865600000 , "y":10.8}, { "x":1409544000000 , "y":18.33}, { "x":1412136000000 , "y":18.37}, { "x":1414814400000 , "y":16.92}, { "x":1417410000000 , "y":15.18}, { "x":1420088400000 , "y":9.31}, { "x":1422766800000 , "y":13.41}, { "x":1425186000000 , "y":12.4} ] }
-];
-var chart;
-nv.addGraph(function() {
- chart = nv.models.multiBarChart()
- .margin({top: 30, right: 60, bottom: 50, left: 100})
- .showLegend(true)
- .reduceXTicks(false)
- .forceY([0, 34.0])
- .showControls(true)
- .stacked(false)
- .logScale(false)
- .legendPos('top')
- .color(d3.scale.category10().range());
- chart.xAxis
- .tickValues([1388552400000,1391230800000,1393650000000,1396324800000,1398916800000,1401595200000,1404187200000,1406865600000,1409544000000,1412136000000,1414814400000,1417410000000,1420088400000,1422766800000])
- .staggerLabels(false)
- .showMaxMin(false)
- .rotateLabels(90)
- .axisLabel('Timestamp')
- .tickFormat(function(d) {
- return d3.time.format('%b %y')(new Date(d)) });
- chart.yAxis
- .logScale(false)
- .axisLabel('')
- .tickFormat(d3.format(',.1f'));
- d3.select('#chart461 svg')
- .datum(historicalBarChart)
- .transition().duration(1000)
- .call(chart);
-nv.utils.windowResize(chart.update);
-return chart;
-});
-function redraw() {
- d3.select('#chart461 svg')
- .datum(historicalBarChart)
- .transition().duration(500)
- .call(chart);
-}
-
- setInterval(function () {
- redraw();
- }, 1500)
-if(historicalBarChart.length <= 0 ) {
- document.getElementById("chart461").innerHTML = "<div id='noData'><b>No Data Available</b></div>";
- document.getElementById("chart461").className="nodatadiv";
- document.getElementById("nodata").className="nodatainner";
-}
-</script> </body></html> \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/sample/html/d3_gauges_demo.html b/ecomp-portal-BE/war/static/fusion/sample/html/d3_gauges_demo.html
deleted file mode 100644
index 94596e73..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/html/d3_gauges_demo.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
- <head>
- <meta http-equiv="content-type" content="text/html;charset=utf-8">
- <title>d3.js gauges</title>
-
- <style>
-
- body
- {
- font: 10px arial;
- }
-
- </style>
-
- <script src="../../d3/js/d3.v3.min.js" charset="utf-8"></script>
-
-
- <script>
-
- var dataURL = "data/speedometer2.csv";
- var gauges = [];
- var recordLength = 0;
- var dataset ;
-
- </script>
- <script type="text/javascript" src="js/gauges.min.js"></script>
-
- </head>
-
- <body onload="initialize()">
- <span id="Bedminster"></span>
- <span id="Piscataway"></span>
- <br/>
- <span id="Middletown"></span>
- <span id="Paramus"></span>
- </body>
-
-</html> \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/sample/html/data/speedometer2.csv b/ecomp-portal-BE/war/static/fusion/sample/html/data/speedometer2.csv
deleted file mode 100644
index 406143ea..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/html/data/speedometer2.csv
+++ /dev/null
@@ -1,16 +0,0 @@
-"YEARMONTH","Bedminster","Piscataway","Middletown","Paramus"
-"201401",8.27,4.89,2.36,2.17
-"201402",10.02,4.57,3.15,3.01
-"201403",11.16,5.00,4.27,4.06
-"201404",13.31,5.00,5.35,5.11
-"201405",12.82,5.00,5.01,4.74
-"201406",14.01,6.09,9.17,8.98
-"201407",14.66,7.00,8.84,8.41
-"201408",16.95,7.02,12.22,11.84
-"201409",21.56,8.12,16.09,15.50
-"201410",25.35,9.00,19.04,18.37
-"201411",21.93,9.00,17.61,17.13
-"201412",24.00,9.00,19.00,18.00
-"201501",25.14,2.01,15.19,12.13
-"201502",26.30,2.67,16.95,13.47
-"201503",26.5833333333333,45.63333333333333,16.1166666666667,12.40
diff --git a/ecomp-portal-BE/war/static/fusion/sample/html/data/speedometer3.csv b/ecomp-portal-BE/war/static/fusion/sample/html/data/speedometer3.csv
deleted file mode 100644
index 046383e4..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/html/data/speedometer3.csv
+++ /dev/null
@@ -1,2 +0,0 @@
-"YEARMONTH","Bedminster","Piscataway","Middletown","Paramus"
-"201401",8.27,4.89,2.36,2.17 \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/sample/html/data/worddata.csv b/ecomp-portal-BE/war/static/fusion/sample/html/data/worddata.csv
deleted file mode 100644
index 6a74cded..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/html/data/worddata.csv
+++ /dev/null
@@ -1,22 +0,0 @@
-text,frequency
-video,100
-Domain 2.0,75
-spectrum,60
-4GLTE,60
-research,50
-UVerse,60
-DirectTV,30
-Iusacell,89
-Gamma,79
-BigData,55
-RCloud,45
-Raptor,20
-SDN,50
-NFV,50
-ASC,70
-AVPN,40
-Web-RTC,68
-MIS,40
-UDNC,30
-3G,30
-2G,10 \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/sample/html/donut_d3.html b/ecomp-portal-BE/war/static/fusion/sample/html/donut_d3.html
deleted file mode 100644
index afcac359..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/html/donut_d3.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<style>
-
-body {
- font: 10px sans-serif;
-}
-
-svg {
- padding: 10px 0 0 10px;
-}
-
-.arc {
- stroke: #fff;
-}
-
- .slice text {
- font-size: 16pt;
- font-family: Arial;
- }
-</style>
-<body>
-<script src="../../d3/js/d3.js"></script>
-
-<script>
-
-var radius = 74,
- padding = 10;
-
-var width = 200,
- height = 200;
-
-var outerRadius = height / 2 - 20,
- innerRadius = outerRadius / 3,
- cornerRadius = 10;
-//var color = d3.scale.ordinal()
- // .range(["#98abc5", "#8a89a6", "#7b6888", "#6b486b", "#a05d56", "#d0743c", "#ff8c00"]);
- var color = d3.scale.category10();
- var dataURL = "data/speedometer3.csv";
-
-
-</script>
-<script src="js/donut.min.js"></script> \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/sample/html/js/area_chart.min.js b/ecomp-portal-BE/war/static/fusion/sample/html/js/area_chart.min.js
deleted file mode 100644
index be3a26a1..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/html/js/area_chart.min.js
+++ /dev/null
@@ -1 +0,0 @@
-function redraw(){d3.select("#chart461 svg").datum(historicalBarChart).transition().duration(500).call(chart)}var chart;nv.addGraph(function(){return chart=nv.models.stackedAreaChart().showControls(!1).margin({top:30,right:60,bottom:50,left:100}).showLegend(!1).yAxisTooltipFormat(d3.format(",.1f")).x(function(t){return t.x}).y(function(t){return t.y}).color(d3.scale.category10().range()),chart.xAxis.axisLabel("").staggerLabels(!1).showMaxMin(!1).rotateLabels(90).tickFormat(function(t){return d3.time.format("%b %y")(new Date(t))}),chart.yAxis.axisLabel("").tickFormat(d3.format(",.1f")),d3.select("#chart461 svg").datum(historicalBarChart).transition().duration(1e3).call(chart),nv.utils.windowResize(chart.update),chart}),setInterval(function(){redraw()},1500),historicalBarChart.length<=0&&(document.getElementById("chart461").innerHTML="<div id='noData'><b>No Data Available</b></div>",document.getElementById("chart461").className="nodatadiv",document.getElementById("nodata").className="nodatainner"); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/sample/html/js/donut.min.js b/ecomp-portal-BE/war/static/fusion/sample/html/js/donut.min.js
deleted file mode 100644
index 60c4fd4b..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/html/js/donut.min.js
+++ /dev/null
@@ -1 +0,0 @@
-function angle(t){var e=90*(t.startAngle+t.endAngle)/Math.PI-90;return e>90?e-180:e}function arcTween(t,e){return function(){d3.select(this).transition().delay(e).attrTween("d",function(e){var r=d3.interpolate(e.outerRadius,t);return function(t){return e.outerRadius=r(t),arc(e)}})}}var arc=d3.svg.arc().padRadius(outerRadius).innerRadius(innerRadius),pie=d3.layout.pie().sort(null).padAngle(.02).value(function(t){return t.performance});d3.csv(dataURL,function(t,e){color.domain(d3.keys(e[0]).filter(function(t){return"YEARMONTH"!==t})),e.forEach(function(t){t.performance=color.domain().map(function(e){return{name:e,performance:+t[e]}})});var r=d3.select("body").append("svg").attr("class","legend").attr("width",radius).attr("height",2*radius).selectAll("g").data(color.domain().slice().reverse()).enter().append("g").attr("transform",function(t,e){return"translate(0,"+20*e+")"});r.append("rect").attr("width",18).attr("height",18).style("fill",color),r.append("text").attr("x",24).attr("y",9).attr("dy",".35em").text(function(t){return t});var a=d3.select("body").append("svg").attr("width",width).attr("height",height).data(e).append("g").attr("transform","translate("+radius+","+height/2+")"),n=a.selectAll("g.slice").data(function(t){return pie(t.performance)}).enter().append("g").attr("class","slice");n.append("path").each(function(t){t.outerRadius=outerRadius-10}).attr("class","arc").attr("d",arc).style("fill",function(t){return color(t.data.name)}).on("mouseover",arcTween(outerRadius,0)).on("mouseout",arcTween(outerRadius-10,150)),n.append("text").attr("dy",".35em").attr("transform",function(t){return t.outerRadius=outerRadius,t.innerRadius=outerRadius/2,"translate("+arc.centroid(t)+")rotate("+angle(t)+")"}).attr("text-anchor","middle").style("fill","white").style("font","bold 12px Arial").text(function(t){return t.value}),a.append("text").attr("dy",".35em").style("text-anchor","middle").text(function(t){return t.YEARMONTH})}); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/sample/html/js/gauges.min.js b/ecomp-portal-BE/war/static/fusion/sample/html/js/gauges.min.js
deleted file mode 100644
index c0fd7484..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/html/js/gauges.min.js
+++ /dev/null
@@ -1 +0,0 @@
-function Gauge(t,i){this.placeholderName=t;var n=this;this.configure=function(t){this.config=t,this.config.size=.9*this.config.size,this.config.raduis=.97*this.config.size/2,this.config.cx=this.config.size/2,this.config.cy=this.config.size/2,this.config.min=void 0!=t.min?t.min:0,this.config.max=void 0!=t.max?t.max:100,this.config.range=this.config.max-this.config.min,this.config.majorTicks=t.majorTicks||5,this.config.minorTicks=t.minorTicks||2,this.config.greenColor=t.greenColor||"#109618",this.config.yellowColor=t.yellowColor||"#FF9900",this.config.redColor=t.redColor||"#DC3912",this.config.transitionDuration=t.transitionDuration||500},this.render=function(){this.body=d3.select("#"+this.placeholderName).append("svg:svg").attr("class","gauge").attr("width",this.config.size).attr("height",this.config.size),this.body.append("svg:circle").attr("cx",this.config.cx).attr("cy",this.config.cy).attr("r",this.config.raduis).style("fill","#ccc").style("stroke","#000").style("stroke-width","0.5px"),this.body.append("svg:circle").attr("cx",this.config.cx).attr("cy",this.config.cy).attr("r",.9*this.config.raduis).style("fill","#fff").style("stroke","#e0e0e0").style("stroke-width","2px");for(var t in this.config.greenZones)this.drawBand(this.config.greenZones[t].from,this.config.greenZones[t].to,n.config.greenColor);for(var t in this.config.yellowZones)this.drawBand(this.config.yellowZones[t].from,this.config.yellowZones[t].to,n.config.yellowColor);for(var t in this.config.redZones)this.drawBand(this.config.redZones[t].from,this.config.redZones[t].to,n.config.redColor);if(void 0!=this.config.label){var i=Math.round(this.config.size/12);this.body.append("svg:text").attr("x",this.config.cx).attr("y",this.config.cy/2+i/2).attr("dy",i/2).attr("text-anchor","middle").text(this.config.label).style("font-size",i+"px").style("fill","#333").style("stroke-width","0px")}for(var i=Math.round(this.config.size/16),e=this.config.range/(this.config.majorTicks-1),o=this.config.min;o<=this.config.max;o+=e){for(var a=e/this.config.minorTicks,r=o+a;r<Math.min(o+e,this.config.max);r+=a){var s=this.valueToPoint(r,.75),c=this.valueToPoint(r,.85);this.body.append("svg:line").attr("x1",s.x).attr("y1",s.y).attr("x2",c.x).attr("y2",c.y).style("stroke","#666").style("stroke-width","1px")}var s=this.valueToPoint(o,.7),c=this.valueToPoint(o,.85);if(this.body.append("svg:line").attr("x1",s.x).attr("y1",s.y).attr("x2",c.x).attr("y2",c.y).style("stroke","#333").style("stroke-width","2px"),o==this.config.min||o==this.config.max){var g=this.valueToPoint(o,.63);this.body.append("svg:text").attr("x",g.x).attr("y",g.y).attr("dy",i/3).attr("text-anchor",o==this.config.min?"start":"end").text(o).style("font-size",i+"px").style("fill","#333").style("stroke-width","0px")}}var f=this.body.append("svg:g").attr("class","pointerContainer"),h=(this.config.min+this.config.max)/2,l=this.buildPointerPath(h),d=d3.svg.line().x(function(t){return t.x}).y(function(t){return t.y}).interpolate("basis");f.selectAll("path").data([l]).enter().append("svg:path").attr("d",d).style("fill","#dc3912").style("stroke","#c63310").style("fill-opacity",.7),f.append("svg:circle").attr("cx",this.config.cx).attr("cy",this.config.cy).attr("r",.12*this.config.raduis).style("fill","#4684EE").style("stroke","#666").style("opacity",1);var i=Math.round(this.config.size/10);f.selectAll("text").data([h]).enter().append("svg:text").attr("x",this.config.cx).attr("y",this.config.size-this.config.cy/4-i).attr("dy",i/2).attr("text-anchor","middle").style("font-size",i+"px").style("fill","#000").style("stroke-width","0px"),this.redraw(this.config.min,0)},this.buildPointerPath=function(t){function i(t,i){var e=n.valueToPoint(t,i);return e.x-=n.config.cx,e.y-=n.config.cy,e}var e=this.config.range/13,o=i(t,.85),a=i(t-e,.12),r=i(t+e,.12),s=t-this.config.range*(1/.75)/2,c=i(s,.28),g=i(s-e,.12),f=i(s+e,.12);return[o,a,f,c,g,r,o]},this.drawBand=function(t,i,e){0>=i-t||this.body.append("svg:path").style("fill",e).attr("d",d3.svg.arc().startAngle(this.valueToRadians(t)).endAngle(this.valueToRadians(i)).innerRadius(.65*this.config.raduis).outerRadius(.85*this.config.raduis)).attr("transform",function(){return"translate("+n.config.cx+", "+n.config.cy+") rotate(270)"})},this.redraw=function(t,i,e){var o=this.body.select(".pointerContainer"),a=o.selectAll("text");y=a.attr("y"),dy=parseFloat(a.attr("dy")),a.selectAll("tspan").remove(),a.append("tspan").attr("x",45).attr("dy",0).text(Math.round(t)),a.append("tspan").attr("x",45).attr("dy",10).text(i),o.selectAll("text").style("fill",function(){var i=n.config.max-n.config.min;return Math.round(t)>.9*i?"#DC3912":Math.round(t)>.5*i&&Math.round(t)<.9*i?"#FF9900":"#000000"});var r=o.selectAll("path");r.transition().duration(void 0!=e?e:this.config.transitionDuration).attrTween("transform",function(){var i=t;t>n.config.max?i=n.config.max+.02*n.config.range:t<n.config.min&&(i=n.config.min-.02*n.config.range);var e=n.valueToDegrees(i)-90,o=n._currentRotation||e;return n._currentRotation=e,function(t){var i=o+(e-o)*t;return"translate("+n.config.cx+", "+n.config.cy+") rotate("+i+")"}})},this.valueToDegrees=function(t){return t/this.config.range*270-(this.config.min/this.config.range*270+45)},this.valueToRadians=function(t){return this.valueToDegrees(t)*Math.PI/180},this.valueToPoint=function(t,i){return{x:this.config.cx-this.config.raduis*i*Math.cos(this.valueToRadians(t)),y:this.config.cy-this.config.raduis*i*Math.sin(this.valueToRadians(t))}},this.configure(i)}function createGauge(t,i,n,e){var o={size:100,label:i,min:void 0!=n?n:0,max:void 0!=e?e:100,minorTicks:5},a=o.max-o.min;o.yellowZones=[{from:o.min+.5*a,to:o.min+.9*a}],o.redZones=[{from:o.min+.9*a,to:o.max}],gauges[t]=new Gauge(t,o),gauges[t].render()}function createGauges(){createGauge("Bedminster","Bedminster",0,50),createGauge("Piscataway","Piscataway",0,50),createGauge("Middletown","Middletown",0,50),createGauge("Paramus","Paramus",0,50)}function updateGauges(t){for(var i in gauges){var n=getValue(i,t),e=getDate1(i,t);n&&gauges[i].redraw(n,e,100)}}function getValue(gauge_id,index){var d=dataset[index];return eval("d."+gauge_id)}function getDate1(t,i){var n=dataset[i];return n.YEARMONTH}function getROUTER_CPU_Value(t){d3.csv(dataURL,function(i){i.forEach(function(i,n){return n==t?i.ROUTER_CPU:void 0})})}function getAP_CPU_Value(t){d3.csv(dataURL,function(i){i.forEach(function(i,n){return n==t?i.AP_CPU:void 0})})}function updateData(){for(var t=0;t<recordLength;t++);}function initialize(){createGauges(),d3.csv(dataURL,function(t){dataset=t,recordLength=t.length,dataset.some(function(t,i){return 1==i?(updateGauges(i),1==i):void 0});var i=1e3,n=2,e=function(){return function(){return updateGauges(n++),n<recordLength?(d3.timer(e(),i),!0):(n=0,d3.timer(e(),i),!0)}};d3.timer(e(),i)})} \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/sample/html/js/line_chart.min.js b/ecomp-portal-BE/war/static/fusion/sample/html/js/line_chart.min.js
deleted file mode 100644
index d514d114..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/html/js/line_chart.min.js
+++ /dev/null
@@ -1 +0,0 @@
-function redraw(){d3.select("#chart461 svg").datum(historicalBarChart).transition().duration(500).call(chart)}var chart;nv.addGraph(function(){return chart=nv.models.multiChart().dualaxis(!1).legendPos("top").margin({top:30,right:60,bottom:50,left:100}).showLegend(!1).color(d3.scale.category10().range()),chart.lines1.forceY([0,34]),chart.lines2.forceY([0,1]),chart.xAxis.axisLabel("").staggerLabels(!1).showMaxMin(!1).rotateLabels(90).tickFormat(function(a){return d3.time.format("%b %y")(new Date(a))}),chart.yAxis1.axisLabel("").tickFormat(d3.format(",.1f")),d3.select("#chart461 svg").datum(historicalBarChart).transition().duration(1e3).call(chart),nv.utils.windowResize(chart.update),chart}),setInterval(function(){redraw()},1500),historicalBarChart.length<=0&&(document.getElementById("chart461").innerHTML="<div id='noData'><b>No Data Available</b></div>",document.getElementById("chart461").className="nodatadiv",document.getElementById("nodata").className="nodatainner"); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/sample/html/js/pie_chart.min.js b/ecomp-portal-BE/war/static/fusion/sample/html/js/pie_chart.min.js
deleted file mode 100644
index f78eec70..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/html/js/pie_chart.min.js
+++ /dev/null
@@ -1 +0,0 @@
-function redraw(){d3.select("#chart423 svg").datum(historicalBarChart).transition().duration(500).call(chart)}var chart;nv.addGraph(function(){return chart=nv.models.pieChart().margin({top:30,right:60,bottom:50,left:100}).x(function(t){return t.key}).y(function(t){return t.y}),chart.showLegend(!1),d3.select("#chart423 svg").datum(historicalBarChart).transition().duration(1200).call(chart),nv.utils.windowResize(chart.update),chart}),setInterval(function(){redraw()},1500),historicalBarChart.length<=0&&(document.getElementById("chart423").innerHTML="<div id='noData'><b>No Data Available</b></div>",document.getElementById("chart423").className="nodatadiv",document.getElementById("nodata").className="nodatainner"); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/sample/html/js/worddata.min.js b/ecomp-portal-BE/war/static/fusion/sample/html/js/worddata.min.js
deleted file mode 100644
index 6b827460..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/html/js/worddata.min.js
+++ /dev/null
@@ -1 +0,0 @@
-function dataViz(t){function e(t){var e=d3.select("svg").append("g").attr("id","wordCloudG").attr("transform","translate(210,175)");e.selectAll("text").data(t).enter().append("text").style("font-size",function(t){return 1*t.size+"px"}).style("fill",function(t){return keywords.indexOf(t.text)>-1?"red":"black"}).style("opacity",.75).attr("text-anchor","middle").attr("transform",function(t){return"translate("+[t.x,t.y]+")rotate("+t.rotate+")"}).text(function(t){return t.text})}d3.layout.cloud().size([420,350]).words(t).rotate(function(t){return t.text.length>5?0:90}).fontSize(function(t){return wordScale(t.frequency)}).on("end",e).start()}d3.csv(dataURL,function(t){dataViz(t)}),wordScale=d3.scale.linear().domain([0,100]).range([0,70]).clamp(!0); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/sample/html/line_chart.html b/ecomp-portal-BE/war/static/fusion/sample/html/line_chart.html
deleted file mode 100644
index d4ba57a4..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/html/line_chart.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta http-equiv="content-type" content="text/html; charset=UTF8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge" />
-<link href="../../d3/css/nv.d3.css" rel="stylesheet" type="text/css">
-<style>
- body {
- overflow-y:scroll;
- }
- text {
- font: 12px sans-serif;
- }
- svg {
- display: block;
- }
- #chart461 svg {
- height: 175px;
- width: 300px;
- min-width: 100px;
- min-height: 100px;
- }
- tr.z-row-over > td.z-row-inner, tr.z-row-over > .z-cell { background-color: rgb(255, 255, 255); }
-.nodatadiv {
- display: table-cell;
- width: 700px;
- height:370px;
- text-align:center;
- vertical-align: middle;
-}
-.nodatainner {
- padding: 10px;
-}
- </style>
-<body>
-<div align="center"><H3></H3></div><div id="chart461"> <svg></svg> </div>
-<script src="../../d3/js/d3.v3.min.js"></script>
-<script src="../../d3/js/nv.d3.min.js"></script>
-<script src="../../d3/js/models/axis.min.js"></script>
-<script>
-historicalBarChart = [
- { "type":"line", "key": "AP_CPU", "yAxis": "1","values": [{ "x":1388552400000 , "y":2.13}, { "x":1388552400000 , "y":5.0}, { "x":1388552400000 , "y":2.36}, { "x":1388552400000 , "y":10.0}, { "x":1391230800000 , "y":3.15}, { "x":1391230800000 , "y":2.88}, { "x":1391230800000 , "y":3.0}, { "x":1391230800000 , "y":4.0}, { "x":1393650000000 , "y":8.0}, { "x":1393650000000 , "y":3.93}, { "x":1393650000000 , "y":4.27}, { "x":1393650000000 , "y":4.0}, { "x":1396324800000 , "y":4.25}, { "x":1396324800000 , "y":5.35}, { "x":1396324800000 , "y":5.92}, { "x":1396324800000 , "y":12.0}, { "x":1398916800000 , "y":5.55}, { "x":1398916800000 , "y":4.89}, { "x":1398916800000 , "y":5.01}, { "x":1398916800000 , "y":3.27}, { "x":1401595200000 , "y":6.27}, { "x":1401595200000 , "y":9.17}, { "x":1401595200000 , "y":9.31}, { "x":1401595200000 , "y":6.07}, { "x":1404187200000 , "y":8.37}, { "x":1404187200000 , "y":8.11}, { "x":1404187200000 , "y":8.84}, { "x":1404187200000 , "y":8.93}, { "x":1406865600000 , "y":11.79}, { "x":1406865600000 , "y":12.22}, { "x":1406865600000 , "y":12.6}, { "x":1406865600000 , "y":11.61}, { "x":1409544000000 , "y":15.27}, { "x":1409544000000 , "y":19.09}, { "x":1409544000000 , "y":16.09}, { "x":1409544000000 , "y":18.66}, { "x":1412136000000 , "y":18.4}, { "x":1412136000000 , "y":22.05}, { "x":1412136000000 , "y":21.66}, { "x":1412136000000 , "y":19.04}, { "x":1414814400000 , "y":19.13}, { "x":1414814400000 , "y":19.61}, { "x":1414814400000 , "y":17.61}, { "x":1414814400000 , "y":17.5}, { "x":1417410000000 , "y":19.0}, { "x":1417410000000 , "y":15.73}, { "x":1420088400000 , "y":9.67}, { "x":1420088400000 , "y":15.19}, { "x":1420088400000 , "y":15.02}, { "x":1420088400000 , "y":9.62333333333333}, { "x":1422766800000 , "y":16.95}, { "x":1422766800000 , "y":14.29}, { "x":1425186000000 , "y":12.9}, { "x":1425186000000 , "y":16.1166666666667} ] } ,
- { "type":"line", "key": "ROUTER_CPU", "yAxis": "1","values": [{ "x":1388552400000 , "y":3.0}, { "x":1388552400000 , "y":4.0}, { "x":1388552400000 , "y":4.89}, { "x":1388552400000 , "y":7.0}, { "x":1391230800000 , "y":4.57}, { "x":1391230800000 , "y":4.0}, { "x":1391230800000 , "y":4.0}, { "x":1391230800000 , "y":7.0}, { "x":1393650000000 , "y":7.0}, { "x":1393650000000 , "y":4.18}, { "x":1393650000000 , "y":5.0}, { "x":1393650000000 , "y":5.0}, { "x":1396324800000 , "y":5.0}, { "x":1396324800000 , "y":5.0}, { "x":1396324800000 , "y":5.06}, { "x":1396324800000 , "y":6.0}, { "x":1398916800000 , "y":5.0}, { "x":1398916800000 , "y":5.0}, { "x":1398916800000 , "y":5.0}, { "x":1398916800000 , "y":5.0}, { "x":1401595200000 , "y":6.0}, { "x":1401595200000 , "y":6.09}, { "x":1401595200000 , "y":6.0}, { "x":1401595200000 , "y":6.0}, { "x":1404187200000 , "y":6.36}, { "x":1404187200000 , "y":7.0}, { "x":1404187200000 , "y":7.0}, { "x":1404187200000 , "y":7.0}, { "x":1406865600000 , "y":7.0}, { "x":1406865600000 , "y":7.02}, { "x":1406865600000 , "y":7.24}, { "x":1406865600000 , "y":7.0}, { "x":1409544000000 , "y":8.23}, { "x":1409544000000 , "y":8.11}, { "x":1409544000000 , "y":8.12}, { "x":1409544000000 , "y":8.03}, { "x":1412136000000 , "y":9.0}, { "x":1412136000000 , "y":8.93}, { "x":1412136000000 , "y":8.57}, { "x":1412136000000 , "y":9.0}, { "x":1414814400000 , "y":5.97}, { "x":1414814400000 , "y":6.0}, { "x":1414814400000 , "y":9.0}, { "x":1414814400000 , "y":9.0}, { "x":1417410000000 , "y":9.0}, { "x":1417410000000 , "y":8.78}, { "x":1420088400000 , "y":3.0}, { "x":1420088400000 , "y":2.01}, { "x":1420088400000 , "y":3.0}, { "x":1420088400000 , "y":3.01}, { "x":1422766800000 , "y":2.67}, { "x":1422766800000 , "y":2.0}, { "x":1425186000000 , "y":2.8}, { "x":1425186000000 , "y":3.63333333333333} ] } ,
- { "type":"line", "key": "SCTP_CPU", "yAxis": "1","values": [{ "x":1388552400000 , "y":7.0}, { "x":1388552400000 , "y":10.0}, { "x":1388552400000 , "y":8.27}, { "x":1388552400000 , "y":8.0}, { "x":1391230800000 , "y":10.02}, { "x":1391230800000 , "y":8.04}, { "x":1391230800000 , "y":9.0}, { "x":1391230800000 , "y":10.0}, { "x":1393650000000 , "y":12.0}, { "x":1393650000000 , "y":10.04}, { "x":1393650000000 , "y":11.16}, { "x":1393650000000 , "y":10.0}, { "x":1396324800000 , "y":10.7}, { "x":1396324800000 , "y":13.31}, { "x":1396324800000 , "y":12.73}, { "x":1396324800000 , "y":9.0}, { "x":1398916800000 , "y":12.41}, { "x":1398916800000 , "y":11.95}, { "x":1398916800000 , "y":12.82}, { "x":1398916800000 , "y":9.58}, { "x":1401595200000 , "y":11.28}, { "x":1401595200000 , "y":14.01}, { "x":1401595200000 , "y":14.63}, { "x":1401595200000 , "y":11.83}, { "x":1404187200000 , "y":14.06}, { "x":1404187200000 , "y":13.96}, { "x":1404187200000 , "y":14.66}, { "x":1404187200000 , "y":14.36}, { "x":1406865600000 , "y":16.6}, { "x":1406865600000 , "y":16.95}, { "x":1406865600000 , "y":17.11}, { "x":1406865600000 , "y":15.94}, { "x":1409544000000 , "y":19.86}, { "x":1409544000000 , "y":22.97}, { "x":1409544000000 , "y":21.56}, { "x":1409544000000 , "y":24.55}, { "x":1412136000000 , "y":22.66}, { "x":1412136000000 , "y":26.79}, { "x":1412136000000 , "y":26.54}, { "x":1412136000000 , "y":25.35}, { "x":1414814400000 , "y":21.0}, { "x":1414814400000 , "y":20.35}, { "x":1414814400000 , "y":21.93}, { "x":1414814400000 , "y":23.63}, { "x":1417410000000 , "y":24.0}, { "x":1417410000000 , "y":21.43}, { "x":1420088400000 , "y":12.63}, { "x":1420088400000 , "y":25.14}, { "x":1420088400000 , "y":21.85}, { "x":1420088400000 , "y":12.5766666666667}, { "x":1422766800000 , "y":26.3}, { "x":1422766800000 , "y":24.4}, { "x":1425186000000 , "y":23.3833333333333}, { "x":1425186000000 , "y":24.5833333333333} ] } ,
- { "type":"line", "key": "DP_CPU", "yAxis": "1","values": [{ "x":1388552400000 , "y":2.0}, { "x":1388552400000 , "y":5.0}, { "x":1388552400000 , "y":2.17}, { "x":1388552400000 , "y":2.0}, { "x":1391230800000 , "y":3.01}, { "x":1391230800000 , "y":2.56}, { "x":1391230800000 , "y":3.0}, { "x":1391230800000 , "y":9.0}, { "x":1393650000000 , "y":10.0}, { "x":1393650000000 , "y":3.64}, { "x":1393650000000 , "y":4.06}, { "x":1393650000000 , "y":4.0}, { "x":1396324800000 , "y":4.04}, { "x":1396324800000 , "y":5.11}, { "x":1396324800000 , "y":5.9}, { "x":1396324800000 , "y":8.0}, { "x":1398916800000 , "y":5.08}, { "x":1398916800000 , "y":4.65}, { "x":1398916800000 , "y":4.74}, { "x":1398916800000 , "y":2.98}, { "x":1401595200000 , "y":6.13}, { "x":1401595200000 , "y":8.98}, { "x":1401595200000 , "y":9.22}, { "x":1401595200000 , "y":5.84}, { "x":1404187200000 , "y":8.12}, { "x":1404187200000 , "y":7.89}, { "x":1404187200000 , "y":8.41}, { "x":1404187200000 , "y":8.47}, { "x":1406865600000 , "y":11.06}, { "x":1406865600000 , "y":11.84}, { "x":1406865600000 , "y":11.92}, { "x":1406865600000 , "y":10.8}, { "x":1409544000000 , "y":14.58}, { "x":1409544000000 , "y":18.39}, { "x":1409544000000 , "y":15.5}, { "x":1409544000000 , "y":18.33}, { "x":1412136000000 , "y":18.01}, { "x":1412136000000 , "y":21.3}, { "x":1412136000000 , "y":21.11}, { "x":1412136000000 , "y":18.37}, { "x":1414814400000 , "y":18.59}, { "x":1414814400000 , "y":18.81}, { "x":1414814400000 , "y":17.13}, { "x":1414814400000 , "y":16.92}, { "x":1417410000000 , "y":18.0}, { "x":1417410000000 , "y":15.18}, { "x":1420088400000 , "y":9.16}, { "x":1420088400000 , "y":12.13}, { "x":1420088400000 , "y":11.76}, { "x":1420088400000 , "y":9.31}, { "x":1422766800000 , "y":13.47}, { "x":1422766800000 , "y":13.41}, { "x":1425186000000 , "y":12.2333333333333}, { "x":1425186000000 , "y":12.4} ] }
-];
-
-</script>
-<script src="js/line_chart.min.js"></script>
-</body> </html> \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/sample/html/pie_chart.html b/ecomp-portal-BE/war/static/fusion/sample/html/pie_chart.html
deleted file mode 100644
index ebbdd9c0..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/html/pie_chart.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta http-equiv="content-type" content="text/html; charset=UTF8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge" />
-<link href="../../d3/css/nv.d3.css" rel="stylesheet" type="text/css">
-<style>
- body {
- overflow-y:scroll;
- }
- text {
- font: 12px sans-serif;
- }
- tr.z-row-over > td.z-row-inner, tr.z-row-over > .z-cell { background-color: rgb(255, 255, 255); } svg { display: block; } #chart423 svg {
- height: 275px;
- width: 300px;
- min-width: 100px;
- min-height: 100px;
- }
- </style>
-<body>
-<div id="chart423"><svg></svg></div>
-<script src="../../d3/js/d3.v3.min.js"></script>
-<script src="../../d3/js/nv.d3.min.js"></script>
-<script src="../../d3/js/models/legend.js"></script>
-<script src="../../d3/js/models/pie.js"></script>
-<script src="../../d3/js/models/pieChart.js"></script>
-<script src="../../d3/js/utils.js"></script>
-<script>
-historicalBarChart = [
-{ "key":"Bedminster", "y":8.27},
-{ "key":"Middletown", "y":2.36},
-{ "key":"Paramus", "y":2.17},
-{ "key":"Piscataway", "y":4.89}
-];
-
-</script>
-<script src="js/pie_chart.min.js"></script>
-</body> </html> \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/sample/html/wordcloud.html b/ecomp-portal-BE/war/static/fusion/sample/html/wordcloud.html
deleted file mode 100644
index d9fc53fb..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/html/wordcloud.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<html>
-<head>
- <title>Word Cloud Example</title>
- <meta charset="utf-8" />
-<script src="../../d3/js/d3.v3.min.js" type="text/JavaScript"></script>
-<script src="../../d3/js/colorbrewer.js" type="text/JavaScript"></script>
-<script src="../../d3/js/d3.layout.cloud.js" type="text/JavaScript"></script>
-
-</head>
-<style>
- svg {
- height: 350px;
- width: 420px;
- border: 1px solid gray;
- }
-
-</style>
-<body>
-
-<div id="viz">
- <svg>
- </svg>
-</div>
-<div id="controls" />
-</body>
- <footer>
-
-<script>
-var cloudSize = 200;
-var dataURL = "data/worddata.csv";
-var keywords = ["video", "raptor", "4GLTE", "style", "append", "attr"];
-
-</script>
-<script src="js/worddata.min.js" type="text/JavaScript"></script>
- </footer>
-
-</html> \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/sample/js/FusionCharts.js b/ecomp-portal-BE/war/static/fusion/sample/js/FusionCharts.js
deleted file mode 100644
index 4c174dfa..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/js/FusionCharts.js
+++ /dev/null
@@ -1,361 +0,0 @@
-/**
- * FusionCharts: Flash Player detection and Chart embedding.
- * Version 1.2.3F ( 22 November 2008) - Specialized for FusionChartsFREE
- * Checking Flash Version >=6 and added updateChartXML() for FREE Charts.
- * Version: 1.2.3 (1st September, 2008) - Added Fix for % and & characters, scaled dimensions, fixes in to properly handling of double quotes and single quotes in setDataXML() function.
- * Version: 1.2.2 (10th July, 2008) - Added Fix for % scaled dimensions, fixes in setDataXML() and setDataURL() functions
- * Version: 1.2.1 (21st December, 2007) - Added setting up Transparent/opaque mode: setTransparent() function
- * Version: 1.2 (1st November, 2007) - Added FORM fixes for IE
- * Version: 1.1 (29th June, 2007) - Added Player detection, New conditional fixes for IE
- *
- * Morphed from SWFObject (http://blog.deconcept.com/swfobject/) under MIT License:
- * http://www.opensource.org/licenses/mit-license.php
- *
- */
-if(typeof infosoftglobal == "undefined") var infosoftglobal = new Object();
-if(typeof infosoftglobal.FusionChartsUtil == "undefined") infosoftglobal.FusionChartsUtil = new Object();
-infosoftglobal.FusionCharts = function(swf, id, w, h, debugMode, registerWithJS, c, scaleMode, lang, detectFlashVersion, autoInstallRedirect){
- if (!document.getElementById) { return; }
-
- //Flag to see whether data has been set initially
- this.initialDataSet = false;
-
- //Create container objects
- this.params = new Object();
- this.variables = new Object();
- this.attributes = new Array();
-
- //Set attributes for the SWF
- if(swf) { this.setAttribute('swf', swf); }
- if(id) { this.setAttribute('id', id); }
-
- w=w.toString().replace(/\%$/,"%25");
- if(w) { this.setAttribute('width', w); }
- h=h.toString().replace(/\%$/,"%25");
- if(h) { this.setAttribute('height', h); }
-
-
- //Set background color
- if(c) { this.addParam('bgcolor', c); }
-
- //Set Quality
- this.addParam('quality', 'high');
-
- //Add scripting access parameter
- this.addParam('allowScriptAccess', 'always');
-
- //Pass width and height to be appended as chartWidth and chartHeight
- this.addVariable('chartWidth', w);
- this.addVariable('chartHeight', h);
-
- //Whether in debug mode
- debugMode = debugMode ? debugMode : 0;
- this.addVariable('debugMode', debugMode);
- //Pass DOM ID to Chart
- this.addVariable('DOMId', id);
- //Whether to registed with JavaScript
- registerWithJS = registerWithJS ? registerWithJS : 0;
- this.addVariable('registerWithJS', registerWithJS);
-
- //Scale Mode of chart
- scaleMode = scaleMode ? scaleMode : 'noScale';
- this.addVariable('scaleMode', scaleMode);
-
- //Application Message Language
- lang = lang ? lang : 'EN';
- this.addVariable('lang', lang);
-
- //Whether to auto detect and re-direct to Flash Player installation
- this.detectFlashVersion = detectFlashVersion?detectFlashVersion:1;
- this.autoInstallRedirect = autoInstallRedirect?autoInstallRedirect:1;
-
- //Ger Flash Player version
- this.installedVer = infosoftglobal.FusionChartsUtil.getPlayerVersion();
-
- if (!window.opera && document.all && this.installedVer.major > 7) {
- // Only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE
- infosoftglobal.FusionCharts.doPrepUnload = true;
- }
-}
-
-infosoftglobal.FusionCharts.prototype = {
- setAttribute: function(name, value){
- this.attributes[name] = value;
- },
- getAttribute: function(name){
- return this.attributes[name];
- },
- addParam: function(name, value){
- this.params[name] = value;
- },
- getParams: function(){
- return this.params;
- },
- addVariable: function(name, value){
- this.variables[name] = value;
- },
- getVariable: function(name){
- return this.variables[name];
- },
- getVariables: function(){
- return this.variables;
- },
- getVariablePairs: function(){
- var variablePairs = new Array();
- var key;
- var variables = this.getVariables();
- for(key in variables){
- variablePairs.push(key +"="+ variables[key]);
- }
- return variablePairs;
- },
- getSWFHTML: function() {
- var swfNode = "";
- if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) {
- // netscape plugin architecture
- swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" ';
- swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
- var params = this.getParams();
- for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
- var pairs = this.getVariablePairs().join("&");
- if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
- swfNode += '/>';
- } else { // PC IE
- swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'">';
- swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
- var params = this.getParams();
- for(var key in params) {
- swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
- }
- var pairs = this.getVariablePairs().join("&");
- if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
- swfNode += "</object>";
- }
- return swfNode;
- },
- setDataURL: function(strDataURL){
- //This method sets the data URL for the chart.
- //If being set initially
- if (this.initialDataSet==false){
- this.addVariable('dataURL',strDataURL);
- //Update flag
- this.initialDataSet = true;
- }else{
- //Else, we update the chart data using External Interface
- //Get reference to chart object
- var chartObj = infosoftglobal.FusionChartsUtil.getChartObject(this.getAttribute('id'));
-
- if (!chartObj.setDataURL)
- {
- __flash__addCallback(chartObj, "setDataURL");
- }
-
- chartObj.setDataURL(strDataURL);
- }
- },
- //This function :
- //fixes the double quoted attributes to single quotes
- //Encodes all quotes inside attribute values
- //Encodes % to %25 and & to %26;
- encodeDataXML: function(strDataXML){
-
- var regExpReservedCharacters=["\\$","\\+"];
- var arrDQAtt=strDataXML.match(/=\s*\".*?\"/g);
- if (arrDQAtt){
- for(var i=0;i<arrDQAtt.length;i++){
- var repStr=arrDQAtt[i].replace(/^=\s*\"|\"$/g,"");
- repStr=repStr.replace(/\'/g,"%26apos;");
- var strTo=strDataXML.indexOf(arrDQAtt[i]);
- var repStrr="='"+repStr+"'";
- var strStart=strDataXML.substring(0,strTo);
- var strEnd=strDataXML.substring(strTo+arrDQAtt[i].length);
- var strDataXML=strStart+repStrr+strEnd;
- }
- }
-
- strDataXML=strDataXML.replace(/\"/g,"%26quot;");
- strDataXML=strDataXML.replace(/%(?![\da-f]{2}|[\da-f]{4})/ig,"%25");
- strDataXML=strDataXML.replace(/\&/g,"%26");
-
- return strDataXML;
-
- },
- setDataXML: function(strDataXML){
- //If being set initially
- if (this.initialDataSet==false){
- //This method sets the data XML for the chart INITIALLY.
- this.addVariable('dataXML',this.encodeDataXML(strDataXML));
- //Update flag
- this.initialDataSet = true;
- }else{
- //Else, we update the chart data using External Interface
- //Get reference to chart object
- var chartObj = infosoftglobal.FusionChartsUtil.getChartObject(this.getAttribute('id'));
- chartObj.setDataXML(strDataXML);
- }
- },
- setTransparent: function(isTransparent){
- //Sets chart to transparent mode when isTransparent is true (default)
- //When no parameter is passed, we assume transparent to be true.
- if(typeof isTransparent=="undefined") {
- isTransparent=true;
- }
- //Set the property
- if(isTransparent)
- this.addParam('WMode', 'transparent');
- else
- this.addParam('WMode', 'Opaque');
- },
-
- render: function(elementId){
- //First check for installed version of Flash Player - we need a minimum of 6
- if((this.detectFlashVersion==1) && (this.installedVer.major < 6)){
- if (this.autoInstallRedirect==1){
- //If we can auto redirect to install the player?
- var installationConfirm = window.confirm("You need Adobe Flash Player 6 (or above) to view the charts. It is a free and lightweight installation from Adobe.com. Please click on Ok to install the same.");
- if (installationConfirm){
- window.location = "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
- }else{
- return false;
- }
- }else{
- //Else, do not take an action. It means the developer has specified a message in the DIV (and probably a link).
- //So, expect the developers to provide a course of way to their end users.
- //window.alert("You need Adobe Flash Player 8 (or above) to view the charts. It is a free and lightweight installation from Adobe.com. ");
- return false;
- }
- }else{
- //Render the chart
- var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
- n.innerHTML = this.getSWFHTML();
-
- //Added <FORM> compatibility
- //Check if it's added in Mozilla embed array or if already exits
- if(!document.embeds[this.getAttribute('id')] && !window[this.getAttribute('id')])
- window[this.getAttribute('id')]=document.getElementById(this.getAttribute('id'));
- //or else document.forms[formName/formIndex][chartId]
- return true;
- }
- }
-}
-
-/* ---- detection functions ---- */
-infosoftglobal.FusionChartsUtil.getPlayerVersion = function(){
- var PlayerVersion = new infosoftglobal.PlayerVersion([0,0,0]);
- if(navigator.plugins && navigator.mimeTypes.length){
- var x = navigator.plugins["Shockwave Flash"];
- if(x && x.description) {
- PlayerVersion = new infosoftglobal.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
- }
- }else if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0){
- //If Windows CE
- var axo = 1;
- var counter = 3;
- while(axo) {
- try {
- counter++;
- axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+ counter);
- PlayerVersion = new infosoftglobal.PlayerVersion([counter,0,0]);
- } catch (e) {
- axo = null;
- }
- }
- } else {
- // Win IE (non mobile)
- // Do minor version lookup in IE, but avoid Flash Player 6 crashing issues
- try{
- var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
- }catch(e){
- try {
- var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
- PlayerVersion = new infosoftglobal.PlayerVersion([6,0,21]);
- axo.AllowScriptAccess = "always"; // error if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
- } catch(e) {
- if (PlayerVersion.major == 6) {
- return PlayerVersion;
- }
- }
- try {
- axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
- } catch(e) {}
- }
- if (axo != null) {
- PlayerVersion = new infosoftglobal.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
- }
- }
- return PlayerVersion;
-}
-infosoftglobal.PlayerVersion = function(arrVersion){
- this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
- this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
- this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0;
-}
-// ------------ Fix for Out of Memory Bug in IE in FP9 ---------------//
-/* Fix for video streaming bug */
-infosoftglobal.FusionChartsUtil.cleanupSWFs = function() {
- var objects = document.getElementsByTagName("OBJECT");
- for (var i = objects.length - 1; i >= 0; i--) {
- objects[i].style.display = 'none';
- for (var x in objects[i]) {
- if (typeof objects[i][x] == 'function') {
- objects[i][x] = function(){};
- }
- }
- }
-}
-// Fixes bug in fp9
-if (infosoftglobal.FusionCharts.doPrepUnload) {
- if (!infosoftglobal.unloadSet) {
- infosoftglobal.FusionChartsUtil.prepUnload = function() {
- __flash_unloadHandler = function(){};
- __flash_savedUnloadHandler = function(){};
- window.attachEvent("onunload", infosoftglobal.FusionChartsUtil.cleanupSWFs);
- }
- window.attachEvent("onbeforeunload", infosoftglobal.FusionChartsUtil.prepUnload);
- infosoftglobal.unloadSet = true;
- }
-}
-/* Add document.getElementById if needed (mobile IE < 5) */
-if (!document.getElementById && document.all) { document.getElementById = function(id) { return document.all[id]; }}
-/* Add Array.push if needed (ie5) */
-if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }}
-
-/* Function to return Flash Object from ID */
-infosoftglobal.FusionChartsUtil.getChartObject = function(id)
-{
- var chartRef=null;
- if (navigator.appName.indexOf("Microsoft Internet")==-1) {
- if (document.embeds && document.embeds[id])
- chartRef = document.embeds[id];
- else
- chartRef = window.document[id];
- }
- else {
- chartRef = window[id];
- }
- if (!chartRef)
- chartRef = document.getElementById(id);
-
- return chartRef;
-}
-/*
- Function to update chart's data at client side (FOR FusionCharts vFREE and 2.x
-*/
-infosoftglobal.FusionChartsUtil.updateChartXML = function(chartId, strXML){
- //Get reference to chart object
- var chartObj = infosoftglobal.FusionChartsUtil.getChartObject(chartId);
- //Set dataURL to null
- chartObj.SetVariable("_root.dataURL","");
- //Set the flag
- chartObj.SetVariable("_root.isNewData","1");
- //Set the actual data
- chartObj.SetVariable("_root.newData",strXML);
- //Go to the required frame
- chartObj.TGotoLabel("/", "JavaScriptHandler");
-}
-
-
-/* Aliases for easy usage */
-var getChartFromId = infosoftglobal.FusionChartsUtil.getChartObject;
-var updateChartXML = infosoftglobal.FusionChartsUtil.updateChartXML;
-var FusionCharts = infosoftglobal.FusionCharts; \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/sample/js/charts.js b/ecomp-portal-BE/war/static/fusion/sample/js/charts.js
deleted file mode 100644
index 4bebbd36..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/js/charts.js
+++ /dev/null
@@ -1,132 +0,0 @@
-
-function drawSingleSeriesChart(tabId, chartId, chartWidth, chartHeight, chartType, chartData,mme,yyyyMo) {
- // define, set the data for each chart, and render them (if indicated)
- var myChart = new FusionCharts("static/fusion/inc/fusionchart/" + chartType, "myChartId" + chartId, chartWidth, chartHeight);
-
- var mmeLabel = "";//mme + "";
-
- var chartCaptionId = tabId + "-chartdiv" + chartId + "-label";
-
- document.getElementById(chartCaptionId).innerHTML = "Hosted Voice Usage in "+ yyyyMo;
-
- myChart.setDataXML("<graph caption='"+mmeLabel + "' xAxisName='' yAxisName='# of Inbound/Outbound calls' showNames='1' decimalPrecision='0' formatNumberScale='0'>" + chartData + "</graph>");
- myChart.setTransparent(true);
- myChart.render(tabId + "-"+ "chartdiv" + chartId);
-
-
- }
-
-
- // gauge charts
- function drawGaugeChart(chartId, gaugeIndex, value) {
- var myChart = new FusionCharts("static/fusion/inc/fusionchart/AngularGauge.swf", "myChartId" + chartId, "300", "300", "0", "0");
- //CPU for NYCMNYBWLT1 on 201301 : 12.63//
- var chartData =
- "<Chart showBorder='0' editMode='1' bgColor='FFFFFF' upperLimit='100' lowerLimit='0' label='CPU' baseFontColor='FFFFFF' majorTMNumber='11' majorTMColor='FFFFFF' majorTMHeight='8' minorTMNumber='5' minorTMColor='FFFFFF' minorTMHeight='3' toolTipBorderColor='FFFFFF' toolTipBgColor='333333' gaugeOuterRadius='100' gaugeOriginX='150' gaugeOriginY='150' gaugeScaleAngle='270' placeValuesInside='1' gaugeInnerRadius='80%25' annRenderDelay='0' gaugeFillMix='' pivotRadius='10' showPivotBorder='0' pivotFillMix='{CCCCCC},{333333}' pivotFillRatio='50,50' showShadow='0' >" +
- "<colorRange>" +
- "<color minValue='0' maxValue='50' code='C1E1C1' alpha='60'/>" +
- "<color minValue='50' maxValue='85' code='F6F164' alpha='60'/>" +
- "<color minValue='85' maxValue='120' code='F70118' alpha='60'/>" +
- "</colorRange>" +
- "<dials>" +
- "<dial value='" + value + "' borderColor='FFFFFF' bgColor='000000,CCCCCC,000000' borderAlpha='0' baseWidth='10'/>" +
- "</dials>" +
- "<annotations>" +
- "<annotationGroup xPos='150' yPos='150' showBelow='1'>" +
- "<annotation type='circle' xPos='0' yPos='0' radius='120' startAngle='0' endAngle='360' fillColor='CCCCCC,111111' fillPattern='linear' fillAlpha='100,100' fillRatio='50,50' fillAngle='-45'/>" +
- "<annotation type='circle' xPos='0' yPos='0' radius='110' startAngle='0' endAngle='360' fillColor='111111,cccccc' fillPattern='linear' fillAlpha='100,100' fillRatio='50,50' fillAngle='-45'/>" +
- "<annotation type='text' label='CPU'/>" +
- "</annotationGroup>" +
- "</annotations>" +
- "</Chart>";
-
- myChart.setDataXML(chartData);
- myChart.render("chartdiv" + chartId);
- }
-
-
- function updateGaugeChart(chartId, gaugeIndex, refreshCount) {
- var myChart = getChartFromId("myChartId" + chartId);
- var val = 0;
- if (gaugeIndex == "10") val = 12;
- else if (gaugeIndex == "20") val = 15;
- else if (gaugeIndex == "30") val = 52;
- else if (gaugeIndex == "40") val = 42;
- myChart.setData(1, val);
- myChart.setData(2, val+20);
- }
-
- function updateGaugeChartWithMMEData(chartId, value) {
- var myChart = getChartFromId("myChartId" + chartId);
- myChart.setData(1, value);
- }
-
-
- function updateGaugeChartWithMMEData(chartId, value, yyyyMo, mme) {
- var myChart = getChartFromId("myChartId" + chartId);
- myChart.setData(1, value);
- document.getElementById("cpuYyyyMm").innerHTML = "Hosted Voice Utilization in "+ yyyyMo;
-
- }
-
- function drawMultiSeriesChart(tabId,chartId, chartWidth, chartHeight, chartType) {
- var myChart = new FusionCharts("static/fusion/inc/fusionchart/" + chartType, "myChartId" + chartId, chartWidth, chartHeight, "0", "0");
-
- myChart.setTransparent(true);
-
- var chartData =
- "<graph caption='Hosted Voice v Audited Communication' xAxisName='Month' yAxisName='Bandwidth Usage'" +
- " showValues='0' decimalPrecision='0' bgcolor='ffffff' bgAlpha='70'" +
- " showColumnShadow='1' divlinecolor='c5c5c5' divLineAlpha='60' showAlternateHGridColor='1'" +
- " alternateHGridColor='f8f8f8' alternateHGridAlpha='60' >" +
- "<categories>" +
- "<category name='Jan' />" +
- "<category name='Feb' />" +
- "<category name='Mar' />" +
- "<category name='Apr' />" +
- "<category name='May' />" +
- "<category name='Jun' />" +
- "<category name='Jul' />" +
- "<category name='Aug' />" +
- "<category name='Sep' />" +
- "<category name='Oct' />" +
- "<category name='Nov' />" +
- "<category name='Dec' />" +
- "</categories>" +
- "<dataset seriesName='Hosted Voice' color='c4e3f7' >" +
- "<set value='7' />" +
- "<set value='8.04' />" +
- "<set value='10.04' />" +
- "<set value='12.73' />" +
- "<set value='12.41' />" +
- "<set value='11.83' />" +
- "<set value='14.06' />" +
- "<set value='15.94' />" +
- "<set value='22.97' />" +
- "<set value='26.79' />" +
- "<set value='20.35' />" +
- "<set value='12.63' />" +
- "</dataset>" +
- "<dataset seriesName='Audited Communication' color='Fad35e' >" +
- "<set value='5.49'/>" +
- "<set value='8.05'/>" +
- "<set value='15.36'/>" +
- "<set value='21.23'/>" +
- "<set value='23.48' />" +
- "<set value='15.49' />" +
- "<set value='26.8' />" +
- "<set value='30.54' />" +
- "<set value='64' />" +
- "<set value='75' />" +
- "<set value='63' />" +
- "<set value='34' />" +
- "</dataset>" +
- "<trendlines>" +
- "<line startValue='26000' color='91C728' displayValue='Target' showOnTop='1'/>" +
- "</trendlines>" +
- "</graph>";
-
- myChart.setDataXML(chartData);
- myChart.render(tabId + "-" + "chartdiv" + chartId);
- }
-
diff --git a/ecomp-portal-BE/war/static/fusion/sample/js/eye.js b/ecomp-portal-BE/war/static/fusion/sample/js/eye.js
deleted file mode 100644
index 8a281dc3..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/js/eye.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- *
- * Zoomimage
- * Author: Stefan Petre www.eyecon.ro
- *
- */
-(function($){
- var EYE = window.EYE = function() {
- var _registered = {
- init: []
- };
- return {
- init: function() {
- $.each(_registered.init, function(nr, fn){
- fn.call();
- });
- },
- extend: function(prop) {
- for (var i in prop) {
- if (prop[i] != undefined) {
- this[i] = prop[i];
- }
- }
- },
- register: function(fn, type) {
- if (!_registered[type]) {
- _registered[type] = [];
- }
- _registered[type].push(fn);
- }
- };
- }();
- $(EYE.init);
-})(jQuery);
diff --git a/ecomp-portal-BE/war/static/fusion/sample/js/scribble.js b/ecomp-portal-BE/war/static/fusion/sample/js/scribble.js
deleted file mode 100644
index 5384b304..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/js/scribble.js
+++ /dev/null
@@ -1,19 +0,0 @@
- function storeUserScribble(id) {
- var scribble = document.getElementById('scribble').innerHTML;
- localStorage.setItem('userScribble',scribble);
- }
-
- function getUserScribble() {
- if ( localStorage.getItem('userScribble')) {
- var scribble = localStorage.getItem('userScribble');
- }
- else {
- var scribble = 'You can scribble directly on this sticky... and I will also remember your message the next time you visit my blog!';
- }
- document.getElementById('scribble').innerHTML = scribble;
- }
-
- function clearLocal() {
- clear: localStorage.clear();
- return false;
- }
diff --git a/ecomp-portal-BE/war/static/fusion/sample/js/slides.min.jquery.js b/ecomp-portal-BE/war/static/fusion/sample/js/slides.min.jquery.js
deleted file mode 100644
index 1a1fcdd8..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/js/slides.min.jquery.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-* Slides, A Slideshow Plugin for jQuery
-* Intructions: http://slidesjs.com
-* By: Nathan Searles, http://nathansearles.com
-* Version: 1.1.9
-* Updated: September 5th, 2011
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT 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(a){a.fn.slides=function(b){return b=a.extend({},a.fn.slides.option,b),this.each(function(){function w(g,h,i){if(!p&&o){p=!0,b.animationStart(n+1);switch(g){case"next":l=n,k=n+1,k=e===k?0:k,r=f*2,g=-f*2,n=k;break;case"prev":l=n,k=n-1,k=k===-1?e-1:k,r=0,g=0,n=k;break;case"pagination":k=parseInt(i,10),l=a("."+b.paginationClass+" li."+b.currentClass+" a",c).attr("href").match("[^#/]+$"),k>l?(r=f*2,g=-f*2):(r=0,g=0),n=k}h==="fade"?b.crossfade?d.children(":eq("+k+")",c).css({zIndex:10}).fadeIn(b.fadeSpeed,b.fadeEasing,function(){b.autoHeight?d.animate({height:d.children(":eq("+k+")",c).outerHeight()},b.autoHeightSpeed,function(){d.children(":eq("+l+")",c).css({display:"none",zIndex:0}),d.children(":eq("+k+")",c).css({zIndex:0}),b.animationComplete(k+1),p=!1}):(d.children(":eq("+l+")",c).css({display:"none",zIndex:0}),d.children(":eq("+k+")",c).css({zIndex:0}),b.animationComplete(k+1),p=!1)}):d.children(":eq("+l+")",c).fadeOut(b.fadeSpeed,b.fadeEasing,function(){b.autoHeight?d.animate({height:d.children(":eq("+k+")",c).outerHeight()},b.autoHeightSpeed,function(){d.children(":eq("+k+")",c).fadeIn(b.fadeSpeed,b.fadeEasing)}):d.children(":eq("+k+")",c).fadeIn(b.fadeSpeed,b.fadeEasing,function(){a.browser.msie&&a(this).get(0).style.removeAttribute("filter")}),b.animationComplete(k+1),p=!1}):(d.children(":eq("+k+")").css({left:r,display:"block"}),b.autoHeight?d.animate({left:g,height:d.children(":eq("+k+")").outerHeight()},b.slideSpeed,b.slideEasing,function(){d.css({left:-f}),d.children(":eq("+k+")").css({left:f,zIndex:5}),d.children(":eq("+l+")").css({left:f,display:"none",zIndex:0}),b.animationComplete(k+1),p=!1}):d.animate({left:g},b.slideSpeed,b.slideEasing,function(){d.css({left:-f}),d.children(":eq("+k+")").css({left:f,zIndex:5}),d.children(":eq("+l+")").css({left:f,display:"none",zIndex:0}),b.animationComplete(k+1),p=!1})),b.pagination&&(a("."+b.paginationClass+" li."+b.currentClass,c).removeClass(b.currentClass),a("."+b.paginationClass+" li:eq("+k+")",c).addClass(b.currentClass))}}function x(){clearInterval(c.data("interval"))}function y(){b.pause?(clearTimeout(c.data("pause")),clearInterval(c.data("interval")),u=setTimeout(function(){clearTimeout(c.data("pause")),v=setInterval(function(){w("next",i)},b.play),c.data("interval",v)},b.pause),c.data("pause",u)):x()}a("."+b.container,a(this)).children().wrapAll('<div class="slides_control"/>');var c=a(this),d=a(".slides_control",c),e=d.children().size(),f=d.children().outerWidth(),g=d.children().outerHeight(),h=b.start-1,i=b.effect.indexOf(",")<0?b.effect:b.effect.replace(" ","").split(",")[0],j=b.effect.indexOf(",")<0?i:b.effect.replace(" ","").split(",")[1],k=0,l=0,m=0,n=0,o,p,q,r,s,t,u,v;if(e<2)return a("."+b.container,a(this)).fadeIn(b.fadeSpeed,b.fadeEasing,function(){o=!0,b.slidesLoaded()}),a("."+b.next+", ."+b.prev).fadeOut(0),!1;if(e<2)return;h<0&&(h=0),h>e&&(h=e-1),b.start&&(n=h),b.randomize&&d.randomize(),a("."+b.container,c).css({overflow:"hidden",position:"relative"}),d.children().css({position:"absolute",top:0,left:d.children().outerWidth(),zIndex:0,display:"none"}),d.css({position:"relative",width:f*3,height:g,left:-f}),a("."+b.container,c).css({display:"block"}),b.autoHeight&&(d.children().css({height:"auto"}),d.animate({height:d.children(":eq("+h+")").outerHeight()},b.autoHeightSpeed));if(b.preload&&d.find("img:eq("+h+")").length){a("."+b.container,c).css({background:"url("+b.preloadImage+") no-repeat 50% 50%"});var z=d.find("img:eq("+h+")").attr("src")+"?"+(new Date).getTime();a("img",c).parent().attr("class")!="slides_control"?t=d.children(":eq(0)")[0].tagName.toLowerCase():t=d.find("img:eq("+h+")"),d.find("img:eq("+h+")").attr("src",z).load(function(){d.find(t+":eq("+h+")").fadeIn(b.fadeSpeed,b.fadeEasing,function(){a(this).css({zIndex:5}),a("."+b.container,c).css({background:""}),o=!0,b.slidesLoaded()})})}else d.children(":eq("+h+")").fadeIn(b.fadeSpeed,b.fadeEasing,function(){o=!0,b.slidesLoaded()});b.bigTarget&&(d.children().css({cursor:"pointer"}),d.children().click(function(){return w("next",i),!1})),b.hoverPause&&b.play&&(d.bind("mouseover",function(){x()}),d.bind("mouseleave",function(){y()})),b.generateNextPrev&&(a("."+b.container,c).after('<a href="#" class="'+b.prev+'">Prev</a>'),a("."+b.prev,c).after('<a href="#" class="'+b.next+'">Next</a>')),a("."+b.next,c).click(function(a){a.preventDefault(),b.play&&y(),w("next",i)}),a("."+b.prev,c).click(function(a){a.preventDefault(),b.play&&y(),w("prev",i)}),b.generatePagination?(b.prependPagination?c.prepend("<ul class="+b.paginationClass+"></ul>"):c.append("<ul class="+b.paginationClass+"></ul>"),d.children().each(function(){a("."+b.paginationClass,c).append('<li><a href="#'+m+'">'+(m+1)+"</a></li>"),m++})):a("."+b.paginationClass+" li a",c).each(function(){a(this).attr("href","#"+m),m++}),a("."+b.paginationClass+" li:eq("+h+")",c).addClass(b.currentClass),a("."+b.paginationClass+" li a",c).click(function(){return b.play&&y(),q=a(this).attr("href").match("[^#/]+$"),n!=q&&w("pagination",j,q),!1}),a("a.link",c).click(function(){return b.play&&y(),q=a(this).attr("href").match("[^#/]+$")-1,n!=q&&w("pagination",j,q),!1}),b.play&&(v=setInterval(function(){w("next",i)},b.play),c.data("interval",v))})},a.fn.slides.option={preload:!1,preloadImage:"/img/loading.gif",container:"slides_container",generateNextPrev:!1,next:"next",prev:"prev",pagination:!0,generatePagination:!0,prependPagination:!1,paginationClass:"pagination",currentClass:"current",fadeSpeed:350,fadeEasing:"",slideSpeed:350,slideEasing:"",start:1,effect:"slide",crossfade:!1,randomize:!1,play:0,pause:0,hoverPause:!1,autoHeight:!1,autoHeightSpeed:350,bigTarget:!1,animationStart:function(){},animationComplete:function(){},slidesLoaded:function(){}},a.fn.randomize=function(b){function c(){return Math.round(Math.random())-.5}return a(this).each(function(){var d=a(this),e=d.children(),f=e.length;if(f>1){e.hide();var g=[];for(i=0;i<f;i++)g[g.length]=i;g=g.sort(c),a.each(g,function(a,c){var f=e.eq(c),g=f.clone(!0);g.show().appendTo(d),b!==undefined&&b(f,g),f.remove()})}})}})(jQuery) \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/sample/js/spacegallery.js b/ecomp-portal-BE/war/static/fusion/sample/js/spacegallery.js
deleted file mode 100644
index 69ab2ccc..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/js/spacegallery.js
+++ /dev/null
@@ -1,235 +0,0 @@
-/**
- *
- * Spacegallery
- * Author: Stefan Petre www.eyecon.ro
- *
- */
-
-(function($){
- EYE.extend({
-
- spacegallery: {
-
- //default options (many options are controled via CSS)
- defaults: {
- border: 6, // border arround the image
- perspective: 140, // perpective height
- minScale: 0.2, // minimum scale for the image in the back
- duration: 800, // aimation duration
- loadingClass: null, // CSS class applied to the element while looading images
- before: function(){return false},
- after: function(){return false}
- },
-
- animated: false,
-
- //position images
- positionImages: function(el) {
- var top = 0;
- EYE.spacegallery.animated = false;
- $(el)
- .find('a')
- .removeClass(el.spacegalleryCfg.loadingClass)
- .end()
- .find('img')
- .removeAttr('height')
- .each(function(nr){
- var newWidth = this.spacegallery.origWidth - (this.spacegallery.origWidth - this.spacegallery.origWidth * el.spacegalleryCfg.minScale) * el.spacegalleryCfg.asins[nr];
- $(this)
- .css({
- top: el.spacegalleryCfg.tops[nr] + 'px',
- marginLeft: - parseInt((newWidth + el.spacegalleryCfg.border)/2, 10) + 'px',
- opacity: 1 - el.spacegalleryCfg.asins[nr]
- })
- .attr('width', parseInt(newWidth));
- this.spacegallery.next = el.spacegalleryCfg.asins[nr+1];
- this.spacegallery.nextTop = el.spacegalleryCfg.tops[nr+1] - el.spacegalleryCfg.tops[nr];
- this.spacegallery.origTop = el.spacegalleryCfg.tops[nr];
- this.spacegallery.opacity = 1 - el.spacegalleryCfg.asins[nr];
- this.spacegallery.increment = el.spacegalleryCfg.asins[nr] - this.spacegallery.next;
- this.spacegallery.current = el.spacegalleryCfg.asins[nr];
- this.spacegallery.width = newWidth;
- })
- },
-
- //animate to nex image
- next: function(e) {
- if (EYE.spacegallery.animated === false) {
- EYE.spacegallery.animated = true;
- var el = this.parentNode;
- el.spacegalleryCfg.before.apply(el);
- $(el)
- .css('spacegallery', 0)
- .animate({
- spacegallery: 100
- },{
- easing: 'easeOut',
- duration: el.spacegalleryCfg.duration,
- complete: function() {
- $(el)
- .find('img:last')
- .prependTo(el);
- EYE.spacegallery.positionImages(el);
- el.spacegalleryCfg.after.apply(el);
- },
- step: function(now) {
- $('img', this)
- .each(function(nr){
- var newWidth, top, next;
- if (nr + 1 == el.spacegalleryCfg.images) {
- top = this.spacegallery.origTop + this.spacegallery.nextTop * 4 * now /100;
- newWidth = this.spacegallery.width * top / this.spacegallery.origTop;
- $(this)
- .css({
- top: top + 'px',
- opacity: 0.7 - now/100,
- marginLeft: - parseInt((newWidth + el.spacegalleryCfg.border)/2, 10) + 'px'
- })
- .attr('width', newWidth);
- } else {
- next = this.spacegallery.current - this.spacegallery.increment * now /100;
- newWidth = this.spacegallery.origWidth - (this.spacegallery.origWidth - this.spacegallery.origWidth * el.spacegalleryCfg.minScale) * next;
- $(this).css({
- top: this.spacegallery.origTop + this.spacegallery.nextTop * now /100 + 'px',
- opacity: 1 - next,
- marginLeft: - parseInt((newWidth + el.spacegalleryCfg.border)/2, 10) + 'px'
- })
- .attr('width', newWidth);
- }
- });
- }
- });
- }
-
- this.blur();
- return false;
- },
-
- autoNext: function(el) {
-
- if (EYE.spacegallery.animated === false) {
- EYE.spacegallery.animated = true;
- el.spacegalleryCfg.before.apply(el); // run the "before" function
- $(el)
- .css('spacegallery', 0)
- .animate({
- spacegallery: 100
- },{
- easing: 'easeOut',
- duration: el.spacegalleryCfg.duration,
- complete: function() { // after animation is complete, move the front image to the back
- $(el)
- .find('img:last') // find the last image in this div
- .prependTo(el); // and stick it at the beginning
- EYE.spacegallery.positionImages(el); // run "position images"
- el.spacegalleryCfg.after.apply(el); //run the "after" function
- },
- step: function(now) {
- $('img', this)
- .each(function(nr){
- var newWidth, top, next;
- if (nr + 1 == el.spacegalleryCfg.images) {
- top = this.spacegallery.origTop + this.spacegallery.nextTop * 4 * now /100;
- newWidth = this.spacegallery.width * top / this.spacegallery.origTop;
- $(this)
- .css({
- top: top + 'px',
- opacity: 0.7 - now/100,
- marginLeft: - parseInt((newWidth + el.spacegalleryCfg.border)/2, 10) + 'px'
- })
- .attr('width', newWidth);
- } else {
- next = this.spacegallery.current - this.spacegallery.increment * now /100;
- newWidth = this.spacegallery.origWidth - (this.spacegallery.origWidth - this.spacegallery.origWidth * el.spacegalleryCfg.minScale) * next;
- $(this).css({
- top: this.spacegallery.origTop + this.spacegallery.nextTop * now /100 + 'px',
- opacity: 1 - next,
- marginLeft: - parseInt((newWidth + el.spacegalleryCfg.border)/2, 10) + 'px'
- })
- .attr('width', newWidth);
- }
- });
- }
- });
- }
-
- return false;
- },
-
- //constructor
- init: function(opt) {
- opt = $.extend({}, EYE.spacegallery.defaults, opt||{});
- return this.each(function(){
- var el = this;
- if ($(el).is('.spacegallery')) {
- $('<a href="#"></a>')
- .appendTo(this)
- .addClass(opt.loadingClass)
- .bind('click', EYE.spacegallery.next);
- el.spacegalleryCfg = opt;
- el.spacegalleryCfg.images = el.getElementsByTagName('img').length;
- el.spacegalleryCfg.loaded = 0;
- el.spacegalleryCfg.asin = Math.asin(1);
- el.spacegalleryCfg.asins = {};
- el.spacegalleryCfg.tops = {};
- el.spacegalleryCfg.increment = parseInt(el.spacegalleryCfg.perspective/el.spacegalleryCfg.images, 10);
- var top = 0;
- $('img', el)
- .each(function(nr){
- var imgEl = new Image();
- var elImg = this;
- el.spacegalleryCfg.asins[nr] = 1 - Math.asin((nr+1)/el.spacegalleryCfg.images)/el.spacegalleryCfg.asin;
- top += el.spacegalleryCfg.increment - el.spacegalleryCfg.increment * el.spacegalleryCfg.asins[nr];
- el.spacegalleryCfg.tops[nr] = top;
- elImg.spacegallery = {};
- imgEl.src = this.src;
- if (imgEl.complete) {
- el.spacegalleryCfg.loaded ++;
- elImg.spacegallery.origWidth = imgEl.width;
- elImg.spacegallery.origHeight = imgEl.height
- } else {
- imgEl.onload = function() {
- el.spacegalleryCfg.loaded ++;
- elImg.spacegallery.origWidth = imgEl.width;
- elImg.spacegallery.origHeight = imgEl.height
- if (el.spacegalleryCfg.loaded == el.spacegalleryCfg.images) {
-
- EYE.spacegallery.positionImages(el);
- }
- };
- }
- });
- el.spacegalleryCfg.asins[el.spacegalleryCfg.images] = el.spacegalleryCfg.asins[el.spacegalleryCfg.images - 1] * 1.3;
- el.spacegalleryCfg.tops[el.spacegalleryCfg.images] = el.spacegalleryCfg.tops[el.spacegalleryCfg.images - 1] * 1.3;
- if (el.spacegalleryCfg.loaded == el.spacegalleryCfg.images) {
- EYE.spacegallery.positionImages(el);
- setInterval(function() { EYE.spacegallery.autoNext(el); }, 4000);
- }
- }
- });
- }
- }
- });
-
- $.fn.extend({
-
- /**
- * Create a space gallery
- * @name spacegallery
- * @description create a space gallery
- * @option int border Images' border. Default: 6
- * @option int perspective Perpective height. Default: 140
- * @option float minScale Minimum scale for the image in the back. Default: 0.2
- * @option int duration Animation duration. Default: 800
- * @option string loadingClass CSS class applied to the element while looading images. Default: null
- * @option function before Callback function triggered before going to the next image
- * @option function after Callback function triggered after going to the next image
- */
- spacegallery: EYE.spacegallery.init
- });
- $.extend($.easing,{
- easeOut:function (x, t, b, c, d) {
- return -c *(t/=d)*(t-2) + b;
- }
- });
-})(jQuery); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/sample/js/utils.js b/ecomp-portal-BE/war/static/fusion/sample/js/utils.js
deleted file mode 100644
index d9be8532..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/js/utils.js
+++ /dev/null
@@ -1,252 +0,0 @@
-/**
- *
- * Utilities
- * Author: Stefan Petre www.eyecon.ro
- *
- */
-(function($) {
-EYE.extend({
- getPosition : function(e, forceIt)
- {
- var x = 0;
- var y = 0;
- var es = e.style;
- var restoreStyles = false;
- if (forceIt && jQuery.curCSS(e,'display') == 'none') {
- var oldVisibility = es.visibility;
- var oldPosition = es.position;
- restoreStyles = true;
- es.visibility = 'hidden';
- es.display = 'block';
- es.position = 'absolute';
- }
- var el = e;
- if (el.getBoundingClientRect) { // IE
- var box = el.getBoundingClientRect();
- x = box.left + Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) - 2;
- y = box.top + Math.max(document.documentElement.scrollTop, document.body.scrollTop) - 2;
- } else {
- x = el.offsetLeft;
- y = el.offsetTop;
- el = el.offsetParent;
- if (e != el) {
- while (el) {
- x += el.offsetLeft;
- y += el.offsetTop;
- el = el.offsetParent;
- }
- }
- if (jQuery.browser.safari && jQuery.curCSS(e, 'position') == 'absolute' ) {
- x -= document.body.offsetLeft;
- y -= document.body.offsetTop;
- }
- el = e.parentNode;
- while (el && el.tagName.toUpperCase() != 'BODY' && el.tagName.toUpperCase() != 'HTML')
- {
- if (jQuery.curCSS(el, 'display') != 'inline') {
- x -= el.scrollLeft;
- y -= el.scrollTop;
- }
- el = el.parentNode;
- }
- }
- if (restoreStyles == true) {
- es.display = 'none';
- es.position = oldPosition;
- es.visibility = oldVisibility;
- }
- return {x:x, y:y};
- },
- getSize : function(e)
- {
- var w = parseInt(jQuery.curCSS(e,'width'), 10);
- var h = parseInt(jQuery.curCSS(e,'height'), 10);
- var wb = 0;
- var hb = 0;
- if (jQuery.curCSS(e, 'display') != 'none') {
- wb = e.offsetWidth;
- hb = e.offsetHeight;
- } else {
- var es = e.style;
- var oldVisibility = es.visibility;
- var oldPosition = es.position;
- es.visibility = 'hidden';
- es.display = 'block';
- es.position = 'absolute';
- wb = e.offsetWidth;
- hb = e.offsetHeight;
- es.display = 'none';
- es.position = oldPosition;
- es.visibility = oldVisibility;
- }
- return {w:w, h:h, wb:wb, hb:hb};
- },
- getClient : function(e)
- {
- var h, w;
- if (e) {
- w = e.clientWidth;
- h = e.clientHeight;
- } else {
- var de = document.documentElement;
- w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
- h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
- }
- return {w:w,h:h};
- },
- getScroll : function (e)
- {
- var t=0, l=0, w=0, h=0, iw=0, ih=0;
- if (e && e.nodeName.toLowerCase() != 'body') {
- t = e.scrollTop;
- l = e.scrollLeft;
- w = e.scrollWidth;
- h = e.scrollHeight;
- } else {
- if (document.documentElement) {
- t = document.documentElement.scrollTop;
- l = document.documentElement.scrollLeft;
- w = document.documentElement.scrollWidth;
- h = document.documentElement.scrollHeight;
- } else if (document.body) {
- t = document.body.scrollTop;
- l = document.body.scrollLeft;
- w = document.body.scrollWidth;
- h = document.body.scrollHeight;
- }
- if (typeof pageYOffset != 'undefined') {
- t = pageYOffset;
- l = pageXOffset;
- }
- iw = self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0;
- ih = self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0;
- }
- return { t: t, l: l, w: w, h: h, iw: iw, ih: ih };
- },
- getMargins : function(e, toInteger)
- {
- var t = jQuery.curCSS(e,'marginTop') || '';
- var r = jQuery.curCSS(e,'marginRight') || '';
- var b = jQuery.curCSS(e,'marginBottom') || '';
- var l = jQuery.curCSS(e,'marginLeft') || '';
- if (toInteger)
- return {
- t: parseInt(t, 10)||0,
- r: parseInt(r, 10)||0,
- b: parseInt(b, 10)||0,
- l: parseInt(l, 10)
- };
- else
- return {t: t, r: r, b: b, l: l};
- },
- getPadding : function(e, toInteger)
- {
- var t = jQuery.curCSS(e,'paddingTop') || '';
- var r = jQuery.curCSS(e,'paddingRight') || '';
- var b = jQuery.curCSS(e,'paddingBottom') || '';
- var l = jQuery.curCSS(e,'paddingLeft') || '';
- if (toInteger)
- return {
- t: parseInt(t, 10)||0,
- r: parseInt(r, 10)||0,
- b: parseInt(b, 10)||0,
- l: parseInt(l, 10)
- };
- else
- return {t: t, r: r, b: b, l: l};
- },
- getBorder : function(e, toInteger)
- {
- var t = jQuery.curCSS(e,'borderTopWidth') || '';
- var r = jQuery.curCSS(e,'borderRightWidth') || '';
- var b = jQuery.curCSS(e,'borderBottomWidth') || '';
- var l = jQuery.curCSS(e,'borderLeftWidth') || '';
- if (toInteger)
- return {
- t: parseInt(t, 10)||0,
- r: parseInt(r, 10)||0,
- b: parseInt(b, 10)||0,
- l: parseInt(l, 10)||0
- };
- else
- return {t: t, r: r, b: b, l: l};
- },
- traverseDOM : function(nodeEl, func)
- {
- func(nodeEl);
- nodeEl = nodeEl.firstChild;
- while(nodeEl){
- EYE.traverseDOM(nodeEl, func);
- nodeEl = nodeEl.nextSibling;
- }
- },
- getInnerWidth : function(el, scroll) {
- var offsetW = el.offsetWidth;
- return scroll ? Math.max(el.scrollWidth,offsetW) - offsetW + el.clientWidth:el.clientWidth;
- },
- getInnerHeight : function(el, scroll) {
- var offsetH = el.offsetHeight;
- return scroll ? Math.max(el.scrollHeight,offsetH) - offsetH + el.clientHeight:el.clientHeight;
- },
- getExtraWidth : function(el) {
- if($.boxModel)
- return (parseInt($.curCSS(el, 'paddingLeft'))||0)
- + (parseInt($.curCSS(el, 'paddingRight'))||0)
- + (parseInt($.curCSS(el, 'borderLeftWidth'))||0)
- + (parseInt($.curCSS(el, 'borderRightWidth'))||0);
- return 0;
- },
- getExtraHeight : function(el) {
- if($.boxModel)
- return (parseInt($.curCSS(el, 'paddingTop'))||0)
- + (parseInt($.curCSS(el, 'paddingBottom'))||0)
- + (parseInt($.curCSS(el, 'borderTopWidth'))||0)
- + (parseInt($.curCSS(el, 'borderBottomWidth'))||0);
- return 0;
- },
- isChildOf: function(parentEl, el, container) {
- if (parentEl == el) {
- return true;
- }
- if (!el || !el.nodeType || el.nodeType != 1) {
- return false;
- }
- if (parentEl.contains && !$.browser.safari) {
- return parentEl.contains(el);
- }
- if ( parentEl.compareDocumentPosition ) {
- return !!(parentEl.compareDocumentPosition(el) & 16);
- }
- var prEl = el.parentNode;
- while(prEl && prEl != container) {
- if (prEl == parentEl)
- return true;
- prEl = prEl.parentNode;
- }
- return false;
- },
- centerEl : function(el, axis)
- {
- var clientScroll = EYE.getScroll();
- var size = EYE.getSize(el);
- if (!axis || axis == 'vertically')
- $(el).css(
- {
- top: clientScroll.t + ((Math.min(clientScroll.h,clientScroll.ih) - size.hb)/2) + 'px'
- }
- );
- if (!axis || axis == 'horizontally')
- $(el).css(
- {
- left: clientScroll.l + ((Math.min(clientScroll.w,clientScroll.iw) - size.wb)/2) + 'px'
- }
- );
- }
-});
-if (!$.easing.easeout) {
- $.easing.easeout = function(p, n, firstNum, delta, duration) {
- return -delta * ((n=n/duration-1)*n*n*n - 1) + firstNum;
- };
-}
-
-})(jQuery); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/sample/org_chart/css/bootstrap.min.css b/ecomp-portal-BE/war/static/fusion/sample/org_chart/css/bootstrap.min.css
deleted file mode 100644
index 3424a5f1..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/org_chart/css/bootstrap.min.css
+++ /dev/null
@@ -1,351 +0,0 @@
-html,body{margin:0;padding:0;}
-h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,cite,code,del,dfn,em,img,q,s,samp,small,strike,strong,sub,sup,tt,var,dd,dl,dt,li,ol,ul,fieldset,form,label,legend,button,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;font-weight:normal;font-style:normal;font-size:100%;line-height:1;font-family:inherit;}
-ol,ul{list-style:none;}
-q:before,q:after,blockquote:before,blockquote:after{content:"";}
-html{overflow-y:scroll;font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
-a:focus{outline:thin dotted;}
-a:hover,a:active{outline:0;}
-article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
-audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
-audio:not([controls]){display:none;}
-sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}
-sup{top:-0.5em;}
-sub{bottom:-0.25em;}
-img{border:0;-ms-interpolation-mode:bicubic;}
-button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}
-button,input{line-height:normal;*overflow:visible;}
-button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}
-button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;}
-input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;}
-input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;}
-textarea{overflow:auto;vertical-align:top;}
-body{background-color:#ffffff;margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:18px;color:#404040;}
-.container{width:940px;margin-left:auto;margin-right:auto;zoom:1;}.container:before,.container:after{display:table;content:"";zoom:1;}
-.container:after{clear:both;}
-.container-fluid{position:relative;min-width:940px;padding-left:20px;padding-right:20px;zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";zoom:1;}
-.container-fluid:after{clear:both;}
-.container-fluid>.sidebar{position:absolute;top:0;left:20px;width:220px;}
-.container-fluid>.content{margin-left:240px;}
-a{color:#0069d6;text-decoration:none;line-height:inherit;font-weight:inherit;}a:hover{color:#00438a;text-decoration:underline;}
-.pull-right{float:right;}
-.pull-left{float:left;}
-.hide{display:none;}
-.show{display:block;}
-.row{zoom:1;margin-left:-20px;}.row:before,.row:after{display:table;content:"";zoom:1;}
-.row:after{clear:both;}
-.row>[class*="span"]{display:inline;float:left;margin-left:20px;}
-.span1{width:40px;}
-.span2{width:100px;}
-.span3{width:160px;}
-.span4{width:220px;}
-.span5{width:280px;}
-.span6{width:340px;}
-.span7{width:400px;}
-.span8{width:460px;}
-.span9{width:520px;}
-.span10{width:580px;}
-.span11{width:640px;}
-.span12{width:700px;}
-.span13{width:760px;}
-.span14{width:820px;}
-.span15{width:880px;}
-.span16{width:940px;}
-.span17{width:1000px;}
-.span18{width:1060px;}
-.span19{width:1120px;}
-.span20{width:1180px;}
-.span21{width:1240px;}
-.span22{width:1300px;}
-.span23{width:1360px;}
-.span24{width:1420px;}
-.row>.offset1{margin-left:80px;}
-.row>.offset2{margin-left:140px;}
-.row>.offset3{margin-left:200px;}
-.row>.offset4{margin-left:260px;}
-.row>.offset5{margin-left:320px;}
-.row>.offset6{margin-left:380px;}
-.row>.offset7{margin-left:440px;}
-.row>.offset8{margin-left:500px;}
-.row>.offset9{margin-left:560px;}
-.row>.offset10{margin-left:620px;}
-.row>.offset11{margin-left:680px;}
-.row>.offset12{margin-left:740px;}
-.span-one-third{width:300px;}
-.span-two-thirds{width:620px;}
-.offset-one-third{margin-left:340px;}
-.offset-two-thirds{margin-left:660px;}
-p{font-size:13px;font-weight:normal;line-height:18px;margin-bottom:9px;}p small{font-size:11px;color:#bfbfbf;}
-h1,h2,h3,h4,h5,h6{font-weight:bold;color:#404040;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{color:#bfbfbf;}
-h1{margin-bottom:18px;font-size:30px;line-height:36px;}h1 small{font-size:18px;}
-h2{font-size:24px;line-height:36px;}h2 small{font-size:14px;}
-h3,h4,h5,h6{line-height:36px;}
-h3{font-size:18px;}h3 small{font-size:14px;}
-h4{font-size:16px;}h4 small{font-size:12px;}
-h5{font-size:14px;}
-h6{font-size:13px;color:#bfbfbf;text-transform:uppercase;}
-ul,ol{margin:0 0 18px 25px;}
-ul ul,ul ol,ol ol,ol ul{margin-bottom:0;}
-ul{list-style:disc;}
-ol{list-style:decimal;}
-li{line-height:18px;color:#808080;}
-ul.unstyled{list-style:none;margin-left:0;}
-dl{margin-bottom:18px;}dl dt,dl dd{line-height:18px;}
-dl dt{font-weight:bold;}
-dl dd{margin-left:9px;}
-hr{margin:20px 0 19px;border:0;border-bottom:1px solid #eee;}
-strong{font-style:inherit;font-weight:bold;}
-em{font-style:italic;font-weight:inherit;line-height:inherit;}
-.muted{color:#bfbfbf;}
-blockquote{margin-bottom:18px;border-left:5px solid #eee;padding-left:15px;}blockquote p{font-size:14px;font-weight:300;line-height:18px;margin-bottom:0;}
-blockquote small{display:block;font-size:12px;font-weight:300;line-height:18px;color:#bfbfbf;}blockquote small:before{content:'\2014 \00A0';}
-address{display:block;line-height:18px;margin-bottom:18px;}
-code,pre{padding:0 3px 2px;font-family:Monaco, Andale Mono, Courier New, monospace;font-size:12px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
-code{background-color:#fee9cc;color:rgba(0, 0, 0, 0.75);padding:1px 3px;}
-pre{background-color:#f5f5f5;display:block;padding:8.5px;margin:0 0 18px;line-height:18px;font-size:12px;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;white-space:pre;white-space:pre-wrap;word-wrap:break-word;}
-form{margin-bottom:18px;}
-fieldset{margin-bottom:18px;padding-top:18px;}fieldset legend{display:block;padding-left:150px;font-size:19.5px;line-height:1;color:#404040;*padding:0 0 5px 145px;*line-height:1.5;}
-form .clearfix{margin-bottom:18px;zoom:1;}form .clearfix:before,form .clearfix:after{display:table;content:"";zoom:1;}
-form .clearfix:after{clear:both;}
-label,input,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:normal;}
-label{padding-top:6px;font-size:13px;line-height:18px;float:left;width:130px;text-align:right;color:#404040;}
-form .input{margin-left:150px;}
-input[type=checkbox],input[type=radio]{cursor:pointer;}
-input,textarea,select,.uneditable-input{display:inline-block;width:210px;height:18px;padding:4px;font-size:13px;line-height:18px;color:#808080;border:1px solid #ccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
-select{padding:initial;}
-input[type=checkbox],input[type=radio]{width:auto;height:auto;padding:0;margin:3px 0;*margin-top:0;line-height:normal;border:none;}
-input[type=file]{background-color:#ffffff;padding:initial;border:initial;line-height:initial;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
-input[type=button],input[type=reset],input[type=submit]{width:auto;height:auto;}
-select,input[type=file]{height:27px;*height:auto;line-height:27px;*margin-top:4px;}
-select[multiple]{height:inherit;background-color:#ffffff;}
-textarea{height:auto;}
-.uneditable-input{background-color:#ffffff;display:block;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);cursor:not-allowed;}
-:-moz-placeholder{color:#bfbfbf;}
-::-webkit-input-placeholder{color:#bfbfbf;}
-input,textarea{-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;-ms-transition:border linear 0.2s,box-shadow linear 0.2s;-o-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;-webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);}
-input:focus,textarea:focus{outline:0;border-color:rgba(82, 168, 236, 0.8);-webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);-moz-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);}
-input[type=file]:focus,input[type=checkbox]:focus,select:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;outline:1px dotted #666;}
-form .clearfix.error>label,form .clearfix.error .help-block,form .clearfix.error .help-inline{color:#b94a48;}
-form .clearfix.error input,form .clearfix.error textarea{color:#b94a48;border-color:#ee5f5b;}form .clearfix.error input:focus,form .clearfix.error textarea:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;}
-form .clearfix.error .input-prepend .add-on,form .clearfix.error .input-append .add-on{color:#b94a48;background-color:#fce6e6;border-color:#b94a48;}
-form .clearfix.warning>label,form .clearfix.warning .help-block,form .clearfix.warning .help-inline{color:#c09853;}
-form .clearfix.warning input,form .clearfix.warning textarea{color:#c09853;border-color:#ccae64;}form .clearfix.warning input:focus,form .clearfix.warning textarea:focus{border-color:#be9a3f;-webkit-box-shadow:0 0 6px #e5d6b1;-moz-box-shadow:0 0 6px #e5d6b1;box-shadow:0 0 6px #e5d6b1;}
-form .clearfix.warning .input-prepend .add-on,form .clearfix.warning .input-append .add-on{color:#c09853;background-color:#d2b877;border-color:#c09853;}
-form .clearfix.success>label,form .clearfix.success .help-block,form .clearfix.success .help-inline{color:#468847;}
-form .clearfix.success input,form .clearfix.success textarea{color:#468847;border-color:#57a957;}form .clearfix.success input:focus,form .clearfix.success textarea:focus{border-color:#458845;-webkit-box-shadow:0 0 6px #9acc9a;-moz-box-shadow:0 0 6px #9acc9a;box-shadow:0 0 6px #9acc9a;}
-form .clearfix.success .input-prepend .add-on,form .clearfix.success .input-append .add-on{color:#468847;background-color:#bcddbc;border-color:#468847;}
-.input-mini,input.mini,textarea.mini,select.mini{width:60px;}
-.input-small,input.small,textarea.small,select.small{width:90px;}
-.input-medium,input.medium,textarea.medium,select.medium{width:150px;}
-.input-large,input.large,textarea.large,select.large{width:210px;}
-.input-xlarge,input.xlarge,textarea.xlarge,select.xlarge{width:270px;}
-.input-xxlarge,input.xxlarge,textarea.xxlarge,select.xxlarge{width:530px;}
-textarea.xxlarge{overflow-y:auto;}
-input.span1,textarea.span1{display:inline-block;float:none;width:30px;margin-left:0;}
-input.span2,textarea.span2{display:inline-block;float:none;width:90px;margin-left:0;}
-input.span3,textarea.span3{display:inline-block;float:none;width:150px;margin-left:0;}
-input.span4,textarea.span4{display:inline-block;float:none;width:210px;margin-left:0;}
-input.span5,textarea.span5{display:inline-block;float:none;width:270px;margin-left:0;}
-input.span6,textarea.span6{display:inline-block;float:none;width:330px;margin-left:0;}
-input.span7,textarea.span7{display:inline-block;float:none;width:390px;margin-left:0;}
-input.span8,textarea.span8{display:inline-block;float:none;width:450px;margin-left:0;}
-input.span9,textarea.span9{display:inline-block;float:none;width:510px;margin-left:0;}
-input.span10,textarea.span10{display:inline-block;float:none;width:570px;margin-left:0;}
-input.span11,textarea.span11{display:inline-block;float:none;width:630px;margin-left:0;}
-input.span12,textarea.span12{display:inline-block;float:none;width:690px;margin-left:0;}
-input.span13,textarea.span13{display:inline-block;float:none;width:750px;margin-left:0;}
-input.span14,textarea.span14{display:inline-block;float:none;width:810px;margin-left:0;}
-input.span15,textarea.span15{display:inline-block;float:none;width:870px;margin-left:0;}
-input.span16,textarea.span16{display:inline-block;float:none;width:930px;margin-left:0;}
-input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{background-color:#f5f5f5;border-color:#ddd;cursor:not-allowed;}
-.actions{background:#f5f5f5;margin-top:18px;margin-bottom:18px;padding:17px 20px 18px 150px;border-top:1px solid #ddd;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;}.actions .secondary-action{float:right;}.actions .secondary-action a{line-height:30px;}.actions .secondary-action a:hover{text-decoration:underline;}
-.help-inline,.help-block{font-size:13px;line-height:18px;color:#bfbfbf;}
-.help-inline{padding-left:5px;*position:relative;*top:-5px;}
-.help-block{display:block;max-width:600px;}
-.inline-inputs{color:#808080;}.inline-inputs span{padding:0 2px 0 1px;}
-.input-prepend input,.input-append input{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}
-.input-prepend .add-on,.input-append .add-on{position:relative;background:#f5f5f5;border:1px solid #ccc;z-index:2;float:left;display:block;width:auto;min-width:16px;height:18px;padding:4px 4px 4px 5px;margin-right:-1px;font-weight:normal;line-height:18px;color:#bfbfbf;text-align:center;text-shadow:0 1px 0 #ffffff;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
-.input-prepend .active,.input-append .active{background:#a9dba9;border-color:#46a546;}
-.input-prepend .add-on{*margin-top:1px;}
-.input-append input{float:left;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
-.input-append .add-on{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;margin-right:0;margin-left:-1px;}
-.inputs-list{margin:0 0 5px;width:100%;}.inputs-list li{display:block;padding:0;width:100%;}
-.inputs-list label{display:block;float:none;width:auto;padding:0;margin-left:20px;line-height:18px;text-align:left;white-space:normal;}.inputs-list label strong{color:#808080;}
-.inputs-list label small{font-size:11px;font-weight:normal;}
-.inputs-list .inputs-list{margin-left:25px;margin-bottom:10px;padding-top:0;}
-.inputs-list:first-child{padding-top:6px;}
-.inputs-list li+li{padding-top:2px;}
-.inputs-list input[type=radio],.inputs-list input[type=checkbox]{margin-bottom:0;margin-left:-20px;float:left;}
-.form-stacked{padding-left:20px;}.form-stacked fieldset{padding-top:9px;}
-.form-stacked legend{padding-left:0;}
-.form-stacked label{display:block;float:none;width:auto;font-weight:bold;text-align:left;line-height:20px;padding-top:0;}
-.form-stacked .clearfix{margin-bottom:9px;}.form-stacked .clearfix div.input{margin-left:0;}
-.form-stacked .inputs-list{margin-bottom:0;}.form-stacked .inputs-list li{padding-top:0;}.form-stacked .inputs-list li label{font-weight:normal;padding-top:0;}
-.form-stacked div.clearfix.error{padding-top:10px;padding-bottom:10px;padding-left:10px;margin-top:0;margin-left:-10px;}
-.form-stacked .actions{margin-left:-20px;padding-left:20px;}
-.condensed-table th,.condensed-table td{padding:5px 5px 4px;}
-.bordered-table{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.bordered-table th+th,.bordered-table td+td,.bordered-table th+td{border-left:1px solid #ddd;}
-.bordered-table thead tr:first-child th:first-child,.bordered-table tbody tr:first-child td:first-child{-webkit-border-radius:4px 0 0 0;-moz-border-radius:4px 0 0 0;border-radius:4px 0 0 0;}
-.bordered-table thead tr:first-child th:last-child,.bordered-table tbody tr:first-child td:last-child{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;border-radius:0 4px 0 0;}
-.bordered-table tbody tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;}
-.bordered-table tbody tr:last-child td:last-child{-webkit-border-radius:0 0 4px 0;-moz-border-radius:0 0 4px 0;border-radius:0 0 4px 0;}
-table .span1{width:20px;}
-table .span2{width:60px;}
-table .span3{width:100px;}
-table .span4{width:140px;}
-table .span5{width:180px;}
-table .span6{width:220px;}
-table .span7{width:260px;}
-table .span8{width:300px;}
-table .span9{width:340px;}
-table .span10{width:380px;}
-table .span11{width:420px;}
-table .span12{width:460px;}
-table .span13{width:500px;}
-table .span14{width:540px;}
-table .span15{width:580px;}
-table .span16{width:620px;}
-.zebra-striped tbody tr:nth-child(odd) td,.zebra-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9;}
-.zebra-striped tbody tr:hover td,.zebra-striped tbody tr:hover th{background-color:#f5f5f5;}
-table .header{cursor:pointer;}table .header:after{content:"";float:right;margin-top:7px;border-width:0 4px 4px;border-style:solid;border-color:#000 transparent;visibility:hidden;}
-table .headerSortUp,table .headerSortDown{background-color:rgba(141, 192, 219, 0.25);text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);}
-table .header:hover:after{visibility:visible;}
-table .headerSortDown:after,table .headerSortDown:hover:after{visibility:visible;filter:alpha(opacity=60);-khtml-opacity:0.6;-moz-opacity:0.6;opacity:0.6;}
-table .headerSortUp:after{border-bottom:none;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000;visibility:visible;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:alpha(opacity=60);-khtml-opacity:0.6;-moz-opacity:0.6;opacity:0.6;}
-table .blue{color:#049cdb;border-bottom-color:#049cdb;}
-table .headerSortUp.blue,table .headerSortDown.blue{background-color:#ade6fe;}
-table .green{color:#46a546;border-bottom-color:#46a546;}
-table .headerSortUp.green,table .headerSortDown.green{background-color:#cdeacd;}
-table .red{color:#9d261d;border-bottom-color:#9d261d;}
-table .headerSortUp.red,table .headerSortDown.red{background-color:#f4c8c5;}
-table .yellow{color:#ffc40d;border-bottom-color:#ffc40d;}
-table .headerSortUp.yellow,table .headerSortDown.yellow{background-color:#fff6d9;}
-table .orange{color:#f89406;border-bottom-color:#f89406;}
-table .headerSortUp.orange,table .headerSortDown.orange{background-color:#fee9cc;}
-table .purple{color:#7a43b6;border-bottom-color:#7a43b6;}
-table .headerSortUp.purple,table .headerSortDown.purple{background-color:#e2d5f0;}
-.topbar{height:40px;position:fixed;top:0;left:0;right:0;z-index:10000;overflow:visible;}.topbar a{color:#bfbfbf;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);}
-.topbar h3 a:hover,.topbar .brand:hover,.topbar ul .active>a{background-color:#333;background-color:rgba(255, 255, 255, 0.05);color:#ffffff;text-decoration:none;}
-.topbar h3{position:relative;}
-.topbar h3 a,.topbar .brand{float:left;display:block;padding:8px 20px 12px;margin-left:-20px;color:#ffffff;font-size:20px;font-weight:200;line-height:1;}
-.topbar p{margin:0;line-height:40px;}.topbar p a:hover{background-color:transparent;color:#ffffff;}
-.topbar form{float:left;margin:5px 0 0 0;position:relative;filter:alpha(opacity=100);-khtml-opacity:1;-moz-opacity:1;opacity:1;}
-.topbar form.pull-right{float:right;}
-.topbar input{background-color:#444;background-color:rgba(255, 255, 255, 0.3);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:normal;font-weight:13px;line-height:1;padding:4px 9px;color:#ffffff;color:rgba(255, 255, 255, 0.75);border:1px solid #111;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none;}.topbar input:-moz-placeholder{color:#e6e6e6;}
-.topbar input::-webkit-input-placeholder{color:#e6e6e6;}
-.topbar input:hover{background-color:#bfbfbf;background-color:rgba(255, 255, 255, 0.5);color:#ffffff;}
-.topbar input:focus,.topbar input.focused{outline:0;background-color:#ffffff;color:#404040;text-shadow:0 1px 0 #ffffff;border:0;padding:5px 10px;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);}
-.topbar-inner,.topbar .fill{background-color:#222;background-color:#222222;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);}
-.topbar div>ul,.nav{display:block;float:left;margin:0 10px 0 0;position:relative;left:0;}.topbar div>ul>li,.nav>li{display:block;float:left;}
-.topbar div>ul a,.nav a{display:block;float:none;padding:10px 10px 11px;line-height:19px;text-decoration:none;}.topbar div>ul a:hover,.nav a:hover{color:#ffffff;text-decoration:none;}
-.topbar div>ul .active>a,.nav .active>a{background-color:#222;background-color:rgba(0, 0, 0, 0.5);}
-.topbar div>ul.secondary-nav,.nav.secondary-nav{float:right;margin-left:10px;margin-right:0;}.topbar div>ul.secondary-nav .menu-dropdown,.nav.secondary-nav .menu-dropdown,.topbar div>ul.secondary-nav .dropdown-menu,.nav.secondary-nav .dropdown-menu{right:0;border:0;}
-.topbar div>ul a.menu:hover,.nav a.menu:hover,.topbar div>ul li.open .menu,.nav li.open .menu,.topbar div>ul .dropdown-toggle:hover,.nav .dropdown-toggle:hover,.topbar div>ul .dropdown.open .dropdown-toggle,.nav .dropdown.open .dropdown-toggle{background:#444;background:rgba(255, 255, 255, 0.05);}
-.topbar div>ul .menu-dropdown,.nav .menu-dropdown,.topbar div>ul .dropdown-menu,.nav .dropdown-menu{background-color:#333;}.topbar div>ul .menu-dropdown a.menu,.nav .menu-dropdown a.menu,.topbar div>ul .dropdown-menu a.menu,.nav .dropdown-menu a.menu,.topbar div>ul .menu-dropdown .dropdown-toggle,.nav .menu-dropdown .dropdown-toggle,.topbar div>ul .dropdown-menu .dropdown-toggle,.nav .dropdown-menu .dropdown-toggle{color:#ffffff;}.topbar div>ul .menu-dropdown a.menu.open,.nav .menu-dropdown a.menu.open,.topbar div>ul .dropdown-menu a.menu.open,.nav .dropdown-menu a.menu.open,.topbar div>ul .menu-dropdown .dropdown-toggle.open,.nav .menu-dropdown .dropdown-toggle.open,.topbar div>ul .dropdown-menu .dropdown-toggle.open,.nav .dropdown-menu .dropdown-toggle.open{background:#444;background:rgba(255, 255, 255, 0.05);}
-.topbar div>ul .menu-dropdown li a,.nav .menu-dropdown li a,.topbar div>ul .dropdown-menu li a,.nav .dropdown-menu li a{color:#999;text-shadow:0 1px 0 rgba(0, 0, 0, 0.5);}.topbar div>ul .menu-dropdown li a:hover,.nav .menu-dropdown li a:hover,.topbar div>ul .dropdown-menu li a:hover,.nav .dropdown-menu li a:hover{background-color:#191919;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#292929), to(#191919));background-image:-moz-linear-gradient(top, #292929, #191919);background-image:-ms-linear-gradient(top, #292929, #191919);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #292929), color-stop(100%, #191919));background-image:-webkit-linear-gradient(top, #292929, #191919);background-image:-o-linear-gradient(top, #292929, #191919);background-image:linear-gradient(top, #292929, #191919);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#292929', endColorstr='#191919', GradientType=0);color:#ffffff;}
-.topbar div>ul .menu-dropdown .active a,.nav .menu-dropdown .active a,.topbar div>ul .dropdown-menu .active a,.nav .dropdown-menu .active a{color:#ffffff;}
-.topbar div>ul .menu-dropdown .divider,.nav .menu-dropdown .divider,.topbar div>ul .dropdown-menu .divider,.nav .dropdown-menu .divider{background-color:#222;border-color:#444;}
-.topbar ul .menu-dropdown li a,.topbar ul .dropdown-menu li a{padding:4px 15px;}
-li.menu,.dropdown{position:relative;}
-a.menu:after,.dropdown-toggle:after{width:0;height:0;display:inline-block;content:"&darr;";text-indent:-99999px;vertical-align:top;margin-top:8px;margin-left:4px;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #ffffff;filter:alpha(opacity=50);-khtml-opacity:0.5;-moz-opacity:0.5;opacity:0.5;}
-.menu-dropdown,.dropdown-menu{background-color:#ffffff;float:left;display:none;position:absolute;top:40px;z-index:900;min-width:160px;max-width:220px;_width:160px;margin-left:0;margin-right:0;padding:6px 0;zoom:1;border-color:#999;border-color:rgba(0, 0, 0, 0.2);border-style:solid;border-width:0 1px 1px;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.menu-dropdown li,.dropdown-menu li{float:none;display:block;background-color:none;}
-.menu-dropdown .divider,.dropdown-menu .divider{height:1px;margin:5px 0;overflow:hidden;background-color:#eee;border-bottom:1px solid #ffffff;}
-.topbar .dropdown-menu a,.dropdown-menu a{display:block;padding:4px 15px;clear:both;font-weight:normal;line-height:18px;color:#808080;text-shadow:0 1px 0 #ffffff;}.topbar .dropdown-menu a:hover,.dropdown-menu a:hover,.topbar .dropdown-menu a.hover,.dropdown-menu a.hover{background-color:#dddddd;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#eeeeee), to(#dddddd));background-image:-moz-linear-gradient(top, #eeeeee, #dddddd);background-image:-ms-linear-gradient(top, #eeeeee, #dddddd);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, #dddddd));background-image:-webkit-linear-gradient(top, #eeeeee, #dddddd);background-image:-o-linear-gradient(top, #eeeeee, #dddddd);background-image:linear-gradient(top, #eeeeee, #dddddd);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#dddddd', GradientType=0);color:#404040;text-decoration:none;-webkit-box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.025),inset 0 -1px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.025),inset 0 -1px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.025),inset 0 -1px rgba(0, 0, 0, 0.025);}
-.open .menu,.dropdown.open .menu,.open .dropdown-toggle,.dropdown.open .dropdown-toggle{color:#ffffff;background:#ccc;background:rgba(0, 0, 0, 0.3);}
-.open .menu-dropdown,.dropdown.open .menu-dropdown,.open .dropdown-menu,.dropdown.open .dropdown-menu{display:block;}
-.tabs,.pills{margin:0 0 18px;padding:0;list-style:none;zoom:1;}.tabs:before,.pills:before,.tabs:after,.pills:after{display:table;content:"";zoom:1;}
-.tabs:after,.pills:after{clear:both;}
-.tabs>li,.pills>li{float:left;}.tabs>li>a,.pills>li>a{display:block;}
-.tabs{border-color:#ddd;border-style:solid;border-width:0 0 1px;}.tabs>li{position:relative;margin-bottom:-1px;}.tabs>li>a{padding:0 15px;margin-right:2px;line-height:34px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}.tabs>li>a:hover{text-decoration:none;background-color:#eee;border-color:#eee #eee #ddd;}
-.tabs .active>a,.tabs .active>a:hover{color:#808080;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default;}
-.tabs .menu-dropdown,.tabs .dropdown-menu{top:35px;border-width:1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px;}
-.tabs a.menu:after,.tabs .dropdown-toggle:after{border-top-color:#999;margin-top:15px;margin-left:5px;}
-.tabs li.open.menu .menu,.tabs .open.dropdown .dropdown-toggle{border-color:#999;}
-.tabs li.open a.menu:after,.tabs .dropdown.open .dropdown-toggle:after{border-top-color:#555;}
-.pills a{margin:5px 3px 5px 0;padding:0 15px;line-height:30px;text-shadow:0 1px 1px #ffffff;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}.pills a:hover{color:#ffffff;text-decoration:none;text-shadow:0 1px 1px rgba(0, 0, 0, 0.25);background-color:#00438a;}
-.pills .active a{color:#ffffff;text-shadow:0 1px 1px rgba(0, 0, 0, 0.25);background-color:#0069d6;}
-.pills-vertical>li{float:none;}
-.tab-content>.tab-pane,.pill-content>.pill-pane,.tab-content>div,.pill-content>div{display:none;}
-.tab-content>.active,.pill-content>.active{display:block;}
-.breadcrumb{padding:7px 14px;margin:0 0 18px;background-color:#f5f5f5;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#ffffff), to(#f5f5f5));background-image:-moz-linear-gradient(top, #ffffff, #f5f5f5);background-image:-ms-linear-gradient(top, #ffffff, #f5f5f5);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #f5f5f5));background-image:-webkit-linear-gradient(top, #ffffff, #f5f5f5);background-image:-o-linear-gradient(top, #ffffff, #f5f5f5);background-image:linear-gradient(top, #ffffff, #f5f5f5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;}.breadcrumb li{display:inline;text-shadow:0 1px 0 #ffffff;}
-.breadcrumb .divider{padding:0 5px;color:#bfbfbf;}
-.breadcrumb .active a{color:#404040;}
-.hero-unit{background-color:#f5f5f5;margin-bottom:30px;padding:60px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;}
-.hero-unit p{font-size:18px;font-weight:200;line-height:27px;}
-footer{margin-top:17px;padding-top:17px;border-top:1px solid #eee;}
-.page-header{margin-bottom:17px;border-bottom:1px solid #ddd;-webkit-box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);-moz-box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}.page-header h1{margin-bottom:8px;}
-.btn.danger,.alert-message.danger,.btn.danger:hover,.alert-message.danger:hover,.btn.error,.alert-message.error,.btn.error:hover,.alert-message.error:hover,.btn.success,.alert-message.success,.btn.success:hover,.alert-message.success:hover,.btn.info,.alert-message.info,.btn.info:hover,.alert-message.info:hover{color:#ffffff;}
-.btn .close,.alert-message .close{font-family:Arial,sans-serif;line-height:18px;}
-.btn.danger,.alert-message.danger,.btn.error,.alert-message.error{background-color:#c43c35;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-ms-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(top, #ee5f5b, #c43c35);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#c43c35 #c43c35 #882a25;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);}
-.btn.success,.alert-message.success{background-color:#57a957;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#62c462), to(#57a957));background-image:-moz-linear-gradient(top, #62c462, #57a957);background-image:-ms-linear-gradient(top, #62c462, #57a957);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957));background-image:-webkit-linear-gradient(top, #62c462, #57a957);background-image:-o-linear-gradient(top, #62c462, #57a957);background-image:linear-gradient(top, #62c462, #57a957);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#57a957 #57a957 #3d773d;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);}
-.btn.info,.alert-message.info{background-color:#339bb9;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#5bc0de), to(#339bb9));background-image:-moz-linear-gradient(top, #5bc0de, #339bb9);background-image:-ms-linear-gradient(top, #5bc0de, #339bb9);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #5bc0de), color-stop(100%, #339bb9));background-image:-webkit-linear-gradient(top, #5bc0de, #339bb9);background-image:-o-linear-gradient(top, #5bc0de, #339bb9);background-image:linear-gradient(top, #5bc0de, #339bb9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#339bb9 #339bb9 #22697d;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);}
-.btn{cursor:pointer;display:inline-block;background-color:#e6e6e6;background-repeat:no-repeat;background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:-moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);background-image:-ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:-o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);padding:5px 14px 6px;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);color:#333;font-size:13px;line-height:normal;border:1px solid #ccc;border-bottom-color:#bbb;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-webkit-transition:0.1s linear all;-moz-transition:0.1s linear all;-ms-transition:0.1s linear all;-o-transition:0.1s linear all;transition:0.1s linear all;}.btn:hover{background-position:0 -15px;color:#333;text-decoration:none;}
-.btn:focus{outline:1px dotted #666;}
-.btn.primary{color:#ffffff;background-color:#0064cd;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));background-image:-moz-linear-gradient(top, #049cdb, #0064cd);background-image:-ms-linear-gradient(top, #049cdb, #0064cd);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));background-image:-webkit-linear-gradient(top, #049cdb, #0064cd);background-image:-o-linear-gradient(top, #049cdb, #0064cd);background-image:linear-gradient(top, #049cdb, #0064cd);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#0064cd #0064cd #003f81;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);}
-.btn.active,.btn :active{-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);}
-.btn.disabled{cursor:default;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=65);-khtml-opacity:0.65;-moz-opacity:0.65;opacity:0.65;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
-.btn[disabled]{cursor:default;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=65);-khtml-opacity:0.65;-moz-opacity:0.65;opacity:0.65;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
-.btn.large{font-size:15px;line-height:normal;padding:9px 14px 9px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
-.btn.small{padding:7px 9px 7px;font-size:11px;}
-:root .alert-message,:root .btn{border-radius:0 \0;}
-button.btn::-moz-focus-inner,input[type=submit].btn::-moz-focus-inner{padding:0;border:0;}
-.close{float:right;color:#000000;font-size:20px;font-weight:bold;line-height:13.5px;text-shadow:0 1px 0 #ffffff;filter:alpha(opacity=25);-khtml-opacity:0.25;-moz-opacity:0.25;opacity:0.25;}.close:hover{color:#000000;text-decoration:none;filter:alpha(opacity=40);-khtml-opacity:0.4;-moz-opacity:0.4;opacity:0.4;}
-.alert-message{position:relative;padding:7px 15px;margin-bottom:18px;color:#404040;background-color:#eedc94;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#fceec1), to(#eedc94));background-image:-moz-linear-gradient(top, #fceec1, #eedc94);background-image:-ms-linear-gradient(top, #fceec1, #eedc94);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fceec1), color-stop(100%, #eedc94));background-image:-webkit-linear-gradient(top, #fceec1, #eedc94);background-image:-o-linear-gradient(top, #fceec1, #eedc94);background-image:linear-gradient(top, #fceec1, #eedc94);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fceec1', endColorstr='#eedc94', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#eedc94 #eedc94 #e4c652;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);border-width:1px;border-style:solid;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);}.alert-message .close{margin-top:1px;*margin-top:0;}
-.alert-message a{font-weight:bold;color:#404040;}
-.alert-message.danger p a,.alert-message.error p a,.alert-message.success p a,.alert-message.info p a{color:#ffffff;}
-.alert-message h5{line-height:18px;}
-.alert-message p{margin-bottom:0;}
-.alert-message div{margin-top:5px;margin-bottom:2px;line-height:28px;}
-.alert-message .btn{-webkit-box-shadow:0 1px 0 rgba(255, 255, 255, 0.25);-moz-box-shadow:0 1px 0 rgba(255, 255, 255, 0.25);box-shadow:0 1px 0 rgba(255, 255, 255, 0.25);}
-.alert-message.block-message{background-image:none;background-color:#fdf5d9;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);padding:14px;border-color:#fceec1;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}.alert-message.block-message ul,.alert-message.block-message p{margin-right:30px;}
-.alert-message.block-message ul{margin-bottom:0;}
-.alert-message.block-message li{color:#404040;}
-.alert-message.block-message .alert-actions{margin-top:5px;}
-.alert-message.block-message.error,.alert-message.block-message.success,.alert-message.block-message.info{color:#404040;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}
-.alert-message.block-message.error{background-color:#fddfde;border-color:#fbc7c6;}
-.alert-message.block-message.success{background-color:#d1eed1;border-color:#bfe7bf;}
-.alert-message.block-message.info{background-color:#ddf4fb;border-color:#c6edf9;}
-.alert-message.block-message.danger p a,.alert-message.block-message.error p a,.alert-message.block-message.success p a,.alert-message.block-message.info p a{color:#404040;}
-.pagination{height:36px;margin:18px 0;}.pagination ul{float:left;margin:0;border:1px solid #ddd;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);}
-.pagination li{display:inline;}
-.pagination a{float:left;padding:0 14px;line-height:34px;border-right:1px solid;border-right-color:#ddd;border-right-color:rgba(0, 0, 0, 0.15);*border-right-color:#ddd;text-decoration:none;}
-.pagination a:hover,.pagination .active a{background-color:#c7eefe;}
-.pagination .disabled a,.pagination .disabled a:hover{background-color:transparent;color:#bfbfbf;}
-.pagination .next a{border:0;}
-.well{background-color:#f5f5f5;margin-bottom:20px;padding:19px;min-height:20px;border:1px solid #eee;border:1px solid rgba(0, 0, 0, 0.05);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);}
-.modal-backdrop{background-color:#000000;position:fixed;top:0;left:0;right:0;bottom:0;z-index:10000;}.modal-backdrop.fade{opacity:0;}
-.modal-backdrop,.modal-backdrop.fade.in{filter:alpha(opacity=80);-khtml-opacity:0.8;-moz-opacity:0.8;opacity:0.8;}
-.modal{position:fixed;top:50%;left:50%;z-index:11000;width:560px;margin:-250px 0 0 -280px;background-color:#ffffff;border:1px solid #999;border:1px solid rgba(0, 0, 0, 0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.modal .close{margin-top:7px;}
-.modal.fade{-webkit-transition:opacity .3s linear, top .3s ease-out;-moz-transition:opacity .3s linear, top .3s ease-out;-ms-transition:opacity .3s linear, top .3s ease-out;-o-transition:opacity .3s linear, top .3s ease-out;transition:opacity .3s linear, top .3s ease-out;top:-25%;}
-.modal.fade.in{top:50%;}
-.modal-header{border-bottom:1px solid #eee;padding:5px 15px;}
-.modal-body{padding:15px;}
-.modal-body form{margin-bottom:0;}
-.modal-footer{background-color:#f5f5f5;padding:14px 15px 15px;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;zoom:1;margin-bottom:0;}.modal-footer:before,.modal-footer:after{display:table;content:"";zoom:1;}
-.modal-footer:after{clear:both;}
-.modal-footer .btn{float:right;margin-left:5px;}
-.modal .popover,.modal .twipsy{z-index:12000;}
-.twipsy{display:block;position:absolute;visibility:visible;padding:5px;font-size:11px;z-index:1000;filter:alpha(opacity=80);-khtml-opacity:0.8;-moz-opacity:0.8;opacity:0.8;}.twipsy.fade.in{filter:alpha(opacity=80);-khtml-opacity:0.8;-moz-opacity:0.8;opacity:0.8;}
-.twipsy.above .twipsy-arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;}
-.twipsy.left .twipsy-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;}
-.twipsy.below .twipsy-arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;}
-.twipsy.right .twipsy-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;}
-.twipsy-inner{padding:3px 8px;background-color:#000000;color:white;text-align:center;max-width:200px;text-decoration:none;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
-.twipsy-arrow{position:absolute;width:0;height:0;}
-.popover{position:absolute;top:0;left:0;z-index:1000;padding:5px;display:none;}.popover.above .arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;}
-.popover.right .arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;}
-.popover.below .arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;}
-.popover.left .arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;}
-.popover .arrow{position:absolute;width:0;height:0;}
-.popover .inner{background:#000000;background:rgba(0, 0, 0, 0.8);padding:3px;overflow:hidden;width:280px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);}
-.popover .title{background-color:#f5f5f5;padding:9px 15px;line-height:1;-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;border-bottom:1px solid #eee;}
-.popover .content{background-color:#ffffff;padding:14px;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.popover .content p,.popover .content ul,.popover .content ol{margin-bottom:0;}
-.fade{-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-ms-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear;opacity:0;}.fade.in{opacity:1;}
-.label{padding:1px 3px 2px;font-size:9.75px;font-weight:bold;color:#ffffff;text-transform:uppercase;white-space:nowrap;background-color:#bfbfbf;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.label.important{background-color:#c43c35;}
-.label.warning{background-color:#f89406;}
-.label.success{background-color:#46a546;}
-.label.notice{background-color:#62cffc;}
-.media-grid{margin-left:-20px;margin-bottom:0;zoom:1;}.media-grid:before,.media-grid:after{display:table;content:"";zoom:1;}
-.media-grid:after{clear:both;}
-.media-grid li{display:inline;}
-.media-grid a{float:left;padding:4px;margin:0 0 18px 20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);}.media-grid a img{display:block;}
-.media-grid a:hover{border-color:#0069d6;-webkit-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);-moz-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);} \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/sample/org_chart/css/custom.css b/ecomp-portal-BE/war/static/fusion/sample/org_chart/css/custom.css
deleted file mode 100644
index b7df8c25..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/org_chart/css/custom.css
+++ /dev/null
@@ -1,97 +0,0 @@
-body, html, div, p, span, a, h1, h2, h3, h4, h5{
- margin : 0;
- padding : 0;
-}
-
-body, html{
- width : 100%;
-}
-
-body{
- color : white;
- font-family : tahoma;
- font-weight : lighter;
- padding-top : 40px;
-}
-
- body p{
- font-size : 14px;
- }
-
- body p a{
- font-size : 16px;
- }
-
-h1 {
- color : #E05E00;
- font-style : italic;
-}
-
-a{
- color : #E05E00;
- text-decoration : none;
-}
-
-a:hover{
- text-decoration : underline;
-}
-
-/* general */
-.clear {
- clear: both;
-}
-
-/* Header */
-.brand{
- color : #E05E00 !important;
- font-family : georgia;
- font-style : italic;
-}
-
-/* list stuff */
-#org{
- background-color : white;
- margin : 10px;
- padding : 10px;
-}
-
-#show-list{
- cursor : pointer;
-}
-
-/* bootstrap overrides */
-.alert-message{
- margin: 2px 0;
-}
-
-.topbar{
- position : absolute;
-}
-
-/* Custom chart styling */
-.jOrgChart {
- margin : 10px;
- padding : 20px;
-}
-
-/* Custom node styling */
-.jOrgChart .node {
- font-weight : bold;
- font-size : 14px;
- background-color : #D5D6DB;
- border-radius : 8px;
- border : 5px solid gray;
- color : #793a06;
- -moz-border-radius : 8px;
-}
- .node p{
- font-family : tahoma;
- font-size : 10px;
- line-height : 11px;
- padding : 2px;
- }
-
-table {
- margin-left: auto;
- margin-right: auto;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/sample/org_chart/css/jquery.jOrgChart.css b/ecomp-portal-BE/war/static/fusion/sample/org_chart/css/jquery.jOrgChart.css
deleted file mode 100644
index ffabe274..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/org_chart/css/jquery.jOrgChart.css
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Basic styling */
-/* Draw the lines */
-.jOrgChart .line {
- height : 20px;
- width : 4px;
-}
-
-.jOrgChart .down {
- background-color : black;
- margin : 0px auto;
-}
-
-.jOrgChart .top {
- border-top : 3px solid black;
-}
-
-.jOrgChart .left {
- border-right : 2px solid black;
-}
-
-.jOrgChart .right {
- border-left : 2px solid black;
-}
-
-/* node cell */
-.jOrgChart td {
- text-align : center;
- vertical-align : top;
- padding : 0;
-}
-
-/* The node */
-.jOrgChart .node {
- background-color : #35363B;
- display : inline-block;
- width : 120px;
- height : 60px;
- z-index : 10;
- margin : 0 2px;
-}
-
-/* jQuery drag 'n drop */
-
-.drag-active {
- border-style : dashed !important;
-}
-
-.drop-hover {
- border-style : solid !important;
- border-color : #E05E00 !important;
-}
diff --git a/ecomp-portal-BE/war/static/fusion/sample/org_chart/css/prettify.css b/ecomp-portal-BE/war/static/fusion/sample/org_chart/css/prettify.css
deleted file mode 100644
index d44b3a22..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/org_chart/css/prettify.css
+++ /dev/null
@@ -1 +0,0 @@
-.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/sample/org_chart/example.html b/ecomp-portal-BE/war/static/fusion/sample/org_chart/example.html
deleted file mode 100644
index 543b0f92..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/org_chart/example.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<!DOCTYPE html>
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>jOrgChart - A jQuery OrgChart Plugin</title>
- <link rel="stylesheet" href="css/bootstrap.min.css"/>
- <link rel="stylesheet" href="css/jquery.jOrgChart.css"/>
- <link rel="stylesheet" href="css/custom.css"/>
- <link href="css/prettify.css" type="text/css" rel="stylesheet" />
-
- <script type="text/javascript" src="prettify.js"></script>
-
- <!-- jQuery includes -->
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
-
- <script src="jquery.jOrgChart.js"></script>
-
- <script>
- jQuery(document).ready(function() {
- $("#org").jOrgChart({
- chartElement : '#chart',
- dragAndDrop : true
- });
- });
- </script>
- </head>
-
- <body onload="prettyPrint();">
- <ul id="org" style="display:none">
- <li>Product 1<br/>
- <ul>
- <li>Service 1<br/>
- <ul>
- <li>Resource 1<br/></li>
- <li>Resource 2<br/></li>
- <li>Resource 3<br/></li>
- <li>Resource 4<br/></li>
- <li>Resource 5<br/></li>
- </ul>
- </li>
- <li>Service 6<br/></li>
- <li>Service 7<br/>
- <ul>
- <li>Resource 8<br/></li>
- <li>Resource 9<br/></li>
- <li>Resource 10<br/></li>
- <li>Resource 11<br/></li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
-
- <div id="chart" class="orgChart"></div>
-
- <script>
- jQuery(document).ready(function() {
-
- /* Custom jQuery for the example */
- $("#show-list").click(function(e){
- e.preventDefault();
-
- $('#list-html').toggle('fast', function(){
- if($(this).is(':visible')){
- $('#show-list').text('Hide underlying list.');
- $(".topbar").fadeTo('fast',0.9);
- }else{
- $('#show-list').text('Show underlying list.');
- $(".topbar").fadeTo('fast',1);
- }
- });
- });
-
- $('#list-html').text($('#org').html());
-
- $("#org").bind("DOMSubtreeModified", function() {
- $('#list-html').text('');
-
- $('#list-html').text($('#org').html());
-
- prettyPrint();
- });
- });
- </script>
-</body>
-</html> \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/sample/org_chart/example_vsp.html b/ecomp-portal-BE/war/static/fusion/sample/org_chart/example_vsp.html
deleted file mode 100644
index a2e3703d..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/org_chart/example_vsp.html
+++ /dev/null
@@ -1,88 +0,0 @@
-<!DOCTYPE html>
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>jOrgChart - A jQuery OrgChart Plugin</title>
- <link rel="stylesheet" href="css/bootstrap.min.css"/>
- <link rel="stylesheet" href="css/jquery.jOrgChart.css"/>
- <link rel="stylesheet" href="css/custom.css"/>
- <link href="css/prettify.css" type="text/css" rel="stylesheet" />
-
- <script type="text/javascript" src="prettify.js"></script>
-
- <!-- jQuery includes -->
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
-
- <script src="jquery.jOrgChart.js"></script>
-
- <script>
- jQuery(document).ready(function() {
- $("#org").jOrgChart({
- chartElement : '#chart',
- dragAndDrop : true
- });
- });
- </script>
- </head>
-
- <body onload="prettyPrint();">
- <ul id="org" style="display:none">
- <li>Trinity<br/>
- <ul>
- <li>Call Forwarding<br/>
- <ul>
- <li>Call Forwarding Busy<br/></li>
- <li>Call Forwarding Always<br/></li>
- <li>Call Forwarding Not Reachable<br/></li>
- </ul>
- </li>
- <li>Dial Restrictions<br/>
- <ul>
- <li>Outgoing Calls<br/></li>
- <li>Redirecting Calls<br/></li>
- <li>Incoming Calls<br/></li>
- </ul>
- </li>
- <li>Messaging<br/>
- <ul>
- <li>Voice Management<br/></li>
- <li>Greetings<br/></li>
- <li>Fax Messaging<br/></li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
-
- <div id="chart" class="orgChart"></div>
-
- <script>
- jQuery(document).ready(function() {
-
- /* Custom jQuery for the example */
- $("#show-list").click(function(e){
- e.preventDefault();
-
- $('#list-html').toggle('fast', function(){
- if($(this).is(':visible')){
- $('#show-list').text('Hide underlying list.');
- $(".topbar").fadeTo('fast',0.9);
- }else{
- $('#show-list').text('Show underlying list.');
- $(".topbar").fadeTo('fast',1);
- }
- });
- });
-
- $('#list-html').text($('#org').html());
-
- $("#org").bind("DOMSubtreeModified", function() {
- $('#list-html').text('');
-
- $('#list-html').text($('#org').html());
-
- prettyPrint();
- });
- });
- </script>
- </body>
-</html> \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/sample/org_chart/jquery.jOrgChart.js b/ecomp-portal-BE/war/static/fusion/sample/org_chart/jquery.jOrgChart.js
deleted file mode 100644
index 89411b29..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/org_chart/jquery.jOrgChart.js
+++ /dev/null
@@ -1,267 +0,0 @@
-/**
- * jQuery org-chart/tree plugin.
- *
- * Author: Wes Nolte
- * http://twitter.com/wesnolte
- *
- * Based on the work of Mark Lee
- * http://www.capricasoftware.co.uk
- *
- * Copyright (c) 2011 Wesley Nolte
- * Dual licensed under the MIT and GPL licenses.
- *
- */
-(function($) {
-
- $.fn.jOrgChart = function(options) {
- var opts = $.extend({}, $.fn.jOrgChart.defaults, options);
- var $appendTo = $(opts.chartElement);
-
- // build the tree
- $this = $(this);
- var $container = $("<div class='" + opts.chartClass + "'/>");
- if($this.is("ul")) {
- buildNode($this.find("li:first"), $container, 0, opts);
- }
- else if($this.is("li")) {
- buildNode($this, $container, 0, opts);
- }
- $appendTo.append($container);
-
- // add drag and drop if enabled
- if(opts.dragAndDrop){
- $('div.node').draggable({
- cursor : 'move',
- distance : 40,
- helper : 'clone',
- opacity : 0.8,
- revert : true,
- revertDuration : 100,
- snap : 'div.node.expanded',
- snapMode : 'inner',
- stack : 'div.node'
- });
-
- $('div.node').droppable({
- accept : '.node',
- activeClass : 'drag-active',
- hoverClass : 'drop-hover'
- });
-
- // Drag start event handler for nodes
- $('div.node').bind("dragstart", function handleDragStart( event, ui ){
-
- var sourceNode = $(this);
- sourceNode.parentsUntil('.node-container')
- .find('*')
- .filter('.node')
- .droppable('disable');
- });
-
- // Drag stop event handler for nodes
- $('div.node').bind("dragstop", function handleDragStop( event, ui ){
-
- /* reload the plugin */
- $(opts.chartElement).children().remove();
- $this.jOrgChart(opts);
- });
-
- // Drop event handler for nodes
- $('div.node').bind("drop", function handleDropEvent( event, ui ) {
- var sourceNode = ui.draggable;
- var targetNode = $(this);
-
- // finding nodes based on plaintext and html
- // content is hard!
- var targetLi = $('li').filter(function(){
-
- li = $(this).clone()
- .children("ul,li")
- .remove()
- .end();
- var attr = li.attr('id');
- if (typeof attr !== 'undefined' && attr !== false) {
- return li.attr("id") == targetNode.attr("id");
- }
- else {
- return li.html() == targetNode.html();
- }
-
- });
-
- var sourceLi = $('li').filter(function(){
-
- li = $(this).clone()
- .children("ul,li")
- .remove()
- .end();
- var attr = li.attr('id');
- if (typeof attr !== 'undefined' && attr !== false) {
- return li.attr("id") == sourceNode.attr("id");
- }
- else {
- return li.html() == sourceNode.html();
- }
-
- });
-
- var sourceliClone = sourceLi.clone();
- var sourceUl = sourceLi.parent('ul');
-
- if(sourceUl.children('li').size() > 1){
- sourceLi.remove();
- }else{
- sourceUl.remove();
- }
-
- var id = sourceLi.attr("id");
-
- if(targetLi.children('ul').size() >0){
- if (typeof id !== 'undefined' && id !== false) {
- targetLi.children('ul').append('<li id="'+id+'">'+sourceliClone.html()+'</li>');
- }else{
- targetLi.children('ul').append('<li>'+sourceliClone.html()+'</li>');
- }
- }else{
- if (typeof id !== 'undefined' && id !== false) {
- targetLi.append('<ul><li id="'+id+'">'+sourceliClone.html()+'</li></ul>');
- }else{
- targetLi.append('<ul><li>'+sourceliClone.html()+'</li></ul>');
- }
- }
-
- }); // handleDropEvent
-
- } // Drag and drop
- };
-
- // Option defaults
- $.fn.jOrgChart.defaults = {
- chartElement : 'body',
- depth : -1,
- chartClass : "jOrgChart",
- dragAndDrop: false
- };
-
- // Method that recursively builds the tree
- function buildNode($node, $appendTo, level, opts) {
- var $table = $("<table cellpadding='0' cellspacing='0' border='0'/>");
- var $tbody = $("<tbody/>");
-
- // Construct the node container(s)
- var $nodeRow = $("<tr/>").addClass("node-cells");
- var $nodeCell = $("<td/>").addClass("node-cell").attr("colspan", 2);
- var $childNodes = $node.children("ul:first").children("li");
- var $nodeDiv;
-
- if($childNodes.length > 1) {
- $nodeCell.attr("colspan", $childNodes.length * 2);
- }
- // Draw the node
- // Get the contents - any markup except li and ul allowed
- var $nodeContent = $node.clone()
- .children("ul,li")
- .remove()
- .end()
- .html();
-
- var new_node_id = $node.attr("id");
- if (typeof new_node_id !== 'undefined' && new_node_id !== false) {
- $nodeDiv = $("<div>").addClass("node").attr("id", $node.attr("id")).append($nodeContent);
- }else{
- $nodeDiv = $("<div>").addClass("node").append($nodeContent);
- }
-
- // Expand and contract nodes
- if ($childNodes.length > 0) {
- $nodeDiv.click(function() {
- var $this = $(this);
- var $tr = $this.closest("tr");
-
- if($tr.hasClass('contracted')){
- $this.css('cursor','n-resize');
- $tr.removeClass('contracted').addClass('expanded');
- $tr.nextAll("tr").css('visibility', '');
- }else{
- $this.css('cursor','s-resize');
- $tr.removeClass('expanded').addClass('contracted');
- $tr.nextAll("tr").css('visibility', 'hidden');
- }
- });
- }
-
- $nodeCell.append($nodeDiv);
- $nodeRow.append($nodeCell);
- $tbody.append($nodeRow);
-
- if($childNodes.length > 0) {
- // if it can be expanded then change the cursor
- $nodeDiv.css('cursor','n-resize').addClass('expanded');
-
- // recurse until leaves found (-1) or to the level specified
- if(opts.depth == -1 || (level+1 < opts.depth)) {
- var $downLineRow = $("<tr/>");
- var $downLineCell = $("<td/>").attr("colspan", $childNodes.length*2);
- $downLineRow.append($downLineCell);
-
- // draw the connecting line from the parent node to the horizontal line
- $downLine = $("<div></div>").addClass("line down");
- $downLineCell.append($downLine);
- $tbody.append($downLineRow);
-
- // Draw the horizontal lines
- var $linesRow = $("<tr/>");
- $childNodes.each(function() {
- var $left = $("<td>&nbsp;</td>").addClass("line left top");
- var $right = $("<td>&nbsp;</td>").addClass("line right top");
- $linesRow.append($left).append($right);
- });
-
- // horizontal line shouldn't extend beyond the first and last child branches
- $linesRow.find("td:first")
- .removeClass("top")
- .end()
- .find("td:last")
- .removeClass("top");
-
- $tbody.append($linesRow);
- var $childNodesRow = $("<tr/>");
- $childNodes.each(function() {
- var $td = $("<td class='node-container'/>");
- $td.attr("colspan", 2);
- // recurse through children lists and items
- buildNode($(this), $td, level+1, opts);
- $childNodesRow.append($td);
- });
-
- }
- $tbody.append($childNodesRow);
- }
-
- // any classes on the LI element get copied to the relevant node in the tree
- // apart from the special 'collapsed' class, which collapses the sub-tree at this point
- if ($node.attr('class') != undefined) {
- var classList = $node.attr('class').split(/\s+/);
- $.each(classList, function(index,item) {
- if (item == 'collapsed') {
- $nodeRow.nextAll('tr').css('display', 'none');
- $nodeRow.removeClass('expanded');
- $nodeRow.addClass('contracted');
- $nodeDiv.css('cursor','s-resize');
- } else {
- $nodeDiv.addClass(item);
- }
- });
- }
-
- $table.append($tbody);
- $appendTo.append($table);
-
- /* Prevent trees collapsing if a link inside a node is clicked */
- $nodeDiv.children('a').click(function(e){
- console.log(e);
- e.stopPropagation();
- });
- };
-
-})(jQuery);
diff --git a/ecomp-portal-BE/war/static/fusion/sample/org_chart/prettify.js b/ecomp-portal-BE/war/static/fusion/sample/org_chart/prettify.js
deleted file mode 100644
index eef5ad7e..00000000
--- a/ecomp-portal-BE/war/static/fusion/sample/org_chart/prettify.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
-(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
-[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c<
-f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&&
-(j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r=
-{b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length,
-t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b===
-"string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
-l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
-q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
-q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
-"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
-a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
-for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value",
-m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m=
-a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue=
-j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
-"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
-H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
-J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+
-I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),
-["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",
-/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),
-["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",
-hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=0){var k=k.match(g),f,b;if(b=
-!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m,
-250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",
-PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();
diff --git a/ecomp-portal-BE/war/static/fusion/webrtc/getSourceId.html b/ecomp-portal-BE/war/static/fusion/webrtc/getSourceId.html
deleted file mode 100644
index 6f660025..00000000
--- a/ecomp-portal-BE/war/static/fusion/webrtc/getSourceId.html
+++ /dev/null
@@ -1,78 +0,0 @@
-
-<script>
-
-var DetectRTC = {};
-
-var screenCallback;
-
-DetectRTC.screen = {
- chromeMediaSource: 'screen',
- getSourceId: function (callback) {
- screenCallback = callback;
- window.postMessage('get-sourceId', '*');
- },
- onMessageCallback: function (data) {
- // "cancel" button is clicked
- if (data == 'PermissionDeniedError') {
- DetectRTC.screen.chromeMediaSource = 'PermissionDeniedError';
- if (screenCallback) return screenCallback('PermissionDeniedError');
- else throw new Error('PermissionDeniedError');
- }
-
- // extension notified his presence
- if (data == 'rtcmulticonnection-extension-loaded') {
- DetectRTC.screen.chromeMediaSource = 'desktop';
- }
-
- // extension shared temp sourceId
- if (data.sourceId) {
- DetectRTC.screen.sourceId = data.sourceId;
- if (screenCallback) screenCallback(DetectRTC.screen.sourceId);
- }
- },
- getChromeExtensionStatus: function (callback) {
- // https://chrome.google.com/webstore/detail/screen-capturing-private/icgmlogfeajbfdffajhoebcfbibfhaen
- var extensionid = 'icgmlogfeajbfdffajhoebcfbibfhaen';
-
- var image = document.createElement('img');
- image.src = 'chrome-extension://' + extensionid + '/icon.png';
- image.onload = function () {
- DetectRTC.screen.chromeMediaSource = 'screen';
- window.postMessage('are-you-there', '*');
- setTimeout(function () {
- if (DetectRTC.screen.chromeMediaSource == 'screen') {
- callback('installed-disabled');
- } else callback('installed-enabled');
- }, 2000);
- };
- image.onerror = function () {
- callback('not-installed');
- };
- }
-};
-
-window.addEventListener('message', function (event) {
- if (!event.data || !(typeof event.data == 'string' || event.data.sourceId || event.data.captureSourceId)) return;
- if (event.data.captureSourceId) captureSourceId();
-
- DetectRTC.screen.onMessageCallback(event.data);
-});
-
-function captureSourceId() {
- // check if desktop-capture extension installed.
- DetectRTC.screen.getChromeExtensionStatus(function (status) {
- if (status != 'installed-enabled') {
- window.parent.postMessage({
- chromeExtensionStatus: status
- }, '*');
- return;
- }
-
- DetectRTC.screen.getSourceId(function (sourceId) {
- window.parent.postMessage({
- chromeMediaSourceId: sourceId
- }, '*');
- });
- });
-}
-</script>
diff --git a/ecomp-portal-BE/war/static/fusion/webrtc/js/RTCMultiConnection.js b/ecomp-portal-BE/war/static/fusion/webrtc/js/RTCMultiConnection.js
deleted file mode 100644
index 364c5ac3..00000000
--- a/ecomp-portal-BE/war/static/fusion/webrtc/js/RTCMultiConnection.js
+++ /dev/null
@@ -1,6777 +0,0 @@
-// Last time updated at Monday, December 21st, 2015, 5:25:26 PM
-
-// Quick-Demo for newbies: http://jsfiddle.net/c46de0L8/
-// Another simple demo: http://jsfiddle.net/zar6fg60/
-
-// Latest file can be found here: https://cdn.webrtc-experiment.com/RTCMultiConnection.js
-
-// Muaz Khan - www.MuazKhan.com
-// MIT License - www.WebRTC-Experiment.com/licence
-// Documentation - www.RTCMultiConnection.org/docs
-// FAQ - www.RTCMultiConnection.org/FAQ
-// Changes log - www.RTCMultiConnection.org/changes-log/
-// Demos - www.WebRTC-Experiment.com/RTCMultiConnection
-
-// _________________________
-// RTCMultiConnection-v2.2.2
-
-(function() {
-
- // RMC == RTCMultiConnection
- // usually page-URL is used as channel-id
- // you can always override it!
- // www.RTCMultiConnection.org/docs/channel-id/
- window.RMCDefaultChannel = location.href.replace(/\/|:|#|\?|\$|\^|%|\.|`|~|!|\+|@|\[|\||]|\|*. /g, '').split('\n').join('').split('\r').join('');
-
- // www.RTCMultiConnection.org/docs/constructor/
- window.RTCMultiConnection = function(channel) {
- // an instance of constructor
- var connection = this;
-
- // a reference to RTCMultiSession
- var rtcMultiSession;
-
- // setting default channel or channel passed through constructor
- connection.channel = channel || RMCDefaultChannel;
-
- // to allow single user to join multiple rooms;
- // you can change this property at runtime!
- connection.isAcceptNewSession = true;
-
- // www.RTCMultiConnection.org/docs/open/
- connection.open = function(args) {
- connection.isAcceptNewSession = false;
-
- // www.RTCMultiConnection.org/docs/session-initiator/
- // you can always use this property to determine room owner!
- connection.isInitiator = true;
-
- var dontTransmit = false;
-
- // a channel can contain multiple rooms i.e. sessions
- if (args) {
- if (isString(args)) {
- connection.sessionid = args;
- } else {
- if (!isNull(args.transmitRoomOnce)) {
- connection.transmitRoomOnce = args.transmitRoomOnce;
- }
-
- if (!isNull(args.dontTransmit)) {
- dontTransmit = args.dontTransmit;
- }
-
- if (!isNull(args.sessionid)) {
- connection.sessionid = args.sessionid;
- }
- }
- }
-
- // if firebase && if session initiator
- if (connection.socket && connection.socket.remove) {
- connection.socket.remove();
- }
-
- if (!connection.sessionid) connection.sessionid = connection.channel;
- connection.sessionDescription = {
- sessionid: connection.sessionid,
- userid: connection.userid,
- session: connection.session,
- extra: connection.extra
- };
-
- if (!connection.sessionDescriptions[connection.sessionDescription.sessionid]) {
- connection.numberOfSessions++;
- connection.sessionDescriptions[connection.sessionDescription.sessionid] = connection.sessionDescription;
- }
-
- // connect with signaling channel
- initRTCMultiSession(function() {
- // "captureUserMediaOnDemand" is disabled by default.
- // invoke "getUserMedia" only when first participant found.
- rtcMultiSession.captureUserMediaOnDemand = args ? !!args.captureUserMediaOnDemand : false;
-
- if (args && args.onMediaCaptured) {
- connection.onMediaCaptured = args.onMediaCaptured;
- }
-
- // for session-initiator, user-media is captured as soon as "open" is invoked.
- if (!rtcMultiSession.captureUserMediaOnDemand) captureUserMedia(function() {
- rtcMultiSession.initSession({
- sessionDescription: connection.sessionDescription,
- dontTransmit: dontTransmit
- });
-
- invokeMediaCaptured(connection);
- });
-
- if (rtcMultiSession.captureUserMediaOnDemand) {
- rtcMultiSession.initSession({
- sessionDescription: connection.sessionDescription,
- dontTransmit: dontTransmit
- });
- }
- });
- return connection.sessionDescription;
- };
-
- // www.RTCMultiConnection.org/docs/connect/
- connection.connect = function(sessionid) {
- // a channel can contain multiple rooms i.e. sessions
- if (sessionid) {
- connection.sessionid = sessionid;
- }
-
- // connect with signaling channel
- initRTCMultiSession(function() {
- log('Signaling channel is ready.');
- });
-
- return this;
- };
-
- // www.RTCMultiConnection.org/docs/join/
- connection.join = joinSession;
-
- // www.RTCMultiConnection.org/docs/send/
- connection.send = function(data, _channel) {
- if (connection.numberOfConnectedUsers <= 0) {
- // no connections
- setTimeout(function() {
- // try again
- connection.send(data, _channel);
- }, 1000);
- return;
- }
-
- // send file/data or /text
- if (!data)
- throw 'No file, data or text message to share.';
-
- // connection.send([file1, file2, file3])
- // you can share multiple files, strings or data objects using "send" method!
- if (data instanceof Array && !isNull(data[0].size) && !isNull(data[0].type)) {
- // this mechanism can cause failure for subsequent packets/data
- // on Firefox especially; and on chrome as well!
- // todo: need to use setTimeout instead.
- for (var i = 0; i < data.length; i++) {
- data[i].size && data[i].type && connection.send(data[i], _channel);
- }
- return;
- }
-
- // File or Blob object MUST have "type" and "size" properties
- if (!isNull(data.size) && !isNull(data.type)) {
- if (!connection.enableFileSharing) {
- throw '"enableFileSharing" boolean MUST be "true" to support file sharing.';
- }
-
- if (!rtcMultiSession.fileBufferReader) {
- initFileBufferReader(connection, function(fbr) {
- rtcMultiSession.fileBufferReader = fbr;
- connection.send(data, _channel);
- });
- return;
- }
-
- var extra = merge({
- userid: connection.userid
- }, data.extra || connection.extra);
-
- rtcMultiSession.fileBufferReader.readAsArrayBuffer(data, function(uuid) {
- rtcMultiSession.fileBufferReader.getNextChunk(uuid, function(nextChunk, isLastChunk, extra) {
- if (_channel) _channel.send(nextChunk);
- else rtcMultiSession.send(nextChunk);
- });
- }, extra);
- } else {
- // to allow longest string messages
- // and largest data objects
- // or anything of any size!
- // to send multiple data objects concurrently!
-
- TextSender.send({
- text: data,
- channel: rtcMultiSession,
- _channel: _channel,
- connection: connection
- });
- }
- };
-
- function initRTCMultiSession(onSignalingReady) {
- if (screenFrame) {
- loadScreenFrame();
- }
-
- // RTCMultiSession is the backbone object;
- // this object MUST be initialized once!
- if (rtcMultiSession) return onSignalingReady();
-
- // your everything is passed over RTCMultiSession constructor!
- rtcMultiSession = new RTCMultiSession(connection, onSignalingReady);
- }
-
- connection.disconnect = function() {
- if (rtcMultiSession) rtcMultiSession.disconnect();
- rtcMultiSession = null;
- };
-
- function joinSession(session, joinAs) {
- if (isString(session)) {
- connection.skipOnNewSession = true;
- }
-
- if (!rtcMultiSession) {
- log('Signaling channel is not ready. Connecting...');
- // connect with signaling channel
- initRTCMultiSession(function() {
- log('Signaling channel is connected. Joining the session again...');
- setTimeout(function() {
- joinSession(session, joinAs);
- }, 1000);
- });
- return;
- }
-
- // connection.join('sessionid');
- if (isString(session)) {
- if (connection.sessionDescriptions[session]) {
- session = connection.sessionDescriptions[session];
- } else
- return setTimeout(function() {
- log('Session-Descriptions not found. Rechecking..');
- joinSession(session, joinAs);
- }, 1000);
- }
-
- // connection.join('sessionid', { audio: true });
- if (joinAs) {
- return captureUserMedia(function() {
- session.oneway = true;
- joinSession(session);
- }, joinAs);
- }
-
- if (!session || !session.userid || !session.sessionid) {
- error('missing arguments', arguments);
-
- var error = 'Invalid data passed over "connection.join" method.';
- connection.onstatechange({
- userid: 'browser',
- extra: {},
- name: 'Unexpected data detected.',
- reason: error
- });
-
- throw error;
- }
-
- if (!connection.dontOverrideSession) {
- connection.session = session.session;
- }
-
- var extra = connection.extra || session.extra || {};
-
- // todo: need to verify that if-block statement works as expected.
- // expectations: if it is oneway streaming; or if it is data-only connection
- // then, it shouldn't capture user-media on participant's side.
- if (session.oneway || isData(session)) {
- rtcMultiSession.joinSession(session, extra);
- } else {
- captureUserMedia(function() {
- rtcMultiSession.joinSession(session, extra);
- });
- }
- }
-
- var isFirstSession = true;
-
- // www.RTCMultiConnection.org/docs/captureUserMedia/
-
- function captureUserMedia(callback, _session, dontCheckChromExtension) {
- // capture user's media resources
- var session = _session || connection.session;
-
- if (isEmpty(session)) {
- if (callback) callback();
- return;
- }
-
- // you can force to skip media capturing!
- if (connection.dontCaptureUserMedia) {
- return callback();
- }
-
- // if it is data-only connection
- // if it is one-way connection and current user is participant
- if (isData(session) || (!connection.isInitiator && session.oneway)) {
- // www.RTCMultiConnection.org/docs/attachStreams/
- connection.attachStreams = [];
- return callback();
- }
-
- var constraints = {
- audio: !!session.audio ? {
- mandatory: {},
- optional: [{
- chromeRenderToAssociatedSink: true
- }]
- } : false,
- video: !!session.video
- };
-
- // if custom audio device is selected
- if (connection._mediaSources.audio) {
- constraints.audio.optional.push({
- sourceId: connection._mediaSources.audio
- });
- }
-
- // if custom video device is selected
- if (connection._mediaSources.video) {
- constraints.video = {
- optional: [{
- sourceId: connection._mediaSources.video
- }]
- };
- }
-
- // for connection.session = {};
- if (!session.screen && !constraints.audio && !constraints.video) {
- return callback();
- }
-
- var screen_constraints = {
- audio: false,
- video: {
- mandatory: {
- chromeMediaSource: DetectRTC.screen.chromeMediaSource,
- maxWidth: screen.width > 1920 ? screen.width : 1920,
- maxHeight: screen.height > 1080 ? screen.height : 1080
- },
- optional: []
- }
- };
-
- if (isFirefox && session.screen) {
- if (location.protocol !== 'https:') {
- return error(SCREEN_COMMON_FAILURE);
- }
- warn(Firefox_Screen_Capturing_Warning);
-
- screen_constraints.video = merge(screen_constraints.video.mandatory, {
- mozMediaSource: 'window', // mozMediaSource is redundant here
- mediaSource: 'window' // 'screen' || 'window'
- });
-
- // Firefox is supporting audio+screen from single getUserMedia request
- // audio+video+screen will become audio+screen for Firefox
- // because Firefox isn't supporting multi-streams feature version < 38
- // version >38 supports multi-stream sharing.
- // we can use: firefoxVersion < 38
- // however capturing audio and screen using single getUserMedia is a better option
- if (constraints.audio /* && !session.video */ ) {
- screen_constraints.audio = true;
- constraints = {};
- }
-
- delete screen_constraints.video.chromeMediaSource;
- }
-
- // if screen is prompted
- if (session.screen) {
- if (isChrome && DetectRTC.screen.extensionid != ReservedExtensionID) {
- useCustomChromeExtensionForScreenCapturing = true;
- }
-
- if (isChrome && !useCustomChromeExtensionForScreenCapturing && !dontCheckChromExtension && !DetectRTC.screen.sourceId) {
- listenEventHandler('message', onIFrameCallback);
-
- function onIFrameCallback(event) {
- if (event.data && event.data.chromeMediaSourceId) {
- // this event listener is no more needed
- window.removeEventListener('message', onIFrameCallback);
-
- var sourceId = event.data.chromeMediaSourceId;
-
- DetectRTC.screen.sourceId = sourceId;
- DetectRTC.screen.chromeMediaSource = 'desktop';
-
- if (sourceId == 'PermissionDeniedError') {
- var mediaStreamError = {
- message: location.protocol == 'https:' ? 'User denied to share content of his screen.' : SCREEN_COMMON_FAILURE,
- name: 'PermissionDeniedError',
- constraintName: screen_constraints,
- session: session
- };
- currentUserMediaRequest.mutex = false;
- DetectRTC.screen.sourceId = null;
- return connection.onMediaError(mediaStreamError);
- }
-
- captureUserMedia(callback, _session);
- }
-
- if (event.data && event.data.chromeExtensionStatus) {
- warn('Screen capturing extension status is:', event.data.chromeExtensionStatus);
- DetectRTC.screen.chromeMediaSource = 'screen';
- captureUserMedia(callback, _session, true);
- }
- }
-
- if (!screenFrame) {
- loadScreenFrame();
- }
-
- screenFrame.postMessage();
- return;
- }
-
- // check if screen capturing extension is installed.
- if (isChrome && useCustomChromeExtensionForScreenCapturing && !dontCheckChromExtension && DetectRTC.screen.chromeMediaSource == 'screen' && DetectRTC.screen.extensionid) {
- if (DetectRTC.screen.extensionid == ReservedExtensionID && document.domain.indexOf('webrtc-experiment.com') == -1) {
- return captureUserMedia(callback, _session, true);
- }
-
- log('checking if chrome extension is installed.');
- DetectRTC.screen.getChromeExtensionStatus(function(status) {
- if (status == 'installed-enabled') {
- DetectRTC.screen.chromeMediaSource = 'desktop';
- }
-
- captureUserMedia(callback, _session, true);
- log('chrome extension is installed?', DetectRTC.screen.chromeMediaSource == 'desktop');
- });
- return;
- }
-
- if (isChrome && useCustomChromeExtensionForScreenCapturing && DetectRTC.screen.chromeMediaSource == 'desktop' && !DetectRTC.screen.sourceId) {
- DetectRTC.screen.getSourceId(function(sourceId) {
- if (sourceId == 'PermissionDeniedError') {
- var mediaStreamError = {
- message: 'User denied to share content of his screen.',
- name: 'PermissionDeniedError',
- constraintName: screen_constraints,
- session: session
- };
- currentUserMediaRequest.mutex = false;
- DetectRTC.screen.chromeMediaSource = 'desktop';
- return connection.onMediaError(mediaStreamError);
- }
-
- if (sourceId == 'No-Response') {
- error('Chrome extension seems not available. Make sure that manifest.json#L16 has valid content-script matches pointing to your URL.');
- DetectRTC.screen.chromeMediaSource = 'screen';
- return captureUserMedia(callback, _session, true);
- }
-
- captureUserMedia(callback, _session, true);
- });
- return;
- }
-
- if (isChrome && DetectRTC.screen.chromeMediaSource == 'desktop') {
- screen_constraints.video.mandatory.chromeMediaSourceId = DetectRTC.screen.sourceId;
- }
-
- var _isFirstSession = isFirstSession;
-
- _captureUserMedia(screen_constraints, constraints.audio || constraints.video ? function() {
-
- if (_isFirstSession) isFirstSession = true;
-
- _captureUserMedia(constraints, callback);
- } : callback);
- } else _captureUserMedia(constraints, callback, session.audio && !session.video);
-
- function _captureUserMedia(forcedConstraints, forcedCallback, isRemoveVideoTracks, dontPreventSSLAutoAllowed) {
- connection.onstatechange({
- userid: 'browser',
- extra: {},
- name: 'fetching-usermedia',
- reason: 'About to capture user-media with constraints: ' + toStr(forcedConstraints)
- });
-
-
- if (connection.preventSSLAutoAllowed && !dontPreventSSLAutoAllowed && isChrome) {
- // if navigator.customGetUserMediaBar.js is missing
- if (!navigator.customGetUserMediaBar) {
- loadScript(connection.resources.customGetUserMediaBar, function() {
- _captureUserMedia(forcedConstraints, forcedCallback, isRemoveVideoTracks, dontPreventSSLAutoAllowed);
- });
- return;
- }
-
- navigator.customGetUserMediaBar(forcedConstraints, function() {
- _captureUserMedia(forcedConstraints, forcedCallback, isRemoveVideoTracks, true);
- }, function() {
- connection.onMediaError({
- name: 'PermissionDeniedError',
- message: 'User denied permission.',
- constraintName: forcedConstraints,
- session: session
- });
- });
- return;
- }
-
- var mediaConfig = {
- onsuccess: function(stream, returnBack, idInstance, streamid) {
- onStreamSuccessCallback(stream, returnBack, idInstance, streamid, forcedConstraints, forcedCallback, isRemoveVideoTracks, screen_constraints, constraints, session);
- },
- onerror: function(e, constraintUsed) {
- // http://goo.gl/hrwF1a
- if (isFirefox) {
- if (e == 'PERMISSION_DENIED') {
- e = {
- message: '',
- name: 'PermissionDeniedError',
- constraintName: constraintUsed,
- session: session
- };
- }
- }
-
- if (isFirefox && constraintUsed.video && constraintUsed.video.mozMediaSource) {
- mediaStreamError = {
- message: Firefox_Screen_Capturing_Warning,
- name: e.name || 'PermissionDeniedError',
- constraintName: constraintUsed,
- session: session
- };
-
- connection.onMediaError(mediaStreamError);
- return;
- }
-
- if (isString(e)) {
- return connection.onMediaError({
- message: 'Unknown Error',
- name: e,
- constraintName: constraintUsed,
- session: session
- });
- }
-
- // it seems that chrome 35+ throws "DevicesNotFoundError" exception
- // when any of the requested media is either denied or absent
- if (e.name && (e.name == 'PermissionDeniedError' || e.name == 'DevicesNotFoundError')) {
- var mediaStreamError = 'Either: ';
- mediaStreamError += '\n Media resolutions are not permitted.';
- mediaStreamError += '\n Another application is using same media device.';
- mediaStreamError += '\n Media device is not attached or drivers not installed.';
- mediaStreamError += '\n You denied access once and it is still denied.';
-
- if (e.message && e.message.length) {
- mediaStreamError += '\n ' + e.message;
- }
-
- mediaStreamError = {
- message: mediaStreamError,
- name: e.name,
- constraintName: constraintUsed,
- session: session
- };
-
- connection.onMediaError(mediaStreamError);
-
- if (isChrome && (session.audio || session.video)) {
- // todo: this snippet fails if user has two or more
- // microphone/webcam attached.
- DetectRTC.load(function() {
- // it is possible to check presence of the microphone before using it!
- if (session.audio && !DetectRTC.hasMicrophone) {
- warn('It seems that you have no microphone attached to your device/system.');
- session.audio = session.audio = false;
-
- if (!session.video) {
- alert('It seems that you are capturing microphone and there is no device available or access is denied. Reloading...');
- location.reload();
- }
- }
-
- // it is possible to check presence of the webcam before using it!
- if (session.video && !DetectRTC.hasWebcam) {
- warn('It seems that you have no webcam attached to your device/system.');
- session.video = session.video = false;
-
- if (!session.audio) {
- alert('It seems that you are capturing webcam and there is no device available or access is denied. Reloading...');
- location.reload();
- }
- }
-
- if (!DetectRTC.hasMicrophone && !DetectRTC.hasWebcam) {
- alert('It seems that either both microphone/webcam are not available or access is denied. Reloading...');
- location.reload();
- } else if (!connection.getUserMediaPromptedOnce) {
- // make maximum two tries!
- connection.getUserMediaPromptedOnce = true;
- captureUserMedia(callback, session);
- }
- });
- }
- }
-
- if (e.name && e.name == 'ConstraintNotSatisfiedError') {
- var mediaStreamError = 'Either: ';
- mediaStreamError += '\n You are prompting unknown media resolutions.';
- mediaStreamError += '\n You are using invalid media constraints.';
-
- if (e.message && e.message.length) {
- mediaStreamError += '\n ' + e.message;
- }
-
- mediaStreamError = {
- message: mediaStreamError,
- name: e.name,
- constraintName: constraintUsed,
- session: session
- };
-
- connection.onMediaError(mediaStreamError);
- }
-
- if (session.screen) {
- if (isFirefox) {
- error(Firefox_Screen_Capturing_Warning);
- } else if (location.protocol !== 'https:') {
- if (!isNodeWebkit && (location.protocol == 'file:' || location.protocol == 'http:')) {
- error('You cannot use HTTP or file protocol for screen capturing. You must either use HTTPs or chrome extension page or Node-Webkit page.');
- }
- } else {
- error('Unable to detect actual issue. Maybe "deprecated" screen capturing flag was not set using command line or maybe you clicked "No" button or maybe chrome extension returned invalid "sourceId". Please install chrome-extension: http://bit.ly/webrtc-screen-extension');
- }
- }
-
- currentUserMediaRequest.mutex = false;
-
- // to make sure same stream can be captured again!
- var idInstance = JSON.stringify(constraintUsed);
- if (currentUserMediaRequest.streams[idInstance]) {
- delete currentUserMediaRequest.streams[idInstance];
- }
- },
- mediaConstraints: connection.mediaConstraints || {}
- };
-
- mediaConfig.constraints = forcedConstraints || constraints;
- mediaConfig.connection = connection;
- getUserMedia(mediaConfig);
- }
- }
-
- function onStreamSuccessCallback(stream, returnBack, idInstance, streamid, forcedConstraints, forcedCallback, isRemoveVideoTracks, screen_constraints, constraints, session) {
- if (!streamid) streamid = getRandomString();
-
- connection.onstatechange({
- userid: 'browser',
- extra: {},
- name: 'usermedia-fetched',
- reason: 'Captured user media using constraints: ' + toStr(forcedConstraints)
- });
-
- if (isRemoveVideoTracks) {
- stream = convertToAudioStream(stream);
- }
-
- connection.localStreamids.push(streamid);
- stream.onended = function() {
- if (streamedObject.mediaElement && !streamedObject.mediaElement.parentNode && document.getElementById(stream.streamid)) {
- streamedObject.mediaElement = document.getElementById(stream.streamid);
- }
-
- // when a stream is stopped; it must be removed from "attachStreams" array
- connection.attachStreams.forEach(function(_stream, index) {
- if (_stream == stream) {
- delete connection.attachStreams[index];
- connection.attachStreams = swap(connection.attachStreams);
- }
- });
-
- onStreamEndedHandler(streamedObject, connection);
-
- if (connection.streams[streamid]) {
- connection.removeStream(streamid);
- }
-
- // if user clicks "stop" button to close screen sharing
- var _stream = connection.streams[streamid];
- if (_stream && _stream.sockets.length) {
- _stream.sockets.forEach(function(socket) {
- socket.send({
- streamid: _stream.streamid,
- stopped: true
- });
- });
- }
-
- currentUserMediaRequest.mutex = false;
- // to make sure same stream can be captured again!
- if (currentUserMediaRequest.streams[idInstance]) {
- delete currentUserMediaRequest.streams[idInstance];
- }
-
- // to allow re-capturing of the screen
- DetectRTC.screen.sourceId = null;
- };
-
- if (!isIE) {
- stream.streamid = streamid;
- stream.isScreen = forcedConstraints == screen_constraints;
- stream.isVideo = forcedConstraints == constraints && !!constraints.video;
- stream.isAudio = forcedConstraints == constraints && !!constraints.audio && !constraints.video;
-
- // if muted stream is negotiated
- stream.preMuted = {
- audio: stream.getAudioTracks().length && !stream.getAudioTracks()[0].enabled,
- video: stream.getVideoTracks().length && !stream.getVideoTracks()[0].enabled
- };
- }
-
- var mediaElement = createMediaElement(stream, session);
- mediaElement.muted = true;
-
- var streamedObject = {
- stream: stream,
- streamid: streamid,
- mediaElement: mediaElement,
- blobURL: mediaElement.mozSrcObject ? URL.createObjectURL(stream) : mediaElement.src,
- type: 'local',
- userid: connection.userid,
- extra: connection.extra,
- session: session,
- isVideo: !!stream.isVideo,
- isAudio: !!stream.isAudio,
- isScreen: !!stream.isScreen,
- isInitiator: !!connection.isInitiator,
- rtcMultiConnection: connection
- };
-
- if (isFirstSession) {
- connection.attachStreams.push(stream);
- }
- isFirstSession = false;
-
- connection.streams[streamid] = connection._getStream(streamedObject);
-
- if (!returnBack) {
- connection.onstream(streamedObject);
- }
-
- if (connection.setDefaultEventsForMediaElement) {
- connection.setDefaultEventsForMediaElement(mediaElement, streamid);
- }
-
- if (forcedCallback) forcedCallback(stream, streamedObject);
-
- if (connection.onspeaking) {
- initHark({
- stream: stream,
- streamedObject: streamedObject,
- connection: connection
- });
- }
- }
-
- // www.RTCMultiConnection.org/docs/captureUserMedia/
- connection.captureUserMedia = captureUserMedia;
-
- // www.RTCMultiConnection.org/docs/leave/
- connection.leave = function(userid) {
- if (!rtcMultiSession) return;
-
- isFirstSession = true;
-
- if (userid) {
- connection.eject(userid);
- return;
- }
-
- rtcMultiSession.leave();
- };
-
- // www.RTCMultiConnection.org/docs/eject/
- connection.eject = function(userid) {
- if (!connection.isInitiator) throw 'Only session-initiator can eject a user.';
- if (!connection.peers[userid]) throw 'You ejected invalid user.';
- connection.peers[userid].sendCustomMessage({
- ejected: true
- });
- };
-
- // www.RTCMultiConnection.org/docs/close/
- connection.close = function() {
- // close entire session
- connection.autoCloseEntireSession = true;
- connection.leave();
- };
-
- // www.RTCMultiConnection.org/docs/renegotiate/
- connection.renegotiate = function(stream, session) {
- if (connection.numberOfConnectedUsers <= 0) {
- // no connections
- setTimeout(function() {
- // try again
- connection.renegotiate(stream, session);
- }, 1000);
- return;
- }
-
- rtcMultiSession.addStream({
- renegotiate: session || merge({
- oneway: true
- }, connection.session),
- stream: stream
- });
- };
-
- connection.attachExternalStream = function(stream, isScreen) {
- var constraints = {};
- if (stream.getAudioTracks && stream.getAudioTracks().length) {
- constraints.audio = true;
- }
- if (stream.getVideoTracks && stream.getVideoTracks().length) {
- constraints.video = true;
- }
-
- var screen_constraints = {
- video: {
- chromeMediaSource: 'fake'
- }
- };
- var forcedConstraints = isScreen ? screen_constraints : constraints;
- onStreamSuccessCallback(stream, false, '', null, forcedConstraints, false, false, screen_constraints, constraints, constraints);
- };
-
- // www.RTCMultiConnection.org/docs/addStream/
- connection.addStream = function(session, socket) {
- // www.RTCMultiConnection.org/docs/renegotiation/
-
- if (connection.numberOfConnectedUsers <= 0) {
- // no connections
- setTimeout(function() {
- // try again
- connection.addStream(session, socket);
- }, 1000);
- return;
- }
-
- // renegotiate new media stream
- if (session) {
- var isOneWayStreamFromParticipant;
- if (!connection.isInitiator && session.oneway) {
- session.oneway = false;
- isOneWayStreamFromParticipant = true;
- }
-
- captureUserMedia(function(stream) {
- if (isOneWayStreamFromParticipant) {
- session.oneway = true;
- }
- addStream(stream);
- }, session);
- } else addStream();
-
- function addStream(stream) {
- rtcMultiSession.addStream({
- stream: stream,
- renegotiate: session || connection.session,
- socket: socket
- });
- }
- };
-
- // www.RTCMultiConnection.org/docs/removeStream/
- connection.removeStream = function(streamid, dontRenegotiate) {
- if (connection.numberOfConnectedUsers <= 0) {
- // no connections
- setTimeout(function() {
- // try again
- connection.removeStream(streamid, dontRenegotiate);
- }, 1000);
- return;
- }
-
- if (!streamid) streamid = 'all';
- if (!isString(streamid) || streamid.search(/all|audio|video|screen/gi) != -1) {
- function _detachStream(_stream, config) {
- if (config.local && _stream.type != 'local') return;
- if (config.remote && _stream.type != 'remote') return;
-
- // connection.removeStream({screen:true});
- if (config.screen && !!_stream.isScreen) {
- connection.detachStreams.push(_stream.streamid);
- }
-
- // connection.removeStream({audio:true});
- if (config.audio && !!_stream.isAudio) {
- connection.detachStreams.push(_stream.streamid);
- }
-
- // connection.removeStream({video:true});
- if (config.video && !!_stream.isVideo) {
- connection.detachStreams.push(_stream.streamid);
- }
-
- // connection.removeStream({});
- if (!config.audio && !config.video && !config.screen) {
- connection.detachStreams.push(_stream.streamid);
- }
-
- if (connection.detachStreams.indexOf(_stream.streamid) != -1) {
- log('removing stream', _stream.streamid);
- onStreamEndedHandler(_stream, connection);
-
- if (config.stop) {
- connection.stopMediaStream(_stream.stream);
- }
- }
- }
-
- for (var stream in connection.streams) {
- if (connection._skip.indexOf(stream) == -1) {
- _stream = connection.streams[stream];
-
- if (streamid == 'all') _detachStream(_stream, {
- audio: true,
- video: true,
- screen: true
- });
-
- else if (isString(streamid)) {
- // connection.removeStream('screen');
- var config = {};
- config[streamid] = true;
- _detachStream(_stream, config);
- } else _detachStream(_stream, streamid);
- }
- }
-
- if (!dontRenegotiate && connection.detachStreams.length) {
- connection.renegotiate();
- }
-
- return;
- }
-
- var stream = connection.streams[streamid];
-
- // detach pre-attached streams
- if (!stream) return warn('No such stream exists. Stream-id:', streamid);
-
- // www.RTCMultiConnection.org/docs/detachStreams/
- connection.detachStreams.push(stream.streamid);
-
- log('removing stream', stream.streamid);
- onStreamEndedHandler(stream, connection);
-
- // todo: how to allow "stop" function?
- // connection.stopMediaStream(stream.stream)
-
- if (!dontRenegotiate) {
- connection.renegotiate();
- }
- };
-
- connection.switchStream = function(session) {
- if (connection.numberOfConnectedUsers <= 0) {
- // no connections
- setTimeout(function() {
- // try again
- connection.switchStream(session);
- }, 1000);
- return;
- }
-
- connection.removeStream('all', true);
- connection.addStream(session);
- };
-
- // www.RTCMultiConnection.org/docs/sendCustomMessage/
- connection.sendCustomMessage = function(message) {
- if (!rtcMultiSession || !rtcMultiSession.defaultSocket) {
- return setTimeout(function() {
- connection.sendCustomMessage(message);
- }, 1000);
- }
-
- rtcMultiSession.defaultSocket.send({
- customMessage: true,
- message: message
- });
- };
-
- // set RTCMultiConnection defaults on constructor invocation
- setDefaults(connection);
- };
-
- function RTCMultiSession(connection, callbackForSignalingReady) {
- var socketObjects = {};
- var sockets = [];
- var rtcMultiSession = this;
- var participants = {};
-
- if (!rtcMultiSession.fileBufferReader && connection.session.data && connection.enableFileSharing) {
- initFileBufferReader(connection, function(fbr) {
- rtcMultiSession.fileBufferReader = fbr;
- });
- }
-
- var textReceiver = new TextReceiver(connection);
-
- function onDataChannelMessage(e) {
- if (e.data.checkingPresence && connection.channels[e.userid]) {
- connection.channels[e.userid].send({
- presenceDetected: true
- });
- return;
- }
-
- if (e.data.presenceDetected && connection.peers[e.userid]) {
- connection.peers[e.userid].connected = true;
- return;
- }
-
- if (e.data.type === 'text') {
- textReceiver.receive(e.data, e.userid, e.extra);
- } else {
- if (connection.autoTranslateText) {
- e.original = e.data;
- connection.Translator.TranslateText(e.data, function(translatedText) {
- e.data = translatedText;
- connection.onmessage(e);
- });
- } else connection.onmessage(e);
- }
- }
-
- function onNewSession(session) {
- if (connection.skipOnNewSession) return;
-
- if (!session.session) session.session = {};
- if (!session.extra) session.extra = {};
-
- // todo: make sure this works as expected.
- // i.e. "onNewSession" should be fired only for
- // sessionid that is passed over "connect" method.
- if (connection.sessionid && session.sessionid != connection.sessionid) return;
-
- if (connection.onNewSession) {
- session.join = function(forceSession) {
- if (!forceSession) return connection.join(session);
-
- for (var f in forceSession) {
- session.session[f] = forceSession[f];
- }
-
- // keeping previous state
- var isDontCaptureUserMedia = connection.dontCaptureUserMedia;
-
- connection.dontCaptureUserMedia = false;
- connection.captureUserMedia(function() {
- connection.dontCaptureUserMedia = true;
- connection.join(session);
-
- // returning back previous state
- connection.dontCaptureUserMedia = isDontCaptureUserMedia;
- }, forceSession);
- };
- if (!session.extra) session.extra = {};
-
- return connection.onNewSession(session);
- }
-
- connection.join(session);
- }
-
- function updateSocketForLocalStreams(socket) {
- for (var i = 0; i < connection.localStreamids.length; i++) {
- var streamid = connection.localStreamids[i];
- if (connection.streams[streamid]) {
- // using "sockets" array to keep references of all sockets using
- // this media stream; so we can fire "onStreamEndedHandler" among all users.
- connection.streams[streamid].sockets.push(socket);
- }
- }
- }
-
- function newPrivateSocket(_config) {
- var socketConfig = {
- channel: _config.channel,
- onmessage: socketResponse,
- onopen: function(_socket) {
- if (_socket) socket = _socket;
-
- if (isofferer && !peer) {
- peerConfig.session = connection.session;
- if (!peer) peer = new PeerConnection();
- peer.create('offer', peerConfig);
- }
-
- _config.socketIndex = socket.index = sockets.length;
- socketObjects[socketConfig.channel] = socket;
- sockets[_config.socketIndex] = socket;
-
- updateSocketForLocalStreams(socket);
-
- if (!socket.__push) {
- socket.__push = socket.send;
- socket.send = function(message) {
- message.userid = message.userid || connection.userid;
- message.extra = message.extra || connection.extra || {};
-
- socket.__push(message);
- };
- }
- }
- };
-
- socketConfig.callback = function(_socket) {
- socket = _socket;
- socketConfig.onopen();
- };
-
- var socket = connection.openSignalingChannel(socketConfig);
- if (socket) socketConfig.onopen(socket);
-
- var isofferer = _config.isofferer,
- peer;
-
- var peerConfig = {
- onopen: onChannelOpened,
- onicecandidate: function(candidate) {
- if (!connection.candidates) throw 'ICE candidates are mandatory.';
- if (!connection.iceProtocols) throw 'At least one must be true; UDP or TCP.';
-
- var iceCandidates = connection.candidates;
-
- var stun = iceCandidates.stun;
- var turn = iceCandidates.turn;
-
- if (!isNull(iceCandidates.reflexive)) stun = iceCandidates.reflexive;
- if (!isNull(iceCandidates.relay)) turn = iceCandidates.relay;
-
- if (!iceCandidates.host && !!candidate.candidate.match(/a=candidate.*typ host/g)) return;
- if (!turn && !!candidate.candidate.match(/a=candidate.*typ relay/g)) return;
- if (!stun && !!candidate.candidate.match(/a=candidate.*typ srflx/g)) return;
-
- var protocol = connection.iceProtocols;
-
- if (!protocol.udp && !!candidate.candidate.match(/a=candidate.* udp/g)) return;
- if (!protocol.tcp && !!candidate.candidate.match(/a=candidate.* tcp/g)) return;
-
- if (!window.selfNPObject) window.selfNPObject = candidate;
-
- socket && socket.send({
- candidate: JSON.stringify({
- candidate: candidate.candidate,
- sdpMid: candidate.sdpMid,
- sdpMLineIndex: candidate.sdpMLineIndex
- })
- });
- },
- onmessage: function(data) {
- if (!data) return;
-
- var abToStr = ab2str(data);
- if (abToStr.indexOf('"userid":') != -1) {
- abToStr = JSON.parse(abToStr);
- onDataChannelMessage(abToStr);
- } else if (data instanceof ArrayBuffer || data instanceof DataView) {
- if (!connection.enableFileSharing) {
- throw 'It seems that receiving data is either "Blob" or "File" but file sharing is disabled.';
- }
-
- if (!rtcMultiSession.fileBufferReader) {
- var that = this;
- initFileBufferReader(connection, function(fbr) {
- rtcMultiSession.fileBufferReader = fbr;
- that.onmessage(data);
- });
- return;
- }
-
- var fileBufferReader = rtcMultiSession.fileBufferReader;
-
- fileBufferReader.convertToObject(data, function(chunk) {
- if (chunk.maxChunks || chunk.readyForNextChunk) {
- // if target peer requested next chunk
- if (chunk.readyForNextChunk) {
- fileBufferReader.getNextChunk(chunk.uuid, function(nextChunk, isLastChunk, extra) {
- rtcMultiSession.send(nextChunk);
- });
- return;
- }
-
- // if chunk is received
- fileBufferReader.addChunk(chunk, function(promptNextChunk) {
- // request next chunk
- rtcMultiSession.send(promptNextChunk);
- });
- return;
- }
-
- connection.onmessage({
- data: chunk,
- userid: _config.userid,
- extra: _config.extra
- });
- });
- return;
- }
- },
- onaddstream: function(stream, session) {
- session = session || _config.renegotiate || connection.session;
-
- // if it is data-only connection; then return.
- if (isData(session)) return;
-
- if (session.screen && (session.audio || session.video)) {
- if (!_config.gotAudioOrVideo) {
- // audio/video are fired earlier than screen
- _config.gotAudioOrVideo = true;
- session.screen = false;
- } else {
- // screen stream is always fired later
- session.audio = false;
- session.video = false;
- }
- }
-
- var preMuted = {};
-
- if (_config.streaminfo) {
- var streaminfo = _config.streaminfo.split('----');
- var strInfo = JSON.parse(streaminfo[streaminfo.length - 1]);
-
- if (!isIE) {
- stream.streamid = strInfo.streamid;
- stream.isScreen = !!strInfo.isScreen;
- stream.isVideo = !!strInfo.isVideo;
- stream.isAudio = !!strInfo.isAudio;
- preMuted = strInfo.preMuted;
- }
-
- streaminfo.pop();
- _config.streaminfo = streaminfo.join('----');
- }
-
- var mediaElement = createMediaElement(stream, merge({
- remote: true
- }, session));
-
- if (connection.setDefaultEventsForMediaElement) {
- connection.setDefaultEventsForMediaElement(mediaElement, stream.streamid);
- }
-
- if (!isPluginRTC && !stream.getVideoTracks().length) {
- function eventListener() {
- setTimeout(function() {
- mediaElement.muted = false;
- afterRemoteStreamStartedFlowing({
- mediaElement: mediaElement,
- session: session,
- stream: stream,
- preMuted: preMuted
- });
- }, 3000);
-
- mediaElement.removeEventListener('play', eventListener);
- }
- return mediaElement.addEventListener('play', eventListener, false);
- }
-
- waitUntilRemoteStreamStartsFlowing({
- mediaElement: mediaElement,
- session: session,
- stream: stream,
- preMuted: preMuted
- });
- },
-
- onremovestream: function(stream) {
- if (stream && stream.streamid) {
- stream = connection.streams[stream.streamid];
- if (stream) {
- log('on:stream:ended via on:remove:stream', stream);
- onStreamEndedHandler(stream, connection);
- }
- } else log('on:remove:stream', stream);
- },
-
- onclose: function(e) {
- e.extra = _config.extra;
- e.userid = _config.userid;
- connection.onclose(e);
-
- // suggested in #71 by "efaj"
- if (connection.channels[e.userid]) {
- delete connection.channels[e.userid];
- }
- },
- onerror: function(e) {
- e.extra = _config.extra;
- e.userid = _config.userid;
- connection.onerror(e);
- },
-
- oniceconnectionstatechange: function(event) {
- log('oniceconnectionstatechange', toStr(event));
-
- if (peer.connection && peer.connection.iceConnectionState == 'connected' && peer.connection.iceGatheringState == 'complete' && peer.connection.signalingState == 'stable' && connection.numberOfConnectedUsers == 1) {
- connection.onconnected({
- userid: _config.userid,
- extra: _config.extra,
- peer: connection.peers[_config.userid],
- targetuser: _config.userinfo
- });
- }
-
- if (!connection.isInitiator && peer.connection && peer.connection.iceConnectionState == 'connected' && peer.connection.iceGatheringState == 'complete' && peer.connection.signalingState == 'stable' && connection.numberOfConnectedUsers == 1) {
- connection.onstatechange({
- userid: _config.userid,
- extra: _config.extra,
- name: 'connected-with-initiator',
- reason: 'ICE connection state seems connected; gathering state is completed; and signaling state is stable.'
- });
- }
-
- if (connection.peers[_config.userid] && connection.peers[_config.userid].oniceconnectionstatechange) {
- connection.peers[_config.userid].oniceconnectionstatechange(event);
- }
-
- // if ICE connectivity check is failed; renegotiate or redial
- if (connection.peers[_config.userid] && connection.peers[_config.userid].peer.connection.iceConnectionState == 'failed') {
- connection.onfailed({
- userid: _config.userid,
- extra: _config.extra,
- peer: connection.peers[_config.userid],
- targetuser: _config.userinfo
- });
- }
-
- if (connection.peers[_config.userid] && connection.peers[_config.userid].peer.connection.iceConnectionState == 'disconnected') {
- !peer.connection.renegotiate && connection.ondisconnected({
- userid: _config.userid,
- extra: _config.extra,
- peer: connection.peers[_config.userid],
- targetuser: _config.userinfo
- });
- peer.connection.renegotiate = false;
- }
-
- if (!connection.autoReDialOnFailure) return;
-
- if (connection.peers[_config.userid]) {
- if (connection.peers[_config.userid].peer.connection.iceConnectionState != 'disconnected') {
- _config.redialing = false;
- }
-
- if (connection.peers[_config.userid].peer.connection.iceConnectionState == 'disconnected' && !_config.redialing) {
- _config.redialing = true;
- warn('Peer connection is closed.', toStr(connection.peers[_config.userid].peer.connection), 'ReDialing..');
- connection.peers[_config.userid].socket.send({
- redial: true
- });
-
- // to make sure all old "remote" streams are also removed!
- connection.streams.remove({
- remote: true,
- userid: _config.userid
- });
- }
- }
- },
-
- onsignalingstatechange: function(event) {
- log('onsignalingstatechange', toStr(event));
- },
-
- attachStreams: connection.dontAttachStream ? [] : connection.attachStreams,
- iceServers: connection.iceServers,
- rtcConfiguration: connection.rtcConfiguration,
- bandwidth: connection.bandwidth,
- sdpConstraints: connection.sdpConstraints,
- optionalArgument: connection.optionalArgument,
- disableDtlsSrtp: connection.disableDtlsSrtp,
- dataChannelDict: connection.dataChannelDict,
- preferSCTP: connection.preferSCTP,
-
- onSessionDescription: function(sessionDescription, streaminfo) {
- sendsdp({
- sdp: sessionDescription,
- socket: socket,
- streaminfo: streaminfo
- });
- },
- trickleIce: connection.trickleIce,
- processSdp: connection.processSdp,
- sendStreamId: function(stream) {
- socket && socket.send({
- streamid: stream.streamid,
- isScreen: !!stream.isScreen,
- isAudio: !!stream.isAudio,
- isVideo: !!stream.isVideo
- });
- },
- rtcMultiConnection: connection
- };
-
- function waitUntilRemoteStreamStartsFlowing(args) {
- // chrome for android may have some features missing
- if (isMobileDevice || isPluginRTC || (isNull(connection.waitUntilRemoteStreamStartsFlowing) || !connection.waitUntilRemoteStreamStartsFlowing)) {
- return afterRemoteStreamStartedFlowing(args);
- }
-
- if (!args.numberOfTimes) args.numberOfTimes = 0;
- args.numberOfTimes++;
-
- if (!(args.mediaElement.readyState <= HTMLMediaElement.HAVE_CURRENT_DATA || args.mediaElement.paused || args.mediaElement.currentTime <= 0)) {
- return afterRemoteStreamStartedFlowing(args);
- }
-
- if (args.numberOfTimes >= 60) { // wait 60 seconds while video is delivered!
- return socket.send({
- failedToReceiveRemoteVideo: true,
- streamid: args.stream.streamid
- });
- }
-
- setTimeout(function() {
- log('Waiting for incoming remote stream to be started flowing: ' + args.numberOfTimes + ' seconds.');
- waitUntilRemoteStreamStartsFlowing(args);
- }, 900);
- }
-
- function initFakeChannel() {
- if (!connection.fakeDataChannels || connection.channels[_config.userid]) return;
-
- // for non-data connections; allow fake data sender!
- if (!connection.session.data) {
- var fakeChannel = {
- send: function(data) {
- socket.send({
- fakeData: data
- });
- },
- readyState: 'open'
- };
- // connection.channels['user-id'].send(data);
- connection.channels[_config.userid] = {
- channel: fakeChannel,
- send: function(data) {
- this.channel.send(data);
- }
- };
- peerConfig.onopen(fakeChannel);
- }
- }
-
- function afterRemoteStreamStartedFlowing(args) {
- var mediaElement = args.mediaElement;
- var session = args.session;
- var stream = args.stream;
-
- stream.onended = function() {
- if (streamedObject.mediaElement && !streamedObject.mediaElement.parentNode && document.getElementById(stream.streamid)) {
- streamedObject.mediaElement = document.getElementById(stream.streamid);
- }
-
- onStreamEndedHandler(streamedObject, connection);
- };
-
- var streamedObject = {
- mediaElement: mediaElement,
-
- stream: stream,
- streamid: stream.streamid,
- session: session || connection.session,
-
- blobURL: isPluginRTC ? '' : mediaElement.mozSrcObject ? URL.createObjectURL(stream) : mediaElement.src,
- type: 'remote',
-
- extra: _config.extra,
- userid: _config.userid,
-
- isVideo: isPluginRTC ? !!session.video : !!stream.isVideo,
- isAudio: isPluginRTC ? !!session.audio && !session.video : !!stream.isAudio,
- isScreen: !!stream.isScreen,
- isInitiator: !!_config.isInitiator,
-
- rtcMultiConnection: connection,
- socket: socket
- };
-
- // connection.streams['stream-id'].mute({audio:true})
- connection.streams[stream.streamid] = connection._getStream(streamedObject);
- connection.onstream(streamedObject);
-
- if (!isEmpty(args.preMuted) && (args.preMuted.audio || args.preMuted.video)) {
- var fakeObject = merge({}, streamedObject);
- fakeObject.session = merge(fakeObject.session, args.preMuted);
-
- fakeObject.isAudio = !!fakeObject.session.audio && !fakeObject.session.video;
- fakeObject.isVideo = !!fakeObject.session.video;
- fakeObject.isScreen = false;
-
- connection.onmute(fakeObject);
- }
-
- log('on:add:stream', streamedObject);
-
- onSessionOpened();
-
- if (connection.onspeaking) {
- initHark({
- stream: stream,
- streamedObject: streamedObject,
- connection: connection
- });
- }
- }
-
- function onChannelOpened(channel) {
- _config.channel = channel;
-
- // connection.channels['user-id'].send(data);
- connection.channels[_config.userid] = {
- channel: _config.channel,
- send: function(data) {
- connection.send(data, this.channel);
- }
- };
-
- connection.onopen({
- extra: _config.extra,
- userid: _config.userid,
- channel: channel
- });
-
- // fetch files from file-queue
- for (var q in connection.fileQueue) {
- connection.send(connection.fileQueue[q], channel);
- }
-
- if (isData(connection.session)) onSessionOpened();
-
- if (connection.partOfScreen && connection.partOfScreen.sharing) {
- connection.peers[_config.userid].sharePartOfScreen(connection.partOfScreen);
- }
- }
-
- function updateSocket() {
- // todo: need to check following {if-block} MUST not affect "redial" process
- if (socket.userid == _config.userid)
- return;
-
- socket.userid = _config.userid;
- sockets[_config.socketIndex] = socket;
-
- connection.numberOfConnectedUsers++;
- // connection.peers['user-id'].addStream({audio:true})
- connection.peers[_config.userid] = {
- socket: socket,
- peer: peer,
- userid: _config.userid,
- extra: _config.extra,
- userinfo: _config.userinfo,
- addStream: function(session00) {
- // connection.peers['user-id'].addStream({audio: true, video: true);
-
- connection.addStream(session00, this.socket);
- },
- removeStream: function(streamid) {
- if (!connection.streams[streamid])
- return warn('No such stream exists. Stream-id:', streamid);
-
- this.peer.connection.removeStream(connection.streams[streamid].stream);
- this.renegotiate();
- },
- renegotiate: function(stream, session) {
- // connection.peers['user-id'].renegotiate();
-
- connection.renegotiate(stream, session);
- },
- changeBandwidth: function(bandwidth) {
- // connection.peers['user-id'].changeBandwidth();
-
- if (!bandwidth) throw 'You MUST pass bandwidth object.';
- if (isString(bandwidth)) throw 'Pass object for bandwidth instead of string; e.g. {audio:10, video:20}';
-
- // set bandwidth for self
- this.peer.bandwidth = bandwidth;
-
- // ask remote user to synchronize bandwidth
- this.socket.send({
- changeBandwidth: true,
- bandwidth: bandwidth
- });
- },
- sendCustomMessage: function(message) {
- // connection.peers['user-id'].sendCustomMessage();
-
- this.socket.send({
- customMessage: true,
- message: message
- });
- },
- onCustomMessage: function(message) {
- log('Received "private" message from', this.userid,
- isString(message) ? message : toStr(message));
- },
- drop: function(dontSendMessage) {
- // connection.peers['user-id'].drop();
-
- for (var stream in connection.streams) {
- if (connection._skip.indexOf(stream) == -1) {
- stream = connection.streams[stream];
-
- if (stream.userid == connection.userid && stream.type == 'local') {
- this.peer.connection.removeStream(stream.stream);
- onStreamEndedHandler(stream, connection);
- }
-
- if (stream.type == 'remote' && stream.userid == this.userid) {
- onStreamEndedHandler(stream, connection);
- }
- }
- }
-
- !dontSendMessage && this.socket.send({
- drop: true
- });
- },
- hold: function(holdMLine) {
- // connection.peers['user-id'].hold();
-
- if (peer.prevCreateType == 'answer') {
- this.socket.send({
- unhold: true,
- holdMLine: holdMLine || 'both',
- takeAction: true
- });
- return;
- }
-
- this.socket.send({
- hold: true,
- holdMLine: holdMLine || 'both'
- });
-
- this.peer.hold = true;
- this.fireHoldUnHoldEvents({
- kind: holdMLine,
- isHold: true,
- userid: connection.userid,
- remoteUser: this.userid
- });
- },
- unhold: function(holdMLine) {
- // connection.peers['user-id'].unhold();
-
- if (peer.prevCreateType == 'answer') {
- this.socket.send({
- unhold: true,
- holdMLine: holdMLine || 'both',
- takeAction: true
- });
- return;
- }
-
- this.socket.send({
- unhold: true,
- holdMLine: holdMLine || 'both'
- });
-
- this.peer.hold = false;
- this.fireHoldUnHoldEvents({
- kind: holdMLine,
- isHold: false,
- userid: connection.userid,
- remoteUser: this.userid
- });
- },
- fireHoldUnHoldEvents: function(e) {
- // this method is for inner usages only!
-
- var isHold = e.isHold;
- var kind = e.kind;
- var userid = e.remoteUser || e.userid;
-
- // hold means inactive a specific media line!
- // a media line can contain multiple synced sources (ssrc)
- // i.e. a media line can reference multiple tracks!
- // that's why hold will affect all relevant tracks in a specific media line!
- for (var stream in connection.streams) {
- if (connection._skip.indexOf(stream) == -1) {
- stream = connection.streams[stream];
-
- if (stream.userid == userid) {
- // www.RTCMultiConnection.org/docs/onhold/
- if (isHold)
- connection.onhold(merge({
- kind: kind
- }, stream));
-
- // www.RTCMultiConnection.org/docs/onunhold/
- if (!isHold)
- connection.onunhold(merge({
- kind: kind
- }, stream));
- }
- }
- }
- },
- redial: function() {
- // connection.peers['user-id'].redial();
-
- // 1st of all; remove all relevant remote media streams
- for (var stream in connection.streams) {
- if (connection._skip.indexOf(stream) == -1) {
- stream = connection.streams[stream];
-
- if (stream.userid == this.userid && stream.type == 'remote') {
- onStreamEndedHandler(stream, connection);
- }
- }
- }
-
- log('ReDialing...');
-
- socket.send({
- recreatePeer: true
- });
-
- peer = new PeerConnection();
- peer.create('offer', peerConfig);
- },
- sharePartOfScreen: function(args) {
- // www.RTCMultiConnection.org/docs/onpartofscreen/
- var that = this;
- var lastScreenshot = '';
-
- function partOfScreenCapturer() {
- // if stopped
- if (that.stopPartOfScreenSharing) {
- that.stopPartOfScreenSharing = false;
-
- if (connection.onpartofscreenstopped) {
- connection.onpartofscreenstopped();
- }
- return;
- }
-
- // if paused
- if (that.pausePartOfScreenSharing) {
- if (connection.onpartofscreenpaused) {
- connection.onpartofscreenpaused();
- }
-
- return setTimeout(partOfScreenCapturer, args.interval || 200);
- }
-
- capturePartOfScreen({
- element: args.element,
- connection: connection,
- callback: function(screenshot) {
- if (!connection.channels[that.userid]) {
- throw 'No such data channel exists.';
- }
-
- // don't share repeated content
- if (screenshot != lastScreenshot) {
- lastScreenshot = screenshot;
- connection.channels[that.userid].send({
- screenshot: screenshot,
- isPartOfScreen: true
- });
- }
-
- // "once" can be used to share single screenshot
- !args.once && setTimeout(partOfScreenCapturer, args.interval || 200);
- }
- });
- }
-
- partOfScreenCapturer();
- },
- getConnectionStats: function(callback, interval) {
- if (!callback) throw 'callback is mandatory.';
-
- if (!window.getConnectionStats) {
- loadScript(connection.resources.getConnectionStats, invoker);
- } else invoker();
-
- function invoker() {
- RTCPeerConnection.prototype.getConnectionStats = window.getConnectionStats;
- peer.connection && peer.connection.getConnectionStats(callback, interval);
- }
- },
- takeSnapshot: function(callback) {
- takeSnapshot({
- userid: this.userid,
- connection: connection,
- callback: callback
- });
- }
- };
- }
-
- function onSessionOpened() {
- // original conferencing infrastructure!
- if (connection.isInitiator && getLength(participants) && getLength(participants) <= connection.maxParticipantsAllowed) {
- if (!connection.session.oneway && !connection.session.broadcast) {
- defaultSocket.send({
- sessionid: connection.sessionid,
- newParticipant: _config.userid || socket.channel,
- userData: {
- userid: _config.userid || socket.channel,
- extra: _config.extra
- }
- });
- }
- }
-
- // 1st: renegotiation is supported only on chrome
- // 2nd: must not renegotiate same media multiple times
- // 3rd: todo: make sure that target-user has no such "renegotiated" media.
- if (_config.userinfo.browser == 'chrome' && !_config.renegotiatedOnce) {
- // this code snippet is added to make sure that "previously-renegotiated" streams are also
- // renegotiated to this new user
- for (var rSession in connection.renegotiatedSessions) {
- _config.renegotiatedOnce = true;
-
- if (connection.renegotiatedSessions[rSession] && connection.renegotiatedSessions[rSession].stream) {
- connection.peers[_config.userid].renegotiate(connection.renegotiatedSessions[rSession].stream, connection.renegotiatedSessions[rSession].session);
- }
- }
- }
- }
-
- function socketResponse(response) {
- if (isRMSDeleted) return;
-
- if (response.userid == connection.userid)
- return;
-
- if (response.sdp) {
- _config.userid = response.userid;
- _config.extra = response.extra || {};
- _config.renegotiate = response.renegotiate;
- _config.streaminfo = response.streaminfo;
- _config.isInitiator = response.isInitiator;
- _config.userinfo = response.userinfo;
-
- var sdp = JSON.parse(response.sdp);
-
- if (sdp.type == 'offer') {
- // to synchronize SCTP or RTP
- peerConfig.preferSCTP = !!response.preferSCTP;
- connection.fakeDataChannels = !!response.fakeDataChannels;
- }
-
- // initializing fake channel
- initFakeChannel();
-
- sdpInvoker(sdp, response.labels);
- }
-
- if (response.candidate) {
- peer && peer.addIceCandidate(JSON.parse(response.candidate));
- }
-
- if (response.streamid) {
- if (!rtcMultiSession.streamids) {
- rtcMultiSession.streamids = {};
- }
- if (!rtcMultiSession.streamids[response.streamid]) {
- rtcMultiSession.streamids[response.streamid] = response.streamid;
- connection.onstreamid(response);
- }
- }
-
- if (response.mute || response.unmute) {
- if (response.promptMuteUnmute) {
- if (!connection.privileges.canMuteRemoteStream) {
- connection.onstatechange({
- userid: response.userid,
- extra: response.extra,
- name: 'mute-request-denied',
- reason: response.userid + ' tried to mute your stream; however "privileges.canMuteRemoteStream" is "false".'
- });
- return;
- }
-
- if (connection.streams[response.streamid]) {
- if (response.mute && !connection.streams[response.streamid].muted) {
- connection.streams[response.streamid].mute(response.session);
- }
- if (response.unmute && connection.streams[response.streamid].muted) {
- connection.streams[response.streamid].unmute(response.session);
- }
- }
- } else {
- var streamObject = {};
- if (connection.streams[response.streamid]) {
- streamObject = connection.streams[response.streamid];
- }
-
- var session = response.session;
- var fakeObject = merge({}, streamObject);
- fakeObject.session = session;
-
- fakeObject.isAudio = !!fakeObject.session.audio && !fakeObject.session.video;
- fakeObject.isVideo = !!fakeObject.session.video;
- fakeObject.isScreen = !!fakeObject.session.screen;
-
- if (response.mute) connection.onmute(fakeObject || response);
- if (response.unmute) connection.onunmute(fakeObject || response);
- }
- }
-
- if (response.isVolumeChanged) {
- log('Volume of stream: ' + response.streamid + ' has changed to: ' + response.volume);
- if (connection.streams[response.streamid]) {
- var mediaElement = connection.streams[response.streamid].mediaElement;
- if (mediaElement) mediaElement.volume = response.volume;
- }
- }
-
- // to stop local stream
- if (response.stopped) {
- if (connection.streams[response.streamid]) {
- onStreamEndedHandler(connection.streams[response.streamid], connection);
- }
- }
-
- // to stop remote stream
- if (response.promptStreamStop /* && !connection.isInitiator */ ) {
- if (!connection.privileges.canStopRemoteStream) {
- connection.onstatechange({
- userid: response.userid,
- extra: response.extra,
- name: 'stop-request-denied',
- reason: response.userid + ' tried to stop your stream; however "privileges.canStopRemoteStream" is "false".'
- });
- return;
- }
- warn('Remote stream has been manually stopped!');
- if (connection.streams[response.streamid]) {
- connection.streams[response.streamid].stop();
- }
- }
-
- if (response.left) {
- // firefox is unable to stop remote streams
- // firefox doesn't auto stop streams when peer.close() is called.
- if (isFirefox) {
- var userLeft = response.userid;
- for (var stream in connection.streams) {
- stream = connection.streams[stream];
- if (stream.userid == userLeft) {
- connection.stopMediaStream(stream);
- onStreamEndedHandler(stream, connection);
- }
- }
- }
-
- if (peer && peer.connection) {
- // todo: verify if-block's 2nd condition
- if (peer.connection.signalingState != 'closed' && peer.connection.iceConnectionState.search(/disconnected|failed/gi) == -1) {
- peer.connection.close();
- }
- peer.connection = null;
- }
-
- if (participants[response.userid]) delete participants[response.userid];
-
- if (response.closeEntireSession) {
- connection.onSessionClosed(response);
- connection.leave();
- return;
- }
-
- connection.remove(response.userid);
-
- onLeaveHandler({
- userid: response.userid,
- extra: response.extra || {},
- entireSessionClosed: !!response.closeEntireSession
- }, connection);
- }
-
- // keeping session active even if initiator leaves
- if (response.playRoleOfBroadcaster) {
- if (response.extra) {
- // clone extra-data from initial moderator
- connection.extra = merge(connection.extra, response.extra);
- }
- if (response.participants) {
- participants = response.participants;
-
- // make sure that if 2nd initiator leaves; control is shifted to 3rd person.
- if (participants[connection.userid]) {
- delete participants[connection.userid];
- }
-
- if (sockets[0] && sockets[0].userid == response.userid) {
- delete sockets[0];
- sockets = swap(sockets);
- }
-
- if (socketObjects[response.userid]) {
- delete socketObjects[response.userid];
- }
- }
-
- setTimeout(connection.playRoleOfInitiator, 2000);
- }
-
- if (response.changeBandwidth) {
- if (!connection.peers[response.userid]) throw 'No such peer exists.';
-
- // synchronize bandwidth
- connection.peers[response.userid].peer.bandwidth = response.bandwidth;
-
- // renegotiate to apply bandwidth
- connection.peers[response.userid].renegotiate();
- }
-
- if (response.customMessage) {
- if (!connection.peers[response.userid]) throw 'No such peer exists.';
- if (response.message.ejected) {
- if (connection.sessionDescriptions[connection.sessionid].userid != response.userid) {
- throw 'only initiator can eject a user.';
- }
- // initiator ejected this user
- connection.leave();
-
- connection.onSessionClosed({
- userid: response.userid,
- extra: response.extra || _config.extra,
- isEjected: true
- });
- } else connection.peers[response.userid].onCustomMessage(response.message);
- }
-
- if (response.drop) {
- if (!connection.peers[response.userid]) throw 'No such peer exists.';
- connection.peers[response.userid].drop(true);
- connection.peers[response.userid].renegotiate();
-
- connection.ondrop(response.userid);
- }
-
- if (response.hold || response.unhold) {
- if (!connection.peers[response.userid]) throw 'No such peer exists.';
-
- if (response.takeAction) {
- connection.peers[response.userid][!!response.hold ? 'hold' : 'unhold'](response.holdMLine);
- return;
- }
-
- connection.peers[response.userid].peer.hold = !!response.hold;
- connection.peers[response.userid].peer.holdMLine = response.holdMLine;
-
- socket.send({
- isRenegotiate: true
- });
-
- connection.peers[response.userid].fireHoldUnHoldEvents({
- kind: response.holdMLine,
- isHold: !!response.hold,
- userid: response.userid
- });
- }
-
- if (response.isRenegotiate) {
- connection.peers[response.userid].renegotiate(null, connection.peers[response.userid].peer.session);
- }
-
- // fake data channels!
- if (response.fakeData) {
- peerConfig.onmessage(response.fakeData);
- }
-
- // sometimes we don't need to renegotiate e.g. when peers are disconnected
- // or if it is firefox
- if (response.recreatePeer) {
- peer = new PeerConnection();
- }
-
- // remote video failed either out of ICE gathering process or ICE connectivity check-up
- // or IceAgent was unable to locate valid candidates/ports.
- if (response.failedToReceiveRemoteVideo) {
- log('Remote peer hasn\'t received stream: ' + response.streamid + '. Renegotiating...');
- if (connection.peers[response.userid]) {
- connection.peers[response.userid].renegotiate();
- }
- }
-
- if (response.redial) {
- if (connection.peers[response.userid]) {
- if (connection.peers[response.userid].peer.connection.iceConnectionState != 'disconnected') {
- _config.redialing = false;
- }
-
- if (connection.peers[response.userid].peer.connection.iceConnectionState == 'disconnected' && !_config.redialing) {
- _config.redialing = true;
-
- warn('Peer connection is closed.', toStr(connection.peers[response.userid].peer.connection), 'ReDialing..');
- connection.peers[response.userid].redial();
- }
- }
- }
- }
-
- connection.playRoleOfInitiator = function() {
- connection.dontCaptureUserMedia = true;
- connection.open();
- sockets = swap(sockets);
- connection.dontCaptureUserMedia = false;
- };
-
- connection.askToShareParticipants = function() {
- defaultSocket && defaultSocket.send({
- askToShareParticipants: true
- });
- };
-
- connection.shareParticipants = function(args) {
- var message = {
- joinUsers: participants,
- userid: connection.userid,
- extra: connection.extra
- };
-
- if (args) {
- if (args.dontShareWith) message.dontShareWith = args.dontShareWith;
- if (args.shareWith) message.shareWith = args.shareWith;
- }
-
- defaultSocket.send(message);
- };
-
- function sdpInvoker(sdp, labels) {
- if (sdp.type == 'answer') {
- peer.setRemoteDescription(sdp);
- updateSocket();
- return;
- }
- if (!_config.renegotiate && sdp.type == 'offer') {
- peerConfig.offerDescription = sdp;
-
- peerConfig.session = connection.session;
- if (!peer) peer = new PeerConnection();
- peer.create('answer', peerConfig);
-
- updateSocket();
- return;
- }
-
- var session = _config.renegotiate;
- // detach streams
- detachMediaStream(labels, peer.connection);
-
- if (session.oneway || isData(session)) {
- createAnswer();
- delete _config.renegotiate;
- } else {
- if (_config.capturing)
- return;
-
- _config.capturing = true;
-
- connection.captureUserMedia(function(stream) {
- _config.capturing = false;
-
- peer.addStream(stream);
-
- connection.renegotiatedSessions[JSON.stringify(_config.renegotiate)] = {
- session: _config.renegotiate,
- stream: stream
- };
-
- delete _config.renegotiate;
-
- createAnswer();
- }, _config.renegotiate);
- }
-
- function createAnswer() {
- peer.recreateAnswer(sdp, session, function(_sdp, streaminfo) {
- sendsdp({
- sdp: _sdp,
- socket: socket,
- streaminfo: streaminfo
- });
- connection.detachStreams = [];
- });
- }
- }
- }
-
- function detachMediaStream(labels, peer) {
- if (!labels) return;
- for (var i = 0; i < labels.length; i++) {
- var label = labels[i];
- if (connection.streams[label]) {
- peer.removeStream(connection.streams[label].stream);
- }
- }
- }
-
- function sendsdp(e) {
- e.socket.send({
- sdp: JSON.stringify({
- sdp: e.sdp.sdp,
- type: e.sdp.type
- }),
- renegotiate: !!e.renegotiate ? e.renegotiate : false,
- streaminfo: e.streaminfo || '',
- labels: e.labels || [],
- preferSCTP: !!connection.preferSCTP,
- fakeDataChannels: !!connection.fakeDataChannels,
- isInitiator: !!connection.isInitiator,
- userinfo: {
- browser: isFirefox ? 'firefox' : 'chrome'
- }
- });
- }
-
- // sharing new user with existing participants
-
- function onNewParticipant(response) {
- var channel = response.newParticipant;
-
- if (!channel || !!participants[channel] || channel == connection.userid)
- return;
-
- var new_channel = connection.token();
- newPrivateSocket({
- channel: new_channel,
- extra: response.userData ? response.userData.extra : response.extra,
- userid: response.userData ? response.userData.userid : response.userid
- });
-
- defaultSocket.send({
- participant: true,
- targetUser: channel,
- channel: new_channel
- });
- }
-
- // if a user leaves
-
- function clearSession() {
- connection.numberOfConnectedUsers--;
-
- var alertMessage = {
- left: true,
- extra: connection.extra || {},
- userid: connection.userid,
- sessionid: connection.sessionid
- };
-
- if (connection.isInitiator) {
- // if initiator wants to close entire session
- if (connection.autoCloseEntireSession) {
- alertMessage.closeEntireSession = true;
- } else if (sockets[0]) {
- // shift initiation control to another user
- sockets[0].send({
- playRoleOfBroadcaster: true,
- userid: connection.userid,
- extra: connection.extra,
- participants: participants
- });
- }
- }
-
- sockets.forEach(function(socket, i) {
- socket.send(alertMessage);
-
- if (socketObjects[socket.channel]) {
- delete socketObjects[socket.channel];
- }
-
- delete sockets[i];
- });
-
- sockets = swap(sockets);
-
- connection.refresh();
-
- webAudioMediaStreamSources.forEach(function(mediaStreamSource) {
- // if source is connected; then chrome will crash on unload.
- mediaStreamSource.disconnect();
- });
-
- webAudioMediaStreamSources = [];
- }
-
- // www.RTCMultiConnection.org/docs/remove/
- connection.remove = function(userid) {
- if (rtcMultiSession.requestsFrom && rtcMultiSession.requestsFrom[userid]) delete rtcMultiSession.requestsFrom[userid];
-
- if (connection.peers[userid]) {
- if (connection.peers[userid].peer && connection.peers[userid].peer.connection) {
- if (connection.peers[userid].peer.connection.signalingState != 'closed') {
- connection.peers[userid].peer.connection.close();
- }
- connection.peers[userid].peer.connection = null;
- }
- delete connection.peers[userid];
- }
- if (participants[userid]) {
- delete participants[userid];
- }
-
- for (var stream in connection.streams) {
- stream = connection.streams[stream];
- if (stream.userid == userid) {
- onStreamEndedHandler(stream, connection);
- delete connection.streams[stream];
- }
- }
-
- if (socketObjects[userid]) {
- delete socketObjects[userid];
- }
- };
-
- // www.RTCMultiConnection.org/docs/refresh/
- connection.refresh = function() {
- // if firebase; remove data from firebase servers
- if (connection.isInitiator && !!connection.socket && !!connection.socket.remove) {
- connection.socket.remove();
- }
-
- participants = {};
-
- // to stop/remove self streams
- for (var i = 0; i < connection.attachStreams.length; i++) {
- connection.stopMediaStream(connection.attachStreams[i]);
- }
-
- // to allow capturing of identical streams
- currentUserMediaRequest = {
- streams: [],
- mutex: false,
- queueRequests: []
- };
-
- rtcMultiSession.isOwnerLeaving = true;
-
- connection.isInitiator = false;
- connection.isAcceptNewSession = true;
- connection.attachMediaStreams = [];
- connection.sessionDescription = null;
- connection.sessionDescriptions = {};
- connection.localStreamids = [];
- connection.preRecordedMedias = {};
- connection.snapshots = {};
-
- connection.numberOfConnectedUsers = 0;
- connection.numberOfSessions = 0;
-
- connection.attachStreams = [];
- connection.detachStreams = [];
- connection.fileQueue = {};
- connection.channels = {};
- connection.renegotiatedSessions = {};
-
- for (var peer in connection.peers) {
- if (peer != connection.userid) {
- delete connection.peers[peer];
- }
- }
-
- // to make sure remote streams are also removed!
- for (var stream in connection.streams) {
- if (connection._skip.indexOf(stream) == -1) {
- onStreamEndedHandler(connection.streams[stream], connection);
- delete connection.streams[stream];
- }
- }
-
- socketObjects = {};
- sockets = [];
- participants = {};
- };
-
- // www.RTCMultiConnection.org/docs/reject/
- connection.reject = function(userid) {
- if (!isString(userid)) userid = userid.userid;
- defaultSocket.send({
- rejectedRequestOf: userid
- });
-
- // remove relevant data to allow him join again
- connection.remove(userid);
- };
-
- rtcMultiSession.leaveHandler = function(e) {
- if (!connection.leaveOnPageUnload) return;
-
- if (isNull(e.keyCode)) {
- return clearSession();
- }
-
- if (e.keyCode == 116) {
- clearSession();
- }
- };
-
- listenEventHandler('beforeunload', rtcMultiSession.leaveHandler);
- listenEventHandler('keyup', rtcMultiSession.leaveHandler);
-
- rtcMultiSession.onLineOffLineHandler = function() {
- if (!navigator.onLine) {
- rtcMultiSession.isOffLine = true;
- } else if (rtcMultiSession.isOffLine) {
- rtcMultiSession.isOffLine = !navigator.onLine;
-
- // defaultSocket = getDefaultSocketRef();
-
- // pending tasks should be resumed?
- // sockets should be reconnected?
- // peers should be re-established?
- }
- };
-
- listenEventHandler('load', rtcMultiSession.onLineOffLineHandler);
- listenEventHandler('online', rtcMultiSession.onLineOffLineHandler);
- listenEventHandler('offline', rtcMultiSession.onLineOffLineHandler);
-
- function onSignalingReady() {
- if (rtcMultiSession.signalingReady) return;
- rtcMultiSession.signalingReady = true;
-
- setTimeout(callbackForSignalingReady, 1000);
-
- if (!connection.isInitiator) {
- // as soon as signaling gateway is connected;
- // user should check existing rooms!
- defaultSocket && defaultSocket.send({
- searchingForRooms: true
- });
- }
- }
-
- function joinParticipants(joinUsers) {
- for (var user in joinUsers) {
- if (!participants[joinUsers[user]]) {
- onNewParticipant({
- sessionid: connection.sessionid,
- newParticipant: joinUsers[user],
- userid: connection.userid,
- extra: connection.extra
- });
- }
- }
- }
-
- function getDefaultSocketRef() {
- return connection.openSignalingChannel({
- onmessage: function(response) {
- // RMS == RTCMultiSession
- if (isRMSDeleted) return;
-
- // if message is sent by same user
- if (response.userid == connection.userid) return;
-
- if (response.sessionid && response.userid) {
- if (!connection.sessionDescriptions[response.sessionid]) {
- connection.numberOfSessions++;
- connection.sessionDescriptions[response.sessionid] = response;
-
- // fire "onNewSession" only if:
- // 1) "isAcceptNewSession" boolean is true
- // 2) "sessionDescriptions" object isn't having same session i.e. to prevent duplicate invocations
- if (connection.isAcceptNewSession) {
-
- if (!connection.dontOverrideSession) {
- connection.session = response.session;
- }
-
- onNewSession(response);
- }
- }
- }
-
- if (response.newParticipant && !connection.isAcceptNewSession && rtcMultiSession.broadcasterid === response.userid) {
- if (response.newParticipant != connection.userid) {
- onNewParticipant(response);
- }
- }
-
- if (getLength(participants) < connection.maxParticipantsAllowed && response.targetUser == connection.userid && response.participant) {
- if (connection.peers[response.userid] && !connection.peers[response.userid].peer) {
- delete participants[response.userid];
- delete connection.peers[response.userid];
- connection.isAcceptNewSession = true;
- return acceptRequest(response);
- }
-
- if (!participants[response.userid]) {
- acceptRequest(response);
- }
- }
-
- if (response.acceptedRequestOf == connection.userid) {
- connection.onstatechange({
- userid: response.userid,
- extra: response.extra,
- name: 'request-accepted',
- reason: response.userid + ' accepted your participation request.'
- });
- }
-
- if (response.rejectedRequestOf == connection.userid) {
- connection.onstatechange({
- userid: response.userid,
- extra: response.extra,
- name: 'request-rejected',
- reason: response.userid + ' rejected your participation request.'
- });
- }
-
- if (response.customMessage) {
- if (response.message.drop) {
- connection.ondrop(response.userid);
-
- connection.attachStreams = [];
- // "drop" should detach all local streams
- for (var stream in connection.streams) {
- if (connection._skip.indexOf(stream) == -1) {
- stream = connection.streams[stream];
- if (stream.type == 'local') {
- connection.detachStreams.push(stream.streamid);
- onStreamEndedHandler(stream, connection);
- } else onStreamEndedHandler(stream, connection);
- }
- }
-
- if (response.message.renegotiate) {
- // renegotiate; so "peer.removeStream" happens.
- connection.renegotiate();
- }
- } else if (connection.onCustomMessage) {
- connection.onCustomMessage(response.message);
- }
- }
-
- if (connection.isInitiator && response.searchingForRooms) {
- defaultSocket && defaultSocket.send({
- sessionDescription: connection.sessionDescription,
- responseFor: response.userid
- });
- }
-
- if (response.sessionDescription && response.responseFor == connection.userid) {
- var sessionDescription = response.sessionDescription;
- if (!connection.sessionDescriptions[sessionDescription.sessionid]) {
- connection.numberOfSessions++;
- connection.sessionDescriptions[sessionDescription.sessionid] = sessionDescription;
- }
- }
-
- if (connection.isInitiator && response.askToShareParticipants && defaultSocket) {
- connection.shareParticipants({
- shareWith: response.userid
- });
- }
-
- // participants are shared with single user
- if (response.shareWith == connection.userid && response.dontShareWith != connection.userid && response.joinUsers) {
- joinParticipants(response.joinUsers);
- }
-
- // participants are shared with all users
- if (!response.shareWith && response.joinUsers) {
- if (response.dontShareWith) {
- if (connection.userid != response.dontShareWith) {
- joinParticipants(response.joinUsers);
- }
- } else joinParticipants(response.joinUsers);
- }
-
- if (response.messageFor == connection.userid && response.presenceState) {
- if (response.presenceState == 'checking') {
- defaultSocket.send({
- messageFor: response.userid,
- presenceState: 'available',
- _config: response._config
- });
- log('participant asked for availability');
- }
-
- if (response.presenceState == 'available') {
- rtcMultiSession.presenceState = 'available';
-
- connection.onstatechange({
- userid: 'browser',
- extra: {},
- name: 'room-available',
- reason: 'Initiator is available and room is active.'
- });
-
- joinSession(response._config);
- }
- }
-
- if (response.donotJoin && response.messageFor == connection.userid) {
- log(response.userid, 'is not joining your room.');
- }
-
- // if initiator disconnects sockets, participants should also disconnect
- if (response.isDisconnectSockets) {
- log('Disconnecting your sockets because initiator also disconnected his sockets.');
- connection.disconnect();
- }
- },
- callback: function(socket) {
- socket && this.onopen(socket);
- },
- onopen: function(socket) {
- if (socket) defaultSocket = socket;
- if (onSignalingReady) onSignalingReady();
-
- rtcMultiSession.defaultSocket = defaultSocket;
-
- if (!defaultSocket.__push) {
- defaultSocket.__push = defaultSocket.send;
- defaultSocket.send = function(message) {
- message.userid = message.userid || connection.userid;
- message.extra = message.extra || connection.extra || {};
-
- defaultSocket.__push(message);
- };
- }
- }
- });
- }
-
- // default-socket is a common socket shared among all users in a specific channel;
- // to share participation requests; room descriptions; and other stuff.
- var defaultSocket = getDefaultSocketRef();
-
- rtcMultiSession.defaultSocket = defaultSocket;
-
- if (defaultSocket && onSignalingReady) setTimeout(onSignalingReady, 2000);
-
- if (connection.session.screen) {
- loadScreenFrame();
- }
- // CUSTOM CODE //
-
- /* Commenting this
- connection.getExternalIceServers && loadIceFrame(function(iceServers)
- {
- connection.iceServers = connection.iceServers.concat(iceServers);
- });
- */
-
- // CUSTOM CODE //
-
- if (connection.log == false) connection.skipLogs();
- if (connection.onlog) {
- log = warn = error = function() {
- var log = {};
- var index = 0;
- Array.prototype.slice.call(arguments).forEach(function(argument) {
- log[index++] = toStr(argument);
- });
- toStr = function(str) {
- return str;
- };
- connection.onlog(log);
- };
- }
-
- function setDirections() {
- var userMaxParticipantsAllowed = 0;
-
- // if user has set a custom max participant setting, remember it
- if (connection.maxParticipantsAllowed != 256) {
- userMaxParticipantsAllowed = connection.maxParticipantsAllowed;
- }
-
- if (connection.direction == 'one-way') connection.session.oneway = true;
- if (connection.direction == 'one-to-one') connection.maxParticipantsAllowed = 1;
- if (connection.direction == 'one-to-many') connection.session.broadcast = true;
- if (connection.direction == 'many-to-many') {
- if (!connection.maxParticipantsAllowed || connection.maxParticipantsAllowed == 1) {
- connection.maxParticipantsAllowed = 256;
- }
- }
-
- // if user has set a custom max participant setting, set it back
- if (userMaxParticipantsAllowed && connection.maxParticipantsAllowed != 1) {
- connection.maxParticipantsAllowed = userMaxParticipantsAllowed;
- }
- }
-
- // open new session
- this.initSession = function(args) {
- rtcMultiSession.isOwnerLeaving = false;
-
- setDirections();
- participants = {};
-
- rtcMultiSession.isOwnerLeaving = false;
-
- if (!isNull(args.transmitRoomOnce)) {
- connection.transmitRoomOnce = args.transmitRoomOnce;
- }
-
- function transmit() {
- if (defaultSocket && getLength(participants) < connection.maxParticipantsAllowed && !rtcMultiSession.isOwnerLeaving) {
- defaultSocket.send(connection.sessionDescription);
- }
-
- if (!connection.transmitRoomOnce && !rtcMultiSession.isOwnerLeaving)
- setTimeout(transmit, connection.interval || 3000);
- }
-
- // todo: test and fix next line.
- if (!args.dontTransmit /* || connection.transmitRoomOnce */ ) transmit();
- };
-
- function joinSession(_config, skipOnStateChange) {
- if (rtcMultiSession.donotJoin && rtcMultiSession.donotJoin == _config.sessionid) {
- return;
- }
-
- // dontOverrideSession allows you force RTCMultiConnection
- // to not override default session for participants;
- // by default, session is always overridden and set to the session coming from initiator!
- if (!connection.dontOverrideSession) {
- connection.session = _config.session || {};
- }
-
- // make sure that inappropriate users shouldn't receive onNewSession event
- rtcMultiSession.broadcasterid = _config.userid;
-
- if (_config.sessionid) {
- // used later to prevent external rooms messages to be used by this user!
- connection.sessionid = _config.sessionid;
- }
-
- connection.isAcceptNewSession = false;
-
- var channel = getRandomString();
- newPrivateSocket({
- channel: channel,
- extra: _config.extra || {},
- userid: _config.userid
- });
-
- var offers = {};
- if (connection.attachStreams.length) {
- var stream = connection.attachStreams[connection.attachStreams.length - 1];
- if (!!stream.getAudioTracks && stream.getAudioTracks().length) {
- offers.audio = true;
- }
- if (stream.getVideoTracks().length) {
- offers.video = true;
- }
- }
-
- if (!isEmpty(offers)) {
- log(toStr(offers));
- } else log('Seems data-only connection.');
-
- connection.onstatechange({
- userid: _config.userid,
- extra: {},
- name: 'connecting-with-initiator',
- reason: 'Checking presence of the initiator; and the room.'
- });
-
- defaultSocket.send({
- participant: true,
- channel: channel,
- targetUser: _config.userid,
- session: connection.session,
- offers: {
- audio: !!offers.audio,
- video: !!offers.video
- }
- });
-
- connection.skipOnNewSession = false;
- invokeMediaCaptured(connection);
- }
-
- // join existing session
- this.joinSession = function(_config) {
- if (!defaultSocket)
- return setTimeout(function() {
- warn('Default-Socket is not yet initialized.');
- rtcMultiSession.joinSession(_config);
- }, 1000);
-
- _config = _config || {};
- participants = {};
-
- rtcMultiSession.presenceState = 'checking';
-
- connection.onstatechange({
- userid: _config.userid,
- extra: _config.extra || {},
- name: 'detecting-room-presence',
- reason: 'Checking presence of the room.'
- });
-
- function contactInitiator() {
- defaultSocket.send({
- messageFor: _config.userid,
- presenceState: rtcMultiSession.presenceState,
- _config: {
- userid: _config.userid,
- extra: _config.extra || {},
- sessionid: _config.sessionid,
- session: _config.session || false
- }
- });
- }
- contactInitiator();
-
- function checker() {
- if (rtcMultiSession.presenceState == 'checking') {
- warn('Unable to reach initiator. Trying again...');
- contactInitiator();
- setTimeout(function() {
- if (rtcMultiSession.presenceState == 'checking') {
- connection.onstatechange({
- userid: _config.userid,
- extra: _config.extra || {},
- name: 'room-not-available',
- reason: 'Initiator seems absent. Waiting for someone to open the room.'
- });
-
- connection.isAcceptNewSession = true;
- setTimeout(checker, 2000);
- }
- }, 2000);
- }
- }
-
- setTimeout(checker, 3000);
- };
-
- connection.donotJoin = function(sessionid) {
- rtcMultiSession.donotJoin = sessionid;
-
- var session = connection.sessionDescriptions[sessionid];
- if (!session) return;
-
- defaultSocket.send({
- donotJoin: true,
- messageFor: session.userid,
- sessionid: sessionid
- });
-
- participants = {};
- connection.isAcceptNewSession = true;
- connection.sessionid = null;
- };
-
- // send file/data or text message
- this.send = function(message, _channel) {
- if (!(message instanceof ArrayBuffer || message instanceof DataView)) {
- message = str2ab({
- extra: connection.extra,
- userid: connection.userid,
- data: message
- });
- }
-
- if (_channel) {
- if (_channel.readyState == 'open') {
- _channel.send(message);
- }
- return;
- }
-
- for (var dataChannel in connection.channels) {
- var channel = connection.channels[dataChannel].channel;
- if (channel.readyState == 'open') {
- channel.send(message);
- }
- }
- };
-
- // leave session
- this.leave = function() {
- clearSession();
- };
-
- // renegotiate new stream
- this.addStream = function(e) {
- var session = e.renegotiate;
-
- if (!connection.renegotiatedSessions[JSON.stringify(e.renegotiate)]) {
- connection.renegotiatedSessions[JSON.stringify(e.renegotiate)] = {
- session: e.renegotiate,
- stream: e.stream
- };
- }
-
- if (e.socket) {
- if (e.socket.userid != connection.userid) {
- addStream(connection.peers[e.socket.userid]);
- }
- } else {
- for (var peer in connection.peers) {
- if (peer != connection.userid) {
- addStream(connection.peers[peer]);
- }
- }
- }
-
- function addStream(_peer) {
- var socket = _peer.socket;
-
- if (!socket) {
- warn(_peer, 'doesn\'t has socket.');
- return;
- }
-
- updateSocketForLocalStreams(socket);
-
- if (!_peer || !_peer.peer) {
- throw 'No peer to renegotiate.';
- }
-
- var peer = _peer.peer;
-
- if (e.stream) {
- if (!peer.attachStreams) {
- peer.attachStreams = [];
- }
-
- peer.attachStreams.push(e.stream);
- }
-
- // detaching old streams
- detachMediaStream(connection.detachStreams, peer.connection);
-
- if (e.stream && (session.audio || session.video || session.screen)) {
- peer.addStream(e.stream);
- }
-
- peer.recreateOffer(session, function(sdp, streaminfo) {
- sendsdp({
- sdp: sdp,
- socket: socket,
- renegotiate: session,
- labels: connection.detachStreams,
- streaminfo: streaminfo
- });
- connection.detachStreams = [];
- });
- }
- };
-
- // www.RTCMultiConnection.org/docs/request/
- connection.request = function(userid, extra) {
- connection.captureUserMedia(function() {
- // open private socket that will be used to receive offer-sdp
- newPrivateSocket({
- channel: connection.userid,
- extra: extra || {},
- userid: userid
- });
-
- // ask other user to create offer-sdp
- defaultSocket.send({
- participant: true,
- targetUser: userid
- });
- });
- };
-
- function acceptRequest(response) {
- if (!rtcMultiSession.requestsFrom) rtcMultiSession.requestsFrom = {};
- if (rtcMultiSession.requestsFrom[response.userid]) return;
-
- var obj = {
- userid: response.userid,
- extra: response.extra,
- channel: response.channel || response.userid,
- session: response.session || connection.session
- };
-
- // check how participant is willing to join
- if (response.offers) {
- if (response.offers.audio && response.offers.video) {
- log('target user has both audio/video streams.');
- } else if (response.offers.audio && !response.offers.video) {
- log('target user has only audio stream.');
- } else if (!response.offers.audio && response.offers.video) {
- log('target user has only video stream.');
- } else {
- log('target user has no stream; it seems one-way streaming or data-only connection.');
- }
-
- var mandatory = connection.sdpConstraints.mandatory;
- if (isNull(mandatory.OfferToReceiveAudio)) {
- connection.sdpConstraints.mandatory.OfferToReceiveAudio = !!response.offers.audio;
- }
- if (isNull(mandatory.OfferToReceiveVideo)) {
- connection.sdpConstraints.mandatory.OfferToReceiveVideo = !!response.offers.video;
- }
-
- log('target user\'s SDP has?', toStr(connection.sdpConstraints.mandatory));
- }
-
- rtcMultiSession.requestsFrom[response.userid] = obj;
-
- // www.RTCMultiConnection.org/docs/onRequest/
- if (connection.onRequest && connection.isInitiator) {
- connection.onRequest(obj);
- } else _accept(obj);
- }
-
- function _accept(e) {
- if (rtcMultiSession.captureUserMediaOnDemand) {
- rtcMultiSession.captureUserMediaOnDemand = false;
- connection.captureUserMedia(function() {
- _accept(e);
-
- invokeMediaCaptured(connection);
- });
- return;
- }
-
- log('accepting request from', e.userid);
- participants[e.userid] = e.userid;
- newPrivateSocket({
- isofferer: true,
- userid: e.userid,
- channel: e.channel,
- extra: e.extra || {},
- session: e.session || connection.session
- });
- }
-
- // www.RTCMultiConnection.org/docs/accept/
- connection.accept = function(e) {
- // for backward compatibility
- if (arguments.length > 1 && isString(arguments[0])) {
- e = {};
- if (arguments[0]) e.userid = arguments[0];
- if (arguments[1]) e.extra = arguments[1];
- if (arguments[2]) e.channel = arguments[2];
- }
-
- connection.captureUserMedia(function() {
- _accept(e);
- });
- };
-
- var isRMSDeleted = false;
- this.disconnect = function() {
- this.isOwnerLeaving = true;
-
- if (!connection.keepStreamsOpened) {
- for (var streamid in connection.localStreams) {
- connection.localStreams[streamid].stop();
- }
- connection.localStreams = {};
-
- currentUserMediaRequest = {
- streams: [],
- mutex: false,
- queueRequests: []
- };
- }
-
- if (connection.isInitiator) {
- defaultSocket.send({
- isDisconnectSockets: true
- });
- }
-
- connection.refresh();
-
- rtcMultiSession.defaultSocket = defaultSocket = null;
- isRMSDeleted = true;
-
- connection.ondisconnected({
- userid: connection.userid,
- extra: connection.extra,
- peer: connection.peers[connection.userid],
- isSocketsDisconnected: true
- });
-
- // if there is any peer still opened; close it.
- connection.close();
-
- window.removeEventListener('beforeunload', rtcMultiSession.leaveHandler);
- window.removeEventListener('keyup', rtcMultiSession.leaveHandler);
-
- // it will not work, though :)
- delete this;
-
- log('Disconnected your sockets, peers, streams and everything except RTCMultiConnection object.');
- };
- }
-
- var webAudioMediaStreamSources = [];
-
- function convertToAudioStream(mediaStream) {
- if (!mediaStream) throw 'MediaStream is mandatory.';
-
- if (mediaStream.getVideoTracks && !mediaStream.getVideoTracks().length) {
- return mediaStream;
- }
-
- var context = new AudioContext();
- var mediaStreamSource = context.createMediaStreamSource(mediaStream);
-
- var destination = context.createMediaStreamDestination();
- mediaStreamSource.connect(destination);
-
- webAudioMediaStreamSources.push(mediaStreamSource);
-
- return destination.stream;
- }
-
- var isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;
- var isFirefox = typeof window.InstallTrigger !== 'undefined';
- var isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;
- var isChrome = !!window.chrome && !isOpera;
- var isIE = !!document.documentMode;
-
- var isPluginRTC = isSafari || isIE;
-
- var isMobileDevice = !!navigator.userAgent.match(/Android|iPhone|iPad|iPod|BlackBerry|IEMobile/i);
-
- // detect node-webkit
- var isNodeWebkit = !!(window.process && (typeof window.process == 'object') && window.process.versions && window.process.versions['node-webkit']);
-
- window.MediaStream = window.MediaStream || window.webkitMediaStream;
- window.AudioContext = window.AudioContext || window.webkitAudioContext;
-
- function getRandomString() {
- // suggested by @rvulpescu from #154
- if (window.crypto && crypto.getRandomValues && navigator.userAgent.indexOf('Safari') == -1) {
- var a = window.crypto.getRandomValues(new Uint32Array(3)),
- token = '';
- for (var i = 0, l = a.length; i < l; i++) {
- token += a[i].toString(36);
- }
- return token;
- } else {
- return (Math.random() * new Date().getTime()).toString(36).replace(/\./g, '');
- }
- }
-
- var chromeVersion = 50;
- var matchArray = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
- if (isChrome && matchArray && matchArray[2]) {
- chromeVersion = parseInt(matchArray[2], 10);
- }
-
- var firefoxVersion = 50;
- matchArray = navigator.userAgent.match(/Firefox\/(.*)/);
- if (isFirefox && matchArray && matchArray[1]) {
- firefoxVersion = parseInt(matchArray[1], 10);
- }
-
- function isData(session) {
- return !session.audio && !session.video && !session.screen && session.data;
- }
-
- function isNull(obj) {
- return typeof obj == 'undefined';
- }
-
- function isString(obj) {
- return typeof obj == 'string';
- }
-
- function isEmpty(session) {
- var length = 0;
- for (var s in session) {
- length++;
- }
- return length == 0;
- }
-
- // this method converts array-buffer into string
- function ab2str(buf) {
- var result = '';
- try {
- result = String.fromCharCode.apply(null, new Uint16Array(buf));
- } catch (e) {}
- return result;
- }
-
- // this method converts string into array-buffer
- function str2ab(str) {
- if (!isString(str)) str = JSON.stringify(str);
-
- var buf = new ArrayBuffer(str.length * 2); // 2 bytes for each char
- var bufView = new Uint16Array(buf);
- for (var i = 0, strLen = str.length; i < strLen; i++) {
- bufView[i] = str.charCodeAt(i);
- }
- return buf;
- }
-
- function swap(arr) {
- var swapped = [],
- length = arr.length;
- for (var i = 0; i < length; i++)
- if (arr[i] && arr[i] !== true)
- swapped.push(arr[i]);
- return swapped;
- }
-
- function forEach(obj, callback) {
- for (var item in obj) {
- callback(obj[item], item);
- }
- }
-
- var console = window.console || {
- log: function() {},
- error: function() {},
- warn: function() {}
- };
-
- function log() {
- console.log(arguments);
- }
-
- function error() {
- console.error(arguments);
- }
-
- function warn() {
- console.warn(arguments);
- }
-
- if (isChrome || isFirefox || isSafari) {
- var log = console.log.bind(console);
- var error = console.error.bind(console);
- var warn = console.warn.bind(console);
- }
-
- function toStr(obj) {
- return JSON.stringify(obj, function(key, value) {
- if (value && value.sdp) {
- log(value.sdp.type, '\t', value.sdp.sdp);
- return '';
- } else return value;
- }, '\t');
- }
-
- function getLength(obj) {
- var length = 0;
- for (var o in obj)
- if (o) length++;
- return length;
- }
-
- // Get HTMLAudioElement/HTMLVideoElement accordingly
-
- function createMediaElement(stream, session) {
- var mediaElement = document.createElement(stream.isAudio ? 'audio' : 'video');
- mediaElement.id = stream.streamid;
-
- if (isPluginRTC) {
- var body = (document.body || document.documentElement);
- body.insertBefore(mediaElement, body.firstChild);
-
- setTimeout(function() {
- Plugin.attachMediaStream(mediaElement, stream)
- }, 1000);
-
- return Plugin.attachMediaStream(mediaElement, stream);
- }
-
- // "mozSrcObject" is always preferred over "src"!!
- mediaElement[isFirefox ? 'mozSrcObject' : 'src'] = isFirefox ? stream : (window.URL || window.webkitURL).createObjectURL(stream);
-
- mediaElement.controls = true;
- mediaElement.autoplay = !!session.remote;
- mediaElement.muted = session.remote ? false : true;
-
- // http://goo.gl/WZ5nFl
- // Firefox don't yet support onended for any stream (remote/local)
- isFirefox && mediaElement.addEventListener('ended', function() {
- stream.onended();
- }, false);
-
- mediaElement.play();
-
- return mediaElement;
- }
-
- var onStreamEndedHandlerFiredFor = {};
-
- function onStreamEndedHandler(streamedObject, connection) {
- if (streamedObject.mediaElement && !streamedObject.mediaElement.parentNode) return;
-
- if (onStreamEndedHandlerFiredFor[streamedObject.streamid]) return;
- onStreamEndedHandlerFiredFor[streamedObject.streamid] = streamedObject;
- connection.onstreamended(streamedObject);
- }
-
- var onLeaveHandlerFiredFor = {};
-
- function onLeaveHandler(event, connection) {
- if (onLeaveHandlerFiredFor[event.userid]) return;
- onLeaveHandlerFiredFor[event.userid] = event;
- connection.onleave(event);
- }
-
- function takeSnapshot(args) {
- var userid = args.userid;
- var connection = args.connection;
-
- function _takeSnapshot(video) {
- var canvas = document.createElement('canvas');
- canvas.width = video.videoWidth || video.clientWidth;
- canvas.height = video.videoHeight || video.clientHeight;
-
- var context = canvas.getContext('2d');
- context.drawImage(video, 0, 0, canvas.width, canvas.height);
-
- connection.snapshots[userid] = canvas.toDataURL('image/png');
- args.callback && args.callback(connection.snapshots[userid]);
- }
-
- if (args.mediaElement) return _takeSnapshot(args.mediaElement);
-
- for (var stream in connection.streams) {
- stream = connection.streams[stream];
- if (stream.userid == userid && stream.stream && stream.stream.getVideoTracks && stream.stream.getVideoTracks().length) {
- _takeSnapshot(stream.mediaElement);
- continue;
- }
- }
- }
-
- function invokeMediaCaptured(connection) {
- // to let user know that media resource has been captured
- // now, he can share "sessionDescription" using sockets
- if (connection.onMediaCaptured) {
- connection.onMediaCaptured();
- delete connection.onMediaCaptured;
- }
- }
-
- function merge(mergein, mergeto) {
- if (!mergein) mergein = {};
- if (!mergeto) return mergein;
-
- for (var item in mergeto) {
- mergein[item] = mergeto[item];
- }
- return mergein;
- }
-
- function loadScript(src, onload) {
- var script = document.createElement('script');
- script.src = src;
- script.onload = function() {
- log('loaded resource:', src);
- if (onload) onload();
- };
- document.documentElement.appendChild(script);
- }
-
- function capturePartOfScreen(args) {
- var connection = args.connection;
- var element = args.element;
-
- if (!window.html2canvas) {
- return loadScript(connection.resources.html2canvas, function() {
- capturePartOfScreen(args);
- });
- }
-
- if (isString(element)) {
- element = document.querySelector(element);
- if (!element) element = document.getElementById(element);
- }
- if (!element) throw 'HTML DOM Element is not accessible!';
-
- // todo: store DOM element somewhere to minimize DOM querying issues
-
- // html2canvas.js is used to take screenshots
- html2canvas(element, {
- onrendered: function(canvas) {
- args.callback(canvas.toDataURL());
- }
- });
- }
-
- function initFileBufferReader(connection, callback) {
- if (!window.FileBufferReader) {
- loadScript(connection.resources.FileBufferReader, function() {
- initFileBufferReader(connection, callback);
- });
- return;
- }
-
- function _private(chunk) {
- chunk.userid = chunk.extra.userid;
- return chunk;
- }
-
- var fileBufferReader = new FileBufferReader();
- fileBufferReader.onProgress = function(chunk) {
- connection.onFileProgress(_private(chunk), chunk.uuid);
- };
-
- fileBufferReader.onBegin = function(file) {
- connection.onFileStart(_private(file));
- };
-
- fileBufferReader.onEnd = function(file) {
- connection.onFileEnd(_private(file));
- };
-
- callback(fileBufferReader);
- }
-
- var screenFrame, loadedScreenFrame;
-
- function loadScreenFrame(skip) {
- if (DetectRTC.screen.extensionid != ReservedExtensionID) {
- return;
- }
-
- if (loadedScreenFrame) return;
- if (!skip) return loadScreenFrame(true);
-
- loadedScreenFrame = true;
-
- var iframe = document.createElement('iframe');
- iframe.onload = function() {
- iframe.isLoaded = true;
- log('Screen Capturing frame is loaded.');
- };
- //iframe.src = 'https://www.webrtc-experiment.com/getSourceId/';
- // CUSTOM CODE //
- iframe.src = 'static/fusion/webrtc/getSourceId.html';
- // CUSTOM CODE //
- iframe.style.display = 'none';
- (document.body || document.documentElement).appendChild(iframe);
-
- screenFrame = {
- postMessage: function() {
- if (!iframe.isLoaded) {
- setTimeout(screenFrame.postMessage, 100);
- return;
- }
- iframe.contentWindow.postMessage({
- captureSourceId: true
- }, '*');
- }
- };
- }
-
- var iceFrame, loadedIceFrame;
-
- function loadIceFrame(callback, skip) {
- if (loadedIceFrame) return;
- if (!skip) return loadIceFrame(callback, true);
-
- loadedIceFrame = true;
-
- var iframe = document.createElement('iframe');
- iframe.onload = function() {
- iframe.isLoaded = true;
-
- listenEventHandler('message', iFrameLoaderCallback);
-
- function iFrameLoaderCallback(event) {
- if (!event.data || !event.data.iceServers) return;
- callback(event.data.iceServers);
-
- // this event listener is no more needed
- window.removeEventListener('message', iFrameLoaderCallback);
- }
-
- iframe.contentWindow.postMessage('get-ice-servers', '*');
- };
- iframe.src = 'https://cdn.webrtc-experiment.com/getIceServers/';
- iframe.style.display = 'none';
- (document.body || document.documentElement).appendChild(iframe);
- }
-
- function muteOrUnmute(e) {
- var stream = e.stream,
- root = e.root,
- session = e.session || {},
- enabled = e.enabled;
-
- if (!session.audio && !session.video) {
- if (!isString(session)) {
- session = merge(session, {
- audio: true,
- video: true
- });
- } else {
- session = {
- audio: true,
- video: true
- };
- }
- }
-
- // implementation from #68
- if (session.type) {
- if (session.type == 'remote' && root.type != 'remote') return;
- if (session.type == 'local' && root.type != 'local') return;
- }
-
- log(enabled ? 'Muting' : 'UnMuting', 'session', toStr(session));
-
- // enable/disable audio/video tracks
-
- if (root.type == 'local' && session.audio && !!stream.getAudioTracks) {
- var audioTracks = stream.getAudioTracks()[0];
- if (audioTracks)
- audioTracks.enabled = !enabled;
- }
-
- if (root.type == 'local' && (session.video || session.screen) && !!stream.getVideoTracks) {
- var videoTracks = stream.getVideoTracks()[0];
- if (videoTracks)
- videoTracks.enabled = !enabled;
- }
-
- root.sockets.forEach(function(socket) {
- if (root.type == 'local') {
- socket.send({
- streamid: root.streamid,
- mute: !!enabled,
- unmute: !enabled,
- session: session
- });
- }
-
- if (root.type == 'remote') {
- socket.send({
- promptMuteUnmute: true,
- streamid: root.streamid,
- mute: !!enabled,
- unmute: !enabled,
- session: session
- });
- }
- });
-
- if (root.type == 'remote') return;
-
- // According to issue #135, onmute/onumute must be fired for self
- // "fakeObject" is used because we need to keep session for renegotiated streams;
- // and MUST pass exact session over onStreamEndedHandler/onmute/onhold/etc. events.
- var fakeObject = merge({}, root);
- fakeObject.session = session;
-
- fakeObject.isAudio = !!fakeObject.session.audio && !fakeObject.session.video;
- fakeObject.isVideo = !!fakeObject.session.video;
- fakeObject.isScreen = !!fakeObject.session.screen;
-
- if (!!enabled) {
- // if muted stream is negotiated
- stream.preMuted = {
- audio: stream.getAudioTracks().length && !stream.getAudioTracks()[0].enabled,
- video: stream.getVideoTracks().length && !stream.getVideoTracks()[0].enabled
- };
- root.rtcMultiConnection.onmute(fakeObject);
- }
-
- if (!enabled) {
- stream.preMuted = {};
- root.rtcMultiConnection.onunmute(fakeObject);
- }
- }
-
- var Firefox_Screen_Capturing_Warning = 'Make sure that you are using Firefox Nightly and you enabled: media.getusermedia.screensharing.enabled flag from about:config page. You also need to add your domain in "media.getusermedia.screensharing.allowed_domains" flag. If you are using WinXP then also enable "media.getusermedia.screensharing.allow_on_old_platforms" flag. NEVER forget to use "only" HTTPs for screen capturing!';
- var SCREEN_COMMON_FAILURE = 'HTTPs i.e. SSL-based URI is mandatory to use screen capturing.';
- // CUSTOM CODE //
- var ReservedExtensionID = 'icgmlogfeajbfdffajhoebcfbibfhaen';
- //var ReservedExtensionID = 'ajhifddimkapgcifgcodmmfdlknahffk';
-
- // if application-developer deployed his own extension on Google App Store
- var useCustomChromeExtensionForScreenCapturing = document.domain.indexOf('webrtc-experiment.com') != -1;
-
- function initHark(args) {
- if (!window.hark) {
- loadScript(args.connection.resources.hark, function() {
- initHark(args);
- });
- return;
- }
-
- var connection = args.connection;
- var streamedObject = args.streamedObject;
- var stream = args.stream;
-
- var options = {};
- var speechEvents = hark(stream, options);
-
- speechEvents.on('speaking', function() {
- if (connection.onspeaking) {
- connection.onspeaking(streamedObject);
- }
- });
-
- speechEvents.on('stopped_speaking', function() {
- if (connection.onsilence) {
- connection.onsilence(streamedObject);
- }
- });
-
- speechEvents.on('volume_change', function(volume, threshold) {
- if (connection.onvolumechange) {
- connection.onvolumechange(merge({
- volume: volume,
- threshold: threshold
- }, streamedObject));
- }
- });
- }
-
- attachEventListener = function(video, type, listener, useCapture) {
- video.addEventListener(type, listener, useCapture);
- };
-
- var Plugin = window.PluginRTC || {};
- window.onPluginRTCInitialized = function(pluginRTCObject) {
- Plugin = pluginRTCObject;
- MediaStreamTrack = Plugin.MediaStreamTrack;
- RTCPeerConnection = Plugin.RTCPeerConnection;
- RTCIceCandidate = Plugin.RTCIceCandidate;
- RTCSessionDescription = Plugin.RTCSessionDescription;
-
- log(isPluginRTC ? 'Java-Applet' : 'ActiveX', 'plugin has been loaded.');
- };
- if (!isEmpty(Plugin)) window.onPluginRTCInitialized(Plugin);
-
- // if IE or Safari
- if (isPluginRTC) {
- loadScript('https://cdn.webrtc-experiment.com/Plugin.EveryWhere.js');
- // loadScript('https://cdn.webrtc-experiment.com/Plugin.Temasys.js');
- }
-
- var MediaStream = window.MediaStream;
-
- if (typeof MediaStream === 'undefined' && typeof webkitMediaStream !== 'undefined') {
- MediaStream = webkitMediaStream;
- }
-
- /*global MediaStream:true */
- if (typeof MediaStream !== 'undefined' && !('stop' in MediaStream.prototype)) {
- MediaStream.prototype.stop = function() {
- this.getAudioTracks().forEach(function(track) {
- track.stop();
- });
-
- this.getVideoTracks().forEach(function(track) {
- track.stop();
- });
- };
- }
-
- var defaultConstraints = {
- mandatory: {},
- optional: []
- };
-
- /* by @FreCap pull request #41 */
- var currentUserMediaRequest = {
- streams: [],
- mutex: false,
- queueRequests: []
- };
-
- function getUserMedia(options) {
- if (isPluginRTC) {
- if (!Plugin.getUserMedia) {
- setTimeout(function() {
- getUserMedia(options);
- }, 1000);
- return;
- }
-
- return Plugin.getUserMedia(options.constraints || {
- audio: true,
- video: true
- }, options.onsuccess, options.onerror);
- }
-
- if (currentUserMediaRequest.mutex === true) {
- currentUserMediaRequest.queueRequests.push(options);
- return;
- }
- currentUserMediaRequest.mutex = true;
-
- var connection = options.connection;
-
- // tools.ietf.org/html/draft-alvestrand-constraints-resolution-00
- var mediaConstraints = options.mediaConstraints || {};
- var videoConstraints = typeof mediaConstraints.video == 'boolean' ? mediaConstraints.video : mediaConstraints.video || mediaConstraints;
- var audioConstraints = typeof mediaConstraints.audio == 'boolean' ? mediaConstraints.audio : mediaConstraints.audio || defaultConstraints;
-
- var n = navigator;
- var hints = options.constraints || {
- audio: defaultConstraints,
- video: defaultConstraints
- };
-
- if (hints.video && hints.video.mozMediaSource) {
- // "mozMediaSource" is redundant
- // need to check "mediaSource" instead.
- videoConstraints = {};
- }
-
- if (hints.video == true) hints.video = defaultConstraints;
- if (hints.audio == true) hints.audio = defaultConstraints;
-
- // connection.mediaConstraints.audio = false;
- if (typeof audioConstraints == 'boolean' && hints.audio) {
- hints.audio = audioConstraints;
- }
-
- // connection.mediaConstraints.video = false;
- if (typeof videoConstraints == 'boolean' && hints.video) {
- hints.video = videoConstraints;
- }
-
- // connection.mediaConstraints.audio.mandatory = {prop:true};
- var audioMandatoryConstraints = audioConstraints.mandatory;
- if (!isEmpty(audioMandatoryConstraints)) {
- hints.audio.mandatory = merge(hints.audio.mandatory, audioMandatoryConstraints);
- }
-
- // connection.media.min(320,180);
- // connection.media.max(1920,1080);
- var videoMandatoryConstraints = videoConstraints.mandatory;
- if (videoMandatoryConstraints) {
- var mandatory = {};
-
- if (videoMandatoryConstraints.minWidth) {
- mandatory.minWidth = videoMandatoryConstraints.minWidth;
- }
-
- if (videoMandatoryConstraints.minHeight) {
- mandatory.minHeight = videoMandatoryConstraints.minHeight;
- }
-
- if (videoMandatoryConstraints.maxWidth) {
- mandatory.maxWidth = videoMandatoryConstraints.maxWidth;
- }
-
- if (videoMandatoryConstraints.maxHeight) {
- mandatory.maxHeight = videoMandatoryConstraints.maxHeight;
- }
-
- if (videoMandatoryConstraints.minAspectRatio) {
- mandatory.minAspectRatio = videoMandatoryConstraints.minAspectRatio;
- }
-
- if (videoMandatoryConstraints.maxFrameRate) {
- mandatory.maxFrameRate = videoMandatoryConstraints.maxFrameRate;
- }
-
- if (videoMandatoryConstraints.minFrameRate) {
- mandatory.minFrameRate = videoMandatoryConstraints.minFrameRate;
- }
-
- if (mandatory.minWidth && mandatory.minHeight) {
- // http://goo.gl/IZVYsj
- var allowed = ['1920:1080', '1280:720', '960:720', '640:360', '640:480', '320:240', '320:180'];
-
- if (allowed.indexOf(mandatory.minWidth + ':' + mandatory.minHeight) == -1 ||
- allowed.indexOf(mandatory.maxWidth + ':' + mandatory.maxHeight) == -1) {
- error('The min/max width/height constraints you passed "seems" NOT supported.', toStr(mandatory));
- }
-
- if (mandatory.minWidth > mandatory.maxWidth || mandatory.minHeight > mandatory.maxHeight) {
- error('Minimum value must not exceed maximum value.', toStr(mandatory));
- }
-
- if (mandatory.minWidth >= 1280 && mandatory.minHeight >= 720) {
- warn('Enjoy HD video! min/' + mandatory.minWidth + ':' + mandatory.minHeight + ', max/' + mandatory.maxWidth + ':' + mandatory.maxHeight);
- }
- }
-
- hints.video.mandatory = merge(hints.video.mandatory, mandatory);
- }
-
- if (videoMandatoryConstraints) {
- hints.video.mandatory = merge(hints.video.mandatory, videoMandatoryConstraints);
- }
-
- // videoConstraints.optional = [{prop:true}];
- if (videoConstraints.optional && videoConstraints.optional instanceof Array && videoConstraints.optional.length) {
- hints.video.optional = hints.video.optional ? hints.video.optional.concat(videoConstraints.optional) : videoConstraints.optional;
- }
-
- // audioConstraints.optional = [{prop:true}];
- if (audioConstraints.optional && audioConstraints.optional instanceof Array && audioConstraints.optional.length) {
- hints.audio.optional = hints.audio.optional ? hints.audio.optional.concat(audioConstraints.optional) : audioConstraints.optional;
- }
-
- if (hints.video.mandatory && !isEmpty(hints.video.mandatory) && connection._mediaSources.video) {
- hints.video.optional.forEach(function(video, index) {
- if (video.sourceId == connection._mediaSources.video) {
- delete hints.video.optional[index];
- }
- });
-
- hints.video.optional = swap(hints.video.optional);
-
- hints.video.optional.push({
- sourceId: connection._mediaSources.video
- });
- }
-
- if (hints.audio.mandatory && !isEmpty(hints.audio.mandatory) && connection._mediaSources.audio) {
- hints.audio.optional.forEach(function(audio, index) {
- if (audio.sourceId == connection._mediaSources.audio) {
- delete hints.audio.optional[index];
- }
- });
-
- hints.audio.optional = swap(hints.audio.optional);
-
- hints.audio.optional.push({
- sourceId: connection._mediaSources.audio
- });
- }
-
- if (hints.video && !hints.video.mozMediaSource && hints.video.optional && hints.video.mandatory) {
- if (!hints.video.optional.length && isEmpty(hints.video.mandatory)) {
- hints.video = true;
- }
- }
-
- if (isMobileDevice) {
- // Android fails for some constraints
- // so need to force {audio:true,video:true}
- hints = {
- audio: !!hints.audio,
- video: !!hints.video
- };
- }
-
- // connection.mediaConstraints always overrides constraints
- // passed from "captureUserMedia" function.
- // todo: need to verify all possible situations
- log('invoked getUserMedia with constraints:', toStr(hints));
-
- // easy way to match
- var idInstance = JSON.stringify(hints);
-
- function streaming(stream, returnBack, streamid) {
- if (!streamid) streamid = getRandomString();
-
- // localStreams object will store stream
- // until it is removed using native-stop method.
- connection.localStreams[streamid] = stream;
-
- var video = options.video;
- if (video) {
- video[isFirefox ? 'mozSrcObject' : 'src'] = isFirefox ? stream : (window.URL || window.webkitURL).createObjectURL(stream);
- video.play();
- }
-
- options.onsuccess(stream, returnBack, idInstance, streamid);
- currentUserMediaRequest.streams[idInstance] = {
- stream: stream,
- streamid: streamid
- };
- currentUserMediaRequest.mutex = false;
- if (currentUserMediaRequest.queueRequests.length)
- getUserMedia(currentUserMediaRequest.queueRequests.shift());
- }
-
- if (currentUserMediaRequest.streams[idInstance]) {
- streaming(currentUserMediaRequest.streams[idInstance].stream, true, currentUserMediaRequest.streams[idInstance].streamid);
- } else {
- n.getMedia = n.webkitGetUserMedia || n.mozGetUserMedia;
-
- // http://goo.gl/eETIK4
- n.getMedia(hints, streaming, function(error) {
- options.onerror(error, hints);
- });
- }
- }
-
- var RTCSessionDescription = window.RTCSessionDescription || window.mozRTCSessionDescription;
- var RTCIceCandidate = window.RTCIceCandidate || window.mozRTCIceCandidate;
-
- var RTCPeerConnection;
- if (typeof mozRTCPeerConnection !== 'undefined') {
- RTCPeerConnection = mozRTCPeerConnection;
- } else if (typeof webkitRTCPeerConnection !== 'undefined') {
- RTCPeerConnection = webkitRTCPeerConnection;
- } else if (typeof window.RTCPeerConnection !== 'undefined') {
- RTCPeerConnection = window.RTCPeerConnection;
- } else {
- console.error('WebRTC 1.0 (RTCPeerConnection) API seems NOT available in this browser.');
- }
-
- function setSdpConstraints(config) {
- var sdpConstraints;
-
- var sdpConstraints_mandatory = {
- OfferToReceiveAudio: !!config.OfferToReceiveAudio,
- OfferToReceiveVideo: !!config.OfferToReceiveVideo
- };
-
- sdpConstraints = {
- mandatory: sdpConstraints_mandatory,
- optional: [{
- VoiceActivityDetection: false
- }]
- };
-
- if (!!navigator.mozGetUserMedia && firefoxVersion > 34) {
- sdpConstraints = {
- OfferToReceiveAudio: !!config.OfferToReceiveAudio,
- OfferToReceiveVideo: !!config.OfferToReceiveVideo
- };
- }
-
- return sdpConstraints;
- }
-
- function PeerConnection() {
- return {
- create: function(type, options) {
- merge(this, options);
-
- var self = this;
-
- this.type = type;
- this.init();
- this.attachMediaStreams();
-
- if (isFirefox && this.session.data) {
- if (this.session.data && type == 'offer') {
- this.createDataChannel();
- }
-
- this.getLocalDescription(type);
-
- if (this.session.data && type == 'answer') {
- this.createDataChannel();
- }
- } else self.getLocalDescription(type);
-
- return this;
- },
- getLocalDescription: function(createType) {
- log('(getLocalDescription) peer createType is', createType);
-
- if (this.session.inactive && isNull(this.rtcMultiConnection.waitUntilRemoteStreamStartsFlowing)) {
- // inactive session returns blank-stream
- this.rtcMultiConnection.waitUntilRemoteStreamStartsFlowing = false;
- }
-
- var self = this;
-
- if (createType == 'answer') {
- this.setRemoteDescription(this.offerDescription, createDescription);
- } else createDescription();
-
- function createDescription() {
- self.connection[createType == 'offer' ? 'createOffer' : 'createAnswer'](function(sessionDescription) {
- sessionDescription.sdp = self.serializeSdp(sessionDescription.sdp, createType);
- self.connection.setLocalDescription(sessionDescription);
-
- if (self.trickleIce) {
- self.onSessionDescription(sessionDescription, self.streaminfo);
- }
-
- if (sessionDescription.type == 'offer') {
- log('offer sdp', sessionDescription.sdp);
- }
-
- self.prevCreateType = createType;
- }, self.onSdpError, self.constraints);
- }
- },
- serializeSdp: function(sdp, createType) {
- // it is "connection.processSdp=function(sdp){return sdp;}"
- sdp = this.processSdp(sdp);
-
- if (isFirefox) return sdp;
-
- if (this.session.inactive && !this.holdMLine) {
- this.hold = true;
- if ((this.session.screen || this.session.video) && this.session.audio) {
- this.holdMLine = 'both';
- } else if (this.session.screen || this.session.video) {
- this.holdMLine = 'video';
- } else if (this.session.audio) {
- this.holdMLine = 'audio';
- }
- }
-
- sdp = this.setBandwidth(sdp);
- if (this.holdMLine == 'both') {
- if (this.hold) {
- this.prevSDP = sdp;
- sdp = sdp.replace(/a=sendonly|a=recvonly|a=sendrecv/g, 'a=inactive');
- } else if (this.prevSDP) {
- if (!this.session.inactive) {
- // it means that DTSL key exchange already happened for single or multiple media lines.
- // this block checks, key-exchange must be happened for all media lines.
- sdp = this.prevSDP;
-
- // todo: test it: makes sense?
- if (chromeVersion <= 35) {
- return sdp;
- }
- }
- }
- } else if (this.holdMLine == 'audio' || this.holdMLine == 'video') {
- sdp = sdp.split('m=');
-
- var audio = '';
- var video = '';
-
- if (sdp[1] && sdp[1].indexOf('audio') == 0) {
- audio = 'm=' + sdp[1];
- }
- if (sdp[2] && sdp[2].indexOf('audio') == 0) {
- audio = 'm=' + sdp[2];
- }
-
- if (sdp[1] && sdp[1].indexOf('video') == 0) {
- video = 'm=' + sdp[1];
- }
- if (sdp[2] && sdp[2].indexOf('video') == 0) {
- video = 'm=' + sdp[2];
- }
-
- if (this.holdMLine == 'audio') {
- if (this.hold) {
- this.prevSDP = sdp[0] + audio + video;
- sdp = sdp[0] + audio.replace(/a=sendonly|a=recvonly|a=sendrecv/g, 'a=inactive') + video;
- } else if (this.prevSDP) {
- sdp = this.prevSDP;
- }
- }
-
- if (this.holdMLine == 'video') {
- if (this.hold) {
- this.prevSDP = sdp[0] + audio + video;
- sdp = sdp[0] + audio + video.replace(/a=sendonly|a=recvonly|a=sendrecv/g, 'a=inactive');
- } else if (this.prevSDP) {
- sdp = this.prevSDP;
- }
- }
- }
-
- if (!this.hold && this.session.inactive) {
- // transport.cc&l=852 - http://goo.gl/0FxxqG
- // dtlstransport.h&l=234 - http://goo.gl/7E4sYF
- // http://tools.ietf.org/html/rfc4340
-
- // From RFC 4145, SDP setup attribute values.
- // http://goo.gl/xETJEp && http://goo.gl/3Wgcau
- if (createType == 'offer') {
- sdp = sdp.replace(/a=setup:passive|a=setup:active|a=setup:holdconn/g, 'a=setup:actpass');
- } else {
- sdp = sdp.replace(/a=setup:actpass|a=setup:passive|a=setup:holdconn/g, 'a=setup:active');
- }
-
- // whilst doing handshake, either media lines were "inactive"
- // or no media lines were present
- sdp = sdp.replace(/a=inactive/g, 'a=sendrecv');
- }
- // this.session.inactive = false;
- return sdp;
- },
- init: function() {
- this.setConstraints();
- this.connection = new RTCPeerConnection(this.iceServers, this.optionalArgument);
-
- if (this.session.data) {
- log('invoked: createDataChannel');
- this.createDataChannel();
- }
-
- this.connection.onicecandidate = function(event) {
- if (!event.candidate) {
- if (!self.trickleIce) {
- returnSDP();
- }
-
- return;
- }
-
- if (!self.trickleIce) return;
-
- self.onicecandidate(event.candidate);
- };
-
- function returnSDP() {
- if (self.returnedSDP) {
- self.returnedSDP = false;
- return;
- };
- self.returnedSDP = true;
-
- self.onSessionDescription(self.connection.localDescription, self.streaminfo);
- }
-
- this.connection.onaddstream = function(e) {
- log('onaddstream', isPluginRTC ? e.stream : toStr(e.stream));
-
- self.onaddstream(e.stream, self.session);
- };
-
- this.connection.onremovestream = function(e) {
- self.onremovestream(e.stream);
- };
-
- this.connection.onsignalingstatechange = function() {
- self.connection && self.oniceconnectionstatechange({
- iceConnectionState: self.connection.iceConnectionState,
- iceGatheringState: self.connection.iceGatheringState,
- signalingState: self.connection.signalingState
- });
- };
-
- this.connection.oniceconnectionstatechange = function() {
- if (!self.connection) return;
-
- self.oniceconnectionstatechange({
- iceConnectionState: self.connection.iceConnectionState,
- iceGatheringState: self.connection.iceGatheringState,
- signalingState: self.connection.signalingState
- });
-
- if (self.trickleIce) return;
-
- if (self.connection.iceGatheringState == 'complete') {
- log('iceGatheringState', self.connection.iceGatheringState);
- returnSDP();
- }
- };
-
- var self = this;
- },
- setBandwidth: function(sdp) {
- if (isMobileDevice || isFirefox || !this.bandwidth) return sdp;
-
- var bandwidth = this.bandwidth;
-
- if (this.session.screen) {
- if (!bandwidth.screen) {
- warn('It seems that you are not using bandwidth for screen. Screen sharing is expected to fail.');
- } else if (bandwidth.screen < 300) {
- warn('It seems that you are using wrong bandwidth value for screen. Screen sharing is expected to fail.');
- }
- }
-
- // if screen; must use at least 300kbs
- if (bandwidth.screen && this.session.screen) {
- sdp = sdp.replace(/b=AS([^\r\n]+\r\n)/g, '');
- sdp = sdp.replace(/a=mid:video\r\n/g, 'a=mid:video\r\nb=AS:' + bandwidth.screen + '\r\n');
- }
-
- // remove existing bandwidth lines
- if (bandwidth.audio || bandwidth.video || bandwidth.data) {
- sdp = sdp.replace(/b=AS([^\r\n]+\r\n)/g, '');
- }
-
- if (bandwidth.audio) {
- sdp = sdp.replace(/a=mid:audio\r\n/g, 'a=mid:audio\r\nb=AS:' + bandwidth.audio + '\r\n');
- }
-
- if (bandwidth.video) {
- sdp = sdp.replace(/a=mid:video\r\n/g, 'a=mid:video\r\nb=AS:' + (this.session.screen ? bandwidth.screen : bandwidth.video) + '\r\n');
- }
-
- if (bandwidth.data && !this.preferSCTP) {
- sdp = sdp.replace(/a=mid:data\r\n/g, 'a=mid:data\r\nb=AS:' + bandwidth.data + '\r\n');
- }
-
- return sdp;
- },
- setConstraints: function() {
- var sdpConstraints = setSdpConstraints({
- OfferToReceiveAudio: !!this.session.audio,
- OfferToReceiveVideo: !!this.session.video || !!this.session.screen
- });
-
- if (this.sdpConstraints.mandatory) {
- sdpConstraints = setSdpConstraints(this.sdpConstraints.mandatory);
- }
-
- this.constraints = sdpConstraints;
-
- if (this.constraints) {
- log('sdp-constraints', toStr(this.constraints));
- }
-
- this.optionalArgument = {
- optional: this.optionalArgument.optional || [],
- mandatory: this.optionalArgument.mandatory || {}
- };
-
- if (!this.preferSCTP) {
- this.optionalArgument.optional.push({
- RtpDataChannels: true
- });
- }
-
- log('optional-argument', toStr(this.optionalArgument));
-
- if (!isNull(this.iceServers)) {
- var iceCandidates = this.rtcMultiConnection.candidates;
-
- var stun = iceCandidates.stun;
- var turn = iceCandidates.turn;
- var host = iceCandidates.host;
-
- if (!isNull(iceCandidates.reflexive)) stun = iceCandidates.reflexive;
- if (!isNull(iceCandidates.relay)) turn = iceCandidates.relay;
-
- if (!host && !stun && turn) {
- this.rtcConfiguration.iceTransports = 'relay';
- } else if (!host && !stun && !turn) {
- this.rtcConfiguration.iceTransports = 'none';
- }
-
- this.iceServers = {
- iceServers: this.iceServers,
- iceTransports: this.rtcConfiguration.iceTransports
- };
- } else this.iceServers = null;
-
- log('rtc-configuration', toStr(this.iceServers));
- },
- onSdpError: function(e) {
- var message = toStr(e);
-
- if (message && message.indexOf('RTP/SAVPF Expects at least 4 fields') != -1) {
- message = 'It seems that you are trying to interop RTP-datachannels with SCTP. It is not supported!';
- }
- error('onSdpError:', message);
- },
- onSdpSuccess: function() {
- log('sdp success');
- },
- onMediaError: function(err) {
- error(toStr(err));
- },
- setRemoteDescription: function(sessionDescription, onSdpSuccess) {
- if (!sessionDescription) throw 'Remote session description should NOT be NULL.';
-
- if (!this.connection) return;
-
- log('setting remote description', sessionDescription.type, sessionDescription.sdp);
-
- var self = this;
- this.connection.setRemoteDescription(
- new RTCSessionDescription(sessionDescription),
- onSdpSuccess || this.onSdpSuccess,
- function(error) {
- if (error.search(/STATE_SENTINITIATE|STATE_INPROGRESS/gi) == -1) {
- self.onSdpError(error);
- }
- }
- );
- },
- addIceCandidate: function(candidate) {
- var self = this;
- if (isPluginRTC) {
- RTCIceCandidate(candidate, function(iceCandidate) {
- onAddIceCandidate(iceCandidate);
- });
- } else onAddIceCandidate(new RTCIceCandidate(candidate));
-
- function onAddIceCandidate(iceCandidate) {
- self.connection.addIceCandidate(iceCandidate, function() {
- log('added:', candidate.sdpMid, candidate.candidate);
- }, function() {
- error('onIceFailure', arguments, candidate.candidate);
- });
- }
- },
- createDataChannel: function(channelIdentifier) {
- // skip 2nd invocation of createDataChannel
- if (this.channels && this.channels.length) return;
-
- var self = this;
-
- if (!this.channels) this.channels = [];
-
- // protocol: 'text/chat', preset: true, stream: 16
- // maxRetransmits:0 && ordered:false && outOfOrderAllowed: false
- var dataChannelDict = {};
-
- if (this.dataChannelDict) dataChannelDict = this.dataChannelDict;
-
- if (isChrome && !this.preferSCTP) {
- dataChannelDict.reliable = false; // Deprecated!
- }
-
- log('dataChannelDict', toStr(dataChannelDict));
-
- if (this.type == 'answer' || isFirefox) {
- this.connection.ondatachannel = function(event) {
- self.setChannelEvents(event.channel);
- };
- }
-
- if ((isChrome && this.type == 'offer') || isFirefox) {
- this.setChannelEvents(
- this.connection.createDataChannel(channelIdentifier || 'channel', dataChannelDict)
- );
- }
- },
- setChannelEvents: function(channel) {
- var self = this;
-
- channel.binaryType = 'arraybuffer';
-
- if (this.dataChannelDict.binaryType) {
- channel.binaryType = this.dataChannelDict.binaryType;
- }
-
- channel.onmessage = function(event) {
- self.onmessage(event.data);
- };
-
- var numberOfTimes = 0;
- channel.onopen = function() {
- channel.push = channel.send;
- channel.send = function(data) {
- if (self.connection.iceConnectionState == 'disconnected') {
- return;
- }
-
- if (channel.readyState.search(/closing|closed/g) != -1) {
- return;
- }
-
- if (channel.readyState.search(/connecting|open/g) == -1) {
- return;
- }
-
- if (channel.readyState == 'connecting') {
- numberOfTimes++;
- return setTimeout(function() {
- if (numberOfTimes < 20) {
- channel.send(data);
- } else throw 'Number of times exceeded to wait for WebRTC data connection to be opened.';
- }, 1000);
- }
- try {
- channel.push(data);
- } catch (e) {
- numberOfTimes++;
- warn('Data transmission failed. Re-transmitting..', numberOfTimes, toStr(e));
- if (numberOfTimes >= 20) throw 'Number of times exceeded to resend data packets over WebRTC data channels.';
- setTimeout(function() {
- channel.send(data);
- }, 100);
- }
- };
- self.onopen(channel);
- };
-
- channel.onerror = function(event) {
- self.onerror(event);
- };
-
- channel.onclose = function(event) {
- self.onclose(event);
- };
-
- this.channels.push(channel);
- },
- addStream: function(stream) {
- if (!stream.streamid && !isIE) {
- stream.streamid = getRandomString();
- }
-
- // todo: maybe need to add isAudio/isVideo/isScreen if missing?
-
- log('attaching stream:', stream.streamid, isPluginRTC ? stream : toStr(stream));
-
- this.connection.addStream(stream);
-
- this.sendStreamId(stream);
- this.getStreamInfo();
- },
- attachMediaStreams: function() {
- var streams = this.attachStreams;
- for (var i = 0; i < streams.length; i++) {
- this.addStream(streams[i]);
- }
- },
- getStreamInfo: function() {
- this.streaminfo = '';
- var streams = this.connection.getLocalStreams();
- for (var i = 0; i < streams.length; i++) {
- if (i == 0) {
- this.streaminfo = JSON.stringify({
- streamid: streams[i].streamid || '',
- isScreen: !!streams[i].isScreen,
- isAudio: !!streams[i].isAudio,
- isVideo: !!streams[i].isVideo,
- preMuted: streams[i].preMuted || {}
- });
- } else {
- this.streaminfo += '----' + JSON.stringify({
- streamid: streams[i].streamid || '',
- isScreen: !!streams[i].isScreen,
- isAudio: !!streams[i].isAudio,
- isVideo: !!streams[i].isVideo,
- preMuted: streams[i].preMuted || {}
- });
- }
- }
- },
- recreateOffer: function(renegotiate, callback) {
- log('recreating offer');
-
- this.type = 'offer';
- this.session = renegotiate;
-
- // todo: make sure this doesn't affect renegotiation scenarios
- // this.setConstraints();
-
- this.onSessionDescription = callback;
- this.getStreamInfo();
-
- // one can renegotiate data connection in existing audio/video/screen connection!
- if (this.session.data) {
- this.createDataChannel();
- }
-
- this.getLocalDescription('offer');
- },
- recreateAnswer: function(sdp, session, callback) {
- // if(isFirefox) this.create(this.type, this);
-
- log('recreating answer');
-
- this.type = 'answer';
- this.session = session;
-
- // todo: make sure this doesn't affect renegotiation scenarios
- // this.setConstraints();
-
- this.onSessionDescription = callback;
- this.offerDescription = sdp;
- this.getStreamInfo();
-
- // one can renegotiate data connection in existing audio/video/screen connection!
- if (this.session.data) {
- this.createDataChannel();
- }
-
- this.getLocalDescription('answer');
- }
- };
- }
-
- var FileSaver = {
- SaveToDisk: invokeSaveAsDialog
- };
-
-
- function invokeSaveAsDialog(fileUrl, fileName) {
- /*
- if (typeof navigator.msSaveOrOpenBlob !== 'undefined') {
- return navigator.msSaveOrOpenBlob(file, fileFullName);
- } else if (typeof navigator.msSaveBlob !== 'undefined') {
- return navigator.msSaveBlob(file, fileFullName);
- }
- */
-
- var hyperlink = document.createElement('a');
- hyperlink.href = fileUrl;
- hyperlink.target = '_blank';
- hyperlink.download = fileName || fileUrl;
-
- if (!!navigator.mozGetUserMedia) {
- hyperlink.onclick = function() {
- (document.body || document.documentElement).removeChild(hyperlink);
- };
- (document.body || document.documentElement).appendChild(hyperlink);
- }
-
- var evt = new MouseEvent('click', {
- view: window,
- bubbles: true,
- cancelable: true
- });
-
- hyperlink.dispatchEvent(evt);
-
- if (!navigator.mozGetUserMedia) {
- URL.revokeObjectURL(hyperlink.href);
- }
- }
-
- var TextSender = {
- send: function(config) {
- var connection = config.connection;
-
- if (config.text instanceof ArrayBuffer || config.text instanceof DataView) {
- return config.channel.send(config.text, config._channel);
- }
-
- var channel = config.channel,
- _channel = config._channel,
- initialText = config.text,
- packetSize = connection.chunkSize || 1000,
- textToTransfer = '',
- isobject = false;
-
- if (!isString(initialText)) {
- isobject = true;
- initialText = JSON.stringify(initialText);
- }
-
- // uuid is used to uniquely identify sending instance
- var uuid = getRandomString();
- var sendingTime = new Date().getTime();
-
- sendText(initialText);
-
- function sendText(textMessage, text) {
- var data = {
- type: 'text',
- uuid: uuid,
- sendingTime: sendingTime
- };
-
- if (textMessage) {
- text = textMessage;
- data.packets = parseInt(text.length / packetSize);
- }
-
- if (text.length > packetSize)
- data.message = text.slice(0, packetSize);
- else {
- data.message = text;
- data.last = true;
- data.isobject = isobject;
- }
-
- channel.send(data, _channel);
-
- textToTransfer = text.slice(data.message.length);
-
- if (textToTransfer.length) {
- setTimeout(function() {
- sendText(null, textToTransfer);
- }, connection.chunkInterval || 100);
- }
- }
- }
- };
-
- function TextReceiver(connection) {
- var content = {};
-
- function receive(data, userid, extra) {
- // uuid is used to uniquely identify sending instance
- var uuid = data.uuid;
- if (!content[uuid]) content[uuid] = [];
-
- content[uuid].push(data.message);
- if (data.last) {
- var message = content[uuid].join('');
- if (data.isobject) message = JSON.parse(message);
-
- // latency detection
- var receivingTime = new Date().getTime();
- var latency = receivingTime - data.sendingTime;
-
- var e = {
- data: message,
- userid: userid,
- extra: extra,
- latency: latency
- };
-
- if (message.preRecordedMediaChunk) {
- if (!connection.preRecordedMedias[message.streamerid]) {
- connection.shareMediaFile(null, null, message.streamerid);
- }
- connection.preRecordedMedias[message.streamerid].onData(message.chunk);
- } else if (connection.autoTranslateText) {
- e.original = e.data;
- connection.Translator.TranslateText(e.data, function(translatedText) {
- e.data = translatedText;
- connection.onmessage(e);
- });
- } else if (message.isPartOfScreen) {
- connection.onpartofscreen(message);
- } else connection.onmessage(e);
-
- delete content[uuid];
- }
- }
-
- return {
- receive: receive
- };
- }
-
- // Last time updated at Sep 25, 2015, 08:32:23
-
- // Latest file can be found here: https://cdn.webrtc-experiment.com/DetectRTC.js
-
- // Muaz Khan - www.MuazKhan.com
- // MIT License - www.WebRTC-Experiment.com/licence
- // Documentation - github.com/muaz-khan/DetectRTC
- // ____________
- // DetectRTC.js
-
- // DetectRTC.hasWebcam (has webcam device!)
- // DetectRTC.hasMicrophone (has microphone device!)
- // DetectRTC.hasSpeakers (has speakers!)
-
- (function() {
-
- 'use strict';
-
- var navigator = window.navigator;
-
- if (navigator.mediaDevices && navigator.mediaDevices.enumerateDevices) {
- // Firefox 38+ seems having support of enumerateDevices
- // Thanks @xdumaine/enumerateDevices
- navigator.enumerateDevices = function(callback) {
- navigator.mediaDevices.enumerateDevices().then(callback);
- };
- }
-
- if (typeof navigator !== 'undefined') {
- if (typeof navigator.webkitGetUserMedia !== 'undefined') {
- navigator.getUserMedia = navigator.webkitGetUserMedia;
- }
-
- if (typeof navigator.mozGetUserMedia !== 'undefined') {
- navigator.getUserMedia = navigator.mozGetUserMedia;
- }
- } else {
- navigator = {
- getUserMedia: function() {}
- };
- }
-
- var isMobileDevice = !!navigator.userAgent.match(/Android|iPhone|iPad|iPod|BlackBerry|IEMobile/i);
- var isEdge = navigator.userAgent.indexOf('Edge') !== -1 && (!!navigator.msSaveOrOpenBlob || !!navigator.msSaveBlob);
-
- // this one can also be used:
- // https://www.websocket.org/js/stuff.js (DetectBrowser.js)
-
- function getBrowserInfo() {
- var nVer = navigator.appVersion;
- var nAgt = navigator.userAgent;
- var browserName = navigator.appName;
- var fullVersion = '' + parseFloat(navigator.appVersion);
- var majorVersion = parseInt(navigator.appVersion, 10);
- var nameOffset, verOffset, ix;
-
- // In Opera, the true version is after 'Opera' or after 'Version'
- if ((verOffset = nAgt.indexOf('Opera')) !== -1) {
- browserName = 'Opera';
- fullVersion = nAgt.substring(verOffset + 6);
-
- if ((verOffset = nAgt.indexOf('Version')) !== -1) {
- fullVersion = nAgt.substring(verOffset + 8);
- }
- }
- // In MSIE, the true version is after 'MSIE' in userAgent
- else if ((verOffset = nAgt.indexOf('MSIE')) !== -1) {
- browserName = 'IE';
- fullVersion = nAgt.substring(verOffset + 5);
- }
- // In Chrome, the true version is after 'Chrome'
- else if ((verOffset = nAgt.indexOf('Chrome')) !== -1) {
- browserName = 'Chrome';
- fullVersion = nAgt.substring(verOffset + 7);
- }
- // In Safari, the true version is after 'Safari' or after 'Version'
- else if ((verOffset = nAgt.indexOf('Safari')) !== -1) {
- browserName = 'Safari';
- fullVersion = nAgt.substring(verOffset + 7);
-
- if ((verOffset = nAgt.indexOf('Version')) !== -1) {
- fullVersion = nAgt.substring(verOffset + 8);
- }
- }
- // In Firefox, the true version is after 'Firefox'
- else if ((verOffset = nAgt.indexOf('Firefox')) !== -1) {
- browserName = 'Firefox';
- fullVersion = nAgt.substring(verOffset + 8);
- }
-
- // In most other browsers, 'name/version' is at the end of userAgent
- else if ((nameOffset = nAgt.lastIndexOf(' ') + 1) < (verOffset = nAgt.lastIndexOf('/'))) {
- browserName = nAgt.substring(nameOffset, verOffset);
- fullVersion = nAgt.substring(verOffset + 1);
-
- if (browserName.toLowerCase() === browserName.toUpperCase()) {
- browserName = navigator.appName;
- }
- }
-
- if (isEdge) {
- browserName = 'Edge';
- // fullVersion = navigator.userAgent.split('Edge/')[1];
- fullVersion = parseInt(navigator.userAgent.match(/Edge\/(\d+).(\d+)$/)[2], 10);
- }
-
- // trim the fullVersion string at semicolon/space if present
- if ((ix = fullVersion.indexOf(';')) !== -1) {
- fullVersion = fullVersion.substring(0, ix);
- }
-
- if ((ix = fullVersion.indexOf(' ')) !== -1) {
- fullVersion = fullVersion.substring(0, ix);
- }
-
- majorVersion = parseInt('' + fullVersion, 10);
-
- if (isNaN(majorVersion)) {
- fullVersion = '' + parseFloat(navigator.appVersion);
- majorVersion = parseInt(navigator.appVersion, 10);
- }
-
- return {
- fullVersion: fullVersion,
- version: majorVersion,
- name: browserName
- };
- }
-
- var isMobile = {
- Android: function() {
- return navigator.userAgent.match(/Android/i);
- },
- BlackBerry: function() {
- return navigator.userAgent.match(/BlackBerry/i);
- },
- iOS: function() {
- return navigator.userAgent.match(/iPhone|iPad|iPod/i);
- },
- Opera: function() {
- return navigator.userAgent.match(/Opera Mini/i);
- },
- Windows: function() {
- return navigator.userAgent.match(/IEMobile/i);
- },
- any: function() {
- return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
- },
- getOsName: function() {
- var osName = 'Unknown OS';
- if (isMobile.Android()) {
- osName = 'Android';
- }
-
- if (isMobile.BlackBerry()) {
- osName = 'BlackBerry';
- }
-
- if (isMobile.iOS()) {
- osName = 'iOS';
- }
-
- if (isMobile.Opera()) {
- osName = 'Opera Mini';
- }
-
- if (isMobile.Windows()) {
- osName = 'Windows';
- }
-
- return osName;
- }
- };
-
- var osName = 'Unknown OS';
-
- if (isMobile.any()) {
- osName = isMobile.getOsName();
- } else {
- if (navigator.appVersion.indexOf('Win') !== -1) {
- osName = 'Windows';
- }
-
- if (navigator.appVersion.indexOf('Mac') !== -1) {
- osName = 'MacOS';
- }
-
- if (navigator.appVersion.indexOf('X11') !== -1) {
- osName = 'UNIX';
- }
-
- if (navigator.appVersion.indexOf('Linux') !== -1) {
- osName = 'Linux';
- }
- }
-
-
- var isCanvasSupportsStreamCapturing = false;
- var isVideoSupportsStreamCapturing = false;
- ['captureStream', 'mozCaptureStream', 'webkitCaptureStream'].forEach(function(item) {
- // asdf
- if (item in document.createElement('canvas')) {
- isCanvasSupportsStreamCapturing = true;
- }
-
- if (item in document.createElement('video')) {
- isVideoSupportsStreamCapturing = true;
- }
- });
-
- // via: https://github.com/diafygi/webrtc-ips
- function DetectLocalIPAddress(callback) {
- getIPs(function(ip) {
- //local IPs
- if (ip.match(/^(192\.168\.|169\.254\.|10\.|172\.(1[6-9]|2\d|3[01]))/)) {
- callback('Local: ' + ip);
- }
-
- //assume the rest are public IPs
- else {
- callback('Public: ' + ip);
- }
- });
- }
-
- //get the IP addresses associated with an account
- function getIPs(callback) {
- var ipDuplicates = {};
-
- //compatibility for firefox and chrome
- var RTCPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
- var useWebKit = !!window.webkitRTCPeerConnection;
-
- // bypass naive webrtc blocking using an iframe
- if (!RTCPeerConnection) {
- var iframe = document.getElementById('iframe');
- if (!iframe) {
- //<iframe id="iframe" sandbox="allow-same-origin" style="display: none"></iframe>
- throw 'NOTE: you need to have an iframe in the page right above the script tag.';
- }
- var win = iframe.contentWindow;
- RTCPeerConnection = win.RTCPeerConnection || win.mozRTCPeerConnection || win.webkitRTCPeerConnection;
- useWebKit = !!win.webkitRTCPeerConnection;
- }
-
- //minimal requirements for data connection
- var mediaConstraints = {
- optional: [{
- RtpDataChannels: true
- }]
- };
-
- //firefox already has a default stun server in about:config
- // media.peerconnection.default_iceservers =
- // [{"url": "stun:stun.services.mozilla.com"}]
- var servers;
-
- //add same stun server for chrome
- if (useWebKit) {
- servers = {
- iceServers: [{
- urls: 'stun:stun.services.mozilla.com'
- }]
- };
-
- if (typeof DetectRTC !== 'undefined' && DetectRTC.browser.isFirefox && DetectRTC.browser.version <= 38) {
- servers[0] = {
- url: servers[0].urls
- };
- }
- }
-
- //construct a new RTCPeerConnection
- var pc = new RTCPeerConnection(servers, mediaConstraints);
-
- function handleCandidate(candidate) {
- //match just the IP address
- var ipRegex = /([0-9]{1,3}(\.[0-9]{1,3}){3})/;
- var ipAddress = ipRegex.exec(candidate)[1];
-
- //remove duplicates
- if (ipDuplicates[ipAddress] === undefined) {
- callback(ipAddress);
- }
-
- ipDuplicates[ipAddress] = true;
- }
-
- //listen for candidate events
- pc.onicecandidate = function(ice) {
- //skip non-candidate events
- if (ice.candidate) {
- handleCandidate(ice.candidate.candidate);
- }
- };
-
- //create a bogus data channel
- pc.createDataChannel('');
-
- //create an offer sdp
- pc.createOffer(function(result) {
-
- //trigger the stun server request
- pc.setLocalDescription(result, function() {}, function() {});
-
- }, function() {});
-
- //wait for a while to let everything done
- setTimeout(function() {
- //read candidate info from local description
- var lines = pc.localDescription.sdp.split('\n');
-
- lines.forEach(function(line) {
- if (line.indexOf('a=candidate:') === 0) {
- handleCandidate(line);
- }
- });
- }, 1000);
- }
-
- var MediaDevices = [];
-
- // ---------- Media Devices detection
- var canEnumerate = false;
-
- /*global MediaStreamTrack:true */
- if (typeof MediaStreamTrack !== 'undefined' && 'getSources' in MediaStreamTrack) {
- canEnumerate = true;
- } else if (navigator.mediaDevices && !!navigator.mediaDevices.enumerateDevices) {
- canEnumerate = true;
- }
-
- var hasMicrophone = canEnumerate;
- var hasSpeakers = canEnumerate;
- var hasWebcam = canEnumerate;
-
- // http://dev.w3.org/2011/webrtc/editor/getusermedia.html#mediadevices
- // todo: switch to enumerateDevices when landed in canary.
- function checkDeviceSupport(callback) {
- // This method is useful only for Chrome!
-
- if (!navigator.enumerateDevices && window.MediaStreamTrack && window.MediaStreamTrack.getSources) {
- navigator.enumerateDevices = window.MediaStreamTrack.getSources.bind(window.MediaStreamTrack);
- }
-
- if (!navigator.enumerateDevices && navigator.enumerateDevices) {
- navigator.enumerateDevices = navigator.enumerateDevices.bind(navigator);
- }
-
- if (!navigator.enumerateDevices) {
- if (callback) {
- callback();
- }
- return;
- }
-
- MediaDevices = [];
- navigator.enumerateDevices(function(devices) {
- devices.forEach(function(_device) {
- var device = {};
- for (var d in _device) {
- device[d] = _device[d];
- }
-
- var skip;
- MediaDevices.forEach(function(d) {
- if (d.id === device.id) {
- skip = true;
- }
- });
-
- if (skip) {
- return;
- }
-
- // if it is MediaStreamTrack.getSources
- if (device.kind === 'audio') {
- device.kind = 'audioinput';
- }
-
- if (device.kind === 'video') {
- device.kind = 'videoinput';
- }
-
- if (!device.deviceId) {
- device.deviceId = device.id;
- }
-
- if (!device.id) {
- device.id = device.deviceId;
- }
-
- if (!device.label) {
- device.label = 'Please invoke getUserMedia once.';
- if (!isHTTPs) {
- device.label = 'HTTPs is required to get label of this ' + device.kind + ' device.';
- }
- }
-
- if (device.kind === 'audioinput' || device.kind === 'audio') {
- hasMicrophone = true;
- }
-
- if (device.kind === 'audiooutput') {
- hasSpeakers = true;
- }
-
- if (device.kind === 'videoinput' || device.kind === 'video') {
- hasWebcam = true;
- }
-
- // there is no 'videoouput' in the spec.
-
- MediaDevices.push(device);
- });
-
- if (typeof DetectRTC !== 'undefined') {
- DetectRTC.MediaDevices = MediaDevices;
- DetectRTC.hasMicrophone = hasMicrophone;
- DetectRTC.hasSpeakers = hasSpeakers;
- DetectRTC.hasWebcam = hasWebcam;
- }
-
- if (callback) {
- callback();
- }
- });
- }
-
- // check for microphone/camera support!
- checkDeviceSupport();
-
- var DetectRTC = {};
-
- // ----------
- // DetectRTC.browser.name || DetectRTC.browser.version || DetectRTC.browser.fullVersion
- DetectRTC.browser = getBrowserInfo();
-
- // DetectRTC.isChrome || DetectRTC.isFirefox || DetectRTC.isEdge
- DetectRTC.browser['is' + DetectRTC.browser.name] = true;
-
- var isHTTPs = location.protocol === 'https:';
- var isNodeWebkit = !!(window.process && (typeof window.process === 'object') && window.process.versions && window.process.versions['node-webkit']);
-
- // --------- Detect if system supports WebRTC 1.0 or WebRTC 1.1.
- var isWebRTCSupported = false;
- ['webkitRTCPeerConnection', 'mozRTCPeerConnection', 'RTCIceGatherer'].forEach(function(item) {
- if (item in window) {
- isWebRTCSupported = true;
- }
- });
- DetectRTC.isWebRTCSupported = isWebRTCSupported;
-
- //-------
- DetectRTC.isORTCSupported = typeof RTCIceGatherer !== 'undefined';
-
- // --------- Detect if system supports screen capturing API
- var isScreenCapturingSupported = false;
- if (DetectRTC.browser.isChrome && DetectRTC.browser.version >= 35) {
- isScreenCapturingSupported = true;
- } else if (DetectRTC.browser.isFirefox && DetectRTC.browser.version >= 34) {
- isScreenCapturingSupported = true;
- }
-
- if (!isHTTPs) {
- isScreenCapturingSupported = false;
- }
- DetectRTC.isScreenCapturingSupported = isScreenCapturingSupported;
-
- // --------- Detect if WebAudio API are supported
- var webAudio = {};
- ['AudioContext', 'webkitAudioContext', 'mozAudioContext', 'msAudioContext'].forEach(function(item) {
- if (webAudio.isSupported && webAudio.isCreateMediaStreamSourceSupported) {
- return;
- }
- if (item in window) {
- webAudio.isSupported = true;
-
- if ('createMediaStreamSource' in window[item].prototype) {
- webAudio.isCreateMediaStreamSourceSupported = true;
- }
- }
- });
- DetectRTC.isAudioContextSupported = webAudio.isSupported;
- DetectRTC.isCreateMediaStreamSourceSupported = webAudio.isCreateMediaStreamSourceSupported;
-
- // ---------- Detect if SCTP/RTP channels are supported.
-
- var isRtpDataChannelsSupported = false;
- if (DetectRTC.browser.isChrome && DetectRTC.browser.version > 31) {
- isRtpDataChannelsSupported = true;
- }
- DetectRTC.isRtpDataChannelsSupported = isRtpDataChannelsSupported;
-
- var isSCTPSupportd = false;
- if (DetectRTC.browser.isFirefox && DetectRTC.browser.version > 28) {
- isSCTPSupportd = true;
- } else if (DetectRTC.browser.isChrome && DetectRTC.browser.version > 25) {
- isSCTPSupportd = true;
- } else if (DetectRTC.browser.isOpera && DetectRTC.browser.version >= 11) {
- isSCTPSupportd = true;
- }
- DetectRTC.isSctpDataChannelsSupported = isSCTPSupportd;
-
- // ---------
-
- DetectRTC.isMobileDevice = isMobileDevice; // "isMobileDevice" boolean is defined in "getBrowserInfo.js"
-
- // ------
-
- DetectRTC.isWebSocketsSupported = 'WebSocket' in window && 2 === window.WebSocket.CLOSING;
- DetectRTC.isWebSocketsBlocked = 'Checking';
-
- if (DetectRTC.isWebSocketsSupported) {
- /* CUSTOM CODE */
- var href = window.location.href;
- var hostPatt = new RegExp(window.location.host +"/[^/]*");
- var res = hostPatt.exec(href);
- var protocol = window.location.protocol.replace("http","ws");
-
- var signalingServerPath = protocol + "//" + res + "/contact";
- var websocket = new WebSocket(signalingServerPath)
- // var websocket = new WebSocket('wss://echo.websocket.org:443/');
- /* CUSTOM CODE */
- websocket.onopen = function() {
- DetectRTC.isWebSocketsBlocked = false;
-
- if (DetectRTC.loadCallback) {
- DetectRTC.loadCallback();
- }
- };
- websocket.onerror = function() {
- DetectRTC.isWebSocketsBlocked = true;
-
- if (DetectRTC.loadCallback) {
- DetectRTC.loadCallback();
- }
- };
- }
-
- // ------
- var isGetUserMediaSupported = false;
- if (navigator.getUserMedia) {
- isGetUserMediaSupported = true;
- } else if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
- isGetUserMediaSupported = true;
- }
- if (DetectRTC.browser.isChrome && DetectRTC.browser.version >= 47 && !isHTTPs) {
- DetectRTC.isGetUserMediaSupported = 'Requires HTTPs';
- }
- DetectRTC.isGetUserMediaSupported = isGetUserMediaSupported;
-
- // -----------
- DetectRTC.osName = osName; // "osName" is defined in "detectOSName.js"
-
- // ----------
- DetectRTC.isCanvasSupportsStreamCapturing = isCanvasSupportsStreamCapturing;
- DetectRTC.isVideoSupportsStreamCapturing = isVideoSupportsStreamCapturing;
-
- // ------
- DetectRTC.DetectLocalIPAddress = DetectLocalIPAddress;
-
- // -------
- DetectRTC.load = function(callback) {
- this.loadCallback = callback;
-
- checkDeviceSupport(callback);
- };
-
- DetectRTC.MediaDevices = MediaDevices;
- DetectRTC.hasMicrophone = hasMicrophone;
- DetectRTC.hasSpeakers = hasSpeakers;
- DetectRTC.hasWebcam = hasWebcam;
-
- // ------
- var isSetSinkIdSupported = false;
- if ('setSinkId' in document.createElement('video')) {
- isSetSinkIdSupported = true;
- }
- DetectRTC.isSetSinkIdSupported = isSetSinkIdSupported;
-
- // -----
- var isRTPSenderReplaceTracksSupported = false;
- if (DetectRTC.browser.isFirefox /*&& DetectRTC.browser.version > 39*/ ) {
- /*global mozRTCPeerConnection:true */
- if ('getSenders' in mozRTCPeerConnection.prototype) {
- isRTPSenderReplaceTracksSupported = true;
- }
- } else if (DetectRTC.browser.isChrome) {
- /*global webkitRTCPeerConnection:true */
- if ('getSenders' in webkitRTCPeerConnection.prototype) {
- isRTPSenderReplaceTracksSupported = true;
- }
- }
- DetectRTC.isRTPSenderReplaceTracksSupported = isRTPSenderReplaceTracksSupported;
-
- //------
- var isRemoteStreamProcessingSupported = false;
- if (DetectRTC.browser.isFirefox && DetectRTC.browser.version > 38) {
- isRemoteStreamProcessingSupported = true;
- }
- DetectRTC.isRemoteStreamProcessingSupported = isRemoteStreamProcessingSupported;
-
- //-------
- var isApplyConstraintsSupported = false;
-
- /*global MediaStreamTrack:true */
- if (typeof MediaStreamTrack !== 'undefined' && 'applyConstraints' in MediaStreamTrack.prototype) {
- isApplyConstraintsSupported = true;
- }
- DetectRTC.isApplyConstraintsSupported = isApplyConstraintsSupported;
-
- //-------
- var isMultiMonitorScreenCapturingSupported = false;
- if (DetectRTC.browser.isFirefox && DetectRTC.browser.version >= 43) {
- // version 43 merely supports platforms for multi-monitors
- // version 44 will support exact multi-monitor selection i.e. you can select any monitor for screen capturing.
- isMultiMonitorScreenCapturingSupported = true;
- }
- DetectRTC.isMultiMonitorScreenCapturingSupported = isMultiMonitorScreenCapturingSupported;
-
- window.DetectRTC = DetectRTC;
-
- })();
-
- // DetectRTC extender
- var screenCallback;
-
- DetectRTC.screen = {
- chromeMediaSource: 'screen',
- extensionid: ReservedExtensionID,
- getSourceId: function(callback) {
- if (!callback) throw '"callback" parameter is mandatory.';
-
- // make sure that chrome extension is installed.
- if (!!DetectRTC.screen.status) {
- onstatus(DetectRTC.screen.status);
- } else DetectRTC.screen.getChromeExtensionStatus(onstatus);
-
- function onstatus(status) {
- if (status == 'installed-enabled') {
- screenCallback = callback;
- window.postMessage('get-sourceId', '*');
- return;
- }
-
- DetectRTC.screen.chromeMediaSource = 'screen';
- callback('No-Response'); // chrome extension isn't available
- }
- },
- onMessageCallback: function(data) {
- if (!(isString(data) || !!data.sourceId)) return;
-
- log('chrome message', data);
-
- // "cancel" button is clicked
- if (data == 'PermissionDeniedError') {
- DetectRTC.screen.chromeMediaSource = 'PermissionDeniedError';
- if (screenCallback) return screenCallback('PermissionDeniedError');
- else throw new Error('PermissionDeniedError');
- }
-
- // extension notified his presence
- if (data == 'rtcmulticonnection-extension-loaded') {
- DetectRTC.screen.chromeMediaSource = 'desktop';
- if (DetectRTC.screen.onScreenCapturingExtensionAvailable) {
- DetectRTC.screen.onScreenCapturingExtensionAvailable();
-
- // make sure that this event isn't fired multiple times
- DetectRTC.screen.onScreenCapturingExtensionAvailable = null;
- }
- }
-
- // extension shared temp sourceId
- if (data.sourceId) {
- DetectRTC.screen.sourceId = data.sourceId;
- if (screenCallback) screenCallback(DetectRTC.screen.sourceId);
- }
- },
- getChromeExtensionStatus: function(extensionid, callback) {
- function _callback(status) {
- DetectRTC.screen.status = status;
- callback(status);
- }
-
- if (isFirefox) return _callback('not-chrome');
-
- if (arguments.length != 2) {
- callback = extensionid;
- extensionid = this.extensionid;
- }
-
- var image = document.createElement('img');
- image.src = 'chrome-extension://' + extensionid + '/icon.png';
- image.onload = function() {
- DetectRTC.screen.chromeMediaSource = 'screen';
- window.postMessage('are-you-there', '*');
- setTimeout(function() {
- if (DetectRTC.screen.chromeMediaSource == 'screen') {
- _callback(
- DetectRTC.screen.chromeMediaSource == 'desktop' ? 'installed-enabled' : 'installed-disabled' /* if chrome extension isn't permitted for current domain, then it will be installed-disabled all the time even if extension is enabled. */
- );
- } else _callback('installed-enabled');
- }, 2000);
- };
- image.onerror = function() {
- _callback('not-installed');
- };
- }
- };
-
- // if IE
- if (!window.addEventListener) {
- window.addEventListener = function(el, eventName, eventHandler) {
- if (!el.attachEvent) return;
- el.attachEvent('on' + eventName, eventHandler);
- };
- }
-
- function listenEventHandler(eventName, eventHandler) {
- window.removeEventListener(eventName, eventHandler);
- window.addEventListener(eventName, eventHandler, false);
- }
-
- window.addEventListener('message', function(event) {
- if (event.origin != window.location.origin) {
- return;
- }
-
- DetectRTC.screen.onMessageCallback(event.data);
- });
-
- function setDefaults(connection) {
- var DetectRTC = window.DetectRTC || {};
-
- // www.RTCMultiConnection.org/docs/userid/
- connection.userid = getRandomString();
-
- // www.RTCMultiConnection.org/docs/session/
- connection.session = {
- audio: true,
- video: true
- };
-
- // www.RTCMultiConnection.org/docs/maxParticipantsAllowed/
- connection.maxParticipantsAllowed = 256;
-
- // www.RTCMultiConnection.org/docs/direction/
- // 'many-to-many' / 'one-to-many' / 'one-to-one' / 'one-way'
- connection.direction = 'many-to-many';
-
- // www.RTCMultiConnection.org/docs/mediaConstraints/
- connection.mediaConstraints = {
- mandatory: {}, // kept for backward compatibility
- optional: [], // kept for backward compatibility
- audio: {
- mandatory: {},
- optional: []
- },
- video: {
- mandatory: {},
- optional: []
- }
- };
-
- // www.RTCMultiConnection.org/docs/candidates/
- connection.candidates = {
- host: true,
- stun: true,
- turn: true
- };
-
- connection.sdpConstraints = {};
-
- // as @serhanters proposed in #225
- // it will auto fix "all" renegotiation scenarios
- connection.sdpConstraints.mandatory = {
- OfferToReceiveAudio: true,
- OfferToReceiveVideo: true
- };
-
- connection.privileges = {
- canStopRemoteStream: false, // user can stop remote streams
- canMuteRemoteStream: false // user can mute remote streams
- };
-
- connection.iceProtocols = {
- tcp: true,
- udp: true
- };
-
- // www.RTCMultiConnection.org/docs/preferSCTP/
- connection.preferSCTP = isFirefox || chromeVersion >= 32 ? true : false;
- connection.chunkInterval = isFirefox || chromeVersion >= 32 ? 100 : 500; // 500ms for RTP and 100ms for SCTP
- connection.chunkSize = isFirefox || chromeVersion >= 32 ? 13 * 1000 : 1000; // 1000 chars for RTP and 13000 chars for SCTP
-
- // www.RTCMultiConnection.org/docs/fakeDataChannels/
- connection.fakeDataChannels = false;
-
- connection.waitUntilRemoteStreamStartsFlowing = null; // NULL == true
-
- // auto leave on page unload
- connection.leaveOnPageUnload = true;
-
- // get ICE-servers from XirSys
- connection.getExternalIceServers = isChrome;
-
- // www.RTCMultiConnection.org/docs/UA/
- connection.UA = {
- isFirefox: isFirefox,
- isChrome: isChrome,
- isMobileDevice: isMobileDevice,
- version: isChrome ? chromeVersion : firefoxVersion,
- isNodeWebkit: isNodeWebkit,
- isSafari: isSafari,
- isIE: isIE,
- isOpera: isOpera
- };
-
- // file queue: to store previous file objects in memory;
- // and stream over newly connected peers
- // www.RTCMultiConnection.org/docs/fileQueue/
- connection.fileQueue = {};
-
- // this array is aimed to store all renegotiated streams' session-types
- connection.renegotiatedSessions = {};
-
- // www.RTCMultiConnection.org/docs/channels/
- connection.channels = {};
-
- // www.RTCMultiConnection.org/docs/extra/
- connection.extra = {};
-
- // www.RTCMultiConnection.org/docs/bandwidth/
- connection.bandwidth = {
- screen: 300 // 300kbps (dirty workaround)
- };
-
- // www.RTCMultiConnection.org/docs/caniuse/
- connection.caniuse = {
- RTCPeerConnection: DetectRTC.isWebRTCSupported,
- getUserMedia: !!navigator.webkitGetUserMedia || !!navigator.mozGetUserMedia,
- AudioContext: DetectRTC.isAudioContextSupported,
-
- // there is no way to check whether "getUserMedia" flag is enabled or not!
- ScreenSharing: DetectRTC.isScreenCapturingSupported,
- RtpDataChannels: DetectRTC.isRtpDataChannelsSupported,
- SctpDataChannels: DetectRTC.isSctpDataChannelsSupported
- };
-
- // www.RTCMultiConnection.org/docs/snapshots/
- connection.snapshots = {};
-
- // www.WebRTC-Experiment.com/demos/MediaStreamTrack.getSources.html
- connection._mediaSources = {};
-
- // www.RTCMultiConnection.org/docs/devices/
- connection.devices = {};
-
- // www.RTCMultiConnection.org/docs/language/ (to see list of all supported languages)
- connection.language = 'en';
-
- // www.RTCMultiConnection.org/docs/autoTranslateText/
- connection.autoTranslateText = false;
-
- // please use your own Google Translate API key
- // Google Translate is a paid service.
- connection.googKey = 'AIzaSyCgB5hmFY74WYB-EoWkhr9cAGr6TiTHrEE';
-
- connection.localStreamids = [];
- connection.localStreams = {};
-
- // this object stores pre-recorded media streaming uids
- // multiple pre-recorded media files can be streamed concurrently.
- connection.preRecordedMedias = {};
-
- // www.RTCMultiConnection.org/docs/attachStreams/
- connection.attachStreams = [];
-
- // www.RTCMultiConnection.org/docs/detachStreams/
- connection.detachStreams = [];
-
- connection.optionalArgument = {
- optional: [{
- DtlsSrtpKeyAgreement: true
- }, {
- googImprovedWifiBwe: true
- }, {
- googScreencastMinBitrate: 300
- }],
- mandatory: {}
- };
-
- connection.dataChannelDict = {};
-
- // www.RTCMultiConnection.org/docs/dontAttachStream/
- connection.dontAttachStream = false;
-
- // www.RTCMultiConnection.org/docs/dontCaptureUserMedia/
- connection.dontCaptureUserMedia = false;
-
- // this feature added to keep users privacy and
- // make sure HTTPs pages NEVER auto capture users media
- // isChrome && location.protocol == 'https:'
- connection.preventSSLAutoAllowed = false;
-
- connection.autoReDialOnFailure = true;
- connection.isInitiator = false;
-
- // access DetectRTC.js features directly!
- connection.DetectRTC = DetectRTC;
-
- // you can falsify it to merge all ICE in SDP and share only SDP!
- // such mechanism is useful for SIP/XMPP and XMLHttpRequest signaling
- // bug: renegotiation fails if "trickleIce" is false
- connection.trickleIce = true;
-
- // this object stores list of all sessions in current channel
- connection.sessionDescriptions = {};
-
- // this object stores current user's session-description
- // it is set only for initiator
- // it is set as soon as "open" method is invoked.
- connection.sessionDescription = null;
-
- // resources used in RTCMultiConnection
- connection.resources = {
- // CUSTOM CODE //
- /* Commenting this block as we do not wasnt external dependencies
- *
- RecordRTC: 'https://cdn.webrtc-experiment.com/RecordRTC.js',
- PreRecordedMediaStreamer: 'https://cdn.webrtc-experiment.com/PreRecordedMediaStreamer.js',
- customGetUserMediaBar: 'https://cdn.webrtc-experiment.com/navigator.customGetUserMediaBar.js',
- html2canvas: 'https://cdn.webrtc-experiment.com/screenshot.js',
- hark: 'https://cdn.webrtc-experiment.com/hark.js',
- firebase: 'https://cdn.webrtc-experiment.com/firebase.js',
- firebaseio: 'https://webrtc-signaling.firebaseio.com/',
-
- muted: 'static/fusion/images/ATT_Labs_Logo.png',
-
- getConnectionStats: 'https://cdn.webrtc-experiment.com/getConnectionStats.js',
- FileBufferReader: 'https://cdn.webrtc-experiment.com/FileBufferReader.js'
- */
-
- // CUSTOM CODE //
-
-
- };
-
- // www.RTCMultiConnection.org/docs/body/
- connection.body = document.body || document.documentElement;
- connection.screenbody = null;// document.body || document.documentElement;
- connection.videobody = null;//document.body || document.documentElement;
-
- // www.RTCMultiConnection.org/docs/peers/
- connection.peers = {};
-
- // www.RTCMultiConnection.org/docs/firebase/
- connection.firebase = 'chat';
-
- connection.numberOfSessions = 0;
- connection.numberOfConnectedUsers = 0;
-
- // by default, data-connections will always be getting
- // FileBufferReader.js if absent.
- connection.enableFileSharing = true;
-
- // www.RTCMultiConnection.org/docs/autoSaveToDisk/
- // to make sure file-saver dialog is not invoked.
- connection.autoSaveToDisk = false;
-
- connection.processSdp = function(sdp) {
- // process sdp here
- return sdp;
- };
-
- // www.RTCMultiConnection.org/docs/onmessage/
- connection.onmessage = function(e) {
- log('onmessage', toStr(e));
- };
-
- // www.RTCMultiConnection.org/docs/onopen/
- connection.onopen = function(e) {
- log('Data connection is opened between you and', e.userid);
- };
-
- // www.RTCMultiConnection.org/docs/onerror/
- connection.onerror = function(e) {
- error(onerror, toStr(e));
- };
-
- // www.RTCMultiConnection.org/docs/onclose/
- connection.onclose = function(e) {
- warn('onclose', toStr(e));
-
- // todo: should we use "stop" or "remove"?
- // BTW, it is remote user!
- connection.streams.remove({
- userid: e.userid
- });
- };
-
- var progressHelper = {};
-
- // www.RTCMultiConnection.org/docs/onFileStart/
- connection.onFileStart = function(file) {
- var div = document.createElement('div');
- div.title = file.name;
- div.innerHTML = '<label>0%</label> <progress></progress>';
- connection.body.insertBefore(div, connection.body.firstChild);
- progressHelper[file.uuid] = {
- div: div,
- progress: div.querySelector('progress'),
- label: div.querySelector('label')
- };
- progressHelper[file.uuid].progress.max = file.maxChunks;
- };
-
- // www.RTCMultiConnection.org/docs/onFileProgress/
- connection.onFileProgress = function(chunk) {
- var helper = progressHelper[chunk.uuid];
- if (!helper) return;
- helper.progress.value = chunk.currentPosition || chunk.maxChunks || helper.progress.max;
- updateLabel(helper.progress, helper.label);
- };
-
- // www.RTCMultiConnection.org/docs/onFileEnd/
- connection.onFileEnd = function(file) {
- if (progressHelper[file.uuid]) progressHelper[file.uuid].div.innerHTML = '<a href="' + file.url + '" target="_blank" download="' + file.name + '">' + file.name + '</a>';
-
- // for backward compatibility
- if (connection.onFileSent || connection.onFileReceived) {
- if (connection.onFileSent) connection.onFileSent(file, file.uuid);
- if (connection.onFileReceived) connection.onFileReceived(file.name, file);
- }
- };
-
- function updateLabel(progress, label) {
- if (progress.position == -1) return;
- var position = +progress.position.toFixed(2).split('.')[1] || 100;
- label.innerHTML = position + '%';
- }
-
- // www.RTCMultiConnection.org/docs/onstream/
- connection.onstream = function(e) {
- // CUSTOM CODE //
-
- if(e.isVideo || e.isAudio)
- {
- var videoTag = e.mediaElement;
- var videoType = e.type;
- var parentDiv = connection.videobody;
-
- if(videoType == "local")
- {
- videoTag.style.top = "auto";
- videoTag.style.position = "absolute";
- //videoTag.style.left = (parentDiv.offsetWidth - 160) + "px";
- videoTag.style.height = "150px";
- videoTag.style.width = "150px";
- videoTag.style.zIndex = 1;
-
- }
- else if(videoType == "remote")
- {
- videoTag.style.top = "auto";
- videoTag.style.position = "absolute";
- videoTag.style.zIndex = -1;
- }
-
- parentDiv.appendChild(videoTag);
- }
- else if(e.isScreen)
- {
- var screenTag = e.mediaElement;
- var screenType = e.type;
- var parentDiv = connection.screenbody;
-
- if(screenType == "local")
- {
- // no need to display this because the person sharing his/her screen doesn't have to see whats being shared
- // enabled for demo purposes
- parentDiv.appendChild(screenTag);
- }
- else if(screenType == "remote")
- {
- parentDiv.appendChild(screenTag);
- }
-
-
- }
-
- else
- connection.body.insertBefore(e.mediaElement, connection.body.firstChild);
-
- // CUSTOM CODE //
- };
-
- // www.RTCMultiConnection.org/docs/onStreamEndedHandler/
- connection.onstreamended = function(e) {
- log('onStreamEndedHandler:', e);
-
- if (!e.mediaElement) {
- return warn('Event.mediaElement is undefined', e);
- }
- if (!e.mediaElement.parentNode) {
- e.mediaElement = document.getElementById(e.streamid);
-
- if (!e.mediaElement) {
- return warn('Event.mediaElement is undefined', e);
- }
-
- if (!e.mediaElement.parentNode) {
- return warn('Event.mediElement.parentNode is null.', e);
- }
- }
-
- e.mediaElement.parentNode.removeChild(e.mediaElement);
- };
-
- // todo: need to write documentation link
- connection.onSessionClosed = function(session) {
- if (session.isEjected) {
- warn(session.userid, 'ejected you.');
- } else warn('Session has been closed.', session);
- };
-
- // www.RTCMultiConnection.org/docs/onmute/
- connection.onmute = function(e) {
- if (e.isVideo && e.mediaElement) {
- e.mediaElement.pause();
- e.mediaElement.setAttribute('poster', e.snapshot || connection.resources.muted);
- }
- if (e.isAudio && e.mediaElement) {
- e.mediaElement.muted = true;
- }
- };
-
- // www.RTCMultiConnection.org/docs/onunmute/
- connection.onunmute = function(e) {
- if (e.isVideo && e.mediaElement) {
- e.mediaElement.play();
- e.mediaElement.removeAttribute('poster');
- }
- if (e.isAudio && e.mediaElement) {
- e.mediaElement.muted = false;
- }
- };
-
- // www.RTCMultiConnection.org/docs/onleave/
- connection.onleave = function(e) {
- log('onleave', toStr(e));
- };
-
- connection.token = getRandomString;
-
- connection.peers[connection.userid] = {
- drop: function() {
- connection.drop();
- },
- renegotiate: function() {},
- addStream: function() {},
- hold: function() {},
- unhold: function() {},
- changeBandwidth: function() {},
- sharePartOfScreen: function() {}
- };
-
- connection._skip = ['stop', 'mute', 'unmute', '_private', '_selectStreams', 'selectFirst', 'selectAll', 'remove'];
-
- // www.RTCMultiConnection.org/docs/streams/
- connection.streams = {
- mute: function(session) {
- this._private(session, true);
- },
- unmute: function(session) {
- this._private(session, false);
- },
- _private: function(session, enabled) {
- if (session && !isString(session)) {
- for (var stream in this) {
- if (connection._skip.indexOf(stream) == -1) {
- _muteOrUnMute(this[stream], session, enabled);
- }
- }
-
- function _muteOrUnMute(stream, session, isMute) {
- if (session.local && stream.type != 'local') return;
- if (session.remote && stream.type != 'remote') return;
-
- if (session.isScreen && !stream.isScreen) return;
- if (session.isAudio && !stream.isAudio) return;
- if (session.isVideo && !stream.isVideo) return;
-
- if (isMute) stream.mute(session);
- else stream.unmute(session);
- }
- return;
- }
-
- // implementation from #68
- for (var stream in this) {
- if (connection._skip.indexOf(stream) == -1) {
- this[stream]._private(session, enabled);
- }
- }
- },
- stop: function(type) {
- var _stream;
- for (var stream in this) {
- if (connection._skip.indexOf(stream) == -1) {
- _stream = this[stream];
-
- if (!type) _stream.stop();
-
- else if (isString(type)) {
- // connection.streams.stop('screen');
- var config = {};
- config[type] = true;
- _stopStream(_stream, config);
- } else _stopStream(_stream, type);
- }
- }
-
- function _stopStream(_stream, config) {
- // connection.streams.stop({ remote: true, userid: 'remote-userid' });
- if (config.userid && _stream.userid != config.userid) return;
-
- if (config.local && _stream.type != 'local') return;
- if (config.remote && _stream.type != 'remote') return;
-
- if (config.screen && !!_stream.isScreen) {
- _stream.stop();
- }
-
- if (config.audio && !!_stream.isAudio) {
- _stream.stop();
- }
-
- if (config.video && !!_stream.isVideo) {
- _stream.stop();
- }
-
- // connection.streams.stop('local');
- if (!config.audio && !config.video && !config.screen) {
- _stream.stop();
- }
- }
- },
- remove: function(type) {
- var _stream;
- for (var stream in this) {
- if (connection._skip.indexOf(stream) == -1) {
- _stream = this[stream];
-
- if (!type) _stopAndRemoveStream(_stream, {
- local: true,
- remote: true
- });
-
- else if (isString(type)) {
- // connection.streams.stop('screen');
- var config = {};
- config[type] = true;
- _stopAndRemoveStream(_stream, config);
- } else _stopAndRemoveStream(_stream, type);
- }
- }
-
- function _stopAndRemoveStream(_stream, config) {
- // connection.streams.remove({ remote: true, userid: 'remote-userid' });
- if (config.userid && _stream.userid != config.userid) return;
-
- if (config.local && _stream.type != 'local') return;
- if (config.remote && _stream.type != 'remote') return;
-
- if (config.screen && !!_stream.isScreen) {
- endStream(_stream);
- }
-
- if (config.audio && !!_stream.isAudio) {
- endStream(_stream);
- }
-
- if (config.video && !!_stream.isVideo) {
- endStream(_stream);
- }
-
- // connection.streams.remove('local');
- if (!config.audio && !config.video && !config.screen) {
- endStream(_stream);
- }
- }
-
- function endStream(_stream) {
- onStreamEndedHandler(_stream, connection);
- delete connection.streams[_stream.streamid];
- }
- },
- selectFirst: function(args) {
- return this._selectStreams(args, false);
- },
- selectAll: function(args) {
- return this._selectStreams(args, true);
- },
- _selectStreams: function(args, all) {
- if (!args || isString(args) || isEmpty(args)) throw 'Invalid arguments.';
-
- // if userid is used then both local/remote shouldn't be auto-set
- if (isNull(args.local) && isNull(args.remote) && isNull(args.userid)) {
- args.local = args.remote = true;
- }
-
- if (!args.isAudio && !args.isVideo && !args.isScreen) {
- args.isAudio = args.isVideo = args.isScreen = true;
- }
-
- var selectedStreams = [];
- for (var stream in this) {
- if (connection._skip.indexOf(stream) == -1 && (stream = this[stream]) && ((args.local && stream.type == 'local') || (args.remote && stream.type == 'remote') || (args.userid && stream.userid == args.userid))) {
- if (args.isVideo && stream.isVideo) {
- selectedStreams.push(stream);
- }
-
- if (args.isAudio && stream.isAudio) {
- selectedStreams.push(stream);
- }
-
- if (args.isScreen && stream.isScreen) {
- selectedStreams.push(stream);
- }
- }
- }
-
- return !!all ? selectedStreams : selectedStreams[0];
- }
- };
-
- var iceServers = [];
-
- // CUSTOM CODE //
- // these servers should be provided by team implmenting the solution
- iceServers.push({
- url: 'stun:todo_url:13478'
- });
-
-
- /* CHANGED: Fusion: These are just for testing purposes
-
- iceServers.push({
- url: 'stun:stun.l.google.com:19302'
- });
-
- iceServers.push({
- url: 'stun:stun.anyfirewall.com:3478'
- });
-
- iceServers.push({
- url: 'turn:turn.bistri.com:80',
- credential: 'homeo',
- username: 'homeo'
- });
-
- iceServers.push({
- url: 'turn:turn.anyfirewall.com:443?transport=tcp',
- credential: 'webrtc',
- username: 'webrtc'
- });
-
- */
- // CUSTOM CODE //
- connection.iceServers = iceServers;
-
- connection.rtcConfiguration = {
- iceServers: null,
- iceTransports: 'all', // none || relay || all - ref: http://goo.gl/40I39K
- peerIdentity: false
- };
-
- // www.RTCMultiConnection.org/docs/media/
- connection.media = {
- min: function(width, height) {
- if (!connection.mediaConstraints.video) return;
-
- if (!connection.mediaConstraints.video.mandatory) {
- connection.mediaConstraints.video.mandatory = {};
- }
- connection.mediaConstraints.video.mandatory.minWidth = width;
- connection.mediaConstraints.video.mandatory.minHeight = height;
- },
- max: function(width, height) {
- if (!connection.mediaConstraints.video) return;
-
- if (!connection.mediaConstraints.video.mandatory) {
- connection.mediaConstraints.video.mandatory = {};
- }
-
- connection.mediaConstraints.video.mandatory.maxWidth = width;
- connection.mediaConstraints.video.mandatory.maxHeight = height;
- }
- };
-
- connection._getStream = function(event) {
- var resultingObject = merge({
- sockets: event.socket ? [event.socket] : []
- }, event);
-
- resultingObject.stop = function() {
- var self = this;
-
- self.sockets.forEach(function(socket) {
- if (self.type == 'local') {
- socket.send({
- streamid: self.streamid,
- stopped: true
- });
- }
-
- if (self.type == 'remote') {
- socket.send({
- promptStreamStop: true,
- streamid: self.streamid
- });
- }
- });
-
- if (self.type == 'remote') return;
-
- var stream = self.stream;
- if (stream) self.rtcMultiConnection.stopMediaStream(stream);
- };
-
- resultingObject.mute = function(session) {
- this.muted = true;
- this._private(session, true);
- };
-
- resultingObject.unmute = function(session) {
- this.muted = false;
- this._private(session, false);
- };
-
- function muteOrUnmuteLocally(session, isPause, mediaElement) {
- if (!mediaElement) return;
- var lastPauseState = mediaElement.onpause;
- var lastPlayState = mediaElement.onplay;
- mediaElement.onpause = mediaElement.onplay = function() {};
-
- if (isPause) mediaElement.pause();
- else mediaElement.play();
-
- mediaElement.onpause = lastPauseState;
- mediaElement.onplay = lastPlayState;
- }
-
- resultingObject._private = function(session, enabled) {
- if (session && !isNull(session.sync) && session.sync == false) {
- muteOrUnmuteLocally(session, enabled, this.mediaElement);
- return;
- }
-
- muteOrUnmute({
- root: this,
- session: session,
- enabled: enabled,
- stream: this.stream
- });
- };
-
- resultingObject.startRecording = function(session) {
- var self = this;
-
- if (!session) {
- session = {
- audio: true,
- video: true
- };
- }
-
- if (isString(session)) {
- session = {
- audio: session == 'audio',
- video: session == 'video'
- };
- }
-
- if (!window.RecordRTC) {
- return loadScript(self.rtcMultiConnection.resources.RecordRTC, function() {
- self.startRecording(session);
- });
- }
-
- log('started recording session', session);
-
- self.videoRecorder = self.audioRecorder = null;
-
- if (isFirefox) {
- // firefox supports both audio/video recording in single webm file
- if (session.video) {
- self.videoRecorder = RecordRTC(self.stream, {
- type: 'video'
- });
- } else if (session.audio) {
- self.audioRecorder = RecordRTC(self.stream, {
- type: 'audio'
- });
- }
- } else if (isChrome) {
- // chrome supports recording in two separate files: WAV and WebM
- if (session.video) {
- self.videoRecorder = RecordRTC(self.stream, {
- type: 'video'
- });
- }
-
- if (session.audio) {
- self.audioRecorder = RecordRTC(self.stream, {
- type: 'audio'
- });
- }
- }
-
- if (self.audioRecorder) {
- self.audioRecorder.startRecording();
- }
-
- if (self.videoRecorder) self.videoRecorder.startRecording();
- };
-
- resultingObject.stopRecording = function(callback, session) {
- if (!session) {
- session = {
- audio: true,
- video: true
- };
- }
-
- if (isString(session)) {
- session = {
- audio: session == 'audio',
- video: session == 'video'
- };
- }
-
- log('stopped recording session', session);
-
- var self = this;
-
- if (session.audio && self.audioRecorder) {
- self.audioRecorder.stopRecording(function() {
- if (session.video && self.videoRecorder) {
- self.videoRecorder.stopRecording(function() {
- callback({
- audio: self.audioRecorder.getBlob(),
- video: self.videoRecorder.getBlob()
- });
- });
- } else callback({
- audio: self.audioRecorder.getBlob()
- });
- });
- } else if (session.video && self.videoRecorder) {
- self.videoRecorder.stopRecording(function() {
- callback({
- video: self.videoRecorder.getBlob()
- });
- });
- }
- };
-
- resultingObject.takeSnapshot = function(callback) {
- takeSnapshot({
- mediaElement: this.mediaElement,
- userid: this.userid,
- connection: connection,
- callback: callback
- });
- };
-
- // redundant: kept only for backward compatibility
- resultingObject.streamObject = resultingObject;
-
- return resultingObject;
- };
-
- // new RTCMultiConnection().set({properties}).connect()
- connection.set = function(properties) {
- for (var property in properties) {
- this[property] = properties[property];
- }
- return this;
- };
-
- // www.RTCMultiConnection.org/docs/onMediaError/
- connection.onMediaError = function(event) {
- error('name', event.name);
- error('constraintName', toStr(event.constraintName));
- error('message', event.message);
- error('original session', event.session);
- };
-
- // www.RTCMultiConnection.org/docs/takeSnapshot/
- connection.takeSnapshot = function(userid, callback) {
- takeSnapshot({
- userid: userid,
- connection: connection,
- callback: callback
- });
- };
-
- connection.saveToDisk = function(blob, fileName) {
- if (blob.size && blob.type) FileSaver.SaveToDisk(URL.createObjectURL(blob), fileName || blob.name || blob.type.replace('/', '-') + blob.type.split('/')[1]);
- else FileSaver.SaveToDisk(blob, fileName);
- };
-
- // www.RTCMultiConnection.org/docs/selectDevices/
- connection.selectDevices = function(device1, device2) {
- if (device1) select(this.devices[device1]);
- if (device2) select(this.devices[device2]);
-
- function select(device) {
- if (!device) return;
- connection._mediaSources[device.kind] = device.id;
- }
- };
-
- // www.RTCMultiConnection.org/docs/getDevices/
- connection.getDevices = function(callback) {
- // if, not yet fetched.
- if (!DetectRTC.MediaDevices.length) {
- return setTimeout(function() {
- connection.getDevices(callback);
- }, 1000);
- }
-
- // loop over all audio/video input/output devices
- DetectRTC.MediaDevices.forEach(function(device) {
- connection.devices[device.deviceId] = device;
- });
-
- if (callback) callback(connection.devices);
- };
-
- connection.getMediaDevices = connection.enumerateDevices = function(callback) {
- if (!callback) throw 'callback is mandatory.';
- connection.getDevices(function() {
- callback(connection.DetectRTC.MediaDevices);
- });
- };
-
- // www.RTCMultiConnection.org/docs/onCustomMessage/
- connection.onCustomMessage = function(message) {
- log('Custom message', message);
- };
-
- // www.RTCMultiConnection.org/docs/ondrop/
- connection.ondrop = function(droppedBy) {
- log('Media connection is dropped by ' + droppedBy);
- };
-
- // www.RTCMultiConnection.org/docs/drop/
- connection.drop = function(config) {
- config = config || {};
- connection.attachStreams = [];
-
- // "drop" should detach all local streams
- for (var stream in connection.streams) {
- if (connection._skip.indexOf(stream) == -1) {
- stream = connection.streams[stream];
- if (stream.type == 'local') {
- connection.detachStreams.push(stream.streamid);
- onStreamEndedHandler(stream, connection);
- } else onStreamEndedHandler(stream, connection);
- }
- }
-
- // www.RTCMultiConnection.org/docs/sendCustomMessage/
- connection.sendCustomMessage({
- drop: true,
- dontRenegotiate: isNull(config.renegotiate) ? true : config.renegotiate
- });
- };
-
- // www.RTCMultiConnection.org/docs/Translator/
- connection.Translator = {
- TranslateText: function(text, callback) {
- // if(location.protocol === 'https:') return callback(text);
-
- var newScript = document.createElement('script');
- newScript.type = 'text/javascript';
-
- var sourceText = encodeURIComponent(text); // escape
-
- var randomNumber = 'method' + connection.token();
- window[randomNumber] = function(response) {
- if (response.data && response.data.translations[0] && callback) {
- callback(response.data.translations[0].translatedText);
- }
-
- if (response.error && response.error.message == 'Daily Limit Exceeded') {
- warn('Text translation failed. Error message: "Daily Limit Exceeded."');
-
- // returning original text
- callback(text);
- }
- };
-
- var source = 'https://www.googleapis.com/language/translate/v2?key=' + connection.googKey + '&target=' + (connection.language || 'en-US') + '&callback=window.' + randomNumber + '&q=' + sourceText;
- newScript.src = source;
- document.getElementsByTagName('head')[0].appendChild(newScript);
- }
- };
-
- // you can easily override it by setting it NULL!
- connection.setDefaultEventsForMediaElement = function(mediaElement, streamid) {
- mediaElement.onpause = function() {
- if (connection.streams[streamid] && !connection.streams[streamid].muted) {
- connection.streams[streamid].mute();
- }
- };
-
- // todo: need to make sure that "onplay" EVENT doesn't play self-voice!
- mediaElement.onplay = function() {
- if (connection.streams[streamid] && connection.streams[streamid].muted) {
- connection.streams[streamid].unmute();
- }
- };
-
- var volumeChangeEventFired = false;
- mediaElement.onvolumechange = function() {
- if (!volumeChangeEventFired) {
- volumeChangeEventFired = true;
- connection.streams[streamid] && setTimeout(function() {
- var root = connection.streams[streamid];
- connection.streams[streamid].sockets.forEach(function(socket) {
- socket.send({
- streamid: root.streamid,
- isVolumeChanged: true,
- volume: mediaElement.volume
- });
- });
- volumeChangeEventFired = false;
- }, 2000);
- }
- };
- };
-
- // www.RTCMultiConnection.org/docs/onMediaFile/
- connection.onMediaFile = function(e) {
- log('onMediaFile', e);
- connection.body.appendChild(e.mediaElement);
- };
-
- // www.RTCMultiConnection.org/docs/shareMediaFile/
- // this method handles pre-recorded media streaming
- connection.shareMediaFile = function(file, video, streamerid) {
- streamerid = streamerid || connection.token();
-
- if (!PreRecordedMediaStreamer) {
- loadScript(connection.resources.PreRecordedMediaStreamer, function() {
- connection.shareMediaFile(file, video, streamerid);
- });
- return streamerid;
- }
-
- return PreRecordedMediaStreamer.shareMediaFile({
- file: file,
- video: video,
- streamerid: streamerid,
- connection: connection
- });
- };
-
- // www.RTCMultiConnection.org/docs/onpartofscreen/
- connection.onpartofscreen = function(e) {
- var image = document.createElement('img');
- image.src = e.screenshot;
- connection.body.appendChild(image);
- };
-
- connection.skipLogs = function() {
- log = error = warn = function() {};
- };
-
- // www.RTCMultiConnection.org/docs/hold/
- connection.hold = function(mLine) {
- for (var peer in connection.peers) {
- connection.peers[peer].hold(mLine);
- }
- };
-
- // www.RTCMultiConnection.org/docs/onhold/
- connection.onhold = function(track) {
- log('onhold', track);
-
- if (track.kind != 'audio') {
- track.mediaElement.pause();
- track.mediaElement.setAttribute('poster', track.screenshot || connection.resources.muted);
- }
- if (track.kind == 'audio') {
- track.mediaElement.muted = true;
- }
- };
-
- // www.RTCMultiConnection.org/docs/unhold/
- connection.unhold = function(mLine) {
- for (var peer in connection.peers) {
- connection.peers[peer].unhold(mLine);
- }
- };
-
- // www.RTCMultiConnection.org/docs/onunhold/
- connection.onunhold = function(track) {
- log('onunhold', track);
-
- if (track.kind != 'audio') {
- track.mediaElement.play();
- track.mediaElement.removeAttribute('poster');
- }
- if (track.kind != 'audio') {
- track.mediaElement.muted = false;
- }
- };
-
- connection.sharePartOfScreen = function(args) {
- var lastScreenshot = '';
-
- function partOfScreenCapturer() {
- // if stopped
- if (connection.partOfScreen && !connection.partOfScreen.sharing) {
- return;
- }
-
- capturePartOfScreen({
- element: args.element,
- connection: connection,
- callback: function(screenshot) {
- // don't share repeated content
- if (screenshot != lastScreenshot) {
- lastScreenshot = screenshot;
-
- for (var channel in connection.channels) {
- connection.channels[channel].send({
- screenshot: screenshot,
- isPartOfScreen: true
- });
- }
- }
-
- // "once" can be used to share single screenshot
- !args.once && setTimeout(partOfScreenCapturer, args.interval || 200);
- }
- });
- }
-
- partOfScreenCapturer();
-
- connection.partOfScreen = merge({
- sharing: true
- }, args);
- };
-
- connection.pausePartOfScreenSharing = function() {
- for (var peer in connection.peers) {
- connection.peers[peer].pausePartOfScreenSharing = true;
- }
-
- if (connection.partOfScreen) {
- connection.partOfScreen.sharing = false;
- }
- };
-
- connection.resumePartOfScreenSharing = function() {
- for (var peer in connection.peers) {
- connection.peers[peer].pausePartOfScreenSharing = false;
- }
-
- if (connection.partOfScreen) {
- connection.partOfScreen.sharing = true;
- }
- };
-
- connection.stopPartOfScreenSharing = function() {
- for (var peer in connection.peers) {
- connection.peers[peer].stopPartOfScreenSharing = true;
- }
-
- if (connection.partOfScreen) {
- connection.partOfScreen.sharing = false;
- }
- };
-
- connection.takeScreenshot = function(element, callback) {
- if (!element || !callback) throw 'Invalid number of arguments.';
-
- if (!window.html2canvas) {
- return loadScript(connection.resources.html2canvas, function() {
- connection.takeScreenshot(element);
- });
- }
-
- if (isString(element)) {
- element = document.querySelector(element);
- if (!element) element = document.getElementById(element);
- }
- if (!element) throw 'HTML Element is inaccessible!';
-
- // html2canvas.js is used to take screenshots
- html2canvas(element, {
- onrendered: function(canvas) {
- callback(canvas.toDataURL());
- }
- });
- };
-
- // this event is fired when RTCMultiConnection detects that chrome extension
- // for screen capturing is installed and available
- connection.onScreenCapturingExtensionAvailable = function() {
- log('It seems that screen capturing extension is installed and available on your system!');
- };
-
- if (!isPluginRTC && DetectRTC.screen.onScreenCapturingExtensionAvailable) {
- DetectRTC.screen.onScreenCapturingExtensionAvailable = function() {
- connection.onScreenCapturingExtensionAvailable();
- };
- }
-
- connection.changeBandwidth = function(bandwidth) {
- for (var peer in connection.peers) {
- connection.peers[peer].changeBandwidth(bandwidth);
- }
- };
-
- connection.convertToAudioStream = function(mediaStream) {
- convertToAudioStream(mediaStream);
- };
-
- connection.onstatechange = function(state) {
- log('on:state:change (' + state.userid + '):', state.name + ':', state.reason || '');
- };
-
- connection.onfailed = function(event) {
- if (!event.peer.numOfRetries) event.peer.numOfRetries = 0;
- event.peer.numOfRetries++;
-
- error('ICE connectivity check is failed. Renegotiating peer connection.');
- event.peer.numOfRetries < 2 && event.peer.renegotiate();
-
- if (event.peer.numOfRetries >= 2) event.peer.numOfRetries = 0;
- };
-
- connection.onconnected = function(event) {
- // event.peer.addStream || event.peer.getConnectionStats
- log('Peer connection has been established between you and', event.userid);
- };
-
- connection.ondisconnected = function(event) {
- error('Peer connection seems has been disconnected between you and', event.userid);
-
- if (isEmpty(connection.channels)) return;
- if (!connection.channels[event.userid]) return;
-
- // use WebRTC data channels to detect user's presence
- connection.channels[event.userid].send({
- checkingPresence: true
- });
-
- // wait 5 seconds, if target peer didn't response, simply disconnect
- setTimeout(function() {
- // iceConnectionState == 'disconnected' occurred out of low-bandwidth
- // or internet connectivity issues
- if (connection.peers[event.userid].connected) {
- delete connection.peers[event.userid].connected;
- return;
- }
-
- // to make sure this user's all remote streams are removed.
- connection.streams.remove({
- remote: true,
- userid: event.userid
- });
-
- connection.remove(event.userid);
- }, 3000);
- };
-
- connection.onstreamid = function(event) {
- // event.isScreen || event.isVideo || event.isAudio
- log('got remote streamid', event.streamid, 'from', event.userid);
- };
-
- connection.stopMediaStream = function(mediaStream) {
- if (!mediaStream) throw 'MediaStream argument is mandatory.';
-
- if (connection.keepStreamsOpened) {
- if (mediaStream.onended) mediaStream.onended();
- return;
- }
-
- // remove stream from "localStreams" object
- // when native-stop method invoked.
- if (connection.localStreams[mediaStream.streamid]) {
- delete connection.localStreams[mediaStream.streamid];
- }
-
- if (isFirefox) {
- // Firefox don't yet support onended for any stream (remote/local)
- if (mediaStream.onended) mediaStream.onended();
- }
-
- // Latest firefox does support mediaStream.getAudioTrack but doesn't support stop on MediaStreamTrack
- var checkForMediaStreamTrackStop = Boolean(
- (mediaStream.getAudioTracks || mediaStream.getVideoTracks) && (
- (mediaStream.getAudioTracks()[0] && !mediaStream.getAudioTracks()[0].stop) ||
- (mediaStream.getVideoTracks()[0] && !mediaStream.getVideoTracks()[0].stop)
- )
- );
-
- if (!mediaStream.getAudioTracks || checkForMediaStreamTrackStop) {
- if (mediaStream.stop) {
- mediaStream.stop();
- }
- return;
- }
-
- if (mediaStream.getAudioTracks().length && mediaStream.getAudioTracks()[0].stop) {
- mediaStream.getAudioTracks().forEach(function(track) {
- track.stop();
- });
- }
-
- if (mediaStream.getVideoTracks().length && mediaStream.getVideoTracks()[0].stop) {
- mediaStream.getVideoTracks().forEach(function(track) {
- track.stop();
- });
- }
- };
-
- connection.changeBandwidth = function(bandwidth) {
- if (!bandwidth || isString(bandwidth) || isEmpty(bandwidth)) {
- throw 'Invalid "bandwidth" arguments.';
- }
-
- forEach(connection.peers, function(peer) {
- peer.peer.bandwidth = bandwidth;
- });
-
- connection.renegotiate();
- };
-
- // www.RTCMultiConnection.org/docs/openSignalingChannel/
- // http://goo.gl/uvoIcZ
-
- // CUSTOM CODE
- var href = window.location.href;
- var hostPatt = new RegExp(window.location.host +"/[^/]*");
- var res = hostPatt.exec(href);
- var protocol = window.location.protocol.replace("http","ws");
-
- var signalingServerPath = protocol + "//" + res + "/webrtc";
- var SIGNALING_SERVER = signalingServerPath; //"ws://localhost:80/quantum/webrtc"; //"wss://localhost:80/quantum/webrtc"; --> ws for http and wss for https
-
- connection.openSignalingChannel = function(config) {
-
-
- config.channel = config.channel || this.channel;
- var websocket = new WebSocket(SIGNALING_SERVER);
- websocket.channel = config.channel;
- websocket.onopen = function() {
- websocket.push(JSON.stringify({
- open: true,
- channel: config.channel
- }));
- if (config.callback)
- config.callback(websocket);
- };
- websocket.onmessage = function(event) {
- config.onmessage(JSON.parse(event.data));
- };
- websocket.push = websocket.send;
- websocket.send = function(data) {
- websocket.push(JSON.stringify({
- data: data,
- channel: config.channel
- }));
- };
-
- /*
- // make sure firebase.js is loaded
- if (!window.Firebase) {
- return loadScript(connection.resources.firebase, function() {
- connection.openSignalingChannel(config);
- });
- }
-
- var channel = config.channel || connection.channel;
-
- if (connection.firebase) {
- // for custom firebase instances
- connection.resources.firebaseio = connection.resources.firebaseio.replace('//chat.', '//' + connection.firebase + '.');
- }
-
- var firebase = new Firebase(connection.resources.firebaseio + channel);
- firebase.channel = channel;
- firebase.on('child_added', function(data) {
- config.onmessage(data.val());
- });
-
- firebase.send = function(data) {
- // a quick dirty workaround to make sure firebase
- // shouldn't fail for NULL values.
- for (var prop in data) {
- if (isNull(data[prop]) || typeof data[prop] == 'function') {
- data[prop] = false;
- }
- }
-
- this.push(data);
- };
-
- if (!connection.socket)
- connection.socket = firebase;
-
- firebase.onDisconnect().remove();
-
- setTimeout(function() {
- config.callback(firebase);
- }, 1);
-
- */
- // CUSTOM CODE //
-
- };
-
- connection.Plugin = Plugin;
- }
-
-})(); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/fusion/webrtc/js/peerBroadcast.js b/ecomp-portal-BE/war/static/fusion/webrtc/js/peerBroadcast.js
deleted file mode 100644
index 65da8ef5..00000000
--- a/ecomp-portal-BE/war/static/fusion/webrtc/js/peerBroadcast.js
+++ /dev/null
@@ -1,113 +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.
- * ================================================================================
- */
-var output = $('#peerBroadcastSection');
-var websocket = '';
-var currentUser = '';
-var remoteUser = '';
-var f = '';
-
-
-
-function socketSetup(initialPageVisit,_currentUser, _remoteUser, _f) {
-
-
-
- if( true) {
-
- var href = window.location.href;
- var hostPatt = new RegExp(window.location.host +"/[^/]*");
- var res = hostPatt.exec(href);
- var protocol = window.location.protocol.replace("http","ws");
-
- var signalingServerPath = protocol + "//" + res + "/opencontact";
- var wsUri = signalingServerPath;
- console.log("Connecting to " + wsUri);
- websocket = new WebSocket(wsUri);
- //localStorage.notifySocket = JSON.stringify(websocket);
- //window.top.notifySocket = websocket;
-
- currentUser = _currentUser;
- remoteUser = _remoteUser;
- f = socketSend;
-
-
- }
-
- //var websocket = JSON.parse(localStorage.notifySocket || "{}") ;
- if( websocket != null) {
- websocket.onopen = function(evt) { onOpen(evt); };
- websocket.onmessage = function(evt) { onMessage(evt); };
- websocket.onerror = function(evt) { onError(evt); };
-
- }
-
- //if(f != undefined)
- // f();
-
- //window.top.notifySocket.send("");
-}
-
-
-function socketSend(currentUser, remoteUser) {
-
-
-
- websocket.send(JSON.stringify({
- from: currentUser,
- to: remoteUser
- }));
-
- //window.top.notifySocket.send("");
-}
-
-
-
-
-function onOpen(evt) {
- console.log("onOpen");
- //writeToScreen("CONNECTED");
-
- if(f != undefined)
- f(currentUser, remoteUser);
-
-}
-
-function onMessage(evt) {
- if (typeof evt.data == "string") {
- writeToScreen("RECEIVED (text): " + evt.data);
-
- confirm("You are being contacted by " + JSON.parse(evt.data).from + ". Please click on the online icon and then click view");
-
- //if (confirm("You are being contacted by " + JSON.parse(evt.data).from )) {
-
- //}
-
- } else {
- writeToScreen("RECEIVED (binary): " + evt.data);
- }
-}
-
-function onError(evt) {
- writeToScreen('<span style="color: red;">ERROR:</span> ' + evt.data);
-}
-
-function writeToScreen(message) {
- console.log(message);
-}
diff --git a/ecomp-portal-BE/war/static/js/jquery-1.10.2.js b/ecomp-portal-BE/war/static/js/jquery-1.10.2.js
deleted file mode 100644
index c5c64825..00000000
--- a/ecomp-portal-BE/war/static/js/jquery-1.10.2.js
+++ /dev/null
@@ -1,9789 +0,0 @@
-/*!
- * jQuery JavaScript Library v1.10.2
- * http://jquery.com/
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- *
- * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: 2013-07-03T13:48Z
- */
-(function( window, undefined ) {
-
-// Can't do this because several apps including ASP.NET trace
-// the stack via arguments.caller.callee and Firefox dies if
-// you try to trace through "use strict" call chains. (#13335)
-// Support: Firefox 18+
-//"use strict";
-var
- // The deferred used on DOM ready
- readyList,
-
- // A central reference to the root jQuery(document)
- rootjQuery,
-
- // Support: IE<10
- // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined`
- core_strundefined = typeof undefined,
-
- // Use the correct document accordingly with window argument (sandbox)
- location = window.location,
- document = window.document,
- docElem = document.documentElement,
-
- // Map over jQuery in case of overwrite
- _jQuery = window.jQuery,
-
- // Map over the $ in case of overwrite
- _$ = window.$,
-
- // [[Class]] -> type pairs
- class2type = {},
-
- // List of deleted data cache ids, so we can reuse them
- core_deletedIds = [],
-
- core_version = "1.10.2",
-
- // Save a reference to some core methods
- core_concat = core_deletedIds.concat,
- core_push = core_deletedIds.push,
- core_slice = core_deletedIds.slice,
- core_indexOf = core_deletedIds.indexOf,
- core_toString = class2type.toString,
- core_hasOwn = class2type.hasOwnProperty,
- core_trim = core_version.trim,
-
- // Define a local copy of jQuery
- jQuery = function( selector, context ) {
- // The jQuery object is actually just the init constructor 'enhanced'
- return new jQuery.fn.init( selector, context, rootjQuery );
- },
-
- // Used for matching numbers
- core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
-
- // Used for splitting on whitespace
- core_rnotwhite = /\S+/g,
-
- // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
- rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
-
- // A simple way to check for HTML strings
- // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
- // Strict HTML recognition (#11290: must start with <)
- rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
-
- // Match a standalone tag
- rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
-
- // JSON RegExp
- rvalidchars = /^[\],:{}\s]*$/,
- rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
- rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
- rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
-
- // Matches dashed string for camelizing
- rmsPrefix = /^-ms-/,
- rdashAlpha = /-([\da-z])/gi,
-
- // Used by jQuery.camelCase as callback to replace()
- fcamelCase = function( all, letter ) {
- return letter.toUpperCase();
- },
-
- // The ready event handler
- completed = function( event ) {
-
- // readyState === "complete" is good enough for us to call the dom ready in oldIE
- if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) {
- detach();
- jQuery.ready();
- }
- },
- // Clean-up method for dom ready events
- detach = function() {
- if ( document.addEventListener ) {
- document.removeEventListener( "DOMContentLoaded", completed, false );
- window.removeEventListener( "load", completed, false );
-
- } else {
- document.detachEvent( "onreadystatechange", completed );
- window.detachEvent( "onload", completed );
- }
- };
-
-jQuery.fn = jQuery.prototype = {
- // The current version of jQuery being used
- jquery: core_version,
-
- constructor: jQuery,
- init: function( selector, context, rootjQuery ) {
- var match, elem;
-
- // HANDLE: $(""), $(null), $(undefined), $(false)
- if ( !selector ) {
- return this;
- }
-
- // Handle HTML strings
- if ( typeof selector === "string" ) {
- if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
- // Assume that strings that start and end with <> are HTML and skip the regex check
- match = [ null, selector, null ];
-
- } else {
- match = rquickExpr.exec( selector );
- }
-
- // Match html or make sure no context is specified for #id
- if ( match && (match[1] || !context) ) {
-
- // HANDLE: $(html) -> $(array)
- if ( match[1] ) {
- context = context instanceof jQuery ? context[0] : context;
-
- // scripts is true for back-compat
- jQuery.merge( this, jQuery.parseHTML(
- match[1],
- context && context.nodeType ? context.ownerDocument || context : document,
- true
- ) );
-
- // HANDLE: $(html, props)
- if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
- for ( match in context ) {
- // Properties of context are called as methods if possible
- if ( jQuery.isFunction( this[ match ] ) ) {
- this[ match ]( context[ match ] );
-
- // ...and otherwise set as attributes
- } else {
- this.attr( match, context[ match ] );
- }
- }
- }
-
- return this;
-
- // HANDLE: $(#id)
- } else {
- elem = document.getElementById( match[2] );
-
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- if ( elem && elem.parentNode ) {
- // Handle the case where IE and Opera return items
- // by name instead of ID
- if ( elem.id !== match[2] ) {
- return rootjQuery.find( selector );
- }
-
- // Otherwise, we inject the element directly into the jQuery object
- this.length = 1;
- this[0] = elem;
- }
-
- this.context = document;
- this.selector = selector;
- return this;
- }
-
- // HANDLE: $(expr, $(...))
- } else if ( !context || context.jquery ) {
- return ( context || rootjQuery ).find( selector );
-
- // HANDLE: $(expr, context)
- // (which is just equivalent to: $(context).find(expr)
- } else {
- return this.constructor( context ).find( selector );
- }
-
- // HANDLE: $(DOMElement)
- } else if ( selector.nodeType ) {
- this.context = this[0] = selector;
- this.length = 1;
- return this;
-
- // HANDLE: $(function)
- // Shortcut for document ready
- } else if ( jQuery.isFunction( selector ) ) {
- return rootjQuery.ready( selector );
- }
-
- if ( selector.selector !== undefined ) {
- this.selector = selector.selector;
- this.context = selector.context;
- }
-
- return jQuery.makeArray( selector, this );
- },
-
- // Start with an empty selector
- selector: "",
-
- // The default length of a jQuery object is 0
- length: 0,
-
- toArray: function() {
- return core_slice.call( this );
- },
-
- // Get the Nth element in the matched element set OR
- // Get the whole matched element set as a clean array
- get: function( num ) {
- return num == null ?
-
- // Return a 'clean' array
- this.toArray() :
-
- // Return just the object
- ( num < 0 ? this[ this.length + num ] : this[ num ] );
- },
-
- // Take an array of elements and push it onto the stack
- // (returning the new matched element set)
- pushStack: function( elems ) {
-
- // Build a new jQuery matched element set
- var ret = jQuery.merge( this.constructor(), elems );
-
- // Add the old object onto the stack (as a reference)
- ret.prevObject = this;
- ret.context = this.context;
-
- // Return the newly-formed element set
- return ret;
- },
-
- // Execute a callback for every element in the matched set.
- // (You can seed the arguments with an array of args, but this is
- // only used internally.)
- each: function( callback, args ) {
- return jQuery.each( this, callback, args );
- },
-
- ready: function( fn ) {
- // Add the callback
- jQuery.ready.promise().done( fn );
-
- return this;
- },
-
- slice: function() {
- return this.pushStack( core_slice.apply( this, arguments ) );
- },
-
- first: function() {
- return this.eq( 0 );
- },
-
- last: function() {
- return this.eq( -1 );
- },
-
- eq: function( i ) {
- var len = this.length,
- j = +i + ( i < 0 ? len : 0 );
- return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
- },
-
- map: function( callback ) {
- return this.pushStack( jQuery.map(this, function( elem, i ) {
- return callback.call( elem, i, elem );
- }));
- },
-
- end: function() {
- return this.prevObject || this.constructor(null);
- },
-
- // For internal use only.
- // Behaves like an Array's method, not like a jQuery method.
- push: core_push,
- sort: [].sort,
- splice: [].splice
-};
-
-// Give the init function the jQuery prototype for later instantiation
-jQuery.fn.init.prototype = jQuery.fn;
-
-jQuery.extend = jQuery.fn.extend = function() {
- var src, copyIsArray, copy, name, options, clone,
- target = arguments[0] || {},
- i = 1,
- length = arguments.length,
- deep = false;
-
- // Handle a deep copy situation
- if ( typeof target === "boolean" ) {
- deep = target;
- target = arguments[1] || {};
- // skip the boolean and the target
- i = 2;
- }
-
- // Handle case when target is a string or something (possible in deep copy)
- if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
- target = {};
- }
-
- // extend jQuery itself if only one argument is passed
- if ( length === i ) {
- target = this;
- --i;
- }
-
- for ( ; i < length; i++ ) {
- // Only deal with non-null/undefined values
- if ( (options = arguments[ i ]) != null ) {
- // Extend the base object
- for ( name in options ) {
- src = target[ name ];
- copy = options[ name ];
-
- // Prevent never-ending loop
- if ( target === copy ) {
- continue;
- }
-
- // Recurse if we're merging plain objects or arrays
- if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
- if ( copyIsArray ) {
- copyIsArray = false;
- clone = src && jQuery.isArray(src) ? src : [];
-
- } else {
- clone = src && jQuery.isPlainObject(src) ? src : {};
- }
-
- // Never move original objects, clone them
- target[ name ] = jQuery.extend( deep, clone, copy );
-
- // Don't bring in undefined values
- } else if ( copy !== undefined ) {
- target[ name ] = copy;
- }
- }
- }
- }
-
- // Return the modified object
- return target;
-};
-
-jQuery.extend({
- // Unique for each copy of jQuery on the page
- // Non-digits removed to match rinlinejQuery
- expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ),
-
- noConflict: function( deep ) {
- if ( window.$ === jQuery ) {
- window.$ = _$;
- }
-
- if ( deep && window.jQuery === jQuery ) {
- window.jQuery = _jQuery;
- }
-
- return jQuery;
- },
-
- // Is the DOM ready to be used? Set to true once it occurs.
- isReady: false,
-
- // A counter to track how many items to wait for before
- // the ready event fires. See #6781
- readyWait: 1,
-
- // Hold (or release) the ready event
- holdReady: function( hold ) {
- if ( hold ) {
- jQuery.readyWait++;
- } else {
- jQuery.ready( true );
- }
- },
-
- // Handle when the DOM is ready
- ready: function( wait ) {
-
- // Abort if there are pending holds or we're already ready
- if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
- return;
- }
-
- // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
- if ( !document.body ) {
- return setTimeout( jQuery.ready );
- }
-
- // Remember that the DOM is ready
- jQuery.isReady = true;
-
- // If a normal DOM Ready event fired, decrement, and wait if need be
- if ( wait !== true && --jQuery.readyWait > 0 ) {
- return;
- }
-
- // If there are functions bound, to execute
- readyList.resolveWith( document, [ jQuery ] );
-
- // Trigger any bound ready events
- if ( jQuery.fn.trigger ) {
- jQuery( document ).trigger("ready").off("ready");
- }
- },
-
- // See test/unit/core.js for details concerning isFunction.
- // Since version 1.3, DOM methods and functions like alert
- // aren't supported. They return false on IE (#2968).
- isFunction: function( obj ) {
- return jQuery.type(obj) === "function";
- },
-
- isArray: Array.isArray || function( obj ) {
- return jQuery.type(obj) === "array";
- },
-
- isWindow: function( obj ) {
- /* jshint eqeqeq: false */
- return obj != null && obj == obj.window;
- },
-
- isNumeric: function( obj ) {
- return !isNaN( parseFloat(obj) ) && isFinite( obj );
- },
-
- type: function( obj ) {
- if ( obj == null ) {
- return String( obj );
- }
- return typeof obj === "object" || typeof obj === "function" ?
- class2type[ core_toString.call(obj) ] || "object" :
- typeof obj;
- },
-
- isPlainObject: function( obj ) {
- var key;
-
- // Must be an Object.
- // Because of IE, we also have to check the presence of the constructor property.
- // Make sure that DOM nodes and window objects don't pass through, as well
- if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
- return false;
- }
-
- try {
- // Not own constructor property must be Object
- if ( obj.constructor &&
- !core_hasOwn.call(obj, "constructor") &&
- !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
- return false;
- }
- } catch ( e ) {
- // IE8,9 Will throw exceptions on certain host objects #9897
- return false;
- }
-
- // Support: IE<9
- // Handle iteration over inherited properties before own properties.
- if ( jQuery.support.ownLast ) {
- for ( key in obj ) {
- return core_hasOwn.call( obj, key );
- }
- }
-
- // Own properties are enumerated firstly, so to speed up,
- // if last one is own, then all properties are own.
- for ( key in obj ) {}
-
- return key === undefined || core_hasOwn.call( obj, key );
- },
-
- isEmptyObject: function( obj ) {
- var name;
- for ( name in obj ) {
- return false;
- }
- return true;
- },
-
- error: function( msg ) {
- throw new Error( msg );
- },
-
- // data: string of html
- // context (optional): If specified, the fragment will be created in this context, defaults to document
- // keepScripts (optional): If true, will include scripts passed in the html string
- parseHTML: function( data, context, keepScripts ) {
- if ( !data || typeof data !== "string" ) {
- return null;
- }
- if ( typeof context === "boolean" ) {
- keepScripts = context;
- context = false;
- }
- context = context || document;
-
- var parsed = rsingleTag.exec( data ),
- scripts = !keepScripts && [];
-
- // Single tag
- if ( parsed ) {
- return [ context.createElement( parsed[1] ) ];
- }
-
- parsed = jQuery.buildFragment( [ data ], context, scripts );
- if ( scripts ) {
- jQuery( scripts ).remove();
- }
- return jQuery.merge( [], parsed.childNodes );
- },
-
- parseJSON: function( data ) {
- // Attempt to parse using the native JSON parser first
- if ( window.JSON && window.JSON.parse ) {
- return window.JSON.parse( data );
- }
-
- if ( data === null ) {
- return data;
- }
-
- if ( typeof data === "string" ) {
-
- // Make sure leading/trailing whitespace is removed (IE can't handle it)
- data = jQuery.trim( data );
-
- if ( data ) {
- // Make sure the incoming data is actual JSON
- // Logic borrowed from http://json.org/json2.js
- if ( rvalidchars.test( data.replace( rvalidescape, "@" )
- .replace( rvalidtokens, "]" )
- .replace( rvalidbraces, "")) ) {
-
- return ( new Function( "return " + data ) )();
- }
- }
- }
-
- jQuery.error( "Invalid JSON: " + data );
- },
-
- // Cross-browser xml parsing
- parseXML: function( data ) {
- var xml, tmp;
- if ( !data || typeof data !== "string" ) {
- return null;
- }
- try {
- if ( window.DOMParser ) { // Standard
- tmp = new DOMParser();
- xml = tmp.parseFromString( data , "text/xml" );
- } else { // IE
- xml = new ActiveXObject( "Microsoft.XMLDOM" );
- xml.async = "false";
- xml.loadXML( data );
- }
- } catch( e ) {
- xml = undefined;
- }
- if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
- jQuery.error( "Invalid XML: " + data );
- }
- return xml;
- },
-
- noop: function() {},
-
- // Evaluates a script in a global context
- // Workarounds based on findings by Jim Driscoll
- // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
- globalEval: function( data ) {
- if ( data && jQuery.trim( data ) ) {
- // We use execScript on Internet Explorer
- // We use an anonymous function so that context is window
- // rather than jQuery in Firefox
- ( window.execScript || function( data ) {
- window[ "eval" ].call( window, data );
- } )( data );
- }
- },
-
- // Convert dashed to camelCase; used by the css and data modules
- // Microsoft forgot to hump their vendor prefix (#9572)
- camelCase: function( string ) {
- return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
- },
-
- nodeName: function( elem, name ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
- },
-
- // args is for internal usage only
- each: function( obj, callback, args ) {
- var value,
- i = 0,
- length = obj.length,
- isArray = isArraylike( obj );
-
- if ( args ) {
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback.apply( obj[ i ], args );
-
- if ( value === false ) {
- break;
- }
- }
- } else {
- for ( i in obj ) {
- value = callback.apply( obj[ i ], args );
-
- if ( value === false ) {
- break;
- }
- }
- }
-
- // A special, fast, case for the most common use of each
- } else {
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback.call( obj[ i ], i, obj[ i ] );
-
- if ( value === false ) {
- break;
- }
- }
- } else {
- for ( i in obj ) {
- value = callback.call( obj[ i ], i, obj[ i ] );
-
- if ( value === false ) {
- break;
- }
- }
- }
- }
-
- return obj;
- },
-
- // Use native String.trim function wherever possible
- trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
- function( text ) {
- return text == null ?
- "" :
- core_trim.call( text );
- } :
-
- // Otherwise use our own trimming functionality
- function( text ) {
- return text == null ?
- "" :
- ( text + "" ).replace( rtrim, "" );
- },
-
- // results is for internal usage only
- makeArray: function( arr, results ) {
- var ret = results || [];
-
- if ( arr != null ) {
- if ( isArraylike( Object(arr) ) ) {
- jQuery.merge( ret,
- typeof arr === "string" ?
- [ arr ] : arr
- );
- } else {
- core_push.call( ret, arr );
- }
- }
-
- return ret;
- },
-
- inArray: function( elem, arr, i ) {
- var len;
-
- if ( arr ) {
- if ( core_indexOf ) {
- return core_indexOf.call( arr, elem, i );
- }
-
- len = arr.length;
- i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
-
- for ( ; i < len; i++ ) {
- // Skip accessing in sparse arrays
- if ( i in arr && arr[ i ] === elem ) {
- return i;
- }
- }
- }
-
- return -1;
- },
-
- merge: function( first, second ) {
- var l = second.length,
- i = first.length,
- j = 0;
-
- if ( typeof l === "number" ) {
- for ( ; j < l; j++ ) {
- first[ i++ ] = second[ j ];
- }
- } else {
- while ( second[j] !== undefined ) {
- first[ i++ ] = second[ j++ ];
- }
- }
-
- first.length = i;
-
- return first;
- },
-
- grep: function( elems, callback, inv ) {
- var retVal,
- ret = [],
- i = 0,
- length = elems.length;
- inv = !!inv;
-
- // Go through the array, only saving the items
- // that pass the validator function
- for ( ; i < length; i++ ) {
- retVal = !!callback( elems[ i ], i );
- if ( inv !== retVal ) {
- ret.push( elems[ i ] );
- }
- }
-
- return ret;
- },
-
- // arg is for internal usage only
- map: function( elems, callback, arg ) {
- var value,
- i = 0,
- length = elems.length,
- isArray = isArraylike( elems ),
- ret = [];
-
- // Go through the array, translating each of the items to their
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
-
- // Go through every key on the object,
- } else {
- for ( i in elems ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
- }
-
- // Flatten any nested arrays
- return core_concat.apply( [], ret );
- },
-
- // A global GUID counter for objects
- guid: 1,
-
- // Bind a function to a context, optionally partially applying any
- // arguments.
- proxy: function( fn, context ) {
- var args, proxy, tmp;
-
- if ( typeof context === "string" ) {
- tmp = fn[ context ];
- context = fn;
- fn = tmp;
- }
-
- // Quick check to determine if target is callable, in the spec
- // this throws a TypeError, but we will just return undefined.
- if ( !jQuery.isFunction( fn ) ) {
- return undefined;
- }
-
- // Simulated bind
- args = core_slice.call( arguments, 2 );
- proxy = function() {
- return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );
- };
-
- // Set the guid of unique handler to the same of original handler, so it can be removed
- proxy.guid = fn.guid = fn.guid || jQuery.guid++;
-
- return proxy;
- },
-
- // Multifunctional method to get and set values of a collection
- // The value/s can optionally be executed if it's a function
- access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
- var i = 0,
- length = elems.length,
- bulk = key == null;
-
- // Sets many values
- if ( jQuery.type( key ) === "object" ) {
- chainable = true;
- for ( i in key ) {
- jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
- }
-
- // Sets one value
- } else if ( value !== undefined ) {
- chainable = true;
-
- if ( !jQuery.isFunction( value ) ) {
- raw = true;
- }
-
- if ( bulk ) {
- // Bulk operations run against the entire set
- if ( raw ) {
- fn.call( elems, value );
- fn = null;
-
- // ...except when executing function values
- } else {
- bulk = fn;
- fn = function( elem, key, value ) {
- return bulk.call( jQuery( elem ), value );
- };
- }
- }
-
- if ( fn ) {
- for ( ; i < length; i++ ) {
- fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
- }
- }
- }
-
- return chainable ?
- elems :
-
- // Gets
- bulk ?
- fn.call( elems ) :
- length ? fn( elems[0], key ) : emptyGet;
- },
-
- now: function() {
- return ( new Date() ).getTime();
- },
-
- // A method for quickly swapping in/out CSS properties to get correct calculations.
- // Note: this method belongs to the css module but it's needed here for the support module.
- // If support gets modularized, this method should be moved back to the css module.
- swap: function( elem, options, callback, args ) {
- var ret, name,
- old = {};
-
- // Remember the old values, and insert the new ones
- for ( name in options ) {
- old[ name ] = elem.style[ name ];
- elem.style[ name ] = options[ name ];
- }
-
- ret = callback.apply( elem, args || [] );
-
- // Revert the old values
- for ( name in options ) {
- elem.style[ name ] = old[ name ];
- }
-
- return ret;
- }
-});
-
-jQuery.ready.promise = function( obj ) {
- if ( !readyList ) {
-
- readyList = jQuery.Deferred();
-
- // Catch cases where $(document).ready() is called after the browser event has already occurred.
- // we once tried to use readyState "interactive" here, but it caused issues like the one
- // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
- if ( document.readyState === "complete" ) {
- // Handle it asynchronously to allow scripts the opportunity to delay ready
- setTimeout( jQuery.ready );
-
- // Standards-based browsers support DOMContentLoaded
- } else if ( document.addEventListener ) {
- // Use the handy event callback
- document.addEventListener( "DOMContentLoaded", completed, false );
-
- // A fallback to window.onload, that will always work
- window.addEventListener( "load", completed, false );
-
- // If IE event model is used
- } else {
- // Ensure firing before onload, maybe late but safe also for iframes
- document.attachEvent( "onreadystatechange", completed );
-
- // A fallback to window.onload, that will always work
- window.attachEvent( "onload", completed );
-
- // If IE and not a frame
- // continually check to see if the document is ready
- var top = false;
-
- try {
- top = window.frameElement == null && document.documentElement;
- } catch(e) {}
-
- if ( top && top.doScroll ) {
- (function doScrollCheck() {
- if ( !jQuery.isReady ) {
-
- try {
- // Use the trick by Diego Perini
- // http://javascript.nwbox.com/IEContentLoaded/
- top.doScroll("left");
- } catch(e) {
- return setTimeout( doScrollCheck, 50 );
- }
-
- // detach all dom ready events
- detach();
-
- // and execute any waiting functions
- jQuery.ready();
- }
- })();
- }
- }
- }
- return readyList.promise( obj );
-};
-
-// Populate the class2type map
-jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
- class2type[ "[object " + name + "]" ] = name.toLowerCase();
-});
-
-function isArraylike( obj ) {
- var length = obj.length,
- type = jQuery.type( obj );
-
- if ( jQuery.isWindow( obj ) ) {
- return false;
- }
-
- if ( obj.nodeType === 1 && length ) {
- return true;
- }
-
- return type === "array" || type !== "function" &&
- ( length === 0 ||
- typeof length === "number" && length > 0 && ( length - 1 ) in obj );
-}
-
-// All jQuery objects should point back to these
-rootjQuery = jQuery(document);
-/*!
- * Sizzle CSS Selector Engine v1.10.2
- * http://sizzlejs.com/
- *
- * Copyright 2013 jQuery Foundation, Inc. and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: 2013-07-03
- */
-(function( window, undefined ) {
-
-var i,
- support,
- cachedruns,
- Expr,
- getText,
- isXML,
- compile,
- outermostContext,
- sortInput,
-
- // Local document vars
- setDocument,
- document,
- docElem,
- documentIsHTML,
- rbuggyQSA,
- rbuggyMatches,
- matches,
- contains,
-
- // Instance-specific data
- expando = "sizzle" + -(new Date()),
- preferredDoc = window.document,
- dirruns = 0,
- done = 0,
- classCache = createCache(),
- tokenCache = createCache(),
- compilerCache = createCache(),
- hasDuplicate = false,
- sortOrder = function( a, b ) {
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
- return 0;
- },
-
- // General-purpose constants
- strundefined = typeof undefined,
- MAX_NEGATIVE = 1 << 31,
-
- // Instance methods
- hasOwn = ({}).hasOwnProperty,
- arr = [],
- pop = arr.pop,
- push_native = arr.push,
- push = arr.push,
- slice = arr.slice,
- // Use a stripped-down indexOf if we can't use a native one
- indexOf = arr.indexOf || function( elem ) {
- var i = 0,
- len = this.length;
- for ( ; i < len; i++ ) {
- if ( this[i] === elem ) {
- return i;
- }
- }
- return -1;
- },
-
- booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
-
- // Regular expressions
-
- // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
- whitespace = "[\\x20\\t\\r\\n\\f]",
- // http://www.w3.org/TR/css3-syntax/#characters
- characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
-
- // Loosely modeled on CSS identifier characters
- // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
- // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
- identifier = characterEncoding.replace( "w", "w#" ),
-
- // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
- attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
- "*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
-
- // Prefer arguments quoted,
- // then not containing pseudos/brackets,
- // then attribute selectors/non-parenthetical expressions,
- // then anything else
- // These preferences are here to reduce the number of selectors
- // needing tokenize in the PSEUDO preFilter
- pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)",
-
- // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
- rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
-
- rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
- rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
-
- rsibling = new RegExp( whitespace + "*[+~]" ),
- rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ),
-
- rpseudo = new RegExp( pseudos ),
- ridentifier = new RegExp( "^" + identifier + "$" ),
-
- matchExpr = {
- "ID": new RegExp( "^#(" + characterEncoding + ")" ),
- "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
- "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
- "ATTR": new RegExp( "^" + attributes ),
- "PSEUDO": new RegExp( "^" + pseudos ),
- "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
- "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
- "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
- "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
- // For use in libraries implementing .is()
- // We use this for POS matching in `select`
- "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
- whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
- },
-
- rnative = /^[^{]+\{\s*\[native \w/,
-
- // Easily-parseable/retrievable ID or TAG or CLASS selectors
- rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
-
- rinputs = /^(?:input|select|textarea|button)$/i,
- rheader = /^h\d$/i,
-
- rescape = /'|\\/g,
-
- // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
- runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
- funescape = function( _, escaped, escapedWhitespace ) {
- var high = "0x" + escaped - 0x10000;
- // NaN means non-codepoint
- // Support: Firefox
- // Workaround erroneous numeric interpretation of +"0x"
- return high !== high || escapedWhitespace ?
- escaped :
- // BMP codepoint
- high < 0 ?
- String.fromCharCode( high + 0x10000 ) :
- // Supplemental Plane codepoint (surrogate pair)
- String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
- };
-
-// Optimize for push.apply( _, NodeList )
-try {
- push.apply(
- (arr = slice.call( preferredDoc.childNodes )),
- preferredDoc.childNodes
- );
- // Support: Android<4.0
- // Detect silently failing push.apply
- arr[ preferredDoc.childNodes.length ].nodeType;
-} catch ( e ) {
- push = { apply: arr.length ?
-
- // Leverage slice if possible
- function( target, els ) {
- push_native.apply( target, slice.call(els) );
- } :
-
- // Support: IE<9
- // Otherwise append directly
- function( target, els ) {
- var j = target.length,
- i = 0;
- // Can't trust NodeList.length
- while ( (target[j++] = els[i++]) ) {}
- target.length = j - 1;
- }
- };
-}
-
-function Sizzle( selector, context, results, seed ) {
- var match, elem, m, nodeType,
- // QSA vars
- i, groups, old, nid, newContext, newSelector;
-
- if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
- setDocument( context );
- }
-
- context = context || document;
- results = results || [];
-
- if ( !selector || typeof selector !== "string" ) {
- return results;
- }
-
- if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
- return [];
- }
-
- if ( documentIsHTML && !seed ) {
-
- // Shortcuts
- if ( (match = rquickExpr.exec( selector )) ) {
- // Speed-up: Sizzle("#ID")
- if ( (m = match[1]) ) {
- if ( nodeType === 9 ) {
- elem = context.getElementById( m );
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- if ( elem && elem.parentNode ) {
- // Handle the case where IE, Opera, and Webkit return items
- // by name instead of ID
- if ( elem.id === m ) {
- results.push( elem );
- return results;
- }
- } else {
- return results;
- }
- } else {
- // Context is not a document
- if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
- contains( context, elem ) && elem.id === m ) {
- results.push( elem );
- return results;
- }
- }
-
- // Speed-up: Sizzle("TAG")
- } else if ( match[2] ) {
- push.apply( results, context.getElementsByTagName( selector ) );
- return results;
-
- // Speed-up: Sizzle(".CLASS")
- } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {
- push.apply( results, context.getElementsByClassName( m ) );
- return results;
- }
- }
-
- // QSA path
- if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
- nid = old = expando;
- newContext = context;
- newSelector = nodeType === 9 && selector;
-
- // qSA works strangely on Element-rooted queries
- // We can work around this by specifying an extra ID on the root
- // and working up from there (Thanks to Andrew Dupont for the technique)
- // IE 8 doesn't work on object elements
- if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
- groups = tokenize( selector );
-
- if ( (old = context.getAttribute("id")) ) {
- nid = old.replace( rescape, "\\$&" );
- } else {
- context.setAttribute( "id", nid );
- }
- nid = "[id='" + nid + "'] ";
-
- i = groups.length;
- while ( i-- ) {
- groups[i] = nid + toSelector( groups[i] );
- }
- newContext = rsibling.test( selector ) && context.parentNode || context;
- newSelector = groups.join(",");
- }
-
- if ( newSelector ) {
- try {
- push.apply( results,
- newContext.querySelectorAll( newSelector )
- );
- return results;
- } catch(qsaError) {
- } finally {
- if ( !old ) {
- context.removeAttribute("id");
- }
- }
- }
- }
- }
-
- // All others
- return select( selector.replace( rtrim, "$1" ), context, results, seed );
-}
-
-/**
- * Create key-value caches of limited size
- * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
- * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
- * deleting the oldest entry
- */
-function createCache() {
- var keys = [];
-
- function cache( key, value ) {
- // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
- if ( keys.push( key += " " ) > Expr.cacheLength ) {
- // Only keep the most recent entries
- delete cache[ keys.shift() ];
- }
- return (cache[ key ] = value);
- }
- return cache;
-}
-
-/**
- * Mark a function for special use by Sizzle
- * @param {Function} fn The function to mark
- */
-function markFunction( fn ) {
- fn[ expando ] = true;
- return fn;
-}
-
-/**
- * Support testing using an element
- * @param {Function} fn Passed the created div and expects a boolean result
- */
-function assert( fn ) {
- var div = document.createElement("div");
-
- try {
- return !!fn( div );
- } catch (e) {
- return false;
- } finally {
- // Remove from its parent by default
- if ( div.parentNode ) {
- div.parentNode.removeChild( div );
- }
- // release memory in IE
- div = null;
- }
-}
-
-/**
- * Adds the same handler for all of the specified attrs
- * @param {String} attrs Pipe-separated list of attributes
- * @param {Function} handler The method that will be applied
- */
-function addHandle( attrs, handler ) {
- var arr = attrs.split("|"),
- i = attrs.length;
-
- while ( i-- ) {
- Expr.attrHandle[ arr[i] ] = handler;
- }
-}
-
-/**
- * Checks document order of two siblings
- * @param {Element} a
- * @param {Element} b
- * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
- */
-function siblingCheck( a, b ) {
- var cur = b && a,
- diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
- ( ~b.sourceIndex || MAX_NEGATIVE ) -
- ( ~a.sourceIndex || MAX_NEGATIVE );
-
- // Use IE sourceIndex if available on both nodes
- if ( diff ) {
- return diff;
- }
-
- // Check if b follows a
- if ( cur ) {
- while ( (cur = cur.nextSibling) ) {
- if ( cur === b ) {
- return -1;
- }
- }
- }
-
- return a ? 1 : -1;
-}
-
-/**
- * Returns a function to use in pseudos for input types
- * @param {String} type
- */
-function createInputPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === type;
- };
-}
-
-/**
- * Returns a function to use in pseudos for buttons
- * @param {String} type
- */
-function createButtonPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return (name === "input" || name === "button") && elem.type === type;
- };
-}
-
-/**
- * Returns a function to use in pseudos for positionals
- * @param {Function} fn
- */
-function createPositionalPseudo( fn ) {
- return markFunction(function( argument ) {
- argument = +argument;
- return markFunction(function( seed, matches ) {
- var j,
- matchIndexes = fn( [], seed.length, argument ),
- i = matchIndexes.length;
-
- // Match elements found at the specified indexes
- while ( i-- ) {
- if ( seed[ (j = matchIndexes[i]) ] ) {
- seed[j] = !(matches[j] = seed[j]);
- }
- }
- });
- });
-}
-
-/**
- * Detect xml
- * @param {Element|Object} elem An element or a document
- */
-isXML = Sizzle.isXML = function( elem ) {
- // documentElement is verified for cases where it doesn't yet exist
- // (such as loading iframes in IE - #4833)
- var documentElement = elem && (elem.ownerDocument || elem).documentElement;
- return documentElement ? documentElement.nodeName !== "HTML" : false;
-};
-
-// Expose support vars for convenience
-support = Sizzle.support = {};
-
-/**
- * Sets document-related variables once based on the current document
- * @param {Element|Object} [doc] An element or document object to use to set the document
- * @returns {Object} Returns the current document
- */
-setDocument = Sizzle.setDocument = function( node ) {
- var doc = node ? node.ownerDocument || node : preferredDoc,
- parent = doc.defaultView;
-
- // If no document and documentElement is available, return
- if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
- return document;
- }
-
- // Set our document
- document = doc;
- docElem = doc.documentElement;
-
- // Support tests
- documentIsHTML = !isXML( doc );
-
- // Support: IE>8
- // If iframe document is assigned to "document" variable and if iframe has been reloaded,
- // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
- // IE6-8 do not support the defaultView property so parent will be undefined
- if ( parent && parent.attachEvent && parent !== parent.top ) {
- parent.attachEvent( "onbeforeunload", function() {
- setDocument();
- });
- }
-
- /* Attributes
- ---------------------------------------------------------------------- */
-
- // Support: IE<8
- // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
- support.attributes = assert(function( div ) {
- div.className = "i";
- return !div.getAttribute("className");
- });
-
- /* getElement(s)By*
- ---------------------------------------------------------------------- */
-
- // Check if getElementsByTagName("*") returns only elements
- support.getElementsByTagName = assert(function( div ) {
- div.appendChild( doc.createComment("") );
- return !div.getElementsByTagName("*").length;
- });
-
- // Check if getElementsByClassName can be trusted
- support.getElementsByClassName = assert(function( div ) {
- div.innerHTML = "<div class='a'></div><div class='a i'></div>";
-
- // Support: Safari<4
- // Catch class over-caching
- div.firstChild.className = "i";
- // Support: Opera<10
- // Catch gEBCN failure to find non-leading classes
- return div.getElementsByClassName("i").length === 2;
- });
-
- // Support: IE<10
- // Check if getElementById returns elements by name
- // The broken getElementById methods don't pick up programatically-set names,
- // so use a roundabout getElementsByName test
- support.getById = assert(function( div ) {
- docElem.appendChild( div ).id = expando;
- return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
- });
-
- // ID find and filter
- if ( support.getById ) {
- Expr.find["ID"] = function( id, context ) {
- if ( typeof context.getElementById !== strundefined && documentIsHTML ) {
- var m = context.getElementById( id );
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- return m && m.parentNode ? [m] : [];
- }
- };
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- return elem.getAttribute("id") === attrId;
- };
- };
- } else {
- // Support: IE6/7
- // getElementById is not reliable as a find shortcut
- delete Expr.find["ID"];
-
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
- return node && node.value === attrId;
- };
- };
- }
-
- // Tag
- Expr.find["TAG"] = support.getElementsByTagName ?
- function( tag, context ) {
- if ( typeof context.getElementsByTagName !== strundefined ) {
- return context.getElementsByTagName( tag );
- }
- } :
- function( tag, context ) {
- var elem,
- tmp = [],
- i = 0,
- results = context.getElementsByTagName( tag );
-
- // Filter out possible comments
- if ( tag === "*" ) {
- while ( (elem = results[i++]) ) {
- if ( elem.nodeType === 1 ) {
- tmp.push( elem );
- }
- }
-
- return tmp;
- }
- return results;
- };
-
- // Class
- Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
- if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {
- return context.getElementsByClassName( className );
- }
- };
-
- /* QSA/matchesSelector
- ---------------------------------------------------------------------- */
-
- // QSA and matchesSelector support
-
- // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
- rbuggyMatches = [];
-
- // qSa(:focus) reports false when true (Chrome 21)
- // We allow this because of a bug in IE8/9 that throws an error
- // whenever `document.activeElement` is accessed on an iframe
- // So, we allow :focus to pass through QSA all the time to avoid the IE error
- // See http://bugs.jquery.com/ticket/13378
- rbuggyQSA = [];
-
- if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
- // Build QSA regex
- // Regex strategy adopted from Diego Perini
- assert(function( div ) {
- // Select is set to empty string on purpose
- // This is to test IE's treatment of not explicitly
- // setting a boolean content attribute,
- // since its presence should be enough
- // http://bugs.jquery.com/ticket/12359
- div.innerHTML = "<select><option selected=''></option></select>";
-
- // Support: IE8
- // Boolean attributes and "value" are not treated correctly
- if ( !div.querySelectorAll("[selected]").length ) {
- rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
- }
-
- // Webkit/Opera - :checked should return selected option elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":checked").length ) {
- rbuggyQSA.push(":checked");
- }
- });
-
- assert(function( div ) {
-
- // Support: Opera 10-12/IE8
- // ^= $= *= and empty values
- // Should not select anything
- // Support: Windows 8 Native Apps
- // The type attribute is restricted during .innerHTML assignment
- var input = doc.createElement("input");
- input.setAttribute( "type", "hidden" );
- div.appendChild( input ).setAttribute( "t", "" );
-
- if ( div.querySelectorAll("[t^='']").length ) {
- rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
- }
-
- // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":enabled").length ) {
- rbuggyQSA.push( ":enabled", ":disabled" );
- }
-
- // Opera 10-11 does not throw on post-comma invalid pseudos
- div.querySelectorAll("*,:x");
- rbuggyQSA.push(",.*:");
- });
- }
-
- if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector ||
- docElem.mozMatchesSelector ||
- docElem.oMatchesSelector ||
- docElem.msMatchesSelector) )) ) {
-
- assert(function( div ) {
- // Check to see if it's possible to do matchesSelector
- // on a disconnected node (IE 9)
- support.disconnectedMatch = matches.call( div, "div" );
-
- // This should fail with an exception
- // Gecko does not error, returns false instead
- matches.call( div, "[s!='']:x" );
- rbuggyMatches.push( "!=", pseudos );
- });
- }
-
- rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
- rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
-
- /* Contains
- ---------------------------------------------------------------------- */
-
- // Element contains another
- // Purposefully does not implement inclusive descendent
- // As in, an element does not contain itself
- contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ?
- function( a, b ) {
- var adown = a.nodeType === 9 ? a.documentElement : a,
- bup = b && b.parentNode;
- return a === bup || !!( bup && bup.nodeType === 1 && (
- adown.contains ?
- adown.contains( bup ) :
- a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
- ));
- } :
- function( a, b ) {
- if ( b ) {
- while ( (b = b.parentNode) ) {
- if ( b === a ) {
- return true;
- }
- }
- }
- return false;
- };
-
- /* Sorting
- ---------------------------------------------------------------------- */
-
- // Document order sorting
- sortOrder = docElem.compareDocumentPosition ?
- function( a, b ) {
-
- // Flag for duplicate removal
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
-
- var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );
-
- if ( compare ) {
- // Disconnected nodes
- if ( compare & 1 ||
- (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
-
- // Choose the first element that is related to our preferred document
- if ( a === doc || contains(preferredDoc, a) ) {
- return -1;
- }
- if ( b === doc || contains(preferredDoc, b) ) {
- return 1;
- }
-
- // Maintain original order
- return sortInput ?
- ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
- 0;
- }
-
- return compare & 4 ? -1 : 1;
- }
-
- // Not directly comparable, sort on existence of method
- return a.compareDocumentPosition ? -1 : 1;
- } :
- function( a, b ) {
- var cur,
- i = 0,
- aup = a.parentNode,
- bup = b.parentNode,
- ap = [ a ],
- bp = [ b ];
-
- // Exit early if the nodes are identical
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
-
- // Parentless nodes are either documents or disconnected
- } else if ( !aup || !bup ) {
- return a === doc ? -1 :
- b === doc ? 1 :
- aup ? -1 :
- bup ? 1 :
- sortInput ?
- ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
- 0;
-
- // If the nodes are siblings, we can do a quick check
- } else if ( aup === bup ) {
- return siblingCheck( a, b );
- }
-
- // Otherwise we need full lists of their ancestors for comparison
- cur = a;
- while ( (cur = cur.parentNode) ) {
- ap.unshift( cur );
- }
- cur = b;
- while ( (cur = cur.parentNode) ) {
- bp.unshift( cur );
- }
-
- // Walk down the tree looking for a discrepancy
- while ( ap[i] === bp[i] ) {
- i++;
- }
-
- return i ?
- // Do a sibling check if the nodes have a common ancestor
- siblingCheck( ap[i], bp[i] ) :
-
- // Otherwise nodes in our document sort first
- ap[i] === preferredDoc ? -1 :
- bp[i] === preferredDoc ? 1 :
- 0;
- };
-
- return doc;
-};
-
-Sizzle.matches = function( expr, elements ) {
- return Sizzle( expr, null, null, elements );
-};
-
-Sizzle.matchesSelector = function( elem, expr ) {
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- // Make sure that attribute selectors are quoted
- expr = expr.replace( rattributeQuotes, "='$1']" );
-
- if ( support.matchesSelector && documentIsHTML &&
- ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
- ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
-
- try {
- var ret = matches.call( elem, expr );
-
- // IE 9's matchesSelector returns false on disconnected nodes
- if ( ret || support.disconnectedMatch ||
- // As well, disconnected nodes are said to be in a document
- // fragment in IE 9
- elem.document && elem.document.nodeType !== 11 ) {
- return ret;
- }
- } catch(e) {}
- }
-
- return Sizzle( expr, document, null, [elem] ).length > 0;
-};
-
-Sizzle.contains = function( context, elem ) {
- // Set document vars if needed
- if ( ( context.ownerDocument || context ) !== document ) {
- setDocument( context );
- }
- return contains( context, elem );
-};
-
-Sizzle.attr = function( elem, name ) {
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- var fn = Expr.attrHandle[ name.toLowerCase() ],
- // Don't get fooled by Object.prototype properties (jQuery #13807)
- val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
- fn( elem, name, !documentIsHTML ) :
- undefined;
-
- return val === undefined ?
- support.attributes || !documentIsHTML ?
- elem.getAttribute( name ) :
- (val = elem.getAttributeNode(name)) && val.specified ?
- val.value :
- null :
- val;
-};
-
-Sizzle.error = function( msg ) {
- throw new Error( "Syntax error, unrecognized expression: " + msg );
-};
-
-/**
- * Document sorting and removing duplicates
- * @param {ArrayLike} results
- */
-Sizzle.uniqueSort = function( results ) {
- var elem,
- duplicates = [],
- j = 0,
- i = 0;
-
- // Unless we *know* we can detect duplicates, assume their presence
- hasDuplicate = !support.detectDuplicates;
- sortInput = !support.sortStable && results.slice( 0 );
- results.sort( sortOrder );
-
- if ( hasDuplicate ) {
- while ( (elem = results[i++]) ) {
- if ( elem === results[ i ] ) {
- j = duplicates.push( i );
- }
- }
- while ( j-- ) {
- results.splice( duplicates[ j ], 1 );
- }
- }
-
- return results;
-};
-
-/**
- * Utility function for retrieving the text value of an array of DOM nodes
- * @param {Array|Element} elem
- */
-getText = Sizzle.getText = function( elem ) {
- var node,
- ret = "",
- i = 0,
- nodeType = elem.nodeType;
-
- if ( !nodeType ) {
- // If no nodeType, this is expected to be an array
- for ( ; (node = elem[i]); i++ ) {
- // Do not traverse comment nodes
- ret += getText( node );
- }
- } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
- // Use textContent for elements
- // innerText usage removed for consistency of new lines (see #11153)
- if ( typeof elem.textContent === "string" ) {
- return elem.textContent;
- } else {
- // Traverse its children
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- ret += getText( elem );
- }
- }
- } else if ( nodeType === 3 || nodeType === 4 ) {
- return elem.nodeValue;
- }
- // Do not include comment or processing instruction nodes
-
- return ret;
-};
-
-Expr = Sizzle.selectors = {
-
- // Can be adjusted by the user
- cacheLength: 50,
-
- createPseudo: markFunction,
-
- match: matchExpr,
-
- attrHandle: {},
-
- find: {},
-
- relative: {
- ">": { dir: "parentNode", first: true },
- " ": { dir: "parentNode" },
- "+": { dir: "previousSibling", first: true },
- "~": { dir: "previousSibling" }
- },
-
- preFilter: {
- "ATTR": function( match ) {
- match[1] = match[1].replace( runescape, funescape );
-
- // Move the given value to match[3] whether quoted or unquoted
- match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );
-
- if ( match[2] === "~=" ) {
- match[3] = " " + match[3] + " ";
- }
-
- return match.slice( 0, 4 );
- },
-
- "CHILD": function( match ) {
- /* matches from matchExpr["CHILD"]
- 1 type (only|nth|...)
- 2 what (child|of-type)
- 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
- 4 xn-component of xn+y argument ([+-]?\d*n|)
- 5 sign of xn-component
- 6 x of xn-component
- 7 sign of y-component
- 8 y of y-component
- */
- match[1] = match[1].toLowerCase();
-
- if ( match[1].slice( 0, 3 ) === "nth" ) {
- // nth-* requires argument
- if ( !match[3] ) {
- Sizzle.error( match[0] );
- }
-
- // numeric x and y parameters for Expr.filter.CHILD
- // remember that false/true cast respectively to 0/1
- match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
- match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
-
- // other types prohibit arguments
- } else if ( match[3] ) {
- Sizzle.error( match[0] );
- }
-
- return match;
- },
-
- "PSEUDO": function( match ) {
- var excess,
- unquoted = !match[5] && match[2];
-
- if ( matchExpr["CHILD"].test( match[0] ) ) {
- return null;
- }
-
- // Accept quoted arguments as-is
- if ( match[3] && match[4] !== undefined ) {
- match[2] = match[4];
-
- // Strip excess characters from unquoted arguments
- } else if ( unquoted && rpseudo.test( unquoted ) &&
- // Get excess from tokenize (recursively)
- (excess = tokenize( unquoted, true )) &&
- // advance to the next closing parenthesis
- (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
-
- // excess is a negative index
- match[0] = match[0].slice( 0, excess );
- match[2] = unquoted.slice( 0, excess );
- }
-
- // Return only captures needed by the pseudo filter method (type and argument)
- return match.slice( 0, 3 );
- }
- },
-
- filter: {
-
- "TAG": function( nodeNameSelector ) {
- var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
- return nodeNameSelector === "*" ?
- function() { return true; } :
- function( elem ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
- };
- },
-
- "CLASS": function( className ) {
- var pattern = classCache[ className + " " ];
-
- return pattern ||
- (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
- classCache( className, function( elem ) {
- return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" );
- });
- },
-
- "ATTR": function( name, operator, check ) {
- return function( elem ) {
- var result = Sizzle.attr( elem, name );
-
- if ( result == null ) {
- return operator === "!=";
- }
- if ( !operator ) {
- return true;
- }
-
- result += "";
-
- return operator === "=" ? result === check :
- operator === "!=" ? result !== check :
- operator === "^=" ? check && result.indexOf( check ) === 0 :
- operator === "*=" ? check && result.indexOf( check ) > -1 :
- operator === "$=" ? check && result.slice( -check.length ) === check :
- operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
- operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
- false;
- };
- },
-
- "CHILD": function( type, what, argument, first, last ) {
- var simple = type.slice( 0, 3 ) !== "nth",
- forward = type.slice( -4 ) !== "last",
- ofType = what === "of-type";
-
- return first === 1 && last === 0 ?
-
- // Shortcut for :nth-*(n)
- function( elem ) {
- return !!elem.parentNode;
- } :
-
- function( elem, context, xml ) {
- var cache, outerCache, node, diff, nodeIndex, start,
- dir = simple !== forward ? "nextSibling" : "previousSibling",
- parent = elem.parentNode,
- name = ofType && elem.nodeName.toLowerCase(),
- useCache = !xml && !ofType;
-
- if ( parent ) {
-
- // :(first|last|only)-(child|of-type)
- if ( simple ) {
- while ( dir ) {
- node = elem;
- while ( (node = node[ dir ]) ) {
- if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
- return false;
- }
- }
- // Reverse direction for :only-* (if we haven't yet done so)
- start = dir = type === "only" && !start && "nextSibling";
- }
- return true;
- }
-
- start = [ forward ? parent.firstChild : parent.lastChild ];
-
- // non-xml :nth-child(...) stores cache data on `parent`
- if ( forward && useCache ) {
- // Seek `elem` from a previously-cached index
- outerCache = parent[ expando ] || (parent[ expando ] = {});
- cache = outerCache[ type ] || [];
- nodeIndex = cache[0] === dirruns && cache[1];
- diff = cache[0] === dirruns && cache[2];
- node = nodeIndex && parent.childNodes[ nodeIndex ];
-
- while ( (node = ++nodeIndex && node && node[ dir ] ||
-
- // Fallback to seeking `elem` from the start
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- // When found, cache indexes on `parent` and break
- if ( node.nodeType === 1 && ++diff && node === elem ) {
- outerCache[ type ] = [ dirruns, nodeIndex, diff ];
- break;
- }
- }
-
- // Use previously-cached element index if available
- } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
- diff = cache[1];
-
- // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
- } else {
- // Use the same loop as above to seek `elem` from the start
- while ( (node = ++nodeIndex && node && node[ dir ] ||
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
- // Cache the index of each encountered element
- if ( useCache ) {
- (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
- }
-
- if ( node === elem ) {
- break;
- }
- }
- }
- }
-
- // Incorporate the offset, then check against cycle size
- diff -= last;
- return diff === first || ( diff % first === 0 && diff / first >= 0 );
- }
- };
- },
-
- "PSEUDO": function( pseudo, argument ) {
- // pseudo-class names are case-insensitive
- // http://www.w3.org/TR/selectors/#pseudo-classes
- // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
- // Remember that setFilters inherits from pseudos
- var args,
- fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
- Sizzle.error( "unsupported pseudo: " + pseudo );
-
- // The user may use createPseudo to indicate that
- // arguments are needed to create the filter function
- // just as Sizzle does
- if ( fn[ expando ] ) {
- return fn( argument );
- }
-
- // But maintain support for old signatures
- if ( fn.length > 1 ) {
- args = [ pseudo, pseudo, "", argument ];
- return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
- markFunction(function( seed, matches ) {
- var idx,
- matched = fn( seed, argument ),
- i = matched.length;
- while ( i-- ) {
- idx = indexOf.call( seed, matched[i] );
- seed[ idx ] = !( matches[ idx ] = matched[i] );
- }
- }) :
- function( elem ) {
- return fn( elem, 0, args );
- };
- }
-
- return fn;
- }
- },
-
- pseudos: {
- // Potentially complex pseudos
- "not": markFunction(function( selector ) {
- // Trim the selector passed to compile
- // to avoid treating leading and trailing
- // spaces as combinators
- var input = [],
- results = [],
- matcher = compile( selector.replace( rtrim, "$1" ) );
-
- return matcher[ expando ] ?
- markFunction(function( seed, matches, context, xml ) {
- var elem,
- unmatched = matcher( seed, null, xml, [] ),
- i = seed.length;
-
- // Match elements unmatched by `matcher`
- while ( i-- ) {
- if ( (elem = unmatched[i]) ) {
- seed[i] = !(matches[i] = elem);
- }
- }
- }) :
- function( elem, context, xml ) {
- input[0] = elem;
- matcher( input, null, xml, results );
- return !results.pop();
- };
- }),
-
- "has": markFunction(function( selector ) {
- return function( elem ) {
- return Sizzle( selector, elem ).length > 0;
- };
- }),
-
- "contains": markFunction(function( text ) {
- return function( elem ) {
- return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
- };
- }),
-
- // "Whether an element is represented by a :lang() selector
- // is based solely on the element's language value
- // being equal to the identifier C,
- // or beginning with the identifier C immediately followed by "-".
- // The matching of C against the element's language value is performed case-insensitively.
- // The identifier C does not have to be a valid language name."
- // http://www.w3.org/TR/selectors/#lang-pseudo
- "lang": markFunction( function( lang ) {
- // lang value must be a valid identifier
- if ( !ridentifier.test(lang || "") ) {
- Sizzle.error( "unsupported lang: " + lang );
- }
- lang = lang.replace( runescape, funescape ).toLowerCase();
- return function( elem ) {
- var elemLang;
- do {
- if ( (elemLang = documentIsHTML ?
- elem.lang :
- elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
-
- elemLang = elemLang.toLowerCase();
- return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
- }
- } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
- return false;
- };
- }),
-
- // Miscellaneous
- "target": function( elem ) {
- var hash = window.location && window.location.hash;
- return hash && hash.slice( 1 ) === elem.id;
- },
-
- "root": function( elem ) {
- return elem === docElem;
- },
-
- "focus": function( elem ) {
- return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
- },
-
- // Boolean properties
- "enabled": function( elem ) {
- return elem.disabled === false;
- },
-
- "disabled": function( elem ) {
- return elem.disabled === true;
- },
-
- "checked": function( elem ) {
- // In CSS3, :checked should return both checked and selected elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- var nodeName = elem.nodeName.toLowerCase();
- return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
- },
-
- "selected": function( elem ) {
- // Accessing this property makes selected-by-default
- // options in Safari work properly
- if ( elem.parentNode ) {
- elem.parentNode.selectedIndex;
- }
-
- return elem.selected === true;
- },
-
- // Contents
- "empty": function( elem ) {
- // http://www.w3.org/TR/selectors/#empty-pseudo
- // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
- // not comment, processing instructions, or others
- // Thanks to Diego Perini for the nodeName shortcut
- // Greater than "@" means alpha characters (specifically not starting with "#" or "?")
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) {
- return false;
- }
- }
- return true;
- },
-
- "parent": function( elem ) {
- return !Expr.pseudos["empty"]( elem );
- },
-
- // Element/input types
- "header": function( elem ) {
- return rheader.test( elem.nodeName );
- },
-
- "input": function( elem ) {
- return rinputs.test( elem.nodeName );
- },
-
- "button": function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === "button" || name === "button";
- },
-
- "text": function( elem ) {
- var attr;
- // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
- // use getAttribute instead to test this case
- return elem.nodeName.toLowerCase() === "input" &&
- elem.type === "text" &&
- ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type );
- },
-
- // Position-in-collection
- "first": createPositionalPseudo(function() {
- return [ 0 ];
- }),
-
- "last": createPositionalPseudo(function( matchIndexes, length ) {
- return [ length - 1 ];
- }),
-
- "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
- return [ argument < 0 ? argument + length : argument ];
- }),
-
- "even": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 0;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "odd": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 1;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; --i >= 0; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; ++i < length; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- })
- }
-};
-
-Expr.pseudos["nth"] = Expr.pseudos["eq"];
-
-// Add button/input type pseudos
-for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
- Expr.pseudos[ i ] = createInputPseudo( i );
-}
-for ( i in { submit: true, reset: true } ) {
- Expr.pseudos[ i ] = createButtonPseudo( i );
-}
-
-// Easy API for creating new setFilters
-function setFilters() {}
-setFilters.prototype = Expr.filters = Expr.pseudos;
-Expr.setFilters = new setFilters();
-
-function tokenize( selector, parseOnly ) {
- var matched, match, tokens, type,
- soFar, groups, preFilters,
- cached = tokenCache[ selector + " " ];
-
- if ( cached ) {
- return parseOnly ? 0 : cached.slice( 0 );
- }
-
- soFar = selector;
- groups = [];
- preFilters = Expr.preFilter;
-
- while ( soFar ) {
-
- // Comma and first run
- if ( !matched || (match = rcomma.exec( soFar )) ) {
- if ( match ) {
- // Don't consume trailing commas as valid
- soFar = soFar.slice( match[0].length ) || soFar;
- }
- groups.push( tokens = [] );
- }
-
- matched = false;
-
- // Combinators
- if ( (match = rcombinators.exec( soFar )) ) {
- matched = match.shift();
- tokens.push({
- value: matched,
- // Cast descendant combinators to space
- type: match[0].replace( rtrim, " " )
- });
- soFar = soFar.slice( matched.length );
- }
-
- // Filters
- for ( type in Expr.filter ) {
- if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
- (match = preFilters[ type ]( match ))) ) {
- matched = match.shift();
- tokens.push({
- value: matched,
- type: type,
- matches: match
- });
- soFar = soFar.slice( matched.length );
- }
- }
-
- if ( !matched ) {
- break;
- }
- }
-
- // Return the length of the invalid excess
- // if we're just parsing
- // Otherwise, throw an error or return tokens
- return parseOnly ?
- soFar.length :
- soFar ?
- Sizzle.error( selector ) :
- // Cache the tokens
- tokenCache( selector, groups ).slice( 0 );
-}
-
-function toSelector( tokens ) {
- var i = 0,
- len = tokens.length,
- selector = "";
- for ( ; i < len; i++ ) {
- selector += tokens[i].value;
- }
- return selector;
-}
-
-function addCombinator( matcher, combinator, base ) {
- var dir = combinator.dir,
- checkNonElements = base && dir === "parentNode",
- doneName = done++;
-
- return combinator.first ?
- // Check against closest ancestor/preceding element
- function( elem, context, xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- return matcher( elem, context, xml );
- }
- }
- } :
-
- // Check against all ancestor/preceding elements
- function( elem, context, xml ) {
- var data, cache, outerCache,
- dirkey = dirruns + " " + doneName;
-
- // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
- if ( xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- if ( matcher( elem, context, xml ) ) {
- return true;
- }
- }
- }
- } else {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- outerCache = elem[ expando ] || (elem[ expando ] = {});
- if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {
- if ( (data = cache[1]) === true || data === cachedruns ) {
- return data === true;
- }
- } else {
- cache = outerCache[ dir ] = [ dirkey ];
- cache[1] = matcher( elem, context, xml ) || cachedruns;
- if ( cache[1] === true ) {
- return true;
- }
- }
- }
- }
- }
- };
-}
-
-function elementMatcher( matchers ) {
- return matchers.length > 1 ?
- function( elem, context, xml ) {
- var i = matchers.length;
- while ( i-- ) {
- if ( !matchers[i]( elem, context, xml ) ) {
- return false;
- }
- }
- return true;
- } :
- matchers[0];
-}
-
-function condense( unmatched, map, filter, context, xml ) {
- var elem,
- newUnmatched = [],
- i = 0,
- len = unmatched.length,
- mapped = map != null;
-
- for ( ; i < len; i++ ) {
- if ( (elem = unmatched[i]) ) {
- if ( !filter || filter( elem, context, xml ) ) {
- newUnmatched.push( elem );
- if ( mapped ) {
- map.push( i );
- }
- }
- }
- }
-
- return newUnmatched;
-}
-
-function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
- if ( postFilter && !postFilter[ expando ] ) {
- postFilter = setMatcher( postFilter );
- }
- if ( postFinder && !postFinder[ expando ] ) {
- postFinder = setMatcher( postFinder, postSelector );
- }
- return markFunction(function( seed, results, context, xml ) {
- var temp, i, elem,
- preMap = [],
- postMap = [],
- preexisting = results.length,
-
- // Get initial elements from seed or context
- elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
-
- // Prefilter to get matcher input, preserving a map for seed-results synchronization
- matcherIn = preFilter && ( seed || !selector ) ?
- condense( elems, preMap, preFilter, context, xml ) :
- elems,
-
- matcherOut = matcher ?
- // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
- postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
-
- // ...intermediate processing is necessary
- [] :
-
- // ...otherwise use results directly
- results :
- matcherIn;
-
- // Find primary matches
- if ( matcher ) {
- matcher( matcherIn, matcherOut, context, xml );
- }
-
- // Apply postFilter
- if ( postFilter ) {
- temp = condense( matcherOut, postMap );
- postFilter( temp, [], context, xml );
-
- // Un-match failing elements by moving them back to matcherIn
- i = temp.length;
- while ( i-- ) {
- if ( (elem = temp[i]) ) {
- matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
- }
- }
- }
-
- if ( seed ) {
- if ( postFinder || preFilter ) {
- if ( postFinder ) {
- // Get the final matcherOut by condensing this intermediate into postFinder contexts
- temp = [];
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) ) {
- // Restore matcherIn since elem is not yet a final match
- temp.push( (matcherIn[i] = elem) );
- }
- }
- postFinder( null, (matcherOut = []), temp, xml );
- }
-
- // Move matched elements from seed to results to keep them synchronized
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) &&
- (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
-
- seed[temp] = !(results[temp] = elem);
- }
- }
- }
-
- // Add elements to results, through postFinder if defined
- } else {
- matcherOut = condense(
- matcherOut === results ?
- matcherOut.splice( preexisting, matcherOut.length ) :
- matcherOut
- );
- if ( postFinder ) {
- postFinder( null, results, matcherOut, xml );
- } else {
- push.apply( results, matcherOut );
- }
- }
- });
-}
-
-function matcherFromTokens( tokens ) {
- var checkContext, matcher, j,
- len = tokens.length,
- leadingRelative = Expr.relative[ tokens[0].type ],
- implicitRelative = leadingRelative || Expr.relative[" "],
- i = leadingRelative ? 1 : 0,
-
- // The foundational matcher ensures that elements are reachable from top-level context(s)
- matchContext = addCombinator( function( elem ) {
- return elem === checkContext;
- }, implicitRelative, true ),
- matchAnyContext = addCombinator( function( elem ) {
- return indexOf.call( checkContext, elem ) > -1;
- }, implicitRelative, true ),
- matchers = [ function( elem, context, xml ) {
- return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
- (checkContext = context).nodeType ?
- matchContext( elem, context, xml ) :
- matchAnyContext( elem, context, xml ) );
- } ];
-
- for ( ; i < len; i++ ) {
- if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
- matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
- } else {
- matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
-
- // Return special upon seeing a positional matcher
- if ( matcher[ expando ] ) {
- // Find the next relative operator (if any) for proper handling
- j = ++i;
- for ( ; j < len; j++ ) {
- if ( Expr.relative[ tokens[j].type ] ) {
- break;
- }
- }
- return setMatcher(
- i > 1 && elementMatcher( matchers ),
- i > 1 && toSelector(
- // If the preceding token was a descendant combinator, insert an implicit any-element `*`
- tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
- ).replace( rtrim, "$1" ),
- matcher,
- i < j && matcherFromTokens( tokens.slice( i, j ) ),
- j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
- j < len && toSelector( tokens )
- );
- }
- matchers.push( matcher );
- }
- }
-
- return elementMatcher( matchers );
-}
-
-function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
- // A counter to specify which element is currently being matched
- var matcherCachedRuns = 0,
- bySet = setMatchers.length > 0,
- byElement = elementMatchers.length > 0,
- superMatcher = function( seed, context, xml, results, expandContext ) {
- var elem, j, matcher,
- setMatched = [],
- matchedCount = 0,
- i = "0",
- unmatched = seed && [],
- outermost = expandContext != null,
- contextBackup = outermostContext,
- // We must always have either seed elements or context
- elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
- // Use integer dirruns iff this is the outermost matcher
- dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);
-
- if ( outermost ) {
- outermostContext = context !== document && context;
- cachedruns = matcherCachedRuns;
- }
-
- // Add elements passing elementMatchers directly to results
- // Keep `i` a string if there are no elements so `matchedCount` will be "00" below
- for ( ; (elem = elems[i]) != null; i++ ) {
- if ( byElement && elem ) {
- j = 0;
- while ( (matcher = elementMatchers[j++]) ) {
- if ( matcher( elem, context, xml ) ) {
- results.push( elem );
- break;
- }
- }
- if ( outermost ) {
- dirruns = dirrunsUnique;
- cachedruns = ++matcherCachedRuns;
- }
- }
-
- // Track unmatched elements for set filters
- if ( bySet ) {
- // They will have gone through all possible matchers
- if ( (elem = !matcher && elem) ) {
- matchedCount--;
- }
-
- // Lengthen the array for every element, matched or not
- if ( seed ) {
- unmatched.push( elem );
- }
- }
- }
-
- // Apply set filters to unmatched elements
- matchedCount += i;
- if ( bySet && i !== matchedCount ) {
- j = 0;
- while ( (matcher = setMatchers[j++]) ) {
- matcher( unmatched, setMatched, context, xml );
- }
-
- if ( seed ) {
- // Reintegrate element matches to eliminate the need for sorting
- if ( matchedCount > 0 ) {
- while ( i-- ) {
- if ( !(unmatched[i] || setMatched[i]) ) {
- setMatched[i] = pop.call( results );
- }
- }
- }
-
- // Discard index placeholder values to get only actual matches
- setMatched = condense( setMatched );
- }
-
- // Add matches to results
- push.apply( results, setMatched );
-
- // Seedless set matches succeeding multiple successful matchers stipulate sorting
- if ( outermost && !seed && setMatched.length > 0 &&
- ( matchedCount + setMatchers.length ) > 1 ) {
-
- Sizzle.uniqueSort( results );
- }
- }
-
- // Override manipulation of globals by nested matchers
- if ( outermost ) {
- dirruns = dirrunsUnique;
- outermostContext = contextBackup;
- }
-
- return unmatched;
- };
-
- return bySet ?
- markFunction( superMatcher ) :
- superMatcher;
-}
-
-compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
- var i,
- setMatchers = [],
- elementMatchers = [],
- cached = compilerCache[ selector + " " ];
-
- if ( !cached ) {
- // Generate a function of recursive functions that can be used to check each element
- if ( !group ) {
- group = tokenize( selector );
- }
- i = group.length;
- while ( i-- ) {
- cached = matcherFromTokens( group[i] );
- if ( cached[ expando ] ) {
- setMatchers.push( cached );
- } else {
- elementMatchers.push( cached );
- }
- }
-
- // Cache the compiled function
- cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
- }
- return cached;
-};
-
-function multipleContexts( selector, contexts, results ) {
- var i = 0,
- len = contexts.length;
- for ( ; i < len; i++ ) {
- Sizzle( selector, contexts[i], results );
- }
- return results;
-}
-
-function select( selector, context, results, seed ) {
- var i, tokens, token, type, find,
- match = tokenize( selector );
-
- if ( !seed ) {
- // Try to minimize operations if there is only one group
- if ( match.length === 1 ) {
-
- // Take a shortcut and set the context if the root selector is an ID
- tokens = match[0] = match[0].slice( 0 );
- if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
- support.getById && context.nodeType === 9 && documentIsHTML &&
- Expr.relative[ tokens[1].type ] ) {
-
- context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
- if ( !context ) {
- return results;
- }
- selector = selector.slice( tokens.shift().value.length );
- }
-
- // Fetch a seed set for right-to-left matching
- i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
- while ( i-- ) {
- token = tokens[i];
-
- // Abort if we hit a combinator
- if ( Expr.relative[ (type = token.type) ] ) {
- break;
- }
- if ( (find = Expr.find[ type ]) ) {
- // Search, expanding context for leading sibling combinators
- if ( (seed = find(
- token.matches[0].replace( runescape, funescape ),
- rsibling.test( tokens[0].type ) && context.parentNode || context
- )) ) {
-
- // If seed is empty or no tokens remain, we can return early
- tokens.splice( i, 1 );
- selector = seed.length && toSelector( tokens );
- if ( !selector ) {
- push.apply( results, seed );
- return results;
- }
-
- break;
- }
- }
- }
- }
- }
-
- // Compile and execute a filtering function
- // Provide `match` to avoid retokenization if we modified the selector above
- compile( selector, match )(
- seed,
- context,
- !documentIsHTML,
- results,
- rsibling.test( selector )
- );
- return results;
-}
-
-// One-time assignments
-
-// Sort stability
-support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
-
-// Support: Chrome<14
-// Always assume duplicates if they aren't passed to the comparison function
-support.detectDuplicates = hasDuplicate;
-
-// Initialize against the default document
-setDocument();
-
-// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
-// Detached nodes confoundingly follow *each other*
-support.sortDetached = assert(function( div1 ) {
- // Should return 1, but returns 4 (following)
- return div1.compareDocumentPosition( document.createElement("div") ) & 1;
-});
-
-// Support: IE<8
-// Prevent attribute/property "interpolation"
-// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
-if ( !assert(function( div ) {
- div.innerHTML = "<a href='#'></a>";
- return div.firstChild.getAttribute("href") === "#" ;
-}) ) {
- addHandle( "type|href|height|width", function( elem, name, isXML ) {
- if ( !isXML ) {
- return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
- }
- });
-}
-
-// Support: IE<9
-// Use defaultValue in place of getAttribute("value")
-if ( !support.attributes || !assert(function( div ) {
- div.innerHTML = "<input/>";
- div.firstChild.setAttribute( "value", "" );
- return div.firstChild.getAttribute( "value" ) === "";
-}) ) {
- addHandle( "value", function( elem, name, isXML ) {
- if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
- return elem.defaultValue;
- }
- });
-}
-
-// Support: IE<9
-// Use getAttributeNode to fetch booleans when getAttribute lies
-if ( !assert(function( div ) {
- return div.getAttribute("disabled") == null;
-}) ) {
- addHandle( booleans, function( elem, name, isXML ) {
- var val;
- if ( !isXML ) {
- return (val = elem.getAttributeNode( name )) && val.specified ?
- val.value :
- elem[ name ] === true ? name.toLowerCase() : null;
- }
- });
-}
-
-jQuery.find = Sizzle;
-jQuery.expr = Sizzle.selectors;
-jQuery.expr[":"] = jQuery.expr.pseudos;
-jQuery.unique = Sizzle.uniqueSort;
-jQuery.text = Sizzle.getText;
-jQuery.isXMLDoc = Sizzle.isXML;
-jQuery.contains = Sizzle.contains;
-
-
-})( window );
-// String to Object options format cache
-var optionsCache = {};
-
-// Convert String-formatted options into Object-formatted ones and store in cache
-function createOptions( options ) {
- var object = optionsCache[ options ] = {};
- jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {
- object[ flag ] = true;
- });
- return object;
-}
-
-/*
- * Create a callback list using the following parameters:
- *
- * options: an optional list of space-separated options that will change how
- * the callback list behaves or a more traditional option object
- *
- * By default a callback list will act like an event callback list and can be
- * "fired" multiple times.
- *
- * Possible options:
- *
- * once: will ensure the callback list can only be fired once (like a Deferred)
- *
- * memory: will keep track of previous values and will call any callback added
- * after the list has been fired right away with the latest "memorized"
- * values (like a Deferred)
- *
- * unique: will ensure a callback can only be added once (no duplicate in the list)
- *
- * stopOnFalse: interrupt callings when a callback returns false
- *
- */
-jQuery.Callbacks = function( options ) {
-
- // Convert options from String-formatted to Object-formatted if needed
- // (we check in cache first)
- options = typeof options === "string" ?
- ( optionsCache[ options ] || createOptions( options ) ) :
- jQuery.extend( {}, options );
-
- var // Flag to know if list is currently firing
- firing,
- // Last fire value (for non-forgettable lists)
- memory,
- // Flag to know if list was already fired
- fired,
- // End of the loop when firing
- firingLength,
- // Index of currently firing callback (modified by remove if needed)
- firingIndex,
- // First callback to fire (used internally by add and fireWith)
- firingStart,
- // Actual callback list
- list = [],
- // Stack of fire calls for repeatable lists
- stack = !options.once && [],
- // Fire callbacks
- fire = function( data ) {
- memory = options.memory && data;
- fired = true;
- firingIndex = firingStart || 0;
- firingStart = 0;
- firingLength = list.length;
- firing = true;
- for ( ; list && firingIndex < firingLength; firingIndex++ ) {
- if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
- memory = false; // To prevent further calls using add
- break;
- }
- }
- firing = false;
- if ( list ) {
- if ( stack ) {
- if ( stack.length ) {
- fire( stack.shift() );
- }
- } else if ( memory ) {
- list = [];
- } else {
- self.disable();
- }
- }
- },
- // Actual Callbacks object
- self = {
- // Add a callback or a collection of callbacks to the list
- add: function() {
- if ( list ) {
- // First, we save the current length
- var start = list.length;
- (function add( args ) {
- jQuery.each( args, function( _, arg ) {
- var type = jQuery.type( arg );
- if ( type === "function" ) {
- if ( !options.unique || !self.has( arg ) ) {
- list.push( arg );
- }
- } else if ( arg && arg.length && type !== "string" ) {
- // Inspect recursively
- add( arg );
- }
- });
- })( arguments );
- // Do we need to add the callbacks to the
- // current firing batch?
- if ( firing ) {
- firingLength = list.length;
- // With memory, if we're not firing then
- // we should call right away
- } else if ( memory ) {
- firingStart = start;
- fire( memory );
- }
- }
- return this;
- },
- // Remove a callback from the list
- remove: function() {
- if ( list ) {
- jQuery.each( arguments, function( _, arg ) {
- var index;
- while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
- list.splice( index, 1 );
- // Handle firing indexes
- if ( firing ) {
- if ( index <= firingLength ) {
- firingLength--;
- }
- if ( index <= firingIndex ) {
- firingIndex--;
- }
- }
- }
- });
- }
- return this;
- },
- // Check if a given callback is in the list.
- // If no argument is given, return whether or not list has callbacks attached.
- has: function( fn ) {
- return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
- },
- // Remove all callbacks from the list
- empty: function() {
- list = [];
- firingLength = 0;
- return this;
- },
- // Have the list do nothing anymore
- disable: function() {
- list = stack = memory = undefined;
- return this;
- },
- // Is it disabled?
- disabled: function() {
- return !list;
- },
- // Lock the list in its current state
- lock: function() {
- stack = undefined;
- if ( !memory ) {
- self.disable();
- }
- return this;
- },
- // Is it locked?
- locked: function() {
- return !stack;
- },
- // Call all callbacks with the given context and arguments
- fireWith: function( context, args ) {
- if ( list && ( !fired || stack ) ) {
- args = args || [];
- args = [ context, args.slice ? args.slice() : args ];
- if ( firing ) {
- stack.push( args );
- } else {
- fire( args );
- }
- }
- return this;
- },
- // Call all the callbacks with the given arguments
- fire: function() {
- self.fireWith( this, arguments );
- return this;
- },
- // To know if the callbacks have already been called at least once
- fired: function() {
- return !!fired;
- }
- };
-
- return self;
-};
-jQuery.extend({
-
- Deferred: function( func ) {
- var tuples = [
- // action, add listener, listener list, final state
- [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
- [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
- [ "notify", "progress", jQuery.Callbacks("memory") ]
- ],
- state = "pending",
- promise = {
- state: function() {
- return state;
- },
- always: function() {
- deferred.done( arguments ).fail( arguments );
- return this;
- },
- then: function( /* fnDone, fnFail, fnProgress */ ) {
- var fns = arguments;
- return jQuery.Deferred(function( newDefer ) {
- jQuery.each( tuples, function( i, tuple ) {
- var action = tuple[ 0 ],
- fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
- // deferred[ done | fail | progress ] for forwarding actions to newDefer
- deferred[ tuple[1] ](function() {
- var returned = fn && fn.apply( this, arguments );
- if ( returned && jQuery.isFunction( returned.promise ) ) {
- returned.promise()
- .done( newDefer.resolve )
- .fail( newDefer.reject )
- .progress( newDefer.notify );
- } else {
- newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
- }
- });
- });
- fns = null;
- }).promise();
- },
- // Get a promise for this deferred
- // If obj is provided, the promise aspect is added to the object
- promise: function( obj ) {
- return obj != null ? jQuery.extend( obj, promise ) : promise;
- }
- },
- deferred = {};
-
- // Keep pipe for back-compat
- promise.pipe = promise.then;
-
- // Add list-specific methods
- jQuery.each( tuples, function( i, tuple ) {
- var list = tuple[ 2 ],
- stateString = tuple[ 3 ];
-
- // promise[ done | fail | progress ] = list.add
- promise[ tuple[1] ] = list.add;
-
- // Handle state
- if ( stateString ) {
- list.add(function() {
- // state = [ resolved | rejected ]
- state = stateString;
-
- // [ reject_list | resolve_list ].disable; progress_list.lock
- }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
- }
-
- // deferred[ resolve | reject | notify ]
- deferred[ tuple[0] ] = function() {
- deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
- return this;
- };
- deferred[ tuple[0] + "With" ] = list.fireWith;
- });
-
- // Make the deferred a promise
- promise.promise( deferred );
-
- // Call given func if any
- if ( func ) {
- func.call( deferred, deferred );
- }
-
- // All done!
- return deferred;
- },
-
- // Deferred helper
- when: function( subordinate /* , ..., subordinateN */ ) {
- var i = 0,
- resolveValues = core_slice.call( arguments ),
- length = resolveValues.length,
-
- // the count of uncompleted subordinates
- remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
-
- // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
- deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
-
- // Update function for both resolve and progress values
- updateFunc = function( i, contexts, values ) {
- return function( value ) {
- contexts[ i ] = this;
- values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
- if( values === progressValues ) {
- deferred.notifyWith( contexts, values );
- } else if ( !( --remaining ) ) {
- deferred.resolveWith( contexts, values );
- }
- };
- },
-
- progressValues, progressContexts, resolveContexts;
-
- // add listeners to Deferred subordinates; treat others as resolved
- if ( length > 1 ) {
- progressValues = new Array( length );
- progressContexts = new Array( length );
- resolveContexts = new Array( length );
- for ( ; i < length; i++ ) {
- if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
- resolveValues[ i ].promise()
- .done( updateFunc( i, resolveContexts, resolveValues ) )
- .fail( deferred.reject )
- .progress( updateFunc( i, progressContexts, progressValues ) );
- } else {
- --remaining;
- }
- }
- }
-
- // if we're not waiting on anything, resolve the master
- if ( !remaining ) {
- deferred.resolveWith( resolveContexts, resolveValues );
- }
-
- return deferred.promise();
- }
-});
-jQuery.support = (function( support ) {
-
- var all, a, input, select, fragment, opt, eventName, isSupported, i,
- div = document.createElement("div");
-
- // Setup
- div.setAttribute( "className", "t" );
- div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
-
- // Finish early in limited (non-browser) environments
- all = div.getElementsByTagName("*") || [];
- a = div.getElementsByTagName("a")[ 0 ];
- if ( !a || !a.style || !all.length ) {
- return support;
- }
-
- // First batch of tests
- select = document.createElement("select");
- opt = select.appendChild( document.createElement("option") );
- input = div.getElementsByTagName("input")[ 0 ];
-
- a.style.cssText = "top:1px;float:left;opacity:.5";
-
- // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
- support.getSetAttribute = div.className !== "t";
-
- // IE strips leading whitespace when .innerHTML is used
- support.leadingWhitespace = div.firstChild.nodeType === 3;
-
- // Make sure that tbody elements aren't automatically inserted
- // IE will insert them into empty tables
- support.tbody = !div.getElementsByTagName("tbody").length;
-
- // Make sure that link elements get serialized correctly by innerHTML
- // This requires a wrapper element in IE
- support.htmlSerialize = !!div.getElementsByTagName("link").length;
-
- // Get the style information from getAttribute
- // (IE uses .cssText instead)
- support.style = /top/.test( a.getAttribute("style") );
-
- // Make sure that URLs aren't manipulated
- // (IE normalizes it by default)
- support.hrefNormalized = a.getAttribute("href") === "/a";
-
- // Make sure that element opacity exists
- // (IE uses filter instead)
- // Use a regex to work around a WebKit issue. See #5145
- support.opacity = /^0.5/.test( a.style.opacity );
-
- // Verify style float existence
- // (IE uses styleFloat instead of cssFloat)
- support.cssFloat = !!a.style.cssFloat;
-
- // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
- support.checkOn = !!input.value;
-
- // Make sure that a selected-by-default option has a working selected property.
- // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
- support.optSelected = opt.selected;
-
- // Tests for enctype support on a form (#6743)
- support.enctype = !!document.createElement("form").enctype;
-
- // Makes sure cloning an html5 element does not cause problems
- // Where outerHTML is undefined, this still works
- support.html5Clone = document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>";
-
- // Will be defined later
- support.inlineBlockNeedsLayout = false;
- support.shrinkWrapBlocks = false;
- support.pixelPosition = false;
- support.deleteExpando = true;
- support.noCloneEvent = true;
- support.reliableMarginRight = true;
- support.boxSizingReliable = true;
-
- // Make sure checked status is properly cloned
- input.checked = true;
- support.noCloneChecked = input.cloneNode( true ).checked;
-
- // Make sure that the options inside disabled selects aren't marked as disabled
- // (WebKit marks them as disabled)
- select.disabled = true;
- support.optDisabled = !opt.disabled;
-
- // Support: IE<9
- try {
- delete div.test;
- } catch( e ) {
- support.deleteExpando = false;
- }
-
- // Check if we can trust getAttribute("value")
- input = document.createElement("input");
- input.setAttribute( "value", "" );
- support.input = input.getAttribute( "value" ) === "";
-
- // Check if an input maintains its value after becoming a radio
- input.value = "t";
- input.setAttribute( "type", "radio" );
- support.radioValue = input.value === "t";
-
- // #11217 - WebKit loses check when the name is after the checked attribute
- input.setAttribute( "checked", "t" );
- input.setAttribute( "name", "t" );
-
- fragment = document.createDocumentFragment();
- fragment.appendChild( input );
-
- // Check if a disconnected checkbox will retain its checked
- // value of true after appended to the DOM (IE6/7)
- support.appendChecked = input.checked;
-
- // WebKit doesn't clone checked state correctly in fragments
- support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
-
- // Support: IE<9
- // Opera does not clone events (and typeof div.attachEvent === undefined).
- // IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
- if ( div.attachEvent ) {
- div.attachEvent( "onclick", function() {
- support.noCloneEvent = false;
- });
-
- div.cloneNode( true ).click();
- }
-
- // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)
- // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
- for ( i in { submit: true, change: true, focusin: true }) {
- div.setAttribute( eventName = "on" + i, "t" );
-
- support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false;
- }
-
- div.style.backgroundClip = "content-box";
- div.cloneNode( true ).style.backgroundClip = "";
- support.clearCloneStyle = div.style.backgroundClip === "content-box";
-
- // Support: IE<9
- // Iteration over object's inherited properties before its own.
- for ( i in jQuery( support ) ) {
- break;
- }
- support.ownLast = i !== "0";
-
- // Run tests that need a body at doc ready
- jQuery(function() {
- var container, marginDiv, tds,
- divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
- body = document.getElementsByTagName("body")[0];
-
- if ( !body ) {
- // Return for frameset docs that don't have a body
- return;
- }
-
- container = document.createElement("div");
- container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
-
- body.appendChild( container ).appendChild( div );
-
- // Support: IE8
- // Check if table cells still have offsetWidth/Height when they are set
- // to display:none and there are still other visible table cells in a
- // table row; if so, offsetWidth/Height are not reliable for use when
- // determining if an element has been hidden directly using
- // display:none (it is still safe to use offsets if a parent element is
- // hidden; don safety goggles and see bug #4512 for more information).
- div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
- tds = div.getElementsByTagName("td");
- tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";
- isSupported = ( tds[ 0 ].offsetHeight === 0 );
-
- tds[ 0 ].style.display = "";
- tds[ 1 ].style.display = "none";
-
- // Support: IE8
- // Check if empty table cells still have offsetWidth/Height
- support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
-
- // Check box-sizing and margin behavior.
- div.innerHTML = "";
- div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
-
- // Workaround failing boxSizing test due to offsetWidth returning wrong value
- // with some non-1 values of body zoom, ticket #13543
- jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() {
- support.boxSizing = div.offsetWidth === 4;
- });
-
- // Use window.getComputedStyle because jsdom on node.js will break without it.
- if ( window.getComputedStyle ) {
- support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
- support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
-
- // Check if div with explicit width and no margin-right incorrectly
- // gets computed margin-right based on width of container. (#3333)
- // Fails in WebKit before Feb 2011 nightlies
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- marginDiv = div.appendChild( document.createElement("div") );
- marginDiv.style.cssText = div.style.cssText = divReset;
- marginDiv.style.marginRight = marginDiv.style.width = "0";
- div.style.width = "1px";
-
- support.reliableMarginRight =
- !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
- }
-
- if ( typeof div.style.zoom !== core_strundefined ) {
- // Support: IE<8
- // Check if natively block-level elements act like inline-block
- // elements when setting their display to 'inline' and giving
- // them layout
- div.innerHTML = "";
- div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
- support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
-
- // Support: IE6
- // Check if elements with layout shrink-wrap their children
- div.style.display = "block";
- div.innerHTML = "<div></div>";
- div.firstChild.style.width = "5px";
- support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
-
- if ( support.inlineBlockNeedsLayout ) {
- // Prevent IE 6 from affecting layout for positioned elements #11048
- // Prevent IE from shrinking the body in IE 7 mode #12869
- // Support: IE<8
- body.style.zoom = 1;
- }
- }
-
- body.removeChild( container );
-
- // Null elements to avoid leaks in IE
- container = div = tds = marginDiv = null;
- });
-
- // Null elements to avoid leaks in IE
- all = select = fragment = opt = a = input = null;
-
- return support;
-})({});
-
-var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
- rmultiDash = /([A-Z])/g;
-
-function internalData( elem, name, data, pvt /* Internal Use Only */ ){
- if ( !jQuery.acceptData( elem ) ) {
- return;
- }
-
- var ret, thisCache,
- internalKey = jQuery.expando,
-
- // We have to handle DOM nodes and JS objects differently because IE6-7
- // can't GC object references properly across the DOM-JS boundary
- isNode = elem.nodeType,
-
- // Only DOM nodes need the global jQuery cache; JS object data is
- // attached directly to the object so GC can occur automatically
- cache = isNode ? jQuery.cache : elem,
-
- // Only defining an ID for JS objects if its cache already exists allows
- // the code to shortcut on the same path as a DOM node with no cache
- id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
-
- // Avoid doing any more work than we need to when trying to get data on an
- // object that has no data at all
- if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) {
- return;
- }
-
- if ( !id ) {
- // Only DOM nodes need a new unique ID for each element since their data
- // ends up in the global cache
- if ( isNode ) {
- id = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++;
- } else {
- id = internalKey;
- }
- }
-
- if ( !cache[ id ] ) {
- // Avoid exposing jQuery metadata on plain JS objects when the object
- // is serialized using JSON.stringify
- cache[ id ] = isNode ? {} : { toJSON: jQuery.noop };
- }
-
- // An object can be passed to jQuery.data instead of a key/value pair; this gets
- // shallow copied over onto the existing cache
- if ( typeof name === "object" || typeof name === "function" ) {
- if ( pvt ) {
- cache[ id ] = jQuery.extend( cache[ id ], name );
- } else {
- cache[ id ].data = jQuery.extend( cache[ id ].data, name );
- }
- }
-
- thisCache = cache[ id ];
-
- // jQuery data() is stored in a separate object inside the object's internal data
- // cache in order to avoid key collisions between internal data and user-defined
- // data.
- if ( !pvt ) {
- if ( !thisCache.data ) {
- thisCache.data = {};
- }
-
- thisCache = thisCache.data;
- }
-
- if ( data !== undefined ) {
- thisCache[ jQuery.camelCase( name ) ] = data;
- }
-
- // Check for both converted-to-camel and non-converted data property names
- // If a data property was specified
- if ( typeof name === "string" ) {
-
- // First Try to find as-is property data
- ret = thisCache[ name ];
-
- // Test for null|undefined property data
- if ( ret == null ) {
-
- // Try to find the camelCased property
- ret = thisCache[ jQuery.camelCase( name ) ];
- }
- } else {
- ret = thisCache;
- }
-
- return ret;
-}
-
-function internalRemoveData( elem, name, pvt ) {
- if ( !jQuery.acceptData( elem ) ) {
- return;
- }
-
- var thisCache, i,
- isNode = elem.nodeType,
-
- // See jQuery.data for more information
- cache = isNode ? jQuery.cache : elem,
- id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
-
- // If there is already no cache entry for this object, there is no
- // purpose in continuing
- if ( !cache[ id ] ) {
- return;
- }
-
- if ( name ) {
-
- thisCache = pvt ? cache[ id ] : cache[ id ].data;
-
- if ( thisCache ) {
-
- // Support array or space separated string names for data keys
- if ( !jQuery.isArray( name ) ) {
-
- // try the string as a key before any manipulation
- if ( name in thisCache ) {
- name = [ name ];
- } else {
-
- // split the camel cased version by spaces unless a key with the spaces exists
- name = jQuery.camelCase( name );
- if ( name in thisCache ) {
- name = [ name ];
- } else {
- name = name.split(" ");
- }
- }
- } else {
- // If "name" is an array of keys...
- // When data is initially created, via ("key", "val") signature,
- // keys will be converted to camelCase.
- // Since there is no way to tell _how_ a key was added, remove
- // both plain key and camelCase key. #12786
- // This will only penalize the array argument path.
- name = name.concat( jQuery.map( name, jQuery.camelCase ) );
- }
-
- i = name.length;
- while ( i-- ) {
- delete thisCache[ name[i] ];
- }
-
- // If there is no data left in the cache, we want to continue
- // and let the cache object itself get destroyed
- if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) {
- return;
- }
- }
- }
-
- // See jQuery.data for more information
- if ( !pvt ) {
- delete cache[ id ].data;
-
- // Don't destroy the parent cache unless the internal data object
- // had been the only thing left in it
- if ( !isEmptyDataObject( cache[ id ] ) ) {
- return;
- }
- }
-
- // Destroy the cache
- if ( isNode ) {
- jQuery.cleanData( [ elem ], true );
-
- // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
- /* jshint eqeqeq: false */
- } else if ( jQuery.support.deleteExpando || cache != cache.window ) {
- /* jshint eqeqeq: true */
- delete cache[ id ];
-
- // When all else fails, null
- } else {
- cache[ id ] = null;
- }
-}
-
-jQuery.extend({
- cache: {},
-
- // The following elements throw uncatchable exceptions if you
- // attempt to add expando properties to them.
- noData: {
- "applet": true,
- "embed": true,
- // Ban all objects except for Flash (which handle expandos)
- "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
- },
-
- hasData: function( elem ) {
- elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
- return !!elem && !isEmptyDataObject( elem );
- },
-
- data: function( elem, name, data ) {
- return internalData( elem, name, data );
- },
-
- removeData: function( elem, name ) {
- return internalRemoveData( elem, name );
- },
-
- // For internal use only.
- _data: function( elem, name, data ) {
- return internalData( elem, name, data, true );
- },
-
- _removeData: function( elem, name ) {
- return internalRemoveData( elem, name, true );
- },
-
- // A method for determining if a DOM node can handle the data expando
- acceptData: function( elem ) {
- // Do not set data on non-element because it will not be cleared (#8335).
- if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) {
- return false;
- }
-
- var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
-
- // nodes accept data unless otherwise specified; rejection can be conditional
- return !noData || noData !== true && elem.getAttribute("classid") === noData;
- }
-});
-
-jQuery.fn.extend({
- data: function( key, value ) {
- var attrs, name,
- data = null,
- i = 0,
- elem = this[0];
-
- // Special expections of .data basically thwart jQuery.access,
- // so implement the relevant behavior ourselves
-
- // Gets all values
- if ( key === undefined ) {
- if ( this.length ) {
- data = jQuery.data( elem );
-
- if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
- attrs = elem.attributes;
- for ( ; i < attrs.length; i++ ) {
- name = attrs[i].name;
-
- if ( name.indexOf("data-") === 0 ) {
- name = jQuery.camelCase( name.slice(5) );
-
- dataAttr( elem, name, data[ name ] );
- }
- }
- jQuery._data( elem, "parsedAttrs", true );
- }
- }
-
- return data;
- }
-
- // Sets multiple values
- if ( typeof key === "object" ) {
- return this.each(function() {
- jQuery.data( this, key );
- });
- }
-
- return arguments.length > 1 ?
-
- // Sets one value
- this.each(function() {
- jQuery.data( this, key, value );
- }) :
-
- // Gets one value
- // Try to fetch any internally stored data first
- elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;
- },
-
- removeData: function( key ) {
- return this.each(function() {
- jQuery.removeData( this, key );
- });
- }
-});
-
-function dataAttr( elem, key, data ) {
- // If nothing was found internally, try to fetch any
- // data from the HTML5 data-* attribute
- if ( data === undefined && elem.nodeType === 1 ) {
-
- var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
-
- data = elem.getAttribute( name );
-
- if ( typeof data === "string" ) {
- try {
- data = data === "true" ? true :
- data === "false" ? false :
- data === "null" ? null :
- // Only convert to a number if it doesn't change the string
- +data + "" === data ? +data :
- rbrace.test( data ) ? jQuery.parseJSON( data ) :
- data;
- } catch( e ) {}
-
- // Make sure we set the data so it isn't changed later
- jQuery.data( elem, key, data );
-
- } else {
- data = undefined;
- }
- }
-
- return data;
-}
-
-// checks a cache object for emptiness
-function isEmptyDataObject( obj ) {
- var name;
- for ( name in obj ) {
-
- // if the public data object is empty, the private is still empty
- if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
- continue;
- }
- if ( name !== "toJSON" ) {
- return false;
- }
- }
-
- return true;
-}
-jQuery.extend({
- queue: function( elem, type, data ) {
- var queue;
-
- if ( elem ) {
- type = ( type || "fx" ) + "queue";
- queue = jQuery._data( elem, type );
-
- // Speed up dequeue by getting out quickly if this is just a lookup
- if ( data ) {
- if ( !queue || jQuery.isArray(data) ) {
- queue = jQuery._data( elem, type, jQuery.makeArray(data) );
- } else {
- queue.push( data );
- }
- }
- return queue || [];
- }
- },
-
- dequeue: function( elem, type ) {
- type = type || "fx";
-
- var queue = jQuery.queue( elem, type ),
- startLength = queue.length,
- fn = queue.shift(),
- hooks = jQuery._queueHooks( elem, type ),
- next = function() {
- jQuery.dequeue( elem, type );
- };
-
- // If the fx queue is dequeued, always remove the progress sentinel
- if ( fn === "inprogress" ) {
- fn = queue.shift();
- startLength--;
- }
-
- if ( fn ) {
-
- // Add a progress sentinel to prevent the fx queue from being
- // automatically dequeued
- if ( type === "fx" ) {
- queue.unshift( "inprogress" );
- }
-
- // clear up the last queue stop function
- delete hooks.stop;
- fn.call( elem, next, hooks );
- }
-
- if ( !startLength && hooks ) {
- hooks.empty.fire();
- }
- },
-
- // not intended for public consumption - generates a queueHooks object, or returns the current one
- _queueHooks: function( elem, type ) {
- var key = type + "queueHooks";
- return jQuery._data( elem, key ) || jQuery._data( elem, key, {
- empty: jQuery.Callbacks("once memory").add(function() {
- jQuery._removeData( elem, type + "queue" );
- jQuery._removeData( elem, key );
- })
- });
- }
-});
-
-jQuery.fn.extend({
- queue: function( type, data ) {
- var setter = 2;
-
- if ( typeof type !== "string" ) {
- data = type;
- type = "fx";
- setter--;
- }
-
- if ( arguments.length < setter ) {
- return jQuery.queue( this[0], type );
- }
-
- return data === undefined ?
- this :
- this.each(function() {
- var queue = jQuery.queue( this, type, data );
-
- // ensure a hooks for this queue
- jQuery._queueHooks( this, type );
-
- if ( type === "fx" && queue[0] !== "inprogress" ) {
- jQuery.dequeue( this, type );
- }
- });
- },
- dequeue: function( type ) {
- return this.each(function() {
- jQuery.dequeue( this, type );
- });
- },
- // Based off of the plugin by Clint Helfers, with permission.
- // http://blindsignals.com/index.php/2009/07/jquery-delay/
- delay: function( time, type ) {
- time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
- type = type || "fx";
-
- return this.queue( type, function( next, hooks ) {
- var timeout = setTimeout( next, time );
- hooks.stop = function() {
- clearTimeout( timeout );
- };
- });
- },
- clearQueue: function( type ) {
- return this.queue( type || "fx", [] );
- },
- // Get a promise resolved when queues of a certain type
- // are emptied (fx is the type by default)
- promise: function( type, obj ) {
- var tmp,
- count = 1,
- defer = jQuery.Deferred(),
- elements = this,
- i = this.length,
- resolve = function() {
- if ( !( --count ) ) {
- defer.resolveWith( elements, [ elements ] );
- }
- };
-
- if ( typeof type !== "string" ) {
- obj = type;
- type = undefined;
- }
- type = type || "fx";
-
- while( i-- ) {
- tmp = jQuery._data( elements[ i ], type + "queueHooks" );
- if ( tmp && tmp.empty ) {
- count++;
- tmp.empty.add( resolve );
- }
- }
- resolve();
- return defer.promise( obj );
- }
-});
-var nodeHook, boolHook,
- rclass = /[\t\r\n\f]/g,
- rreturn = /\r/g,
- rfocusable = /^(?:input|select|textarea|button|object)$/i,
- rclickable = /^(?:a|area)$/i,
- ruseDefault = /^(?:checked|selected)$/i,
- getSetAttribute = jQuery.support.getSetAttribute,
- getSetInput = jQuery.support.input;
-
-jQuery.fn.extend({
- attr: function( name, value ) {
- return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
- },
-
- removeAttr: function( name ) {
- return this.each(function() {
- jQuery.removeAttr( this, name );
- });
- },
-
- prop: function( name, value ) {
- return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
- },
-
- removeProp: function( name ) {
- name = jQuery.propFix[ name ] || name;
- return this.each(function() {
- // try/catch handles cases where IE balks (such as removing a property on window)
- try {
- this[ name ] = undefined;
- delete this[ name ];
- } catch( e ) {}
- });
- },
-
- addClass: function( value ) {
- var classes, elem, cur, clazz, j,
- i = 0,
- len = this.length,
- proceed = typeof value === "string" && value;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).addClass( value.call( this, j, this.className ) );
- });
- }
-
- if ( proceed ) {
- // The disjunction here is for better compressibility (see removeClass)
- classes = ( value || "" ).match( core_rnotwhite ) || [];
-
- for ( ; i < len; i++ ) {
- elem = this[ i ];
- cur = elem.nodeType === 1 && ( elem.className ?
- ( " " + elem.className + " " ).replace( rclass, " " ) :
- " "
- );
-
- if ( cur ) {
- j = 0;
- while ( (clazz = classes[j++]) ) {
- if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
- cur += clazz + " ";
- }
- }
- elem.className = jQuery.trim( cur );
-
- }
- }
- }
-
- return this;
- },
-
- removeClass: function( value ) {
- var classes, elem, cur, clazz, j,
- i = 0,
- len = this.length,
- proceed = arguments.length === 0 || typeof value === "string" && value;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).removeClass( value.call( this, j, this.className ) );
- });
- }
- if ( proceed ) {
- classes = ( value || "" ).match( core_rnotwhite ) || [];
-
- for ( ; i < len; i++ ) {
- elem = this[ i ];
- // This expression is here for better compressibility (see addClass)
- cur = elem.nodeType === 1 && ( elem.className ?
- ( " " + elem.className + " " ).replace( rclass, " " ) :
- ""
- );
-
- if ( cur ) {
- j = 0;
- while ( (clazz = classes[j++]) ) {
- // Remove *all* instances
- while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
- cur = cur.replace( " " + clazz + " ", " " );
- }
- }
- elem.className = value ? jQuery.trim( cur ) : "";
- }
- }
- }
-
- return this;
- },
-
- toggleClass: function( value, stateVal ) {
- var type = typeof value;
-
- if ( typeof stateVal === "boolean" && type === "string" ) {
- return stateVal ? this.addClass( value ) : this.removeClass( value );
- }
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( i ) {
- jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
- });
- }
-
- return this.each(function() {
- if ( type === "string" ) {
- // toggle individual class names
- var className,
- i = 0,
- self = jQuery( this ),
- classNames = value.match( core_rnotwhite ) || [];
-
- while ( (className = classNames[ i++ ]) ) {
- // check each className given, space separated list
- if ( self.hasClass( className ) ) {
- self.removeClass( className );
- } else {
- self.addClass( className );
- }
- }
-
- // Toggle whole class name
- } else if ( type === core_strundefined || type === "boolean" ) {
- if ( this.className ) {
- // store className if set
- jQuery._data( this, "__className__", this.className );
- }
-
- // If the element has a class name or if we're passed "false",
- // then remove the whole classname (if there was one, the above saved it).
- // Otherwise bring back whatever was previously saved (if anything),
- // falling back to the empty string if nothing was stored.
- this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
- }
- });
- },
-
- hasClass: function( selector ) {
- var className = " " + selector + " ",
- i = 0,
- l = this.length;
- for ( ; i < l; i++ ) {
- if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
- return true;
- }
- }
-
- return false;
- },
-
- val: function( value ) {
- var ret, hooks, isFunction,
- elem = this[0];
-
- if ( !arguments.length ) {
- if ( elem ) {
- hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
-
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
- return ret;
- }
-
- ret = elem.value;
-
- return typeof ret === "string" ?
- // handle most common string cases
- ret.replace(rreturn, "") :
- // handle cases where value is null/undef or number
- ret == null ? "" : ret;
- }
-
- return;
- }
-
- isFunction = jQuery.isFunction( value );
-
- return this.each(function( i ) {
- var val;
-
- if ( this.nodeType !== 1 ) {
- return;
- }
-
- if ( isFunction ) {
- val = value.call( this, i, jQuery( this ).val() );
- } else {
- val = value;
- }
-
- // Treat null/undefined as ""; convert numbers to string
- if ( val == null ) {
- val = "";
- } else if ( typeof val === "number" ) {
- val += "";
- } else if ( jQuery.isArray( val ) ) {
- val = jQuery.map(val, function ( value ) {
- return value == null ? "" : value + "";
- });
- }
-
- hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
-
- // If set returns undefined, fall back to normal setting
- if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
- this.value = val;
- }
- });
- }
-});
-
-jQuery.extend({
- valHooks: {
- option: {
- get: function( elem ) {
- // Use proper attribute retrieval(#6932, #12072)
- var val = jQuery.find.attr( elem, "value" );
- return val != null ?
- val :
- elem.text;
- }
- },
- select: {
- get: function( elem ) {
- var value, option,
- options = elem.options,
- index = elem.selectedIndex,
- one = elem.type === "select-one" || index < 0,
- values = one ? null : [],
- max = one ? index + 1 : options.length,
- i = index < 0 ?
- max :
- one ? index : 0;
-
- // Loop through all the selected options
- for ( ; i < max; i++ ) {
- option = options[ i ];
-
- // oldIE doesn't update selected after form reset (#2551)
- if ( ( option.selected || i === index ) &&
- // Don't return options that are disabled or in a disabled optgroup
- ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
- ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
-
- // Get the specific value for the option
- value = jQuery( option ).val();
-
- // We don't need an array for one selects
- if ( one ) {
- return value;
- }
-
- // Multi-Selects return an array
- values.push( value );
- }
- }
-
- return values;
- },
-
- set: function( elem, value ) {
- var optionSet, option,
- options = elem.options,
- values = jQuery.makeArray( value ),
- i = options.length;
-
- while ( i-- ) {
- option = options[ i ];
- if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) {
- optionSet = true;
- }
- }
-
- // force browsers to behave consistently when non-matching value is set
- if ( !optionSet ) {
- elem.selectedIndex = -1;
- }
- return values;
- }
- }
- },
-
- attr: function( elem, name, value ) {
- var hooks, ret,
- nType = elem.nodeType;
-
- // don't get/set attributes on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- // Fallback to prop when attributes are not supported
- if ( typeof elem.getAttribute === core_strundefined ) {
- return jQuery.prop( elem, name, value );
- }
-
- // All attributes are lowercase
- // Grab necessary hook if one is defined
- if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
- name = name.toLowerCase();
- hooks = jQuery.attrHooks[ name ] ||
- ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
- }
-
- if ( value !== undefined ) {
-
- if ( value === null ) {
- jQuery.removeAttr( elem, name );
-
- } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
- return ret;
-
- } else {
- elem.setAttribute( name, value + "" );
- return value;
- }
-
- } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
- return ret;
-
- } else {
- ret = jQuery.find.attr( elem, name );
-
- // Non-existent attributes return null, we normalize to undefined
- return ret == null ?
- undefined :
- ret;
- }
- },
-
- removeAttr: function( elem, value ) {
- var name, propName,
- i = 0,
- attrNames = value && value.match( core_rnotwhite );
-
- if ( attrNames && elem.nodeType === 1 ) {
- while ( (name = attrNames[i++]) ) {
- propName = jQuery.propFix[ name ] || name;
-
- // Boolean attributes get special treatment (#10870)
- if ( jQuery.expr.match.bool.test( name ) ) {
- // Set corresponding property to false
- if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
- elem[ propName ] = false;
- // Support: IE<9
- // Also clear defaultChecked/defaultSelected (if appropriate)
- } else {
- elem[ jQuery.camelCase( "default-" + name ) ] =
- elem[ propName ] = false;
- }
-
- // See #9699 for explanation of this approach (setting first, then removal)
- } else {
- jQuery.attr( elem, name, "" );
- }
-
- elem.removeAttribute( getSetAttribute ? name : propName );
- }
- }
- },
-
- attrHooks: {
- type: {
- set: function( elem, value ) {
- if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
- // Setting the type on a radio button after the value resets the value in IE6-9
- // Reset value to default in case type is set after value during creation
- var val = elem.value;
- elem.setAttribute( "type", value );
- if ( val ) {
- elem.value = val;
- }
- return value;
- }
- }
- }
- },
-
- propFix: {
- "for": "htmlFor",
- "class": "className"
- },
-
- prop: function( elem, name, value ) {
- var ret, hooks, notxml,
- nType = elem.nodeType;
-
- // don't get/set properties on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
-
- if ( notxml ) {
- // Fix name and attach hooks
- name = jQuery.propFix[ name ] || name;
- hooks = jQuery.propHooks[ name ];
- }
-
- if ( value !== undefined ) {
- return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
- ret :
- ( elem[ name ] = value );
-
- } else {
- return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
- ret :
- elem[ name ];
- }
- },
-
- propHooks: {
- tabIndex: {
- get: function( elem ) {
- // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
- // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
- // Use proper attribute retrieval(#12072)
- var tabindex = jQuery.find.attr( elem, "tabindex" );
-
- return tabindex ?
- parseInt( tabindex, 10 ) :
- rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
- 0 :
- -1;
- }
- }
- }
-});
-
-// Hooks for boolean attributes
-boolHook = {
- set: function( elem, value, name ) {
- if ( value === false ) {
- // Remove boolean attributes when set to false
- jQuery.removeAttr( elem, name );
- } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
- // IE<8 needs the *property* name
- elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );
-
- // Use defaultChecked and defaultSelected for oldIE
- } else {
- elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true;
- }
-
- return name;
- }
-};
-jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
- var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr;
-
- jQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ?
- function( elem, name, isXML ) {
- var fn = jQuery.expr.attrHandle[ name ],
- ret = isXML ?
- undefined :
- /* jshint eqeqeq: false */
- (jQuery.expr.attrHandle[ name ] = undefined) !=
- getter( elem, name, isXML ) ?
-
- name.toLowerCase() :
- null;
- jQuery.expr.attrHandle[ name ] = fn;
- return ret;
- } :
- function( elem, name, isXML ) {
- return isXML ?
- undefined :
- elem[ jQuery.camelCase( "default-" + name ) ] ?
- name.toLowerCase() :
- null;
- };
-});
-
-// fix oldIE attroperties
-if ( !getSetInput || !getSetAttribute ) {
- jQuery.attrHooks.value = {
- set: function( elem, value, name ) {
- if ( jQuery.nodeName( elem, "input" ) ) {
- // Does not return so that setAttribute is also used
- elem.defaultValue = value;
- } else {
- // Use nodeHook if defined (#1954); otherwise setAttribute is fine
- return nodeHook && nodeHook.set( elem, value, name );
- }
- }
- };
-}
-
-// IE6/7 do not support getting/setting some attributes with get/setAttribute
-if ( !getSetAttribute ) {
-
- // Use this for any attribute in IE6/7
- // This fixes almost every IE6/7 issue
- nodeHook = {
- set: function( elem, value, name ) {
- // Set the existing or create a new attribute node
- var ret = elem.getAttributeNode( name );
- if ( !ret ) {
- elem.setAttributeNode(
- (ret = elem.ownerDocument.createAttribute( name ))
- );
- }
-
- ret.value = value += "";
-
- // Break association with cloned elements by also using setAttribute (#9646)
- return name === "value" || value === elem.getAttribute( name ) ?
- value :
- undefined;
- }
- };
- jQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords =
- // Some attributes are constructed with empty-string values when not defined
- function( elem, name, isXML ) {
- var ret;
- return isXML ?
- undefined :
- (ret = elem.getAttributeNode( name )) && ret.value !== "" ?
- ret.value :
- null;
- };
- jQuery.valHooks.button = {
- get: function( elem, name ) {
- var ret = elem.getAttributeNode( name );
- return ret && ret.specified ?
- ret.value :
- undefined;
- },
- set: nodeHook.set
- };
-
- // Set contenteditable to false on removals(#10429)
- // Setting to empty string throws an error as an invalid value
- jQuery.attrHooks.contenteditable = {
- set: function( elem, value, name ) {
- nodeHook.set( elem, value === "" ? false : value, name );
- }
- };
-
- // Set width and height to auto instead of 0 on empty string( Bug #8150 )
- // This is for removals
- jQuery.each([ "width", "height" ], function( i, name ) {
- jQuery.attrHooks[ name ] = {
- set: function( elem, value ) {
- if ( value === "" ) {
- elem.setAttribute( name, "auto" );
- return value;
- }
- }
- };
- });
-}
-
-
-// Some attributes require a special call on IE
-// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
-if ( !jQuery.support.hrefNormalized ) {
- // href/src property should get the full normalized URL (#10299/#12915)
- jQuery.each([ "href", "src" ], function( i, name ) {
- jQuery.propHooks[ name ] = {
- get: function( elem ) {
- return elem.getAttribute( name, 4 );
- }
- };
- });
-}
-
-if ( !jQuery.support.style ) {
- jQuery.attrHooks.style = {
- get: function( elem ) {
- // Return undefined in the case of empty string
- // Note: IE uppercases css property names, but if we were to .toLowerCase()
- // .cssText, that would destroy case senstitivity in URL's, like in "background"
- return elem.style.cssText || undefined;
- },
- set: function( elem, value ) {
- return ( elem.style.cssText = value + "" );
- }
- };
-}
-
-// Safari mis-reports the default selected property of an option
-// Accessing the parent's selectedIndex property fixes it
-if ( !jQuery.support.optSelected ) {
- jQuery.propHooks.selected = {
- get: function( elem ) {
- var parent = elem.parentNode;
-
- if ( parent ) {
- parent.selectedIndex;
-
- // Make sure that it also works with optgroups, see #5701
- if ( parent.parentNode ) {
- parent.parentNode.selectedIndex;
- }
- }
- return null;
- }
- };
-}
-
-jQuery.each([
- "tabIndex",
- "readOnly",
- "maxLength",
- "cellSpacing",
- "cellPadding",
- "rowSpan",
- "colSpan",
- "useMap",
- "frameBorder",
- "contentEditable"
-], function() {
- jQuery.propFix[ this.toLowerCase() ] = this;
-});
-
-// IE6/7 call enctype encoding
-if ( !jQuery.support.enctype ) {
- jQuery.propFix.enctype = "encoding";
-}
-
-// Radios and checkboxes getter/setter
-jQuery.each([ "radio", "checkbox" ], function() {
- jQuery.valHooks[ this ] = {
- set: function( elem, value ) {
- if ( jQuery.isArray( value ) ) {
- return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
- }
- }
- };
- if ( !jQuery.support.checkOn ) {
- jQuery.valHooks[ this ].get = function( elem ) {
- // Support: Webkit
- // "" is returned instead of "on" if a value isn't specified
- return elem.getAttribute("value") === null ? "on" : elem.value;
- };
- }
-});
-var rformElems = /^(?:input|select|textarea)$/i,
- rkeyEvent = /^key/,
- rmouseEvent = /^(?:mouse|contextmenu)|click/,
- rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
- rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
-
-function returnTrue() {
- return true;
-}
-
-function returnFalse() {
- return false;
-}
-
-function safeActiveElement() {
- try {
- return document.activeElement;
- } catch ( err ) { }
-}
-
-/*
- * Helper functions for managing events -- not part of the public interface.
- * Props to Dean Edwards' addEvent library for many of the ideas.
- */
-jQuery.event = {
-
- global: {},
-
- add: function( elem, types, handler, data, selector ) {
- var tmp, events, t, handleObjIn,
- special, eventHandle, handleObj,
- handlers, type, namespaces, origType,
- elemData = jQuery._data( elem );
-
- // Don't attach events to noData or text/comment nodes (but allow plain objects)
- if ( !elemData ) {
- return;
- }
-
- // Caller can pass in an object of custom data in lieu of the handler
- if ( handler.handler ) {
- handleObjIn = handler;
- handler = handleObjIn.handler;
- selector = handleObjIn.selector;
- }
-
- // Make sure that the handler has a unique ID, used to find/remove it later
- if ( !handler.guid ) {
- handler.guid = jQuery.guid++;
- }
-
- // Init the element's event structure and main handler, if this is the first
- if ( !(events = elemData.events) ) {
- events = elemData.events = {};
- }
- if ( !(eventHandle = elemData.handle) ) {
- eventHandle = elemData.handle = function( e ) {
- // Discard the second event of a jQuery.event.trigger() and
- // when an event is called after a page has unloaded
- return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ?
- jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
- undefined;
- };
- // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
- eventHandle.elem = elem;
- }
-
- // Handle multiple events separated by a space
- types = ( types || "" ).match( core_rnotwhite ) || [""];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[t] ) || [];
- type = origType = tmp[1];
- namespaces = ( tmp[2] || "" ).split( "." ).sort();
-
- // There *must* be a type, no attaching namespace-only handlers
- if ( !type ) {
- continue;
- }
-
- // If event changes its type, use the special event handlers for the changed type
- special = jQuery.event.special[ type ] || {};
-
- // If selector defined, determine special event api type, otherwise given type
- type = ( selector ? special.delegateType : special.bindType ) || type;
-
- // Update special based on newly reset type
- special = jQuery.event.special[ type ] || {};
-
- // handleObj is passed to all event handlers
- handleObj = jQuery.extend({
- type: type,
- origType: origType,
- data: data,
- handler: handler,
- guid: handler.guid,
- selector: selector,
- needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
- namespace: namespaces.join(".")
- }, handleObjIn );
-
- // Init the event handler queue if we're the first
- if ( !(handlers = events[ type ]) ) {
- handlers = events[ type ] = [];
- handlers.delegateCount = 0;
-
- // Only use addEventListener/attachEvent if the special events handler returns false
- if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
- // Bind the global event handler to the element
- if ( elem.addEventListener ) {
- elem.addEventListener( type, eventHandle, false );
-
- } else if ( elem.attachEvent ) {
- elem.attachEvent( "on" + type, eventHandle );
- }
- }
- }
-
- if ( special.add ) {
- special.add.call( elem, handleObj );
-
- if ( !handleObj.handler.guid ) {
- handleObj.handler.guid = handler.guid;
- }
- }
-
- // Add to the element's handler list, delegates in front
- if ( selector ) {
- handlers.splice( handlers.delegateCount++, 0, handleObj );
- } else {
- handlers.push( handleObj );
- }
-
- // Keep track of which events have ever been used, for event optimization
- jQuery.event.global[ type ] = true;
- }
-
- // Nullify elem to prevent memory leaks in IE
- elem = null;
- },
-
- // Detach an event or set of events from an element
- remove: function( elem, types, handler, selector, mappedTypes ) {
- var j, handleObj, tmp,
- origCount, t, events,
- special, handlers, type,
- namespaces, origType,
- elemData = jQuery.hasData( elem ) && jQuery._data( elem );
-
- if ( !elemData || !(events = elemData.events) ) {
- return;
- }
-
- // Once for each type.namespace in types; type may be omitted
- types = ( types || "" ).match( core_rnotwhite ) || [""];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[t] ) || [];
- type = origType = tmp[1];
- namespaces = ( tmp[2] || "" ).split( "." ).sort();
-
- // Unbind all events (on this namespace, if provided) for the element
- if ( !type ) {
- for ( type in events ) {
- jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
- }
- continue;
- }
-
- special = jQuery.event.special[ type ] || {};
- type = ( selector ? special.delegateType : special.bindType ) || type;
- handlers = events[ type ] || [];
- tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
-
- // Remove matching events
- origCount = j = handlers.length;
- while ( j-- ) {
- handleObj = handlers[ j ];
-
- if ( ( mappedTypes || origType === handleObj.origType ) &&
- ( !handler || handler.guid === handleObj.guid ) &&
- ( !tmp || tmp.test( handleObj.namespace ) ) &&
- ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
- handlers.splice( j, 1 );
-
- if ( handleObj.selector ) {
- handlers.delegateCount--;
- }
- if ( special.remove ) {
- special.remove.call( elem, handleObj );
- }
- }
- }
-
- // Remove generic event handler if we removed something and no more handlers exist
- // (avoids potential for endless recursion during removal of special event handlers)
- if ( origCount && !handlers.length ) {
- if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
- jQuery.removeEvent( elem, type, elemData.handle );
- }
-
- delete events[ type ];
- }
- }
-
- // Remove the expando if it's no longer used
- if ( jQuery.isEmptyObject( events ) ) {
- delete elemData.handle;
-
- // removeData also checks for emptiness and clears the expando if empty
- // so use it instead of delete
- jQuery._removeData( elem, "events" );
- }
- },
-
- trigger: function( event, data, elem, onlyHandlers ) {
- var handle, ontype, cur,
- bubbleType, special, tmp, i,
- eventPath = [ elem || document ],
- type = core_hasOwn.call( event, "type" ) ? event.type : event,
- namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];
-
- cur = tmp = elem = elem || document;
-
- // Don't do events on text and comment nodes
- if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
- return;
- }
-
- // focus/blur morphs to focusin/out; ensure we're not firing them right now
- if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
- return;
- }
-
- if ( type.indexOf(".") >= 0 ) {
- // Namespaced trigger; create a regexp to match event type in handle()
- namespaces = type.split(".");
- type = namespaces.shift();
- namespaces.sort();
- }
- ontype = type.indexOf(":") < 0 && "on" + type;
-
- // Caller can pass in a jQuery.Event object, Object, or just an event type string
- event = event[ jQuery.expando ] ?
- event :
- new jQuery.Event( type, typeof event === "object" && event );
-
- // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
- event.isTrigger = onlyHandlers ? 2 : 3;
- event.namespace = namespaces.join(".");
- event.namespace_re = event.namespace ?
- new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
- null;
-
- // Clean up the event in case it is being reused
- event.result = undefined;
- if ( !event.target ) {
- event.target = elem;
- }
-
- // Clone any incoming data and prepend the event, creating the handler arg list
- data = data == null ?
- [ event ] :
- jQuery.makeArray( data, [ event ] );
-
- // Allow special events to draw outside the lines
- special = jQuery.event.special[ type ] || {};
- if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
- return;
- }
-
- // Determine event propagation path in advance, per W3C events spec (#9951)
- // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
- if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
-
- bubbleType = special.delegateType || type;
- if ( !rfocusMorph.test( bubbleType + type ) ) {
- cur = cur.parentNode;
- }
- for ( ; cur; cur = cur.parentNode ) {
- eventPath.push( cur );
- tmp = cur;
- }
-
- // Only add window if we got to document (e.g., not plain obj or detached DOM)
- if ( tmp === (elem.ownerDocument || document) ) {
- eventPath.push( tmp.defaultView || tmp.parentWindow || window );
- }
- }
-
- // Fire handlers on the event path
- i = 0;
- while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
-
- event.type = i > 1 ?
- bubbleType :
- special.bindType || type;
-
- // jQuery handler
- handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
- if ( handle ) {
- handle.apply( cur, data );
- }
-
- // Native handler
- handle = ontype && cur[ ontype ];
- if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
- event.preventDefault();
- }
- }
- event.type = type;
-
- // If nobody prevented the default action, do it now
- if ( !onlyHandlers && !event.isDefaultPrevented() ) {
-
- if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&
- jQuery.acceptData( elem ) ) {
-
- // Call a native DOM method on the target with the same name name as the event.
- // Can't use an .isFunction() check here because IE6/7 fails that test.
- // Don't do default actions on window, that's where global variables be (#6170)
- if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {
-
- // Don't re-trigger an onFOO event when we call its FOO() method
- tmp = elem[ ontype ];
-
- if ( tmp ) {
- elem[ ontype ] = null;
- }
-
- // Prevent re-triggering of the same event, since we already bubbled it above
- jQuery.event.triggered = type;
- try {
- elem[ type ]();
- } catch ( e ) {
- // IE<9 dies on focus/blur to hidden element (#1486,#12518)
- // only reproducible on winXP IE8 native, not IE9 in IE8 mode
- }
- jQuery.event.triggered = undefined;
-
- if ( tmp ) {
- elem[ ontype ] = tmp;
- }
- }
- }
- }
-
- return event.result;
- },
-
- dispatch: function( event ) {
-
- // Make a writable jQuery.Event from the native event object
- event = jQuery.event.fix( event );
-
- var i, ret, handleObj, matched, j,
- handlerQueue = [],
- args = core_slice.call( arguments ),
- handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],
- special = jQuery.event.special[ event.type ] || {};
-
- // Use the fix-ed jQuery.Event rather than the (read-only) native event
- args[0] = event;
- event.delegateTarget = this;
-
- // Call the preDispatch hook for the mapped type, and let it bail if desired
- if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
- return;
- }
-
- // Determine handlers
- handlerQueue = jQuery.event.handlers.call( this, event, handlers );
-
- // Run delegates first; they may want to stop propagation beneath us
- i = 0;
- while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
- event.currentTarget = matched.elem;
-
- j = 0;
- while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
-
- // Triggered event must either 1) have no namespace, or
- // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
- if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
-
- event.handleObj = handleObj;
- event.data = handleObj.data;
-
- ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
- .apply( matched.elem, args );
-
- if ( ret !== undefined ) {
- if ( (event.result = ret) === false ) {
- event.preventDefault();
- event.stopPropagation();
- }
- }
- }
- }
- }
-
- // Call the postDispatch hook for the mapped type
- if ( special.postDispatch ) {
- special.postDispatch.call( this, event );
- }
-
- return event.result;
- },
-
- handlers: function( event, handlers ) {
- var sel, handleObj, matches, i,
- handlerQueue = [],
- delegateCount = handlers.delegateCount,
- cur = event.target;
-
- // Find delegate handlers
- // Black-hole SVG <use> instance trees (#13180)
- // Avoid non-left-click bubbling in Firefox (#3861)
- if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
-
- /* jshint eqeqeq: false */
- for ( ; cur != this; cur = cur.parentNode || this ) {
- /* jshint eqeqeq: true */
-
- // Don't check non-elements (#13208)
- // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
- if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) {
- matches = [];
- for ( i = 0; i < delegateCount; i++ ) {
- handleObj = handlers[ i ];
-
- // Don't conflict with Object.prototype properties (#13203)
- sel = handleObj.selector + " ";
-
- if ( matches[ sel ] === undefined ) {
- matches[ sel ] = handleObj.needsContext ?
- jQuery( sel, this ).index( cur ) >= 0 :
- jQuery.find( sel, this, null, [ cur ] ).length;
- }
- if ( matches[ sel ] ) {
- matches.push( handleObj );
- }
- }
- if ( matches.length ) {
- handlerQueue.push({ elem: cur, handlers: matches });
- }
- }
- }
- }
-
- // Add the remaining (directly-bound) handlers
- if ( delegateCount < handlers.length ) {
- handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
- }
-
- return handlerQueue;
- },
-
- fix: function( event ) {
- if ( event[ jQuery.expando ] ) {
- return event;
- }
-
- // Create a writable copy of the event object and normalize some properties
- var i, prop, copy,
- type = event.type,
- originalEvent = event,
- fixHook = this.fixHooks[ type ];
-
- if ( !fixHook ) {
- this.fixHooks[ type ] = fixHook =
- rmouseEvent.test( type ) ? this.mouseHooks :
- rkeyEvent.test( type ) ? this.keyHooks :
- {};
- }
- copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
-
- event = new jQuery.Event( originalEvent );
-
- i = copy.length;
- while ( i-- ) {
- prop = copy[ i ];
- event[ prop ] = originalEvent[ prop ];
- }
-
- // Support: IE<9
- // Fix target property (#1925)
- if ( !event.target ) {
- event.target = originalEvent.srcElement || document;
- }
-
- // Support: Chrome 23+, Safari?
- // Target should not be a text node (#504, #13143)
- if ( event.target.nodeType === 3 ) {
- event.target = event.target.parentNode;
- }
-
- // Support: IE<9
- // For mouse/key events, metaKey==false if it's undefined (#3368, #11328)
- event.metaKey = !!event.metaKey;
-
- return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
- },
-
- // Includes some event props shared by KeyEvent and MouseEvent
- props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
-
- fixHooks: {},
-
- keyHooks: {
- props: "char charCode key keyCode".split(" "),
- filter: function( event, original ) {
-
- // Add which for key events
- if ( event.which == null ) {
- event.which = original.charCode != null ? original.charCode : original.keyCode;
- }
-
- return event;
- }
- },
-
- mouseHooks: {
- props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
- filter: function( event, original ) {
- var body, eventDoc, doc,
- button = original.button,
- fromElement = original.fromElement;
-
- // Calculate pageX/Y if missing and clientX/Y available
- if ( event.pageX == null && original.clientX != null ) {
- eventDoc = event.target.ownerDocument || document;
- doc = eventDoc.documentElement;
- body = eventDoc.body;
-
- event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
- event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
- }
-
- // Add relatedTarget, if necessary
- if ( !event.relatedTarget && fromElement ) {
- event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
- }
-
- // Add which for click: 1 === left; 2 === middle; 3 === right
- // Note: button is not normalized, so don't use it
- if ( !event.which && button !== undefined ) {
- event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
- }
-
- return event;
- }
- },
-
- special: {
- load: {
- // Prevent triggered image.load events from bubbling to window.load
- noBubble: true
- },
- focus: {
- // Fire native event if possible so blur/focus sequence is correct
- trigger: function() {
- if ( this !== safeActiveElement() && this.focus ) {
- try {
- this.focus();
- return false;
- } catch ( e ) {
- // Support: IE<9
- // If we error on focus to hidden element (#1486, #12518),
- // let .trigger() run the handlers
- }
- }
- },
- delegateType: "focusin"
- },
- blur: {
- trigger: function() {
- if ( this === safeActiveElement() && this.blur ) {
- this.blur();
- return false;
- }
- },
- delegateType: "focusout"
- },
- click: {
- // For checkbox, fire native event so checked state will be right
- trigger: function() {
- if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {
- this.click();
- return false;
- }
- },
-
- // For cross-browser consistency, don't fire native .click() on links
- _default: function( event ) {
- return jQuery.nodeName( event.target, "a" );
- }
- },
-
- beforeunload: {
- postDispatch: function( event ) {
-
- // Even when returnValue equals to undefined Firefox will still show alert
- if ( event.result !== undefined ) {
- event.originalEvent.returnValue = event.result;
- }
- }
- }
- },
-
- simulate: function( type, elem, event, bubble ) {
- // Piggyback on a donor event to simulate a different one.
- // Fake originalEvent to avoid donor's stopPropagation, but if the
- // simulated event prevents default then we do the same on the donor.
- var e = jQuery.extend(
- new jQuery.Event(),
- event,
- {
- type: type,
- isSimulated: true,
- originalEvent: {}
- }
- );
- if ( bubble ) {
- jQuery.event.trigger( e, null, elem );
- } else {
- jQuery.event.dispatch.call( elem, e );
- }
- if ( e.isDefaultPrevented() ) {
- event.preventDefault();
- }
- }
-};
-
-jQuery.removeEvent = document.removeEventListener ?
- function( elem, type, handle ) {
- if ( elem.removeEventListener ) {
- elem.removeEventListener( type, handle, false );
- }
- } :
- function( elem, type, handle ) {
- var name = "on" + type;
-
- if ( elem.detachEvent ) {
-
- // #8545, #7054, preventing memory leaks for custom events in IE6-8
- // detachEvent needed property on element, by name of that event, to properly expose it to GC
- if ( typeof elem[ name ] === core_strundefined ) {
- elem[ name ] = null;
- }
-
- elem.detachEvent( name, handle );
- }
- };
-
-jQuery.Event = function( src, props ) {
- // Allow instantiation without the 'new' keyword
- if ( !(this instanceof jQuery.Event) ) {
- return new jQuery.Event( src, props );
- }
-
- // Event object
- if ( src && src.type ) {
- this.originalEvent = src;
- this.type = src.type;
-
- // Events bubbling up the document may have been marked as prevented
- // by a handler lower down the tree; reflect the correct value.
- this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
- src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
-
- // Event type
- } else {
- this.type = src;
- }
-
- // Put explicitly provided properties onto the event object
- if ( props ) {
- jQuery.extend( this, props );
- }
-
- // Create a timestamp if incoming event doesn't have one
- this.timeStamp = src && src.timeStamp || jQuery.now();
-
- // Mark it as fixed
- this[ jQuery.expando ] = true;
-};
-
-// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
-// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
-jQuery.Event.prototype = {
- isDefaultPrevented: returnFalse,
- isPropagationStopped: returnFalse,
- isImmediatePropagationStopped: returnFalse,
-
- preventDefault: function() {
- var e = this.originalEvent;
-
- this.isDefaultPrevented = returnTrue;
- if ( !e ) {
- return;
- }
-
- // If preventDefault exists, run it on the original event
- if ( e.preventDefault ) {
- e.preventDefault();
-
- // Support: IE
- // Otherwise set the returnValue property of the original event to false
- } else {
- e.returnValue = false;
- }
- },
- stopPropagation: function() {
- var e = this.originalEvent;
-
- this.isPropagationStopped = returnTrue;
- if ( !e ) {
- return;
- }
- // If stopPropagation exists, run it on the original event
- if ( e.stopPropagation ) {
- e.stopPropagation();
- }
-
- // Support: IE
- // Set the cancelBubble property of the original event to true
- e.cancelBubble = true;
- },
- stopImmediatePropagation: function() {
- this.isImmediatePropagationStopped = returnTrue;
- this.stopPropagation();
- }
-};
-
-// Create mouseenter/leave events using mouseover/out and event-time checks
-jQuery.each({
- mouseenter: "mouseover",
- mouseleave: "mouseout"
-}, function( orig, fix ) {
- jQuery.event.special[ orig ] = {
- delegateType: fix,
- bindType: fix,
-
- handle: function( event ) {
- var ret,
- target = this,
- related = event.relatedTarget,
- handleObj = event.handleObj;
-
- // For mousenter/leave call the handler if related is outside the target.
- // NB: No relatedTarget if the mouse left/entered the browser window
- if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
- event.type = handleObj.origType;
- ret = handleObj.handler.apply( this, arguments );
- event.type = fix;
- }
- return ret;
- }
- };
-});
-
-// IE submit delegation
-if ( !jQuery.support.submitBubbles ) {
-
- jQuery.event.special.submit = {
- setup: function() {
- // Only need this for delegated form submit events
- if ( jQuery.nodeName( this, "form" ) ) {
- return false;
- }
-
- // Lazy-add a submit handler when a descendant form may potentially be submitted
- jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
- // Node name check avoids a VML-related crash in IE (#9807)
- var elem = e.target,
- form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
- if ( form && !jQuery._data( form, "submitBubbles" ) ) {
- jQuery.event.add( form, "submit._submit", function( event ) {
- event._submit_bubble = true;
- });
- jQuery._data( form, "submitBubbles", true );
- }
- });
- // return undefined since we don't need an event listener
- },
-
- postDispatch: function( event ) {
- // If form was submitted by the user, bubble the event up the tree
- if ( event._submit_bubble ) {
- delete event._submit_bubble;
- if ( this.parentNode && !event.isTrigger ) {
- jQuery.event.simulate( "submit", this.parentNode, event, true );
- }
- }
- },
-
- teardown: function() {
- // Only need this for delegated form submit events
- if ( jQuery.nodeName( this, "form" ) ) {
- return false;
- }
-
- // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
- jQuery.event.remove( this, "._submit" );
- }
- };
-}
-
-// IE change delegation and checkbox/radio fix
-if ( !jQuery.support.changeBubbles ) {
-
- jQuery.event.special.change = {
-
- setup: function() {
-
- if ( rformElems.test( this.nodeName ) ) {
- // IE doesn't fire change on a check/radio until blur; trigger it on click
- // after a propertychange. Eat the blur-change in special.change.handle.
- // This still fires onchange a second time for check/radio after blur.
- if ( this.type === "checkbox" || this.type === "radio" ) {
- jQuery.event.add( this, "propertychange._change", function( event ) {
- if ( event.originalEvent.propertyName === "checked" ) {
- this._just_changed = true;
- }
- });
- jQuery.event.add( this, "click._change", function( event ) {
- if ( this._just_changed && !event.isTrigger ) {
- this._just_changed = false;
- }
- // Allow triggered, simulated change events (#11500)
- jQuery.event.simulate( "change", this, event, true );
- });
- }
- return false;
- }
- // Delegated event; lazy-add a change handler on descendant inputs
- jQuery.event.add( this, "beforeactivate._change", function( e ) {
- var elem = e.target;
-
- if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) {
- jQuery.event.add( elem, "change._change", function( event ) {
- if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
- jQuery.event.simulate( "change", this.parentNode, event, true );
- }
- });
- jQuery._data( elem, "changeBubbles", true );
- }
- });
- },
-
- handle: function( event ) {
- var elem = event.target;
-
- // Swallow native change events from checkbox/radio, we already triggered them above
- if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
- return event.handleObj.handler.apply( this, arguments );
- }
- },
-
- teardown: function() {
- jQuery.event.remove( this, "._change" );
-
- return !rformElems.test( this.nodeName );
- }
- };
-}
-
-// Create "bubbling" focus and blur events
-if ( !jQuery.support.focusinBubbles ) {
- jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
-
- // Attach a single capturing handler while someone wants focusin/focusout
- var attaches = 0,
- handler = function( event ) {
- jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
- };
-
- jQuery.event.special[ fix ] = {
- setup: function() {
- if ( attaches++ === 0 ) {
- document.addEventListener( orig, handler, true );
- }
- },
- teardown: function() {
- if ( --attaches === 0 ) {
- document.removeEventListener( orig, handler, true );
- }
- }
- };
- });
-}
-
-jQuery.fn.extend({
-
- on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
- var type, origFn;
-
- // Types can be a map of types/handlers
- if ( typeof types === "object" ) {
- // ( types-Object, selector, data )
- if ( typeof selector !== "string" ) {
- // ( types-Object, data )
- data = data || selector;
- selector = undefined;
- }
- for ( type in types ) {
- this.on( type, selector, data, types[ type ], one );
- }
- return this;
- }
-
- if ( data == null && fn == null ) {
- // ( types, fn )
- fn = selector;
- data = selector = undefined;
- } else if ( fn == null ) {
- if ( typeof selector === "string" ) {
- // ( types, selector, fn )
- fn = data;
- data = undefined;
- } else {
- // ( types, data, fn )
- fn = data;
- data = selector;
- selector = undefined;
- }
- }
- if ( fn === false ) {
- fn = returnFalse;
- } else if ( !fn ) {
- return this;
- }
-
- if ( one === 1 ) {
- origFn = fn;
- fn = function( event ) {
- // Can use an empty set, since event contains the info
- jQuery().off( event );
- return origFn.apply( this, arguments );
- };
- // Use same guid so caller can remove using origFn
- fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
- }
- return this.each( function() {
- jQuery.event.add( this, types, fn, data, selector );
- });
- },
- one: function( types, selector, data, fn ) {
- return this.on( types, selector, data, fn, 1 );
- },
- off: function( types, selector, fn ) {
- var handleObj, type;
- if ( types && types.preventDefault && types.handleObj ) {
- // ( event ) dispatched jQuery.Event
- handleObj = types.handleObj;
- jQuery( types.delegateTarget ).off(
- handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
- handleObj.selector,
- handleObj.handler
- );
- return this;
- }
- if ( typeof types === "object" ) {
- // ( types-object [, selector] )
- for ( type in types ) {
- this.off( type, selector, types[ type ] );
- }
- return this;
- }
- if ( selector === false || typeof selector === "function" ) {
- // ( types [, fn] )
- fn = selector;
- selector = undefined;
- }
- if ( fn === false ) {
- fn = returnFalse;
- }
- return this.each(function() {
- jQuery.event.remove( this, types, fn, selector );
- });
- },
-
- trigger: function( type, data ) {
- return this.each(function() {
- jQuery.event.trigger( type, data, this );
- });
- },
- triggerHandler: function( type, data ) {
- var elem = this[0];
- if ( elem ) {
- return jQuery.event.trigger( type, data, elem, true );
- }
- }
-});
-var isSimple = /^.[^:#\[\.,]*$/,
- rparentsprev = /^(?:parents|prev(?:Until|All))/,
- rneedsContext = jQuery.expr.match.needsContext,
- // methods guaranteed to produce a unique set when starting from a unique set
- guaranteedUnique = {
- children: true,
- contents: true,
- next: true,
- prev: true
- };
-
-jQuery.fn.extend({
- find: function( selector ) {
- var i,
- ret = [],
- self = this,
- len = self.length;
-
- if ( typeof selector !== "string" ) {
- return this.pushStack( jQuery( selector ).filter(function() {
- for ( i = 0; i < len; i++ ) {
- if ( jQuery.contains( self[ i ], this ) ) {
- return true;
- }
- }
- }) );
- }
-
- for ( i = 0; i < len; i++ ) {
- jQuery.find( selector, self[ i ], ret );
- }
-
- // Needed because $( selector, context ) becomes $( context ).find( selector )
- ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
- ret.selector = this.selector ? this.selector + " " + selector : selector;
- return ret;
- },
-
- has: function( target ) {
- var i,
- targets = jQuery( target, this ),
- len = targets.length;
-
- return this.filter(function() {
- for ( i = 0; i < len; i++ ) {
- if ( jQuery.contains( this, targets[i] ) ) {
- return true;
- }
- }
- });
- },
-
- not: function( selector ) {
- return this.pushStack( winnow(this, selector || [], true) );
- },
-
- filter: function( selector ) {
- return this.pushStack( winnow(this, selector || [], false) );
- },
-
- is: function( selector ) {
- return !!winnow(
- this,
-
- // If this is a positional/relative selector, check membership in the returned set
- // so $("p:first").is("p:last") won't return true for a doc with two "p".
- typeof selector === "string" && rneedsContext.test( selector ) ?
- jQuery( selector ) :
- selector || [],
- false
- ).length;
- },
-
- closest: function( selectors, context ) {
- var cur,
- i = 0,
- l = this.length,
- ret = [],
- pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
- jQuery( selectors, context || this.context ) :
- 0;
-
- for ( ; i < l; i++ ) {
- for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {
- // Always skip document fragments
- if ( cur.nodeType < 11 && (pos ?
- pos.index(cur) > -1 :
-
- // Don't pass non-elements to Sizzle
- cur.nodeType === 1 &&
- jQuery.find.matchesSelector(cur, selectors)) ) {
-
- cur = ret.push( cur );
- break;
- }
- }
- }
-
- return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret );
- },
-
- // Determine the position of an element within
- // the matched set of elements
- index: function( elem ) {
-
- // No argument, return index in parent
- if ( !elem ) {
- return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;
- }
-
- // index in selector
- if ( typeof elem === "string" ) {
- return jQuery.inArray( this[0], jQuery( elem ) );
- }
-
- // Locate the position of the desired element
- return jQuery.inArray(
- // If it receives a jQuery object, the first element is used
- elem.jquery ? elem[0] : elem, this );
- },
-
- add: function( selector, context ) {
- var set = typeof selector === "string" ?
- jQuery( selector, context ) :
- jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
- all = jQuery.merge( this.get(), set );
-
- return this.pushStack( jQuery.unique(all) );
- },
-
- addBack: function( selector ) {
- return this.add( selector == null ?
- this.prevObject : this.prevObject.filter(selector)
- );
- }
-});
-
-function sibling( cur, dir ) {
- do {
- cur = cur[ dir ];
- } while ( cur && cur.nodeType !== 1 );
-
- return cur;
-}
-
-jQuery.each({
- parent: function( elem ) {
- var parent = elem.parentNode;
- return parent && parent.nodeType !== 11 ? parent : null;
- },
- parents: function( elem ) {
- return jQuery.dir( elem, "parentNode" );
- },
- parentsUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "parentNode", until );
- },
- next: function( elem ) {
- return sibling( elem, "nextSibling" );
- },
- prev: function( elem ) {
- return sibling( elem, "previousSibling" );
- },
- nextAll: function( elem ) {
- return jQuery.dir( elem, "nextSibling" );
- },
- prevAll: function( elem ) {
- return jQuery.dir( elem, "previousSibling" );
- },
- nextUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "nextSibling", until );
- },
- prevUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "previousSibling", until );
- },
- siblings: function( elem ) {
- return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
- },
- children: function( elem ) {
- return jQuery.sibling( elem.firstChild );
- },
- contents: function( elem ) {
- return jQuery.nodeName( elem, "iframe" ) ?
- elem.contentDocument || elem.contentWindow.document :
- jQuery.merge( [], elem.childNodes );
- }
-}, function( name, fn ) {
- jQuery.fn[ name ] = function( until, selector ) {
- var ret = jQuery.map( this, fn, until );
-
- if ( name.slice( -5 ) !== "Until" ) {
- selector = until;
- }
-
- if ( selector && typeof selector === "string" ) {
- ret = jQuery.filter( selector, ret );
- }
-
- if ( this.length > 1 ) {
- // Remove duplicates
- if ( !guaranteedUnique[ name ] ) {
- ret = jQuery.unique( ret );
- }
-
- // Reverse order for parents* and prev-derivatives
- if ( rparentsprev.test( name ) ) {
- ret = ret.reverse();
- }
- }
-
- return this.pushStack( ret );
- };
-});
-
-jQuery.extend({
- filter: function( expr, elems, not ) {
- var elem = elems[ 0 ];
-
- if ( not ) {
- expr = ":not(" + expr + ")";
- }
-
- return elems.length === 1 && elem.nodeType === 1 ?
- jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
- jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
- return elem.nodeType === 1;
- }));
- },
-
- dir: function( elem, dir, until ) {
- var matched = [],
- cur = elem[ dir ];
-
- while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
- if ( cur.nodeType === 1 ) {
- matched.push( cur );
- }
- cur = cur[dir];
- }
- return matched;
- },
-
- sibling: function( n, elem ) {
- var r = [];
-
- for ( ; n; n = n.nextSibling ) {
- if ( n.nodeType === 1 && n !== elem ) {
- r.push( n );
- }
- }
-
- return r;
- }
-});
-
-// Implement the identical functionality for filter and not
-function winnow( elements, qualifier, not ) {
- if ( jQuery.isFunction( qualifier ) ) {
- return jQuery.grep( elements, function( elem, i ) {
- /* jshint -W018 */
- return !!qualifier.call( elem, i, elem ) !== not;
- });
-
- }
-
- if ( qualifier.nodeType ) {
- return jQuery.grep( elements, function( elem ) {
- return ( elem === qualifier ) !== not;
- });
-
- }
-
- if ( typeof qualifier === "string" ) {
- if ( isSimple.test( qualifier ) ) {
- return jQuery.filter( qualifier, elements, not );
- }
-
- qualifier = jQuery.filter( qualifier, elements );
- }
-
- return jQuery.grep( elements, function( elem ) {
- return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not;
- });
-}
-function createSafeFragment( document ) {
- var list = nodeNames.split( "|" ),
- safeFrag = document.createDocumentFragment();
-
- if ( safeFrag.createElement ) {
- while ( list.length ) {
- safeFrag.createElement(
- list.pop()
- );
- }
- }
- return safeFrag;
-}
-
-var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
- "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
- rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
- rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
- rleadingWhitespace = /^\s+/,
- rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
- rtagName = /<([\w:]+)/,
- rtbody = /<tbody/i,
- rhtml = /<|&#?\w+;/,
- rnoInnerhtml = /<(?:script|style|link)/i,
- manipulation_rcheckableType = /^(?:checkbox|radio)$/i,
- // checked="checked" or checked
- rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
- rscriptType = /^$|\/(?:java|ecma)script/i,
- rscriptTypeMasked = /^true\/(.*)/,
- rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
-
- // We have to close these tags to support XHTML (#13200)
- wrapMap = {
- option: [ 1, "<select multiple='multiple'>", "</select>" ],
- legend: [ 1, "<fieldset>", "</fieldset>" ],
- area: [ 1, "<map>", "</map>" ],
- param: [ 1, "<object>", "</object>" ],
- thead: [ 1, "<table>", "</table>" ],
- tr: [ 2, "<table><tbody>", "</tbody></table>" ],
- col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
- td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
-
- // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
- // unless wrapped in a div with non-breaking characters in front of it.
- _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]
- },
- safeFragment = createSafeFragment( document ),
- fragmentDiv = safeFragment.appendChild( document.createElement("div") );
-
-wrapMap.optgroup = wrapMap.option;
-wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
-wrapMap.th = wrapMap.td;
-
-jQuery.fn.extend({
- text: function( value ) {
- return jQuery.access( this, function( value ) {
- return value === undefined ?
- jQuery.text( this ) :
- this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
- }, null, value, arguments.length );
- },
-
- append: function() {
- return this.domManip( arguments, function( elem ) {
- if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
- var target = manipulationTarget( this, elem );
- target.appendChild( elem );
- }
- });
- },
-
- prepend: function() {
- return this.domManip( arguments, function( elem ) {
- if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
- var target = manipulationTarget( this, elem );
- target.insertBefore( elem, target.firstChild );
- }
- });
- },
-
- before: function() {
- return this.domManip( arguments, function( elem ) {
- if ( this.parentNode ) {
- this.parentNode.insertBefore( elem, this );
- }
- });
- },
-
- after: function() {
- return this.domManip( arguments, function( elem ) {
- if ( this.parentNode ) {
- this.parentNode.insertBefore( elem, this.nextSibling );
- }
- });
- },
-
- // keepData is for internal use only--do not document
- remove: function( selector, keepData ) {
- var elem,
- elems = selector ? jQuery.filter( selector, this ) : this,
- i = 0;
-
- for ( ; (elem = elems[i]) != null; i++ ) {
-
- if ( !keepData && elem.nodeType === 1 ) {
- jQuery.cleanData( getAll( elem ) );
- }
-
- if ( elem.parentNode ) {
- if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
- setGlobalEval( getAll( elem, "script" ) );
- }
- elem.parentNode.removeChild( elem );
- }
- }
-
- return this;
- },
-
- empty: function() {
- var elem,
- i = 0;
-
- for ( ; (elem = this[i]) != null; i++ ) {
- // Remove element nodes and prevent memory leaks
- if ( elem.nodeType === 1 ) {
- jQuery.cleanData( getAll( elem, false ) );
- }
-
- // Remove any remaining nodes
- while ( elem.firstChild ) {
- elem.removeChild( elem.firstChild );
- }
-
- // If this is a select, ensure that it displays empty (#12336)
- // Support: IE<9
- if ( elem.options && jQuery.nodeName( elem, "select" ) ) {
- elem.options.length = 0;
- }
- }
-
- return this;
- },
-
- clone: function( dataAndEvents, deepDataAndEvents ) {
- dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
- deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
-
- return this.map( function () {
- return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
- });
- },
-
- html: function( value ) {
- return jQuery.access( this, function( value ) {
- var elem = this[0] || {},
- i = 0,
- l = this.length;
-
- if ( value === undefined ) {
- return elem.nodeType === 1 ?
- elem.innerHTML.replace( rinlinejQuery, "" ) :
- undefined;
- }
-
- // See if we can take a shortcut and just use innerHTML
- if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
- ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) &&
- ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
- !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
-
- value = value.replace( rxhtmlTag, "<$1></$2>" );
-
- try {
- for (; i < l; i++ ) {
- // Remove element nodes and prevent memory leaks
- elem = this[i] || {};
- if ( elem.nodeType === 1 ) {
- jQuery.cleanData( getAll( elem, false ) );
- elem.innerHTML = value;
- }
- }
-
- elem = 0;
-
- // If using innerHTML throws an exception, use the fallback method
- } catch(e) {}
- }
-
- if ( elem ) {
- this.empty().append( value );
- }
- }, null, value, arguments.length );
- },
-
- replaceWith: function() {
- var
- // Snapshot the DOM in case .domManip sweeps something relevant into its fragment
- args = jQuery.map( this, function( elem ) {
- return [ elem.nextSibling, elem.parentNode ];
- }),
- i = 0;
-
- // Make the changes, replacing each context element with the new content
- this.domManip( arguments, function( elem ) {
- var next = args[ i++ ],
- parent = args[ i++ ];
-
- if ( parent ) {
- // Don't use the snapshot next if it has moved (#13810)
- if ( next && next.parentNode !== parent ) {
- next = this.nextSibling;
- }
- jQuery( this ).remove();
- parent.insertBefore( elem, next );
- }
- // Allow new content to include elements from the context set
- }, true );
-
- // Force removal if there was no new content (e.g., from empty arguments)
- return i ? this : this.remove();
- },
-
- detach: function( selector ) {
- return this.remove( selector, true );
- },
-
- domManip: function( args, callback, allowIntersection ) {
-
- // Flatten any nested arrays
- args = core_concat.apply( [], args );
-
- var first, node, hasScripts,
- scripts, doc, fragment,
- i = 0,
- l = this.length,
- set = this,
- iNoClone = l - 1,
- value = args[0],
- isFunction = jQuery.isFunction( value );
-
- // We can't cloneNode fragments that contain checked, in WebKit
- if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) {
- return this.each(function( index ) {
- var self = set.eq( index );
- if ( isFunction ) {
- args[0] = value.call( this, index, self.html() );
- }
- self.domManip( args, callback, allowIntersection );
- });
- }
-
- if ( l ) {
- fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this );
- first = fragment.firstChild;
-
- if ( fragment.childNodes.length === 1 ) {
- fragment = first;
- }
-
- if ( first ) {
- scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
- hasScripts = scripts.length;
-
- // Use the original fragment for the last item instead of the first because it can end up
- // being emptied incorrectly in certain situations (#8070).
- for ( ; i < l; i++ ) {
- node = fragment;
-
- if ( i !== iNoClone ) {
- node = jQuery.clone( node, true, true );
-
- // Keep references to cloned scripts for later restoration
- if ( hasScripts ) {
- jQuery.merge( scripts, getAll( node, "script" ) );
- }
- }
-
- callback.call( this[i], node, i );
- }
-
- if ( hasScripts ) {
- doc = scripts[ scripts.length - 1 ].ownerDocument;
-
- // Reenable scripts
- jQuery.map( scripts, restoreScript );
-
- // Evaluate executable scripts on first document insertion
- for ( i = 0; i < hasScripts; i++ ) {
- node = scripts[ i ];
- if ( rscriptType.test( node.type || "" ) &&
- !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
-
- if ( node.src ) {
- // Hope ajax is available...
- jQuery._evalUrl( node.src );
- } else {
- jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );
- }
- }
- }
- }
-
- // Fix #11809: Avoid leaking memory
- fragment = first = null;
- }
- }
-
- return this;
- }
-});
-
-// Support: IE<8
-// Manipulating tables requires a tbody
-function manipulationTarget( elem, content ) {
- return jQuery.nodeName( elem, "table" ) &&
- jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ?
-
- elem.getElementsByTagName("tbody")[0] ||
- elem.appendChild( elem.ownerDocument.createElement("tbody") ) :
- elem;
-}
-
-// Replace/restore the type attribute of script elements for safe DOM manipulation
-function disableScript( elem ) {
- elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type;
- return elem;
-}
-function restoreScript( elem ) {
- var match = rscriptTypeMasked.exec( elem.type );
- if ( match ) {
- elem.type = match[1];
- } else {
- elem.removeAttribute("type");
- }
- return elem;
-}
-
-// Mark scripts as having already been evaluated
-function setGlobalEval( elems, refElements ) {
- var elem,
- i = 0;
- for ( ; (elem = elems[i]) != null; i++ ) {
- jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) );
- }
-}
-
-function cloneCopyEvent( src, dest ) {
-
- if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
- return;
- }
-
- var type, i, l,
- oldData = jQuery._data( src ),
- curData = jQuery._data( dest, oldData ),
- events = oldData.events;
-
- if ( events ) {
- delete curData.handle;
- curData.events = {};
-
- for ( type in events ) {
- for ( i = 0, l = events[ type ].length; i < l; i++ ) {
- jQuery.event.add( dest, type, events[ type ][ i ] );
- }
- }
- }
-
- // make the cloned public data object a copy from the original
- if ( curData.data ) {
- curData.data = jQuery.extend( {}, curData.data );
- }
-}
-
-function fixCloneNodeIssues( src, dest ) {
- var nodeName, e, data;
-
- // We do not need to do anything for non-Elements
- if ( dest.nodeType !== 1 ) {
- return;
- }
-
- nodeName = dest.nodeName.toLowerCase();
-
- // IE6-8 copies events bound via attachEvent when using cloneNode.
- if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) {
- data = jQuery._data( dest );
-
- for ( e in data.events ) {
- jQuery.removeEvent( dest, e, data.handle );
- }
-
- // Event data gets referenced instead of copied if the expando gets copied too
- dest.removeAttribute( jQuery.expando );
- }
-
- // IE blanks contents when cloning scripts, and tries to evaluate newly-set text
- if ( nodeName === "script" && dest.text !== src.text ) {
- disableScript( dest ).text = src.text;
- restoreScript( dest );
-
- // IE6-10 improperly clones children of object elements using classid.
- // IE10 throws NoModificationAllowedError if parent is null, #12132.
- } else if ( nodeName === "object" ) {
- if ( dest.parentNode ) {
- dest.outerHTML = src.outerHTML;
- }
-
- // This path appears unavoidable for IE9. When cloning an object
- // element in IE9, the outerHTML strategy above is not sufficient.
- // If the src has innerHTML and the destination does not,
- // copy the src.innerHTML into the dest.innerHTML. #10324
- if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {
- dest.innerHTML = src.innerHTML;
- }
-
- } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) {
- // IE6-8 fails to persist the checked state of a cloned checkbox
- // or radio button. Worse, IE6-7 fail to give the cloned element
- // a checked appearance if the defaultChecked value isn't also set
-
- dest.defaultChecked = dest.checked = src.checked;
-
- // IE6-7 get confused and end up setting the value of a cloned
- // checkbox/radio button to an empty string instead of "on"
- if ( dest.value !== src.value ) {
- dest.value = src.value;
- }
-
- // IE6-8 fails to return the selected option to the default selected
- // state when cloning options
- } else if ( nodeName === "option" ) {
- dest.defaultSelected = dest.selected = src.defaultSelected;
-
- // IE6-8 fails to set the defaultValue to the correct value when
- // cloning other types of input fields
- } else if ( nodeName === "input" || nodeName === "textarea" ) {
- dest.defaultValue = src.defaultValue;
- }
-}
-
-jQuery.each({
- appendTo: "append",
- prependTo: "prepend",
- insertBefore: "before",
- insertAfter: "after",
- replaceAll: "replaceWith"
-}, function( name, original ) {
- jQuery.fn[ name ] = function( selector ) {
- var elems,
- i = 0,
- ret = [],
- insert = jQuery( selector ),
- last = insert.length - 1;
-
- for ( ; i <= last; i++ ) {
- elems = i === last ? this : this.clone(true);
- jQuery( insert[i] )[ original ]( elems );
-
- // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
- core_push.apply( ret, elems.get() );
- }
-
- return this.pushStack( ret );
- };
-});
-
-function getAll( context, tag ) {
- var elems, elem,
- i = 0,
- found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) :
- typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) :
- undefined;
-
- if ( !found ) {
- for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {
- if ( !tag || jQuery.nodeName( elem, tag ) ) {
- found.push( elem );
- } else {
- jQuery.merge( found, getAll( elem, tag ) );
- }
- }
- }
-
- return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
- jQuery.merge( [ context ], found ) :
- found;
-}
-
-// Used in buildFragment, fixes the defaultChecked property
-function fixDefaultChecked( elem ) {
- if ( manipulation_rcheckableType.test( elem.type ) ) {
- elem.defaultChecked = elem.checked;
- }
-}
-
-jQuery.extend({
- clone: function( elem, dataAndEvents, deepDataAndEvents ) {
- var destElements, node, clone, i, srcElements,
- inPage = jQuery.contains( elem.ownerDocument, elem );
-
- if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
- clone = elem.cloneNode( true );
-
- // IE<=8 does not properly clone detached, unknown element nodes
- } else {
- fragmentDiv.innerHTML = elem.outerHTML;
- fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
- }
-
- if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
- (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
-
- // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
- destElements = getAll( clone );
- srcElements = getAll( elem );
-
- // Fix all IE cloning issues
- for ( i = 0; (node = srcElements[i]) != null; ++i ) {
- // Ensure that the destination node is not null; Fixes #9587
- if ( destElements[i] ) {
- fixCloneNodeIssues( node, destElements[i] );
- }
- }
- }
-
- // Copy the events from the original to the clone
- if ( dataAndEvents ) {
- if ( deepDataAndEvents ) {
- srcElements = srcElements || getAll( elem );
- destElements = destElements || getAll( clone );
-
- for ( i = 0; (node = srcElements[i]) != null; i++ ) {
- cloneCopyEvent( node, destElements[i] );
- }
- } else {
- cloneCopyEvent( elem, clone );
- }
- }
-
- // Preserve script evaluation history
- destElements = getAll( clone, "script" );
- if ( destElements.length > 0 ) {
- setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
- }
-
- destElements = srcElements = node = null;
-
- // Return the cloned set
- return clone;
- },
-
- buildFragment: function( elems, context, scripts, selection ) {
- var j, elem, contains,
- tmp, tag, tbody, wrap,
- l = elems.length,
-
- // Ensure a safe fragment
- safe = createSafeFragment( context ),
-
- nodes = [],
- i = 0;
-
- for ( ; i < l; i++ ) {
- elem = elems[ i ];
-
- if ( elem || elem === 0 ) {
-
- // Add nodes directly
- if ( jQuery.type( elem ) === "object" ) {
- jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
-
- // Convert non-html into a text node
- } else if ( !rhtml.test( elem ) ) {
- nodes.push( context.createTextNode( elem ) );
-
- // Convert html into DOM nodes
- } else {
- tmp = tmp || safe.appendChild( context.createElement("div") );
-
- // Deserialize a standard representation
- tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase();
- wrap = wrapMap[ tag ] || wrapMap._default;
-
- tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2];
-
- // Descend through wrappers to the right content
- j = wrap[0];
- while ( j-- ) {
- tmp = tmp.lastChild;
- }
-
- // Manually add leading whitespace removed by IE
- if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
- nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );
- }
-
- // Remove IE's autoinserted <tbody> from table fragments
- if ( !jQuery.support.tbody ) {
-
- // String was a <table>, *may* have spurious <tbody>
- elem = tag === "table" && !rtbody.test( elem ) ?
- tmp.firstChild :
-
- // String was a bare <thead> or <tfoot>
- wrap[1] === "<table>" && !rtbody.test( elem ) ?
- tmp :
- 0;
-
- j = elem && elem.childNodes.length;
- while ( j-- ) {
- if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) {
- elem.removeChild( tbody );
- }
- }
- }
-
- jQuery.merge( nodes, tmp.childNodes );
-
- // Fix #12392 for WebKit and IE > 9
- tmp.textContent = "";
-
- // Fix #12392 for oldIE
- while ( tmp.firstChild ) {
- tmp.removeChild( tmp.firstChild );
- }
-
- // Remember the top-level container for proper cleanup
- tmp = safe.lastChild;
- }
- }
- }
-
- // Fix #11356: Clear elements from fragment
- if ( tmp ) {
- safe.removeChild( tmp );
- }
-
- // Reset defaultChecked for any radios and checkboxes
- // about to be appended to the DOM in IE 6/7 (#8060)
- if ( !jQuery.support.appendChecked ) {
- jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
- }
-
- i = 0;
- while ( (elem = nodes[ i++ ]) ) {
-
- // #4087 - If origin and destination elements are the same, and this is
- // that element, do not do anything
- if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
- continue;
- }
-
- contains = jQuery.contains( elem.ownerDocument, elem );
-
- // Append to fragment
- tmp = getAll( safe.appendChild( elem ), "script" );
-
- // Preserve script evaluation history
- if ( contains ) {
- setGlobalEval( tmp );
- }
-
- // Capture executables
- if ( scripts ) {
- j = 0;
- while ( (elem = tmp[ j++ ]) ) {
- if ( rscriptType.test( elem.type || "" ) ) {
- scripts.push( elem );
- }
- }
- }
- }
-
- tmp = null;
-
- return safe;
- },
-
- cleanData: function( elems, /* internal */ acceptData ) {
- var elem, type, id, data,
- i = 0,
- internalKey = jQuery.expando,
- cache = jQuery.cache,
- deleteExpando = jQuery.support.deleteExpando,
- special = jQuery.event.special;
-
- for ( ; (elem = elems[i]) != null; i++ ) {
-
- if ( acceptData || jQuery.acceptData( elem ) ) {
-
- id = elem[ internalKey ];
- data = id && cache[ id ];
-
- if ( data ) {
- if ( data.events ) {
- for ( type in data.events ) {
- if ( special[ type ] ) {
- jQuery.event.remove( elem, type );
-
- // This is a shortcut to avoid jQuery.event.remove's overhead
- } else {
- jQuery.removeEvent( elem, type, data.handle );
- }
- }
- }
-
- // Remove cache only if it was not already removed by jQuery.event.remove
- if ( cache[ id ] ) {
-
- delete cache[ id ];
-
- // IE does not allow us to delete expando properties from nodes,
- // nor does it have a removeAttribute function on Document nodes;
- // we must handle all of these cases
- if ( deleteExpando ) {
- delete elem[ internalKey ];
-
- } else if ( typeof elem.removeAttribute !== core_strundefined ) {
- elem.removeAttribute( internalKey );
-
- } else {
- elem[ internalKey ] = null;
- }
-
- core_deletedIds.push( id );
- }
- }
- }
- }
- },
-
- _evalUrl: function( url ) {
- return jQuery.ajax({
- url: url,
- type: "GET",
- dataType: "script",
- async: false,
- global: false,
- "throws": true
- });
- }
-});
-jQuery.fn.extend({
- wrapAll: function( html ) {
- if ( jQuery.isFunction( html ) ) {
- return this.each(function(i) {
- jQuery(this).wrapAll( html.call(this, i) );
- });
- }
-
- if ( this[0] ) {
- // The elements to wrap the target around
- var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
-
- if ( this[0].parentNode ) {
- wrap.insertBefore( this[0] );
- }
-
- wrap.map(function() {
- var elem = this;
-
- while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
- elem = elem.firstChild;
- }
-
- return elem;
- }).append( this );
- }
-
- return this;
- },
-
- wrapInner: function( html ) {
- if ( jQuery.isFunction( html ) ) {
- return this.each(function(i) {
- jQuery(this).wrapInner( html.call(this, i) );
- });
- }
-
- return this.each(function() {
- var self = jQuery( this ),
- contents = self.contents();
-
- if ( contents.length ) {
- contents.wrapAll( html );
-
- } else {
- self.append( html );
- }
- });
- },
-
- wrap: function( html ) {
- var isFunction = jQuery.isFunction( html );
-
- return this.each(function(i) {
- jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
- });
- },
-
- unwrap: function() {
- return this.parent().each(function() {
- if ( !jQuery.nodeName( this, "body" ) ) {
- jQuery( this ).replaceWith( this.childNodes );
- }
- }).end();
- }
-});
-var iframe, getStyles, curCSS,
- ralpha = /alpha\([^)]*\)/i,
- ropacity = /opacity\s*=\s*([^)]*)/,
- rposition = /^(top|right|bottom|left)$/,
- // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
- // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
- rdisplayswap = /^(none|table(?!-c[ea]).+)/,
- rmargin = /^margin/,
- rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
- rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
- rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ),
- elemdisplay = { BODY: "block" },
-
- cssShow = { position: "absolute", visibility: "hidden", display: "block" },
- cssNormalTransform = {
- letterSpacing: 0,
- fontWeight: 400
- },
-
- cssExpand = [ "Top", "Right", "Bottom", "Left" ],
- cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
-
-// return a css property mapped to a potentially vendor prefixed property
-function vendorPropName( style, name ) {
-
- // shortcut for names that are not vendor prefixed
- if ( name in style ) {
- return name;
- }
-
- // check for vendor prefixed names
- var capName = name.charAt(0).toUpperCase() + name.slice(1),
- origName = name,
- i = cssPrefixes.length;
-
- while ( i-- ) {
- name = cssPrefixes[ i ] + capName;
- if ( name in style ) {
- return name;
- }
- }
-
- return origName;
-}
-
-function isHidden( elem, el ) {
- // isHidden might be called from jQuery#filter function;
- // in that case, element will be second argument
- elem = el || elem;
- return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
-}
-
-function showHide( elements, show ) {
- var display, elem, hidden,
- values = [],
- index = 0,
- length = elements.length;
-
- for ( ; index < length; index++ ) {
- elem = elements[ index ];
- if ( !elem.style ) {
- continue;
- }
-
- values[ index ] = jQuery._data( elem, "olddisplay" );
- display = elem.style.display;
- if ( show ) {
- // Reset the inline display of this element to learn if it is
- // being hidden by cascaded rules or not
- if ( !values[ index ] && display === "none" ) {
- elem.style.display = "";
- }
-
- // Set elements which have been overridden with display: none
- // in a stylesheet to whatever the default browser style is
- // for such an element
- if ( elem.style.display === "" && isHidden( elem ) ) {
- values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) );
- }
- } else {
-
- if ( !values[ index ] ) {
- hidden = isHidden( elem );
-
- if ( display && display !== "none" || !hidden ) {
- jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
- }
- }
- }
- }
-
- // Set the display of most of the elements in a second loop
- // to avoid the constant reflow
- for ( index = 0; index < length; index++ ) {
- elem = elements[ index ];
- if ( !elem.style ) {
- continue;
- }
- if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
- elem.style.display = show ? values[ index ] || "" : "none";
- }
- }
-
- return elements;
-}
-
-jQuery.fn.extend({
- css: function( name, value ) {
- return jQuery.access( this, function( elem, name, value ) {
- var len, styles,
- map = {},
- i = 0;
-
- if ( jQuery.isArray( name ) ) {
- styles = getStyles( elem );
- len = name.length;
-
- for ( ; i < len; i++ ) {
- map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
- }
-
- return map;
- }
-
- return value !== undefined ?
- jQuery.style( elem, name, value ) :
- jQuery.css( elem, name );
- }, name, value, arguments.length > 1 );
- },
- show: function() {
- return showHide( this, true );
- },
- hide: function() {
- return showHide( this );
- },
- toggle: function( state ) {
- if ( typeof state === "boolean" ) {
- return state ? this.show() : this.hide();
- }
-
- return this.each(function() {
- if ( isHidden( this ) ) {
- jQuery( this ).show();
- } else {
- jQuery( this ).hide();
- }
- });
- }
-});
-
-jQuery.extend({
- // Add in style property hooks for overriding the default
- // behavior of getting and setting a style property
- cssHooks: {
- opacity: {
- get: function( elem, computed ) {
- if ( computed ) {
- // We should always get a number back from opacity
- var ret = curCSS( elem, "opacity" );
- return ret === "" ? "1" : ret;
- }
- }
- }
- },
-
- // Don't automatically add "px" to these possibly-unitless properties
- cssNumber: {
- "columnCount": true,
- "fillOpacity": true,
- "fontWeight": true,
- "lineHeight": true,
- "opacity": true,
- "order": true,
- "orphans": true,
- "widows": true,
- "zIndex": true,
- "zoom": true
- },
-
- // Add in properties whose names you wish to fix before
- // setting or getting the value
- cssProps: {
- // normalize float css property
- "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
- },
-
- // Get and set the style property on a DOM Node
- style: function( elem, name, value, extra ) {
- // Don't set styles on text and comment nodes
- if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
- return;
- }
-
- // Make sure that we're working with the right name
- var ret, type, hooks,
- origName = jQuery.camelCase( name ),
- style = elem.style;
-
- name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
-
- // gets hook for the prefixed version
- // followed by the unprefixed version
- hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
-
- // Check if we're setting a value
- if ( value !== undefined ) {
- type = typeof value;
-
- // convert relative number strings (+= or -=) to relative numbers. #7345
- if ( type === "string" && (ret = rrelNum.exec( value )) ) {
- value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
- // Fixes bug #9237
- type = "number";
- }
-
- // Make sure that NaN and null values aren't set. See: #7116
- if ( value == null || type === "number" && isNaN( value ) ) {
- return;
- }
-
- // If a number was passed in, add 'px' to the (except for certain CSS properties)
- if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
- value += "px";
- }
-
- // Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
- // but it would mean to define eight (for every problematic property) identical functions
- if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) {
- style[ name ] = "inherit";
- }
-
- // If a hook was provided, use that value, otherwise just set the specified value
- if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
-
- // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
- // Fixes bug #5509
- try {
- style[ name ] = value;
- } catch(e) {}
- }
-
- } else {
- // If a hook was provided get the non-computed value from there
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
- return ret;
- }
-
- // Otherwise just get the value from the style object
- return style[ name ];
- }
- },
-
- css: function( elem, name, extra, styles ) {
- var num, val, hooks,
- origName = jQuery.camelCase( name );
-
- // Make sure that we're working with the right name
- name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
-
- // gets hook for the prefixed version
- // followed by the unprefixed version
- hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
-
- // If a hook was provided get the computed value from there
- if ( hooks && "get" in hooks ) {
- val = hooks.get( elem, true, extra );
- }
-
- // Otherwise, if a way to get the computed value exists, use that
- if ( val === undefined ) {
- val = curCSS( elem, name, styles );
- }
-
- //convert "normal" to computed value
- if ( val === "normal" && name in cssNormalTransform ) {
- val = cssNormalTransform[ name ];
- }
-
- // Return, converting to number if forced or a qualifier was provided and val looks numeric
- if ( extra === "" || extra ) {
- num = parseFloat( val );
- return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
- }
- return val;
- }
-});
-
-// NOTE: we've included the "window" in window.getComputedStyle
-// because jsdom on node.js will break without it.
-if ( window.getComputedStyle ) {
- getStyles = function( elem ) {
- return window.getComputedStyle( elem, null );
- };
-
- curCSS = function( elem, name, _computed ) {
- var width, minWidth, maxWidth,
- computed = _computed || getStyles( elem ),
-
- // getPropertyValue is only needed for .css('filter') in IE9, see #12537
- ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined,
- style = elem.style;
-
- if ( computed ) {
-
- if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
- ret = jQuery.style( elem, name );
- }
-
- // A tribute to the "awesome hack by Dean Edwards"
- // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
- // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
- // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
- if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
-
- // Remember the original values
- width = style.width;
- minWidth = style.minWidth;
- maxWidth = style.maxWidth;
-
- // Put in the new values to get a computed value out
- style.minWidth = style.maxWidth = style.width = ret;
- ret = computed.width;
-
- // Revert the changed values
- style.width = width;
- style.minWidth = minWidth;
- style.maxWidth = maxWidth;
- }
- }
-
- return ret;
- };
-} else if ( document.documentElement.currentStyle ) {
- getStyles = function( elem ) {
- return elem.currentStyle;
- };
-
- curCSS = function( elem, name, _computed ) {
- var left, rs, rsLeft,
- computed = _computed || getStyles( elem ),
- ret = computed ? computed[ name ] : undefined,
- style = elem.style;
-
- // Avoid setting ret to empty string here
- // so we don't default to auto
- if ( ret == null && style && style[ name ] ) {
- ret = style[ name ];
- }
-
- // From the awesome hack by Dean Edwards
- // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
-
- // If we're not dealing with a regular pixel number
- // but a number that has a weird ending, we need to convert it to pixels
- // but not position css attributes, as those are proportional to the parent element instead
- // and we can't measure the parent instead because it might trigger a "stacking dolls" problem
- if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
-
- // Remember the original values
- left = style.left;
- rs = elem.runtimeStyle;
- rsLeft = rs && rs.left;
-
- // Put in the new values to get a computed value out
- if ( rsLeft ) {
- rs.left = elem.currentStyle.left;
- }
- style.left = name === "fontSize" ? "1em" : ret;
- ret = style.pixelLeft + "px";
-
- // Revert the changed values
- style.left = left;
- if ( rsLeft ) {
- rs.left = rsLeft;
- }
- }
-
- return ret === "" ? "auto" : ret;
- };
-}
-
-function setPositiveNumber( elem, value, subtract ) {
- var matches = rnumsplit.exec( value );
- return matches ?
- // Guard against undefined "subtract", e.g., when used as in cssHooks
- Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
- value;
-}
-
-function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
- var i = extra === ( isBorderBox ? "border" : "content" ) ?
- // If we already have the right measurement, avoid augmentation
- 4 :
- // Otherwise initialize for horizontal or vertical properties
- name === "width" ? 1 : 0,
-
- val = 0;
-
- for ( ; i < 4; i += 2 ) {
- // both box models exclude margin, so add it if we want it
- if ( extra === "margin" ) {
- val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
- }
-
- if ( isBorderBox ) {
- // border-box includes padding, so remove it if we want content
- if ( extra === "content" ) {
- val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
- }
-
- // at this point, extra isn't border nor margin, so remove border
- if ( extra !== "margin" ) {
- val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
- }
- } else {
- // at this point, extra isn't content, so add padding
- val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
-
- // at this point, extra isn't content nor padding, so add border
- if ( extra !== "padding" ) {
- val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
- }
- }
- }
-
- return val;
-}
-
-function getWidthOrHeight( elem, name, extra ) {
-
- // Start with offset property, which is equivalent to the border-box value
- var valueIsBorderBox = true,
- val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
- styles = getStyles( elem ),
- isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
-
- // some non-html elements return undefined for offsetWidth, so check for null/undefined
- // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
- // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
- if ( val <= 0 || val == null ) {
- // Fall back to computed then uncomputed css if necessary
- val = curCSS( elem, name, styles );
- if ( val < 0 || val == null ) {
- val = elem.style[ name ];
- }
-
- // Computed unit is not pixels. Stop here and return.
- if ( rnumnonpx.test(val) ) {
- return val;
- }
-
- // we need the check for style in case a browser which returns unreliable values
- // for getComputedStyle silently falls back to the reliable elem.style
- valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );
-
- // Normalize "", auto, and prepare for extra
- val = parseFloat( val ) || 0;
- }
-
- // use the active box-sizing model to add/subtract irrelevant styles
- return ( val +
- augmentWidthOrHeight(
- elem,
- name,
- extra || ( isBorderBox ? "border" : "content" ),
- valueIsBorderBox,
- styles
- )
- ) + "px";
-}
-
-// Try to determine the default display value of an element
-function css_defaultDisplay( nodeName ) {
- var doc = document,
- display = elemdisplay[ nodeName ];
-
- if ( !display ) {
- display = actualDisplay( nodeName, doc );
-
- // If the simple way fails, read from inside an iframe
- if ( display === "none" || !display ) {
- // Use the already-created iframe if possible
- iframe = ( iframe ||
- jQuery("<iframe frameborder='0' width='0' height='0'/>")
- .css( "cssText", "display:block !important" )
- ).appendTo( doc.documentElement );
-
- // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
- doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;
- doc.write("<!doctype html><html><body>");
- doc.close();
-
- display = actualDisplay( nodeName, doc );
- iframe.detach();
- }
-
- // Store the correct default display
- elemdisplay[ nodeName ] = display;
- }
-
- return display;
-}
-
-// Called ONLY from within css_defaultDisplay
-function actualDisplay( name, doc ) {
- var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
- display = jQuery.css( elem[0], "display" );
- elem.remove();
- return display;
-}
-
-jQuery.each([ "height", "width" ], function( i, name ) {
- jQuery.cssHooks[ name ] = {
- get: function( elem, computed, extra ) {
- if ( computed ) {
- // certain elements can have dimension info if we invisibly show them
- // however, it must have a current display style that would benefit from this
- return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ?
- jQuery.swap( elem, cssShow, function() {
- return getWidthOrHeight( elem, name, extra );
- }) :
- getWidthOrHeight( elem, name, extra );
- }
- },
-
- set: function( elem, value, extra ) {
- var styles = extra && getStyles( elem );
- return setPositiveNumber( elem, value, extra ?
- augmentWidthOrHeight(
- elem,
- name,
- extra,
- jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
- styles
- ) : 0
- );
- }
- };
-});
-
-if ( !jQuery.support.opacity ) {
- jQuery.cssHooks.opacity = {
- get: function( elem, computed ) {
- // IE uses filters for opacity
- return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
- ( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
- computed ? "1" : "";
- },
-
- set: function( elem, value ) {
- var style = elem.style,
- currentStyle = elem.currentStyle,
- opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
- filter = currentStyle && currentStyle.filter || style.filter || "";
-
- // IE has trouble with opacity if it does not have layout
- // Force it by setting the zoom level
- style.zoom = 1;
-
- // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
- // if value === "", then remove inline opacity #12685
- if ( ( value >= 1 || value === "" ) &&
- jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
- style.removeAttribute ) {
-
- // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
- // if "filter:" is present at all, clearType is disabled, we want to avoid this
- // style.removeAttribute is IE Only, but so apparently is this code path...
- style.removeAttribute( "filter" );
-
- // if there is no filter style applied in a css rule or unset inline opacity, we are done
- if ( value === "" || currentStyle && !currentStyle.filter ) {
- return;
- }
- }
-
- // otherwise, set new filter values
- style.filter = ralpha.test( filter ) ?
- filter.replace( ralpha, opacity ) :
- filter + " " + opacity;
- }
- };
-}
-
-// These hooks cannot be added until DOM ready because the support test
-// for it is not run until after DOM ready
-jQuery(function() {
- if ( !jQuery.support.reliableMarginRight ) {
- jQuery.cssHooks.marginRight = {
- get: function( elem, computed ) {
- if ( computed ) {
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- // Work around by temporarily setting element display to inline-block
- return jQuery.swap( elem, { "display": "inline-block" },
- curCSS, [ elem, "marginRight" ] );
- }
- }
- };
- }
-
- // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
- // getComputedStyle returns percent when specified for top/left/bottom/right
- // rather than make the css module depend on the offset module, we just check for it here
- if ( !jQuery.support.pixelPosition && jQuery.fn.position ) {
- jQuery.each( [ "top", "left" ], function( i, prop ) {
- jQuery.cssHooks[ prop ] = {
- get: function( elem, computed ) {
- if ( computed ) {
- computed = curCSS( elem, prop );
- // if curCSS returns percentage, fallback to offset
- return rnumnonpx.test( computed ) ?
- jQuery( elem ).position()[ prop ] + "px" :
- computed;
- }
- }
- };
- });
- }
-
-});
-
-if ( jQuery.expr && jQuery.expr.filters ) {
- jQuery.expr.filters.hidden = function( elem ) {
- // Support: Opera <= 12.12
- // Opera reports offsetWidths and offsetHeights less than zero on some elements
- return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||
- (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
- };
-
- jQuery.expr.filters.visible = function( elem ) {
- return !jQuery.expr.filters.hidden( elem );
- };
-}
-
-// These hooks are used by animate to expand properties
-jQuery.each({
- margin: "",
- padding: "",
- border: "Width"
-}, function( prefix, suffix ) {
- jQuery.cssHooks[ prefix + suffix ] = {
- expand: function( value ) {
- var i = 0,
- expanded = {},
-
- // assumes a single number if not a string
- parts = typeof value === "string" ? value.split(" ") : [ value ];
-
- for ( ; i < 4; i++ ) {
- expanded[ prefix + cssExpand[ i ] + suffix ] =
- parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
- }
-
- return expanded;
- }
- };
-
- if ( !rmargin.test( prefix ) ) {
- jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
- }
-});
-var r20 = /%20/g,
- rbracket = /\[\]$/,
- rCRLF = /\r?\n/g,
- rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
- rsubmittable = /^(?:input|select|textarea|keygen)/i;
-
-jQuery.fn.extend({
- serialize: function() {
- return jQuery.param( this.serializeArray() );
- },
- serializeArray: function() {
- return this.map(function(){
- // Can add propHook for "elements" to filter or add form elements
- var elements = jQuery.prop( this, "elements" );
- return elements ? jQuery.makeArray( elements ) : this;
- })
- .filter(function(){
- var type = this.type;
- // Use .is(":disabled") so that fieldset[disabled] works
- return this.name && !jQuery( this ).is( ":disabled" ) &&
- rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
- ( this.checked || !manipulation_rcheckableType.test( type ) );
- })
- .map(function( i, elem ){
- var val = jQuery( this ).val();
-
- return val == null ?
- null :
- jQuery.isArray( val ) ?
- jQuery.map( val, function( val ){
- return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
- }) :
- { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
- }).get();
- }
-});
-
-//Serialize an array of form elements or a set of
-//key/values into a query string
-jQuery.param = function( a, traditional ) {
- var prefix,
- s = [],
- add = function( key, value ) {
- // If value is a function, invoke it and return its value
- value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
- s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
- };
-
- // Set traditional to true for jQuery <= 1.3.2 behavior.
- if ( traditional === undefined ) {
- traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
- }
-
- // If an array was passed in, assume that it is an array of form elements.
- if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
- // Serialize the form elements
- jQuery.each( a, function() {
- add( this.name, this.value );
- });
-
- } else {
- // If traditional, encode the "old" way (the way 1.3.2 or older
- // did it), otherwise encode params recursively.
- for ( prefix in a ) {
- buildParams( prefix, a[ prefix ], traditional, add );
- }
- }
-
- // Return the resulting serialization
- return s.join( "&" ).replace( r20, "+" );
-};
-
-function buildParams( prefix, obj, traditional, add ) {
- var name;
-
- if ( jQuery.isArray( obj ) ) {
- // Serialize array item.
- jQuery.each( obj, function( i, v ) {
- if ( traditional || rbracket.test( prefix ) ) {
- // Treat each array item as a scalar.
- add( prefix, v );
-
- } else {
- // Item is non-scalar (array or object), encode its numeric index.
- buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
- }
- });
-
- } else if ( !traditional && jQuery.type( obj ) === "object" ) {
- // Serialize object item.
- for ( name in obj ) {
- buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
- }
-
- } else {
- // Serialize scalar item.
- add( prefix, obj );
- }
-}
-jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
- "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
- "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
-
- // Handle event binding
- jQuery.fn[ name ] = function( data, fn ) {
- return arguments.length > 0 ?
- this.on( name, null, data, fn ) :
- this.trigger( name );
- };
-});
-
-jQuery.fn.extend({
- hover: function( fnOver, fnOut ) {
- return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
- },
-
- bind: function( types, data, fn ) {
- return this.on( types, null, data, fn );
- },
- unbind: function( types, fn ) {
- return this.off( types, null, fn );
- },
-
- delegate: function( selector, types, data, fn ) {
- return this.on( types, selector, data, fn );
- },
- undelegate: function( selector, types, fn ) {
- // ( namespace ) or ( selector, types [, fn] )
- return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
- }
-});
-var
- // Document location
- ajaxLocParts,
- ajaxLocation,
- ajax_nonce = jQuery.now(),
-
- ajax_rquery = /\?/,
- rhash = /#.*$/,
- rts = /([?&])_=[^&]*/,
- rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
- // #7653, #8125, #8152: local protocol detection
- rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
- rnoContent = /^(?:GET|HEAD)$/,
- rprotocol = /^\/\//,
- rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
-
- // Keep a copy of the old load method
- _load = jQuery.fn.load,
-
- /* Prefilters
- * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
- * 2) These are called:
- * - BEFORE asking for a transport
- * - AFTER param serialization (s.data is a string if s.processData is true)
- * 3) key is the dataType
- * 4) the catchall symbol "*" can be used
- * 5) execution will start with transport dataType and THEN continue down to "*" if needed
- */
- prefilters = {},
-
- /* Transports bindings
- * 1) key is the dataType
- * 2) the catchall symbol "*" can be used
- * 3) selection will start with transport dataType and THEN go to "*" if needed
- */
- transports = {},
-
- // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
- allTypes = "*/".concat("*");
-
-// #8138, IE may throw an exception when accessing
-// a field from window.location if document.domain has been set
-try {
- ajaxLocation = location.href;
-} catch( e ) {
- // Use the href attribute of an A element
- // since IE will modify it given document.location
- ajaxLocation = document.createElement( "a" );
- ajaxLocation.href = "";
- ajaxLocation = ajaxLocation.href;
-}
-
-// Segment location into parts
-ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
-
-// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
-function addToPrefiltersOrTransports( structure ) {
-
- // dataTypeExpression is optional and defaults to "*"
- return function( dataTypeExpression, func ) {
-
- if ( typeof dataTypeExpression !== "string" ) {
- func = dataTypeExpression;
- dataTypeExpression = "*";
- }
-
- var dataType,
- i = 0,
- dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || [];
-
- if ( jQuery.isFunction( func ) ) {
- // For each dataType in the dataTypeExpression
- while ( (dataType = dataTypes[i++]) ) {
- // Prepend if requested
- if ( dataType[0] === "+" ) {
- dataType = dataType.slice( 1 ) || "*";
- (structure[ dataType ] = structure[ dataType ] || []).unshift( func );
-
- // Otherwise append
- } else {
- (structure[ dataType ] = structure[ dataType ] || []).push( func );
- }
- }
- }
- };
-}
-
-// Base inspection function for prefilters and transports
-function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
-
- var inspected = {},
- seekingTransport = ( structure === transports );
-
- function inspect( dataType ) {
- var selected;
- inspected[ dataType ] = true;
- jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
- var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
- if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
- options.dataTypes.unshift( dataTypeOrTransport );
- inspect( dataTypeOrTransport );
- return false;
- } else if ( seekingTransport ) {
- return !( selected = dataTypeOrTransport );
- }
- });
- return selected;
- }
-
- return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
-}
-
-// A special extend for ajax options
-// that takes "flat" options (not to be deep extended)
-// Fixes #9887
-function ajaxExtend( target, src ) {
- var deep, key,
- flatOptions = jQuery.ajaxSettings.flatOptions || {};
-
- for ( key in src ) {
- if ( src[ key ] !== undefined ) {
- ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
- }
- }
- if ( deep ) {
- jQuery.extend( true, target, deep );
- }
-
- return target;
-}
-
-jQuery.fn.load = function( url, params, callback ) {
- if ( typeof url !== "string" && _load ) {
- return _load.apply( this, arguments );
- }
-
- var selector, response, type,
- self = this,
- off = url.indexOf(" ");
-
- if ( off >= 0 ) {
- selector = url.slice( off, url.length );
- url = url.slice( 0, off );
- }
-
- // If it's a function
- if ( jQuery.isFunction( params ) ) {
-
- // We assume that it's the callback
- callback = params;
- params = undefined;
-
- // Otherwise, build a param string
- } else if ( params && typeof params === "object" ) {
- type = "POST";
- }
-
- // If we have elements to modify, make the request
- if ( self.length > 0 ) {
- jQuery.ajax({
- url: url,
-
- // if "type" variable is undefined, then "GET" method will be used
- type: type,
- dataType: "html",
- data: params
- }).done(function( responseText ) {
-
- // Save response for use in complete callback
- response = arguments;
-
- self.html( selector ?
-
- // If a selector was specified, locate the right elements in a dummy div
- // Exclude scripts to avoid IE 'Permission Denied' errors
- jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :
-
- // Otherwise use the full result
- responseText );
-
- }).complete( callback && function( jqXHR, status ) {
- self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
- });
- }
-
- return this;
-};
-
-// Attach a bunch of functions for handling common AJAX events
-jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){
- jQuery.fn[ type ] = function( fn ){
- return this.on( type, fn );
- };
-});
-
-jQuery.extend({
-
- // Counter for holding the number of active queries
- active: 0,
-
- // Last-Modified header cache for next request
- lastModified: {},
- etag: {},
-
- ajaxSettings: {
- url: ajaxLocation,
- type: "GET",
- isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
- global: true,
- processData: true,
- async: true,
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- /*
- timeout: 0,
- data: null,
- dataType: null,
- username: null,
- password: null,
- cache: null,
- throws: false,
- traditional: false,
- headers: {},
- */
-
- accepts: {
- "*": allTypes,
- text: "text/plain",
- html: "text/html",
- xml: "application/xml, text/xml",
- json: "application/json, text/javascript"
- },
-
- contents: {
- xml: /xml/,
- html: /html/,
- json: /json/
- },
-
- responseFields: {
- xml: "responseXML",
- text: "responseText",
- json: "responseJSON"
- },
-
- // Data converters
- // Keys separate source (or catchall "*") and destination types with a single space
- converters: {
-
- // Convert anything to text
- "* text": String,
-
- // Text to html (true = no transformation)
- "text html": true,
-
- // Evaluate text as a json expression
- "text json": jQuery.parseJSON,
-
- // Parse text as xml
- "text xml": jQuery.parseXML
- },
-
- // For options that shouldn't be deep extended:
- // you can add your own custom options here if
- // and when you create one that shouldn't be
- // deep extended (see ajaxExtend)
- flatOptions: {
- url: true,
- context: true
- }
- },
-
- // Creates a full fledged settings object into target
- // with both ajaxSettings and settings fields.
- // If target is omitted, writes into ajaxSettings.
- ajaxSetup: function( target, settings ) {
- return settings ?
-
- // Building a settings object
- ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
-
- // Extending ajaxSettings
- ajaxExtend( jQuery.ajaxSettings, target );
- },
-
- ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
- ajaxTransport: addToPrefiltersOrTransports( transports ),
-
- // Main method
- ajax: function( url, options ) {
-
- // If url is an object, simulate pre-1.5 signature
- if ( typeof url === "object" ) {
- options = url;
- url = undefined;
- }
-
- // Force options to be an object
- options = options || {};
-
- var // Cross-domain detection vars
- parts,
- // Loop variable
- i,
- // URL without anti-cache param
- cacheURL,
- // Response headers as string
- responseHeadersString,
- // timeout handle
- timeoutTimer,
-
- // To know if global events are to be dispatched
- fireGlobals,
-
- transport,
- // Response headers
- responseHeaders,
- // Create the final options object
- s = jQuery.ajaxSetup( {}, options ),
- // Callbacks context
- callbackContext = s.context || s,
- // Context for global events is callbackContext if it is a DOM node or jQuery collection
- globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
- jQuery( callbackContext ) :
- jQuery.event,
- // Deferreds
- deferred = jQuery.Deferred(),
- completeDeferred = jQuery.Callbacks("once memory"),
- // Status-dependent callbacks
- statusCode = s.statusCode || {},
- // Headers (they are sent all at once)
- requestHeaders = {},
- requestHeadersNames = {},
- // The jqXHR state
- state = 0,
- // Default abort message
- strAbort = "canceled",
- // Fake xhr
- jqXHR = {
- readyState: 0,
-
- // Builds headers hashtable if needed
- getResponseHeader: function( key ) {
- var match;
- if ( state === 2 ) {
- if ( !responseHeaders ) {
- responseHeaders = {};
- while ( (match = rheaders.exec( responseHeadersString )) ) {
- responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
- }
- }
- match = responseHeaders[ key.toLowerCase() ];
- }
- return match == null ? null : match;
- },
-
- // Raw string
- getAllResponseHeaders: function() {
- return state === 2 ? responseHeadersString : null;
- },
-
- // Caches the header
- setRequestHeader: function( name, value ) {
- var lname = name.toLowerCase();
- if ( !state ) {
- name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
- requestHeaders[ name ] = value;
- }
- return this;
- },
-
- // Overrides response content-type header
- overrideMimeType: function( type ) {
- if ( !state ) {
- s.mimeType = type;
- }
- return this;
- },
-
- // Status-dependent callbacks
- statusCode: function( map ) {
- var code;
- if ( map ) {
- if ( state < 2 ) {
- for ( code in map ) {
- // Lazy-add the new callback in a way that preserves old ones
- statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
- }
- } else {
- // Execute the appropriate callbacks
- jqXHR.always( map[ jqXHR.status ] );
- }
- }
- return this;
- },
-
- // Cancel the request
- abort: function( statusText ) {
- var finalText = statusText || strAbort;
- if ( transport ) {
- transport.abort( finalText );
- }
- done( 0, finalText );
- return this;
- }
- };
-
- // Attach deferreds
- deferred.promise( jqXHR ).complete = completeDeferred.add;
- jqXHR.success = jqXHR.done;
- jqXHR.error = jqXHR.fail;
-
- // Remove hash character (#7531: and string promotion)
- // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
- // Handle falsy url in the settings object (#10093: consistency with old signature)
- // We also use the url parameter if available
- s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
-
- // Alias method option to type as per ticket #12004
- s.type = options.method || options.type || s.method || s.type;
-
- // Extract dataTypes list
- s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""];
-
- // A cross-domain request is in order when we have a protocol:host:port mismatch
- if ( s.crossDomain == null ) {
- parts = rurl.exec( s.url.toLowerCase() );
- s.crossDomain = !!( parts &&
- ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
- ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
- ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
- );
- }
-
- // Convert data if not already a string
- if ( s.data && s.processData && typeof s.data !== "string" ) {
- s.data = jQuery.param( s.data, s.traditional );
- }
-
- // Apply prefilters
- inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
-
- // If request was aborted inside a prefilter, stop there
- if ( state === 2 ) {
- return jqXHR;
- }
-
- // We can fire global events as of now if asked to
- fireGlobals = s.global;
-
- // Watch for a new set of requests
- if ( fireGlobals && jQuery.active++ === 0 ) {
- jQuery.event.trigger("ajaxStart");
- }
-
- // Uppercase the type
- s.type = s.type.toUpperCase();
-
- // Determine if request has content
- s.hasContent = !rnoContent.test( s.type );
-
- // Save the URL in case we're toying with the If-Modified-Since
- // and/or If-None-Match header later on
- cacheURL = s.url;
-
- // More options handling for requests with no content
- if ( !s.hasContent ) {
-
- // If data is available, append data to url
- if ( s.data ) {
- cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
- // #9682: remove data so that it's not used in an eventual retry
- delete s.data;
- }
-
- // Add anti-cache in url if needed
- if ( s.cache === false ) {
- s.url = rts.test( cacheURL ) ?
-
- // If there is already a '_' parameter, set its value
- cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) :
-
- // Otherwise add one to the end
- cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++;
- }
- }
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if ( s.ifModified ) {
- if ( jQuery.lastModified[ cacheURL ] ) {
- jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
- }
- if ( jQuery.etag[ cacheURL ] ) {
- jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
- }
- }
-
- // Set the correct header, if data is being sent
- if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
- jqXHR.setRequestHeader( "Content-Type", s.contentType );
- }
-
- // Set the Accepts header for the server, depending on the dataType
- jqXHR.setRequestHeader(
- "Accept",
- s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
- s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
- s.accepts[ "*" ]
- );
-
- // Check for headers option
- for ( i in s.headers ) {
- jqXHR.setRequestHeader( i, s.headers[ i ] );
- }
-
- // Allow custom headers/mimetypes and early abort
- if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
- // Abort if not done already and return
- return jqXHR.abort();
- }
-
- // aborting is no longer a cancellation
- strAbort = "abort";
-
- // Install callbacks on deferreds
- for ( i in { success: 1, error: 1, complete: 1 } ) {
- jqXHR[ i ]( s[ i ] );
- }
-
- // Get transport
- transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
-
- // If no transport, we auto-abort
- if ( !transport ) {
- done( -1, "No Transport" );
- } else {
- jqXHR.readyState = 1;
-
- // Send global event
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
- }
- // Timeout
- if ( s.async && s.timeout > 0 ) {
- timeoutTimer = setTimeout(function() {
- jqXHR.abort("timeout");
- }, s.timeout );
- }
-
- try {
- state = 1;
- transport.send( requestHeaders, done );
- } catch ( e ) {
- // Propagate exception as error if not done
- if ( state < 2 ) {
- done( -1, e );
- // Simply rethrow otherwise
- } else {
- throw e;
- }
- }
- }
-
- // Callback for when everything is done
- function done( status, nativeStatusText, responses, headers ) {
- var isSuccess, success, error, response, modified,
- statusText = nativeStatusText;
-
- // Called once
- if ( state === 2 ) {
- return;
- }
-
- // State is "done" now
- state = 2;
-
- // Clear timeout if it exists
- if ( timeoutTimer ) {
- clearTimeout( timeoutTimer );
- }
-
- // Dereference transport for early garbage collection
- // (no matter how long the jqXHR object will be used)
- transport = undefined;
-
- // Cache response headers
- responseHeadersString = headers || "";
-
- // Set readyState
- jqXHR.readyState = status > 0 ? 4 : 0;
-
- // Determine if successful
- isSuccess = status >= 200 && status < 300 || status === 304;
-
- // Get response data
- if ( responses ) {
- response = ajaxHandleResponses( s, jqXHR, responses );
- }
-
- // Convert no matter what (that way responseXXX fields are always set)
- response = ajaxConvert( s, response, jqXHR, isSuccess );
-
- // If successful, handle type chaining
- if ( isSuccess ) {
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if ( s.ifModified ) {
- modified = jqXHR.getResponseHeader("Last-Modified");
- if ( modified ) {
- jQuery.lastModified[ cacheURL ] = modified;
- }
- modified = jqXHR.getResponseHeader("etag");
- if ( modified ) {
- jQuery.etag[ cacheURL ] = modified;
- }
- }
-
- // if no content
- if ( status === 204 || s.type === "HEAD" ) {
- statusText = "nocontent";
-
- // if not modified
- } else if ( status === 304 ) {
- statusText = "notmodified";
-
- // If we have data, let's convert it
- } else {
- statusText = response.state;
- success = response.data;
- error = response.error;
- isSuccess = !error;
- }
- } else {
- // We extract error from statusText
- // then normalize statusText and status for non-aborts
- error = statusText;
- if ( status || !statusText ) {
- statusText = "error";
- if ( status < 0 ) {
- status = 0;
- }
- }
- }
-
- // Set data for the fake xhr object
- jqXHR.status = status;
- jqXHR.statusText = ( nativeStatusText || statusText ) + "";
-
- // Success/Error
- if ( isSuccess ) {
- deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
- } else {
- deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
- }
-
- // Status-dependent callbacks
- jqXHR.statusCode( statusCode );
- statusCode = undefined;
-
- if ( fireGlobals ) {
- globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
- [ jqXHR, s, isSuccess ? success : error ] );
- }
-
- // Complete
- completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
-
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
- // Handle the global AJAX counter
- if ( !( --jQuery.active ) ) {
- jQuery.event.trigger("ajaxStop");
- }
- }
- }
-
- return jqXHR;
- },
-
- getJSON: function( url, data, callback ) {
- return jQuery.get( url, data, callback, "json" );
- },
-
- getScript: function( url, callback ) {
- return jQuery.get( url, undefined, callback, "script" );
- }
-});
-
-jQuery.each( [ "get", "post" ], function( i, method ) {
- jQuery[ method ] = function( url, data, callback, type ) {
- // shift arguments if data argument was omitted
- if ( jQuery.isFunction( data ) ) {
- type = type || callback;
- callback = data;
- data = undefined;
- }
-
- return jQuery.ajax({
- url: url,
- type: method,
- dataType: type,
- data: data,
- success: callback
- });
- };
-});
-
-/* Handles responses to an ajax request:
- * - finds the right dataType (mediates between content-type and expected dataType)
- * - returns the corresponding response
- */
-function ajaxHandleResponses( s, jqXHR, responses ) {
- var firstDataType, ct, finalDataType, type,
- contents = s.contents,
- dataTypes = s.dataTypes;
-
- // Remove auto dataType and get content-type in the process
- while( dataTypes[ 0 ] === "*" ) {
- dataTypes.shift();
- if ( ct === undefined ) {
- ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
- }
- }
-
- // Check if we're dealing with a known content-type
- if ( ct ) {
- for ( type in contents ) {
- if ( contents[ type ] && contents[ type ].test( ct ) ) {
- dataTypes.unshift( type );
- break;
- }
- }
- }
-
- // Check to see if we have a response for the expected dataType
- if ( dataTypes[ 0 ] in responses ) {
- finalDataType = dataTypes[ 0 ];
- } else {
- // Try convertible dataTypes
- for ( type in responses ) {
- if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
- finalDataType = type;
- break;
- }
- if ( !firstDataType ) {
- firstDataType = type;
- }
- }
- // Or just use first one
- finalDataType = finalDataType || firstDataType;
- }
-
- // If we found a dataType
- // We add the dataType to the list if needed
- // and return the corresponding response
- if ( finalDataType ) {
- if ( finalDataType !== dataTypes[ 0 ] ) {
- dataTypes.unshift( finalDataType );
- }
- return responses[ finalDataType ];
- }
-}
-
-/* Chain conversions given the request and the original response
- * Also sets the responseXXX fields on the jqXHR instance
- */
-function ajaxConvert( s, response, jqXHR, isSuccess ) {
- var conv2, current, conv, tmp, prev,
- converters = {},
- // Work with a copy of dataTypes in case we need to modify it for conversion
- dataTypes = s.dataTypes.slice();
-
- // Create converters map with lowercased keys
- if ( dataTypes[ 1 ] ) {
- for ( conv in s.converters ) {
- converters[ conv.toLowerCase() ] = s.converters[ conv ];
- }
- }
-
- current = dataTypes.shift();
-
- // Convert to each sequential dataType
- while ( current ) {
-
- if ( s.responseFields[ current ] ) {
- jqXHR[ s.responseFields[ current ] ] = response;
- }
-
- // Apply the dataFilter if provided
- if ( !prev && isSuccess && s.dataFilter ) {
- response = s.dataFilter( response, s.dataType );
- }
-
- prev = current;
- current = dataTypes.shift();
-
- if ( current ) {
-
- // There's only work to do if current dataType is non-auto
- if ( current === "*" ) {
-
- current = prev;
-
- // Convert response if prev dataType is non-auto and differs from current
- } else if ( prev !== "*" && prev !== current ) {
-
- // Seek a direct converter
- conv = converters[ prev + " " + current ] || converters[ "* " + current ];
-
- // If none found, seek a pair
- if ( !conv ) {
- for ( conv2 in converters ) {
-
- // If conv2 outputs current
- tmp = conv2.split( " " );
- if ( tmp[ 1 ] === current ) {
-
- // If prev can be converted to accepted input
- conv = converters[ prev + " " + tmp[ 0 ] ] ||
- converters[ "* " + tmp[ 0 ] ];
- if ( conv ) {
- // Condense equivalence converters
- if ( conv === true ) {
- conv = converters[ conv2 ];
-
- // Otherwise, insert the intermediate dataType
- } else if ( converters[ conv2 ] !== true ) {
- current = tmp[ 0 ];
- dataTypes.unshift( tmp[ 1 ] );
- }
- break;
- }
- }
- }
- }
-
- // Apply converter (if not an equivalence)
- if ( conv !== true ) {
-
- // Unless errors are allowed to bubble, catch and return them
- if ( conv && s[ "throws" ] ) {
- response = conv( response );
- } else {
- try {
- response = conv( response );
- } catch ( e ) {
- return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
- }
- }
- }
- }
- }
- }
-
- return { state: "success", data: response };
-}
-// Install script dataType
-jQuery.ajaxSetup({
- accepts: {
- script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
- },
- contents: {
- script: /(?:java|ecma)script/
- },
- converters: {
- "text script": function( text ) {
- jQuery.globalEval( text );
- return text;
- }
- }
-});
-
-// Handle cache's special case and global
-jQuery.ajaxPrefilter( "script", function( s ) {
- if ( s.cache === undefined ) {
- s.cache = false;
- }
- if ( s.crossDomain ) {
- s.type = "GET";
- s.global = false;
- }
-});
-
-// Bind script tag hack transport
-jQuery.ajaxTransport( "script", function(s) {
-
- // This transport only deals with cross domain requests
- if ( s.crossDomain ) {
-
- var script,
- head = document.head || jQuery("head")[0] || document.documentElement;
-
- return {
-
- send: function( _, callback ) {
-
- script = document.createElement("script");
-
- script.async = true;
-
- if ( s.scriptCharset ) {
- script.charset = s.scriptCharset;
- }
-
- script.src = s.url;
-
- // Attach handlers for all browsers
- script.onload = script.onreadystatechange = function( _, isAbort ) {
-
- if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
-
- // Handle memory leak in IE
- script.onload = script.onreadystatechange = null;
-
- // Remove the script
- if ( script.parentNode ) {
- script.parentNode.removeChild( script );
- }
-
- // Dereference the script
- script = null;
-
- // Callback if not abort
- if ( !isAbort ) {
- callback( 200, "success" );
- }
- }
- };
-
- // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
- // Use native DOM manipulation to avoid our domManip AJAX trickery
- head.insertBefore( script, head.firstChild );
- },
-
- abort: function() {
- if ( script ) {
- script.onload( undefined, true );
- }
- }
- };
- }
-});
-var oldCallbacks = [],
- rjsonp = /(=)\?(?=&|$)|\?\?/;
-
-// Default jsonp settings
-jQuery.ajaxSetup({
- jsonp: "callback",
- jsonpCallback: function() {
- var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) );
- this[ callback ] = true;
- return callback;
- }
-});
-
-// Detect, normalize options and install callbacks for jsonp requests
-jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
-
- var callbackName, overwritten, responseContainer,
- jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
- "url" :
- typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
- );
-
- // Handle iff the expected data type is "jsonp" or we have a parameter to set
- if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
-
- // Get callback name, remembering preexisting value associated with it
- callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
- s.jsonpCallback() :
- s.jsonpCallback;
-
- // Insert callback into url or form data
- if ( jsonProp ) {
- s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
- } else if ( s.jsonp !== false ) {
- s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
- }
-
- // Use data converter to retrieve json after script execution
- s.converters["script json"] = function() {
- if ( !responseContainer ) {
- jQuery.error( callbackName + " was not called" );
- }
- return responseContainer[ 0 ];
- };
-
- // force json dataType
- s.dataTypes[ 0 ] = "json";
-
- // Install callback
- overwritten = window[ callbackName ];
- window[ callbackName ] = function() {
- responseContainer = arguments;
- };
-
- // Clean-up function (fires after converters)
- jqXHR.always(function() {
- // Restore preexisting value
- window[ callbackName ] = overwritten;
-
- // Save back as free
- if ( s[ callbackName ] ) {
- // make sure that re-using the options doesn't screw things around
- s.jsonpCallback = originalSettings.jsonpCallback;
-
- // save the callback name for future use
- oldCallbacks.push( callbackName );
- }
-
- // Call if it was a function and we have a response
- if ( responseContainer && jQuery.isFunction( overwritten ) ) {
- overwritten( responseContainer[ 0 ] );
- }
-
- responseContainer = overwritten = undefined;
- });
-
- // Delegate to script
- return "script";
- }
-});
-var xhrCallbacks, xhrSupported,
- xhrId = 0,
- // #5280: Internet Explorer will keep connections alive if we don't abort on unload
- xhrOnUnloadAbort = window.ActiveXObject && function() {
- // Abort all pending requests
- var key;
- for ( key in xhrCallbacks ) {
- xhrCallbacks[ key ]( undefined, true );
- }
- };
-
-// Functions to create xhrs
-function createStandardXHR() {
- try {
- return new window.XMLHttpRequest();
- } catch( e ) {}
-}
-
-function createActiveXHR() {
- try {
- return new window.ActiveXObject("Microsoft.XMLHTTP");
- } catch( e ) {}
-}
-
-// Create the request object
-// (This is still attached to ajaxSettings for backward compatibility)
-jQuery.ajaxSettings.xhr = window.ActiveXObject ?
- /* Microsoft failed to properly
- * implement the XMLHttpRequest in IE7 (can't request local files),
- * so we use the ActiveXObject when it is available
- * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
- * we need a fallback.
- */
- function() {
- return !this.isLocal && createStandardXHR() || createActiveXHR();
- } :
- // For all other browsers, use the standard XMLHttpRequest object
- createStandardXHR;
-
-// Determine support properties
-xhrSupported = jQuery.ajaxSettings.xhr();
-jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
-xhrSupported = jQuery.support.ajax = !!xhrSupported;
-
-// Create transport if the browser can provide an xhr
-if ( xhrSupported ) {
-
- jQuery.ajaxTransport(function( s ) {
- // Cross domain only allowed if supported through XMLHttpRequest
- if ( !s.crossDomain || jQuery.support.cors ) {
-
- var callback;
-
- return {
- send: function( headers, complete ) {
-
- // Get a new xhr
- var handle, i,
- xhr = s.xhr();
-
- // Open the socket
- // Passing null username, generates a login popup on Opera (#2865)
- if ( s.username ) {
- xhr.open( s.type, s.url, s.async, s.username, s.password );
- } else {
- xhr.open( s.type, s.url, s.async );
- }
-
- // Apply custom fields if provided
- if ( s.xhrFields ) {
- for ( i in s.xhrFields ) {
- xhr[ i ] = s.xhrFields[ i ];
- }
- }
-
- // Override mime type if needed
- if ( s.mimeType && xhr.overrideMimeType ) {
- xhr.overrideMimeType( s.mimeType );
- }
-
- // X-Requested-With header
- // For cross-domain requests, seeing as conditions for a preflight are
- // akin to a jigsaw puzzle, we simply never set it to be sure.
- // (it can always be set on a per-request basis or even using ajaxSetup)
- // For same-domain requests, won't change header if already provided.
- if ( !s.crossDomain && !headers["X-Requested-With"] ) {
- headers["X-Requested-With"] = "XMLHttpRequest";
- }
-
- // Need an extra try/catch for cross domain requests in Firefox 3
- try {
- for ( i in headers ) {
- xhr.setRequestHeader( i, headers[ i ] );
- }
- } catch( err ) {}
-
- // Do send the request
- // This may raise an exception which is actually
- // handled in jQuery.ajax (so no try/catch here)
- xhr.send( ( s.hasContent && s.data ) || null );
-
- // Listener
- callback = function( _, isAbort ) {
- var status, responseHeaders, statusText, responses;
-
- // Firefox throws exceptions when accessing properties
- // of an xhr when a network error occurred
- // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
- try {
-
- // Was never called and is aborted or complete
- if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
-
- // Only called once
- callback = undefined;
-
- // Do not keep as active anymore
- if ( handle ) {
- xhr.onreadystatechange = jQuery.noop;
- if ( xhrOnUnloadAbort ) {
- delete xhrCallbacks[ handle ];
- }
- }
-
- // If it's an abort
- if ( isAbort ) {
- // Abort it manually if needed
- if ( xhr.readyState !== 4 ) {
- xhr.abort();
- }
- } else {
- responses = {};
- status = xhr.status;
- responseHeaders = xhr.getAllResponseHeaders();
-
- // When requesting binary data, IE6-9 will throw an exception
- // on any attempt to access responseText (#11426)
- if ( typeof xhr.responseText === "string" ) {
- responses.text = xhr.responseText;
- }
-
- // Firefox throws an exception when accessing
- // statusText for faulty cross-domain requests
- try {
- statusText = xhr.statusText;
- } catch( e ) {
- // We normalize with Webkit giving an empty statusText
- statusText = "";
- }
-
- // Filter status for non standard behaviors
-
- // If the request is local and we have data: assume a success
- // (success with no data won't get notified, that's the best we
- // can do given current implementations)
- if ( !status && s.isLocal && !s.crossDomain ) {
- status = responses.text ? 200 : 404;
- // IE - #1450: sometimes returns 1223 when it should be 204
- } else if ( status === 1223 ) {
- status = 204;
- }
- }
- }
- } catch( firefoxAccessException ) {
- if ( !isAbort ) {
- complete( -1, firefoxAccessException );
- }
- }
-
- // Call complete if needed
- if ( responses ) {
- complete( status, statusText, responses, responseHeaders );
- }
- };
-
- if ( !s.async ) {
- // if we're in sync mode we fire the callback
- callback();
- } else if ( xhr.readyState === 4 ) {
- // (IE6 & IE7) if it's in cache and has been
- // retrieved directly we need to fire the callback
- setTimeout( callback );
- } else {
- handle = ++xhrId;
- if ( xhrOnUnloadAbort ) {
- // Create the active xhrs callbacks list if needed
- // and attach the unload handler
- if ( !xhrCallbacks ) {
- xhrCallbacks = {};
- jQuery( window ).unload( xhrOnUnloadAbort );
- }
- // Add to list of active xhrs callbacks
- xhrCallbacks[ handle ] = callback;
- }
- xhr.onreadystatechange = callback;
- }
- },
-
- abort: function() {
- if ( callback ) {
- callback( undefined, true );
- }
- }
- };
- }
- });
-}
-var fxNow, timerId,
- rfxtypes = /^(?:toggle|show|hide)$/,
- rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ),
- rrun = /queueHooks$/,
- animationPrefilters = [ defaultPrefilter ],
- tweeners = {
- "*": [function( prop, value ) {
- var tween = this.createTween( prop, value ),
- target = tween.cur(),
- parts = rfxnum.exec( value ),
- unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
-
- // Starting value computation is required for potential unit mismatches
- start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&
- rfxnum.exec( jQuery.css( tween.elem, prop ) ),
- scale = 1,
- maxIterations = 20;
-
- if ( start && start[ 3 ] !== unit ) {
- // Trust units reported by jQuery.css
- unit = unit || start[ 3 ];
-
- // Make sure we update the tween properties later on
- parts = parts || [];
-
- // Iteratively approximate from a nonzero starting point
- start = +target || 1;
-
- do {
- // If previous iteration zeroed out, double until we get *something*
- // Use a string for doubling factor so we don't accidentally see scale as unchanged below
- scale = scale || ".5";
-
- // Adjust and apply
- start = start / scale;
- jQuery.style( tween.elem, prop, start + unit );
-
- // Update scale, tolerating zero or NaN from tween.cur()
- // And breaking the loop if scale is unchanged or perfect, or if we've just had enough
- } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
- }
-
- // Update tween properties
- if ( parts ) {
- start = tween.start = +start || +target || 0;
- tween.unit = unit;
- // If a +=/-= token was provided, we're doing a relative animation
- tween.end = parts[ 1 ] ?
- start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :
- +parts[ 2 ];
- }
-
- return tween;
- }]
- };
-
-// Animations created synchronously will run synchronously
-function createFxNow() {
- setTimeout(function() {
- fxNow = undefined;
- });
- return ( fxNow = jQuery.now() );
-}
-
-function createTween( value, prop, animation ) {
- var tween,
- collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
- index = 0,
- length = collection.length;
- for ( ; index < length; index++ ) {
- if ( (tween = collection[ index ].call( animation, prop, value )) ) {
-
- // we're done with this property
- return tween;
- }
- }
-}
-
-function Animation( elem, properties, options ) {
- var result,
- stopped,
- index = 0,
- length = animationPrefilters.length,
- deferred = jQuery.Deferred().always( function() {
- // don't match elem in the :animated selector
- delete tick.elem;
- }),
- tick = function() {
- if ( stopped ) {
- return false;
- }
- var currentTime = fxNow || createFxNow(),
- remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
- // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
- temp = remaining / animation.duration || 0,
- percent = 1 - temp,
- index = 0,
- length = animation.tweens.length;
-
- for ( ; index < length ; index++ ) {
- animation.tweens[ index ].run( percent );
- }
-
- deferred.notifyWith( elem, [ animation, percent, remaining ]);
-
- if ( percent < 1 && length ) {
- return remaining;
- } else {
- deferred.resolveWith( elem, [ animation ] );
- return false;
- }
- },
- animation = deferred.promise({
- elem: elem,
- props: jQuery.extend( {}, properties ),
- opts: jQuery.extend( true, { specialEasing: {} }, options ),
- originalProperties: properties,
- originalOptions: options,
- startTime: fxNow || createFxNow(),
- duration: options.duration,
- tweens: [],
- createTween: function( prop, end ) {
- var tween = jQuery.Tween( elem, animation.opts, prop, end,
- animation.opts.specialEasing[ prop ] || animation.opts.easing );
- animation.tweens.push( tween );
- return tween;
- },
- stop: function( gotoEnd ) {
- var index = 0,
- // if we are going to the end, we want to run all the tweens
- // otherwise we skip this part
- length = gotoEnd ? animation.tweens.length : 0;
- if ( stopped ) {
- return this;
- }
- stopped = true;
- for ( ; index < length ; index++ ) {
- animation.tweens[ index ].run( 1 );
- }
-
- // resolve when we played the last frame
- // otherwise, reject
- if ( gotoEnd ) {
- deferred.resolveWith( elem, [ animation, gotoEnd ] );
- } else {
- deferred.rejectWith( elem, [ animation, gotoEnd ] );
- }
- return this;
- }
- }),
- props = animation.props;
-
- propFilter( props, animation.opts.specialEasing );
-
- for ( ; index < length ; index++ ) {
- result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
- if ( result ) {
- return result;
- }
- }
-
- jQuery.map( props, createTween, animation );
-
- if ( jQuery.isFunction( animation.opts.start ) ) {
- animation.opts.start.call( elem, animation );
- }
-
- jQuery.fx.timer(
- jQuery.extend( tick, {
- elem: elem,
- anim: animation,
- queue: animation.opts.queue
- })
- );
-
- // attach callbacks from options
- return animation.progress( animation.opts.progress )
- .done( animation.opts.done, animation.opts.complete )
- .fail( animation.opts.fail )
- .always( animation.opts.always );
-}
-
-function propFilter( props, specialEasing ) {
- var index, name, easing, value, hooks;
-
- // camelCase, specialEasing and expand cssHook pass
- for ( index in props ) {
- name = jQuery.camelCase( index );
- easing = specialEasing[ name ];
- value = props[ index ];
- if ( jQuery.isArray( value ) ) {
- easing = value[ 1 ];
- value = props[ index ] = value[ 0 ];
- }
-
- if ( index !== name ) {
- props[ name ] = value;
- delete props[ index ];
- }
-
- hooks = jQuery.cssHooks[ name ];
- if ( hooks && "expand" in hooks ) {
- value = hooks.expand( value );
- delete props[ name ];
-
- // not quite $.extend, this wont overwrite keys already present.
- // also - reusing 'index' from above because we have the correct "name"
- for ( index in value ) {
- if ( !( index in props ) ) {
- props[ index ] = value[ index ];
- specialEasing[ index ] = easing;
- }
- }
- } else {
- specialEasing[ name ] = easing;
- }
- }
-}
-
-jQuery.Animation = jQuery.extend( Animation, {
-
- tweener: function( props, callback ) {
- if ( jQuery.isFunction( props ) ) {
- callback = props;
- props = [ "*" ];
- } else {
- props = props.split(" ");
- }
-
- var prop,
- index = 0,
- length = props.length;
-
- for ( ; index < length ; index++ ) {
- prop = props[ index ];
- tweeners[ prop ] = tweeners[ prop ] || [];
- tweeners[ prop ].unshift( callback );
- }
- },
-
- prefilter: function( callback, prepend ) {
- if ( prepend ) {
- animationPrefilters.unshift( callback );
- } else {
- animationPrefilters.push( callback );
- }
- }
-});
-
-function defaultPrefilter( elem, props, opts ) {
- /* jshint validthis: true */
- var prop, value, toggle, tween, hooks, oldfire,
- anim = this,
- orig = {},
- style = elem.style,
- hidden = elem.nodeType && isHidden( elem ),
- dataShow = jQuery._data( elem, "fxshow" );
-
- // handle queue: false promises
- if ( !opts.queue ) {
- hooks = jQuery._queueHooks( elem, "fx" );
- if ( hooks.unqueued == null ) {
- hooks.unqueued = 0;
- oldfire = hooks.empty.fire;
- hooks.empty.fire = function() {
- if ( !hooks.unqueued ) {
- oldfire();
- }
- };
- }
- hooks.unqueued++;
-
- anim.always(function() {
- // doing this makes sure that the complete handler will be called
- // before this completes
- anim.always(function() {
- hooks.unqueued--;
- if ( !jQuery.queue( elem, "fx" ).length ) {
- hooks.empty.fire();
- }
- });
- });
- }
-
- // height/width overflow pass
- if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
- // Make sure that nothing sneaks out
- // Record all 3 overflow attributes because IE does not
- // change the overflow attribute when overflowX and
- // overflowY are set to the same value
- opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
-
- // Set display property to inline-block for height/width
- // animations on inline elements that are having width/height animated
- if ( jQuery.css( elem, "display" ) === "inline" &&
- jQuery.css( elem, "float" ) === "none" ) {
-
- // inline-level elements accept inline-block;
- // block-level elements need to be inline with layout
- if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) {
- style.display = "inline-block";
-
- } else {
- style.zoom = 1;
- }
- }
- }
-
- if ( opts.overflow ) {
- style.overflow = "hidden";
- if ( !jQuery.support.shrinkWrapBlocks ) {
- anim.always(function() {
- style.overflow = opts.overflow[ 0 ];
- style.overflowX = opts.overflow[ 1 ];
- style.overflowY = opts.overflow[ 2 ];
- });
- }
- }
-
-
- // show/hide pass
- for ( prop in props ) {
- value = props[ prop ];
- if ( rfxtypes.exec( value ) ) {
- delete props[ prop ];
- toggle = toggle || value === "toggle";
- if ( value === ( hidden ? "hide" : "show" ) ) {
- continue;
- }
- orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
- }
- }
-
- if ( !jQuery.isEmptyObject( orig ) ) {
- if ( dataShow ) {
- if ( "hidden" in dataShow ) {
- hidden = dataShow.hidden;
- }
- } else {
- dataShow = jQuery._data( elem, "fxshow", {} );
- }
-
- // store state if its toggle - enables .stop().toggle() to "reverse"
- if ( toggle ) {
- dataShow.hidden = !hidden;
- }
- if ( hidden ) {
- jQuery( elem ).show();
- } else {
- anim.done(function() {
- jQuery( elem ).hide();
- });
- }
- anim.done(function() {
- var prop;
- jQuery._removeData( elem, "fxshow" );
- for ( prop in orig ) {
- jQuery.style( elem, prop, orig[ prop ] );
- }
- });
- for ( prop in orig ) {
- tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
-
- if ( !( prop in dataShow ) ) {
- dataShow[ prop ] = tween.start;
- if ( hidden ) {
- tween.end = tween.start;
- tween.start = prop === "width" || prop === "height" ? 1 : 0;
- }
- }
- }
- }
-}
-
-function Tween( elem, options, prop, end, easing ) {
- return new Tween.prototype.init( elem, options, prop, end, easing );
-}
-jQuery.Tween = Tween;
-
-Tween.prototype = {
- constructor: Tween,
- init: function( elem, options, prop, end, easing, unit ) {
- this.elem = elem;
- this.prop = prop;
- this.easing = easing || "swing";
- this.options = options;
- this.start = this.now = this.cur();
- this.end = end;
- this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
- },
- cur: function() {
- var hooks = Tween.propHooks[ this.prop ];
-
- return hooks && hooks.get ?
- hooks.get( this ) :
- Tween.propHooks._default.get( this );
- },
- run: function( percent ) {
- var eased,
- hooks = Tween.propHooks[ this.prop ];
-
- if ( this.options.duration ) {
- this.pos = eased = jQuery.easing[ this.easing ](
- percent, this.options.duration * percent, 0, 1, this.options.duration
- );
- } else {
- this.pos = eased = percent;
- }
- this.now = ( this.end - this.start ) * eased + this.start;
-
- if ( this.options.step ) {
- this.options.step.call( this.elem, this.now, this );
- }
-
- if ( hooks && hooks.set ) {
- hooks.set( this );
- } else {
- Tween.propHooks._default.set( this );
- }
- return this;
- }
-};
-
-Tween.prototype.init.prototype = Tween.prototype;
-
-Tween.propHooks = {
- _default: {
- get: function( tween ) {
- var result;
-
- if ( tween.elem[ tween.prop ] != null &&
- (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
- return tween.elem[ tween.prop ];
- }
-
- // passing an empty string as a 3rd parameter to .css will automatically
- // attempt a parseFloat and fallback to a string if the parse fails
- // so, simple values such as "10px" are parsed to Float.
- // complex values such as "rotate(1rad)" are returned as is.
- result = jQuery.css( tween.elem, tween.prop, "" );
- // Empty strings, null, undefined and "auto" are converted to 0.
- return !result || result === "auto" ? 0 : result;
- },
- set: function( tween ) {
- // use step hook for back compat - use cssHook if its there - use .style if its
- // available and use plain properties where available
- if ( jQuery.fx.step[ tween.prop ] ) {
- jQuery.fx.step[ tween.prop ]( tween );
- } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
- jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
- } else {
- tween.elem[ tween.prop ] = tween.now;
- }
- }
- }
-};
-
-// Support: IE <=9
-// Panic based approach to setting things on disconnected nodes
-
-Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
- set: function( tween ) {
- if ( tween.elem.nodeType && tween.elem.parentNode ) {
- tween.elem[ tween.prop ] = tween.now;
- }
- }
-};
-
-jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
- var cssFn = jQuery.fn[ name ];
- jQuery.fn[ name ] = function( speed, easing, callback ) {
- return speed == null || typeof speed === "boolean" ?
- cssFn.apply( this, arguments ) :
- this.animate( genFx( name, true ), speed, easing, callback );
- };
-});
-
-jQuery.fn.extend({
- fadeTo: function( speed, to, easing, callback ) {
-
- // show any hidden elements after setting opacity to 0
- return this.filter( isHidden ).css( "opacity", 0 ).show()
-
- // animate to the value specified
- .end().animate({ opacity: to }, speed, easing, callback );
- },
- animate: function( prop, speed, easing, callback ) {
- var empty = jQuery.isEmptyObject( prop ),
- optall = jQuery.speed( speed, easing, callback ),
- doAnimation = function() {
- // Operate on a copy of prop so per-property easing won't be lost
- var anim = Animation( this, jQuery.extend( {}, prop ), optall );
-
- // Empty animations, or finishing resolves immediately
- if ( empty || jQuery._data( this, "finish" ) ) {
- anim.stop( true );
- }
- };
- doAnimation.finish = doAnimation;
-
- return empty || optall.queue === false ?
- this.each( doAnimation ) :
- this.queue( optall.queue, doAnimation );
- },
- stop: function( type, clearQueue, gotoEnd ) {
- var stopQueue = function( hooks ) {
- var stop = hooks.stop;
- delete hooks.stop;
- stop( gotoEnd );
- };
-
- if ( typeof type !== "string" ) {
- gotoEnd = clearQueue;
- clearQueue = type;
- type = undefined;
- }
- if ( clearQueue && type !== false ) {
- this.queue( type || "fx", [] );
- }
-
- return this.each(function() {
- var dequeue = true,
- index = type != null && type + "queueHooks",
- timers = jQuery.timers,
- data = jQuery._data( this );
-
- if ( index ) {
- if ( data[ index ] && data[ index ].stop ) {
- stopQueue( data[ index ] );
- }
- } else {
- for ( index in data ) {
- if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
- stopQueue( data[ index ] );
- }
- }
- }
-
- for ( index = timers.length; index--; ) {
- if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
- timers[ index ].anim.stop( gotoEnd );
- dequeue = false;
- timers.splice( index, 1 );
- }
- }
-
- // start the next in the queue if the last step wasn't forced
- // timers currently will call their complete callbacks, which will dequeue
- // but only if they were gotoEnd
- if ( dequeue || !gotoEnd ) {
- jQuery.dequeue( this, type );
- }
- });
- },
- finish: function( type ) {
- if ( type !== false ) {
- type = type || "fx";
- }
- return this.each(function() {
- var index,
- data = jQuery._data( this ),
- queue = data[ type + "queue" ],
- hooks = data[ type + "queueHooks" ],
- timers = jQuery.timers,
- length = queue ? queue.length : 0;
-
- // enable finishing flag on private data
- data.finish = true;
-
- // empty the queue first
- jQuery.queue( this, type, [] );
-
- if ( hooks && hooks.stop ) {
- hooks.stop.call( this, true );
- }
-
- // look for any active animations, and finish them
- for ( index = timers.length; index--; ) {
- if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
- timers[ index ].anim.stop( true );
- timers.splice( index, 1 );
- }
- }
-
- // look for any animations in the old queue and finish them
- for ( index = 0; index < length; index++ ) {
- if ( queue[ index ] && queue[ index ].finish ) {
- queue[ index ].finish.call( this );
- }
- }
-
- // turn off finishing flag
- delete data.finish;
- });
- }
-});
-
-// Generate parameters to create a standard animation
-function genFx( type, includeWidth ) {
- var which,
- attrs = { height: type },
- i = 0;
-
- // if we include width, step value is 1 to do all cssExpand values,
- // if we don't include width, step value is 2 to skip over Left and Right
- includeWidth = includeWidth? 1 : 0;
- for( ; i < 4 ; i += 2 - includeWidth ) {
- which = cssExpand[ i ];
- attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
- }
-
- if ( includeWidth ) {
- attrs.opacity = attrs.width = type;
- }
-
- return attrs;
-}
-
-// Generate shortcuts for custom animations
-jQuery.each({
- slideDown: genFx("show"),
- slideUp: genFx("hide"),
- slideToggle: genFx("toggle"),
- fadeIn: { opacity: "show" },
- fadeOut: { opacity: "hide" },
- fadeToggle: { opacity: "toggle" }
-}, function( name, props ) {
- jQuery.fn[ name ] = function( speed, easing, callback ) {
- return this.animate( props, speed, easing, callback );
- };
-});
-
-jQuery.speed = function( speed, easing, fn ) {
- var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
- complete: fn || !fn && easing ||
- jQuery.isFunction( speed ) && speed,
- duration: speed,
- easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
- };
-
- opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
- opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
-
- // normalize opt.queue - true/undefined/null -> "fx"
- if ( opt.queue == null || opt.queue === true ) {
- opt.queue = "fx";
- }
-
- // Queueing
- opt.old = opt.complete;
-
- opt.complete = function() {
- if ( jQuery.isFunction( opt.old ) ) {
- opt.old.call( this );
- }
-
- if ( opt.queue ) {
- jQuery.dequeue( this, opt.queue );
- }
- };
-
- return opt;
-};
-
-jQuery.easing = {
- linear: function( p ) {
- return p;
- },
- swing: function( p ) {
- return 0.5 - Math.cos( p*Math.PI ) / 2;
- }
-};
-
-jQuery.timers = [];
-jQuery.fx = Tween.prototype.init;
-jQuery.fx.tick = function() {
- var timer,
- timers = jQuery.timers,
- i = 0;
-
- fxNow = jQuery.now();
-
- for ( ; i < timers.length; i++ ) {
- timer = timers[ i ];
- // Checks the timer has not already been removed
- if ( !timer() && timers[ i ] === timer ) {
- timers.splice( i--, 1 );
- }
- }
-
- if ( !timers.length ) {
- jQuery.fx.stop();
- }
- fxNow = undefined;
-};
-
-jQuery.fx.timer = function( timer ) {
- if ( timer() && jQuery.timers.push( timer ) ) {
- jQuery.fx.start();
- }
-};
-
-jQuery.fx.interval = 13;
-
-jQuery.fx.start = function() {
- if ( !timerId ) {
- timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
- }
-};
-
-jQuery.fx.stop = function() {
- clearInterval( timerId );
- timerId = null;
-};
-
-jQuery.fx.speeds = {
- slow: 600,
- fast: 200,
- // Default speed
- _default: 400
-};
-
-// Back Compat <1.8 extension point
-jQuery.fx.step = {};
-
-if ( jQuery.expr && jQuery.expr.filters ) {
- jQuery.expr.filters.animated = function( elem ) {
- return jQuery.grep(jQuery.timers, function( fn ) {
- return elem === fn.elem;
- }).length;
- };
-}
-jQuery.fn.offset = function( options ) {
- if ( arguments.length ) {
- return options === undefined ?
- this :
- this.each(function( i ) {
- jQuery.offset.setOffset( this, options, i );
- });
- }
-
- var docElem, win,
- box = { top: 0, left: 0 },
- elem = this[ 0 ],
- doc = elem && elem.ownerDocument;
-
- if ( !doc ) {
- return;
- }
-
- docElem = doc.documentElement;
-
- // Make sure it's not a disconnected DOM node
- if ( !jQuery.contains( docElem, elem ) ) {
- return box;
- }
-
- // If we don't have gBCR, just use 0,0 rather than error
- // BlackBerry 5, iOS 3 (original iPhone)
- if ( typeof elem.getBoundingClientRect !== core_strundefined ) {
- box = elem.getBoundingClientRect();
- }
- win = getWindow( doc );
- return {
- top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),
- left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
- };
-};
-
-jQuery.offset = {
-
- setOffset: function( elem, options, i ) {
- var position = jQuery.css( elem, "position" );
-
- // set position first, in-case top/left are set even on static elem
- if ( position === "static" ) {
- elem.style.position = "relative";
- }
-
- var curElem = jQuery( elem ),
- curOffset = curElem.offset(),
- curCSSTop = jQuery.css( elem, "top" ),
- curCSSLeft = jQuery.css( elem, "left" ),
- calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
- props = {}, curPosition = {}, curTop, curLeft;
-
- // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
- if ( calculatePosition ) {
- curPosition = curElem.position();
- curTop = curPosition.top;
- curLeft = curPosition.left;
- } else {
- curTop = parseFloat( curCSSTop ) || 0;
- curLeft = parseFloat( curCSSLeft ) || 0;
- }
-
- if ( jQuery.isFunction( options ) ) {
- options = options.call( elem, i, curOffset );
- }
-
- if ( options.top != null ) {
- props.top = ( options.top - curOffset.top ) + curTop;
- }
- if ( options.left != null ) {
- props.left = ( options.left - curOffset.left ) + curLeft;
- }
-
- if ( "using" in options ) {
- options.using.call( elem, props );
- } else {
- curElem.css( props );
- }
- }
-};
-
-
-jQuery.fn.extend({
-
- position: function() {
- if ( !this[ 0 ] ) {
- return;
- }
-
- var offsetParent, offset,
- parentOffset = { top: 0, left: 0 },
- elem = this[ 0 ];
-
- // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent
- if ( jQuery.css( elem, "position" ) === "fixed" ) {
- // we assume that getBoundingClientRect is available when computed position is fixed
- offset = elem.getBoundingClientRect();
- } else {
- // Get *real* offsetParent
- offsetParent = this.offsetParent();
-
- // Get correct offsets
- offset = this.offset();
- if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
- parentOffset = offsetParent.offset();
- }
-
- // Add offsetParent borders
- parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
- parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
- }
-
- // Subtract parent offsets and element margins
- // note: when an element has margin: auto the offsetLeft and marginLeft
- // are the same in Safari causing offset.left to incorrectly be 0
- return {
- top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
- left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true)
- };
- },
-
- offsetParent: function() {
- return this.map(function() {
- var offsetParent = this.offsetParent || docElem;
- while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) {
- offsetParent = offsetParent.offsetParent;
- }
- return offsetParent || docElem;
- });
- }
-});
-
-
-// Create scrollLeft and scrollTop methods
-jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) {
- var top = /Y/.test( prop );
-
- jQuery.fn[ method ] = function( val ) {
- return jQuery.access( this, function( elem, method, val ) {
- var win = getWindow( elem );
-
- if ( val === undefined ) {
- return win ? (prop in win) ? win[ prop ] :
- win.document.documentElement[ method ] :
- elem[ method ];
- }
-
- if ( win ) {
- win.scrollTo(
- !top ? val : jQuery( win ).scrollLeft(),
- top ? val : jQuery( win ).scrollTop()
- );
-
- } else {
- elem[ method ] = val;
- }
- }, method, val, arguments.length, null );
- };
-});
-
-function getWindow( elem ) {
- return jQuery.isWindow( elem ) ?
- elem :
- elem.nodeType === 9 ?
- elem.defaultView || elem.parentWindow :
- false;
-}
-// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
-jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
- jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
- // margin is only for outerHeight, outerWidth
- jQuery.fn[ funcName ] = function( margin, value ) {
- var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
- extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
-
- return jQuery.access( this, function( elem, type, value ) {
- var doc;
-
- if ( jQuery.isWindow( elem ) ) {
- // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
- // isn't a whole lot we can do. See pull request at this URL for discussion:
- // https://github.com/jquery/jquery/pull/764
- return elem.document.documentElement[ "client" + name ];
- }
-
- // Get document width or height
- if ( elem.nodeType === 9 ) {
- doc = elem.documentElement;
-
- // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
- // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
- return Math.max(
- elem.body[ "scroll" + name ], doc[ "scroll" + name ],
- elem.body[ "offset" + name ], doc[ "offset" + name ],
- doc[ "client" + name ]
- );
- }
-
- return value === undefined ?
- // Get width or height on the element, requesting but not forcing parseFloat
- jQuery.css( elem, type, extra ) :
-
- // Set width or height on the element
- jQuery.style( elem, type, value, extra );
- }, type, chainable ? margin : undefined, chainable, null );
- };
- });
-});
-// Limit scope pollution from any deprecated API
-// (function() {
-
-// The number of elements contained in the matched element set
-jQuery.fn.size = function() {
- return this.length;
-};
-
-jQuery.fn.andSelf = jQuery.fn.addBack;
-
-// })();
-if ( typeof module === "object" && module && typeof module.exports === "object" ) {
- // Expose jQuery as module.exports in loaders that implement the Node
- // module pattern (including browserify). Do not create the global, since
- // the user will be storing it themselves locally, and globals are frowned
- // upon in the Node module world.
- module.exports = jQuery;
-} else {
- // Otherwise expose jQuery to the global object as usual
- window.jQuery = window.$ = jQuery;
-
- // Register as a named AMD module, since jQuery can be concatenated with other
- // files that may use define, but not via a proper concatenation script that
- // understands anonymous AMD modules. A named AMD is safest and most robust
- // way to register. Lowercase jquery is used because AMD module names are
- // derived from file names, and jQuery is normally delivered in a lowercase
- // file name. Do this after creating the global so that if an AMD module wants
- // to call noConflict to hide this version of jQuery, it will work.
- if ( typeof define === "function" && define.amd ) {
- define( "jquery", [], function () { return jQuery; } );
- }
-}
-
-})( window );
diff --git a/ecomp-portal-BE/war/static/js/jquery-ui.js b/ecomp-portal-BE/war/static/js/jquery-ui.js
deleted file mode 100644
index 31ee9cd8..00000000
--- a/ecomp-portal-BE/war/static/js/jquery-ui.js
+++ /dev/null
@@ -1,16617 +0,0 @@
-/*! jQuery UI - v1.11.4 - 2015-03-11
-* http://jqueryui.com
-* Includes: core.js, widget.js, mouse.js, position.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, draggable.js, droppable.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js, menu.js, progressbar.js, resizable.js, selectable.js, selectmenu.js, slider.js, sortable.js, spinner.js, tabs.js, tooltip.js
-* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
-
-(function( factory ) {
- if ( typeof define === "function" && define.amd ) {
-
- // AMD. Register as an anonymous module.
- define([ "jquery" ], factory );
- } else {
-
- // Browser globals
- factory( jQuery );
- }
-}(function( $ ) {
-/*!
- * jQuery UI Core 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/category/ui-core/
- */
-
-
-// $.ui might exist from components with no dependencies, e.g., $.ui.position
-$.ui = $.ui || {};
-
-$.extend( $.ui, {
- version: "1.11.4",
-
- keyCode: {
- BACKSPACE: 8,
- COMMA: 188,
- DELETE: 46,
- DOWN: 40,
- END: 35,
- ENTER: 13,
- ESCAPE: 27,
- HOME: 36,
- LEFT: 37,
- PAGE_DOWN: 34,
- PAGE_UP: 33,
- PERIOD: 190,
- RIGHT: 39,
- SPACE: 32,
- TAB: 9,
- UP: 38
- }
-});
-
-// plugins
-$.fn.extend({
- scrollParent: function( includeHidden ) {
- var position = this.css( "position" ),
- excludeStaticParent = position === "absolute",
- overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
- scrollParent = this.parents().filter( function() {
- var parent = $( this );
- if ( excludeStaticParent && parent.css( "position" ) === "static" ) {
- return false;
- }
- return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) );
- }).eq( 0 );
-
- return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent;
- },
-
- uniqueId: (function() {
- var uuid = 0;
-
- return function() {
- return this.each(function() {
- if ( !this.id ) {
- this.id = "ui-id-" + ( ++uuid );
- }
- });
- };
- })(),
-
- removeUniqueId: function() {
- return this.each(function() {
- if ( /^ui-id-\d+$/.test( this.id ) ) {
- $( this ).removeAttr( "id" );
- }
- });
- }
-});
-
-// selectors
-function focusable( element, isTabIndexNotNaN ) {
- var map, mapName, img,
- nodeName = element.nodeName.toLowerCase();
- if ( "area" === nodeName ) {
- map = element.parentNode;
- mapName = map.name;
- if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
- return false;
- }
- img = $( "img[usemap='#" + mapName + "']" )[ 0 ];
- return !!img && visible( img );
- }
- return ( /^(input|select|textarea|button|object)$/.test( nodeName ) ?
- !element.disabled :
- "a" === nodeName ?
- element.href || isTabIndexNotNaN :
- isTabIndexNotNaN) &&
- // the element and all of its ancestors must be visible
- visible( element );
-}
-
-function visible( element ) {
- return $.expr.filters.visible( element ) &&
- !$( element ).parents().addBack().filter(function() {
- return $.css( this, "visibility" ) === "hidden";
- }).length;
-}
-
-$.extend( $.expr[ ":" ], {
- data: $.expr.createPseudo ?
- $.expr.createPseudo(function( dataName ) {
- return function( elem ) {
- return !!$.data( elem, dataName );
- };
- }) :
- // support: jQuery <1.8
- function( elem, i, match ) {
- return !!$.data( elem, match[ 3 ] );
- },
-
- focusable: function( element ) {
- return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
- },
-
- tabbable: function( element ) {
- var tabIndex = $.attr( element, "tabindex" ),
- isTabIndexNaN = isNaN( tabIndex );
- return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
- }
-});
-
-// support: jQuery <1.8
-if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
- $.each( [ "Width", "Height" ], function( i, name ) {
- var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
- type = name.toLowerCase(),
- orig = {
- innerWidth: $.fn.innerWidth,
- innerHeight: $.fn.innerHeight,
- outerWidth: $.fn.outerWidth,
- outerHeight: $.fn.outerHeight
- };
-
- function reduce( elem, size, border, margin ) {
- $.each( side, function() {
- size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
- if ( border ) {
- size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
- }
- if ( margin ) {
- size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
- }
- });
- return size;
- }
-
- $.fn[ "inner" + name ] = function( size ) {
- if ( size === undefined ) {
- return orig[ "inner" + name ].call( this );
- }
-
- return this.each(function() {
- $( this ).css( type, reduce( this, size ) + "px" );
- });
- };
-
- $.fn[ "outer" + name] = function( size, margin ) {
- if ( typeof size !== "number" ) {
- return orig[ "outer" + name ].call( this, size );
- }
-
- return this.each(function() {
- $( this).css( type, reduce( this, size, true, margin ) + "px" );
- });
- };
- });
-}
-
-// support: jQuery <1.8
-if ( !$.fn.addBack ) {
- $.fn.addBack = function( selector ) {
- return this.add( selector == null ?
- this.prevObject : this.prevObject.filter( selector )
- );
- };
-}
-
-// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
-if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
- $.fn.removeData = (function( removeData ) {
- return function( key ) {
- if ( arguments.length ) {
- return removeData.call( this, $.camelCase( key ) );
- } else {
- return removeData.call( this );
- }
- };
- })( $.fn.removeData );
-}
-
-// deprecated
-$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
-
-$.fn.extend({
- focus: (function( orig ) {
- return function( delay, fn ) {
- return typeof delay === "number" ?
- this.each(function() {
- var elem = this;
- setTimeout(function() {
- $( elem ).focus();
- if ( fn ) {
- fn.call( elem );
- }
- }, delay );
- }) :
- orig.apply( this, arguments );
- };
- })( $.fn.focus ),
-
- disableSelection: (function() {
- var eventType = "onselectstart" in document.createElement( "div" ) ?
- "selectstart" :
- "mousedown";
-
- return function() {
- return this.bind( eventType + ".ui-disableSelection", function( event ) {
- event.preventDefault();
- });
- };
- })(),
-
- enableSelection: function() {
- return this.unbind( ".ui-disableSelection" );
- },
-
- zIndex: function( zIndex ) {
- if ( zIndex !== undefined ) {
- return this.css( "zIndex", zIndex );
- }
-
- if ( this.length ) {
- var elem = $( this[ 0 ] ), position, value;
- while ( elem.length && elem[ 0 ] !== document ) {
- // Ignore z-index if position is set to a value where z-index is ignored by the browser
- // This makes behavior of this function consistent across browsers
- // WebKit always returns auto if the element is positioned
- position = elem.css( "position" );
- if ( position === "absolute" || position === "relative" || position === "fixed" ) {
- // IE returns 0 when zIndex is not specified
- // other browsers return a string
- // we ignore the case of nested elements with an explicit value of 0
- // <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
- value = parseInt( elem.css( "zIndex" ), 10 );
- if ( !isNaN( value ) && value !== 0 ) {
- return value;
- }
- }
- elem = elem.parent();
- }
- }
-
- return 0;
- }
-});
-
-// $.ui.plugin is deprecated. Use $.widget() extensions instead.
-$.ui.plugin = {
- add: function( module, option, set ) {
- var i,
- proto = $.ui[ module ].prototype;
- for ( i in set ) {
- proto.plugins[ i ] = proto.plugins[ i ] || [];
- proto.plugins[ i ].push( [ option, set[ i ] ] );
- }
- },
- call: function( instance, name, args, allowDisconnected ) {
- var i,
- set = instance.plugins[ name ];
-
- if ( !set ) {
- return;
- }
-
- if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) ) {
- return;
- }
-
- for ( i = 0; i < set.length; i++ ) {
- if ( instance.options[ set[ i ][ 0 ] ] ) {
- set[ i ][ 1 ].apply( instance.element, args );
- }
- }
- }
-};
-
-
-/*!
- * jQuery UI Widget 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/jQuery.widget/
- */
-
-
-var widget_uuid = 0,
- widget_slice = Array.prototype.slice;
-
-$.cleanData = (function( orig ) {
- return function( elems ) {
- var events, elem, i;
- for ( i = 0; (elem = elems[i]) != null; i++ ) {
- try {
-
- // Only trigger remove when necessary to save time
- events = $._data( elem, "events" );
- if ( events && events.remove ) {
- $( elem ).triggerHandler( "remove" );
- }
-
- // http://bugs.jquery.com/ticket/8235
- } catch ( e ) {}
- }
- orig( elems );
- };
-})( $.cleanData );
-
-$.widget = function( name, base, prototype ) {
- var fullName, existingConstructor, constructor, basePrototype,
- // proxiedPrototype allows the provided prototype to remain unmodified
- // so that it can be used as a mixin for multiple widgets (#8876)
- proxiedPrototype = {},
- namespace = name.split( "." )[ 0 ];
-
- name = name.split( "." )[ 1 ];
- fullName = namespace + "-" + name;
-
- if ( !prototype ) {
- prototype = base;
- base = $.Widget;
- }
-
- // create selector for plugin
- $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
- return !!$.data( elem, fullName );
- };
-
- $[ namespace ] = $[ namespace ] || {};
- existingConstructor = $[ namespace ][ name ];
- constructor = $[ namespace ][ name ] = function( options, element ) {
- // allow instantiation without "new" keyword
- if ( !this._createWidget ) {
- return new constructor( options, element );
- }
-
- // allow instantiation without initializing for simple inheritance
- // must use "new" keyword (the code above always passes args)
- if ( arguments.length ) {
- this._createWidget( options, element );
- }
- };
- // extend with the existing constructor to carry over any static properties
- $.extend( constructor, existingConstructor, {
- version: prototype.version,
- // copy the object used to create the prototype in case we need to
- // redefine the widget later
- _proto: $.extend( {}, prototype ),
- // track widgets that inherit from this widget in case this widget is
- // redefined after a widget inherits from it
- _childConstructors: []
- });
-
- basePrototype = new base();
- // we need to make the options hash a property directly on the new instance
- // otherwise we'll modify the options hash on the prototype that we're
- // inheriting from
- basePrototype.options = $.widget.extend( {}, basePrototype.options );
- $.each( prototype, function( prop, value ) {
- if ( !$.isFunction( value ) ) {
- proxiedPrototype[ prop ] = value;
- return;
- }
- proxiedPrototype[ prop ] = (function() {
- var _super = function() {
- return base.prototype[ prop ].apply( this, arguments );
- },
- _superApply = function( args ) {
- return base.prototype[ prop ].apply( this, args );
- };
- return function() {
- var __super = this._super,
- __superApply = this._superApply,
- returnValue;
-
- this._super = _super;
- this._superApply = _superApply;
-
- returnValue = value.apply( this, arguments );
-
- this._super = __super;
- this._superApply = __superApply;
-
- return returnValue;
- };
- })();
- });
- constructor.prototype = $.widget.extend( basePrototype, {
- // TODO: remove support for widgetEventPrefix
- // always use the name + a colon as the prefix, e.g., draggable:start
- // don't prefix for widgets that aren't DOM-based
- widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name
- }, proxiedPrototype, {
- constructor: constructor,
- namespace: namespace,
- widgetName: name,
- widgetFullName: fullName
- });
-
- // If this widget is being redefined then we need to find all widgets that
- // are inheriting from it and redefine all of them so that they inherit from
- // the new version of this widget. We're essentially trying to replace one
- // level in the prototype chain.
- if ( existingConstructor ) {
- $.each( existingConstructor._childConstructors, function( i, child ) {
- var childPrototype = child.prototype;
-
- // redefine the child widget using the same prototype that was
- // originally used, but inherit from the new version of the base
- $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
- });
- // remove the list of existing child constructors from the old constructor
- // so the old child constructors can be garbage collected
- delete existingConstructor._childConstructors;
- } else {
- base._childConstructors.push( constructor );
- }
-
- $.widget.bridge( name, constructor );
-
- return constructor;
-};
-
-$.widget.extend = function( target ) {
- var input = widget_slice.call( arguments, 1 ),
- inputIndex = 0,
- inputLength = input.length,
- key,
- value;
- for ( ; inputIndex < inputLength; inputIndex++ ) {
- for ( key in input[ inputIndex ] ) {
- value = input[ inputIndex ][ key ];
- if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
- // Clone objects
- if ( $.isPlainObject( value ) ) {
- target[ key ] = $.isPlainObject( target[ key ] ) ?
- $.widget.extend( {}, target[ key ], value ) :
- // Don't extend strings, arrays, etc. with objects
- $.widget.extend( {}, value );
- // Copy everything else by reference
- } else {
- target[ key ] = value;
- }
- }
- }
- }
- return target;
-};
-
-$.widget.bridge = function( name, object ) {
- var fullName = object.prototype.widgetFullName || name;
- $.fn[ name ] = function( options ) {
- var isMethodCall = typeof options === "string",
- args = widget_slice.call( arguments, 1 ),
- returnValue = this;
-
- if ( isMethodCall ) {
- this.each(function() {
- var methodValue,
- instance = $.data( this, fullName );
- if ( options === "instance" ) {
- returnValue = instance;
- return false;
- }
- if ( !instance ) {
- return $.error( "cannot call methods on " + name + " prior to initialization; " +
- "attempted to call method '" + options + "'" );
- }
- if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
- return $.error( "no such method '" + options + "' for " + name + " widget instance" );
- }
- methodValue = instance[ options ].apply( instance, args );
- if ( methodValue !== instance && methodValue !== undefined ) {
- returnValue = methodValue && methodValue.jquery ?
- returnValue.pushStack( methodValue.get() ) :
- methodValue;
- return false;
- }
- });
- } else {
-
- // Allow multiple hashes to be passed on init
- if ( args.length ) {
- options = $.widget.extend.apply( null, [ options ].concat(args) );
- }
-
- this.each(function() {
- var instance = $.data( this, fullName );
- if ( instance ) {
- instance.option( options || {} );
- if ( instance._init ) {
- instance._init();
- }
- } else {
- $.data( this, fullName, new object( options, this ) );
- }
- });
- }
-
- return returnValue;
- };
-};
-
-$.Widget = function( /* options, element */ ) {};
-$.Widget._childConstructors = [];
-
-$.Widget.prototype = {
- widgetName: "widget",
- widgetEventPrefix: "",
- defaultElement: "<div>",
- options: {
- disabled: false,
-
- // callbacks
- create: null
- },
- _createWidget: function( options, element ) {
- element = $( element || this.defaultElement || this )[ 0 ];
- this.element = $( element );
- this.uuid = widget_uuid++;
- this.eventNamespace = "." + this.widgetName + this.uuid;
-
- this.bindings = $();
- this.hoverable = $();
- this.focusable = $();
-
- if ( element !== this ) {
- $.data( element, this.widgetFullName, this );
- this._on( true, this.element, {
- remove: function( event ) {
- if ( event.target === element ) {
- this.destroy();
- }
- }
- });
- this.document = $( element.style ?
- // element within the document
- element.ownerDocument :
- // element is window or document
- element.document || element );
- this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
- }
-
- this.options = $.widget.extend( {},
- this.options,
- this._getCreateOptions(),
- options );
-
- this._create();
- this._trigger( "create", null, this._getCreateEventData() );
- this._init();
- },
- _getCreateOptions: $.noop,
- _getCreateEventData: $.noop,
- _create: $.noop,
- _init: $.noop,
-
- destroy: function() {
- this._destroy();
- // we can probably remove the unbind calls in 2.0
- // all event bindings should go through this._on()
- this.element
- .unbind( this.eventNamespace )
- .removeData( this.widgetFullName )
- // support: jquery <1.6.3
- // http://bugs.jquery.com/ticket/9413
- .removeData( $.camelCase( this.widgetFullName ) );
- this.widget()
- .unbind( this.eventNamespace )
- .removeAttr( "aria-disabled" )
- .removeClass(
- this.widgetFullName + "-disabled " +
- "ui-state-disabled" );
-
- // clean up events and states
- this.bindings.unbind( this.eventNamespace );
- this.hoverable.removeClass( "ui-state-hover" );
- this.focusable.removeClass( "ui-state-focus" );
- },
- _destroy: $.noop,
-
- widget: function() {
- return this.element;
- },
-
- option: function( key, value ) {
- var options = key,
- parts,
- curOption,
- i;
-
- if ( arguments.length === 0 ) {
- // don't return a reference to the internal hash
- return $.widget.extend( {}, this.options );
- }
-
- if ( typeof key === "string" ) {
- // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
- options = {};
- parts = key.split( "." );
- key = parts.shift();
- if ( parts.length ) {
- curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
- for ( i = 0; i < parts.length - 1; i++ ) {
- curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
- curOption = curOption[ parts[ i ] ];
- }
- key = parts.pop();
- if ( arguments.length === 1 ) {
- return curOption[ key ] === undefined ? null : curOption[ key ];
- }
- curOption[ key ] = value;
- } else {
- if ( arguments.length === 1 ) {
- return this.options[ key ] === undefined ? null : this.options[ key ];
- }
- options[ key ] = value;
- }
- }
-
- this._setOptions( options );
-
- return this;
- },
- _setOptions: function( options ) {
- var key;
-
- for ( key in options ) {
- this._setOption( key, options[ key ] );
- }
-
- return this;
- },
- _setOption: function( key, value ) {
- this.options[ key ] = value;
-
- if ( key === "disabled" ) {
- this.widget()
- .toggleClass( this.widgetFullName + "-disabled", !!value );
-
- // If the widget is becoming disabled, then nothing is interactive
- if ( value ) {
- this.hoverable.removeClass( "ui-state-hover" );
- this.focusable.removeClass( "ui-state-focus" );
- }
- }
-
- return this;
- },
-
- enable: function() {
- return this._setOptions({ disabled: false });
- },
- disable: function() {
- return this._setOptions({ disabled: true });
- },
-
- _on: function( suppressDisabledCheck, element, handlers ) {
- var delegateElement,
- instance = this;
-
- // no suppressDisabledCheck flag, shuffle arguments
- if ( typeof suppressDisabledCheck !== "boolean" ) {
- handlers = element;
- element = suppressDisabledCheck;
- suppressDisabledCheck = false;
- }
-
- // no element argument, shuffle and use this.element
- if ( !handlers ) {
- handlers = element;
- element = this.element;
- delegateElement = this.widget();
- } else {
- element = delegateElement = $( element );
- this.bindings = this.bindings.add( element );
- }
-
- $.each( handlers, function( event, handler ) {
- function handlerProxy() {
- // allow widgets to customize the disabled handling
- // - disabled as an array instead of boolean
- // - disabled class as method for disabling individual parts
- if ( !suppressDisabledCheck &&
- ( instance.options.disabled === true ||
- $( this ).hasClass( "ui-state-disabled" ) ) ) {
- return;
- }
- return ( typeof handler === "string" ? instance[ handler ] : handler )
- .apply( instance, arguments );
- }
-
- // copy the guid so direct unbinding works
- if ( typeof handler !== "string" ) {
- handlerProxy.guid = handler.guid =
- handler.guid || handlerProxy.guid || $.guid++;
- }
-
- var match = event.match( /^([\w:-]*)\s*(.*)$/ ),
- eventName = match[1] + instance.eventNamespace,
- selector = match[2];
- if ( selector ) {
- delegateElement.delegate( selector, eventName, handlerProxy );
- } else {
- element.bind( eventName, handlerProxy );
- }
- });
- },
-
- _off: function( element, eventName ) {
- eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) +
- this.eventNamespace;
- element.unbind( eventName ).undelegate( eventName );
-
- // Clear the stack to avoid memory leaks (#10056)
- this.bindings = $( this.bindings.not( element ).get() );
- this.focusable = $( this.focusable.not( element ).get() );
- this.hoverable = $( this.hoverable.not( element ).get() );
- },
-
- _delay: function( handler, delay ) {
- function handlerProxy() {
- return ( typeof handler === "string" ? instance[ handler ] : handler )
- .apply( instance, arguments );
- }
- var instance = this;
- return setTimeout( handlerProxy, delay || 0 );
- },
-
- _hoverable: function( element ) {
- this.hoverable = this.hoverable.add( element );
- this._on( element, {
- mouseenter: function( event ) {
- $( event.currentTarget ).addClass( "ui-state-hover" );
- },
- mouseleave: function( event ) {
- $( event.currentTarget ).removeClass( "ui-state-hover" );
- }
- });
- },
-
- _focusable: function( element ) {
- this.focusable = this.focusable.add( element );
- this._on( element, {
- focusin: function( event ) {
- $( event.currentTarget ).addClass( "ui-state-focus" );
- },
- focusout: function( event ) {
- $( event.currentTarget ).removeClass( "ui-state-focus" );
- }
- });
- },
-
- _trigger: function( type, event, data ) {
- var prop, orig,
- callback = this.options[ type ];
-
- data = data || {};
- event = $.Event( event );
- event.type = ( type === this.widgetEventPrefix ?
- type :
- this.widgetEventPrefix + type ).toLowerCase();
- // the original event may come from any element
- // so we need to reset the target on the new event
- event.target = this.element[ 0 ];
-
- // copy original event properties over to the new event
- orig = event.originalEvent;
- if ( orig ) {
- for ( prop in orig ) {
- if ( !( prop in event ) ) {
- event[ prop ] = orig[ prop ];
- }
- }
- }
-
- this.element.trigger( event, data );
- return !( $.isFunction( callback ) &&
- callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
- event.isDefaultPrevented() );
- }
-};
-
-$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
- $.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
- if ( typeof options === "string" ) {
- options = { effect: options };
- }
- var hasOptions,
- effectName = !options ?
- method :
- options === true || typeof options === "number" ?
- defaultEffect :
- options.effect || defaultEffect;
- options = options || {};
- if ( typeof options === "number" ) {
- options = { duration: options };
- }
- hasOptions = !$.isEmptyObject( options );
- options.complete = callback;
- if ( options.delay ) {
- element.delay( options.delay );
- }
- if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
- element[ method ]( options );
- } else if ( effectName !== method && element[ effectName ] ) {
- element[ effectName ]( options.duration, options.easing, callback );
- } else {
- element.queue(function( next ) {
- $( this )[ method ]();
- if ( callback ) {
- callback.call( element[ 0 ] );
- }
- next();
- });
- }
- };
-});
-
-var widget = $.widget;
-
-
-/*!
- * jQuery UI Mouse 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/mouse/
- */
-
-
-var mouseHandled = false;
-$( document ).mouseup( function() {
- mouseHandled = false;
-});
-
-var mouse = $.widget("ui.mouse", {
- version: "1.11.4",
- options: {
- cancel: "input,textarea,button,select,option",
- distance: 1,
- delay: 0
- },
- _mouseInit: function() {
- var that = this;
-
- this.element
- .bind("mousedown." + this.widgetName, function(event) {
- return that._mouseDown(event);
- })
- .bind("click." + this.widgetName, function(event) {
- if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) {
- $.removeData(event.target, that.widgetName + ".preventClickEvent");
- event.stopImmediatePropagation();
- return false;
- }
- });
-
- this.started = false;
- },
-
- // TODO: make sure destroying one instance of mouse doesn't mess with
- // other instances of mouse
- _mouseDestroy: function() {
- this.element.unbind("." + this.widgetName);
- if ( this._mouseMoveDelegate ) {
- this.document
- .unbind("mousemove." + this.widgetName, this._mouseMoveDelegate)
- .unbind("mouseup." + this.widgetName, this._mouseUpDelegate);
- }
- },
-
- _mouseDown: function(event) {
- // don't let more than one widget handle mouseStart
- if ( mouseHandled ) {
- return;
- }
-
- this._mouseMoved = false;
-
- // we may have missed mouseup (out of window)
- (this._mouseStarted && this._mouseUp(event));
-
- this._mouseDownEvent = event;
-
- var that = this,
- btnIsLeft = (event.which === 1),
- // event.target.nodeName works around a bug in IE 8 with
- // disabled inputs (#7620)
- elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
- if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
- return true;
- }
-
- this.mouseDelayMet = !this.options.delay;
- if (!this.mouseDelayMet) {
- this._mouseDelayTimer = setTimeout(function() {
- that.mouseDelayMet = true;
- }, this.options.delay);
- }
-
- if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
- this._mouseStarted = (this._mouseStart(event) !== false);
- if (!this._mouseStarted) {
- event.preventDefault();
- return true;
- }
- }
-
- // Click event may never have fired (Gecko & Opera)
- if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) {
- $.removeData(event.target, this.widgetName + ".preventClickEvent");
- }
-
- // these delegates are required to keep context
- this._mouseMoveDelegate = function(event) {
- return that._mouseMove(event);
- };
- this._mouseUpDelegate = function(event) {
- return that._mouseUp(event);
- };
-
- this.document
- .bind( "mousemove." + this.widgetName, this._mouseMoveDelegate )
- .bind( "mouseup." + this.widgetName, this._mouseUpDelegate );
-
- event.preventDefault();
-
- mouseHandled = true;
- return true;
- },
-
- _mouseMove: function(event) {
- // Only check for mouseups outside the document if you've moved inside the document
- // at least once. This prevents the firing of mouseup in the case of IE<9, which will
- // fire a mousemove event if content is placed under the cursor. See #7778
- // Support: IE <9
- if ( this._mouseMoved ) {
- // IE mouseup check - mouseup happened when mouse was out of window
- if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
- return this._mouseUp(event);
-
- // Iframe mouseup check - mouseup occurred in another document
- } else if ( !event.which ) {
- return this._mouseUp( event );
- }
- }
-
- if ( event.which || event.button ) {
- this._mouseMoved = true;
- }
-
- if (this._mouseStarted) {
- this._mouseDrag(event);
- return event.preventDefault();
- }
-
- if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
- this._mouseStarted =
- (this._mouseStart(this._mouseDownEvent, event) !== false);
- (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
- }
-
- return !this._mouseStarted;
- },
-
- _mouseUp: function(event) {
- this.document
- .unbind( "mousemove." + this.widgetName, this._mouseMoveDelegate )
- .unbind( "mouseup." + this.widgetName, this._mouseUpDelegate );
-
- if (this._mouseStarted) {
- this._mouseStarted = false;
-
- if (event.target === this._mouseDownEvent.target) {
- $.data(event.target, this.widgetName + ".preventClickEvent", true);
- }
-
- this._mouseStop(event);
- }
-
- mouseHandled = false;
- return false;
- },
-
- _mouseDistanceMet: function(event) {
- return (Math.max(
- Math.abs(this._mouseDownEvent.pageX - event.pageX),
- Math.abs(this._mouseDownEvent.pageY - event.pageY)
- ) >= this.options.distance
- );
- },
-
- _mouseDelayMet: function(/* event */) {
- return this.mouseDelayMet;
- },
-
- // These are placeholder methods, to be overriden by extending plugin
- _mouseStart: function(/* event */) {},
- _mouseDrag: function(/* event */) {},
- _mouseStop: function(/* event */) {},
- _mouseCapture: function(/* event */) { return true; }
-});
-
-
-/*!
- * jQuery UI Position 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/position/
- */
-
-(function() {
-
-$.ui = $.ui || {};
-
-var cachedScrollbarWidth, supportsOffsetFractions,
- max = Math.max,
- abs = Math.abs,
- round = Math.round,
- rhorizontal = /left|center|right/,
- rvertical = /top|center|bottom/,
- roffset = /[\+\-]\d+(\.[\d]+)?%?/,
- rposition = /^\w+/,
- rpercent = /%$/,
- _position = $.fn.position;
-
-function getOffsets( offsets, width, height ) {
- return [
- parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
- parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
- ];
-}
-
-function parseCss( element, property ) {
- return parseInt( $.css( element, property ), 10 ) || 0;
-}
-
-function getDimensions( elem ) {
- var raw = elem[0];
- if ( raw.nodeType === 9 ) {
- return {
- width: elem.width(),
- height: elem.height(),
- offset: { top: 0, left: 0 }
- };
- }
- if ( $.isWindow( raw ) ) {
- return {
- width: elem.width(),
- height: elem.height(),
- offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
- };
- }
- if ( raw.preventDefault ) {
- return {
- width: 0,
- height: 0,
- offset: { top: raw.pageY, left: raw.pageX }
- };
- }
- return {
- width: elem.outerWidth(),
- height: elem.outerHeight(),
- offset: elem.offset()
- };
-}
-
-$.position = {
- scrollbarWidth: function() {
- if ( cachedScrollbarWidth !== undefined ) {
- return cachedScrollbarWidth;
- }
- var w1, w2,
- div = $( "<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),
- innerDiv = div.children()[0];
-
- $( "body" ).append( div );
- w1 = innerDiv.offsetWidth;
- div.css( "overflow", "scroll" );
-
- w2 = innerDiv.offsetWidth;
-
- if ( w1 === w2 ) {
- w2 = div[0].clientWidth;
- }
-
- div.remove();
-
- return (cachedScrollbarWidth = w1 - w2);
- },
- getScrollInfo: function( within ) {
- var overflowX = within.isWindow || within.isDocument ? "" :
- within.element.css( "overflow-x" ),
- overflowY = within.isWindow || within.isDocument ? "" :
- within.element.css( "overflow-y" ),
- hasOverflowX = overflowX === "scroll" ||
- ( overflowX === "auto" && within.width < within.element[0].scrollWidth ),
- hasOverflowY = overflowY === "scroll" ||
- ( overflowY === "auto" && within.height < within.element[0].scrollHeight );
- return {
- width: hasOverflowY ? $.position.scrollbarWidth() : 0,
- height: hasOverflowX ? $.position.scrollbarWidth() : 0
- };
- },
- getWithinInfo: function( element ) {
- var withinElement = $( element || window ),
- isWindow = $.isWindow( withinElement[0] ),
- isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9;
- return {
- element: withinElement,
- isWindow: isWindow,
- isDocument: isDocument,
- offset: withinElement.offset() || { left: 0, top: 0 },
- scrollLeft: withinElement.scrollLeft(),
- scrollTop: withinElement.scrollTop(),
-
- // support: jQuery 1.6.x
- // jQuery 1.6 doesn't support .outerWidth/Height() on documents or windows
- width: isWindow || isDocument ? withinElement.width() : withinElement.outerWidth(),
- height: isWindow || isDocument ? withinElement.height() : withinElement.outerHeight()
- };
- }
-};
-
-$.fn.position = function( options ) {
- if ( !options || !options.of ) {
- return _position.apply( this, arguments );
- }
-
- // make a copy, we don't want to modify arguments
- options = $.extend( {}, options );
-
- var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
- target = $( options.of ),
- within = $.position.getWithinInfo( options.within ),
- scrollInfo = $.position.getScrollInfo( within ),
- collision = ( options.collision || "flip" ).split( " " ),
- offsets = {};
-
- dimensions = getDimensions( target );
- if ( target[0].preventDefault ) {
- // force left top to allow flipping
- options.at = "left top";
- }
- targetWidth = dimensions.width;
- targetHeight = dimensions.height;
- targetOffset = dimensions.offset;
- // clone to reuse original targetOffset later
- basePosition = $.extend( {}, targetOffset );
-
- // force my and at to have valid horizontal and vertical positions
- // if a value is missing or invalid, it will be converted to center
- $.each( [ "my", "at" ], function() {
- var pos = ( options[ this ] || "" ).split( " " ),
- horizontalOffset,
- verticalOffset;
-
- if ( pos.length === 1) {
- pos = rhorizontal.test( pos[ 0 ] ) ?
- pos.concat( [ "center" ] ) :
- rvertical.test( pos[ 0 ] ) ?
- [ "center" ].concat( pos ) :
- [ "center", "center" ];
- }
- pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
- pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
-
- // calculate offsets
- horizontalOffset = roffset.exec( pos[ 0 ] );
- verticalOffset = roffset.exec( pos[ 1 ] );
- offsets[ this ] = [
- horizontalOffset ? horizontalOffset[ 0 ] : 0,
- verticalOffset ? verticalOffset[ 0 ] : 0
- ];
-
- // reduce to just the positions without the offsets
- options[ this ] = [
- rposition.exec( pos[ 0 ] )[ 0 ],
- rposition.exec( pos[ 1 ] )[ 0 ]
- ];
- });
-
- // normalize collision option
- if ( collision.length === 1 ) {
- collision[ 1 ] = collision[ 0 ];
- }
-
- if ( options.at[ 0 ] === "right" ) {
- basePosition.left += targetWidth;
- } else if ( options.at[ 0 ] === "center" ) {
- basePosition.left += targetWidth / 2;
- }
-
- if ( options.at[ 1 ] === "bottom" ) {
- basePosition.top += targetHeight;
- } else if ( options.at[ 1 ] === "center" ) {
- basePosition.top += targetHeight / 2;
- }
-
- atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
- basePosition.left += atOffset[ 0 ];
- basePosition.top += atOffset[ 1 ];
-
- return this.each(function() {
- var collisionPosition, using,
- elem = $( this ),
- elemWidth = elem.outerWidth(),
- elemHeight = elem.outerHeight(),
- marginLeft = parseCss( this, "marginLeft" ),
- marginTop = parseCss( this, "marginTop" ),
- collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width,
- collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height,
- position = $.extend( {}, basePosition ),
- myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
-
- if ( options.my[ 0 ] === "right" ) {
- position.left -= elemWidth;
- } else if ( options.my[ 0 ] === "center" ) {
- position.left -= elemWidth / 2;
- }
-
- if ( options.my[ 1 ] === "bottom" ) {
- position.top -= elemHeight;
- } else if ( options.my[ 1 ] === "center" ) {
- position.top -= elemHeight / 2;
- }
-
- position.left += myOffset[ 0 ];
- position.top += myOffset[ 1 ];
-
- // if the browser doesn't support fractions, then round for consistent results
- if ( !supportsOffsetFractions ) {
- position.left = round( position.left );
- position.top = round( position.top );
- }
-
- collisionPosition = {
- marginLeft: marginLeft,
- marginTop: marginTop
- };
-
- $.each( [ "left", "top" ], function( i, dir ) {
- if ( $.ui.position[ collision[ i ] ] ) {
- $.ui.position[ collision[ i ] ][ dir ]( position, {
- targetWidth: targetWidth,
- targetHeight: targetHeight,
- elemWidth: elemWidth,
- elemHeight: elemHeight,
- collisionPosition: collisionPosition,
- collisionWidth: collisionWidth,
- collisionHeight: collisionHeight,
- offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
- my: options.my,
- at: options.at,
- within: within,
- elem: elem
- });
- }
- });
-
- if ( options.using ) {
- // adds feedback as second argument to using callback, if present
- using = function( props ) {
- var left = targetOffset.left - position.left,
- right = left + targetWidth - elemWidth,
- top = targetOffset.top - position.top,
- bottom = top + targetHeight - elemHeight,
- feedback = {
- target: {
- element: target,
- left: targetOffset.left,
- top: targetOffset.top,
- width: targetWidth,
- height: targetHeight
- },
- element: {
- element: elem,
- left: position.left,
- top: position.top,
- width: elemWidth,
- height: elemHeight
- },
- horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
- vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
- };
- if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
- feedback.horizontal = "center";
- }
- if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
- feedback.vertical = "middle";
- }
- if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
- feedback.important = "horizontal";
- } else {
- feedback.important = "vertical";
- }
- options.using.call( this, props, feedback );
- };
- }
-
- elem.offset( $.extend( position, { using: using } ) );
- });
-};
-
-$.ui.position = {
- fit: {
- left: function( position, data ) {
- var within = data.within,
- withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
- outerWidth = within.width,
- collisionPosLeft = position.left - data.collisionPosition.marginLeft,
- overLeft = withinOffset - collisionPosLeft,
- overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
- newOverRight;
-
- // element is wider than within
- if ( data.collisionWidth > outerWidth ) {
- // element is initially over the left side of within
- if ( overLeft > 0 && overRight <= 0 ) {
- newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;
- position.left += overLeft - newOverRight;
- // element is initially over right side of within
- } else if ( overRight > 0 && overLeft <= 0 ) {
- position.left = withinOffset;
- // element is initially over both left and right sides of within
- } else {
- if ( overLeft > overRight ) {
- position.left = withinOffset + outerWidth - data.collisionWidth;
- } else {
- position.left = withinOffset;
- }
- }
- // too far left -> align with left edge
- } else if ( overLeft > 0 ) {
- position.left += overLeft;
- // too far right -> align with right edge
- } else if ( overRight > 0 ) {
- position.left -= overRight;
- // adjust based on position and margin
- } else {
- position.left = max( position.left - collisionPosLeft, position.left );
- }
- },
- top: function( position, data ) {
- var within = data.within,
- withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
- outerHeight = data.within.height,
- collisionPosTop = position.top - data.collisionPosition.marginTop,
- overTop = withinOffset - collisionPosTop,
- overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
- newOverBottom;
-
- // element is taller than within
- if ( data.collisionHeight > outerHeight ) {
- // element is initially over the top of within
- if ( overTop > 0 && overBottom <= 0 ) {
- newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;
- position.top += overTop - newOverBottom;
- // element is initially over bottom of within
- } else if ( overBottom > 0 && overTop <= 0 ) {
- position.top = withinOffset;
- // element is initially over both top and bottom of within
- } else {
- if ( overTop > overBottom ) {
- position.top = withinOffset + outerHeight - data.collisionHeight;
- } else {
- position.top = withinOffset;
- }
- }
- // too far up -> align with top
- } else if ( overTop > 0 ) {
- position.top += overTop;
- // too far down -> align with bottom edge
- } else if ( overBottom > 0 ) {
- position.top -= overBottom;
- // adjust based on position and margin
- } else {
- position.top = max( position.top - collisionPosTop, position.top );
- }
- }
- },
- flip: {
- left: function( position, data ) {
- var within = data.within,
- withinOffset = within.offset.left + within.scrollLeft,
- outerWidth = within.width,
- offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
- collisionPosLeft = position.left - data.collisionPosition.marginLeft,
- overLeft = collisionPosLeft - offsetLeft,
- overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
- myOffset = data.my[ 0 ] === "left" ?
- -data.elemWidth :
- data.my[ 0 ] === "right" ?
- data.elemWidth :
- 0,
- atOffset = data.at[ 0 ] === "left" ?
- data.targetWidth :
- data.at[ 0 ] === "right" ?
- -data.targetWidth :
- 0,
- offset = -2 * data.offset[ 0 ],
- newOverRight,
- newOverLeft;
-
- if ( overLeft < 0 ) {
- newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;
- if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
- position.left += myOffset + atOffset + offset;
- }
- } else if ( overRight > 0 ) {
- newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;
- if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
- position.left += myOffset + atOffset + offset;
- }
- }
- },
- top: function( position, data ) {
- var within = data.within,
- withinOffset = within.offset.top + within.scrollTop,
- outerHeight = within.height,
- offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
- collisionPosTop = position.top - data.collisionPosition.marginTop,
- overTop = collisionPosTop - offsetTop,
- overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
- top = data.my[ 1 ] === "top",
- myOffset = top ?
- -data.elemHeight :
- data.my[ 1 ] === "bottom" ?
- data.elemHeight :
- 0,
- atOffset = data.at[ 1 ] === "top" ?
- data.targetHeight :
- data.at[ 1 ] === "bottom" ?
- -data.targetHeight :
- 0,
- offset = -2 * data.offset[ 1 ],
- newOverTop,
- newOverBottom;
- if ( overTop < 0 ) {
- newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
- if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {
- position.top += myOffset + atOffset + offset;
- }
- } else if ( overBottom > 0 ) {
- newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
- if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {
- position.top += myOffset + atOffset + offset;
- }
- }
- }
- },
- flipfit: {
- left: function() {
- $.ui.position.flip.left.apply( this, arguments );
- $.ui.position.fit.left.apply( this, arguments );
- },
- top: function() {
- $.ui.position.flip.top.apply( this, arguments );
- $.ui.position.fit.top.apply( this, arguments );
- }
- }
-};
-
-// fraction support test
-(function() {
- var testElement, testElementParent, testElementStyle, offsetLeft, i,
- body = document.getElementsByTagName( "body" )[ 0 ],
- div = document.createElement( "div" );
-
- //Create a "fake body" for testing based on method used in jQuery.support
- testElement = document.createElement( body ? "div" : "body" );
- testElementStyle = {
- visibility: "hidden",
- width: 0,
- height: 0,
- border: 0,
- margin: 0,
- background: "none"
- };
- if ( body ) {
- $.extend( testElementStyle, {
- position: "absolute",
- left: "-1000px",
- top: "-1000px"
- });
- }
- for ( i in testElementStyle ) {
- testElement.style[ i ] = testElementStyle[ i ];
- }
- testElement.appendChild( div );
- testElementParent = body || document.documentElement;
- testElementParent.insertBefore( testElement, testElementParent.firstChild );
-
- div.style.cssText = "position: absolute; left: 10.7432222px;";
-
- offsetLeft = $( div ).offset().left;
- supportsOffsetFractions = offsetLeft > 10 && offsetLeft < 11;
-
- testElement.innerHTML = "";
- testElementParent.removeChild( testElement );
-})();
-
-})();
-
-var position = $.ui.position;
-
-
-/*!
- * jQuery UI Accordion 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/accordion/
- */
-
-
-var accordion = $.widget( "ui.accordion", {
- version: "1.11.4",
- options: {
- active: 0,
- animate: {},
- collapsible: false,
- event: "click",
- header: "> li > :first-child,> :not(li):even",
- heightStyle: "auto",
- icons: {
- activeHeader: "ui-icon-triangle-1-s",
- header: "ui-icon-triangle-1-e"
- },
-
- // callbacks
- activate: null,
- beforeActivate: null
- },
-
- hideProps: {
- borderTopWidth: "hide",
- borderBottomWidth: "hide",
- paddingTop: "hide",
- paddingBottom: "hide",
- height: "hide"
- },
-
- showProps: {
- borderTopWidth: "show",
- borderBottomWidth: "show",
- paddingTop: "show",
- paddingBottom: "show",
- height: "show"
- },
-
- _create: function() {
- var options = this.options;
- this.prevShow = this.prevHide = $();
- this.element.addClass( "ui-accordion ui-widget ui-helper-reset" )
- // ARIA
- .attr( "role", "tablist" );
-
- // don't allow collapsible: false and active: false / null
- if ( !options.collapsible && (options.active === false || options.active == null) ) {
- options.active = 0;
- }
-
- this._processPanels();
- // handle negative values
- if ( options.active < 0 ) {
- options.active += this.headers.length;
- }
- this._refresh();
- },
-
- _getCreateEventData: function() {
- return {
- header: this.active,
- panel: !this.active.length ? $() : this.active.next()
- };
- },
-
- _createIcons: function() {
- var icons = this.options.icons;
- if ( icons ) {
- $( "<span>" )
- .addClass( "ui-accordion-header-icon ui-icon " + icons.header )
- .prependTo( this.headers );
- this.active.children( ".ui-accordion-header-icon" )
- .removeClass( icons.header )
- .addClass( icons.activeHeader );
- this.headers.addClass( "ui-accordion-icons" );
- }
- },
-
- _destroyIcons: function() {
- this.headers
- .removeClass( "ui-accordion-icons" )
- .children( ".ui-accordion-header-icon" )
- .remove();
- },
-
- _destroy: function() {
- var contents;
-
- // clean up main element
- this.element
- .removeClass( "ui-accordion ui-widget ui-helper-reset" )
- .removeAttr( "role" );
-
- // clean up headers
- this.headers
- .removeClass( "ui-accordion-header ui-accordion-header-active ui-state-default " +
- "ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )
- .removeAttr( "role" )
- .removeAttr( "aria-expanded" )
- .removeAttr( "aria-selected" )
- .removeAttr( "aria-controls" )
- .removeAttr( "tabIndex" )
- .removeUniqueId();
-
- this._destroyIcons();
-
- // clean up content panels
- contents = this.headers.next()
- .removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom " +
- "ui-accordion-content ui-accordion-content-active ui-state-disabled" )
- .css( "display", "" )
- .removeAttr( "role" )
- .removeAttr( "aria-hidden" )
- .removeAttr( "aria-labelledby" )
- .removeUniqueId();
-
- if ( this.options.heightStyle !== "content" ) {
- contents.css( "height", "" );
- }
- },
-
- _setOption: function( key, value ) {
- if ( key === "active" ) {
- // _activate() will handle invalid values and update this.options
- this._activate( value );
- return;
- }
-
- if ( key === "event" ) {
- if ( this.options.event ) {
- this._off( this.headers, this.options.event );
- }
- this._setupEvents( value );
- }
-
- this._super( key, value );
-
- // setting collapsible: false while collapsed; open first panel
- if ( key === "collapsible" && !value && this.options.active === false ) {
- this._activate( 0 );
- }
-
- if ( key === "icons" ) {
- this._destroyIcons();
- if ( value ) {
- this._createIcons();
- }
- }
-
- // #5332 - opacity doesn't cascade to positioned elements in IE
- // so we need to add the disabled class to the headers and panels
- if ( key === "disabled" ) {
- this.element
- .toggleClass( "ui-state-disabled", !!value )
- .attr( "aria-disabled", value );
- this.headers.add( this.headers.next() )
- .toggleClass( "ui-state-disabled", !!value );
- }
- },
-
- _keydown: function( event ) {
- if ( event.altKey || event.ctrlKey ) {
- return;
- }
-
- var keyCode = $.ui.keyCode,
- length = this.headers.length,
- currentIndex = this.headers.index( event.target ),
- toFocus = false;
-
- switch ( event.keyCode ) {
- case keyCode.RIGHT:
- case keyCode.DOWN:
- toFocus = this.headers[ ( currentIndex + 1 ) % length ];
- break;
- case keyCode.LEFT:
- case keyCode.UP:
- toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
- break;
- case keyCode.SPACE:
- case keyCode.ENTER:
- this._eventHandler( event );
- break;
- case keyCode.HOME:
- toFocus = this.headers[ 0 ];
- break;
- case keyCode.END:
- toFocus = this.headers[ length - 1 ];
- break;
- }
-
- if ( toFocus ) {
- $( event.target ).attr( "tabIndex", -1 );
- $( toFocus ).attr( "tabIndex", 0 );
- toFocus.focus();
- event.preventDefault();
- }
- },
-
- _panelKeyDown: function( event ) {
- if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {
- $( event.currentTarget ).prev().focus();
- }
- },
-
- refresh: function() {
- var options = this.options;
- this._processPanels();
-
- // was collapsed or no panel
- if ( ( options.active === false && options.collapsible === true ) || !this.headers.length ) {
- options.active = false;
- this.active = $();
- // active false only when collapsible is true
- } else if ( options.active === false ) {
- this._activate( 0 );
- // was active, but active panel is gone
- } else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
- // all remaining panel are disabled
- if ( this.headers.length === this.headers.find(".ui-state-disabled").length ) {
- options.active = false;
- this.active = $();
- // activate previous panel
- } else {
- this._activate( Math.max( 0, options.active - 1 ) );
- }
- // was active, active panel still exists
- } else {
- // make sure active index is correct
- options.active = this.headers.index( this.active );
- }
-
- this._destroyIcons();
-
- this._refresh();
- },
-
- _processPanels: function() {
- var prevHeaders = this.headers,
- prevPanels = this.panels;
-
- this.headers = this.element.find( this.options.header )
- .addClass( "ui-accordion-header ui-state-default ui-corner-all" );
-
- this.panels = this.headers.next()
- .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" )
- .filter( ":not(.ui-accordion-content-active)" )
- .hide();
-
- // Avoid memory leaks (#10056)
- if ( prevPanels ) {
- this._off( prevHeaders.not( this.headers ) );
- this._off( prevPanels.not( this.panels ) );
- }
- },
-
- _refresh: function() {
- var maxHeight,
- options = this.options,
- heightStyle = options.heightStyle,
- parent = this.element.parent();
-
- this.active = this._findActive( options.active )
- .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" )
- .removeClass( "ui-corner-all" );
- this.active.next()
- .addClass( "ui-accordion-content-active" )
- .show();
-
- this.headers
- .attr( "role", "tab" )
- .each(function() {
- var header = $( this ),
- headerId = header.uniqueId().attr( "id" ),
- panel = header.next(),
- panelId = panel.uniqueId().attr( "id" );
- header.attr( "aria-controls", panelId );
- panel.attr( "aria-labelledby", headerId );
- })
- .next()
- .attr( "role", "tabpanel" );
-
- this.headers
- .not( this.active )
- .attr({
- "aria-selected": "false",
- "aria-expanded": "false",
- tabIndex: -1
- })
- .next()
- .attr({
- "aria-hidden": "true"
- })
- .hide();
-
- // make sure at least one header is in the tab order
- if ( !this.active.length ) {
- this.headers.eq( 0 ).attr( "tabIndex", 0 );
- } else {
- this.active.attr({
- "aria-selected": "true",
- "aria-expanded": "true",
- tabIndex: 0
- })
- .next()
- .attr({
- "aria-hidden": "false"
- });
- }
-
- this._createIcons();
-
- this._setupEvents( options.event );
-
- if ( heightStyle === "fill" ) {
- maxHeight = parent.height();
- this.element.siblings( ":visible" ).each(function() {
- var elem = $( this ),
- position = elem.css( "position" );
-
- if ( position === "absolute" || position === "fixed" ) {
- return;
- }
- maxHeight -= elem.outerHeight( true );
- });
-
- this.headers.each(function() {
- maxHeight -= $( this ).outerHeight( true );
- });
-
- this.headers.next()
- .each(function() {
- $( this ).height( Math.max( 0, maxHeight -
- $( this ).innerHeight() + $( this ).height() ) );
- })
- .css( "overflow", "auto" );
- } else if ( heightStyle === "auto" ) {
- maxHeight = 0;
- this.headers.next()
- .each(function() {
- maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() );
- })
- .height( maxHeight );
- }
- },
-
- _activate: function( index ) {
- var active = this._findActive( index )[ 0 ];
-
- // trying to activate the already active panel
- if ( active === this.active[ 0 ] ) {
- return;
- }
-
- // trying to collapse, simulate a click on the currently active header
- active = active || this.active[ 0 ];
-
- this._eventHandler({
- target: active,
- currentTarget: active,
- preventDefault: $.noop
- });
- },
-
- _findActive: function( selector ) {
- return typeof selector === "number" ? this.headers.eq( selector ) : $();
- },
-
- _setupEvents: function( event ) {
- var events = {
- keydown: "_keydown"
- };
- if ( event ) {
- $.each( event.split( " " ), function( index, eventName ) {
- events[ eventName ] = "_eventHandler";
- });
- }
-
- this._off( this.headers.add( this.headers.next() ) );
- this._on( this.headers, events );
- this._on( this.headers.next(), { keydown: "_panelKeyDown" });
- this._hoverable( this.headers );
- this._focusable( this.headers );
- },
-
- _eventHandler: function( event ) {
- var options = this.options,
- active = this.active,
- clicked = $( event.currentTarget ),
- clickedIsActive = clicked[ 0 ] === active[ 0 ],
- collapsing = clickedIsActive && options.collapsible,
- toShow = collapsing ? $() : clicked.next(),
- toHide = active.next(),
- eventData = {
- oldHeader: active,
- oldPanel: toHide,
- newHeader: collapsing ? $() : clicked,
- newPanel: toShow
- };
-
- event.preventDefault();
-
- if (
- // click on active header, but not collapsible
- ( clickedIsActive && !options.collapsible ) ||
- // allow canceling activation
- ( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
- return;
- }
-
- options.active = collapsing ? false : this.headers.index( clicked );
-
- // when the call to ._toggle() comes after the class changes
- // it causes a very odd bug in IE 8 (see #6720)
- this.active = clickedIsActive ? $() : clicked;
- this._toggle( eventData );
-
- // switch classes
- // corner classes on the previously active header stay after the animation
- active.removeClass( "ui-accordion-header-active ui-state-active" );
- if ( options.icons ) {
- active.children( ".ui-accordion-header-icon" )
- .removeClass( options.icons.activeHeader )
- .addClass( options.icons.header );
- }
-
- if ( !clickedIsActive ) {
- clicked
- .removeClass( "ui-corner-all" )
- .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" );
- if ( options.icons ) {
- clicked.children( ".ui-accordion-header-icon" )
- .removeClass( options.icons.header )
- .addClass( options.icons.activeHeader );
- }
-
- clicked
- .next()
- .addClass( "ui-accordion-content-active" );
- }
- },
-
- _toggle: function( data ) {
- var toShow = data.newPanel,
- toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
-
- // handle activating a panel during the animation for another activation
- this.prevShow.add( this.prevHide ).stop( true, true );
- this.prevShow = toShow;
- this.prevHide = toHide;
-
- if ( this.options.animate ) {
- this._animate( toShow, toHide, data );
- } else {
- toHide.hide();
- toShow.show();
- this._toggleComplete( data );
- }
-
- toHide.attr({
- "aria-hidden": "true"
- });
- toHide.prev().attr({
- "aria-selected": "false",
- "aria-expanded": "false"
- });
- // if we're switching panels, remove the old header from the tab order
- // if we're opening from collapsed state, remove the previous header from the tab order
- // if we're collapsing, then keep the collapsing header in the tab order
- if ( toShow.length && toHide.length ) {
- toHide.prev().attr({
- "tabIndex": -1,
- "aria-expanded": "false"
- });
- } else if ( toShow.length ) {
- this.headers.filter(function() {
- return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0;
- })
- .attr( "tabIndex", -1 );
- }
-
- toShow
- .attr( "aria-hidden", "false" )
- .prev()
- .attr({
- "aria-selected": "true",
- "aria-expanded": "true",
- tabIndex: 0
- });
- },
-
- _animate: function( toShow, toHide, data ) {
- var total, easing, duration,
- that = this,
- adjust = 0,
- boxSizing = toShow.css( "box-sizing" ),
- down = toShow.length &&
- ( !toHide.length || ( toShow.index() < toHide.index() ) ),
- animate = this.options.animate || {},
- options = down && animate.down || animate,
- complete = function() {
- that._toggleComplete( data );
- };
-
- if ( typeof options === "number" ) {
- duration = options;
- }
- if ( typeof options === "string" ) {
- easing = options;
- }
- // fall back from options to animation in case of partial down settings
- easing = easing || options.easing || animate.easing;
- duration = duration || options.duration || animate.duration;
-
- if ( !toHide.length ) {
- return toShow.animate( this.showProps, duration, easing, complete );
- }
- if ( !toShow.length ) {
- return toHide.animate( this.hideProps, duration, easing, complete );
- }
-
- total = toShow.show().outerHeight();
- toHide.animate( this.hideProps, {
- duration: duration,
- easing: easing,
- step: function( now, fx ) {
- fx.now = Math.round( now );
- }
- });
- toShow
- .hide()
- .animate( this.showProps, {
- duration: duration,
- easing: easing,
- complete: complete,
- step: function( now, fx ) {
- fx.now = Math.round( now );
- if ( fx.prop !== "height" ) {
- if ( boxSizing === "content-box" ) {
- adjust += fx.now;
- }
- } else if ( that.options.heightStyle !== "content" ) {
- fx.now = Math.round( total - toHide.outerHeight() - adjust );
- adjust = 0;
- }
- }
- });
- },
-
- _toggleComplete: function( data ) {
- var toHide = data.oldPanel;
-
- toHide
- .removeClass( "ui-accordion-content-active" )
- .prev()
- .removeClass( "ui-corner-top" )
- .addClass( "ui-corner-all" );
-
- // Work around for rendering bug in IE (#5421)
- if ( toHide.length ) {
- toHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className;
- }
- this._trigger( "activate", null, data );
- }
-});
-
-
-/*!
- * jQuery UI Menu 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/menu/
- */
-
-
-var menu = $.widget( "ui.menu", {
- version: "1.11.4",
- defaultElement: "<ul>",
- delay: 300,
- options: {
- icons: {
- submenu: "ui-icon-carat-1-e"
- },
- items: "> *",
- menus: "ul",
- position: {
- my: "left-1 top",
- at: "right top"
- },
- role: "menu",
-
- // callbacks
- blur: null,
- focus: null,
- select: null
- },
-
- _create: function() {
- this.activeMenu = this.element;
-
- // Flag used to prevent firing of the click handler
- // as the event bubbles up through nested menus
- this.mouseHandled = false;
- this.element
- .uniqueId()
- .addClass( "ui-menu ui-widget ui-widget-content" )
- .toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length )
- .attr({
- role: this.options.role,
- tabIndex: 0
- });
-
- if ( this.options.disabled ) {
- this.element
- .addClass( "ui-state-disabled" )
- .attr( "aria-disabled", "true" );
- }
-
- this._on({
- // Prevent focus from sticking to links inside menu after clicking
- // them (focus should always stay on UL during navigation).
- "mousedown .ui-menu-item": function( event ) {
- event.preventDefault();
- },
- "click .ui-menu-item": function( event ) {
- var target = $( event.target );
- if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
- this.select( event );
-
- // Only set the mouseHandled flag if the event will bubble, see #9469.
- if ( !event.isPropagationStopped() ) {
- this.mouseHandled = true;
- }
-
- // Open submenu on click
- if ( target.has( ".ui-menu" ).length ) {
- this.expand( event );
- } else if ( !this.element.is( ":focus" ) && $( this.document[ 0 ].activeElement ).closest( ".ui-menu" ).length ) {
-
- // Redirect focus to the menu
- this.element.trigger( "focus", [ true ] );
-
- // If the active item is on the top level, let it stay active.
- // Otherwise, blur the active item since it is no longer visible.
- if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) {
- clearTimeout( this.timer );
- }
- }
- }
- },
- "mouseenter .ui-menu-item": function( event ) {
- // Ignore mouse events while typeahead is active, see #10458.
- // Prevents focusing the wrong item when typeahead causes a scroll while the mouse
- // is over an item in the menu
- if ( this.previousFilter ) {
- return;
- }
- var target = $( event.currentTarget );
- // Remove ui-state-active class from siblings of the newly focused menu item
- // to avoid a jump caused by adjacent elements both having a class with a border
- target.siblings( ".ui-state-active" ).removeClass( "ui-state-active" );
- this.focus( event, target );
- },
- mouseleave: "collapseAll",
- "mouseleave .ui-menu": "collapseAll",
- focus: function( event, keepActiveItem ) {
- // If there's already an active item, keep it active
- // If not, activate the first item
- var item = this.active || this.element.find( this.options.items ).eq( 0 );
-
- if ( !keepActiveItem ) {
- this.focus( event, item );
- }
- },
- blur: function( event ) {
- this._delay(function() {
- if ( !$.contains( this.element[0], this.document[0].activeElement ) ) {
- this.collapseAll( event );
- }
- });
- },
- keydown: "_keydown"
- });
-
- this.refresh();
-
- // Clicks outside of a menu collapse any open menus
- this._on( this.document, {
- click: function( event ) {
- if ( this._closeOnDocumentClick( event ) ) {
- this.collapseAll( event );
- }
-
- // Reset the mouseHandled flag
- this.mouseHandled = false;
- }
- });
- },
-
- _destroy: function() {
- // Destroy (sub)menus
- this.element
- .removeAttr( "aria-activedescendant" )
- .find( ".ui-menu" ).addBack()
- .removeClass( "ui-menu ui-widget ui-widget-content ui-menu-icons ui-front" )
- .removeAttr( "role" )
- .removeAttr( "tabIndex" )
- .removeAttr( "aria-labelledby" )
- .removeAttr( "aria-expanded" )
- .removeAttr( "aria-hidden" )
- .removeAttr( "aria-disabled" )
- .removeUniqueId()
- .show();
-
- // Destroy menu items
- this.element.find( ".ui-menu-item" )
- .removeClass( "ui-menu-item" )
- .removeAttr( "role" )
- .removeAttr( "aria-disabled" )
- .removeUniqueId()
- .removeClass( "ui-state-hover" )
- .removeAttr( "tabIndex" )
- .removeAttr( "role" )
- .removeAttr( "aria-haspopup" )
- .children().each( function() {
- var elem = $( this );
- if ( elem.data( "ui-menu-submenu-carat" ) ) {
- elem.remove();
- }
- });
-
- // Destroy menu dividers
- this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" );
- },
-
- _keydown: function( event ) {
- var match, prev, character, skip,
- preventDefault = true;
-
- switch ( event.keyCode ) {
- case $.ui.keyCode.PAGE_UP:
- this.previousPage( event );
- break;
- case $.ui.keyCode.PAGE_DOWN:
- this.nextPage( event );
- break;
- case $.ui.keyCode.HOME:
- this._move( "first", "first", event );
- break;
- case $.ui.keyCode.END:
- this._move( "last", "last", event );
- break;
- case $.ui.keyCode.UP:
- this.previous( event );
- break;
- case $.ui.keyCode.DOWN:
- this.next( event );
- break;
- case $.ui.keyCode.LEFT:
- this.collapse( event );
- break;
- case $.ui.keyCode.RIGHT:
- if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
- this.expand( event );
- }
- break;
- case $.ui.keyCode.ENTER:
- case $.ui.keyCode.SPACE:
- this._activate( event );
- break;
- case $.ui.keyCode.ESCAPE:
- this.collapse( event );
- break;
- default:
- preventDefault = false;
- prev = this.previousFilter || "";
- character = String.fromCharCode( event.keyCode );
- skip = false;
-
- clearTimeout( this.filterTimer );
-
- if ( character === prev ) {
- skip = true;
- } else {
- character = prev + character;
- }
-
- match = this._filterMenuItems( character );
- match = skip && match.index( this.active.next() ) !== -1 ?
- this.active.nextAll( ".ui-menu-item" ) :
- match;
-
- // If no matches on the current filter, reset to the last character pressed
- // to move down the menu to the first item that starts with that character
- if ( !match.length ) {
- character = String.fromCharCode( event.keyCode );
- match = this._filterMenuItems( character );
- }
-
- if ( match.length ) {
- this.focus( event, match );
- this.previousFilter = character;
- this.filterTimer = this._delay(function() {
- delete this.previousFilter;
- }, 1000 );
- } else {
- delete this.previousFilter;
- }
- }
-
- if ( preventDefault ) {
- event.preventDefault();
- }
- },
-
- _activate: function( event ) {
- if ( !this.active.is( ".ui-state-disabled" ) ) {
- if ( this.active.is( "[aria-haspopup='true']" ) ) {
- this.expand( event );
- } else {
- this.select( event );
- }
- }
- },
-
- refresh: function() {
- var menus, items,
- that = this,
- icon = this.options.icons.submenu,
- submenus = this.element.find( this.options.menus );
-
- this.element.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length );
-
- // Initialize nested menus
- submenus.filter( ":not(.ui-menu)" )
- .addClass( "ui-menu ui-widget ui-widget-content ui-front" )
- .hide()
- .attr({
- role: this.options.role,
- "aria-hidden": "true",
- "aria-expanded": "false"
- })
- .each(function() {
- var menu = $( this ),
- item = menu.parent(),
- submenuCarat = $( "<span>" )
- .addClass( "ui-menu-icon ui-icon " + icon )
- .data( "ui-menu-submenu-carat", true );
-
- item
- .attr( "aria-haspopup", "true" )
- .prepend( submenuCarat );
- menu.attr( "aria-labelledby", item.attr( "id" ) );
- });
-
- menus = submenus.add( this.element );
- items = menus.find( this.options.items );
-
- // Initialize menu-items containing spaces and/or dashes only as dividers
- items.not( ".ui-menu-item" ).each(function() {
- var item = $( this );
- if ( that._isDivider( item ) ) {
- item.addClass( "ui-widget-content ui-menu-divider" );
- }
- });
-
- // Don't refresh list items that are already adapted
- items.not( ".ui-menu-item, .ui-menu-divider" )
- .addClass( "ui-menu-item" )
- .uniqueId()
- .attr({
- tabIndex: -1,
- role: this._itemRole()
- });
-
- // Add aria-disabled attribute to any disabled menu item
- items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
-
- // If the active item has been removed, blur the menu
- if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
- this.blur();
- }
- },
-
- _itemRole: function() {
- return {
- menu: "menuitem",
- listbox: "option"
- }[ this.options.role ];
- },
-
- _setOption: function( key, value ) {
- if ( key === "icons" ) {
- this.element.find( ".ui-menu-icon" )
- .removeClass( this.options.icons.submenu )
- .addClass( value.submenu );
- }
- if ( key === "disabled" ) {
- this.element
- .toggleClass( "ui-state-disabled", !!value )
- .attr( "aria-disabled", value );
- }
- this._super( key, value );
- },
-
- focus: function( event, item ) {
- var nested, focused;
- this.blur( event, event && event.type === "focus" );
-
- this._scrollIntoView( item );
-
- this.active = item.first();
- focused = this.active.addClass( "ui-state-focus" ).removeClass( "ui-state-active" );
- // Only update aria-activedescendant if there's a role
- // otherwise we assume focus is managed elsewhere
- if ( this.options.role ) {
- this.element.attr( "aria-activedescendant", focused.attr( "id" ) );
- }
-
- // Highlight active parent menu item, if any
- this.active
- .parent()
- .closest( ".ui-menu-item" )
- .addClass( "ui-state-active" );
-
- if ( event && event.type === "keydown" ) {
- this._close();
- } else {
- this.timer = this._delay(function() {
- this._close();
- }, this.delay );
- }
-
- nested = item.children( ".ui-menu" );
- if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {
- this._startOpening(nested);
- }
- this.activeMenu = item.parent();
-
- this._trigger( "focus", event, { item: item } );
- },
-
- _scrollIntoView: function( item ) {
- var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
- if ( this._hasScroll() ) {
- borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0;
- paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0;
- offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
- scroll = this.activeMenu.scrollTop();
- elementHeight = this.activeMenu.height();
- itemHeight = item.outerHeight();
-
- if ( offset < 0 ) {
- this.activeMenu.scrollTop( scroll + offset );
- } else if ( offset + itemHeight > elementHeight ) {
- this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );
- }
- }
- },
-
- blur: function( event, fromFocus ) {
- if ( !fromFocus ) {
- clearTimeout( this.timer );
- }
-
- if ( !this.active ) {
- return;
- }
-
- this.active.removeClass( "ui-state-focus" );
- this.active = null;
-
- this._trigger( "blur", event, { item: this.active } );
- },
-
- _startOpening: function( submenu ) {
- clearTimeout( this.timer );
-
- // Don't open if already open fixes a Firefox bug that caused a .5 pixel
- // shift in the submenu position when mousing over the carat icon
- if ( submenu.attr( "aria-hidden" ) !== "true" ) {
- return;
- }
-
- this.timer = this._delay(function() {
- this._close();
- this._open( submenu );
- }, this.delay );
- },
-
- _open: function( submenu ) {
- var position = $.extend({
- of: this.active
- }, this.options.position );
-
- clearTimeout( this.timer );
- this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
- .hide()
- .attr( "aria-hidden", "true" );
-
- submenu
- .show()
- .removeAttr( "aria-hidden" )
- .attr( "aria-expanded", "true" )
- .position( position );
- },
-
- collapseAll: function( event, all ) {
- clearTimeout( this.timer );
- this.timer = this._delay(function() {
- // If we were passed an event, look for the submenu that contains the event
- var currentMenu = all ? this.element :
- $( event && event.target ).closest( this.element.find( ".ui-menu" ) );
-
- // If we found no valid submenu ancestor, use the main menu to close all sub menus anyway
- if ( !currentMenu.length ) {
- currentMenu = this.element;
- }
-
- this._close( currentMenu );
-
- this.blur( event );
- this.activeMenu = currentMenu;
- }, this.delay );
- },
-
- // With no arguments, closes the currently active menu - if nothing is active
- // it closes all menus. If passed an argument, it will search for menus BELOW
- _close: function( startMenu ) {
- if ( !startMenu ) {
- startMenu = this.active ? this.active.parent() : this.element;
- }
-
- startMenu
- .find( ".ui-menu" )
- .hide()
- .attr( "aria-hidden", "true" )
- .attr( "aria-expanded", "false" )
- .end()
- .find( ".ui-state-active" ).not( ".ui-state-focus" )
- .removeClass( "ui-state-active" );
- },
-
- _closeOnDocumentClick: function( event ) {
- return !$( event.target ).closest( ".ui-menu" ).length;
- },
-
- _isDivider: function( item ) {
-
- // Match hyphen, em dash, en dash
- return !/[^\-\u2014\u2013\s]/.test( item.text() );
- },
-
- collapse: function( event ) {
- var newItem = this.active &&
- this.active.parent().closest( ".ui-menu-item", this.element );
- if ( newItem && newItem.length ) {
- this._close();
- this.focus( event, newItem );
- }
- },
-
- expand: function( event ) {
- var newItem = this.active &&
- this.active
- .children( ".ui-menu " )
- .find( this.options.items )
- .first();
-
- if ( newItem && newItem.length ) {
- this._open( newItem.parent() );
-
- // Delay so Firefox will not hide activedescendant change in expanding submenu from AT
- this._delay(function() {
- this.focus( event, newItem );
- });
- }
- },
-
- next: function( event ) {
- this._move( "next", "first", event );
- },
-
- previous: function( event ) {
- this._move( "prev", "last", event );
- },
-
- isFirstItem: function() {
- return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
- },
-
- isLastItem: function() {
- return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
- },
-
- _move: function( direction, filter, event ) {
- var next;
- if ( this.active ) {
- if ( direction === "first" || direction === "last" ) {
- next = this.active
- [ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
- .eq( -1 );
- } else {
- next = this.active
- [ direction + "All" ]( ".ui-menu-item" )
- .eq( 0 );
- }
- }
- if ( !next || !next.length || !this.active ) {
- next = this.activeMenu.find( this.options.items )[ filter ]();
- }
-
- this.focus( event, next );
- },
-
- nextPage: function( event ) {
- var item, base, height;
-
- if ( !this.active ) {
- this.next( event );
- return;
- }
- if ( this.isLastItem() ) {
- return;
- }
- if ( this._hasScroll() ) {
- base = this.active.offset().top;
- height = this.element.height();
- this.active.nextAll( ".ui-menu-item" ).each(function() {
- item = $( this );
- return item.offset().top - base - height < 0;
- });
-
- this.focus( event, item );
- } else {
- this.focus( event, this.activeMenu.find( this.options.items )
- [ !this.active ? "first" : "last" ]() );
- }
- },
-
- previousPage: function( event ) {
- var item, base, height;
- if ( !this.active ) {
- this.next( event );
- return;
- }
- if ( this.isFirstItem() ) {
- return;
- }
- if ( this._hasScroll() ) {
- base = this.active.offset().top;
- height = this.element.height();
- this.active.prevAll( ".ui-menu-item" ).each(function() {
- item = $( this );
- return item.offset().top - base + height > 0;
- });
-
- this.focus( event, item );
- } else {
- this.focus( event, this.activeMenu.find( this.options.items ).first() );
- }
- },
-
- _hasScroll: function() {
- return this.element.outerHeight() < this.element.prop( "scrollHeight" );
- },
-
- select: function( event ) {
- // TODO: It should never be possible to not have an active item at this
- // point, but the tests don't trigger mouseenter before click.
- this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
- var ui = { item: this.active };
- if ( !this.active.has( ".ui-menu" ).length ) {
- this.collapseAll( event, true );
- }
- this._trigger( "select", event, ui );
- },
-
- _filterMenuItems: function(character) {
- var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ),
- regex = new RegExp( "^" + escapedCharacter, "i" );
-
- return this.activeMenu
- .find( this.options.items )
-
- // Only match on items, not dividers or other content (#10571)
- .filter( ".ui-menu-item" )
- .filter(function() {
- return regex.test( $.trim( $( this ).text() ) );
- });
- }
-});
-
-
-/*!
- * jQuery UI Autocomplete 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/autocomplete/
- */
-
-
-$.widget( "ui.autocomplete", {
- version: "1.11.4",
- defaultElement: "<input>",
- options: {
- appendTo: null,
- autoFocus: false,
- delay: 300,
- minLength: 1,
- position: {
- my: "left top",
- at: "left bottom",
- collision: "none"
- },
- source: null,
-
- // callbacks
- change: null,
- close: null,
- focus: null,
- open: null,
- response: null,
- search: null,
- select: null
- },
-
- requestIndex: 0,
- pending: 0,
-
- _create: function() {
- // Some browsers only repeat keydown events, not keypress events,
- // so we use the suppressKeyPress flag to determine if we've already
- // handled the keydown event. #7269
- // Unfortunately the code for & in keypress is the same as the up arrow,
- // so we use the suppressKeyPressRepeat flag to avoid handling keypress
- // events when we know the keydown event was used to modify the
- // search term. #7799
- var suppressKeyPress, suppressKeyPressRepeat, suppressInput,
- nodeName = this.element[ 0 ].nodeName.toLowerCase(),
- isTextarea = nodeName === "textarea",
- isInput = nodeName === "input";
-
- this.isMultiLine =
- // Textareas are always multi-line
- isTextarea ? true :
- // Inputs are always single-line, even if inside a contentEditable element
- // IE also treats inputs as contentEditable
- isInput ? false :
- // All other element types are determined by whether or not they're contentEditable
- this.element.prop( "isContentEditable" );
-
- this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];
- this.isNewMenu = true;
-
- this.element
- .addClass( "ui-autocomplete-input" )
- .attr( "autocomplete", "off" );
-
- this._on( this.element, {
- keydown: function( event ) {
- if ( this.element.prop( "readOnly" ) ) {
- suppressKeyPress = true;
- suppressInput = true;
- suppressKeyPressRepeat = true;
- return;
- }
-
- suppressKeyPress = false;
- suppressInput = false;
- suppressKeyPressRepeat = false;
- var keyCode = $.ui.keyCode;
- switch ( event.keyCode ) {
- case keyCode.PAGE_UP:
- suppressKeyPress = true;
- this._move( "previousPage", event );
- break;
- case keyCode.PAGE_DOWN:
- suppressKeyPress = true;
- this._move( "nextPage", event );
- break;
- case keyCode.UP:
- suppressKeyPress = true;
- this._keyEvent( "previous", event );
- break;
- case keyCode.DOWN:
- suppressKeyPress = true;
- this._keyEvent( "next", event );
- break;
- case keyCode.ENTER:
- // when menu is open and has focus
- if ( this.menu.active ) {
- // #6055 - Opera still allows the keypress to occur
- // which causes forms to submit
- suppressKeyPress = true;
- event.preventDefault();
- this.menu.select( event );
- }
- break;
- case keyCode.TAB:
- if ( this.menu.active ) {
- this.menu.select( event );
- }
- break;
- case keyCode.ESCAPE:
- if ( this.menu.element.is( ":visible" ) ) {
- if ( !this.isMultiLine ) {
- this._value( this.term );
- }
- this.close( event );
- // Different browsers have different default behavior for escape
- // Single press can mean undo or clear
- // Double press in IE means clear the whole form
- event.preventDefault();
- }
- break;
- default:
- suppressKeyPressRepeat = true;
- // search timeout should be triggered before the input value is changed
- this._searchTimeout( event );
- break;
- }
- },
- keypress: function( event ) {
- if ( suppressKeyPress ) {
- suppressKeyPress = false;
- if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
- event.preventDefault();
- }
- return;
- }
- if ( suppressKeyPressRepeat ) {
- return;
- }
-
- // replicate some key handlers to allow them to repeat in Firefox and Opera
- var keyCode = $.ui.keyCode;
- switch ( event.keyCode ) {
- case keyCode.PAGE_UP:
- this._move( "previousPage", event );
- break;
- case keyCode.PAGE_DOWN:
- this._move( "nextPage", event );
- break;
- case keyCode.UP:
- this._keyEvent( "previous", event );
- break;
- case keyCode.DOWN:
- this._keyEvent( "next", event );
- break;
- }
- },
- input: function( event ) {
- if ( suppressInput ) {
- suppressInput = false;
- event.preventDefault();
- return;
- }
- this._searchTimeout( event );
- },
- focus: function() {
- this.selectedItem = null;
- this.previous = this._value();
- },
- blur: function( event ) {
- if ( this.cancelBlur ) {
- delete this.cancelBlur;
- return;
- }
-
- clearTimeout( this.searching );
- this.close( event );
- this._change( event );
- }
- });
-
- this._initSource();
- this.menu = $( "<ul>" )
- .addClass( "ui-autocomplete ui-front" )
- .appendTo( this._appendTo() )
- .menu({
- // disable ARIA support, the live region takes care of that
- role: null
- })
- .hide()
- .menu( "instance" );
-
- this._on( this.menu.element, {
- mousedown: function( event ) {
- // prevent moving focus out of the text field
- event.preventDefault();
-
- // IE doesn't prevent moving focus even with event.preventDefault()
- // so we set a flag to know when we should ignore the blur event
- this.cancelBlur = true;
- this._delay(function() {
- delete this.cancelBlur;
- });
-
- // clicking on the scrollbar causes focus to shift to the body
- // but we can't detect a mouseup or a click immediately afterward
- // so we have to track the next mousedown and close the menu if
- // the user clicks somewhere outside of the autocomplete
- var menuElement = this.menu.element[ 0 ];
- if ( !$( event.target ).closest( ".ui-menu-item" ).length ) {
- this._delay(function() {
- var that = this;
- this.document.one( "mousedown", function( event ) {
- if ( event.target !== that.element[ 0 ] &&
- event.target !== menuElement &&
- !$.contains( menuElement, event.target ) ) {
- that.close();
- }
- });
- });
- }
- },
- menufocus: function( event, ui ) {
- var label, item;
- // support: Firefox
- // Prevent accidental activation of menu items in Firefox (#7024 #9118)
- if ( this.isNewMenu ) {
- this.isNewMenu = false;
- if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
- this.menu.blur();
-
- this.document.one( "mousemove", function() {
- $( event.target ).trigger( event.originalEvent );
- });
-
- return;
- }
- }
-
- item = ui.item.data( "ui-autocomplete-item" );
- if ( false !== this._trigger( "focus", event, { item: item } ) ) {
- // use value to match what will end up in the input, if it was a key event
- if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
- this._value( item.value );
- }
- }
-
- // Announce the value in the liveRegion
- label = ui.item.attr( "aria-label" ) || item.value;
- if ( label && $.trim( label ).length ) {
- this.liveRegion.children().hide();
- $( "<div>" ).text( label ).appendTo( this.liveRegion );
- }
- },
- menuselect: function( event, ui ) {
- var item = ui.item.data( "ui-autocomplete-item" ),
- previous = this.previous;
-
- // only trigger when focus was lost (click on menu)
- if ( this.element[ 0 ] !== this.document[ 0 ].activeElement ) {
- this.element.focus();
- this.previous = previous;
- // #6109 - IE triggers two focus events and the second
- // is asynchronous, so we need to reset the previous
- // term synchronously and asynchronously :-(
- this._delay(function() {
- this.previous = previous;
- this.selectedItem = item;
- });
- }
-
- if ( false !== this._trigger( "select", event, { item: item } ) ) {
- this._value( item.value );
- }
- // reset the term after the select event
- // this allows custom select handling to work properly
- this.term = this._value();
-
- this.close( event );
- this.selectedItem = item;
- }
- });
-
- this.liveRegion = $( "<span>", {
- role: "status",
- "aria-live": "assertive",
- "aria-relevant": "additions"
- })
- .addClass( "ui-helper-hidden-accessible" )
- .appendTo( this.document[ 0 ].body );
-
- // turning off autocomplete prevents the browser from remembering the
- // value when navigating through history, so we re-enable autocomplete
- // if the page is unloaded before the widget is destroyed. #7790
- this._on( this.window, {
- beforeunload: function() {
- this.element.removeAttr( "autocomplete" );
- }
- });
- },
-
- _destroy: function() {
- clearTimeout( this.searching );
- this.element
- .removeClass( "ui-autocomplete-input" )
- .removeAttr( "autocomplete" );
- this.menu.element.remove();
- this.liveRegion.remove();
- },
-
- _setOption: function( key, value ) {
- this._super( key, value );
- if ( key === "source" ) {
- this._initSource();
- }
- if ( key === "appendTo" ) {
- this.menu.element.appendTo( this._appendTo() );
- }
- if ( key === "disabled" && value && this.xhr ) {
- this.xhr.abort();
- }
- },
-
- _appendTo: function() {
- var element = this.options.appendTo;
-
- if ( element ) {
- element = element.jquery || element.nodeType ?
- $( element ) :
- this.document.find( element ).eq( 0 );
- }
-
- if ( !element || !element[ 0 ] ) {
- element = this.element.closest( ".ui-front" );
- }
-
- if ( !element.length ) {
- element = this.document[ 0 ].body;
- }
-
- return element;
- },
-
- _initSource: function() {
- var array, url,
- that = this;
- if ( $.isArray( this.options.source ) ) {
- array = this.options.source;
- this.source = function( request, response ) {
- response( $.ui.autocomplete.filter( array, request.term ) );
- };
- } else if ( typeof this.options.source === "string" ) {
- url = this.options.source;
- this.source = function( request, response ) {
- if ( that.xhr ) {
- that.xhr.abort();
- }
- that.xhr = $.ajax({
- url: url,
- data: request,
- dataType: "json",
- success: function( data ) {
- response( data );
- },
- error: function() {
- response([]);
- }
- });
- };
- } else {
- this.source = this.options.source;
- }
- },
-
- _searchTimeout: function( event ) {
- clearTimeout( this.searching );
- this.searching = this._delay(function() {
-
- // Search if the value has changed, or if the user retypes the same value (see #7434)
- var equalValues = this.term === this._value(),
- menuVisible = this.menu.element.is( ":visible" ),
- modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
-
- if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) {
- this.selectedItem = null;
- this.search( null, event );
- }
- }, this.options.delay );
- },
-
- search: function( value, event ) {
- value = value != null ? value : this._value();
-
- // always save the actual value, not the one passed as an argument
- this.term = this._value();
-
- if ( value.length < this.options.minLength ) {
- return this.close( event );
- }
-
- if ( this._trigger( "search", event ) === false ) {
- return;
- }
-
- return this._search( value );
- },
-
- _search: function( value ) {
- this.pending++;
- this.element.addClass( "ui-autocomplete-loading" );
- this.cancelSearch = false;
-
- this.source( { term: value }, this._response() );
- },
-
- _response: function() {
- var index = ++this.requestIndex;
-
- return $.proxy(function( content ) {
- if ( index === this.requestIndex ) {
- this.__response( content );
- }
-
- this.pending--;
- if ( !this.pending ) {
- this.element.removeClass( "ui-autocomplete-loading" );
- }
- }, this );
- },
-
- __response: function( content ) {
- if ( content ) {
- content = this._normalize( content );
- }
- this._trigger( "response", null, { content: content } );
- if ( !this.options.disabled && content && content.length && !this.cancelSearch ) {
- this._suggest( content );
- this._trigger( "open" );
- } else {
- // use ._close() instead of .close() so we don't cancel future searches
- this._close();
- }
- },
-
- close: function( event ) {
- this.cancelSearch = true;
- this._close( event );
- },
-
- _close: function( event ) {
- if ( this.menu.element.is( ":visible" ) ) {
- this.menu.element.hide();
- this.menu.blur();
- this.isNewMenu = true;
- this._trigger( "close", event );
- }
- },
-
- _change: function( event ) {
- if ( this.previous !== this._value() ) {
- this._trigger( "change", event, { item: this.selectedItem } );
- }
- },
-
- _normalize: function( items ) {
- // assume all items have the right format when the first item is complete
- if ( items.length && items[ 0 ].label && items[ 0 ].value ) {
- return items;
- }
- return $.map( items, function( item ) {
- if ( typeof item === "string" ) {
- return {
- label: item,
- value: item
- };
- }
- return $.extend( {}, item, {
- label: item.label || item.value,
- value: item.value || item.label
- });
- });
- },
-
- _suggest: function( items ) {
- var ul = this.menu.element.empty();
- this._renderMenu( ul, items );
- this.isNewMenu = true;
- this.menu.refresh();
-
- // size and position menu
- ul.show();
- this._resizeMenu();
- ul.position( $.extend({
- of: this.element
- }, this.options.position ) );
-
- if ( this.options.autoFocus ) {
- this.menu.next();
- }
- },
-
- _resizeMenu: function() {
- var ul = this.menu.element;
- ul.outerWidth( Math.max(
- // Firefox wraps long text (possibly a rounding bug)
- // so we add 1px to avoid the wrapping (#7513)
- ul.width( "" ).outerWidth() + 1,
- this.element.outerWidth()
- ) );
- },
-
- _renderMenu: function( ul, items ) {
- var that = this;
- $.each( items, function( index, item ) {
- that._renderItemData( ul, item );
- });
- },
-
- _renderItemData: function( ul, item ) {
- return this._renderItem( ul, item ).data( "ui-autocomplete-item", item );
- },
-
- _renderItem: function( ul, item ) {
- return $( "<li>" ).text( item.label ).appendTo( ul );
- },
-
- _move: function( direction, event ) {
- if ( !this.menu.element.is( ":visible" ) ) {
- this.search( null, event );
- return;
- }
- if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
- this.menu.isLastItem() && /^next/.test( direction ) ) {
-
- if ( !this.isMultiLine ) {
- this._value( this.term );
- }
-
- this.menu.blur();
- return;
- }
- this.menu[ direction ]( event );
- },
-
- widget: function() {
- return this.menu.element;
- },
-
- _value: function() {
- return this.valueMethod.apply( this.element, arguments );
- },
-
- _keyEvent: function( keyEvent, event ) {
- if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
- this._move( keyEvent, event );
-
- // prevents moving cursor to beginning/end of the text field in some browsers
- event.preventDefault();
- }
- }
-});
-
-$.extend( $.ui.autocomplete, {
- escapeRegex: function( value ) {
- return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
- },
- filter: function( array, term ) {
- var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" );
- return $.grep( array, function( value ) {
- return matcher.test( value.label || value.value || value );
- });
- }
-});
-
-// live region extension, adding a `messages` option
-// NOTE: This is an experimental API. We are still investigating
-// a full solution for string manipulation and internationalization.
-$.widget( "ui.autocomplete", $.ui.autocomplete, {
- options: {
- messages: {
- noResults: "No search results.",
- results: function( amount ) {
- return amount + ( amount > 1 ? " results are" : " result is" ) +
- " available, use up and down arrow keys to navigate.";
- }
- }
- },
-
- __response: function( content ) {
- var message;
- this._superApply( arguments );
- if ( this.options.disabled || this.cancelSearch ) {
- return;
- }
- if ( content && content.length ) {
- message = this.options.messages.results( content.length );
- } else {
- message = this.options.messages.noResults;
- }
- this.liveRegion.children().hide();
- $( "<div>" ).text( message ).appendTo( this.liveRegion );
- }
-});
-
-var autocomplete = $.ui.autocomplete;
-
-
-/*!
- * jQuery UI Button 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/button/
- */
-
-
-var lastActive,
- baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
- typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",
- formResetHandler = function() {
- var form = $( this );
- setTimeout(function() {
- form.find( ":ui-button" ).button( "refresh" );
- }, 1 );
- },
- radioGroup = function( radio ) {
- var name = radio.name,
- form = radio.form,
- radios = $( [] );
- if ( name ) {
- name = name.replace( /'/g, "\\'" );
- if ( form ) {
- radios = $( form ).find( "[name='" + name + "'][type=radio]" );
- } else {
- radios = $( "[name='" + name + "'][type=radio]", radio.ownerDocument )
- .filter(function() {
- return !this.form;
- });
- }
- }
- return radios;
- };
-
-$.widget( "ui.button", {
- version: "1.11.4",
- defaultElement: "<button>",
- options: {
- disabled: null,
- text: true,
- label: null,
- icons: {
- primary: null,
- secondary: null
- }
- },
- _create: function() {
- this.element.closest( "form" )
- .unbind( "reset" + this.eventNamespace )
- .bind( "reset" + this.eventNamespace, formResetHandler );
-
- if ( typeof this.options.disabled !== "boolean" ) {
- this.options.disabled = !!this.element.prop( "disabled" );
- } else {
- this.element.prop( "disabled", this.options.disabled );
- }
-
- this._determineButtonType();
- this.hasTitle = !!this.buttonElement.attr( "title" );
-
- var that = this,
- options = this.options,
- toggleButton = this.type === "checkbox" || this.type === "radio",
- activeClass = !toggleButton ? "ui-state-active" : "";
-
- if ( options.label === null ) {
- options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html());
- }
-
- this._hoverable( this.buttonElement );
-
- this.buttonElement
- .addClass( baseClasses )
- .attr( "role", "button" )
- .bind( "mouseenter" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return;
- }
- if ( this === lastActive ) {
- $( this ).addClass( "ui-state-active" );
- }
- })
- .bind( "mouseleave" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return;
- }
- $( this ).removeClass( activeClass );
- })
- .bind( "click" + this.eventNamespace, function( event ) {
- if ( options.disabled ) {
- event.preventDefault();
- event.stopImmediatePropagation();
- }
- });
-
- // Can't use _focusable() because the element that receives focus
- // and the element that gets the ui-state-focus class are different
- this._on({
- focus: function() {
- this.buttonElement.addClass( "ui-state-focus" );
- },
- blur: function() {
- this.buttonElement.removeClass( "ui-state-focus" );
- }
- });
-
- if ( toggleButton ) {
- this.element.bind( "change" + this.eventNamespace, function() {
- that.refresh();
- });
- }
-
- if ( this.type === "checkbox" ) {
- this.buttonElement.bind( "click" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return false;
- }
- });
- } else if ( this.type === "radio" ) {
- this.buttonElement.bind( "click" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return false;
- }
- $( this ).addClass( "ui-state-active" );
- that.buttonElement.attr( "aria-pressed", "true" );
-
- var radio = that.element[ 0 ];
- radioGroup( radio )
- .not( radio )
- .map(function() {
- return $( this ).button( "widget" )[ 0 ];
- })
- .removeClass( "ui-state-active" )
- .attr( "aria-pressed", "false" );
- });
- } else {
- this.buttonElement
- .bind( "mousedown" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return false;
- }
- $( this ).addClass( "ui-state-active" );
- lastActive = this;
- that.document.one( "mouseup", function() {
- lastActive = null;
- });
- })
- .bind( "mouseup" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return false;
- }
- $( this ).removeClass( "ui-state-active" );
- })
- .bind( "keydown" + this.eventNamespace, function(event) {
- if ( options.disabled ) {
- return false;
- }
- if ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) {
- $( this ).addClass( "ui-state-active" );
- }
- })
- // see #8559, we bind to blur here in case the button element loses
- // focus between keydown and keyup, it would be left in an "active" state
- .bind( "keyup" + this.eventNamespace + " blur" + this.eventNamespace, function() {
- $( this ).removeClass( "ui-state-active" );
- });
-
- if ( this.buttonElement.is("a") ) {
- this.buttonElement.keyup(function(event) {
- if ( event.keyCode === $.ui.keyCode.SPACE ) {
- // TODO pass through original event correctly (just as 2nd argument doesn't work)
- $( this ).click();
- }
- });
- }
- }
-
- this._setOption( "disabled", options.disabled );
- this._resetButton();
- },
-
- _determineButtonType: function() {
- var ancestor, labelSelector, checked;
-
- if ( this.element.is("[type=checkbox]") ) {
- this.type = "checkbox";
- } else if ( this.element.is("[type=radio]") ) {
- this.type = "radio";
- } else if ( this.element.is("input") ) {
- this.type = "input";
- } else {
- this.type = "button";
- }
-
- if ( this.type === "checkbox" || this.type === "radio" ) {
- // we don't search against the document in case the element
- // is disconnected from the DOM
- ancestor = this.element.parents().last();
- labelSelector = "label[for='" + this.element.attr("id") + "']";
- this.buttonElement = ancestor.find( labelSelector );
- if ( !this.buttonElement.length ) {
- ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings();
- this.buttonElement = ancestor.filter( labelSelector );
- if ( !this.buttonElement.length ) {
- this.buttonElement = ancestor.find( labelSelector );
- }
- }
- this.element.addClass( "ui-helper-hidden-accessible" );
-
- checked = this.element.is( ":checked" );
- if ( checked ) {
- this.buttonElement.addClass( "ui-state-active" );
- }
- this.buttonElement.prop( "aria-pressed", checked );
- } else {
- this.buttonElement = this.element;
- }
- },
-
- widget: function() {
- return this.buttonElement;
- },
-
- _destroy: function() {
- this.element
- .removeClass( "ui-helper-hidden-accessible" );
- this.buttonElement
- .removeClass( baseClasses + " ui-state-active " + typeClasses )
- .removeAttr( "role" )
- .removeAttr( "aria-pressed" )
- .html( this.buttonElement.find(".ui-button-text").html() );
-
- if ( !this.hasTitle ) {
- this.buttonElement.removeAttr( "title" );
- }
- },
-
- _setOption: function( key, value ) {
- this._super( key, value );
- if ( key === "disabled" ) {
- this.widget().toggleClass( "ui-state-disabled", !!value );
- this.element.prop( "disabled", !!value );
- if ( value ) {
- if ( this.type === "checkbox" || this.type === "radio" ) {
- this.buttonElement.removeClass( "ui-state-focus" );
- } else {
- this.buttonElement.removeClass( "ui-state-focus ui-state-active" );
- }
- }
- return;
- }
- this._resetButton();
- },
-
- refresh: function() {
- //See #8237 & #8828
- var isDisabled = this.element.is( "input, button" ) ? this.element.is( ":disabled" ) : this.element.hasClass( "ui-button-disabled" );
-
- if ( isDisabled !== this.options.disabled ) {
- this._setOption( "disabled", isDisabled );
- }
- if ( this.type === "radio" ) {
- radioGroup( this.element[0] ).each(function() {
- if ( $( this ).is( ":checked" ) ) {
- $( this ).button( "widget" )
- .addClass( "ui-state-active" )
- .attr( "aria-pressed", "true" );
- } else {
- $( this ).button( "widget" )
- .removeClass( "ui-state-active" )
- .attr( "aria-pressed", "false" );
- }
- });
- } else if ( this.type === "checkbox" ) {
- if ( this.element.is( ":checked" ) ) {
- this.buttonElement
- .addClass( "ui-state-active" )
- .attr( "aria-pressed", "true" );
- } else {
- this.buttonElement
- .removeClass( "ui-state-active" )
- .attr( "aria-pressed", "false" );
- }
- }
- },
-
- _resetButton: function() {
- if ( this.type === "input" ) {
- if ( this.options.label ) {
- this.element.val( this.options.label );
- }
- return;
- }
- var buttonElement = this.buttonElement.removeClass( typeClasses ),
- buttonText = $( "<span></span>", this.document[0] )
- .addClass( "ui-button-text" )
- .html( this.options.label )
- .appendTo( buttonElement.empty() )
- .text(),
- icons = this.options.icons,
- multipleIcons = icons.primary && icons.secondary,
- buttonClasses = [];
-
- if ( icons.primary || icons.secondary ) {
- if ( this.options.text ) {
- buttonClasses.push( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) );
- }
-
- if ( icons.primary ) {
- buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" );
- }
-
- if ( icons.secondary ) {
- buttonElement.append( "<span class='ui-button-icon-secondary ui-icon " + icons.secondary + "'></span>" );
- }
-
- if ( !this.options.text ) {
- buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" );
-
- if ( !this.hasTitle ) {
- buttonElement.attr( "title", $.trim( buttonText ) );
- }
- }
- } else {
- buttonClasses.push( "ui-button-text-only" );
- }
- buttonElement.addClass( buttonClasses.join( " " ) );
- }
-});
-
-$.widget( "ui.buttonset", {
- version: "1.11.4",
- options: {
- items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"
- },
-
- _create: function() {
- this.element.addClass( "ui-buttonset" );
- },
-
- _init: function() {
- this.refresh();
- },
-
- _setOption: function( key, value ) {
- if ( key === "disabled" ) {
- this.buttons.button( "option", key, value );
- }
-
- this._super( key, value );
- },
-
- refresh: function() {
- var rtl = this.element.css( "direction" ) === "rtl",
- allButtons = this.element.find( this.options.items ),
- existingButtons = allButtons.filter( ":ui-button" );
-
- // Initialize new buttons
- allButtons.not( ":ui-button" ).button();
-
- // Refresh existing buttons
- existingButtons.button( "refresh" );
-
- this.buttons = allButtons
- .map(function() {
- return $( this ).button( "widget" )[ 0 ];
- })
- .removeClass( "ui-corner-all ui-corner-left ui-corner-right" )
- .filter( ":first" )
- .addClass( rtl ? "ui-corner-right" : "ui-corner-left" )
- .end()
- .filter( ":last" )
- .addClass( rtl ? "ui-corner-left" : "ui-corner-right" )
- .end()
- .end();
- },
-
- _destroy: function() {
- this.element.removeClass( "ui-buttonset" );
- this.buttons
- .map(function() {
- return $( this ).button( "widget" )[ 0 ];
- })
- .removeClass( "ui-corner-left ui-corner-right" )
- .end()
- .button( "destroy" );
- }
-});
-
-var button = $.ui.button;
-
-
-/*!
- * jQuery UI Datepicker 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/datepicker/
- */
-
-
-$.extend($.ui, { datepicker: { version: "1.11.4" } });
-
-var datepicker_instActive;
-
-function datepicker_getZindex( elem ) {
- var position, value;
- while ( elem.length && elem[ 0 ] !== document ) {
- // Ignore z-index if position is set to a value where z-index is ignored by the browser
- // This makes behavior of this function consistent across browsers
- // WebKit always returns auto if the element is positioned
- position = elem.css( "position" );
- if ( position === "absolute" || position === "relative" || position === "fixed" ) {
- // IE returns 0 when zIndex is not specified
- // other browsers return a string
- // we ignore the case of nested elements with an explicit value of 0
- // <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
- value = parseInt( elem.css( "zIndex" ), 10 );
- if ( !isNaN( value ) && value !== 0 ) {
- return value;
- }
- }
- elem = elem.parent();
- }
-
- return 0;
-}
-/* Date picker manager.
- Use the singleton instance of this class, $.datepicker, to interact with the date picker.
- Settings for (groups of) date pickers are maintained in an instance object,
- allowing multiple different settings on the same page. */
-
-function Datepicker() {
- this._curInst = null; // The current instance in use
- this._keyEvent = false; // If the last event was a key event
- this._disabledInputs = []; // List of date picker inputs that have been disabled
- this._datepickerShowing = false; // True if the popup picker is showing , false if not
- this._inDialog = false; // True if showing within a "dialog", false if not
- this._mainDivId = "ui-datepicker-div"; // The ID of the main datepicker division
- this._inlineClass = "ui-datepicker-inline"; // The name of the inline marker class
- this._appendClass = "ui-datepicker-append"; // The name of the append marker class
- this._triggerClass = "ui-datepicker-trigger"; // The name of the trigger marker class
- this._dialogClass = "ui-datepicker-dialog"; // The name of the dialog marker class
- this._disableClass = "ui-datepicker-disabled"; // The name of the disabled covering marker class
- this._unselectableClass = "ui-datepicker-unselectable"; // The name of the unselectable cell marker class
- this._currentClass = "ui-datepicker-current-day"; // The name of the current day marker class
- this._dayOverClass = "ui-datepicker-days-cell-over"; // The name of the day hover marker class
- this.regional = []; // Available regional settings, indexed by language code
- this.regional[""] = { // Default regional settings
- closeText: "Done", // Display text for close link
- prevText: "Prev", // Display text for previous month link
- nextText: "Next", // Display text for next month link
- currentText: "Today", // Display text for current month link
- monthNames: ["January","February","March","April","May","June",
- "July","August","September","October","November","December"], // Names of months for drop-down and formatting
- monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], // For formatting
- dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], // For formatting
- dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], // For formatting
- dayNamesMin: ["Su","Mo","Tu","We","Th","Fr","Sa"], // Column headings for days starting at Sunday
- weekHeader: "Wk", // Column header for week of the year
- dateFormat: "mm/dd/yy", // See format options on parseDate
- firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
- isRTL: false, // True if right-to-left language, false if left-to-right
- showMonthAfterYear: false, // True if the year select precedes month, false for month then year
- yearSuffix: "" // Additional text to append to the year in the month headers
- };
- this._defaults = { // Global defaults for all the date picker instances
- showOn: "focus", // "focus" for popup on focus,
- // "button" for trigger button, or "both" for either
- showAnim: "fadeIn", // Name of jQuery animation for popup
- showOptions: {}, // Options for enhanced animations
- defaultDate: null, // Used when field is blank: actual date,
- // +/-number for offset from today, null for today
- appendText: "", // Display text following the input box, e.g. showing the format
- buttonText: "...", // Text for trigger button
- buttonImage: "", // URL for trigger button image
- buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
- hideIfNoPrevNext: false, // True to hide next/previous month links
- // if not applicable, false to just disable them
- navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
- gotoCurrent: false, // True if today link goes back to current selection instead
- changeMonth: false, // True if month can be selected directly, false if only prev/next
- changeYear: false, // True if year can be selected directly, false if only prev/next
- yearRange: "c-10:c+10", // Range of years to display in drop-down,
- // either relative to today's year (-nn:+nn), relative to currently displayed year
- // (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
- showOtherMonths: false, // True to show dates in other months, false to leave blank
- selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable
- showWeek: false, // True to show week of the year, false to not show it
- calculateWeek: this.iso8601Week, // How to calculate the week of the year,
- // takes a Date and returns the number of the week for it
- shortYearCutoff: "+10", // Short year values < this are in the current century,
- // > this are in the previous century,
- // string value starting with "+" for current year + value
- minDate: null, // The earliest selectable date, or null for no limit
- maxDate: null, // The latest selectable date, or null for no limit
- duration: "fast", // Duration of display/closure
- beforeShowDay: null, // Function that takes a date and returns an array with
- // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or "",
- // [2] = cell title (optional), e.g. $.datepicker.noWeekends
- beforeShow: null, // Function that takes an input field and
- // returns a set of custom settings for the date picker
- onSelect: null, // Define a callback function when a date is selected
- onChangeMonthYear: null, // Define a callback function when the month or year is changed
- onClose: null, // Define a callback function when the datepicker is closed
- numberOfMonths: 1, // Number of months to show at a time
- showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
- stepMonths: 1, // Number of months to step back/forward
- stepBigMonths: 12, // Number of months to step back/forward for the big links
- altField: "", // Selector for an alternate field to store selected dates into
- altFormat: "", // The date format to use for the alternate field
- constrainInput: true, // The input is constrained by the current date format
- showButtonPanel: false, // True to show button panel, false to not show it
- autoSize: false, // True to size the input for the date format, false to leave as is
- disabled: false // The initial disabled state
- };
- $.extend(this._defaults, this.regional[""]);
- this.regional.en = $.extend( true, {}, this.regional[ "" ]);
- this.regional[ "en-US" ] = $.extend( true, {}, this.regional.en );
- this.dpDiv = datepicker_bindHover($("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"));
-}
-
-$.extend(Datepicker.prototype, {
- /* Class name added to elements to indicate already configured with a date picker. */
- markerClassName: "hasDatepicker",
-
- //Keep track of the maximum number of rows displayed (see #7043)
- maxRows: 4,
-
- // TODO rename to "widget" when switching to widget factory
- _widgetDatepicker: function() {
- return this.dpDiv;
- },
-
- /* Override the default settings for all instances of the date picker.
- * @param settings object - the new settings to use as defaults (anonymous object)
- * @return the manager object
- */
- setDefaults: function(settings) {
- datepicker_extendRemove(this._defaults, settings || {});
- return this;
- },
-
- /* Attach the date picker to a jQuery selection.
- * @param target element - the target input field or division or span
- * @param settings object - the new settings to use for this date picker instance (anonymous)
- */
- _attachDatepicker: function(target, settings) {
- var nodeName, inline, inst;
- nodeName = target.nodeName.toLowerCase();
- inline = (nodeName === "div" || nodeName === "span");
- if (!target.id) {
- this.uuid += 1;
- target.id = "dp" + this.uuid;
- }
- inst = this._newInst($(target), inline);
- inst.settings = $.extend({}, settings || {});
- if (nodeName === "input") {
- this._connectDatepicker(target, inst);
- } else if (inline) {
- this._inlineDatepicker(target, inst);
- }
- },
-
- /* Create a new instance object. */
- _newInst: function(target, inline) {
- var id = target[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"); // escape jQuery meta chars
- return {id: id, input: target, // associated target
- selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
- drawMonth: 0, drawYear: 0, // month being drawn
- inline: inline, // is datepicker inline or not
- dpDiv: (!inline ? this.dpDiv : // presentation div
- datepicker_bindHover($("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")))};
- },
-
- /* Attach the date picker to an input field. */
- _connectDatepicker: function(target, inst) {
- var input = $(target);
- inst.append = $([]);
- inst.trigger = $([]);
- if (input.hasClass(this.markerClassName)) {
- return;
- }
- this._attachments(input, inst);
- input.addClass(this.markerClassName).keydown(this._doKeyDown).
- keypress(this._doKeyPress).keyup(this._doKeyUp);
- this._autoSize(inst);
- $.data(target, "datepicker", inst);
- //If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)
- if( inst.settings.disabled ) {
- this._disableDatepicker( target );
- }
- },
-
- /* Make attachments based on settings. */
- _attachments: function(input, inst) {
- var showOn, buttonText, buttonImage,
- appendText = this._get(inst, "appendText"),
- isRTL = this._get(inst, "isRTL");
-
- if (inst.append) {
- inst.append.remove();
- }
- if (appendText) {
- inst.append = $("<span class='" + this._appendClass + "'>" + appendText + "</span>");
- input[isRTL ? "before" : "after"](inst.append);
- }
-
- input.unbind("focus", this._showDatepicker);
-
- if (inst.trigger) {
- inst.trigger.remove();
- }
-
- showOn = this._get(inst, "showOn");
- if (showOn === "focus" || showOn === "both") { // pop-up date picker when in the marked field
- input.focus(this._showDatepicker);
- }
- if (showOn === "button" || showOn === "both") { // pop-up date picker when button clicked
- buttonText = this._get(inst, "buttonText");
- buttonImage = this._get(inst, "buttonImage");
- inst.trigger = $(this._get(inst, "buttonImageOnly") ?
- $("<img/>").addClass(this._triggerClass).
- attr({ src: buttonImage, alt: buttonText, title: buttonText }) :
- $("<button type='button'></button>").addClass(this._triggerClass).
- html(!buttonImage ? buttonText : $("<img/>").attr(
- { src:buttonImage, alt:buttonText, title:buttonText })));
- input[isRTL ? "before" : "after"](inst.trigger);
- inst.trigger.click(function() {
- if ($.datepicker._datepickerShowing && $.datepicker._lastInput === input[0]) {
- $.datepicker._hideDatepicker();
- } else if ($.datepicker._datepickerShowing && $.datepicker._lastInput !== input[0]) {
- $.datepicker._hideDatepicker();
- $.datepicker._showDatepicker(input[0]);
- } else {
- $.datepicker._showDatepicker(input[0]);
- }
- return false;
- });
- }
- },
-
- /* Apply the maximum length for the date format. */
- _autoSize: function(inst) {
- if (this._get(inst, "autoSize") && !inst.inline) {
- var findMax, max, maxI, i,
- date = new Date(2009, 12 - 1, 20), // Ensure double digits
- dateFormat = this._get(inst, "dateFormat");
-
- if (dateFormat.match(/[DM]/)) {
- findMax = function(names) {
- max = 0;
- maxI = 0;
- for (i = 0; i < names.length; i++) {
- if (names[i].length > max) {
- max = names[i].length;
- maxI = i;
- }
- }
- return maxI;
- };
- date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ?
- "monthNames" : "monthNamesShort"))));
- date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ?
- "dayNames" : "dayNamesShort"))) + 20 - date.getDay());
- }
- inst.input.attr("size", this._formatDate(inst, date).length);
- }
- },
-
- /* Attach an inline date picker to a div. */
- _inlineDatepicker: function(target, inst) {
- var divSpan = $(target);
- if (divSpan.hasClass(this.markerClassName)) {
- return;
- }
- divSpan.addClass(this.markerClassName).append(inst.dpDiv);
- $.data(target, "datepicker", inst);
- this._setDate(inst, this._getDefaultDate(inst), true);
- this._updateDatepicker(inst);
- this._updateAlternate(inst);
- //If disabled option is true, disable the datepicker before showing it (see ticket #5665)
- if( inst.settings.disabled ) {
- this._disableDatepicker( target );
- }
- // Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements
- // http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height
- inst.dpDiv.css( "display", "block" );
- },
-
- /* Pop-up the date picker in a "dialog" box.
- * @param input element - ignored
- * @param date string or Date - the initial date to display
- * @param onSelect function - the function to call when a date is selected
- * @param settings object - update the dialog date picker instance's settings (anonymous object)
- * @param pos int[2] - coordinates for the dialog's position within the screen or
- * event - with x/y coordinates or
- * leave empty for default (screen centre)
- * @return the manager object
- */
- _dialogDatepicker: function(input, date, onSelect, settings, pos) {
- var id, browserWidth, browserHeight, scrollX, scrollY,
- inst = this._dialogInst; // internal instance
-
- if (!inst) {
- this.uuid += 1;
- id = "dp" + this.uuid;
- this._dialogInput = $("<input type='text' id='" + id +
- "' style='position: absolute; top: -100px; width: 0px;'/>");
- this._dialogInput.keydown(this._doKeyDown);
- $("body").append(this._dialogInput);
- inst = this._dialogInst = this._newInst(this._dialogInput, false);
- inst.settings = {};
- $.data(this._dialogInput[0], "datepicker", inst);
- }
- datepicker_extendRemove(inst.settings, settings || {});
- date = (date && date.constructor === Date ? this._formatDate(inst, date) : date);
- this._dialogInput.val(date);
-
- this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);
- if (!this._pos) {
- browserWidth = document.documentElement.clientWidth;
- browserHeight = document.documentElement.clientHeight;
- scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
- scrollY = document.documentElement.scrollTop || document.body.scrollTop;
- this._pos = // should use actual width/height below
- [(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];
- }
-
- // move input on screen for focus, but hidden behind dialog
- this._dialogInput.css("left", (this._pos[0] + 20) + "px").css("top", this._pos[1] + "px");
- inst.settings.onSelect = onSelect;
- this._inDialog = true;
- this.dpDiv.addClass(this._dialogClass);
- this._showDatepicker(this._dialogInput[0]);
- if ($.blockUI) {
- $.blockUI(this.dpDiv);
- }
- $.data(this._dialogInput[0], "datepicker", inst);
- return this;
- },
-
- /* Detach a datepicker from its control.
- * @param target element - the target input field or division or span
- */
- _destroyDatepicker: function(target) {
- var nodeName,
- $target = $(target),
- inst = $.data(target, "datepicker");
-
- if (!$target.hasClass(this.markerClassName)) {
- return;
- }
-
- nodeName = target.nodeName.toLowerCase();
- $.removeData(target, "datepicker");
- if (nodeName === "input") {
- inst.append.remove();
- inst.trigger.remove();
- $target.removeClass(this.markerClassName).
- unbind("focus", this._showDatepicker).
- unbind("keydown", this._doKeyDown).
- unbind("keypress", this._doKeyPress).
- unbind("keyup", this._doKeyUp);
- } else if (nodeName === "div" || nodeName === "span") {
- $target.removeClass(this.markerClassName).empty();
- }
-
- if ( datepicker_instActive === inst ) {
- datepicker_instActive = null;
- }
- },
-
- /* Enable the date picker to a jQuery selection.
- * @param target element - the target input field or division or span
- */
- _enableDatepicker: function(target) {
- var nodeName, inline,
- $target = $(target),
- inst = $.data(target, "datepicker");
-
- if (!$target.hasClass(this.markerClassName)) {
- return;
- }
-
- nodeName = target.nodeName.toLowerCase();
- if (nodeName === "input") {
- target.disabled = false;
- inst.trigger.filter("button").
- each(function() { this.disabled = false; }).end().
- filter("img").css({opacity: "1.0", cursor: ""});
- } else if (nodeName === "div" || nodeName === "span") {
- inline = $target.children("." + this._inlineClass);
- inline.children().removeClass("ui-state-disabled");
- inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
- prop("disabled", false);
- }
- this._disabledInputs = $.map(this._disabledInputs,
- function(value) { return (value === target ? null : value); }); // delete entry
- },
-
- /* Disable the date picker to a jQuery selection.
- * @param target element - the target input field or division or span
- */
- _disableDatepicker: function(target) {
- var nodeName, inline,
- $target = $(target),
- inst = $.data(target, "datepicker");
-
- if (!$target.hasClass(this.markerClassName)) {
- return;
- }
-
- nodeName = target.nodeName.toLowerCase();
- if (nodeName === "input") {
- target.disabled = true;
- inst.trigger.filter("button").
- each(function() { this.disabled = true; }).end().
- filter("img").css({opacity: "0.5", cursor: "default"});
- } else if (nodeName === "div" || nodeName === "span") {
- inline = $target.children("." + this._inlineClass);
- inline.children().addClass("ui-state-disabled");
- inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
- prop("disabled", true);
- }
- this._disabledInputs = $.map(this._disabledInputs,
- function(value) { return (value === target ? null : value); }); // delete entry
- this._disabledInputs[this._disabledInputs.length] = target;
- },
-
- /* Is the first field in a jQuery collection disabled as a datepicker?
- * @param target element - the target input field or division or span
- * @return boolean - true if disabled, false if enabled
- */
- _isDisabledDatepicker: function(target) {
- if (!target) {
- return false;
- }
- for (var i = 0; i < this._disabledInputs.length; i++) {
- if (this._disabledInputs[i] === target) {
- return true;
- }
- }
- return false;
- },
-
- /* Retrieve the instance data for the target control.
- * @param target element - the target input field or division or span
- * @return object - the associated instance data
- * @throws error if a jQuery problem getting data
- */
- _getInst: function(target) {
- try {
- return $.data(target, "datepicker");
- }
- catch (err) {
- throw "Missing instance data for this datepicker";
- }
- },
-
- /* Update or retrieve the settings for a date picker attached to an input field or division.
- * @param target element - the target input field or division or span
- * @param name object - the new settings to update or
- * string - the name of the setting to change or retrieve,
- * when retrieving also "all" for all instance settings or
- * "defaults" for all global defaults
- * @param value any - the new value for the setting
- * (omit if above is an object or to retrieve a value)
- */
- _optionDatepicker: function(target, name, value) {
- var settings, date, minDate, maxDate,
- inst = this._getInst(target);
-
- if (arguments.length === 2 && typeof name === "string") {
- return (name === "defaults" ? $.extend({}, $.datepicker._defaults) :
- (inst ? (name === "all" ? $.extend({}, inst.settings) :
- this._get(inst, name)) : null));
- }
-
- settings = name || {};
- if (typeof name === "string") {
- settings = {};
- settings[name] = value;
- }
-
- if (inst) {
- if (this._curInst === inst) {
- this._hideDatepicker();
- }
-
- date = this._getDateDatepicker(target, true);
- minDate = this._getMinMaxDate(inst, "min");
- maxDate = this._getMinMaxDate(inst, "max");
- datepicker_extendRemove(inst.settings, settings);
- // reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided
- if (minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined) {
- inst.settings.minDate = this._formatDate(inst, minDate);
- }
- if (maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined) {
- inst.settings.maxDate = this._formatDate(inst, maxDate);
- }
- if ( "disabled" in settings ) {
- if ( settings.disabled ) {
- this._disableDatepicker(target);
- } else {
- this._enableDatepicker(target);
- }
- }
- this._attachments($(target), inst);
- this._autoSize(inst);
- this._setDate(inst, date);
- this._updateAlternate(inst);
- this._updateDatepicker(inst);
- }
- },
-
- // change method deprecated
- _changeDatepicker: function(target, name, value) {
- this._optionDatepicker(target, name, value);
- },
-
- /* Redraw the date picker attached to an input field or division.
- * @param target element - the target input field or division or span
- */
- _refreshDatepicker: function(target) {
- var inst = this._getInst(target);
- if (inst) {
- this._updateDatepicker(inst);
- }
- },
-
- /* Set the dates for a jQuery selection.
- * @param target element - the target input field or division or span
- * @param date Date - the new date
- */
- _setDateDatepicker: function(target, date) {
- var inst = this._getInst(target);
- if (inst) {
- this._setDate(inst, date);
- this._updateDatepicker(inst);
- this._updateAlternate(inst);
- }
- },
-
- /* Get the date(s) for the first entry in a jQuery selection.
- * @param target element - the target input field or division or span
- * @param noDefault boolean - true if no default date is to be used
- * @return Date - the current date
- */
- _getDateDatepicker: function(target, noDefault) {
- var inst = this._getInst(target);
- if (inst && !inst.inline) {
- this._setDateFromField(inst, noDefault);
- }
- return (inst ? this._getDate(inst) : null);
- },
-
- /* Handle keystrokes. */
- _doKeyDown: function(event) {
- var onSelect, dateStr, sel,
- inst = $.datepicker._getInst(event.target),
- handled = true,
- isRTL = inst.dpDiv.is(".ui-datepicker-rtl");
-
- inst._keyEvent = true;
- if ($.datepicker._datepickerShowing) {
- switch (event.keyCode) {
- case 9: $.datepicker._hideDatepicker();
- handled = false;
- break; // hide on tab out
- case 13: sel = $("td." + $.datepicker._dayOverClass + ":not(." +
- $.datepicker._currentClass + ")", inst.dpDiv);
- if (sel[0]) {
- $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
- }
-
- onSelect = $.datepicker._get(inst, "onSelect");
- if (onSelect) {
- dateStr = $.datepicker._formatDate(inst);
-
- // trigger custom callback
- onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);
- } else {
- $.datepicker._hideDatepicker();
- }
-
- return false; // don't submit the form
- case 27: $.datepicker._hideDatepicker();
- break; // hide on escape
- case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
- -$.datepicker._get(inst, "stepBigMonths") :
- -$.datepicker._get(inst, "stepMonths")), "M");
- break; // previous month/year on page up/+ ctrl
- case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
- +$.datepicker._get(inst, "stepBigMonths") :
- +$.datepicker._get(inst, "stepMonths")), "M");
- break; // next month/year on page down/+ ctrl
- case 35: if (event.ctrlKey || event.metaKey) {
- $.datepicker._clearDate(event.target);
- }
- handled = event.ctrlKey || event.metaKey;
- break; // clear on ctrl or command +end
- case 36: if (event.ctrlKey || event.metaKey) {
- $.datepicker._gotoToday(event.target);
- }
- handled = event.ctrlKey || event.metaKey;
- break; // current on ctrl or command +home
- case 37: if (event.ctrlKey || event.metaKey) {
- $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), "D");
- }
- handled = event.ctrlKey || event.metaKey;
- // -1 day on ctrl or command +left
- if (event.originalEvent.altKey) {
- $.datepicker._adjustDate(event.target, (event.ctrlKey ?
- -$.datepicker._get(inst, "stepBigMonths") :
- -$.datepicker._get(inst, "stepMonths")), "M");
- }
- // next month/year on alt +left on Mac
- break;
- case 38: if (event.ctrlKey || event.metaKey) {
- $.datepicker._adjustDate(event.target, -7, "D");
- }
- handled = event.ctrlKey || event.metaKey;
- break; // -1 week on ctrl or command +up
- case 39: if (event.ctrlKey || event.metaKey) {
- $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), "D");
- }
- handled = event.ctrlKey || event.metaKey;
- // +1 day on ctrl or command +right
- if (event.originalEvent.altKey) {
- $.datepicker._adjustDate(event.target, (event.ctrlKey ?
- +$.datepicker._get(inst, "stepBigMonths") :
- +$.datepicker._get(inst, "stepMonths")), "M");
- }
- // next month/year on alt +right
- break;
- case 40: if (event.ctrlKey || event.metaKey) {
- $.datepicker._adjustDate(event.target, +7, "D");
- }
- handled = event.ctrlKey || event.metaKey;
- break; // +1 week on ctrl or command +down
- default: handled = false;
- }
- } else if (event.keyCode === 36 && event.ctrlKey) { // display the date picker on ctrl+home
- $.datepicker._showDatepicker(this);
- } else {
- handled = false;
- }
-
- if (handled) {
- event.preventDefault();
- event.stopPropagation();
- }
- },
-
- /* Filter entered characters - based on date format. */
- _doKeyPress: function(event) {
- var chars, chr,
- inst = $.datepicker._getInst(event.target);
-
- if ($.datepicker._get(inst, "constrainInput")) {
- chars = $.datepicker._possibleChars($.datepicker._get(inst, "dateFormat"));
- chr = String.fromCharCode(event.charCode == null ? event.keyCode : event.charCode);
- return event.ctrlKey || event.metaKey || (chr < " " || !chars || chars.indexOf(chr) > -1);
- }
- },
-
- /* Synchronise manual entry and field/alternate field. */
- _doKeyUp: function(event) {
- var date,
- inst = $.datepicker._getInst(event.target);
-
- if (inst.input.val() !== inst.lastVal) {
- try {
- date = $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"),
- (inst.input ? inst.input.val() : null),
- $.datepicker._getFormatConfig(inst));
-
- if (date) { // only if valid
- $.datepicker._setDateFromField(inst);
- $.datepicker._updateAlternate(inst);
- $.datepicker._updateDatepicker(inst);
- }
- }
- catch (err) {
- }
- }
- return true;
- },
-
- /* Pop-up the date picker for a given input field.
- * If false returned from beforeShow event handler do not show.
- * @param input element - the input field attached to the date picker or
- * event - if triggered by focus
- */
- _showDatepicker: function(input) {
- input = input.target || input;
- if (input.nodeName.toLowerCase() !== "input") { // find from button/image trigger
- input = $("input", input.parentNode)[0];
- }
-
- if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput === input) { // already here
- return;
- }
-
- var inst, beforeShow, beforeShowSettings, isFixed,
- offset, showAnim, duration;
-
- inst = $.datepicker._getInst(input);
- if ($.datepicker._curInst && $.datepicker._curInst !== inst) {
- $.datepicker._curInst.dpDiv.stop(true, true);
- if ( inst && $.datepicker._datepickerShowing ) {
- $.datepicker._hideDatepicker( $.datepicker._curInst.input[0] );
- }
- }
-
- beforeShow = $.datepicker._get(inst, "beforeShow");
- beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {};
- if(beforeShowSettings === false){
- return;
- }
- datepicker_extendRemove(inst.settings, beforeShowSettings);
-
- inst.lastVal = null;
- $.datepicker._lastInput = input;
- $.datepicker._setDateFromField(inst);
-
- if ($.datepicker._inDialog) { // hide cursor
- input.value = "";
- }
- if (!$.datepicker._pos) { // position below input
- $.datepicker._pos = $.datepicker._findPos(input);
- $.datepicker._pos[1] += input.offsetHeight; // add the height
- }
-
- isFixed = false;
- $(input).parents().each(function() {
- isFixed |= $(this).css("position") === "fixed";
- return !isFixed;
- });
-
- offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
- $.datepicker._pos = null;
- //to avoid flashes on Firefox
- inst.dpDiv.empty();
- // determine sizing offscreen
- inst.dpDiv.css({position: "absolute", display: "block", top: "-1000px"});
- $.datepicker._updateDatepicker(inst);
- // fix width for dynamic number of date pickers
- // and adjust position before showing
- offset = $.datepicker._checkOffset(inst, offset, isFixed);
- inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?
- "static" : (isFixed ? "fixed" : "absolute")), display: "none",
- left: offset.left + "px", top: offset.top + "px"});
-
- if (!inst.inline) {
- showAnim = $.datepicker._get(inst, "showAnim");
- duration = $.datepicker._get(inst, "duration");
- inst.dpDiv.css( "z-index", datepicker_getZindex( $( input ) ) + 1 );
- $.datepicker._datepickerShowing = true;
-
- if ( $.effects && $.effects.effect[ showAnim ] ) {
- inst.dpDiv.show(showAnim, $.datepicker._get(inst, "showOptions"), duration);
- } else {
- inst.dpDiv[showAnim || "show"](showAnim ? duration : null);
- }
-
- if ( $.datepicker._shouldFocusInput( inst ) ) {
- inst.input.focus();
- }
-
- $.datepicker._curInst = inst;
- }
- },
-
- /* Generate the date picker content. */
- _updateDatepicker: function(inst) {
- this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
- datepicker_instActive = inst; // for delegate hover events
- inst.dpDiv.empty().append(this._generateHTML(inst));
- this._attachHandlers(inst);
-
- var origyearshtml,
- numMonths = this._getNumberOfMonths(inst),
- cols = numMonths[1],
- width = 17,
- activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" );
-
- if ( activeCell.length > 0 ) {
- datepicker_handleMouseover.apply( activeCell.get( 0 ) );
- }
-
- inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");
- if (cols > 1) {
- inst.dpDiv.addClass("ui-datepicker-multi-" + cols).css("width", (width * cols) + "em");
- }
- inst.dpDiv[(numMonths[0] !== 1 || numMonths[1] !== 1 ? "add" : "remove") +
- "Class"]("ui-datepicker-multi");
- inst.dpDiv[(this._get(inst, "isRTL") ? "add" : "remove") +
- "Class"]("ui-datepicker-rtl");
-
- if (inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) {
- inst.input.focus();
- }
-
- // deffered render of the years select (to avoid flashes on Firefox)
- if( inst.yearshtml ){
- origyearshtml = inst.yearshtml;
- setTimeout(function(){
- //assure that inst.yearshtml didn't change.
- if( origyearshtml === inst.yearshtml && inst.yearshtml ){
- inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml);
- }
- origyearshtml = inst.yearshtml = null;
- }, 0);
- }
- },
-
- // #6694 - don't focus the input if it's already focused
- // this breaks the change event in IE
- // Support: IE and jQuery <1.9
- _shouldFocusInput: function( inst ) {
- return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" );
- },
-
- /* Check positioning to remain on screen. */
- _checkOffset: function(inst, offset, isFixed) {
- var dpWidth = inst.dpDiv.outerWidth(),
- dpHeight = inst.dpDiv.outerHeight(),
- inputWidth = inst.input ? inst.input.outerWidth() : 0,
- inputHeight = inst.input ? inst.input.outerHeight() : 0,
- viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft()),
- viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop());
-
- offset.left -= (this._get(inst, "isRTL") ? (dpWidth - inputWidth) : 0);
- offset.left -= (isFixed && offset.left === inst.input.offset().left) ? $(document).scrollLeft() : 0;
- offset.top -= (isFixed && offset.top === (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;
-
- // now check if datepicker is showing outside window viewport - move to a better place if so.
- offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?
- Math.abs(offset.left + dpWidth - viewWidth) : 0);
- offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?
- Math.abs(dpHeight + inputHeight) : 0);
-
- return offset;
- },
-
- /* Find an object's position on the screen. */
- _findPos: function(obj) {
- var position,
- inst = this._getInst(obj),
- isRTL = this._get(inst, "isRTL");
-
- while (obj && (obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden(obj))) {
- obj = obj[isRTL ? "previousSibling" : "nextSibling"];
- }
-
- position = $(obj).offset();
- return [position.left, position.top];
- },
-
- /* Hide the date picker from view.
- * @param input element - the input field attached to the date picker
- */
- _hideDatepicker: function(input) {
- var showAnim, duration, postProcess, onClose,
- inst = this._curInst;
-
- if (!inst || (input && inst !== $.data(input, "datepicker"))) {
- return;
- }
-
- if (this._datepickerShowing) {
- showAnim = this._get(inst, "showAnim");
- duration = this._get(inst, "duration");
- postProcess = function() {
- $.datepicker._tidyDialog(inst);
- };
-
- // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
- if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) {
- inst.dpDiv.hide(showAnim, $.datepicker._get(inst, "showOptions"), duration, postProcess);
- } else {
- inst.dpDiv[(showAnim === "slideDown" ? "slideUp" :
- (showAnim === "fadeIn" ? "fadeOut" : "hide"))]((showAnim ? duration : null), postProcess);
- }
-
- if (!showAnim) {
- postProcess();
- }
- this._datepickerShowing = false;
-
- onClose = this._get(inst, "onClose");
- if (onClose) {
- onClose.apply((inst.input ? inst.input[0] : null), [(inst.input ? inst.input.val() : ""), inst]);
- }
-
- this._lastInput = null;
- if (this._inDialog) {
- this._dialogInput.css({ position: "absolute", left: "0", top: "-100px" });
- if ($.blockUI) {
- $.unblockUI();
- $("body").append(this.dpDiv);
- }
- }
- this._inDialog = false;
- }
- },
-
- /* Tidy up after a dialog display. */
- _tidyDialog: function(inst) {
- inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar");
- },
-
- /* Close date picker if clicked elsewhere. */
- _checkExternalClick: function(event) {
- if (!$.datepicker._curInst) {
- return;
- }
-
- var $target = $(event.target),
- inst = $.datepicker._getInst($target[0]);
-
- if ( ( ( $target[0].id !== $.datepicker._mainDivId &&
- $target.parents("#" + $.datepicker._mainDivId).length === 0 &&
- !$target.hasClass($.datepicker.markerClassName) &&
- !$target.closest("." + $.datepicker._triggerClass).length &&
- $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||
- ( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst !== inst ) ) {
- $.datepicker._hideDatepicker();
- }
- },
-
- /* Adjust one of the date sub-fields. */
- _adjustDate: function(id, offset, period) {
- var target = $(id),
- inst = this._getInst(target[0]);
-
- if (this._isDisabledDatepicker(target[0])) {
- return;
- }
- this._adjustInstDate(inst, offset +
- (period === "M" ? this._get(inst, "showCurrentAtPos") : 0), // undo positioning
- period);
- this._updateDatepicker(inst);
- },
-
- /* Action for current link. */
- _gotoToday: function(id) {
- var date,
- target = $(id),
- inst = this._getInst(target[0]);
-
- if (this._get(inst, "gotoCurrent") && inst.currentDay) {
- inst.selectedDay = inst.currentDay;
- inst.drawMonth = inst.selectedMonth = inst.currentMonth;
- inst.drawYear = inst.selectedYear = inst.currentYear;
- } else {
- date = new Date();
- inst.selectedDay = date.getDate();
- inst.drawMonth = inst.selectedMonth = date.getMonth();
- inst.drawYear = inst.selectedYear = date.getFullYear();
- }
- this._notifyChange(inst);
- this._adjustDate(target);
- },
-
- /* Action for selecting a new month/year. */
- _selectMonthYear: function(id, select, period) {
- var target = $(id),
- inst = this._getInst(target[0]);
-
- inst["selected" + (period === "M" ? "Month" : "Year")] =
- inst["draw" + (period === "M" ? "Month" : "Year")] =
- parseInt(select.options[select.selectedIndex].value,10);
-
- this._notifyChange(inst);
- this._adjustDate(target);
- },
-
- /* Action for selecting a day. */
- _selectDay: function(id, month, year, td) {
- var inst,
- target = $(id);
-
- if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {
- return;
- }
-
- inst = this._getInst(target[0]);
- inst.selectedDay = inst.currentDay = $("a", td).html();
- inst.selectedMonth = inst.currentMonth = month;
- inst.selectedYear = inst.currentYear = year;
- this._selectDate(id, this._formatDate(inst,
- inst.currentDay, inst.currentMonth, inst.currentYear));
- },
-
- /* Erase the input field and hide the date picker. */
- _clearDate: function(id) {
- var target = $(id);
- this._selectDate(target, "");
- },
-
- /* Update the input field with the selected date. */
- _selectDate: function(id, dateStr) {
- var onSelect,
- target = $(id),
- inst = this._getInst(target[0]);
-
- dateStr = (dateStr != null ? dateStr : this._formatDate(inst));
- if (inst.input) {
- inst.input.val(dateStr);
- }
- this._updateAlternate(inst);
-
- onSelect = this._get(inst, "onSelect");
- if (onSelect) {
- onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback
- } else if (inst.input) {
- inst.input.trigger("change"); // fire the change event
- }
-
- if (inst.inline){
- this._updateDatepicker(inst);
- } else {
- this._hideDatepicker();
- this._lastInput = inst.input[0];
- if (typeof(inst.input[0]) !== "object") {
- inst.input.focus(); // restore focus
- }
- this._lastInput = null;
- }
- },
-
- /* Update any alternate field to synchronise with the main field. */
- _updateAlternate: function(inst) {
- var altFormat, date, dateStr,
- altField = this._get(inst, "altField");
-
- if (altField) { // update alternate field too
- altFormat = this._get(inst, "altFormat") || this._get(inst, "dateFormat");
- date = this._getDate(inst);
- dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
- $(altField).each(function() { $(this).val(dateStr); });
- }
- },
-
- /* Set as beforeShowDay function to prevent selection of weekends.
- * @param date Date - the date to customise
- * @return [boolean, string] - is this date selectable?, what is its CSS class?
- */
- noWeekends: function(date) {
- var day = date.getDay();
- return [(day > 0 && day < 6), ""];
- },
-
- /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
- * @param date Date - the date to get the week for
- * @return number - the number of the week within the year that contains this date
- */
- iso8601Week: function(date) {
- var time,
- checkDate = new Date(date.getTime());
-
- // Find Thursday of this week starting on Monday
- checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
-
- time = checkDate.getTime();
- checkDate.setMonth(0); // Compare with Jan 1
- checkDate.setDate(1);
- return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
- },
-
- /* Parse a string value into a date object.
- * See formatDate below for the possible formats.
- *
- * @param format string - the expected format of the date
- * @param value string - the date in the above format
- * @param settings Object - attributes include:
- * shortYearCutoff number - the cutoff year for determining the century (optional)
- * dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
- * dayNames string[7] - names of the days from Sunday (optional)
- * monthNamesShort string[12] - abbreviated names of the months (optional)
- * monthNames string[12] - names of the months (optional)
- * @return Date - the extracted date value or null if value is blank
- */
- parseDate: function (format, value, settings) {
- if (format == null || value == null) {
- throw "Invalid arguments";
- }
-
- value = (typeof value === "object" ? value.toString() : value + "");
- if (value === "") {
- return null;
- }
-
- var iFormat, dim, extra,
- iValue = 0,
- shortYearCutoffTemp = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff,
- shortYearCutoff = (typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp :
- new Date().getFullYear() % 100 + parseInt(shortYearCutoffTemp, 10)),
- dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort,
- dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames,
- monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort,
- monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames,
- year = -1,
- month = -1,
- day = -1,
- doy = -1,
- literal = false,
- date,
- // Check whether a format character is doubled
- lookAhead = function(match) {
- var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
- if (matches) {
- iFormat++;
- }
- return matches;
- },
- // Extract a number from the string value
- getNumber = function(match) {
- var isDoubled = lookAhead(match),
- size = (match === "@" ? 14 : (match === "!" ? 20 :
- (match === "y" && isDoubled ? 4 : (match === "o" ? 3 : 2)))),
- minSize = (match === "y" ? size : 1),
- digits = new RegExp("^\\d{" + minSize + "," + size + "}"),
- num = value.substring(iValue).match(digits);
- if (!num) {
- throw "Missing number at position " + iValue;
- }
- iValue += num[0].length;
- return parseInt(num[0], 10);
- },
- // Extract a name from the string value and convert to an index
- getName = function(match, shortNames, longNames) {
- var index = -1,
- names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) {
- return [ [k, v] ];
- }).sort(function (a, b) {
- return -(a[1].length - b[1].length);
- });
-
- $.each(names, function (i, pair) {
- var name = pair[1];
- if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {
- index = pair[0];
- iValue += name.length;
- return false;
- }
- });
- if (index !== -1) {
- return index + 1;
- } else {
- throw "Unknown name at position " + iValue;
- }
- },
- // Confirm that a literal character matches the string value
- checkLiteral = function() {
- if (value.charAt(iValue) !== format.charAt(iFormat)) {
- throw "Unexpected literal at position " + iValue;
- }
- iValue++;
- };
-
- for (iFormat = 0; iFormat < format.length; iFormat++) {
- if (literal) {
- if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
- literal = false;
- } else {
- checkLiteral();
- }
- } else {
- switch (format.charAt(iFormat)) {
- case "d":
- day = getNumber("d");
- break;
- case "D":
- getName("D", dayNamesShort, dayNames);
- break;
- case "o":
- doy = getNumber("o");
- break;
- case "m":
- month = getNumber("m");
- break;
- case "M":
- month = getName("M", monthNamesShort, monthNames);
- break;
- case "y":
- year = getNumber("y");
- break;
- case "@":
- date = new Date(getNumber("@"));
- year = date.getFullYear();
- month = date.getMonth() + 1;
- day = date.getDate();
- break;
- case "!":
- date = new Date((getNumber("!") - this._ticksTo1970) / 10000);
- year = date.getFullYear();
- month = date.getMonth() + 1;
- day = date.getDate();
- break;
- case "'":
- if (lookAhead("'")){
- checkLiteral();
- } else {
- literal = true;
- }
- break;
- default:
- checkLiteral();
- }
- }
- }
-
- if (iValue < value.length){
- extra = value.substr(iValue);
- if (!/^\s+/.test(extra)) {
- throw "Extra/unparsed characters found in date: " + extra;
- }
- }
-
- if (year === -1) {
- year = new Date().getFullYear();
- } else if (year < 100) {
- year += new Date().getFullYear() - new Date().getFullYear() % 100 +
- (year <= shortYearCutoff ? 0 : -100);
- }
-
- if (doy > -1) {
- month = 1;
- day = doy;
- do {
- dim = this._getDaysInMonth(year, month - 1);
- if (day <= dim) {
- break;
- }
- month++;
- day -= dim;
- } while (true);
- }
-
- date = this._daylightSavingAdjust(new Date(year, month - 1, day));
- if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {
- throw "Invalid date"; // E.g. 31/02/00
- }
- return date;
- },
-
- /* Standard date formats. */
- ATOM: "yy-mm-dd", // RFC 3339 (ISO 8601)
- COOKIE: "D, dd M yy",
- ISO_8601: "yy-mm-dd",
- RFC_822: "D, d M y",
- RFC_850: "DD, dd-M-y",
- RFC_1036: "D, d M y",
- RFC_1123: "D, d M yy",
- RFC_2822: "D, d M yy",
- RSS: "D, d M y", // RFC 822
- TICKS: "!",
- TIMESTAMP: "@",
- W3C: "yy-mm-dd", // ISO 8601
-
- _ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) +
- Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000),
-
- /* Format a date object into a string value.
- * The format can be combinations of the following:
- * d - day of month (no leading zero)
- * dd - day of month (two digit)
- * o - day of year (no leading zeros)
- * oo - day of year (three digit)
- * D - day name short
- * DD - day name long
- * m - month of year (no leading zero)
- * mm - month of year (two digit)
- * M - month name short
- * MM - month name long
- * y - year (two digit)
- * yy - year (four digit)
- * @ - Unix timestamp (ms since 01/01/1970)
- * ! - Windows ticks (100ns since 01/01/0001)
- * "..." - literal text
- * '' - single quote
- *
- * @param format string - the desired format of the date
- * @param date Date - the date value to format
- * @param settings Object - attributes include:
- * dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
- * dayNames string[7] - names of the days from Sunday (optional)
- * monthNamesShort string[12] - abbreviated names of the months (optional)
- * monthNames string[12] - names of the months (optional)
- * @return string - the date in the above format
- */
- formatDate: function (format, date, settings) {
- if (!date) {
- return "";
- }
-
- var iFormat,
- dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort,
- dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames,
- monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort,
- monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames,
- // Check whether a format character is doubled
- lookAhead = function(match) {
- var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
- if (matches) {
- iFormat++;
- }
- return matches;
- },
- // Format a number, with leading zero if necessary
- formatNumber = function(match, value, len) {
- var num = "" + value;
- if (lookAhead(match)) {
- while (num.length < len) {
- num = "0" + num;
- }
- }
- return num;
- },
- // Format a name, short or long as requested
- formatName = function(match, value, shortNames, longNames) {
- return (lookAhead(match) ? longNames[value] : shortNames[value]);
- },
- output = "",
- literal = false;
-
- if (date) {
- for (iFormat = 0; iFormat < format.length; iFormat++) {
- if (literal) {
- if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
- literal = false;
- } else {
- output += format.charAt(iFormat);
- }
- } else {
- switch (format.charAt(iFormat)) {
- case "d":
- output += formatNumber("d", date.getDate(), 2);
- break;
- case "D":
- output += formatName("D", date.getDay(), dayNamesShort, dayNames);
- break;
- case "o":
- output += formatNumber("o",
- Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
- break;
- case "m":
- output += formatNumber("m", date.getMonth() + 1, 2);
- break;
- case "M":
- output += formatName("M", date.getMonth(), monthNamesShort, monthNames);
- break;
- case "y":
- output += (lookAhead("y") ? date.getFullYear() :
- (date.getYear() % 100 < 10 ? "0" : "") + date.getYear() % 100);
- break;
- case "@":
- output += date.getTime();
- break;
- case "!":
- output += date.getTime() * 10000 + this._ticksTo1970;
- break;
- case "'":
- if (lookAhead("'")) {
- output += "'";
- } else {
- literal = true;
- }
- break;
- default:
- output += format.charAt(iFormat);
- }
- }
- }
- }
- return output;
- },
-
- /* Extract all possible characters from the date format. */
- _possibleChars: function (format) {
- var iFormat,
- chars = "",
- literal = false,
- // Check whether a format character is doubled
- lookAhead = function(match) {
- var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
- if (matches) {
- iFormat++;
- }
- return matches;
- };
-
- for (iFormat = 0; iFormat < format.length; iFormat++) {
- if (literal) {
- if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
- literal = false;
- } else {
- chars += format.charAt(iFormat);
- }
- } else {
- switch (format.charAt(iFormat)) {
- case "d": case "m": case "y": case "@":
- chars += "0123456789";
- break;
- case "D": case "M":
- return null; // Accept anything
- case "'":
- if (lookAhead("'")) {
- chars += "'";
- } else {
- literal = true;
- }
- break;
- default:
- chars += format.charAt(iFormat);
- }
- }
- }
- return chars;
- },
-
- /* Get a setting value, defaulting if necessary. */
- _get: function(inst, name) {
- return inst.settings[name] !== undefined ?
- inst.settings[name] : this._defaults[name];
- },
-
- /* Parse existing date and initialise date picker. */
- _setDateFromField: function(inst, noDefault) {
- if (inst.input.val() === inst.lastVal) {
- return;
- }
-
- var dateFormat = this._get(inst, "dateFormat"),
- dates = inst.lastVal = inst.input ? inst.input.val() : null,
- defaultDate = this._getDefaultDate(inst),
- date = defaultDate,
- settings = this._getFormatConfig(inst);
-
- try {
- date = this.parseDate(dateFormat, dates, settings) || defaultDate;
- } catch (event) {
- dates = (noDefault ? "" : dates);
- }
- inst.selectedDay = date.getDate();
- inst.drawMonth = inst.selectedMonth = date.getMonth();
- inst.drawYear = inst.selectedYear = date.getFullYear();
- inst.currentDay = (dates ? date.getDate() : 0);
- inst.currentMonth = (dates ? date.getMonth() : 0);
- inst.currentYear = (dates ? date.getFullYear() : 0);
- this._adjustInstDate(inst);
- },
-
- /* Retrieve the default date shown on opening. */
- _getDefaultDate: function(inst) {
- return this._restrictMinMax(inst,
- this._determineDate(inst, this._get(inst, "defaultDate"), new Date()));
- },
-
- /* A date may be specified as an exact value or a relative one. */
- _determineDate: function(inst, date, defaultDate) {
- var offsetNumeric = function(offset) {
- var date = new Date();
- date.setDate(date.getDate() + offset);
- return date;
- },
- offsetString = function(offset) {
- try {
- return $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"),
- offset, $.datepicker._getFormatConfig(inst));
- }
- catch (e) {
- // Ignore
- }
-
- var date = (offset.toLowerCase().match(/^c/) ?
- $.datepicker._getDate(inst) : null) || new Date(),
- year = date.getFullYear(),
- month = date.getMonth(),
- day = date.getDate(),
- pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
- matches = pattern.exec(offset);
-
- while (matches) {
- switch (matches[2] || "d") {
- case "d" : case "D" :
- day += parseInt(matches[1],10); break;
- case "w" : case "W" :
- day += parseInt(matches[1],10) * 7; break;
- case "m" : case "M" :
- month += parseInt(matches[1],10);
- day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
- break;
- case "y": case "Y" :
- year += parseInt(matches[1],10);
- day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
- break;
- }
- matches = pattern.exec(offset);
- }
- return new Date(year, month, day);
- },
- newDate = (date == null || date === "" ? defaultDate : (typeof date === "string" ? offsetString(date) :
- (typeof date === "number" ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime()))));
-
- newDate = (newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate);
- if (newDate) {
- newDate.setHours(0);
- newDate.setMinutes(0);
- newDate.setSeconds(0);
- newDate.setMilliseconds(0);
- }
- return this._daylightSavingAdjust(newDate);
- },
-
- /* Handle switch to/from daylight saving.
- * Hours may be non-zero on daylight saving cut-over:
- * > 12 when midnight changeover, but then cannot generate
- * midnight datetime, so jump to 1AM, otherwise reset.
- * @param date (Date) the date to check
- * @return (Date) the corrected date
- */
- _daylightSavingAdjust: function(date) {
- if (!date) {
- return null;
- }
- date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
- return date;
- },
-
- /* Set the date(s) directly. */
- _setDate: function(inst, date, noChange) {
- var clear = !date,
- origMonth = inst.selectedMonth,
- origYear = inst.selectedYear,
- newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date()));
-
- inst.selectedDay = inst.currentDay = newDate.getDate();
- inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();
- inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();
- if ((origMonth !== inst.selectedMonth || origYear !== inst.selectedYear) && !noChange) {
- this._notifyChange(inst);
- }
- this._adjustInstDate(inst);
- if (inst.input) {
- inst.input.val(clear ? "" : this._formatDate(inst));
- }
- },
-
- /* Retrieve the date(s) directly. */
- _getDate: function(inst) {
- var startDate = (!inst.currentYear || (inst.input && inst.input.val() === "") ? null :
- this._daylightSavingAdjust(new Date(
- inst.currentYear, inst.currentMonth, inst.currentDay)));
- return startDate;
- },
-
- /* Attach the onxxx handlers. These are declared statically so
- * they work with static code transformers like Caja.
- */
- _attachHandlers: function(inst) {
- var stepMonths = this._get(inst, "stepMonths"),
- id = "#" + inst.id.replace( /\\\\/g, "\\" );
- inst.dpDiv.find("[data-handler]").map(function () {
- var handler = {
- prev: function () {
- $.datepicker._adjustDate(id, -stepMonths, "M");
- },
- next: function () {
- $.datepicker._adjustDate(id, +stepMonths, "M");
- },
- hide: function () {
- $.datepicker._hideDatepicker();
- },
- today: function () {
- $.datepicker._gotoToday(id);
- },
- selectDay: function () {
- $.datepicker._selectDay(id, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this);
- return false;
- },
- selectMonth: function () {
- $.datepicker._selectMonthYear(id, this, "M");
- return false;
- },
- selectYear: function () {
- $.datepicker._selectMonthYear(id, this, "Y");
- return false;
- }
- };
- $(this).bind(this.getAttribute("data-event"), handler[this.getAttribute("data-handler")]);
- });
- },
-
- /* Generate the HTML for the current state of the date picker. */
- _generateHTML: function(inst) {
- var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
- controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
- monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
- selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
- cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows,
- printDate, dRow, tbody, daySettings, otherMonth, unselectable,
- tempDate = new Date(),
- today = this._daylightSavingAdjust(
- new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate())), // clear time
- isRTL = this._get(inst, "isRTL"),
- showButtonPanel = this._get(inst, "showButtonPanel"),
- hideIfNoPrevNext = this._get(inst, "hideIfNoPrevNext"),
- navigationAsDateFormat = this._get(inst, "navigationAsDateFormat"),
- numMonths = this._getNumberOfMonths(inst),
- showCurrentAtPos = this._get(inst, "showCurrentAtPos"),
- stepMonths = this._get(inst, "stepMonths"),
- isMultiMonth = (numMonths[0] !== 1 || numMonths[1] !== 1),
- currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :
- new Date(inst.currentYear, inst.currentMonth, inst.currentDay))),
- minDate = this._getMinMaxDate(inst, "min"),
- maxDate = this._getMinMaxDate(inst, "max"),
- drawMonth = inst.drawMonth - showCurrentAtPos,
- drawYear = inst.drawYear;
-
- if (drawMonth < 0) {
- drawMonth += 12;
- drawYear--;
- }
- if (maxDate) {
- maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),
- maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate()));
- maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);
- while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {
- drawMonth--;
- if (drawMonth < 0) {
- drawMonth = 11;
- drawYear--;
- }
- }
- }
- inst.drawMonth = drawMonth;
- inst.drawYear = drawYear;
-
- prevText = this._get(inst, "prevText");
- prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
- this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
- this._getFormatConfig(inst)));
-
- prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
- "<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'" +
- " title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>" :
- (hideIfNoPrevNext ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+ prevText +"'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>"));
-
- nextText = this._get(inst, "nextText");
- nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,
- this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
- this._getFormatConfig(inst)));
-
- next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
- "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'" +
- " title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>" :
- (hideIfNoPrevNext ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+ nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>"));
-
- currentText = this._get(inst, "currentText");
- gotoDate = (this._get(inst, "gotoCurrent") && inst.currentDay ? currentDate : today);
- currentText = (!navigationAsDateFormat ? currentText :
- this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
-
- controls = (!inst.inline ? "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" +
- this._get(inst, "closeText") + "</button>" : "");
-
- buttonPanel = (showButtonPanel) ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + (isRTL ? controls : "") +
- (this._isInRange(inst, gotoDate) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'" +
- ">" + currentText + "</button>" : "") + (isRTL ? "" : controls) + "</div>" : "";
-
- firstDay = parseInt(this._get(inst, "firstDay"),10);
- firstDay = (isNaN(firstDay) ? 0 : firstDay);
-
- showWeek = this._get(inst, "showWeek");
- dayNames = this._get(inst, "dayNames");
- dayNamesMin = this._get(inst, "dayNamesMin");
- monthNames = this._get(inst, "monthNames");
- monthNamesShort = this._get(inst, "monthNamesShort");
- beforeShowDay = this._get(inst, "beforeShowDay");
- showOtherMonths = this._get(inst, "showOtherMonths");
- selectOtherMonths = this._get(inst, "selectOtherMonths");
- defaultDate = this._getDefaultDate(inst);
- html = "";
- dow;
- for (row = 0; row < numMonths[0]; row++) {
- group = "";
- this.maxRows = 4;
- for (col = 0; col < numMonths[1]; col++) {
- selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));
- cornerClass = " ui-corner-all";
- calender = "";
- if (isMultiMonth) {
- calender += "<div class='ui-datepicker-group";
- if (numMonths[1] > 1) {
- switch (col) {
- case 0: calender += " ui-datepicker-group-first";
- cornerClass = " ui-corner-" + (isRTL ? "right" : "left"); break;
- case numMonths[1]-1: calender += " ui-datepicker-group-last";
- cornerClass = " ui-corner-" + (isRTL ? "left" : "right"); break;
- default: calender += " ui-datepicker-group-middle"; cornerClass = ""; break;
- }
- }
- calender += "'>";
- }
- calender += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + cornerClass + "'>" +
- (/all|left/.test(cornerClass) && row === 0 ? (isRTL ? next : prev) : "") +
- (/all|right/.test(cornerClass) && row === 0 ? (isRTL ? prev : next) : "") +
- this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,
- row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers
- "</div><table class='ui-datepicker-calendar'><thead>" +
- "<tr>";
- thead = (showWeek ? "<th class='ui-datepicker-week-col'>" + this._get(inst, "weekHeader") + "</th>" : "");
- for (dow = 0; dow < 7; dow++) { // days of the week
- day = (dow + firstDay) % 7;
- thead += "<th scope='col'" + ((dow + firstDay + 6) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "") + ">" +
- "<span title='" + dayNames[day] + "'>" + dayNamesMin[day] + "</span></th>";
- }
- calender += thead + "</tr></thead><tbody>";
- daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
- if (drawYear === inst.selectedYear && drawMonth === inst.selectedMonth) {
- inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
- }
- leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;
- curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate
- numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043)
- this.maxRows = numRows;
- printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
- for (dRow = 0; dRow < numRows; dRow++) { // create date picker rows
- calender += "<tr>";
- tbody = (!showWeek ? "" : "<td class='ui-datepicker-week-col'>" +
- this._get(inst, "calculateWeek")(printDate) + "</td>");
- for (dow = 0; dow < 7; dow++) { // create date picker days
- daySettings = (beforeShowDay ?
- beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, ""]);
- otherMonth = (printDate.getMonth() !== drawMonth);
- unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] ||
- (minDate && printDate < minDate) || (maxDate && printDate > maxDate);
- tbody += "<td class='" +
- ((dow + firstDay + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + // highlight weekends
- (otherMonth ? " ui-datepicker-other-month" : "") + // highlight days from other months
- ((printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent) || // user pressed key
- (defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime()) ?
- // or defaultDate is current printedDate and defaultDate is selectedDate
- " " + this._dayOverClass : "") + // highlight selected day
- (unselectable ? " " + this._unselectableClass + " ui-state-disabled": "") + // highlight unselectable days
- (otherMonth && !showOtherMonths ? "" : " " + daySettings[1] + // highlight custom dates
- (printDate.getTime() === currentDate.getTime() ? " " + this._currentClass : "") + // highlight selected day
- (printDate.getTime() === today.getTime() ? " ui-datepicker-today" : "")) + "'" + // highlight today (if different)
- ((!otherMonth || showOtherMonths) && daySettings[2] ? " title='" + daySettings[2].replace(/'/g, "&#39;") + "'" : "") + // cell title
- (unselectable ? "" : " data-handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-year='" + printDate.getFullYear() + "'") + ">" + // actions
- (otherMonth && !showOtherMonths ? "&#xa0;" : // display for other months
- (unselectable ? "<span class='ui-state-default'>" + printDate.getDate() + "</span>" : "<a class='ui-state-default" +
- (printDate.getTime() === today.getTime() ? " ui-state-highlight" : "") +
- (printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "") + // highlight selected day
- (otherMonth ? " ui-priority-secondary" : "") + // distinguish dates from other months
- "' href='#'>" + printDate.getDate() + "</a>")) + "</td>"; // display selectable date
- printDate.setDate(printDate.getDate() + 1);
- printDate = this._daylightSavingAdjust(printDate);
- }
- calender += tbody + "</tr>";
- }
- drawMonth++;
- if (drawMonth > 11) {
- drawMonth = 0;
- drawYear++;
- }
- calender += "</tbody></table>" + (isMultiMonth ? "</div>" +
- ((numMonths[0] > 0 && col === numMonths[1]-1) ? "<div class='ui-datepicker-row-break'></div>" : "") : "");
- group += calender;
- }
- html += group;
- }
- html += buttonPanel;
- inst._keyEvent = false;
- return html;
- },
-
- /* Generate the month and year header. */
- _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
- secondary, monthNames, monthNamesShort) {
-
- var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear,
- changeMonth = this._get(inst, "changeMonth"),
- changeYear = this._get(inst, "changeYear"),
- showMonthAfterYear = this._get(inst, "showMonthAfterYear"),
- html = "<div class='ui-datepicker-title'>",
- monthHtml = "";
-
- // month selection
- if (secondary || !changeMonth) {
- monthHtml += "<span class='ui-datepicker-month'>" + monthNames[drawMonth] + "</span>";
- } else {
- inMinYear = (minDate && minDate.getFullYear() === drawYear);
- inMaxYear = (maxDate && maxDate.getFullYear() === drawYear);
- monthHtml += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>";
- for ( month = 0; month < 12; month++) {
- if ((!inMinYear || month >= minDate.getMonth()) && (!inMaxYear || month <= maxDate.getMonth())) {
- monthHtml += "<option value='" + month + "'" +
- (month === drawMonth ? " selected='selected'" : "") +
- ">" + monthNamesShort[month] + "</option>";
- }
- }
- monthHtml += "</select>";
- }
-
- if (!showMonthAfterYear) {
- html += monthHtml + (secondary || !(changeMonth && changeYear) ? "&#xa0;" : "");
- }
-
- // year selection
- if ( !inst.yearshtml ) {
- inst.yearshtml = "";
- if (secondary || !changeYear) {
- html += "<span class='ui-datepicker-year'>" + drawYear + "</span>";
- } else {
- // determine range of years to display
- years = this._get(inst, "yearRange").split(":");
- thisYear = new Date().getFullYear();
- determineYear = function(value) {
- var year = (value.match(/c[+\-].*/) ? drawYear + parseInt(value.substring(1), 10) :
- (value.match(/[+\-].*/) ? thisYear + parseInt(value, 10) :
- parseInt(value, 10)));
- return (isNaN(year) ? thisYear : year);
- };
- year = determineYear(years[0]);
- endYear = Math.max(year, determineYear(years[1] || ""));
- year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
- endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
- inst.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";
- for (; year <= endYear; year++) {
- inst.yearshtml += "<option value='" + year + "'" +
- (year === drawYear ? " selected='selected'" : "") +
- ">" + year + "</option>";
- }
- inst.yearshtml += "</select>";
-
- html += inst.yearshtml;
- inst.yearshtml = null;
- }
- }
-
- html += this._get(inst, "yearSuffix");
- if (showMonthAfterYear) {
- html += (secondary || !(changeMonth && changeYear) ? "&#xa0;" : "") + monthHtml;
- }
- html += "</div>"; // Close datepicker_header
- return html;
- },
-
- /* Adjust one of the date sub-fields. */
- _adjustInstDate: function(inst, offset, period) {
- var year = inst.drawYear + (period === "Y" ? offset : 0),
- month = inst.drawMonth + (period === "M" ? offset : 0),
- day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + (period === "D" ? offset : 0),
- date = this._restrictMinMax(inst, this._daylightSavingAdjust(new Date(year, month, day)));
-
- inst.selectedDay = date.getDate();
- inst.drawMonth = inst.selectedMonth = date.getMonth();
- inst.drawYear = inst.selectedYear = date.getFullYear();
- if (period === "M" || period === "Y") {
- this._notifyChange(inst);
- }
- },
-
- /* Ensure a date is within any min/max bounds. */
- _restrictMinMax: function(inst, date) {
- var minDate = this._getMinMaxDate(inst, "min"),
- maxDate = this._getMinMaxDate(inst, "max"),
- newDate = (minDate && date < minDate ? minDate : date);
- return (maxDate && newDate > maxDate ? maxDate : newDate);
- },
-
- /* Notify change of month/year. */
- _notifyChange: function(inst) {
- var onChange = this._get(inst, "onChangeMonthYear");
- if (onChange) {
- onChange.apply((inst.input ? inst.input[0] : null),
- [inst.selectedYear, inst.selectedMonth + 1, inst]);
- }
- },
-
- /* Determine the number of months to show. */
- _getNumberOfMonths: function(inst) {
- var numMonths = this._get(inst, "numberOfMonths");
- return (numMonths == null ? [1, 1] : (typeof numMonths === "number" ? [1, numMonths] : numMonths));
- },
-
- /* Determine the current maximum date - ensure no time components are set. */
- _getMinMaxDate: function(inst, minMax) {
- return this._determineDate(inst, this._get(inst, minMax + "Date"), null);
- },
-
- /* Find the number of days in a given month. */
- _getDaysInMonth: function(year, month) {
- return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate();
- },
-
- /* Find the day of the week of the first of a month. */
- _getFirstDayOfMonth: function(year, month) {
- return new Date(year, month, 1).getDay();
- },
-
- /* Determines if we should allow a "next/prev" month display change. */
- _canAdjustMonth: function(inst, offset, curYear, curMonth) {
- var numMonths = this._getNumberOfMonths(inst),
- date = this._daylightSavingAdjust(new Date(curYear,
- curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1));
-
- if (offset < 0) {
- date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
- }
- return this._isInRange(inst, date);
- },
-
- /* Is the given date in the accepted range? */
- _isInRange: function(inst, date) {
- var yearSplit, currentYear,
- minDate = this._getMinMaxDate(inst, "min"),
- maxDate = this._getMinMaxDate(inst, "max"),
- minYear = null,
- maxYear = null,
- years = this._get(inst, "yearRange");
- if (years){
- yearSplit = years.split(":");
- currentYear = new Date().getFullYear();
- minYear = parseInt(yearSplit[0], 10);
- maxYear = parseInt(yearSplit[1], 10);
- if ( yearSplit[0].match(/[+\-].*/) ) {
- minYear += currentYear;
- }
- if ( yearSplit[1].match(/[+\-].*/) ) {
- maxYear += currentYear;
- }
- }
-
- return ((!minDate || date.getTime() >= minDate.getTime()) &&
- (!maxDate || date.getTime() <= maxDate.getTime()) &&
- (!minYear || date.getFullYear() >= minYear) &&
- (!maxYear || date.getFullYear() <= maxYear));
- },
-
- /* Provide the configuration settings for formatting/parsing. */
- _getFormatConfig: function(inst) {
- var shortYearCutoff = this._get(inst, "shortYearCutoff");
- shortYearCutoff = (typeof shortYearCutoff !== "string" ? shortYearCutoff :
- new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
- return {shortYearCutoff: shortYearCutoff,
- dayNamesShort: this._get(inst, "dayNamesShort"), dayNames: this._get(inst, "dayNames"),
- monthNamesShort: this._get(inst, "monthNamesShort"), monthNames: this._get(inst, "monthNames")};
- },
-
- /* Format the given date for display. */
- _formatDate: function(inst, day, month, year) {
- if (!day) {
- inst.currentDay = inst.selectedDay;
- inst.currentMonth = inst.selectedMonth;
- inst.currentYear = inst.selectedYear;
- }
- var date = (day ? (typeof day === "object" ? day :
- this._daylightSavingAdjust(new Date(year, month, day))) :
- this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
- return this.formatDate(this._get(inst, "dateFormat"), date, this._getFormatConfig(inst));
- }
-});
-
-/*
- * Bind hover events for datepicker elements.
- * Done via delegate so the binding only occurs once in the lifetime of the parent div.
- * Global datepicker_instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
- */
-function datepicker_bindHover(dpDiv) {
- var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
- return dpDiv.delegate(selector, "mouseout", function() {
- $(this).removeClass("ui-state-hover");
- if (this.className.indexOf("ui-datepicker-prev") !== -1) {
- $(this).removeClass("ui-datepicker-prev-hover");
- }
- if (this.className.indexOf("ui-datepicker-next") !== -1) {
- $(this).removeClass("ui-datepicker-next-hover");
- }
- })
- .delegate( selector, "mouseover", datepicker_handleMouseover );
-}
-
-function datepicker_handleMouseover() {
- if (!$.datepicker._isDisabledDatepicker( datepicker_instActive.inline? datepicker_instActive.dpDiv.parent()[0] : datepicker_instActive.input[0])) {
- $(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");
- $(this).addClass("ui-state-hover");
- if (this.className.indexOf("ui-datepicker-prev") !== -1) {
- $(this).addClass("ui-datepicker-prev-hover");
- }
- if (this.className.indexOf("ui-datepicker-next") !== -1) {
- $(this).addClass("ui-datepicker-next-hover");
- }
- }
-}
-
-/* jQuery extend now ignores nulls! */
-function datepicker_extendRemove(target, props) {
- $.extend(target, props);
- for (var name in props) {
- if (props[name] == null) {
- target[name] = props[name];
- }
- }
- return target;
-}
-
-/* Invoke the datepicker functionality.
- @param options string - a command, optionally followed by additional parameters or
- Object - settings for attaching new datepicker functionality
- @return jQuery object */
-$.fn.datepicker = function(options){
-
- /* Verify an empty collection wasn't passed - Fixes #6976 */
- if ( !this.length ) {
- return this;
- }
-
- /* Initialise the date picker. */
- if (!$.datepicker.initialized) {
- $(document).mousedown($.datepicker._checkExternalClick);
- $.datepicker.initialized = true;
- }
-
- /* Append datepicker main container to body if not exist. */
- if ($("#"+$.datepicker._mainDivId).length === 0) {
- $("body").append($.datepicker.dpDiv);
- }
-
- var otherArgs = Array.prototype.slice.call(arguments, 1);
- if (typeof options === "string" && (options === "isDisabled" || options === "getDate" || options === "widget")) {
- return $.datepicker["_" + options + "Datepicker"].
- apply($.datepicker, [this[0]].concat(otherArgs));
- }
- if (options === "option" && arguments.length === 2 && typeof arguments[1] === "string") {
- return $.datepicker["_" + options + "Datepicker"].
- apply($.datepicker, [this[0]].concat(otherArgs));
- }
- return this.each(function() {
- typeof options === "string" ?
- $.datepicker["_" + options + "Datepicker"].
- apply($.datepicker, [this].concat(otherArgs)) :
- $.datepicker._attachDatepicker(this, options);
- });
-};
-
-$.datepicker = new Datepicker(); // singleton instance
-$.datepicker.initialized = false;
-$.datepicker.uuid = new Date().getTime();
-$.datepicker.version = "1.11.4";
-
-var datepicker = $.datepicker;
-
-
-/*!
- * jQuery UI Draggable 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/draggable/
- */
-
-
-$.widget("ui.draggable", $.ui.mouse, {
- version: "1.11.4",
- widgetEventPrefix: "drag",
- options: {
- addClasses: true,
- appendTo: "parent",
- axis: false,
- connectToSortable: false,
- containment: false,
- cursor: "auto",
- cursorAt: false,
- grid: false,
- handle: false,
- helper: "original",
- iframeFix: false,
- opacity: false,
- refreshPositions: false,
- revert: false,
- revertDuration: 500,
- scope: "default",
- scroll: true,
- scrollSensitivity: 20,
- scrollSpeed: 20,
- snap: false,
- snapMode: "both",
- snapTolerance: 20,
- stack: false,
- zIndex: false,
-
- // callbacks
- drag: null,
- start: null,
- stop: null
- },
- _create: function() {
-
- if ( this.options.helper === "original" ) {
- this._setPositionRelative();
- }
- if (this.options.addClasses){
- this.element.addClass("ui-draggable");
- }
- if (this.options.disabled){
- this.element.addClass("ui-draggable-disabled");
- }
- this._setHandleClassName();
-
- this._mouseInit();
- },
-
- _setOption: function( key, value ) {
- this._super( key, value );
- if ( key === "handle" ) {
- this._removeHandleClassName();
- this._setHandleClassName();
- }
- },
-
- _destroy: function() {
- if ( ( this.helper || this.element ).is( ".ui-draggable-dragging" ) ) {
- this.destroyOnClear = true;
- return;
- }
- this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" );
- this._removeHandleClassName();
- this._mouseDestroy();
- },
-
- _mouseCapture: function(event) {
- var o = this.options;
-
- this._blurActiveElement( event );
-
- // among others, prevent a drag on a resizable-handle
- if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) {
- return false;
- }
-
- //Quit if we're not on a valid handle
- this.handle = this._getHandle(event);
- if (!this.handle) {
- return false;
- }
-
- this._blockFrames( o.iframeFix === true ? "iframe" : o.iframeFix );
-
- return true;
-
- },
-
- _blockFrames: function( selector ) {
- this.iframeBlocks = this.document.find( selector ).map(function() {
- var iframe = $( this );
-
- return $( "<div>" )
- .css( "position", "absolute" )
- .appendTo( iframe.parent() )
- .outerWidth( iframe.outerWidth() )
- .outerHeight( iframe.outerHeight() )
- .offset( iframe.offset() )[ 0 ];
- });
- },
-
- _unblockFrames: function() {
- if ( this.iframeBlocks ) {
- this.iframeBlocks.remove();
- delete this.iframeBlocks;
- }
- },
-
- _blurActiveElement: function( event ) {
- var document = this.document[ 0 ];
-
- // Only need to blur if the event occurred on the draggable itself, see #10527
- if ( !this.handleElement.is( event.target ) ) {
- return;
- }
-
- // support: IE9
- // IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe>
- try {
-
- // Support: IE9, IE10
- // If the <body> is blurred, IE will switch windows, see #9520
- if ( document.activeElement && document.activeElement.nodeName.toLowerCase() !== "body" ) {
-
- // Blur any element that currently has focus, see #4261
- $( document.activeElement ).blur();
- }
- } catch ( error ) {}
- },
-
- _mouseStart: function(event) {
-
- var o = this.options;
-
- //Create and append the visible helper
- this.helper = this._createHelper(event);
-
- this.helper.addClass("ui-draggable-dragging");
-
- //Cache the helper size
- this._cacheHelperProportions();
-
- //If ddmanager is used for droppables, set the global draggable
- if ($.ui.ddmanager) {
- $.ui.ddmanager.current = this;
- }
-
- /*
- * - Position generation -
- * This block generates everything position related - it's the core of draggables.
- */
-
- //Cache the margins of the original element
- this._cacheMargins();
-
- //Store the helper's css position
- this.cssPosition = this.helper.css( "position" );
- this.scrollParent = this.helper.scrollParent( true );
- this.offsetParent = this.helper.offsetParent();
- this.hasFixedAncestor = this.helper.parents().filter(function() {
- return $( this ).css( "position" ) === "fixed";
- }).length > 0;
-
- //The element's absolute position on the page minus margins
- this.positionAbs = this.element.offset();
- this._refreshOffsets( event );
-
- //Generate the original position
- this.originalPosition = this.position = this._generatePosition( event, false );
- this.originalPageX = event.pageX;
- this.originalPageY = event.pageY;
-
- //Adjust the mouse offset relative to the helper if "cursorAt" is supplied
- (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
-
- //Set a containment if given in the options
- this._setContainment();
-
- //Trigger event + callbacks
- if (this._trigger("start", event) === false) {
- this._clear();
- return false;
- }
-
- //Recache the helper size
- this._cacheHelperProportions();
-
- //Prepare the droppable offsets
- if ($.ui.ddmanager && !o.dropBehaviour) {
- $.ui.ddmanager.prepareOffsets(this, event);
- }
-
- // Reset helper's right/bottom css if they're set and set explicit width/height instead
- // as this prevents resizing of elements with right/bottom set (see #7772)
- this._normalizeRightBottom();
-
- this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
-
- //If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)
- if ( $.ui.ddmanager ) {
- $.ui.ddmanager.dragStart(this, event);
- }
-
- return true;
- },
-
- _refreshOffsets: function( event ) {
- this.offset = {
- top: this.positionAbs.top - this.margins.top,
- left: this.positionAbs.left - this.margins.left,
- scroll: false,
- parent: this._getParentOffset(),
- relative: this._getRelativeOffset()
- };
-
- this.offset.click = {
- left: event.pageX - this.offset.left,
- top: event.pageY - this.offset.top
- };
- },
-
- _mouseDrag: function(event, noPropagation) {
- // reset any necessary cached properties (see #5009)
- if ( this.hasFixedAncestor ) {
- this.offset.parent = this._getParentOffset();
- }
-
- //Compute the helpers position
- this.position = this._generatePosition( event, true );
- this.positionAbs = this._convertPositionTo("absolute");
-
- //Call plugins and callbacks and use the resulting position if something is returned
- if (!noPropagation) {
- var ui = this._uiHash();
- if (this._trigger("drag", event, ui) === false) {
- this._mouseUp({});
- return false;
- }
- this.position = ui.position;
- }
-
- this.helper[ 0 ].style.left = this.position.left + "px";
- this.helper[ 0 ].style.top = this.position.top + "px";
-
- if ($.ui.ddmanager) {
- $.ui.ddmanager.drag(this, event);
- }
-
- return false;
- },
-
- _mouseStop: function(event) {
-
- //If we are using droppables, inform the manager about the drop
- var that = this,
- dropped = false;
- if ($.ui.ddmanager && !this.options.dropBehaviour) {
- dropped = $.ui.ddmanager.drop(this, event);
- }
-
- //if a drop comes from outside (a sortable)
- if (this.dropped) {
- dropped = this.dropped;
- this.dropped = false;
- }
-
- if ((this.options.revert === "invalid" && !dropped) || (this.options.revert === "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
- $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
- if (that._trigger("stop", event) !== false) {
- that._clear();
- }
- });
- } else {
- if (this._trigger("stop", event) !== false) {
- this._clear();
- }
- }
-
- return false;
- },
-
- _mouseUp: function( event ) {
- this._unblockFrames();
-
- //If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)
- if ( $.ui.ddmanager ) {
- $.ui.ddmanager.dragStop(this, event);
- }
-
- // Only need to focus if the event occurred on the draggable itself, see #10527
- if ( this.handleElement.is( event.target ) ) {
- // The interaction is over; whether or not the click resulted in a drag, focus the element
- this.element.focus();
- }
-
- return $.ui.mouse.prototype._mouseUp.call(this, event);
- },
-
- cancel: function() {
-
- if (this.helper.is(".ui-draggable-dragging")) {
- this._mouseUp({});
- } else {
- this._clear();
- }
-
- return this;
-
- },
-
- _getHandle: function(event) {
- return this.options.handle ?
- !!$( event.target ).closest( this.element.find( this.options.handle ) ).length :
- true;
- },
-
- _setHandleClassName: function() {
- this.handleElement = this.options.handle ?
- this.element.find( this.options.handle ) : this.element;
- this.handleElement.addClass( "ui-draggable-handle" );
- },
-
- _removeHandleClassName: function() {
- this.handleElement.removeClass( "ui-draggable-handle" );
- },
-
- _createHelper: function(event) {
-
- var o = this.options,
- helperIsFunction = $.isFunction( o.helper ),
- helper = helperIsFunction ?
- $( o.helper.apply( this.element[ 0 ], [ event ] ) ) :
- ( o.helper === "clone" ?
- this.element.clone().removeAttr( "id" ) :
- this.element );
-
- if (!helper.parents("body").length) {
- helper.appendTo((o.appendTo === "parent" ? this.element[0].parentNode : o.appendTo));
- }
-
- // http://bugs.jqueryui.com/ticket/9446
- // a helper function can return the original element
- // which wouldn't have been set to relative in _create
- if ( helperIsFunction && helper[ 0 ] === this.element[ 0 ] ) {
- this._setPositionRelative();
- }
-
- if (helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) {
- helper.css("position", "absolute");
- }
-
- return helper;
-
- },
-
- _setPositionRelative: function() {
- if ( !( /^(?:r|a|f)/ ).test( this.element.css( "position" ) ) ) {
- this.element[ 0 ].style.position = "relative";
- }
- },
-
- _adjustOffsetFromHelper: function(obj) {
- if (typeof obj === "string") {
- obj = obj.split(" ");
- }
- if ($.isArray(obj)) {
- obj = { left: +obj[0], top: +obj[1] || 0 };
- }
- if ("left" in obj) {
- this.offset.click.left = obj.left + this.margins.left;
- }
- if ("right" in obj) {
- this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
- }
- if ("top" in obj) {
- this.offset.click.top = obj.top + this.margins.top;
- }
- if ("bottom" in obj) {
- this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
- }
- },
-
- _isRootNode: function( element ) {
- return ( /(html|body)/i ).test( element.tagName ) || element === this.document[ 0 ];
- },
-
- _getParentOffset: function() {
-
- //Get the offsetParent and cache its position
- var po = this.offsetParent.offset(),
- document = this.document[ 0 ];
-
- // This is a special case where we need to modify a offset calculated on start, since the following happened:
- // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
- // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
- // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
- if (this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
- po.left += this.scrollParent.scrollLeft();
- po.top += this.scrollParent.scrollTop();
- }
-
- if ( this._isRootNode( this.offsetParent[ 0 ] ) ) {
- po = { top: 0, left: 0 };
- }
-
- return {
- top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
- left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
- };
-
- },
-
- _getRelativeOffset: function() {
- if ( this.cssPosition !== "relative" ) {
- return { top: 0, left: 0 };
- }
-
- var p = this.element.position(),
- scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );
-
- return {
- top: p.top - ( parseInt(this.helper.css( "top" ), 10) || 0 ) + ( !scrollIsRootNode ? this.scrollParent.scrollTop() : 0 ),
- left: p.left - ( parseInt(this.helper.css( "left" ), 10) || 0 ) + ( !scrollIsRootNode ? this.scrollParent.scrollLeft() : 0 )
- };
-
- },
-
- _cacheMargins: function() {
- this.margins = {
- left: (parseInt(this.element.css("marginLeft"), 10) || 0),
- top: (parseInt(this.element.css("marginTop"), 10) || 0),
- right: (parseInt(this.element.css("marginRight"), 10) || 0),
- bottom: (parseInt(this.element.css("marginBottom"), 10) || 0)
- };
- },
-
- _cacheHelperProportions: function() {
- this.helperProportions = {
- width: this.helper.outerWidth(),
- height: this.helper.outerHeight()
- };
- },
-
- _setContainment: function() {
-
- var isUserScrollable, c, ce,
- o = this.options,
- document = this.document[ 0 ];
-
- this.relativeContainer = null;
-
- if ( !o.containment ) {
- this.containment = null;
- return;
- }
-
- if ( o.containment === "window" ) {
- this.containment = [
- $( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
- $( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top,
- $( window ).scrollLeft() + $( window ).width() - this.helperProportions.width - this.margins.left,
- $( window ).scrollTop() + ( $( window ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top
- ];
- return;
- }
-
- if ( o.containment === "document") {
- this.containment = [
- 0,
- 0,
- $( document ).width() - this.helperProportions.width - this.margins.left,
- ( $( document ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top
- ];
- return;
- }
-
- if ( o.containment.constructor === Array ) {
- this.containment = o.containment;
- return;
- }
-
- if ( o.containment === "parent" ) {
- o.containment = this.helper[ 0 ].parentNode;
- }
-
- c = $( o.containment );
- ce = c[ 0 ];
-
- if ( !ce ) {
- return;
- }
-
- isUserScrollable = /(scroll|auto)/.test( c.css( "overflow" ) );
-
- this.containment = [
- ( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ),
- ( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingTop" ), 10 ) || 0 ),
- ( isUserScrollable ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -
- ( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) -
- ( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) -
- this.helperProportions.width -
- this.margins.left -
- this.margins.right,
- ( isUserScrollable ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -
- ( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) -
- ( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) -
- this.helperProportions.height -
- this.margins.top -
- this.margins.bottom
- ];
- this.relativeContainer = c;
- },
-
- _convertPositionTo: function(d, pos) {
-
- if (!pos) {
- pos = this.position;
- }
-
- var mod = d === "absolute" ? 1 : -1,
- scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );
-
- return {
- top: (
- pos.top + // The absolute mouse position
- this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.offset.scroll.top : ( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) * mod)
- ),
- left: (
- pos.left + // The absolute mouse position
- this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.offset.scroll.left : ( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) * mod)
- )
- };
-
- },
-
- _generatePosition: function( event, constrainPosition ) {
-
- var containment, co, top, left,
- o = this.options,
- scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ),
- pageX = event.pageX,
- pageY = event.pageY;
-
- // Cache the scroll
- if ( !scrollIsRootNode || !this.offset.scroll ) {
- this.offset.scroll = {
- top: this.scrollParent.scrollTop(),
- left: this.scrollParent.scrollLeft()
- };
- }
-
- /*
- * - Position constraining -
- * Constrain the position to a mix of grid, containment.
- */
-
- // If we are not dragging yet, we won't check for options
- if ( constrainPosition ) {
- if ( this.containment ) {
- if ( this.relativeContainer ){
- co = this.relativeContainer.offset();
- containment = [
- this.containment[ 0 ] + co.left,
- this.containment[ 1 ] + co.top,
- this.containment[ 2 ] + co.left,
- this.containment[ 3 ] + co.top
- ];
- } else {
- containment = this.containment;
- }
-
- if (event.pageX - this.offset.click.left < containment[0]) {
- pageX = containment[0] + this.offset.click.left;
- }
- if (event.pageY - this.offset.click.top < containment[1]) {
- pageY = containment[1] + this.offset.click.top;
- }
- if (event.pageX - this.offset.click.left > containment[2]) {
- pageX = containment[2] + this.offset.click.left;
- }
- if (event.pageY - this.offset.click.top > containment[3]) {
- pageY = containment[3] + this.offset.click.top;
- }
- }
-
- if (o.grid) {
- //Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950)
- top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;
- pageY = containment ? ((top - this.offset.click.top >= containment[1] || top - this.offset.click.top > containment[3]) ? top : ((top - this.offset.click.top >= containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
-
- left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;
- pageX = containment ? ((left - this.offset.click.left >= containment[0] || left - this.offset.click.left > containment[2]) ? left : ((left - this.offset.click.left >= containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
- }
-
- if ( o.axis === "y" ) {
- pageX = this.originalPageX;
- }
-
- if ( o.axis === "x" ) {
- pageY = this.originalPageY;
- }
- }
-
- return {
- top: (
- pageY - // The absolute mouse position
- this.offset.click.top - // Click offset (relative to the element)
- this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top + // The offsetParent's offset without borders (offset + border)
- ( this.cssPosition === "fixed" ? -this.offset.scroll.top : ( scrollIsRootNode ? 0 : this.offset.scroll.top ) )
- ),
- left: (
- pageX - // The absolute mouse position
- this.offset.click.left - // Click offset (relative to the element)
- this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left + // The offsetParent's offset without borders (offset + border)
- ( this.cssPosition === "fixed" ? -this.offset.scroll.left : ( scrollIsRootNode ? 0 : this.offset.scroll.left ) )
- )
- };
-
- },
-
- _clear: function() {
- this.helper.removeClass("ui-draggable-dragging");
- if (this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) {
- this.helper.remove();
- }
- this.helper = null;
- this.cancelHelperRemoval = false;
- if ( this.destroyOnClear ) {
- this.destroy();
- }
- },
-
- _normalizeRightBottom: function() {
- if ( this.options.axis !== "y" && this.helper.css( "right" ) !== "auto" ) {
- this.helper.width( this.helper.width() );
- this.helper.css( "right", "auto" );
- }
- if ( this.options.axis !== "x" && this.helper.css( "bottom" ) !== "auto" ) {
- this.helper.height( this.helper.height() );
- this.helper.css( "bottom", "auto" );
- }
- },
-
- // From now on bulk stuff - mainly helpers
-
- _trigger: function( type, event, ui ) {
- ui = ui || this._uiHash();
- $.ui.plugin.call( this, type, [ event, ui, this ], true );
-
- // Absolute position and offset (see #6884 ) have to be recalculated after plugins
- if ( /^(drag|start|stop)/.test( type ) ) {
- this.positionAbs = this._convertPositionTo( "absolute" );
- ui.offset = this.positionAbs;
- }
- return $.Widget.prototype._trigger.call( this, type, event, ui );
- },
-
- plugins: {},
-
- _uiHash: function() {
- return {
- helper: this.helper,
- position: this.position,
- originalPosition: this.originalPosition,
- offset: this.positionAbs
- };
- }
-
-});
-
-$.ui.plugin.add( "draggable", "connectToSortable", {
- start: function( event, ui, draggable ) {
- var uiSortable = $.extend( {}, ui, {
- item: draggable.element
- });
-
- draggable.sortables = [];
- $( draggable.options.connectToSortable ).each(function() {
- var sortable = $( this ).sortable( "instance" );
-
- if ( sortable && !sortable.options.disabled ) {
- draggable.sortables.push( sortable );
-
- // refreshPositions is called at drag start to refresh the containerCache
- // which is used in drag. This ensures it's initialized and synchronized
- // with any changes that might have happened on the page since initialization.
- sortable.refreshPositions();
- sortable._trigger("activate", event, uiSortable);
- }
- });
- },
- stop: function( event, ui, draggable ) {
- var uiSortable = $.extend( {}, ui, {
- item: draggable.element
- });
-
- draggable.cancelHelperRemoval = false;
-
- $.each( draggable.sortables, function() {
- var sortable = this;
-
- if ( sortable.isOver ) {
- sortable.isOver = 0;
-
- // Allow this sortable to handle removing the helper
- draggable.cancelHelperRemoval = true;
- sortable.cancelHelperRemoval = false;
-
- // Use _storedCSS To restore properties in the sortable,
- // as this also handles revert (#9675) since the draggable
- // may have modified them in unexpected ways (#8809)
- sortable._storedCSS = {
- position: sortable.placeholder.css( "position" ),
- top: sortable.placeholder.css( "top" ),
- left: sortable.placeholder.css( "left" )
- };
-
- sortable._mouseStop(event);
-
- // Once drag has ended, the sortable should return to using
- // its original helper, not the shared helper from draggable
- sortable.options.helper = sortable.options._helper;
- } else {
- // Prevent this Sortable from removing the helper.
- // However, don't set the draggable to remove the helper
- // either as another connected Sortable may yet handle the removal.
- sortable.cancelHelperRemoval = true;
-
- sortable._trigger( "deactivate", event, uiSortable );
- }
- });
- },
- drag: function( event, ui, draggable ) {
- $.each( draggable.sortables, function() {
- var innermostIntersecting = false,
- sortable = this;
-
- // Copy over variables that sortable's _intersectsWith uses
- sortable.positionAbs = draggable.positionAbs;
- sortable.helperProportions = draggable.helperProportions;
- sortable.offset.click = draggable.offset.click;
-
- if ( sortable._intersectsWith( sortable.containerCache ) ) {
- innermostIntersecting = true;
-
- $.each( draggable.sortables, function() {
- // Copy over variables that sortable's _intersectsWith uses
- this.positionAbs = draggable.positionAbs;
- this.helperProportions = draggable.helperProportions;
- this.offset.click = draggable.offset.click;
-
- if ( this !== sortable &&
- this._intersectsWith( this.containerCache ) &&
- $.contains( sortable.element[ 0 ], this.element[ 0 ] ) ) {
- innermostIntersecting = false;
- }
-
- return innermostIntersecting;
- });
- }
-
- if ( innermostIntersecting ) {
- // If it intersects, we use a little isOver variable and set it once,
- // so that the move-in stuff gets fired only once.
- if ( !sortable.isOver ) {
- sortable.isOver = 1;
-
- // Store draggable's parent in case we need to reappend to it later.
- draggable._parent = ui.helper.parent();
-
- sortable.currentItem = ui.helper
- .appendTo( sortable.element )
- .data( "ui-sortable-item", true );
-
- // Store helper option to later restore it
- sortable.options._helper = sortable.options.helper;
-
- sortable.options.helper = function() {
- return ui.helper[ 0 ];
- };
-
- // Fire the start events of the sortable with our passed browser event,
- // and our own helper (so it doesn't create a new one)
- event.target = sortable.currentItem[ 0 ];
- sortable._mouseCapture( event, true );
- sortable._mouseStart( event, true, true );
-
- // Because the browser event is way off the new appended portlet,
- // modify necessary variables to reflect the changes
- sortable.offset.click.top = draggable.offset.click.top;
- sortable.offset.click.left = draggable.offset.click.left;
- sortable.offset.parent.left -= draggable.offset.parent.left -
- sortable.offset.parent.left;
- sortable.offset.parent.top -= draggable.offset.parent.top -
- sortable.offset.parent.top;
-
- draggable._trigger( "toSortable", event );
-
- // Inform draggable that the helper is in a valid drop zone,
- // used solely in the revert option to handle "valid/invalid".
- draggable.dropped = sortable.element;
-
- // Need to refreshPositions of all sortables in the case that
- // adding to one sortable changes the location of the other sortables (#9675)
- $.each( draggable.sortables, function() {
- this.refreshPositions();
- });
-
- // hack so receive/update callbacks work (mostly)
- draggable.currentItem = draggable.element;
- sortable.fromOutside = draggable;
- }
-
- if ( sortable.currentItem ) {
- sortable._mouseDrag( event );
- // Copy the sortable's position because the draggable's can potentially reflect
- // a relative position, while sortable is always absolute, which the dragged
- // element has now become. (#8809)
- ui.position = sortable.position;
- }
- } else {
- // If it doesn't intersect with the sortable, and it intersected before,
- // we fake the drag stop of the sortable, but make sure it doesn't remove
- // the helper by using cancelHelperRemoval.
- if ( sortable.isOver ) {
-
- sortable.isOver = 0;
- sortable.cancelHelperRemoval = true;
-
- // Calling sortable's mouseStop would trigger a revert,
- // so revert must be temporarily false until after mouseStop is called.
- sortable.options._revert = sortable.options.revert;
- sortable.options.revert = false;
-
- sortable._trigger( "out", event, sortable._uiHash( sortable ) );
- sortable._mouseStop( event, true );
-
- // restore sortable behaviors that were modfied
- // when the draggable entered the sortable area (#9481)
- sortable.options.revert = sortable.options._revert;
- sortable.options.helper = sortable.options._helper;
-
- if ( sortable.placeholder ) {
- sortable.placeholder.remove();
- }
-
- // Restore and recalculate the draggable's offset considering the sortable
- // may have modified them in unexpected ways. (#8809, #10669)
- ui.helper.appendTo( draggable._parent );
- draggable._refreshOffsets( event );
- ui.position = draggable._generatePosition( event, true );
-
- draggable._trigger( "fromSortable", event );
-
- // Inform draggable that the helper is no longer in a valid drop zone
- draggable.dropped = false;
-
- // Need to refreshPositions of all sortables just in case removing
- // from one sortable changes the location of other sortables (#9675)
- $.each( draggable.sortables, function() {
- this.refreshPositions();
- });
- }
- }
- });
- }
-});
-
-$.ui.plugin.add("draggable", "cursor", {
- start: function( event, ui, instance ) {
- var t = $( "body" ),
- o = instance.options;
-
- if (t.css("cursor")) {
- o._cursor = t.css("cursor");
- }
- t.css("cursor", o.cursor);
- },
- stop: function( event, ui, instance ) {
- var o = instance.options;
- if (o._cursor) {
- $("body").css("cursor", o._cursor);
- }
- }
-});
-
-$.ui.plugin.add("draggable", "opacity", {
- start: function( event, ui, instance ) {
- var t = $( ui.helper ),
- o = instance.options;
- if (t.css("opacity")) {
- o._opacity = t.css("opacity");
- }
- t.css("opacity", o.opacity);
- },
- stop: function( event, ui, instance ) {
- var o = instance.options;
- if (o._opacity) {
- $(ui.helper).css("opacity", o._opacity);
- }
- }
-});
-
-$.ui.plugin.add("draggable", "scroll", {
- start: function( event, ui, i ) {
- if ( !i.scrollParentNotHidden ) {
- i.scrollParentNotHidden = i.helper.scrollParent( false );
- }
-
- if ( i.scrollParentNotHidden[ 0 ] !== i.document[ 0 ] && i.scrollParentNotHidden[ 0 ].tagName !== "HTML" ) {
- i.overflowOffset = i.scrollParentNotHidden.offset();
- }
- },
- drag: function( event, ui, i ) {
-
- var o = i.options,
- scrolled = false,
- scrollParent = i.scrollParentNotHidden[ 0 ],
- document = i.document[ 0 ];
-
- if ( scrollParent !== document && scrollParent.tagName !== "HTML" ) {
- if ( !o.axis || o.axis !== "x" ) {
- if ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY < o.scrollSensitivity ) {
- scrollParent.scrollTop = scrolled = scrollParent.scrollTop + o.scrollSpeed;
- } else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) {
- scrollParent.scrollTop = scrolled = scrollParent.scrollTop - o.scrollSpeed;
- }
- }
-
- if ( !o.axis || o.axis !== "y" ) {
- if ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX < o.scrollSensitivity ) {
- scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + o.scrollSpeed;
- } else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) {
- scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - o.scrollSpeed;
- }
- }
-
- } else {
-
- if (!o.axis || o.axis !== "x") {
- if (event.pageY - $(document).scrollTop() < o.scrollSensitivity) {
- scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
- } else if ($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {
- scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
- }
- }
-
- if (!o.axis || o.axis !== "y") {
- if (event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {
- scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
- } else if ($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {
- scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
- }
- }
-
- }
-
- if (scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
- $.ui.ddmanager.prepareOffsets(i, event);
- }
-
- }
-});
-
-$.ui.plugin.add("draggable", "snap", {
- start: function( event, ui, i ) {
-
- var o = i.options;
-
- i.snapElements = [];
-
- $(o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap).each(function() {
- var $t = $(this),
- $o = $t.offset();
- if (this !== i.element[0]) {
- i.snapElements.push({
- item: this,
- width: $t.outerWidth(), height: $t.outerHeight(),
- top: $o.top, left: $o.left
- });
- }
- });
-
- },
- drag: function( event, ui, inst ) {
-
- var ts, bs, ls, rs, l, r, t, b, i, first,
- o = inst.options,
- d = o.snapTolerance,
- x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
- y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
-
- for (i = inst.snapElements.length - 1; i >= 0; i--){
-
- l = inst.snapElements[i].left - inst.margins.left;
- r = l + inst.snapElements[i].width;
- t = inst.snapElements[i].top - inst.margins.top;
- b = t + inst.snapElements[i].height;
-
- if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d || !$.contains( inst.snapElements[ i ].item.ownerDocument, inst.snapElements[ i ].item ) ) {
- if (inst.snapElements[i].snapping) {
- (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
- }
- inst.snapElements[i].snapping = false;
- continue;
- }
-
- if (o.snapMode !== "inner") {
- ts = Math.abs(t - y2) <= d;
- bs = Math.abs(b - y1) <= d;
- ls = Math.abs(l - x2) <= d;
- rs = Math.abs(r - x1) <= d;
- if (ts) {
- ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top;
- }
- if (bs) {
- ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top;
- }
- if (ls) {
- ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left;
- }
- if (rs) {
- ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left;
- }
- }
-
- first = (ts || bs || ls || rs);
-
- if (o.snapMode !== "outer") {
- ts = Math.abs(t - y1) <= d;
- bs = Math.abs(b - y2) <= d;
- ls = Math.abs(l - x1) <= d;
- rs = Math.abs(r - x2) <= d;
- if (ts) {
- ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top;
- }
- if (bs) {
- ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top;
- }
- if (ls) {
- ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left;
- }
- if (rs) {
- ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left;
- }
- }
-
- if (!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) {
- (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
- }
- inst.snapElements[i].snapping = (ts || bs || ls || rs || first);
-
- }
-
- }
-});
-
-$.ui.plugin.add("draggable", "stack", {
- start: function( event, ui, instance ) {
- var min,
- o = instance.options,
- group = $.makeArray($(o.stack)).sort(function(a, b) {
- return (parseInt($(a).css("zIndex"), 10) || 0) - (parseInt($(b).css("zIndex"), 10) || 0);
- });
-
- if (!group.length) { return; }
-
- min = parseInt($(group[0]).css("zIndex"), 10) || 0;
- $(group).each(function(i) {
- $(this).css("zIndex", min + i);
- });
- this.css("zIndex", (min + group.length));
- }
-});
-
-$.ui.plugin.add("draggable", "zIndex", {
- start: function( event, ui, instance ) {
- var t = $( ui.helper ),
- o = instance.options;
-
- if (t.css("zIndex")) {
- o._zIndex = t.css("zIndex");
- }
- t.css("zIndex", o.zIndex);
- },
- stop: function( event, ui, instance ) {
- var o = instance.options;
-
- if (o._zIndex) {
- $(ui.helper).css("zIndex", o._zIndex);
- }
- }
-});
-
-var draggable = $.ui.draggable;
-
-
-/*!
- * jQuery UI Resizable 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/resizable/
- */
-
-
-$.widget("ui.resizable", $.ui.mouse, {
- version: "1.11.4",
- widgetEventPrefix: "resize",
- options: {
- alsoResize: false,
- animate: false,
- animateDuration: "slow",
- animateEasing: "swing",
- aspectRatio: false,
- autoHide: false,
- containment: false,
- ghost: false,
- grid: false,
- handles: "e,s,se",
- helper: false,
- maxHeight: null,
- maxWidth: null,
- minHeight: 10,
- minWidth: 10,
- // See #7960
- zIndex: 90,
-
- // callbacks
- resize: null,
- start: null,
- stop: null
- },
-
- _num: function( value ) {
- return parseInt( value, 10 ) || 0;
- },
-
- _isNumber: function( value ) {
- return !isNaN( parseInt( value, 10 ) );
- },
-
- _hasScroll: function( el, a ) {
-
- if ( $( el ).css( "overflow" ) === "hidden") {
- return false;
- }
-
- var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
- has = false;
-
- if ( el[ scroll ] > 0 ) {
- return true;
- }
-
- // TODO: determine which cases actually cause this to happen
- // if the element doesn't have the scroll set, see if it's possible to
- // set the scroll
- el[ scroll ] = 1;
- has = ( el[ scroll ] > 0 );
- el[ scroll ] = 0;
- return has;
- },
-
- _create: function() {
-
- var n, i, handle, axis, hname,
- that = this,
- o = this.options;
- this.element.addClass("ui-resizable");
-
- $.extend(this, {
- _aspectRatio: !!(o.aspectRatio),
- aspectRatio: o.aspectRatio,
- originalElement: this.element,
- _proportionallyResizeElements: [],
- _helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null
- });
-
- // Wrap the element if it cannot hold child nodes
- if (this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)) {
-
- this.element.wrap(
- $("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({
- position: this.element.css("position"),
- width: this.element.outerWidth(),
- height: this.element.outerHeight(),
- top: this.element.css("top"),
- left: this.element.css("left")
- })
- );
-
- this.element = this.element.parent().data(
- "ui-resizable", this.element.resizable( "instance" )
- );
-
- this.elementIsWrapper = true;
-
- this.element.css({
- marginLeft: this.originalElement.css("marginLeft"),
- marginTop: this.originalElement.css("marginTop"),
- marginRight: this.originalElement.css("marginRight"),
- marginBottom: this.originalElement.css("marginBottom")
- });
- this.originalElement.css({
- marginLeft: 0,
- marginTop: 0,
- marginRight: 0,
- marginBottom: 0
- });
- // support: Safari
- // Prevent Safari textarea resize
- this.originalResizeStyle = this.originalElement.css("resize");
- this.originalElement.css("resize", "none");
-
- this._proportionallyResizeElements.push( this.originalElement.css({
- position: "static",
- zoom: 1,
- display: "block"
- }) );
-
- // support: IE9
- // avoid IE jump (hard set the margin)
- this.originalElement.css({ margin: this.originalElement.css("margin") });
-
- this._proportionallyResize();
- }
-
- this.handles = o.handles ||
- ( !$(".ui-resizable-handle", this.element).length ?
- "e,s,se" : {
- n: ".ui-resizable-n",
- e: ".ui-resizable-e",
- s: ".ui-resizable-s",
- w: ".ui-resizable-w",
- se: ".ui-resizable-se",
- sw: ".ui-resizable-sw",
- ne: ".ui-resizable-ne",
- nw: ".ui-resizable-nw"
- } );
-
- this._handles = $();
- if ( this.handles.constructor === String ) {
-
- if ( this.handles === "all") {
- this.handles = "n,e,s,w,se,sw,ne,nw";
- }
-
- n = this.handles.split(",");
- this.handles = {};
-
- for (i = 0; i < n.length; i++) {
-
- handle = $.trim(n[i]);
- hname = "ui-resizable-" + handle;
- axis = $("<div class='ui-resizable-handle " + hname + "'></div>");
-
- axis.css({ zIndex: o.zIndex });
-
- // TODO : What's going on here?
- if ("se" === handle) {
- axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se");
- }
-
- this.handles[handle] = ".ui-resizable-" + handle;
- this.element.append(axis);
- }
-
- }
-
- this._renderAxis = function(target) {
-
- var i, axis, padPos, padWrapper;
-
- target = target || this.element;
-
- for (i in this.handles) {
-
- if (this.handles[i].constructor === String) {
- this.handles[i] = this.element.children( this.handles[ i ] ).first().show();
- } else if ( this.handles[ i ].jquery || this.handles[ i ].nodeType ) {
- this.handles[ i ] = $( this.handles[ i ] );
- this._on( this.handles[ i ], { "mousedown": that._mouseDown });
- }
-
- if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)) {
-
- axis = $(this.handles[i], this.element);
-
- padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();
-
- padPos = [ "padding",
- /ne|nw|n/.test(i) ? "Top" :
- /se|sw|s/.test(i) ? "Bottom" :
- /^e$/.test(i) ? "Right" : "Left" ].join("");
-
- target.css(padPos, padWrapper);
-
- this._proportionallyResize();
- }
-
- this._handles = this._handles.add( this.handles[ i ] );
- }
- };
-
- // TODO: make renderAxis a prototype function
- this._renderAxis(this.element);
-
- this._handles = this._handles.add( this.element.find( ".ui-resizable-handle" ) );
- this._handles.disableSelection();
-
- this._handles.mouseover(function() {
- if (!that.resizing) {
- if (this.className) {
- axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
- }
- that.axis = axis && axis[1] ? axis[1] : "se";
- }
- });
-
- if (o.autoHide) {
- this._handles.hide();
- $(this.element)
- .addClass("ui-resizable-autohide")
- .mouseenter(function() {
- if (o.disabled) {
- return;
- }
- $(this).removeClass("ui-resizable-autohide");
- that._handles.show();
- })
- .mouseleave(function() {
- if (o.disabled) {
- return;
- }
- if (!that.resizing) {
- $(this).addClass("ui-resizable-autohide");
- that._handles.hide();
- }
- });
- }
-
- this._mouseInit();
- },
-
- _destroy: function() {
-
- this._mouseDestroy();
-
- var wrapper,
- _destroy = function(exp) {
- $(exp)
- .removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing")
- .removeData("resizable")
- .removeData("ui-resizable")
- .unbind(".resizable")
- .find(".ui-resizable-handle")
- .remove();
- };
-
- // TODO: Unwrap at same DOM position
- if (this.elementIsWrapper) {
- _destroy(this.element);
- wrapper = this.element;
- this.originalElement.css({
- position: wrapper.css("position"),
- width: wrapper.outerWidth(),
- height: wrapper.outerHeight(),
- top: wrapper.css("top"),
- left: wrapper.css("left")
- }).insertAfter( wrapper );
- wrapper.remove();
- }
-
- this.originalElement.css("resize", this.originalResizeStyle);
- _destroy(this.originalElement);
-
- return this;
- },
-
- _mouseCapture: function(event) {
- var i, handle,
- capture = false;
-
- for (i in this.handles) {
- handle = $(this.handles[i])[0];
- if (handle === event.target || $.contains(handle, event.target)) {
- capture = true;
- }
- }
-
- return !this.options.disabled && capture;
- },
-
- _mouseStart: function(event) {
-
- var curleft, curtop, cursor,
- o = this.options,
- el = this.element;
-
- this.resizing = true;
-
- this._renderProxy();
-
- curleft = this._num(this.helper.css("left"));
- curtop = this._num(this.helper.css("top"));
-
- if (o.containment) {
- curleft += $(o.containment).scrollLeft() || 0;
- curtop += $(o.containment).scrollTop() || 0;
- }
-
- this.offset = this.helper.offset();
- this.position = { left: curleft, top: curtop };
-
- this.size = this._helper ? {
- width: this.helper.width(),
- height: this.helper.height()
- } : {
- width: el.width(),
- height: el.height()
- };
-
- this.originalSize = this._helper ? {
- width: el.outerWidth(),
- height: el.outerHeight()
- } : {
- width: el.width(),
- height: el.height()
- };
-
- this.sizeDiff = {
- width: el.outerWidth() - el.width(),
- height: el.outerHeight() - el.height()
- };
-
- this.originalPosition = { left: curleft, top: curtop };
- this.originalMousePosition = { left: event.pageX, top: event.pageY };
-
- this.aspectRatio = (typeof o.aspectRatio === "number") ?
- o.aspectRatio :
- ((this.originalSize.width / this.originalSize.height) || 1);
-
- cursor = $(".ui-resizable-" + this.axis).css("cursor");
- $("body").css("cursor", cursor === "auto" ? this.axis + "-resize" : cursor);
-
- el.addClass("ui-resizable-resizing");
- this._propagate("start", event);
- return true;
- },
-
- _mouseDrag: function(event) {
-
- var data, props,
- smp = this.originalMousePosition,
- a = this.axis,
- dx = (event.pageX - smp.left) || 0,
- dy = (event.pageY - smp.top) || 0,
- trigger = this._change[a];
-
- this._updatePrevProperties();
-
- if (!trigger) {
- return false;
- }
-
- data = trigger.apply(this, [ event, dx, dy ]);
-
- this._updateVirtualBoundaries(event.shiftKey);
- if (this._aspectRatio || event.shiftKey) {
- data = this._updateRatio(data, event);
- }
-
- data = this._respectSize(data, event);
-
- this._updateCache(data);
-
- this._propagate("resize", event);
-
- props = this._applyChanges();
-
- if ( !this._helper && this._proportionallyResizeElements.length ) {
- this._proportionallyResize();
- }
-
- if ( !$.isEmptyObject( props ) ) {
- this._updatePrevProperties();
- this._trigger( "resize", event, this.ui() );
- this._applyChanges();
- }
-
- return false;
- },
-
- _mouseStop: function(event) {
-
- this.resizing = false;
- var pr, ista, soffseth, soffsetw, s, left, top,
- o = this.options, that = this;
-
- if (this._helper) {
-
- pr = this._proportionallyResizeElements;
- ista = pr.length && (/textarea/i).test(pr[0].nodeName);
- soffseth = ista && this._hasScroll(pr[0], "left") ? 0 : that.sizeDiff.height;
- soffsetw = ista ? 0 : that.sizeDiff.width;
-
- s = {
- width: (that.helper.width() - soffsetw),
- height: (that.helper.height() - soffseth)
- };
- left = (parseInt(that.element.css("left"), 10) +
- (that.position.left - that.originalPosition.left)) || null;
- top = (parseInt(that.element.css("top"), 10) +
- (that.position.top - that.originalPosition.top)) || null;
-
- if (!o.animate) {
- this.element.css($.extend(s, { top: top, left: left }));
- }
-
- that.helper.height(that.size.height);
- that.helper.width(that.size.width);
-
- if (this._helper && !o.animate) {
- this._proportionallyResize();
- }
- }
-
- $("body").css("cursor", "auto");
-
- this.element.removeClass("ui-resizable-resizing");
-
- this._propagate("stop", event);
-
- if (this._helper) {
- this.helper.remove();
- }
-
- return false;
-
- },
-
- _updatePrevProperties: function() {
- this.prevPosition = {
- top: this.position.top,
- left: this.position.left
- };
- this.prevSize = {
- width: this.size.width,
- height: this.size.height
- };
- },
-
- _applyChanges: function() {
- var props = {};
-
- if ( this.position.top !== this.prevPosition.top ) {
- props.top = this.position.top + "px";
- }
- if ( this.position.left !== this.prevPosition.left ) {
- props.left = this.position.left + "px";
- }
- if ( this.size.width !== this.prevSize.width ) {
- props.width = this.size.width + "px";
- }
- if ( this.size.height !== this.prevSize.height ) {
- props.height = this.size.height + "px";
- }
-
- this.helper.css( props );
-
- return props;
- },
-
- _updateVirtualBoundaries: function(forceAspectRatio) {
- var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,
- o = this.options;
-
- b = {
- minWidth: this._isNumber(o.minWidth) ? o.minWidth : 0,
- maxWidth: this._isNumber(o.maxWidth) ? o.maxWidth : Infinity,
- minHeight: this._isNumber(o.minHeight) ? o.minHeight : 0,
- maxHeight: this._isNumber(o.maxHeight) ? o.maxHeight : Infinity
- };
-
- if (this._aspectRatio || forceAspectRatio) {
- pMinWidth = b.minHeight * this.aspectRatio;
- pMinHeight = b.minWidth / this.aspectRatio;
- pMaxWidth = b.maxHeight * this.aspectRatio;
- pMaxHeight = b.maxWidth / this.aspectRatio;
-
- if (pMinWidth > b.minWidth) {
- b.minWidth = pMinWidth;
- }
- if (pMinHeight > b.minHeight) {
- b.minHeight = pMinHeight;
- }
- if (pMaxWidth < b.maxWidth) {
- b.maxWidth = pMaxWidth;
- }
- if (pMaxHeight < b.maxHeight) {
- b.maxHeight = pMaxHeight;
- }
- }
- this._vBoundaries = b;
- },
-
- _updateCache: function(data) {
- this.offset = this.helper.offset();
- if (this._isNumber(data.left)) {
- this.position.left = data.left;
- }
- if (this._isNumber(data.top)) {
- this.position.top = data.top;
- }
- if (this._isNumber(data.height)) {
- this.size.height = data.height;
- }
- if (this._isNumber(data.width)) {
- this.size.width = data.width;
- }
- },
-
- _updateRatio: function( data ) {
-
- var cpos = this.position,
- csize = this.size,
- a = this.axis;
-
- if (this._isNumber(data.height)) {
- data.width = (data.height * this.aspectRatio);
- } else if (this._isNumber(data.width)) {
- data.height = (data.width / this.aspectRatio);
- }
-
- if (a === "sw") {
- data.left = cpos.left + (csize.width - data.width);
- data.top = null;
- }
- if (a === "nw") {
- data.top = cpos.top + (csize.height - data.height);
- data.left = cpos.left + (csize.width - data.width);
- }
-
- return data;
- },
-
- _respectSize: function( data ) {
-
- var o = this._vBoundaries,
- a = this.axis,
- ismaxw = this._isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width),
- ismaxh = this._isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),
- isminw = this._isNumber(data.width) && o.minWidth && (o.minWidth > data.width),
- isminh = this._isNumber(data.height) && o.minHeight && (o.minHeight > data.height),
- dw = this.originalPosition.left + this.originalSize.width,
- dh = this.position.top + this.size.height,
- cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);
- if (isminw) {
- data.width = o.minWidth;
- }
- if (isminh) {
- data.height = o.minHeight;
- }
- if (ismaxw) {
- data.width = o.maxWidth;
- }
- if (ismaxh) {
- data.height = o.maxHeight;
- }
-
- if (isminw && cw) {
- data.left = dw - o.minWidth;
- }
- if (ismaxw && cw) {
- data.left = dw - o.maxWidth;
- }
- if (isminh && ch) {
- data.top = dh - o.minHeight;
- }
- if (ismaxh && ch) {
- data.top = dh - o.maxHeight;
- }
-
- // Fixing jump error on top/left - bug #2330
- if (!data.width && !data.height && !data.left && data.top) {
- data.top = null;
- } else if (!data.width && !data.height && !data.top && data.left) {
- data.left = null;
- }
-
- return data;
- },
-
- _getPaddingPlusBorderDimensions: function( element ) {
- var i = 0,
- widths = [],
- borders = [
- element.css( "borderTopWidth" ),
- element.css( "borderRightWidth" ),
- element.css( "borderBottomWidth" ),
- element.css( "borderLeftWidth" )
- ],
- paddings = [
- element.css( "paddingTop" ),
- element.css( "paddingRight" ),
- element.css( "paddingBottom" ),
- element.css( "paddingLeft" )
- ];
-
- for ( ; i < 4; i++ ) {
- widths[ i ] = ( parseInt( borders[ i ], 10 ) || 0 );
- widths[ i ] += ( parseInt( paddings[ i ], 10 ) || 0 );
- }
-
- return {
- height: widths[ 0 ] + widths[ 2 ],
- width: widths[ 1 ] + widths[ 3 ]
- };
- },
-
- _proportionallyResize: function() {
-
- if (!this._proportionallyResizeElements.length) {
- return;
- }
-
- var prel,
- i = 0,
- element = this.helper || this.element;
-
- for ( ; i < this._proportionallyResizeElements.length; i++) {
-
- prel = this._proportionallyResizeElements[i];
-
- // TODO: Seems like a bug to cache this.outerDimensions
- // considering that we are in a loop.
- if (!this.outerDimensions) {
- this.outerDimensions = this._getPaddingPlusBorderDimensions( prel );
- }
-
- prel.css({
- height: (element.height() - this.outerDimensions.height) || 0,
- width: (element.width() - this.outerDimensions.width) || 0
- });
-
- }
-
- },
-
- _renderProxy: function() {
-
- var el = this.element, o = this.options;
- this.elementOffset = el.offset();
-
- if (this._helper) {
-
- this.helper = this.helper || $("<div style='overflow:hidden;'></div>");
-
- this.helper.addClass(this._helper).css({
- width: this.element.outerWidth() - 1,
- height: this.element.outerHeight() - 1,
- position: "absolute",
- left: this.elementOffset.left + "px",
- top: this.elementOffset.top + "px",
- zIndex: ++o.zIndex //TODO: Don't modify option
- });
-
- this.helper
- .appendTo("body")
- .disableSelection();
-
- } else {
- this.helper = this.element;
- }
-
- },
-
- _change: {
- e: function(event, dx) {
- return { width: this.originalSize.width + dx };
- },
- w: function(event, dx) {
- var cs = this.originalSize, sp = this.originalPosition;
- return { left: sp.left + dx, width: cs.width - dx };
- },
- n: function(event, dx, dy) {
- var cs = this.originalSize, sp = this.originalPosition;
- return { top: sp.top + dy, height: cs.height - dy };
- },
- s: function(event, dx, dy) {
- return { height: this.originalSize.height + dy };
- },
- se: function(event, dx, dy) {
- return $.extend(this._change.s.apply(this, arguments),
- this._change.e.apply(this, [ event, dx, dy ]));
- },
- sw: function(event, dx, dy) {
- return $.extend(this._change.s.apply(this, arguments),
- this._change.w.apply(this, [ event, dx, dy ]));
- },
- ne: function(event, dx, dy) {
- return $.extend(this._change.n.apply(this, arguments),
- this._change.e.apply(this, [ event, dx, dy ]));
- },
- nw: function(event, dx, dy) {
- return $.extend(this._change.n.apply(this, arguments),
- this._change.w.apply(this, [ event, dx, dy ]));
- }
- },
-
- _propagate: function(n, event) {
- $.ui.plugin.call(this, n, [ event, this.ui() ]);
- (n !== "resize" && this._trigger(n, event, this.ui()));
- },
-
- plugins: {},
-
- ui: function() {
- return {
- originalElement: this.originalElement,
- element: this.element,
- helper: this.helper,
- position: this.position,
- size: this.size,
- originalSize: this.originalSize,
- originalPosition: this.originalPosition
- };
- }
-
-});
-
-/*
- * Resizable Extensions
- */
-
-$.ui.plugin.add("resizable", "animate", {
-
- stop: function( event ) {
- var that = $(this).resizable( "instance" ),
- o = that.options,
- pr = that._proportionallyResizeElements,
- ista = pr.length && (/textarea/i).test(pr[0].nodeName),
- soffseth = ista && that._hasScroll(pr[0], "left") ? 0 : that.sizeDiff.height,
- soffsetw = ista ? 0 : that.sizeDiff.width,
- style = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) },
- left = (parseInt(that.element.css("left"), 10) +
- (that.position.left - that.originalPosition.left)) || null,
- top = (parseInt(that.element.css("top"), 10) +
- (that.position.top - that.originalPosition.top)) || null;
-
- that.element.animate(
- $.extend(style, top && left ? { top: top, left: left } : {}), {
- duration: o.animateDuration,
- easing: o.animateEasing,
- step: function() {
-
- var data = {
- width: parseInt(that.element.css("width"), 10),
- height: parseInt(that.element.css("height"), 10),
- top: parseInt(that.element.css("top"), 10),
- left: parseInt(that.element.css("left"), 10)
- };
-
- if (pr && pr.length) {
- $(pr[0]).css({ width: data.width, height: data.height });
- }
-
- // propagating resize, and updating values for each animation step
- that._updateCache(data);
- that._propagate("resize", event);
-
- }
- }
- );
- }
-
-});
-
-$.ui.plugin.add( "resizable", "containment", {
-
- start: function() {
- var element, p, co, ch, cw, width, height,
- that = $( this ).resizable( "instance" ),
- o = that.options,
- el = that.element,
- oc = o.containment,
- ce = ( oc instanceof $ ) ? oc.get( 0 ) : ( /parent/.test( oc ) ) ? el.parent().get( 0 ) : oc;
-
- if ( !ce ) {
- return;
- }
-
- that.containerElement = $( ce );
-
- if ( /document/.test( oc ) || oc === document ) {
- that.containerOffset = {
- left: 0,
- top: 0
- };
- that.containerPosition = {
- left: 0,
- top: 0
- };
-
- that.parentData = {
- element: $( document ),
- left: 0,
- top: 0,
- width: $( document ).width(),
- height: $( document ).height() || document.body.parentNode.scrollHeight
- };
- } else {
- element = $( ce );
- p = [];
- $([ "Top", "Right", "Left", "Bottom" ]).each(function( i, name ) {
- p[ i ] = that._num( element.css( "padding" + name ) );
- });
-
- that.containerOffset = element.offset();
- that.containerPosition = element.position();
- that.containerSize = {
- height: ( element.innerHeight() - p[ 3 ] ),
- width: ( element.innerWidth() - p[ 1 ] )
- };
-
- co = that.containerOffset;
- ch = that.containerSize.height;
- cw = that.containerSize.width;
- width = ( that._hasScroll ( ce, "left" ) ? ce.scrollWidth : cw );
- height = ( that._hasScroll ( ce ) ? ce.scrollHeight : ch ) ;
-
- that.parentData = {
- element: ce,
- left: co.left,
- top: co.top,
- width: width,
- height: height
- };
- }
- },
-
- resize: function( event ) {
- var woset, hoset, isParent, isOffsetRelative,
- that = $( this ).resizable( "instance" ),
- o = that.options,
- co = that.containerOffset,
- cp = that.position,
- pRatio = that._aspectRatio || event.shiftKey,
- cop = {
- top: 0,
- left: 0
- },
- ce = that.containerElement,
- continueResize = true;
-
- if ( ce[ 0 ] !== document && ( /static/ ).test( ce.css( "position" ) ) ) {
- cop = co;
- }
-
- if ( cp.left < ( that._helper ? co.left : 0 ) ) {
- that.size.width = that.size.width +
- ( that._helper ?
- ( that.position.left - co.left ) :
- ( that.position.left - cop.left ) );
-
- if ( pRatio ) {
- that.size.height = that.size.width / that.aspectRatio;
- continueResize = false;
- }
- that.position.left = o.helper ? co.left : 0;
- }
-
- if ( cp.top < ( that._helper ? co.top : 0 ) ) {
- that.size.height = that.size.height +
- ( that._helper ?
- ( that.position.top - co.top ) :
- that.position.top );
-
- if ( pRatio ) {
- that.size.width = that.size.height * that.aspectRatio;
- continueResize = false;
- }
- that.position.top = that._helper ? co.top : 0;
- }
-
- isParent = that.containerElement.get( 0 ) === that.element.parent().get( 0 );
- isOffsetRelative = /relative|absolute/.test( that.containerElement.css( "position" ) );
-
- if ( isParent && isOffsetRelative ) {
- that.offset.left = that.parentData.left + that.position.left;
- that.offset.top = that.parentData.top + that.position.top;
- } else {
- that.offset.left = that.element.offset().left;
- that.offset.top = that.element.offset().top;
- }
-
- woset = Math.abs( that.sizeDiff.width +
- (that._helper ?
- that.offset.left - cop.left :
- (that.offset.left - co.left)) );
-
- hoset = Math.abs( that.sizeDiff.height +
- (that._helper ?
- that.offset.top - cop.top :
- (that.offset.top - co.top)) );
-
- if ( woset + that.size.width >= that.parentData.width ) {
- that.size.width = that.parentData.width - woset;
- if ( pRatio ) {
- that.size.height = that.size.width / that.aspectRatio;
- continueResize = false;
- }
- }
-
- if ( hoset + that.size.height >= that.parentData.height ) {
- that.size.height = that.parentData.height - hoset;
- if ( pRatio ) {
- that.size.width = that.size.height * that.aspectRatio;
- continueResize = false;
- }
- }
-
- if ( !continueResize ) {
- that.position.left = that.prevPosition.left;
- that.position.top = that.prevPosition.top;
- that.size.width = that.prevSize.width;
- that.size.height = that.prevSize.height;
- }
- },
-
- stop: function() {
- var that = $( this ).resizable( "instance" ),
- o = that.options,
- co = that.containerOffset,
- cop = that.containerPosition,
- ce = that.containerElement,
- helper = $( that.helper ),
- ho = helper.offset(),
- w = helper.outerWidth() - that.sizeDiff.width,
- h = helper.outerHeight() - that.sizeDiff.height;
-
- if ( that._helper && !o.animate && ( /relative/ ).test( ce.css( "position" ) ) ) {
- $( this ).css({
- left: ho.left - cop.left - co.left,
- width: w,
- height: h
- });
- }
-
- if ( that._helper && !o.animate && ( /static/ ).test( ce.css( "position" ) ) ) {
- $( this ).css({
- left: ho.left - cop.left - co.left,
- width: w,
- height: h
- });
- }
- }
-});
-
-$.ui.plugin.add("resizable", "alsoResize", {
-
- start: function() {
- var that = $(this).resizable( "instance" ),
- o = that.options;
-
- $(o.alsoResize).each(function() {
- var el = $(this);
- el.data("ui-resizable-alsoresize", {
- width: parseInt(el.width(), 10), height: parseInt(el.height(), 10),
- left: parseInt(el.css("left"), 10), top: parseInt(el.css("top"), 10)
- });
- });
- },
-
- resize: function(event, ui) {
- var that = $(this).resizable( "instance" ),
- o = that.options,
- os = that.originalSize,
- op = that.originalPosition,
- delta = {
- height: (that.size.height - os.height) || 0,
- width: (that.size.width - os.width) || 0,
- top: (that.position.top - op.top) || 0,
- left: (that.position.left - op.left) || 0
- };
-
- $(o.alsoResize).each(function() {
- var el = $(this), start = $(this).data("ui-resizable-alsoresize"), style = {},
- css = el.parents(ui.originalElement[0]).length ?
- [ "width", "height" ] :
- [ "width", "height", "top", "left" ];
-
- $.each(css, function(i, prop) {
- var sum = (start[prop] || 0) + (delta[prop] || 0);
- if (sum && sum >= 0) {
- style[prop] = sum || null;
- }
- });
-
- el.css(style);
- });
- },
-
- stop: function() {
- $(this).removeData("resizable-alsoresize");
- }
-});
-
-$.ui.plugin.add("resizable", "ghost", {
-
- start: function() {
-
- var that = $(this).resizable( "instance" ), o = that.options, cs = that.size;
-
- that.ghost = that.originalElement.clone();
- that.ghost
- .css({
- opacity: 0.25,
- display: "block",
- position: "relative",
- height: cs.height,
- width: cs.width,
- margin: 0,
- left: 0,
- top: 0
- })
- .addClass("ui-resizable-ghost")
- .addClass(typeof o.ghost === "string" ? o.ghost : "");
-
- that.ghost.appendTo(that.helper);
-
- },
-
- resize: function() {
- var that = $(this).resizable( "instance" );
- if (that.ghost) {
- that.ghost.css({
- position: "relative",
- height: that.size.height,
- width: that.size.width
- });
- }
- },
-
- stop: function() {
- var that = $(this).resizable( "instance" );
- if (that.ghost && that.helper) {
- that.helper.get(0).removeChild(that.ghost.get(0));
- }
- }
-
-});
-
-$.ui.plugin.add("resizable", "grid", {
-
- resize: function() {
- var outerDimensions,
- that = $(this).resizable( "instance" ),
- o = that.options,
- cs = that.size,
- os = that.originalSize,
- op = that.originalPosition,
- a = that.axis,
- grid = typeof o.grid === "number" ? [ o.grid, o.grid ] : o.grid,
- gridX = (grid[0] || 1),
- gridY = (grid[1] || 1),
- ox = Math.round((cs.width - os.width) / gridX) * gridX,
- oy = Math.round((cs.height - os.height) / gridY) * gridY,
- newWidth = os.width + ox,
- newHeight = os.height + oy,
- isMaxWidth = o.maxWidth && (o.maxWidth < newWidth),
- isMaxHeight = o.maxHeight && (o.maxHeight < newHeight),
- isMinWidth = o.minWidth && (o.minWidth > newWidth),
- isMinHeight = o.minHeight && (o.minHeight > newHeight);
-
- o.grid = grid;
-
- if (isMinWidth) {
- newWidth += gridX;
- }
- if (isMinHeight) {
- newHeight += gridY;
- }
- if (isMaxWidth) {
- newWidth -= gridX;
- }
- if (isMaxHeight) {
- newHeight -= gridY;
- }
-
- if (/^(se|s|e)$/.test(a)) {
- that.size.width = newWidth;
- that.size.height = newHeight;
- } else if (/^(ne)$/.test(a)) {
- that.size.width = newWidth;
- that.size.height = newHeight;
- that.position.top = op.top - oy;
- } else if (/^(sw)$/.test(a)) {
- that.size.width = newWidth;
- that.size.height = newHeight;
- that.position.left = op.left - ox;
- } else {
- if ( newHeight - gridY <= 0 || newWidth - gridX <= 0) {
- outerDimensions = that._getPaddingPlusBorderDimensions( this );
- }
-
- if ( newHeight - gridY > 0 ) {
- that.size.height = newHeight;
- that.position.top = op.top - oy;
- } else {
- newHeight = gridY - outerDimensions.height;
- that.size.height = newHeight;
- that.position.top = op.top + os.height - newHeight;
- }
- if ( newWidth - gridX > 0 ) {
- that.size.width = newWidth;
- that.position.left = op.left - ox;
- } else {
- newWidth = gridX - outerDimensions.width;
- that.size.width = newWidth;
- that.position.left = op.left + os.width - newWidth;
- }
- }
- }
-
-});
-
-var resizable = $.ui.resizable;
-
-
-/*!
- * jQuery UI Dialog 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/dialog/
- */
-
-
-var dialog = $.widget( "ui.dialog", {
- version: "1.11.4",
- options: {
- appendTo: "body",
- autoOpen: true,
- buttons: [],
- closeOnEscape: true,
- closeText: "Close",
- dialogClass: "",
- draggable: true,
- hide: null,
- height: "auto",
- maxHeight: null,
- maxWidth: null,
- minHeight: 150,
- minWidth: 150,
- modal: false,
- position: {
- my: "center",
- at: "center",
- of: window,
- collision: "fit",
- // Ensure the titlebar is always visible
- using: function( pos ) {
- var topOffset = $( this ).css( pos ).offset().top;
- if ( topOffset < 0 ) {
- $( this ).css( "top", pos.top - topOffset );
- }
- }
- },
- resizable: true,
- show: null,
- title: null,
- width: 300,
-
- // callbacks
- beforeClose: null,
- close: null,
- drag: null,
- dragStart: null,
- dragStop: null,
- focus: null,
- open: null,
- resize: null,
- resizeStart: null,
- resizeStop: null
- },
-
- sizeRelatedOptions: {
- buttons: true,
- height: true,
- maxHeight: true,
- maxWidth: true,
- minHeight: true,
- minWidth: true,
- width: true
- },
-
- resizableRelatedOptions: {
- maxHeight: true,
- maxWidth: true,
- minHeight: true,
- minWidth: true
- },
-
- _create: function() {
- this.originalCss = {
- display: this.element[ 0 ].style.display,
- width: this.element[ 0 ].style.width,
- minHeight: this.element[ 0 ].style.minHeight,
- maxHeight: this.element[ 0 ].style.maxHeight,
- height: this.element[ 0 ].style.height
- };
- this.originalPosition = {
- parent: this.element.parent(),
- index: this.element.parent().children().index( this.element )
- };
- this.originalTitle = this.element.attr( "title" );
- this.options.title = this.options.title || this.originalTitle;
-
- this._createWrapper();
-
- this.element
- .show()
- .removeAttr( "title" )
- .addClass( "ui-dialog-content ui-widget-content" )
- .appendTo( this.uiDialog );
-
- this._createTitlebar();
- this._createButtonPane();
-
- if ( this.options.draggable && $.fn.draggable ) {
- this._makeDraggable();
- }
- if ( this.options.resizable && $.fn.resizable ) {
- this._makeResizable();
- }
-
- this._isOpen = false;
-
- this._trackFocus();
- },
-
- _init: function() {
- if ( this.options.autoOpen ) {
- this.open();
- }
- },
-
- _appendTo: function() {
- var element = this.options.appendTo;
- if ( element && (element.jquery || element.nodeType) ) {
- return $( element );
- }
- return this.document.find( element || "body" ).eq( 0 );
- },
-
- _destroy: function() {
- var next,
- originalPosition = this.originalPosition;
-
- this._untrackInstance();
- this._destroyOverlay();
-
- this.element
- .removeUniqueId()
- .removeClass( "ui-dialog-content ui-widget-content" )
- .css( this.originalCss )
- // Without detaching first, the following becomes really slow
- .detach();
-
- this.uiDialog.stop( true, true ).remove();
-
- if ( this.originalTitle ) {
- this.element.attr( "title", this.originalTitle );
- }
-
- next = originalPosition.parent.children().eq( originalPosition.index );
- // Don't try to place the dialog next to itself (#8613)
- if ( next.length && next[ 0 ] !== this.element[ 0 ] ) {
- next.before( this.element );
- } else {
- originalPosition.parent.append( this.element );
- }
- },
-
- widget: function() {
- return this.uiDialog;
- },
-
- disable: $.noop,
- enable: $.noop,
-
- close: function( event ) {
- var activeElement,
- that = this;
-
- if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) {
- return;
- }
-
- this._isOpen = false;
- this._focusedElement = null;
- this._destroyOverlay();
- this._untrackInstance();
-
- if ( !this.opener.filter( ":focusable" ).focus().length ) {
-
- // support: IE9
- // IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe>
- try {
- activeElement = this.document[ 0 ].activeElement;
-
- // Support: IE9, IE10
- // If the <body> is blurred, IE will switch windows, see #4520
- if ( activeElement && activeElement.nodeName.toLowerCase() !== "body" ) {
-
- // Hiding a focused element doesn't trigger blur in WebKit
- // so in case we have nothing to focus on, explicitly blur the active element
- // https://bugs.webkit.org/show_bug.cgi?id=47182
- $( activeElement ).blur();
- }
- } catch ( error ) {}
- }
-
- this._hide( this.uiDialog, this.options.hide, function() {
- that._trigger( "close", event );
- });
- },
-
- isOpen: function() {
- return this._isOpen;
- },
-
- moveToTop: function() {
- this._moveToTop();
- },
-
- _moveToTop: function( event, silent ) {
- var moved = false,
- zIndices = this.uiDialog.siblings( ".ui-front:visible" ).map(function() {
- return +$( this ).css( "z-index" );
- }).get(),
- zIndexMax = Math.max.apply( null, zIndices );
-
- if ( zIndexMax >= +this.uiDialog.css( "z-index" ) ) {
- this.uiDialog.css( "z-index", zIndexMax + 1 );
- moved = true;
- }
-
- if ( moved && !silent ) {
- this._trigger( "focus", event );
- }
- return moved;
- },
-
- open: function() {
- var that = this;
- if ( this._isOpen ) {
- if ( this._moveToTop() ) {
- this._focusTabbable();
- }
- return;
- }
-
- this._isOpen = true;
- this.opener = $( this.document[ 0 ].activeElement );
-
- this._size();
- this._position();
- this._createOverlay();
- this._moveToTop( null, true );
-
- // Ensure the overlay is moved to the top with the dialog, but only when
- // opening. The overlay shouldn't move after the dialog is open so that
- // modeless dialogs opened after the modal dialog stack properly.
- if ( this.overlay ) {
- this.overlay.css( "z-index", this.uiDialog.css( "z-index" ) - 1 );
- }
-
- this._show( this.uiDialog, this.options.show, function() {
- that._focusTabbable();
- that._trigger( "focus" );
- });
-
- // Track the dialog immediately upon openening in case a focus event
- // somehow occurs outside of the dialog before an element inside the
- // dialog is focused (#10152)
- this._makeFocusTarget();
-
- this._trigger( "open" );
- },
-
- _focusTabbable: function() {
- // Set focus to the first match:
- // 1. An element that was focused previously
- // 2. First element inside the dialog matching [autofocus]
- // 3. Tabbable element inside the content element
- // 4. Tabbable element inside the buttonpane
- // 5. The close button
- // 6. The dialog itself
- var hasFocus = this._focusedElement;
- if ( !hasFocus ) {
- hasFocus = this.element.find( "[autofocus]" );
- }
- if ( !hasFocus.length ) {
- hasFocus = this.element.find( ":tabbable" );
- }
- if ( !hasFocus.length ) {
- hasFocus = this.uiDialogButtonPane.find( ":tabbable" );
- }
- if ( !hasFocus.length ) {
- hasFocus = this.uiDialogTitlebarClose.filter( ":tabbable" );
- }
- if ( !hasFocus.length ) {
- hasFocus = this.uiDialog;
- }
- hasFocus.eq( 0 ).focus();
- },
-
- _keepFocus: function( event ) {
- function checkFocus() {
- var activeElement = this.document[0].activeElement,
- isActive = this.uiDialog[0] === activeElement ||
- $.contains( this.uiDialog[0], activeElement );
- if ( !isActive ) {
- this._focusTabbable();
- }
- }
- event.preventDefault();
- checkFocus.call( this );
- // support: IE
- // IE <= 8 doesn't prevent moving focus even with event.preventDefault()
- // so we check again later
- this._delay( checkFocus );
- },
-
- _createWrapper: function() {
- this.uiDialog = $("<div>")
- .addClass( "ui-dialog ui-widget ui-widget-content ui-corner-all ui-front " +
- this.options.dialogClass )
- .hide()
- .attr({
- // Setting tabIndex makes the div focusable
- tabIndex: -1,
- role: "dialog"
- })
- .appendTo( this._appendTo() );
-
- this._on( this.uiDialog, {
- keydown: function( event ) {
- if ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
- event.keyCode === $.ui.keyCode.ESCAPE ) {
- event.preventDefault();
- this.close( event );
- return;
- }
-
- // prevent tabbing out of dialogs
- if ( event.keyCode !== $.ui.keyCode.TAB || event.isDefaultPrevented() ) {
- return;
- }
- var tabbables = this.uiDialog.find( ":tabbable" ),
- first = tabbables.filter( ":first" ),
- last = tabbables.filter( ":last" );
-
- if ( ( event.target === last[0] || event.target === this.uiDialog[0] ) && !event.shiftKey ) {
- this._delay(function() {
- first.focus();
- });
- event.preventDefault();
- } else if ( ( event.target === first[0] || event.target === this.uiDialog[0] ) && event.shiftKey ) {
- this._delay(function() {
- last.focus();
- });
- event.preventDefault();
- }
- },
- mousedown: function( event ) {
- if ( this._moveToTop( event ) ) {
- this._focusTabbable();
- }
- }
- });
-
- // We assume that any existing aria-describedby attribute means
- // that the dialog content is marked up properly
- // otherwise we brute force the content as the description
- if ( !this.element.find( "[aria-describedby]" ).length ) {
- this.uiDialog.attr({
- "aria-describedby": this.element.uniqueId().attr( "id" )
- });
- }
- },
-
- _createTitlebar: function() {
- var uiDialogTitle;
-
- this.uiDialogTitlebar = $( "<div>" )
- .addClass( "ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix" )
- .prependTo( this.uiDialog );
- this._on( this.uiDialogTitlebar, {
- mousedown: function( event ) {
- // Don't prevent click on close button (#8838)
- // Focusing a dialog that is partially scrolled out of view
- // causes the browser to scroll it into view, preventing the click event
- if ( !$( event.target ).closest( ".ui-dialog-titlebar-close" ) ) {
- // Dialog isn't getting focus when dragging (#8063)
- this.uiDialog.focus();
- }
- }
- });
-
- // support: IE
- // Use type="button" to prevent enter keypresses in textboxes from closing the
- // dialog in IE (#9312)
- this.uiDialogTitlebarClose = $( "<button type='button'></button>" )
- .button({
- label: this.options.closeText,
- icons: {
- primary: "ui-icon-closethick"
- },
- text: false
- })
- .addClass( "ui-dialog-titlebar-close" )
- .appendTo( this.uiDialogTitlebar );
- this._on( this.uiDialogTitlebarClose, {
- click: function( event ) {
- event.preventDefault();
- this.close( event );
- }
- });
-
- uiDialogTitle = $( "<span>" )
- .uniqueId()
- .addClass( "ui-dialog-title" )
- .prependTo( this.uiDialogTitlebar );
- this._title( uiDialogTitle );
-
- this.uiDialog.attr({
- "aria-labelledby": uiDialogTitle.attr( "id" )
- });
- },
-
- _title: function( title ) {
- if ( !this.options.title ) {
- title.html( "&#160;" );
- }
- title.text( this.options.title );
- },
-
- _createButtonPane: function() {
- this.uiDialogButtonPane = $( "<div>" )
- .addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" );
-
- this.uiButtonSet = $( "<div>" )
- .addClass( "ui-dialog-buttonset" )
- .appendTo( this.uiDialogButtonPane );
-
- this._createButtons();
- },
-
- _createButtons: function() {
- var that = this,
- buttons = this.options.buttons;
-
- // if we already have a button pane, remove it
- this.uiDialogButtonPane.remove();
- this.uiButtonSet.empty();
-
- if ( $.isEmptyObject( buttons ) || ($.isArray( buttons ) && !buttons.length) ) {
- this.uiDialog.removeClass( "ui-dialog-buttons" );
- return;
- }
-
- $.each( buttons, function( name, props ) {
- var click, buttonOptions;
- props = $.isFunction( props ) ?
- { click: props, text: name } :
- props;
- // Default to a non-submitting button
- props = $.extend( { type: "button" }, props );
- // Change the context for the click callback to be the main element
- click = props.click;
- props.click = function() {
- click.apply( that.element[ 0 ], arguments );
- };
- buttonOptions = {
- icons: props.icons,
- text: props.showText
- };
- delete props.icons;
- delete props.showText;
- $( "<button></button>", props )
- .button( buttonOptions )
- .appendTo( that.uiButtonSet );
- });
- this.uiDialog.addClass( "ui-dialog-buttons" );
- this.uiDialogButtonPane.appendTo( this.uiDialog );
- },
-
- _makeDraggable: function() {
- var that = this,
- options = this.options;
-
- function filteredUi( ui ) {
- return {
- position: ui.position,
- offset: ui.offset
- };
- }
-
- this.uiDialog.draggable({
- cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
- handle: ".ui-dialog-titlebar",
- containment: "document",
- start: function( event, ui ) {
- $( this ).addClass( "ui-dialog-dragging" );
- that._blockFrames();
- that._trigger( "dragStart", event, filteredUi( ui ) );
- },
- drag: function( event, ui ) {
- that._trigger( "drag", event, filteredUi( ui ) );
- },
- stop: function( event, ui ) {
- var left = ui.offset.left - that.document.scrollLeft(),
- top = ui.offset.top - that.document.scrollTop();
-
- options.position = {
- my: "left top",
- at: "left" + (left >= 0 ? "+" : "") + left + " " +
- "top" + (top >= 0 ? "+" : "") + top,
- of: that.window
- };
- $( this ).removeClass( "ui-dialog-dragging" );
- that._unblockFrames();
- that._trigger( "dragStop", event, filteredUi( ui ) );
- }
- });
- },
-
- _makeResizable: function() {
- var that = this,
- options = this.options,
- handles = options.resizable,
- // .ui-resizable has position: relative defined in the stylesheet
- // but dialogs have to use absolute or fixed positioning
- position = this.uiDialog.css("position"),
- resizeHandles = typeof handles === "string" ?
- handles :
- "n,e,s,w,se,sw,ne,nw";
-
- function filteredUi( ui ) {
- return {
- originalPosition: ui.originalPosition,
- originalSize: ui.originalSize,
- position: ui.position,
- size: ui.size
- };
- }
-
- this.uiDialog.resizable({
- cancel: ".ui-dialog-content",
- containment: "document",
- alsoResize: this.element,
- maxWidth: options.maxWidth,
- maxHeight: options.maxHeight,
- minWidth: options.minWidth,
- minHeight: this._minHeight(),
- handles: resizeHandles,
- start: function( event, ui ) {
- $( this ).addClass( "ui-dialog-resizing" );
- that._blockFrames();
- that._trigger( "resizeStart", event, filteredUi( ui ) );
- },
- resize: function( event, ui ) {
- that._trigger( "resize", event, filteredUi( ui ) );
- },
- stop: function( event, ui ) {
- var offset = that.uiDialog.offset(),
- left = offset.left - that.document.scrollLeft(),
- top = offset.top - that.document.scrollTop();
-
- options.height = that.uiDialog.height();
- options.width = that.uiDialog.width();
- options.position = {
- my: "left top",
- at: "left" + (left >= 0 ? "+" : "") + left + " " +
- "top" + (top >= 0 ? "+" : "") + top,
- of: that.window
- };
- $( this ).removeClass( "ui-dialog-resizing" );
- that._unblockFrames();
- that._trigger( "resizeStop", event, filteredUi( ui ) );
- }
- })
- .css( "position", position );
- },
-
- _trackFocus: function() {
- this._on( this.widget(), {
- focusin: function( event ) {
- this._makeFocusTarget();
- this._focusedElement = $( event.target );
- }
- });
- },
-
- _makeFocusTarget: function() {
- this._untrackInstance();
- this._trackingInstances().unshift( this );
- },
-
- _untrackInstance: function() {
- var instances = this._trackingInstances(),
- exists = $.inArray( this, instances );
- if ( exists !== -1 ) {
- instances.splice( exists, 1 );
- }
- },
-
- _trackingInstances: function() {
- var instances = this.document.data( "ui-dialog-instances" );
- if ( !instances ) {
- instances = [];
- this.document.data( "ui-dialog-instances", instances );
- }
- return instances;
- },
-
- _minHeight: function() {
- var options = this.options;
-
- return options.height === "auto" ?
- options.minHeight :
- Math.min( options.minHeight, options.height );
- },
-
- _position: function() {
- // Need to show the dialog to get the actual offset in the position plugin
- var isVisible = this.uiDialog.is( ":visible" );
- if ( !isVisible ) {
- this.uiDialog.show();
- }
- this.uiDialog.position( this.options.position );
- if ( !isVisible ) {
- this.uiDialog.hide();
- }
- },
-
- _setOptions: function( options ) {
- var that = this,
- resize = false,
- resizableOptions = {};
-
- $.each( options, function( key, value ) {
- that._setOption( key, value );
-
- if ( key in that.sizeRelatedOptions ) {
- resize = true;
- }
- if ( key in that.resizableRelatedOptions ) {
- resizableOptions[ key ] = value;
- }
- });
-
- if ( resize ) {
- this._size();
- this._position();
- }
- if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
- this.uiDialog.resizable( "option", resizableOptions );
- }
- },
-
- _setOption: function( key, value ) {
- var isDraggable, isResizable,
- uiDialog = this.uiDialog;
-
- if ( key === "dialogClass" ) {
- uiDialog
- .removeClass( this.options.dialogClass )
- .addClass( value );
- }
-
- if ( key === "disabled" ) {
- return;
- }
-
- this._super( key, value );
-
- if ( key === "appendTo" ) {
- this.uiDialog.appendTo( this._appendTo() );
- }
-
- if ( key === "buttons" ) {
- this._createButtons();
- }
-
- if ( key === "closeText" ) {
- this.uiDialogTitlebarClose.button({
- // Ensure that we always pass a string
- label: "" + value
- });
- }
-
- if ( key === "draggable" ) {
- isDraggable = uiDialog.is( ":data(ui-draggable)" );
- if ( isDraggable && !value ) {
- uiDialog.draggable( "destroy" );
- }
-
- if ( !isDraggable && value ) {
- this._makeDraggable();
- }
- }
-
- if ( key === "position" ) {
- this._position();
- }
-
- if ( key === "resizable" ) {
- // currently resizable, becoming non-resizable
- isResizable = uiDialog.is( ":data(ui-resizable)" );
- if ( isResizable && !value ) {
- uiDialog.resizable( "destroy" );
- }
-
- // currently resizable, changing handles
- if ( isResizable && typeof value === "string" ) {
- uiDialog.resizable( "option", "handles", value );
- }
-
- // currently non-resizable, becoming resizable
- if ( !isResizable && value !== false ) {
- this._makeResizable();
- }
- }
-
- if ( key === "title" ) {
- this._title( this.uiDialogTitlebar.find( ".ui-dialog-title" ) );
- }
- },
-
- _size: function() {
- // If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
- // divs will both have width and height set, so we need to reset them
- var nonContentHeight, minContentHeight, maxContentHeight,
- options = this.options;
-
- // Reset content sizing
- this.element.show().css({
- width: "auto",
- minHeight: 0,
- maxHeight: "none",
- height: 0
- });
-
- if ( options.minWidth > options.width ) {
- options.width = options.minWidth;
- }
-
- // reset wrapper sizing
- // determine the height of all the non-content elements
- nonContentHeight = this.uiDialog.css({
- height: "auto",
- width: options.width
- })
- .outerHeight();
- minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
- maxContentHeight = typeof options.maxHeight === "number" ?
- Math.max( 0, options.maxHeight - nonContentHeight ) :
- "none";
-
- if ( options.height === "auto" ) {
- this.element.css({
- minHeight: minContentHeight,
- maxHeight: maxContentHeight,
- height: "auto"
- });
- } else {
- this.element.height( Math.max( 0, options.height - nonContentHeight ) );
- }
-
- if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
- this.uiDialog.resizable( "option", "minHeight", this._minHeight() );
- }
- },
-
- _blockFrames: function() {
- this.iframeBlocks = this.document.find( "iframe" ).map(function() {
- var iframe = $( this );
-
- return $( "<div>" )
- .css({
- position: "absolute",
- width: iframe.outerWidth(),
- height: iframe.outerHeight()
- })
- .appendTo( iframe.parent() )
- .offset( iframe.offset() )[0];
- });
- },
-
- _unblockFrames: function() {
- if ( this.iframeBlocks ) {
- this.iframeBlocks.remove();
- delete this.iframeBlocks;
- }
- },
-
- _allowInteraction: function( event ) {
- if ( $( event.target ).closest( ".ui-dialog" ).length ) {
- return true;
- }
-
- // TODO: Remove hack when datepicker implements
- // the .ui-front logic (#8989)
- return !!$( event.target ).closest( ".ui-datepicker" ).length;
- },
-
- _createOverlay: function() {
- if ( !this.options.modal ) {
- return;
- }
-
- // We use a delay in case the overlay is created from an
- // event that we're going to be cancelling (#2804)
- var isOpening = true;
- this._delay(function() {
- isOpening = false;
- });
-
- if ( !this.document.data( "ui-dialog-overlays" ) ) {
-
- // Prevent use of anchors and inputs
- // Using _on() for an event handler shared across many instances is
- // safe because the dialogs stack and must be closed in reverse order
- this._on( this.document, {
- focusin: function( event ) {
- if ( isOpening ) {
- return;
- }
-
- if ( !this._allowInteraction( event ) ) {
- event.preventDefault();
- this._trackingInstances()[ 0 ]._focusTabbable();
- }
- }
- });
- }
-
- this.overlay = $( "<div>" )
- .addClass( "ui-widget-overlay ui-front" )
- .appendTo( this._appendTo() );
- this._on( this.overlay, {
- mousedown: "_keepFocus"
- });
- this.document.data( "ui-dialog-overlays",
- (this.document.data( "ui-dialog-overlays" ) || 0) + 1 );
- },
-
- _destroyOverlay: function() {
- if ( !this.options.modal ) {
- return;
- }
-
- if ( this.overlay ) {
- var overlays = this.document.data( "ui-dialog-overlays" ) - 1;
-
- if ( !overlays ) {
- this.document
- .unbind( "focusin" )
- .removeData( "ui-dialog-overlays" );
- } else {
- this.document.data( "ui-dialog-overlays", overlays );
- }
-
- this.overlay.remove();
- this.overlay = null;
- }
- }
-});
-
-
-/*!
- * jQuery UI Droppable 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/droppable/
- */
-
-
-$.widget( "ui.droppable", {
- version: "1.11.4",
- widgetEventPrefix: "drop",
- options: {
- accept: "*",
- activeClass: false,
- addClasses: true,
- greedy: false,
- hoverClass: false,
- scope: "default",
- tolerance: "intersect",
-
- // callbacks
- activate: null,
- deactivate: null,
- drop: null,
- out: null,
- over: null
- },
- _create: function() {
-
- var proportions,
- o = this.options,
- accept = o.accept;
-
- this.isover = false;
- this.isout = true;
-
- this.accept = $.isFunction( accept ) ? accept : function( d ) {
- return d.is( accept );
- };
-
- this.proportions = function( /* valueToWrite */ ) {
- if ( arguments.length ) {
- // Store the droppable's proportions
- proportions = arguments[ 0 ];
- } else {
- // Retrieve or derive the droppable's proportions
- return proportions ?
- proportions :
- proportions = {
- width: this.element[ 0 ].offsetWidth,
- height: this.element[ 0 ].offsetHeight
- };
- }
- };
-
- this._addToManager( o.scope );
-
- o.addClasses && this.element.addClass( "ui-droppable" );
-
- },
-
- _addToManager: function( scope ) {
- // Add the reference and positions to the manager
- $.ui.ddmanager.droppables[ scope ] = $.ui.ddmanager.droppables[ scope ] || [];
- $.ui.ddmanager.droppables[ scope ].push( this );
- },
-
- _splice: function( drop ) {
- var i = 0;
- for ( ; i < drop.length; i++ ) {
- if ( drop[ i ] === this ) {
- drop.splice( i, 1 );
- }
- }
- },
-
- _destroy: function() {
- var drop = $.ui.ddmanager.droppables[ this.options.scope ];
-
- this._splice( drop );
-
- this.element.removeClass( "ui-droppable ui-droppable-disabled" );
- },
-
- _setOption: function( key, value ) {
-
- if ( key === "accept" ) {
- this.accept = $.isFunction( value ) ? value : function( d ) {
- return d.is( value );
- };
- } else if ( key === "scope" ) {
- var drop = $.ui.ddmanager.droppables[ this.options.scope ];
-
- this._splice( drop );
- this._addToManager( value );
- }
-
- this._super( key, value );
- },
-
- _activate: function( event ) {
- var draggable = $.ui.ddmanager.current;
- if ( this.options.activeClass ) {
- this.element.addClass( this.options.activeClass );
- }
- if ( draggable ){
- this._trigger( "activate", event, this.ui( draggable ) );
- }
- },
-
- _deactivate: function( event ) {
- var draggable = $.ui.ddmanager.current;
- if ( this.options.activeClass ) {
- this.element.removeClass( this.options.activeClass );
- }
- if ( draggable ){
- this._trigger( "deactivate", event, this.ui( draggable ) );
- }
- },
-
- _over: function( event ) {
-
- var draggable = $.ui.ddmanager.current;
-
- // Bail if draggable and droppable are same element
- if ( !draggable || ( draggable.currentItem || draggable.element )[ 0 ] === this.element[ 0 ] ) {
- return;
- }
-
- if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) {
- if ( this.options.hoverClass ) {
- this.element.addClass( this.options.hoverClass );
- }
- this._trigger( "over", event, this.ui( draggable ) );
- }
-
- },
-
- _out: function( event ) {
-
- var draggable = $.ui.ddmanager.current;
-
- // Bail if draggable and droppable are same element
- if ( !draggable || ( draggable.currentItem || draggable.element )[ 0 ] === this.element[ 0 ] ) {
- return;
- }
-
- if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) {
- if ( this.options.hoverClass ) {
- this.element.removeClass( this.options.hoverClass );
- }
- this._trigger( "out", event, this.ui( draggable ) );
- }
-
- },
-
- _drop: function( event, custom ) {
-
- var draggable = custom || $.ui.ddmanager.current,
- childrenIntersection = false;
-
- // Bail if draggable and droppable are same element
- if ( !draggable || ( draggable.currentItem || draggable.element )[ 0 ] === this.element[ 0 ] ) {
- return false;
- }
-
- this.element.find( ":data(ui-droppable)" ).not( ".ui-draggable-dragging" ).each(function() {
- var inst = $( this ).droppable( "instance" );
- if (
- inst.options.greedy &&
- !inst.options.disabled &&
- inst.options.scope === draggable.options.scope &&
- inst.accept.call( inst.element[ 0 ], ( draggable.currentItem || draggable.element ) ) &&
- $.ui.intersect( draggable, $.extend( inst, { offset: inst.element.offset() } ), inst.options.tolerance, event )
- ) { childrenIntersection = true; return false; }
- });
- if ( childrenIntersection ) {
- return false;
- }
-
- if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) {
- if ( this.options.activeClass ) {
- this.element.removeClass( this.options.activeClass );
- }
- if ( this.options.hoverClass ) {
- this.element.removeClass( this.options.hoverClass );
- }
- this._trigger( "drop", event, this.ui( draggable ) );
- return this.element;
- }
-
- return false;
-
- },
-
- ui: function( c ) {
- return {
- draggable: ( c.currentItem || c.element ),
- helper: c.helper,
- position: c.position,
- offset: c.positionAbs
- };
- }
-
-});
-
-$.ui.intersect = (function() {
- function isOverAxis( x, reference, size ) {
- return ( x >= reference ) && ( x < ( reference + size ) );
- }
-
- return function( draggable, droppable, toleranceMode, event ) {
-
- if ( !droppable.offset ) {
- return false;
- }
-
- var x1 = ( draggable.positionAbs || draggable.position.absolute ).left + draggable.margins.left,
- y1 = ( draggable.positionAbs || draggable.position.absolute ).top + draggable.margins.top,
- x2 = x1 + draggable.helperProportions.width,
- y2 = y1 + draggable.helperProportions.height,
- l = droppable.offset.left,
- t = droppable.offset.top,
- r = l + droppable.proportions().width,
- b = t + droppable.proportions().height;
-
- switch ( toleranceMode ) {
- case "fit":
- return ( l <= x1 && x2 <= r && t <= y1 && y2 <= b );
- case "intersect":
- return ( l < x1 + ( draggable.helperProportions.width / 2 ) && // Right Half
- x2 - ( draggable.helperProportions.width / 2 ) < r && // Left Half
- t < y1 + ( draggable.helperProportions.height / 2 ) && // Bottom Half
- y2 - ( draggable.helperProportions.height / 2 ) < b ); // Top Half
- case "pointer":
- return isOverAxis( event.pageY, t, droppable.proportions().height ) && isOverAxis( event.pageX, l, droppable.proportions().width );
- case "touch":
- return (
- ( y1 >= t && y1 <= b ) || // Top edge touching
- ( y2 >= t && y2 <= b ) || // Bottom edge touching
- ( y1 < t && y2 > b ) // Surrounded vertically
- ) && (
- ( x1 >= l && x1 <= r ) || // Left edge touching
- ( x2 >= l && x2 <= r ) || // Right edge touching
- ( x1 < l && x2 > r ) // Surrounded horizontally
- );
- default:
- return false;
- }
- };
-})();
-
-/*
- This manager tracks offsets of draggables and droppables
-*/
-$.ui.ddmanager = {
- current: null,
- droppables: { "default": [] },
- prepareOffsets: function( t, event ) {
-
- var i, j,
- m = $.ui.ddmanager.droppables[ t.options.scope ] || [],
- type = event ? event.type : null, // workaround for #2317
- list = ( t.currentItem || t.element ).find( ":data(ui-droppable)" ).addBack();
-
- droppablesLoop: for ( i = 0; i < m.length; i++ ) {
-
- // No disabled and non-accepted
- if ( m[ i ].options.disabled || ( t && !m[ i ].accept.call( m[ i ].element[ 0 ], ( t.currentItem || t.element ) ) ) ) {
- continue;
- }
-
- // Filter out elements in the current dragged item
- for ( j = 0; j < list.length; j++ ) {
- if ( list[ j ] === m[ i ].element[ 0 ] ) {
- m[ i ].proportions().height = 0;
- continue droppablesLoop;
- }
- }
-
- m[ i ].visible = m[ i ].element.css( "display" ) !== "none";
- if ( !m[ i ].visible ) {
- continue;
- }
-
- // Activate the droppable if used directly from draggables
- if ( type === "mousedown" ) {
- m[ i ]._activate.call( m[ i ], event );
- }
-
- m[ i ].offset = m[ i ].element.offset();
- m[ i ].proportions({ width: m[ i ].element[ 0 ].offsetWidth, height: m[ i ].element[ 0 ].offsetHeight });
-
- }
-
- },
- drop: function( draggable, event ) {
-
- var dropped = false;
- // Create a copy of the droppables in case the list changes during the drop (#9116)
- $.each( ( $.ui.ddmanager.droppables[ draggable.options.scope ] || [] ).slice(), function() {
-
- if ( !this.options ) {
- return;
- }
- if ( !this.options.disabled && this.visible && $.ui.intersect( draggable, this, this.options.tolerance, event ) ) {
- dropped = this._drop.call( this, event ) || dropped;
- }
-
- if ( !this.options.disabled && this.visible && this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) {
- this.isout = true;
- this.isover = false;
- this._deactivate.call( this, event );
- }
-
- });
- return dropped;
-
- },
- dragStart: function( draggable, event ) {
- // Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
- draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() {
- if ( !draggable.options.refreshPositions ) {
- $.ui.ddmanager.prepareOffsets( draggable, event );
- }
- });
- },
- drag: function( draggable, event ) {
-
- // If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
- if ( draggable.options.refreshPositions ) {
- $.ui.ddmanager.prepareOffsets( draggable, event );
- }
-
- // Run through all droppables and check their positions based on specific tolerance options
- $.each( $.ui.ddmanager.droppables[ draggable.options.scope ] || [], function() {
-
- if ( this.options.disabled || this.greedyChild || !this.visible ) {
- return;
- }
-
- var parentInstance, scope, parent,
- intersects = $.ui.intersect( draggable, this, this.options.tolerance, event ),
- c = !intersects && this.isover ? "isout" : ( intersects && !this.isover ? "isover" : null );
- if ( !c ) {
- return;
- }
-
- if ( this.options.greedy ) {
- // find droppable parents with same scope
- scope = this.options.scope;
- parent = this.element.parents( ":data(ui-droppable)" ).filter(function() {
- return $( this ).droppable( "instance" ).options.scope === scope;
- });
-
- if ( parent.length ) {
- parentInstance = $( parent[ 0 ] ).droppable( "instance" );
- parentInstance.greedyChild = ( c === "isover" );
- }
- }
-
- // we just moved into a greedy child
- if ( parentInstance && c === "isover" ) {
- parentInstance.isover = false;
- parentInstance.isout = true;
- parentInstance._out.call( parentInstance, event );
- }
-
- this[ c ] = true;
- this[c === "isout" ? "isover" : "isout"] = false;
- this[c === "isover" ? "_over" : "_out"].call( this, event );
-
- // we just moved out of a greedy child
- if ( parentInstance && c === "isout" ) {
- parentInstance.isout = false;
- parentInstance.isover = true;
- parentInstance._over.call( parentInstance, event );
- }
- });
-
- },
- dragStop: function( draggable, event ) {
- draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );
- // Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
- if ( !draggable.options.refreshPositions ) {
- $.ui.ddmanager.prepareOffsets( draggable, event );
- }
- }
-};
-
-var droppable = $.ui.droppable;
-
-
-/*!
- * jQuery UI Effects 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/category/effects-core/
- */
-
-
-var dataSpace = "ui-effects-",
-
- // Create a local jQuery because jQuery Color relies on it and the
- // global may not exist with AMD and a custom build (#10199)
- jQuery = $;
-
-$.effects = {
- effect: {}
-};
-
-/*!
- * jQuery Color Animations v2.1.2
- * https://github.com/jquery/jquery-color
- *
- * Copyright 2014 jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * Date: Wed Jan 16 08:47:09 2013 -0600
- */
-(function( jQuery, undefined ) {
-
- var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
-
- // plusequals test for += 100 -= 100
- rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
- // a set of RE's that can match strings and generate color tuples.
- stringParsers = [ {
- re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
- parse: function( execResult ) {
- return [
- execResult[ 1 ],
- execResult[ 2 ],
- execResult[ 3 ],
- execResult[ 4 ]
- ];
- }
- }, {
- re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
- parse: function( execResult ) {
- return [
- execResult[ 1 ] * 2.55,
- execResult[ 2 ] * 2.55,
- execResult[ 3 ] * 2.55,
- execResult[ 4 ]
- ];
- }
- }, {
- // this regex ignores A-F because it's compared against an already lowercased string
- re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
- parse: function( execResult ) {
- return [
- parseInt( execResult[ 1 ], 16 ),
- parseInt( execResult[ 2 ], 16 ),
- parseInt( execResult[ 3 ], 16 )
- ];
- }
- }, {
- // this regex ignores A-F because it's compared against an already lowercased string
- re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
- parse: function( execResult ) {
- return [
- parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
- parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
- parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
- ];
- }
- }, {
- re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
- space: "hsla",
- parse: function( execResult ) {
- return [
- execResult[ 1 ],
- execResult[ 2 ] / 100,
- execResult[ 3 ] / 100,
- execResult[ 4 ]
- ];
- }
- } ],
-
- // jQuery.Color( )
- color = jQuery.Color = function( color, green, blue, alpha ) {
- return new jQuery.Color.fn.parse( color, green, blue, alpha );
- },
- spaces = {
- rgba: {
- props: {
- red: {
- idx: 0,
- type: "byte"
- },
- green: {
- idx: 1,
- type: "byte"
- },
- blue: {
- idx: 2,
- type: "byte"
- }
- }
- },
-
- hsla: {
- props: {
- hue: {
- idx: 0,
- type: "degrees"
- },
- saturation: {
- idx: 1,
- type: "percent"
- },
- lightness: {
- idx: 2,
- type: "percent"
- }
- }
- }
- },
- propTypes = {
- "byte": {
- floor: true,
- max: 255
- },
- "percent": {
- max: 1
- },
- "degrees": {
- mod: 360,
- floor: true
- }
- },
- support = color.support = {},
-
- // element for support tests
- supportElem = jQuery( "<p>" )[ 0 ],
-
- // colors = jQuery.Color.names
- colors,
-
- // local aliases of functions called often
- each = jQuery.each;
-
-// determine rgba support immediately
-supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
-support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
-
-// define cache name and alpha properties
-// for rgba and hsla spaces
-each( spaces, function( spaceName, space ) {
- space.cache = "_" + spaceName;
- space.props.alpha = {
- idx: 3,
- type: "percent",
- def: 1
- };
-});
-
-function clamp( value, prop, allowEmpty ) {
- var type = propTypes[ prop.type ] || {};
-
- if ( value == null ) {
- return (allowEmpty || !prop.def) ? null : prop.def;
- }
-
- // ~~ is an short way of doing floor for positive numbers
- value = type.floor ? ~~value : parseFloat( value );
-
- // IE will pass in empty strings as value for alpha,
- // which will hit this case
- if ( isNaN( value ) ) {
- return prop.def;
- }
-
- if ( type.mod ) {
- // we add mod before modding to make sure that negatives values
- // get converted properly: -10 -> 350
- return (value + type.mod) % type.mod;
- }
-
- // for now all property types without mod have min and max
- return 0 > value ? 0 : type.max < value ? type.max : value;
-}
-
-function stringParse( string ) {
- var inst = color(),
- rgba = inst._rgba = [];
-
- string = string.toLowerCase();
-
- each( stringParsers, function( i, parser ) {
- var parsed,
- match = parser.re.exec( string ),
- values = match && parser.parse( match ),
- spaceName = parser.space || "rgba";
-
- if ( values ) {
- parsed = inst[ spaceName ]( values );
-
- // if this was an rgba parse the assignment might happen twice
- // oh well....
- inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
- rgba = inst._rgba = parsed._rgba;
-
- // exit each( stringParsers ) here because we matched
- return false;
- }
- });
-
- // Found a stringParser that handled it
- if ( rgba.length ) {
-
- // if this came from a parsed string, force "transparent" when alpha is 0
- // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
- if ( rgba.join() === "0,0,0,0" ) {
- jQuery.extend( rgba, colors.transparent );
- }
- return inst;
- }
-
- // named colors
- return colors[ string ];
-}
-
-color.fn = jQuery.extend( color.prototype, {
- parse: function( red, green, blue, alpha ) {
- if ( red === undefined ) {
- this._rgba = [ null, null, null, null ];
- return this;
- }
- if ( red.jquery || red.nodeType ) {
- red = jQuery( red ).css( green );
- green = undefined;
- }
-
- var inst = this,
- type = jQuery.type( red ),
- rgba = this._rgba = [];
-
- // more than 1 argument specified - assume ( red, green, blue, alpha )
- if ( green !== undefined ) {
- red = [ red, green, blue, alpha ];
- type = "array";
- }
-
- if ( type === "string" ) {
- return this.parse( stringParse( red ) || colors._default );
- }
-
- if ( type === "array" ) {
- each( spaces.rgba.props, function( key, prop ) {
- rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
- });
- return this;
- }
-
- if ( type === "object" ) {
- if ( red instanceof color ) {
- each( spaces, function( spaceName, space ) {
- if ( red[ space.cache ] ) {
- inst[ space.cache ] = red[ space.cache ].slice();
- }
- });
- } else {
- each( spaces, function( spaceName, space ) {
- var cache = space.cache;
- each( space.props, function( key, prop ) {
-
- // if the cache doesn't exist, and we know how to convert
- if ( !inst[ cache ] && space.to ) {
-
- // if the value was null, we don't need to copy it
- // if the key was alpha, we don't need to copy it either
- if ( key === "alpha" || red[ key ] == null ) {
- return;
- }
- inst[ cache ] = space.to( inst._rgba );
- }
-
- // this is the only case where we allow nulls for ALL properties.
- // call clamp with alwaysAllowEmpty
- inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
- });
-
- // everything defined but alpha?
- if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
- // use the default of 1
- inst[ cache ][ 3 ] = 1;
- if ( space.from ) {
- inst._rgba = space.from( inst[ cache ] );
- }
- }
- });
- }
- return this;
- }
- },
- is: function( compare ) {
- var is = color( compare ),
- same = true,
- inst = this;
-
- each( spaces, function( _, space ) {
- var localCache,
- isCache = is[ space.cache ];
- if (isCache) {
- localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
- each( space.props, function( _, prop ) {
- if ( isCache[ prop.idx ] != null ) {
- same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
- return same;
- }
- });
- }
- return same;
- });
- return same;
- },
- _space: function() {
- var used = [],
- inst = this;
- each( spaces, function( spaceName, space ) {
- if ( inst[ space.cache ] ) {
- used.push( spaceName );
- }
- });
- return used.pop();
- },
- transition: function( other, distance ) {
- var end = color( other ),
- spaceName = end._space(),
- space = spaces[ spaceName ],
- startColor = this.alpha() === 0 ? color( "transparent" ) : this,
- start = startColor[ space.cache ] || space.to( startColor._rgba ),
- result = start.slice();
-
- end = end[ space.cache ];
- each( space.props, function( key, prop ) {
- var index = prop.idx,
- startValue = start[ index ],
- endValue = end[ index ],
- type = propTypes[ prop.type ] || {};
-
- // if null, don't override start value
- if ( endValue === null ) {
- return;
- }
- // if null - use end
- if ( startValue === null ) {
- result[ index ] = endValue;
- } else {
- if ( type.mod ) {
- if ( endValue - startValue > type.mod / 2 ) {
- startValue += type.mod;
- } else if ( startValue - endValue > type.mod / 2 ) {
- startValue -= type.mod;
- }
- }
- result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
- }
- });
- return this[ spaceName ]( result );
- },
- blend: function( opaque ) {
- // if we are already opaque - return ourself
- if ( this._rgba[ 3 ] === 1 ) {
- return this;
- }
-
- var rgb = this._rgba.slice(),
- a = rgb.pop(),
- blend = color( opaque )._rgba;
-
- return color( jQuery.map( rgb, function( v, i ) {
- return ( 1 - a ) * blend[ i ] + a * v;
- }));
- },
- toRgbaString: function() {
- var prefix = "rgba(",
- rgba = jQuery.map( this._rgba, function( v, i ) {
- return v == null ? ( i > 2 ? 1 : 0 ) : v;
- });
-
- if ( rgba[ 3 ] === 1 ) {
- rgba.pop();
- prefix = "rgb(";
- }
-
- return prefix + rgba.join() + ")";
- },
- toHslaString: function() {
- var prefix = "hsla(",
- hsla = jQuery.map( this.hsla(), function( v, i ) {
- if ( v == null ) {
- v = i > 2 ? 1 : 0;
- }
-
- // catch 1 and 2
- if ( i && i < 3 ) {
- v = Math.round( v * 100 ) + "%";
- }
- return v;
- });
-
- if ( hsla[ 3 ] === 1 ) {
- hsla.pop();
- prefix = "hsl(";
- }
- return prefix + hsla.join() + ")";
- },
- toHexString: function( includeAlpha ) {
- var rgba = this._rgba.slice(),
- alpha = rgba.pop();
-
- if ( includeAlpha ) {
- rgba.push( ~~( alpha * 255 ) );
- }
-
- return "#" + jQuery.map( rgba, function( v ) {
-
- // default to 0 when nulls exist
- v = ( v || 0 ).toString( 16 );
- return v.length === 1 ? "0" + v : v;
- }).join("");
- },
- toString: function() {
- return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
- }
-});
-color.fn.parse.prototype = color.fn;
-
-// hsla conversions adapted from:
-// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
-
-function hue2rgb( p, q, h ) {
- h = ( h + 1 ) % 1;
- if ( h * 6 < 1 ) {
- return p + ( q - p ) * h * 6;
- }
- if ( h * 2 < 1) {
- return q;
- }
- if ( h * 3 < 2 ) {
- return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6;
- }
- return p;
-}
-
-spaces.hsla.to = function( rgba ) {
- if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
- return [ null, null, null, rgba[ 3 ] ];
- }
- var r = rgba[ 0 ] / 255,
- g = rgba[ 1 ] / 255,
- b = rgba[ 2 ] / 255,
- a = rgba[ 3 ],
- max = Math.max( r, g, b ),
- min = Math.min( r, g, b ),
- diff = max - min,
- add = max + min,
- l = add * 0.5,
- h, s;
-
- if ( min === max ) {
- h = 0;
- } else if ( r === max ) {
- h = ( 60 * ( g - b ) / diff ) + 360;
- } else if ( g === max ) {
- h = ( 60 * ( b - r ) / diff ) + 120;
- } else {
- h = ( 60 * ( r - g ) / diff ) + 240;
- }
-
- // chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
- // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
- if ( diff === 0 ) {
- s = 0;
- } else if ( l <= 0.5 ) {
- s = diff / add;
- } else {
- s = diff / ( 2 - add );
- }
- return [ Math.round(h) % 360, s, l, a == null ? 1 : a ];
-};
-
-spaces.hsla.from = function( hsla ) {
- if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
- return [ null, null, null, hsla[ 3 ] ];
- }
- var h = hsla[ 0 ] / 360,
- s = hsla[ 1 ],
- l = hsla[ 2 ],
- a = hsla[ 3 ],
- q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
- p = 2 * l - q;
-
- return [
- Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
- Math.round( hue2rgb( p, q, h ) * 255 ),
- Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
- a
- ];
-};
-
-each( spaces, function( spaceName, space ) {
- var props = space.props,
- cache = space.cache,
- to = space.to,
- from = space.from;
-
- // makes rgba() and hsla()
- color.fn[ spaceName ] = function( value ) {
-
- // generate a cache for this space if it doesn't exist
- if ( to && !this[ cache ] ) {
- this[ cache ] = to( this._rgba );
- }
- if ( value === undefined ) {
- return this[ cache ].slice();
- }
-
- var ret,
- type = jQuery.type( value ),
- arr = ( type === "array" || type === "object" ) ? value : arguments,
- local = this[ cache ].slice();
-
- each( props, function( key, prop ) {
- var val = arr[ type === "object" ? key : prop.idx ];
- if ( val == null ) {
- val = local[ prop.idx ];
- }
- local[ prop.idx ] = clamp( val, prop );
- });
-
- if ( from ) {
- ret = color( from( local ) );
- ret[ cache ] = local;
- return ret;
- } else {
- return color( local );
- }
- };
-
- // makes red() green() blue() alpha() hue() saturation() lightness()
- each( props, function( key, prop ) {
- // alpha is included in more than one space
- if ( color.fn[ key ] ) {
- return;
- }
- color.fn[ key ] = function( value ) {
- var vtype = jQuery.type( value ),
- fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ),
- local = this[ fn ](),
- cur = local[ prop.idx ],
- match;
-
- if ( vtype === "undefined" ) {
- return cur;
- }
-
- if ( vtype === "function" ) {
- value = value.call( this, cur );
- vtype = jQuery.type( value );
- }
- if ( value == null && prop.empty ) {
- return this;
- }
- if ( vtype === "string" ) {
- match = rplusequals.exec( value );
- if ( match ) {
- value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
- }
- }
- local[ prop.idx ] = value;
- return this[ fn ]( local );
- };
- });
-});
-
-// add cssHook and .fx.step function for each named hook.
-// accept a space separated string of properties
-color.hook = function( hook ) {
- var hooks = hook.split( " " );
- each( hooks, function( i, hook ) {
- jQuery.cssHooks[ hook ] = {
- set: function( elem, value ) {
- var parsed, curElem,
- backgroundColor = "";
-
- if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) {
- value = color( parsed || value );
- if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
- curElem = hook === "backgroundColor" ? elem.parentNode : elem;
- while (
- (backgroundColor === "" || backgroundColor === "transparent") &&
- curElem && curElem.style
- ) {
- try {
- backgroundColor = jQuery.css( curElem, "backgroundColor" );
- curElem = curElem.parentNode;
- } catch ( e ) {
- }
- }
-
- value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
- backgroundColor :
- "_default" );
- }
-
- value = value.toRgbaString();
- }
- try {
- elem.style[ hook ] = value;
- } catch ( e ) {
- // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit'
- }
- }
- };
- jQuery.fx.step[ hook ] = function( fx ) {
- if ( !fx.colorInit ) {
- fx.start = color( fx.elem, hook );
- fx.end = color( fx.end );
- fx.colorInit = true;
- }
- jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
- };
- });
-
-};
-
-color.hook( stepHooks );
-
-jQuery.cssHooks.borderColor = {
- expand: function( value ) {
- var expanded = {};
-
- each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
- expanded[ "border" + part + "Color" ] = value;
- });
- return expanded;
- }
-};
-
-// Basic color names only.
-// Usage of any of the other color names requires adding yourself or including
-// jquery.color.svg-names.js.
-colors = jQuery.Color.names = {
- // 4.1. Basic color keywords
- aqua: "#00ffff",
- black: "#000000",
- blue: "#0000ff",
- fuchsia: "#ff00ff",
- gray: "#808080",
- green: "#008000",
- lime: "#00ff00",
- maroon: "#800000",
- navy: "#000080",
- olive: "#808000",
- purple: "#800080",
- red: "#ff0000",
- silver: "#c0c0c0",
- teal: "#008080",
- white: "#ffffff",
- yellow: "#ffff00",
-
- // 4.2.3. "transparent" color keyword
- transparent: [ null, null, null, 0 ],
-
- _default: "#ffffff"
-};
-
-})( jQuery );
-
-/******************************************************************************/
-/****************************** CLASS ANIMATIONS ******************************/
-/******************************************************************************/
-(function() {
-
-var classAnimationActions = [ "add", "remove", "toggle" ],
- shorthandStyles = {
- border: 1,
- borderBottom: 1,
- borderColor: 1,
- borderLeft: 1,
- borderRight: 1,
- borderTop: 1,
- borderWidth: 1,
- margin: 1,
- padding: 1
- };
-
-$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) {
- $.fx.step[ prop ] = function( fx ) {
- if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
- jQuery.style( fx.elem, prop, fx.end );
- fx.setAttr = true;
- }
- };
-});
-
-function getElementStyles( elem ) {
- var key, len,
- style = elem.ownerDocument.defaultView ?
- elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
- elem.currentStyle,
- styles = {};
-
- if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
- len = style.length;
- while ( len-- ) {
- key = style[ len ];
- if ( typeof style[ key ] === "string" ) {
- styles[ $.camelCase( key ) ] = style[ key ];
- }
- }
- // support: Opera, IE <9
- } else {
- for ( key in style ) {
- if ( typeof style[ key ] === "string" ) {
- styles[ key ] = style[ key ];
- }
- }
- }
-
- return styles;
-}
-
-function styleDifference( oldStyle, newStyle ) {
- var diff = {},
- name, value;
-
- for ( name in newStyle ) {
- value = newStyle[ name ];
- if ( oldStyle[ name ] !== value ) {
- if ( !shorthandStyles[ name ] ) {
- if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {
- diff[ name ] = value;
- }
- }
- }
- }
-
- return diff;
-}
-
-// support: jQuery <1.8
-if ( !$.fn.addBack ) {
- $.fn.addBack = function( selector ) {
- return this.add( selector == null ?
- this.prevObject : this.prevObject.filter( selector )
- );
- };
-}
-
-$.effects.animateClass = function( value, duration, easing, callback ) {
- var o = $.speed( duration, easing, callback );
-
- return this.queue( function() {
- var animated = $( this ),
- baseClass = animated.attr( "class" ) || "",
- applyClassChange,
- allAnimations = o.children ? animated.find( "*" ).addBack() : animated;
-
- // map the animated objects to store the original styles.
- allAnimations = allAnimations.map(function() {
- var el = $( this );
- return {
- el: el,
- start: getElementStyles( this )
- };
- });
-
- // apply class change
- applyClassChange = function() {
- $.each( classAnimationActions, function(i, action) {
- if ( value[ action ] ) {
- animated[ action + "Class" ]( value[ action ] );
- }
- });
- };
- applyClassChange();
-
- // map all animated objects again - calculate new styles and diff
- allAnimations = allAnimations.map(function() {
- this.end = getElementStyles( this.el[ 0 ] );
- this.diff = styleDifference( this.start, this.end );
- return this;
- });
-
- // apply original class
- animated.attr( "class", baseClass );
-
- // map all animated objects again - this time collecting a promise
- allAnimations = allAnimations.map(function() {
- var styleInfo = this,
- dfd = $.Deferred(),
- opts = $.extend({}, o, {
- queue: false,
- complete: function() {
- dfd.resolve( styleInfo );
- }
- });
-
- this.el.animate( this.diff, opts );
- return dfd.promise();
- });
-
- // once all animations have completed:
- $.when.apply( $, allAnimations.get() ).done(function() {
-
- // set the final class
- applyClassChange();
-
- // for each animated element,
- // clear all css properties that were animated
- $.each( arguments, function() {
- var el = this.el;
- $.each( this.diff, function(key) {
- el.css( key, "" );
- });
- });
-
- // this is guarnteed to be there if you use jQuery.speed()
- // it also handles dequeuing the next anim...
- o.complete.call( animated[ 0 ] );
- });
- });
-};
-
-$.fn.extend({
- addClass: (function( orig ) {
- return function( classNames, speed, easing, callback ) {
- return speed ?
- $.effects.animateClass.call( this,
- { add: classNames }, speed, easing, callback ) :
- orig.apply( this, arguments );
- };
- })( $.fn.addClass ),
-
- removeClass: (function( orig ) {
- return function( classNames, speed, easing, callback ) {
- return arguments.length > 1 ?
- $.effects.animateClass.call( this,
- { remove: classNames }, speed, easing, callback ) :
- orig.apply( this, arguments );
- };
- })( $.fn.removeClass ),
-
- toggleClass: (function( orig ) {
- return function( classNames, force, speed, easing, callback ) {
- if ( typeof force === "boolean" || force === undefined ) {
- if ( !speed ) {
- // without speed parameter
- return orig.apply( this, arguments );
- } else {
- return $.effects.animateClass.call( this,
- (force ? { add: classNames } : { remove: classNames }),
- speed, easing, callback );
- }
- } else {
- // without force parameter
- return $.effects.animateClass.call( this,
- { toggle: classNames }, force, speed, easing );
- }
- };
- })( $.fn.toggleClass ),
-
- switchClass: function( remove, add, speed, easing, callback) {
- return $.effects.animateClass.call( this, {
- add: add,
- remove: remove
- }, speed, easing, callback );
- }
-});
-
-})();
-
-/******************************************************************************/
-/*********************************** EFFECTS **********************************/
-/******************************************************************************/
-
-(function() {
-
-$.extend( $.effects, {
- version: "1.11.4",
-
- // Saves a set of properties in a data storage
- save: function( element, set ) {
- for ( var i = 0; i < set.length; i++ ) {
- if ( set[ i ] !== null ) {
- element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
- }
- }
- },
-
- // Restores a set of previously saved properties from a data storage
- restore: function( element, set ) {
- var val, i;
- for ( i = 0; i < set.length; i++ ) {
- if ( set[ i ] !== null ) {
- val = element.data( dataSpace + set[ i ] );
- // support: jQuery 1.6.2
- // http://bugs.jquery.com/ticket/9917
- // jQuery 1.6.2 incorrectly returns undefined for any falsy value.
- // We can't differentiate between "" and 0 here, so we just assume
- // empty string since it's likely to be a more common value...
- if ( val === undefined ) {
- val = "";
- }
- element.css( set[ i ], val );
- }
- }
- },
-
- setMode: function( el, mode ) {
- if (mode === "toggle") {
- mode = el.is( ":hidden" ) ? "show" : "hide";
- }
- return mode;
- },
-
- // Translates a [top,left] array into a baseline value
- // this should be a little more flexible in the future to handle a string & hash
- getBaseline: function( origin, original ) {
- var y, x;
- switch ( origin[ 0 ] ) {
- case "top": y = 0; break;
- case "middle": y = 0.5; break;
- case "bottom": y = 1; break;
- default: y = origin[ 0 ] / original.height;
- }
- switch ( origin[ 1 ] ) {
- case "left": x = 0; break;
- case "center": x = 0.5; break;
- case "right": x = 1; break;
- default: x = origin[ 1 ] / original.width;
- }
- return {
- x: x,
- y: y
- };
- },
-
- // Wraps the element around a wrapper that copies position properties
- createWrapper: function( element ) {
-
- // if the element is already wrapped, return it
- if ( element.parent().is( ".ui-effects-wrapper" )) {
- return element.parent();
- }
-
- // wrap the element
- var props = {
- width: element.outerWidth(true),
- height: element.outerHeight(true),
- "float": element.css( "float" )
- },
- wrapper = $( "<div></div>" )
- .addClass( "ui-effects-wrapper" )
- .css({
- fontSize: "100%",
- background: "transparent",
- border: "none",
- margin: 0,
- padding: 0
- }),
- // Store the size in case width/height are defined in % - Fixes #5245
- size = {
- width: element.width(),
- height: element.height()
- },
- active = document.activeElement;
-
- // support: Firefox
- // Firefox incorrectly exposes anonymous content
- // https://bugzilla.mozilla.org/show_bug.cgi?id=561664
- try {
- active.id;
- } catch ( e ) {
- active = document.body;
- }
-
- element.wrap( wrapper );
-
- // Fixes #7595 - Elements lose focus when wrapped.
- if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
- $( active ).focus();
- }
-
- wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element
-
- // transfer positioning properties to the wrapper
- if ( element.css( "position" ) === "static" ) {
- wrapper.css({ position: "relative" });
- element.css({ position: "relative" });
- } else {
- $.extend( props, {
- position: element.css( "position" ),
- zIndex: element.css( "z-index" )
- });
- $.each([ "top", "left", "bottom", "right" ], function(i, pos) {
- props[ pos ] = element.css( pos );
- if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
- props[ pos ] = "auto";
- }
- });
- element.css({
- position: "relative",
- top: 0,
- left: 0,
- right: "auto",
- bottom: "auto"
- });
- }
- element.css(size);
-
- return wrapper.css( props ).show();
- },
-
- removeWrapper: function( element ) {
- var active = document.activeElement;
-
- if ( element.parent().is( ".ui-effects-wrapper" ) ) {
- element.parent().replaceWith( element );
-
- // Fixes #7595 - Elements lose focus when wrapped.
- if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
- $( active ).focus();
- }
- }
-
- return element;
- },
-
- setTransition: function( element, list, factor, value ) {
- value = value || {};
- $.each( list, function( i, x ) {
- var unit = element.cssUnit( x );
- if ( unit[ 0 ] > 0 ) {
- value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
- }
- });
- return value;
- }
-});
-
-// return an effect options object for the given parameters:
-function _normalizeArguments( effect, options, speed, callback ) {
-
- // allow passing all options as the first parameter
- if ( $.isPlainObject( effect ) ) {
- options = effect;
- effect = effect.effect;
- }
-
- // convert to an object
- effect = { effect: effect };
-
- // catch (effect, null, ...)
- if ( options == null ) {
- options = {};
- }
-
- // catch (effect, callback)
- if ( $.isFunction( options ) ) {
- callback = options;
- speed = null;
- options = {};
- }
-
- // catch (effect, speed, ?)
- if ( typeof options === "number" || $.fx.speeds[ options ] ) {
- callback = speed;
- speed = options;
- options = {};
- }
-
- // catch (effect, options, callback)
- if ( $.isFunction( speed ) ) {
- callback = speed;
- speed = null;
- }
-
- // add options to effect
- if ( options ) {
- $.extend( effect, options );
- }
-
- speed = speed || options.duration;
- effect.duration = $.fx.off ? 0 :
- typeof speed === "number" ? speed :
- speed in $.fx.speeds ? $.fx.speeds[ speed ] :
- $.fx.speeds._default;
-
- effect.complete = callback || options.complete;
-
- return effect;
-}
-
-function standardAnimationOption( option ) {
- // Valid standard speeds (nothing, number, named speed)
- if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) {
- return true;
- }
-
- // Invalid strings - treat as "normal" speed
- if ( typeof option === "string" && !$.effects.effect[ option ] ) {
- return true;
- }
-
- // Complete callback
- if ( $.isFunction( option ) ) {
- return true;
- }
-
- // Options hash (but not naming an effect)
- if ( typeof option === "object" && !option.effect ) {
- return true;
- }
-
- // Didn't match any standard API
- return false;
-}
-
-$.fn.extend({
- effect: function( /* effect, options, speed, callback */ ) {
- var args = _normalizeArguments.apply( this, arguments ),
- mode = args.mode,
- queue = args.queue,
- effectMethod = $.effects.effect[ args.effect ];
-
- if ( $.fx.off || !effectMethod ) {
- // delegate to the original method (e.g., .show()) if possible
- if ( mode ) {
- return this[ mode ]( args.duration, args.complete );
- } else {
- return this.each( function() {
- if ( args.complete ) {
- args.complete.call( this );
- }
- });
- }
- }
-
- function run( next ) {
- var elem = $( this ),
- complete = args.complete,
- mode = args.mode;
-
- function done() {
- if ( $.isFunction( complete ) ) {
- complete.call( elem[0] );
- }
- if ( $.isFunction( next ) ) {
- next();
- }
- }
-
- // If the element already has the correct final state, delegate to
- // the core methods so the internal tracking of "olddisplay" works.
- if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
- elem[ mode ]();
- done();
- } else {
- effectMethod.call( elem[0], args, done );
- }
- }
-
- return queue === false ? this.each( run ) : this.queue( queue || "fx", run );
- },
-
- show: (function( orig ) {
- return function( option ) {
- if ( standardAnimationOption( option ) ) {
- return orig.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "show";
- return this.effect.call( this, args );
- }
- };
- })( $.fn.show ),
-
- hide: (function( orig ) {
- return function( option ) {
- if ( standardAnimationOption( option ) ) {
- return orig.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "hide";
- return this.effect.call( this, args );
- }
- };
- })( $.fn.hide ),
-
- toggle: (function( orig ) {
- return function( option ) {
- if ( standardAnimationOption( option ) || typeof option === "boolean" ) {
- return orig.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "toggle";
- return this.effect.call( this, args );
- }
- };
- })( $.fn.toggle ),
-
- // helper functions
- cssUnit: function(key) {
- var style = this.css( key ),
- val = [];
-
- $.each( [ "em", "px", "%", "pt" ], function( i, unit ) {
- if ( style.indexOf( unit ) > 0 ) {
- val = [ parseFloat( style ), unit ];
- }
- });
- return val;
- }
-});
-
-})();
-
-/******************************************************************************/
-/*********************************** EASING ***********************************/
-/******************************************************************************/
-
-(function() {
-
-// based on easing equations from Robert Penner (http://www.robertpenner.com/easing)
-
-var baseEasings = {};
-
-$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
- baseEasings[ name ] = function( p ) {
- return Math.pow( p, i + 2 );
- };
-});
-
-$.extend( baseEasings, {
- Sine: function( p ) {
- return 1 - Math.cos( p * Math.PI / 2 );
- },
- Circ: function( p ) {
- return 1 - Math.sqrt( 1 - p * p );
- },
- Elastic: function( p ) {
- return p === 0 || p === 1 ? p :
- -Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 );
- },
- Back: function( p ) {
- return p * p * ( 3 * p - 2 );
- },
- Bounce: function( p ) {
- var pow2,
- bounce = 4;
-
- while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
- return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
- }
-});
-
-$.each( baseEasings, function( name, easeIn ) {
- $.easing[ "easeIn" + name ] = easeIn;
- $.easing[ "easeOut" + name ] = function( p ) {
- return 1 - easeIn( 1 - p );
- };
- $.easing[ "easeInOut" + name ] = function( p ) {
- return p < 0.5 ?
- easeIn( p * 2 ) / 2 :
- 1 - easeIn( p * -2 + 2 ) / 2;
- };
-});
-
-})();
-
-var effect = $.effects;
-
-
-/*!
- * jQuery UI Effects Blind 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/blind-effect/
- */
-
-
-var effectBlind = $.effects.effect.blind = function( o, done ) {
- // Create element
- var el = $( this ),
- rvertical = /up|down|vertical/,
- rpositivemotion = /up|left|vertical|horizontal/,
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- direction = o.direction || "up",
- vertical = rvertical.test( direction ),
- ref = vertical ? "height" : "width",
- ref2 = vertical ? "top" : "left",
- motion = rpositivemotion.test( direction ),
- animation = {},
- show = mode === "show",
- wrapper, distance, margin;
-
- // if already wrapped, the wrapper's properties are my property. #6245
- if ( el.parent().is( ".ui-effects-wrapper" ) ) {
- $.effects.save( el.parent(), props );
- } else {
- $.effects.save( el, props );
- }
- el.show();
- wrapper = $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
-
- distance = wrapper[ ref ]();
- margin = parseFloat( wrapper.css( ref2 ) ) || 0;
-
- animation[ ref ] = show ? distance : 0;
- if ( !motion ) {
- el
- .css( vertical ? "bottom" : "right", 0 )
- .css( vertical ? "top" : "left", "auto" )
- .css({ position: "absolute" });
-
- animation[ ref2 ] = show ? margin : distance + margin;
- }
-
- // start at 0 if we are showing
- if ( show ) {
- wrapper.css( ref, 0 );
- if ( !motion ) {
- wrapper.css( ref2, margin + distance );
- }
- }
-
- // Animate
- wrapper.animate( animation, {
- duration: o.duration,
- easing: o.easing,
- queue: false,
- complete: function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-};
-
-
-/*!
- * jQuery UI Effects Bounce 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/bounce-effect/
- */
-
-
-var effectBounce = $.effects.effect.bounce = function( o, done ) {
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
-
- // defaults:
- mode = $.effects.setMode( el, o.mode || "effect" ),
- hide = mode === "hide",
- show = mode === "show",
- direction = o.direction || "up",
- distance = o.distance,
- times = o.times || 5,
-
- // number of internal animations
- anims = times * 2 + ( show || hide ? 1 : 0 ),
- speed = o.duration / anims,
- easing = o.easing,
-
- // utility:
- ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
- motion = ( direction === "up" || direction === "left" ),
- i,
- upAnim,
- downAnim,
-
- // we will need to re-assemble the queue to stack our animations in place
- queue = el.queue(),
- queuelen = queue.length;
-
- // Avoid touching opacity to prevent clearType and PNG issues in IE
- if ( show || hide ) {
- props.push( "opacity" );
- }
-
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el ); // Create Wrapper
-
- // default distance for the BIGGEST bounce is the outer Distance / 3
- if ( !distance ) {
- distance = el[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3;
- }
-
- if ( show ) {
- downAnim = { opacity: 1 };
- downAnim[ ref ] = 0;
-
- // if we are showing, force opacity 0 and set the initial position
- // then do the "first" animation
- el.css( "opacity", 0 )
- .css( ref, motion ? -distance * 2 : distance * 2 )
- .animate( downAnim, speed, easing );
- }
-
- // start at the smallest distance if we are hiding
- if ( hide ) {
- distance = distance / Math.pow( 2, times - 1 );
- }
-
- downAnim = {};
- downAnim[ ref ] = 0;
- // Bounces up/down/left/right then back to 0 -- times * 2 animations happen here
- for ( i = 0; i < times; i++ ) {
- upAnim = {};
- upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
-
- el.animate( upAnim, speed, easing )
- .animate( downAnim, speed, easing );
-
- distance = hide ? distance * 2 : distance / 2;
- }
-
- // Last Bounce when Hiding
- if ( hide ) {
- upAnim = { opacity: 0 };
- upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
-
- el.animate( upAnim, speed, easing );
- }
-
- el.queue(function() {
- if ( hide ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- });
-
- // inject all the animations we just queued to be first in line (after "inprogress")
- if ( queuelen > 1) {
- queue.splice.apply( queue,
- [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
- }
- el.dequeue();
-
-};
-
-
-/*!
- * jQuery UI Effects Clip 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/clip-effect/
- */
-
-
-var effectClip = $.effects.effect.clip = function( o, done ) {
- // Create element
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
- direction = o.direction || "vertical",
- vert = direction === "vertical",
- size = vert ? "height" : "width",
- position = vert ? "top" : "left",
- animation = {},
- wrapper, animate, distance;
-
- // Save & Show
- $.effects.save( el, props );
- el.show();
-
- // Create Wrapper
- wrapper = $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
- animate = ( el[0].tagName === "IMG" ) ? wrapper : el;
- distance = animate[ size ]();
-
- // Shift
- if ( show ) {
- animate.css( size, 0 );
- animate.css( position, distance / 2 );
- }
-
- // Create Animation Object:
- animation[ size ] = show ? distance : 0;
- animation[ position ] = show ? 0 : distance / 2;
-
- // Animate
- animate.animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( !show ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-
-};
-
-
-/*!
- * jQuery UI Effects Drop 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/drop-effect/
- */
-
-
-var effectDrop = $.effects.effect.drop = function( o, done ) {
-
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "opacity", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
- direction = o.direction || "left",
- ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
- motion = ( direction === "up" || direction === "left" ) ? "pos" : "neg",
- animation = {
- opacity: show ? 1 : 0
- },
- distance;
-
- // Adjust
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el );
-
- distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ) / 2;
-
- if ( show ) {
- el
- .css( "opacity", 0 )
- .css( ref, motion === "pos" ? -distance : distance );
- }
-
- // Animation
- animation[ ref ] = ( show ?
- ( motion === "pos" ? "+=" : "-=" ) :
- ( motion === "pos" ? "-=" : "+=" ) ) +
- distance;
-
- // Animate
- el.animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-};
-
-
-/*!
- * jQuery UI Effects Explode 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/explode-effect/
- */
-
-
-var effectExplode = $.effects.effect.explode = function( o, done ) {
-
- var rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3,
- cells = rows,
- el = $( this ),
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
-
- // show and then visibility:hidden the element before calculating offset
- offset = el.show().css( "visibility", "hidden" ).offset(),
-
- // width and height of a piece
- width = Math.ceil( el.outerWidth() / cells ),
- height = Math.ceil( el.outerHeight() / rows ),
- pieces = [],
-
- // loop
- i, j, left, top, mx, my;
-
- // children animate complete:
- function childComplete() {
- pieces.push( this );
- if ( pieces.length === rows * cells ) {
- animComplete();
- }
- }
-
- // clone the element for each row and cell.
- for ( i = 0; i < rows ; i++ ) { // ===>
- top = offset.top + i * height;
- my = i - ( rows - 1 ) / 2 ;
-
- for ( j = 0; j < cells ; j++ ) { // |||
- left = offset.left + j * width;
- mx = j - ( cells - 1 ) / 2 ;
-
- // Create a clone of the now hidden main element that will be absolute positioned
- // within a wrapper div off the -left and -top equal to size of our pieces
- el
- .clone()
- .appendTo( "body" )
- .wrap( "<div></div>" )
- .css({
- position: "absolute",
- visibility: "visible",
- left: -j * width,
- top: -i * height
- })
-
- // select the wrapper - make it overflow: hidden and absolute positioned based on
- // where the original was located +left and +top equal to the size of pieces
- .parent()
- .addClass( "ui-effects-explode" )
- .css({
- position: "absolute",
- overflow: "hidden",
- width: width,
- height: height,
- left: left + ( show ? mx * width : 0 ),
- top: top + ( show ? my * height : 0 ),
- opacity: show ? 0 : 1
- }).animate({
- left: left + ( show ? 0 : mx * width ),
- top: top + ( show ? 0 : my * height ),
- opacity: show ? 1 : 0
- }, o.duration || 500, o.easing, childComplete );
- }
- }
-
- function animComplete() {
- el.css({
- visibility: "visible"
- });
- $( pieces ).remove();
- if ( !show ) {
- el.hide();
- }
- done();
- }
-};
-
-
-/*!
- * jQuery UI Effects Fade 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/fade-effect/
- */
-
-
-var effectFade = $.effects.effect.fade = function( o, done ) {
- var el = $( this ),
- mode = $.effects.setMode( el, o.mode || "toggle" );
-
- el.animate({
- opacity: mode
- }, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: done
- });
-};
-
-
-/*!
- * jQuery UI Effects Fold 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/fold-effect/
- */
-
-
-var effectFold = $.effects.effect.fold = function( o, done ) {
-
- // Create element
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
- hide = mode === "hide",
- size = o.size || 15,
- percent = /([0-9]+)%/.exec( size ),
- horizFirst = !!o.horizFirst,
- widthFirst = show !== horizFirst,
- ref = widthFirst ? [ "width", "height" ] : [ "height", "width" ],
- duration = o.duration / 2,
- wrapper, distance,
- animation1 = {},
- animation2 = {};
-
- $.effects.save( el, props );
- el.show();
-
- // Create Wrapper
- wrapper = $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
- distance = widthFirst ?
- [ wrapper.width(), wrapper.height() ] :
- [ wrapper.height(), wrapper.width() ];
-
- if ( percent ) {
- size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];
- }
- if ( show ) {
- wrapper.css( horizFirst ? {
- height: 0,
- width: size
- } : {
- height: size,
- width: 0
- });
- }
-
- // Animation
- animation1[ ref[ 0 ] ] = show ? distance[ 0 ] : size;
- animation2[ ref[ 1 ] ] = show ? distance[ 1 ] : 0;
-
- // Animate
- wrapper
- .animate( animation1, duration, o.easing )
- .animate( animation2, duration, o.easing, function() {
- if ( hide ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- });
-
-};
-
-
-/*!
- * jQuery UI Effects Highlight 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/highlight-effect/
- */
-
-
-var effectHighlight = $.effects.effect.highlight = function( o, done ) {
- var elem = $( this ),
- props = [ "backgroundImage", "backgroundColor", "opacity" ],
- mode = $.effects.setMode( elem, o.mode || "show" ),
- animation = {
- backgroundColor: elem.css( "backgroundColor" )
- };
-
- if (mode === "hide") {
- animation.opacity = 0;
- }
-
- $.effects.save( elem, props );
-
- elem
- .show()
- .css({
- backgroundImage: "none",
- backgroundColor: o.color || "#ffff99"
- })
- .animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( mode === "hide" ) {
- elem.hide();
- }
- $.effects.restore( elem, props );
- done();
- }
- });
-};
-
-
-/*!
- * jQuery UI Effects Size 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/size-effect/
- */
-
-
-var effectSize = $.effects.effect.size = function( o, done ) {
-
- // Create element
- var original, baseline, factor,
- el = $( this ),
- props0 = [ "position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity" ],
-
- // Always restore
- props1 = [ "position", "top", "bottom", "left", "right", "overflow", "opacity" ],
-
- // Copy for children
- props2 = [ "width", "height", "overflow" ],
- cProps = [ "fontSize" ],
- vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ],
- hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ],
-
- // Set options
- mode = $.effects.setMode( el, o.mode || "effect" ),
- restore = o.restore || mode !== "effect",
- scale = o.scale || "both",
- origin = o.origin || [ "middle", "center" ],
- position = el.css( "position" ),
- props = restore ? props0 : props1,
- zero = {
- height: 0,
- width: 0,
- outerHeight: 0,
- outerWidth: 0
- };
-
- if ( mode === "show" ) {
- el.show();
- }
- original = {
- height: el.height(),
- width: el.width(),
- outerHeight: el.outerHeight(),
- outerWidth: el.outerWidth()
- };
-
- if ( o.mode === "toggle" && mode === "show" ) {
- el.from = o.to || zero;
- el.to = o.from || original;
- } else {
- el.from = o.from || ( mode === "show" ? zero : original );
- el.to = o.to || ( mode === "hide" ? zero : original );
- }
-
- // Set scaling factor
- factor = {
- from: {
- y: el.from.height / original.height,
- x: el.from.width / original.width
- },
- to: {
- y: el.to.height / original.height,
- x: el.to.width / original.width
- }
- };
-
- // Scale the css box
- if ( scale === "box" || scale === "both" ) {
-
- // Vertical props scaling
- if ( factor.from.y !== factor.to.y ) {
- props = props.concat( vProps );
- el.from = $.effects.setTransition( el, vProps, factor.from.y, el.from );
- el.to = $.effects.setTransition( el, vProps, factor.to.y, el.to );
- }
-
- // Horizontal props scaling
- if ( factor.from.x !== factor.to.x ) {
- props = props.concat( hProps );
- el.from = $.effects.setTransition( el, hProps, factor.from.x, el.from );
- el.to = $.effects.setTransition( el, hProps, factor.to.x, el.to );
- }
- }
-
- // Scale the content
- if ( scale === "content" || scale === "both" ) {
-
- // Vertical props scaling
- if ( factor.from.y !== factor.to.y ) {
- props = props.concat( cProps ).concat( props2 );
- el.from = $.effects.setTransition( el, cProps, factor.from.y, el.from );
- el.to = $.effects.setTransition( el, cProps, factor.to.y, el.to );
- }
- }
-
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el );
- el.css( "overflow", "hidden" ).css( el.from );
-
- // Adjust
- if (origin) { // Calculate baseline shifts
- baseline = $.effects.getBaseline( origin, original );
- el.from.top = ( original.outerHeight - el.outerHeight() ) * baseline.y;
- el.from.left = ( original.outerWidth - el.outerWidth() ) * baseline.x;
- el.to.top = ( original.outerHeight - el.to.outerHeight ) * baseline.y;
- el.to.left = ( original.outerWidth - el.to.outerWidth ) * baseline.x;
- }
- el.css( el.from ); // set top & left
-
- // Animate
- if ( scale === "content" || scale === "both" ) { // Scale the children
-
- // Add margins/font-size
- vProps = vProps.concat([ "marginTop", "marginBottom" ]).concat(cProps);
- hProps = hProps.concat([ "marginLeft", "marginRight" ]);
- props2 = props0.concat(vProps).concat(hProps);
-
- el.find( "*[width]" ).each( function() {
- var child = $( this ),
- c_original = {
- height: child.height(),
- width: child.width(),
- outerHeight: child.outerHeight(),
- outerWidth: child.outerWidth()
- };
- if (restore) {
- $.effects.save(child, props2);
- }
-
- child.from = {
- height: c_original.height * factor.from.y,
- width: c_original.width * factor.from.x,
- outerHeight: c_original.outerHeight * factor.from.y,
- outerWidth: c_original.outerWidth * factor.from.x
- };
- child.to = {
- height: c_original.height * factor.to.y,
- width: c_original.width * factor.to.x,
- outerHeight: c_original.height * factor.to.y,
- outerWidth: c_original.width * factor.to.x
- };
-
- // Vertical props scaling
- if ( factor.from.y !== factor.to.y ) {
- child.from = $.effects.setTransition( child, vProps, factor.from.y, child.from );
- child.to = $.effects.setTransition( child, vProps, factor.to.y, child.to );
- }
-
- // Horizontal props scaling
- if ( factor.from.x !== factor.to.x ) {
- child.from = $.effects.setTransition( child, hProps, factor.from.x, child.from );
- child.to = $.effects.setTransition( child, hProps, factor.to.x, child.to );
- }
-
- // Animate children
- child.css( child.from );
- child.animate( child.to, o.duration, o.easing, function() {
-
- // Restore children
- if ( restore ) {
- $.effects.restore( child, props2 );
- }
- });
- });
- }
-
- // Animate
- el.animate( el.to, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( el.to.opacity === 0 ) {
- el.css( "opacity", el.from.opacity );
- }
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- if ( !restore ) {
-
- // we need to calculate our new positioning based on the scaling
- if ( position === "static" ) {
- el.css({
- position: "relative",
- top: el.to.top,
- left: el.to.left
- });
- } else {
- $.each([ "top", "left" ], function( idx, pos ) {
- el.css( pos, function( _, str ) {
- var val = parseInt( str, 10 ),
- toRef = idx ? el.to.left : el.to.top;
-
- // if original was "auto", recalculate the new value from wrapper
- if ( str === "auto" ) {
- return toRef + "px";
- }
-
- return val + toRef + "px";
- });
- });
- }
- }
-
- $.effects.removeWrapper( el );
- done();
- }
- });
-
-};
-
-
-/*!
- * jQuery UI Effects Scale 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/scale-effect/
- */
-
-
-var effectScale = $.effects.effect.scale = function( o, done ) {
-
- // Create element
- var el = $( this ),
- options = $.extend( true, {}, o ),
- mode = $.effects.setMode( el, o.mode || "effect" ),
- percent = parseInt( o.percent, 10 ) ||
- ( parseInt( o.percent, 10 ) === 0 ? 0 : ( mode === "hide" ? 0 : 100 ) ),
- direction = o.direction || "both",
- origin = o.origin,
- original = {
- height: el.height(),
- width: el.width(),
- outerHeight: el.outerHeight(),
- outerWidth: el.outerWidth()
- },
- factor = {
- y: direction !== "horizontal" ? (percent / 100) : 1,
- x: direction !== "vertical" ? (percent / 100) : 1
- };
-
- // We are going to pass this effect to the size effect:
- options.effect = "size";
- options.queue = false;
- options.complete = done;
-
- // Set default origin and restore for show/hide
- if ( mode !== "effect" ) {
- options.origin = origin || [ "middle", "center" ];
- options.restore = true;
- }
-
- options.from = o.from || ( mode === "show" ? {
- height: 0,
- width: 0,
- outerHeight: 0,
- outerWidth: 0
- } : original );
- options.to = {
- height: original.height * factor.y,
- width: original.width * factor.x,
- outerHeight: original.outerHeight * factor.y,
- outerWidth: original.outerWidth * factor.x
- };
-
- // Fade option to support puff
- if ( options.fade ) {
- if ( mode === "show" ) {
- options.from.opacity = 0;
- options.to.opacity = 1;
- }
- if ( mode === "hide" ) {
- options.from.opacity = 1;
- options.to.opacity = 0;
- }
- }
-
- // Animate
- el.effect( options );
-
-};
-
-
-/*!
- * jQuery UI Effects Puff 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/puff-effect/
- */
-
-
-var effectPuff = $.effects.effect.puff = function( o, done ) {
- var elem = $( this ),
- mode = $.effects.setMode( elem, o.mode || "hide" ),
- hide = mode === "hide",
- percent = parseInt( o.percent, 10 ) || 150,
- factor = percent / 100,
- original = {
- height: elem.height(),
- width: elem.width(),
- outerHeight: elem.outerHeight(),
- outerWidth: elem.outerWidth()
- };
-
- $.extend( o, {
- effect: "scale",
- queue: false,
- fade: true,
- mode: mode,
- complete: done,
- percent: hide ? percent : 100,
- from: hide ?
- original :
- {
- height: original.height * factor,
- width: original.width * factor,
- outerHeight: original.outerHeight * factor,
- outerWidth: original.outerWidth * factor
- }
- });
-
- elem.effect( o );
-};
-
-
-/*!
- * jQuery UI Effects Pulsate 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/pulsate-effect/
- */
-
-
-var effectPulsate = $.effects.effect.pulsate = function( o, done ) {
- var elem = $( this ),
- mode = $.effects.setMode( elem, o.mode || "show" ),
- show = mode === "show",
- hide = mode === "hide",
- showhide = ( show || mode === "hide" ),
-
- // showing or hiding leaves of the "last" animation
- anims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),
- duration = o.duration / anims,
- animateTo = 0,
- queue = elem.queue(),
- queuelen = queue.length,
- i;
-
- if ( show || !elem.is(":visible")) {
- elem.css( "opacity", 0 ).show();
- animateTo = 1;
- }
-
- // anims - 1 opacity "toggles"
- for ( i = 1; i < anims; i++ ) {
- elem.animate({
- opacity: animateTo
- }, duration, o.easing );
- animateTo = 1 - animateTo;
- }
-
- elem.animate({
- opacity: animateTo
- }, duration, o.easing);
-
- elem.queue(function() {
- if ( hide ) {
- elem.hide();
- }
- done();
- });
-
- // We just queued up "anims" animations, we need to put them next in the queue
- if ( queuelen > 1 ) {
- queue.splice.apply( queue,
- [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
- }
- elem.dequeue();
-};
-
-
-/*!
- * jQuery UI Effects Shake 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/shake-effect/
- */
-
-
-var effectShake = $.effects.effect.shake = function( o, done ) {
-
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "effect" ),
- direction = o.direction || "left",
- distance = o.distance || 20,
- times = o.times || 3,
- anims = times * 2 + 1,
- speed = Math.round( o.duration / anims ),
- ref = (direction === "up" || direction === "down") ? "top" : "left",
- positiveMotion = (direction === "up" || direction === "left"),
- animation = {},
- animation1 = {},
- animation2 = {},
- i,
-
- // we will need to re-assemble the queue to stack our animations in place
- queue = el.queue(),
- queuelen = queue.length;
-
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el );
-
- // Animation
- animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance;
- animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2;
- animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2;
-
- // Animate
- el.animate( animation, speed, o.easing );
-
- // Shakes
- for ( i = 1; i < times; i++ ) {
- el.animate( animation1, speed, o.easing ).animate( animation2, speed, o.easing );
- }
- el
- .animate( animation1, speed, o.easing )
- .animate( animation, speed / 2, o.easing )
- .queue(function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- });
-
- // inject all the animations we just queued to be first in line (after "inprogress")
- if ( queuelen > 1) {
- queue.splice.apply( queue,
- [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
- }
- el.dequeue();
-
-};
-
-
-/*!
- * jQuery UI Effects Slide 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/slide-effect/
- */
-
-
-var effectSlide = $.effects.effect.slide = function( o, done ) {
-
- // Create element
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "width", "height" ],
- mode = $.effects.setMode( el, o.mode || "show" ),
- show = mode === "show",
- direction = o.direction || "left",
- ref = (direction === "up" || direction === "down") ? "top" : "left",
- positiveMotion = (direction === "up" || direction === "left"),
- distance,
- animation = {};
-
- // Adjust
- $.effects.save( el, props );
- el.show();
- distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true );
-
- $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
-
- if ( show ) {
- el.css( ref, positiveMotion ? (isNaN(distance) ? "-" + distance : -distance) : distance );
- }
-
- // Animation
- animation[ ref ] = ( show ?
- ( positiveMotion ? "+=" : "-=") :
- ( positiveMotion ? "-=" : "+=")) +
- distance;
-
- // Animate
- el.animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-};
-
-
-/*!
- * jQuery UI Effects Transfer 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/transfer-effect/
- */
-
-
-var effectTransfer = $.effects.effect.transfer = function( o, done ) {
- var elem = $( this ),
- target = $( o.to ),
- targetFixed = target.css( "position" ) === "fixed",
- body = $("body"),
- fixTop = targetFixed ? body.scrollTop() : 0,
- fixLeft = targetFixed ? body.scrollLeft() : 0,
- endPosition = target.offset(),
- animation = {
- top: endPosition.top - fixTop,
- left: endPosition.left - fixLeft,
- height: target.innerHeight(),
- width: target.innerWidth()
- },
- startPosition = elem.offset(),
- transfer = $( "<div class='ui-effects-transfer'></div>" )
- .appendTo( document.body )
- .addClass( o.className )
- .css({
- top: startPosition.top - fixTop,
- left: startPosition.left - fixLeft,
- height: elem.innerHeight(),
- width: elem.innerWidth(),
- position: targetFixed ? "fixed" : "absolute"
- })
- .animate( animation, o.duration, o.easing, function() {
- transfer.remove();
- done();
- });
-};
-
-
-/*!
- * jQuery UI Progressbar 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/progressbar/
- */
-
-
-var progressbar = $.widget( "ui.progressbar", {
- version: "1.11.4",
- options: {
- max: 100,
- value: 0,
-
- change: null,
- complete: null
- },
-
- min: 0,
-
- _create: function() {
- // Constrain initial value
- this.oldValue = this.options.value = this._constrainedValue();
-
- this.element
- .addClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
- .attr({
- // Only set static values, aria-valuenow and aria-valuemax are
- // set inside _refreshValue()
- role: "progressbar",
- "aria-valuemin": this.min
- });
-
- this.valueDiv = $( "<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>" )
- .appendTo( this.element );
-
- this._refreshValue();
- },
-
- _destroy: function() {
- this.element
- .removeClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
- .removeAttr( "role" )
- .removeAttr( "aria-valuemin" )
- .removeAttr( "aria-valuemax" )
- .removeAttr( "aria-valuenow" );
-
- this.valueDiv.remove();
- },
-
- value: function( newValue ) {
- if ( newValue === undefined ) {
- return this.options.value;
- }
-
- this.options.value = this._constrainedValue( newValue );
- this._refreshValue();
- },
-
- _constrainedValue: function( newValue ) {
- if ( newValue === undefined ) {
- newValue = this.options.value;
- }
-
- this.indeterminate = newValue === false;
-
- // sanitize value
- if ( typeof newValue !== "number" ) {
- newValue = 0;
- }
-
- return this.indeterminate ? false :
- Math.min( this.options.max, Math.max( this.min, newValue ) );
- },
-
- _setOptions: function( options ) {
- // Ensure "value" option is set after other values (like max)
- var value = options.value;
- delete options.value;
-
- this._super( options );
-
- this.options.value = this._constrainedValue( value );
- this._refreshValue();
- },
-
- _setOption: function( key, value ) {
- if ( key === "max" ) {
- // Don't allow a max less than min
- value = Math.max( this.min, value );
- }
- if ( key === "disabled" ) {
- this.element
- .toggleClass( "ui-state-disabled", !!value )
- .attr( "aria-disabled", value );
- }
- this._super( key, value );
- },
-
- _percentage: function() {
- return this.indeterminate ? 100 : 100 * ( this.options.value - this.min ) / ( this.options.max - this.min );
- },
-
- _refreshValue: function() {
- var value = this.options.value,
- percentage = this._percentage();
-
- this.valueDiv
- .toggle( this.indeterminate || value > this.min )
- .toggleClass( "ui-corner-right", value === this.options.max )
- .width( percentage.toFixed(0) + "%" );
-
- this.element.toggleClass( "ui-progressbar-indeterminate", this.indeterminate );
-
- if ( this.indeterminate ) {
- this.element.removeAttr( "aria-valuenow" );
- if ( !this.overlayDiv ) {
- this.overlayDiv = $( "<div class='ui-progressbar-overlay'></div>" ).appendTo( this.valueDiv );
- }
- } else {
- this.element.attr({
- "aria-valuemax": this.options.max,
- "aria-valuenow": value
- });
- if ( this.overlayDiv ) {
- this.overlayDiv.remove();
- this.overlayDiv = null;
- }
- }
-
- if ( this.oldValue !== value ) {
- this.oldValue = value;
- this._trigger( "change" );
- }
- if ( value === this.options.max ) {
- this._trigger( "complete" );
- }
- }
-});
-
-
-/*!
- * jQuery UI Selectable 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/selectable/
- */
-
-
-var selectable = $.widget("ui.selectable", $.ui.mouse, {
- version: "1.11.4",
- options: {
- appendTo: "body",
- autoRefresh: true,
- distance: 0,
- filter: "*",
- tolerance: "touch",
-
- // callbacks
- selected: null,
- selecting: null,
- start: null,
- stop: null,
- unselected: null,
- unselecting: null
- },
- _create: function() {
- var selectees,
- that = this;
-
- this.element.addClass("ui-selectable");
-
- this.dragged = false;
-
- // cache selectee children based on filter
- this.refresh = function() {
- selectees = $(that.options.filter, that.element[0]);
- selectees.addClass("ui-selectee");
- selectees.each(function() {
- var $this = $(this),
- pos = $this.offset();
- $.data(this, "selectable-item", {
- element: this,
- $element: $this,
- left: pos.left,
- top: pos.top,
- right: pos.left + $this.outerWidth(),
- bottom: pos.top + $this.outerHeight(),
- startselected: false,
- selected: $this.hasClass("ui-selected"),
- selecting: $this.hasClass("ui-selecting"),
- unselecting: $this.hasClass("ui-unselecting")
- });
- });
- };
- this.refresh();
-
- this.selectees = selectees.addClass("ui-selectee");
-
- this._mouseInit();
-
- this.helper = $("<div class='ui-selectable-helper'></div>");
- },
-
- _destroy: function() {
- this.selectees
- .removeClass("ui-selectee")
- .removeData("selectable-item");
- this.element
- .removeClass("ui-selectable ui-selectable-disabled");
- this._mouseDestroy();
- },
-
- _mouseStart: function(event) {
- var that = this,
- options = this.options;
-
- this.opos = [ event.pageX, event.pageY ];
-
- if (this.options.disabled) {
- return;
- }
-
- this.selectees = $(options.filter, this.element[0]);
-
- this._trigger("start", event);
-
- $(options.appendTo).append(this.helper);
- // position helper (lasso)
- this.helper.css({
- "left": event.pageX,
- "top": event.pageY,
- "width": 0,
- "height": 0
- });
-
- if (options.autoRefresh) {
- this.refresh();
- }
-
- this.selectees.filter(".ui-selected").each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.startselected = true;
- if (!event.metaKey && !event.ctrlKey) {
- selectee.$element.removeClass("ui-selected");
- selectee.selected = false;
- selectee.$element.addClass("ui-unselecting");
- selectee.unselecting = true;
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- });
-
- $(event.target).parents().addBack().each(function() {
- var doSelect,
- selectee = $.data(this, "selectable-item");
- if (selectee) {
- doSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass("ui-selected");
- selectee.$element
- .removeClass(doSelect ? "ui-unselecting" : "ui-selected")
- .addClass(doSelect ? "ui-selecting" : "ui-unselecting");
- selectee.unselecting = !doSelect;
- selectee.selecting = doSelect;
- selectee.selected = doSelect;
- // selectable (UN)SELECTING callback
- if (doSelect) {
- that._trigger("selecting", event, {
- selecting: selectee.element
- });
- } else {
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- return false;
- }
- });
-
- },
-
- _mouseDrag: function(event) {
-
- this.dragged = true;
-
- if (this.options.disabled) {
- return;
- }
-
- var tmp,
- that = this,
- options = this.options,
- x1 = this.opos[0],
- y1 = this.opos[1],
- x2 = event.pageX,
- y2 = event.pageY;
-
- if (x1 > x2) { tmp = x2; x2 = x1; x1 = tmp; }
- if (y1 > y2) { tmp = y2; y2 = y1; y1 = tmp; }
- this.helper.css({ left: x1, top: y1, width: x2 - x1, height: y2 - y1 });
-
- this.selectees.each(function() {
- var selectee = $.data(this, "selectable-item"),
- hit = false;
-
- //prevent helper from being selected if appendTo: selectable
- if (!selectee || selectee.element === that.element[0]) {
- return;
- }
-
- if (options.tolerance === "touch") {
- hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) );
- } else if (options.tolerance === "fit") {
- hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2);
- }
-
- if (hit) {
- // SELECT
- if (selectee.selected) {
- selectee.$element.removeClass("ui-selected");
- selectee.selected = false;
- }
- if (selectee.unselecting) {
- selectee.$element.removeClass("ui-unselecting");
- selectee.unselecting = false;
- }
- if (!selectee.selecting) {
- selectee.$element.addClass("ui-selecting");
- selectee.selecting = true;
- // selectable SELECTING callback
- that._trigger("selecting", event, {
- selecting: selectee.element
- });
- }
- } else {
- // UNSELECT
- if (selectee.selecting) {
- if ((event.metaKey || event.ctrlKey) && selectee.startselected) {
- selectee.$element.removeClass("ui-selecting");
- selectee.selecting = false;
- selectee.$element.addClass("ui-selected");
- selectee.selected = true;
- } else {
- selectee.$element.removeClass("ui-selecting");
- selectee.selecting = false;
- if (selectee.startselected) {
- selectee.$element.addClass("ui-unselecting");
- selectee.unselecting = true;
- }
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- }
- if (selectee.selected) {
- if (!event.metaKey && !event.ctrlKey && !selectee.startselected) {
- selectee.$element.removeClass("ui-selected");
- selectee.selected = false;
-
- selectee.$element.addClass("ui-unselecting");
- selectee.unselecting = true;
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- }
- }
- });
-
- return false;
- },
-
- _mouseStop: function(event) {
- var that = this;
-
- this.dragged = false;
-
- $(".ui-unselecting", this.element[0]).each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.$element.removeClass("ui-unselecting");
- selectee.unselecting = false;
- selectee.startselected = false;
- that._trigger("unselected", event, {
- unselected: selectee.element
- });
- });
- $(".ui-selecting", this.element[0]).each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.$element.removeClass("ui-selecting").addClass("ui-selected");
- selectee.selecting = false;
- selectee.selected = true;
- selectee.startselected = true;
- that._trigger("selected", event, {
- selected: selectee.element
- });
- });
- this._trigger("stop", event);
-
- this.helper.remove();
-
- return false;
- }
-
-});
-
-
-/*!
- * jQuery UI Selectmenu 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/selectmenu
- */
-
-
-var selectmenu = $.widget( "ui.selectmenu", {
- version: "1.11.4",
- defaultElement: "<select>",
- options: {
- appendTo: null,
- disabled: null,
- icons: {
- button: "ui-icon-triangle-1-s"
- },
- position: {
- my: "left top",
- at: "left bottom",
- collision: "none"
- },
- width: null,
-
- // callbacks
- change: null,
- close: null,
- focus: null,
- open: null,
- select: null
- },
-
- _create: function() {
- var selectmenuId = this.element.uniqueId().attr( "id" );
- this.ids = {
- element: selectmenuId,
- button: selectmenuId + "-button",
- menu: selectmenuId + "-menu"
- };
-
- this._drawButton();
- this._drawMenu();
-
- if ( this.options.disabled ) {
- this.disable();
- }
- },
-
- _drawButton: function() {
- var that = this;
-
- // Associate existing label with the new button
- this.label = $( "label[for='" + this.ids.element + "']" ).attr( "for", this.ids.button );
- this._on( this.label, {
- click: function( event ) {
- this.button.focus();
- event.preventDefault();
- }
- });
-
- // Hide original select element
- this.element.hide();
-
- // Create button
- this.button = $( "<span>", {
- "class": "ui-selectmenu-button ui-widget ui-state-default ui-corner-all",
- tabindex: this.options.disabled ? -1 : 0,
- id: this.ids.button,
- role: "combobox",
- "aria-expanded": "false",
- "aria-autocomplete": "list",
- "aria-owns": this.ids.menu,
- "aria-haspopup": "true"
- })
- .insertAfter( this.element );
-
- $( "<span>", {
- "class": "ui-icon " + this.options.icons.button
- })
- .prependTo( this.button );
-
- this.buttonText = $( "<span>", {
- "class": "ui-selectmenu-text"
- })
- .appendTo( this.button );
-
- this._setText( this.buttonText, this.element.find( "option:selected" ).text() );
- this._resizeButton();
-
- this._on( this.button, this._buttonEvents );
- this.button.one( "focusin", function() {
-
- // Delay rendering the menu items until the button receives focus.
- // The menu may have already been rendered via a programmatic open.
- if ( !that.menuItems ) {
- that._refreshMenu();
- }
- });
- this._hoverable( this.button );
- this._focusable( this.button );
- },
-
- _drawMenu: function() {
- var that = this;
-
- // Create menu
- this.menu = $( "<ul>", {
- "aria-hidden": "true",
- "aria-labelledby": this.ids.button,
- id: this.ids.menu
- });
-
- // Wrap menu
- this.menuWrap = $( "<div>", {
- "class": "ui-selectmenu-menu ui-front"
- })
- .append( this.menu )
- .appendTo( this._appendTo() );
-
- // Initialize menu widget
- this.menuInstance = this.menu
- .menu({
- role: "listbox",
- select: function( event, ui ) {
- event.preventDefault();
-
- // support: IE8
- // If the item was selected via a click, the text selection
- // will be destroyed in IE
- that._setSelection();
-
- that._select( ui.item.data( "ui-selectmenu-item" ), event );
- },
- focus: function( event, ui ) {
- var item = ui.item.data( "ui-selectmenu-item" );
-
- // Prevent inital focus from firing and check if its a newly focused item
- if ( that.focusIndex != null && item.index !== that.focusIndex ) {
- that._trigger( "focus", event, { item: item } );
- if ( !that.isOpen ) {
- that._select( item, event );
- }
- }
- that.focusIndex = item.index;
-
- that.button.attr( "aria-activedescendant",
- that.menuItems.eq( item.index ).attr( "id" ) );
- }
- })
- .menu( "instance" );
-
- // Adjust menu styles to dropdown
- this.menu
- .addClass( "ui-corner-bottom" )
- .removeClass( "ui-corner-all" );
-
- // Don't close the menu on mouseleave
- this.menuInstance._off( this.menu, "mouseleave" );
-
- // Cancel the menu's collapseAll on document click
- this.menuInstance._closeOnDocumentClick = function() {
- return false;
- };
-
- // Selects often contain empty items, but never contain dividers
- this.menuInstance._isDivider = function() {
- return false;
- };
- },
-
- refresh: function() {
- this._refreshMenu();
- this._setText( this.buttonText, this._getSelectedItem().text() );
- if ( !this.options.width ) {
- this._resizeButton();
- }
- },
-
- _refreshMenu: function() {
- this.menu.empty();
-
- var item,
- options = this.element.find( "option" );
-
- if ( !options.length ) {
- return;
- }
-
- this._parseOptions( options );
- this._renderMenu( this.menu, this.items );
-
- this.menuInstance.refresh();
- this.menuItems = this.menu.find( "li" ).not( ".ui-selectmenu-optgroup" );
-
- item = this._getSelectedItem();
-
- // Update the menu to have the correct item focused
- this.menuInstance.focus( null, item );
- this._setAria( item.data( "ui-selectmenu-item" ) );
-
- // Set disabled state
- this._setOption( "disabled", this.element.prop( "disabled" ) );
- },
-
- open: function( event ) {
- if ( this.options.disabled ) {
- return;
- }
-
- // If this is the first time the menu is being opened, render the items
- if ( !this.menuItems ) {
- this._refreshMenu();
- } else {
-
- // Menu clears focus on close, reset focus to selected item
- this.menu.find( ".ui-state-focus" ).removeClass( "ui-state-focus" );
- this.menuInstance.focus( null, this._getSelectedItem() );
- }
-
- this.isOpen = true;
- this._toggleAttr();
- this._resizeMenu();
- this._position();
-
- this._on( this.document, this._documentClick );
-
- this._trigger( "open", event );
- },
-
- _position: function() {
- this.menuWrap.position( $.extend( { of: this.button }, this.options.position ) );
- },
-
- close: function( event ) {
- if ( !this.isOpen ) {
- return;
- }
-
- this.isOpen = false;
- this._toggleAttr();
-
- this.range = null;
- this._off( this.document );
-
- this._trigger( "close", event );
- },
-
- widget: function() {
- return this.button;
- },
-
- menuWidget: function() {
- return this.menu;
- },
-
- _renderMenu: function( ul, items ) {
- var that = this,
- currentOptgroup = "";
-
- $.each( items, function( index, item ) {
- if ( item.optgroup !== currentOptgroup ) {
- $( "<li>", {
- "class": "ui-selectmenu-optgroup ui-menu-divider" +
- ( item.element.parent( "optgroup" ).prop( "disabled" ) ?
- " ui-state-disabled" :
- "" ),
- text: item.optgroup
- })
- .appendTo( ul );
-
- currentOptgroup = item.optgroup;
- }
-
- that._renderItemData( ul, item );
- });
- },
-
- _renderItemData: function( ul, item ) {
- return this._renderItem( ul, item ).data( "ui-selectmenu-item", item );
- },
-
- _renderItem: function( ul, item ) {
- var li = $( "<li>" );
-
- if ( item.disabled ) {
- li.addClass( "ui-state-disabled" );
- }
- this._setText( li, item.label );
-
- return li.appendTo( ul );
- },
-
- _setText: function( element, value ) {
- if ( value ) {
- element.text( value );
- } else {
- element.html( "&#160;" );
- }
- },
-
- _move: function( direction, event ) {
- var item, next,
- filter = ".ui-menu-item";
-
- if ( this.isOpen ) {
- item = this.menuItems.eq( this.focusIndex );
- } else {
- item = this.menuItems.eq( this.element[ 0 ].selectedIndex );
- filter += ":not(.ui-state-disabled)";
- }
-
- if ( direction === "first" || direction === "last" ) {
- next = item[ direction === "first" ? "prevAll" : "nextAll" ]( filter ).eq( -1 );
- } else {
- next = item[ direction + "All" ]( filter ).eq( 0 );
- }
-
- if ( next.length ) {
- this.menuInstance.focus( event, next );
- }
- },
-
- _getSelectedItem: function() {
- return this.menuItems.eq( this.element[ 0 ].selectedIndex );
- },
-
- _toggle: function( event ) {
- this[ this.isOpen ? "close" : "open" ]( event );
- },
-
- _setSelection: function() {
- var selection;
-
- if ( !this.range ) {
- return;
- }
-
- if ( window.getSelection ) {
- selection = window.getSelection();
- selection.removeAllRanges();
- selection.addRange( this.range );
-
- // support: IE8
- } else {
- this.range.select();
- }
-
- // support: IE
- // Setting the text selection kills the button focus in IE, but
- // restoring the focus doesn't kill the selection.
- this.button.focus();
- },
-
- _documentClick: {
- mousedown: function( event ) {
- if ( !this.isOpen ) {
- return;
- }
-
- if ( !$( event.target ).closest( ".ui-selectmenu-menu, #" + this.ids.button ).length ) {
- this.close( event );
- }
- }
- },
-
- _buttonEvents: {
-
- // Prevent text selection from being reset when interacting with the selectmenu (#10144)
- mousedown: function() {
- var selection;
-
- if ( window.getSelection ) {
- selection = window.getSelection();
- if ( selection.rangeCount ) {
- this.range = selection.getRangeAt( 0 );
- }
-
- // support: IE8
- } else {
- this.range = document.selection.createRange();
- }
- },
-
- click: function( event ) {
- this._setSelection();
- this._toggle( event );
- },
-
- keydown: function( event ) {
- var preventDefault = true;
- switch ( event.keyCode ) {
- case $.ui.keyCode.TAB:
- case $.ui.keyCode.ESCAPE:
- this.close( event );
- preventDefault = false;
- break;
- case $.ui.keyCode.ENTER:
- if ( this.isOpen ) {
- this._selectFocusedItem( event );
- }
- break;
- case $.ui.keyCode.UP:
- if ( event.altKey ) {
- this._toggle( event );
- } else {
- this._move( "prev", event );
- }
- break;
- case $.ui.keyCode.DOWN:
- if ( event.altKey ) {
- this._toggle( event );
- } else {
- this._move( "next", event );
- }
- break;
- case $.ui.keyCode.SPACE:
- if ( this.isOpen ) {
- this._selectFocusedItem( event );
- } else {
- this._toggle( event );
- }
- break;
- case $.ui.keyCode.LEFT:
- this._move( "prev", event );
- break;
- case $.ui.keyCode.RIGHT:
- this._move( "next", event );
- break;
- case $.ui.keyCode.HOME:
- case $.ui.keyCode.PAGE_UP:
- this._move( "first", event );
- break;
- case $.ui.keyCode.END:
- case $.ui.keyCode.PAGE_DOWN:
- this._move( "last", event );
- break;
- default:
- this.menu.trigger( event );
- preventDefault = false;
- }
-
- if ( preventDefault ) {
- event.preventDefault();
- }
- }
- },
-
- _selectFocusedItem: function( event ) {
- var item = this.menuItems.eq( this.focusIndex );
- if ( !item.hasClass( "ui-state-disabled" ) ) {
- this._select( item.data( "ui-selectmenu-item" ), event );
- }
- },
-
- _select: function( item, event ) {
- var oldIndex = this.element[ 0 ].selectedIndex;
-
- // Change native select element
- this.element[ 0 ].selectedIndex = item.index;
- this._setText( this.buttonText, item.label );
- this._setAria( item );
- this._trigger( "select", event, { item: item } );
-
- if ( item.index !== oldIndex ) {
- this._trigger( "change", event, { item: item } );
- }
-
- this.close( event );
- },
-
- _setAria: function( item ) {
- var id = this.menuItems.eq( item.index ).attr( "id" );
-
- this.button.attr({
- "aria-labelledby": id,
- "aria-activedescendant": id
- });
- this.menu.attr( "aria-activedescendant", id );
- },
-
- _setOption: function( key, value ) {
- if ( key === "icons" ) {
- this.button.find( "span.ui-icon" )
- .removeClass( this.options.icons.button )
- .addClass( value.button );
- }
-
- this._super( key, value );
-
- if ( key === "appendTo" ) {
- this.menuWrap.appendTo( this._appendTo() );
- }
-
- if ( key === "disabled" ) {
- this.menuInstance.option( "disabled", value );
- this.button
- .toggleClass( "ui-state-disabled", value )
- .attr( "aria-disabled", value );
-
- this.element.prop( "disabled", value );
- if ( value ) {
- this.button.attr( "tabindex", -1 );
- this.close();
- } else {
- this.button.attr( "tabindex", 0 );
- }
- }
-
- if ( key === "width" ) {
- this._resizeButton();
- }
- },
-
- _appendTo: function() {
- var element = this.options.appendTo;
-
- if ( element ) {
- element = element.jquery || element.nodeType ?
- $( element ) :
- this.document.find( element ).eq( 0 );
- }
-
- if ( !element || !element[ 0 ] ) {
- element = this.element.closest( ".ui-front" );
- }
-
- if ( !element.length ) {
- element = this.document[ 0 ].body;
- }
-
- return element;
- },
-
- _toggleAttr: function() {
- this.button
- .toggleClass( "ui-corner-top", this.isOpen )
- .toggleClass( "ui-corner-all", !this.isOpen )
- .attr( "aria-expanded", this.isOpen );
- this.menuWrap.toggleClass( "ui-selectmenu-open", this.isOpen );
- this.menu.attr( "aria-hidden", !this.isOpen );
- },
-
- _resizeButton: function() {
- var width = this.options.width;
-
- if ( !width ) {
- width = this.element.show().outerWidth();
- this.element.hide();
- }
-
- this.button.outerWidth( width );
- },
-
- _resizeMenu: function() {
- this.menu.outerWidth( Math.max(
- this.button.outerWidth(),
-
- // support: IE10
- // IE10 wraps long text (possibly a rounding bug)
- // so we add 1px to avoid the wrapping
- this.menu.width( "" ).outerWidth() + 1
- ) );
- },
-
- _getCreateOptions: function() {
- return { disabled: this.element.prop( "disabled" ) };
- },
-
- _parseOptions: function( options ) {
- var data = [];
- options.each(function( index, item ) {
- var option = $( item ),
- optgroup = option.parent( "optgroup" );
- data.push({
- element: option,
- index: index,
- value: option.val(),
- label: option.text(),
- optgroup: optgroup.attr( "label" ) || "",
- disabled: optgroup.prop( "disabled" ) || option.prop( "disabled" )
- });
- });
- this.items = data;
- },
-
- _destroy: function() {
- this.menuWrap.remove();
- this.button.remove();
- this.element.show();
- this.element.removeUniqueId();
- this.label.attr( "for", this.ids.element );
- }
-});
-
-
-/*!
- * jQuery UI Slider 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/slider/
- */
-
-
-var slider = $.widget( "ui.slider", $.ui.mouse, {
- version: "1.11.4",
- widgetEventPrefix: "slide",
-
- options: {
- animate: false,
- distance: 0,
- max: 100,
- min: 0,
- orientation: "horizontal",
- range: false,
- step: 1,
- value: 0,
- values: null,
-
- // callbacks
- change: null,
- slide: null,
- start: null,
- stop: null
- },
-
- // number of pages in a slider
- // (how many times can you page up/down to go through the whole range)
- numPages: 5,
-
- _create: function() {
- this._keySliding = false;
- this._mouseSliding = false;
- this._animateOff = true;
- this._handleIndex = null;
- this._detectOrientation();
- this._mouseInit();
- this._calculateNewMax();
-
- this.element
- .addClass( "ui-slider" +
- " ui-slider-" + this.orientation +
- " ui-widget" +
- " ui-widget-content" +
- " ui-corner-all");
-
- this._refresh();
- this._setOption( "disabled", this.options.disabled );
-
- this._animateOff = false;
- },
-
- _refresh: function() {
- this._createRange();
- this._createHandles();
- this._setupEvents();
- this._refreshValue();
- },
-
- _createHandles: function() {
- var i, handleCount,
- options = this.options,
- existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
- handle = "<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",
- handles = [];
-
- handleCount = ( options.values && options.values.length ) || 1;
-
- if ( existingHandles.length > handleCount ) {
- existingHandles.slice( handleCount ).remove();
- existingHandles = existingHandles.slice( 0, handleCount );
- }
-
- for ( i = existingHandles.length; i < handleCount; i++ ) {
- handles.push( handle );
- }
-
- this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) );
-
- this.handle = this.handles.eq( 0 );
-
- this.handles.each(function( i ) {
- $( this ).data( "ui-slider-handle-index", i );
- });
- },
-
- _createRange: function() {
- var options = this.options,
- classes = "";
-
- if ( options.range ) {
- if ( options.range === true ) {
- if ( !options.values ) {
- options.values = [ this._valueMin(), this._valueMin() ];
- } else if ( options.values.length && options.values.length !== 2 ) {
- options.values = [ options.values[0], options.values[0] ];
- } else if ( $.isArray( options.values ) ) {
- options.values = options.values.slice(0);
- }
- }
-
- if ( !this.range || !this.range.length ) {
- this.range = $( "<div></div>" )
- .appendTo( this.element );
-
- classes = "ui-slider-range" +
- // note: this isn't the most fittingly semantic framework class for this element,
- // but worked best visually with a variety of themes
- " ui-widget-header ui-corner-all";
- } else {
- this.range.removeClass( "ui-slider-range-min ui-slider-range-max" )
- // Handle range switching from true to min/max
- .css({
- "left": "",
- "bottom": ""
- });
- }
-
- this.range.addClass( classes +
- ( ( options.range === "min" || options.range === "max" ) ? " ui-slider-range-" + options.range : "" ) );
- } else {
- if ( this.range ) {
- this.range.remove();
- }
- this.range = null;
- }
- },
-
- _setupEvents: function() {
- this._off( this.handles );
- this._on( this.handles, this._handleEvents );
- this._hoverable( this.handles );
- this._focusable( this.handles );
- },
-
- _destroy: function() {
- this.handles.remove();
- if ( this.range ) {
- this.range.remove();
- }
-
- this.element
- .removeClass( "ui-slider" +
- " ui-slider-horizontal" +
- " ui-slider-vertical" +
- " ui-widget" +
- " ui-widget-content" +
- " ui-corner-all" );
-
- this._mouseDestroy();
- },
-
- _mouseCapture: function( event ) {
- var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,
- that = this,
- o = this.options;
-
- if ( o.disabled ) {
- return false;
- }
-
- this.elementSize = {
- width: this.element.outerWidth(),
- height: this.element.outerHeight()
- };
- this.elementOffset = this.element.offset();
-
- position = { x: event.pageX, y: event.pageY };
- normValue = this._normValueFromMouse( position );
- distance = this._valueMax() - this._valueMin() + 1;
- this.handles.each(function( i ) {
- var thisDistance = Math.abs( normValue - that.values(i) );
- if (( distance > thisDistance ) ||
- ( distance === thisDistance &&
- (i === that._lastChangedValue || that.values(i) === o.min ))) {
- distance = thisDistance;
- closestHandle = $( this );
- index = i;
- }
- });
-
- allowed = this._start( event, index );
- if ( allowed === false ) {
- return false;
- }
- this._mouseSliding = true;
-
- this._handleIndex = index;
-
- closestHandle
- .addClass( "ui-state-active" )
- .focus();
-
- offset = closestHandle.offset();
- mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" );
- this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
- left: event.pageX - offset.left - ( closestHandle.width() / 2 ),
- top: event.pageY - offset.top -
- ( closestHandle.height() / 2 ) -
- ( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 ) -
- ( parseInt( closestHandle.css("borderBottomWidth"), 10 ) || 0) +
- ( parseInt( closestHandle.css("marginTop"), 10 ) || 0)
- };
-
- if ( !this.handles.hasClass( "ui-state-hover" ) ) {
- this._slide( event, index, normValue );
- }
- this._animateOff = true;
- return true;
- },
-
- _mouseStart: function() {
- return true;
- },
-
- _mouseDrag: function( event ) {
- var position = { x: event.pageX, y: event.pageY },
- normValue = this._normValueFromMouse( position );
-
- this._slide( event, this._handleIndex, normValue );
-
- return false;
- },
-
- _mouseStop: function( event ) {
- this.handles.removeClass( "ui-state-active" );
- this._mouseSliding = false;
-
- this._stop( event, this._handleIndex );
- this._change( event, this._handleIndex );
-
- this._handleIndex = null;
- this._clickOffset = null;
- this._animateOff = false;
-
- return false;
- },
-
- _detectOrientation: function() {
- this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal";
- },
-
- _normValueFromMouse: function( position ) {
- var pixelTotal,
- pixelMouse,
- percentMouse,
- valueTotal,
- valueMouse;
-
- if ( this.orientation === "horizontal" ) {
- pixelTotal = this.elementSize.width;
- pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 );
- } else {
- pixelTotal = this.elementSize.height;
- pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 );
- }
-
- percentMouse = ( pixelMouse / pixelTotal );
- if ( percentMouse > 1 ) {
- percentMouse = 1;
- }
- if ( percentMouse < 0 ) {
- percentMouse = 0;
- }
- if ( this.orientation === "vertical" ) {
- percentMouse = 1 - percentMouse;
- }
-
- valueTotal = this._valueMax() - this._valueMin();
- valueMouse = this._valueMin() + percentMouse * valueTotal;
-
- return this._trimAlignValue( valueMouse );
- },
-
- _start: function( event, index ) {
- var uiHash = {
- handle: this.handles[ index ],
- value: this.value()
- };
- if ( this.options.values && this.options.values.length ) {
- uiHash.value = this.values( index );
- uiHash.values = this.values();
- }
- return this._trigger( "start", event, uiHash );
- },
-
- _slide: function( event, index, newVal ) {
- var otherVal,
- newValues,
- allowed;
-
- if ( this.options.values && this.options.values.length ) {
- otherVal = this.values( index ? 0 : 1 );
-
- if ( ( this.options.values.length === 2 && this.options.range === true ) &&
- ( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) )
- ) {
- newVal = otherVal;
- }
-
- if ( newVal !== this.values( index ) ) {
- newValues = this.values();
- newValues[ index ] = newVal;
- // A slide can be canceled by returning false from the slide callback
- allowed = this._trigger( "slide", event, {
- handle: this.handles[ index ],
- value: newVal,
- values: newValues
- } );
- otherVal = this.values( index ? 0 : 1 );
- if ( allowed !== false ) {
- this.values( index, newVal );
- }
- }
- } else {
- if ( newVal !== this.value() ) {
- // A slide can be canceled by returning false from the slide callback
- allowed = this._trigger( "slide", event, {
- handle: this.handles[ index ],
- value: newVal
- } );
- if ( allowed !== false ) {
- this.value( newVal );
- }
- }
- }
- },
-
- _stop: function( event, index ) {
- var uiHash = {
- handle: this.handles[ index ],
- value: this.value()
- };
- if ( this.options.values && this.options.values.length ) {
- uiHash.value = this.values( index );
- uiHash.values = this.values();
- }
-
- this._trigger( "stop", event, uiHash );
- },
-
- _change: function( event, index ) {
- if ( !this._keySliding && !this._mouseSliding ) {
- var uiHash = {
- handle: this.handles[ index ],
- value: this.value()
- };
- if ( this.options.values && this.options.values.length ) {
- uiHash.value = this.values( index );
- uiHash.values = this.values();
- }
-
- //store the last changed value index for reference when handles overlap
- this._lastChangedValue = index;
-
- this._trigger( "change", event, uiHash );
- }
- },
-
- value: function( newValue ) {
- if ( arguments.length ) {
- this.options.value = this._trimAlignValue( newValue );
- this._refreshValue();
- this._change( null, 0 );
- return;
- }
-
- return this._value();
- },
-
- values: function( index, newValue ) {
- var vals,
- newValues,
- i;
-
- if ( arguments.length > 1 ) {
- this.options.values[ index ] = this._trimAlignValue( newValue );
- this._refreshValue();
- this._change( null, index );
- return;
- }
-
- if ( arguments.length ) {
- if ( $.isArray( arguments[ 0 ] ) ) {
- vals = this.options.values;
- newValues = arguments[ 0 ];
- for ( i = 0; i < vals.length; i += 1 ) {
- vals[ i ] = this._trimAlignValue( newValues[ i ] );
- this._change( null, i );
- }
- this._refreshValue();
- } else {
- if ( this.options.values && this.options.values.length ) {
- return this._values( index );
- } else {
- return this.value();
- }
- }
- } else {
- return this._values();
- }
- },
-
- _setOption: function( key, value ) {
- var i,
- valsLength = 0;
-
- if ( key === "range" && this.options.range === true ) {
- if ( value === "min" ) {
- this.options.value = this._values( 0 );
- this.options.values = null;
- } else if ( value === "max" ) {
- this.options.value = this._values( this.options.values.length - 1 );
- this.options.values = null;
- }
- }
-
- if ( $.isArray( this.options.values ) ) {
- valsLength = this.options.values.length;
- }
-
- if ( key === "disabled" ) {
- this.element.toggleClass( "ui-state-disabled", !!value );
- }
-
- this._super( key, value );
-
- switch ( key ) {
- case "orientation":
- this._detectOrientation();
- this.element
- .removeClass( "ui-slider-horizontal ui-slider-vertical" )
- .addClass( "ui-slider-" + this.orientation );
- this._refreshValue();
-
- // Reset positioning from previous orientation
- this.handles.css( value === "horizontal" ? "bottom" : "left", "" );
- break;
- case "value":
- this._animateOff = true;
- this._refreshValue();
- this._change( null, 0 );
- this._animateOff = false;
- break;
- case "values":
- this._animateOff = true;
- this._refreshValue();
- for ( i = 0; i < valsLength; i += 1 ) {
- this._change( null, i );
- }
- this._animateOff = false;
- break;
- case "step":
- case "min":
- case "max":
- this._animateOff = true;
- this._calculateNewMax();
- this._refreshValue();
- this._animateOff = false;
- break;
- case "range":
- this._animateOff = true;
- this._refresh();
- this._animateOff = false;
- break;
- }
- },
-
- //internal value getter
- // _value() returns value trimmed by min and max, aligned by step
- _value: function() {
- var val = this.options.value;
- val = this._trimAlignValue( val );
-
- return val;
- },
-
- //internal values getter
- // _values() returns array of values trimmed by min and max, aligned by step
- // _values( index ) returns single value trimmed by min and max, aligned by step
- _values: function( index ) {
- var val,
- vals,
- i;
-
- if ( arguments.length ) {
- val = this.options.values[ index ];
- val = this._trimAlignValue( val );
-
- return val;
- } else if ( this.options.values && this.options.values.length ) {
- // .slice() creates a copy of the array
- // this copy gets trimmed by min and max and then returned
- vals = this.options.values.slice();
- for ( i = 0; i < vals.length; i += 1) {
- vals[ i ] = this._trimAlignValue( vals[ i ] );
- }
-
- return vals;
- } else {
- return [];
- }
- },
-
- // returns the step-aligned value that val is closest to, between (inclusive) min and max
- _trimAlignValue: function( val ) {
- if ( val <= this._valueMin() ) {
- return this._valueMin();
- }
- if ( val >= this._valueMax() ) {
- return this._valueMax();
- }
- var step = ( this.options.step > 0 ) ? this.options.step : 1,
- valModStep = (val - this._valueMin()) % step,
- alignValue = val - valModStep;
-
- if ( Math.abs(valModStep) * 2 >= step ) {
- alignValue += ( valModStep > 0 ) ? step : ( -step );
- }
-
- // Since JavaScript has problems with large floats, round
- // the final value to 5 digits after the decimal point (see #4124)
- return parseFloat( alignValue.toFixed(5) );
- },
-
- _calculateNewMax: function() {
- var max = this.options.max,
- min = this._valueMin(),
- step = this.options.step,
- aboveMin = Math.floor( ( +( max - min ).toFixed( this._precision() ) ) / step ) * step;
- max = aboveMin + min;
- this.max = parseFloat( max.toFixed( this._precision() ) );
- },
-
- _precision: function() {
- var precision = this._precisionOf( this.options.step );
- if ( this.options.min !== null ) {
- precision = Math.max( precision, this._precisionOf( this.options.min ) );
- }
- return precision;
- },
-
- _precisionOf: function( num ) {
- var str = num.toString(),
- decimal = str.indexOf( "." );
- return decimal === -1 ? 0 : str.length - decimal - 1;
- },
-
- _valueMin: function() {
- return this.options.min;
- },
-
- _valueMax: function() {
- return this.max;
- },
-
- _refreshValue: function() {
- var lastValPercent, valPercent, value, valueMin, valueMax,
- oRange = this.options.range,
- o = this.options,
- that = this,
- animate = ( !this._animateOff ) ? o.animate : false,
- _set = {};
-
- if ( this.options.values && this.options.values.length ) {
- this.handles.each(function( i ) {
- valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100;
- _set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
- $( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
- if ( that.options.range === true ) {
- if ( that.orientation === "horizontal" ) {
- if ( i === 0 ) {
- that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate );
- }
- if ( i === 1 ) {
- that.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
- }
- } else {
- if ( i === 0 ) {
- that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate );
- }
- if ( i === 1 ) {
- that.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
- }
- }
- }
- lastValPercent = valPercent;
- });
- } else {
- value = this.value();
- valueMin = this._valueMin();
- valueMax = this._valueMax();
- valPercent = ( valueMax !== valueMin ) ?
- ( value - valueMin ) / ( valueMax - valueMin ) * 100 :
- 0;
- _set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
- this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
-
- if ( oRange === "min" && this.orientation === "horizontal" ) {
- this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate );
- }
- if ( oRange === "max" && this.orientation === "horizontal" ) {
- this.range[ animate ? "animate" : "css" ]( { width: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
- }
- if ( oRange === "min" && this.orientation === "vertical" ) {
- this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: valPercent + "%" }, o.animate );
- }
- if ( oRange === "max" && this.orientation === "vertical" ) {
- this.range[ animate ? "animate" : "css" ]( { height: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
- }
- }
- },
-
- _handleEvents: {
- keydown: function( event ) {
- var allowed, curVal, newVal, step,
- index = $( event.target ).data( "ui-slider-handle-index" );
-
- switch ( event.keyCode ) {
- case $.ui.keyCode.HOME:
- case $.ui.keyCode.END:
- case $.ui.keyCode.PAGE_UP:
- case $.ui.keyCode.PAGE_DOWN:
- case $.ui.keyCode.UP:
- case $.ui.keyCode.RIGHT:
- case $.ui.keyCode.DOWN:
- case $.ui.keyCode.LEFT:
- event.preventDefault();
- if ( !this._keySliding ) {
- this._keySliding = true;
- $( event.target ).addClass( "ui-state-active" );
- allowed = this._start( event, index );
- if ( allowed === false ) {
- return;
- }
- }
- break;
- }
-
- step = this.options.step;
- if ( this.options.values && this.options.values.length ) {
- curVal = newVal = this.values( index );
- } else {
- curVal = newVal = this.value();
- }
-
- switch ( event.keyCode ) {
- case $.ui.keyCode.HOME:
- newVal = this._valueMin();
- break;
- case $.ui.keyCode.END:
- newVal = this._valueMax();
- break;
- case $.ui.keyCode.PAGE_UP:
- newVal = this._trimAlignValue(
- curVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages )
- );
- break;
- case $.ui.keyCode.PAGE_DOWN:
- newVal = this._trimAlignValue(
- curVal - ( (this._valueMax() - this._valueMin()) / this.numPages ) );
- break;
- case $.ui.keyCode.UP:
- case $.ui.keyCode.RIGHT:
- if ( curVal === this._valueMax() ) {
- return;
- }
- newVal = this._trimAlignValue( curVal + step );
- break;
- case $.ui.keyCode.DOWN:
- case $.ui.keyCode.LEFT:
- if ( curVal === this._valueMin() ) {
- return;
- }
- newVal = this._trimAlignValue( curVal - step );
- break;
- }
-
- this._slide( event, index, newVal );
- },
- keyup: function( event ) {
- var index = $( event.target ).data( "ui-slider-handle-index" );
-
- if ( this._keySliding ) {
- this._keySliding = false;
- this._stop( event, index );
- this._change( event, index );
- $( event.target ).removeClass( "ui-state-active" );
- }
- }
- }
-});
-
-
-/*!
- * jQuery UI Sortable 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/sortable/
- */
-
-
-var sortable = $.widget("ui.sortable", $.ui.mouse, {
- version: "1.11.4",
- widgetEventPrefix: "sort",
- ready: false,
- options: {
- appendTo: "parent",
- axis: false,
- connectWith: false,
- containment: false,
- cursor: "auto",
- cursorAt: false,
- dropOnEmpty: true,
- forcePlaceholderSize: false,
- forceHelperSize: false,
- grid: false,
- handle: false,
- helper: "original",
- items: "> *",
- opacity: false,
- placeholder: false,
- revert: false,
- scroll: true,
- scrollSensitivity: 20,
- scrollSpeed: 20,
- scope: "default",
- tolerance: "intersect",
- zIndex: 1000,
-
- // callbacks
- activate: null,
- beforeStop: null,
- change: null,
- deactivate: null,
- out: null,
- over: null,
- receive: null,
- remove: null,
- sort: null,
- start: null,
- stop: null,
- update: null
- },
-
- _isOverAxis: function( x, reference, size ) {
- return ( x >= reference ) && ( x < ( reference + size ) );
- },
-
- _isFloating: function( item ) {
- return (/left|right/).test(item.css("float")) || (/inline|table-cell/).test(item.css("display"));
- },
-
- _create: function() {
- this.containerCache = {};
- this.element.addClass("ui-sortable");
-
- //Get the items
- this.refresh();
-
- //Let's determine the parent's offset
- this.offset = this.element.offset();
-
- //Initialize mouse events for interaction
- this._mouseInit();
-
- this._setHandleClassName();
-
- //We're ready to go
- this.ready = true;
-
- },
-
- _setOption: function( key, value ) {
- this._super( key, value );
-
- if ( key === "handle" ) {
- this._setHandleClassName();
- }
- },
-
- _setHandleClassName: function() {
- this.element.find( ".ui-sortable-handle" ).removeClass( "ui-sortable-handle" );
- $.each( this.items, function() {
- ( this.instance.options.handle ?
- this.item.find( this.instance.options.handle ) : this.item )
- .addClass( "ui-sortable-handle" );
- });
- },
-
- _destroy: function() {
- this.element
- .removeClass( "ui-sortable ui-sortable-disabled" )
- .find( ".ui-sortable-handle" )
- .removeClass( "ui-sortable-handle" );
- this._mouseDestroy();
-
- for ( var i = this.items.length - 1; i >= 0; i-- ) {
- this.items[i].item.removeData(this.widgetName + "-item");
- }
-
- return this;
- },
-
- _mouseCapture: function(event, overrideHandle) {
- var currentItem = null,
- validHandle = false,
- that = this;
-
- if (this.reverting) {
- return false;
- }
-
- if(this.options.disabled || this.options.type === "static") {
- return false;
- }
-
- //We have to refresh the items data once first
- this._refreshItems(event);
-
- //Find out if the clicked node (or one of its parents) is a actual item in this.items
- $(event.target).parents().each(function() {
- if($.data(this, that.widgetName + "-item") === that) {
- currentItem = $(this);
- return false;
- }
- });
- if($.data(event.target, that.widgetName + "-item") === that) {
- currentItem = $(event.target);
- }
-
- if(!currentItem) {
- return false;
- }
- if(this.options.handle && !overrideHandle) {
- $(this.options.handle, currentItem).find("*").addBack().each(function() {
- if(this === event.target) {
- validHandle = true;
- }
- });
- if(!validHandle) {
- return false;
- }
- }
-
- this.currentItem = currentItem;
- this._removeCurrentsFromItems();
- return true;
-
- },
-
- _mouseStart: function(event, overrideHandle, noActivation) {
-
- var i, body,
- o = this.options;
-
- this.currentContainer = this;
-
- //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
- this.refreshPositions();
-
- //Create and append the visible helper
- this.helper = this._createHelper(event);
-
- //Cache the helper size
- this._cacheHelperProportions();
-
- /*
- * - Position generation -
- * This block generates everything position related - it's the core of draggables.
- */
-
- //Cache the margins of the original element
- this._cacheMargins();
-
- //Get the next scrolling parent
- this.scrollParent = this.helper.scrollParent();
-
- //The element's absolute position on the page minus margins
- this.offset = this.currentItem.offset();
- this.offset = {
- top: this.offset.top - this.margins.top,
- left: this.offset.left - this.margins.left
- };
-
- $.extend(this.offset, {
- click: { //Where the click happened, relative to the element
- left: event.pageX - this.offset.left,
- top: event.pageY - this.offset.top
- },
- parent: this._getParentOffset(),
- relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
- });
-
- // Only after we got the offset, we can change the helper's position to absolute
- // TODO: Still need to figure out a way to make relative sorting possible
- this.helper.css("position", "absolute");
- this.cssPosition = this.helper.css("position");
-
- //Generate the original position
- this.originalPosition = this._generatePosition(event);
- this.originalPageX = event.pageX;
- this.originalPageY = event.pageY;
-
- //Adjust the mouse offset relative to the helper if "cursorAt" is supplied
- (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
-
- //Cache the former DOM position
- this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };
-
- //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way
- if(this.helper[0] !== this.currentItem[0]) {
- this.currentItem.hide();
- }
-
- //Create the placeholder
- this._createPlaceholder();
-
- //Set a containment if given in the options
- if(o.containment) {
- this._setContainment();
- }
-
- if( o.cursor && o.cursor !== "auto" ) { // cursor option
- body = this.document.find( "body" );
-
- // support: IE
- this.storedCursor = body.css( "cursor" );
- body.css( "cursor", o.cursor );
-
- this.storedStylesheet = $( "<style>*{ cursor: "+o.cursor+" !important; }</style>" ).appendTo( body );
- }
-
- if(o.opacity) { // opacity option
- if (this.helper.css("opacity")) {
- this._storedOpacity = this.helper.css("opacity");
- }
- this.helper.css("opacity", o.opacity);
- }
-
- if(o.zIndex) { // zIndex option
- if (this.helper.css("zIndex")) {
- this._storedZIndex = this.helper.css("zIndex");
- }
- this.helper.css("zIndex", o.zIndex);
- }
-
- //Prepare scrolling
- if(this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== "HTML") {
- this.overflowOffset = this.scrollParent.offset();
- }
-
- //Call callbacks
- this._trigger("start", event, this._uiHash());
-
- //Recache the helper size
- if(!this._preserveHelperProportions) {
- this._cacheHelperProportions();
- }
-
-
- //Post "activate" events to possible containers
- if( !noActivation ) {
- for ( i = this.containers.length - 1; i >= 0; i-- ) {
- this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) );
- }
- }
-
- //Prepare possible droppables
- if($.ui.ddmanager) {
- $.ui.ddmanager.current = this;
- }
-
- if ($.ui.ddmanager && !o.dropBehaviour) {
- $.ui.ddmanager.prepareOffsets(this, event);
- }
-
- this.dragging = true;
-
- this.helper.addClass("ui-sortable-helper");
- this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position
- return true;
-
- },
-
- _mouseDrag: function(event) {
- var i, item, itemElement, intersection,
- o = this.options,
- scrolled = false;
-
- //Compute the helpers position
- this.position = this._generatePosition(event);
- this.positionAbs = this._convertPositionTo("absolute");
-
- if (!this.lastPositionAbs) {
- this.lastPositionAbs = this.positionAbs;
- }
-
- //Do scrolling
- if(this.options.scroll) {
- if(this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== "HTML") {
-
- if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
- this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
- } else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) {
- this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;
- }
-
- if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {
- this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;
- } else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) {
- this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;
- }
-
- } else {
-
- if(event.pageY - this.document.scrollTop() < o.scrollSensitivity) {
- scrolled = this.document.scrollTop(this.document.scrollTop() - o.scrollSpeed);
- } else if(this.window.height() - (event.pageY - this.document.scrollTop()) < o.scrollSensitivity) {
- scrolled = this.document.scrollTop(this.document.scrollTop() + o.scrollSpeed);
- }
-
- if(event.pageX - this.document.scrollLeft() < o.scrollSensitivity) {
- scrolled = this.document.scrollLeft(this.document.scrollLeft() - o.scrollSpeed);
- } else if(this.window.width() - (event.pageX - this.document.scrollLeft()) < o.scrollSensitivity) {
- scrolled = this.document.scrollLeft(this.document.scrollLeft() + o.scrollSpeed);
- }
-
- }
-
- if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
- $.ui.ddmanager.prepareOffsets(this, event);
- }
- }
-
- //Regenerate the absolute position used for position checks
- this.positionAbs = this._convertPositionTo("absolute");
-
- //Set the helper position
- if(!this.options.axis || this.options.axis !== "y") {
- this.helper[0].style.left = this.position.left+"px";
- }
- if(!this.options.axis || this.options.axis !== "x") {
- this.helper[0].style.top = this.position.top+"px";
- }
-
- //Rearrange
- for (i = this.items.length - 1; i >= 0; i--) {
-
- //Cache variables and intersection, continue if no intersection
- item = this.items[i];
- itemElement = item.item[0];
- intersection = this._intersectsWithPointer(item);
- if (!intersection) {
- continue;
- }
-
- // Only put the placeholder inside the current Container, skip all
- // items from other containers. This works because when moving
- // an item from one container to another the
- // currentContainer is switched before the placeholder is moved.
- //
- // Without this, moving items in "sub-sortables" can cause
- // the placeholder to jitter between the outer and inner container.
- if (item.instance !== this.currentContainer) {
- continue;
- }
-
- // cannot intersect with itself
- // no useless actions that have been done before
- // no action if the item moved is the parent of the item checked
- if (itemElement !== this.currentItem[0] &&
- this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement &&
- !$.contains(this.placeholder[0], itemElement) &&
- (this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true)
- ) {
-
- this.direction = intersection === 1 ? "down" : "up";
-
- if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) {
- this._rearrange(event, item);
- } else {
- break;
- }
-
- this._trigger("change", event, this._uiHash());
- break;
- }
- }
-
- //Post events to containers
- this._contactContainers(event);
-
- //Interconnect with droppables
- if($.ui.ddmanager) {
- $.ui.ddmanager.drag(this, event);
- }
-
- //Call callbacks
- this._trigger("sort", event, this._uiHash());
-
- this.lastPositionAbs = this.positionAbs;
- return false;
-
- },
-
- _mouseStop: function(event, noPropagation) {
-
- if(!event) {
- return;
- }
-
- //If we are using droppables, inform the manager about the drop
- if ($.ui.ddmanager && !this.options.dropBehaviour) {
- $.ui.ddmanager.drop(this, event);
- }
-
- if(this.options.revert) {
- var that = this,
- cur = this.placeholder.offset(),
- axis = this.options.axis,
- animation = {};
-
- if ( !axis || axis === "x" ) {
- animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollLeft);
- }
- if ( !axis || axis === "y" ) {
- animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollTop);
- }
- this.reverting = true;
- $(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() {
- that._clear(event);
- });
- } else {
- this._clear(event, noPropagation);
- }
-
- return false;
-
- },
-
- cancel: function() {
-
- if(this.dragging) {
-
- this._mouseUp({ target: null });
-
- if(this.options.helper === "original") {
- this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
- } else {
- this.currentItem.show();
- }
-
- //Post deactivating events to containers
- for (var i = this.containers.length - 1; i >= 0; i--){
- this.containers[i]._trigger("deactivate", null, this._uiHash(this));
- if(this.containers[i].containerCache.over) {
- this.containers[i]._trigger("out", null, this._uiHash(this));
- this.containers[i].containerCache.over = 0;
- }
- }
-
- }
-
- if (this.placeholder) {
- //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
- if(this.placeholder[0].parentNode) {
- this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
- }
- if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) {
- this.helper.remove();
- }
-
- $.extend(this, {
- helper: null,
- dragging: false,
- reverting: false,
- _noFinalSort: null
- });
-
- if(this.domPosition.prev) {
- $(this.domPosition.prev).after(this.currentItem);
- } else {
- $(this.domPosition.parent).prepend(this.currentItem);
- }
- }
-
- return this;
-
- },
-
- serialize: function(o) {
-
- var items = this._getItemsAsjQuery(o && o.connected),
- str = [];
- o = o || {};
-
- $(items).each(function() {
- var res = ($(o.item || this).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[\-=_](.+)/));
- if (res) {
- str.push((o.key || res[1]+"[]")+"="+(o.key && o.expression ? res[1] : res[2]));
- }
- });
-
- if(!str.length && o.key) {
- str.push(o.key + "=");
- }
-
- return str.join("&");
-
- },
-
- toArray: function(o) {
-
- var items = this._getItemsAsjQuery(o && o.connected),
- ret = [];
-
- o = o || {};
-
- items.each(function() { ret.push($(o.item || this).attr(o.attribute || "id") || ""); });
- return ret;
-
- },
-
- /* Be careful with the following core functions */
- _intersectsWith: function(item) {
-
- var x1 = this.positionAbs.left,
- x2 = x1 + this.helperProportions.width,
- y1 = this.positionAbs.top,
- y2 = y1 + this.helperProportions.height,
- l = item.left,
- r = l + item.width,
- t = item.top,
- b = t + item.height,
- dyClick = this.offset.click.top,
- dxClick = this.offset.click.left,
- isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ),
- isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ),
- isOverElement = isOverElementHeight && isOverElementWidth;
-
- if ( this.options.tolerance === "pointer" ||
- this.options.forcePointerForContainers ||
- (this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"])
- ) {
- return isOverElement;
- } else {
-
- return (l < x1 + (this.helperProportions.width / 2) && // Right Half
- x2 - (this.helperProportions.width / 2) < r && // Left Half
- t < y1 + (this.helperProportions.height / 2) && // Bottom Half
- y2 - (this.helperProportions.height / 2) < b ); // Top Half
-
- }
- },
-
- _intersectsWithPointer: function(item) {
-
- var isOverElementHeight = (this.options.axis === "x") || this._isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
- isOverElementWidth = (this.options.axis === "y") || this._isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
- isOverElement = isOverElementHeight && isOverElementWidth,
- verticalDirection = this._getDragVerticalDirection(),
- horizontalDirection = this._getDragHorizontalDirection();
-
- if (!isOverElement) {
- return false;
- }
-
- return this.floating ?
- ( ((horizontalDirection && horizontalDirection === "right") || verticalDirection === "down") ? 2 : 1 )
- : ( verticalDirection && (verticalDirection === "down" ? 2 : 1) );
-
- },
-
- _intersectsWithSides: function(item) {
-
- var isOverBottomHalf = this._isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
- isOverRightHalf = this._isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
- verticalDirection = this._getDragVerticalDirection(),
- horizontalDirection = this._getDragHorizontalDirection();
-
- if (this.floating && horizontalDirection) {
- return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf));
- } else {
- return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf));
- }
-
- },
-
- _getDragVerticalDirection: function() {
- var delta = this.positionAbs.top - this.lastPositionAbs.top;
- return delta !== 0 && (delta > 0 ? "down" : "up");
- },
-
- _getDragHorizontalDirection: function() {
- var delta = this.positionAbs.left - this.lastPositionAbs.left;
- return delta !== 0 && (delta > 0 ? "right" : "left");
- },
-
- refresh: function(event) {
- this._refreshItems(event);
- this._setHandleClassName();
- this.refreshPositions();
- return this;
- },
-
- _connectWith: function() {
- var options = this.options;
- return options.connectWith.constructor === String ? [options.connectWith] : options.connectWith;
- },
-
- _getItemsAsjQuery: function(connected) {
-
- var i, j, cur, inst,
- items = [],
- queries = [],
- connectWith = this._connectWith();
-
- if(connectWith && connected) {
- for (i = connectWith.length - 1; i >= 0; i--){
- cur = $(connectWith[i], this.document[0]);
- for ( j = cur.length - 1; j >= 0; j--){
- inst = $.data(cur[j], this.widgetFullName);
- if(inst && inst !== this && !inst.options.disabled) {
- queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), inst]);
- }
- }
- }
- }
-
- queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]);
-
- function addItems() {
- items.push( this );
- }
- for (i = queries.length - 1; i >= 0; i--){
- queries[i][0].each( addItems );
- }
-
- return $(items);
-
- },
-
- _removeCurrentsFromItems: function() {
-
- var list = this.currentItem.find(":data(" + this.widgetName + "-item)");
-
- this.items = $.grep(this.items, function (item) {
- for (var j=0; j < list.length; j++) {
- if(list[j] === item.item[0]) {
- return false;
- }
- }
- return true;
- });
-
- },
-
- _refreshItems: function(event) {
-
- this.items = [];
- this.containers = [this];
-
- var i, j, cur, inst, targetData, _queries, item, queriesLength,
- items = this.items,
- queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]],
- connectWith = this._connectWith();
-
- if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down
- for (i = connectWith.length - 1; i >= 0; i--){
- cur = $(connectWith[i], this.document[0]);
- for (j = cur.length - 1; j >= 0; j--){
- inst = $.data(cur[j], this.widgetFullName);
- if(inst && inst !== this && !inst.options.disabled) {
- queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);
- this.containers.push(inst);
- }
- }
- }
- }
-
- for (i = queries.length - 1; i >= 0; i--) {
- targetData = queries[i][1];
- _queries = queries[i][0];
-
- for (j=0, queriesLength = _queries.length; j < queriesLength; j++) {
- item = $(_queries[j]);
-
- item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager)
-
- items.push({
- item: item,
- instance: targetData,
- width: 0, height: 0,
- left: 0, top: 0
- });
- }
- }
-
- },
-
- refreshPositions: function(fast) {
-
- // Determine whether items are being displayed horizontally
- this.floating = this.items.length ?
- this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) :
- false;
-
- //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
- if(this.offsetParent && this.helper) {
- this.offset.parent = this._getParentOffset();
- }
-
- var i, item, t, p;
-
- for (i = this.items.length - 1; i >= 0; i--){
- item = this.items[i];
-
- //We ignore calculating positions of all connected containers when we're not over them
- if(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) {
- continue;
- }
-
- t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
-
- if (!fast) {
- item.width = t.outerWidth();
- item.height = t.outerHeight();
- }
-
- p = t.offset();
- item.left = p.left;
- item.top = p.top;
- }
-
- if(this.options.custom && this.options.custom.refreshContainers) {
- this.options.custom.refreshContainers.call(this);
- } else {
- for (i = this.containers.length - 1; i >= 0; i--){
- p = this.containers[i].element.offset();
- this.containers[i].containerCache.left = p.left;
- this.containers[i].containerCache.top = p.top;
- this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
- this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
- }
- }
-
- return this;
- },
-
- _createPlaceholder: function(that) {
- that = that || this;
- var className,
- o = that.options;
-
- if(!o.placeholder || o.placeholder.constructor === String) {
- className = o.placeholder;
- o.placeholder = {
- element: function() {
-
- var nodeName = that.currentItem[0].nodeName.toLowerCase(),
- element = $( "<" + nodeName + ">", that.document[0] )
- .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder")
- .removeClass("ui-sortable-helper");
-
- if ( nodeName === "tbody" ) {
- that._createTrPlaceholder(
- that.currentItem.find( "tr" ).eq( 0 ),
- $( "<tr>", that.document[ 0 ] ).appendTo( element )
- );
- } else if ( nodeName === "tr" ) {
- that._createTrPlaceholder( that.currentItem, element );
- } else if ( nodeName === "img" ) {
- element.attr( "src", that.currentItem.attr( "src" ) );
- }
-
- if ( !className ) {
- element.css( "visibility", "hidden" );
- }
-
- return element;
- },
- update: function(container, p) {
-
- // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that
- // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified
- if(className && !o.forcePlaceholderSize) {
- return;
- }
-
- //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
- if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); }
- if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); }
- }
- };
- }
-
- //Create the placeholder
- that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem));
-
- //Append it after the actual current item
- that.currentItem.after(that.placeholder);
-
- //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
- o.placeholder.update(that, that.placeholder);
-
- },
-
- _createTrPlaceholder: function( sourceTr, targetTr ) {
- var that = this;
-
- sourceTr.children().each(function() {
- $( "<td>&#160;</td>", that.document[ 0 ] )
- .attr( "colspan", $( this ).attr( "colspan" ) || 1 )
- .appendTo( targetTr );
- });
- },
-
- _contactContainers: function(event) {
- var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom, floating, axis,
- innermostContainer = null,
- innermostIndex = null;
-
- // get innermost container that intersects with item
- for (i = this.containers.length - 1; i >= 0; i--) {
-
- // never consider a container that's located within the item itself
- if($.contains(this.currentItem[0], this.containers[i].element[0])) {
- continue;
- }
-
- if(this._intersectsWith(this.containers[i].containerCache)) {
-
- // if we've already found a container and it's more "inner" than this, then continue
- if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) {
- continue;
- }
-
- innermostContainer = this.containers[i];
- innermostIndex = i;
-
- } else {
- // container doesn't intersect. trigger "out" event if necessary
- if(this.containers[i].containerCache.over) {
- this.containers[i]._trigger("out", event, this._uiHash(this));
- this.containers[i].containerCache.over = 0;
- }
- }
-
- }
-
- // if no intersecting containers found, return
- if(!innermostContainer) {
- return;
- }
-
- // move the item into the container if it's not there already
- if(this.containers.length === 1) {
- if (!this.containers[innermostIndex].containerCache.over) {
- this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
- this.containers[innermostIndex].containerCache.over = 1;
- }
- } else {
-
- //When entering a new container, we will find the item with the least distance and append our item near it
- dist = 10000;
- itemWithLeastDistance = null;
- floating = innermostContainer.floating || this._isFloating(this.currentItem);
- posProperty = floating ? "left" : "top";
- sizeProperty = floating ? "width" : "height";
- axis = floating ? "clientX" : "clientY";
-
- for (j = this.items.length - 1; j >= 0; j--) {
- if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) {
- continue;
- }
- if(this.items[j].item[0] === this.currentItem[0]) {
- continue;
- }
-
- cur = this.items[j].item.offset()[posProperty];
- nearBottom = false;
- if ( event[ axis ] - cur > this.items[ j ][ sizeProperty ] / 2 ) {
- nearBottom = true;
- }
-
- if ( Math.abs( event[ axis ] - cur ) < dist ) {
- dist = Math.abs( event[ axis ] - cur );
- itemWithLeastDistance = this.items[ j ];
- this.direction = nearBottom ? "up": "down";
- }
- }
-
- //Check if dropOnEmpty is enabled
- if(!itemWithLeastDistance && !this.options.dropOnEmpty) {
- return;
- }
-
- if(this.currentContainer === this.containers[innermostIndex]) {
- if ( !this.currentContainer.containerCache.over ) {
- this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash() );
- this.currentContainer.containerCache.over = 1;
- }
- return;
- }
-
- itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);
- this._trigger("change", event, this._uiHash());
- this.containers[innermostIndex]._trigger("change", event, this._uiHash(this));
- this.currentContainer = this.containers[innermostIndex];
-
- //Update the placeholder
- this.options.placeholder.update(this.currentContainer, this.placeholder);
-
- this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
- this.containers[innermostIndex].containerCache.over = 1;
- }
-
-
- },
-
- _createHelper: function(event) {
-
- var o = this.options,
- helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem);
-
- //Add the helper to the DOM if that didn't happen already
- if(!helper.parents("body").length) {
- $(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);
- }
-
- if(helper[0] === this.currentItem[0]) {
- this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") };
- }
-
- if(!helper[0].style.width || o.forceHelperSize) {
- helper.width(this.currentItem.width());
- }
- if(!helper[0].style.height || o.forceHelperSize) {
- helper.height(this.currentItem.height());
- }
-
- return helper;
-
- },
-
- _adjustOffsetFromHelper: function(obj) {
- if (typeof obj === "string") {
- obj = obj.split(" ");
- }
- if ($.isArray(obj)) {
- obj = {left: +obj[0], top: +obj[1] || 0};
- }
- if ("left" in obj) {
- this.offset.click.left = obj.left + this.margins.left;
- }
- if ("right" in obj) {
- this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
- }
- if ("top" in obj) {
- this.offset.click.top = obj.top + this.margins.top;
- }
- if ("bottom" in obj) {
- this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
- }
- },
-
- _getParentOffset: function() {
-
-
- //Get the offsetParent and cache its position
- this.offsetParent = this.helper.offsetParent();
- var po = this.offsetParent.offset();
-
- // This is a special case where we need to modify a offset calculated on start, since the following happened:
- // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
- // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
- // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
- if(this.cssPosition === "absolute" && this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) {
- po.left += this.scrollParent.scrollLeft();
- po.top += this.scrollParent.scrollTop();
- }
-
- // This needs to be actually done for all browsers, since pageX/pageY includes this information
- // with an ugly IE fix
- if( this.offsetParent[0] === this.document[0].body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
- po = { top: 0, left: 0 };
- }
-
- return {
- top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
- left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
- };
-
- },
-
- _getRelativeOffset: function() {
-
- if(this.cssPosition === "relative") {
- var p = this.currentItem.position();
- return {
- top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
- left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
- };
- } else {
- return { top: 0, left: 0 };
- }
-
- },
-
- _cacheMargins: function() {
- this.margins = {
- left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),
- top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
- };
- },
-
- _cacheHelperProportions: function() {
- this.helperProportions = {
- width: this.helper.outerWidth(),
- height: this.helper.outerHeight()
- };
- },
-
- _setContainment: function() {
-
- var ce, co, over,
- o = this.options;
- if(o.containment === "parent") {
- o.containment = this.helper[0].parentNode;
- }
- if(o.containment === "document" || o.containment === "window") {
- this.containment = [
- 0 - this.offset.relative.left - this.offset.parent.left,
- 0 - this.offset.relative.top - this.offset.parent.top,
- o.containment === "document" ? this.document.width() : this.window.width() - this.helperProportions.width - this.margins.left,
- (o.containment === "document" ? this.document.width() : this.window.height() || this.document[0].body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
- ];
- }
-
- if(!(/^(document|window|parent)$/).test(o.containment)) {
- ce = $(o.containment)[0];
- co = $(o.containment).offset();
- over = ($(ce).css("overflow") !== "hidden");
-
- this.containment = [
- co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
- co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
- co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,
- co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top
- ];
- }
-
- },
-
- _convertPositionTo: function(d, pos) {
-
- if(!pos) {
- pos = this.position;
- }
- var mod = d === "absolute" ? 1 : -1,
- scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
- scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
-
- return {
- top: (
- pos.top + // The absolute mouse position
- this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
- ),
- left: (
- pos.left + // The absolute mouse position
- this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
- )
- };
-
- },
-
- _generatePosition: function(event) {
-
- var top, left,
- o = this.options,
- pageX = event.pageX,
- pageY = event.pageY,
- scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
-
- // This is another very weird special case that only happens for relative elements:
- // 1. If the css position is relative
- // 2. and the scroll parent is the document or similar to the offset parent
- // we have to refresh the relative offset during the scroll so there are no jumps
- if(this.cssPosition === "relative" && !(this.scrollParent[0] !== this.document[0] && this.scrollParent[0] !== this.offsetParent[0])) {
- this.offset.relative = this._getRelativeOffset();
- }
-
- /*
- * - Position constraining -
- * Constrain the position to a mix of grid, containment.
- */
-
- if(this.originalPosition) { //If we are not dragging yet, we won't check for options
-
- if(this.containment) {
- if(event.pageX - this.offset.click.left < this.containment[0]) {
- pageX = this.containment[0] + this.offset.click.left;
- }
- if(event.pageY - this.offset.click.top < this.containment[1]) {
- pageY = this.containment[1] + this.offset.click.top;
- }
- if(event.pageX - this.offset.click.left > this.containment[2]) {
- pageX = this.containment[2] + this.offset.click.left;
- }
- if(event.pageY - this.offset.click.top > this.containment[3]) {
- pageY = this.containment[3] + this.offset.click.top;
- }
- }
-
- if(o.grid) {
- top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
- pageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
-
- left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
- pageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
- }
-
- }
-
- return {
- top: (
- pageY - // The absolute mouse position
- this.offset.click.top - // Click offset (relative to the element)
- this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top + // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
- ),
- left: (
- pageX - // The absolute mouse position
- this.offset.click.left - // Click offset (relative to the element)
- this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left + // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
- )
- };
-
- },
-
- _rearrange: function(event, i, a, hardRefresh) {
-
- a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling));
-
- //Various things done here to improve the performance:
- // 1. we create a setTimeout, that calls refreshPositions
- // 2. on the instance, we have a counter variable, that get's higher after every append
- // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same
- // 4. this lets only the last addition to the timeout stack through
- this.counter = this.counter ? ++this.counter : 1;
- var counter = this.counter;
-
- this._delay(function() {
- if(counter === this.counter) {
- this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
- }
- });
-
- },
-
- _clear: function(event, noPropagation) {
-
- this.reverting = false;
- // We delay all events that have to be triggered to after the point where the placeholder has been removed and
- // everything else normalized again
- var i,
- delayedTriggers = [];
-
- // We first have to update the dom position of the actual currentItem
- // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
- if(!this._noFinalSort && this.currentItem.parent().length) {
- this.placeholder.before(this.currentItem);
- }
- this._noFinalSort = null;
-
- if(this.helper[0] === this.currentItem[0]) {
- for(i in this._storedCSS) {
- if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") {
- this._storedCSS[i] = "";
- }
- }
- this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
- } else {
- this.currentItem.show();
- }
-
- if(this.fromOutside && !noPropagation) {
- delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
- }
- if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) {
- delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
- }
-
- // Check if the items Container has Changed and trigger appropriate
- // events.
- if (this !== this.currentContainer) {
- if(!noPropagation) {
- delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
- delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
- delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
- }
- }
-
-
- //Post events to containers
- function delayEvent( type, instance, container ) {
- return function( event ) {
- container._trigger( type, event, instance._uiHash( instance ) );
- };
- }
- for (i = this.containers.length - 1; i >= 0; i--){
- if (!noPropagation) {
- delayedTriggers.push( delayEvent( "deactivate", this, this.containers[ i ] ) );
- }
- if(this.containers[i].containerCache.over) {
- delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] ) );
- this.containers[i].containerCache.over = 0;
- }
- }
-
- //Do what was originally in plugins
- if ( this.storedCursor ) {
- this.document.find( "body" ).css( "cursor", this.storedCursor );
- this.storedStylesheet.remove();
- }
- if(this._storedOpacity) {
- this.helper.css("opacity", this._storedOpacity);
- }
- if(this._storedZIndex) {
- this.helper.css("zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex);
- }
-
- this.dragging = false;
-
- if(!noPropagation) {
- this._trigger("beforeStop", event, this._uiHash());
- }
-
- //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
- this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
-
- if ( !this.cancelHelperRemoval ) {
- if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {
- this.helper.remove();
- }
- this.helper = null;
- }
-
- if(!noPropagation) {
- for (i=0; i < delayedTriggers.length; i++) {
- delayedTriggers[i].call(this, event);
- } //Trigger all delayed events
- this._trigger("stop", event, this._uiHash());
- }
-
- this.fromOutside = false;
- return !this.cancelHelperRemoval;
-
- },
-
- _trigger: function() {
- if ($.Widget.prototype._trigger.apply(this, arguments) === false) {
- this.cancel();
- }
- },
-
- _uiHash: function(_inst) {
- var inst = _inst || this;
- return {
- helper: inst.helper,
- placeholder: inst.placeholder || $([]),
- position: inst.position,
- originalPosition: inst.originalPosition,
- offset: inst.positionAbs,
- item: inst.currentItem,
- sender: _inst ? _inst.element : null
- };
- }
-
-});
-
-
-/*!
- * jQuery UI Spinner 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/spinner/
- */
-
-
-function spinner_modifier( fn ) {
- return function() {
- var previous = this.element.val();
- fn.apply( this, arguments );
- this._refresh();
- if ( previous !== this.element.val() ) {
- this._trigger( "change" );
- }
- };
-}
-
-var spinner = $.widget( "ui.spinner", {
- version: "1.11.4",
- defaultElement: "<input>",
- widgetEventPrefix: "spin",
- options: {
- culture: null,
- icons: {
- down: "ui-icon-triangle-1-s",
- up: "ui-icon-triangle-1-n"
- },
- incremental: true,
- max: null,
- min: null,
- numberFormat: null,
- page: 10,
- step: 1,
-
- change: null,
- spin: null,
- start: null,
- stop: null
- },
-
- _create: function() {
- // handle string values that need to be parsed
- this._setOption( "max", this.options.max );
- this._setOption( "min", this.options.min );
- this._setOption( "step", this.options.step );
-
- // Only format if there is a value, prevents the field from being marked
- // as invalid in Firefox, see #9573.
- if ( this.value() !== "" ) {
- // Format the value, but don't constrain.
- this._value( this.element.val(), true );
- }
-
- this._draw();
- this._on( this._events );
- this._refresh();
-
- // turning off autocomplete prevents the browser from remembering the
- // value when navigating through history, so we re-enable autocomplete
- // if the page is unloaded before the widget is destroyed. #7790
- this._on( this.window, {
- beforeunload: function() {
- this.element.removeAttr( "autocomplete" );
- }
- });
- },
-
- _getCreateOptions: function() {
- var options = {},
- element = this.element;
-
- $.each( [ "min", "max", "step" ], function( i, option ) {
- var value = element.attr( option );
- if ( value !== undefined && value.length ) {
- options[ option ] = value;
- }
- });
-
- return options;
- },
-
- _events: {
- keydown: function( event ) {
- if ( this._start( event ) && this._keydown( event ) ) {
- event.preventDefault();
- }
- },
- keyup: "_stop",
- focus: function() {
- this.previous = this.element.val();
- },
- blur: function( event ) {
- if ( this.cancelBlur ) {
- delete this.cancelBlur;
- return;
- }
-
- this._stop();
- this._refresh();
- if ( this.previous !== this.element.val() ) {
- this._trigger( "change", event );
- }
- },
- mousewheel: function( event, delta ) {
- if ( !delta ) {
- return;
- }
- if ( !this.spinning && !this._start( event ) ) {
- return false;
- }
-
- this._spin( (delta > 0 ? 1 : -1) * this.options.step, event );
- clearTimeout( this.mousewheelTimer );
- this.mousewheelTimer = this._delay(function() {
- if ( this.spinning ) {
- this._stop( event );
- }
- }, 100 );
- event.preventDefault();
- },
- "mousedown .ui-spinner-button": function( event ) {
- var previous;
-
- // We never want the buttons to have focus; whenever the user is
- // interacting with the spinner, the focus should be on the input.
- // If the input is focused then this.previous is properly set from
- // when the input first received focus. If the input is not focused
- // then we need to set this.previous based on the value before spinning.
- previous = this.element[0] === this.document[0].activeElement ?
- this.previous : this.element.val();
- function checkFocus() {
- var isActive = this.element[0] === this.document[0].activeElement;
- if ( !isActive ) {
- this.element.focus();
- this.previous = previous;
- // support: IE
- // IE sets focus asynchronously, so we need to check if focus
- // moved off of the input because the user clicked on the button.
- this._delay(function() {
- this.previous = previous;
- });
- }
- }
-
- // ensure focus is on (or stays on) the text field
- event.preventDefault();
- checkFocus.call( this );
-
- // support: IE
- // IE doesn't prevent moving focus even with event.preventDefault()
- // so we set a flag to know when we should ignore the blur event
- // and check (again) if focus moved off of the input.
- this.cancelBlur = true;
- this._delay(function() {
- delete this.cancelBlur;
- checkFocus.call( this );
- });
-
- if ( this._start( event ) === false ) {
- return;
- }
-
- this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event );
- },
- "mouseup .ui-spinner-button": "_stop",
- "mouseenter .ui-spinner-button": function( event ) {
- // button will add ui-state-active if mouse was down while mouseleave and kept down
- if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) {
- return;
- }
-
- if ( this._start( event ) === false ) {
- return false;
- }
- this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event );
- },
- // TODO: do we really want to consider this a stop?
- // shouldn't we just stop the repeater and wait until mouseup before
- // we trigger the stop event?
- "mouseleave .ui-spinner-button": "_stop"
- },
-
- _draw: function() {
- var uiSpinner = this.uiSpinner = this.element
- .addClass( "ui-spinner-input" )
- .attr( "autocomplete", "off" )
- .wrap( this._uiSpinnerHtml() )
- .parent()
- // add buttons
- .append( this._buttonHtml() );
-
- this.element.attr( "role", "spinbutton" );
-
- // button bindings
- this.buttons = uiSpinner.find( ".ui-spinner-button" )
- .attr( "tabIndex", -1 )
- .button()
- .removeClass( "ui-corner-all" );
-
- // IE 6 doesn't understand height: 50% for the buttons
- // unless the wrapper has an explicit height
- if ( this.buttons.height() > Math.ceil( uiSpinner.height() * 0.5 ) &&
- uiSpinner.height() > 0 ) {
- uiSpinner.height( uiSpinner.height() );
- }
-
- // disable spinner if element was already disabled
- if ( this.options.disabled ) {
- this.disable();
- }
- },
-
- _keydown: function( event ) {
- var options = this.options,
- keyCode = $.ui.keyCode;
-
- switch ( event.keyCode ) {
- case keyCode.UP:
- this._repeat( null, 1, event );
- return true;
- case keyCode.DOWN:
- this._repeat( null, -1, event );
- return true;
- case keyCode.PAGE_UP:
- this._repeat( null, options.page, event );
- return true;
- case keyCode.PAGE_DOWN:
- this._repeat( null, -options.page, event );
- return true;
- }
-
- return false;
- },
-
- _uiSpinnerHtml: function() {
- return "<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>";
- },
-
- _buttonHtml: function() {
- return "" +
- "<a class='ui-spinner-button ui-spinner-up ui-corner-tr'>" +
- "<span class='ui-icon " + this.options.icons.up + "'>&#9650;</span>" +
- "</a>" +
- "<a class='ui-spinner-button ui-spinner-down ui-corner-br'>" +
- "<span class='ui-icon " + this.options.icons.down + "'>&#9660;</span>" +
- "</a>";
- },
-
- _start: function( event ) {
- if ( !this.spinning && this._trigger( "start", event ) === false ) {
- return false;
- }
-
- if ( !this.counter ) {
- this.counter = 1;
- }
- this.spinning = true;
- return true;
- },
-
- _repeat: function( i, steps, event ) {
- i = i || 500;
-
- clearTimeout( this.timer );
- this.timer = this._delay(function() {
- this._repeat( 40, steps, event );
- }, i );
-
- this._spin( steps * this.options.step, event );
- },
-
- _spin: function( step, event ) {
- var value = this.value() || 0;
-
- if ( !this.counter ) {
- this.counter = 1;
- }
-
- value = this._adjustValue( value + step * this._increment( this.counter ) );
-
- if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false) {
- this._value( value );
- this.counter++;
- }
- },
-
- _increment: function( i ) {
- var incremental = this.options.incremental;
-
- if ( incremental ) {
- return $.isFunction( incremental ) ?
- incremental( i ) :
- Math.floor( i * i * i / 50000 - i * i / 500 + 17 * i / 200 + 1 );
- }
-
- return 1;
- },
-
- _precision: function() {
- var precision = this._precisionOf( this.options.step );
- if ( this.options.min !== null ) {
- precision = Math.max( precision, this._precisionOf( this.options.min ) );
- }
- return precision;
- },
-
- _precisionOf: function( num ) {
- var str = num.toString(),
- decimal = str.indexOf( "." );
- return decimal === -1 ? 0 : str.length - decimal - 1;
- },
-
- _adjustValue: function( value ) {
- var base, aboveMin,
- options = this.options;
-
- // make sure we're at a valid step
- // - find out where we are relative to the base (min or 0)
- base = options.min !== null ? options.min : 0;
- aboveMin = value - base;
- // - round to the nearest step
- aboveMin = Math.round(aboveMin / options.step) * options.step;
- // - rounding is based on 0, so adjust back to our base
- value = base + aboveMin;
-
- // fix precision from bad JS floating point math
- value = parseFloat( value.toFixed( this._precision() ) );
-
- // clamp the value
- if ( options.max !== null && value > options.max) {
- return options.max;
- }
- if ( options.min !== null && value < options.min ) {
- return options.min;
- }
-
- return value;
- },
-
- _stop: function( event ) {
- if ( !this.spinning ) {
- return;
- }
-
- clearTimeout( this.timer );
- clearTimeout( this.mousewheelTimer );
- this.counter = 0;
- this.spinning = false;
- this._trigger( "stop", event );
- },
-
- _setOption: function( key, value ) {
- if ( key === "culture" || key === "numberFormat" ) {
- var prevValue = this._parse( this.element.val() );
- this.options[ key ] = value;
- this.element.val( this._format( prevValue ) );
- return;
- }
-
- if ( key === "max" || key === "min" || key === "step" ) {
- if ( typeof value === "string" ) {
- value = this._parse( value );
- }
- }
- if ( key === "icons" ) {
- this.buttons.first().find( ".ui-icon" )
- .removeClass( this.options.icons.up )
- .addClass( value.up );
- this.buttons.last().find( ".ui-icon" )
- .removeClass( this.options.icons.down )
- .addClass( value.down );
- }
-
- this._super( key, value );
-
- if ( key === "disabled" ) {
- this.widget().toggleClass( "ui-state-disabled", !!value );
- this.element.prop( "disabled", !!value );
- this.buttons.button( value ? "disable" : "enable" );
- }
- },
-
- _setOptions: spinner_modifier(function( options ) {
- this._super( options );
- }),
-
- _parse: function( val ) {
- if ( typeof val === "string" && val !== "" ) {
- val = window.Globalize && this.options.numberFormat ?
- Globalize.parseFloat( val, 10, this.options.culture ) : +val;
- }
- return val === "" || isNaN( val ) ? null : val;
- },
-
- _format: function( value ) {
- if ( value === "" ) {
- return "";
- }
- return window.Globalize && this.options.numberFormat ?
- Globalize.format( value, this.options.numberFormat, this.options.culture ) :
- value;
- },
-
- _refresh: function() {
- this.element.attr({
- "aria-valuemin": this.options.min,
- "aria-valuemax": this.options.max,
- // TODO: what should we do with values that can't be parsed?
- "aria-valuenow": this._parse( this.element.val() )
- });
- },
-
- isValid: function() {
- var value = this.value();
-
- // null is invalid
- if ( value === null ) {
- return false;
- }
-
- // if value gets adjusted, it's invalid
- return value === this._adjustValue( value );
- },
-
- // update the value without triggering change
- _value: function( value, allowAny ) {
- var parsed;
- if ( value !== "" ) {
- parsed = this._parse( value );
- if ( parsed !== null ) {
- if ( !allowAny ) {
- parsed = this._adjustValue( parsed );
- }
- value = this._format( parsed );
- }
- }
- this.element.val( value );
- this._refresh();
- },
-
- _destroy: function() {
- this.element
- .removeClass( "ui-spinner-input" )
- .prop( "disabled", false )
- .removeAttr( "autocomplete" )
- .removeAttr( "role" )
- .removeAttr( "aria-valuemin" )
- .removeAttr( "aria-valuemax" )
- .removeAttr( "aria-valuenow" );
- this.uiSpinner.replaceWith( this.element );
- },
-
- stepUp: spinner_modifier(function( steps ) {
- this._stepUp( steps );
- }),
- _stepUp: function( steps ) {
- if ( this._start() ) {
- this._spin( (steps || 1) * this.options.step );
- this._stop();
- }
- },
-
- stepDown: spinner_modifier(function( steps ) {
- this._stepDown( steps );
- }),
- _stepDown: function( steps ) {
- if ( this._start() ) {
- this._spin( (steps || 1) * -this.options.step );
- this._stop();
- }
- },
-
- pageUp: spinner_modifier(function( pages ) {
- this._stepUp( (pages || 1) * this.options.page );
- }),
-
- pageDown: spinner_modifier(function( pages ) {
- this._stepDown( (pages || 1) * this.options.page );
- }),
-
- value: function( newVal ) {
- if ( !arguments.length ) {
- return this._parse( this.element.val() );
- }
- spinner_modifier( this._value ).call( this, newVal );
- },
-
- widget: function() {
- return this.uiSpinner;
- }
-});
-
-
-/*!
- * jQuery UI Tabs 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/tabs/
- */
-
-
-var tabs = $.widget( "ui.tabs", {
- version: "1.11.4",
- delay: 300,
- options: {
- active: null,
- collapsible: false,
- event: "click",
- heightStyle: "content",
- hide: null,
- show: null,
-
- // callbacks
- activate: null,
- beforeActivate: null,
- beforeLoad: null,
- load: null
- },
-
- _isLocal: (function() {
- var rhash = /#.*$/;
-
- return function( anchor ) {
- var anchorUrl, locationUrl;
-
- // support: IE7
- // IE7 doesn't normalize the href property when set via script (#9317)
- anchor = anchor.cloneNode( false );
-
- anchorUrl = anchor.href.replace( rhash, "" );
- locationUrl = location.href.replace( rhash, "" );
-
- // decoding may throw an error if the URL isn't UTF-8 (#9518)
- try {
- anchorUrl = decodeURIComponent( anchorUrl );
- } catch ( error ) {}
- try {
- locationUrl = decodeURIComponent( locationUrl );
- } catch ( error ) {}
-
- return anchor.hash.length > 1 && anchorUrl === locationUrl;
- };
- })(),
-
- _create: function() {
- var that = this,
- options = this.options;
-
- this.running = false;
-
- this.element
- .addClass( "ui-tabs ui-widget ui-widget-content ui-corner-all" )
- .toggleClass( "ui-tabs-collapsible", options.collapsible );
-
- this._processTabs();
- options.active = this._initialActive();
-
- // Take disabling tabs via class attribute from HTML
- // into account and update option properly.
- if ( $.isArray( options.disabled ) ) {
- options.disabled = $.unique( options.disabled.concat(
- $.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) {
- return that.tabs.index( li );
- })
- ) ).sort();
- }
-
- // check for length avoids error when initializing empty list
- if ( this.options.active !== false && this.anchors.length ) {
- this.active = this._findActive( options.active );
- } else {
- this.active = $();
- }
-
- this._refresh();
-
- if ( this.active.length ) {
- this.load( options.active );
- }
- },
-
- _initialActive: function() {
- var active = this.options.active,
- collapsible = this.options.collapsible,
- locationHash = location.hash.substring( 1 );
-
- if ( active === null ) {
- // check the fragment identifier in the URL
- if ( locationHash ) {
- this.tabs.each(function( i, tab ) {
- if ( $( tab ).attr( "aria-controls" ) === locationHash ) {
- active = i;
- return false;
- }
- });
- }
-
- // check for a tab marked active via a class
- if ( active === null ) {
- active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) );
- }
-
- // no active tab, set to false
- if ( active === null || active === -1 ) {
- active = this.tabs.length ? 0 : false;
- }
- }
-
- // handle numbers: negative, out of range
- if ( active !== false ) {
- active = this.tabs.index( this.tabs.eq( active ) );
- if ( active === -1 ) {
- active = collapsible ? false : 0;
- }
- }
-
- // don't allow collapsible: false and active: false
- if ( !collapsible && active === false && this.anchors.length ) {
- active = 0;
- }
-
- return active;
- },
-
- _getCreateEventData: function() {
- return {
- tab: this.active,
- panel: !this.active.length ? $() : this._getPanelForTab( this.active )
- };
- },
-
- _tabKeydown: function( event ) {
- var focusedTab = $( this.document[0].activeElement ).closest( "li" ),
- selectedIndex = this.tabs.index( focusedTab ),
- goingForward = true;
-
- if ( this._handlePageNav( event ) ) {
- return;
- }
-
- switch ( event.keyCode ) {
- case $.ui.keyCode.RIGHT:
- case $.ui.keyCode.DOWN:
- selectedIndex++;
- break;
- case $.ui.keyCode.UP:
- case $.ui.keyCode.LEFT:
- goingForward = false;
- selectedIndex--;
- break;
- case $.ui.keyCode.END:
- selectedIndex = this.anchors.length - 1;
- break;
- case $.ui.keyCode.HOME:
- selectedIndex = 0;
- break;
- case $.ui.keyCode.SPACE:
- // Activate only, no collapsing
- event.preventDefault();
- clearTimeout( this.activating );
- this._activate( selectedIndex );
- return;
- case $.ui.keyCode.ENTER:
- // Toggle (cancel delayed activation, allow collapsing)
- event.preventDefault();
- clearTimeout( this.activating );
- // Determine if we should collapse or activate
- this._activate( selectedIndex === this.options.active ? false : selectedIndex );
- return;
- default:
- return;
- }
-
- // Focus the appropriate tab, based on which key was pressed
- event.preventDefault();
- clearTimeout( this.activating );
- selectedIndex = this._focusNextTab( selectedIndex, goingForward );
-
- // Navigating with control/command key will prevent automatic activation
- if ( !event.ctrlKey && !event.metaKey ) {
-
- // Update aria-selected immediately so that AT think the tab is already selected.
- // Otherwise AT may confuse the user by stating that they need to activate the tab,
- // but the tab will already be activated by the time the announcement finishes.
- focusedTab.attr( "aria-selected", "false" );
- this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" );
-
- this.activating = this._delay(function() {
- this.option( "active", selectedIndex );
- }, this.delay );
- }
- },
-
- _panelKeydown: function( event ) {
- if ( this._handlePageNav( event ) ) {
- return;
- }
-
- // Ctrl+up moves focus to the current tab
- if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {
- event.preventDefault();
- this.active.focus();
- }
- },
-
- // Alt+page up/down moves focus to the previous/next tab (and activates)
- _handlePageNav: function( event ) {
- if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {
- this._activate( this._focusNextTab( this.options.active - 1, false ) );
- return true;
- }
- if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {
- this._activate( this._focusNextTab( this.options.active + 1, true ) );
- return true;
- }
- },
-
- _findNextTab: function( index, goingForward ) {
- var lastTabIndex = this.tabs.length - 1;
-
- function constrain() {
- if ( index > lastTabIndex ) {
- index = 0;
- }
- if ( index < 0 ) {
- index = lastTabIndex;
- }
- return index;
- }
-
- while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {
- index = goingForward ? index + 1 : index - 1;
- }
-
- return index;
- },
-
- _focusNextTab: function( index, goingForward ) {
- index = this._findNextTab( index, goingForward );
- this.tabs.eq( index ).focus();
- return index;
- },
-
- _setOption: function( key, value ) {
- if ( key === "active" ) {
- // _activate() will handle invalid values and update this.options
- this._activate( value );
- return;
- }
-
- if ( key === "disabled" ) {
- // don't use the widget factory's disabled handling
- this._setupDisabled( value );
- return;
- }
-
- this._super( key, value);
-
- if ( key === "collapsible" ) {
- this.element.toggleClass( "ui-tabs-collapsible", value );
- // Setting collapsible: false while collapsed; open first panel
- if ( !value && this.options.active === false ) {
- this._activate( 0 );
- }
- }
-
- if ( key === "event" ) {
- this._setupEvents( value );
- }
-
- if ( key === "heightStyle" ) {
- this._setupHeightStyle( value );
- }
- },
-
- _sanitizeSelector: function( hash ) {
- return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : "";
- },
-
- refresh: function() {
- var options = this.options,
- lis = this.tablist.children( ":has(a[href])" );
-
- // get disabled tabs from class attribute from HTML
- // this will get converted to a boolean if needed in _refresh()
- options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) {
- return lis.index( tab );
- });
-
- this._processTabs();
-
- // was collapsed or no tabs
- if ( options.active === false || !this.anchors.length ) {
- options.active = false;
- this.active = $();
- // was active, but active tab is gone
- } else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {
- // all remaining tabs are disabled
- if ( this.tabs.length === options.disabled.length ) {
- options.active = false;
- this.active = $();
- // activate previous tab
- } else {
- this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );
- }
- // was active, active tab still exists
- } else {
- // make sure active index is correct
- options.active = this.tabs.index( this.active );
- }
-
- this._refresh();
- },
-
- _refresh: function() {
- this._setupDisabled( this.options.disabled );
- this._setupEvents( this.options.event );
- this._setupHeightStyle( this.options.heightStyle );
-
- this.tabs.not( this.active ).attr({
- "aria-selected": "false",
- "aria-expanded": "false",
- tabIndex: -1
- });
- this.panels.not( this._getPanelForTab( this.active ) )
- .hide()
- .attr({
- "aria-hidden": "true"
- });
-
- // Make sure one tab is in the tab order
- if ( !this.active.length ) {
- this.tabs.eq( 0 ).attr( "tabIndex", 0 );
- } else {
- this.active
- .addClass( "ui-tabs-active ui-state-active" )
- .attr({
- "aria-selected": "true",
- "aria-expanded": "true",
- tabIndex: 0
- });
- this._getPanelForTab( this.active )
- .show()
- .attr({
- "aria-hidden": "false"
- });
- }
- },
-
- _processTabs: function() {
- var that = this,
- prevTabs = this.tabs,
- prevAnchors = this.anchors,
- prevPanels = this.panels;
-
- this.tablist = this._getList()
- .addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
- .attr( "role", "tablist" )
-
- // Prevent users from focusing disabled tabs via click
- .delegate( "> li", "mousedown" + this.eventNamespace, function( event ) {
- if ( $( this ).is( ".ui-state-disabled" ) ) {
- event.preventDefault();
- }
- })
-
- // support: IE <9
- // Preventing the default action in mousedown doesn't prevent IE
- // from focusing the element, so if the anchor gets focused, blur.
- // We don't have to worry about focusing the previously focused
- // element since clicking on a non-focusable element should focus
- // the body anyway.
- .delegate( ".ui-tabs-anchor", "focus" + this.eventNamespace, function() {
- if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) {
- this.blur();
- }
- });
-
- this.tabs = this.tablist.find( "> li:has(a[href])" )
- .addClass( "ui-state-default ui-corner-top" )
- .attr({
- role: "tab",
- tabIndex: -1
- });
-
- this.anchors = this.tabs.map(function() {
- return $( "a", this )[ 0 ];
- })
- .addClass( "ui-tabs-anchor" )
- .attr({
- role: "presentation",
- tabIndex: -1
- });
-
- this.panels = $();
-
- this.anchors.each(function( i, anchor ) {
- var selector, panel, panelId,
- anchorId = $( anchor ).uniqueId().attr( "id" ),
- tab = $( anchor ).closest( "li" ),
- originalAriaControls = tab.attr( "aria-controls" );
-
- // inline tab
- if ( that._isLocal( anchor ) ) {
- selector = anchor.hash;
- panelId = selector.substring( 1 );
- panel = that.element.find( that._sanitizeSelector( selector ) );
- // remote tab
- } else {
- // If the tab doesn't already have aria-controls,
- // generate an id by using a throw-away element
- panelId = tab.attr( "aria-controls" ) || $( {} ).uniqueId()[ 0 ].id;
- selector = "#" + panelId;
- panel = that.element.find( selector );
- if ( !panel.length ) {
- panel = that._createPanel( panelId );
- panel.insertAfter( that.panels[ i - 1 ] || that.tablist );
- }
- panel.attr( "aria-live", "polite" );
- }
-
- if ( panel.length) {
- that.panels = that.panels.add( panel );
- }
- if ( originalAriaControls ) {
- tab.data( "ui-tabs-aria-controls", originalAriaControls );
- }
- tab.attr({
- "aria-controls": panelId,
- "aria-labelledby": anchorId
- });
- panel.attr( "aria-labelledby", anchorId );
- });
-
- this.panels
- .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
- .attr( "role", "tabpanel" );
-
- // Avoid memory leaks (#10056)
- if ( prevTabs ) {
- this._off( prevTabs.not( this.tabs ) );
- this._off( prevAnchors.not( this.anchors ) );
- this._off( prevPanels.not( this.panels ) );
- }
- },
-
- // allow overriding how to find the list for rare usage scenarios (#7715)
- _getList: function() {
- return this.tablist || this.element.find( "ol,ul" ).eq( 0 );
- },
-
- _createPanel: function( id ) {
- return $( "<div>" )
- .attr( "id", id )
- .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
- .data( "ui-tabs-destroy", true );
- },
-
- _setupDisabled: function( disabled ) {
- if ( $.isArray( disabled ) ) {
- if ( !disabled.length ) {
- disabled = false;
- } else if ( disabled.length === this.anchors.length ) {
- disabled = true;
- }
- }
-
- // disable tabs
- for ( var i = 0, li; ( li = this.tabs[ i ] ); i++ ) {
- if ( disabled === true || $.inArray( i, disabled ) !== -1 ) {
- $( li )
- .addClass( "ui-state-disabled" )
- .attr( "aria-disabled", "true" );
- } else {
- $( li )
- .removeClass( "ui-state-disabled" )
- .removeAttr( "aria-disabled" );
- }
- }
-
- this.options.disabled = disabled;
- },
-
- _setupEvents: function( event ) {
- var events = {};
- if ( event ) {
- $.each( event.split(" "), function( index, eventName ) {
- events[ eventName ] = "_eventHandler";
- });
- }
-
- this._off( this.anchors.add( this.tabs ).add( this.panels ) );
- // Always prevent the default action, even when disabled
- this._on( true, this.anchors, {
- click: function( event ) {
- event.preventDefault();
- }
- });
- this._on( this.anchors, events );
- this._on( this.tabs, { keydown: "_tabKeydown" } );
- this._on( this.panels, { keydown: "_panelKeydown" } );
-
- this._focusable( this.tabs );
- this._hoverable( this.tabs );
- },
-
- _setupHeightStyle: function( heightStyle ) {
- var maxHeight,
- parent = this.element.parent();
-
- if ( heightStyle === "fill" ) {
- maxHeight = parent.height();
- maxHeight -= this.element.outerHeight() - this.element.height();
-
- this.element.siblings( ":visible" ).each(function() {
- var elem = $( this ),
- position = elem.css( "position" );
-
- if ( position === "absolute" || position === "fixed" ) {
- return;
- }
- maxHeight -= elem.outerHeight( true );
- });
-
- this.element.children().not( this.panels ).each(function() {
- maxHeight -= $( this ).outerHeight( true );
- });
-
- this.panels.each(function() {
- $( this ).height( Math.max( 0, maxHeight -
- $( this ).innerHeight() + $( this ).height() ) );
- })
- .css( "overflow", "auto" );
- } else if ( heightStyle === "auto" ) {
- maxHeight = 0;
- this.panels.each(function() {
- maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() );
- }).height( maxHeight );
- }
- },
-
- _eventHandler: function( event ) {
- var options = this.options,
- active = this.active,
- anchor = $( event.currentTarget ),
- tab = anchor.closest( "li" ),
- clickedIsActive = tab[ 0 ] === active[ 0 ],
- collapsing = clickedIsActive && options.collapsible,
- toShow = collapsing ? $() : this._getPanelForTab( tab ),
- toHide = !active.length ? $() : this._getPanelForTab( active ),
- eventData = {
- oldTab: active,
- oldPanel: toHide,
- newTab: collapsing ? $() : tab,
- newPanel: toShow
- };
-
- event.preventDefault();
-
- if ( tab.hasClass( "ui-state-disabled" ) ||
- // tab is already loading
- tab.hasClass( "ui-tabs-loading" ) ||
- // can't switch durning an animation
- this.running ||
- // click on active header, but not collapsible
- ( clickedIsActive && !options.collapsible ) ||
- // allow canceling activation
- ( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
- return;
- }
-
- options.active = collapsing ? false : this.tabs.index( tab );
-
- this.active = clickedIsActive ? $() : tab;
- if ( this.xhr ) {
- this.xhr.abort();
- }
-
- if ( !toHide.length && !toShow.length ) {
- $.error( "jQuery UI Tabs: Mismatching fragment identifier." );
- }
-
- if ( toShow.length ) {
- this.load( this.tabs.index( tab ), event );
- }
- this._toggle( event, eventData );
- },
-
- // handles show/hide for selecting tabs
- _toggle: function( event, eventData ) {
- var that = this,
- toShow = eventData.newPanel,
- toHide = eventData.oldPanel;
-
- this.running = true;
-
- function complete() {
- that.running = false;
- that._trigger( "activate", event, eventData );
- }
-
- function show() {
- eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" );
-
- if ( toShow.length && that.options.show ) {
- that._show( toShow, that.options.show, complete );
- } else {
- toShow.show();
- complete();
- }
- }
-
- // start out by hiding, then showing, then completing
- if ( toHide.length && this.options.hide ) {
- this._hide( toHide, this.options.hide, function() {
- eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
- show();
- });
- } else {
- eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
- toHide.hide();
- show();
- }
-
- toHide.attr( "aria-hidden", "true" );
- eventData.oldTab.attr({
- "aria-selected": "false",
- "aria-expanded": "false"
- });
- // If we're switching tabs, remove the old tab from the tab order.
- // If we're opening from collapsed state, remove the previous tab from the tab order.
- // If we're collapsing, then keep the collapsing tab in the tab order.
- if ( toShow.length && toHide.length ) {
- eventData.oldTab.attr( "tabIndex", -1 );
- } else if ( toShow.length ) {
- this.tabs.filter(function() {
- return $( this ).attr( "tabIndex" ) === 0;
- })
- .attr( "tabIndex", -1 );
- }
-
- toShow.attr( "aria-hidden", "false" );
- eventData.newTab.attr({
- "aria-selected": "true",
- "aria-expanded": "true",
- tabIndex: 0
- });
- },
-
- _activate: function( index ) {
- var anchor,
- active = this._findActive( index );
-
- // trying to activate the already active panel
- if ( active[ 0 ] === this.active[ 0 ] ) {
- return;
- }
-
- // trying to collapse, simulate a click on the current active header
- if ( !active.length ) {
- active = this.active;
- }
-
- anchor = active.find( ".ui-tabs-anchor" )[ 0 ];
- this._eventHandler({
- target: anchor,
- currentTarget: anchor,
- preventDefault: $.noop
- });
- },
-
- _findActive: function( index ) {
- return index === false ? $() : this.tabs.eq( index );
- },
-
- _getIndex: function( index ) {
- // meta-function to give users option to provide a href string instead of a numerical index.
- if ( typeof index === "string" ) {
- index = this.anchors.index( this.anchors.filter( "[href$='" + index + "']" ) );
- }
-
- return index;
- },
-
- _destroy: function() {
- if ( this.xhr ) {
- this.xhr.abort();
- }
-
- this.element.removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" );
-
- this.tablist
- .removeClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
- .removeAttr( "role" );
-
- this.anchors
- .removeClass( "ui-tabs-anchor" )
- .removeAttr( "role" )
- .removeAttr( "tabIndex" )
- .removeUniqueId();
-
- this.tablist.unbind( this.eventNamespace );
-
- this.tabs.add( this.panels ).each(function() {
- if ( $.data( this, "ui-tabs-destroy" ) ) {
- $( this ).remove();
- } else {
- $( this )
- .removeClass( "ui-state-default ui-state-active ui-state-disabled " +
- "ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel" )
- .removeAttr( "tabIndex" )
- .removeAttr( "aria-live" )
- .removeAttr( "aria-busy" )
- .removeAttr( "aria-selected" )
- .removeAttr( "aria-labelledby" )
- .removeAttr( "aria-hidden" )
- .removeAttr( "aria-expanded" )
- .removeAttr( "role" );
- }
- });
-
- this.tabs.each(function() {
- var li = $( this ),
- prev = li.data( "ui-tabs-aria-controls" );
- if ( prev ) {
- li
- .attr( "aria-controls", prev )
- .removeData( "ui-tabs-aria-controls" );
- } else {
- li.removeAttr( "aria-controls" );
- }
- });
-
- this.panels.show();
-
- if ( this.options.heightStyle !== "content" ) {
- this.panels.css( "height", "" );
- }
- },
-
- enable: function( index ) {
- var disabled = this.options.disabled;
- if ( disabled === false ) {
- return;
- }
-
- if ( index === undefined ) {
- disabled = false;
- } else {
- index = this._getIndex( index );
- if ( $.isArray( disabled ) ) {
- disabled = $.map( disabled, function( num ) {
- return num !== index ? num : null;
- });
- } else {
- disabled = $.map( this.tabs, function( li, num ) {
- return num !== index ? num : null;
- });
- }
- }
- this._setupDisabled( disabled );
- },
-
- disable: function( index ) {
- var disabled = this.options.disabled;
- if ( disabled === true ) {
- return;
- }
-
- if ( index === undefined ) {
- disabled = true;
- } else {
- index = this._getIndex( index );
- if ( $.inArray( index, disabled ) !== -1 ) {
- return;
- }
- if ( $.isArray( disabled ) ) {
- disabled = $.merge( [ index ], disabled ).sort();
- } else {
- disabled = [ index ];
- }
- }
- this._setupDisabled( disabled );
- },
-
- load: function( index, event ) {
- index = this._getIndex( index );
- var that = this,
- tab = this.tabs.eq( index ),
- anchor = tab.find( ".ui-tabs-anchor" ),
- panel = this._getPanelForTab( tab ),
- eventData = {
- tab: tab,
- panel: panel
- },
- complete = function( jqXHR, status ) {
- if ( status === "abort" ) {
- that.panels.stop( false, true );
- }
-
- tab.removeClass( "ui-tabs-loading" );
- panel.removeAttr( "aria-busy" );
-
- if ( jqXHR === that.xhr ) {
- delete that.xhr;
- }
- };
-
- // not remote
- if ( this._isLocal( anchor[ 0 ] ) ) {
- return;
- }
-
- this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );
-
- // support: jQuery <1.8
- // jQuery <1.8 returns false if the request is canceled in beforeSend,
- // but as of 1.8, $.ajax() always returns a jqXHR object.
- if ( this.xhr && this.xhr.statusText !== "canceled" ) {
- tab.addClass( "ui-tabs-loading" );
- panel.attr( "aria-busy", "true" );
-
- this.xhr
- .done(function( response, status, jqXHR ) {
- // support: jQuery <1.8
- // http://bugs.jquery.com/ticket/11778
- setTimeout(function() {
- panel.html( response );
- that._trigger( "load", event, eventData );
-
- complete( jqXHR, status );
- }, 1 );
- })
- .fail(function( jqXHR, status ) {
- // support: jQuery <1.8
- // http://bugs.jquery.com/ticket/11778
- setTimeout(function() {
- complete( jqXHR, status );
- }, 1 );
- });
- }
- },
-
- _ajaxSettings: function( anchor, event, eventData ) {
- var that = this;
- return {
- url: anchor.attr( "href" ),
- beforeSend: function( jqXHR, settings ) {
- return that._trigger( "beforeLoad", event,
- $.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) );
- }
- };
- },
-
- _getPanelForTab: function( tab ) {
- var id = $( tab ).attr( "aria-controls" );
- return this.element.find( this._sanitizeSelector( "#" + id ) );
- }
-});
-
-
-/*!
- * jQuery UI Tooltip 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/tooltip/
- */
-
-
-var tooltip = $.widget( "ui.tooltip", {
- version: "1.11.4",
- options: {
- content: function() {
- // support: IE<9, Opera in jQuery <1.7
- // .text() can't accept undefined, so coerce to a string
- var title = $( this ).attr( "title" ) || "";
- // Escape title, since we're going from an attribute to raw HTML
- return $( "<a>" ).text( title ).html();
- },
- hide: true,
- // Disabled elements have inconsistent behavior across browsers (#8661)
- items: "[title]:not([disabled])",
- position: {
- my: "left top+15",
- at: "left bottom",
- collision: "flipfit flip"
- },
- show: true,
- tooltipClass: null,
- track: false,
-
- // callbacks
- close: null,
- open: null
- },
-
- _addDescribedBy: function( elem, id ) {
- var describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ );
- describedby.push( id );
- elem
- .data( "ui-tooltip-id", id )
- .attr( "aria-describedby", $.trim( describedby.join( " " ) ) );
- },
-
- _removeDescribedBy: function( elem ) {
- var id = elem.data( "ui-tooltip-id" ),
- describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ),
- index = $.inArray( id, describedby );
-
- if ( index !== -1 ) {
- describedby.splice( index, 1 );
- }
-
- elem.removeData( "ui-tooltip-id" );
- describedby = $.trim( describedby.join( " " ) );
- if ( describedby ) {
- elem.attr( "aria-describedby", describedby );
- } else {
- elem.removeAttr( "aria-describedby" );
- }
- },
-
- _create: function() {
- this._on({
- mouseover: "open",
- focusin: "open"
- });
-
- // IDs of generated tooltips, needed for destroy
- this.tooltips = {};
-
- // IDs of parent tooltips where we removed the title attribute
- this.parents = {};
-
- if ( this.options.disabled ) {
- this._disable();
- }
-
- // Append the aria-live region so tooltips announce correctly
- this.liveRegion = $( "<div>" )
- .attr({
- role: "log",
- "aria-live": "assertive",
- "aria-relevant": "additions"
- })
- .addClass( "ui-helper-hidden-accessible" )
- .appendTo( this.document[ 0 ].body );
- },
-
- _setOption: function( key, value ) {
- var that = this;
-
- if ( key === "disabled" ) {
- this[ value ? "_disable" : "_enable" ]();
- this.options[ key ] = value;
- // disable element style changes
- return;
- }
-
- this._super( key, value );
-
- if ( key === "content" ) {
- $.each( this.tooltips, function( id, tooltipData ) {
- that._updateContent( tooltipData.element );
- });
- }
- },
-
- _disable: function() {
- var that = this;
-
- // close open tooltips
- $.each( this.tooltips, function( id, tooltipData ) {
- var event = $.Event( "blur" );
- event.target = event.currentTarget = tooltipData.element[ 0 ];
- that.close( event, true );
- });
-
- // remove title attributes to prevent native tooltips
- this.element.find( this.options.items ).addBack().each(function() {
- var element = $( this );
- if ( element.is( "[title]" ) ) {
- element
- .data( "ui-tooltip-title", element.attr( "title" ) )
- .removeAttr( "title" );
- }
- });
- },
-
- _enable: function() {
- // restore title attributes
- this.element.find( this.options.items ).addBack().each(function() {
- var element = $( this );
- if ( element.data( "ui-tooltip-title" ) ) {
- element.attr( "title", element.data( "ui-tooltip-title" ) );
- }
- });
- },
-
- open: function( event ) {
- var that = this,
- target = $( event ? event.target : this.element )
- // we need closest here due to mouseover bubbling,
- // but always pointing at the same event target
- .closest( this.options.items );
-
- // No element to show a tooltip for or the tooltip is already open
- if ( !target.length || target.data( "ui-tooltip-id" ) ) {
- return;
- }
-
- if ( target.attr( "title" ) ) {
- target.data( "ui-tooltip-title", target.attr( "title" ) );
- }
-
- target.data( "ui-tooltip-open", true );
-
- // kill parent tooltips, custom or native, for hover
- if ( event && event.type === "mouseover" ) {
- target.parents().each(function() {
- var parent = $( this ),
- blurEvent;
- if ( parent.data( "ui-tooltip-open" ) ) {
- blurEvent = $.Event( "blur" );
- blurEvent.target = blurEvent.currentTarget = this;
- that.close( blurEvent, true );
- }
- if ( parent.attr( "title" ) ) {
- parent.uniqueId();
- that.parents[ this.id ] = {
- element: this,
- title: parent.attr( "title" )
- };
- parent.attr( "title", "" );
- }
- });
- }
-
- this._registerCloseHandlers( event, target );
- this._updateContent( target, event );
- },
-
- _updateContent: function( target, event ) {
- var content,
- contentOption = this.options.content,
- that = this,
- eventType = event ? event.type : null;
-
- if ( typeof contentOption === "string" ) {
- return this._open( event, target, contentOption );
- }
-
- content = contentOption.call( target[0], function( response ) {
-
- // IE may instantly serve a cached response for ajax requests
- // delay this call to _open so the other call to _open runs first
- that._delay(function() {
-
- // Ignore async response if tooltip was closed already
- if ( !target.data( "ui-tooltip-open" ) ) {
- return;
- }
-
- // jQuery creates a special event for focusin when it doesn't
- // exist natively. To improve performance, the native event
- // object is reused and the type is changed. Therefore, we can't
- // rely on the type being correct after the event finished
- // bubbling, so we set it back to the previous value. (#8740)
- if ( event ) {
- event.type = eventType;
- }
- this._open( event, target, response );
- });
- });
- if ( content ) {
- this._open( event, target, content );
- }
- },
-
- _open: function( event, target, content ) {
- var tooltipData, tooltip, delayedShow, a11yContent,
- positionOption = $.extend( {}, this.options.position );
-
- if ( !content ) {
- return;
- }
-
- // Content can be updated multiple times. If the tooltip already
- // exists, then just update the content and bail.
- tooltipData = this._find( target );
- if ( tooltipData ) {
- tooltipData.tooltip.find( ".ui-tooltip-content" ).html( content );
- return;
- }
-
- // if we have a title, clear it to prevent the native tooltip
- // we have to check first to avoid defining a title if none exists
- // (we don't want to cause an element to start matching [title])
- //
- // We use removeAttr only for key events, to allow IE to export the correct
- // accessible attributes. For mouse events, set to empty string to avoid
- // native tooltip showing up (happens only when removing inside mouseover).
- if ( target.is( "[title]" ) ) {
- if ( event && event.type === "mouseover" ) {
- target.attr( "title", "" );
- } else {
- target.removeAttr( "title" );
- }
- }
-
- tooltipData = this._tooltip( target );
- tooltip = tooltipData.tooltip;
- this._addDescribedBy( target, tooltip.attr( "id" ) );
- tooltip.find( ".ui-tooltip-content" ).html( content );
-
- // Support: Voiceover on OS X, JAWS on IE <= 9
- // JAWS announces deletions even when aria-relevant="additions"
- // Voiceover will sometimes re-read the entire log region's contents from the beginning
- this.liveRegion.children().hide();
- if ( content.clone ) {
- a11yContent = content.clone();
- a11yContent.removeAttr( "id" ).find( "[id]" ).removeAttr( "id" );
- } else {
- a11yContent = content;
- }
- $( "<div>" ).html( a11yContent ).appendTo( this.liveRegion );
-
- function position( event ) {
- positionOption.of = event;
- if ( tooltip.is( ":hidden" ) ) {
- return;
- }
- tooltip.position( positionOption );
- }
- if ( this.options.track && event && /^mouse/.test( event.type ) ) {
- this._on( this.document, {
- mousemove: position
- });
- // trigger once to override element-relative positioning
- position( event );
- } else {
- tooltip.position( $.extend({
- of: target
- }, this.options.position ) );
- }
-
- tooltip.hide();
-
- this._show( tooltip, this.options.show );
- // Handle tracking tooltips that are shown with a delay (#8644). As soon
- // as the tooltip is visible, position the tooltip using the most recent
- // event.
- if ( this.options.show && this.options.show.delay ) {
- delayedShow = this.delayedShow = setInterval(function() {
- if ( tooltip.is( ":visible" ) ) {
- position( positionOption.of );
- clearInterval( delayedShow );
- }
- }, $.fx.interval );
- }
-
- this._trigger( "open", event, { tooltip: tooltip } );
- },
-
- _registerCloseHandlers: function( event, target ) {
- var events = {
- keyup: function( event ) {
- if ( event.keyCode === $.ui.keyCode.ESCAPE ) {
- var fakeEvent = $.Event(event);
- fakeEvent.currentTarget = target[0];
- this.close( fakeEvent, true );
- }
- }
- };
-
- // Only bind remove handler for delegated targets. Non-delegated
- // tooltips will handle this in destroy.
- if ( target[ 0 ] !== this.element[ 0 ] ) {
- events.remove = function() {
- this._removeTooltip( this._find( target ).tooltip );
- };
- }
-
- if ( !event || event.type === "mouseover" ) {
- events.mouseleave = "close";
- }
- if ( !event || event.type === "focusin" ) {
- events.focusout = "close";
- }
- this._on( true, target, events );
- },
-
- close: function( event ) {
- var tooltip,
- that = this,
- target = $( event ? event.currentTarget : this.element ),
- tooltipData = this._find( target );
-
- // The tooltip may already be closed
- if ( !tooltipData ) {
-
- // We set ui-tooltip-open immediately upon open (in open()), but only set the
- // additional data once there's actually content to show (in _open()). So even if the
- // tooltip doesn't have full data, we always remove ui-tooltip-open in case we're in
- // the period between open() and _open().
- target.removeData( "ui-tooltip-open" );
- return;
- }
-
- tooltip = tooltipData.tooltip;
-
- // disabling closes the tooltip, so we need to track when we're closing
- // to avoid an infinite loop in case the tooltip becomes disabled on close
- if ( tooltipData.closing ) {
- return;
- }
-
- // Clear the interval for delayed tracking tooltips
- clearInterval( this.delayedShow );
-
- // only set title if we had one before (see comment in _open())
- // If the title attribute has changed since open(), don't restore
- if ( target.data( "ui-tooltip-title" ) && !target.attr( "title" ) ) {
- target.attr( "title", target.data( "ui-tooltip-title" ) );
- }
-
- this._removeDescribedBy( target );
-
- tooltipData.hiding = true;
- tooltip.stop( true );
- this._hide( tooltip, this.options.hide, function() {
- that._removeTooltip( $( this ) );
- });
-
- target.removeData( "ui-tooltip-open" );
- this._off( target, "mouseleave focusout keyup" );
-
- // Remove 'remove' binding only on delegated targets
- if ( target[ 0 ] !== this.element[ 0 ] ) {
- this._off( target, "remove" );
- }
- this._off( this.document, "mousemove" );
-
- if ( event && event.type === "mouseleave" ) {
- $.each( this.parents, function( id, parent ) {
- $( parent.element ).attr( "title", parent.title );
- delete that.parents[ id ];
- });
- }
-
- tooltipData.closing = true;
- this._trigger( "close", event, { tooltip: tooltip } );
- if ( !tooltipData.hiding ) {
- tooltipData.closing = false;
- }
- },
-
- _tooltip: function( element ) {
- var tooltip = $( "<div>" )
- .attr( "role", "tooltip" )
- .addClass( "ui-tooltip ui-widget ui-corner-all ui-widget-content " +
- ( this.options.tooltipClass || "" ) ),
- id = tooltip.uniqueId().attr( "id" );
-
- $( "<div>" )
- .addClass( "ui-tooltip-content" )
- .appendTo( tooltip );
-
- tooltip.appendTo( this.document[0].body );
-
- return this.tooltips[ id ] = {
- element: element,
- tooltip: tooltip
- };
- },
-
- _find: function( target ) {
- var id = target.data( "ui-tooltip-id" );
- return id ? this.tooltips[ id ] : null;
- },
-
- _removeTooltip: function( tooltip ) {
- tooltip.remove();
- delete this.tooltips[ tooltip.attr( "id" ) ];
- },
-
- _destroy: function() {
- var that = this;
-
- // close open tooltips
- $.each( this.tooltips, function( id, tooltipData ) {
- // Delegate to close method to handle common cleanup
- var event = $.Event( "blur" ),
- element = tooltipData.element;
- event.target = event.currentTarget = element[ 0 ];
- that.close( event, true );
-
- // Remove immediately; destroying an open tooltip doesn't use the
- // hide animation
- $( "#" + id ).remove();
-
- // Restore the title
- if ( element.data( "ui-tooltip-title" ) ) {
- // If the title attribute has changed since open(), don't restore
- if ( !element.attr( "title" ) ) {
- element.attr( "title", element.data( "ui-tooltip-title" ) );
- }
- element.removeData( "ui-tooltip-title" );
- }
- });
- this.liveRegion.remove();
- }
-});
-
-
-
-})); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/js/jquery.mask.min.js b/ecomp-portal-BE/war/static/js/jquery.mask.min.js
deleted file mode 100644
index 984b5b02..00000000
--- a/ecomp-portal-BE/war/static/js/jquery.mask.min.js
+++ /dev/null
@@ -1,12 +0,0 @@
-// jQuery Mask Plugin v1.7.7
-// github.com/igorescobar/jQuery-Mask-Plugin
-(function(f){"function"===typeof define&&define.amd?define(["jquery"],f):f(window.jQuery||window.Zepto)})(function(f){var A=function(a,d,b){var h=this,m,p;a=f(a);d="function"===typeof d?d(a.val(),void 0,a,b):d;var c={getCaret:function(){try{var e,l=0,c=a.get(0),g=document.selection,d=c.selectionStart;if(g&&!~navigator.appVersion.indexOf("MSIE 10"))e=g.createRange(),e.moveStart("character",a.is("input")?-a.val().length:-a.text().length),l=e.text.length;else if(d||"0"===d)l=d;return l}catch(b){}},setCaret:function(e){try{if(a.is(":focus")){var l,
-c=a.get(0);c.setSelectionRange?c.setSelectionRange(e,e):c.createTextRange&&(l=c.createTextRange(),l.collapse(!0),l.moveEnd("character",e),l.moveStart("character",e),l.select())}}catch(g){}},events:function(){a.on("keydown.mask",function(){m=c.val()}).on("keyup.mask",c.behaviour).on("paste.mask drop.mask",function(){setTimeout(function(){a.keydown().keyup()},100)}).on("change.mask",function(){a.data("changed",!0)}).on("blur.mask",function(){m===a.val()||a.data("changed")||a.trigger("change");a.data("changed",
-!1)}).on("focusout.mask",function(){b.clearIfNotMatch&&!p.test(c.val())&&c.val("")})},getRegexMask:function(){for(var e=[],a,c,g,b,k=0;k<d.length;k++)(a=h.translation[d[k]])?(c=a.pattern.toString().replace(/.{1}$|^.{1}/g,""),g=a.optional,(a=a.recursive)?(e.push(d[k]),b={digit:d[k],pattern:c}):e.push(g||a?c+"?":c)):e.push(d[k].replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"));e=e.join("");b&&(e=e.replace(new RegExp("("+b.digit+"(.*"+b.digit+")?)"),"($1)?").replace(new RegExp(b.digit,"g"),b.pattern));return new RegExp(e)},
-destroyEvents:function(){a.off("keydown keyup paste drop change blur focusout DOMNodeInserted ".split(" ").join(".mask ")).removeData("changeCalled")},val:function(e){var c=a.is("input");return 0<arguments.length?c?a.val(e):a.text(e):c?a.val():a.text()},getMCharsBeforeCount:function(e,a){for(var c=0,b=0,f=d.length;b<f&&b<e;b++)h.translation[d.charAt(b)]||(e=a?e+1:e,c++);return c},caretPos:function(e,a,b,g){return h.translation[d.charAt(Math.min(e-1,d.length-1))]?Math.min(e+b-a-g,b):c.caretPos(e+1,
-a,b,g)},behaviour:function(a){a=a||window.event;var b=a.keyCode||a.which;if(-1===f.inArray(b,h.byPassKeys)){var d=c.getCaret(),g=c.val(),t=g.length,k=d<t,m=c.getMasked(),n=m.length,p=c.getMCharsBeforeCount(n-1)-c.getMCharsBeforeCount(t-1);m!==g&&c.val(m);!k||65===b&&a.ctrlKey||(8!==b&&46!==b&&(d=c.caretPos(d,t,n,p)),c.setCaret(d));return c.callbacks(a)}},getMasked:function(a){var l=[],f=c.val(),g=0,m=d.length,k=0,p=f.length,n=1,u="push",r=-1,q,v;b.reverse?(u="unshift",n=-1,q=0,g=m-1,k=p-1,v=function(){return-1<
-g&&-1<k}):(q=m-1,v=function(){return g<m&&k<p});for(;v();){var w=d.charAt(g),x=f.charAt(k),s=h.translation[w];if(s)x.match(s.pattern)?(l[u](x),s.recursive&&(-1===r?r=g:g===q&&(g=r-n),q===r&&(g-=n)),g+=n):s.optional&&(g+=n,k-=n),k+=n;else{if(!a)l[u](w);x===w&&(k+=n);g+=n}}a=d.charAt(q);m!==p+1||h.translation[a]||l.push(a);return l.join("")},callbacks:function(e){var f=c.val(),h=f!==m;if(!0===h&&"function"===typeof b.onChange)b.onChange(f,e,a,b);if(!0===h&&"function"===typeof b.onKeyPress)b.onKeyPress(f,
-e,a,b);if("function"===typeof b.onComplete&&f.length===d.length)b.onComplete(f,e,a,b)}};h.mask=d;h.options=b;h.remove=function(){var b;c.destroyEvents();c.val(h.getCleanVal()).removeAttr("maxlength");b=c.getCaret();c.setCaret(b-c.getMCharsBeforeCount(b));return a};h.getCleanVal=function(){return c.getMasked(!0)};h.init=function(){b=b||{};h.byPassKeys=[9,16,17,18,36,37,38,39,40,91];h.translation={0:{pattern:/\d/},9:{pattern:/\d/,optional:!0},"#":{pattern:/\d/,recursive:!0},A:{pattern:/[a-zA-Z0-9]/},
-S:{pattern:/[a-zA-Z]/}};h.translation=f.extend({},h.translation,b.translation);h=f.extend(!0,{},h,b);p=c.getRegexMask();!1!==b.maxlength&&a.attr("maxlength",d.length);b.placeholder&&a.attr("placeholder",b.placeholder);a.attr("autocomplete","off");c.destroyEvents();c.events();var e=c.getCaret();c.val(c.getMasked());c.setCaret(e+c.getMCharsBeforeCount(e,!0))}()},y={},z=function(){var a=f(this),d={};a.attr("data-mask-reverse")&&(d.reverse=!0);"false"===a.attr("data-mask-maxlength")&&(d.maxlength=!1);
-a.attr("data-mask-clearifnotmatch")&&(d.clearIfNotMatch=!0);a.mask(a.attr("data-mask"),d)};f.fn.mask=function(a,d){var b=this.selector,h=function(){var b=f(this).data("mask"),h=JSON.stringify;if("object"!==typeof b||h(b.options)!==h(d)||b.mask!==a)return f(this).data("mask",new A(this,a,d))};this.each(h);b&&!y[b]&&(y[b]=!0,setTimeout(function(){f(document).on("DOMNodeInserted.mask",b,h)},500))};f.fn.unmask=function(){try{return this.each(function(){f(this).data("mask").remove().removeData("mask")})}catch(a){}};
-f.fn.cleanVal=function(){return this.data("mask").getCleanVal()};f("*[data-mask]").each(z);f(document).on("DOMNodeInserted.mask","*[data-mask]",z)});
diff --git a/ecomp-portal-BE/war/static/js/modalService.js b/ecomp-portal-BE/war/static/js/modalService.js
deleted file mode 100644
index de81e8ec..00000000
--- a/ecomp-portal-BE/war/static/js/modalService.js
+++ /dev/null
@@ -1,144 +0,0 @@
-angular.module("modalServices",[]).service('modalService', ['$modal', function ($modal) {
-
-
- this.showSuccess = function(heading, messageBody){
- var modalInstance = $modal.open({
- templateUrl: 'modal_informative.html',
- controller: 'modalpopupController',
- resolve: {
- message: function () {
- $(".overlayed").css("display","none");
- $(".loadingId").css("display","none");
- var message = {
- title: heading,
- text: messageBody
- };
- return message;
- }
- }
- });
- };
- this.showFailure = function(heading, messageBody){
- var modalInstance = $modal.open({
- templateUrl: 'modal_warning.html',
- controller: 'modalpopupController',
- resolve: {
- message: function () {
- var message = {
- title: heading,
- text: messageBody
- };
- return message;
- }
- }
- });
- };
-
- this.showWarning = function(heading, messageBody){
- var modalInstance = $modal.open({
- templateUrl: 'modal_warning_message.html',
- controller: 'modalpopupController',
- resolve: {
- message: function () {
- var message = {
- title: heading,
- text: messageBody
- };
- return message;
- }
- }
- });
- };
-
- this.popupConfirmWin = function(title, msgBody, callback){
- var modalInstance = $modal.open({
- templateUrl: 'confirmation_informative.html',
- controller: 'modalpopupController',
- resolve: {
- message: function () {
- var message = {
- title: title,
- text: msgBody
- };
- return message;
- }
- }
- });
- var args = Array.prototype.slice.call( arguments, 0 );
- args.splice( 0, 3);
- modalInstance.result.then(function(){
- callback.apply(null, args);
- }, function() {
- })['finally'](function(){
- modalInstance = undefined;
- });
-
- };
- this.popupDeleteConfirmWin = function(title, msgBody, callback, argForCallBack){
- var modalInstance = $modal.open({
- templateUrl: 'confirmation_for_delete.html',
- controller: 'modalpopupController',
- resolve: {
- message: function () {
- var message = {
- title: title,
- text: msgBody
- };
- return message;
- }
- }
- });
-
- modalInstance.result.then(function(){
- callback(argForCallBack);
- }, function() {
- })['finally'](function(){
- modalInstance = undefined;
- });
-
- };
-
- this.popupSuccessRedirectWin = function(title, msgBody, redirectUrl){
- var modalInstance = $modal.open({
- templateUrl: 'modal_informative.html',
- controller: 'modalpopupController',
- resolve: {
- message: function () {
- var message = {
- title: title,
- text: msgBody
- };
- return message;
- }
- }
- });
- modalInstance.result.then(function() {
- }, function() {
- window.location.href=redirectUrl;
- })['finally'](function(){
- modalInstance = undefined;
- });
- };
-
- this.popupWarningRedirectWin = function(title, msgBody, redirectUrl){
- var modalInstance = $modal.open({
- templateUrl: 'modal_warning_message.html',
- controller: 'modalpopupController',
- resolve: {
- message: function () {
- var message = {
- title: title,
- text: msgBody
- };
- return message;
- }
- }
- });
- modalInstance.result.then(function() {
- }, function() {
- window.location.href=redirectUrl;
- })['finally'](function(){
- modalInstance = undefined;
- });
- };
- }]); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/oid-connect/bootstrap2/css/bootstrap-responsive.css b/ecomp-portal-BE/war/static/oid-connect/bootstrap2/css/bootstrap-responsive.css
deleted file mode 100644
index c0bba15b..00000000
--- a/ecomp-portal-BE/war/static/oid-connect/bootstrap2/css/bootstrap-responsive.css
+++ /dev/null
@@ -1,1109 +0,0 @@
-/*!
- * Bootstrap Responsive v2.3.2
- *
- * Copyright 2013 Twitter, Inc
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Designed and built with all the love in the world by @mdo and @fat.
- */
-
-.clearfix {
- *zoom: 1;
-}
-
-.clearfix:before,
-.clearfix:after {
- display: table;
- line-height: 0;
- content: "";
-}
-
-.clearfix:after {
- clear: both;
-}
-
-.hide-text {
- font: 0/0 a;
- color: transparent;
- text-shadow: none;
- background-color: transparent;
- border: 0;
-}
-
-.input-block-level {
- display: block;
- width: 100%;
- min-height: 30px;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
-
-@-ms-viewport {
- width: device-width;
-}
-
-.hidden {
- display: none;
- visibility: hidden;
-}
-
-.visible-phone {
- display: none !important;
-}
-
-.visible-tablet {
- display: none !important;
-}
-
-.hidden-desktop {
- display: none !important;
-}
-
-.visible-desktop {
- display: inherit !important;
-}
-
-@media (min-width: 768px) and (max-width: 979px) {
- .hidden-desktop {
- display: inherit !important;
- }
- .visible-desktop {
- display: none !important ;
- }
- .visible-tablet {
- display: inherit !important;
- }
- .hidden-tablet {
- display: none !important;
- }
-}
-
-@media (max-width: 767px) {
- .hidden-desktop {
- display: inherit !important;
- }
- .visible-desktop {
- display: none !important;
- }
- .visible-phone {
- display: inherit !important;
- }
- .hidden-phone {
- display: none !important;
- }
-}
-
-.visible-print {
- display: none !important;
-}
-
-@media print {
- .visible-print {
- display: inherit !important;
- }
- .hidden-print {
- display: none !important;
- }
-}
-
-@media (min-width: 1200px) {
- .row {
- margin-left: -30px;
- *zoom: 1;
- }
- .row:before,
- .row:after {
- display: table;
- line-height: 0;
- content: "";
- }
- .row:after {
- clear: both;
- }
- [class*="span"] {
- float: left;
- min-height: 1px;
- margin-left: 30px;
- }
- .container,
- .navbar-static-top .container,
- .navbar-fixed-top .container,
- .navbar-fixed-bottom .container {
- width: 1170px;
- }
- .span12 {
- width: 1170px;
- }
- .span11 {
- width: 1070px;
- }
- .span10 {
- width: 970px;
- }
- .span9 {
- width: 870px;
- }
- .span8 {
- width: 770px;
- }
- .span7 {
- width: 670px;
- }
- .span6 {
- width: 570px;
- }
- .span5 {
- width: 470px;
- }
- .span4 {
- width: 370px;
- }
- .span3 {
- width: 270px;
- }
- .span2 {
- width: 170px;
- }
- .span1 {
- width: 70px;
- }
- .offset12 {
- margin-left: 1230px;
- }
- .offset11 {
- margin-left: 1130px;
- }
- .offset10 {
- margin-left: 1030px;
- }
- .offset9 {
- margin-left: 930px;
- }
- .offset8 {
- margin-left: 830px;
- }
- .offset7 {
- margin-left: 730px;
- }
- .offset6 {
- margin-left: 630px;
- }
- .offset5 {
- margin-left: 530px;
- }
- .offset4 {
- margin-left: 430px;
- }
- .offset3 {
- margin-left: 330px;
- }
- .offset2 {
- margin-left: 230px;
- }
- .offset1 {
- margin-left: 130px;
- }
- .row-fluid {
- width: 100%;
- *zoom: 1;
- }
- .row-fluid:before,
- .row-fluid:after {
- display: table;
- line-height: 0;
- content: "";
- }
- .row-fluid:after {
- clear: both;
- }
- .row-fluid [class*="span"] {
- display: block;
- float: left;
- width: 100%;
- min-height: 30px;
- margin-left: 2.564102564102564%;
- *margin-left: 2.5109110747408616%;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- }
- .row-fluid [class*="span"]:first-child {
- margin-left: 0;
- }
- .row-fluid .controls-row [class*="span"] + [class*="span"] {
- margin-left: 2.564102564102564%;
- }
- .row-fluid .span12 {
- width: 100%;
- *width: 99.94680851063829%;
- }
- .row-fluid .span11 {
- width: 91.45299145299145%;
- *width: 91.39979996362975%;
- }
- .row-fluid .span10 {
- width: 82.90598290598291%;
- *width: 82.8527914166212%;
- }
- .row-fluid .span9 {
- width: 74.35897435897436%;
- *width: 74.30578286961266%;
- }
- .row-fluid .span8 {
- width: 65.81196581196582%;
- *width: 65.75877432260411%;
- }
- .row-fluid .span7 {
- width: 57.26495726495726%;
- *width: 57.21176577559556%;
- }
- .row-fluid .span6 {
- width: 48.717948717948715%;
- *width: 48.664757228587014%;
- }
- .row-fluid .span5 {
- width: 40.17094017094017%;
- *width: 40.11774868157847%;
- }
- .row-fluid .span4 {
- width: 31.623931623931625%;
- *width: 31.570740134569924%;
- }
- .row-fluid .span3 {
- width: 23.076923076923077%;
- *width: 23.023731587561375%;
- }
- .row-fluid .span2 {
- width: 14.52991452991453%;
- *width: 14.476723040552828%;
- }
- .row-fluid .span1 {
- width: 5.982905982905983%;
- *width: 5.929714493544281%;
- }
- .row-fluid .offset12 {
- margin-left: 105.12820512820512%;
- *margin-left: 105.02182214948171%;
- }
- .row-fluid .offset12:first-child {
- margin-left: 102.56410256410257%;
- *margin-left: 102.45771958537915%;
- }
- .row-fluid .offset11 {
- margin-left: 96.58119658119658%;
- *margin-left: 96.47481360247316%;
- }
- .row-fluid .offset11:first-child {
- margin-left: 94.01709401709402%;
- *margin-left: 93.91071103837061%;
- }
- .row-fluid .offset10 {
- margin-left: 88.03418803418803%;
- *margin-left: 87.92780505546462%;
- }
- .row-fluid .offset10:first-child {
- margin-left: 85.47008547008548%;
- *margin-left: 85.36370249136206%;
- }
- .row-fluid .offset9 {
- margin-left: 79.48717948717949%;
- *margin-left: 79.38079650845607%;
- }
- .row-fluid .offset9:first-child {
- margin-left: 76.92307692307693%;
- *margin-left: 76.81669394435352%;
- }
- .row-fluid .offset8 {
- margin-left: 70.94017094017094%;
- *margin-left: 70.83378796144753%;
- }
- .row-fluid .offset8:first-child {
- margin-left: 68.37606837606839%;
- *margin-left: 68.26968539734497%;
- }
- .row-fluid .offset7 {
- margin-left: 62.393162393162385%;
- *margin-left: 62.28677941443899%;
- }
- .row-fluid .offset7:first-child {
- margin-left: 59.82905982905982%;
- *margin-left: 59.72267685033642%;
- }
- .row-fluid .offset6 {
- margin-left: 53.84615384615384%;
- *margin-left: 53.739770867430444%;
- }
- .row-fluid .offset6:first-child {
- margin-left: 51.28205128205128%;
- *margin-left: 51.175668303327875%;
- }
- .row-fluid .offset5 {
- margin-left: 45.299145299145295%;
- *margin-left: 45.1927623204219%;
- }
- .row-fluid .offset5:first-child {
- margin-left: 42.73504273504273%;
- *margin-left: 42.62865975631933%;
- }
- .row-fluid .offset4 {
- margin-left: 36.75213675213675%;
- *margin-left: 36.645753773413354%;
- }
- .row-fluid .offset4:first-child {
- margin-left: 34.18803418803419%;
- *margin-left: 34.081651209310785%;
- }
- .row-fluid .offset3 {
- margin-left: 28.205128205128204%;
- *margin-left: 28.0987452264048%;
- }
- .row-fluid .offset3:first-child {
- margin-left: 25.641025641025642%;
- *margin-left: 25.53464266230224%;
- }
- .row-fluid .offset2 {
- margin-left: 19.65811965811966%;
- *margin-left: 19.551736679396257%;
- }
- .row-fluid .offset2:first-child {
- margin-left: 17.094017094017094%;
- *margin-left: 16.98763411529369%;
- }
- .row-fluid .offset1 {
- margin-left: 11.11111111111111%;
- *margin-left: 11.004728132387708%;
- }
- .row-fluid .offset1:first-child {
- margin-left: 8.547008547008547%;
- *margin-left: 8.440625568285142%;
- }
- input,
- textarea,
- .uneditable-input {
- margin-left: 0;
- }
- .controls-row [class*="span"] + [class*="span"] {
- margin-left: 30px;
- }
- input.span12,
- textarea.span12,
- .uneditable-input.span12 {
- width: 1156px;
- }
- input.span11,
- textarea.span11,
- .uneditable-input.span11 {
- width: 1056px;
- }
- input.span10,
- textarea.span10,
- .uneditable-input.span10 {
- width: 956px;
- }
- input.span9,
- textarea.span9,
- .uneditable-input.span9 {
- width: 856px;
- }
- input.span8,
- textarea.span8,
- .uneditable-input.span8 {
- width: 756px;
- }
- input.span7,
- textarea.span7,
- .uneditable-input.span7 {
- width: 656px;
- }
- input.span6,
- textarea.span6,
- .uneditable-input.span6 {
- width: 556px;
- }
- input.span5,
- textarea.span5,
- .uneditable-input.span5 {
- width: 456px;
- }
- input.span4,
- textarea.span4,
- .uneditable-input.span4 {
- width: 356px;
- }
- input.span3,
- textarea.span3,
- .uneditable-input.span3 {
- width: 256px;
- }
- input.span2,
- textarea.span2,
- .uneditable-input.span2 {
- width: 156px;
- }
- input.span1,
- textarea.span1,
- .uneditable-input.span1 {
- width: 56px;
- }
- .thumbnails {
- margin-left: -30px;
- }
- .thumbnails > li {
- margin-left: 30px;
- }
- .row-fluid .thumbnails {
- margin-left: 0;
- }
-}
-
-@media (min-width: 768px) and (max-width: 979px) {
- .row {
- margin-left: -20px;
- *zoom: 1;
- }
- .row:before,
- .row:after {
- display: table;
- line-height: 0;
- content: "";
- }
- .row:after {
- clear: both;
- }
- [class*="span"] {
- float: left;
- min-height: 1px;
- margin-left: 20px;
- }
- .container,
- .navbar-static-top .container,
- .navbar-fixed-top .container,
- .navbar-fixed-bottom .container {
- width: 724px;
- }
- .span12 {
- width: 724px;
- }
- .span11 {
- width: 662px;
- }
- .span10 {
- width: 600px;
- }
- .span9 {
- width: 538px;
- }
- .span8 {
- width: 476px;
- }
- .span7 {
- width: 414px;
- }
- .span6 {
- width: 352px;
- }
- .span5 {
- width: 290px;
- }
- .span4 {
- width: 228px;
- }
- .span3 {
- width: 166px;
- }
- .span2 {
- width: 104px;
- }
- .span1 {
- width: 42px;
- }
- .offset12 {
- margin-left: 764px;
- }
- .offset11 {
- margin-left: 702px;
- }
- .offset10 {
- margin-left: 640px;
- }
- .offset9 {
- margin-left: 578px;
- }
- .offset8 {
- margin-left: 516px;
- }
- .offset7 {
- margin-left: 454px;
- }
- .offset6 {
- margin-left: 392px;
- }
- .offset5 {
- margin-left: 330px;
- }
- .offset4 {
- margin-left: 268px;
- }
- .offset3 {
- margin-left: 206px;
- }
- .offset2 {
- margin-left: 144px;
- }
- .offset1 {
- margin-left: 82px;
- }
- .row-fluid {
- width: 100%;
- *zoom: 1;
- }
- .row-fluid:before,
- .row-fluid:after {
- display: table;
- line-height: 0;
- content: "";
- }
- .row-fluid:after {
- clear: both;
- }
- .row-fluid [class*="span"] {
- display: block;
- float: left;
- width: 100%;
- min-height: 30px;
- margin-left: 2.7624309392265194%;
- *margin-left: 2.709239449864817%;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- }
- .row-fluid [class*="span"]:first-child {
- margin-left: 0;
- }
- .row-fluid .controls-row [class*="span"] + [class*="span"] {
- margin-left: 2.7624309392265194%;
- }
- .row-fluid .span12 {
- width: 100%;
- *width: 99.94680851063829%;
- }
- .row-fluid .span11 {
- width: 91.43646408839778%;
- *width: 91.38327259903608%;
- }
- .row-fluid .span10 {
- width: 82.87292817679558%;
- *width: 82.81973668743387%;
- }
- .row-fluid .span9 {
- width: 74.30939226519337%;
- *width: 74.25620077583166%;
- }
- .row-fluid .span8 {
- width: 65.74585635359117%;
- *width: 65.69266486422946%;
- }
- .row-fluid .span7 {
- width: 57.18232044198895%;
- *width: 57.12912895262725%;
- }
- .row-fluid .span6 {
- width: 48.61878453038674%;
- *width: 48.56559304102504%;
- }
- .row-fluid .span5 {
- width: 40.05524861878453%;
- *width: 40.00205712942283%;
- }
- .row-fluid .span4 {
- width: 31.491712707182323%;
- *width: 31.43852121782062%;
- }
- .row-fluid .span3 {
- width: 22.92817679558011%;
- *width: 22.87498530621841%;
- }
- .row-fluid .span2 {
- width: 14.3646408839779%;
- *width: 14.311449394616199%;
- }
- .row-fluid .span1 {
- width: 5.801104972375691%;
- *width: 5.747913483013988%;
- }
- .row-fluid .offset12 {
- margin-left: 105.52486187845304%;
- *margin-left: 105.41847889972962%;
- }
- .row-fluid .offset12:first-child {
- margin-left: 102.76243093922652%;
- *margin-left: 102.6560479605031%;
- }
- .row-fluid .offset11 {
- margin-left: 96.96132596685082%;
- *margin-left: 96.8549429881274%;
- }
- .row-fluid .offset11:first-child {
- margin-left: 94.1988950276243%;
- *margin-left: 94.09251204890089%;
- }
- .row-fluid .offset10 {
- margin-left: 88.39779005524862%;
- *margin-left: 88.2914070765252%;
- }
- .row-fluid .offset10:first-child {
- margin-left: 85.6353591160221%;
- *margin-left: 85.52897613729868%;
- }
- .row-fluid .offset9 {
- margin-left: 79.8342541436464%;
- *margin-left: 79.72787116492299%;
- }
- .row-fluid .offset9:first-child {
- margin-left: 77.07182320441989%;
- *margin-left: 76.96544022569647%;
- }
- .row-fluid .offset8 {
- margin-left: 71.2707182320442%;
- *margin-left: 71.16433525332079%;
- }
- .row-fluid .offset8:first-child {
- margin-left: 68.50828729281768%;
- *margin-left: 68.40190431409427%;
- }
- .row-fluid .offset7 {
- margin-left: 62.70718232044199%;
- *margin-left: 62.600799341718584%;
- }
- .row-fluid .offset7:first-child {
- margin-left: 59.94475138121547%;
- *margin-left: 59.838368402492065%;
- }
- .row-fluid .offset6 {
- margin-left: 54.14364640883978%;
- *margin-left: 54.037263430116376%;
- }
- .row-fluid .offset6:first-child {
- margin-left: 51.38121546961326%;
- *margin-left: 51.27483249088986%;
- }
- .row-fluid .offset5 {
- margin-left: 45.58011049723757%;
- *margin-left: 45.47372751851417%;
- }
- .row-fluid .offset5:first-child {
- margin-left: 42.81767955801105%;
- *margin-left: 42.71129657928765%;
- }
- .row-fluid .offset4 {
- margin-left: 37.01657458563536%;
- *margin-left: 36.91019160691196%;
- }
- .row-fluid .offset4:first-child {
- margin-left: 34.25414364640884%;
- *margin-left: 34.14776066768544%;
- }
- .row-fluid .offset3 {
- margin-left: 28.45303867403315%;
- *margin-left: 28.346655695309746%;
- }
- .row-fluid .offset3:first-child {
- margin-left: 25.69060773480663%;
- *margin-left: 25.584224756083227%;
- }
- .row-fluid .offset2 {
- margin-left: 19.88950276243094%;
- *margin-left: 19.783119783707537%;
- }
- .row-fluid .offset2:first-child {
- margin-left: 17.12707182320442%;
- *margin-left: 17.02068884448102%;
- }
- .row-fluid .offset1 {
- margin-left: 11.32596685082873%;
- *margin-left: 11.219583872105325%;
- }
- .row-fluid .offset1:first-child {
- margin-left: 8.56353591160221%;
- *margin-left: 8.457152932878806%;
- }
- input,
- textarea,
- .uneditable-input {
- margin-left: 0;
- }
- .controls-row [class*="span"] + [class*="span"] {
- margin-left: 20px;
- }
- input.span12,
- textarea.span12,
- .uneditable-input.span12 {
- width: 710px;
- }
- input.span11,
- textarea.span11,
- .uneditable-input.span11 {
- width: 648px;
- }
- input.span10,
- textarea.span10,
- .uneditable-input.span10 {
- width: 586px;
- }
- input.span9,
- textarea.span9,
- .uneditable-input.span9 {
- width: 524px;
- }
- input.span8,
- textarea.span8,
- .uneditable-input.span8 {
- width: 462px;
- }
- input.span7,
- textarea.span7,
- .uneditable-input.span7 {
- width: 400px;
- }
- input.span6,
- textarea.span6,
- .uneditable-input.span6 {
- width: 338px;
- }
- input.span5,
- textarea.span5,
- .uneditable-input.span5 {
- width: 276px;
- }
- input.span4,
- textarea.span4,
- .uneditable-input.span4 {
- width: 214px;
- }
- input.span3,
- textarea.span3,
- .uneditable-input.span3 {
- width: 152px;
- }
- input.span2,
- textarea.span2,
- .uneditable-input.span2 {
- width: 90px;
- }
- input.span1,
- textarea.span1,
- .uneditable-input.span1 {
- width: 28px;
- }
-}
-
-@media (max-width: 767px) {
- body {
- padding-right: 20px;
- padding-left: 20px;
- }
- .navbar-fixed-top,
- .navbar-fixed-bottom,
- .navbar-static-top {
- margin-right: -20px;
- margin-left: -20px;
- }
- .container-fluid {
- padding: 0;
- }
- .dl-horizontal dt {
- float: none;
- width: auto;
- clear: none;
- text-align: left;
- }
- .dl-horizontal dd {
- margin-left: 0;
- }
- .container {
- width: auto;
- }
- .row-fluid {
- width: 100%;
- }
- .row,
- .thumbnails {
- margin-left: 0;
- }
- .thumbnails > li {
- float: none;
- margin-left: 0;
- }
- [class*="span"],
- .uneditable-input[class*="span"],
- .row-fluid [class*="span"] {
- display: block;
- float: none;
- width: 100%;
- margin-left: 0;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- }
- .span12,
- .row-fluid .span12 {
- width: 100%;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- }
- .row-fluid [class*="offset"]:first-child {
- margin-left: 0;
- }
- .input-large,
- .input-xlarge,
- .input-xxlarge,
- input[class*="span"],
- select[class*="span"],
- textarea[class*="span"],
- .uneditable-input {
- display: block;
- width: 100%;
- min-height: 30px;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- }
- .input-prepend input,
- .input-append input,
- .input-prepend input[class*="span"],
- .input-append input[class*="span"] {
- display: inline-block;
- width: auto;
- }
- .controls-row [class*="span"] + [class*="span"] {
- margin-left: 0;
- }
- .modal {
- position: fixed;
- top: 20px;
- right: 20px;
- left: 20px;
- width: auto;
- margin: 0;
- }
- .modal.fade {
- top: -100px;
- }
- .modal.fade.in {
- top: 20px;
- }
-}
-
-@media (max-width: 480px) {
- .nav-collapse {
- -webkit-transform: translate3d(0, 0, 0);
- }
- .page-header h1 small {
- display: block;
- line-height: 20px;
- }
- input[type="checkbox"],
- input[type="radio"] {
- border: 1px solid #ccc;
- }
- .form-horizontal .control-label {
- float: none;
- width: auto;
- padding-top: 0;
- text-align: left;
- }
- .form-horizontal .controls {
- margin-left: 0;
- }
- .form-horizontal .control-list {
- padding-top: 0;
- }
- .form-horizontal .form-actions {
- padding-right: 10px;
- padding-left: 10px;
- }
- .media .pull-left,
- .media .pull-right {
- display: block;
- float: none;
- margin-bottom: 10px;
- }
- .media-object {
- margin-right: 0;
- margin-left: 0;
- }
- .modal {
- top: 10px;
- right: 10px;
- left: 10px;
- }
- .modal-header .close {
- padding: 10px;
- margin: -10px;
- }
- .carousel-caption {
- position: static;
- }
-}
-
-@media (max-width: 979px) {
- body {
- padding-top: 0;
- }
- .navbar-fixed-top,
- .navbar-fixed-bottom {
- position: static;
- }
- .navbar-fixed-top {
- margin-bottom: 20px;
- }
- .navbar-fixed-bottom {
- margin-top: 20px;
- }
- .navbar-fixed-top .navbar-inner,
- .navbar-fixed-bottom .navbar-inner {
- padding: 5px;
- }
- .navbar .container {
- width: auto;
- padding: 0;
- }
- .navbar .brand {
- padding-right: 10px;
- padding-left: 10px;
- margin: 0 0 0 -5px;
- }
- .nav-collapse {
- clear: both;
- }
- .nav-collapse .nav {
- float: none;
- margin: 0 0 10px;
- }
- .nav-collapse .nav > li {
- float: none;
- }
- .nav-collapse .nav > li > a {
- margin-bottom: 2px;
- }
- .nav-collapse .nav > .divider-vertical {
- display: none;
- }
- .nav-collapse .nav .nav-header {
- color: #777777;
- text-shadow: none;
- }
- .nav-collapse .nav > li > a,
- .nav-collapse .dropdown-menu a {
- padding: 9px 15px;
- font-weight: bold;
- color: #777777;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- }
- .nav-collapse .btn {
- padding: 4px 10px 4px;
- font-weight: normal;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
- }
- .nav-collapse .dropdown-menu li + li a {
- margin-bottom: 2px;
- }
- .nav-collapse .nav > li > a:hover,
- .nav-collapse .nav > li > a:focus,
- .nav-collapse .dropdown-menu a:hover,
- .nav-collapse .dropdown-menu a:focus {
- background-color: #f2f2f2;
- }
- .navbar-inverse .nav-collapse .nav > li > a,
- .navbar-inverse .nav-collapse .dropdown-menu a {
- color: #999999;
- }
- .navbar-inverse .nav-collapse .nav > li > a:hover,
- .navbar-inverse .nav-collapse .nav > li > a:focus,
- .navbar-inverse .nav-collapse .dropdown-menu a:hover,
- .navbar-inverse .nav-collapse .dropdown-menu a:focus {
- background-color: #111111;
- }
- .nav-collapse.in .btn-group {
- padding: 0;
- margin-top: 5px;
- }
- .nav-collapse .dropdown-menu {
- position: static;
- top: auto;
- left: auto;
- display: none;
- float: none;
- max-width: none;
- padding: 0;
- margin: 0 15px;
- background-color: transparent;
- border: none;
- -webkit-border-radius: 0;
- -moz-border-radius: 0;
- border-radius: 0;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
- }
- .nav-collapse .open > .dropdown-menu {
- display: block;
- }
- .nav-collapse .dropdown-menu:before,
- .nav-collapse .dropdown-menu:after {
- display: none;
- }
- .nav-collapse .dropdown-menu .divider {
- display: none;
- }
- .nav-collapse .nav > li > .dropdown-menu:before,
- .nav-collapse .nav > li > .dropdown-menu:after {
- display: none;
- }
- .nav-collapse .navbar-form,
- .nav-collapse .navbar-search {
- float: none;
- padding: 10px 15px;
- margin: 10px 0;
- border-top: 1px solid #f2f2f2;
- border-bottom: 1px solid #f2f2f2;
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
- -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
- }
- .navbar-inverse .nav-collapse .navbar-form,
- .navbar-inverse .nav-collapse .navbar-search {
- border-top-color: #111111;
- border-bottom-color: #111111;
- }
- .navbar .nav-collapse .nav.pull-right {
- float: none;
- margin-left: 0;
- }
- .nav-collapse,
- .nav-collapse.collapse {
- height: 0;
- overflow: hidden;
- }
- .navbar .btn-navbar {
- display: block;
- }
- .navbar-static .navbar-inner {
- padding-right: 10px;
- padding-left: 10px;
- }
-}
-
-@media (min-width: 980px) {
- .nav-collapse.collapse {
- height: auto !important;
- overflow: visible !important;
- }
-}
diff --git a/ecomp-portal-BE/war/static/oid-connect/bootstrap2/css/bootstrap-responsive.min.css b/ecomp-portal-BE/war/static/oid-connect/bootstrap2/css/bootstrap-responsive.min.css
deleted file mode 100644
index 96a435be..00000000
--- a/ecomp-portal-BE/war/static/oid-connect/bootstrap2/css/bootstrap-responsive.min.css
+++ /dev/null
@@ -1,9 +0,0 @@
-/*!
- * Bootstrap Responsive v2.3.2
- *
- * Copyright 2013 Twitter, Inc
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Designed and built with all the love in the world by @mdo and @fat.
- */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@-ms-viewport{width:device-width}.hidden{display:none;visibility:hidden}.visible-phone{display:none!important}.visible-tablet{display:none!important}.hidden-desktop{display:none!important}.visible-desktop{display:inherit!important}@media(min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}}@media(max-width:767px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-phone{display:inherit!important}.hidden-phone{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:inherit!important}.hidden-print{display:none!important}}@media(min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:30px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.564102564102564%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%}.row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%}.row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%}.row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%}.row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%}.row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%}.row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%}.row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%}.row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%}.row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%}.row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%}.row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%}.row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%}.row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%}.row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%}.row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%}.row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%}.row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%}.row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%}.row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%}.row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%}.row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%}.row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%}.row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%}.row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%}.row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%}.row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%}.row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%}.row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%}.row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%}.row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%}.row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%}.row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%}.row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%}.row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:30px}input.span12,textarea.span12,.uneditable-input.span12{width:1156px}input.span11,textarea.span11,.uneditable-input.span11{width:1056px}input.span10,textarea.span10,.uneditable-input.span10{width:956px}input.span9,textarea.span9,.uneditable-input.span9{width:856px}input.span8,textarea.span8,.uneditable-input.span8{width:756px}input.span7,textarea.span7,.uneditable-input.span7{width:656px}input.span6,textarea.span6,.uneditable-input.span6{width:556px}input.span5,textarea.span5,.uneditable-input.span5{width:456px}input.span4,textarea.span4,.uneditable-input.span4{width:356px}input.span3,textarea.span3,.uneditable-input.span3{width:256px}input.span2,textarea.span2,.uneditable-input.span2{width:156px}input.span1,textarea.span1,.uneditable-input.span1{width:56px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.7624309392265194%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%}.row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%}.row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%}.row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%}.row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%}.row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%}.row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%}.row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%}.row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%}.row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%}.row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%}.row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%}.row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%}.row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%}.row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%}.row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%}.row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%}.row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%}.row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%}.row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%}.row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%}.row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%}.row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%}.row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%}.row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%}.row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%}.row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%}.row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%}.row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%}.row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%}.row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%}.row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%}.row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%}.row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%}.row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:710px}input.span11,textarea.span11,.uneditable-input.span11{width:648px}input.span10,textarea.span10,.uneditable-input.span10{width:586px}input.span9,textarea.span9,.uneditable-input.span9{width:524px}input.span8,textarea.span8,.uneditable-input.span8{width:462px}input.span7,textarea.span7,.uneditable-input.span7{width:400px}input.span6,textarea.span6,.uneditable-input.span6{width:338px}input.span5,textarea.span5,.uneditable-input.span5{width:276px}input.span4,textarea.span4,.uneditable-input.span4{width:214px}input.span3,textarea.span3,.uneditable-input.span3{width:152px}input.span2,textarea.span2,.uneditable-input.span2{width:90px}input.span1,textarea.span1,.uneditable-input.span1{width:28px}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}.thumbnails>li{float:none;margin-left:0}[class*="span"],.uneditable-input[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="offset"]:first-child{margin-left:0}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}.controls-row [class*="span"]+[class*="span"]{margin-left:0}.modal{position:fixed;top:20px;right:20px;left:20px;width:auto;margin:0}.modal.fade{top:-100px}.modal.fade.in{top:20px}}@media(max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:20px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.media .pull-left,.media .pull-right{display:block;float:none;margin-bottom:10px}.media-object{margin-right:0;margin-left:0}.modal{top:10px;right:10px;left:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top,.navbar-fixed-bottom{position:static}.navbar-fixed-top{margin-bottom:20px}.navbar-fixed-bottom{margin-top:20px}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 10px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#777;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#777;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .nav>li>a:focus,.nav-collapse .dropdown-menu a:hover,.nav-collapse .dropdown-menu a:focus{background-color:#f2f2f2}.navbar-inverse .nav-collapse .nav>li>a,.navbar-inverse .nav-collapse .dropdown-menu a{color:#999}.navbar-inverse .nav-collapse .nav>li>a:hover,.navbar-inverse .nav-collapse .nav>li>a:focus,.navbar-inverse .nav-collapse .dropdown-menu a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:focus{background-color:#111}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:none;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .open>.dropdown-menu{display:block}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .nav>li>.dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111;border-bottom-color:#111}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}}
diff --git a/ecomp-portal-BE/war/static/oid-connect/bootstrap2/css/bootstrap.css b/ecomp-portal-BE/war/static/oid-connect/bootstrap2/css/bootstrap.css
deleted file mode 100644
index 5b7fe7e8..00000000
--- a/ecomp-portal-BE/war/static/oid-connect/bootstrap2/css/bootstrap.css
+++ /dev/null
@@ -1,6167 +0,0 @@
-/*!
- * Bootstrap v2.3.2
- *
- * Copyright 2013 Twitter, Inc
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Designed and built with all the love in the world by @mdo and @fat.
- */
-
-.clearfix {
- *zoom: 1;
-}
-
-.clearfix:before,
-.clearfix:after {
- display: table;
- line-height: 0;
- content: "";
-}
-
-.clearfix:after {
- clear: both;
-}
-
-.hide-text {
- font: 0/0 a;
- color: transparent;
- text-shadow: none;
- background-color: transparent;
- border: 0;
-}
-
-.input-block-level {
- display: block;
- width: 100%;
- min-height: 30px;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
-
-article,
-aside,
-details,
-figcaption,
-figure,
-footer,
-header,
-hgroup,
-nav,
-section {
- display: block;
-}
-
-audio,
-canvas,
-video {
- display: inline-block;
- *display: inline;
- *zoom: 1;
-}
-
-audio:not([controls]) {
- display: none;
-}
-
-html {
- font-size: 100%;
- -webkit-text-size-adjust: 100%;
- -ms-text-size-adjust: 100%;
-}
-
-a:focus {
- outline: thin dotted #333;
- outline: 5px auto -webkit-focus-ring-color;
- outline-offset: -2px;
-}
-
-a:hover,
-a:active {
- outline: 0;
-}
-
-sub,
-sup {
- position: relative;
- font-size: 75%;
- line-height: 0;
- vertical-align: baseline;
-}
-
-sup {
- top: -0.5em;
-}
-
-sub {
- bottom: -0.25em;
-}
-
-img {
- width: auto\9;
- height: auto;
- max-width: 100%;
- vertical-align: middle;
- border: 0;
- -ms-interpolation-mode: bicubic;
-}
-
-#map_canvas img,
-.google-maps img {
- max-width: none;
-}
-
-button,
-input,
-select,
-textarea {
- margin: 0;
- font-size: 100%;
- vertical-align: middle;
-}
-
-button,
-input {
- *overflow: visible;
- line-height: normal;
-}
-
-button::-moz-focus-inner,
-input::-moz-focus-inner {
- padding: 0;
- border: 0;
-}
-
-button,
-html input[type="button"],
-input[type="reset"],
-input[type="submit"] {
- cursor: pointer;
- -webkit-appearance: button;
-}
-
-label,
-select,
-button,
-input[type="button"],
-input[type="reset"],
-input[type="submit"],
-input[type="radio"],
-input[type="checkbox"] {
- cursor: pointer;
-}
-
-input[type="search"] {
- -webkit-box-sizing: content-box;
- -moz-box-sizing: content-box;
- box-sizing: content-box;
- -webkit-appearance: textfield;
-}
-
-input[type="search"]::-webkit-search-decoration,
-input[type="search"]::-webkit-search-cancel-button {
- -webkit-appearance: none;
-}
-
-textarea {
- overflow: auto;
- vertical-align: top;
-}
-
-@media print {
- * {
- color: #000 !important;
- text-shadow: none !important;
- background: transparent !important;
- box-shadow: none !important;
- }
- a,
- a:visited {
- text-decoration: underline;
- }
- a[href]:after {
- content: " (" attr(href) ")";
- }
- abbr[title]:after {
- content: " (" attr(title) ")";
- }
- .ir a:after,
- a[href^="javascript:"]:after,
- a[href^="#"]:after {
- content: "";
- }
- pre,
- blockquote {
- border: 1px solid #999;
- 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;
- }
-}
-
-body {
- margin: 0;
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size: 14px;
- line-height: 20px;
- color: #333333;
- background-color: #ffffff;
-}
-
-a {
- color: #0088cc;
- text-decoration: none;
-}
-
-a:hover,
-a:focus {
- color: #005580;
- text-decoration: underline;
-}
-
-.img-rounded {
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
-}
-
-.img-polaroid {
- padding: 4px;
- background-color: #fff;
- border: 1px solid #ccc;
- border: 1px solid rgba(0, 0, 0, 0.2);
- -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
- -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
-}
-
-.img-circle {
- -webkit-border-radius: 500px;
- -moz-border-radius: 500px;
- border-radius: 500px;
-}
-
-.row {
- margin-left: -20px;
- *zoom: 1;
-}
-
-.row:before,
-.row:after {
- display: table;
- line-height: 0;
- content: "";
-}
-
-.row:after {
- clear: both;
-}
-
-[class*="span"] {
- float: left;
- min-height: 1px;
- margin-left: 20px;
-}
-
-.container,
-.navbar-static-top .container,
-.navbar-fixed-top .container,
-.navbar-fixed-bottom .container {
- width: 940px;
-}
-
-.span12 {
- width: 940px;
-}
-
-.span11 {
- width: 860px;
-}
-
-.span10 {
- width: 780px;
-}
-
-.span9 {
- width: 700px;
-}
-
-.span8 {
- width: 620px;
-}
-
-.span7 {
- width: 540px;
-}
-
-.span6 {
- width: 460px;
-}
-
-.span5 {
- width: 380px;
-}
-
-.span4 {
- width: 300px;
-}
-
-.span3 {
- width: 220px;
-}
-
-.span2 {
- width: 140px;
-}
-
-.span1 {
- width: 60px;
-}
-
-.offset12 {
- margin-left: 980px;
-}
-
-.offset11 {
- margin-left: 900px;
-}
-
-.offset10 {
- margin-left: 820px;
-}
-
-.offset9 {
- margin-left: 740px;
-}
-
-.offset8 {
- margin-left: 660px;
-}
-
-.offset7 {
- margin-left: 580px;
-}
-
-.offset6 {
- margin-left: 500px;
-}
-
-.offset5 {
- margin-left: 420px;
-}
-
-.offset4 {
- margin-left: 340px;
-}
-
-.offset3 {
- margin-left: 260px;
-}
-
-.offset2 {
- margin-left: 180px;
-}
-
-.offset1 {
- margin-left: 100px;
-}
-
-.row-fluid {
- width: 100%;
- *zoom: 1;
-}
-
-.row-fluid:before,
-.row-fluid:after {
- display: table;
- line-height: 0;
- content: "";
-}
-
-.row-fluid:after {
- clear: both;
-}
-
-.row-fluid [class*="span"] {
- display: block;
- float: left;
- width: 100%;
- min-height: 30px;
- margin-left: 2.127659574468085%;
- *margin-left: 2.074468085106383%;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
-
-.row-fluid [class*="span"]:first-child {
- margin-left: 0;
-}
-
-.row-fluid .controls-row [class*="span"] + [class*="span"] {
- margin-left: 2.127659574468085%;
-}
-
-.row-fluid .span12 {
- width: 100%;
- *width: 99.94680851063829%;
-}
-
-.row-fluid .span11 {
- width: 91.48936170212765%;
- *width: 91.43617021276594%;
-}
-
-.row-fluid .span10 {
- width: 82.97872340425532%;
- *width: 82.92553191489361%;
-}
-
-.row-fluid .span9 {
- width: 74.46808510638297%;
- *width: 74.41489361702126%;
-}
-
-.row-fluid .span8 {
- width: 65.95744680851064%;
- *width: 65.90425531914893%;
-}
-
-.row-fluid .span7 {
- width: 57.44680851063829%;
- *width: 57.39361702127659%;
-}
-
-.row-fluid .span6 {
- width: 48.93617021276595%;
- *width: 48.88297872340425%;
-}
-
-.row-fluid .span5 {
- width: 40.42553191489362%;
- *width: 40.37234042553192%;
-}
-
-.row-fluid .span4 {
- width: 31.914893617021278%;
- *width: 31.861702127659576%;
-}
-
-.row-fluid .span3 {
- width: 23.404255319148934%;
- *width: 23.351063829787233%;
-}
-
-.row-fluid .span2 {
- width: 14.893617021276595%;
- *width: 14.840425531914894%;
-}
-
-.row-fluid .span1 {
- width: 6.382978723404255%;
- *width: 6.329787234042553%;
-}
-
-.row-fluid .offset12 {
- margin-left: 104.25531914893617%;
- *margin-left: 104.14893617021275%;
-}
-
-.row-fluid .offset12:first-child {
- margin-left: 102.12765957446808%;
- *margin-left: 102.02127659574467%;
-}
-
-.row-fluid .offset11 {
- margin-left: 95.74468085106382%;
- *margin-left: 95.6382978723404%;
-}
-
-.row-fluid .offset11:first-child {
- margin-left: 93.61702127659574%;
- *margin-left: 93.51063829787232%;
-}
-
-.row-fluid .offset10 {
- margin-left: 87.23404255319149%;
- *margin-left: 87.12765957446807%;
-}
-
-.row-fluid .offset10:first-child {
- margin-left: 85.1063829787234%;
- *margin-left: 84.99999999999999%;
-}
-
-.row-fluid .offset9 {
- margin-left: 78.72340425531914%;
- *margin-left: 78.61702127659572%;
-}
-
-.row-fluid .offset9:first-child {
- margin-left: 76.59574468085106%;
- *margin-left: 76.48936170212764%;
-}
-
-.row-fluid .offset8 {
- margin-left: 70.2127659574468%;
- *margin-left: 70.10638297872339%;
-}
-
-.row-fluid .offset8:first-child {
- margin-left: 68.08510638297872%;
- *margin-left: 67.9787234042553%;
-}
-
-.row-fluid .offset7 {
- margin-left: 61.70212765957446%;
- *margin-left: 61.59574468085106%;
-}
-
-.row-fluid .offset7:first-child {
- margin-left: 59.574468085106375%;
- *margin-left: 59.46808510638297%;
-}
-
-.row-fluid .offset6 {
- margin-left: 53.191489361702125%;
- *margin-left: 53.085106382978715%;
-}
-
-.row-fluid .offset6:first-child {
- margin-left: 51.063829787234035%;
- *margin-left: 50.95744680851063%;
-}
-
-.row-fluid .offset5 {
- margin-left: 44.68085106382979%;
- *margin-left: 44.57446808510638%;
-}
-
-.row-fluid .offset5:first-child {
- margin-left: 42.5531914893617%;
- *margin-left: 42.4468085106383%;
-}
-
-.row-fluid .offset4 {
- margin-left: 36.170212765957444%;
- *margin-left: 36.06382978723405%;
-}
-
-.row-fluid .offset4:first-child {
- margin-left: 34.04255319148936%;
- *margin-left: 33.93617021276596%;
-}
-
-.row-fluid .offset3 {
- margin-left: 27.659574468085104%;
- *margin-left: 27.5531914893617%;
-}
-
-.row-fluid .offset3:first-child {
- margin-left: 25.53191489361702%;
- *margin-left: 25.425531914893618%;
-}
-
-.row-fluid .offset2 {
- margin-left: 19.148936170212764%;
- *margin-left: 19.04255319148936%;
-}
-
-.row-fluid .offset2:first-child {
- margin-left: 17.02127659574468%;
- *margin-left: 16.914893617021278%;
-}
-
-.row-fluid .offset1 {
- margin-left: 10.638297872340425%;
- *margin-left: 10.53191489361702%;
-}
-
-.row-fluid .offset1:first-child {
- margin-left: 8.51063829787234%;
- *margin-left: 8.404255319148938%;
-}
-
-[class*="span"].hide,
-.row-fluid [class*="span"].hide {
- display: none;
-}
-
-[class*="span"].pull-right,
-.row-fluid [class*="span"].pull-right {
- float: right;
-}
-
-.container {
- margin-right: auto;
- margin-left: auto;
- *zoom: 1;
-}
-
-.container:before,
-.container:after {
- display: table;
- line-height: 0;
- content: "";
-}
-
-.container:after {
- clear: both;
-}
-
-.container-fluid {
- padding-right: 20px;
- padding-left: 20px;
- *zoom: 1;
-}
-
-.container-fluid:before,
-.container-fluid:after {
- display: table;
- line-height: 0;
- content: "";
-}
-
-.container-fluid:after {
- clear: both;
-}
-
-p {
- margin: 0 0 10px;
-}
-
-.lead {
- margin-bottom: 20px;
- font-size: 21px;
- font-weight: 200;
- line-height: 30px;
-}
-
-small {
- font-size: 85%;
-}
-
-strong {
- font-weight: bold;
-}
-
-em {
- font-style: italic;
-}
-
-cite {
- font-style: normal;
-}
-
-.muted {
- color: #999999;
-}
-
-a.muted:hover,
-a.muted:focus {
- color: #808080;
-}
-
-.text-warning {
- color: #c09853;
-}
-
-a.text-warning:hover,
-a.text-warning:focus {
- color: #a47e3c;
-}
-
-.text-error {
- color: #b94a48;
-}
-
-a.text-error:hover,
-a.text-error:focus {
- color: #953b39;
-}
-
-.text-info {
- color: #3a87ad;
-}
-
-a.text-info:hover,
-a.text-info:focus {
- color: #2d6987;
-}
-
-.text-success {
- color: #468847;
-}
-
-a.text-success:hover,
-a.text-success:focus {
- color: #356635;
-}
-
-.text-left {
- text-align: left;
-}
-
-.text-right {
- text-align: right;
-}
-
-.text-center {
- text-align: center;
-}
-
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
- margin: 10px 0;
- font-family: inherit;
- font-weight: bold;
- line-height: 20px;
- color: inherit;
- text-rendering: optimizelegibility;
-}
-
-h1 small,
-h2 small,
-h3 small,
-h4 small,
-h5 small,
-h6 small {
- font-weight: normal;
- line-height: 1;
- color: #999999;
-}
-
-h1,
-h2,
-h3 {
- line-height: 40px;
-}
-
-h1 {
- font-size: 38.5px;
-}
-
-h2 {
- font-size: 31.5px;
-}
-
-h3 {
- font-size: 24.5px;
-}
-
-h4 {
- font-size: 17.5px;
-}
-
-h5 {
- font-size: 14px;
-}
-
-h6 {
- font-size: 11.9px;
-}
-
-h1 small {
- font-size: 24.5px;
-}
-
-h2 small {
- font-size: 17.5px;
-}
-
-h3 small {
- font-size: 14px;
-}
-
-h4 small {
- font-size: 14px;
-}
-
-.page-header {
- padding-bottom: 9px;
- margin: 20px 0 30px;
- border-bottom: 1px solid #eeeeee;
-}
-
-ul,
-ol {
- padding: 0;
- margin: 0 0 10px 25px;
-}
-
-ul ul,
-ul ol,
-ol ol,
-ol ul {
- margin-bottom: 0;
-}
-
-li {
- line-height: 20px;
-}
-
-ul.unstyled,
-ol.unstyled {
- margin-left: 0;
- list-style: none;
-}
-
-ul.inline,
-ol.inline {
- margin-left: 0;
- list-style: none;
-}
-
-ul.inline > li,
-ol.inline > li {
- display: inline-block;
- *display: inline;
- padding-right: 5px;
- padding-left: 5px;
- *zoom: 1;
-}
-
-dl {
- margin-bottom: 20px;
-}
-
-dt,
-dd {
- line-height: 20px;
-}
-
-dt {
- font-weight: bold;
-}
-
-dd {
- margin-left: 10px;
-}
-
-.dl-horizontal {
- *zoom: 1;
-}
-
-.dl-horizontal:before,
-.dl-horizontal:after {
- display: table;
- line-height: 0;
- content: "";
-}
-
-.dl-horizontal:after {
- clear: both;
-}
-
-.dl-horizontal dt {
- float: left;
- width: 160px;
- overflow: hidden;
- clear: left;
- text-align: right;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-
-.dl-horizontal dd {
- margin-left: 180px;
-}
-
-hr {
- margin: 20px 0;
- border: 0;
- border-top: 1px solid #eeeeee;
- border-bottom: 1px solid #ffffff;
-}
-
-abbr[title],
-abbr[data-original-title] {
- cursor: help;
- border-bottom: 1px dotted #999999;
-}
-
-abbr.initialism {
- font-size: 90%;
- text-transform: uppercase;
-}
-
-blockquote {
- padding: 0 0 0 15px;
- margin: 0 0 20px;
- border-left: 5px solid #eeeeee;
-}
-
-blockquote p {
- margin-bottom: 0;
- font-size: 17.5px;
- font-weight: 300;
- line-height: 1.25;
-}
-
-blockquote small {
- display: block;
- line-height: 20px;
- color: #999999;
-}
-
-blockquote small:before {
- content: '\2014 \00A0';
-}
-
-blockquote.pull-right {
- float: right;
- padding-right: 15px;
- padding-left: 0;
- border-right: 5px solid #eeeeee;
- border-left: 0;
-}
-
-blockquote.pull-right p,
-blockquote.pull-right small {
- text-align: right;
-}
-
-blockquote.pull-right small:before {
- content: '';
-}
-
-blockquote.pull-right small:after {
- content: '\00A0 \2014';
-}
-
-q:before,
-q:after,
-blockquote:before,
-blockquote:after {
- content: "";
-}
-
-address {
- display: block;
- margin-bottom: 20px;
- font-style: normal;
- line-height: 20px;
-}
-
-code,
-pre {
- padding: 0 3px 2px;
- font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
- font-size: 12px;
- color: #333333;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
-}
-
-code {
- padding: 2px 4px;
- color: #d14;
- white-space: nowrap;
- background-color: #f7f7f9;
- border: 1px solid #e1e1e8;
-}
-
-pre {
- display: block;
- padding: 9.5px;
- margin: 0 0 10px;
- font-size: 13px;
- line-height: 20px;
- word-break: break-all;
- word-wrap: break-word;
- white-space: pre;
- white-space: pre-wrap;
- background-color: #f5f5f5;
- border: 1px solid #ccc;
- border: 1px solid rgba(0, 0, 0, 0.15);
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
-}
-
-pre.prettyprint {
- margin-bottom: 20px;
-}
-
-pre code {
- padding: 0;
- color: inherit;
- white-space: pre;
- white-space: pre-wrap;
- background-color: transparent;
- border: 0;
-}
-
-.pre-scrollable {
- max-height: 340px;
- overflow-y: scroll;
-}
-
-form {
- margin: 0 0 20px;
-}
-
-fieldset {
- padding: 0;
- margin: 0;
- border: 0;
-}
-
-legend {
- display: block;
- width: 100%;
- padding: 0;
- margin-bottom: 20px;
- font-size: 21px;
- line-height: 40px;
- color: #333333;
- border: 0;
- border-bottom: 1px solid #e5e5e5;
-}
-
-legend small {
- font-size: 15px;
- color: #999999;
-}
-
-label,
-input,
-button,
-select,
-textarea {
- font-size: 14px;
- font-weight: normal;
- line-height: 20px;
-}
-
-input,
-button,
-select,
-textarea {
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
-}
-
-label {
- display: block;
- margin-bottom: 5px;
-}
-
-select,
-textarea,
-input[type="text"],
-input[type="password"],
-input[type="datetime"],
-input[type="datetime-local"],
-input[type="date"],
-input[type="month"],
-input[type="time"],
-input[type="week"],
-input[type="number"],
-input[type="email"],
-input[type="url"],
-input[type="search"],
-input[type="tel"],
-input[type="color"],
-.uneditable-input {
- display: inline-block;
- height: 20px;
- padding: 4px 6px;
- margin-bottom: 10px;
- font-size: 14px;
- line-height: 20px;
- color: #555555;
- vertical-align: middle;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
-}
-
-input,
-textarea,
-.uneditable-input {
- width: 206px;
-}
-
-textarea {
- height: auto;
-}
-
-textarea,
-input[type="text"],
-input[type="password"],
-input[type="datetime"],
-input[type="datetime-local"],
-input[type="date"],
-input[type="month"],
-input[type="time"],
-input[type="week"],
-input[type="number"],
-input[type="email"],
-input[type="url"],
-input[type="search"],
-input[type="tel"],
-input[type="color"],
-.uneditable-input {
- background-color: #ffffff;
- border: 1px solid #cccccc;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
- -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
- -o-transition: border linear 0.2s, box-shadow linear 0.2s;
- transition: border linear 0.2s, box-shadow linear 0.2s;
-}
-
-textarea:focus,
-input[type="text"]:focus,
-input[type="password"]:focus,
-input[type="datetime"]:focus,
-input[type="datetime-local"]:focus,
-input[type="date"]:focus,
-input[type="month"]:focus,
-input[type="time"]:focus,
-input[type="week"]:focus,
-input[type="number"]:focus,
-input[type="email"]:focus,
-input[type="url"]:focus,
-input[type="search"]:focus,
-input[type="tel"]:focus,
-input[type="color"]:focus,
-.uneditable-input:focus {
- border-color: rgba(82, 168, 236, 0.8);
- outline: 0;
- outline: thin dotted \9;
- /* IE6-9 */
-
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
- -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
-}
-
-input[type="radio"],
-input[type="checkbox"] {
- margin: 4px 0 0;
- margin-top: 1px \9;
- *margin-top: 0;
- line-height: normal;
-}
-
-input[type="file"],
-input[type="image"],
-input[type="submit"],
-input[type="reset"],
-input[type="button"],
-input[type="radio"],
-input[type="checkbox"] {
- width: auto;
-}
-
-select,
-input[type="file"] {
- height: 30px;
- /* In IE7, the height of the select element cannot be changed by height, only font-size */
-
- *margin-top: 4px;
- /* For IE7, add top margin to align select with labels */
-
- line-height: 30px;
-}
-
-select {
- width: 220px;
- background-color: #ffffff;
- border: 1px solid #cccccc;
-}
-
-select[multiple],
-select[size] {
- height: auto;
-}
-
-select:focus,
-input[type="file"]:focus,
-input[type="radio"]:focus,
-input[type="checkbox"]:focus {
- outline: thin dotted #333;
- outline: 5px auto -webkit-focus-ring-color;
- outline-offset: -2px;
-}
-
-.uneditable-input,
-.uneditable-textarea {
- color: #999999;
- cursor: not-allowed;
- background-color: #fcfcfc;
- border-color: #cccccc;
- -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
- -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
- box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
-}
-
-.uneditable-input {
- overflow: hidden;
- white-space: nowrap;
-}
-
-.uneditable-textarea {
- width: auto;
- height: auto;
-}
-
-input:-moz-placeholder,
-textarea:-moz-placeholder {
- color: #999999;
-}
-
-input:-ms-input-placeholder,
-textarea:-ms-input-placeholder {
- color: #999999;
-}
-
-input::-webkit-input-placeholder,
-textarea::-webkit-input-placeholder {
- color: #999999;
-}
-
-.radio,
-.checkbox {
- min-height: 20px;
- padding-left: 20px;
-}
-
-.radio input[type="radio"],
-.checkbox input[type="checkbox"] {
- float: left;
- margin-left: -20px;
-}
-
-.controls > .radio:first-child,
-.controls > .checkbox:first-child {
- padding-top: 5px;
-}
-
-.radio.inline,
-.checkbox.inline {
- display: inline-block;
- padding-top: 5px;
- margin-bottom: 0;
- vertical-align: middle;
-}
-
-.radio.inline + .radio.inline,
-.checkbox.inline + .checkbox.inline {
- margin-left: 10px;
-}
-
-.input-mini {
- width: 60px;
-}
-
-.input-small {
- width: 90px;
-}
-
-.input-medium {
- width: 150px;
-}
-
-.input-large {
- width: 210px;
-}
-
-.input-xlarge {
- width: 270px;
-}
-
-.input-xxlarge {
- width: 530px;
-}
-
-input[class*="span"],
-select[class*="span"],
-textarea[class*="span"],
-.uneditable-input[class*="span"],
-.row-fluid input[class*="span"],
-.row-fluid select[class*="span"],
-.row-fluid textarea[class*="span"],
-.row-fluid .uneditable-input[class*="span"] {
- float: none;
- margin-left: 0;
-}
-
-.input-append input[class*="span"],
-.input-append .uneditable-input[class*="span"],
-.input-prepend input[class*="span"],
-.input-prepend .uneditable-input[class*="span"],
-.row-fluid input[class*="span"],
-.row-fluid select[class*="span"],
-.row-fluid textarea[class*="span"],
-.row-fluid .uneditable-input[class*="span"],
-.row-fluid .input-prepend [class*="span"],
-.row-fluid .input-append [class*="span"] {
- display: inline-block;
-}
-
-input,
-textarea,
-.uneditable-input {
- margin-left: 0;
-}
-
-.controls-row [class*="span"] + [class*="span"] {
- margin-left: 20px;
-}
-
-input.span12,
-textarea.span12,
-.uneditable-input.span12 {
- width: 926px;
-}
-
-input.span11,
-textarea.span11,
-.uneditable-input.span11 {
- width: 846px;
-}
-
-input.span10,
-textarea.span10,
-.uneditable-input.span10 {
- width: 766px;
-}
-
-input.span9,
-textarea.span9,
-.uneditable-input.span9 {
- width: 686px;
-}
-
-input.span8,
-textarea.span8,
-.uneditable-input.span8 {
- width: 606px;
-}
-
-input.span7,
-textarea.span7,
-.uneditable-input.span7 {
- width: 526px;
-}
-
-input.span6,
-textarea.span6,
-.uneditable-input.span6 {
- width: 446px;
-}
-
-input.span5,
-textarea.span5,
-.uneditable-input.span5 {
- width: 366px;
-}
-
-input.span4,
-textarea.span4,
-.uneditable-input.span4 {
- width: 286px;
-}
-
-input.span3,
-textarea.span3,
-.uneditable-input.span3 {
- width: 206px;
-}
-
-input.span2,
-textarea.span2,
-.uneditable-input.span2 {
- width: 126px;
-}
-
-input.span1,
-textarea.span1,
-.uneditable-input.span1 {
- width: 46px;
-}
-
-.controls-row {
- *zoom: 1;
-}
-
-.controls-row:before,
-.controls-row:after {
- display: table;
- line-height: 0;
- content: "";
-}
-
-.controls-row:after {
- clear: both;
-}
-
-.controls-row [class*="span"],
-.row-fluid .controls-row [class*="span"] {
- float: left;
-}
-
-.controls-row .checkbox[class*="span"],
-.controls-row .radio[class*="span"] {
- padding-top: 5px;
-}
-
-input[disabled],
-select[disabled],
-textarea[disabled],
-input[readonly],
-select[readonly],
-textarea[readonly] {
- cursor: not-allowed;
- background-color: #eeeeee;
-}
-
-input[type="radio"][disabled],
-input[type="checkbox"][disabled],
-input[type="radio"][readonly],
-input[type="checkbox"][readonly] {
- background-color: transparent;
-}
-
-.control-group.warning .control-label,
-.control-group.warning .help-block,
-.control-group.warning .help-inline {
- color: #c09853;
-}
-
-.control-group.warning .checkbox,
-.control-group.warning .radio,
-.control-group.warning input,
-.control-group.warning select,
-.control-group.warning textarea {
- color: #c09853;
-}
-
-.control-group.warning input,
-.control-group.warning select,
-.control-group.warning textarea {
- border-color: #c09853;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-}
-
-.control-group.warning input:focus,
-.control-group.warning select:focus,
-.control-group.warning textarea:focus {
- border-color: #a47e3c;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
- -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
-}
-
-.control-group.warning .input-prepend .add-on,
-.control-group.warning .input-append .add-on {
- color: #c09853;
- background-color: #fcf8e3;
- border-color: #c09853;
-}
-
-.control-group.error .control-label,
-.control-group.error .help-block,
-.control-group.error .help-inline {
- color: #b94a48;
-}
-
-.control-group.error .checkbox,
-.control-group.error .radio,
-.control-group.error input,
-.control-group.error select,
-.control-group.error textarea {
- color: #b94a48;
-}
-
-.control-group.error input,
-.control-group.error select,
-.control-group.error textarea {
- border-color: #b94a48;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-}
-
-.control-group.error input:focus,
-.control-group.error select:focus,
-.control-group.error textarea:focus {
- border-color: #953b39;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
- -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
-}
-
-.control-group.error .input-prepend .add-on,
-.control-group.error .input-append .add-on {
- color: #b94a48;
- background-color: #f2dede;
- border-color: #b94a48;
-}
-
-.control-group.success .control-label,
-.control-group.success .help-block,
-.control-group.success .help-inline {
- color: #468847;
-}
-
-.control-group.success .checkbox,
-.control-group.success .radio,
-.control-group.success input,
-.control-group.success select,
-.control-group.success textarea {
- color: #468847;
-}
-
-.control-group.success input,
-.control-group.success select,
-.control-group.success textarea {
- border-color: #468847;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-}
-
-.control-group.success input:focus,
-.control-group.success select:focus,
-.control-group.success textarea:focus {
- border-color: #356635;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
- -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
-}
-
-.control-group.success .input-prepend .add-on,
-.control-group.success .input-append .add-on {
- color: #468847;
- background-color: #dff0d8;
- border-color: #468847;
-}
-
-.control-group.info .control-label,
-.control-group.info .help-block,
-.control-group.info .help-inline {
- color: #3a87ad;
-}
-
-.control-group.info .checkbox,
-.control-group.info .radio,
-.control-group.info input,
-.control-group.info select,
-.control-group.info textarea {
- color: #3a87ad;
-}
-
-.control-group.info input,
-.control-group.info select,
-.control-group.info textarea {
- border-color: #3a87ad;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-}
-
-.control-group.info input:focus,
-.control-group.info select:focus,
-.control-group.info textarea:focus {
- border-color: #2d6987;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
- -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
-}
-
-.control-group.info .input-prepend .add-on,
-.control-group.info .input-append .add-on {
- color: #3a87ad;
- background-color: #d9edf7;
- border-color: #3a87ad;
-}
-
-input:focus:invalid,
-textarea:focus:invalid,
-select:focus:invalid {
- color: #b94a48;
- border-color: #ee5f5b;
-}
-
-input:focus:invalid:focus,
-textarea:focus:invalid:focus,
-select:focus:invalid:focus {
- border-color: #e9322d;
- -webkit-box-shadow: 0 0 6px #f8b9b7;
- -moz-box-shadow: 0 0 6px #f8b9b7;
- box-shadow: 0 0 6px #f8b9b7;
-}
-
-.form-actions {
- padding: 19px 20px 20px;
- margin-top: 20px;
- margin-bottom: 20px;
- background-color: #f5f5f5;
- border-top: 1px solid #e5e5e5;
- *zoom: 1;
-}
-
-.form-actions:before,
-.form-actions:after {
- display: table;
- line-height: 0;
- content: "";
-}
-
-.form-actions:after {
- clear: both;
-}
-
-.help-block,
-.help-inline {
- color: #595959;
-}
-
-.help-block {
- display: block;
- margin-bottom: 10px;
-}
-
-.help-inline {
- display: inline-block;
- *display: inline;
- padding-left: 5px;
- vertical-align: middle;
- *zoom: 1;
-}
-
-.input-append,
-.input-prepend {
- display: inline-block;
- margin-bottom: 10px;
- font-size: 0;
- white-space: nowrap;
- vertical-align: middle;
-}
-
-.input-append input,
-.input-prepend input,
-.input-append select,
-.input-prepend select,
-.input-append .uneditable-input,
-.input-prepend .uneditable-input,
-.input-append .dropdown-menu,
-.input-prepend .dropdown-menu,
-.input-append .popover,
-.input-prepend .popover {
- font-size: 14px;
-}
-
-.input-append input,
-.input-prepend input,
-.input-append select,
-.input-prepend select,
-.input-append .uneditable-input,
-.input-prepend .uneditable-input {
- position: relative;
- margin-bottom: 0;
- *margin-left: 0;
- vertical-align: top;
- -webkit-border-radius: 0 4px 4px 0;
- -moz-border-radius: 0 4px 4px 0;
- border-radius: 0 4px 4px 0;
-}
-
-.input-append input:focus,
-.input-prepend input:focus,
-.input-append select:focus,
-.input-prepend select:focus,
-.input-append .uneditable-input:focus,
-.input-prepend .uneditable-input:focus {
- z-index: 2;
-}
-
-.input-append .add-on,
-.input-prepend .add-on {
- display: inline-block;
- width: auto;
- height: 20px;
- min-width: 16px;
- padding: 4px 5px;
- font-size: 14px;
- font-weight: normal;
- line-height: 20px;
- text-align: center;
- text-shadow: 0 1px 0 #ffffff;
- background-color: #eeeeee;
- border: 1px solid #ccc;
-}
-
-.input-append .add-on,
-.input-prepend .add-on,
-.input-append .btn,
-.input-prepend .btn,
-.input-append .btn-group > .dropdown-toggle,
-.input-prepend .btn-group > .dropdown-toggle {
- vertical-align: top;
- -webkit-border-radius: 0;
- -moz-border-radius: 0;
- border-radius: 0;
-}
-
-.input-append .active,
-.input-prepend .active {
- background-color: #a9dba9;
- border-color: #46a546;
-}
-
-.input-prepend .add-on,
-.input-prepend .btn {
- margin-right: -1px;
-}
-
-.input-prepend .add-on:first-child,
-.input-prepend .btn:first-child {
- -webkit-border-radius: 4px 0 0 4px;
- -moz-border-radius: 4px 0 0 4px;
- border-radius: 4px 0 0 4px;
-}
-
-.input-append input,
-.input-append select,
-.input-append .uneditable-input {
- -webkit-border-radius: 4px 0 0 4px;
- -moz-border-radius: 4px 0 0 4px;
- border-radius: 4px 0 0 4px;
-}
-
-.input-append input + .btn-group .btn:last-child,
-.input-append select + .btn-group .btn:last-child,
-.input-append .uneditable-input + .btn-group .btn:last-child {
- -webkit-border-radius: 0 4px 4px 0;
- -moz-border-radius: 0 4px 4px 0;
- border-radius: 0 4px 4px 0;
-}
-
-.input-append .add-on,
-.input-append .btn,
-.input-append .btn-group {
- margin-left: -1px;
-}
-
-.input-append .add-on:last-child,
-.input-append .btn:last-child,
-.input-append .btn-group:last-child > .dropdown-toggle {
- -webkit-border-radius: 0 4px 4px 0;
- -moz-border-radius: 0 4px 4px 0;
- border-radius: 0 4px 4px 0;
-}
-
-.input-prepend.input-append input,
-.input-prepend.input-append select,
-.input-prepend.input-append .uneditable-input {
- -webkit-border-radius: 0;
- -moz-border-radius: 0;
- border-radius: 0;
-}
-
-.input-prepend.input-append input + .btn-group .btn,
-.input-prepend.input-append select + .btn-group .btn,
-.input-prepend.input-append .uneditable-input + .btn-group .btn {
- -webkit-border-radius: 0 4px 4px 0;
- -moz-border-radius: 0 4px 4px 0;
- border-radius: 0 4px 4px 0;
-}
-
-.input-prepend.input-append .add-on:first-child,
-.input-prepend.input-append .btn:first-child {
- margin-right: -1px;
- -webkit-border-radius: 4px 0 0 4px;
- -moz-border-radius: 4px 0 0 4px;
- border-radius: 4px 0 0 4px;
-}
-
-.input-prepend.input-append .add-on:last-child,
-.input-prepend.input-append .btn:last-child {
- margin-left: -1px;
- -webkit-border-radius: 0 4px 4px 0;
- -moz-border-radius: 0 4px 4px 0;
- border-radius: 0 4px 4px 0;
-}
-
-.input-prepend.input-append .btn-group:first-child {
- margin-left: 0;
-}
-
-input.search-query {
- padding-right: 14px;
- padding-right: 4px \9;
- padding-left: 14px;
- padding-left: 4px \9;
- /* IE7-8 doesn't have border-radius, so don't indent the padding */
-
- margin-bottom: 0;
- -webkit-border-radius: 15px;
- -moz-border-radius: 15px;
- border-radius: 15px;
-}
-
-/* Allow for input prepend/append in search forms */
-
-.form-search .input-append .search-query,
-.form-search .input-prepend .search-query {
- -webkit-border-radius: 0;
- -moz-border-radius: 0;
- border-radius: 0;
-}
-
-.form-search .input-append .search-query {
- -webkit-border-radius: 14px 0 0 14px;
- -moz-border-radius: 14px 0 0 14px;
- border-radius: 14px 0 0 14px;
-}
-
-.form-search .input-append .btn {
- -webkit-border-radius: 0 14px 14px 0;
- -moz-border-radius: 0 14px 14px 0;
- border-radius: 0 14px 14px 0;
-}
-
-.form-search .input-prepend .search-query {
- -webkit-border-radius: 0 14px 14px 0;
- -moz-border-radius: 0 14px 14px 0;
- border-radius: 0 14px 14px 0;
-}
-
-.form-search .input-prepend .btn {
- -webkit-border-radius: 14px 0 0 14px;
- -moz-border-radius: 14px 0 0 14px;
- border-radius: 14px 0 0 14px;
-}
-
-.form-search input,
-.form-inline input,
-.form-horizontal input,
-.form-search textarea,
-.form-inline textarea,
-.form-horizontal textarea,
-.form-search select,
-.form-inline select,
-.form-horizontal select,
-.form-search .help-inline,
-.form-inline .help-inline,
-.form-horizontal .help-inline,
-.form-search .uneditable-input,
-.form-inline .uneditable-input,
-.form-horizontal .uneditable-input,
-.form-search .input-prepend,
-.form-inline .input-prepend,
-.form-horizontal .input-prepend,
-.form-search .input-append,
-.form-inline .input-append,
-.form-horizontal .input-append {
- display: inline-block;
- *display: inline;
- margin-bottom: 0;
- vertical-align: middle;
- *zoom: 1;
-}
-
-.form-search .hide,
-.form-inline .hide,
-.form-horizontal .hide {
- display: none;
-}
-
-.form-search label,
-.form-inline label,
-.form-search .btn-group,
-.form-inline .btn-group {
- display: inline-block;
-}
-
-.form-search .input-append,
-.form-inline .input-append,
-.form-search .input-prepend,
-.form-inline .input-prepend {
- margin-bottom: 0;
-}
-
-.form-search .radio,
-.form-search .checkbox,
-.form-inline .radio,
-.form-inline .checkbox {
- padding-left: 0;
- margin-bottom: 0;
- vertical-align: middle;
-}
-
-.form-search .radio input[type="radio"],
-.form-search .checkbox input[type="checkbox"],
-.form-inline .radio input[type="radio"],
-.form-inline .checkbox input[type="checkbox"] {
- float: left;
- margin-right: 3px;
- margin-left: 0;
-}
-
-.control-group {
- margin-bottom: 10px;
-}
-
-legend + .control-group {
- margin-top: 20px;
- -webkit-margin-top-collapse: separate;
-}
-
-.form-horizontal .control-group {
- margin-bottom: 20px;
- *zoom: 1;
-}
-
-.form-horizontal .control-group:before,
-.form-horizontal .control-group:after {
- display: table;
- line-height: 0;
- content: "";
-}
-
-.form-horizontal .control-group:after {
- clear: both;
-}
-
-.form-horizontal .control-label {
- float: left;
- width: 160px;
- padding-top: 5px;
- text-align: right;
-}
-
-.form-horizontal .controls {
- *display: inline-block;
- *padding-left: 20px;
- margin-left: 180px;
- *margin-left: 0;
-}
-
-.form-horizontal .controls:first-child {
- *padding-left: 180px;
-}
-
-.form-horizontal .help-block {
- margin-bottom: 0;
-}
-
-.form-horizontal input + .help-block,
-.form-horizontal select + .help-block,
-.form-horizontal textarea + .help-block,
-.form-horizontal .uneditable-input + .help-block,
-.form-horizontal .input-prepend + .help-block,
-.form-horizontal .input-append + .help-block {
- margin-top: 10px;
-}
-
-.form-horizontal .form-actions {
- padding-left: 180px;
-}
-
-table {
- max-width: 100%;
- background-color: transparent;
- border-collapse: collapse;
- border-spacing: 0;
-}
-
-.table {
- width: 100%;
- margin-bottom: 20px;
-}
-
-.table th,
-.table td {
- padding: 8px;
- line-height: 20px;
- text-align: left;
- vertical-align: top;
- border-top: 1px solid #dddddd;
-}
-
-.table th {
- font-weight: bold;
-}
-
-.table thead th {
- vertical-align: bottom;
-}
-
-.table caption + thead tr:first-child th,
-.table caption + thead tr:first-child td,
-.table colgroup + thead tr:first-child th,
-.table colgroup + thead tr:first-child td,
-.table thead:first-child tr:first-child th,
-.table thead:first-child tr:first-child td {
- border-top: 0;
-}
-
-.table tbody + tbody {
- border-top: 2px solid #dddddd;
-}
-
-.table .table {
- background-color: #ffffff;
-}
-
-.table-condensed th,
-.table-condensed td {
- padding: 4px 5px;
-}
-
-.table-bordered {
- border: 1px solid #dddddd;
- border-collapse: separate;
- *border-collapse: collapse;
- border-left: 0;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
-}
-
-.table-bordered th,
-.table-bordered td {
- border-left: 1px solid #dddddd;
-}
-
-.table-bordered caption + thead tr:first-child th,
-.table-bordered caption + tbody tr:first-child th,
-.table-bordered caption + tbody tr:first-child td,
-.table-bordered colgroup + thead tr:first-child th,
-.table-bordered colgroup + tbody tr:first-child th,
-.table-bordered colgroup + tbody tr:first-child td,
-.table-bordered thead:first-child tr:first-child th,
-.table-bordered tbody:first-child tr:first-child th,
-.table-bordered tbody:first-child tr:first-child td {
- border-top: 0;
-}
-
-.table-bordered thead:first-child tr:first-child > th:first-child,
-.table-bordered tbody:first-child tr:first-child > td:first-child,
-.table-bordered tbody:first-child tr:first-child > th:first-child {
- -webkit-border-top-left-radius: 4px;
- border-top-left-radius: 4px;
- -moz-border-radius-topleft: 4px;
-}
-
-.table-bordered thead:first-child tr:first-child > th:last-child,
-.table-bordered tbody:first-child tr:first-child > td:last-child,
-.table-bordered tbody:first-child tr:first-child > th:last-child {
- -webkit-border-top-right-radius: 4px;
- border-top-right-radius: 4px;
- -moz-border-radius-topright: 4px;
-}
-
-.table-bordered thead:last-child tr:last-child > th:first-child,
-.table-bordered tbody:last-child tr:last-child > td:first-child,
-.table-bordered tbody:last-child tr:last-child > th:first-child,
-.table-bordered tfoot:last-child tr:last-child > td:first-child,
-.table-bordered tfoot:last-child tr:last-child > th:first-child {
- -webkit-border-bottom-left-radius: 4px;
- border-bottom-left-radius: 4px;
- -moz-border-radius-bottomleft: 4px;
-}
-
-.table-bordered thead:last-child tr:last-child > th:last-child,
-.table-bordered tbody:last-child tr:last-child > td:last-child,
-.table-bordered tbody:last-child tr:last-child > th:last-child,
-.table-bordered tfoot:last-child tr:last-child > td:last-child,
-.table-bordered tfoot:last-child tr:last-child > th:last-child {
- -webkit-border-bottom-right-radius: 4px;
- border-bottom-right-radius: 4px;
- -moz-border-radius-bottomright: 4px;
-}
-
-.table-bordered tfoot + tbody:last-child tr:last-child td:first-child {
- -webkit-border-bottom-left-radius: 0;
- border-bottom-left-radius: 0;
- -moz-border-radius-bottomleft: 0;
-}
-
-.table-bordered tfoot + tbody:last-child tr:last-child td:last-child {
- -webkit-border-bottom-right-radius: 0;
- border-bottom-right-radius: 0;
- -moz-border-radius-bottomright: 0;
-}
-
-.table-bordered caption + thead tr:first-child th:first-child,
-.table-bordered caption + tbody tr:first-child td:first-child,
-.table-bordered colgroup + thead tr:first-child th:first-child,
-.table-bordered colgroup + tbody tr:first-child td:first-child {
- -webkit-border-top-left-radius: 4px;
- border-top-left-radius: 4px;
- -moz-border-radius-topleft: 4px;
-}
-
-.table-bordered caption + thead tr:first-child th:last-child,
-.table-bordered caption + tbody tr:first-child td:last-child,
-.table-bordered colgroup + thead tr:first-child th:last-child,
-.table-bordered colgroup + tbody tr:first-child td:last-child {
- -webkit-border-top-right-radius: 4px;
- border-top-right-radius: 4px;
- -moz-border-radius-topright: 4px;
-}
-
-.table-striped tbody > tr:nth-child(odd) > td,
-.table-striped tbody > tr:nth-child(odd) > th {
- background-color: #f9f9f9;
-}
-
-.table-hover tbody tr:hover > td,
-.table-hover tbody tr:hover > th {
- background-color: #f5f5f5;
-}
-
-table td[class*="span"],
-table th[class*="span"],
-.row-fluid table td[class*="span"],
-.row-fluid table th[class*="span"] {
- display: table-cell;
- float: none;
- margin-left: 0;
-}
-
-.table td.span1,
-.table th.span1 {
- float: none;
- width: 44px;
- margin-left: 0;
-}
-
-.table td.span2,
-.table th.span2 {
- float: none;
- width: 124px;
- margin-left: 0;
-}
-
-.table td.span3,
-.table th.span3 {
- float: none;
- width: 204px;
- margin-left: 0;
-}
-
-.table td.span4,
-.table th.span4 {
- float: none;
- width: 284px;
- margin-left: 0;
-}
-
-.table td.span5,
-.table th.span5 {
- float: none;
- width: 364px;
- margin-left: 0;
-}
-
-.table td.span6,
-.table th.span6 {
- float: none;
- width: 444px;
- margin-left: 0;
-}
-
-.table td.span7,
-.table th.span7 {
- float: none;
- width: 524px;
- margin-left: 0;
-}
-
-.table td.span8,
-.table th.span8 {
- float: none;
- width: 604px;
- margin-left: 0;
-}
-
-.table td.span9,
-.table th.span9 {
- float: none;
- width: 684px;
- margin-left: 0;
-}
-
-.table td.span10,
-.table th.span10 {
- float: none;
- width: 764px;
- margin-left: 0;
-}
-
-.table td.span11,
-.table th.span11 {
- float: none;
- width: 844px;
- margin-left: 0;
-}
-
-.table td.span12,
-.table th.span12 {
- float: none;
- width: 924px;
- margin-left: 0;
-}
-
-.table tbody tr.success > td {
- background-color: #dff0d8;
-}
-
-.table tbody tr.error > td {
- background-color: #f2dede;
-}
-
-.table tbody tr.warning > td {
- background-color: #fcf8e3;
-}
-
-.table tbody tr.info > td {
- background-color: #d9edf7;
-}
-
-.table-hover tbody tr.success:hover > td {
- background-color: #d0e9c6;
-}
-
-.table-hover tbody tr.error:hover > td {
- background-color: #ebcccc;
-}
-
-.table-hover tbody tr.warning:hover > td {
- background-color: #faf2cc;
-}
-
-.table-hover tbody tr.info:hover > td {
- background-color: #c4e3f3;
-}
-
-[class^="icon-"],
-[class*=" icon-"] {
- display: inline-block;
- width: 14px;
- height: 14px;
- margin-top: 1px;
- *margin-right: .3em;
- line-height: 14px;
- vertical-align: text-top;
- background-image: url("../img/glyphicons-halflings.png");
- background-position: 14px 14px;
- background-repeat: no-repeat;
-}
-
-/* White icons with optional class, or on hover/focus/active states of certain elements */
-
-.icon-white,
-.nav-pills > .active > a > [class^="icon-"],
-.nav-pills > .active > a > [class*=" icon-"],
-.nav-list > .active > a > [class^="icon-"],
-.nav-list > .active > a > [class*=" icon-"],
-.navbar-inverse .nav > .active > a > [class^="icon-"],
-.navbar-inverse .nav > .active > a > [class*=" icon-"],
-.dropdown-menu > li > a:hover > [class^="icon-"],
-.dropdown-menu > li > a:focus > [class^="icon-"],
-.dropdown-menu > li > a:hover > [class*=" icon-"],
-.dropdown-menu > li > a:focus > [class*=" icon-"],
-.dropdown-menu > .active > a > [class^="icon-"],
-.dropdown-menu > .active > a > [class*=" icon-"],
-.dropdown-submenu:hover > a > [class^="icon-"],
-.dropdown-submenu:focus > a > [class^="icon-"],
-.dropdown-submenu:hover > a > [class*=" icon-"],
-.dropdown-submenu:focus > a > [class*=" icon-"] {
- background-image: url("../img/glyphicons-halflings-white.png");
-}
-
-.icon-glass {
- background-position: 0 0;
-}
-
-.icon-music {
- background-position: -24px 0;
-}
-
-.icon-search {
- background-position: -48px 0;
-}
-
-.icon-envelope {
- background-position: -72px 0;
-}
-
-.icon-heart {
- background-position: -96px 0;
-}
-
-.icon-star {
- background-position: -120px 0;
-}
-
-.icon-star-empty {
- background-position: -144px 0;
-}
-
-.icon-user {
- background-position: -168px 0;
-}
-
-.icon-film {
- background-position: -192px 0;
-}
-
-.icon-th-large {
- background-position: -216px 0;
-}
-
-.icon-th {
- background-position: -240px 0;
-}
-
-.icon-th-list {
- background-position: -264px 0;
-}
-
-.icon-ok {
- background-position: -288px 0;
-}
-
-.icon-remove {
- background-position: -312px 0;
-}
-
-.icon-zoom-in {
- background-position: -336px 0;
-}
-
-.icon-zoom-out {
- background-position: -360px 0;
-}
-
-.icon-off {
- background-position: -384px 0;
-}
-
-.icon-signal {
- background-position: -408px 0;
-}
-
-.icon-cog {
- background-position: -432px 0;
-}
-
-.icon-trash {
- background-position: -456px 0;
-}
-
-.icon-home {
- background-position: 0 -24px;
-}
-
-.icon-file {
- background-position: -24px -24px;
-}
-
-.icon-time {
- background-position: -48px -24px;
-}
-
-.icon-road {
- background-position: -72px -24px;
-}
-
-.icon-download-alt {
- background-position: -96px -24px;
-}
-
-.icon-download {
- background-position: -120px -24px;
-}
-
-.icon-upload {
- background-position: -144px -24px;
-}
-
-.icon-inbox {
- background-position: -168px -24px;
-}
-
-.icon-play-circle {
- background-position: -192px -24px;
-}
-
-.icon-repeat {
- background-position: -216px -24px;
-}
-
-.icon-refresh {
- background-position: -240px -24px;
-}
-
-.icon-list-alt {
- background-position: -264px -24px;
-}
-
-.icon-lock {
- background-position: -287px -24px;
-}
-
-.icon-flag {
- background-position: -312px -24px;
-}
-
-.icon-headphones {
- background-position: -336px -24px;
-}
-
-.icon-volume-off {
- background-position: -360px -24px;
-}
-
-.icon-volume-down {
- background-position: -384px -24px;
-}
-
-.icon-volume-up {
- background-position: -408px -24px;
-}
-
-.icon-qrcode {
- background-position: -432px -24px;
-}
-
-.icon-barcode {
- background-position: -456px -24px;
-}
-
-.icon-tag {
- background-position: 0 -48px;
-}
-
-.icon-tags {
- background-position: -25px -48px;
-}
-
-.icon-book {
- background-position: -48px -48px;
-}
-
-.icon-bookmark {
- background-position: -72px -48px;
-}
-
-.icon-print {
- background-position: -96px -48px;
-}
-
-.icon-camera {
- background-position: -120px -48px;
-}
-
-.icon-font {
- background-position: -144px -48px;
-}
-
-.icon-bold {
- background-position: -167px -48px;
-}
-
-.icon-italic {
- background-position: -192px -48px;
-}
-
-.icon-text-height {
- background-position: -216px -48px;
-}
-
-.icon-text-width {
- background-position: -240px -48px;
-}
-
-.icon-align-left {
- background-position: -264px -48px;
-}
-
-.icon-align-center {
- background-position: -288px -48px;
-}
-
-.icon-align-right {
- background-position: -312px -48px;
-}
-
-.icon-align-justify {
- background-position: -336px -48px;
-}
-
-.icon-list {
- background-position: -360px -48px;
-}
-
-.icon-indent-left {
- background-position: -384px -48px;
-}
-
-.icon-indent-right {
- background-position: -408px -48px;
-}
-
-.icon-facetime-video {
- background-position: -432px -48px;
-}
-
-.icon-picture {
- background-position: -456px -48px;
-}
-
-.icon-pencil {
- background-position: 0 -72px;
-}
-
-.icon-map-marker {
- background-position: -24px -72px;
-}
-
-.icon-adjust {
- background-position: -48px -72px;
-}
-
-.icon-tint {
- background-position: -72px -72px;
-}
-
-.icon-edit {
- background-position: -96px -72px;
-}
-
-.icon-share {
- background-position: -120px -72px;
-}
-
-.icon-check {
- background-position: -144px -72px;
-}
-
-.icon-move {
- background-position: -168px -72px;
-}
-
-.icon-step-backward {
- background-position: -192px -72px;
-}
-
-.icon-fast-backward {
- background-position: -216px -72px;
-}
-
-.icon-backward {
- background-position: -240px -72px;
-}
-
-.icon-play {
- background-position: -264px -72px;
-}
-
-.icon-pause {
- background-position: -288px -72px;
-}
-
-.icon-stop {
- background-position: -312px -72px;
-}
-
-.icon-forward {
- background-position: -336px -72px;
-}
-
-.icon-fast-forward {
- background-position: -360px -72px;
-}
-
-.icon-step-forward {
- background-position: -384px -72px;
-}
-
-.icon-eject {
- background-position: -408px -72px;
-}
-
-.icon-chevron-left {
- background-position: -432px -72px;
-}
-
-.icon-chevron-right {
- background-position: -456px -72px;
-}
-
-.icon-plus-sign {
- background-position: 0 -96px;
-}
-
-.icon-minus-sign {
- background-position: -24px -96px;
-}
-
-.icon-remove-sign {
- background-position: -48px -96px;
-}
-
-.icon-ok-sign {
- background-position: -72px -96px;
-}
-
-.icon-question-sign {
- background-position: -96px -96px;
-}
-
-.icon-info-sign {
- background-position: -120px -96px;
-}
-
-.icon-screenshot {
- background-position: -144px -96px;
-}
-
-.icon-remove-circle {
- background-position: -168px -96px;
-}
-
-.icon-ok-circle {
- background-position: -192px -96px;
-}
-
-.icon-ban-circle {
- background-position: -216px -96px;
-}
-
-.icon-arrow-left {
- background-position: -240px -96px;
-}
-
-.icon-arrow-right {
- background-position: -264px -96px;
-}
-
-.icon-arrow-up {
- background-position: -289px -96px;
-}
-
-.icon-arrow-down {
- background-position: -312px -96px;
-}
-
-.icon-share-alt {
- background-position: -336px -96px;
-}
-
-.icon-resize-full {
- background-position: -360px -96px;
-}
-
-.icon-resize-small {
- background-position: -384px -96px;
-}
-
-.icon-plus {
- background-position: -408px -96px;
-}
-
-.icon-minus {
- background-position: -433px -96px;
-}
-
-.icon-asterisk {
- background-position: -456px -96px;
-}
-
-.icon-exclamation-sign {
- background-position: 0 -120px;
-}
-
-.icon-gift {
- background-position: -24px -120px;
-}
-
-.icon-leaf {
- background-position: -48px -120px;
-}
-
-.icon-fire {
- background-position: -72px -120px;
-}
-
-.icon-eye-open {
- background-position: -96px -120px;
-}
-
-.icon-eye-close {
- background-position: -120px -120px;
-}
-
-.icon-warning-sign {
- background-position: -144px -120px;
-}
-
-.icon-plane {
- background-position: -168px -120px;
-}
-
-.icon-calendar {
- background-position: -192px -120px;
-}
-
-.icon-random {
- width: 16px;
- background-position: -216px -120px;
-}
-
-.icon-comment {
- background-position: -240px -120px;
-}
-
-.icon-magnet {
- background-position: -264px -120px;
-}
-
-.icon-chevron-up {
- background-position: -288px -120px;
-}
-
-.icon-chevron-down {
- background-position: -313px -119px;
-}
-
-.icon-retweet {
- background-position: -336px -120px;
-}
-
-.icon-shopping-cart {
- background-position: -360px -120px;
-}
-
-.icon-folder-close {
- width: 16px;
- background-position: -384px -120px;
-}
-
-.icon-folder-open {
- width: 16px;
- background-position: -408px -120px;
-}
-
-.icon-resize-vertical {
- background-position: -432px -119px;
-}
-
-.icon-resize-horizontal {
- background-position: -456px -118px;
-}
-
-.icon-hdd {
- background-position: 0 -144px;
-}
-
-.icon-bullhorn {
- background-position: -24px -144px;
-}
-
-.icon-bell {
- background-position: -48px -144px;
-}
-
-.icon-certificate {
- background-position: -72px -144px;
-}
-
-.icon-thumbs-up {
- background-position: -96px -144px;
-}
-
-.icon-thumbs-down {
- background-position: -120px -144px;
-}
-
-.icon-hand-right {
- background-position: -144px -144px;
-}
-
-.icon-hand-left {
- background-position: -168px -144px;
-}
-
-.icon-hand-up {
- background-position: -192px -144px;
-}
-
-.icon-hand-down {
- background-position: -216px -144px;
-}
-
-.icon-circle-arrow-right {
- background-position: -240px -144px;
-}
-
-.icon-circle-arrow-left {
- background-position: -264px -144px;
-}
-
-.icon-circle-arrow-up {
- background-position: -288px -144px;
-}
-
-.icon-circle-arrow-down {
- background-position: -312px -144px;
-}
-
-.icon-globe {
- background-position: -336px -144px;
-}
-
-.icon-wrench {
- background-position: -360px -144px;
-}
-
-.icon-tasks {
- background-position: -384px -144px;
-}
-
-.icon-filter {
- background-position: -408px -144px;
-}
-
-.icon-briefcase {
- background-position: -432px -144px;
-}
-
-.icon-fullscreen {
- background-position: -456px -144px;
-}
-
-.dropup,
-.dropdown {
- position: relative;
-}
-
-.dropdown-toggle {
- *margin-bottom: -3px;
-}
-
-.dropdown-toggle:active,
-.open .dropdown-toggle {
- outline: 0;
-}
-
-.caret {
- display: inline-block;
- width: 0;
- height: 0;
- vertical-align: top;
- border-top: 4px solid #000000;
- border-right: 4px solid transparent;
- border-left: 4px solid transparent;
- content: "";
-}
-
-.dropdown .caret {
- margin-top: 8px;
- margin-left: 2px;
-}
-
-.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;
- background-color: #ffffff;
- border: 1px solid #ccc;
- border: 1px solid rgba(0, 0, 0, 0.2);
- *border-right-width: 2px;
- *border-bottom-width: 2px;
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
- -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
- -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
- box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
- -webkit-background-clip: padding-box;
- -moz-background-clip: padding;
- background-clip: padding-box;
-}
-
-.dropdown-menu.pull-right {
- right: 0;
- left: auto;
-}
-
-.dropdown-menu .divider {
- *width: 100%;
- height: 1px;
- margin: 9px 1px;
- *margin: -5px 0 5px;
- overflow: hidden;
- background-color: #e5e5e5;
- border-bottom: 1px solid #ffffff;
-}
-
-.dropdown-menu > li > a {
- display: block;
- padding: 3px 20px;
- clear: both;
- font-weight: normal;
- line-height: 20px;
- color: #333333;
- white-space: nowrap;
-}
-
-.dropdown-menu > li > a:hover,
-.dropdown-menu > li > a:focus,
-.dropdown-submenu:hover > a,
-.dropdown-submenu:focus > a {
- color: #ffffff;
- text-decoration: none;
- background-color: #0081c2;
- background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));
- background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);
- background-image: -o-linear-gradient(top, #0088cc, #0077b3);
- background-image: linear-gradient(to bottom, #0088cc, #0077b3);
- background-repeat: repeat-x;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
-}
-
-.dropdown-menu > .active > a,
-.dropdown-menu > .active > a:hover,
-.dropdown-menu > .active > a:focus {
- color: #ffffff;
- text-decoration: none;
- background-color: #0081c2;
- background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));
- background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);
- background-image: -o-linear-gradient(top, #0088cc, #0077b3);
- background-image: linear-gradient(to bottom, #0088cc, #0077b3);
- background-repeat: repeat-x;
- outline: 0;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
-}
-
-.dropdown-menu > .disabled > a,
-.dropdown-menu > .disabled > a:hover,
-.dropdown-menu > .disabled > a:focus {
- color: #999999;
-}
-
-.dropdown-menu > .disabled > a:hover,
-.dropdown-menu > .disabled > a:focus {
- text-decoration: none;
- cursor: default;
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
-}
-
-.open {
- *z-index: 1000;
-}
-
-.open > .dropdown-menu {
- display: block;
-}
-
-.dropdown-backdrop {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- z-index: 990;
-}
-
-.pull-right > .dropdown-menu {
- right: 0;
- left: auto;
-}
-
-.dropup .caret,
-.navbar-fixed-bottom .dropdown .caret {
- border-top: 0;
- border-bottom: 4px solid #000000;
- content: "";
-}
-
-.dropup .dropdown-menu,
-.navbar-fixed-bottom .dropdown .dropdown-menu {
- top: auto;
- bottom: 100%;
- margin-bottom: 1px;
-}
-
-.dropdown-submenu {
- position: relative;
-}
-
-.dropdown-submenu > .dropdown-menu {
- top: 0;
- left: 100%;
- margin-top: -6px;
- margin-left: -1px;
- -webkit-border-radius: 0 6px 6px 6px;
- -moz-border-radius: 0 6px 6px 6px;
- border-radius: 0 6px 6px 6px;
-}
-
-.dropdown-submenu:hover > .dropdown-menu {
- display: block;
-}
-
-.dropup .dropdown-submenu > .dropdown-menu {
- top: auto;
- bottom: 0;
- margin-top: 0;
- margin-bottom: -2px;
- -webkit-border-radius: 5px 5px 5px 0;
- -moz-border-radius: 5px 5px 5px 0;
- border-radius: 5px 5px 5px 0;
-}
-
-.dropdown-submenu > a:after {
- display: block;
- float: right;
- width: 0;
- height: 0;
- margin-top: 5px;
- margin-right: -10px;
- border-color: transparent;
- border-left-color: #cccccc;
- border-style: solid;
- border-width: 5px 0 5px 5px;
- content: " ";
-}
-
-.dropdown-submenu:hover > a:after {
- border-left-color: #ffffff;
-}
-
-.dropdown-submenu.pull-left {
- float: none;
-}
-
-.dropdown-submenu.pull-left > .dropdown-menu {
- left: -100%;
- margin-left: 10px;
- -webkit-border-radius: 6px 0 6px 6px;
- -moz-border-radius: 6px 0 6px 6px;
- border-radius: 6px 0 6px 6px;
-}
-
-.dropdown .dropdown-menu .nav-header {
- padding-right: 20px;
- padding-left: 20px;
-}
-
-.typeahead {
- z-index: 1051;
- margin-top: 2px;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
-}
-
-.well {
- min-height: 20px;
- padding: 19px;
- margin-bottom: 20px;
- background-color: #f5f5f5;
- border: 1px solid #e3e3e3;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
- -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
-}
-
-.well blockquote {
- border-color: #ddd;
- border-color: rgba(0, 0, 0, 0.15);
-}
-
-.well-large {
- padding: 24px;
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
-}
-
-.well-small {
- padding: 9px;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
-}
-
-.fade {
- opacity: 0;
- -webkit-transition: opacity 0.15s linear;
- -moz-transition: opacity 0.15s linear;
- -o-transition: opacity 0.15s linear;
- transition: opacity 0.15s linear;
-}
-
-.fade.in {
- opacity: 1;
-}
-
-.collapse {
- position: relative;
- height: 0;
- overflow: hidden;
- -webkit-transition: height 0.35s ease;
- -moz-transition: height 0.35s ease;
- -o-transition: height 0.35s ease;
- transition: height 0.35s ease;
-}
-
-.collapse.in {
- height: auto;
-}
-
-.close {
- float: right;
- font-size: 20px;
- font-weight: bold;
- line-height: 20px;
- color: #000000;
- text-shadow: 0 1px 0 #ffffff;
- opacity: 0.2;
- filter: alpha(opacity=20);
-}
-
-.close:hover,
-.close:focus {
- color: #000000;
- text-decoration: none;
- cursor: pointer;
- opacity: 0.4;
- filter: alpha(opacity=40);
-}
-
-button.close {
- padding: 0;
- cursor: pointer;
- background: transparent;
- border: 0;
- -webkit-appearance: none;
-}
-
-.btn {
- display: inline-block;
- *display: inline;
- padding: 4px 12px;
- margin-bottom: 0;
- *margin-left: .3em;
- font-size: 14px;
- line-height: 20px;
- color: #333333;
- text-align: center;
- text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
- vertical-align: middle;
- cursor: pointer;
- background-color: #f5f5f5;
- *background-color: #e6e6e6;
- background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
- background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
- background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
- background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
- background-repeat: repeat-x;
- border: 1px solid #cccccc;
- *border: 0;
- border-color: #e6e6e6 #e6e6e6 #bfbfbf;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
- border-bottom-color: #b3b3b3;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
- *zoom: 1;
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
- -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-}
-
-.btn:hover,
-.btn:focus,
-.btn:active,
-.btn.active,
-.btn.disabled,
-.btn[disabled] {
- color: #333333;
- background-color: #e6e6e6;
- *background-color: #d9d9d9;
-}
-
-.btn:active,
-.btn.active {
- background-color: #cccccc \9;
-}
-
-.btn:first-child {
- *margin-left: 0;
-}
-
-.btn:hover,
-.btn:focus {
- color: #333333;
- text-decoration: none;
- background-position: 0 -15px;
- -webkit-transition: background-position 0.1s linear;
- -moz-transition: background-position 0.1s linear;
- -o-transition: background-position 0.1s linear;
- transition: background-position 0.1s linear;
-}
-
-.btn:focus {
- outline: thin dotted #333;
- outline: 5px auto -webkit-focus-ring-color;
- outline-offset: -2px;
-}
-
-.btn.active,
-.btn:active {
- background-image: none;
- outline: 0;
- -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
- -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
- box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
-}
-
-.btn.disabled,
-.btn[disabled] {
- cursor: default;
- background-image: none;
- opacity: 0.65;
- filter: alpha(opacity=65);
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
-}
-
-.btn-large {
- padding: 11px 19px;
- font-size: 17.5px;
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
-}
-
-.btn-large [class^="icon-"],
-.btn-large [class*=" icon-"] {
- margin-top: 4px;
-}
-
-.btn-small {
- padding: 2px 10px;
- font-size: 11.9px;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
-}
-
-.btn-small [class^="icon-"],
-.btn-small [class*=" icon-"] {
- margin-top: 0;
-}
-
-.btn-mini [class^="icon-"],
-.btn-mini [class*=" icon-"] {
- margin-top: -1px;
-}
-
-.btn-mini {
- padding: 0 6px;
- font-size: 10.5px;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
-}
-
-.btn-block {
- display: block;
- width: 100%;
- padding-right: 0;
- padding-left: 0;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
-
-.btn-block + .btn-block {
- margin-top: 5px;
-}
-
-input[type="submit"].btn-block,
-input[type="reset"].btn-block,
-input[type="button"].btn-block {
- width: 100%;
-}
-
-.btn-primary.active,
-.btn-warning.active,
-.btn-danger.active,
-.btn-success.active,
-.btn-info.active,
-.btn-inverse.active {
- color: rgba(255, 255, 255, 0.75);
-}
-
-.btn-primary {
- color: #ffffff;
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- background-color: #006dcc;
- *background-color: #0044cc;
- background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
- background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
- background-image: -o-linear-gradient(top, #0088cc, #0044cc);
- background-image: linear-gradient(to bottom, #0088cc, #0044cc);
- background-repeat: repeat-x;
- border-color: #0044cc #0044cc #002a80;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
-}
-
-.btn-primary:hover,
-.btn-primary:focus,
-.btn-primary:active,
-.btn-primary.active,
-.btn-primary.disabled,
-.btn-primary[disabled] {
- color: #ffffff;
- background-color: #0044cc;
- *background-color: #003bb3;
-}
-
-.btn-primary:active,
-.btn-primary.active {
- background-color: #003399 \9;
-}
-
-.btn-warning {
- color: #ffffff;
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- background-color: #faa732;
- *background-color: #f89406;
- background-image: -moz-linear-gradient(top, #fbb450, #f89406);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
- background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
- background-image: -o-linear-gradient(top, #fbb450, #f89406);
- background-image: linear-gradient(to bottom, #fbb450, #f89406);
- background-repeat: repeat-x;
- border-color: #f89406 #f89406 #ad6704;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
-}
-
-.btn-warning:hover,
-.btn-warning:focus,
-.btn-warning:active,
-.btn-warning.active,
-.btn-warning.disabled,
-.btn-warning[disabled] {
- color: #ffffff;
- background-color: #f89406;
- *background-color: #df8505;
-}
-
-.btn-warning:active,
-.btn-warning.active {
- background-color: #c67605 \9;
-}
-
-.btn-danger {
- color: #ffffff;
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- background-color: #da4f49;
- *background-color: #bd362f;
- background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));
- background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);
- background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);
- background-image: linear-gradient(to bottom, #ee5f5b, #bd362f);
- background-repeat: repeat-x;
- border-color: #bd362f #bd362f #802420;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
-}
-
-.btn-danger:hover,
-.btn-danger:focus,
-.btn-danger:active,
-.btn-danger.active,
-.btn-danger.disabled,
-.btn-danger[disabled] {
- color: #ffffff;
- background-color: #bd362f;
- *background-color: #a9302a;
-}
-
-.btn-danger:active,
-.btn-danger.active {
- background-color: #942a25 \9;
-}
-
-.btn-success {
- color: #ffffff;
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- background-color: #5bb75b;
- *background-color: #51a351;
- background-image: -moz-linear-gradient(top, #62c462, #51a351);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));
- background-image: -webkit-linear-gradient(top, #62c462, #51a351);
- background-image: -o-linear-gradient(top, #62c462, #51a351);
- background-image: linear-gradient(to bottom, #62c462, #51a351);
- background-repeat: repeat-x;
- border-color: #51a351 #51a351 #387038;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
-}
-
-.btn-success:hover,
-.btn-success:focus,
-.btn-success:active,
-.btn-success.active,
-.btn-success.disabled,
-.btn-success[disabled] {
- color: #ffffff;
- background-color: #51a351;
- *background-color: #499249;
-}
-
-.btn-success:active,
-.btn-success.active {
- background-color: #408140 \9;
-}
-
-.btn-info {
- color: #ffffff;
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- background-color: #49afcd;
- *background-color: #2f96b4;
- background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));
- background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4);
- background-image: -o-linear-gradient(top, #5bc0de, #2f96b4);
- background-image: linear-gradient(to bottom, #5bc0de, #2f96b4);
- background-repeat: repeat-x;
- border-color: #2f96b4 #2f96b4 #1f6377;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
-}
-
-.btn-info:hover,
-.btn-info:focus,
-.btn-info:active,
-.btn-info.active,
-.btn-info.disabled,
-.btn-info[disabled] {
- color: #ffffff;
- background-color: #2f96b4;
- *background-color: #2a85a0;
-}
-
-.btn-info:active,
-.btn-info.active {
- background-color: #24748c \9;
-}
-
-.btn-inverse {
- color: #ffffff;
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- background-color: #363636;
- *background-color: #222222;
- background-image: -moz-linear-gradient(top, #444444, #222222);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222));
- background-image: -webkit-linear-gradient(top, #444444, #222222);
- background-image: -o-linear-gradient(top, #444444, #222222);
- background-image: linear-gradient(to bottom, #444444, #222222);
- background-repeat: repeat-x;
- border-color: #222222 #222222 #000000;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
-}
-
-.btn-inverse:hover,
-.btn-inverse:focus,
-.btn-inverse:active,
-.btn-inverse.active,
-.btn-inverse.disabled,
-.btn-inverse[disabled] {
- color: #ffffff;
- background-color: #222222;
- *background-color: #151515;
-}
-
-.btn-inverse:active,
-.btn-inverse.active {
- background-color: #080808 \9;
-}
-
-button.btn,
-input[type="submit"].btn {
- *padding-top: 3px;
- *padding-bottom: 3px;
-}
-
-button.btn::-moz-focus-inner,
-input[type="submit"].btn::-moz-focus-inner {
- padding: 0;
- border: 0;
-}
-
-button.btn.btn-large,
-input[type="submit"].btn.btn-large {
- *padding-top: 7px;
- *padding-bottom: 7px;
-}
-
-button.btn.btn-small,
-input[type="submit"].btn.btn-small {
- *padding-top: 3px;
- *padding-bottom: 3px;
-}
-
-button.btn.btn-mini,
-input[type="submit"].btn.btn-mini {
- *padding-top: 1px;
- *padding-bottom: 1px;
-}
-
-.btn-link,
-.btn-link:active,
-.btn-link[disabled] {
- background-color: transparent;
- background-image: none;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
-}
-
-.btn-link {
- color: #0088cc;
- cursor: pointer;
- border-color: transparent;
- -webkit-border-radius: 0;
- -moz-border-radius: 0;
- border-radius: 0;
-}
-
-.btn-link:hover,
-.btn-link:focus {
- color: #005580;
- text-decoration: underline;
- background-color: transparent;
-}
-
-.btn-link[disabled]:hover,
-.btn-link[disabled]:focus {
- color: #333333;
- text-decoration: none;
-}
-
-.btn-group {
- position: relative;
- display: inline-block;
- *display: inline;
- *margin-left: .3em;
- font-size: 0;
- white-space: nowrap;
- vertical-align: middle;
- *zoom: 1;
-}
-
-.btn-group:first-child {
- *margin-left: 0;
-}
-
-.btn-group + .btn-group {
- margin-left: 5px;
-}
-
-.btn-toolbar {
- margin-top: 10px;
- margin-bottom: 10px;
- font-size: 0;
-}
-
-.btn-toolbar > .btn + .btn,
-.btn-toolbar > .btn-group + .btn,
-.btn-toolbar > .btn + .btn-group {
- margin-left: 5px;
-}
-
-.btn-group > .btn {
- position: relative;
- -webkit-border-radius: 0;
- -moz-border-radius: 0;
- border-radius: 0;
-}
-
-.btn-group > .btn + .btn {
- margin-left: -1px;
-}
-
-.btn-group > .btn,
-.btn-group > .dropdown-menu,
-.btn-group > .popover {
- font-size: 14px;
-}
-
-.btn-group > .btn-mini {
- font-size: 10.5px;
-}
-
-.btn-group > .btn-small {
- font-size: 11.9px;
-}
-
-.btn-group > .btn-large {
- font-size: 17.5px;
-}
-
-.btn-group > .btn:first-child {
- margin-left: 0;
- -webkit-border-bottom-left-radius: 4px;
- border-bottom-left-radius: 4px;
- -webkit-border-top-left-radius: 4px;
- border-top-left-radius: 4px;
- -moz-border-radius-bottomleft: 4px;
- -moz-border-radius-topleft: 4px;
-}
-
-.btn-group > .btn:last-child,
-.btn-group > .dropdown-toggle {
- -webkit-border-top-right-radius: 4px;
- border-top-right-radius: 4px;
- -webkit-border-bottom-right-radius: 4px;
- border-bottom-right-radius: 4px;
- -moz-border-radius-topright: 4px;
- -moz-border-radius-bottomright: 4px;
-}
-
-.btn-group > .btn.large:first-child {
- margin-left: 0;
- -webkit-border-bottom-left-radius: 6px;
- border-bottom-left-radius: 6px;
- -webkit-border-top-left-radius: 6px;
- border-top-left-radius: 6px;
- -moz-border-radius-bottomleft: 6px;
- -moz-border-radius-topleft: 6px;
-}
-
-.btn-group > .btn.large:last-child,
-.btn-group > .large.dropdown-toggle {
- -webkit-border-top-right-radius: 6px;
- border-top-right-radius: 6px;
- -webkit-border-bottom-right-radius: 6px;
- border-bottom-right-radius: 6px;
- -moz-border-radius-topright: 6px;
- -moz-border-radius-bottomright: 6px;
-}
-
-.btn-group > .btn:hover,
-.btn-group > .btn:focus,
-.btn-group > .btn:active,
-.btn-group > .btn.active {
- z-index: 2;
-}
-
-.btn-group .dropdown-toggle:active,
-.btn-group.open .dropdown-toggle {
- outline: 0;
-}
-
-.btn-group > .btn + .dropdown-toggle {
- *padding-top: 5px;
- padding-right: 8px;
- *padding-bottom: 5px;
- padding-left: 8px;
- -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
- -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
- box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-}
-
-.btn-group > .btn-mini + .dropdown-toggle {
- *padding-top: 2px;
- padding-right: 5px;
- *padding-bottom: 2px;
- padding-left: 5px;
-}
-
-.btn-group > .btn-small + .dropdown-toggle {
- *padding-top: 5px;
- *padding-bottom: 4px;
-}
-
-.btn-group > .btn-large + .dropdown-toggle {
- *padding-top: 7px;
- padding-right: 12px;
- *padding-bottom: 7px;
- padding-left: 12px;
-}
-
-.btn-group.open .dropdown-toggle {
- background-image: none;
- -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
- -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
- box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
-}
-
-.btn-group.open .btn.dropdown-toggle {
- background-color: #e6e6e6;
-}
-
-.btn-group.open .btn-primary.dropdown-toggle {
- background-color: #0044cc;
-}
-
-.btn-group.open .btn-warning.dropdown-toggle {
- background-color: #f89406;
-}
-
-.btn-group.open .btn-danger.dropdown-toggle {
- background-color: #bd362f;
-}
-
-.btn-group.open .btn-success.dropdown-toggle {
- background-color: #51a351;
-}
-
-.btn-group.open .btn-info.dropdown-toggle {
- background-color: #2f96b4;
-}
-
-.btn-group.open .btn-inverse.dropdown-toggle {
- background-color: #222222;
-}
-
-.btn .caret {
- margin-top: 8px;
- margin-left: 0;
-}
-
-.btn-large .caret {
- margin-top: 6px;
-}
-
-.btn-large .caret {
- border-top-width: 5px;
- border-right-width: 5px;
- border-left-width: 5px;
-}
-
-.btn-mini .caret,
-.btn-small .caret {
- margin-top: 8px;
-}
-
-.dropup .btn-large .caret {
- border-bottom-width: 5px;
-}
-
-.btn-primary .caret,
-.btn-warning .caret,
-.btn-danger .caret,
-.btn-info .caret,
-.btn-success .caret,
-.btn-inverse .caret {
- border-top-color: #ffffff;
- border-bottom-color: #ffffff;
-}
-
-.btn-group-vertical {
- display: inline-block;
- *display: inline;
- /* IE7 inline-block hack */
-
- *zoom: 1;
-}
-
-.btn-group-vertical > .btn {
- display: block;
- float: none;
- max-width: 100%;
- -webkit-border-radius: 0;
- -moz-border-radius: 0;
- border-radius: 0;
-}
-
-.btn-group-vertical > .btn + .btn {
- margin-top: -1px;
- margin-left: 0;
-}
-
-.btn-group-vertical > .btn:first-child {
- -webkit-border-radius: 4px 4px 0 0;
- -moz-border-radius: 4px 4px 0 0;
- border-radius: 4px 4px 0 0;
-}
-
-.btn-group-vertical > .btn:last-child {
- -webkit-border-radius: 0 0 4px 4px;
- -moz-border-radius: 0 0 4px 4px;
- border-radius: 0 0 4px 4px;
-}
-
-.btn-group-vertical > .btn-large:first-child {
- -webkit-border-radius: 6px 6px 0 0;
- -moz-border-radius: 6px 6px 0 0;
- border-radius: 6px 6px 0 0;
-}
-
-.btn-group-vertical > .btn-large:last-child {
- -webkit-border-radius: 0 0 6px 6px;
- -moz-border-radius: 0 0 6px 6px;
- border-radius: 0 0 6px 6px;
-}
-
-.alert {
- padding: 8px 35px 8px 14px;
- margin-bottom: 20px;
- text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
- background-color: #fcf8e3;
- border: 1px solid #fbeed5;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
-}
-
-.alert,
-.alert h4 {
- color: #c09853;
-}
-
-.alert h4 {
- margin: 0;
-}
-
-.alert .close {
- position: relative;
- top: -2px;
- right: -21px;
- line-height: 20px;
-}
-
-.alert-success {
- color: #468847;
- background-color: #dff0d8;
- border-color: #d6e9c6;
-}
-
-.alert-success h4 {
- color: #468847;
-}
-
-.alert-danger,
-.alert-error {
- color: #b94a48;
- background-color: #f2dede;
- border-color: #eed3d7;
-}
-
-.alert-danger h4,
-.alert-error h4 {
- color: #b94a48;
-}
-
-.alert-info {
- color: #3a87ad;
- background-color: #d9edf7;
- border-color: #bce8f1;
-}
-
-.alert-info h4 {
- color: #3a87ad;
-}
-
-.alert-block {
- padding-top: 14px;
- padding-bottom: 14px;
-}
-
-.alert-block > p,
-.alert-block > ul {
- margin-bottom: 0;
-}
-
-.alert-block p + p {
- margin-top: 5px;
-}
-
-.nav {
- margin-bottom: 20px;
- margin-left: 0;
- list-style: none;
-}
-
-.nav > li > a {
- display: block;
-}
-
-.nav > li > a:hover,
-.nav > li > a:focus {
- text-decoration: none;
- background-color: #eeeeee;
-}
-
-.nav > li > a > img {
- max-width: none;
-}
-
-.nav > .pull-right {
- float: right;
-}
-
-.nav-header {
- display: block;
- padding: 3px 15px;
- font-size: 11px;
- font-weight: bold;
- line-height: 20px;
- color: #999999;
- text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
- text-transform: uppercase;
-}
-
-.nav li + .nav-header {
- margin-top: 9px;
-}
-
-.nav-list {
- padding-right: 15px;
- padding-left: 15px;
- margin-bottom: 0;
-}
-
-.nav-list > li > a,
-.nav-list .nav-header {
- margin-right: -15px;
- margin-left: -15px;
- text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
-}
-
-.nav-list > li > a {
- padding: 3px 15px;
-}
-
-.nav-list > .active > a,
-.nav-list > .active > a:hover,
-.nav-list > .active > a:focus {
- color: #ffffff;
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
- background-color: #0088cc;
-}
-
-.nav-list [class^="icon-"],
-.nav-list [class*=" icon-"] {
- margin-right: 2px;
-}
-
-.nav-list .divider {
- *width: 100%;
- height: 1px;
- margin: 9px 1px;
- *margin: -5px 0 5px;
- overflow: hidden;
- background-color: #e5e5e5;
- border-bottom: 1px solid #ffffff;
-}
-
-.nav-tabs,
-.nav-pills {
- *zoom: 1;
-}
-
-.nav-tabs:before,
-.nav-pills:before,
-.nav-tabs:after,
-.nav-pills:after {
- display: table;
- line-height: 0;
- content: "";
-}
-
-.nav-tabs:after,
-.nav-pills:after {
- clear: both;
-}
-
-.nav-tabs > li,
-.nav-pills > li {
- float: left;
-}
-
-.nav-tabs > li > a,
-.nav-pills > li > a {
- padding-right: 12px;
- padding-left: 12px;
- margin-right: 2px;
- line-height: 14px;
-}
-
-.nav-tabs {
- border-bottom: 1px solid #ddd;
-}
-
-.nav-tabs > li {
- margin-bottom: -1px;
-}
-
-.nav-tabs > li > a {
- padding-top: 8px;
- padding-bottom: 8px;
- line-height: 20px;
- border: 1px solid transparent;
- -webkit-border-radius: 4px 4px 0 0;
- -moz-border-radius: 4px 4px 0 0;
- border-radius: 4px 4px 0 0;
-}
-
-.nav-tabs > li > a:hover,
-.nav-tabs > li > a:focus {
- border-color: #eeeeee #eeeeee #dddddd;
-}
-
-.nav-tabs > .active > a,
-.nav-tabs > .active > a:hover,
-.nav-tabs > .active > a:focus {
- color: #555555;
- cursor: default;
- background-color: #ffffff;
- border: 1px solid #ddd;
- border-bottom-color: transparent;
-}
-
-.nav-pills > li > a {
- padding-top: 8px;
- padding-bottom: 8px;
- margin-top: 2px;
- margin-bottom: 2px;
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px;
-}
-
-.nav-pills > .active > a,
-.nav-pills > .active > a:hover,
-.nav-pills > .active > a:focus {
- color: #ffffff;
- background-color: #0088cc;
-}
-
-.nav-stacked > li {
- float: none;
-}
-
-.nav-stacked > li > a {
- margin-right: 0;
-}
-
-.nav-tabs.nav-stacked {
- border-bottom: 0;
-}
-
-.nav-tabs.nav-stacked > li > a {
- border: 1px solid #ddd;
- -webkit-border-radius: 0;
- -moz-border-radius: 0;
- border-radius: 0;
-}
-
-.nav-tabs.nav-stacked > li:first-child > a {
- -webkit-border-top-right-radius: 4px;
- border-top-right-radius: 4px;
- -webkit-border-top-left-radius: 4px;
- border-top-left-radius: 4px;
- -moz-border-radius-topright: 4px;
- -moz-border-radius-topleft: 4px;
-}
-
-.nav-tabs.nav-stacked > li:last-child > a {
- -webkit-border-bottom-right-radius: 4px;
- border-bottom-right-radius: 4px;
- -webkit-border-bottom-left-radius: 4px;
- border-bottom-left-radius: 4px;
- -moz-border-radius-bottomright: 4px;
- -moz-border-radius-bottomleft: 4px;
-}
-
-.nav-tabs.nav-stacked > li > a:hover,
-.nav-tabs.nav-stacked > li > a:focus {
- z-index: 2;
- border-color: #ddd;
-}
-
-.nav-pills.nav-stacked > li > a {
- margin-bottom: 3px;
-}
-
-.nav-pills.nav-stacked > li:last-child > a {
- margin-bottom: 1px;
-}
-
-.nav-tabs .dropdown-menu {
- -webkit-border-radius: 0 0 6px 6px;
- -moz-border-radius: 0 0 6px 6px;
- border-radius: 0 0 6px 6px;
-}
-
-.nav-pills .dropdown-menu {
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
-}
-
-.nav .dropdown-toggle .caret {
- margin-top: 6px;
- border-top-color: #0088cc;
- border-bottom-color: #0088cc;
-}
-
-.nav .dropdown-toggle:hover .caret,
-.nav .dropdown-toggle:focus .caret {
- border-top-color: #005580;
- border-bottom-color: #005580;
-}
-
-/* move down carets for tabs */
-
-.nav-tabs .dropdown-toggle .caret {
- margin-top: 8px;
-}
-
-.nav .active .dropdown-toggle .caret {
- border-top-color: #fff;
- border-bottom-color: #fff;
-}
-
-.nav-tabs .active .dropdown-toggle .caret {
- border-top-color: #555555;
- border-bottom-color: #555555;
-}
-
-.nav > .dropdown.active > a:hover,
-.nav > .dropdown.active > a:focus {
- cursor: pointer;
-}
-
-.nav-tabs .open .dropdown-toggle,
-.nav-pills .open .dropdown-toggle,
-.nav > li.dropdown.open.active > a:hover,
-.nav > li.dropdown.open.active > a:focus {
- color: #ffffff;
- background-color: #999999;
- border-color: #999999;
-}
-
-.nav li.dropdown.open .caret,
-.nav li.dropdown.open.active .caret,
-.nav li.dropdown.open a:hover .caret,
-.nav li.dropdown.open a:focus .caret {
- border-top-color: #ffffff;
- border-bottom-color: #ffffff;
- opacity: 1;
- filter: alpha(opacity=100);
-}
-
-.tabs-stacked .open > a:hover,
-.tabs-stacked .open > a:focus {
- border-color: #999999;
-}
-
-.tabbable {
- *zoom: 1;
-}
-
-.tabbable:before,
-.tabbable:after {
- display: table;
- line-height: 0;
- content: "";
-}
-
-.tabbable:after {
- clear: both;
-}
-
-.tab-content {
- overflow: auto;
-}
-
-.tabs-below > .nav-tabs,
-.tabs-right > .nav-tabs,
-.tabs-left > .nav-tabs {
- border-bottom: 0;
-}
-
-.tab-content > .tab-pane,
-.pill-content > .pill-pane {
- display: none;
-}
-
-.tab-content > .active,
-.pill-content > .active {
- display: block;
-}
-
-.tabs-below > .nav-tabs {
- border-top: 1px solid #ddd;
-}
-
-.tabs-below > .nav-tabs > li {
- margin-top: -1px;
- margin-bottom: 0;
-}
-
-.tabs-below > .nav-tabs > li > a {
- -webkit-border-radius: 0 0 4px 4px;
- -moz-border-radius: 0 0 4px 4px;
- border-radius: 0 0 4px 4px;
-}
-
-.tabs-below > .nav-tabs > li > a:hover,
-.tabs-below > .nav-tabs > li > a:focus {
- border-top-color: #ddd;
- border-bottom-color: transparent;
-}
-
-.tabs-below > .nav-tabs > .active > a,
-.tabs-below > .nav-tabs > .active > a:hover,
-.tabs-below > .nav-tabs > .active > a:focus {
- border-color: transparent #ddd #ddd #ddd;
-}
-
-.tabs-left > .nav-tabs > li,
-.tabs-right > .nav-tabs > li {
- float: none;
-}
-
-.tabs-left > .nav-tabs > li > a,
-.tabs-right > .nav-tabs > li > a {
- min-width: 74px;
- margin-right: 0;
- margin-bottom: 3px;
-}
-
-.tabs-left > .nav-tabs {
- float: left;
- margin-right: 19px;
- border-right: 1px solid #ddd;
-}
-
-.tabs-left > .nav-tabs > li > a {
- margin-right: -1px;
- -webkit-border-radius: 4px 0 0 4px;
- -moz-border-radius: 4px 0 0 4px;
- border-radius: 4px 0 0 4px;
-}
-
-.tabs-left > .nav-tabs > li > a:hover,
-.tabs-left > .nav-tabs > li > a:focus {
- border-color: #eeeeee #dddddd #eeeeee #eeeeee;
-}
-
-.tabs-left > .nav-tabs .active > a,
-.tabs-left > .nav-tabs .active > a:hover,
-.tabs-left > .nav-tabs .active > a:focus {
- border-color: #ddd transparent #ddd #ddd;
- *border-right-color: #ffffff;
-}
-
-.tabs-right > .nav-tabs {
- float: right;
- margin-left: 19px;
- border-left: 1px solid #ddd;
-}
-
-.tabs-right > .nav-tabs > li > a {
- margin-left: -1px;
- -webkit-border-radius: 0 4px 4px 0;
- -moz-border-radius: 0 4px 4px 0;
- border-radius: 0 4px 4px 0;
-}
-
-.tabs-right > .nav-tabs > li > a:hover,
-.tabs-right > .nav-tabs > li > a:focus {
- border-color: #eeeeee #eeeeee #eeeeee #dddddd;
-}
-
-.tabs-right > .nav-tabs .active > a,
-.tabs-right > .nav-tabs .active > a:hover,
-.tabs-right > .nav-tabs .active > a:focus {
- border-color: #ddd #ddd #ddd transparent;
- *border-left-color: #ffffff;
-}
-
-.nav > .disabled > a {
- color: #999999;
-}
-
-.nav > .disabled > a:hover,
-.nav > .disabled > a:focus {
- text-decoration: none;
- cursor: default;
- background-color: transparent;
-}
-
-.navbar {
- *position: relative;
- *z-index: 2;
- margin-bottom: 20px;
- overflow: visible;
-}
-
-.navbar-inner {
- min-height: 40px;
- padding-right: 20px;
- padding-left: 20px;
- background-color: #fafafa;
- background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2));
- background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2);
- background-image: -o-linear-gradient(top, #ffffff, #f2f2f2);
- background-image: linear-gradient(to bottom, #ffffff, #f2f2f2);
- background-repeat: repeat-x;
- border: 1px solid #d4d4d4;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);
- *zoom: 1;
- -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
- -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
- box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
-}
-
-.navbar-inner:before,
-.navbar-inner:after {
- display: table;
- line-height: 0;
- content: "";
-}
-
-.navbar-inner:after {
- clear: both;
-}
-
-.navbar .container {
- width: auto;
-}
-
-.nav-collapse.collapse {
- height: auto;
- overflow: visible;
-}
-
-.navbar .brand {
- display: block;
- float: left;
- padding: 10px 20px 10px;
- margin-left: -20px;
- font-size: 20px;
- font-weight: 200;
- color: #777777;
- text-shadow: 0 1px 0 #ffffff;
-}
-
-.navbar .brand:hover,
-.navbar .brand:focus {
- text-decoration: none;
-}
-
-.navbar-text {
- margin-bottom: 0;
- line-height: 40px;
- color: #777777;
-}
-
-.navbar-link {
- color: #777777;
-}
-
-.navbar-link:hover,
-.navbar-link:focus {
- color: #333333;
-}
-
-.navbar .divider-vertical {
- height: 40px;
- margin: 0 9px;
- border-right: 1px solid #ffffff;
- border-left: 1px solid #f2f2f2;
-}
-
-.navbar .btn,
-.navbar .btn-group {
- margin-top: 5px;
-}
-
-.navbar .btn-group .btn,
-.navbar .input-prepend .btn,
-.navbar .input-append .btn,
-.navbar .input-prepend .btn-group,
-.navbar .input-append .btn-group {
- margin-top: 0;
-}
-
-.navbar-form {
- margin-bottom: 0;
- *zoom: 1;
-}
-
-.navbar-form:before,
-.navbar-form:after {
- display: table;
- line-height: 0;
- content: "";
-}
-
-.navbar-form:after {
- clear: both;
-}
-
-.navbar-form input,
-.navbar-form select,
-.navbar-form .radio,
-.navbar-form .checkbox {
- margin-top: 5px;
-}
-
-.navbar-form input,
-.navbar-form select,
-.navbar-form .btn {
- display: inline-block;
- margin-bottom: 0;
-}
-
-.navbar-form input[type="image"],
-.navbar-form input[type="checkbox"],
-.navbar-form input[type="radio"] {
- margin-top: 3px;
-}
-
-.navbar-form .input-append,
-.navbar-form .input-prepend {
- margin-top: 5px;
- white-space: nowrap;
-}
-
-.navbar-form .input-append input,
-.navbar-form .input-prepend input {
- margin-top: 0;
-}
-
-.navbar-search {
- position: relative;
- float: left;
- margin-top: 5px;
- margin-bottom: 0;
-}
-
-.navbar-search .search-query {
- padding: 4px 14px;
- margin-bottom: 0;
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size: 13px;
- font-weight: normal;
- line-height: 1;
- -webkit-border-radius: 15px;
- -moz-border-radius: 15px;
- border-radius: 15px;
-}
-
-.navbar-static-top {
- position: static;
- margin-bottom: 0;
-}
-
-.navbar-static-top .navbar-inner {
- -webkit-border-radius: 0;
- -moz-border-radius: 0;
- border-radius: 0;
-}
-
-.navbar-fixed-top,
-.navbar-fixed-bottom {
- position: fixed;
- right: 0;
- left: 0;
- z-index: 1030;
- margin-bottom: 0;
-}
-
-.navbar-fixed-top .navbar-inner,
-.navbar-static-top .navbar-inner {
- border-width: 0 0 1px;
-}
-
-.navbar-fixed-bottom .navbar-inner {
- border-width: 1px 0 0;
-}
-
-.navbar-fixed-top .navbar-inner,
-.navbar-fixed-bottom .navbar-inner {
- padding-right: 0;
- padding-left: 0;
- -webkit-border-radius: 0;
- -moz-border-radius: 0;
- border-radius: 0;
-}
-
-.navbar-static-top .container,
-.navbar-fixed-top .container,
-.navbar-fixed-bottom .container {
- width: 940px;
-}
-
-.navbar-fixed-top {
- top: 0;
-}
-
-.navbar-fixed-top .navbar-inner,
-.navbar-static-top .navbar-inner {
- -webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
- -moz-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
- box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
-}
-
-.navbar-fixed-bottom {
- bottom: 0;
-}
-
-.navbar-fixed-bottom .navbar-inner {
- -webkit-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1);
- -moz-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1);
- box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1);
-}
-
-.navbar .nav {
- position: relative;
- left: 0;
- display: block;
- float: left;
- margin: 0 10px 0 0;
-}
-
-.navbar .nav.pull-right {
- float: right;
- margin-right: 0;
-}
-
-.navbar .nav > li {
- float: left;
-}
-
-.navbar .nav > li > a {
- float: none;
- padding: 10px 15px 10px;
- color: #777777;
- text-decoration: none;
- text-shadow: 0 1px 0 #ffffff;
-}
-
-.navbar .nav .dropdown-toggle .caret {
- margin-top: 8px;
-}
-
-.navbar .nav > li > a:focus,
-.navbar .nav > li > a:hover {
- color: #333333;
- text-decoration: none;
- background-color: transparent;
-}
-
-.navbar .nav > .active > a,
-.navbar .nav > .active > a:hover,
-.navbar .nav > .active > a:focus {
- color: #555555;
- text-decoration: none;
- background-color: #e5e5e5;
- -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
- -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
- box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
-}
-
-.navbar .btn-navbar {
- display: none;
- float: right;
- padding: 7px 10px;
- margin-right: 5px;
- margin-left: 5px;
- color: #ffffff;
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- background-color: #ededed;
- *background-color: #e5e5e5;
- background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5));
- background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5);
- background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5);
- background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5);
- background-repeat: repeat-x;
- border-color: #e5e5e5 #e5e5e5 #bfbfbf;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
- -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
-}
-
-.navbar .btn-navbar:hover,
-.navbar .btn-navbar:focus,
-.navbar .btn-navbar:active,
-.navbar .btn-navbar.active,
-.navbar .btn-navbar.disabled,
-.navbar .btn-navbar[disabled] {
- color: #ffffff;
- background-color: #e5e5e5;
- *background-color: #d9d9d9;
-}
-
-.navbar .btn-navbar:active,
-.navbar .btn-navbar.active {
- background-color: #cccccc \9;
-}
-
-.navbar .btn-navbar .icon-bar {
- display: block;
- width: 18px;
- height: 2px;
- background-color: #f5f5f5;
- -webkit-border-radius: 1px;
- -moz-border-radius: 1px;
- border-radius: 1px;
- -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
- -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
- box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
-}
-
-.btn-navbar .icon-bar + .icon-bar {
- margin-top: 3px;
-}
-
-.navbar .nav > li > .dropdown-menu:before {
- position: absolute;
- top: -7px;
- left: 9px;
- display: inline-block;
- border-right: 7px solid transparent;
- border-bottom: 7px solid #ccc;
- border-left: 7px solid transparent;
- border-bottom-color: rgba(0, 0, 0, 0.2);
- content: '';
-}
-
-.navbar .nav > li > .dropdown-menu:after {
- position: absolute;
- top: -6px;
- left: 10px;
- display: inline-block;
- border-right: 6px solid transparent;
- border-bottom: 6px solid #ffffff;
- border-left: 6px solid transparent;
- content: '';
-}
-
-.navbar-fixed-bottom .nav > li > .dropdown-menu:before {
- top: auto;
- bottom: -7px;
- border-top: 7px solid #ccc;
- border-bottom: 0;
- border-top-color: rgba(0, 0, 0, 0.2);
-}
-
-.navbar-fixed-bottom .nav > li > .dropdown-menu:after {
- top: auto;
- bottom: -6px;
- border-top: 6px solid #ffffff;
- border-bottom: 0;
-}
-
-.navbar .nav li.dropdown > a:hover .caret,
-.navbar .nav li.dropdown > a:focus .caret {
- border-top-color: #333333;
- border-bottom-color: #333333;
-}
-
-.navbar .nav li.dropdown.open > .dropdown-toggle,
-.navbar .nav li.dropdown.active > .dropdown-toggle,
-.navbar .nav li.dropdown.open.active > .dropdown-toggle {
- color: #555555;
- background-color: #e5e5e5;
-}
-
-.navbar .nav li.dropdown > .dropdown-toggle .caret {
- border-top-color: #777777;
- border-bottom-color: #777777;
-}
-
-.navbar .nav li.dropdown.open > .dropdown-toggle .caret,
-.navbar .nav li.dropdown.active > .dropdown-toggle .caret,
-.navbar .nav li.dropdown.open.active > .dropdown-toggle .caret {
- border-top-color: #555555;
- border-bottom-color: #555555;
-}
-
-.navbar .pull-right > li > .dropdown-menu,
-.navbar .nav > li > .dropdown-menu.pull-right {
- right: 0;
- left: auto;
-}
-
-.navbar .pull-right > li > .dropdown-menu:before,
-.navbar .nav > li > .dropdown-menu.pull-right:before {
- right: 12px;
- left: auto;
-}
-
-.navbar .pull-right > li > .dropdown-menu:after,
-.navbar .nav > li > .dropdown-menu.pull-right:after {
- right: 13px;
- left: auto;
-}
-
-.navbar .pull-right > li > .dropdown-menu .dropdown-menu,
-.navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu {
- right: 100%;
- left: auto;
- margin-right: -1px;
- margin-left: 0;
- -webkit-border-radius: 6px 0 6px 6px;
- -moz-border-radius: 6px 0 6px 6px;
- border-radius: 6px 0 6px 6px;
-}
-
-.navbar-inverse .navbar-inner {
- background-color: #1b1b1b;
- background-image: -moz-linear-gradient(top, #222222, #111111);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111));
- background-image: -webkit-linear-gradient(top, #222222, #111111);
- background-image: -o-linear-gradient(top, #222222, #111111);
- background-image: linear-gradient(to bottom, #222222, #111111);
- background-repeat: repeat-x;
- border-color: #252525;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0);
-}
-
-.navbar-inverse .brand,
-.navbar-inverse .nav > li > a {
- color: #999999;
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-}
-
-.navbar-inverse .brand:hover,
-.navbar-inverse .nav > li > a:hover,
-.navbar-inverse .brand:focus,
-.navbar-inverse .nav > li > a:focus {
- color: #ffffff;
-}
-
-.navbar-inverse .brand {
- color: #999999;
-}
-
-.navbar-inverse .navbar-text {
- color: #999999;
-}
-
-.navbar-inverse .nav > li > a:focus,
-.navbar-inverse .nav > li > a:hover {
- color: #ffffff;
- background-color: transparent;
-}
-
-.navbar-inverse .nav .active > a,
-.navbar-inverse .nav .active > a:hover,
-.navbar-inverse .nav .active > a:focus {
- color: #ffffff;
- background-color: #111111;
-}
-
-.navbar-inverse .navbar-link {
- color: #999999;
-}
-
-.navbar-inverse .navbar-link:hover,
-.navbar-inverse .navbar-link:focus {
- color: #ffffff;
-}
-
-.navbar-inverse .divider-vertical {
- border-right-color: #222222;
- border-left-color: #111111;
-}
-
-.navbar-inverse .nav li.dropdown.open > .dropdown-toggle,
-.navbar-inverse .nav li.dropdown.active > .dropdown-toggle,
-.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle {
- color: #ffffff;
- background-color: #111111;
-}
-
-.navbar-inverse .nav li.dropdown > a:hover .caret,
-.navbar-inverse .nav li.dropdown > a:focus .caret {
- border-top-color: #ffffff;
- border-bottom-color: #ffffff;
-}
-
-.navbar-inverse .nav li.dropdown > .dropdown-toggle .caret {
- border-top-color: #999999;
- border-bottom-color: #999999;
-}
-
-.navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret,
-.navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret,
-.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret {
- border-top-color: #ffffff;
- border-bottom-color: #ffffff;
-}
-
-.navbar-inverse .navbar-search .search-query {
- color: #ffffff;
- background-color: #515151;
- border-color: #111111;
- -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15);
- -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15);
- box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15);
- -webkit-transition: none;
- -moz-transition: none;
- -o-transition: none;
- transition: none;
-}
-
-.navbar-inverse .navbar-search .search-query:-moz-placeholder {
- color: #cccccc;
-}
-
-.navbar-inverse .navbar-search .search-query:-ms-input-placeholder {
- color: #cccccc;
-}
-
-.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder {
- color: #cccccc;
-}
-
-.navbar-inverse .navbar-search .search-query:focus,
-.navbar-inverse .navbar-search .search-query.focused {
- padding: 5px 15px;
- color: #333333;
- text-shadow: 0 1px 0 #ffffff;
- background-color: #ffffff;
- border: 0;
- outline: 0;
- -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
- -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
- box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
-}
-
-.navbar-inverse .btn-navbar {
- color: #ffffff;
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- background-color: #0e0e0e;
- *background-color: #040404;
- background-image: -moz-linear-gradient(top, #151515, #040404);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404));
- background-image: -webkit-linear-gradient(top, #151515, #040404);
- background-image: -o-linear-gradient(top, #151515, #040404);
- background-image: linear-gradient(to bottom, #151515, #040404);
- background-repeat: repeat-x;
- border-color: #040404 #040404 #000000;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
-}
-
-.navbar-inverse .btn-navbar:hover,
-.navbar-inverse .btn-navbar:focus,
-.navbar-inverse .btn-navbar:active,
-.navbar-inverse .btn-navbar.active,
-.navbar-inverse .btn-navbar.disabled,
-.navbar-inverse .btn-navbar[disabled] {
- color: #ffffff;
- background-color: #040404;
- *background-color: #000000;
-}
-
-.navbar-inverse .btn-navbar:active,
-.navbar-inverse .btn-navbar.active {
- background-color: #000000 \9;
-}
-
-.breadcrumb {
- padding: 8px 15px;
- margin: 0 0 20px;
- list-style: none;
- background-color: #f5f5f5;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
-}
-
-.breadcrumb > li {
- display: inline-block;
- *display: inline;
- text-shadow: 0 1px 0 #ffffff;
- *zoom: 1;
-}
-
-.breadcrumb > li > .divider {
- padding: 0 5px;
- color: #ccc;
-}
-
-.breadcrumb > .active {
- color: #999999;
-}
-
-.pagination {
- margin: 20px 0;
-}
-
-.pagination ul {
- display: inline-block;
- *display: inline;
- margin-bottom: 0;
- margin-left: 0;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
- *zoom: 1;
- -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
- -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
-}
-
-.pagination ul > li {
- display: inline;
-}
-
-.pagination ul > li > a,
-.pagination ul > li > span {
- float: left;
- padding: 4px 12px;
- line-height: 20px;
- text-decoration: none;
- background-color: #ffffff;
- border: 1px solid #dddddd;
- border-left-width: 0;
-}
-
-.pagination ul > li > a:hover,
-.pagination ul > li > a:focus,
-.pagination ul > .active > a,
-.pagination ul > .active > span {
- background-color: #f5f5f5;
-}
-
-.pagination ul > .active > a,
-.pagination ul > .active > span {
- color: #999999;
- cursor: default;
-}
-
-.pagination ul > .disabled > span,
-.pagination ul > .disabled > a,
-.pagination ul > .disabled > a:hover,
-.pagination ul > .disabled > a:focus {
- color: #999999;
- cursor: default;
- background-color: transparent;
-}
-
-.pagination ul > li:first-child > a,
-.pagination ul > li:first-child > span {
- border-left-width: 1px;
- -webkit-border-bottom-left-radius: 4px;
- border-bottom-left-radius: 4px;
- -webkit-border-top-left-radius: 4px;
- border-top-left-radius: 4px;
- -moz-border-radius-bottomleft: 4px;
- -moz-border-radius-topleft: 4px;
-}
-
-.pagination ul > li:last-child > a,
-.pagination ul > li:last-child > span {
- -webkit-border-top-right-radius: 4px;
- border-top-right-radius: 4px;
- -webkit-border-bottom-right-radius: 4px;
- border-bottom-right-radius: 4px;
- -moz-border-radius-topright: 4px;
- -moz-border-radius-bottomright: 4px;
-}
-
-.pagination-centered {
- text-align: center;
-}
-
-.pagination-right {
- text-align: right;
-}
-
-.pagination-large ul > li > a,
-.pagination-large ul > li > span {
- padding: 11px 19px;
- font-size: 17.5px;
-}
-
-.pagination-large ul > li:first-child > a,
-.pagination-large ul > li:first-child > span {
- -webkit-border-bottom-left-radius: 6px;
- border-bottom-left-radius: 6px;
- -webkit-border-top-left-radius: 6px;
- border-top-left-radius: 6px;
- -moz-border-radius-bottomleft: 6px;
- -moz-border-radius-topleft: 6px;
-}
-
-.pagination-large ul > li:last-child > a,
-.pagination-large ul > li:last-child > span {
- -webkit-border-top-right-radius: 6px;
- border-top-right-radius: 6px;
- -webkit-border-bottom-right-radius: 6px;
- border-bottom-right-radius: 6px;
- -moz-border-radius-topright: 6px;
- -moz-border-radius-bottomright: 6px;
-}
-
-.pagination-mini ul > li:first-child > a,
-.pagination-small ul > li:first-child > a,
-.pagination-mini ul > li:first-child > span,
-.pagination-small ul > li:first-child > span {
- -webkit-border-bottom-left-radius: 3px;
- border-bottom-left-radius: 3px;
- -webkit-border-top-left-radius: 3px;
- border-top-left-radius: 3px;
- -moz-border-radius-bottomleft: 3px;
- -moz-border-radius-topleft: 3px;
-}
-
-.pagination-mini ul > li:last-child > a,
-.pagination-small ul > li:last-child > a,
-.pagination-mini ul > li:last-child > span,
-.pagination-small ul > li:last-child > span {
- -webkit-border-top-right-radius: 3px;
- border-top-right-radius: 3px;
- -webkit-border-bottom-right-radius: 3px;
- border-bottom-right-radius: 3px;
- -moz-border-radius-topright: 3px;
- -moz-border-radius-bottomright: 3px;
-}
-
-.pagination-small ul > li > a,
-.pagination-small ul > li > span {
- padding: 2px 10px;
- font-size: 11.9px;
-}
-
-.pagination-mini ul > li > a,
-.pagination-mini ul > li > span {
- padding: 0 6px;
- font-size: 10.5px;
-}
-
-.pager {
- margin: 20px 0;
- text-align: center;
- list-style: none;
- *zoom: 1;
-}
-
-.pager:before,
-.pager:after {
- display: table;
- line-height: 0;
- content: "";
-}
-
-.pager:after {
- clear: both;
-}
-
-.pager li {
- display: inline;
-}
-
-.pager li > a,
-.pager li > span {
- display: inline-block;
- padding: 5px 14px;
- background-color: #fff;
- border: 1px solid #ddd;
- -webkit-border-radius: 15px;
- -moz-border-radius: 15px;
- border-radius: 15px;
-}
-
-.pager li > a:hover,
-.pager li > a:focus {
- text-decoration: none;
- background-color: #f5f5f5;
-}
-
-.pager .next > a,
-.pager .next > span {
- float: right;
-}
-
-.pager .previous > a,
-.pager .previous > span {
- float: left;
-}
-
-.pager .disabled > a,
-.pager .disabled > a:hover,
-.pager .disabled > a:focus,
-.pager .disabled > span {
- color: #999999;
- cursor: default;
- background-color: #fff;
-}
-
-.modal-backdrop {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- z-index: 1040;
- background-color: #000000;
-}
-
-.modal-backdrop.fade {
- opacity: 0;
-}
-
-.modal-backdrop,
-.modal-backdrop.fade.in {
- opacity: 0.8;
- filter: alpha(opacity=80);
-}
-
-.modal {
- position: fixed;
- top: 10%;
- left: 50%;
- z-index: 1050;
- width: 560px;
- margin-left: -280px;
- background-color: #ffffff;
- border: 1px solid #999;
- border: 1px solid rgba(0, 0, 0, 0.3);
- *border: 1px solid #999;
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
- outline: none;
- -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
- -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
- box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
- -webkit-background-clip: padding-box;
- -moz-background-clip: padding-box;
- background-clip: padding-box;
-}
-
-.modal.fade {
- top: -25%;
- -webkit-transition: opacity 0.3s linear, top 0.3s ease-out;
- -moz-transition: opacity 0.3s linear, top 0.3s ease-out;
- -o-transition: opacity 0.3s linear, top 0.3s ease-out;
- transition: opacity 0.3s linear, top 0.3s ease-out;
-}
-
-.modal.fade.in {
- top: 10%;
-}
-
-.modal-header {
- padding: 9px 15px;
- border-bottom: 1px solid #eee;
-}
-
-.modal-header .close {
- margin-top: 2px;
-}
-
-.modal-header h3 {
- margin: 0;
- line-height: 30px;
-}
-
-.modal-body {
- position: relative;
- max-height: 400px;
- padding: 15px;
- overflow-y: auto;
-}
-
-.modal-form {
- margin-bottom: 0;
-}
-
-.modal-footer {
- padding: 14px 15px 15px;
- margin-bottom: 0;
- text-align: right;
- background-color: #f5f5f5;
- border-top: 1px solid #ddd;
- -webkit-border-radius: 0 0 6px 6px;
- -moz-border-radius: 0 0 6px 6px;
- border-radius: 0 0 6px 6px;
- *zoom: 1;
- -webkit-box-shadow: inset 0 1px 0 #ffffff;
- -moz-box-shadow: inset 0 1px 0 #ffffff;
- box-shadow: inset 0 1px 0 #ffffff;
-}
-
-.modal-footer:before,
-.modal-footer:after {
- display: table;
- line-height: 0;
- content: "";
-}
-
-.modal-footer:after {
- clear: both;
-}
-
-.modal-footer .btn + .btn {
- margin-bottom: 0;
- margin-left: 5px;
-}
-
-.modal-footer .btn-group .btn + .btn {
- margin-left: -1px;
-}
-
-.modal-footer .btn-block + .btn-block {
- margin-left: 0;
-}
-
-.tooltip {
- position: absolute;
- z-index: 1030;
- display: block;
- font-size: 11px;
- line-height: 1.4;
- opacity: 0;
- filter: alpha(opacity=0);
- visibility: visible;
-}
-
-.tooltip.in {
- opacity: 0.8;
- filter: alpha(opacity=80);
-}
-
-.tooltip.top {
- padding: 5px 0;
- margin-top: -3px;
-}
-
-.tooltip.right {
- padding: 0 5px;
- margin-left: 3px;
-}
-
-.tooltip.bottom {
- padding: 5px 0;
- margin-top: 3px;
-}
-
-.tooltip.left {
- padding: 0 5px;
- margin-left: -3px;
-}
-
-.tooltip-inner {
- max-width: 200px;
- padding: 8px;
- color: #ffffff;
- text-align: center;
- text-decoration: none;
- background-color: #000000;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
-}
-
-.tooltip-arrow {
- position: absolute;
- width: 0;
- height: 0;
- border-color: transparent;
- border-style: solid;
-}
-
-.tooltip.top .tooltip-arrow {
- bottom: 0;
- left: 50%;
- margin-left: -5px;
- border-top-color: #000000;
- border-width: 5px 5px 0;
-}
-
-.tooltip.right .tooltip-arrow {
- top: 50%;
- left: 0;
- margin-top: -5px;
- border-right-color: #000000;
- border-width: 5px 5px 5px 0;
-}
-
-.tooltip.left .tooltip-arrow {
- top: 50%;
- right: 0;
- margin-top: -5px;
- border-left-color: #000000;
- border-width: 5px 0 5px 5px;
-}
-
-.tooltip.bottom .tooltip-arrow {
- top: 0;
- left: 50%;
- margin-left: -5px;
- border-bottom-color: #000000;
- border-width: 0 5px 5px;
-}
-
-.popover {
- position: absolute;
- top: 0;
- left: 0;
- z-index: 1010;
- display: none;
- max-width: 276px;
- padding: 1px;
- text-align: left;
- white-space: normal;
- background-color: #ffffff;
- border: 1px solid #ccc;
- border: 1px solid rgba(0, 0, 0, 0.2);
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
- -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
- -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
- box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
- -webkit-background-clip: padding-box;
- -moz-background-clip: padding;
- background-clip: padding-box;
-}
-
-.popover.top {
- margin-top: -10px;
-}
-
-.popover.right {
- margin-left: 10px;
-}
-
-.popover.bottom {
- margin-top: 10px;
-}
-
-.popover.left {
- margin-left: -10px;
-}
-
-.popover-title {
- padding: 8px 14px;
- margin: 0;
- font-size: 14px;
- font-weight: normal;
- line-height: 18px;
- background-color: #f7f7f7;
- border-bottom: 1px solid #ebebeb;
- -webkit-border-radius: 5px 5px 0 0;
- -moz-border-radius: 5px 5px 0 0;
- border-radius: 5px 5px 0 0;
-}
-
-.popover-title:empty {
- display: none;
-}
-
-.popover-content {
- padding: 9px 14px;
-}
-
-.popover .arrow,
-.popover .arrow:after {
- position: absolute;
- display: block;
- width: 0;
- height: 0;
- border-color: transparent;
- border-style: solid;
-}
-
-.popover .arrow {
- border-width: 11px;
-}
-
-.popover .arrow:after {
- border-width: 10px;
- content: "";
-}
-
-.popover.top .arrow {
- bottom: -11px;
- left: 50%;
- margin-left: -11px;
- border-top-color: #999;
- border-top-color: rgba(0, 0, 0, 0.25);
- border-bottom-width: 0;
-}
-
-.popover.top .arrow:after {
- bottom: 1px;
- margin-left: -10px;
- border-top-color: #ffffff;
- border-bottom-width: 0;
-}
-
-.popover.right .arrow {
- top: 50%;
- left: -11px;
- margin-top: -11px;
- border-right-color: #999;
- border-right-color: rgba(0, 0, 0, 0.25);
- border-left-width: 0;
-}
-
-.popover.right .arrow:after {
- bottom: -10px;
- left: 1px;
- border-right-color: #ffffff;
- border-left-width: 0;
-}
-
-.popover.bottom .arrow {
- top: -11px;
- left: 50%;
- margin-left: -11px;
- border-bottom-color: #999;
- border-bottom-color: rgba(0, 0, 0, 0.25);
- border-top-width: 0;
-}
-
-.popover.bottom .arrow:after {
- top: 1px;
- margin-left: -10px;
- border-bottom-color: #ffffff;
- border-top-width: 0;
-}
-
-.popover.left .arrow {
- top: 50%;
- right: -11px;
- margin-top: -11px;
- border-left-color: #999;
- border-left-color: rgba(0, 0, 0, 0.25);
- border-right-width: 0;
-}
-
-.popover.left .arrow:after {
- right: 1px;
- bottom: -10px;
- border-left-color: #ffffff;
- border-right-width: 0;
-}
-
-.thumbnails {
- margin-left: -20px;
- list-style: none;
- *zoom: 1;
-}
-
-.thumbnails:before,
-.thumbnails:after {
- display: table;
- line-height: 0;
- content: "";
-}
-
-.thumbnails:after {
- clear: both;
-}
-
-.row-fluid .thumbnails {
- margin-left: 0;
-}
-
-.thumbnails > li {
- float: left;
- margin-bottom: 20px;
- margin-left: 20px;
-}
-
-.thumbnail {
- display: block;
- padding: 4px;
- line-height: 20px;
- border: 1px solid #ddd;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
- -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
- -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
- -webkit-transition: all 0.2s ease-in-out;
- -moz-transition: all 0.2s ease-in-out;
- -o-transition: all 0.2s ease-in-out;
- transition: all 0.2s ease-in-out;
-}
-
-a.thumbnail:hover,
-a.thumbnail:focus {
- border-color: #0088cc;
- -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
- -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
- box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
-}
-
-.thumbnail > img {
- display: block;
- max-width: 100%;
- margin-right: auto;
- margin-left: auto;
-}
-
-.thumbnail .caption {
- padding: 9px;
- color: #555555;
-}
-
-.media,
-.media-body {
- overflow: hidden;
- *overflow: visible;
- zoom: 1;
-}
-
-.media,
-.media .media {
- margin-top: 15px;
-}
-
-.media:first-child {
- margin-top: 0;
-}
-
-.media-object {
- display: block;
-}
-
-.media-heading {
- margin: 0 0 5px;
-}
-
-.media > .pull-left {
- margin-right: 10px;
-}
-
-.media > .pull-right {
- margin-left: 10px;
-}
-
-.media-list {
- margin-left: 0;
- list-style: none;
-}
-
-.label,
-.badge {
- display: inline-block;
- padding: 2px 4px;
- font-size: 11.844px;
- font-weight: bold;
- line-height: 14px;
- color: #ffffff;
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- white-space: nowrap;
- vertical-align: baseline;
- background-color: #999999;
-}
-
-.label {
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
-}
-
-.badge {
- padding-right: 9px;
- padding-left: 9px;
- -webkit-border-radius: 9px;
- -moz-border-radius: 9px;
- border-radius: 9px;
-}
-
-.label:empty,
-.badge:empty {
- display: none;
-}
-
-a.label:hover,
-a.label:focus,
-a.badge:hover,
-a.badge:focus {
- color: #ffffff;
- text-decoration: none;
- cursor: pointer;
-}
-
-.label-important,
-.badge-important {
- background-color: #b94a48;
-}
-
-.label-important[href],
-.badge-important[href] {
- background-color: #953b39;
-}
-
-.label-warning,
-.badge-warning {
- background-color: #f89406;
-}
-
-.label-warning[href],
-.badge-warning[href] {
- background-color: #c67605;
-}
-
-.label-success,
-.badge-success {
- background-color: #468847;
-}
-
-.label-success[href],
-.badge-success[href] {
- background-color: #356635;
-}
-
-.label-info,
-.badge-info {
- background-color: #3a87ad;
-}
-
-.label-info[href],
-.badge-info[href] {
- background-color: #2d6987;
-}
-
-.label-inverse,
-.badge-inverse {
- background-color: #333333;
-}
-
-.label-inverse[href],
-.badge-inverse[href] {
- background-color: #1a1a1a;
-}
-
-.btn .label,
-.btn .badge {
- position: relative;
- top: -1px;
-}
-
-.btn-mini .label,
-.btn-mini .badge {
- top: 0;
-}
-
-@-webkit-keyframes progress-bar-stripes {
- from {
- background-position: 40px 0;
- }
- to {
- background-position: 0 0;
- }
-}
-
-@-moz-keyframes progress-bar-stripes {
- from {
- background-position: 40px 0;
- }
- to {
- background-position: 0 0;
- }
-}
-
-@-ms-keyframes progress-bar-stripes {
- from {
- background-position: 40px 0;
- }
- to {
- background-position: 0 0;
- }
-}
-
-@-o-keyframes progress-bar-stripes {
- from {
- background-position: 0 0;
- }
- to {
- background-position: 40px 0;
- }
-}
-
-@keyframes progress-bar-stripes {
- from {
- background-position: 40px 0;
- }
- to {
- background-position: 0 0;
- }
-}
-
-.progress {
- height: 20px;
- margin-bottom: 20px;
- overflow: hidden;
- background-color: #f7f7f7;
- background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));
- background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9);
- background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9);
- background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9);
- background-repeat: repeat-x;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0);
- -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
- -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
- box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
-}
-
-.progress .bar {
- float: left;
- width: 0;
- height: 100%;
- font-size: 12px;
- color: #ffffff;
- text-align: center;
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- background-color: #0e90d2;
- background-image: -moz-linear-gradient(top, #149bdf, #0480be);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));
- background-image: -webkit-linear-gradient(top, #149bdf, #0480be);
- background-image: -o-linear-gradient(top, #149bdf, #0480be);
- background-image: linear-gradient(to bottom, #149bdf, #0480be);
- background-repeat: repeat-x;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);
- -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
- -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
- box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- -webkit-transition: width 0.6s ease;
- -moz-transition: width 0.6s ease;
- -o-transition: width 0.6s ease;
- transition: width 0.6s ease;
-}
-
-.progress .bar + .bar {
- -webkit-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15);
- -moz-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15);
- box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15);
-}
-
-.progress-striped .bar {
- background-color: #149bdf;
- background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
- background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- -webkit-background-size: 40px 40px;
- -moz-background-size: 40px 40px;
- -o-background-size: 40px 40px;
- background-size: 40px 40px;
-}
-
-.progress.active .bar {
- -webkit-animation: progress-bar-stripes 2s linear infinite;
- -moz-animation: progress-bar-stripes 2s linear infinite;
- -ms-animation: progress-bar-stripes 2s linear infinite;
- -o-animation: progress-bar-stripes 2s linear infinite;
- animation: progress-bar-stripes 2s linear infinite;
-}
-
-.progress-danger .bar,
-.progress .bar-danger {
- background-color: #dd514c;
- background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35));
- background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: linear-gradient(to bottom, #ee5f5b, #c43c35);
- background-repeat: repeat-x;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0);
-}
-
-.progress-danger.progress-striped .bar,
-.progress-striped .bar-danger {
- background-color: #ee5f5b;
- background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
- background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-}
-
-.progress-success .bar,
-.progress .bar-success {
- background-color: #5eb95e;
- background-image: -moz-linear-gradient(top, #62c462, #57a957);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957));
- background-image: -webkit-linear-gradient(top, #62c462, #57a957);
- background-image: -o-linear-gradient(top, #62c462, #57a957);
- background-image: linear-gradient(to bottom, #62c462, #57a957);
- background-repeat: repeat-x;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0);
-}
-
-.progress-success.progress-striped .bar,
-.progress-striped .bar-success {
- background-color: #62c462;
- background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
- background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-}
-
-.progress-info .bar,
-.progress .bar-info {
- background-color: #4bb1cf;
- background-image: -moz-linear-gradient(top, #5bc0de, #339bb9);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9));
- background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9);
- background-image: -o-linear-gradient(top, #5bc0de, #339bb9);
- background-image: linear-gradient(to bottom, #5bc0de, #339bb9);
- background-repeat: repeat-x;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0);
-}
-
-.progress-info.progress-striped .bar,
-.progress-striped .bar-info {
- background-color: #5bc0de;
- background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
- background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-}
-
-.progress-warning .bar,
-.progress .bar-warning {
- background-color: #faa732;
- background-image: -moz-linear-gradient(top, #fbb450, #f89406);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
- background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
- background-image: -o-linear-gradient(top, #fbb450, #f89406);
- background-image: linear-gradient(to bottom, #fbb450, #f89406);
- background-repeat: repeat-x;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);
-}
-
-.progress-warning.progress-striped .bar,
-.progress-striped .bar-warning {
- background-color: #fbb450;
- background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
- background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-}
-
-.accordion {
- margin-bottom: 20px;
-}
-
-.accordion-group {
- margin-bottom: 2px;
- border: 1px solid #e5e5e5;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
-}
-
-.accordion-heading {
- border-bottom: 0;
-}
-
-.accordion-heading .accordion-toggle {
- display: block;
- padding: 8px 15px;
-}
-
-.accordion-toggle {
- cursor: pointer;
-}
-
-.accordion-inner {
- padding: 9px 15px;
- border-top: 1px solid #e5e5e5;
-}
-
-.carousel {
- position: relative;
- margin-bottom: 20px;
- line-height: 1;
-}
-
-.carousel-inner {
- position: relative;
- width: 100%;
- overflow: hidden;
-}
-
-.carousel-inner > .item {
- position: relative;
- display: none;
- -webkit-transition: 0.6s ease-in-out left;
- -moz-transition: 0.6s ease-in-out left;
- -o-transition: 0.6s ease-in-out left;
- transition: 0.6s ease-in-out left;
-}
-
-.carousel-inner > .item > img,
-.carousel-inner > .item > a > img {
- display: block;
- line-height: 1;
-}
-
-.carousel-inner > .active,
-.carousel-inner > .next,
-.carousel-inner > .prev {
- display: block;
-}
-
-.carousel-inner > .active {
- left: 0;
-}
-
-.carousel-inner > .next,
-.carousel-inner > .prev {
- position: absolute;
- top: 0;
- width: 100%;
-}
-
-.carousel-inner > .next {
- left: 100%;
-}
-
-.carousel-inner > .prev {
- left: -100%;
-}
-
-.carousel-inner > .next.left,
-.carousel-inner > .prev.right {
- left: 0;
-}
-
-.carousel-inner > .active.left {
- left: -100%;
-}
-
-.carousel-inner > .active.right {
- left: 100%;
-}
-
-.carousel-control {
- position: absolute;
- top: 40%;
- left: 15px;
- width: 40px;
- height: 40px;
- margin-top: -20px;
- font-size: 60px;
- font-weight: 100;
- line-height: 30px;
- color: #ffffff;
- text-align: center;
- background: #222222;
- border: 3px solid #ffffff;
- -webkit-border-radius: 23px;
- -moz-border-radius: 23px;
- border-radius: 23px;
- opacity: 0.5;
- filter: alpha(opacity=50);
-}
-
-.carousel-control.right {
- right: 15px;
- left: auto;
-}
-
-.carousel-control:hover,
-.carousel-control:focus {
- color: #ffffff;
- text-decoration: none;
- opacity: 0.9;
- filter: alpha(opacity=90);
-}
-
-.carousel-indicators {
- position: absolute;
- top: 15px;
- right: 15px;
- z-index: 5;
- margin: 0;
- list-style: none;
-}
-
-.carousel-indicators li {
- display: block;
- float: left;
- width: 10px;
- height: 10px;
- margin-left: 5px;
- text-indent: -999px;
- background-color: #ccc;
- background-color: rgba(255, 255, 255, 0.25);
- border-radius: 5px;
-}
-
-.carousel-indicators .active {
- background-color: #fff;
-}
-
-.carousel-caption {
- position: absolute;
- right: 0;
- bottom: 0;
- left: 0;
- padding: 15px;
- background: #333333;
- background: rgba(0, 0, 0, 0.75);
-}
-
-.carousel-caption h4,
-.carousel-caption p {
- line-height: 20px;
- color: #ffffff;
-}
-
-.carousel-caption h4 {
- margin: 0 0 5px;
-}
-
-.carousel-caption p {
- margin-bottom: 0;
-}
-
-.hero-unit {
- padding: 60px;
- margin-bottom: 30px;
- font-size: 18px;
- font-weight: 200;
- line-height: 30px;
- color: inherit;
- background-color: #eeeeee;
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
-}
-
-.hero-unit h1 {
- margin-bottom: 0;
- font-size: 60px;
- line-height: 1;
- letter-spacing: -1px;
- color: inherit;
-}
-
-.hero-unit li {
- line-height: 30px;
-}
-
-.pull-right {
- float: right;
-}
-
-.pull-left {
- float: left;
-}
-
-.hide {
- display: none;
-}
-
-.show {
- display: block;
-}
-
-.invisible {
- visibility: hidden;
-}
-
-.affix {
- position: fixed;
-}
diff --git a/ecomp-portal-BE/war/static/oid-connect/bootstrap2/css/bootstrap.min.css b/ecomp-portal-BE/war/static/oid-connect/bootstrap2/css/bootstrap.min.css
deleted file mode 100644
index df96c864..00000000
--- a/ecomp-portal-BE/war/static/oid-connect/bootstrap2/css/bootstrap.min.css
+++ /dev/null
@@ -1,9 +0,0 @@
-/*!
- * Bootstrap v2.3.2
- *
- * Copyright 2013 Twitter, Inc
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Designed and built with all the love in the world by @mdo and @fat.
- */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{width:auto\9;height:auto;max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img,.google-maps img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}label,select,button,input[type="button"],input[type="reset"],input[type="submit"],input[type="radio"],input[type="checkbox"]{cursor:pointer}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333;background-color:#fff}a{color:#08c;text-decoration:none}a:hover,a:focus{color:#005580;text-decoration:underline}.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.1);box-shadow:0 1px 3px rgba(0,0,0,0.1)}.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.127659574468085%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%}.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%}.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%}.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%}.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%}.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%}.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%}.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%}.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%}.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%}.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%}.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%}.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%}.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%}.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%}.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%}.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%}.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%}.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%}.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%}.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%}.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%}.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%}.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%}.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%}[class*="span"].hide,.row-fluid [class*="span"].hide{display:none}[class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:before,.container:after{display:table;line-height:0;content:""}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;line-height:0;content:""}.container-fluid:after{clear:both}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px}small{font-size:85%}strong{font-weight:bold}em{font-style:italic}cite{font-style:normal}.muted{color:#999}a.muted:hover,a.muted:focus{color:#808080}.text-warning{color:#c09853}a.text-warning:hover,a.text-warning:focus{color:#a47e3c}.text-error{color:#b94a48}a.text-error:hover,a.text-error:focus{color:#953b39}.text-info{color:#3a87ad}a.text-info:hover,a.text-info:focus{color:#2d6987}.text-success{color:#468847}a.text-success:hover,a.text-success:focus{color:#356635}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:20px;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999}h1,h2,h3{line-height:40px}h1{font-size:38.5px}h2{font-size:31.5px}h3{font-size:24.5px}h4{font-size:17.5px}h5{font-size:14px}h6{font-size:11.9px}h1 small{font-size:24.5px}h2 small{font-size:17.5px}h3 small{font-size:14px}h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eee}ul,ol{padding:0;margin:0 0 10px 25px}ul ul,ul ol,ol ol,ol ul{margin-bottom:0}li{line-height:20px}ul.unstyled,ol.unstyled{margin-left:0;list-style:none}ul.inline,ol.inline{margin-left:0;list-style:none}ul.inline>li,ol.inline>li{display:inline-block;*display:inline;padding-right:5px;padding-left:5px;*zoom:1}dl{margin-bottom:20px}dt,dd{line-height:20px}dt{font-weight:bold}dd{margin-left:10px}.dl-horizontal{*zoom:1}.dl-horizontal:before,.dl-horizontal:after{display:table;line-height:0;content:""}.dl-horizontal:after{clear:both}.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:17.5px;font-weight:300;line-height:1.25}blockquote small{display:block;line-height:20px;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}code{padding:2px 4px;color:#d14;white-space:nowrap;background-color:#f7f7f9;border:1px solid #e1e1e8}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;color:inherit;white-space:pre;white-space:pre-wrap;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border:0;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}label,input,button,select,textarea{font-size:14px;font-weight:normal;line-height:20px}input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555;vertical-align:middle;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}input,textarea,.uneditable-input{width:206px}textarea{height:auto}textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#fff;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82,168,236,0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;*margin-top:0;line-height:normal}input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto}select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px}select{width:220px;background-color:#fff;border:1px solid #ccc}select[multiple],select[size]{height:auto}select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;cursor:not-allowed;background-color:#fcfcfc;border-color:#ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);box-shadow:inset 0 1px 2px rgba(0,0,0,0.025)}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.radio,.checkbox{min-height:20px;padding-left:20px}.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-20px}.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0}.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:926px}input.span11,textarea.span11,.uneditable-input.span11{width:846px}input.span10,textarea.span10,.uneditable-input.span10{width:766px}input.span9,textarea.span9,.uneditable-input.span9{width:686px}input.span8,textarea.span8,.uneditable-input.span8{width:606px}input.span7,textarea.span7,.uneditable-input.span7{width:526px}input.span6,textarea.span6,.uneditable-input.span6{width:446px}input.span5,textarea.span5,.uneditable-input.span5{width:366px}input.span4,textarea.span4,.uneditable-input.span4{width:286px}input.span3,textarea.span3,.uneditable-input.span3{width:206px}input.span2,textarea.span2,.uneditable-input.span2{width:126px}input.span1,textarea.span1,.uneditable-input.span1{width:46px}.controls-row{*zoom:1}.controls-row:before,.controls-row:after{display:table;line-height:0;content:""}.controls-row:after{clear:both}.controls-row [class*="span"],.row-fluid .controls-row [class*="span"]{float:left}.controls-row .checkbox[class*="span"],.controls-row .radio[class*="span"]{padding-top:5px}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent}.control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853}.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48}.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847}.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad}.control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3}.control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:invalid,textarea:focus:invalid,select:focus:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:invalid:focus,textarea:focus:invalid:focus,select:focus:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1}.form-actions:before,.form-actions:after{display:table;line-height:0;content:""}.form-actions:after{clear:both}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;*display:inline;padding-left:5px;vertical-align:middle;*zoom:1}.input-append,.input-prepend{display:inline-block;margin-bottom:10px;font-size:0;white-space:nowrap;vertical-align:middle}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input,.input-append .dropdown-menu,.input-prepend .dropdown-menu,.input-append .popover,.input-prepend .popover{font-size:14px}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:top;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn,.input-append .btn-group>.dropdown-toggle,.input-prepend .btn-group>.dropdown-toggle{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input+.btn-group .btn:last-child,.input-append select+.btn-group .btn:last-child,.input-append .uneditable-input+.btn-group .btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px}.input-append .add-on:last-child,.input-append .btn:last-child,.input-append .btn-group:last-child>.dropdown-toggle{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn,.input-prepend.input-append .uneditable-input+.btn-group .btn{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .btn-group:first-child{margin-left:0}input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;margin-bottom:0;vertical-align:middle;*zoom:1}.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none}.form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block}.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0}.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle}.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px;*zoom:1}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;line-height:0;content:""}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right}.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0}.form-horizontal .controls:first-child{*padding-left:180px}.form-horizontal .help-block{margin-bottom:0}.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block,.form-horizontal .uneditable-input+.help-block,.form-horizontal .input-prepend+.help-block,.form-horizontal .input-append+.help-block{margin-top:10px}.form-horizontal .form-actions{padding-left:180px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:20px}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:bold}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed th,.table-condensed td{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.table-bordered th,.table-bordered td{border-left:1px solid #ddd}.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0}.table-bordered thead:first-child tr:first-child>th:first-child,.table-bordered tbody:first-child tr:first-child>td:first-child,.table-bordered tbody:first-child tr:first-child>th:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered thead:first-child tr:first-child>th:last-child,.table-bordered tbody:first-child tr:first-child>td:last-child,.table-bordered tbody:first-child tr:first-child>th:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-bordered thead:last-child tr:last-child>th:first-child,.table-bordered tbody:last-child tr:last-child>td:first-child,.table-bordered tbody:last-child tr:last-child>th:first-child,.table-bordered tfoot:last-child tr:last-child>td:first-child,.table-bordered tfoot:last-child tr:last-child>th:first-child{-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px}.table-bordered thead:last-child tr:last-child>th:last-child,.table-bordered tbody:last-child tr:last-child>td:last-child,.table-bordered tbody:last-child tr:last-child>th:last-child,.table-bordered tfoot:last-child tr:last-child>td:last-child,.table-bordered tfoot:last-child tr:last-child>th:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px}.table-bordered tfoot+tbody:last-child tr:last-child td:first-child{-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomleft:0}.table-bordered tfoot+tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-moz-border-radius-bottomright:0}.table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover tbody tr:hover>td,.table-hover tbody tr:hover>th{background-color:#f5f5f5}table td[class*="span"],table th[class*="span"],.row-fluid table td[class*="span"],.row-fluid table th[class*="span"]{display:table-cell;float:none;margin-left:0}.table td.span1,.table th.span1{float:none;width:44px;margin-left:0}.table td.span2,.table th.span2{float:none;width:124px;margin-left:0}.table td.span3,.table th.span3{float:none;width:204px;margin-left:0}.table td.span4,.table th.span4{float:none;width:284px;margin-left:0}.table td.span5,.table th.span5{float:none;width:364px;margin-left:0}.table td.span6,.table th.span6{float:none;width:444px;margin-left:0}.table td.span7,.table th.span7{float:none;width:524px;margin-left:0}.table td.span8,.table th.span8{float:none;width:604px;margin-left:0}.table td.span9,.table th.span9{float:none;width:684px;margin-left:0}.table td.span10,.table th.span10{float:none;width:764px;margin-left:0}.table td.span11,.table th.span11{float:none;width:844px;margin-left:0}.table td.span12,.table th.span12{float:none;width:924px;margin-left:0}.table tbody tr.success>td{background-color:#dff0d8}.table tbody tr.error>td{background-color:#f2dede}.table tbody tr.warning>td{background-color:#fcf8e3}.table tbody tr.info>td{background-color:#d9edf7}.table-hover tbody tr.success:hover>td{background-color:#d0e9c6}.table-hover tbody tr.error:hover>td{background-color:#ebcccc}.table-hover tbody tr.warning:hover>td{background-color:#faf2cc}.table-hover tbody tr.info:hover>td{background-color:#c4e3f3}[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;margin-top:1px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat}.icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:focus>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>li>a:focus>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:focus>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"],.dropdown-submenu:focus>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png")}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{background-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.icon-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72px}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px}.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{background-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{width:16px;background-position:-216px -120px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{width:16px;background-position:-384px -120px}.icon-folder-open{width:16px;background-position:-408px -120px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fullscreen{background-position:-456px -144px}.dropup,.dropdown{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.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;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus,.dropdown-submenu:hover>a,.dropdown-submenu:focus>a{color:#fff;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;outline:0;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:default;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open{*z-index:1000}.open>.dropdown-menu{display:block}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;-webkit-border-radius:5px 5px 5px 0;-moz-border-radius:5px 5px 5px 0;border-radius:5px 5px 5px 0}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent;border-left-color:#ccc;border-style:solid;border-width:5px 0 5px 5px;content:" "}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.typeahead{z-index:1051;margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;padding:4px 12px;margin-bottom:0;*margin-left:.3em;font-size:14px;line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,0.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;*background-color:#e6e6e6;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #ccc;*border:0;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);*zoom:1;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:hover,.btn:focus{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class^="icon-"],.btn-large [class*=" icon-"]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class^="icon-"],.btn-small [class*=" icon-"]{margin-top:0}.btn-mini [class^="icon-"],.btn-mini [class*=" icon-"]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#006dcc;*background-color:#04c;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary:active,.btn-primary.active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#faa732;*background-color:#f89406;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning:active,.btn-warning.active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#da4f49;*background-color:#bd362f;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffbd362f',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#5bb75b;*background-color:#51a351;background-image:-moz-linear-gradient(top,#62c462,#51a351);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to bottom,#62c462,#51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff51a351',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#49afcd;*background-color:#2f96b4;background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to bottom,#5bc0de,#2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff2f96b4',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#363636;*background-color:#222;background-image:-moz-linear-gradient(top,#444,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);background-image:-o-linear-gradient(top,#444,#222);background-image:linear-gradient(to bottom,#444,#222);background-repeat:repeat-x;border-color:#222 #222 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444',endColorstr='#ff222222',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-inverse:hover,.btn-inverse:focus,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{color:#08c;cursor:pointer;border-color:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-link:hover,.btn-link:focus{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,.btn-link[disabled]:focus{color:#333;text-decoration:none}.btn-group{position:relative;display:inline-block;*display:inline;*margin-left:.3em;font-size:0;white-space:nowrap;vertical-align:middle;*zoom:1}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{margin-top:10px;margin-bottom:10px;font-size:0}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group{margin-left:5px}.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px}.btn-group>.btn-mini{font-size:10.5px}.btn-group>.btn-small{font-size:11.9px}.btn-group>.btn-large{font-size:17.5px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{*padding-top:5px;padding-right:8px;*padding-bottom:5px;padding-left:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn-group>.btn-mini+.dropdown-toggle{*padding-top:2px;padding-right:5px;*padding-bottom:2px;padding-left:5px}.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn-large+.dropdown-toggle{*padding-top:7px;padding-right:12px;*padding-bottom:7px;padding-left:12px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#04c}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-large .caret{margin-top:6px}.btn-large .caret{border-top-width:5px;border-right-width:5px;border-left-width:5px}.btn-mini .caret,.btn-small .caret{margin-top:8px}.dropup .btn-large .caret{border-bottom-width:5px}.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block;*display:inline;*zoom:1}.btn-group-vertical>.btn{display:block;float:none;max-width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group-vertical>.btn+.btn{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.btn-group-vertical>.btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0}.btn-group-vertical>.btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 rgba(255,255,255,0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert,.alert h4{color:#c09853}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-success h4{color:#468847}.alert-danger,.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-danger h4,.alert-error h4{color:#b94a48}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-info h4{color:#3a87ad}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-bottom:20px;margin-left:0;list-style:none}.nav>li>a{display:block}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li>a>img{max-width:none}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999;text-shadow:0 1px 0 rgba(255,255,255,0.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0}.nav-list>li>a,.nav-list .nav-header{margin-right:-15px;margin-left:-15px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:hover,.nav-list>.active>a:focus{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.2);background-color:#08c}.nav-list [class^="icon-"],.nav-list [class*=" icon-"]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-tabs,.nav-pills{*zoom:1}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;line-height:0;content:""}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs>li,.nav-pills>li{float:left}.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover,.nav-tabs>li>a:focus{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover,.nav-tabs>.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:hover,.nav-pills>.active>a:focus{color:#fff;background-color:#08c}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px}.nav-tabs.nav-stacked>li>a:hover,.nav-tabs.nav-stacked>li>a:focus{z-index:2;border-color:#ddd}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.nav .dropdown-toggle .caret{margin-top:6px;border-top-color:#08c;border-bottom-color:#08c}.nav .dropdown-toggle:hover .caret,.nav .dropdown-toggle:focus .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav>.dropdown.active>a:hover,.nav>.dropdown.active>a:focus{cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover,.nav>li.dropdown.open.active>a:focus{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret,.nav li.dropdown.open a:focus .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:hover,.tabs-stacked .open>a:focus{border-color:#999}.tabbable{*zoom:1}.tabbable:before,.tabbable:after{display:table;line-height:0;content:""}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:hover,.tabs-below>.nav-tabs>li>a:focus{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover,.tabs-below>.nav-tabs>.active>a:focus{border-color:transparent #ddd #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:hover,.tabs-left>.nav-tabs>li>a:focus{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover,.tabs-left>.nav-tabs .active>a:focus{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:hover,.tabs-right>.nav-tabs>li>a:focus{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover,.tabs-right>.nav-tabs .active>a:focus{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.nav>.disabled>a{color:#999}.nav>.disabled>a:hover,.nav>.disabled>a:focus{text-decoration:none;cursor:default;background-color:transparent}.navbar{*position:relative;*z-index:2;margin-bottom:20px;overflow:visible}.navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#fff2f2f2',GradientType=0);*zoom:1;-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,0.065);box-shadow:0 1px 4px rgba(0,0,0,0.065)}.navbar-inner:before,.navbar-inner:after{display:table;line-height:0;content:""}.navbar-inner:after{clear:both}.navbar .container{width:auto}.nav-collapse.collapse{height:auto;overflow:visible}.navbar .brand{display:block;float:left;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.navbar .brand:hover,.navbar .brand:focus{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px;color:#777}.navbar-link{color:#777}.navbar-link:hover,.navbar-link:focus{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-right:1px solid #fff;border-left:1px solid #f2f2f2}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn,.navbar .input-prepend .btn-group,.navbar .input-append .btn-group{margin-top:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:table;line-height:0;content:""}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px}.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0}.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{padding:4px 14px;margin-bottom:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.navbar-static-top{position:static;margin-bottom:0}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-right:0;padding-left:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:0 1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 10px rgba(0,0,0,0.1);box-shadow:0 1px 10px rgba(0,0,0,0.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:0 -1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 -1px 10px rgba(0,0,0,0.1);box-shadow:0 -1px 10px rgba(0,0,0,0.1)}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#777;text-decoration:none;text-shadow:0 1px 0 #fff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{color:#333;text-decoration:none;background-color:transparent}.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);-moz-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);box-shadow:inset 0 3px 8px rgba(0,0,0,0.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-right:5px;margin-left:5px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#ededed;*background-color:#e5e5e5;background-image:-moz-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#e5e5e5));background-image:-webkit-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-o-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:linear-gradient(to bottom,#f2f2f2,#e5e5e5);background-repeat:repeat-x;border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2',endColorstr='#ffe5e5e5',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075)}.navbar .btn-navbar:hover,.navbar .btn-navbar:focus,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#ccc \9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,0.25);box-shadow:0 1px 0 rgba(0,0,0,0.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.navbar .nav>li>.dropdown-menu:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{top:auto;bottom:-7px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,0.2)}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{top:auto;bottom:-6px;border-top:6px solid #fff;border-bottom:0}.navbar .nav li.dropdown>a:hover .caret,.navbar .nav li.dropdown>a:focus .caret{border-top-color:#333;border-bottom-color:#333}.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{color:#555;background-color:#e5e5e5}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777;border-bottom-color:#777}.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{right:12px;left:auto}.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{right:13px;left:auto}.navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{right:100%;left:auto;margin-right:-1px;margin-left:0;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top,#222,#111);background-image:-webkit-gradient(linear,0 0,0 100%,from(#222),to(#111));background-image:-webkit-linear-gradient(top,#222,#111);background-image:-o-linear-gradient(top,#222,#111);background-image:linear-gradient(to bottom,#222,#111);background-repeat:repeat-x;border-color:#252525;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222',endColorstr='#ff111111',GradientType=0)}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover,.navbar-inverse .brand:focus,.navbar-inverse .nav>li>a:focus{color:#fff}.navbar-inverse .brand{color:#999}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover,.navbar-inverse .navbar-link:focus{color:#fff}.navbar-inverse .divider-vertical{border-right-color:#222;border-left-color:#111}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{color:#fff;background-color:#111}.navbar-inverse .nav li.dropdown>a:hover .caret,.navbar-inverse .nav li.dropdown>a:focus .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;outline:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.15);-moz-box-shadow:0 0 3px rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.15)}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e0e0e;*background-color:#040404;background-image:-moz-linear-gradient(top,#151515,#040404);background-image:-webkit-gradient(linear,0 0,0 100%,from(#151515),to(#040404));background-image:-webkit-linear-gradient(top,#151515,#040404);background-image:-o-linear-gradient(top,#151515,#040404);background-image:linear-gradient(to bottom,#151515,#040404);background-repeat:repeat-x;border-color:#040404 #040404 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515',endColorstr='#ff040404',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000 \9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.breadcrumb>li{display:inline-block;*display:inline;text-shadow:0 1px 0 #fff;*zoom:1}.breadcrumb>li>.divider{padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{margin:20px 0}.pagination ul{display:inline-block;*display:inline;margin-bottom:0;margin-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*zoom:1;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination ul>li>a:hover,.pagination ul>li>a:focus,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>a:focus{color:#999;cursor:default;background-color:transparent}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px}.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.pagination-mini ul>li:first-child>a,.pagination-small ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>span{-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px}.pagination-mini ul>li:last-child>a,.pagination-small ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px}.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px}.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px}.pager{margin:20px 0;text-align:center;list-style:none;*zoom:1}.pager:before,.pager:after{display:table;line-height:0;content:""}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#f5f5f5}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;cursor:default;background-color:#fff}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;outline:0;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.modal.fade{top:-25%;-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out}.modal.fade.in{top:10%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{position:relative;max-height:400px;padding:15px;overflow-y:auto}.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;*zoom:1;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.modal-footer:before,.modal-footer:after{display:table;line-height:0;content:""}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.tooltip{position:absolute;z-index:1030;display:block;font-size:11px;line-height:1.4;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.popover-title:empty{display:none}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,0.25);border-bottom-width:0}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-top-color:#fff;border-bottom-width:0}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,0.25);border-left-width:0}.popover.right .arrow:after{bottom:-10px;left:1px;border-right-color:#fff;border-left-width:0}.popover.bottom .arrow{top:-11px;left:50%;margin-left:-11px;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);border-top-width:0}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-bottom-color:#fff;border-top-width:0}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-left-color:#999;border-left-color:rgba(0,0,0,0.25);border-right-width:0}.popover.left .arrow:after{right:1px;bottom:-10px;border-left-color:#fff;border-right-width:0}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:before,.thumbnails:after{display:table;line-height:0;content:""}.thumbnails:after{clear:both}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.055);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.055);box-shadow:0 1px 3px rgba(0,0,0,0.055);-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}a.thumbnail:hover,a.thumbnail:focus{border-color:#08c;-webkit-box-shadow:0 1px 4px rgba(0,105,214,0.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,0.25);box-shadow:0 1px 4px rgba(0,105,214,0.25)}.thumbnail>img{display:block;max-width:100%;margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px;color:#555}.media,.media-body{overflow:hidden;*overflow:visible;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{margin-left:0;list-style:none}.label,.badge{display:inline-block;padding:2px 4px;font-size:11.844px;font-weight:bold;line-height:14px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);white-space:nowrap;vertical-align:baseline;background-color:#999}.label{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.badge{padding-right:9px;padding-left:9px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px}.label:empty,.badge:empty{display:none}a.label:hover,a.label:focus,a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}.label-important,.badge-important{background-color:#b94a48}.label-important[href],.badge-important[href]{background-color:#953b39}.label-warning,.badge-warning{background-color:#f89406}.label-warning[href],.badge-warning[href]{background-color:#c67605}.label-success,.badge-success{background-color:#468847}.label-success[href],.badge-success[href]{background-color:#356635}.label-info,.badge-info{background-color:#3a87ad}.label-info[href],.badge-info[href]{background-color:#2d6987}.label-inverse,.badge-inverse{background-color:#333}.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a}.btn .label,.btn .badge{position:relative;top:-1px}.btn-mini .label,.btn-mini .badge{top:0}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-o-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(to bottom,#f5f5f5,#f9f9f9);background-repeat:repeat-x;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5',endColorstr='#fff9f9f9',GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress .bar{float:left;width:0;height:100%;font-size:12px;color:#fff;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top,#149bdf,#0480be);background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:-o-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(to bottom,#149bdf,#0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf',endColorstr='#ff0480be',GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15)}.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top,#ee5f5b,#c43c35);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(to bottom,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffc43c35',GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(to bottom,#62c462,#57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff57a957',GradientType=0)}.progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top,#5bc0de,#339bb9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#339bb9));background-image:-webkit-linear-gradient(top,#5bc0de,#339bb9);background-image:-o-linear-gradient(top,#5bc0de,#339bb9);background-image:linear-gradient(to bottom,#5bc0de,#339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff339bb9',GradientType=0)}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-warning .bar,.progress .bar-warning{background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0)}.progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#fbb450;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.accordion{margin-bottom:20px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:20px;line-height:1}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-moz-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid #fff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{right:15px;left:auto}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-indicators{position:absolute;top:15px;right:15px;z-index:5;margin:0;list-style:none}.carousel-indicators li{display:block;float:left;width:10px;height:10px;margin-left:5px;text-indent:-999px;background-color:#ccc;background-color:rgba(255,255,255,0.25);border-radius:5px}.carousel-indicators .active{background-color:#fff}.carousel-caption{position:absolute;right:0;bottom:0;left:0;padding:15px;background:#333;background:rgba(0,0,0,0.75)}.carousel-caption h4,.carousel-caption p{line-height:20px;color:#fff}.carousel-caption h4{margin:0 0 5px}.carousel-caption p{margin-bottom:0}.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;color:inherit}.hero-unit li{line-height:30px}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed}
diff --git a/ecomp-portal-BE/war/static/oid-connect/bootstrap2/js/bootstrap.js b/ecomp-portal-BE/war/static/oid-connect/bootstrap2/js/bootstrap.js
deleted file mode 100644
index 44109f62..00000000
--- a/ecomp-portal-BE/war/static/oid-connect/bootstrap2/js/bootstrap.js
+++ /dev/null
@@ -1,2280 +0,0 @@
-/* ===================================================
- * bootstrap-transition.js v2.3.2
- * http://getbootstrap.com/2.3.2/javascript.html#transitions
- * ===================================================
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
- * ======================================================= */
-
- $(function () {
-
- $.support.transition = (function () {
-
- var transitionEnd = (function () {
-
- var el = document.createElement('bootstrap')
- , transEndEventNames = {
- 'WebkitTransition' : 'webkitTransitionEnd'
- , 'MozTransition' : 'transitionend'
- , 'OTransition' : 'oTransitionEnd otransitionend'
- , 'transition' : 'transitionend'
- }
- , name
-
- for (name in transEndEventNames){
- if (el.style[name] !== undefined) {
- return transEndEventNames[name]
- }
- }
-
- }())
-
- return transitionEnd && {
- end: transitionEnd
- }
-
- })()
-
- })
-
-}(window.jQuery);/* ==========================================================
- * bootstrap-alert.js v2.3.2
- * http://getbootstrap.com/2.3.2/javascript.html#alerts
- * ==========================================================
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* ALERT CLASS DEFINITION
- * ====================== */
-
- var dismiss = '[data-dismiss="alert"]'
- , Alert = function (el) {
- $(el).on('click', dismiss, this.close)
- }
-
- Alert.prototype.close = function (e) {
- var $this = $(this)
- , selector = $this.attr('data-target')
- , $parent
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
- }
-
- $parent = $(selector)
-
- e && e.preventDefault()
-
- $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
-
- $parent.trigger(e = $.Event('close'))
-
- if (e.isDefaultPrevented()) return
-
- $parent.removeClass('in')
-
- function removeElement() {
- $parent
- .trigger('closed')
- .remove()
- }
-
- $.support.transition && $parent.hasClass('fade') ?
- $parent.on($.support.transition.end, removeElement) :
- removeElement()
- }
-
-
- /* ALERT PLUGIN DEFINITION
- * ======================= */
-
- var old = $.fn.alert
-
- $.fn.alert = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('alert')
- if (!data) $this.data('alert', (data = new Alert(this)))
- if (typeof option == 'string') data[option].call($this)
- })
- }
-
- $.fn.alert.Constructor = Alert
-
-
- /* ALERT NO CONFLICT
- * ================= */
-
- $.fn.alert.noConflict = function () {
- $.fn.alert = old
- return this
- }
-
-
- /* ALERT DATA-API
- * ============== */
-
- $(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
-
-}(window.jQuery);/* ============================================================
- * bootstrap-button.js v2.3.2
- * http://getbootstrap.com/2.3.2/javascript.html#buttons
- * ============================================================
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* BUTTON PUBLIC CLASS DEFINITION
- * ============================== */
-
- var Button = function (element, options) {
- this.$element = $(element)
- this.options = $.extend({}, $.fn.button.defaults, options)
- }
-
- Button.prototype.setState = function (state) {
- var d = 'disabled'
- , $el = this.$element
- , data = $el.data()
- , val = $el.is('input') ? 'val' : 'html'
-
- state = state + 'Text'
- data.resetText || $el.data('resetText', $el[val]())
-
- $el[val](data[state] || this.options[state])
-
- // push to event loop to allow forms to submit
- setTimeout(function () {
- state == 'loadingText' ?
- $el.addClass(d).attr(d, d) :
- $el.removeClass(d).removeAttr(d)
- }, 0)
- }
-
- Button.prototype.toggle = function () {
- var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
-
- $parent && $parent
- .find('.active')
- .removeClass('active')
-
- this.$element.toggleClass('active')
- }
-
-
- /* BUTTON PLUGIN DEFINITION
- * ======================== */
-
- var old = $.fn.button
-
- $.fn.button = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('button')
- , options = typeof option == 'object' && option
- if (!data) $this.data('button', (data = new Button(this, options)))
- if (option == 'toggle') data.toggle()
- else if (option) data.setState(option)
- })
- }
-
- $.fn.button.defaults = {
- loadingText: 'loading...'
- }
-
- $.fn.button.Constructor = Button
-
-
- /* BUTTON NO CONFLICT
- * ================== */
-
- $.fn.button.noConflict = function () {
- $.fn.button = old
- return this
- }
-
-
- /* BUTTON DATA-API
- * =============== */
-
- $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) {
- var $btn = $(e.target)
- if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
- $btn.button('toggle')
- })
-
-}(window.jQuery);/* ==========================================================
- * bootstrap-carousel.js v2.3.2
- * http://getbootstrap.com/2.3.2/javascript.html#carousel
- * ==========================================================
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* CAROUSEL CLASS DEFINITION
- * ========================= */
-
- var Carousel = function (element, options) {
- this.$element = $(element)
- this.$indicators = this.$element.find('.carousel-indicators')
- this.options = options
- this.options.pause == 'hover' && this.$element
- .on('mouseenter', $.proxy(this.pause, this))
- .on('mouseleave', $.proxy(this.cycle, this))
- }
-
- Carousel.prototype = {
-
- cycle: function (e) {
- if (!e) this.paused = false
- if (this.interval) clearInterval(this.interval);
- this.options.interval
- && !this.paused
- && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
- return this
- }
-
- , getActiveIndex: function () {
- this.$active = this.$element.find('.item.active')
- this.$items = this.$active.parent().children()
- return this.$items.index(this.$active)
- }
-
- , to: function (pos) {
- var activeIndex = this.getActiveIndex()
- , that = this
-
- if (pos > (this.$items.length - 1) || pos < 0) return
-
- if (this.sliding) {
- return this.$element.one('slid', function () {
- that.to(pos)
- })
- }
-
- if (activeIndex == pos) {
- return this.pause().cycle()
- }
-
- return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
- }
-
- , pause: function (e) {
- if (!e) this.paused = true
- if (this.$element.find('.next, .prev').length && $.support.transition.end) {
- this.$element.trigger($.support.transition.end)
- this.cycle(true)
- }
- clearInterval(this.interval)
- this.interval = null
- return this
- }
-
- , next: function () {
- if (this.sliding) return
- return this.slide('next')
- }
-
- , prev: function () {
- if (this.sliding) return
- return this.slide('prev')
- }
-
- , slide: function (type, next) {
- var $active = this.$element.find('.item.active')
- , $next = next || $active[type]()
- , isCycling = this.interval
- , direction = type == 'next' ? 'left' : 'right'
- , fallback = type == 'next' ? 'first' : 'last'
- , that = this
- , e
-
- this.sliding = true
-
- isCycling && this.pause()
-
- $next = $next.length ? $next : this.$element.find('.item')[fallback]()
-
- e = $.Event('slide', {
- relatedTarget: $next[0]
- , direction: direction
- })
-
- if ($next.hasClass('active')) return
-
- if (this.$indicators.length) {
- this.$indicators.find('.active').removeClass('active')
- this.$element.one('slid', function () {
- var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
- $nextIndicator && $nextIndicator.addClass('active')
- })
- }
-
- if ($.support.transition && this.$element.hasClass('slide')) {
- this.$element.trigger(e)
- if (e.isDefaultPrevented()) return
- $next.addClass(type)
- $next[0].offsetWidth // force reflow
- $active.addClass(direction)
- $next.addClass(direction)
- this.$element.one($.support.transition.end, function () {
- $next.removeClass([type, direction].join(' ')).addClass('active')
- $active.removeClass(['active', direction].join(' '))
- that.sliding = false
- setTimeout(function () { that.$element.trigger('slid') }, 0)
- })
- } else {
- this.$element.trigger(e)
- if (e.isDefaultPrevented()) return
- $active.removeClass('active')
- $next.addClass('active')
- this.sliding = false
- this.$element.trigger('slid')
- }
-
- isCycling && this.cycle()
-
- return this
- }
-
- }
-
-
- /* CAROUSEL PLUGIN DEFINITION
- * ========================== */
-
- var old = $.fn.carousel
-
- $.fn.carousel = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('carousel')
- , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
- , action = typeof option == 'string' ? option : options.slide
- if (!data) $this.data('carousel', (data = new Carousel(this, options)))
- if (typeof option == 'number') data.to(option)
- else if (action) data[action]()
- else if (options.interval) data.pause().cycle()
- })
- }
-
- $.fn.carousel.defaults = {
- interval: 5000
- , pause: 'hover'
- }
-
- $.fn.carousel.Constructor = Carousel
-
-
- /* CAROUSEL NO CONFLICT
- * ==================== */
-
- $.fn.carousel.noConflict = function () {
- $.fn.carousel = old
- return this
- }
-
- /* CAROUSEL DATA-API
- * ================= */
-
- $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
- var $this = $(this), href
- , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
- , options = $.extend({}, $target.data(), $this.data())
- , slideIndex
-
- $target.carousel(options)
-
- if (slideIndex = $this.attr('data-slide-to')) {
- $target.data('carousel').pause().to(slideIndex).cycle()
- }
-
- e.preventDefault()
- })
-
-}(window.jQuery);/* =============================================================
- * bootstrap-collapse.js v2.3.2
- * http://getbootstrap.com/2.3.2/javascript.html#collapse
- * =============================================================
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* COLLAPSE PUBLIC CLASS DEFINITION
- * ================================ */
-
- var Collapse = function (element, options) {
- this.$element = $(element)
- this.options = $.extend({}, $.fn.collapse.defaults, options)
-
- if (this.options.parent) {
- this.$parent = $(this.options.parent)
- }
-
- this.options.toggle && this.toggle()
- }
-
- Collapse.prototype = {
-
- constructor: Collapse
-
- , dimension: function () {
- var hasWidth = this.$element.hasClass('width')
- return hasWidth ? 'width' : 'height'
- }
-
- , show: function () {
- var dimension
- , scroll
- , actives
- , hasData
-
- if (this.transitioning || this.$element.hasClass('in')) return
-
- dimension = this.dimension()
- scroll = $.camelCase(['scroll', dimension].join('-'))
- actives = this.$parent && this.$parent.find('> .accordion-group > .in')
-
- if (actives && actives.length) {
- hasData = actives.data('collapse')
- if (hasData && hasData.transitioning) return
- actives.collapse('hide')
- hasData || actives.data('collapse', null)
- }
-
- this.$element[dimension](0)
- this.transition('addClass', $.Event('show'), 'shown')
- $.support.transition && this.$element[dimension](this.$element[0][scroll])
- }
-
- , hide: function () {
- var dimension
- if (this.transitioning || !this.$element.hasClass('in')) return
- dimension = this.dimension()
- this.reset(this.$element[dimension]())
- this.transition('removeClass', $.Event('hide'), 'hidden')
- this.$element[dimension](0)
- }
-
- , reset: function (size) {
- var dimension = this.dimension()
-
- this.$element
- .removeClass('collapse')
- [dimension](size || 'auto')
- [0].offsetWidth
-
- this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
-
- return this
- }
-
- , transition: function (method, startEvent, completeEvent) {
- var that = this
- , complete = function () {
- if (startEvent.type == 'show') that.reset()
- that.transitioning = 0
- that.$element.trigger(completeEvent)
- }
-
- this.$element.trigger(startEvent)
-
- if (startEvent.isDefaultPrevented()) return
-
- this.transitioning = 1
-
- this.$element[method]('in')
-
- $.support.transition && this.$element.hasClass('collapse') ?
- this.$element.one($.support.transition.end, complete) :
- complete()
- }
-
- , toggle: function () {
- this[this.$element.hasClass('in') ? 'hide' : 'show']()
- }
-
- }
-
-
- /* COLLAPSE PLUGIN DEFINITION
- * ========================== */
-
- var old = $.fn.collapse
-
- $.fn.collapse = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('collapse')
- , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
- if (!data) $this.data('collapse', (data = new Collapse(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.collapse.defaults = {
- toggle: true
- }
-
- $.fn.collapse.Constructor = Collapse
-
-
- /* COLLAPSE NO CONFLICT
- * ==================== */
-
- $.fn.collapse.noConflict = function () {
- $.fn.collapse = old
- return this
- }
-
-
- /* COLLAPSE DATA-API
- * ================= */
-
- $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
- var $this = $(this), href
- , target = $this.attr('data-target')
- || e.preventDefault()
- || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
- , option = $(target).data('collapse') ? 'toggle' : $this.data()
- $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
- $(target).collapse(option)
- })
-
-}(window.jQuery);/* ============================================================
- * bootstrap-dropdown.js v2.3.2
- * http://getbootstrap.com/2.3.2/javascript.html#dropdowns
- * ============================================================
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* DROPDOWN CLASS DEFINITION
- * ========================= */
-
- var toggle = '[data-toggle=dropdown]'
- , Dropdown = function (element) {
- var $el = $(element).on('click.dropdown.data-api', this.toggle)
- $('html').on('click.dropdown.data-api', function () {
- $el.parent().removeClass('open')
- })
- }
-
- Dropdown.prototype = {
-
- constructor: Dropdown
-
- , toggle: function (e) {
- var $this = $(this)
- , $parent
- , isActive
-
- if ($this.is('.disabled, :disabled')) return
-
- $parent = getParent($this)
-
- isActive = $parent.hasClass('open')
-
- clearMenus()
-
- if (!isActive) {
- if ('ontouchstart' in document.documentElement) {
- // if mobile we we use a backdrop because click events don't delegate
- $('<div class="dropdown-backdrop"/>').insertBefore($(this)).on('click', clearMenus)
- }
- $parent.toggleClass('open')
- }
-
- $this.focus()
-
- return false
- }
-
- , keydown: function (e) {
- var $this
- , $items
- , $active
- , $parent
- , isActive
- , index
-
- if (!/(38|40|27)/.test(e.keyCode)) return
-
- $this = $(this)
-
- e.preventDefault()
- e.stopPropagation()
-
- if ($this.is('.disabled, :disabled')) return
-
- $parent = getParent($this)
-
- isActive = $parent.hasClass('open')
-
- if (!isActive || (isActive && e.keyCode == 27)) {
- if (e.which == 27) $parent.find(toggle).focus()
- return $this.click()
- }
-
- $items = $('[role=menu] li:not(.divider):visible a', $parent)
-
- if (!$items.length) return
-
- index = $items.index($items.filter(':focus'))
-
- if (e.keyCode == 38 && index > 0) index-- // up
- if (e.keyCode == 40 && index < $items.length - 1) index++ // down
- if (!~index) index = 0
-
- $items
- .eq(index)
- .focus()
- }
-
- }
-
- function clearMenus() {
- $('.dropdown-backdrop').remove()
- $(toggle).each(function () {
- getParent($(this)).removeClass('open')
- })
- }
-
- function getParent($this) {
- var selector = $this.attr('data-target')
- , $parent
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
- }
-
- $parent = selector && $(selector)
-
- if (!$parent || !$parent.length) $parent = $this.parent()
-
- return $parent
- }
-
-
- /* DROPDOWN PLUGIN DEFINITION
- * ========================== */
-
- var old = $.fn.dropdown
-
- $.fn.dropdown = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('dropdown')
- if (!data) $this.data('dropdown', (data = new Dropdown(this)))
- if (typeof option == 'string') data[option].call($this)
- })
- }
-
- $.fn.dropdown.Constructor = Dropdown
-
-
- /* DROPDOWN NO CONFLICT
- * ==================== */
-
- $.fn.dropdown.noConflict = function () {
- $.fn.dropdown = old
- return this
- }
-
-
- /* APPLY TO STANDARD DROPDOWN ELEMENTS
- * =================================== */
-
- $(document)
- .on('click.dropdown.data-api', clearMenus)
- .on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
- .on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
- .on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
-
-}(window.jQuery);
-/* =========================================================
- * bootstrap-modal.js v2.3.2
- * http://getbootstrap.com/2.3.2/javascript.html#modals
- * =========================================================
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* MODAL CLASS DEFINITION
- * ====================== */
-
- var Modal = function (element, options) {
- this.options = options
- this.$element = $(element)
- .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
- this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
- }
-
- Modal.prototype = {
-
- constructor: Modal
-
- , toggle: function () {
- return this[!this.isShown ? 'show' : 'hide']()
- }
-
- , show: function () {
- var that = this
- , e = $.Event('show')
-
- this.$element.trigger(e)
-
- if (this.isShown || e.isDefaultPrevented()) return
-
- this.isShown = true
-
- this.escape()
-
- this.backdrop(function () {
- var transition = $.support.transition && that.$element.hasClass('fade')
-
- if (!that.$element.parent().length) {
- that.$element.appendTo(document.body) //don't move modals dom position
- }
-
- that.$element.show()
-
- if (transition) {
- that.$element[0].offsetWidth // force reflow
- }
-
- that.$element
- .addClass('in')
- .attr('aria-hidden', false)
-
- that.enforceFocus()
-
- transition ?
- that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
- that.$element.focus().trigger('shown')
-
- })
- }
-
- , hide: function (e) {
- e && e.preventDefault()
-
- var that = this
-
- e = $.Event('hide')
-
- this.$element.trigger(e)
-
- if (!this.isShown || e.isDefaultPrevented()) return
-
- this.isShown = false
-
- this.escape()
-
- $(document).off('focusin.modal')
-
- this.$element
- .removeClass('in')
- .attr('aria-hidden', true)
-
- $.support.transition && this.$element.hasClass('fade') ?
- this.hideWithTransition() :
- this.hideModal()
- }
-
- , enforceFocus: function () {
- var that = this
- $(document).on('focusin.modal', function (e) {
- if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
- that.$element.focus()
- }
- })
- }
-
- , escape: function () {
- var that = this
- if (this.isShown && this.options.keyboard) {
- this.$element.on('keyup.dismiss.modal', function ( e ) {
- e.which == 27 && that.hide()
- })
- } else if (!this.isShown) {
- this.$element.off('keyup.dismiss.modal')
- }
- }
-
- , hideWithTransition: function () {
- var that = this
- , timeout = setTimeout(function () {
- that.$element.off($.support.transition.end)
- that.hideModal()
- }, 500)
-
- this.$element.one($.support.transition.end, function () {
- clearTimeout(timeout)
- that.hideModal()
- })
- }
-
- , hideModal: function () {
- var that = this
- this.$element.hide()
- this.backdrop(function () {
- that.removeBackdrop()
- that.$element.trigger('hidden')
- })
- }
-
- , removeBackdrop: function () {
- this.$backdrop && this.$backdrop.remove()
- this.$backdrop = null
- }
-
- , backdrop: function (callback) {
- var that = this
- , animate = this.$element.hasClass('fade') ? 'fade' : ''
-
- if (this.isShown && this.options.backdrop) {
- var doAnimate = $.support.transition && animate
-
- this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
- .appendTo(document.body)
-
- this.$backdrop.click(
- this.options.backdrop == 'static' ?
- $.proxy(this.$element[0].focus, this.$element[0])
- : $.proxy(this.hide, this)
- )
-
- if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
-
- this.$backdrop.addClass('in')
-
- if (!callback) return
-
- doAnimate ?
- this.$backdrop.one($.support.transition.end, callback) :
- callback()
-
- } else if (!this.isShown && this.$backdrop) {
- this.$backdrop.removeClass('in')
-
- $.support.transition && this.$element.hasClass('fade')?
- this.$backdrop.one($.support.transition.end, callback) :
- callback()
-
- } else if (callback) {
- callback()
- }
- }
- }
-
-
- /* MODAL PLUGIN DEFINITION
- * ======================= */
-
- var old = $.fn.modal
-
- $.fn.modal = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('modal')
- , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
- if (!data) $this.data('modal', (data = new Modal(this, options)))
- if (typeof option == 'string') data[option]()
- else if (options.show) data.show()
- })
- }
-
- $.fn.modal.defaults = {
- backdrop: true
- , keyboard: true
- , show: true
- }
-
- $.fn.modal.Constructor = Modal
-
-
- /* MODAL NO CONFLICT
- * ================= */
-
- $.fn.modal.noConflict = function () {
- $.fn.modal = old
- return this
- }
-
-
- /* MODAL DATA-API
- * ============== */
-
- $(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) {
- var $this = $(this)
- , href = $this.attr('href')
- , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
- , option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
-
- e.preventDefault()
-
- $target
- .modal(option)
- .one('hide', function () {
- $this.focus()
- })
- })
-
-}(window.jQuery);
-/* ===========================================================
- * bootstrap-tooltip.js v2.3.2
- * http://getbootstrap.com/2.3.2/javascript.html#tooltips
- * Inspired by the original jQuery.tipsy by Jason Frame
- * ===========================================================
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* TOOLTIP PUBLIC CLASS DEFINITION
- * =============================== */
-
- var Tooltip = function (element, options) {
- this.init('tooltip', element, options)
- }
-
- Tooltip.prototype = {
-
- constructor: Tooltip
-
- , init: function (type, element, options) {
- var eventIn
- , eventOut
- , triggers
- , trigger
- , i
-
- this.type = type
- this.$element = $(element)
- this.options = this.getOptions(options)
- this.enabled = true
-
- triggers = this.options.trigger.split(' ')
-
- for (i = triggers.length; i--;) {
- trigger = triggers[i]
- if (trigger == 'click') {
- this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
- } else if (trigger != 'manual') {
- eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
- eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
- this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
- this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
- }
- }
-
- this.options.selector ?
- (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
- this.fixTitle()
- }
-
- , getOptions: function (options) {
- options = $.extend({}, $.fn[this.type].defaults, this.$element.data(), options)
-
- if (options.delay && typeof options.delay == 'number') {
- options.delay = {
- show: options.delay
- , hide: options.delay
- }
- }
-
- return options
- }
-
- , enter: function (e) {
- var defaults = $.fn[this.type].defaults
- , options = {}
- , self
-
- this._options && $.each(this._options, function (key, value) {
- if (defaults[key] != value) options[key] = value
- }, this)
-
- self = $(e.currentTarget)[this.type](options).data(this.type)
-
- if (!self.options.delay || !self.options.delay.show) return self.show()
-
- clearTimeout(this.timeout)
- self.hoverState = 'in'
- this.timeout = setTimeout(function() {
- if (self.hoverState == 'in') self.show()
- }, self.options.delay.show)
- }
-
- , leave: function (e) {
- var self = $(e.currentTarget)[this.type](this._options).data(this.type)
-
- if (this.timeout) clearTimeout(this.timeout)
- if (!self.options.delay || !self.options.delay.hide) return self.hide()
-
- self.hoverState = 'out'
- this.timeout = setTimeout(function() {
- if (self.hoverState == 'out') self.hide()
- }, self.options.delay.hide)
- }
-
- , show: function () {
- var $tip
- , pos
- , actualWidth
- , actualHeight
- , placement
- , tp
- , e = $.Event('show')
-
- if (this.hasContent() && this.enabled) {
- this.$element.trigger(e)
- if (e.isDefaultPrevented()) return
- $tip = this.tip()
- this.setContent()
-
- if (this.options.animation) {
- $tip.addClass('fade')
- }
-
- placement = typeof this.options.placement == 'function' ?
- this.options.placement.call(this, $tip[0], this.$element[0]) :
- this.options.placement
-
- $tip
- .detach()
- .css({ top: 0, left: 0, display: 'block' })
-
- this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
-
- pos = this.getPosition()
-
- actualWidth = $tip[0].offsetWidth
- actualHeight = $tip[0].offsetHeight
-
- switch (placement) {
- case 'bottom':
- tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
- break
- case 'top':
- tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
- break
- case 'left':
- tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
- break
- case 'right':
- tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
- break
- }
-
- this.applyPlacement(tp, placement)
- this.$element.trigger('shown')
- }
- }
-
- , applyPlacement: function(offset, placement){
- var $tip = this.tip()
- , width = $tip[0].offsetWidth
- , height = $tip[0].offsetHeight
- , actualWidth
- , actualHeight
- , delta
- , replace
-
- $tip
- .offset(offset)
- .addClass(placement)
- .addClass('in')
-
- actualWidth = $tip[0].offsetWidth
- actualHeight = $tip[0].offsetHeight
-
- if (placement == 'top' && actualHeight != height) {
- offset.top = offset.top + height - actualHeight
- replace = true
- }
-
- if (placement == 'bottom' || placement == 'top') {
- delta = 0
-
- if (offset.left < 0){
- delta = offset.left * -2
- offset.left = 0
- $tip.offset(offset)
- actualWidth = $tip[0].offsetWidth
- actualHeight = $tip[0].offsetHeight
- }
-
- this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
- } else {
- this.replaceArrow(actualHeight - height, actualHeight, 'top')
- }
-
- if (replace) $tip.offset(offset)
- }
-
- , replaceArrow: function(delta, dimension, position){
- this
- .arrow()
- .css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
- }
-
- , setContent: function () {
- var $tip = this.tip()
- , title = this.getTitle()
-
- $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
- $tip.removeClass('fade in top bottom left right')
- }
-
- , hide: function () {
- var that = this
- , $tip = this.tip()
- , e = $.Event('hide')
-
- this.$element.trigger(e)
- if (e.isDefaultPrevented()) return
-
- $tip.removeClass('in')
-
- function removeWithAnimation() {
- var timeout = setTimeout(function () {
- $tip.off($.support.transition.end).detach()
- }, 500)
-
- $tip.one($.support.transition.end, function () {
- clearTimeout(timeout)
- $tip.detach()
- })
- }
-
- $.support.transition && this.$tip.hasClass('fade') ?
- removeWithAnimation() :
- $tip.detach()
-
- this.$element.trigger('hidden')
-
- return this
- }
-
- , fixTitle: function () {
- var $e = this.$element
- if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
- $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
- }
- }
-
- , hasContent: function () {
- return this.getTitle()
- }
-
- , getPosition: function () {
- var el = this.$element[0]
- return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
- width: el.offsetWidth
- , height: el.offsetHeight
- }, this.$element.offset())
- }
-
- , getTitle: function () {
- var title
- , $e = this.$element
- , o = this.options
-
- title = $e.attr('data-original-title')
- || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
-
- return title
- }
-
- , tip: function () {
- return this.$tip = this.$tip || $(this.options.template)
- }
-
- , arrow: function(){
- return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
- }
-
- , validate: function () {
- if (!this.$element[0].parentNode) {
- this.hide()
- this.$element = null
- this.options = null
- }
- }
-
- , enable: function () {
- this.enabled = true
- }
-
- , disable: function () {
- this.enabled = false
- }
-
- , toggleEnabled: function () {
- this.enabled = !this.enabled
- }
-
- , toggle: function (e) {
- var self = e ? $(e.currentTarget)[this.type](this._options).data(this.type) : this
- self.tip().hasClass('in') ? self.hide() : self.show()
- }
-
- , destroy: function () {
- this.hide().$element.off('.' + this.type).removeData(this.type)
- }
-
- }
-
-
- /* TOOLTIP PLUGIN DEFINITION
- * ========================= */
-
- var old = $.fn.tooltip
-
- $.fn.tooltip = function ( option ) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('tooltip')
- , options = typeof option == 'object' && option
- if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.tooltip.Constructor = Tooltip
-
- $.fn.tooltip.defaults = {
- animation: true
- , placement: 'top'
- , selector: false
- , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
- , trigger: 'hover focus'
- , title: ''
- , delay: 0
- , html: false
- , container: false
- }
-
-
- /* TOOLTIP NO CONFLICT
- * =================== */
-
- $.fn.tooltip.noConflict = function () {
- $.fn.tooltip = old
- return this
- }
-
-}(window.jQuery);
-/* ===========================================================
- * bootstrap-popover.js v2.3.2
- * http://getbootstrap.com/2.3.2/javascript.html#popovers
- * ===========================================================
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* POPOVER PUBLIC CLASS DEFINITION
- * =============================== */
-
- var Popover = function (element, options) {
- this.init('popover', element, options)
- }
-
-
- /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
- ========================================== */
-
- Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
-
- constructor: Popover
-
- , setContent: function () {
- var $tip = this.tip()
- , title = this.getTitle()
- , content = this.getContent()
-
- $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
- $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
-
- $tip.removeClass('fade top bottom left right in')
- }
-
- , hasContent: function () {
- return this.getTitle() || this.getContent()
- }
-
- , getContent: function () {
- var content
- , $e = this.$element
- , o = this.options
-
- content = (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
- || $e.attr('data-content')
-
- return content
- }
-
- , tip: function () {
- if (!this.$tip) {
- this.$tip = $(this.options.template)
- }
- return this.$tip
- }
-
- , destroy: function () {
- this.hide().$element.off('.' + this.type).removeData(this.type)
- }
-
- })
-
-
- /* POPOVER PLUGIN DEFINITION
- * ======================= */
-
- var old = $.fn.popover
-
- $.fn.popover = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('popover')
- , options = typeof option == 'object' && option
- if (!data) $this.data('popover', (data = new Popover(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.popover.Constructor = Popover
-
- $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
- placement: 'right'
- , trigger: 'click'
- , content: ''
- , template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
- })
-
-
- /* POPOVER NO CONFLICT
- * =================== */
-
- $.fn.popover.noConflict = function () {
- $.fn.popover = old
- return this
- }
-
-}(window.jQuery);
-/* =============================================================
- * bootstrap-scrollspy.js v2.3.2
- * http://getbootstrap.com/2.3.2/javascript.html#scrollspy
- * =============================================================
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* SCROLLSPY CLASS DEFINITION
- * ========================== */
-
- function ScrollSpy(element, options) {
- var process = $.proxy(this.process, this)
- , $element = $(element).is('body') ? $(window) : $(element)
- , href
- this.options = $.extend({}, $.fn.scrollspy.defaults, options)
- this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
- this.selector = (this.options.target
- || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
- || '') + ' .nav li > a'
- this.$body = $('body')
- this.refresh()
- this.process()
- }
-
- ScrollSpy.prototype = {
-
- constructor: ScrollSpy
-
- , refresh: function () {
- var self = this
- , $targets
-
- this.offsets = $([])
- this.targets = $([])
-
- $targets = this.$body
- .find(this.selector)
- .map(function () {
- var $el = $(this)
- , href = $el.data('target') || $el.attr('href')
- , $href = /^#\w/.test(href) && $(href)
- return ( $href
- && $href.length
- && [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]] ) || null
- })
- .sort(function (a, b) { return a[0] - b[0] })
- .each(function () {
- self.offsets.push(this[0])
- self.targets.push(this[1])
- })
- }
-
- , process: function () {
- var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
- , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
- , maxScroll = scrollHeight - this.$scrollElement.height()
- , offsets = this.offsets
- , targets = this.targets
- , activeTarget = this.activeTarget
- , i
-
- if (scrollTop >= maxScroll) {
- return activeTarget != (i = targets.last()[0])
- && this.activate ( i )
- }
-
- for (i = offsets.length; i--;) {
- activeTarget != targets[i]
- && scrollTop >= offsets[i]
- && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
- && this.activate( targets[i] )
- }
- }
-
- , activate: function (target) {
- var active
- , selector
-
- this.activeTarget = target
-
- $(this.selector)
- .parent('.active')
- .removeClass('active')
-
- selector = this.selector
- + '[data-target="' + target + '"],'
- + this.selector + '[href="' + target + '"]'
-
- active = $(selector)
- .parent('li')
- .addClass('active')
-
- if (active.parent('.dropdown-menu').length) {
- active = active.closest('li.dropdown').addClass('active')
- }
-
- active.trigger('activate')
- }
-
- }
-
-
- /* SCROLLSPY PLUGIN DEFINITION
- * =========================== */
-
- var old = $.fn.scrollspy
-
- $.fn.scrollspy = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('scrollspy')
- , options = typeof option == 'object' && option
- if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.scrollspy.Constructor = ScrollSpy
-
- $.fn.scrollspy.defaults = {
- offset: 10
- }
-
-
- /* SCROLLSPY NO CONFLICT
- * ===================== */
-
- $.fn.scrollspy.noConflict = function () {
- $.fn.scrollspy = old
- return this
- }
-
-
- /* SCROLLSPY DATA-API
- * ================== */
-
- $(window).on('load', function () {
- $('[data-spy="scroll"]').each(function () {
- var $spy = $(this)
- $spy.scrollspy($spy.data())
- })
- })
-
-}(window.jQuery);/* ========================================================
- * bootstrap-tab.js v2.3.2
- * http://getbootstrap.com/2.3.2/javascript.html#tabs
- * ========================================================
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* TAB CLASS DEFINITION
- * ==================== */
-
- var Tab = function (element) {
- this.element = $(element)
- }
-
- Tab.prototype = {
-
- constructor: Tab
-
- , show: function () {
- var $this = this.element
- , $ul = $this.closest('ul:not(.dropdown-menu)')
- , selector = $this.attr('data-target')
- , previous
- , $target
- , e
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
- }
-
- if ( $this.parent('li').hasClass('active') ) return
-
- previous = $ul.find('.active:last a')[0]
-
- e = $.Event('show', {
- relatedTarget: previous
- })
-
- $this.trigger(e)
-
- if (e.isDefaultPrevented()) return
-
- $target = $(selector)
-
- this.activate($this.parent('li'), $ul)
- this.activate($target, $target.parent(), function () {
- $this.trigger({
- type: 'shown'
- , relatedTarget: previous
- })
- })
- }
-
- , activate: function ( element, container, callback) {
- var $active = container.find('> .active')
- , transition = callback
- && $.support.transition
- && $active.hasClass('fade')
-
- function next() {
- $active
- .removeClass('active')
- .find('> .dropdown-menu > .active')
- .removeClass('active')
-
- element.addClass('active')
-
- if (transition) {
- element[0].offsetWidth // reflow for transition
- element.addClass('in')
- } else {
- element.removeClass('fade')
- }
-
- if ( element.parent('.dropdown-menu') ) {
- element.closest('li.dropdown').addClass('active')
- }
-
- callback && callback()
- }
-
- transition ?
- $active.one($.support.transition.end, next) :
- next()
-
- $active.removeClass('in')
- }
- }
-
-
- /* TAB PLUGIN DEFINITION
- * ===================== */
-
- var old = $.fn.tab
-
- $.fn.tab = function ( option ) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('tab')
- if (!data) $this.data('tab', (data = new Tab(this)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.tab.Constructor = Tab
-
-
- /* TAB NO CONFLICT
- * =============== */
-
- $.fn.tab.noConflict = function () {
- $.fn.tab = old
- return this
- }
-
-
- /* TAB DATA-API
- * ============ */
-
- $(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
- e.preventDefault()
- $(this).tab('show')
- })
-
-}(window.jQuery);/* =============================================================
- * bootstrap-typeahead.js v2.3.2
- * http://getbootstrap.com/2.3.2/javascript.html#typeahead
- * =============================================================
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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($){
-
- "use strict"; // jshint ;_;
-
-
- /* TYPEAHEAD PUBLIC CLASS DEFINITION
- * ================================= */
-
- var Typeahead = function (element, options) {
- this.$element = $(element)
- this.options = $.extend({}, $.fn.typeahead.defaults, options)
- this.matcher = this.options.matcher || this.matcher
- this.sorter = this.options.sorter || this.sorter
- this.highlighter = this.options.highlighter || this.highlighter
- this.updater = this.options.updater || this.updater
- this.source = this.options.source
- this.$menu = $(this.options.menu)
- this.shown = false
- this.listen()
- }
-
- Typeahead.prototype = {
-
- constructor: Typeahead
-
- , select: function () {
- var val = this.$menu.find('.active').attr('data-value')
- this.$element
- .val(this.updater(val))
- .change()
- return this.hide()
- }
-
- , updater: function (item) {
- return item
- }
-
- , show: function () {
- var pos = $.extend({}, this.$element.position(), {
- height: this.$element[0].offsetHeight
- })
-
- this.$menu
- .insertAfter(this.$element)
- .css({
- top: pos.top + pos.height
- , left: pos.left
- })
- .show()
-
- this.shown = true
- return this
- }
-
- , hide: function () {
- this.$menu.hide()
- this.shown = false
- return this
- }
-
- , lookup: function (event) {
- var items
-
- this.query = this.$element.val()
-
- if (!this.query || this.query.length < this.options.minLength) {
- return this.shown ? this.hide() : this
- }
-
- items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source
-
- return items ? this.process(items) : this
- }
-
- , process: function (items) {
- var that = this
-
- items = $.grep(items, function (item) {
- return that.matcher(item)
- })
-
- items = this.sorter(items)
-
- if (!items.length) {
- return this.shown ? this.hide() : this
- }
-
- return this.render(items.slice(0, this.options.items)).show()
- }
-
- , matcher: function (item) {
- return ~item.toLowerCase().indexOf(this.query.toLowerCase())
- }
-
- , sorter: function (items) {
- var beginswith = []
- , caseSensitive = []
- , caseInsensitive = []
- , item
-
- while (item = items.shift()) {
- if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
- else if (~item.indexOf(this.query)) caseSensitive.push(item)
- else caseInsensitive.push(item)
- }
-
- return beginswith.concat(caseSensitive, caseInsensitive)
- }
-
- , highlighter: function (item) {
- var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
- return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
- return '<strong>' + match + '</strong>'
- })
- }
-
- , render: function (items) {
- var that = this
-
- items = $(items).map(function (i, item) {
- i = $(that.options.item).attr('data-value', item)
- i.find('a').html(that.highlighter(item))
- return i[0]
- })
-
- items.first().addClass('active')
- this.$menu.html(items)
- return this
- }
-
- , next: function (event) {
- var active = this.$menu.find('.active').removeClass('active')
- , next = active.next()
-
- if (!next.length) {
- next = $(this.$menu.find('li')[0])
- }
-
- next.addClass('active')
- }
-
- , prev: function (event) {
- var active = this.$menu.find('.active').removeClass('active')
- , prev = active.prev()
-
- if (!prev.length) {
- prev = this.$menu.find('li').last()
- }
-
- prev.addClass('active')
- }
-
- , listen: function () {
- this.$element
- .on('focus', $.proxy(this.focus, this))
- .on('blur', $.proxy(this.blur, this))
- .on('keypress', $.proxy(this.keypress, this))
- .on('keyup', $.proxy(this.keyup, this))
-
- if (this.eventSupported('keydown')) {
- this.$element.on('keydown', $.proxy(this.keydown, this))
- }
-
- this.$menu
- .on('click', $.proxy(this.click, this))
- .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
- .on('mouseleave', 'li', $.proxy(this.mouseleave, this))
- }
-
- , eventSupported: function(eventName) {
- var isSupported = eventName in this.$element
- if (!isSupported) {
- this.$element.setAttribute(eventName, 'return;')
- isSupported = typeof this.$element[eventName] === 'function'
- }
- return isSupported
- }
-
- , move: function (e) {
- if (!this.shown) return
-
- switch(e.keyCode) {
- case 9: // tab
- case 13: // enter
- case 27: // escape
- e.preventDefault()
- break
-
- case 38: // up arrow
- e.preventDefault()
- this.prev()
- break
-
- case 40: // down arrow
- e.preventDefault()
- this.next()
- break
- }
-
- e.stopPropagation()
- }
-
- , keydown: function (e) {
- this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27])
- this.move(e)
- }
-
- , keypress: function (e) {
- if (this.suppressKeyPressRepeat) return
- this.move(e)
- }
-
- , keyup: function (e) {
- switch(e.keyCode) {
- case 40: // down arrow
- case 38: // up arrow
- case 16: // shift
- case 17: // ctrl
- case 18: // alt
- break
-
- case 9: // tab
- case 13: // enter
- if (!this.shown) return
- this.select()
- break
-
- case 27: // escape
- if (!this.shown) return
- this.hide()
- break
-
- default:
- this.lookup()
- }
-
- e.stopPropagation()
- e.preventDefault()
- }
-
- , focus: function (e) {
- this.focused = true
- }
-
- , blur: function (e) {
- this.focused = false
- if (!this.mousedover && this.shown) this.hide()
- }
-
- , click: function (e) {
- e.stopPropagation()
- e.preventDefault()
- this.select()
- this.$element.focus()
- }
-
- , mouseenter: function (e) {
- this.mousedover = true
- this.$menu.find('.active').removeClass('active')
- $(e.currentTarget).addClass('active')
- }
-
- , mouseleave: function (e) {
- this.mousedover = false
- if (!this.focused && this.shown) this.hide()
- }
-
- }
-
-
- /* TYPEAHEAD PLUGIN DEFINITION
- * =========================== */
-
- var old = $.fn.typeahead
-
- $.fn.typeahead = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('typeahead')
- , options = typeof option == 'object' && option
- if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.typeahead.defaults = {
- source: []
- , items: 8
- , menu: '<ul class="typeahead dropdown-menu"></ul>'
- , item: '<li><a href="#"></a></li>'
- , minLength: 1
- }
-
- $.fn.typeahead.Constructor = Typeahead
-
-
- /* TYPEAHEAD NO CONFLICT
- * =================== */
-
- $.fn.typeahead.noConflict = function () {
- $.fn.typeahead = old
- return this
- }
-
-
- /* TYPEAHEAD DATA-API
- * ================== */
-
- $(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
- var $this = $(this)
- if ($this.data('typeahead')) return
- $this.typeahead($this.data())
- })
-
-}(window.jQuery);
-/* ==========================================================
- * bootstrap-affix.js v2.3.2
- * http://getbootstrap.com/2.3.2/javascript.html#affix
- * ==========================================================
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* AFFIX CLASS DEFINITION
- * ====================== */
-
- var Affix = function (element, options) {
- this.options = $.extend({}, $.fn.affix.defaults, options)
- this.$window = $(window)
- .on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
- .on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
- this.$element = $(element)
- this.checkPosition()
- }
-
- Affix.prototype.checkPosition = function () {
- if (!this.$element.is(':visible')) return
-
- var scrollHeight = $(document).height()
- , scrollTop = this.$window.scrollTop()
- , position = this.$element.offset()
- , offset = this.options.offset
- , offsetBottom = offset.bottom
- , offsetTop = offset.top
- , reset = 'affix affix-top affix-bottom'
- , affix
-
- if (typeof offset != 'object') offsetBottom = offsetTop = offset
- if (typeof offsetTop == 'function') offsetTop = offset.top()
- if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
-
- affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
- false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
- 'bottom' : offsetTop != null && scrollTop <= offsetTop ?
- 'top' : false
-
- if (this.affixed === affix) return
-
- this.affixed = affix
- this.unpin = affix == 'bottom' ? position.top - scrollTop : null
-
- this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
- }
-
-
- /* AFFIX PLUGIN DEFINITION
- * ======================= */
-
- var old = $.fn.affix
-
- $.fn.affix = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('affix')
- , options = typeof option == 'object' && option
- if (!data) $this.data('affix', (data = new Affix(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.affix.Constructor = Affix
-
- $.fn.affix.defaults = {
- offset: 0
- }
-
-
- /* AFFIX NO CONFLICT
- * ================= */
-
- $.fn.affix.noConflict = function () {
- $.fn.affix = old
- return this
- }
-
-
- /* AFFIX DATA-API
- * ============== */
-
- $(window).on('load', function () {
- $('[data-spy="affix"]').each(function () {
- var $spy = $(this)
- , data = $spy.data()
-
- data.offset = data.offset || {}
-
- data.offsetBottom && (data.offset.bottom = data.offsetBottom)
- data.offsetTop && (data.offset.top = data.offsetTop)
-
- $spy.affix(data)
- })
- })
-
-
-}(window.jQuery); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/oid-connect/bootstrap2/js/bootstrap.min.js b/ecomp-portal-BE/war/static/oid-connect/bootstrap2/js/bootstrap.min.js
deleted file mode 100644
index 848258d3..00000000
--- a/ecomp-portal-BE/war/static/oid-connect/bootstrap2/js/bootstrap.min.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/*!
-* Bootstrap.js by @fat & @mdo
-* Copyright 2013 Twitter, Inc.
-* http://www.apache.org/licenses/LICENSE-2.0.txt
-*/
-!function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(t){var n=this.getActiveIndex(),r=this;if(t>this.$items.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){r.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",e(this.$items[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u](),f=e.Event("slide",{relatedTarget:i[0],direction:o});if(i.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=e(a.$indicators.children()[a.getActiveIndex()]);t&&t.addClass("active")}));if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.pause().cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data()),o;i.carousel(s),(o=n.attr("data-slide-to"))&&i.data("carousel").pause().to(o).cycle(),t.preventDefault()})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning||this.$element.hasClass("in"))return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning||!this.$element.hasClass("in"))return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=e.extend({},e.fn.collapse.defaults,r.data(),typeof n=="object"&&n);i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})}(window.jQuery),!function(e){"use strict";function r(){e(".dropdown-backdrop").remove(),e(t).each(function(){i(e(this)).removeClass("open")})}function i(t){var n=t.attr("data-target"),r;n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=n&&e(n);if(!r||!r.length)r=t.parent();return r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||("ontouchstart"in document.documentElement&&e('<div class="dropdown-backdrop"/>').insertBefore(e(this)).on("click",r),s.toggleClass("open")),n.focus(),!1},keydown:function(n){var r,s,o,u,a,f;if(!/(38|40|27)/.test(n.keyCode))return;r=e(this),n.preventDefault(),n.stopPropagation();if(r.is(".disabled, :disabled"))return;u=i(r),a=u.hasClass("open");if(!a||a&&n.keyCode==27)return n.which==27&&u.find(t).focus(),r.click();s=e("[role=menu] li:not(.divider):visible a",u);if(!s.length)return;f=s.index(s.filter(":focus")),n.keyCode==38&&f>0&&f--,n.keyCode==40&&f<s.length-1&&f++,~f||(f=0),s.eq(f).focus()}};var s=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var r=e(this),i=r.data("dropdown");i||r.data("dropdown",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.dropdown.Constructor=n,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=s,this},e(document).on("click.dropdown.data-api",r).on("click.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.dropdown.data-api",t,n.prototype.toggle).on("keydown.dropdown.data-api",t+", [role=menu]",n.prototype.keydown)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,n=e.Event("show");this.$element.trigger(n);if(this.isShown||n.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.backdrop(function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$element[0].offsetWidth,t.$element.addClass("in").attr("aria-hidden",!1),t.enforceFocus(),n?t.$element.one(e.support.transition.end,function(){t.$element.focus().trigger("shown")}):t.$element.focus().trigger("shown")})},hide:function(t){t&&t.preventDefault();var n=this;t=e.Event("hide"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),e.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var t=this;e(document).on("focusin.modal",function(e){t.$element[0]!==e.target&&!t.$element.has(e.target).length&&t.$element.focus()})},escape:function(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(t){t.which==27&&e.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var t=this,n=setTimeout(function(){t.$element.off(e.support.transition.end),t.hideModal()},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n),t.hideModal()})},hideModal:function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(t){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.$backdrop.click(this.options.backdrop=="static"?e.proxy(this.$element[0].focus,this.$element[0]):e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in");if(!t)return;i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,t):t()):t&&t()}};var n=e.fn.modal;e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s,o,u,a;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,o=this.options.trigger.split(" ");for(a=o.length;a--;)u=o[a],u=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):u!="manual"&&(i=u=="hover"?"mouseenter":"focus",s=u=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this)));this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e.fn[this.type].defaults,r={},i;this._options&&e.each(this._options,function(e,t){n[e]!=t&&(r[e]=t)},this),i=e(t.currentTarget)[this.type](r).data(this.type);if(!i.options.delay||!i.options.delay.show)return i.show();clearTimeout(this.timeout),i.hoverState="in",this.timeout=setTimeout(function(){i.hoverState=="in"&&i.show()},i.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var t,n,r,i,s,o,u=e.Event("show");if(this.hasContent()&&this.enabled){this.$element.trigger(u);if(u.isDefaultPrevented())return;t=this.tip(),this.setContent(),this.options.animation&&t.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,t[0],this.$element[0]):this.options.placement,t.detach().css({top:0,left:0,display:"block"}),this.options.container?t.appendTo(this.options.container):t.insertAfter(this.$element),n=this.getPosition(),r=t[0].offsetWidth,i=t[0].offsetHeight;switch(s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}this.applyPlacement(o,s),this.$element.trigger("shown")}},applyPlacement:function(e,t){var n=this.tip(),r=n[0].offsetWidth,i=n[0].offsetHeight,s,o,u,a;n.offset(e).addClass(t).addClass("in"),s=n[0].offsetWidth,o=n[0].offsetHeight,t=="top"&&o!=i&&(e.top=e.top+i-o,a=!0),t=="bottom"||t=="top"?(u=0,e.left<0&&(u=e.left*-2,e.left=0,n.offset(e),s=n[0].offsetWidth,o=n[0].offsetHeight),this.replaceArrow(u-r+s,s,"left")):this.replaceArrow(o-i,o,"top"),a&&n.offset(e)},replaceArrow:function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function i(){var t=setTimeout(function(){n.off(e.support.transition.end).detach()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.detach()})}var t=this,n=this.tip(),r=e.Event("hide");this.$element.trigger(r);if(r.isDefaultPrevented())return;return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?i():n.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var t=this.$element[0];return e.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(t){var n=t?e(t.currentTarget)[this.type](this._options).data(this.type):this;n.tip().hasClass("in")?n.hide():n.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=(typeof n.content=="function"?n.content.call(t[0]):n.content)||t.attr("data-content"),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(window.jQuery),!function(e){"use strict";function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var n=e(this),r=n.data("target")||n.attr("href"),i=/^#\w/.test(r)&&e(r);return i&&i.length&&[[i.position().top+(!e.isWindow(t.$scrollElement.get(0))&&t.$scrollElement.scrollTop()),r]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}};var n=e.fn.scrollspy;e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=n,this},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active:last a")[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=e(this.options.menu),this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(n=e.isFunction(this.source)?this.source(this.query,e.proxy(this.process,this)):this.source,n?this.process(n):this)},process:function(t){var n=this;return t=e.grep(t,function(e){return n.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){var t=[],n=[],r=[],i;while(i=e.shift())i.toLowerCase().indexOf(this.query.toLowerCase())?~i.indexOf(this.query)?n.push(i):r.push(i):t.push(i);return t.concat(n,r)},highlighter:function(e){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),function(e,t){return"<strong>"+t+"</strong>"})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("focus",e.proxy(this.focus,this)).on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this)).on("mouseleave","li",e.proxy(this.mouseleave,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t=typeof this.$element[e]=="function"),t},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},focus:function(e){this.focused=!0},blur:function(e){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(e){e.stopPropagation(),e.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(t){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")},mouseleave:function(e){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var n=e.fn.typeahead;e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},e.fn.typeahead.Constructor=t,e.fn.typeahead.noConflict=function(){return e.fn.typeahead=n,this},e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;n.typeahead(n.data())})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)).on("click.affix.data-api",e.proxy(function(){setTimeout(e.proxy(this.checkPosition,this),1)},this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery); \ No newline at end of file
diff --git a/ecomp-portal-BE/war/static/oid-connect/js/lib/jquery.js b/ecomp-portal-BE/war/static/oid-connect/js/lib/jquery.js
deleted file mode 100644
index 3774ff98..00000000
--- a/ecomp-portal-BE/war/static/oid-connect/js/lib/jquery.js
+++ /dev/null
@@ -1,9404 +0,0 @@
-/*!
- * jQuery JavaScript Library v1.7.2
- * http://jquery.com/
- *
- * Copyright 2011, John Resig
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- * Copyright 2011, The Dojo Foundation
- * Released under the MIT, BSD, and GPL Licenses.
- *
- * Date: Wed Mar 21 12:46:34 2012 -0700
- */
-(function( window, undefined ) {
-
-// Use the correct document accordingly with window argument (sandbox)
-var document = window.document,
- navigator = window.navigator,
- location = window.location;
-var jQuery = (function() {
-
-// Define a local copy of jQuery
-var jQuery = function( selector, context ) {
- // The jQuery object is actually just the init constructor 'enhanced'
- return new jQuery.fn.init( selector, context, rootjQuery );
- },
-
- // Map over jQuery in case of overwrite
- _jQuery = window.jQuery,
-
- // Map over the $ in case of overwrite
- _$ = window.$,
-
- // A central reference to the root jQuery(document)
- rootjQuery,
-
- // A simple way to check for HTML strings or ID strings
- // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
- quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
-
- // Check if a string has a non-whitespace character in it
- rnotwhite = /\S/,
-
- // Used for trimming whitespace
- trimLeft = /^\s+/,
- trimRight = /\s+$/,
-
- // Match a standalone tag
- rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
-
- // JSON RegExp
- rvalidchars = /^[\],:{}\s]*$/,
- rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
- rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
- rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
-
- // Useragent RegExp
- rwebkit = /(webkit)[ \/]([\w.]+)/,
- ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
- rmsie = /(msie) ([\w.]+)/,
- rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
-
- // Matches dashed string for camelizing
- rdashAlpha = /-([a-z]|[0-9])/ig,
- rmsPrefix = /^-ms-/,
-
- // Used by jQuery.camelCase as callback to replace()
- fcamelCase = function( all, letter ) {
- return ( letter + "" ).toUpperCase();
- },
-
- // Keep a UserAgent string for use with jQuery.browser
- userAgent = navigator.userAgent,
-
- // For matching the engine and version of the browser
- browserMatch,
-
- // The deferred used on DOM ready
- readyList,
-
- // The ready event handler
- DOMContentLoaded,
-
- // Save a reference to some core methods
- toString = Object.prototype.toString,
- hasOwn = Object.prototype.hasOwnProperty,
- push = Array.prototype.push,
- slice = Array.prototype.slice,
- trim = String.prototype.trim,
- indexOf = Array.prototype.indexOf,
-
- // [[Class]] -> type pairs
- class2type = {};
-
-jQuery.fn = jQuery.prototype = {
- constructor: jQuery,
- init: function( selector, context, rootjQuery ) {
- var match, elem, ret, doc;
-
- // Handle $(""), $(null), or $(undefined)
- if ( !selector ) {
- return this;
- }
-
- // Handle $(DOMElement)
- if ( selector.nodeType ) {
- this.context = this[0] = selector;
- this.length = 1;
- return this;
- }
-
- // The body element only exists once, optimize finding it
- if ( selector === "body" && !context && document.body ) {
- this.context = document;
- this[0] = document.body;
- this.selector = selector;
- this.length = 1;
- return this;
- }
-
- // Handle HTML strings
- if ( typeof selector === "string" ) {
- // Are we dealing with HTML string or an ID?
- if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
- // Assume that strings that start and end with <> are HTML and skip the regex check
- match = [ null, selector, null ];
-
- } else {
- match = quickExpr.exec( selector );
- }
-
- // Verify a match, and that no context was specified for #id
- if ( match && (match[1] || !context) ) {
-
- // HANDLE: $(html) -> $(array)
- if ( match[1] ) {
- context = context instanceof jQuery ? context[0] : context;
- doc = ( context ? context.ownerDocument || context : document );
-
- // If a single string is passed in and it's a single tag
- // just do a createElement and skip the rest
- ret = rsingleTag.exec( selector );
-
- if ( ret ) {
- if ( jQuery.isPlainObject( context ) ) {
- selector = [ document.createElement( ret[1] ) ];
- jQuery.fn.attr.call( selector, context, true );
-
- } else {
- selector = [ doc.createElement( ret[1] ) ];
- }
-
- } else {
- ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
- selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes;
- }
-
- return jQuery.merge( this, selector );
-
- // HANDLE: $("#id")
- } else {
- elem = document.getElementById( match[2] );
-
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- if ( elem && elem.parentNode ) {
- // Handle the case where IE and Opera return items
- // by name instead of ID
- if ( elem.id !== match[2] ) {
- return rootjQuery.find( selector );
- }
-
- // Otherwise, we inject the element directly into the jQuery object
- this.length = 1;
- this[0] = elem;
- }
-
- this.context = document;
- this.selector = selector;
- return this;
- }
-
- // HANDLE: $(expr, $(...))
- } else if ( !context || context.jquery ) {
- return ( context || rootjQuery ).find( selector );
-
- // HANDLE: $(expr, context)
- // (which is just equivalent to: $(context).find(expr)
- } else {
- return this.constructor( context ).find( selector );
- }
-
- // HANDLE: $(function)
- // Shortcut for document ready
- } else if ( jQuery.isFunction( selector ) ) {
- return rootjQuery.ready( selector );
- }
-
- if ( selector.selector !== undefined ) {
- this.selector = selector.selector;
- this.context = selector.context;
- }
-
- return jQuery.makeArray( selector, this );
- },
-
- // Start with an empty selector
- selector: "",
-
- // The current version of jQuery being used
- jquery: "1.7.2",
-
- // The default length of a jQuery object is 0
- length: 0,
-
- // The number of elements contained in the matched element set
- size: function() {
- return this.length;
- },
-
- toArray: function() {
- return slice.call( this, 0 );
- },
-
- // Get the Nth element in the matched element set OR
- // Get the whole matched element set as a clean array
- get: function( num ) {
- return num == null ?
-
- // Return a 'clean' array
- this.toArray() :
-
- // Return just the object
- ( num < 0 ? this[ this.length + num ] : this[ num ] );
- },
-
- // Take an array of elements and push it onto the stack
- // (returning the new matched element set)
- pushStack: function( elems, name, selector ) {
- // Build a new jQuery matched element set
- var ret = this.constructor();
-
- if ( jQuery.isArray( elems ) ) {
- push.apply( ret, elems );
-
- } else {
- jQuery.merge( ret, elems );
- }
-
- // Add the old object onto the stack (as a reference)
- ret.prevObject = this;
-
- ret.context = this.context;
-
- if ( name === "find" ) {
- ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
- } else if ( name ) {
- ret.selector = this.selector + "." + name + "(" + selector + ")";
- }
-
- // Return the newly-formed element set
- return ret;
- },
-
- // Execute a callback for every element in the matched set.
- // (You can seed the arguments with an array of args, but this is
- // only used internally.)
- each: function( callback, args ) {
- return jQuery.each( this, callback, args );
- },
-
- ready: function( fn ) {
- // Attach the listeners
- jQuery.bindReady();
-
- // Add the callback
- readyList.add( fn );
-
- return this;
- },
-
- eq: function( i ) {
- i = +i;
- return i === -1 ?
- this.slice( i ) :
- this.slice( i, i + 1 );
- },
-
- first: function() {
- return this.eq( 0 );
- },
-
- last: function() {
- return this.eq( -1 );
- },
-
- slice: function() {
- return this.pushStack( slice.apply( this, arguments ),
- "slice", slice.call(arguments).join(",") );
- },
-
- map: function( callback ) {
- return this.pushStack( jQuery.map(this, function( elem, i ) {
- return callback.call( elem, i, elem );
- }));
- },
-
- end: function() {
- return this.prevObject || this.constructor(null);
- },
-
- // For internal use only.
- // Behaves like an Array's method, not like a jQuery method.
- push: push,
- sort: [].sort,
- splice: [].splice
-};
-
-// Give the init function the jQuery prototype for later instantiation
-jQuery.fn.init.prototype = jQuery.fn;
-
-jQuery.extend = jQuery.fn.extend = function() {
- var options, name, src, copy, copyIsArray, clone,
- target = arguments[0] || {},
- i = 1,
- length = arguments.length,
- deep = false;
-
- // Handle a deep copy situation
- if ( typeof target === "boolean" ) {
- deep = target;
- target = arguments[1] || {};
- // skip the boolean and the target
- i = 2;
- }
-
- // Handle case when target is a string or something (possible in deep copy)
- if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
- target = {};
- }
-
- // extend jQuery itself if only one argument is passed
- if ( length === i ) {
- target = this;
- --i;
- }
-
- for ( ; i < length; i++ ) {
- // Only deal with non-null/undefined values
- if ( (options = arguments[ i ]) != null ) {
- // Extend the base object
- for ( name in options ) {
- src = target[ name ];
- copy = options[ name ];
-
- // Prevent never-ending loop
- if ( target === copy ) {
- continue;
- }
-
- // Recurse if we're merging plain objects or arrays
- if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
- if ( copyIsArray ) {
- copyIsArray = false;
- clone = src && jQuery.isArray(src) ? src : [];
-
- } else {
- clone = src && jQuery.isPlainObject(src) ? src : {};
- }
-
- // Never move original objects, clone them
- target[ name ] = jQuery.extend( deep, clone, copy );
-
- // Don't bring in undefined values
- } else if ( copy !== undefined ) {
- target[ name ] = copy;
- }
- }
- }
- }
-
- // Return the modified object
- return target;
-};
-
-jQuery.extend({
- noConflict: function( deep ) {
- if ( window.$ === jQuery ) {
- window.$ = _$;
- }
-
- if ( deep && window.jQuery === jQuery ) {
- window.jQuery = _jQuery;
- }
-
- return jQuery;
- },
-
- // Is the DOM ready to be used? Set to true once it occurs.
- isReady: false,
-
- // A counter to track how many items to wait for before
- // the ready event fires. See #6781
- readyWait: 1,
-
- // Hold (or release) the ready event
- holdReady: function( hold ) {
- if ( hold ) {
- jQuery.readyWait++;
- } else {
- jQuery.ready( true );
- }
- },
-
- // Handle when the DOM is ready
- ready: function( wait ) {
- // Either a released hold or an DOMready/load event and not yet ready
- if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {
- // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
- if ( !document.body ) {
- return setTimeout( jQuery.ready, 1 );
- }
-
- // Remember that the DOM is ready
- jQuery.isReady = true;
-
- // If a normal DOM Ready event fired, decrement, and wait if need be
- if ( wait !== true && --jQuery.readyWait > 0 ) {
- return;
- }
-
- // If there are functions bound, to execute
- readyList.fireWith( document, [ jQuery ] );
-
- // Trigger any bound ready events
- if ( jQuery.fn.trigger ) {
- jQuery( document ).trigger( "ready" ).off( "ready" );
- }
- }
- },
-
- bindReady: function() {
- if ( readyList ) {
- return;
- }
-
- readyList = jQuery.Callbacks( "once memory" );
-
- // Catch cases where $(document).ready() is called after the
- // browser event has already occurred.
- if ( document.readyState === "complete" ) {
- // Handle it asynchronously to allow scripts the opportunity to delay ready
- return setTimeout( jQuery.ready, 1 );
- }
-
- // Mozilla, Opera and webkit nightlies currently support this event
- if ( document.addEventListener ) {
- // Use the handy event callback
- document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
-
- // A fallback to window.onload, that will always work
- window.addEventListener( "load", jQuery.ready, false );
-
- // If IE event model is used
- } else if ( document.attachEvent ) {
- // ensure firing before onload,
- // maybe late but safe also for iframes
- document.attachEvent( "onreadystatechange", DOMContentLoaded );
-
- // A fallback to window.onload, that will always work
- window.attachEvent( "onload", jQuery.ready );
-
- // If IE and not a frame
- // continually check to see if the document is ready
- var toplevel = false;
-
- try {
- toplevel = window.frameElement == null;
- } catch(e) {}
-
- if ( document.documentElement.doScroll && toplevel ) {
- doScrollCheck();
- }
- }
- },
-
- // See test/unit/core.js for details concerning isFunction.
- // Since version 1.3, DOM methods and functions like alert
- // aren't supported. They return false on IE (#2968).
- isFunction: function( obj ) {
- return jQuery.type(obj) === "function";
- },
-
- isArray: Array.isArray || function( obj ) {
- return jQuery.type(obj) === "array";
- },
-
- isWindow: function( obj ) {
- return obj != null && obj == obj.window;
- },
-
- isNumeric: function( obj ) {
- return !isNaN( parseFloat(obj) ) && isFinite( obj );
- },
-
- type: function( obj ) {
- return obj == null ?
- String( obj ) :
- class2type[ toString.call(obj) ] || "object";
- },
-
- isPlainObject: function( obj ) {
- // Must be an Object.
- // Because of IE, we also have to check the presence of the constructor property.
- // Make sure that DOM nodes and window objects don't pass through, as well
- if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
- return false;
- }
-
- try {
- // Not own constructor property must be Object
- if ( obj.constructor &&
- !hasOwn.call(obj, "constructor") &&
- !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
- return false;
- }
- } catch ( e ) {
- // IE8,9 Will throw exceptions on certain host objects #9897
- return false;
- }
-
- // Own properties are enumerated firstly, so to speed up,
- // if last one is own, then all properties are own.
-
- var key;
- for ( key in obj ) {}
-
- return key === undefined || hasOwn.call( obj, key );
- },
-
- isEmptyObject: function( obj ) {
- for ( var name in obj ) {
- return false;
- }
- return true;
- },
-
- error: function( msg ) {
- throw new Error( msg );
- },
-
- parseJSON: function( data ) {
- if ( typeof data !== "string" || !data ) {
- return null;
- }
-
- // Make sure leading/trailing whitespace is removed (IE can't handle it)
- data = jQuery.trim( data );
-
- // Attempt to parse using the native JSON parser first
- if ( window.JSON && window.JSON.parse ) {
- return window.JSON.parse( data );
- }
-
- // Make sure the incoming data is actual JSON
- // Logic borrowed from http://json.org/json2.js
- if ( rvalidchars.test( data.replace( rvalidescape, "@" )
- .replace( rvalidtokens, "]" )
- .replace( rvalidbraces, "")) ) {
-
- return ( new Function( "return " + data ) )();
-
- }
- jQuery.error( "Invalid JSON: " + data );
- },
-
- // Cross-browser xml parsing
- parseXML: function( data ) {
- if ( typeof data !== "string" || !data ) {
- return null;
- }
- var xml, tmp;
- try {
- if ( window.DOMParser ) { // Standard
- tmp = new DOMParser();
- xml = tmp.parseFromString( data , "text/xml" );
- } else { // IE
- xml = new ActiveXObject( "Microsoft.XMLDOM" );
- xml.async = "false";
- xml.loadXML( data );
- }
- } catch( e ) {
- xml = undefined;
- }
- if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
- jQuery.error( "Invalid XML: " + data );
- }
- return xml;
- },
-
- noop: function() {},
-
- // Evaluates a script in a global context
- // Workarounds based on findings by Jim Driscoll
- // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
- globalEval: function( data ) {
- if ( data && rnotwhite.test( data ) ) {
- // We use execScript on Internet Explorer
- // We use an anonymous function so that context is window
- // rather than jQuery in Firefox
- ( window.execScript || function( data ) {
- window[ "eval" ].call( window, data );
- } )( data );
- }
- },
-
- // Convert dashed to camelCase; used by the css and data modules
- // Microsoft forgot to hump their vendor prefix (#9572)
- camelCase: function( string ) {
- return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
- },
-
- nodeName: function( elem, name ) {
- return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
- },
-
- // args is for internal usage only
- each: function( object, callback, args ) {
- var name, i = 0,
- length = object.length,
- isObj = length === undefined || jQuery.isFunction( object );
-
- if ( args ) {
- if ( isObj ) {
- for ( name in object ) {
- if ( callback.apply( object[ name ], args ) === false ) {
- break;
- }
- }
- } else {
- for ( ; i < length; ) {
- if ( callback.apply( object[ i++ ], args ) === false ) {
- break;
- }
- }
- }
-
- // A special, fast, case for the most common use of each
- } else {
- if ( isObj ) {
- for ( name in object ) {
- if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
- break;
- }
- }
- } else {
- for ( ; i < length; ) {
- if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
- break;
- }
- }
- }
- }
-
- return object;
- },
-
- // Use native String.trim function wherever possible
- trim: trim ?
- function( text ) {
- return text == null ?
- "" :
- trim.call( text );
- } :
-
- // Otherwise use our own trimming functionality
- function( text ) {
- return text == null ?
- "" :
- text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
- },
-
- // results is for internal usage only
- makeArray: function( array, results ) {
- var ret = results || [];
-
- if ( array != null ) {
- // The window, strings (and functions) also have 'length'
- // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
- var type = jQuery.type( array );
-
- if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
- push.call( ret, array );
- } else {
- jQuery.merge( ret, array );
- }
- }
-
- return ret;
- },
-
- inArray: function( elem, array, i ) {
- var len;
-
- if ( array ) {
- if ( indexOf ) {
- return indexOf.call( array, elem, i );
- }
-
- len = array.length;
- i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
-
- for ( ; i < len; i++ ) {
- // Skip accessing in sparse arrays
- if ( i in array && array[ i ] === elem ) {
- return i;
- }
- }
- }
-
- return -1;
- },
-
- merge: function( first, second ) {
- var i = first.length,
- j = 0;
-
- if ( typeof second.length === "number" ) {
- for ( var l = second.length; j < l; j++ ) {
- first[ i++ ] = second[ j ];
- }
-
- } else {
- while ( second[j] !== undefined ) {
- first[ i++ ] = second[ j++ ];
- }
- }
-
- first.length = i;
-
- return first;
- },
-
- grep: function( elems, callback, inv ) {
- var ret = [], retVal;
- inv = !!inv;
-
- // Go through the array, only saving the items
- // that pass the validator function
- for ( var i = 0, length = elems.length; i < length; i++ ) {
- retVal = !!callback( elems[ i ], i );
- if ( inv !== retVal ) {
- ret.push( elems[ i ] );
- }
- }
-
- return ret;
- },
-
- // arg is for internal usage only
- map: function( elems, callback, arg ) {
- var value, key, ret = [],
- i = 0,
- length = elems.length,
- // jquery objects are treated as arrays
- isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
-
- // Go through the array, translating each of the items to their
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
-
- // Go through every key on the object,
- } else {
- for ( key in elems ) {
- value = callback( elems[ key ], key, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
- }
-
- // Flatten any nested arrays
- return ret.concat.apply( [], ret );
- },
-
- // A global GUID counter for objects
- guid: 1,
-
- // Bind a function to a context, optionally partially applying any
- // arguments.
- proxy: function( fn, context ) {
- if ( typeof context === "string" ) {
- var tmp = fn[ context ];
- context = fn;
- fn = tmp;
- }
-
- // Quick check to determine if target is callable, in the spec
- // this throws a TypeError, but we will just return undefined.
- if ( !jQuery.isFunction( fn ) ) {
- return undefined;
- }
-
- // Simulated bind
- var args = slice.call( arguments, 2 ),
- proxy = function() {
- return fn.apply( context, args.concat( slice.call( arguments ) ) );
- };
-
- // Set the guid of unique handler to the same of original handler, so it can be removed
- proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
-
- return proxy;
- },
-
- // Mutifunctional method to get and set values to a collection
- // The value/s can optionally be executed if it's a function
- access: function( elems, fn, key, value, chainable, emptyGet, pass ) {
- var exec,
- bulk = key == null,
- i = 0,
- length = elems.length;
-
- // Sets many values
- if ( key && typeof key === "object" ) {
- for ( i in key ) {
- jQuery.access( elems, fn, i, key[i], 1, emptyGet, value );
- }
- chainable = 1;
-
- // Sets one value
- } else if ( value !== undefined ) {
- // Optionally, function values get executed if exec is true
- exec = pass === undefined && jQuery.isFunction( value );
-
- if ( bulk ) {
- // Bulk operations only iterate when executing function values
- if ( exec ) {
- exec = fn;
- fn = function( elem, key, value ) {
- return exec.call( jQuery( elem ), value );
- };
-
- // Otherwise they run against the entire set
- } else {
- fn.call( elems, value );
- fn = null;
- }
- }
-
- if ( fn ) {
- for (; i < length; i++ ) {
- fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
- }
- }
-
- chainable = 1;
- }
-
- return chainable ?
- elems :
-
- // Gets
- bulk ?
- fn.call( elems ) :
- length ? fn( elems[0], key ) : emptyGet;
- },
-
- now: function() {
- return ( new Date() ).getTime();
- },
-
- // Use of jQuery.browser is frowned upon.
- // More details: http://docs.jquery.com/Utilities/jQuery.browser
- uaMatch: function( ua ) {
- ua = ua.toLowerCase();
-
- var match = rwebkit.exec( ua ) ||
- ropera.exec( ua ) ||
- rmsie.exec( ua ) ||
- ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
- [];
-
- return { browser: match[1] || "", version: match[2] || "0" };
- },
-
- sub: function() {
- function jQuerySub( selector, context ) {
- return new jQuerySub.fn.init( selector, context );
- }
- jQuery.extend( true, jQuerySub, this );
- jQuerySub.superclass = this;
- jQuerySub.fn = jQuerySub.prototype = this();
- jQuerySub.fn.constructor = jQuerySub;
- jQuerySub.sub = this.sub;
- jQuerySub.fn.init = function init( selector, context ) {
- if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
- context = jQuerySub( context );
- }
-
- return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
- };
- jQuerySub.fn.init.prototype = jQuerySub.fn;
- var rootjQuerySub = jQuerySub(document);
- return jQuerySub;
- },
-
- browser: {}
-});
-
-// Populate the class2type map
-jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
- class2type[ "[object " + name + "]" ] = name.toLowerCase();
-});
-
-browserMatch = jQuery.uaMatch( userAgent );
-if ( browserMatch.browser ) {
- jQuery.browser[ browserMatch.browser ] = true;
- jQuery.browser.version = browserMatch.version;
-}
-
-// Deprecated, use jQuery.browser.webkit instead
-if ( jQuery.browser.webkit ) {
- jQuery.browser.safari = true;
-}
-
-// IE doesn't match non-breaking spaces with \s
-if ( rnotwhite.test( "\xA0" ) ) {
- trimLeft = /^[\s\xA0]+/;
- trimRight = /[\s\xA0]+$/;
-}
-
-// All jQuery objects should point back to these
-rootjQuery = jQuery(document);
-
-// Cleanup functions for the document ready method
-if ( document.addEventListener ) {
- DOMContentLoaded = function() {
- document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
- jQuery.ready();
- };
-
-} else if ( document.attachEvent ) {
- DOMContentLoaded = function() {
- // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
- if ( document.readyState === "complete" ) {
- document.detachEvent( "onreadystatechange", DOMContentLoaded );
- jQuery.ready();
- }
- };
-}
-
-// The DOM ready check for Internet Explorer
-function doScrollCheck() {
- if ( jQuery.isReady ) {
- return;
- }
-
- try {
- // If IE is used, use the trick by Diego Perini
- // http://javascript.nwbox.com/IEContentLoaded/
- document.documentElement.doScroll("left");
- } catch(e) {
- setTimeout( doScrollCheck, 1 );
- return;
- }
-
- // and execute any waiting functions
- jQuery.ready();
-}
-
-return jQuery;
-
-})();
-
-
-// String to Object flags format cache
-var flagsCache = {};
-
-// Convert String-formatted flags into Object-formatted ones and store in cache
-function createFlags( flags ) {
- var object = flagsCache[ flags ] = {},
- i, length;
- flags = flags.split( /\s+/ );
- for ( i = 0, length = flags.length; i < length; i++ ) {
- object[ flags[i] ] = true;
- }
- return object;
-}
-
-/*
- * Create a callback list using the following parameters:
- *
- * flags: an optional list of space-separated flags that will change how
- * the callback list behaves
- *
- * By default a callback list will act like an event callback list and can be
- * "fired" multiple times.
- *
- * Possible flags:
- *
- * once: will ensure the callback list can only be fired once (like a Deferred)
- *
- * memory: will keep track of previous values and will call any callback added
- * after the list has been fired right away with the latest "memorized"
- * values (like a Deferred)
- *
- * unique: will ensure a callback can only be added once (no duplicate in the list)
- *
- * stopOnFalse: interrupt callings when a callback returns false
- *
- */
-jQuery.Callbacks = function( flags ) {
-
- // Convert flags from String-formatted to Object-formatted
- // (we check in cache first)
- flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {};
-
- var // Actual callback list
- list = [],
- // Stack of fire calls for repeatable lists
- stack = [],
- // Last fire value (for non-forgettable lists)
- memory,
- // Flag to know if list was already fired
- fired,
- // Flag to know if list is currently firing
- firing,
- // First callback to fire (used internally by add and fireWith)
- firingStart,
- // End of the loop when firing
- firingLength,
- // Index of currently firing callback (modified by remove if needed)
- firingIndex,
- // Add one or several callbacks to the list
- add = function( args ) {
- var i,
- length,
- elem,
- type,
- actual;
- for ( i = 0, length = args.length; i < length; i++ ) {
- elem = args[ i ];
- type = jQuery.type( elem );
- if ( type === "array" ) {
- // Inspect recursively
- add( elem );
- } else if ( type === "function" ) {
- // Add if not in unique mode and callback is not in
- if ( !flags.unique || !self.has( elem ) ) {
- list.push( elem );
- }
- }
- }
- },
- // Fire callbacks
- fire = function( context, args ) {
- args = args || [];
- memory = !flags.memory || [ context, args ];
- fired = true;
- firing = true;
- firingIndex = firingStart || 0;
- firingStart = 0;
- firingLength = list.length;
- for ( ; list && firingIndex < firingLength; firingIndex++ ) {
- if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) {
- memory = true; // Mark as halted
- break;
- }
- }
- firing = false;
- if ( list ) {
- if ( !flags.once ) {
- if ( stack && stack.length ) {
- memory = stack.shift();
- self.fireWith( memory[ 0 ], memory[ 1 ] );
- }
- } else if ( memory === true ) {
- self.disable();
- } else {
- list = [];
- }
- }
- },
- // Actual Callbacks object
- self = {
- // Add a callback or a collection of callbacks to the list
- add: function() {
- if ( list ) {
- var length = list.length;
- add( arguments );
- // Do we need to add the callbacks to the
- // current firing batch?
- if ( firing ) {
- firingLength = list.length;
- // With memory, if we're not firing then
- // we should call right away, unless previous
- // firing was halted (stopOnFalse)
- } else if ( memory && memory !== true ) {
- firingStart = length;
- fire( memory[ 0 ], memory[ 1 ] );
- }
- }
- return this;
- },
- // Remove a callback from the list
- remove: function() {
- if ( list ) {
- var args = arguments,
- argIndex = 0,
- argLength = args.length;
- for ( ; argIndex < argLength ; argIndex++ ) {
- for ( var i = 0; i < list.length; i++ ) {
- if ( args[ argIndex ] === list[ i ] ) {
- // Handle firingIndex and firingLength
- if ( firing ) {
- if ( i <= firingLength ) {
- firingLength--;
- if ( i <= firingIndex ) {
- firingIndex--;
- }
- }
- }
- // Remove the element
- list.splice( i--, 1 );
- // If we have some unicity property then
- // we only need to do this once
- if ( flags.unique ) {
- break;
- }
- }
- }
- }
- }
- return this;
- },
- // Control if a given callback is in the list
- has: function( fn ) {
- if ( list ) {
- var i = 0,
- length = list.length;
- for ( ; i < length; i++ ) {
- if ( fn === list[ i ] ) {
- return true;
- }
- }
- }
- return false;
- },
- // Remove all callbacks from the list
- empty: function() {
- list = [];
- return this;
- },
- // Have the list do nothing anymore
- disable: function() {
- list = stack = memory = undefined;
- return this;
- },
- // Is it disabled?
- disabled: function() {
- return !list;
- },
- // Lock the list in its current state
- lock: function() {
- stack = undefined;
- if ( !memory || memory === true ) {
- self.disable();
- }
- return this;
- },
- // Is it locked?
- locked: function() {
- return !stack;
- },
- // Call all callbacks with the given context and arguments
- fireWith: function( context, args ) {
- if ( stack ) {
- if ( firing ) {
- if ( !flags.once ) {
- stack.push( [ context, args ] );
- }
- } else if ( !( flags.once && memory ) ) {
- fire( context, args );
- }
- }
- return this;
- },
- // Call all the callbacks with the given arguments
- fire: function() {
- self.fireWith( this, arguments );
- return this;
- },
- // To know if the callbacks have already been called at least once
- fired: function() {
- return !!fired;
- }
- };
-
- return self;
-};
-
-
-
-
-var // Static reference to slice
- sliceDeferred = [].slice;
-
-jQuery.extend({
-
- Deferred: function( func ) {
- var doneList = jQuery.Callbacks( "once memory" ),
- failList = jQuery.Callbacks( "once memory" ),
- progressList = jQuery.Callbacks( "memory" ),
- state = "pending",
- lists = {
- resolve: doneList,
- reject: failList,
- notify: progressList
- },
- promise = {
- done: doneList.add,
- fail: failList.add,
- progress: progressList.add,
-
- state: function() {
- return state;
- },
-
- // Deprecated
- isResolved: doneList.fired,
- isRejected: failList.fired,
-
- then: function( doneCallbacks, failCallbacks, progressCallbacks ) {
- deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks );
- return this;
- },
- always: function() {
- deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments );
- return this;
- },
- pipe: function( fnDone, fnFail, fnProgress ) {
- return jQuery.Deferred(function( newDefer ) {
- jQuery.each( {
- done: [ fnDone, "resolve" ],
- fail: [ fnFail, "reject" ],
- progress: [ fnProgress, "notify" ]
- }, function( handler, data ) {
- var fn = data[ 0 ],
- action = data[ 1 ],
- returned;
- if ( jQuery.isFunction( fn ) ) {
- deferred[ handler ](function() {
- returned = fn.apply( this, arguments );
- if ( returned && jQuery.isFunction( returned.promise ) ) {
- returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify );
- } else {
- newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
- }
- });
- } else {
- deferred[ handler ]( newDefer[ action ] );
- }
- });
- }).promise();
- },
- // Get a promise for this deferred
- // If obj is provided, the promise aspect is added to the object
- promise: function( obj ) {
- if ( obj == null ) {
- obj = promise;
- } else {
- for ( var key in promise ) {
- obj[ key ] = promise[ key ];
- }
- }
- return obj;
- }
- },
- deferred = promise.promise({}),
- key;
-
- for ( key in lists ) {
- deferred[ key ] = lists[ key ].fire;
- deferred[ key + "With" ] = lists[ key ].fireWith;
- }
-
- // Handle state
- deferred.done( function() {
- state = "resolved";
- }, failList.disable, progressList.lock ).fail( function() {
- state = "rejected";
- }, doneList.disable, progressList.lock );
-
- // Call given func if any
- if ( func ) {
- func.call( deferred, deferred );
- }
-
- // All done!
- return deferred;
- },
-
- // Deferred helper
- when: function( firstParam ) {
- var args = sliceDeferred.call( arguments, 0 ),
- i = 0,
- length = args.length,
- pValues = new Array( length ),
- count = length,
- pCount = length,
- deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ?
- firstParam :
- jQuery.Deferred(),
- promise = deferred.promise();
- function resolveFunc( i ) {
- return function( value ) {
- args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
- if ( !( --count ) ) {
- deferred.resolveWith( deferred, args );
- }
- };
- }
- function progressFunc( i ) {
- return function( value ) {
- pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
- deferred.notifyWith( promise, pValues );
- };
- }
- if ( length > 1 ) {
- for ( ; i < length; i++ ) {
- if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) {
- args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) );
- } else {
- --count;
- }
- }
- if ( !count ) {
- deferred.resolveWith( deferred, args );
- }
- } else if ( deferred !== firstParam ) {
- deferred.resolveWith( deferred, length ? [ firstParam ] : [] );
- }
- return promise;
- }
-});
-
-
-
-
-jQuery.support = (function() {
-
- var support,
- all,
- a,
- select,
- opt,
- input,
- fragment,
- tds,
- events,
- eventName,
- i,
- isSupported,
- div = document.createElement( "div" ),
- documentElement = document.documentElement;
-
- // Preliminary tests
- div.setAttribute("className", "t");
- div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
-
- all = div.getElementsByTagName( "*" );
- a = div.getElementsByTagName( "a" )[ 0 ];
-
- // Can't get basic test support
- if ( !all || !all.length || !a ) {
- return {};
- }
-
- // First batch of supports tests
- select = document.createElement( "select" );
- opt = select.appendChild( document.createElement("option") );
- input = div.getElementsByTagName( "input" )[ 0 ];
-
- support = {
- // IE strips leading whitespace when .innerHTML is used
- leadingWhitespace: ( div.firstChild.nodeType === 3 ),
-
- // Make sure that tbody elements aren't automatically inserted
- // IE will insert them into empty tables
- tbody: !div.getElementsByTagName("tbody").length,
-
- // Make sure that link elements get serialized correctly by innerHTML
- // This requires a wrapper element in IE
- htmlSerialize: !!div.getElementsByTagName("link").length,
-
- // Get the style information from getAttribute
- // (IE uses .cssText instead)
- style: /top/.test( a.getAttribute("style") ),
-
- // Make sure that URLs aren't manipulated
- // (IE normalizes it by default)
- hrefNormalized: ( a.getAttribute("href") === "/a" ),
-
- // Make sure that element opacity exists
- // (IE uses filter instead)
- // Use a regex to work around a WebKit issue. See #5145
- opacity: /^0.55/.test( a.style.opacity ),
-
- // Verify style float existence
- // (IE uses styleFloat instead of cssFloat)
- cssFloat: !!a.style.cssFloat,
-
- // Make sure that if no value is specified for a checkbox
- // that it defaults to "on".
- // (WebKit defaults to "" instead)
- checkOn: ( input.value === "on" ),
-
- // Make sure that a selected-by-default option has a working selected property.
- // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
- optSelected: opt.selected,
-
- // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
- getSetAttribute: div.className !== "t",
-
- // Tests for enctype support on a form(#6743)
- enctype: !!document.createElement("form").enctype,
-
- // Makes sure cloning an html5 element does not cause problems
- // Where outerHTML is undefined, this still works
- html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",
-
- // Will be defined later
- submitBubbles: true,
- changeBubbles: true,
- focusinBubbles: false,
- deleteExpando: true,
- noCloneEvent: true,
- inlineBlockNeedsLayout: false,
- shrinkWrapBlocks: false,
- reliableMarginRight: true,
- pixelMargin: true
- };
-
- // jQuery.boxModel DEPRECATED in 1.3, use jQuery.support.boxModel instead
- jQuery.boxModel = support.boxModel = (document.compatMode === "CSS1Compat");
-
- // Make sure checked status is properly cloned
- input.checked = true;
- support.noCloneChecked = input.cloneNode( true ).checked;
-
- // Make sure that the options inside disabled selects aren't marked as disabled
- // (WebKit marks them as disabled)
- select.disabled = true;
- support.optDisabled = !opt.disabled;
-
- // Test to see if it's possible to delete an expando from an element
- // Fails in Internet Explorer
- try {
- delete div.test;
- } catch( e ) {
- support.deleteExpando = false;
- }
-
- if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
- div.attachEvent( "onclick", function() {
- // Cloning a node shouldn't copy over any
- // bound event handlers (IE does this)
- support.noCloneEvent = false;
- });
- div.cloneNode( true ).fireEvent( "onclick" );
- }
-
- // Check if a radio maintains its value
- // after being appended to the DOM
- input = document.createElement("input");
- input.value = "t";
- input.setAttribute("type", "radio");
- support.radioValue = input.value === "t";
-
- input.setAttribute("checked", "checked");
-
- // #11217 - WebKit loses check when the name is after the checked attribute
- input.setAttribute( "name", "t" );
-
- div.appendChild( input );
- fragment = document.createDocumentFragment();
- fragment.appendChild( div.lastChild );
-
- // WebKit doesn't clone checked state correctly in fragments
- support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
-
- // Check if a disconnected checkbox will retain its checked
- // value of true after appended to the DOM (IE6/7)
- support.appendChecked = input.checked;
-
- fragment.removeChild( input );
- fragment.appendChild( div );
-
- // Technique from Juriy Zaytsev
- // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
- // We only care about the case where non-standard event systems
- // are used, namely in IE. Short-circuiting here helps us to
- // avoid an eval call (in setAttribute) which can cause CSP
- // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
- if ( div.attachEvent ) {
- for ( i in {
- submit: 1,
- change: 1,
- focusin: 1
- }) {
- eventName = "on" + i;
- isSupported = ( eventName in div );
- if ( !isSupported ) {
- div.setAttribute( eventName, "return;" );
- isSupported = ( typeof div[ eventName ] === "function" );
- }
- support[ i + "Bubbles" ] = isSupported;
- }
- }
-
- fragment.removeChild( div );
-
- // Null elements to avoid leaks in IE
- fragment = select = opt = div = input = null;
-
- // Run tests that need a body at doc ready
- jQuery(function() {
- var container, outer, inner, table, td, offsetSupport,
- marginDiv, conMarginTop, style, html, positionTopLeftWidthHeight,
- paddingMarginBorderVisibility, paddingMarginBorder,
- body = document.getElementsByTagName("body")[0];
-
- if ( !body ) {
- // Return for frameset docs that don't have a body
- return;
- }
-
- conMarginTop = 1;
- paddingMarginBorder = "padding:0;margin:0;border:";
- positionTopLeftWidthHeight = "position:absolute;top:0;left:0;width:1px;height:1px;";
- paddingMarginBorderVisibility = paddingMarginBorder + "0;visibility:hidden;";
- style = "style='" + positionTopLeftWidthHeight + paddingMarginBorder + "5px solid #000;";
- html = "<div " + style + "display:block;'><div style='" + paddingMarginBorder + "0;display:block;overflow:hidden;'></div></div>" +
- "<table " + style + "' cellpadding='0' cellspacing='0'>" +
- "<tr><td></td></tr></table>";
-
- container = document.createElement("div");
- container.style.cssText = paddingMarginBorderVisibility + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px";
- body.insertBefore( container, body.firstChild );
-
- // Construct the test element
- div = document.createElement("div");
- container.appendChild( div );
-
- // Check if table cells still have offsetWidth/Height when they are set
- // to display:none and there are still other visible table cells in a
- // table row; if so, offsetWidth/Height are not reliable for use when
- // determining if an element has been hidden directly using
- // display:none (it is still safe to use offsets if a parent element is
- // hidden; don safety goggles and see bug #4512 for more information).
- // (only IE 8 fails this test)
- div.innerHTML = "<table><tr><td style='" + paddingMarginBorder + "0;display:none'></td><td>t</td></tr></table>";
- tds = div.getElementsByTagName( "td" );
- isSupported = ( tds[ 0 ].offsetHeight === 0 );
-
- tds[ 0 ].style.display = "";
- tds[ 1 ].style.display = "none";
-
- // Check if empty table cells still have offsetWidth/Height
- // (IE <= 8 fail this test)
- support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
-
- // Check if div with explicit width and no margin-right incorrectly
- // gets computed margin-right based on width of container. For more
- // info see bug #3333
- // Fails in WebKit before Feb 2011 nightlies
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- if ( window.getComputedStyle ) {
- div.innerHTML = "";
- marginDiv = document.createElement( "div" );
- marginDiv.style.width = "0";
- marginDiv.style.marginRight = "0";
- div.style.width = "2px";
- div.appendChild( marginDiv );
- support.reliableMarginRight =
- ( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
- }
-
- if ( typeof div.style.zoom !== "undefined" ) {
- // Check if natively block-level elements act like inline-block
- // elements when setting their display to 'inline' and giving
- // them layout
- // (IE < 8 does this)
- div.innerHTML = "";
- div.style.width = div.style.padding = "1px";
- div.style.border = 0;
- div.style.overflow = "hidden";
- div.style.display = "inline";
- div.style.zoom = 1;
- support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
-
- // Check if elements with layout shrink-wrap their children
- // (IE 6 does this)
- div.style.display = "block";
- div.style.overflow = "visible";
- div.innerHTML = "<div style='width:5px;'></div>";
- support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
- }
-
- div.style.cssText = positionTopLeftWidthHeight + paddingMarginBorderVisibility;
- div.innerHTML = html;
-
- outer = div.firstChild;
- inner = outer.firstChild;
- td = outer.nextSibling.firstChild.firstChild;
-
- offsetSupport = {
- doesNotAddBorder: ( inner.offsetTop !== 5 ),
- doesAddBorderForTableAndCells: ( td.offsetTop === 5 )
- };
-
- inner.style.position = "fixed";
- inner.style.top = "20px";
-
- // safari subtracts parent border width here which is 5px
- offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 );
- inner.style.position = inner.style.top = "";
-
- outer.style.overflow = "hidden";
- outer.style.position = "relative";
-
- offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 );
- offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop );
-
- if ( window.getComputedStyle ) {
- div.style.marginTop = "1%";
- support.pixelMargin = ( window.getComputedStyle( div, null ) || { marginTop: 0 } ).marginTop !== "1%";
- }
-
- if ( typeof container.style.zoom !== "undefined" ) {
- container.style.zoom = 1;
- }
-
- body.removeChild( container );
- marginDiv = div = container = null;
-
- jQuery.extend( support, offsetSupport );
- });
-
- return support;
-})();
-
-
-
-
-var rbrace = /^(?:\{.*\}|\[.*\])$/,
- rmultiDash = /([A-Z])/g;
-
-jQuery.extend({
- cache: {},
-
- // Please use with caution
- uuid: 0,
-
- // Unique for each copy of jQuery on the page
- // Non-digits removed to match rinlinejQuery
- expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
-
- // The following elements throw uncatchable exceptions if you
- // attempt to add expando properties to them.
- noData: {
- "embed": true,
- // Ban all objects except for Flash (which handle expandos)
- "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
- "applet": true
- },
-
- hasData: function( elem ) {
- elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
- return !!elem && !isEmptyDataObject( elem );
- },
-
- data: function( elem, name, data, pvt /* Internal Use Only */ ) {
- if ( !jQuery.acceptData( elem ) ) {
- return;
- }
-
- var privateCache, thisCache, ret,
- internalKey = jQuery.expando,
- getByName = typeof name === "string",
-
- // We have to handle DOM nodes and JS objects differently because IE6-7
- // can't GC object references properly across the DOM-JS boundary
- isNode = elem.nodeType,
-
- // Only DOM nodes need the global jQuery cache; JS object data is
- // attached directly to the object so GC can occur automatically
- cache = isNode ? jQuery.cache : elem,
-
- // Only defining an ID for JS objects if its cache already exists allows
- // the code to shortcut on the same path as a DOM node with no cache
- id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey,
- isEvents = name === "events";
-
- // Avoid doing any more work than we need to when trying to get data on an
- // object that has no data at all
- if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) {
- return;
- }
-
- if ( !id ) {
- // Only DOM nodes need a new unique ID for each element since their data
- // ends up in the global cache
- if ( isNode ) {
- elem[ internalKey ] = id = ++jQuery.uuid;
- } else {
- id = internalKey;
- }
- }
-
- if ( !cache[ id ] ) {
- cache[ id ] = {};
-
- // Avoids exposing jQuery metadata on plain JS objects when the object
- // is serialized using JSON.stringify
- if ( !isNode ) {
- cache[ id ].toJSON = jQuery.noop;
- }
- }
-
- // An object can be passed to jQuery.data instead of a key/value pair; this gets
- // shallow copied over onto the existing cache
- if ( typeof name === "object" || typeof name === "function" ) {
- if ( pvt ) {
- cache[ id ] = jQuery.extend( cache[ id ], name );
- } else {
- cache[ id ].data = jQuery.extend( cache[ id ].data, name );
- }
- }
-
- privateCache = thisCache = cache[ id ];
-
- // jQuery data() is stored in a separate object inside the object's internal data
- // cache in order to avoid key collisions between internal data and user-defined
- // data.
- if ( !pvt ) {
- if ( !thisCache.data ) {
- thisCache.data = {};
- }
-
- thisCache = thisCache.data;
- }
-
- if ( data !== undefined ) {
- thisCache[ jQuery.camelCase( name ) ] = data;
- }
-
- // Users should not attempt to inspect the internal events object using jQuery.data,
- // it is undocumented and subject to change. But does anyone listen? No.
- if ( isEvents && !thisCache[ name ] ) {
- return privateCache.events;
- }
-
- // Check for both converted-to-camel and non-converted data property names
- // If a data property was specified
- if ( getByName ) {
-
- // First Try to find as-is property data
- ret = thisCache[ name ];
-
- // Test for null|undefined property data
- if ( ret == null ) {
-
- // Try to find the camelCased property
- ret = thisCache[ jQuery.camelCase( name ) ];
- }
- } else {
- ret = thisCache;
- }
-
- return ret;
- },
-
- removeData: function( elem, name, pvt /* Internal Use Only */ ) {
- if ( !jQuery.acceptData( elem ) ) {
- return;
- }
-
- var thisCache, i, l,
-
- // Reference to internal data cache key
- internalKey = jQuery.expando,
-
- isNode = elem.nodeType,
-
- // See jQuery.data for more information
- cache = isNode ? jQuery.cache : elem,
-
- // See jQuery.data for more information
- id = isNode ? elem[ internalKey ] : internalKey;
-
- // If there is already no cache entry for this object, there is no
- // purpose in continuing
- if ( !cache[ id ] ) {
- return;
- }
-
- if ( name ) {
-
- thisCache = pvt ? cache[ id ] : cache[ id ].data;
-
- if ( thisCache ) {
-
- // Support array or space separated string names for data keys
- if ( !jQuery.isArray( name ) ) {
-
- // try the string as a key before any manipulation
- if ( name in thisCache ) {
- name = [ name ];
- } else {
-
- // split the camel cased version by spaces unless a key with the spaces exists
- name = jQuery.camelCase( name );
- if ( name in thisCache ) {
- name = [ name ];
- } else {
- name = name.split( " " );
- }
- }
- }
-
- for ( i = 0, l = name.length; i < l; i++ ) {
- delete thisCache[ name[i] ];
- }
-
- // If there is no data left in the cache, we want to continue
- // and let the cache object itself get destroyed
- if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
- return;
- }
- }
- }
-
- // See jQuery.data for more information
- if ( !pvt ) {
- delete cache[ id ].data;
-
- // Don't destroy the parent cache unless the internal data object
- // had been the only thing left in it
- if ( !isEmptyDataObject(cache[ id ]) ) {
- return;
- }
- }
-
- // Browsers that fail expando deletion also refuse to delete expandos on
- // the window, but it will allow it on all other JS objects; other browsers
- // don't care
- // Ensure that `cache` is not a window object #10080
- if ( jQuery.support.deleteExpando || !cache.setInterval ) {
- delete cache[ id ];
- } else {
- cache[ id ] = null;
- }
-
- // We destroyed the cache and need to eliminate the expando on the node to avoid
- // false lookups in the cache for entries that no longer exist
- if ( isNode ) {
- // IE does not allow us to delete expando properties from nodes,
- // nor does it have a removeAttribute function on Document nodes;
- // we must handle all of these cases
- if ( jQuery.support.deleteExpando ) {
- delete elem[ internalKey ];
- } else if ( elem.removeAttribute ) {
- elem.removeAttribute( internalKey );
- } else {
- elem[ internalKey ] = null;
- }
- }
- },
-
- // For internal use only.
- _data: function( elem, name, data ) {
- return jQuery.data( elem, name, data, true );
- },
-
- // A method for determining if a DOM node can handle the data expando
- acceptData: function( elem ) {
- if ( elem.nodeName ) {
- var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
-
- if ( match ) {
- return !(match === true || elem.getAttribute("classid") !== match);
- }
- }
-
- return true;
- }
-});
-
-jQuery.fn.extend({
- data: function( key, value ) {
- var parts, part, attr, name, l,
- elem = this[0],
- i = 0,
- data = null;
-
- // Gets all values
- if ( key === undefined ) {
- if ( this.length ) {
- data = jQuery.data( elem );
-
- if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
- attr = elem.attributes;
- for ( l = attr.length; i < l; i++ ) {
- name = attr[i].name;
-
- if ( name.indexOf( "data-" ) === 0 ) {
- name = jQuery.camelCase( name.substring(5) );
-
- dataAttr( elem, name, data[ name ] );
- }
- }
- jQuery._data( elem, "parsedAttrs", true );
- }
- }
-
- return data;
- }
-
- // Sets multiple values
- if ( typeof key === "object" ) {
- return this.each(function() {
- jQuery.data( this, key );
- });
- }
-
- parts = key.split( ".", 2 );
- parts[1] = parts[1] ? "." + parts[1] : "";
- part = parts[1] + "!";
-
- return jQuery.access( this, function( value ) {
-
- if ( value === undefined ) {
- data = this.triggerHandler( "getData" + part, [ parts[0] ] );
-
- // Try to fetch any internally stored data first
- if ( data === undefined && elem ) {
- data = jQuery.data( elem, key );
- data = dataAttr( elem, key, data );
- }
-
- return data === undefined && parts[1] ?
- this.data( parts[0] ) :
- data;
- }
-
- parts[1] = value;
- this.each(function() {
- var self = jQuery( this );
-
- self.triggerHandler( "setData" + part, parts );
- jQuery.data( this, key, value );
- self.triggerHandler( "changeData" + part, parts );
- });
- }, null, value, arguments.length > 1, null, false );
- },
-
- removeData: function( key ) {
- return this.each(function() {
- jQuery.removeData( this, key );
- });
- }
-});
-
-function dataAttr( elem, key, data ) {
- // If nothing was found internally, try to fetch any
- // data from the HTML5 data-* attribute
- if ( data === undefined && elem.nodeType === 1 ) {
-
- var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
-
- data = elem.getAttribute( name );
-
- if ( typeof data === "string" ) {
- try {
- data = data === "true" ? true :
- data === "false" ? false :
- data === "null" ? null :
- jQuery.isNumeric( data ) ? +data :
- rbrace.test( data ) ? jQuery.parseJSON( data ) :
- data;
- } catch( e ) {}
-
- // Make sure we set the data so it isn't changed later
- jQuery.data( elem, key, data );
-
- } else {
- data = undefined;
- }
- }
-
- return data;
-}
-
-// checks a cache object for emptiness
-function isEmptyDataObject( obj ) {
- for ( var name in obj ) {
-
- // if the public data object is empty, the private is still empty
- if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
- continue;
- }
- if ( name !== "toJSON" ) {
- return false;
- }
- }
-
- return true;
-}
-
-
-
-
-function handleQueueMarkDefer( elem, type, src ) {
- var deferDataKey = type + "defer",
- queueDataKey = type + "queue",
- markDataKey = type + "mark",
- defer = jQuery._data( elem, deferDataKey );
- if ( defer &&
- ( src === "queue" || !jQuery._data(elem, queueDataKey) ) &&
- ( src === "mark" || !jQuery._data(elem, markDataKey) ) ) {
- // Give room for hard-coded callbacks to fire first
- // and eventually mark/queue something else on the element
- setTimeout( function() {
- if ( !jQuery._data( elem, queueDataKey ) &&
- !jQuery._data( elem, markDataKey ) ) {
- jQuery.removeData( elem, deferDataKey, true );
- defer.fire();
- }
- }, 0 );
- }
-}
-
-jQuery.extend({
-
- _mark: function( elem, type ) {
- if ( elem ) {
- type = ( type || "fx" ) + "mark";
- jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 );
- }
- },
-
- _unmark: function( force, elem, type ) {
- if ( force !== true ) {
- type = elem;
- elem = force;
- force = false;
- }
- if ( elem ) {
- type = type || "fx";
- var key = type + "mark",
- count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 );
- if ( count ) {
- jQuery._data( elem, key, count );
- } else {
- jQuery.removeData( elem, key, true );
- handleQueueMarkDefer( elem, type, "mark" );
- }
- }
- },
-
- queue: function( elem, type, data ) {
- var q;
- if ( elem ) {
- type = ( type || "fx" ) + "queue";
- q = jQuery._data( elem, type );
-
- // Speed up dequeue by getting out quickly if this is just a lookup
- if ( data ) {
- if ( !q || jQuery.isArray(data) ) {
- q = jQuery._data( elem, type, jQuery.makeArray(data) );
- } else {
- q.push( data );
- }
- }
- return q || [];
- }
- },
-
- dequeue: function( elem, type ) {
- type = type || "fx";
-
- var queue = jQuery.queue( elem, type ),
- fn = queue.shift(),
- hooks = {};
-
- // If the fx queue is dequeued, always remove the progress sentinel
- if ( fn === "inprogress" ) {
- fn = queue.shift();
- }
-
- if ( fn ) {
- // Add a progress sentinel to prevent the fx queue from being
- // automatically dequeued
- if ( type === "fx" ) {
- queue.unshift( "inprogress" );
- }
-
- jQuery._data( elem, type + ".run", hooks );
- fn.call( elem, function() {
- jQuery.dequeue( elem, type );
- }, hooks );
- }
-
- if ( !queue.length ) {
- jQuery.removeData( elem, type + "queue " + type + ".run", true );
- handleQueueMarkDefer( elem, type, "queue" );
- }
- }
-});
-
-jQuery.fn.extend({
- queue: function( type, data ) {
- var setter = 2;
-
- if ( typeof type !== "string" ) {
- data = type;
- type = "fx";
- setter--;
- }
-
- if ( arguments.length < setter ) {
- return jQuery.queue( this[0], type );
- }
-
- return data === undefined ?
- this :
- this.each(function() {
- var queue = jQuery.queue( this, type, data );
-
- if ( type === "fx" && queue[0] !== "inprogress" ) {
- jQuery.dequeue( this, type );
- }
- });
- },
- dequeue: function( type ) {
- return this.each(function() {
- jQuery.dequeue( this, type );
- });
- },
- // Based off of the plugin by Clint Helfers, with permission.
- // http://blindsignals.com/index.php/2009/07/jquery-delay/
- delay: function( time, type ) {
- time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
- type = type || "fx";
-
- return this.queue( type, function( next, hooks ) {
- var timeout = setTimeout( next, time );
- hooks.stop = function() {
- clearTimeout( timeout );
- };
- });
- },
- clearQueue: function( type ) {
- return this.queue( type || "fx", [] );
- },
- // Get a promise resolved when queues of a certain type
- // are emptied (fx is the type by default)
- promise: function( type, object ) {
- if ( typeof type !== "string" ) {
- object = type;
- type = undefined;
- }
- type = type || "fx";
- var defer = jQuery.Deferred(),
- elements = this,
- i = elements.length,
- count = 1,
- deferDataKey = type + "defer",
- queueDataKey = type + "queue",
- markDataKey = type + "mark",
- tmp;
- function resolve() {
- if ( !( --count ) ) {
- defer.resolveWith( elements, [ elements ] );
- }
- }
- while( i-- ) {
- if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
- ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
- jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
- jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) {
- count++;
- tmp.add( resolve );
- }
- }
- resolve();
- return defer.promise( object );
- }
-});
-
-
-
-
-var rclass = /[\n\t\r]/g,
- rspace = /\s+/,
- rreturn = /\r/g,
- rtype = /^(?:button|input)$/i,
- rfocusable = /^(?:button|input|object|select|textarea)$/i,
- rclickable = /^a(?:rea)?$/i,
- rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
- getSetAttribute = jQuery.support.getSetAttribute,
- nodeHook, boolHook, fixSpecified;
-
-jQuery.fn.extend({
- attr: function( name, value ) {
- return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
- },
-
- removeAttr: function( name ) {
- return this.each(function() {
- jQuery.removeAttr( this, name );
- });
- },
-
- prop: function( name, value ) {
- return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
- },
-
- removeProp: function( name ) {
- name = jQuery.propFix[ name ] || name;
- return this.each(function() {
- // try/catch handles cases where IE balks (such as removing a property on window)
- try {
- this[ name ] = undefined;
- delete this[ name ];
- } catch( e ) {}
- });
- },
-
- addClass: function( value ) {
- var classNames, i, l, elem,
- setClass, c, cl;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).addClass( value.call(this, j, this.className) );
- });
- }
-
- if ( value && typeof value === "string" ) {
- classNames = value.split( rspace );
-
- for ( i = 0, l = this.length; i < l; i++ ) {
- elem = this[ i ];
-
- if ( elem.nodeType === 1 ) {
- if ( !elem.className && classNames.length === 1 ) {
- elem.className = value;
-
- } else {
- setClass = " " + elem.className + " ";
-
- for ( c = 0, cl = classNames.length; c < cl; c++ ) {
- if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) {
- setClass += classNames[ c ] + " ";
- }
- }
- elem.className = jQuery.trim( setClass );
- }
- }
- }
- }
-
- return this;
- },
-
- removeClass: function( value ) {
- var classNames, i, l, elem, className, c, cl;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).removeClass( value.call(this, j, this.className) );
- });
- }
-
- if ( (value && typeof value === "string") || value === undefined ) {
- classNames = ( value || "" ).split( rspace );
-
- for ( i = 0, l = this.length; i < l; i++ ) {
- elem = this[ i ];
-
- if ( elem.nodeType === 1 && elem.className ) {
- if ( value ) {
- className = (" " + elem.className + " ").replace( rclass, " " );
- for ( c = 0, cl = classNames.length; c < cl; c++ ) {
- className = className.replace(" " + classNames[ c ] + " ", " ");
- }
- elem.className = jQuery.trim( className );
-
- } else {
- elem.className = "";
- }
- }
- }
- }
-
- return this;
- },
-
- toggleClass: function( value, stateVal ) {
- var type = typeof value,
- isBool = typeof stateVal === "boolean";
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( i ) {
- jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
- });
- }
-
- return this.each(function() {
- if ( type === "string" ) {
- // toggle individual class names
- var className,
- i = 0,
- self = jQuery( this ),
- state = stateVal,
- classNames = value.split( rspace );
-
- while ( (className = classNames[ i++ ]) ) {
- // check each className given, space seperated list
- state = isBool ? state : !self.hasClass( className );
- self[ state ? "addClass" : "removeClass" ]( className );
- }
-
- } else if ( type === "undefined" || type === "boolean" ) {
- if ( this.className ) {
- // store className if set
- jQuery._data( this, "__className__", this.className );
- }
-
- // toggle whole className
- this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
- }
- });
- },
-
- hasClass: function( selector ) {
- var className = " " + selector + " ",
- i = 0,
- l = this.length;
- for ( ; i < l; i++ ) {
- if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
- return true;
- }
- }
-
- return false;
- },
-
- val: function( value ) {
- var hooks, ret, isFunction,
- elem = this[0];
-
- if ( !arguments.length ) {
- if ( elem ) {
- hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
-
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
- return ret;
- }
-
- ret = elem.value;
-
- return typeof ret === "string" ?
- // handle most common string cases
- ret.replace(rreturn, "") :
- // handle cases where value is null/undef or number
- ret == null ? "" : ret;
- }
-
- return;
- }
-
- isFunction = jQuery.isFunction( value );
-
- return this.each(function( i ) {
- var self = jQuery(this), val;
-
- if ( this.nodeType !== 1 ) {
- return;
- }
-
- if ( isFunction ) {
- val = value.call( this, i, self.val() );
- } else {
- val = value;
- }
-
- // Treat null/undefined as ""; convert numbers to string
- if ( val == null ) {
- val = "";
- } else if ( typeof val === "number" ) {
- val += "";
- } else if ( jQuery.isArray( val ) ) {
- val = jQuery.map(val, function ( value ) {
- return value == null ? "" : value + "";
- });
- }
-
- hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
-
- // If set returns undefined, fall back to normal setting
- if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
- this.value = val;
- }
- });
- }
-});
-
-jQuery.extend({
- valHooks: {
- option: {
- get: function( elem ) {
- // attributes.value is undefined in Blackberry 4.7 but
- // uses .value. See #6932
- var val = elem.attributes.value;
- return !val || val.specified ? elem.value : elem.text;
- }
- },
- select: {
- get: function( elem ) {
- var value, i, max, option,
- index = elem.selectedIndex,
- values = [],
- options = elem.options,
- one = elem.type === "select-one";
-
- // Nothing was selected
- if ( index < 0 ) {
- return null;
- }
-
- // Loop through all the selected options
- i = one ? index : 0;
- max = one ? index + 1 : options.length;
- for ( ; i < max; i++ ) {
- option = options[ i ];
-
- // Don't return options that are disabled or in a disabled optgroup
- if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
- (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
-
- // Get the specific value for the option
- value = jQuery( option ).val();
-
- // We don't need an array for one selects
- if ( one ) {
- return value;
- }
-
- // Multi-Selects return an array
- values.push( value );
- }
- }
-
- // Fixes Bug #2551 -- select.val() broken in IE after form.reset()
- if ( one && !values.length && options.length ) {
- return jQuery( options[ index ] ).val();
- }
-
- return values;
- },
-
- set: function( elem, value ) {
- var values = jQuery.makeArray( value );
-
- jQuery(elem).find("option").each(function() {
- this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
- });
-
- if ( !values.length ) {
- elem.selectedIndex = -1;
- }
- return values;
- }
- }
- },
-
- attrFn: {
- val: true,
- css: true,
- html: true,
- text: true,
- data: true,
- width: true,
- height: true,
- offset: true
- },
-
- attr: function( elem, name, value, pass ) {
- var ret, hooks, notxml,
- nType = elem.nodeType;
-
- // don't get/set attributes on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- if ( pass && name in jQuery.attrFn ) {
- return jQuery( elem )[ name ]( value );
- }
-
- // Fallback to prop when attributes are not supported
- if ( typeof elem.getAttribute === "undefined" ) {
- return jQuery.prop( elem, name, value );
- }
-
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
-
- // All attributes are lowercase
- // Grab necessary hook if one is defined
- if ( notxml ) {
- name = name.toLowerCase();
- hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
- }
-
- if ( value !== undefined ) {
-
- if ( value === null ) {
- jQuery.removeAttr( elem, name );
- return;
-
- } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
- return ret;
-
- } else {
- elem.setAttribute( name, "" + value );
- return value;
- }
-
- } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
- return ret;
-
- } else {
-
- ret = elem.getAttribute( name );
-
- // Non-existent attributes return null, we normalize to undefined
- return ret === null ?
- undefined :
- ret;
- }
- },
-
- removeAttr: function( elem, value ) {
- var propName, attrNames, name, l, isBool,
- i = 0;
-
- if ( value && elem.nodeType === 1 ) {
- attrNames = value.toLowerCase().split( rspace );
- l = attrNames.length;
-
- for ( ; i < l; i++ ) {
- name = attrNames[ i ];
-
- if ( name ) {
- propName = jQuery.propFix[ name ] || name;
- isBool = rboolean.test( name );
-
- // See #9699 for explanation of this approach (setting first, then removal)
- // Do not do this for boolean attributes (see #10870)
- if ( !isBool ) {
- jQuery.attr( elem, name, "" );
- }
- elem.removeAttribute( getSetAttribute ? name : propName );
-
- // Set corresponding property to false for boolean attributes
- if ( isBool && propName in elem ) {
- elem[ propName ] = false;
- }
- }
- }
- }
- },
-
- attrHooks: {
- type: {
- set: function( elem, value ) {
- // We can't allow the type property to be changed (since it causes problems in IE)
- if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
- jQuery.error( "type property can't be changed" );
- } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
- // Setting the type on a radio button after the value resets the value in IE6-9
- // Reset value to it's default in case type is set after value
- // This is for element creation
- var val = elem.value;
- elem.setAttribute( "type", value );
- if ( val ) {
- elem.value = val;
- }
- return value;
- }
- }
- },
- // Use the value property for back compat
- // Use the nodeHook for button elements in IE6/7 (#1954)
- value: {
- get: function( elem, name ) {
- if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
- return nodeHook.get( elem, name );
- }
- return name in elem ?
- elem.value :
- null;
- },
- set: function( elem, value, name ) {
- if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
- return nodeHook.set( elem, value, name );
- }
- // Does not return so that setAttribute is also used
- elem.value = value;
- }
- }
- },
-
- propFix: {
- tabindex: "tabIndex",
- readonly: "readOnly",
- "for": "htmlFor",
- "class": "className",
- maxlength: "maxLength",
- cellspacing: "cellSpacing",
- cellpadding: "cellPadding",
- rowspan: "rowSpan",
- colspan: "colSpan",
- usemap: "useMap",
- frameborder: "frameBorder",
- contenteditable: "contentEditable"
- },
-
- prop: function( elem, name, value ) {
- var ret, hooks, notxml,
- nType = elem.nodeType;
-
- // don't get/set properties on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
-
- if ( notxml ) {
- // Fix name and attach hooks
- name = jQuery.propFix[ name ] || name;
- hooks = jQuery.propHooks[ name ];
- }
-
- if ( value !== undefined ) {
- if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
- return ret;
-
- } else {
- return ( elem[ name ] = value );
- }
-
- } else {
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
- return ret;
-
- } else {
- return elem[ name ];
- }
- }
- },
-
- propHooks: {
- tabIndex: {
- get: function( elem ) {
- // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
- // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
- var attributeNode = elem.getAttributeNode("tabindex");
-
- return attributeNode && attributeNode.specified ?
- parseInt( attributeNode.value, 10 ) :
- rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
- 0 :
- undefined;
- }
- }
- }
-});
-
-// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional)
-jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex;
-
-// Hook for boolean attributes
-boolHook = {
- get: function( elem, name ) {
- // Align boolean attributes with corresponding properties
- // Fall back to attribute presence where some booleans are not supported
- var attrNode,
- property = jQuery.prop( elem, name );
- return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
- name.toLowerCase() :
- undefined;
- },
- set: function( elem, value, name ) {
- var propName;
- if ( value === false ) {
- // Remove boolean attributes when set to false
- jQuery.removeAttr( elem, name );
- } else {
- // value is true since we know at this point it's type boolean and not false
- // Set boolean attributes to the same name and set the DOM property
- propName = jQuery.propFix[ name ] || name;
- if ( propName in elem ) {
- // Only set the IDL specifically if it already exists on the element
- elem[ propName ] = true;
- }
-
- elem.setAttribute( name, name.toLowerCase() );
- }
- return name;
- }
-};
-
-// IE6/7 do not support getting/setting some attributes with get/setAttribute
-if ( !getSetAttribute ) {
-
- fixSpecified = {
- name: true,
- id: true,
- coords: true
- };
-
- // Use this for any attribute in IE6/7
- // This fixes almost every IE6/7 issue
- nodeHook = jQuery.valHooks.button = {
- get: function( elem, name ) {
- var ret;
- ret = elem.getAttributeNode( name );
- return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ?
- ret.nodeValue :
- undefined;
- },
- set: function( elem, value, name ) {
- // Set the existing or create a new attribute node
- var ret = elem.getAttributeNode( name );
- if ( !ret ) {
- ret = document.createAttribute( name );
- elem.setAttributeNode( ret );
- }
- return ( ret.nodeValue = value + "" );
- }
- };
-
- // Apply the nodeHook to tabindex
- jQuery.attrHooks.tabindex.set = nodeHook.set;
-
- // Set width and height to auto instead of 0 on empty string( Bug #8150 )
- // This is for removals
- jQuery.each([ "width", "height" ], function( i, name ) {
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
- set: function( elem, value ) {
- if ( value === "" ) {
- elem.setAttribute( name, "auto" );
- return value;
- }
- }
- });
- });
-
- // Set contenteditable to false on removals(#10429)
- // Setting to empty string throws an error as an invalid value
- jQuery.attrHooks.contenteditable = {
- get: nodeHook.get,
- set: function( elem, value, name ) {
- if ( value === "" ) {
- value = "false";
- }
- nodeHook.set( elem, value, name );
- }
- };
-}
-
-
-// Some attributes require a special call on IE
-if ( !jQuery.support.hrefNormalized ) {
- jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
- get: function( elem ) {
- var ret = elem.getAttribute( name, 2 );
- return ret === null ? undefined : ret;
- }
- });
- });
-}
-
-if ( !jQuery.support.style ) {
- jQuery.attrHooks.style = {
- get: function( elem ) {
- // Return undefined in the case of empty string
- // Normalize to lowercase since IE uppercases css property names
- return elem.style.cssText.toLowerCase() || undefined;
- },
- set: function( elem, value ) {
- return ( elem.style.cssText = "" + value );
- }
- };
-}
-
-// Safari mis-reports the default selected property of an option
-// Accessing the parent's selectedIndex property fixes it
-if ( !jQuery.support.optSelected ) {
- jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
- get: function( elem ) {
- var parent = elem.parentNode;
-
- if ( parent ) {
- parent.selectedIndex;
-
- // Make sure that it also works with optgroups, see #5701
- if ( parent.parentNode ) {
- parent.parentNode.selectedIndex;
- }
- }
- return null;
- }
- });
-}
-
-// IE6/7 call enctype encoding
-if ( !jQuery.support.enctype ) {
- jQuery.propFix.enctype = "encoding";
-}
-
-// Radios and checkboxes getter/setter
-if ( !jQuery.support.checkOn ) {
- jQuery.each([ "radio", "checkbox" ], function() {
- jQuery.valHooks[ this ] = {
- get: function( elem ) {
- // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
- return elem.getAttribute("value") === null ? "on" : elem.value;
- }
- };
- });
-}
-jQuery.each([ "radio", "checkbox" ], function() {
- jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
- set: function( elem, value ) {
- if ( jQuery.isArray( value ) ) {
- return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
- }
- }
- });
-});
-
-
-
-
-var rformElems = /^(?:textarea|input|select)$/i,
- rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/,
- rhoverHack = /(?:^|\s)hover(\.\S+)?\b/,
- rkeyEvent = /^key/,
- rmouseEvent = /^(?:mouse|contextmenu)|click/,
- rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
- rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
- quickParse = function( selector ) {
- var quick = rquickIs.exec( selector );
- if ( quick ) {
- // 0 1 2 3
- // [ _, tag, id, class ]
- quick[1] = ( quick[1] || "" ).toLowerCase();
- quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" );
- }
- return quick;
- },
- quickIs = function( elem, m ) {
- var attrs = elem.attributes || {};
- return (
- (!m[1] || elem.nodeName.toLowerCase() === m[1]) &&
- (!m[2] || (attrs.id || {}).value === m[2]) &&
- (!m[3] || m[3].test( (attrs[ "class" ] || {}).value ))
- );
- },
- hoverHack = function( events ) {
- return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
- };
-
-/*
- * Helper functions for managing events -- not part of the public interface.
- * Props to Dean Edwards' addEvent library for many of the ideas.
- */
-jQuery.event = {
-
- add: function( elem, types, handler, data, selector ) {
-
- var elemData, eventHandle, events,
- t, tns, type, namespaces, handleObj,
- handleObjIn, quick, handlers, special;
-
- // Don't attach events to noData or text/comment nodes (allow plain objects tho)
- if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {
- return;
- }
-
- // Caller can pass in an object of custom data in lieu of the handler
- if ( handler.handler ) {
- handleObjIn = handler;
- handler = handleObjIn.handler;
- selector = handleObjIn.selector;
- }
-
- // Make sure that the handler has a unique ID, used to find/remove it later
- if ( !handler.guid ) {
- handler.guid = jQuery.guid++;
- }
-
- // Init the element's event structure and main handler, if this is the first
- events = elemData.events;
- if ( !events ) {
- elemData.events = events = {};
- }
- eventHandle = elemData.handle;
- if ( !eventHandle ) {
- elemData.handle = eventHandle = function( e ) {
- // Discard the second event of a jQuery.event.trigger() and
- // when an event is called after a page has unloaded
- return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
- jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
- undefined;
- };
- // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
- eventHandle.elem = elem;
- }
-
- // Handle multiple events separated by a space
- // jQuery(...).bind("mouseover mouseout", fn);
- types = jQuery.trim( hoverHack(types) ).split( " " );
- for ( t = 0; t < types.length; t++ ) {
-
- tns = rtypenamespace.exec( types[t] ) || [];
- type = tns[1];
- namespaces = ( tns[2] || "" ).split( "." ).sort();
-
- // If event changes its type, use the special event handlers for the changed type
- special = jQuery.event.special[ type ] || {};
-
- // If selector defined, determine special event api type, otherwise given type
- type = ( selector ? special.delegateType : special.bindType ) || type;
-
- // Update special based on newly reset type
- special = jQuery.event.special[ type ] || {};
-
- // handleObj is passed to all event handlers
- handleObj = jQuery.extend({
- type: type,
- origType: tns[1],
- data: data,
- handler: handler,
- guid: handler.guid,
- selector: selector,
- quick: selector && quickParse( selector ),
- namespace: namespaces.join(".")
- }, handleObjIn );
-
- // Init the event handler queue if we're the first
- handlers = events[ type ];
- if ( !handlers ) {
- handlers = events[ type ] = [];
- handlers.delegateCount = 0;
-
- // Only use addEventListener/attachEvent if the special events handler returns false
- if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
- // Bind the global event handler to the element
- if ( elem.addEventListener ) {
- elem.addEventListener( type, eventHandle, false );
-
- } else if ( elem.attachEvent ) {
- elem.attachEvent( "on" + type, eventHandle );
- }
- }
- }
-
- if ( special.add ) {
- special.add.call( elem, handleObj );
-
- if ( !handleObj.handler.guid ) {
- handleObj.handler.guid = handler.guid;
- }
- }
-
- // Add to the element's handler list, delegates in front
- if ( selector ) {
- handlers.splice( handlers.delegateCount++, 0, handleObj );
- } else {
- handlers.push( handleObj );
- }
-
- // Keep track of which events have ever been used, for event optimization
- jQuery.event.global[ type ] = true;
- }
-
- // Nullify elem to prevent memory leaks in IE
- elem = null;
- },
-
- global: {},
-
- // Detach an event or set of events from an element
- remove: function( elem, types, handler, selector, mappedTypes ) {
-
- var elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
- t, tns, type, origType, namespaces, origCount,
- j, events, special, handle, eventType, handleObj;
-
- if ( !elemData || !(events = elemData.events) ) {
- return;
- }
-
- // Once for each type.namespace in types; type may be omitted
- types = jQuery.trim( hoverHack( types || "" ) ).split(" ");
- for ( t = 0; t < types.length; t++ ) {
- tns = rtypenamespace.exec( types[t] ) || [];
- type = origType = tns[1];
- namespaces = tns[2];
-
- // Unbind all events (on this namespace, if provided) for the element
- if ( !type ) {
- for ( type in events ) {
- jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
- }
- continue;
- }
-
- special = jQuery.event.special[ type ] || {};
- type = ( selector? special.delegateType : special.bindType ) || type;
- eventType = events[ type ] || [];
- origCount = eventType.length;
- namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
-
- // Remove matching events
- for ( j = 0; j < eventType.length; j++ ) {
- handleObj = eventType[ j ];
-
- if ( ( mappedTypes || origType === handleObj.origType ) &&
- ( !handler || handler.guid === handleObj.guid ) &&
- ( !namespaces || namespaces.test( handleObj.namespace ) ) &&
- ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
- eventType.splice( j--, 1 );
-
- if ( handleObj.selector ) {
- eventType.delegateCount--;
- }
- if ( special.remove ) {
- special.remove.call( elem, handleObj );
- }
- }
- }
-
- // Remove generic event handler if we removed something and no more handlers exist
- // (avoids potential for endless recursion during removal of special event handlers)
- if ( eventType.length === 0 && origCount !== eventType.length ) {
- if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
- jQuery.removeEvent( elem, type, elemData.handle );
- }
-
- delete events[ type ];
- }
- }
-
- // Remove the expando if it's no longer used
- if ( jQuery.isEmptyObject( events ) ) {
- handle = elemData.handle;
- if ( handle ) {
- handle.elem = null;
- }
-
- // removeData also checks for emptiness and clears the expando if empty
- // so use it instead of delete
- jQuery.removeData( elem, [ "events", "handle" ], true );
- }
- },
-
- // Events that are safe to short-circuit if no handlers are attached.
- // Native DOM events should not be added, they may have inline handlers.
- customEvent: {
- "getData": true,
- "setData": true,
- "changeData": true
- },
-
- trigger: function( event, data, elem, onlyHandlers ) {
- // Don't do events on text and comment nodes
- if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
- return;
- }
-
- // Event object or event type
- var type = event.type || event,
- namespaces = [],
- cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType;
-
- // focus/blur morphs to focusin/out; ensure we're not firing them right now
- if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
- return;
- }
-
- if ( type.indexOf( "!" ) >= 0 ) {
- // Exclusive events trigger only for the exact event (no namespaces)
- type = type.slice(0, -1);
- exclusive = true;
- }
-
- if ( type.indexOf( "." ) >= 0 ) {
- // Namespaced trigger; create a regexp to match event type in handle()
- namespaces = type.split(".");
- type = namespaces.shift();
- namespaces.sort();
- }
-
- if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
- // No jQuery handlers for this event type, and it can't have inline handlers
- return;
- }
-
- // Caller can pass in an Event, Object, or just an event type string
- event = typeof event === "object" ?
- // jQuery.Event object
- event[ jQuery.expando ] ? event :
- // Object literal
- new jQuery.Event( type, event ) :
- // Just the event type (string)
- new jQuery.Event( type );
-
- event.type = type;
- event.isTrigger = true;
- event.exclusive = exclusive;
- event.namespace = namespaces.join( "." );
- event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
- ontype = type.indexOf( ":" ) < 0 ? "on" + type : "";
-
- // Handle a global trigger
- if ( !elem ) {
-
- // TODO: Stop taunting the data cache; remove global events and always attach to document
- cache = jQuery.cache;
- for ( i in cache ) {
- if ( cache[ i ].events && cache[ i ].events[ type ] ) {
- jQuery.event.trigger( event, data, cache[ i ].handle.elem, true );
- }
- }
- return;
- }
-
- // Clean up the event in case it is being reused
- event.result = undefined;
- if ( !event.target ) {
- event.target = elem;
- }
-
- // Clone any incoming data and prepend the event, creating the handler arg list
- data = data != null ? jQuery.makeArray( data ) : [];
- data.unshift( event );
-
- // Allow special events to draw outside the lines
- special = jQuery.event.special[ type ] || {};
- if ( special.trigger && special.trigger.apply( elem, data ) === false ) {
- return;
- }
-
- // Determine event propagation path in advance, per W3C events spec (#9951)
- // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
- eventPath = [[ elem, special.bindType || type ]];
- if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
-
- bubbleType = special.delegateType || type;
- cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode;
- old = null;
- for ( ; cur; cur = cur.parentNode ) {
- eventPath.push([ cur, bubbleType ]);
- old = cur;
- }
-
- // Only add window if we got to document (e.g., not plain obj or detached DOM)
- if ( old && old === elem.ownerDocument ) {
- eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]);
- }
- }
-
- // Fire handlers on the event path
- for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) {
-
- cur = eventPath[i][0];
- event.type = eventPath[i][1];
-
- handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
- if ( handle ) {
- handle.apply( cur, data );
- }
- // Note that this is a bare JS function and not a jQuery handler
- handle = ontype && cur[ ontype ];
- if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) {
- event.preventDefault();
- }
- }
- event.type = type;
-
- // If nobody prevented the default action, do it now
- if ( !onlyHandlers && !event.isDefaultPrevented() ) {
-
- if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
- !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
-
- // Call a native DOM method on the target with the same name name as the event.
- // Can't use an .isFunction() check here because IE6/7 fails that test.
- // Don't do default actions on window, that's where global variables be (#6170)
- // IE<9 dies on focus/blur to hidden element (#1486)
- if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) {
-
- // Don't re-trigger an onFOO event when we call its FOO() method
- old = elem[ ontype ];
-
- if ( old ) {
- elem[ ontype ] = null;
- }
-
- // Prevent re-triggering of the same event, since we already bubbled it above
- jQuery.event.triggered = type;
- elem[ type ]();
- jQuery.event.triggered = undefined;
-
- if ( old ) {
- elem[ ontype ] = old;
- }
- }
- }
- }
-
- return event.result;
- },
-
- dispatch: function( event ) {
-
- // Make a writable jQuery.Event from the native event object
- event = jQuery.event.fix( event || window.event );
-
- var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []),
- delegateCount = handlers.delegateCount,
- args = [].slice.call( arguments, 0 ),
- run_all = !event.exclusive && !event.namespace,
- special = jQuery.event.special[ event.type ] || {},
- handlerQueue = [],
- i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related;
-
- // Use the fix-ed jQuery.Event rather than the (read-only) native event
- args[0] = event;
- event.delegateTarget = this;
-
- // Call the preDispatch hook for the mapped type, and let it bail if desired
- if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
- return;
- }
-
- // Determine handlers that should run if there are delegated events
- // Avoid non-left-click bubbling in Firefox (#3861)
- if ( delegateCount && !(event.button && event.type === "click") ) {
-
- // Pregenerate a single jQuery object for reuse with .is()
- jqcur = jQuery(this);
- jqcur.context = this.ownerDocument || this;
-
- for ( cur = event.target; cur != this; cur = cur.parentNode || this ) {
-
- // Don't process events on disabled elements (#6911, #8165)
- if ( cur.disabled !== true ) {
- selMatch = {};
- matches = [];
- jqcur[0] = cur;
- for ( i = 0; i < delegateCount; i++ ) {
- handleObj = handlers[ i ];
- sel = handleObj.selector;
-
- if ( selMatch[ sel ] === undefined ) {
- selMatch[ sel ] = (
- handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel )
- );
- }
- if ( selMatch[ sel ] ) {
- matches.push( handleObj );
- }
- }
- if ( matches.length ) {
- handlerQueue.push({ elem: cur, matches: matches });
- }
- }
- }
- }
-
- // Add the remaining (directly-bound) handlers
- if ( handlers.length > delegateCount ) {
- handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) });
- }
-
- // Run delegates first; they may want to stop propagation beneath us
- for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) {
- matched = handlerQueue[ i ];
- event.currentTarget = matched.elem;
-
- for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) {
- handleObj = matched.matches[ j ];
-
- // Triggered event must either 1) be non-exclusive and have no namespace, or
- // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
- if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {
-
- event.data = handleObj.data;
- event.handleObj = handleObj;
-
- ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
- .apply( matched.elem, args );
-
- if ( ret !== undefined ) {
- event.result = ret;
- if ( ret === false ) {
- event.preventDefault();
- event.stopPropagation();
- }
- }
- }
- }
- }
-
- // Call the postDispatch hook for the mapped type
- if ( special.postDispatch ) {
- special.postDispatch.call( this, event );
- }
-
- return event.result;
- },
-
- // Includes some event props shared by KeyEvent and MouseEvent
- // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 ***
- props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
-
- fixHooks: {},
-
- keyHooks: {
- props: "char charCode key keyCode".split(" "),
- filter: function( event, original ) {
-
- // Add which for key events
- if ( event.which == null ) {
- event.which = original.charCode != null ? original.charCode : original.keyCode;
- }
-
- return event;
- }
- },
-
- mouseHooks: {
- props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
- filter: function( event, original ) {
- var eventDoc, doc, body,
- button = original.button,
- fromElement = original.fromElement;
-
- // Calculate pageX/Y if missing and clientX/Y available
- if ( event.pageX == null && original.clientX != null ) {
- eventDoc = event.target.ownerDocument || document;
- doc = eventDoc.documentElement;
- body = eventDoc.body;
-
- event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
- event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
- }
-
- // Add relatedTarget, if necessary
- if ( !event.relatedTarget && fromElement ) {
- event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
- }
-
- // Add which for click: 1 === left; 2 === middle; 3 === right
- // Note: button is not normalized, so don't use it
- if ( !event.which && button !== undefined ) {
- event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
- }
-
- return event;
- }
- },
-
- fix: function( event ) {
- if ( event[ jQuery.expando ] ) {
- return event;
- }
-
- // Create a writable copy of the event object and normalize some properties
- var i, prop,
- originalEvent = event,
- fixHook = jQuery.event.fixHooks[ event.type ] || {},
- copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
-
- event = jQuery.Event( originalEvent );
-
- for ( i = copy.length; i; ) {
- prop = copy[ --i ];
- event[ prop ] = originalEvent[ prop ];
- }
-
- // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2)
- if ( !event.target ) {
- event.target = originalEvent.srcElement || document;
- }
-
- // Target should not be a text node (#504, Safari)
- if ( event.target.nodeType === 3 ) {
- event.target = event.target.parentNode;
- }
-
- // For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8)
- if ( event.metaKey === undefined ) {
- event.metaKey = event.ctrlKey;
- }
-
- return fixHook.filter? fixHook.filter( event, originalEvent ) : event;
- },
-
- special: {
- ready: {
- // Make sure the ready event is setup
- setup: jQuery.bindReady
- },
-
- load: {
- // Prevent triggered image.load events from bubbling to window.load
- noBubble: true
- },
-
- focus: {
- delegateType: "focusin"
- },
- blur: {
- delegateType: "focusout"
- },
-
- beforeunload: {
- setup: function( data, namespaces, eventHandle ) {
- // We only want to do this special case on windows
- if ( jQuery.isWindow( this ) ) {
- this.onbeforeunload = eventHandle;
- }
- },
-
- teardown: function( namespaces, eventHandle ) {
- if ( this.onbeforeunload === eventHandle ) {
- this.onbeforeunload = null;
- }
- }
- }
- },
-
- simulate: function( type, elem, event, bubble ) {
- // Piggyback on a donor event to simulate a different one.
- // Fake originalEvent to avoid donor's stopPropagation, but if the
- // simulated event prevents default then we do the same on the donor.
- var e = jQuery.extend(
- new jQuery.Event(),
- event,
- { type: type,
- isSimulated: true,
- originalEvent: {}
- }
- );
- if ( bubble ) {
- jQuery.event.trigger( e, null, elem );
- } else {
- jQuery.event.dispatch.call( elem, e );
- }
- if ( e.isDefaultPrevented() ) {
- event.preventDefault();
- }
- }
-};
-
-// Some plugins are using, but it's undocumented/deprecated and will be removed.
-// The 1.7 special event interface should provide all the hooks needed now.
-jQuery.event.handle = jQuery.event.dispatch;
-
-jQuery.removeEvent = document.removeEventListener ?
- function( elem, type, handle ) {
- if ( elem.removeEventListener ) {
- elem.removeEventListener( type, handle, false );
- }
- } :
- function( elem, type, handle ) {
- if ( elem.detachEvent ) {
- elem.detachEvent( "on" + type, handle );
- }
- };
-
-jQuery.Event = function( src, props ) {
- // Allow instantiation without the 'new' keyword
- if ( !(this instanceof jQuery.Event) ) {
- return new jQuery.Event( src, props );
- }
-
- // Event object
- if ( src && src.type ) {
- this.originalEvent = src;
- this.type = src.type;
-
- // Events bubbling up the document may have been marked as prevented
- // by a handler lower down the tree; reflect the correct value.
- this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
- src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
-
- // Event type
- } else {
- this.type = src;
- }
-
- // Put explicitly provided properties onto the event object
- if ( props ) {
- jQuery.extend( this, props );
- }
-
- // Create a timestamp if incoming event doesn't have one
- this.timeStamp = src && src.timeStamp || jQuery.now();
-
- // Mark it as fixed
- this[ jQuery.expando ] = true;
-};
-
-function returnFalse() {
- return false;
-}
-function returnTrue() {
- return true;
-}
-
-// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
-// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
-jQuery.Event.prototype = {
- preventDefault: function() {
- this.isDefaultPrevented = returnTrue;
-
- var e = this.originalEvent;
- if ( !e ) {
- return;
- }
-
- // if preventDefault exists run it on the original event
- if ( e.preventDefault ) {
- e.preventDefault();
-
- // otherwise set the returnValue property of the original event to false (IE)
- } else {
- e.returnValue = false;
- }
- },
- stopPropagation: function() {
- this.isPropagationStopped = returnTrue;
-
- var e = this.originalEvent;
- if ( !e ) {
- return;
- }
- // if stopPropagation exists run it on the original event
- if ( e.stopPropagation ) {
- e.stopPropagation();
- }
- // otherwise set the cancelBubble property of the original event to true (IE)
- e.cancelBubble = true;
- },
- stopImmediatePropagation: function() {
- this.isImmediatePropagationStopped = returnTrue;
- this.stopPropagation();
- },
- isDefaultPrevented: returnFalse,
- isPropagationStopped: returnFalse,
- isImmediatePropagationStopped: returnFalse
-};
-
-// Create mouseenter/leave events using mouseover/out and event-time checks
-jQuery.each({
- mouseenter: "mouseover",
- mouseleave: "mouseout"
-}, function( orig, fix ) {
- jQuery.event.special[ orig ] = {
- delegateType: fix,
- bindType: fix,
-
- handle: function( event ) {
- var target = this,
- related = event.relatedTarget,
- handleObj = event.handleObj,
- selector = handleObj.selector,
- ret;
-
- // For mousenter/leave call the handler if related is outside the target.
- // NB: No relatedTarget if the mouse left/entered the browser window
- if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
- event.type = handleObj.origType;
- ret = handleObj.handler.apply( this, arguments );
- event.type = fix;
- }
- return ret;
- }
- };
-});
-
-// IE submit delegation
-if ( !jQuery.support.submitBubbles ) {
-
- jQuery.event.special.submit = {
- setup: function() {
- // Only need this for delegated form submit events
- if ( jQuery.nodeName( this, "form" ) ) {
- return false;
- }
-
- // Lazy-add a submit handler when a descendant form may potentially be submitted
- jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
- // Node name check avoids a VML-related crash in IE (#9807)
- var elem = e.target,
- form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
- if ( form && !form._submit_attached ) {
- jQuery.event.add( form, "submit._submit", function( event ) {
- event._submit_bubble = true;
- });
- form._submit_attached = true;
- }
- });
- // return undefined since we don't need an event listener
- },
-
- postDispatch: function( event ) {
- // If form was submitted by the user, bubble the event up the tree
- if ( event._submit_bubble ) {
- delete event._submit_bubble;
- if ( this.parentNode && !event.isTrigger ) {
- jQuery.event.simulate( "submit", this.parentNode, event, true );
- }
- }
- },
-
- teardown: function() {
- // Only need this for delegated form submit events
- if ( jQuery.nodeName( this, "form" ) ) {
- return false;
- }
-
- // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
- jQuery.event.remove( this, "._submit" );
- }
- };
-}
-
-// IE change delegation and checkbox/radio fix
-if ( !jQuery.support.changeBubbles ) {
-
- jQuery.event.special.change = {
-
- setup: function() {
-
- if ( rformElems.test( this.nodeName ) ) {
- // IE doesn't fire change on a check/radio until blur; trigger it on click
- // after a propertychange. Eat the blur-change in special.change.handle.
- // This still fires onchange a second time for check/radio after blur.
- if ( this.type === "checkbox" || this.type === "radio" ) {
- jQuery.event.add( this, "propertychange._change", function( event ) {
- if ( event.originalEvent.propertyName === "checked" ) {
- this._just_changed = true;
- }
- });
- jQuery.event.add( this, "click._change", function( event ) {
- if ( this._just_changed && !event.isTrigger ) {
- this._just_changed = false;
- jQuery.event.simulate( "change", this, event, true );
- }
- });
- }
- return false;
- }
- // Delegated event; lazy-add a change handler on descendant inputs
- jQuery.event.add( this, "beforeactivate._change", function( e ) {
- var elem = e.target;
-
- if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) {
- jQuery.event.add( elem, "change._change", function( event ) {
- if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
- jQuery.event.simulate( "change", this.parentNode, event, true );
- }
- });
- elem._change_attached = true;
- }
- });
- },
-
- handle: function( event ) {
- var elem = event.target;
-
- // Swallow native change events from checkbox/radio, we already triggered them above
- if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
- return event.handleObj.handler.apply( this, arguments );
- }
- },
-
- teardown: function() {
- jQuery.event.remove( this, "._change" );
-
- return rformElems.test( this.nodeName );
- }
- };
-}
-
-// Create "bubbling" focus and blur events
-if ( !jQuery.support.focusinBubbles ) {
- jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
-
- // Attach a single capturing handler while someone wants focusin/focusout
- var attaches = 0,
- handler = function( event ) {
- jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
- };
-
- jQuery.event.special[ fix ] = {
- setup: function() {
- if ( attaches++ === 0 ) {
- document.addEventListener( orig, handler, true );
- }
- },
- teardown: function() {
- if ( --attaches === 0 ) {
- document.removeEventListener( orig, handler, true );
- }
- }
- };
- });
-}
-
-jQuery.fn.extend({
-
- on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
- var origFn, type;
-
- // Types can be a map of types/handlers
- if ( typeof types === "object" ) {
- // ( types-Object, selector, data )
- if ( typeof selector !== "string" ) { // && selector != null
- // ( types-Object, data )
- data = data || selector;
- selector = undefined;
- }
- for ( type in types ) {
- this.on( type, selector, data, types[ type ], one );
- }
- return this;
- }
-
- if ( data == null && fn == null ) {
- // ( types, fn )
- fn = selector;
- data = selector = undefined;
- } else if ( fn == null ) {
- if ( typeof selector === "string" ) {
- // ( types, selector, fn )
- fn = data;
- data = undefined;
- } else {
- // ( types, data, fn )
- fn = data;
- data = selector;
- selector = undefined;
- }
- }
- if ( fn === false ) {
- fn = returnFalse;
- } else if ( !fn ) {
- return this;
- }
-
- if ( one === 1 ) {
- origFn = fn;
- fn = function( event ) {
- // Can use an empty set, since event contains the info
- jQuery().off( event );
- return origFn.apply( this, arguments );
- };
- // Use same guid so caller can remove using origFn
- fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
- }
- return this.each( function() {
- jQuery.event.add( this, types, fn, data, selector );
- });
- },
- one: function( types, selector, data, fn ) {
- return this.on( types, selector, data, fn, 1 );
- },
- off: function( types, selector, fn ) {
- if ( types && types.preventDefault && types.handleObj ) {
- // ( event ) dispatched jQuery.Event
- var handleObj = types.handleObj;
- jQuery( types.delegateTarget ).off(
- handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
- handleObj.selector,
- handleObj.handler
- );
- return this;
- }
- if ( typeof types === "object" ) {
- // ( types-object [, selector] )
- for ( var type in types ) {
- this.off( type, selector, types[ type ] );
- }
- return this;
- }
- if ( selector === false || typeof selector === "function" ) {
- // ( types [, fn] )
- fn = selector;
- selector = undefined;
- }
- if ( fn === false ) {
- fn = returnFalse;
- }
- return this.each(function() {
- jQuery.event.remove( this, types, fn, selector );
- });
- },
-
- bind: function( types, data, fn ) {
- return this.on( types, null, data, fn );
- },
- unbind: function( types, fn ) {
- return this.off( types, null, fn );
- },
-
- live: function( types, data, fn ) {
- jQuery( this.context ).on( types, this.selector, data, fn );
- return this;
- },
- die: function( types, fn ) {
- jQuery( this.context ).off( types, this.selector || "**", fn );
- return this;
- },
-
- delegate: function( selector, types, data, fn ) {
- return this.on( types, selector, data, fn );
- },
- undelegate: function( selector, types, fn ) {
- // ( namespace ) or ( selector, types [, fn] )
- return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn );
- },
-
- trigger: function( type, data ) {
- return this.each(function() {
- jQuery.event.trigger( type, data, this );
- });
- },
- triggerHandler: function( type, data ) {
- if ( this[0] ) {
- return jQuery.event.trigger( type, data, this[0], true );
- }
- },
-
- toggle: function( fn ) {
- // Save reference to arguments for access in closure
- var args = arguments,
- guid = fn.guid || jQuery.guid++,
- i = 0,
- toggler = function( event ) {
- // Figure out which function to execute
- var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
- jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
-
- // Make sure that clicks stop
- event.preventDefault();
-
- // and execute the function
- return args[ lastToggle ].apply( this, arguments ) || false;
- };
-
- // link all the functions, so any of them can unbind this click handler
- toggler.guid = guid;
- while ( i < args.length ) {
- args[ i++ ].guid = guid;
- }
-
- return this.click( toggler );
- },
-
- hover: function( fnOver, fnOut ) {
- return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
- }
-});
-
-jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
- "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
- "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
-
- // Handle event binding
- jQuery.fn[ name ] = function( data, fn ) {
- if ( fn == null ) {
- fn = data;
- data = null;
- }
-
- return arguments.length > 0 ?
- this.on( name, null, data, fn ) :
- this.trigger( name );
- };
-
- if ( jQuery.attrFn ) {
- jQuery.attrFn[ name ] = true;
- }
-
- if ( rkeyEvent.test( name ) ) {
- jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks;
- }
-
- if ( rmouseEvent.test( name ) ) {
- jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;
- }
-});
-
-
-
-/*!
- * Sizzle CSS Selector Engine
- * Copyright 2011, The Dojo Foundation
- * Released under the MIT, BSD, and GPL Licenses.
- * More information: http://sizzlejs.com/
- */
-(function(){
-
-var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
- expando = "sizcache" + (Math.random() + '').replace('.', ''),
- done = 0,
- toString = Object.prototype.toString,
- hasDuplicate = false,
- baseHasDuplicate = true,
- rBackslash = /\\/g,
- rReturn = /\r\n/g,
- rNonWord = /\W/;
-
-// Here we check if the JavaScript engine is using some sort of
-// optimization where it does not always call our comparision
-// function. If that is the case, discard the hasDuplicate value.
-// Thus far that includes Google Chrome.
-[0, 0].sort(function() {
- baseHasDuplicate = false;
- return 0;
-});
-
-var Sizzle = function( selector, context, results, seed ) {
- results = results || [];
- context = context || document;
-
- var origContext = context;
-
- if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
- return [];
- }
-
- if ( !selector || typeof selector !== "string" ) {
- return results;
- }
-
- var m, set, checkSet, extra, ret, cur, pop, i,
- prune = true,
- contextXML = Sizzle.isXML( context ),
- parts = [],
- soFar = selector;
-
- // Reset the position of the chunker regexp (start from head)
- do {
- chunker.exec( "" );
- m = chunker.exec( soFar );
-
- if ( m ) {
- soFar = m[3];
-
- parts.push( m[1] );
-
- if ( m[2] ) {
- extra = m[3];
- break;
- }
- }
- } while ( m );
-
- if ( parts.length > 1 && origPOS.exec( selector ) ) {
-
- if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
- set = posProcess( parts[0] + parts[1], context, seed );
-
- } else {
- set = Expr.relative[ parts[0] ] ?
- [ context ] :
- Sizzle( parts.shift(), context );
-
- while ( parts.length ) {
- selector = parts.shift();
-
- if ( Expr.relative[ selector ] ) {
- selector += parts.shift();
- }
-
- set = posProcess( selector, set, seed );
- }
- }
-
- } else {
- // Take a shortcut and set the context if the root selector is an ID
- // (but not if it'll be faster if the inner selector is an ID)
- if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
- Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
-
- ret = Sizzle.find( parts.shift(), context, contextXML );
- context = ret.expr ?
- Sizzle.filter( ret.expr, ret.set )[0] :
- ret.set[0];
- }
-
- if ( context ) {
- ret = seed ?
- { expr: parts.pop(), set: makeArray(seed) } :
- Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
-
- set = ret.expr ?
- Sizzle.filter( ret.expr, ret.set ) :
- ret.set;
-
- if ( parts.length > 0 ) {
- checkSet = makeArray( set );
-
- } else {
- prune = false;
- }
-
- while ( parts.length ) {
- cur = parts.pop();
- pop = cur;
-
- if ( !Expr.relative[ cur ] ) {
- cur = "";
- } else {
- pop = parts.pop();
- }
-
- if ( pop == null ) {
- pop = context;
- }
-
- Expr.relative[ cur ]( checkSet, pop, contextXML );
- }
-
- } else {
- checkSet = parts = [];
- }
- }
-
- if ( !checkSet ) {
- checkSet = set;
- }
-
- if ( !checkSet ) {
- Sizzle.error( cur || selector );
- }
-
- if ( toString.call(checkSet) === "[object Array]" ) {
- if ( !prune ) {
- results.push.apply( results, checkSet );
-
- } else if ( context && context.nodeType === 1 ) {
- for ( i = 0; checkSet[i] != null; i++ ) {
- if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
- results.push( set[i] );
- }
- }
-
- } else {
- for ( i = 0; checkSet[i] != null; i++ ) {
- if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
- results.push( set[i] );
- }
- }
- }
-
- } else {
- makeArray( checkSet, results );
- }
-
- if ( extra ) {
- Sizzle( extra, origContext, results, seed );
- Sizzle.uniqueSort( results );
- }
-
- return results;
-};
-
-Sizzle.uniqueSort = function( results ) {
- if ( sortOrder ) {
- hasDuplicate = baseHasDuplicate;
- results.sort( sortOrder );
-
- if ( hasDuplicate ) {
- for ( var i = 1; i < results.length; i++ ) {
- if ( results[i] === results[ i - 1 ] ) {
- results.splice( i--, 1 );
- }
- }
- }
- }
-
- return results;
-};
-
-Sizzle.matches = function( expr, set ) {
- return Sizzle( expr, null, null, set );
-};
-
-Sizzle.matchesSelector = function( node, expr ) {
- return Sizzle( expr, null, null, [node] ).length > 0;
-};
-
-Sizzle.find = function( expr, context, isXML ) {
- var set, i, len, match, type, left;
-
- if ( !expr ) {
- return [];
- }
-
- for ( i = 0, len = Expr.order.length; i < len; i++ ) {
- type = Expr.order[i];
-
- if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
- left = match[1];
- match.splice( 1, 1 );
-
- if ( left.substr( left.length - 1 ) !== "\\" ) {
- match[1] = (match[1] || "").replace( rBackslash, "" );
- set = Expr.find[ type ]( match, context, isXML );
-
- if ( set != null ) {
- expr = expr.replace( Expr.match[ type ], "" );
- break;
- }
- }
- }
- }
-
- if ( !set ) {
- set = typeof context.getElementsByTagName !== "undefined" ?
- context.getElementsByTagName( "*" ) :
- [];
- }
-
- return { set: set, expr: expr };
-};
-
-Sizzle.filter = function( expr, set, inplace, not ) {
- var match, anyFound,
- type, found, item, filter, left,
- i, pass,
- old = expr,
- result = [],
- curLoop = set,
- isXMLFilter = set && set[0] && Sizzle.isXML( set[0] );
-
- while ( expr && set.length ) {
- for ( type in Expr.filter ) {
- if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
- filter = Expr.filter[ type ];
- left = match[1];
-
- anyFound = false;
-
- match.splice(1,1);
-
- if ( left.substr( left.length - 1 ) === "\\" ) {
- continue;
- }
-
- if ( curLoop === result ) {
- result = [];
- }
-
- if ( Expr.preFilter[ type ] ) {
- match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
-
- if ( !match ) {
- anyFound = found = true;
-
- } else if ( match === true ) {
- continue;
- }
- }
-
- if ( match ) {
- for ( i = 0; (item = curLoop[i]) != null; i++ ) {
- if ( item ) {
- found = filter( item, match, i, curLoop );
- pass = not ^ found;
-
- if ( inplace && found != null ) {
- if ( pass ) {
- anyFound = true;
-
- } else {
- curLoop[i] = false;
- }
-
- } else if ( pass ) {
- result.push( item );
- anyFound = true;
- }
- }
- }
- }
-
- if ( found !== undefined ) {
- if ( !inplace ) {
- curLoop = result;
- }
-
- expr = expr.replace( Expr.match[ type ], "" );
-
- if ( !anyFound ) {
- return [];
- }
-
- break;
- }
- }
- }
-
- // Improper expression
- if ( expr === old ) {
- if ( anyFound == null ) {
- Sizzle.error( expr );
-
- } else {
- break;
- }
- }
-
- old = expr;
- }
-
- return curLoop;
-};
-
-Sizzle.error = function( msg ) {
- throw new Error( "Syntax error, unrecognized expression: " + msg );
-};
-
-/**
- * Utility function for retreiving the text value of an array of DOM nodes
- * @param {Array|Element} elem
- */
-var getText = Sizzle.getText = function( elem ) {
- var i, node,
- nodeType = elem.nodeType,
- ret = "";
-
- if ( nodeType ) {
- if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
- // Use textContent || innerText for elements
- if ( typeof elem.textContent === 'string' ) {
- return elem.textContent;
- } else if ( typeof elem.innerText === 'string' ) {
- // Replace IE's carriage returns
- return elem.innerText.replace( rReturn, '' );
- } else {
- // Traverse it's children
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling) {
- ret += getText( elem );
- }
- }
- } else if ( nodeType === 3 || nodeType === 4 ) {
- return elem.nodeValue;
- }
- } else {
-
- // If no nodeType, this is expected to be an array
- for ( i = 0; (node = elem[i]); i++ ) {
- // Do not traverse comment nodes
- if ( node.nodeType !== 8 ) {
- ret += getText( node );
- }
- }
- }
- return ret;
-};
-
-var Expr = Sizzle.selectors = {
- order: [ "ID", "NAME", "TAG" ],
-
- match: {
- ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
- CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
- NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
- ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
- TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
- CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
- POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
- PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
- },
-
- leftMatch: {},
-
- attrMap: {
- "class": "className",
- "for": "htmlFor"
- },
-
- attrHandle: {
- href: function( elem ) {
- return elem.getAttribute( "href" );
- },
- type: function( elem ) {
- return elem.getAttribute( "type" );
- }
- },
-
- relative: {
- "+": function(checkSet, part){
- var isPartStr = typeof part === "string",
- isTag = isPartStr && !rNonWord.test( part ),
- isPartStrNotTag = isPartStr && !isTag;
-
- if ( isTag ) {
- part = part.toLowerCase();
- }
-
- for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
- if ( (elem = checkSet[i]) ) {
- while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
-
- checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
- elem || false :
- elem === part;
- }
- }
-
- if ( isPartStrNotTag ) {
- Sizzle.filter( part, checkSet, true );
- }
- },
-
- ">": function( checkSet, part ) {
- var elem,
- isPartStr = typeof part === "string",
- i = 0,
- l = checkSet.length;
-
- if ( isPartStr && !rNonWord.test( part ) ) {
- part = part.toLowerCase();
-
- for ( ; i < l; i++ ) {
- elem = checkSet[i];
-
- if ( elem ) {
- var parent = elem.parentNode;
- checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
- }
- }
-
- } else {
- for ( ; i < l; i++ ) {
- elem = checkSet[i];
-
- if ( elem ) {
- checkSet[i] = isPartStr ?
- elem.parentNode :
- elem.parentNode === part;
- }
- }
-
- if ( isPartStr ) {
- Sizzle.filter( part, checkSet, true );
- }
- }
- },
-
- "": function(checkSet, part, isXML){
- var nodeCheck,
- doneName = done++,
- checkFn = dirCheck;
-
- if ( typeof part === "string" && !rNonWord.test( part ) ) {
- part = part.toLowerCase();
- nodeCheck = part;
- checkFn = dirNodeCheck;
- }
-
- checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
- },
-
- "~": function( checkSet, part, isXML ) {
- var nodeCheck,
- doneName = done++,
- checkFn = dirCheck;
-
- if ( typeof part === "string" && !rNonWord.test( part ) ) {
- part = part.toLowerCase();
- nodeCheck = part;
- checkFn = dirNodeCheck;
- }
-
- checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML );
- }
- },
-
- find: {
- ID: function( match, context, isXML ) {
- if ( typeof context.getElementById !== "undefined" && !isXML ) {
- var m = context.getElementById(match[1]);
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- return m && m.parentNode ? [m] : [];
- }
- },
-
- NAME: function( match, context ) {
- if ( typeof context.getElementsByName !== "undefined" ) {
- var ret = [],
- results = context.getElementsByName( match[1] );
-
- for ( var i = 0, l = results.length; i < l; i++ ) {
- if ( results[i].getAttribute("name") === match[1] ) {
- ret.push( results[i] );
- }
- }
-
- return ret.length === 0 ? null : ret;
- }
- },
-
- TAG: function( match, context ) {
- if ( typeof context.getElementsByTagName !== "undefined" ) {
- return context.getElementsByTagName( match[1] );
- }
- }
- },
- preFilter: {
- CLASS: function( match, curLoop, inplace, result, not, isXML ) {
- match = " " + match[1].replace( rBackslash, "" ) + " ";
-
- if ( isXML ) {
- return match;
- }
-
- for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
- if ( elem ) {
- if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) {
- if ( !inplace ) {
- result.push( elem );
- }
-
- } else if ( inplace ) {
- curLoop[i] = false;
- }
- }
- }
-
- return false;
- },
-
- ID: function( match ) {
- return match[1].replace( rBackslash, "" );
- },
-
- TAG: function( match, curLoop ) {
- return match[1].replace( rBackslash, "" ).toLowerCase();
- },
-
- CHILD: function( match ) {
- if ( match[1] === "nth" ) {
- if ( !match[2] ) {
- Sizzle.error( match[0] );
- }
-
- match[2] = match[2].replace(/^\+|\s*/g, '');
-
- // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
- var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(
- match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
- !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
-
- // calculate the numbers (first)n+(last) including if they are negative
- match[2] = (test[1] + (test[2] || 1)) - 0;
- match[3] = test[3] - 0;
- }
- else if ( match[2] ) {
- Sizzle.error( match[0] );
- }
-
- // TODO: Move to normal caching system
- match[0] = done++;
-
- return match;
- },
-
- ATTR: function( match, curLoop, inplace, result, not, isXML ) {
- var name = match[1] = match[1].replace( rBackslash, "" );
-
- if ( !isXML && Expr.attrMap[name] ) {
- match[1] = Expr.attrMap[name];
- }
-
- // Handle if an un-quoted value was used
- match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" );
-
- if ( match[2] === "~=" ) {
- match[4] = " " + match[4] + " ";
- }
-
- return match;
- },
-
- PSEUDO: function( match, curLoop, inplace, result, not ) {
- if ( match[1] === "not" ) {
- // If we're dealing with a complex expression, or a simple one
- if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
- match[3] = Sizzle(match[3], null, null, curLoop);
-
- } else {
- var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
-
- if ( !inplace ) {
- result.push.apply( result, ret );
- }
-
- return false;
- }
-
- } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
- return true;
- }
-
- return match;
- },
-
- POS: function( match ) {
- match.unshift( true );
-
- return match;
- }
- },
-
- filters: {
- enabled: function( elem ) {
- return elem.disabled === false && elem.type !== "hidden";
- },
-
- disabled: function( elem ) {
- return elem.disabled === true;
- },
-
- checked: function( elem ) {
- return elem.checked === true;
- },
-
- selected: function( elem ) {
- // Accessing this property makes selected-by-default
- // options in Safari work properly
- if ( elem.parentNode ) {
- elem.parentNode.selectedIndex;
- }
-
- return elem.selected === true;
- },
-
- parent: function( elem ) {
- return !!elem.firstChild;
- },
-
- empty: function( elem ) {
- return !elem.firstChild;
- },
-
- has: function( elem, i, match ) {
- return !!Sizzle( match[3], elem ).length;
- },
-
- header: function( elem ) {
- return (/h\d/i).test( elem.nodeName );
- },
-
- text: function( elem ) {
- var attr = elem.getAttribute( "type" ), type = elem.type;
- // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
- // use getAttribute instead to test this case
- return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
- },
-
- radio: function( elem ) {
- return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type;
- },
-
- checkbox: function( elem ) {
- return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type;
- },
-
- file: function( elem ) {
- return elem.nodeName.toLowerCase() === "input" && "file" === elem.type;
- },
-
- password: function( elem ) {
- return elem.nodeName.toLowerCase() === "input" && "password" === elem.type;
- },
-
- submit: function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return (name === "input" || name === "button") && "submit" === elem.type;
- },
-
- image: function( elem ) {
- return elem.nodeName.toLowerCase() === "input" && "image" === elem.type;
- },
-
- reset: function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return (name === "input" || name === "button") && "reset" === elem.type;
- },
-
- button: function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && "button" === elem.type || name === "button";
- },
-
- input: function( elem ) {
- return (/input|select|textarea|button/i).test( elem.nodeName );
- },
-
- focus: function( elem ) {
- return elem === elem.ownerDocument.activeElement;
- }
- },
- setFilters: {
- first: function( elem, i ) {
- return i === 0;
- },
-
- last: function( elem, i, match, array ) {
- return i === array.length - 1;
- },
-
- even: function( elem, i ) {
- return i % 2 === 0;
- },
-
- odd: function( elem, i ) {
- return i % 2 === 1;
- },
-
- lt: function( elem, i, match ) {
- return i < match[3] - 0;
- },
-
- gt: function( elem, i, match ) {
- return i > match[3] - 0;
- },
-
- nth: function( elem, i, match ) {
- return match[3] - 0 === i;
- },
-
- eq: function( elem, i, match ) {
- return match[3] - 0 === i;
- }
- },
- filter: {
- PSEUDO: function( elem, match, i, array ) {
- var name = match[1],
- filter = Expr.filters[ name ];
-
- if ( filter ) {
- return filter( elem, i, match, array );
-
- } else if ( name === "contains" ) {
- return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0;
-
- } else if ( name === "not" ) {
- var not = match[3];
-
- for ( var j = 0, l = not.length; j < l; j++ ) {
- if ( not[j] === elem ) {
- return false;
- }
- }
-
- return true;
-
- } else {
- Sizzle.error( name );
- }
- },
-
- CHILD: function( elem, match ) {
- var first, last,
- doneName, parent, cache,
- count, diff,
- type = match[1],
- node = elem;
-
- switch ( type ) {
- case "only":
- case "first":
- while ( (node = node.previousSibling) ) {
- if ( node.nodeType === 1 ) {
- return false;
- }
- }
-
- if ( type === "first" ) {
- return true;
- }
-
- node = elem;
-
- /* falls through */
- case "last":
- while ( (node = node.nextSibling) ) {
- if ( node.nodeType === 1 ) {
- return false;
- }
- }
-
- return true;
-
- case "nth":
- first = match[2];
- last = match[3];
-
- if ( first === 1 && last === 0 ) {
- return true;
- }
-
- doneName = match[0];
- parent = elem.parentNode;
-
- if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) {
- count = 0;
-
- for ( node = parent.firstChild; node; node = node.nextSibling ) {
- if ( node.nodeType === 1 ) {
- node.nodeIndex = ++count;
- }
- }
-
- parent[ expando ] = doneName;
- }
-
- diff = elem.nodeIndex - last;
-
- if ( first === 0 ) {
- return diff === 0;
-
- } else {
- return ( diff % first === 0 && diff / first >= 0 );
- }
- }
- },
-
- ID: function( elem, match ) {
- return elem.nodeType === 1 && elem.getAttribute("id") === match;
- },
-
- TAG: function( elem, match ) {
- return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match;
- },
-
- CLASS: function( elem, match ) {
- return (" " + (elem.className || elem.getAttribute("class")) + " ")
- .indexOf( match ) > -1;
- },
-
- ATTR: function( elem, match ) {
- var name = match[1],
- result = Sizzle.attr ?
- Sizzle.attr( elem, name ) :
- Expr.attrHandle[ name ] ?
- Expr.attrHandle[ name ]( elem ) :
- elem[ name ] != null ?
- elem[ name ] :
- elem.getAttribute( name ),
- value = result + "",
- type = match[2],
- check = match[4];
-
- return result == null ?
- type === "!=" :
- !type && Sizzle.attr ?
- result != null :
- type === "=" ?
- value === check :
- type === "*=" ?
- value.indexOf(check) >= 0 :
- type === "~=" ?
- (" " + value + " ").indexOf(check) >= 0 :
- !check ?
- value && result !== false :
- type === "!=" ?
- value !== check :
- type === "^=" ?
- value.indexOf(check) === 0 :
- type === "$=" ?
- value.substr(value.length - check.length) === check :
- type === "|=" ?
- value === check || value.substr(0, check.length + 1) === check + "-" :
- false;
- },
-
- POS: function( elem, match, i, array ) {
- var name = match[2],
- filter = Expr.setFilters[ name ];
-
- if ( filter ) {
- return filter( elem, i, match, array );
- }
- }
- }
-};
-
-var origPOS = Expr.match.POS,
- fescape = function(all, num){
- return "\\" + (num - 0 + 1);
- };
-
-for ( var type in Expr.match ) {
- Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) );
- Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
-}
-// Expose origPOS
-// "global" as in regardless of relation to brackets/parens
-Expr.match.globalPOS = origPOS;
-
-var makeArray = function( array, results ) {
- array = Array.prototype.slice.call( array, 0 );
-
- if ( results ) {
- results.push.apply( results, array );
- return results;
- }
-
- return array;
-};
-
-// Perform a simple check to determine if the browser is capable of
-// converting a NodeList to an array using builtin methods.
-// Also verifies that the returned array holds DOM nodes
-// (which is not the case in the Blackberry browser)
-try {
- Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
-
-// Provide a fallback method if it does not work
-} catch( e ) {
- makeArray = function( array, results ) {
- var i = 0,
- ret = results || [];
-
- if ( toString.call(array) === "[object Array]" ) {
- Array.prototype.push.apply( ret, array );
-
- } else {
- if ( typeof array.length === "number" ) {
- for ( var l = array.length; i < l; i++ ) {
- ret.push( array[i] );
- }
-
- } else {
- for ( ; array[i]; i++ ) {
- ret.push( array[i] );
- }
- }
- }
-
- return ret;
- };
-}
-
-var sortOrder, siblingCheck;
-
-if ( document.documentElement.compareDocumentPosition ) {
- sortOrder = function( a, b ) {
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
-
- if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
- return a.compareDocumentPosition ? -1 : 1;
- }
-
- return a.compareDocumentPosition(b) & 4 ? -1 : 1;
- };
-
-} else {
- sortOrder = function( a, b ) {
- // The nodes are identical, we can exit early
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
-
- // Fallback to using sourceIndex (in IE) if it's available on both nodes
- } else if ( a.sourceIndex && b.sourceIndex ) {
- return a.sourceIndex - b.sourceIndex;
- }
-
- var al, bl,
- ap = [],
- bp = [],
- aup = a.parentNode,
- bup = b.parentNode,
- cur = aup;
-
- // If the nodes are siblings (or identical) we can do a quick check
- if ( aup === bup ) {
- return siblingCheck( a, b );
-
- // If no parents were found then the nodes are disconnected
- } else if ( !aup ) {
- return -1;
-
- } else if ( !bup ) {
- return 1;
- }
-
- // Otherwise they're somewhere else in the tree so we need
- // to build up a full list of the parentNodes for comparison
- while ( cur ) {
- ap.unshift( cur );
- cur = cur.parentNode;
- }
-
- cur = bup;
-
- while ( cur ) {
- bp.unshift( cur );
- cur = cur.parentNode;
- }
-
- al = ap.length;
- bl = bp.length;
-
- // Start walking down the tree looking for a discrepancy
- for ( var i = 0; i < al && i < bl; i++ ) {
- if ( ap[i] !== bp[i] ) {
- return siblingCheck( ap[i], bp[i] );
- }
- }
-
- // We ended someplace up the tree so do a sibling check
- return i === al ?
- siblingCheck( a, bp[i], -1 ) :
- siblingCheck( ap[i], b, 1 );
- };
-
- siblingCheck = function( a, b, ret ) {
- if ( a === b ) {
- return ret;
- }
-
- var cur = a.nextSibling;
-
- while ( cur ) {
- if ( cur === b ) {
- return -1;
- }
-
- cur = cur.nextSibling;
- }
-
- return 1;
- };
-}
-
-// Check to see if the browser returns elements by name when
-// querying by getElementById (and provide a workaround)
-(function(){
- // We're going to inject a fake input element with a specified name
- var form = document.createElement("div"),
- id = "script" + (new Date()).getTime(),
- root = document.documentElement;
-
- form.innerHTML = "<a name='" + id + "'/>";
-
- // Inject it into the root element, check its status, and remove it quickly
- root.insertBefore( form, root.firstChild );
-
- // The workaround has to do additional checks after a getElementById
- // Which slows things down for other browsers (hence the branching)
- if ( document.getElementById( id ) ) {
- Expr.find.ID = function( match, context, isXML ) {
- if ( typeof context.getElementById !== "undefined" && !isXML ) {
- var m = context.getElementById(match[1]);
-
- return m ?
- m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ?
- [m] :
- undefined :
- [];
- }
- };
-
- Expr.filter.ID = function( elem, match ) {
- var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
-
- return elem.nodeType === 1 && node && node.nodeValue === match;
- };
- }
-
- root.removeChild( form );
-
- // release memory in IE
- root = form = null;
-})();
-
-(function(){
- // Check to see if the browser returns only elements
- // when doing getElementsByTagName("*")
-
- // Create a fake element
- var div = document.createElement("div");
- div.appendChild( document.createComment("") );
-
- // Make sure no comments are found
- if ( div.getElementsByTagName("*").length > 0 ) {
- Expr.find.TAG = function( match, context ) {
- var results = context.getElementsByTagName( match[1] );
-
- // Filter out possible comments
- if ( match[1] === "*" ) {
- var tmp = [];
-
- for ( var i = 0; results[i]; i++ ) {
- if ( results[i].nodeType === 1 ) {
- tmp.push( results[i] );
- }
- }
-
- results = tmp;
- }
-
- return results;
- };
- }
-
- // Check to see if an attribute returns normalized href attributes
- div.innerHTML = "<a href='#'></a>";
-
- if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
- div.firstChild.getAttribute("href") !== "#" ) {
-
- Expr.attrHandle.href = function( elem ) {
- return elem.getAttribute( "href", 2 );
- };
- }
-
- // release memory in IE
- div = null;
-})();
-
-if ( document.querySelectorAll ) {
- (function(){
- var oldSizzle = Sizzle,
- div = document.createElement("div"),
- id = "__sizzle__";
-
- div.innerHTML = "<p class='TEST'></p>";
-
- // Safari can't handle uppercase or unicode characters when
- // in quirks mode.
- if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
- return;
- }
-
- Sizzle = function( query, context, extra, seed ) {
- context = context || document;
-
- // Only use querySelectorAll on non-XML documents
- // (ID selectors don't work in non-HTML documents)
- if ( !seed && !Sizzle.isXML(context) ) {
- // See if we find a selector to speed up
- var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
-
- if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {
- // Speed-up: Sizzle("TAG")
- if ( match[1] ) {
- return makeArray( context.getElementsByTagName( query ), extra );
-
- // Speed-up: Sizzle(".CLASS")
- } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {
- return makeArray( context.getElementsByClassName( match[2] ), extra );
- }
- }
-
- if ( context.nodeType === 9 ) {
- // Speed-up: Sizzle("body")
- // The body element only exists once, optimize finding it
- if ( query === "body" && context.body ) {
- return makeArray( [ context.body ], extra );
-
- // Speed-up: Sizzle("#ID")
- } else if ( match && match[3] ) {
- var elem = context.getElementById( match[3] );
-
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- if ( elem && elem.parentNode ) {
- // Handle the case where IE and Opera return items
- // by name instead of ID
- if ( elem.id === match[3] ) {
- return makeArray( [ elem ], extra );
- }
-
- } else {
- return makeArray( [], extra );
- }
- }
-
- try {
- return makeArray( context.querySelectorAll(query), extra );
- } catch(qsaError) {}
-
- // qSA works strangely on Element-rooted queries
- // We can work around this by specifying an extra ID on the root
- // and working up from there (Thanks to Andrew Dupont for the technique)
- // IE 8 doesn't work on object elements
- } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
- var oldContext = context,
- old = context.getAttribute( "id" ),
- nid = old || id,
- hasParent = context.parentNode,
- relativeHierarchySelector = /^\s*[+~]/.test( query );
-
- if ( !old ) {
- context.setAttribute( "id", nid );
- } else {
- nid = nid.replace( /'/g, "\\$&" );
- }
- if ( relativeHierarchySelector && hasParent ) {
- context = context.parentNode;
- }
-
- try {
- if ( !relativeHierarchySelector || hasParent ) {
- return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra );
- }
-
- } catch(pseudoError) {
- } finally {
- if ( !old ) {
- oldContext.removeAttribute( "id" );
- }
- }
- }
- }
-
- return oldSizzle(query, context, extra, seed);
- };
-
- for ( var prop in oldSizzle ) {
- Sizzle[ prop ] = oldSizzle[ prop ];
- }
-
- // release memory in IE
- div = null;
- })();
-}
-
-(function(){
- var html = document.documentElement,
- matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector;
-
- if ( matches ) {
- // Check to see if it's possible to do matchesSelector
- // on a disconnected node (IE 9 fails this)
- var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ),
- pseudoWorks = false;
-
- try {
- // This should fail with an exception
- // Gecko does not error, returns false instead
- matches.call( document.documentElement, "[test!='']:sizzle" );
-
- } catch( pseudoError ) {
- pseudoWorks = true;
- }
-
- Sizzle.matchesSelector = function( node, expr ) {
- // Make sure that attribute selectors are quoted
- expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
-
- if ( !Sizzle.isXML( node ) ) {
- try {
- if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
- var ret = matches.call( node, expr );
-
- // IE 9's matchesSelector returns false on disconnected nodes
- if ( ret || !disconnectedMatch ||
- // As well, disconnected nodes are said to be in a document
- // fragment in IE 9, so check for that
- node.document && node.document.nodeType !== 11 ) {
- return ret;
- }
- }
- } catch(e) {}
- }
-
- return Sizzle(expr, null, null, [node]).length > 0;
- };
- }
-})();
-
-(function(){
- var div = document.createElement("div");
-
- div.innerHTML = "<div class='test e'></div><div class='test'></div>";
-
- // Opera can't find a second classname (in 9.6)
- // Also, make sure that getElementsByClassName actually exists
- if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) {
- return;
- }
-
- // Safari caches class attributes, doesn't catch changes (in 3.2)
- div.lastChild.className = "e";
-
- if ( div.getElementsByClassName("e").length === 1 ) {
- return;
- }
-
- Expr.order.splice(1, 0, "CLASS");
- Expr.find.CLASS = function( match, context, isXML ) {
- if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
- return context.getElementsByClassName(match[1]);
- }
- };
-
- // release memory in IE
- div = null;
-})();
-
-function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
- for ( var i = 0, l = checkSet.length; i < l; i++ ) {
- var elem = checkSet[i];
-
- if ( elem ) {
- var match = false;
-
- elem = elem[dir];
-
- while ( elem ) {
- if ( elem[ expando ] === doneName ) {
- match = checkSet[elem.sizset];
- break;
- }
-
- if ( elem.nodeType === 1 && !isXML ){
- elem[ expando ] = doneName;
- elem.sizset = i;
- }
-
- if ( elem.nodeName.toLowerCase() === cur ) {
- match = elem;
- break;
- }
-
- elem = elem[dir];
- }
-
- checkSet[i] = match;
- }
- }
-}
-
-function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
- for ( var i = 0, l = checkSet.length; i < l; i++ ) {
- var elem = checkSet[i];
-
- if ( elem ) {
- var match = false;
-
- elem = elem[dir];
-
- while ( elem ) {
- if ( elem[ expando ] === doneName ) {
- match = checkSet[elem.sizset];
- break;
- }
-
- if ( elem.nodeType === 1 ) {
- if ( !isXML ) {
- elem[ expando ] = doneName;
- elem.sizset = i;
- }
-
- if ( typeof cur !== "string" ) {
- if ( elem === cur ) {
- match = true;
- break;
- }
-
- } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
- match = elem;
- break;
- }
- }
-
- elem = elem[dir];
- }
-
- checkSet[i] = match;
- }
- }
-}
-
-if ( document.documentElement.contains ) {
- Sizzle.contains = function( a, b ) {
- return a !== b && (a.contains ? a.contains(b) : true);
- };
-
-} else if ( document.documentElement.compareDocumentPosition ) {
- Sizzle.contains = function( a, b ) {
- return !!(a.compareDocumentPosition(b) & 16);
- };
-
-} else {
- Sizzle.contains = function() {
- return false;
- };
-}
-
-Sizzle.isXML = function( elem ) {
- // documentElement is verified for cases where it doesn't yet exist
- // (such as loading iframes in IE - #4833)
- var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
-
- return documentElement ? documentElement.nodeName !== "HTML" : false;
-};
-
-var posProcess = function( selector, context, seed ) {
- var match,
- tmpSet = [],
- later = "",
- root = context.nodeType ? [context] : context;
-
- // Position selectors must be done after the filter
- // And so must :not(positional) so we move all PSEUDOs to the end
- while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
- later += match[0];
- selector = selector.replace( Expr.match.PSEUDO, "" );
- }
-
- selector = Expr.relative[selector] ? selector + "*" : selector;
-
- for ( var i = 0, l = root.length; i < l; i++ ) {
- Sizzle( selector, root[i], tmpSet, seed );
- }
-
- return Sizzle.filter( later, tmpSet );
-};
-
-// EXPOSE
-// Override sizzle attribute retrieval
-Sizzle.attr = jQuery.attr;
-Sizzle.selectors.attrMap = {};
-jQuery.find = Sizzle;
-jQuery.expr = Sizzle.selectors;
-jQuery.expr[":"] = jQuery.expr.filters;
-jQuery.unique = Sizzle.uniqueSort;
-jQuery.text = Sizzle.getText;
-jQuery.isXMLDoc = Sizzle.isXML;
-jQuery.contains = Sizzle.contains;
-
-
-})();
-
-
-var runtil = /Until$/,
- rparentsprev = /^(?:parents|prevUntil|prevAll)/,
- // Note: This RegExp should be improved, or likely pulled from Sizzle
- rmultiselector = /,/,
- isSimple = /^.[^:#\[\.,]*$/,
- slice = Array.prototype.slice,
- POS = jQuery.expr.match.globalPOS,
- // methods guaranteed to produce a unique set when starting from a unique set
- guaranteedUnique = {
- children: true,
- contents: true,
- next: true,
- prev: true
- };
-
-jQuery.fn.extend({
- find: function( selector ) {
- var self = this,
- i, l;
-
- if ( typeof selector !== "string" ) {
- return jQuery( selector ).filter(function() {
- for ( i = 0, l = self.length; i < l; i++ ) {
- if ( jQuery.contains( self[ i ], this ) ) {
- return true;
- }
- }
- });
- }
-
- var ret = this.pushStack( "", "find", selector ),
- length, n, r;
-
- for ( i = 0, l = this.length; i < l; i++ ) {
- length = ret.length;
- jQuery.find( selector, this[i], ret );
-
- if ( i > 0 ) {
- // Make sure that the results are unique
- for ( n = length; n < ret.length; n++ ) {
- for ( r = 0; r < length; r++ ) {
- if ( ret[r] === ret[n] ) {
- ret.splice(n--, 1);
- break;
- }
- }
- }
- }
- }
-
- return ret;
- },
-
- has: function( target ) {
- var targets = jQuery( target );
- return this.filter(function() {
- for ( var i = 0, l = targets.length; i < l; i++ ) {
- if ( jQuery.contains( this, targets[i] ) ) {
- return true;
- }
- }
- });
- },
-
- not: function( selector ) {
- return this.pushStack( winnow(this, selector, false), "not", selector);
- },
-
- filter: function( selector ) {
- return this.pushStack( winnow(this, selector, true), "filter", selector );
- },
-
- is: function( selector ) {
- return !!selector && (
- typeof selector === "string" ?
- // If this is a positional selector, check membership in the returned set
- // so $("p:first").is("p:last") won't return true for a doc with two "p".
- POS.test( selector ) ?
- jQuery( selector, this.context ).index( this[0] ) >= 0 :
- jQuery.filter( selector, this ).length > 0 :
- this.filter( selector ).length > 0 );
- },
-
- closest: function( selectors, context ) {
- var ret = [], i, l, cur = this[0];
-
- // Array (deprecated as of jQuery 1.7)
- if ( jQuery.isArray( selectors ) ) {
- var level = 1;
-
- while ( cur && cur.ownerDocument && cur !== context ) {
- for ( i = 0; i < selectors.length; i++ ) {
-
- if ( jQuery( cur ).is( selectors[ i ] ) ) {
- ret.push({ selector: selectors[ i ], elem: cur, level: level });
- }
- }
-
- cur = cur.parentNode;
- level++;
- }
-
- return ret;
- }
-
- // String
- var pos = POS.test( selectors ) || typeof selectors !== "string" ?
- jQuery( selectors, context || this.context ) :
- 0;
-
- for ( i = 0, l = this.length; i < l; i++ ) {
- cur = this[i];
-
- while ( cur ) {
- if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
- ret.push( cur );
- break;
-
- } else {
- cur = cur.parentNode;
- if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) {
- break;
- }
- }
- }
- }
-
- ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
-
- return this.pushStack( ret, "closest", selectors );
- },
-
- // Determine the position of an element within
- // the matched set of elements
- index: function( elem ) {
-
- // No argument, return index in parent
- if ( !elem ) {
- return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1;
- }
-
- // index in selector
- if ( typeof elem === "string" ) {
- return jQuery.inArray( this[0], jQuery( elem ) );
- }
-
- // Locate the position of the desired element
- return jQuery.inArray(
- // If it receives a jQuery object, the first element is used
- elem.jquery ? elem[0] : elem, this );
- },
-
- add: function( selector, context ) {
- var set = typeof selector === "string" ?
- jQuery( selector, context ) :
- jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
- all = jQuery.merge( this.get(), set );
-
- return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
- all :
- jQuery.unique( all ) );
- },
-
- andSelf: function() {
- return this.add( this.prevObject );
- }
-});
-
-// A painfully simple check to see if an element is disconnected
-// from a document (should be improved, where feasible).
-function isDisconnected( node ) {
- return !node || !node.parentNode || node.parentNode.nodeType === 11;
-}
-
-jQuery.each({
- parent: function( elem ) {
- var parent = elem.parentNode;
- return parent && parent.nodeType !== 11 ? parent : null;
- },
- parents: function( elem ) {
- return jQuery.dir( elem, "parentNode" );
- },
- parentsUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "parentNode", until );
- },
- next: function( elem ) {
- return jQuery.nth( elem, 2, "nextSibling" );
- },
- prev: function( elem ) {
- return jQuery.nth( elem, 2, "previousSibling" );
- },
- nextAll: function( elem ) {
- return jQuery.dir( elem, "nextSibling" );
- },
- prevAll: function( elem ) {
- return jQuery.dir( elem, "previousSibling" );
- },
- nextUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "nextSibling", until );
- },
- prevUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "previousSibling", until );
- },
- siblings: function( elem ) {
- return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
- },
- children: function( elem ) {
- return jQuery.sibling( elem.firstChild );
- },
- contents: function( elem ) {
- return jQuery.nodeName( elem, "iframe" ) ?
- elem.contentDocument || elem.contentWindow.document :
- jQuery.makeArray( elem.childNodes );
- }
-}, function( name, fn ) {
- jQuery.fn[ name ] = function( until, selector ) {
- var ret = jQuery.map( this, fn, until );
-
- if ( !runtil.test( name ) ) {
- selector = until;
- }
-
- if ( selector && typeof selector === "string" ) {
- ret = jQuery.filter( selector, ret );
- }
-
- ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
-
- if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {
- ret = ret.reverse();
- }
-
- return this.pushStack( ret, name, slice.call( arguments ).join(",") );
- };
-});
-
-jQuery.extend({
- filter: function( expr, elems, not ) {
- if ( not ) {
- expr = ":not(" + expr + ")";
- }
-
- return elems.length === 1 ?
- jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
- jQuery.find.matches(expr, elems);
- },
-
- dir: function( elem, dir, until ) {
- var matched = [],
- cur = elem[ dir ];
-
- while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
- if ( cur.nodeType === 1 ) {
- matched.push( cur );
- }
- cur = cur[dir];
- }
- return matched;
- },
-
- nth: function( cur, result, dir, elem ) {
- result = result || 1;
- var num = 0;
-
- for ( ; cur; cur = cur[dir] ) {
- if ( cur.nodeType === 1 && ++num === result ) {
- break;
- }
- }
-
- return cur;
- },
-
- sibling: function( n, elem ) {
- var r = [];
-
- for ( ; n; n = n.nextSibling ) {
- if ( n.nodeType === 1 && n !== elem ) {
- r.push( n );
- }
- }
-
- return r;
- }
-});
-
-// Implement the identical functionality for filter and not
-function winnow( elements, qualifier, keep ) {
-
- // Can't pass null or undefined to indexOf in Firefox 4
- // Set to 0 to skip string check
- qualifier = qualifier || 0;
-
- if ( jQuery.isFunction( qualifier ) ) {
- return jQuery.grep(elements, function( elem, i ) {
- var retVal = !!qualifier.call( elem, i, elem );
- return retVal === keep;
- });
-
- } else if ( qualifier.nodeType ) {
- return jQuery.grep(elements, function( elem, i ) {
- return ( elem === qualifier ) === keep;
- });
-
- } else if ( typeof qualifier === "string" ) {
- var filtered = jQuery.grep(elements, function( elem ) {
- return elem.nodeType === 1;
- });
-
- if ( isSimple.test( qualifier ) ) {
- return jQuery.filter(qualifier, filtered, !keep);
- } else {
- qualifier = jQuery.filter( qualifier, filtered );
- }
- }
-
- return jQuery.grep(elements, function( elem, i ) {
- return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
- });
-}
-
-
-
-
-function createSafeFragment( document ) {
- var list = nodeNames.split( "|" ),
- safeFrag = document.createDocumentFragment();
-
- if ( safeFrag.createElement ) {
- while ( list.length ) {
- safeFrag.createElement(
- list.pop()
- );
- }
- }
- return safeFrag;
-}
-
-var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
- "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
- rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
- rleadingWhitespace = /^\s+/,
- rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
- rtagName = /<([\w:]+)/,
- rtbody = /<tbody/i,
- rhtml = /<|&#?\w+;/,
- rnoInnerhtml = /<(?:script|style)/i,
- rnocache = /<(?:script|object|embed|option|style)/i,
- rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
- // checked="checked" or checked
- rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
- rscriptType = /\/(java|ecma)script/i,
- rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/,
- wrapMap = {
- option: [ 1, "<select multiple='multiple'>", "</select>" ],
- legend: [ 1, "<fieldset>", "</fieldset>" ],
- thead: [ 1, "<table>", "</table>" ],
- tr: [ 2, "<table><tbody>", "</tbody></table>" ],
- td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
- col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
- area: [ 1, "<map>", "</map>" ],
- _default: [ 0, "", "" ]
- },
- safeFragment = createSafeFragment( document );
-
-wrapMap.optgroup = wrapMap.option;
-wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
-wrapMap.th = wrapMap.td;
-
-// IE can't serialize <link> and <script> tags normally
-if ( !jQuery.support.htmlSerialize ) {
- wrapMap._default = [ 1, "div<div>", "</div>" ];
-}
-
-jQuery.fn.extend({
- text: function( value ) {
- return jQuery.access( this, function( value ) {
- return value === undefined ?
- jQuery.text( this ) :
- this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
- }, null, value, arguments.length );
- },
-
- wrapAll: function( html ) {
- if ( jQuery.isFunction( html ) ) {
- return this.each(function(i) {
- jQuery(this).wrapAll( html.call(this, i) );
- });
- }
-
- if ( this[0] ) {
- // The elements to wrap the target around
- var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
-
- if ( this[0].parentNode ) {
- wrap.insertBefore( this[0] );
- }
-
- wrap.map(function() {
- var elem = this;
-
- while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
- elem = elem.firstChild;
- }
-
- return elem;
- }).append( this );
- }
-
- return this;
- },
-
- wrapInner: function( html ) {
- if ( jQuery.isFunction( html ) ) {
- return this.each(function(i) {
- jQuery(this).wrapInner( html.call(this, i) );
- });
- }
-
- return this.each(function() {
- var self = jQuery( this ),
- contents = self.contents();
-
- if ( contents.length ) {
- contents.wrapAll( html );
-
- } else {
- self.append( html );
- }
- });
- },
-
- wrap: function( html ) {
- var isFunction = jQuery.isFunction( html );
-
- return this.each(function(i) {
- jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
- });
- },
-
- unwrap: function() {
- return this.parent().each(function() {
- if ( !jQuery.nodeName( this, "body" ) ) {
- jQuery( this ).replaceWith( this.childNodes );
- }
- }).end();
- },
-
- append: function() {
- return this.domManip(arguments, true, function( elem ) {
- if ( this.nodeType === 1 ) {
- this.appendChild( elem );
- }
- });
- },
-
- prepend: function() {
- return this.domManip(arguments, true, function( elem ) {
- if ( this.nodeType === 1 ) {
- this.insertBefore( elem, this.firstChild );
- }
- });
- },
-
- before: function() {
- if ( this[0] && this[0].parentNode ) {
- return this.domManip(arguments, false, function( elem ) {
- this.parentNode.insertBefore( elem, this );
- });
- } else if ( arguments.length ) {
- var set = jQuery.clean( arguments );
- set.push.apply( set, this.toArray() );
- return this.pushStack( set, "before", arguments );
- }
- },
-
- after: function() {
- if ( this[0] && this[0].parentNode ) {
- return this.domManip(arguments, false, function( elem ) {
- this.parentNode.insertBefore( elem, this.nextSibling );
- });
- } else if ( arguments.length ) {
- var set = this.pushStack( this, "after", arguments );
- set.push.apply( set, jQuery.clean(arguments) );
- return set;
- }
- },
-
- // keepData is for internal use only--do not document
- remove: function( selector, keepData ) {
- for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
- if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
- if ( !keepData && elem.nodeType === 1 ) {
- jQuery.cleanData( elem.getElementsByTagName("*") );
- jQuery.cleanData( [ elem ] );
- }
-
- if ( elem.parentNode ) {
- elem.parentNode.removeChild( elem );
- }
- }
- }
-
- return this;
- },
-
- empty: function() {
- for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
- // Remove element nodes and prevent memory leaks
- if ( elem.nodeType === 1 ) {
- jQuery.cleanData( elem.getElementsByTagName("*") );
- }
-
- // Remove any remaining nodes
- while ( elem.firstChild ) {
- elem.removeChild( elem.firstChild );
- }
- }
-
- return this;
- },
-
- clone: function( dataAndEvents, deepDataAndEvents ) {
- dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
- deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
-
- return this.map( function () {
- return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
- });
- },
-
- html: function( value ) {
- return jQuery.access( this, function( value ) {
- var elem = this[0] || {},
- i = 0,
- l = this.length;
-
- if ( value === undefined ) {
- return elem.nodeType === 1 ?
- elem.innerHTML.replace( rinlinejQuery, "" ) :
- null;
- }
-
-
- if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
- ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
- !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
-
- value = value.replace( rxhtmlTag, "<$1></$2>" );
-
- try {
- for (; i < l; i++ ) {
- // Remove element nodes and prevent memory leaks
- elem = this[i] || {};
- if ( elem.nodeType === 1 ) {
- jQuery.cleanData( elem.getElementsByTagName( "*" ) );
- elem.innerHTML = value;
- }
- }
-
- elem = 0;
-
- // If using innerHTML throws an exception, use the fallback method
- } catch(e) {}
- }
-
- if ( elem ) {
- this.empty().append( value );
- }
- }, null, value, arguments.length );
- },
-
- replaceWith: function( value ) {
- if ( this[0] && this[0].parentNode ) {
- // Make sure that the elements are removed from the DOM before they are inserted
- // this can help fix replacing a parent with child elements
- if ( jQuery.isFunction( value ) ) {
- return this.each(function(i) {
- var self = jQuery(this), old = self.html();
- self.replaceWith( value.call( this, i, old ) );
- });
- }
-
- if ( typeof value !== "string" ) {
- value = jQuery( value ).detach();
- }
-
- return this.each(function() {
- var next = this.nextSibling,
- parent = this.parentNode;
-
- jQuery( this ).remove();
-
- if ( next ) {
- jQuery(next).before( value );
- } else {
- jQuery(parent).append( value );
- }
- });
- } else {
- return this.length ?
- this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) :
- this;
- }
- },
-
- detach: function( selector ) {
- return this.remove( selector, true );
- },
-
- domManip: function( args, table, callback ) {
- var results, first, fragment, parent,
- value = args[0],
- scripts = [];
-
- // We can't cloneNode fragments that contain checked, in WebKit
- if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
- return this.each(function() {
- jQuery(this).domManip( args, table, callback, true );
- });
- }
-
- if ( jQuery.isFunction(value) ) {
- return this.each(function(i) {
- var self = jQuery(this);
- args[0] = value.call(this, i, table ? self.html() : undefined);
- self.domManip( args, table, callback );
- });
- }
-
- if ( this[0] ) {
- parent = value && value.parentNode;
-
- // If we're in a fragment, just use that instead of building a new one
- if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
- results = { fragment: parent };
-
- } else {
- results = jQuery.buildFragment( args, this, scripts );
- }
-
- fragment = results.fragment;
-
- if ( fragment.childNodes.length === 1 ) {
- first = fragment = fragment.firstChild;
- } else {
- first = fragment.firstChild;
- }
-
- if ( first ) {
- table = table && jQuery.nodeName( first, "tr" );
-
- for ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) {
- callback.call(
- table ?
- root(this[i], first) :
- this[i],
- // Make sure that we do not leak memory by inadvertently discarding
- // the original fragment (which might have attached data) instead of
- // using it; in addition, use the original fragment object for the last
- // item instead of first because it can end up being emptied incorrectly
- // in certain situations (Bug #8070).
- // Fragments from the fragment cache must always be cloned and never used
- // in place.
- results.cacheable || ( l > 1 && i < lastIndex ) ?
- jQuery.clone( fragment, true, true ) :
- fragment
- );
- }
- }
-
- if ( scripts.length ) {
- jQuery.each( scripts, function( i, elem ) {
- if ( elem.src ) {
- jQuery.ajax({
- type: "GET",
- global: false,
- url: elem.src,
- async: false,
- dataType: "script"
- });
- } else {
- jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) );
- }
-
- if ( elem.parentNode ) {
- elem.parentNode.removeChild( elem );
- }
- });
- }
- }
-
- return this;
- }
-});
-
-function root( elem, cur ) {
- return jQuery.nodeName(elem, "table") ?
- (elem.getElementsByTagName("tbody")[0] ||
- elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
- elem;
-}
-
-function cloneCopyEvent( src, dest ) {
-
- if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
- return;
- }
-
- var type, i, l,
- oldData = jQuery._data( src ),
- curData = jQuery._data( dest, oldData ),
- events = oldData.events;
-
- if ( events ) {
- delete curData.handle;
- curData.events = {};
-
- for ( type in events ) {
- for ( i = 0, l = events[ type ].length; i < l; i++ ) {
- jQuery.event.add( dest, type, events[ type ][ i ] );
- }
- }
- }
-
- // make the cloned public data object a copy from the original
- if ( curData.data ) {
- curData.data = jQuery.extend( {}, curData.data );
- }
-}
-
-function cloneFixAttributes( src, dest ) {
- var nodeName;
-
- // We do not need to do anything for non-Elements
- if ( dest.nodeType !== 1 ) {
- return;
- }
-
- // clearAttributes removes the attributes, which we don't want,
- // but also removes the attachEvent events, which we *do* want
- if ( dest.clearAttributes ) {
- dest.clearAttributes();
- }
-
- // mergeAttributes, in contrast, only merges back on the
- // original attributes, not the events
- if ( dest.mergeAttributes ) {
- dest.mergeAttributes( src );
- }
-
- nodeName = dest.nodeName.toLowerCase();
-
- // IE6-8 fail to clone children inside object elements that use
- // the proprietary classid attribute value (rather than the type
- // attribute) to identify the type of content to display
- if ( nodeName === "object" ) {
- dest.outerHTML = src.outerHTML;
-
- } else if ( nodeName === "input" && (src.type === "checkbox" || src.type === "radio") ) {
- // IE6-8 fails to persist the checked state of a cloned checkbox
- // or radio button. Worse, IE6-7 fail to give the cloned element
- // a checked appearance if the defaultChecked value isn't also set
- if ( src.checked ) {
- dest.defaultChecked = dest.checked = src.checked;
- }
-
- // IE6-7 get confused and end up setting the value of a cloned
- // checkbox/radio button to an empty string instead of "on"
- if ( dest.value !== src.value ) {
- dest.value = src.value;
- }
-
- // IE6-8 fails to return the selected option to the default selected
- // state when cloning options
- } else if ( nodeName === "option" ) {
- dest.selected = src.defaultSelected;
-
- // IE6-8 fails to set the defaultValue to the correct value when
- // cloning other types of input fields
- } else if ( nodeName === "input" || nodeName === "textarea" ) {
- dest.defaultValue = src.defaultValue;
-
- // IE blanks contents when cloning scripts
- } else if ( nodeName === "script" && dest.text !== src.text ) {
- dest.text = src.text;
- }
-
- // Event data gets referenced instead of copied if the expando
- // gets copied too
- dest.removeAttribute( jQuery.expando );
-
- // Clear flags for bubbling special change/submit events, they must
- // be reattached when the newly cloned events are first activated
- dest.removeAttribute( "_submit_attached" );
- dest.removeAttribute( "_change_attached" );
-}
-
-jQuery.buildFragment = function( args, nodes, scripts ) {
- var fragment, cacheable, cacheresults, doc,
- first = args[ 0 ];
-
- // nodes may contain either an explicit document object,
- // a jQuery collection or context object.
- // If nodes[0] contains a valid object to assign to doc
- if ( nodes && nodes[0] ) {
- doc = nodes[0].ownerDocument || nodes[0];
- }
-
- // Ensure that an attr object doesn't incorrectly stand in as a document object
- // Chrome and Firefox seem to allow this to occur and will throw exception
- // Fixes #8950
- if ( !doc.createDocumentFragment ) {
- doc = document;
- }
-
- // Only cache "small" (1/2 KB) HTML strings that are associated with the main document
- // Cloning options loses the selected state, so don't cache them
- // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
- // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
- // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501
- if ( args.length === 1 && typeof first === "string" && first.length < 512 && doc === document &&
- first.charAt(0) === "<" && !rnocache.test( first ) &&
- (jQuery.support.checkClone || !rchecked.test( first )) &&
- (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
-
- cacheable = true;
-
- cacheresults = jQuery.fragments[ first ];
- if ( cacheresults && cacheresults !== 1 ) {
- fragment = cacheresults;
- }
- }
-
- if ( !fragment ) {
- fragment = doc.createDocumentFragment();
- jQuery.clean( args, doc, fragment, scripts );
- }
-
- if ( cacheable ) {
- jQuery.fragments[ first ] = cacheresults ? fragment : 1;
- }
-
- return { fragment: fragment, cacheable: cacheable };
-};
-
-jQuery.fragments = {};
-
-jQuery.each({
- appendTo: "append",
- prependTo: "prepend",
- insertBefore: "before",
- insertAfter: "after",
- replaceAll: "replaceWith"
-}, function( name, original ) {
- jQuery.fn[ name ] = function( selector ) {
- var ret = [],
- insert = jQuery( selector ),
- parent = this.length === 1 && this[0].parentNode;
-
- if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
- insert[ original ]( this[0] );
- return this;
-
- } else {
- for ( var i = 0, l = insert.length; i < l; i++ ) {
- var elems = ( i > 0 ? this.clone(true) : this ).get();
- jQuery( insert[i] )[ original ]( elems );
- ret = ret.concat( elems );
- }
-
- return this.pushStack( ret, name, insert.selector );
- }
- };
-});
-
-function getAll( elem ) {
- if ( typeof elem.getElementsByTagName !== "undefined" ) {
- return elem.getElementsByTagName( "*" );
-
- } else if ( typeof elem.querySelectorAll !== "undefined" ) {
- return elem.querySelectorAll( "*" );
-
- } else {
- return [];
- }
-}
-
-// Used in clean, fixes the defaultChecked property
-function fixDefaultChecked( elem ) {
- if ( elem.type === "checkbox" || elem.type === "radio" ) {
- elem.defaultChecked = elem.checked;
- }
-}
-// Finds all inputs and passes them to fixDefaultChecked
-function findInputs( elem ) {
- var nodeName = ( elem.nodeName || "" ).toLowerCase();
- if ( nodeName === "input" ) {
- fixDefaultChecked( elem );
- // Skip scripts, get other children
- } else if ( nodeName !== "script" && typeof elem.getElementsByTagName !== "undefined" ) {
- jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
- }
-}
-
-// Derived From: http://www.iecss.com/shimprove/javascript/shimprove.1-0-1.js
-function shimCloneNode( elem ) {
- var div = document.createElement( "div" );
- safeFragment.appendChild( div );
-
- div.innerHTML = elem.outerHTML;
- return div.firstChild;
-}
-
-jQuery.extend({
- clone: function( elem, dataAndEvents, deepDataAndEvents ) {
- var srcElements,
- destElements,
- i,
- // IE<=8 does not properly clone detached, unknown element nodes
- clone = jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ?
- elem.cloneNode( true ) :
- shimCloneNode( elem );
-
- if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
- (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
- // IE copies events bound via attachEvent when using cloneNode.
- // Calling detachEvent on the clone will also remove the events
- // from the original. In order to get around this, we use some
- // proprietary methods to clear the events. Thanks to MooTools
- // guys for this hotness.
-
- cloneFixAttributes( elem, clone );
-
- // Using Sizzle here is crazy slow, so we use getElementsByTagName instead
- srcElements = getAll( elem );
- destElements = getAll( clone );
-
- // Weird iteration because IE will replace the length property
- // with an element if you are cloning the body and one of the
- // elements on the page has a name or id of "length"
- for ( i = 0; srcElements[i]; ++i ) {
- // Ensure that the destination node is not null; Fixes #9587
- if ( destElements[i] ) {
- cloneFixAttributes( srcElements[i], destElements[i] );
- }
- }
- }
-
- // Copy the events from the original to the clone
- if ( dataAndEvents ) {
- cloneCopyEvent( elem, clone );
-
- if ( deepDataAndEvents ) {
- srcElements = getAll( elem );
- destElements = getAll( clone );
-
- for ( i = 0; srcElements[i]; ++i ) {
- cloneCopyEvent( srcElements[i], destElements[i] );
- }
- }
- }
-
- srcElements = destElements = null;
-
- // Return the cloned set
- return clone;
- },
-
- clean: function( elems, context, fragment, scripts ) {
- var checkScriptType, script, j,
- ret = [];
-
- context = context || document;
-
- // !context.createElement fails in IE with an error but returns typeof 'object'
- if ( typeof context.createElement === "undefined" ) {
- context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
- }
-
- for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
- if ( typeof elem === "number" ) {
- elem += "";
- }
-
- if ( !elem ) {
- continue;
- }
-
- // Convert html string into DOM nodes
- if ( typeof elem === "string" ) {
- if ( !rhtml.test( elem ) ) {
- elem = context.createTextNode( elem );
- } else {
- // Fix "XHTML"-style tags in all browsers
- elem = elem.replace(rxhtmlTag, "<$1></$2>");
-
- // Trim whitespace, otherwise indexOf won't work as expected
- var tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(),
- wrap = wrapMap[ tag ] || wrapMap._default,
- depth = wrap[0],
- div = context.createElement("div"),
- safeChildNodes = safeFragment.childNodes,
- remove;
-
- // Append wrapper element to unknown element safe doc fragment
- if ( context === document ) {
- // Use the fragment we've already created for this document
- safeFragment.appendChild( div );
- } else {
- // Use a fragment created with the owner document
- createSafeFragment( context ).appendChild( div );
- }
-
- // Go to html and back, then peel off extra wrappers
- div.innerHTML = wrap[1] + elem + wrap[2];
-
- // Move to the right depth
- while ( depth-- ) {
- div = div.lastChild;
- }
-
- // Remove IE's autoinserted <tbody> from table fragments
- if ( !jQuery.support.tbody ) {
-
- // String was a <table>, *may* have spurious <tbody>
- var hasBody = rtbody.test(elem),
- tbody = tag === "table" && !hasBody ?
- div.firstChild && div.firstChild.childNodes :
-
- // String was a bare <thead> or <tfoot>
- wrap[1] === "<table>" && !hasBody ?
- div.childNodes :
- [];
-
- for ( j = tbody.length - 1; j >= 0 ; --j ) {
- if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
- tbody[ j ].parentNode.removeChild( tbody[ j ] );
- }
- }
- }
-
- // IE completely kills leading whitespace when innerHTML is used
- if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
- div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
- }
-
- elem = div.childNodes;
-
- // Clear elements from DocumentFragment (safeFragment or otherwise)
- // to avoid hoarding elements. Fixes #11356
- if ( div ) {
- div.parentNode.removeChild( div );
-
- // Guard against -1 index exceptions in FF3.6
- if ( safeChildNodes.length > 0 ) {
- remove = safeChildNodes[ safeChildNodes.length - 1 ];
-
- if ( remove && remove.parentNode ) {
- remove.parentNode.removeChild( remove );
- }
- }
- }
- }
- }
-
- // Resets defaultChecked for any radios and checkboxes
- // about to be appended to the DOM in IE 6/7 (#8060)
- var len;
- if ( !jQuery.support.appendChecked ) {
- if ( elem[0] && typeof (len = elem.length) === "number" ) {
- for ( j = 0; j < len; j++ ) {
- findInputs( elem[j] );
- }
- } else {
- findInputs( elem );
- }
- }
-
- if ( elem.nodeType ) {
- ret.push( elem );
- } else {
- ret = jQuery.merge( ret, elem );
- }
- }
-
- if ( fragment ) {
- checkScriptType = function( elem ) {
- return !elem.type || rscriptType.test( elem.type );
- };
- for ( i = 0; ret[i]; i++ ) {
- script = ret[i];
- if ( scripts && jQuery.nodeName( script, "script" ) && (!script.type || rscriptType.test( script.type )) ) {
- scripts.push( script.parentNode ? script.parentNode.removeChild( script ) : script );
-
- } else {
- if ( script.nodeType === 1 ) {
- var jsTags = jQuery.grep( script.getElementsByTagName( "script" ), checkScriptType );
-
- ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
- }
- fragment.appendChild( script );
- }
- }
- }
-
- return ret;
- },
-
- cleanData: function( elems ) {
- var data, id,
- cache = jQuery.cache,
- special = jQuery.event.special,
- deleteExpando = jQuery.support.deleteExpando;
-
- for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
- if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
- continue;
- }
-
- id = elem[ jQuery.expando ];
-
- if ( id ) {
- data = cache[ id ];
-
- if ( data && data.events ) {
- for ( var type in data.events ) {
- if ( special[ type ] ) {
- jQuery.event.remove( elem, type );
-
- // This is a shortcut to avoid jQuery.event.remove's overhead
- } else {
- jQuery.removeEvent( elem, type, data.handle );
- }
- }
-
- // Null the DOM reference to avoid IE6/7/8 leak (#7054)
- if ( data.handle ) {
- data.handle.elem = null;
- }
- }
-
- if ( deleteExpando ) {
- delete elem[ jQuery.expando ];
-
- } else if ( elem.removeAttribute ) {
- elem.removeAttribute( jQuery.expando );
- }
-
- delete cache[ id ];
- }
- }
- }
-});
-
-
-
-
-var ralpha = /alpha\([^)]*\)/i,
- ropacity = /opacity=([^)]*)/,
- // fixed for IE9, see #8346
- rupper = /([A-Z]|^ms)/g,
- rnum = /^[\-+]?(?:\d*\.)?\d+$/i,
- rnumnonpx = /^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,
- rrelNum = /^([\-+])=([\-+.\de]+)/,
- rmargin = /^margin/,
-
- cssShow = { position: "absolute", visibility: "hidden", display: "block" },
-
- // order is important!
- cssExpand = [ "Top", "Right", "Bottom", "Left" ],
-
- curCSS,
-
- getComputedStyle,
- currentStyle;
-
-jQuery.fn.css = function( name, value ) {
- return jQuery.access( this, function( elem, name, value ) {
- return value !== undefined ?
- jQuery.style( elem, name, value ) :
- jQuery.css( elem, name );
- }, name, value, arguments.length > 1 );
-};
-
-jQuery.extend({
- // Add in style property hooks for overriding the default
- // behavior of getting and setting a style property
- cssHooks: {
- opacity: {
- get: function( elem, computed ) {
- if ( computed ) {
- // We should always get a number back from opacity
- var ret = curCSS( elem, "opacity" );
- return ret === "" ? "1" : ret;
-
- } else {
- return elem.style.opacity;
- }
- }
- }
- },
-
- // Exclude the following css properties to add px
- cssNumber: {
- "fillOpacity": true,
- "fontWeight": true,
- "lineHeight": true,
- "opacity": true,
- "orphans": true,
- "widows": true,
- "zIndex": true,
- "zoom": true
- },
-
- // Add in properties whose names you wish to fix before
- // setting or getting the value
- cssProps: {
- // normalize float css property
- "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
- },
-
- // Get and set the style property on a DOM Node
- style: function( elem, name, value, extra ) {
- // Don't set styles on text and comment nodes
- if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
- return;
- }
-
- // Make sure that we're working with the right name
- var ret, type, origName = jQuery.camelCase( name ),
- style = elem.style, hooks = jQuery.cssHooks[ origName ];
-
- name = jQuery.cssProps[ origName ] || origName;
-
- // Check if we're setting a value
- if ( value !== undefined ) {
- type = typeof value;
-
- // convert relative number strings (+= or -=) to relative numbers. #7345
- if ( type === "string" && (ret = rrelNum.exec( value )) ) {
- value = ( +( ret[1] + 1) * +ret[2] ) + parseFloat( jQuery.css( elem, name ) );
- // Fixes bug #9237
- type = "number";
- }
-
- // Make sure that NaN and null values aren't set. See: #7116
- if ( value == null || type === "number" && isNaN( value ) ) {
- return;
- }
-
- // If a number was passed in, add 'px' to the (except for certain CSS properties)
- if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
- value += "px";
- }
-
- // If a hook was provided, use that value, otherwise just set the specified value
- if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {
- // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
- // Fixes bug #5509
- try {
- style[ name ] = value;
- } catch(e) {}
- }
-
- } else {
- // If a hook was provided get the non-computed value from there
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
- return ret;
- }
-
- // Otherwise just get the value from the style object
- return style[ name ];
- }
- },
-
- css: function( elem, name, extra ) {
- var ret, hooks;
-
- // Make sure that we're working with the right name
- name = jQuery.camelCase( name );
- hooks = jQuery.cssHooks[ name ];
- name = jQuery.cssProps[ name ] || name;
-
- // cssFloat needs a special treatment
- if ( name === "cssFloat" ) {
- name = "float";
- }
-
- // If a hook was provided get the computed value from there
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
- return ret;
-
- // Otherwise, if a way to get the computed value exists, use that
- } else if ( curCSS ) {
- return curCSS( elem, name );
- }
- },
-
- // A method for quickly swapping in/out CSS properties to get correct calculations
- swap: function( elem, options, callback ) {
- var old = {},
- ret, name;
-
- // Remember the old values, and insert the new ones
- for ( name in options ) {
- old[ name ] = elem.style[ name ];
- elem.style[ name ] = options[ name ];
- }
-
- ret = callback.call( elem );
-
- // Revert the old values
- for ( name in options ) {
- elem.style[ name ] = old[ name ];
- }
-
- return ret;
- }
-});
-
-// DEPRECATED in 1.3, Use jQuery.css() instead
-jQuery.curCSS = jQuery.css;
-
-if ( document.defaultView && document.defaultView.getComputedStyle ) {
- getComputedStyle = function( elem, name ) {
- var ret, defaultView, computedStyle, width,
- style = elem.style;
-
- name = name.replace( rupper, "-$1" ).toLowerCase();
-
- if ( (defaultView = elem.ownerDocument.defaultView) &&
- (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
-
- ret = computedStyle.getPropertyValue( name );
- if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
- ret = jQuery.style( elem, name );
- }
- }
-
- // A tribute to the "awesome hack by Dean Edwards"
- // WebKit uses "computed value (percentage if specified)" instead of "used value" for margins
- // which is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
- if ( !jQuery.support.pixelMargin && computedStyle && rmargin.test( name ) && rnumnonpx.test( ret ) ) {
- width = style.width;
- style.width = ret;
- ret = computedStyle.width;
- style.width = width;
- }
-
- return ret;
- };
-}
-
-if ( document.documentElement.currentStyle ) {
- currentStyle = function( elem, name ) {
- var left, rsLeft, uncomputed,
- ret = elem.currentStyle && elem.currentStyle[ name ],
- style = elem.style;
-
- // Avoid setting ret to empty string here
- // so we don't default to auto
- if ( ret == null && style && (uncomputed = style[ name ]) ) {
- ret = uncomputed;
- }
-
- // From the awesome hack by Dean Edwards
- // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
-
- // If we're not dealing with a regular pixel number
- // but a number that has a weird ending, we need to convert it to pixels
- if ( rnumnonpx.test( ret ) ) {
-
- // Remember the original values
- left = style.left;
- rsLeft = elem.runtimeStyle && elem.runtimeStyle.left;
-
- // Put in the new values to get a computed value out
- if ( rsLeft ) {
- elem.runtimeStyle.left = elem.currentStyle.left;
- }
- style.left = name === "fontSize" ? "1em" : ret;
- ret = style.pixelLeft + "px";
-
- // Revert the changed values
- style.left = left;
- if ( rsLeft ) {
- elem.runtimeStyle.left = rsLeft;
- }
- }
-
- return ret === "" ? "auto" : ret;
- };
-}
-
-curCSS = getComputedStyle || currentStyle;
-
-function getWidthOrHeight( elem, name, extra ) {
-
- // Start with offset property
- var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
- i = name === "width" ? 1 : 0,
- len = 4;
-
- if ( val > 0 ) {
- if ( extra !== "border" ) {
- for ( ; i < len; i += 2 ) {
- if ( !extra ) {
- val -= parseFloat( jQuery.css( elem, "padding" + cssExpand[ i ] ) ) || 0;
- }
- if ( extra === "margin" ) {
- val += parseFloat( jQuery.css( elem, extra + cssExpand[ i ] ) ) || 0;
- } else {
- val -= parseFloat( jQuery.css( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;
- }
- }
- }
-
- return val + "px";
- }
-
- // Fall back to computed then uncomputed css if necessary
- val = curCSS( elem, name );
- if ( val < 0 || val == null ) {
- val = elem.style[ name ];
- }
-
- // Computed unit is not pixels. Stop here and return.
- if ( rnumnonpx.test(val) ) {
- return val;
- }
-
- // Normalize "", auto, and prepare for extra
- val = parseFloat( val ) || 0;
-
- // Add padding, border, margin
- if ( extra ) {
- for ( ; i < len; i += 2 ) {
- val += parseFloat( jQuery.css( elem, "padding" + cssExpand[ i ] ) ) || 0;
- if ( extra !== "padding" ) {
- val += parseFloat( jQuery.css( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;
- }
- if ( extra === "margin" ) {
- val += parseFloat( jQuery.css( elem, extra + cssExpand[ i ]) ) || 0;
- }
- }
- }
-
- return val + "px";
-}
-
-jQuery.each([ "height", "width" ], function( i, name ) {
- jQuery.cssHooks[ name ] = {
- get: function( elem, computed, extra ) {
- if ( computed ) {
- if ( elem.offsetWidth !== 0 ) {
- return getWidthOrHeight( elem, name, extra );
- } else {
- return jQuery.swap( elem, cssShow, function() {
- return getWidthOrHeight( elem, name, extra );
- });
- }
- }
- },
-
- set: function( elem, value ) {
- return rnum.test( value ) ?
- value + "px" :
- value;
- }
- };
-});
-
-if ( !jQuery.support.opacity ) {
- jQuery.cssHooks.opacity = {
- get: function( elem, computed ) {
- // IE uses filters for opacity
- return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
- ( parseFloat( RegExp.$1 ) / 100 ) + "" :
- computed ? "1" : "";
- },
-
- set: function( elem, value ) {
- var style = elem.style,
- currentStyle = elem.currentStyle,
- opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
- filter = currentStyle && currentStyle.filter || style.filter || "";
-
- // IE has trouble with opacity if it does not have layout
- // Force it by setting the zoom level
- style.zoom = 1;
-
- // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
- if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" ) {
-
- // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
- // if "filter:" is present at all, clearType is disabled, we want to avoid this
- // style.removeAttribute is IE Only, but so apparently is this code path...
- style.removeAttribute( "filter" );
-
- // if there there is no filter style applied in a css rule, we are done
- if ( currentStyle && !currentStyle.filter ) {
- return;
- }
- }
-
- // otherwise, set new filter values
- style.filter = ralpha.test( filter ) ?
- filter.replace( ralpha, opacity ) :
- filter + " " + opacity;
- }
- };
-}
-
-jQuery(function() {
- // This hook cannot be added until DOM ready because the support test
- // for it is not run until after DOM ready
- if ( !jQuery.support.reliableMarginRight ) {
- jQuery.cssHooks.marginRight = {
- get: function( elem, computed ) {
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- // Work around by temporarily setting element display to inline-block
- return jQuery.swap( elem, { "display": "inline-block" }, function() {
- if ( computed ) {
- return curCSS( elem, "margin-right" );
- } else {
- return elem.style.marginRight;
- }
- });
- }
- };
- }
-});
-
-if ( jQuery.expr && jQuery.expr.filters ) {
- jQuery.expr.filters.hidden = function( elem ) {
- var width = elem.offsetWidth,
- height = elem.offsetHeight;
-
- return ( width === 0 && height === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
- };
-
- jQuery.expr.filters.visible = function( elem ) {
- return !jQuery.expr.filters.hidden( elem );
- };
-}
-
-// These hooks are used by animate to expand properties
-jQuery.each({
- margin: "",
- padding: "",
- border: "Width"
-}, function( prefix, suffix ) {
-
- jQuery.cssHooks[ prefix + suffix ] = {
- expand: function( value ) {
- var i,
-
- // assumes a single number if not a string
- parts = typeof value === "string" ? value.split(" ") : [ value ],
- expanded = {};
-
- for ( i = 0; i < 4; i++ ) {
- expanded[ prefix + cssExpand[ i ] + suffix ] =
- parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
- }
-
- return expanded;
- }
- };
-});
-
-
-
-
-var r20 = /%20/g,
- rbracket = /\[\]$/,
- rCRLF = /\r?\n/g,
- rhash = /#.*$/,
- rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
- rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
- // #7653, #8125, #8152: local protocol detection
- rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
- rnoContent = /^(?:GET|HEAD)$/,
- rprotocol = /^\/\//,
- rquery = /\?/,
- rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
- rselectTextarea = /^(?:select|textarea)/i,
- rspacesAjax = /\s+/,
- rts = /([?&])_=[^&]*/,
- rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
-
- // Keep a copy of the old load method
- _load = jQuery.fn.load,
-
- /* Prefilters
- * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
- * 2) These are called:
- * - BEFORE asking for a transport
- * - AFTER param serialization (s.data is a string if s.processData is true)
- * 3) key is the dataType
- * 4) the catchall symbol "*" can be used
- * 5) execution will start with transport dataType and THEN continue down to "*" if needed
- */
- prefilters = {},
-
- /* Transports bindings
- * 1) key is the dataType
- * 2) the catchall symbol "*" can be used
- * 3) selection will start with transport dataType and THEN go to "*" if needed
- */
- transports = {},
-
- // Document location
- ajaxLocation,
-
- // Document location segments
- ajaxLocParts,
-
- // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
- allTypes = ["*/"] + ["*"];
-
-// #8138, IE may throw an exception when accessing
-// a field from window.location if document.domain has been set
-try {
- ajaxLocation = location.href;
-} catch( e ) {
- // Use the href attribute of an A element
- // since IE will modify it given document.location
- ajaxLocation = document.createElement( "a" );
- ajaxLocation.href = "";
- ajaxLocation = ajaxLocation.href;
-}
-
-// Segment location into parts
-ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
-
-// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
-function addToPrefiltersOrTransports( structure ) {
-
- // dataTypeExpression is optional and defaults to "*"
- return function( dataTypeExpression, func ) {
-
- if ( typeof dataTypeExpression !== "string" ) {
- func = dataTypeExpression;
- dataTypeExpression = "*";
- }
-
- if ( jQuery.isFunction( func ) ) {
- var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),
- i = 0,
- length = dataTypes.length,
- dataType,
- list,
- placeBefore;
-
- // For each dataType in the dataTypeExpression
- for ( ; i < length; i++ ) {
- dataType = dataTypes[ i ];
- // We control if we're asked to add before
- // any existing element
- placeBefore = /^\+/.test( dataType );
- if ( placeBefore ) {
- dataType = dataType.substr( 1 ) || "*";
- }
- list = structure[ dataType ] = structure[ dataType ] || [];
- // then we add to the structure accordingly
- list[ placeBefore ? "unshift" : "push" ]( func );
- }
- }
- };
-}
-
-// Base inspection function for prefilters and transports
-function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,
- dataType /* internal */, inspected /* internal */ ) {
-
- dataType = dataType || options.dataTypes[ 0 ];
- inspected = inspected || {};
-
- inspected[ dataType ] = true;
-
- var list = structure[ dataType ],
- i = 0,
- length = list ? list.length : 0,
- executeOnly = ( structure === prefilters ),
- selection;
-
- for ( ; i < length && ( executeOnly || !selection ); i++ ) {
- selection = list[ i ]( options, originalOptions, jqXHR );
- // If we got redirected to another dataType
- // we try there if executing only and not done already
- if ( typeof selection === "string" ) {
- if ( !executeOnly || inspected[ selection ] ) {
- selection = undefined;
- } else {
- options.dataTypes.unshift( selection );
- selection = inspectPrefiltersOrTransports(
- structure, options, originalOptions, jqXHR, selection, inspected );
- }
- }
- }
- // If we're only executing or nothing was selected
- // we try the catchall dataType if not done already
- if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) {
- selection = inspectPrefiltersOrTransports(
- structure, options, originalOptions, jqXHR, "*", inspected );
- }
- // unnecessary when only executing (prefilters)
- // but it'll be ignored by the caller in that case
- return selection;
-}
-
-// A special extend for ajax options
-// that takes "flat" options (not to be deep extended)
-// Fixes #9887
-function ajaxExtend( target, src ) {
- var key, deep,
- flatOptions = jQuery.ajaxSettings.flatOptions || {};
- for ( key in src ) {
- if ( src[ key ] !== undefined ) {
- ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
- }
- }
- if ( deep ) {
- jQuery.extend( true, target, deep );
- }
-}
-
-jQuery.fn.extend({
- load: function( url, params, callback ) {
- if ( typeof url !== "string" && _load ) {
- return _load.apply( this, arguments );
-
- // Don't do a request if no elements are being requested
- } else if ( !this.length ) {
- return this;
- }
-
- var off = url.indexOf( " " );
- if ( off >= 0 ) {
- var selector = url.slice( off, url.length );
- url = url.slice( 0, off );
- }
-
- // Default to a GET request
- var type = "GET";
-
- // If the second parameter was provided
- if ( params ) {
- // If it's a function
- if ( jQuery.isFunction( params ) ) {
- // We assume that it's the callback
- callback = params;
- params = undefined;
-
- // Otherwise, build a param string
- } else if ( typeof params === "object" ) {
- params = jQuery.param( params, jQuery.ajaxSettings.traditional );
- type = "POST";
- }
- }
-
- var self = this;
-
- // Request the remote document
- jQuery.ajax({
- url: url,
- type: type,
- dataType: "html",
- data: params,
- // Complete callback (responseText is used internally)
- complete: function( jqXHR, status, responseText ) {
- // Store the response as specified by the jqXHR object
- responseText = jqXHR.responseText;
- // If successful, inject the HTML into all the matched elements
- if ( jqXHR.isResolved() ) {
- // #4825: Get the actual response in case
- // a dataFilter is present in ajaxSettings
- jqXHR.done(function( r ) {
- responseText = r;
- });
- // See if a selector was specified
- self.html( selector ?
- // Create a dummy div to hold the results
- jQuery("<div>")
- // inject the contents of the document in, removing the scripts
- // to avoid any 'Permission Denied' errors in IE
- .append(responseText.replace(rscript, ""))
-
- // Locate the specified elements
- .find(selector) :
-
- // If not, just inject the full result
- responseText );
- }
-
- if ( callback ) {
- self.each( callback, [ responseText, status, jqXHR ] );
- }
- }
- });
-
- return this;
- },
-
- serialize: function() {
- return jQuery.param( this.serializeArray() );
- },
-
- serializeArray: function() {
- return this.map(function(){
- return this.elements ? jQuery.makeArray( this.elements ) : this;
- })
- .filter(function(){
- return this.name && !this.disabled &&
- ( this.checked || rselectTextarea.test( this.nodeName ) ||
- rinput.test( this.type ) );
- })
- .map(function( i, elem ){
- var val = jQuery( this ).val();
-
- return val == null ?
- null :
- jQuery.isArray( val ) ?
- jQuery.map( val, function( val, i ){
- return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
- }) :
- { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
- }).get();
- }
-});
-
-// Attach a bunch of functions for handling common AJAX events
-jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){
- jQuery.fn[ o ] = function( f ){
- return this.on( o, f );
- };
-});
-
-jQuery.each( [ "get", "post" ], function( i, method ) {
- jQuery[ method ] = function( url, data, callback, type ) {
- // shift arguments if data argument was omitted
- if ( jQuery.isFunction( data ) ) {
- type = type || callback;
- callback = data;
- data = undefined;
- }
-
- return jQuery.ajax({
- type: method,
- url: url,
- data: data,
- success: callback,
- dataType: type
- });
- };
-});
-
-jQuery.extend({
-
- getScript: function( url, callback ) {
- return jQuery.get( url, undefined, callback, "script" );
- },
-
- getJSON: function( url, data, callback ) {
- return jQuery.get( url, data, callback, "json" );
- },
-
- // Creates a full fledged settings object into target
- // with both ajaxSettings and settings fields.
- // If target is omitted, writes into ajaxSettings.
- ajaxSetup: function( target, settings ) {
- if ( settings ) {
- // Building a settings object
- ajaxExtend( target, jQuery.ajaxSettings );
- } else {
- // Extending ajaxSettings
- settings = target;
- target = jQuery.ajaxSettings;
- }
- ajaxExtend( target, settings );
- return target;
- },
-
- ajaxSettings: {
- url: ajaxLocation,
- isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
- global: true,
- type: "GET",
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- processData: true,
- async: true,
- /*
- timeout: 0,
- data: null,
- dataType: null,
- username: null,
- password: null,
- cache: null,
- traditional: false,
- headers: {},
- */
-
- accepts: {
- xml: "application/xml, text/xml",
- html: "text/html",
- text: "text/plain",
- json: "application/json, text/javascript",
- "*": allTypes
- },
-
- contents: {
- xml: /xml/,
- html: /html/,
- json: /json/
- },
-
- responseFields: {
- xml: "responseXML",
- text: "responseText"
- },
-
- // List of data converters
- // 1) key format is "source_type destination_type" (a single space in-between)
- // 2) the catchall symbol "*" can be used for source_type
- converters: {
-
- // Convert anything to text
- "* text": window.String,
-
- // Text to html (true = no transformation)
- "text html": true,
-
- // Evaluate text as a json expression
- "text json": jQuery.parseJSON,
-
- // Parse text as xml
- "text xml": jQuery.parseXML
- },
-
- // For options that shouldn't be deep extended:
- // you can add your own custom options here if
- // and when you create one that shouldn't be
- // deep extended (see ajaxExtend)
- flatOptions: {
- context: true,
- url: true
- }
- },
-
- ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
- ajaxTransport: addToPrefiltersOrTransports( transports ),
-
- // Main method
- ajax: function( url, options ) {
-
- // If url is an object, simulate pre-1.5 signature
- if ( typeof url === "object" ) {
- options = url;
- url = undefined;
- }
-
- // Force options to be an object
- options = options || {};
-
- var // Create the final options object
- s = jQuery.ajaxSetup( {}, options ),
- // Callbacks context
- callbackContext = s.context || s,
- // Context for global events
- // It's the callbackContext if one was provided in the options
- // and if it's a DOM node or a jQuery collection
- globalEventContext = callbackContext !== s &&
- ( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
- jQuery( callbackContext ) : jQuery.event,
- // Deferreds
- deferred = jQuery.Deferred(),
- completeDeferred = jQuery.Callbacks( "once memory" ),
- // Status-dependent callbacks
- statusCode = s.statusCode || {},
- // ifModified key
- ifModifiedKey,
- // Headers (they are sent all at once)
- requestHeaders = {},
- requestHeadersNames = {},
- // Response headers
- responseHeadersString,
- responseHeaders,
- // transport
- transport,
- // timeout handle
- timeoutTimer,
- // Cross-domain detection vars
- parts,
- // The jqXHR state
- state = 0,
- // To know if global events are to be dispatched
- fireGlobals,
- // Loop variable
- i,
- // Fake xhr
- jqXHR = {
-
- readyState: 0,
-
- // Caches the header
- setRequestHeader: function( name, value ) {
- if ( !state ) {
- var lname = name.toLowerCase();
- name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
- requestHeaders[ name ] = value;
- }
- return this;
- },
-
- // Raw string
- getAllResponseHeaders: function() {
- return state === 2 ? responseHeadersString : null;
- },
-
- // Builds headers hashtable if needed
- getResponseHeader: function( key ) {
- var match;
- if ( state === 2 ) {
- if ( !responseHeaders ) {
- responseHeaders = {};
- while( ( match = rheaders.exec( responseHeadersString ) ) ) {
- responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
- }
- }
- match = responseHeaders[ key.toLowerCase() ];
- }
- return match === undefined ? null : match;
- },
-
- // Overrides response content-type header
- overrideMimeType: function( type ) {
- if ( !state ) {
- s.mimeType = type;
- }
- return this;
- },
-
- // Cancel the request
- abort: function( statusText ) {
- statusText = statusText || "abort";
- if ( transport ) {
- transport.abort( statusText );
- }
- done( 0, statusText );
- return this;
- }
- };
-
- // Callback for when everything is done
- // It is defined here because jslint complains if it is declared
- // at the end of the function (which would be more logical and readable)
- function done( status, nativeStatusText, responses, headers ) {
-
- // Called once
- if ( state === 2 ) {
- return;
- }
-
- // State is "done" now
- state = 2;
-
- // Clear timeout if it exists
- if ( timeoutTimer ) {
- clearTimeout( timeoutTimer );
- }
-
- // Dereference transport for early garbage collection
- // (no matter how long the jqXHR object will be used)
- transport = undefined;
-
- // Cache response headers
- responseHeadersString = headers || "";
-
- // Set readyState
- jqXHR.readyState = status > 0 ? 4 : 0;
-
- var isSuccess,
- success,
- error,
- statusText = nativeStatusText,
- response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,
- lastModified,
- etag;
-
- // If successful, handle type chaining
- if ( status >= 200 && status < 300 || status === 304 ) {
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if ( s.ifModified ) {
-
- if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) {
- jQuery.lastModified[ ifModifiedKey ] = lastModified;
- }
- if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) {
- jQuery.etag[ ifModifiedKey ] = etag;
- }
- }
-
- // If not modified
- if ( status === 304 ) {
-
- statusText = "notmodified";
- isSuccess = true;
-
- // If we have data
- } else {
-
- try {
- success = ajaxConvert( s, response );
- statusText = "success";
- isSuccess = true;
- } catch(e) {
- // We have a parsererror
- statusText = "parsererror";
- error = e;
- }
- }
- } else {
- // We extract error from statusText
- // then normalize statusText and status for non-aborts
- error = statusText;
- if ( !statusText || status ) {
- statusText = "error";
- if ( status < 0 ) {
- status = 0;
- }
- }
- }
-
- // Set data for the fake xhr object
- jqXHR.status = status;
- jqXHR.statusText = "" + ( nativeStatusText || statusText );
-
- // Success/Error
- if ( isSuccess ) {
- deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
- } else {
- deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
- }
-
- // Status-dependent callbacks
- jqXHR.statusCode( statusCode );
- statusCode = undefined;
-
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
- [ jqXHR, s, isSuccess ? success : error ] );
- }
-
- // Complete
- completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
-
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
- // Handle the global AJAX counter
- if ( !( --jQuery.active ) ) {
- jQuery.event.trigger( "ajaxStop" );
- }
- }
- }
-
- // Attach deferreds
- deferred.promise( jqXHR );
- jqXHR.success = jqXHR.done;
- jqXHR.error = jqXHR.fail;
- jqXHR.complete = completeDeferred.add;
-
- // Status-dependent callbacks
- jqXHR.statusCode = function( map ) {
- if ( map ) {
- var tmp;
- if ( state < 2 ) {
- for ( tmp in map ) {
- statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
- }
- } else {
- tmp = map[ jqXHR.status ];
- jqXHR.then( tmp, tmp );
- }
- }
- return this;
- };
-
- // Remove hash character (#7531: and string promotion)
- // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
- // We also use the url parameter if available
- s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
-
- // Extract dataTypes list
- s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax );
-
- // Determine if a cross-domain request is in order
- if ( s.crossDomain == null ) {
- parts = rurl.exec( s.url.toLowerCase() );
- s.crossDomain = !!( parts &&
- ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||
- ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
- ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
- );
- }
-
- // Convert data if not already a string
- if ( s.data && s.processData && typeof s.data !== "string" ) {
- s.data = jQuery.param( s.data, s.traditional );
- }
-
- // Apply prefilters
- inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
-
- // If request was aborted inside a prefilter, stop there
- if ( state === 2 ) {
- return false;
- }
-
- // We can fire global events as of now if asked to
- fireGlobals = s.global;
-
- // Uppercase the type
- s.type = s.type.toUpperCase();
-
- // Determine if request has content
- s.hasContent = !rnoContent.test( s.type );
-
- // Watch for a new set of requests
- if ( fireGlobals && jQuery.active++ === 0 ) {
- jQuery.event.trigger( "ajaxStart" );
- }
-
- // More options handling for requests with no content
- if ( !s.hasContent ) {
-
- // If data is available, append data to url
- if ( s.data ) {
- s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;
- // #9682: remove data so that it's not used in an eventual retry
- delete s.data;
- }
-
- // Get ifModifiedKey before adding the anti-cache parameter
- ifModifiedKey = s.url;
-
- // Add anti-cache in url if needed
- if ( s.cache === false ) {
-
- var ts = jQuery.now(),
- // try replacing _= if it is there
- ret = s.url.replace( rts, "$1_=" + ts );
-
- // if nothing was replaced, add timestamp to the end
- s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
- }
- }
-
- // Set the correct header, if data is being sent
- if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
- jqXHR.setRequestHeader( "Content-Type", s.contentType );
- }
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if ( s.ifModified ) {
- ifModifiedKey = ifModifiedKey || s.url;
- if ( jQuery.lastModified[ ifModifiedKey ] ) {
- jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] );
- }
- if ( jQuery.etag[ ifModifiedKey ] ) {
- jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] );
- }
- }
-
- // Set the Accepts header for the server, depending on the dataType
- jqXHR.setRequestHeader(
- "Accept",
- s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
- s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
- s.accepts[ "*" ]
- );
-
- // Check for headers option
- for ( i in s.headers ) {
- jqXHR.setRequestHeader( i, s.headers[ i ] );
- }
-
- // Allow custom headers/mimetypes and early abort
- if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
- // Abort if not done already
- jqXHR.abort();
- return false;
-
- }
-
- // Install callbacks on deferreds
- for ( i in { success: 1, error: 1, complete: 1 } ) {
- jqXHR[ i ]( s[ i ] );
- }
-
- // Get transport
- transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
-
- // If no transport, we auto-abort
- if ( !transport ) {
- done( -1, "No Transport" );
- } else {
- jqXHR.readyState = 1;
- // Send global event
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
- }
- // Timeout
- if ( s.async && s.timeout > 0 ) {
- timeoutTimer = setTimeout( function(){
- jqXHR.abort( "timeout" );
- }, s.timeout );
- }
-
- try {
- state = 1;
- transport.send( requestHeaders, done );
- } catch (e) {
- // Propagate exception as error if not done
- if ( state < 2 ) {
- done( -1, e );
- // Simply rethrow otherwise
- } else {
- throw e;
- }
- }
- }
-
- return jqXHR;
- },
-
- // Serialize an array of form elements or a set of
- // key/values into a query string
- param: function( a, traditional ) {
- var s = [],
- add = function( key, value ) {
- // If value is a function, invoke it and return its value
- value = jQuery.isFunction( value ) ? value() : value;
- s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
- };
-
- // Set traditional to true for jQuery <= 1.3.2 behavior.
- if ( traditional === undefined ) {
- traditional = jQuery.ajaxSettings.traditional;
- }
-
- // If an array was passed in, assume that it is an array of form elements.
- if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
- // Serialize the form elements
- jQuery.each( a, function() {
- add( this.name, this.value );
- });
-
- } else {
- // If traditional, encode the "old" way (the way 1.3.2 or older
- // did it), otherwise encode params recursively.
- for ( var prefix in a ) {
- buildParams( prefix, a[ prefix ], traditional, add );
- }
- }
-
- // Return the resulting serialization
- return s.join( "&" ).replace( r20, "+" );
- }
-});
-
-function buildParams( prefix, obj, traditional, add ) {
- if ( jQuery.isArray( obj ) ) {
- // Serialize array item.
- jQuery.each( obj, function( i, v ) {
- if ( traditional || rbracket.test( prefix ) ) {
- // Treat each array item as a scalar.
- add( prefix, v );
-
- } else {
- // If array item is non-scalar (array or object), encode its
- // numeric index to resolve deserialization ambiguity issues.
- // Note that rack (as of 1.0.0) can't currently deserialize
- // nested arrays properly, and attempting to do so may cause
- // a server error. Possible fixes are to modify rack's
- // deserialization algorithm or to provide an option or flag
- // to force array serialization to be shallow.
- buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
- }
- });
-
- } else if ( !traditional && jQuery.type( obj ) === "object" ) {
- // Serialize object item.
- for ( var name in obj ) {
- buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
- }
-
- } else {
- // Serialize scalar item.
- add( prefix, obj );
- }
-}
-
-// This is still on the jQuery object... for now
-// Want to move this to jQuery.ajax some day
-jQuery.extend({
-
- // Counter for holding the number of active queries
- active: 0,
-
- // Last-Modified header cache for next request
- lastModified: {},
- etag: {}
-
-});
-
-/* Handles responses to an ajax request:
- * - sets all responseXXX fields accordingly
- * - finds the right dataType (mediates between content-type and expected dataType)
- * - returns the corresponding response
- */
-function ajaxHandleResponses( s, jqXHR, responses ) {
-
- var contents = s.contents,
- dataTypes = s.dataTypes,
- responseFields = s.responseFields,
- ct,
- type,
- finalDataType,
- firstDataType;
-
- // Fill responseXXX fields
- for ( type in responseFields ) {
- if ( type in responses ) {
- jqXHR[ responseFields[type] ] = responses[ type ];
- }
- }
-
- // Remove auto dataType and get content-type in the process
- while( dataTypes[ 0 ] === "*" ) {
- dataTypes.shift();
- if ( ct === undefined ) {
- ct = s.mimeType || jqXHR.getResponseHeader( "content-type" );
- }
- }
-
- // Check if we're dealing with a known content-type
- if ( ct ) {
- for ( type in contents ) {
- if ( contents[ type ] && contents[ type ].test( ct ) ) {
- dataTypes.unshift( type );
- break;
- }
- }
- }
-
- // Check to see if we have a response for the expected dataType
- if ( dataTypes[ 0 ] in responses ) {
- finalDataType = dataTypes[ 0 ];
- } else {
- // Try convertible dataTypes
- for ( type in responses ) {
- if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
- finalDataType = type;
- break;
- }
- if ( !firstDataType ) {
- firstDataType = type;
- }
- }
- // Or just use first one
- finalDataType = finalDataType || firstDataType;
- }
-
- // If we found a dataType
- // We add the dataType to the list if needed
- // and return the corresponding response
- if ( finalDataType ) {
- if ( finalDataType !== dataTypes[ 0 ] ) {
- dataTypes.unshift( finalDataType );
- }
- return responses[ finalDataType ];
- }
-}
-
-// Chain conversions given the request and the original response
-function ajaxConvert( s, response ) {
-
- // Apply the dataFilter if provided
- if ( s.dataFilter ) {
- response = s.dataFilter( response, s.dataType );
- }
-
- var dataTypes = s.dataTypes,
- converters = {},
- i,
- key,
- length = dataTypes.length,
- tmp,
- // Current and previous dataTypes
- current = dataTypes[ 0 ],
- prev,
- // Conversion expression
- conversion,
- // Conversion function
- conv,
- // Conversion functions (transitive conversion)
- conv1,
- conv2;
-
- // For each dataType in the chain
- for ( i = 1; i < length; i++ ) {
-
- // Create converters map
- // with lowercased keys
- if ( i === 1 ) {
- for ( key in s.converters ) {
- if ( typeof key === "string" ) {
- converters[ key.toLowerCase() ] = s.converters[ key ];
- }
- }
- }
-
- // Get the dataTypes
- prev = current;
- current = dataTypes[ i ];
-
- // If current is auto dataType, update it to prev
- if ( current === "*" ) {
- current = prev;
- // If no auto and dataTypes are actually different
- } else if ( prev !== "*" && prev !== current ) {
-
- // Get the converter
- conversion = prev + " " + current;
- conv = converters[ conversion ] || converters[ "* " + current ];
-
- // If there is no direct converter, search transitively
- if ( !conv ) {
- conv2 = undefined;
- for ( conv1 in converters ) {
- tmp = conv1.split( " " );
- if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) {
- conv2 = converters[ tmp[1] + " " + current ];
- if ( conv2 ) {
- conv1 = converters[ conv1 ];
- if ( conv1 === true ) {
- conv = conv2;
- } else if ( conv2 === true ) {
- conv = conv1;
- }
- break;
- }
- }
- }
- }
- // If we found no converter, dispatch an error
- if ( !( conv || conv2 ) ) {
- jQuery.error( "No conversion from " + conversion.replace(" "," to ") );
- }
- // If found converter is not an equivalence
- if ( conv !== true ) {
- // Convert with 1 or 2 converters accordingly
- response = conv ? conv( response ) : conv2( conv1(response) );
- }
- }
- }
- return response;
-}
-
-
-
-
-var jsc = jQuery.now(),
- jsre = /(\=)\?(&|$)|\?\?/i;
-
-// Default jsonp settings
-jQuery.ajaxSetup({
- jsonp: "callback",
- jsonpCallback: function() {
- return jQuery.expando + "_" + ( jsc++ );
- }
-});
-
-// Detect, normalize options and install callbacks for jsonp requests
-jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
-
- var inspectData = ( typeof s.data === "string" ) && /^application\/x\-www\-form\-urlencoded/.test( s.contentType );
-
- if ( s.dataTypes[ 0 ] === "jsonp" ||
- s.jsonp !== false && ( jsre.test( s.url ) ||
- inspectData && jsre.test( s.data ) ) ) {
-
- var responseContainer,
- jsonpCallback = s.jsonpCallback =
- jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback,
- previous = window[ jsonpCallback ],
- url = s.url,
- data = s.data,
- replace = "$1" + jsonpCallback + "$2";
-
- if ( s.jsonp !== false ) {
- url = url.replace( jsre, replace );
- if ( s.url === url ) {
- if ( inspectData ) {
- data = data.replace( jsre, replace );
- }
- if ( s.data === data ) {
- // Add callback manually
- url += (/\?/.test( url ) ? "&" : "?") + s.jsonp + "=" + jsonpCallback;
- }
- }
- }
-
- s.url = url;
- s.data = data;
-
- // Install callback
- window[ jsonpCallback ] = function( response ) {
- responseContainer = [ response ];
- };
-
- // Clean-up function
- jqXHR.always(function() {
- // Set callback back to previous value
- window[ jsonpCallback ] = previous;
- // Call if it was a function and we have a response
- if ( responseContainer && jQuery.isFunction( previous ) ) {
- window[ jsonpCallback ]( responseContainer[ 0 ] );
- }
- });
-
- // Use data converter to retrieve json after script execution
- s.converters["script json"] = function() {
- if ( !responseContainer ) {
- jQuery.error( jsonpCallback + " was not called" );
- }
- return responseContainer[ 0 ];
- };
-
- // force json dataType
- s.dataTypes[ 0 ] = "json";
-
- // Delegate to script
- return "script";
- }
-});
-
-
-
-
-// Install script dataType
-jQuery.ajaxSetup({
- accepts: {
- script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
- },
- contents: {
- script: /javascript|ecmascript/
- },
- converters: {
- "text script": function( text ) {
- jQuery.globalEval( text );
- return text;
- }
- }
-});
-
-// Handle cache's special case and global
-jQuery.ajaxPrefilter( "script", function( s ) {
- if ( s.cache === undefined ) {
- s.cache = false;
- }
- if ( s.crossDomain ) {
- s.type = "GET";
- s.global = false;
- }
-});
-
-// Bind script tag hack transport
-jQuery.ajaxTransport( "script", function(s) {
-
- // This transport only deals with cross domain requests
- if ( s.crossDomain ) {
-
- var script,
- head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement;
-
- return {
-
- send: function( _, callback ) {
-
- script = document.createElement( "script" );
-
- script.async = "async";
-
- if ( s.scriptCharset ) {
- script.charset = s.scriptCharset;
- }
-
- script.src = s.url;
-
- // Attach handlers for all browsers
- script.onload = script.onreadystatechange = function( _, isAbort ) {
-
- if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
-
- // Handle memory leak in IE
- script.onload = script.onreadystatechange = null;
-
- // Remove the script
- if ( head && script.parentNode ) {
- head.removeChild( script );
- }
-
- // Dereference the script
- script = undefined;
-
- // Callback if not abort
- if ( !isAbort ) {
- callback( 200, "success" );
- }
- }
- };
- // Use insertBefore instead of appendChild to circumvent an IE6 bug.
- // This arises when a base node is used (#2709 and #4378).
- head.insertBefore( script, head.firstChild );
- },
-
- abort: function() {
- if ( script ) {
- script.onload( 0, 1 );
- }
- }
- };
- }
-});
-
-
-
-
-var // #5280: Internet Explorer will keep connections alive if we don't abort on unload
- xhrOnUnloadAbort = window.ActiveXObject ? function() {
- // Abort all pending requests
- for ( var key in xhrCallbacks ) {
- xhrCallbacks[ key ]( 0, 1 );
- }
- } : false,
- xhrId = 0,
- xhrCallbacks;
-
-// Functions to create xhrs
-function createStandardXHR() {
- try {
- return new window.XMLHttpRequest();
- } catch( e ) {}
-}
-
-function createActiveXHR() {
- try {
- return new window.ActiveXObject( "Microsoft.XMLHTTP" );
- } catch( e ) {}
-}
-
-// Create the request object
-// (This is still attached to ajaxSettings for backward compatibility)
-jQuery.ajaxSettings.xhr = window.ActiveXObject ?
- /* Microsoft failed to properly
- * implement the XMLHttpRequest in IE7 (can't request local files),
- * so we use the ActiveXObject when it is available
- * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
- * we need a fallback.
- */
- function() {
- return !this.isLocal && createStandardXHR() || createActiveXHR();
- } :
- // For all other browsers, use the standard XMLHttpRequest object
- createStandardXHR;
-
-// Determine support properties
-(function( xhr ) {
- jQuery.extend( jQuery.support, {
- ajax: !!xhr,
- cors: !!xhr && ( "withCredentials" in xhr )
- });
-})( jQuery.ajaxSettings.xhr() );
-
-// Create transport if the browser can provide an xhr
-if ( jQuery.support.ajax ) {
-
- jQuery.ajaxTransport(function( s ) {
- // Cross domain only allowed if supported through XMLHttpRequest
- if ( !s.crossDomain || jQuery.support.cors ) {
-
- var callback;
-
- return {
- send: function( headers, complete ) {
-
- // Get a new xhr
- var xhr = s.xhr(),
- handle,
- i;
-
- // Open the socket
- // Passing null username, generates a login popup on Opera (#2865)
- if ( s.username ) {
- xhr.open( s.type, s.url, s.async, s.username, s.password );
- } else {
- xhr.open( s.type, s.url, s.async );
- }
-
- // Apply custom fields if provided
- if ( s.xhrFields ) {
- for ( i in s.xhrFields ) {
- xhr[ i ] = s.xhrFields[ i ];
- }
- }
-
- // Override mime type if needed
- if ( s.mimeType && xhr.overrideMimeType ) {
- xhr.overrideMimeType( s.mimeType );
- }
-
- // X-Requested-With header
- // For cross-domain requests, seeing as conditions for a preflight are
- // akin to a jigsaw puzzle, we simply never set it to be sure.
- // (it can always be set on a per-request basis or even using ajaxSetup)
- // For same-domain requests, won't change header if already provided.
- if ( !s.crossDomain && !headers["X-Requested-With"] ) {
- headers[ "X-Requested-With" ] = "XMLHttpRequest";
- }
-
- // Need an extra try/catch for cross domain requests in Firefox 3
- try {
- for ( i in headers ) {
- xhr.setRequestHeader( i, headers[ i ] );
- }
- } catch( _ ) {}
-
- // Do send the request
- // This may raise an exception which is actually
- // handled in jQuery.ajax (so no try/catch here)
- xhr.send( ( s.hasContent && s.data ) || null );
-
- // Listener
- callback = function( _, isAbort ) {
-
- var status,
- statusText,
- responseHeaders,
- responses,
- xml;
-
- // Firefox throws exceptions when accessing properties
- // of an xhr when a network error occured
- // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
- try {
-
- // Was never called and is aborted or complete
- if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
-
- // Only called once
- callback = undefined;
-
- // Do not keep as active anymore
- if ( handle ) {
- xhr.onreadystatechange = jQuery.noop;
- if ( xhrOnUnloadAbort ) {
- delete xhrCallbacks[ handle ];
- }
- }
-
- // If it's an abort
- if ( isAbort ) {
- // Abort it manually if needed
- if ( xhr.readyState !== 4 ) {
- xhr.abort();
- }
- } else {
- status = xhr.status;
- responseHeaders = xhr.getAllResponseHeaders();
- responses = {};
- xml = xhr.responseXML;
-
- // Construct response list
- if ( xml && xml.documentElement /* #4958 */ ) {
- responses.xml = xml;
- }
-
- // When requesting binary data, IE6-9 will throw an exception
- // on any attempt to access responseText (#11426)
- try {
- responses.text = xhr.responseText;
- } catch( _ ) {
- }
-
- // Firefox throws an exception when accessing
- // statusText for faulty cross-domain requests
- try {
- statusText = xhr.statusText;
- } catch( e ) {
- // We normalize with Webkit giving an empty statusText
- statusText = "";
- }
-
- // Filter status for non standard behaviors
-
- // If the request is local and we have data: assume a success
- // (success with no data won't get notified, that's the best we
- // can do given current implementations)
- if ( !status && s.isLocal && !s.crossDomain ) {
- status = responses.text ? 200 : 404;
- // IE - #1450: sometimes returns 1223 when it should be 204
- } else if ( status === 1223 ) {
- status = 204;
- }
- }
- }
- } catch( firefoxAccessException ) {
- if ( !isAbort ) {
- complete( -1, firefoxAccessException );
- }
- }
-
- // Call complete if needed
- if ( responses ) {
- complete( status, statusText, responses, responseHeaders );
- }
- };
-
- // if we're in sync mode or it's in cache
- // and has been retrieved directly (IE6 & IE7)
- // we need to manually fire the callback
- if ( !s.async || xhr.readyState === 4 ) {
- callback();
- } else {
- handle = ++xhrId;
- if ( xhrOnUnloadAbort ) {
- // Create the active xhrs callbacks list if needed
- // and attach the unload handler
- if ( !xhrCallbacks ) {
- xhrCallbacks = {};
- jQuery( window ).unload( xhrOnUnloadAbort );
- }
- // Add to list of active xhrs callbacks
- xhrCallbacks[ handle ] = callback;
- }
- xhr.onreadystatechange = callback;
- }
- },
-
- abort: function() {
- if ( callback ) {
- callback(0,1);
- }
- }
- };
- }
- });
-}
-
-
-
-
-var elemdisplay = {},
- iframe, iframeDoc,
- rfxtypes = /^(?:toggle|show|hide)$/,
- rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
- timerId,
- fxAttrs = [
- // height animations
- [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
- // width animations
- [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
- // opacity animations
- [ "opacity" ]
- ],
- fxNow;
-
-jQuery.fn.extend({
- show: function( speed, easing, callback ) {
- var elem, display;
-
- if ( speed || speed === 0 ) {
- return this.animate( genFx("show", 3), speed, easing, callback );
-
- } else {
- for ( var i = 0, j = this.length; i < j; i++ ) {
- elem = this[ i ];
-
- if ( elem.style ) {
- display = elem.style.display;
-
- // Reset the inline display of this element to learn if it is
- // being hidden by cascaded rules or not
- if ( !jQuery._data(elem, "olddisplay") && display === "none" ) {
- display = elem.style.display = "";
- }
-
- // Set elements which have been overridden with display: none
- // in a stylesheet to whatever the default browser style is
- // for such an element
- if ( (display === "" && jQuery.css(elem, "display") === "none") ||
- !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
- jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) );
- }
- }
- }
-
- // Set the display of most of the elements in a second loop
- // to avoid the constant reflow
- for ( i = 0; i < j; i++ ) {
- elem = this[ i ];
-
- if ( elem.style ) {
- display = elem.style.display;
-
- if ( display === "" || display === "none" ) {
- elem.style.display = jQuery._data( elem, "olddisplay" ) || "";
- }
- }
- }
-
- return this;
- }
- },
-
- hide: function( speed, easing, callback ) {
- if ( speed || speed === 0 ) {
- return this.animate( genFx("hide", 3), speed, easing, callback);
-
- } else {
- var elem, display,
- i = 0,
- j = this.length;
-
- for ( ; i < j; i++ ) {
- elem = this[i];
- if ( elem.style ) {
- display = jQuery.css( elem, "display" );
-
- if ( display !== "none" && !jQuery._data( elem, "olddisplay" ) ) {
- jQuery._data( elem, "olddisplay", display );
- }
- }
- }
-
- // Set the display of the elements in a second loop
- // to avoid the constant reflow
- for ( i = 0; i < j; i++ ) {
- if ( this[i].style ) {
- this[i].style.display = "none";
- }
- }
-
- return this;
- }
- },
-
- // Save the old toggle function
- _toggle: jQuery.fn.toggle,
-
- toggle: function( fn, fn2, callback ) {
- var bool = typeof fn === "boolean";
-
- if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {
- this._toggle.apply( this, arguments );
-
- } else if ( fn == null || bool ) {
- this.each(function() {
- var state = bool ? fn : jQuery(this).is(":hidden");
- jQuery(this)[ state ? "show" : "hide" ]();
- });
-
- } else {
- this.animate(genFx("toggle", 3), fn, fn2, callback);
- }
-
- return this;
- },
-
- fadeTo: function( speed, to, easing, callback ) {
- return this.filter(":hidden").css("opacity", 0).show().end()
- .animate({opacity: to}, speed, easing, callback);
- },
-
- animate: function( prop, speed, easing, callback ) {
- var optall = jQuery.speed( speed, easing, callback );
-
- if ( jQuery.isEmptyObject( prop ) ) {
- return this.each( optall.complete, [ false ] );
- }
-
- // Do not change referenced properties as per-property easing will be lost
- prop = jQuery.extend( {}, prop );
-
- function doAnimation() {
- // XXX 'this' does not always have a nodeName when running the
- // test suite
-
- if ( optall.queue === false ) {
- jQuery._mark( this );
- }
-
- var opt = jQuery.extend( {}, optall ),
- isElement = this.nodeType === 1,
- hidden = isElement && jQuery(this).is(":hidden"),
- name, val, p, e, hooks, replace,
- parts, start, end, unit,
- method;
-
- // will store per property easing and be used to determine when an animation is complete
- opt.animatedProperties = {};
-
- // first pass over propertys to expand / normalize
- for ( p in prop ) {
- name = jQuery.camelCase( p );
- if ( p !== name ) {
- prop[ name ] = prop[ p ];
- delete prop[ p ];
- }
-
- if ( ( hooks = jQuery.cssHooks[ name ] ) && "expand" in hooks ) {
- replace = hooks.expand( prop[ name ] );
- delete prop[ name ];
-
- // not quite $.extend, this wont overwrite keys already present.
- // also - reusing 'p' from above because we have the correct "name"
- for ( p in replace ) {
- if ( ! ( p in prop ) ) {
- prop[ p ] = replace[ p ];
- }
- }
- }
- }
-
- for ( name in prop ) {
- val = prop[ name ];
- // easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
- if ( jQuery.isArray( val ) ) {
- opt.animatedProperties[ name ] = val[ 1 ];
- val = prop[ name ] = val[ 0 ];
- } else {
- opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing';
- }
-
- if ( val === "hide" && hidden || val === "show" && !hidden ) {
- return opt.complete.call( this );
- }
-
- if ( isElement && ( name === "height" || name === "width" ) ) {
- // Make sure that nothing sneaks out
- // Record all 3 overflow attributes because IE does not
- // change the overflow attribute when overflowX and
- // overflowY are set to the same value
- opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ];
-
- // Set display property to inline-block for height/width
- // animations on inline elements that are having width/height animated
- if ( jQuery.css( this, "display" ) === "inline" &&
- jQuery.css( this, "float" ) === "none" ) {
-
- // inline-level elements accept inline-block;
- // block-level elements need to be inline with layout
- if ( !jQuery.support.inlineBlockNeedsLayout || defaultDisplay( this.nodeName ) === "inline" ) {
- this.style.display = "inline-block";
-
- } else {
- this.style.zoom = 1;
- }
- }
- }
- }
-
- if ( opt.overflow != null ) {
- this.style.overflow = "hidden";
- }
-
- for ( p in prop ) {
- e = new jQuery.fx( this, opt, p );
- val = prop[ p ];
-
- if ( rfxtypes.test( val ) ) {
-
- // Tracks whether to show or hide based on private
- // data attached to the element
- method = jQuery._data( this, "toggle" + p ) || ( val === "toggle" ? hidden ? "show" : "hide" : 0 );
- if ( method ) {
- jQuery._data( this, "toggle" + p, method === "show" ? "hide" : "show" );
- e[ method ]();
- } else {
- e[ val ]();
- }
-
- } else {
- parts = rfxnum.exec( val );
- start = e.cur();
-
- if ( parts ) {
- end = parseFloat( parts[2] );
- unit = parts[3] || ( jQuery.cssNumber[ p ] ? "" : "px" );
-
- // We need to compute starting value
- if ( unit !== "px" ) {
- jQuery.style( this, p, (end || 1) + unit);
- start = ( (end || 1) / e.cur() ) * start;
- jQuery.style( this, p, start + unit);
- }
-
- // If a +=/-= token was provided, we're doing a relative animation
- if ( parts[1] ) {
- end = ( (parts[ 1 ] === "-=" ? -1 : 1) * end ) + start;
- }
-
- e.custom( start, end, unit );
-
- } else {
- e.custom( start, val, "" );
- }
- }
- }
-
- // For JS strict compliance
- return true;
- }
-
- return optall.queue === false ?
- this.each( doAnimation ) :
- this.queue( optall.queue, doAnimation );
- },
-
- stop: function( type, clearQueue, gotoEnd ) {
- if ( typeof type !== "string" ) {
- gotoEnd = clearQueue;
- clearQueue = type;
- type = undefined;
- }
- if ( clearQueue && type !== false ) {
- this.queue( type || "fx", [] );
- }
-
- return this.each(function() {
- var index,
- hadTimers = false,
- timers = jQuery.timers,
- data = jQuery._data( this );
-
- // clear marker counters if we know they won't be
- if ( !gotoEnd ) {
- jQuery._unmark( true, this );
- }
-
- function stopQueue( elem, data, index ) {
- var hooks = data[ index ];
- jQuery.removeData( elem, index, true );
- hooks.stop( gotoEnd );
- }
-
- if ( type == null ) {
- for ( index in data ) {
- if ( data[ index ] && data[ index ].stop && index.indexOf(".run") === index.length - 4 ) {
- stopQueue( this, data, index );
- }
- }
- } else if ( data[ index = type + ".run" ] && data[ index ].stop ){
- stopQueue( this, data, index );
- }
-
- for ( index = timers.length; index--; ) {
- if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
- if ( gotoEnd ) {
-
- // force the next step to be the last
- timers[ index ]( true );
- } else {
- timers[ index ].saveState();
- }
- hadTimers = true;
- timers.splice( index, 1 );
- }
- }
-
- // start the next in the queue if the last step wasn't forced
- // timers currently will call their complete callbacks, which will dequeue
- // but only if they were gotoEnd
- if ( !( gotoEnd && hadTimers ) ) {
- jQuery.dequeue( this, type );
- }
- });
- }
-
-});
-
-// Animations created synchronously will run synchronously
-function createFxNow() {
- setTimeout( clearFxNow, 0 );
- return ( fxNow = jQuery.now() );
-}
-
-function clearFxNow() {
- fxNow = undefined;
-}
-
-// Generate parameters to create a standard animation
-function genFx( type, num ) {
- var obj = {};
-
- jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice( 0, num )), function() {
- obj[ this ] = type;
- });
-
- return obj;
-}
-
-// Generate shortcuts for custom animations
-jQuery.each({
- slideDown: genFx( "show", 1 ),
- slideUp: genFx( "hide", 1 ),
- slideToggle: genFx( "toggle", 1 ),
- fadeIn: { opacity: "show" },
- fadeOut: { opacity: "hide" },
- fadeToggle: { opacity: "toggle" }
-}, function( name, props ) {
- jQuery.fn[ name ] = function( speed, easing, callback ) {
- return this.animate( props, speed, easing, callback );
- };
-});
-
-jQuery.extend({
- speed: function( speed, easing, fn ) {
- var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
- complete: fn || !fn && easing ||
- jQuery.isFunction( speed ) && speed,
- duration: speed,
- easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
- };
-
- opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
- opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
-
- // normalize opt.queue - true/undefined/null -> "fx"
- if ( opt.queue == null || opt.queue === true ) {
- opt.queue = "fx";
- }
-
- // Queueing
- opt.old = opt.complete;
-
- opt.complete = function( noUnmark ) {
- if ( jQuery.isFunction( opt.old ) ) {
- opt.old.call( this );
- }
-
- if ( opt.queue ) {
- jQuery.dequeue( this, opt.queue );
- } else if ( noUnmark !== false ) {
- jQuery._unmark( this );
- }
- };
-
- return opt;
- },
-
- easing: {
- linear: function( p ) {
- return p;
- },
- swing: function( p ) {
- return ( -Math.cos( p*Math.PI ) / 2 ) + 0.5;
- }
- },
-
- timers: [],
-
- fx: function( elem, options, prop ) {
- this.options = options;
- this.elem = elem;
- this.prop = prop;
-
- options.orig = options.orig || {};
- }
-
-});
-
-jQuery.fx.prototype = {
- // Simple function for setting a style value
- update: function() {
- if ( this.options.step ) {
- this.options.step.call( this.elem, this.now, this );
- }
-
- ( jQuery.fx.step[ this.prop ] || jQuery.fx.step._default )( this );
- },
-
- // Get the current size
- cur: function() {
- if ( this.elem[ this.prop ] != null && (!this.elem.style || this.elem.style[ this.prop ] == null) ) {
- return this.elem[ this.prop ];
- }
-
- var parsed,
- r = jQuery.css( this.elem, this.prop );
- // Empty strings, null, undefined and "auto" are converted to 0,
- // complex values such as "rotate(1rad)" are returned as is,
- // simple values such as "10px" are parsed to Float.
- return isNaN( parsed = parseFloat( r ) ) ? !r || r === "auto" ? 0 : r : parsed;
- },
-
- // Start an animation from one number to another
- custom: function( from, to, unit ) {
- var self = this,
- fx = jQuery.fx;
-
- this.startTime = fxNow || createFxNow();
- this.end = to;
- this.now = this.start = from;
- this.pos = this.state = 0;
- this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" );
-
- function t( gotoEnd ) {
- return self.step( gotoEnd );
- }
-
- t.queue = this.options.queue;
- t.elem = this.elem;
- t.saveState = function() {
- if ( jQuery._data( self.elem, "fxshow" + self.prop ) === undefined ) {
- if ( self.options.hide ) {
- jQuery._data( self.elem, "fxshow" + self.prop, self.start );
- } else if ( self.options.show ) {
- jQuery._data( self.elem, "fxshow" + self.prop, self.end );
- }
- }
- };
-
- if ( t() && jQuery.timers.push(t) && !timerId ) {
- timerId = setInterval( fx.tick, fx.interval );
- }
- },
-
- // Simple 'show' function
- show: function() {
- var dataShow = jQuery._data( this.elem, "fxshow" + this.prop );
-
- // Remember where we started, so that we can go back to it later
- this.options.orig[ this.prop ] = dataShow || jQuery.style( this.elem, this.prop );
- this.options.show = true;
-
- // Begin the animation
- // Make sure that we start at a small width/height to avoid any flash of content
- if ( dataShow !== undefined ) {
- // This show is picking up where a previous hide or show left off
- this.custom( this.cur(), dataShow );
- } else {
- this.custom( this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur() );
- }
-
- // Start by showing the element
- jQuery( this.elem ).show();
- },
-
- // Simple 'hide' function
- hide: function() {
- // Remember where we started, so that we can go back to it later
- this.options.orig[ this.prop ] = jQuery._data( this.elem, "fxshow" + this.prop ) || jQuery.style( this.elem, this.prop );
- this.options.hide = true;
-
- // Begin the animation
- this.custom( this.cur(), 0 );
- },
-
- // Each step of an animation
- step: function( gotoEnd ) {
- var p, n, complete,
- t = fxNow || createFxNow(),
- done = true,
- elem = this.elem,
- options = this.options;
-
- if ( gotoEnd || t >= options.duration + this.startTime ) {
- this.now = this.end;
- this.pos = this.state = 1;
- this.update();
-
- options.animatedProperties[ this.prop ] = true;
-
- for ( p in options.animatedProperties ) {
- if ( options.animatedProperties[ p ] !== true ) {
- done = false;
- }
- }
-
- if ( done ) {
- // Reset the overflow
- if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {
-
- jQuery.each( [ "", "X", "Y" ], function( index, value ) {
- elem.style[ "overflow" + value ] = options.overflow[ index ];
- });
- }
-
- // Hide the element if the "hide" operation was done
- if ( options.hide ) {
- jQuery( elem ).hide();
- }
-
- // Reset the properties, if the item has been hidden or shown
- if ( options.hide || options.show ) {
- for ( p in options.animatedProperties ) {
- jQuery.style( elem, p, options.orig[ p ] );
- jQuery.removeData( elem, "fxshow" + p, true );
- // Toggle data is no longer needed
- jQuery.removeData( elem, "toggle" + p, true );
- }
- }
-
- // Execute the complete function
- // in the event that the complete function throws an exception
- // we must ensure it won't be called twice. #5684
-
- complete = options.complete;
- if ( complete ) {
-
- options.complete = false;
- complete.call( elem );
- }
- }
-
- return false;
-
- } else {
- // classical easing cannot be used with an Infinity duration
- if ( options.duration == Infinity ) {
- this.now = t;
- } else {
- n = t - this.startTime;
- this.state = n / options.duration;
-
- // Perform the easing function, defaults to swing
- this.pos = jQuery.easing[ options.animatedProperties[this.prop] ]( this.state, n, 0, 1, options.duration );
- this.now = this.start + ( (this.end - this.start) * this.pos );
- }
- // Perform the next step of the animation
- this.update();
- }
-
- return true;
- }
-};
-
-jQuery.extend( jQuery.fx, {
- tick: function() {
- var timer,
- timers = jQuery.timers,
- i = 0;
-
- for ( ; i < timers.length; i++ ) {
- timer = timers[ i ];
- // Checks the timer has not already been removed
- if ( !timer() && timers[ i ] === timer ) {
- timers.splice( i--, 1 );
- }
- }
-
- if ( !timers.length ) {
- jQuery.fx.stop();
- }
- },
-
- interval: 13,
-
- stop: function() {
- clearInterval( timerId );
- timerId = null;
- },
-
- speeds: {
- slow: 600,
- fast: 200,
- // Default speed
- _default: 400
- },
-
- step: {
- opacity: function( fx ) {
- jQuery.style( fx.elem, "opacity", fx.now );
- },
-
- _default: function( fx ) {
- if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
- fx.elem.style[ fx.prop ] = fx.now + fx.unit;
- } else {
- fx.elem[ fx.prop ] = fx.now;
- }
- }
- }
-});
-
-// Ensure props that can't be negative don't go there on undershoot easing
-jQuery.each( fxAttrs.concat.apply( [], fxAttrs ), function( i, prop ) {
- // exclude marginTop, marginLeft, marginBottom and marginRight from this list
- if ( prop.indexOf( "margin" ) ) {
- jQuery.fx.step[ prop ] = function( fx ) {
- jQuery.style( fx.elem, prop, Math.max(0, fx.now) + fx.unit );
- };
- }
-});
-
-if ( jQuery.expr && jQuery.expr.filters ) {
- jQuery.expr.filters.animated = function( elem ) {
- return jQuery.grep(jQuery.timers, function( fn ) {
- return elem === fn.elem;
- }).length;
- };
-}
-
-// Try to restore the default display value of an element
-function defaultDisplay( nodeName ) {
-
- if ( !elemdisplay[ nodeName ] ) {
-
- var body = document.body,
- elem = jQuery( "<" + nodeName + ">" ).appendTo( body ),
- display = elem.css( "display" );
- elem.remove();
-
- // If the simple way fails,
- // get element's real default display by attaching it to a temp iframe
- if ( display === "none" || display === "" ) {
- // No iframe to use yet, so create it
- if ( !iframe ) {
- iframe = document.createElement( "iframe" );
- iframe.frameBorder = iframe.width = iframe.height = 0;
- }
-
- body.appendChild( iframe );
-
- // Create a cacheable copy of the iframe document on first call.
- // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
- // document to it; WebKit & Firefox won't allow reusing the iframe document.
- if ( !iframeDoc || !iframe.createElement ) {
- iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
- iframeDoc.write( ( jQuery.support.boxModel ? "<!doctype html>" : "" ) + "<html><body>" );
- iframeDoc.close();
- }
-
- elem = iframeDoc.createElement( nodeName );
-
- iframeDoc.body.appendChild( elem );
-
- display = jQuery.css( elem, "display" );
- body.removeChild( iframe );
- }
-
- // Store the correct default display
- elemdisplay[ nodeName ] = display;
- }
-
- return elemdisplay[ nodeName ];
-}
-
-
-
-
-var getOffset,
- rtable = /^t(?:able|d|h)$/i,
- rroot = /^(?:body|html)$/i;
-
-if ( "getBoundingClientRect" in document.documentElement ) {
- getOffset = function( elem, doc, docElem, box ) {
- try {
- box = elem.getBoundingClientRect();
- } catch(e) {}
-
- // Make sure we're not dealing with a disconnected DOM node
- if ( !box || !jQuery.contains( docElem, elem ) ) {
- return box ? { top: box.top, left: box.left } : { top: 0, left: 0 };
- }
-
- var body = doc.body,
- win = getWindow( doc ),
- clientTop = docElem.clientTop || body.clientTop || 0,
- clientLeft = docElem.clientLeft || body.clientLeft || 0,
- scrollTop = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop,
- scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft,
- top = box.top + scrollTop - clientTop,
- left = box.left + scrollLeft - clientLeft;
-
- return { top: top, left: left };
- };
-
-} else {
- getOffset = function( elem, doc, docElem ) {
- var computedStyle,
- offsetParent = elem.offsetParent,
- prevOffsetParent = elem,
- body = doc.body,
- defaultView = doc.defaultView,
- prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
- top = elem.offsetTop,
- left = elem.offsetLeft;
-
- while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
- if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) {
- break;
- }
-
- computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;
- top -= elem.scrollTop;
- left -= elem.scrollLeft;
-
- if ( elem === offsetParent ) {
- top += elem.offsetTop;
- left += elem.offsetLeft;
-
- if ( jQuery.support.doesNotAddBorder && !(jQuery.support.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {
- top += parseFloat( computedStyle.borderTopWidth ) || 0;
- left += parseFloat( computedStyle.borderLeftWidth ) || 0;
- }
-
- prevOffsetParent = offsetParent;
- offsetParent = elem.offsetParent;
- }
-
- if ( jQuery.support.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) {
- top += parseFloat( computedStyle.borderTopWidth ) || 0;
- left += parseFloat( computedStyle.borderLeftWidth ) || 0;
- }
-
- prevComputedStyle = computedStyle;
- }
-
- if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) {
- top += body.offsetTop;
- left += body.offsetLeft;
- }
-
- if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) {
- top += Math.max( docElem.scrollTop, body.scrollTop );
- left += Math.max( docElem.scrollLeft, body.scrollLeft );
- }
-
- return { top: top, left: left };
- };
-}
-
-jQuery.fn.offset = function( options ) {
- if ( arguments.length ) {
- return options === undefined ?
- this :
- this.each(function( i ) {
- jQuery.offset.setOffset( this, options, i );
- });
- }
-
- var elem = this[0],
- doc = elem && elem.ownerDocument;
-
- if ( !doc ) {
- return null;
- }
-
- if ( elem === doc.body ) {
- return jQuery.offset.bodyOffset( elem );
- }
-
- return getOffset( elem, doc, doc.documentElement );
-};
-
-jQuery.offset = {
-
- bodyOffset: function( body ) {
- var top = body.offsetTop,
- left = body.offsetLeft;
-
- if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) {
- top += parseFloat( jQuery.css(body, "marginTop") ) || 0;
- left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
- }
-
- return { top: top, left: left };
- },
-
- setOffset: function( elem, options, i ) {
- var position = jQuery.css( elem, "position" );
-
- // set position first, in-case top/left are set even on static elem
- if ( position === "static" ) {
- elem.style.position = "relative";
- }
-
- var curElem = jQuery( elem ),
- curOffset = curElem.offset(),
- curCSSTop = jQuery.css( elem, "top" ),
- curCSSLeft = jQuery.css( elem, "left" ),
- calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
- props = {}, curPosition = {}, curTop, curLeft;
-
- // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
- if ( calculatePosition ) {
- curPosition = curElem.position();
- curTop = curPosition.top;
- curLeft = curPosition.left;
- } else {
- curTop = parseFloat( curCSSTop ) || 0;
- curLeft = parseFloat( curCSSLeft ) || 0;
- }
-
- if ( jQuery.isFunction( options ) ) {
- options = options.call( elem, i, curOffset );
- }
-
- if ( options.top != null ) {
- props.top = ( options.top - curOffset.top ) + curTop;
- }
- if ( options.left != null ) {
- props.left = ( options.left - curOffset.left ) + curLeft;
- }
-
- if ( "using" in options ) {
- options.using.call( elem, props );
- } else {
- curElem.css( props );
- }
- }
-};
-
-
-jQuery.fn.extend({
-
- position: function() {
- if ( !this[0] ) {
- return null;
- }
-
- var elem = this[0],
-
- // Get *real* offsetParent
- offsetParent = this.offsetParent(),
-
- // Get correct offsets
- offset = this.offset(),
- parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
-
- // Subtract element margins
- // note: when an element has margin: auto the offsetLeft and marginLeft
- // are the same in Safari causing offset.left to incorrectly be 0
- offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;
- offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
-
- // Add offsetParent borders
- parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
- parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;
-
- // Subtract the two offsets
- return {
- top: offset.top - parentOffset.top,
- left: offset.left - parentOffset.left
- };
- },
-
- offsetParent: function() {
- return this.map(function() {
- var offsetParent = this.offsetParent || document.body;
- while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
- offsetParent = offsetParent.offsetParent;
- }
- return offsetParent;
- });
- }
-});
-
-
-// Create scrollLeft and scrollTop methods
-jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) {
- var top = /Y/.test( prop );
-
- jQuery.fn[ method ] = function( val ) {
- return jQuery.access( this, function( elem, method, val ) {
- var win = getWindow( elem );
-
- if ( val === undefined ) {
- return win ? (prop in win) ? win[ prop ] :
- jQuery.support.boxModel && win.document.documentElement[ method ] ||
- win.document.body[ method ] :
- elem[ method ];
- }
-
- if ( win ) {
- win.scrollTo(
- !top ? val : jQuery( win ).scrollLeft(),
- top ? val : jQuery( win ).scrollTop()
- );
-
- } else {
- elem[ method ] = val;
- }
- }, method, val, arguments.length, null );
- };
-});
-
-function getWindow( elem ) {
- return jQuery.isWindow( elem ) ?
- elem :
- elem.nodeType === 9 ?
- elem.defaultView || elem.parentWindow :
- false;
-}
-
-
-
-
-// Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods
-jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
- var clientProp = "client" + name,
- scrollProp = "scroll" + name,
- offsetProp = "offset" + name;
-
- // innerHeight and innerWidth
- jQuery.fn[ "inner" + name ] = function() {
- var elem = this[0];
- return elem ?
- elem.style ?
- parseFloat( jQuery.css( elem, type, "padding" ) ) :
- this[ type ]() :
- null;
- };
-
- // outerHeight and outerWidth
- jQuery.fn[ "outer" + name ] = function( margin ) {
- var elem = this[0];
- return elem ?
- elem.style ?
- parseFloat( jQuery.css( elem, type, margin ? "margin" : "border" ) ) :
- this[ type ]() :
- null;
- };
-
- jQuery.fn[ type ] = function( value ) {
- return jQuery.access( this, function( elem, type, value ) {
- var doc, docElemProp, orig, ret;
-
- if ( jQuery.isWindow( elem ) ) {
- // 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
- doc = elem.document;
- docElemProp = doc.documentElement[ clientProp ];
- return jQuery.support.boxModel && docElemProp ||
- doc.body && doc.body[ clientProp ] || docElemProp;
- }
-
- // Get document width or height
- if ( elem.nodeType === 9 ) {
- // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
- doc = elem.documentElement;
-
- // when a window > document, IE6 reports a offset[Width/Height] > client[Width/Height]
- // so we can't use max, as it'll choose the incorrect offset[Width/Height]
- // instead we use the correct client[Width/Height]
- // support:IE6
- if ( doc[ clientProp ] >= doc[ scrollProp ] ) {
- return doc[ clientProp ];
- }
-
- return Math.max(
- elem.body[ scrollProp ], doc[ scrollProp ],
- elem.body[ offsetProp ], doc[ offsetProp ]
- );
- }
-
- // Get width or height on the element
- if ( value === undefined ) {
- orig = jQuery.css( elem, type );
- ret = parseFloat( orig );
- return jQuery.isNumeric( ret ) ? ret : orig;
- }
-
- // Set the width or height on the element
- jQuery( elem ).css( type, value );
- }, type, value, arguments.length, null );
- };
-});
-
-
-
-
-// Expose jQuery to the global object
-window.jQuery = window.$ = jQuery;
-
-// Expose jQuery as an AMD module, but only for AMD loaders that
-// understand the issues with loading multiple versions of jQuery
-// in a page that all might call define(). The loader will indicate
-// they have special allowances for multiple jQuery versions by
-// specifying define.amd.jQuery = true. Register as a named module,
-// since jQuery can be concatenated with other files that may use define,
-// but not use a proper concatenation script that understands anonymous
-// AMD modules. A named AMD is safest and most robust way to register.
-// Lowercase jquery is used because AMD module names are derived from
-// file names, and jQuery is normally delivered in a lowercase file name.
-// Do this after creating the global so that if an AMD module wants to call
-// noConflict to hide this version of jQuery, it will work.
-if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
- define( "jquery", [], function () { return jQuery; } );
-}
-
-
-
-})( window );
diff --git a/ecomp-portal-BE/war/static/oid-connect/js/lib/jwt.js b/ecomp-portal-BE/war/static/oid-connect/js/lib/jwt.js
deleted file mode 100644
index 9f7c4683..00000000
--- a/ecomp-portal-BE/war/static/oid-connect/js/lib/jwt.js
+++ /dev/null
@@ -1,244 +0,0 @@
-var jwt = {};
-
-var JWTInternals = (function() {
-
- // convert a base64url string to hex
- var b64urlmap="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
- function b64urltohex(s) {
- var ret = ""
- var i;
- var k = 0; // b64 state, 0-3
- var slop;
- for(i = 0; i < s.length; ++i) {
- var v = b64urlmap.indexOf(s.charAt(i));
- if(v < 0) continue;
- if(k == 0) {
- ret += int2char(v >> 2);
- slop = v & 3;
- k = 1;
- }
- else if(k == 1) {
- ret += int2char((slop << 2) | (v >> 4));
- slop = v & 0xf;
- k = 2;
- }
- else if(k == 2) {
- ret += int2char(slop);
- ret += int2char(v >> 2);
- slop = v & 3;
- k = 3;
- }
- else {
- ret += int2char((slop << 2) | (v >> 4));
- ret += int2char(v & 0xf);
- k = 0;
- }
- }
- if(k == 1)
- ret += int2char(slop << 2);
- return ret;
- }
-
-
-
- function base64urlencode(arg)
- {
- var s = window.btoa(arg); // Standard base64 encoder
- s = s.split('=')[0]; // Remove any trailing '='s
- s = s.replace(/\+/g, '-'); // 62nd char of encoding
- s = s.replace(/\//g, '_'); // 63rd char of encoding
- // TODO optimize this; we can do much better
- return s;
- }
-
- function base64urldecode(arg)
- {
- var s = arg;
- s = s.replace(/-/g, '+'); // 62nd char of encoding
- s = s.replace(/_/g, '/'); // 63rd char of encoding
- switch (s.length % 4) // Pad with trailing '='s
- {
- case 0: break; // No pad chars in this case
- case 2: s += "=="; break; // Two pad chars
- case 3: s += "="; break; // One pad char
- default: throw new InputException("Illegal base64url string!");
- }
- return window.atob(s); // Standard base64 decoder
- }
-
- function NoSuchAlgorithmException(message) {
- this.message = message;
- this.toString = function() { return "No such algorithm: "+this.message; };
- }
- function NotImplementedException(message) {
- this.message = message;
- this.toString = function() { return "Not implemented: "+this.message; };
- }
- function InputException(message) {
- this.message = message;
- this.toString = function() { return "Malformed input: "+this.message; };
- }
-
- function HMACAlgorithm(hash, key)
- {
- if (hash == "sha256") {
- this.hash = sjcl.hash.sha256;
- } else {
- throw new NoSuchAlgorithmException("HMAC does not support hash " + hash);
- }
- this.key = sjcl.codec.utf8String.toBits(key);
- }
-
- HMACAlgorithm.prototype =
- {
- update: function _update(data)
- {
- this.data = data;
- },
-
- finalize: function _finalize()
- {
- },
-
- sign: function _sign()
- {
- var hmac = new sjcl.misc.hmac(this.key, this.hash);
- var result = hmac.encrypt(this.data);
- return base64urlencode(window.atob(sjcl.codec.base64.fromBits(result)));
- },
-
- verify: function _verify(sig)
- {
- var hmac = new sjcl.misc.hmac(this.key, this.hash);
- var result = hmac.encrypt(this.data);
-
- return base64urlencode(window.atob(sjcl.codec.base64.fromBits(result))) == sig;
- }
- }
-
- function RSASHAAlgorithm(hash, keyPEM)
- {
- if (hash == "sha1") {
- this.hash = "sha1";
- } else if (hash == "sha256") {
- this.hash = "sha256";
- } else {
- throw new NoSuchAlgorithmException("JWT algorithm: " + hash);
- }
- this.keyPEM = keyPEM;
- }
- RSASHAAlgorithm.prototype =
- {
- update: function _update(data)
- {
- this.data = data;
- },
- finalize: function _finalize()
- {
-
- },
- sign: function _sign()
- {
- var rsa = new RSAKey();
- rsa.readPrivateKeyFromPEMString(this.keyPEM);
- var hSig = rsa.signString(this.data, this.hash);
- return base64urlencode(base64urldecode(hex2b64(hSig))); // TODO replace this with hex2b64urlencode!
- },
- verify: function _verify(sig)
- {
- var result = this.keyPEM.verifyString(this.data, b64urltohex(sig));
- return result;
- }
- }
-
- function WebToken(objectStr, algorithm)
- {
- this.objectStr = objectStr;
- this.pkAlgorithm = algorithm;
- }
-
- var WebTokenParser = {
-
- parse: function _parse(input)
- {
- var parts = input.split(".");
- if (parts.length != 3) {
- throw new MalformedWebToken("Must have three parts");
- }
- var token = new WebToken();
- token.headerSegment = parts[0];
- token.payloadSegment = parts[1];
- token.cryptoSegment = parts[2];
-
- token.pkAlgorithm = base64urldecode(parts[0]);
- return token;
- }
- }
-
- function jsonObj(strOrObject)
- {
- if (typeof strOrObject == "string") {
- return JSON.parse(strOrObject);
- }
- return strOrObject;
- }
-
- function constructAlgorithm(jwtAlgStr, key)
- {
- if ("ES256" === jwtAlgStr) {
- throw new NotImplementedException("ECDSA-SHA256 not yet implemented");
- } else if ("ES384" === jwtAlgStr) {
- throw new NotImplementedException("ECDSA-SHA384 not yet implemented");
- } else if ("ES512" === jwtAlgStr) {
- throw new NotImplementedException("ECDSA-SHA512 not yet implemented");
- } else if ("HS256" === jwtAlgStr) {
- return new HMACAlgorithm("sha256", key);
- } else if ("HS384" === jwtAlgStr) {
- throw new NotImplementedException("HMAC-SHA384 not yet implemented");
- } else if ("HS512" === jwtAlgStr) {
- throw new NotImplementedException("HMAC-SHA512 not yet implemented");
- } else if ("RS256" === jwtAlgStr) {
- return new RSASHAAlgorithm("sha256", key);
- } else if ("RS384" === jwtAlgStr) {
- throw new NotImplementedException("RSA-SHA384 not yet implemented");
- } else if ("RS512" === jwtAlgStr) {
- throw new NotImplementedException("RSA-SHA512 not yet implemented");
- } else {
- throw new NoSuchAlgorithmException("Unknown algorithm: " + jwtAlgStr);
- }
- }
-
- WebToken.prototype =
- {
- serialize: function _serialize(key)
- {
- var header = jsonObj(this.pkAlgorithm);
- var jwtAlgStr = header.alg;
- var algorithm = constructAlgorithm(jwtAlgStr, key);
- var algBytes = base64urlencode(this.pkAlgorithm);
- var jsonBytes = base64urlencode(this.objectStr);
-
- var stringToSign = algBytes + "." + jsonBytes;
- algorithm.update(stringToSign);
- var digestValue = algorithm.finalize();
-
- var signatureValue = algorithm.sign();
- return algBytes + "." + jsonBytes + "." + signatureValue;
- },
-
- verify: function _verify(key)
- {
- var header = jsonObj(this.pkAlgorithm);
- var jwtAlgStr = header.alg;
- var algorithm = constructAlgorithm(jwtAlgStr, key);
- algorithm.update(this.headerSegment + "." + this.payloadSegment);
- algorithm.finalize();
- return algorithm.verify(this.cryptoSegment);
- }
- }
-
- jwt.WebToken = WebToken;
- jwt.WebTokenParser = WebTokenParser;
- jwt.base64urlencode = base64urlencode;
- jwt.base64urldecode = base64urldecode;
-})();
diff --git a/ecomp-portal-BE/war/static/oid-connect/js/lib/underscore.js b/ecomp-portal-BE/war/static/oid-connect/js/lib/underscore.js
deleted file mode 100644
index 4d83099f..00000000
--- a/ecomp-portal-BE/war/static/oid-connect/js/lib/underscore.js
+++ /dev/null
@@ -1,1221 +0,0 @@
-// Underscore.js 1.4.3
-// http://underscorejs.org
-// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
-// Underscore may be freely distributed under the MIT license.
-
-(function() {
-
- // Baseline setup
- // --------------
-
- // Establish the root object, `window` in the browser, or `global` on the server.
- var root = this;
-
- // Save the previous value of the `_` variable.
- var previousUnderscore = root._;
-
- // Establish the object that gets returned to break out of a loop iteration.
- var breaker = {};
-
- // Save bytes in the minified (but not gzipped) version:
- var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
-
- // Create quick reference variables for speed access to core prototypes.
- var push = ArrayProto.push,
- slice = ArrayProto.slice,
- concat = ArrayProto.concat,
- toString = ObjProto.toString,
- hasOwnProperty = ObjProto.hasOwnProperty;
-
- // All **ECMAScript 5** native function implementations that we hope to use
- // are declared here.
- var
- nativeForEach = ArrayProto.forEach,
- nativeMap = ArrayProto.map,
- nativeReduce = ArrayProto.reduce,
- nativeReduceRight = ArrayProto.reduceRight,
- nativeFilter = ArrayProto.filter,
- nativeEvery = ArrayProto.every,
- nativeSome = ArrayProto.some,
- nativeIndexOf = ArrayProto.indexOf,
- nativeLastIndexOf = ArrayProto.lastIndexOf,
- nativeIsArray = Array.isArray,
- nativeKeys = Object.keys,
- nativeBind = FuncProto.bind;
-
- // Create a safe reference to the Underscore object for use below.
- var _ = function(obj) {
- if (obj instanceof _) return obj;
- if (!(this instanceof _)) return new _(obj);
- this._wrapped = obj;
- };
-
- // Export the Underscore object for **Node.js**, with
- // backwards-compatibility for the old `require()` API. If we're in
- // the browser, add `_` as a global object via a string identifier,
- // for Closure Compiler "advanced" mode.
- if (typeof exports !== 'undefined') {
- if (typeof module !== 'undefined' && module.exports) {
- exports = module.exports = _;
- }
- exports._ = _;
- } else {
- root._ = _;
- }
-
- // Current version.
- _.VERSION = '1.4.3';
-
- // Collection Functions
- // --------------------
-
- // The cornerstone, an `each` implementation, aka `forEach`.
- // Handles objects with the built-in `forEach`, arrays, and raw objects.
- // Delegates to **ECMAScript 5**'s native `forEach` if available.
- var each = _.each = _.forEach = function(obj, iterator, context) {
- if (obj == null) return;
- if (nativeForEach && obj.forEach === nativeForEach) {
- obj.forEach(iterator, context);
- } else if (obj.length === +obj.length) {
- for (var i = 0, l = obj.length; i < l; i++) {
- if (iterator.call(context, obj[i], i, obj) === breaker) return;
- }
- } else {
- for (var key in obj) {
- if (_.has(obj, key)) {
- if (iterator.call(context, obj[key], key, obj) === breaker) return;
- }
- }
- }
- };
-
- // Return the results of applying the iterator to each element.
- // Delegates to **ECMAScript 5**'s native `map` if available.
- _.map = _.collect = function(obj, iterator, context) {
- var results = [];
- if (obj == null) return results;
- if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);
- each(obj, function(value, index, list) {
- results[results.length] = iterator.call(context, value, index, list);
- });
- return results;
- };
-
- var reduceError = 'Reduce of empty array with no initial value';
-
- // **Reduce** builds up a single result from a list of values, aka `inject`,
- // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.
- _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {
- var initial = arguments.length > 2;
- if (obj == null) obj = [];
- if (nativeReduce && obj.reduce === nativeReduce) {
- if (context) iterator = _.bind(iterator, context);
- return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);
- }
- each(obj, function(value, index, list) {
- if (!initial) {
- memo = value;
- initial = true;
- } else {
- memo = iterator.call(context, memo, value, index, list);
- }
- });
- if (!initial) throw new TypeError(reduceError);
- return memo;
- };
-
- // The right-associative version of reduce, also known as `foldr`.
- // Delegates to **ECMAScript 5**'s native `reduceRight` if available.
- _.reduceRight = _.foldr = function(obj, iterator, memo, context) {
- var initial = arguments.length > 2;
- if (obj == null) obj = [];
- if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {
- if (context) iterator = _.bind(iterator, context);
- return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);
- }
- var length = obj.length;
- if (length !== +length) {
- var keys = _.keys(obj);
- length = keys.length;
- }
- each(obj, function(value, index, list) {
- index = keys ? keys[--length] : --length;
- if (!initial) {
- memo = obj[index];
- initial = true;
- } else {
- memo = iterator.call(context, memo, obj[index], index, list);
- }
- });
- if (!initial) throw new TypeError(reduceError);
- return memo;
- };
-
- // Return the first value which passes a truth test. Aliased as `detect`.
- _.find = _.detect = function(obj, iterator, context) {
- var result;
- any(obj, function(value, index, list) {
- if (iterator.call(context, value, index, list)) {
- result = value;
- return true;
- }
- });
- return result;
- };
-
- // Return all the elements that pass a truth test.
- // Delegates to **ECMAScript 5**'s native `filter` if available.
- // Aliased as `select`.
- _.filter = _.select = function(obj, iterator, context) {
- var results = [];
- if (obj == null) return results;
- if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);
- each(obj, function(value, index, list) {
- if (iterator.call(context, value, index, list)) results[results.length] = value;
- });
- return results;
- };
-
- // Return all the elements for which a truth test fails.
- _.reject = function(obj, iterator, context) {
- return _.filter(obj, function(value, index, list) {
- return !iterator.call(context, value, index, list);
- }, context);
- };
-
- // Determine whether all of the elements match a truth test.
- // Delegates to **ECMAScript 5**'s native `every` if available.
- // Aliased as `all`.
- _.every = _.all = function(obj, iterator, context) {
- iterator || (iterator = _.identity);
- var result = true;
- if (obj == null) return result;
- if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context);
- each(obj, function(value, index, list) {
- if (!(result = result && iterator.call(context, value, index, list))) return breaker;
- });
- return !!result;
- };
-
- // Determine if at least one element in the object matches a truth test.
- // Delegates to **ECMAScript 5**'s native `some` if available.
- // Aliased as `any`.
- var any = _.some = _.any = function(obj, iterator, context) {
- iterator || (iterator = _.identity);
- var result = false;
- if (obj == null) return result;
- if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);
- each(obj, function(value, index, list) {
- if (result || (result = iterator.call(context, value, index, list))) return breaker;
- });
- return !!result;
- };
-
- // Determine if the array or object contains a given value (using `===`).
- // Aliased as `include`.
- _.contains = _.include = function(obj, target) {
- if (obj == null) return false;
- if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
- return any(obj, function(value) {
- return value === target;
- });
- };
-
- // Invoke a method (with arguments) on every item in a collection.
- _.invoke = function(obj, method) {
- var args = slice.call(arguments, 2);
- return _.map(obj, function(value) {
- return (_.isFunction(method) ? method : value[method]).apply(value, args);
- });
- };
-
- // Convenience version of a common use case of `map`: fetching a property.
- _.pluck = function(obj, key) {
- return _.map(obj, function(value){ return value[key]; });
- };
-
- // Convenience version of a common use case of `filter`: selecting only objects
- // with specific `key:value` pairs.
- _.where = function(obj, attrs) {
- if (_.isEmpty(attrs)) return [];
- return _.filter(obj, function(value) {
- for (var key in attrs) {
- if (attrs[key] !== value[key]) return false;
- }
- return true;
- });
- };
-
- // Return the maximum element or (element-based computation).
- // Can't optimize arrays of integers longer than 65,535 elements.
- // See: https://bugs.webkit.org/show_bug.cgi?id=80797
- _.max = function(obj, iterator, context) {
- if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {
- return Math.max.apply(Math, obj);
- }
- if (!iterator && _.isEmpty(obj)) return -Infinity;
- var result = {computed : -Infinity, value: -Infinity};
- each(obj, function(value, index, list) {
- var computed = iterator ? iterator.call(context, value, index, list) : value;
- computed >= result.computed && (result = {value : value, computed : computed});
- });
- return result.value;
- };
-
- // Return the minimum element (or element-based computation).
- _.min = function(obj, iterator, context) {
- if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {
- return Math.min.apply(Math, obj);
- }
- if (!iterator && _.isEmpty(obj)) return Infinity;
- var result = {computed : Infinity, value: Infinity};
- each(obj, function(value, index, list) {
- var computed = iterator ? iterator.call(context, value, index, list) : value;
- computed < result.computed && (result = {value : value, computed : computed});
- });
- return result.value;
- };
-
- // Shuffle an array.
- _.shuffle = function(obj) {
- var rand;
- var index = 0;
- var shuffled = [];
- each(obj, function(value) {
- rand = _.random(index++);
- shuffled[index - 1] = shuffled[rand];
- shuffled[rand] = value;
- });
- return shuffled;
- };
-
- // An internal function to generate lookup iterators.
- var lookupIterator = function(value) {
- return _.isFunction(value) ? value : function(obj){ return obj[value]; };
- };
-
- // Sort the object's values by a criterion produced by an iterator.
- _.sortBy = function(obj, value, context) {
- var iterator = lookupIterator(value);
- return _.pluck(_.map(obj, function(value, index, list) {
- return {
- value : value,
- index : index,
- criteria : iterator.call(context, value, index, list)
- };
- }).sort(function(left, right) {
- var a = left.criteria;
- var b = right.criteria;
- if (a !== b) {
- if (a > b || a === void 0) return 1;
- if (a < b || b === void 0) return -1;
- }
- return left.index < right.index ? -1 : 1;
- }), 'value');
- };
-
- // An internal function used for aggregate "group by" operations.
- var group = function(obj, value, context, behavior) {
- var result = {};
- var iterator = lookupIterator(value || _.identity);
- each(obj, function(value, index) {
- var key = iterator.call(context, value, index, obj);
- behavior(result, key, value);
- });
- return result;
- };
-
- // Groups the object's values by a criterion. Pass either a string attribute
- // to group by, or a function that returns the criterion.
- _.groupBy = function(obj, value, context) {
- return group(obj, value, context, function(result, key, value) {
- (_.has(result, key) ? result[key] : (result[key] = [])).push(value);
- });
- };
-
- // Counts instances of an object that group by a certain criterion. Pass
- // either a string attribute to count by, or a function that returns the
- // criterion.
- _.countBy = function(obj, value, context) {
- return group(obj, value, context, function(result, key) {
- if (!_.has(result, key)) result[key] = 0;
- result[key]++;
- });
- };
-
- // Use a comparator function to figure out the smallest index at which
- // an object should be inserted so as to maintain order. Uses binary search.
- _.sortedIndex = function(array, obj, iterator, context) {
- iterator = iterator == null ? _.identity : lookupIterator(iterator);
- var value = iterator.call(context, obj);
- var low = 0, high = array.length;
- while (low < high) {
- var mid = (low + high) >>> 1;
- iterator.call(context, array[mid]) < value ? low = mid + 1 : high = mid;
- }
- return low;
- };
-
- // Safely convert anything iterable into a real, live array.
- _.toArray = function(obj) {
- if (!obj) return [];
- if (_.isArray(obj)) return slice.call(obj);
- if (obj.length === +obj.length) return _.map(obj, _.identity);
- return _.values(obj);
- };
-
- // Return the number of elements in an object.
- _.size = function(obj) {
- if (obj == null) return 0;
- return (obj.length === +obj.length) ? obj.length : _.keys(obj).length;
- };
-
- // Array Functions
- // ---------------
-
- // Get the first element of an array. Passing **n** will return the first N
- // values in the array. Aliased as `head` and `take`. The **guard** check
- // allows it to work with `_.map`.
- _.first = _.head = _.take = function(array, n, guard) {
- if (array == null) return void 0;
- return (n != null) && !guard ? slice.call(array, 0, n) : array[0];
- };
-
- // Returns everything but the last entry of the array. Especially useful on
- // the arguments object. Passing **n** will return all the values in
- // the array, excluding the last N. The **guard** check allows it to work with
- // `_.map`.
- _.initial = function(array, n, guard) {
- return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));
- };
-
- // Get the last element of an array. Passing **n** will return the last N
- // values in the array. The **guard** check allows it to work with `_.map`.
- _.last = function(array, n, guard) {
- if (array == null) return void 0;
- if ((n != null) && !guard) {
- return slice.call(array, Math.max(array.length - n, 0));
- } else {
- return array[array.length - 1];
- }
- };
-
- // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.
- // Especially useful on the arguments object. Passing an **n** will return
- // the rest N values in the array. The **guard**
- // check allows it to work with `_.map`.
- _.rest = _.tail = _.drop = function(array, n, guard) {
- return slice.call(array, (n == null) || guard ? 1 : n);
- };
-
- // Trim out all falsy values from an array.
- _.compact = function(array) {
- return _.filter(array, _.identity);
- };
-
- // Internal implementation of a recursive `flatten` function.
- var flatten = function(input, shallow, output) {
- each(input, function(value) {
- if (_.isArray(value)) {
- shallow ? push.apply(output, value) : flatten(value, shallow, output);
- } else {
- output.push(value);
- }
- });
- return output;
- };
-
- // Return a completely flattened version of an array.
- _.flatten = function(array, shallow) {
- return flatten(array, shallow, []);
- };
-
- // Return a version of the array that does not contain the specified value(s).
- _.without = function(array) {
- return _.difference(array, slice.call(arguments, 1));
- };
-
- // Produce a duplicate-free version of the array. If the array has already
- // been sorted, you have the option of using a faster algorithm.
- // Aliased as `unique`.
- _.uniq = _.unique = function(array, isSorted, iterator, context) {
- if (_.isFunction(isSorted)) {
- context = iterator;
- iterator = isSorted;
- isSorted = false;
- }
- var initial = iterator ? _.map(array, iterator, context) : array;
- var results = [];
- var seen = [];
- each(initial, function(value, index) {
- if (isSorted ? (!index || seen[seen.length - 1] !== value) : !_.contains(seen, value)) {
- seen.push(value);
- results.push(array[index]);
- }
- });
- return results;
- };
-
- // Produce an array that contains the union: each distinct element from all of
- // the passed-in arrays.
- _.union = function() {
- return _.uniq(concat.apply(ArrayProto, arguments));
- };
-
- // Produce an array that contains every item shared between all the
- // passed-in arrays.
- _.intersection = function(array) {
- var rest = slice.call(arguments, 1);
- return _.filter(_.uniq(array), function(item) {
- return _.every(rest, function(other) {
- return _.indexOf(other, item) >= 0;
- });
- });
- };
-
- // Take the difference between one array and a number of other arrays.
- // Only the elements present in just the first array will remain.
- _.difference = function(array) {
- var rest = concat.apply(ArrayProto, slice.call(arguments, 1));
- return _.filter(array, function(value){ return !_.contains(rest, value); });
- };
-
- // Zip together multiple lists into a single array -- elements that share
- // an index go together.
- _.zip = function() {
- var args = slice.call(arguments);
- var length = _.max(_.pluck(args, 'length'));
- var results = new Array(length);
- for (var i = 0; i < length; i++) {
- results[i] = _.pluck(args, "" + i);
- }
- return results;
- };
-
- // Converts lists into objects. Pass either a single array of `[key, value]`
- // pairs, or two parallel arrays of the same length -- one of keys, and one of
- // the corresponding values.
- _.object = function(list, values) {
- if (list == null) return {};
- var result = {};
- for (var i = 0, l = list.length; i < l; i++) {
- if (values) {
- result[list[i]] = values[i];
- } else {
- result[list[i][0]] = list[i][1];
- }
- }
- return result;
- };
-
- // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),
- // we need this function. Return the position of the first occurrence of an
- // item in an array, or -1 if the item is not included in the array.
- // Delegates to **ECMAScript 5**'s native `indexOf` if available.
- // If the array is large and already in sort order, pass `true`
- // for **isSorted** to use binary search.
- _.indexOf = function(array, item, isSorted) {
- if (array == null) return -1;
- var i = 0, l = array.length;
- if (isSorted) {
- if (typeof isSorted == 'number') {
- i = (isSorted < 0 ? Math.max(0, l + isSorted) : isSorted);
- } else {
- i = _.sortedIndex(array, item);
- return array[i] === item ? i : -1;
- }
- }
- if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted);
- for (; i < l; i++) if (array[i] === item) return i;
- return -1;
- };
-
- // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.
- _.lastIndexOf = function(array, item, from) {
- if (array == null) return -1;
- var hasIndex = from != null;
- if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) {
- return hasIndex ? array.lastIndexOf(item, from) : array.lastIndexOf(item);
- }
- var i = (hasIndex ? from : array.length);
- while (i--) if (array[i] === item) return i;
- return -1;
- };
-
- // Generate an integer Array containing an arithmetic progression. A port of
- // the native Python `range()` function. See
- // [the Python documentation](http://docs.python.org/library/functions.html#range).
- _.range = function(start, stop, step) {
- if (arguments.length <= 1) {
- stop = start || 0;
- start = 0;
- }
- step = arguments[2] || 1;
-
- var len = Math.max(Math.ceil((stop - start) / step), 0);
- var idx = 0;
- var range = new Array(len);
-
- while(idx < len) {
- range[idx++] = start;
- start += step;
- }
-
- return range;
- };
-
- // Function (ahem) Functions
- // ------------------
-
- // Reusable constructor function for prototype setting.
- var ctor = function(){};
-
- // Create a function bound to a given object (assigning `this`, and arguments,
- // optionally). Binding with arguments is also known as `curry`.
- // Delegates to **ECMAScript 5**'s native `Function.bind` if available.
- // We check for `func.bind` first, to fail fast when `func` is undefined.
- _.bind = function(func, context) {
- var args, bound;
- if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
- if (!_.isFunction(func)) throw new TypeError;
- args = slice.call(arguments, 2);
- return bound = function() {
- if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments)));
- ctor.prototype = func.prototype;
- var self = new ctor;
- ctor.prototype = null;
- var result = func.apply(self, args.concat(slice.call(arguments)));
- if (Object(result) === result) return result;
- return self;
- };
- };
-
- // Bind all of an object's methods to that object. Useful for ensuring that
- // all callbacks defined on an object belong to it.
- _.bindAll = function(obj) {
- var funcs = slice.call(arguments, 1);
- if (funcs.length == 0) funcs = _.functions(obj);
- each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });
- return obj;
- };
-
- // Memoize an expensive function by storing its results.
- _.memoize = function(func, hasher) {
- var memo = {};
- hasher || (hasher = _.identity);
- return function() {
- var key = hasher.apply(this, arguments);
- return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));
- };
- };
-
- // Delays a function for the given number of milliseconds, and then calls
- // it with the arguments supplied.
- _.delay = function(func, wait) {
- var args = slice.call(arguments, 2);
- return setTimeout(function(){ return func.apply(null, args); }, wait);
- };
-
- // Defers a function, scheduling it to run after the current call stack has
- // cleared.
- _.defer = function(func) {
- return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
- };
-
- // Returns a function, that, when invoked, will only be triggered at most once
- // during a given window of time.
- _.throttle = function(func, wait) {
- var context, args, timeout, result;
- var previous = 0;
- var later = function() {
- previous = new Date;
- timeout = null;
- result = func.apply(context, args);
- };
- return function() {
- var now = new Date;
- var remaining = wait - (now - previous);
- context = this;
- args = arguments;
- if (remaining <= 0) {
- clearTimeout(timeout);
- timeout = null;
- previous = now;
- result = func.apply(context, args);
- } else if (!timeout) {
- timeout = setTimeout(later, remaining);
- }
- return result;
- };
- };
-
- // Returns a function, that, as long as it continues to be invoked, will not
- // be triggered. The function will be called after it stops being called for
- // N milliseconds. If `immediate` is passed, trigger the function on the
- // leading edge, instead of the trailing.
- _.debounce = function(func, wait, immediate) {
- var timeout, result;
- return function() {
- var context = this, args = arguments;
- var later = function() {
- timeout = null;
- if (!immediate) result = func.apply(context, args);
- };
- var callNow = immediate && !timeout;
- clearTimeout(timeout);
- timeout = setTimeout(later, wait);
- if (callNow) result = func.apply(context, args);
- return result;
- };
- };
-
- // Returns a function that will be executed at most one time, no matter how
- // often you call it. Useful for lazy initialization.
- _.once = function(func) {
- var ran = false, memo;
- return function() {
- if (ran) return memo;
- ran = true;
- memo = func.apply(this, arguments);
- func = null;
- return memo;
- };
- };
-
- // Returns the first function passed as an argument to the second,
- // allowing you to adjust arguments, run code before and after, and
- // conditionally execute the original function.
- _.wrap = function(func, wrapper) {
- return function() {
- var args = [func];
- push.apply(args, arguments);
- return wrapper.apply(this, args);
- };
- };
-
- // Returns a function that is the composition of a list of functions, each
- // consuming the return value of the function that follows.
- _.compose = function() {
- var funcs = arguments;
- return function() {
- var args = arguments;
- for (var i = funcs.length - 1; i >= 0; i--) {
- args = [funcs[i].apply(this, args)];
- }
- return args[0];
- };
- };
-
- // Returns a function that will only be executed after being called N times.
- _.after = function(times, func) {
- if (times <= 0) return func();
- return function() {
- if (--times < 1) {
- return func.apply(this, arguments);
- }
- };
- };
-
- // Object Functions
- // ----------------
-
- // Retrieve the names of an object's properties.
- // Delegates to **ECMAScript 5**'s native `Object.keys`
- _.keys = nativeKeys || function(obj) {
- if (obj !== Object(obj)) throw new TypeError('Invalid object');
- var keys = [];
- for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key;
- return keys;
- };
-
- // Retrieve the values of an object's properties.
- _.values = function(obj) {
- var values = [];
- for (var key in obj) if (_.has(obj, key)) values.push(obj[key]);
- return values;
- };
-
- // Convert an object into a list of `[key, value]` pairs.
- _.pairs = function(obj) {
- var pairs = [];
- for (var key in obj) if (_.has(obj, key)) pairs.push([key, obj[key]]);
- return pairs;
- };
-
- // Invert the keys and values of an object. The values must be serializable.
- _.invert = function(obj) {
- var result = {};
- for (var key in obj) if (_.has(obj, key)) result[obj[key]] = key;
- return result;
- };
-
- // Return a sorted list of the function names available on the object.
- // Aliased as `methods`
- _.functions = _.methods = function(obj) {
- var names = [];
- for (var key in obj) {
- if (_.isFunction(obj[key])) names.push(key);
- }
- return names.sort();
- };
-
- // Extend a given object with all the properties in passed-in object(s).
- _.extend = function(obj) {
- each(slice.call(arguments, 1), function(source) {
- if (source) {
- for (var prop in source) {
- obj[prop] = source[prop];
- }
- }
- });
- return obj;
- };
-
- // Return a copy of the object only containing the whitelisted properties.
- _.pick = function(obj) {
- var copy = {};
- var keys = concat.apply(ArrayProto, slice.call(arguments, 1));
- each(keys, function(key) {
- if (key in obj) copy[key] = obj[key];
- });
- return copy;
- };
-
- // Return a copy of the object without the blacklisted properties.
- _.omit = function(obj) {
- var copy = {};
- var keys = concat.apply(ArrayProto, slice.call(arguments, 1));
- for (var key in obj) {
- if (!_.contains(keys, key)) copy[key] = obj[key];
- }
- return copy;
- };
-
- // Fill in a given object with default properties.
- _.defaults = function(obj) {
- each(slice.call(arguments, 1), function(source) {
- if (source) {
- for (var prop in source) {
- if (obj[prop] == null) obj[prop] = source[prop];
- }
- }
- });
- return obj;
- };
-
- // Create a (shallow-cloned) duplicate of an object.
- _.clone = function(obj) {
- if (!_.isObject(obj)) return obj;
- return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
- };
-
- // Invokes interceptor with the obj, and then returns obj.
- // The primary purpose of this method is to "tap into" a method chain, in
- // order to perform operations on intermediate results within the chain.
- _.tap = function(obj, interceptor) {
- interceptor(obj);
- return obj;
- };
-
- // Internal recursive comparison function for `isEqual`.
- var eq = function(a, b, aStack, bStack) {
- // Identical objects are equal. `0 === -0`, but they aren't identical.
- // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.
- if (a === b) return a !== 0 || 1 / a == 1 / b;
- // A strict comparison is necessary because `null == undefined`.
- if (a == null || b == null) return a === b;
- // Unwrap any wrapped objects.
- if (a instanceof _) a = a._wrapped;
- if (b instanceof _) b = b._wrapped;
- // Compare `[[Class]]` names.
- var className = toString.call(a);
- if (className != toString.call(b)) return false;
- switch (className) {
- // Strings, numbers, dates, and booleans are compared by value.
- case '[object String]':
- // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
- // equivalent to `new String("5")`.
- return a == String(b);
- case '[object Number]':
- // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for
- // other numeric values.
- return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);
- case '[object Date]':
- case '[object Boolean]':
- // Coerce dates and booleans to numeric primitive values. Dates are compared by their
- // millisecond representations. Note that invalid dates with millisecond representations
- // of `NaN` are not equivalent.
- return +a == +b;
- // RegExps are compared by their source patterns and flags.
- case '[object RegExp]':
- return a.source == b.source &&
- a.global == b.global &&
- a.multiline == b.multiline &&
- a.ignoreCase == b.ignoreCase;
- }
- if (typeof a != 'object' || typeof b != 'object') return false;
- // Assume equality for cyclic structures. The algorithm for detecting cyclic
- // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
- var length = aStack.length;
- while (length--) {
- // Linear search. Performance is inversely proportional to the number of
- // unique nested structures.
- if (aStack[length] == a) return bStack[length] == b;
- }
- // Add the first object to the stack of traversed objects.
- aStack.push(a);
- bStack.push(b);
- var size = 0, result = true;
- // Recursively compare objects and arrays.
- if (className == '[object Array]') {
- // Compare array lengths to determine if a deep comparison is necessary.
- size = a.length;
- result = size == b.length;
- if (result) {
- // Deep compare the contents, ignoring non-numeric properties.
- while (size--) {
- if (!(result = eq(a[size], b[size], aStack, bStack))) break;
- }
- }
- } else {
- // Objects with different constructors are not equivalent, but `Object`s
- // from different frames are.
- var aCtor = a.constructor, bCtor = b.constructor;
- if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) &&
- _.isFunction(bCtor) && (bCtor instanceof bCtor))) {
- return false;
- }
- // Deep compare objects.
- for (var key in a) {
- if (_.has(a, key)) {
- // Count the expected number of properties.
- size++;
- // Deep compare each member.
- if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break;
- }
- }
- // Ensure that both objects contain the same number of properties.
- if (result) {
- for (key in b) {
- if (_.has(b, key) && !(size--)) break;
- }
- result = !size;
- }
- }
- // Remove the first object from the stack of traversed objects.
- aStack.pop();
- bStack.pop();
- return result;
- };
-
- // Perform a deep comparison to check if two objects are equal.
- _.isEqual = function(a, b) {
- return eq(a, b, [], []);
- };
-
- // Is a given array, string, or object empty?
- // An "empty" object has no enumerable own-properties.
- _.isEmpty = function(obj) {
- if (obj == null) return true;
- if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;
- for (var key in obj) if (_.has(obj, key)) return false;
- return true;
- };
-
- // Is a given value a DOM element?
- _.isElement = function(obj) {
- return !!(obj && obj.nodeType === 1);
- };
-
- // Is a given value an array?
- // Delegates to ECMA5's native Array.isArray
- _.isArray = nativeIsArray || function(obj) {
- return toString.call(obj) == '[object Array]';
- };
-
- // Is a given variable an object?
- _.isObject = function(obj) {
- return obj === Object(obj);
- };
-
- // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp.
- each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) {
- _['is' + name] = function(obj) {
- return toString.call(obj) == '[object ' + name + ']';
- };
- });
-
- // Define a fallback version of the method in browsers (ahem, IE), where
- // there isn't any inspectable "Arguments" type.
- if (!_.isArguments(arguments)) {
- _.isArguments = function(obj) {
- return !!(obj && _.has(obj, 'callee'));
- };
- }
-
- // Optimize `isFunction` if appropriate.
- if (typeof (/./) !== 'function') {
- _.isFunction = function(obj) {
- return typeof obj === 'function';
- };
- }
-
- // Is a given object a finite number?
- _.isFinite = function(obj) {
- return isFinite(obj) && !isNaN(parseFloat(obj));
- };
-
- // Is the given value `NaN`? (NaN is the only number which does not equal itself).
- _.isNaN = function(obj) {
- return _.isNumber(obj) && obj != +obj;
- };
-
- // Is a given value a boolean?
- _.isBoolean = function(obj) {
- return obj === true || obj === false || toString.call(obj) == '[object Boolean]';
- };
-
- // Is a given value equal to null?
- _.isNull = function(obj) {
- return obj === null;
- };
-
- // Is a given variable undefined?
- _.isUndefined = function(obj) {
- return obj === void 0;
- };
-
- // Shortcut function for checking if an object has a given property directly
- // on itself (in other words, not on a prototype).
- _.has = function(obj, key) {
- return hasOwnProperty.call(obj, key);
- };
-
- // Utility Functions
- // -----------------
-
- // Run Underscore.js in *noConflict* mode, returning the `_` variable to its
- // previous owner. Returns a reference to the Underscore object.
- _.noConflict = function() {
- root._ = previousUnderscore;
- return this;
- };
-
- // Keep the identity function around for default iterators.
- _.identity = function(value) {
- return value;
- };
-
- // Run a function **n** times.
- _.times = function(n, iterator, context) {
- var accum = Array(n);
- for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i);
- return accum;
- };
-
- // Return a random integer between min and max (inclusive).
- _.random = function(min, max) {
- if (max == null) {
- max = min;
- min = 0;
- }
- return min + (0 | Math.random() * (max - min + 1));
- };
-
- // List of HTML entities for escaping.
- var entityMap = {
- escape: {
- '&': '&amp;',
- '<': '&lt;',
- '>': '&gt;',
- '"': '&quot;',
- "'": '&#x27;',
- '/': '&#x2F;'
- }
- };
- entityMap.unescape = _.invert(entityMap.escape);
-
- // Regexes containing the keys and values listed immediately above.
- var entityRegexes = {
- escape: new RegExp('[' + _.keys(entityMap.escape).join('') + ']', 'g'),
- unescape: new RegExp('(' + _.keys(entityMap.unescape).join('|') + ')', 'g')
- };
-
- // Functions for escaping and unescaping strings to/from HTML interpolation.
- _.each(['escape', 'unescape'], function(method) {
- _[method] = function(string) {
- if (string == null) return '';
- return ('' + string).replace(entityRegexes[method], function(match) {
- return entityMap[method][match];
- });
- };
- });
-
- // If the value of the named property is a function then invoke it;
- // otherwise, return it.
- _.result = function(object, property) {
- if (object == null) return null;
- var value = object[property];
- return _.isFunction(value) ? value.call(object) : value;
- };
-
- // Add your own custom functions to the Underscore object.
- _.mixin = function(obj) {
- each(_.functions(obj), function(name){
- var func = _[name] = obj[name];
- _.prototype[name] = function() {
- var args = [this._wrapped];
- push.apply(args, arguments);
- return result.call(this, func.apply(_, args));
- };
- });
- };
-
- // Generate a unique integer id (unique within the entire client session).
- // Useful for temporary DOM ids.
- var idCounter = 0;
- _.uniqueId = function(prefix) {
- var id = '' + ++idCounter;
- return prefix ? prefix + id : id;
- };
-
- // By default, Underscore uses ERB-style template delimiters, change the
- // following template settings to use alternative delimiters.
- _.templateSettings = {
- evaluate : /<%([\s\S]+?)%>/g,
- interpolate : /<%=([\s\S]+?)%>/g,
- escape : /<%-([\s\S]+?)%>/g
- };
-
- // When customizing `templateSettings`, if you don't want to define an
- // interpolation, evaluation or escaping regex, we need one that is
- // guaranteed not to match.
- var noMatch = /(.)^/;
-
- // Certain characters need to be escaped so that they can be put into a
- // string literal.
- var escapes = {
- "'": "'",
- '\\': '\\',
- '\r': 'r',
- '\n': 'n',
- '\t': 't',
- '\u2028': 'u2028',
- '\u2029': 'u2029'
- };
-
- var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g;
-
- // JavaScript micro-templating, similar to John Resig's implementation.
- // Underscore templating handles arbitrary delimiters, preserves whitespace,
- // and correctly escapes quotes within interpolated code.
- _.template = function(text, data, settings) {
- settings = _.defaults({}, settings, _.templateSettings);
-
- // Combine delimiters into one regular expression via alternation.
- var matcher = new RegExp([
- (settings.escape || noMatch).source,
- (settings.interpolate || noMatch).source,
- (settings.evaluate || noMatch).source
- ].join('|') + '|$', 'g');
-
- // Compile the template source, escaping string literals appropriately.
- var index = 0;
- var source = "__p+='";
- text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
- source += text.slice(index, offset)
- .replace(escaper, function(match) { return '\\' + escapes[match]; });
-
- if (escape) {
- source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
- }
- if (interpolate) {
- source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
- }
- if (evaluate) {
- source += "';\n" + evaluate + "\n__p+='";
- }
- index = offset + match.length;
- return match;
- });
- source += "';\n";
-
- // If a variable is not specified, place data values in local scope.
- if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
-
- source = "var __t,__p='',__j=Array.prototype.join," +
- "print=function(){__p+=__j.call(arguments,'');};\n" +
- source + "return __p;\n";
-
- try {
- var render = new Function(settings.variable || 'obj', '_', source);
- } catch (e) {
- e.source = source;
- throw e;
- }
-
- if (data) return render(data, _);
- var template = function(data) {
- return render.call(this, data, _);
- };
-
- // Provide the compiled function source as a convenience for precompilation.
- template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}';
-
- return template;
- };
-
- // Add a "chain" function, which will delegate to the wrapper.
- _.chain = function(obj) {
- return _(obj).chain();
- };
-
- // OOP
- // ---------------
- // If Underscore is called as a function, it returns a wrapped object that
- // can be used OO-style. This wrapper holds altered versions of all the
- // underscore functions. Wrapped objects may be chained.
-
- // Helper function to continue chaining intermediate results.
- var result = function(obj) {
- return this._chain ? _(obj).chain() : obj;
- };
-
- // Add all of the Underscore functions to the wrapper object.
- _.mixin(_);
-
- // Add all mutator Array functions to the wrapper.
- each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
- var method = ArrayProto[name];
- _.prototype[name] = function() {
- var obj = this._wrapped;
- method.apply(obj, arguments);
- if ((name == 'shift' || name == 'splice') && obj.length === 0) delete obj[0];
- return result.call(this, obj);
- };
- });
-
- // Add all accessor Array functions to the wrapper.
- each(['concat', 'join', 'slice'], function(name) {
- var method = ArrayProto[name];
- _.prototype[name] = function() {
- return result.call(this, method.apply(this._wrapped, arguments));
- };
- });
-
- _.extend(_.prototype, {
-
- // Start chaining a wrapped Underscore object.
- chain: function() {
- this._chain = true;
- return this;
- },
-
- // Extracts the result from a wrapped and chained object.
- value: function() {
- return this._wrapped;
- }
-
- });
-
-}).call(this);